summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter1.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter10.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter11.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter12.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter13.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter14.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter15.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter2.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter3.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter4.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter5.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter6.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter7.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter8.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/chapter9.ipynb0
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/screenshots/code1.pngbin102009 -> 102009 bytes
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/screenshots/code2.pngbin92400 -> 92400 bytes
-rwxr-xr-x[-rw-r--r--]ANSI_C_Programming/screenshots/code3.pngbin93166 -> 93166 bytes
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/Chapter1.ipynb504
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/Chapter2.ipynb339
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/Chapter3.ipynb605
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/Chapter4.ipynb1106
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/Chapter5.ipynb1035
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/README.txt10
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k1.pngbin0 -> 16503 bytes
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k2.pngbin0 -> 18858 bytes
-rwxr-xr-xA_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k3.pngbin0 -> 14827 bytes
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter1.ipynb332
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter10.ipynb520
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter11.ipynb637
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter2.ipynb329
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter3.ipynb227
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter4.ipynb226
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter5.ipynb479
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter6.ipynb441
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter7.ipynb384
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter8.ipynb327
-rwxr-xr-xA_Heat_Transfer_Text_Book/Chapter9.ipynb448
-rwxr-xr-xA_Heat_Transfer_Text_Book/README.txt10
-rwxr-xr-xA_Heat_Transfer_Text_Book/screenshots/Chapter_11.pngbin0 -> 34085 bytes
-rwxr-xr-xA_Heat_Transfer_Text_Book/screenshots/Chapter_3.pngbin0 -> 45312 bytes
-rwxr-xr-xA_Heat_Transfer_Text_Book/screenshots/Chapter_6.pngbin0 -> 52314 bytes
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.pngbin26170 -> 26170 bytes
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.pngbin20908 -> 20908 bytes
-rwxr-xr-x[-rw-r--r--]A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.pngbin25062 -> 25062 bytes
-rwxr-xr-xApplied_Physics_II/Chapter_1.ipynb1108
-rwxr-xr-xApplied_Physics_II/Chapter_2.ipynb1000
-rwxr-xr-xApplied_Physics_II/Chapter_3.ipynb779
-rwxr-xr-xApplied_Physics_II/Chapter_4.ipynb141
-rwxr-xr-xApplied_Physics_II/Chapter_5.ipynb1097
-rwxr-xr-xApplied_Physics_II/Chapter_6.ipynb189
-rwxr-xr-xApplied_Physics_II/Chapter_7.ipynb178
-rwxr-xr-xApplied_Physics_II/README.txt10
-rwxr-xr-xApplied_Physics_II/screenshots/halfangular.pngbin0 -> 57768 bytes
-rwxr-xr-xApplied_Physics_II/screenshots/probability.pngbin0 -> 36433 bytes
-rwxr-xr-xApplied_Physics_II/screenshots/visiblerange.pngbin0 -> 67578 bytes
-rwxr-xr-xBasic_Electrical_Engineering/Chapter10.ipynb1357
-rwxr-xr-xBasic_Electrical_Engineering/Chapter11.ipynb929
-rwxr-xr-xBasic_Electrical_Engineering/Chapter12.ipynb1251
-rwxr-xr-xBasic_Electrical_Engineering/Chapter13.ipynb1498
-rwxr-xr-xBasic_Electrical_Engineering/Chapter14.ipynb1213
-rwxr-xr-xBasic_Electrical_Engineering/Chapter15.ipynb957
-rwxr-xr-xBasic_Electrical_Engineering/Chapter16.ipynb1654
-rwxr-xr-xBasic_Electrical_Engineering/Chapter17.ipynb332
-rwxr-xr-xBasic_Electrical_Engineering/Chapter18.ipynb542
-rwxr-xr-xBasic_Electrical_Engineering/Chapter2.ipynb1532
-rwxr-xr-xBasic_Electrical_Engineering/Chapter3.ipynb2116
-rwxr-xr-xBasic_Electrical_Engineering/Chapter4.ipynb1114
-rwxr-xr-xBasic_Electrical_Engineering/Chapter5.ipynb841
-rwxr-xr-xBasic_Electrical_Engineering/Chapter6.ipynb627
-rwxr-xr-xBasic_Electrical_Engineering/Chapter7.ipynb975
-rwxr-xr-xBasic_Electrical_Engineering/Chapter8.ipynb1188
-rwxr-xr-xBasic_Electrical_Engineering/Chapter9.ipynb1092
-rwxr-xr-xBasic_Electrical_Engineering/screenshots/Screenshot1.pngbin0 -> 102574 bytes
-rwxr-xr-xBasic_Electrical_Engineering/screenshots/Screenshot2.pngbin0 -> 71004 bytes
-rwxr-xr-xBasic_Electrical_Engineering/screenshots/Screenshot3.pngbin0 -> 75482 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/README.txt0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/screenshots/displaysinevoltagecro.pngbin22569 -> 22569 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/screenshots/gainatcuttoff.pngbin9389 -> 9389 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Electronics_and_Linear_Circuits/screenshots/hybridparameters.pngbin14439 -> 14439 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/README.txt0
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/bme1.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/bme2.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/bme6.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/screenshots/ravi1.pngbin65309 -> 65309 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/screenshots/ravi2.pngbin45601 -> 45601 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Mechanical_Engineering/screenshots/ravi3.pngbin40175 -> 40175 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/README.txt0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch15.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch16.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch17.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch18.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch19.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch20.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch21.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch22.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch23.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch25.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch26.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch27.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch28.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch29.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms.pngbin12889 -> 12889 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_1.pngbin12889 -> 12889 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_2.pngbin12889 -> 12889 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_3.pngbin12889 -> 12889 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/bb.pngbin75537 -> 75537 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/cc.pngbin53395 -> 53395 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart.pngbin15153 -> 15153 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_1.pngbin15153 -> 15153 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_2.pngbin15153 -> 15153 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_3.pngbin15153 -> 15153 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater.pngbin5133 -> 5133 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_1.pngbin5133 -> 5133 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_2.pngbin5133 -> 5133 bytes
-rwxr-xr-x[-rw-r--r--]Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_3.pngbin5133 -> 5133 bytes
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 1 .ipynb1483
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 2.ipynb1156
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 3.ipynb889
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 4.ipynb996
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 5.ipynb517
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 6.ipynb1088
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 7.ipynb894
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 8.ipynb769
-rwxr-xr-xBeginning_C++_through_Game_Programming/Chapter 9.ipynb759
-rwxr-xr-xBeginning_C++_through_Game_Programming/README.txt10
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch1.ipynb49
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch10.ipynb142
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch11.ipynb175
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch12.ipynb169
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch13.ipynb121
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch14.ipynb130
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch15.ipynb127
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch2.ipynb112
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch3.ipynb133
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch4.ipynb112
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch5.ipynb229
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch6.ipynb265
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch7.ipynb175
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch8.ipynb239
-rwxr-xr-xBeginning_C++_through_Game_Programming/ch9.ipynb175
-rwxr-xr-xBeginning_C++_through_Game_Programming/screenshots/fileipop.pngbin0 -> 37169 bytes
-rwxr-xr-xBeginning_C++_through_Game_Programming/screenshots/fruitful.pngbin0 -> 32934 bytes
-rwxr-xr-xBeginning_C++_through_Game_Programming/screenshots/structures.pngbin0 -> 28038 bytes
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/README.txt0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter1.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter10.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter11.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter12.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter13.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter14.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter2.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter3.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter4.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter5.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter6.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter7.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter8.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/chapter9.ipynb0
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/screenshots/vaibbhav_vajani-3.pngbin6864 -> 6864 bytes
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-1.pngbin23151 -> 23151 bytes
-rwxr-xr-x[-rw-r--r--]Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-2.pngbin23100 -> 23100 bytes
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/README.txt0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter1.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter10.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter11.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter12.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter13.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter14.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter2.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter3.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter4.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter5.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter6.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter7.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter8.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/chapter9.ipynb0
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-1.pngbin32912 -> 32912 bytes
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-2.pngbin14353 -> 14353 bytes
-rwxr-xr-x[-rw-r--r--]C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-3.pngbin23176 -> 23176 bytes
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_10(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_11(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_12(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_13(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_14(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_15(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_16(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_17(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_18(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_19(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_2(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_20(2).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_21(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_22(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_3(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_4(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_5(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_6(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_7(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_8(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/Chapter_9(1).ipynb0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/README.txt0
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/screenshots/c++preproce.pngbin35527 -> 35527 bytes
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/screenshots/datatypes.pngbin29796 -> 29796 bytes
-rwxr-xr-x[-rw-r--r--]C++_from_the_Ground/screenshots/inheritence.pngbin55815 -> 55815 bytes
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/README.txt0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch10_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch11_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch12_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch13_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch14_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch15_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch16_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch17_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch18_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch1_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch2_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch3_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch4_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch5_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch6_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch7_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/ch8_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/screenshots/1.pngbin144195 -> 144195 bytes
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/screenshots/2.pngbin144507 -> 144507 bytes
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/screenshots/3.pngbin167523 -> 167523 bytes
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/screenshots/pic111.pngbin134032 -> 134032 bytes
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/screenshots/pic222.pngbin140462 -> 140462 bytes
-rwxr-xr-x[-rw-r--r--]Chemical_Engineering_Thermodynamics/screenshots/pic333.pngbin149247 -> 149247 bytes
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_1.ipynb356
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_10.ipynb152
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_11.ipynb314
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_12.ipynb440
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_2.ipynb334
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_3.ipynb470
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_4.ipynb336
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_5.ipynb142
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_6.ipynb62
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_7.ipynb184
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_8.ipynb163
-rwxr-xr-xConcepts_Of_Modern_Physics/Chapter_9.ipynb271
-rwxr-xr-xConcepts_Of_Modern_Physics/README.txt10
-rwxr-xr-xConcepts_Of_Modern_Physics/screenshots/3_4.pngbin0 -> 23632 bytes
-rwxr-xr-xConcepts_Of_Modern_Physics/screenshots/9_4.pngbin0 -> 19042 bytes
-rwxr-xr-xConcepts_Of_Modern_Physics/screenshots/9_7.pngbin0 -> 22906 bytes
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/README.txt0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/screenshots/hashtableslinear.pngbin55887 -> 55887 bytes
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/screenshots/shellsorting.pngbin57803 -> 57803 bytes
-rwxr-xr-x[-rw-r--r--]Data_Structures_and_Algorithms_in_Java/screenshots/shortestpath.pngbin53534 -> 53534 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_10_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_12_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_13_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_14_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_15_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_2_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_3_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_4_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_5_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_6_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_7_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_8_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_9_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/README.txt0
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1.pngbin31619 -> 31619 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_1.pngbin31619 -> 31619 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_2.pngbin34488 -> 34488 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2.pngbin31462 -> 31462 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_1.pngbin31462 -> 31462 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_2.pngbin31619 -> 31619 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3.pngbin34488 -> 34488 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_1.pngbin34488 -> 34488 bytes
-rwxr-xr-x[-rw-r--r--]Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_2.pngbin31462 -> 31462 bytes
-rwxr-xr-xElectronic_Devices/Chapter1.ipynb156
-rwxr-xr-xElectronic_Devices/Chapter10.ipynb740
-rwxr-xr-xElectronic_Devices/Chapter11.ipynb172
-rwxr-xr-xElectronic_Devices/Chapter12.ipynb458
-rwxr-xr-xElectronic_Devices/Chapter13.ipynb580
-rwxr-xr-xElectronic_Devices/Chapter14.ipynb346
-rwxr-xr-xElectronic_Devices/Chapter15.ipynb325
-rwxr-xr-xElectronic_Devices/Chapter16.ipynb299
-rwxr-xr-xElectronic_Devices/Chapter17.ipynb336
-rwxr-xr-xElectronic_Devices/Chapter18.ipynb56
-rwxr-xr-xElectronic_Devices/Chapter2.ipynb629
-rwxr-xr-xElectronic_Devices/Chapter3.ipynb369
-rwxr-xr-xElectronic_Devices/Chapter4.ipynb446
-rwxr-xr-xElectronic_Devices/Chapter5.ipynb419
-rwxr-xr-xElectronic_Devices/Chapter6.ipynb591
-rwxr-xr-xElectronic_Devices/Chapter7.ipynb710
-rwxr-xr-xElectronic_Devices/Chapter8.ipynb422
-rwxr-xr-xElectronic_Devices/Chapter9.ipynb371
-rwxr-xr-xElectronic_Devices/README.txt10
-rwxr-xr-xElectronic_Devices/screenshots/ipwaveform.pngbin0 -> 14612 bytes
-rwxr-xr-xElectronic_Devices/screenshots/modulatedopvoltage.pngbin0 -> 24301 bytes
-rwxr-xr-xElectronic_Devices/screenshots/transfercharectercurve.pngbin0 -> 12968 bytes
-rwxr-xr-xElectronic_Principles/Chapter_10_New.ipynb440
-rwxr-xr-xElectronic_Principles/Chapter_11_New.ipynb523
-rwxr-xr-xElectronic_Principles/Chapter_12_New.ipynb593
-rwxr-xr-xElectronic_Principles/Chapter_13_New.ipynb784
-rwxr-xr-xElectronic_Principles/Chapter_14_New.ipynb648
-rwxr-xr-xElectronic_Principles/Chapter_15_New.ipynb383
-rwxr-xr-xElectronic_Principles/Chapter_16_New.ipynb933
-rwxr-xr-xElectronic_Principles/Chapter_17_New.ipynb614
-rwxr-xr-xElectronic_Principles/Chapter_18_New.ipynb568
-rwxr-xr-xElectronic_Principles/Chapter_19_New.ipynb502
-rwxr-xr-xElectronic_Principles/Chapter_1_New.ipynb256
-rwxr-xr-xElectronic_Principles/Chapter_20_New.ipynb424
-rwxr-xr-xElectronic_Principles/Chapter_21_New.ipynb620
-rwxr-xr-xElectronic_Principles/Chapter_22_New.ipynb369
-rwxr-xr-xElectronic_Principles/Chapter_23_New.ipynb618
-rwxr-xr-xElectronic_Principles/Chapter_24_New.ipynb706
-rwxr-xr-xElectronic_Principles/Chapter_2_New.ipynb160
-rwxr-xr-xElectronic_Principles/Chapter_3_New.ipynb334
-rwxr-xr-xElectronic_Principles/Chapter_4_New.ipynb515
-rwxr-xr-xElectronic_Principles/Chapter_5_New.ipynb446
-rwxr-xr-xElectronic_Principles/Chapter_6_New.ipynb534
-rwxr-xr-xElectronic_Principles/Chapter_7_New.ipynb427
-rwxr-xr-xElectronic_Principles/Chapter_8_New.ipynb300
-rwxr-xr-xElectronic_Principles/Chapter_9_New.ipynb266
-rwxr-xr-xElectronic_Principles/README.txt10
-rwxr-xr-xElectronic_Principles/screenshots/nitya-1.pngbin0 -> 50704 bytes
-rwxr-xr-xElectronic_Principles/screenshots/nitya-2.pngbin0 -> 68798 bytes
-rwxr-xr-xElectronic_Principles/screenshots/nitya-3.pngbin0 -> 51270 bytes
-rwxr-xr-xElectronics_Devices_And_Circuits/Chapter2.ipynb567
-rwxr-xr-xElectronics_Devices_And_Circuits/Chapter6.ipynb545
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter1.ipynb1579
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter10.ipynb458
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter11.ipynb170
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter3.ipynb1540
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter4.ipynb1211
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter5.ipynb653
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter7.ipynb645
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter8.ipynb435
-rwxr-xr-xElectronics_Devices_And_Circuits/chapter9.ipynb181
-rwxr-xr-xElectronics_Devices_And_Circuits/screenshots/snap_4.1.pngbin0 -> 51900 bytes
-rwxr-xr-xElectronics_Devices_And_Circuits/screenshots/snap_5.1.pngbin0 -> 53409 bytes
-rwxr-xr-xElectronics_Devices_And_Circuits/screenshots/snap_7.1.pngbin0 -> 50825 bytes
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/README.txt0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_12.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_13.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_14.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/chapter_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).pngbin7376 -> 7376 bytes
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/screenshots/cospropogatingwave.pngbin21804 -> 21804 bytes
-rwxr-xr-x[-rw-r--r--]Elements_of_Electromagnetics/screenshots/vectors.pngbin51938 -> 51938 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER10.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER11.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER12.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER4.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER5.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER6.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER7.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER8.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER9.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/CHAPTER_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/README.txt0
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/screenshots/heat_transferred.pngbin9126 -> 9126 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/screenshots/length_required.pngbin13684 -> 13684 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Heat_Transfer/screenshots/wall_tempratures.pngbin10804 -> 10804 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter10_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter11_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter12_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter13_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter14_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter15_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter17_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter18_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter1_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter2_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter3_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter4_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter5_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter6_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter7_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter8_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter9_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_12.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/Chapter_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/README.txt0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter1_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter2_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter4_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter5_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter6_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter7_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/chapter8_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Capture1.pngbin18748 -> 18748 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Capture2.pngbin32269 -> 32269 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Untitled.pngbin25698 -> 25698 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Untitled1.pngbin23371 -> 23371 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Untitled3.pngbin40962 -> 40962 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Untitled_1.pngbin87075 -> 87075 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/Untitled_2.pngbin87075 -> 87075 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/capture.pngbin19889 -> 19889 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/screenshot1.PNGbin33329 -> 33329 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/screenshot1.pngbin18000054 -> 18000054 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/screenshot2.PNGbin31796 -> 31796 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/screenshot2.pngbin18000054 -> 18000054 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/screenshot3.PNGbin19782 -> 19782 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/screenshot3.pngbin18000054 -> 18000054 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/shot1.PNGbin43717 -> 43717 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/shot2.PNGbin41477 -> 41477 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics/screenshots/shot3.PNGbin35802 -> 35802 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter10_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter11_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter12_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter13_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter14_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter15_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter17_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter18_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter1_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter2_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter3_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter4_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter5_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter6_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter7_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter8_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/Chapter9_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/README.txt0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/screenshots/Untitled.pngbin87075 -> 87075 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/screenshots/Untitled_1.pngbin87075 -> 87075 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/screenshots/Untitled_2.pngbin87075 -> 87075 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/screenshots/shot1.PNGbin43717 -> 43717 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/screenshots/shot2.PNGbin41477 -> 41477 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Aruldhas/screenshots/shot3.PNGbin35802 -> 35802 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_12.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/Chapter_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/README.txt0
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/screenshots/screenshot1.PNGbin33329 -> 33329 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/screenshots/screenshot2.PNGbin31796 -> 31796 bytes
-rwxr-xr-x[-rw-r--r--]Engineering_Physics_Marikani/screenshots/screenshot3.PNGbin19782 -> 19782 bytes
-rwxr-xr-xFluid_Mechanics/Chapter1.ipynb562
-rwxr-xr-xFluid_Mechanics/Chapter10.ipynb426
-rwxr-xr-xFluid_Mechanics/Chapter11.ipynb312
-rwxr-xr-xFluid_Mechanics/Chapter12.ipynb342
-rwxr-xr-xFluid_Mechanics/Chapter2.ipynb920
-rwxr-xr-xFluid_Mechanics/Chapter3.ipynb503
-rwxr-xr-xFluid_Mechanics/Chapter4.ipynb529
-rwxr-xr-xFluid_Mechanics/Chapter5.ipynb545
-rwxr-xr-xFluid_Mechanics/Chapter6.ipynb128
-rwxr-xr-xFluid_Mechanics/Chapter7.ipynb367
-rwxr-xr-xFluid_Mechanics/Chapter8.ipynb358
-rwxr-xr-xFluid_Mechanics/Chapter9.ipynb799
-rwxr-xr-xFluid_Mechanics/README.txt10
-rwxr-xr-xFluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.pngbin0 -> 38369 bytes
-rwxr-xr-xFluid_Mechanics/screenshots/plot1.pngbin0 -> 27945 bytes
-rwxr-xr-xFluid_Mechanics/screenshots/plot2.pngbin0 -> 14805 bytes
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_1_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_2_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_3_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_4_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_5_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_6_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_7_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_8_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_9_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/README.txt0
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depth-flowrate.pngbin20093 -> 20093 bytes
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depthvsflow.pngbin16606 -> 16606 bytes
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/flowrate.pngbin22119 -> 22119 bytes
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/rateofflowandvlo.pngbin14911 -> 14911 bytes
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump.pngbin30741 -> 30741 bytes
-rwxr-xr-x[-rw-r--r--]Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump_1.pngbin19178 -> 19178 bytes
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_10.ipynb67
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_11.ipynb146
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_12.ipynb281
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_13.ipynb30
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_14.ipynb285
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_15.ipynb229
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_16.ipynb290
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_2.ipynb428
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_3.ipynb448
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_4.ipynb157
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_5.ipynb347
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_6.ipynb130
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_7.ipynb226
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_8.ipynb282
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_9.ipynb271
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_no_1.ipynb58
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/README.txt10
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter2.pngbin0 -> 182077 bytes
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter4.pngbin0 -> 177616 bytes
-rwxr-xr-xFluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/chapter3.pngbin0 -> 178108 bytes
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/README.txt0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch15.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch16.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch17.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch18.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/screenshots/plotkbckbedb.pngbin14155 -> 14155 bytes
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/screenshots/relationnubedrep.pngbin8780 -> 8780 bytes
-rwxr-xr-x[-rw-r--r--]Fluidization_Engineering/screenshots/relationshebdrep.pngbin9690 -> 9690 bytes
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/Ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/README.txt0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/screenshots/energybands.pngbin54573 -> 54573 bytes
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/screenshots/steadystatephoto.pngbin47996 -> 47996 bytes
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Electronics_Devices/screenshots/transfercharateristics.pngbin8684 -> 8684 bytes
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_10.ipynb346
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_11.ipynb517
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_12.ipynb930
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_13.ipynb931
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_14.ipynb460
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_2.ipynb365
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_3.ipynb528
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_4.ipynb567
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_5.ipynb130
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_6.ipynb730
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_7.ipynb674
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_8.ipynb715
-rwxr-xr-xFundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_9.ipynb1144
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/README.txt0
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph1.pngbin47621 -> 17156 bytes
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph2.pngbin52838 -> 40171 bytes
-rwxr-xr-x[-rw-r--r--]Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph3.pngbin46639 -> 33847 bytes
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/Ch_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/README.txt0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/ch_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/ch_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/ch_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/ch_12.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/ch_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/screenshots/seconds.pngbin25660 -> 25660 bytes
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/screenshots/surface-elevation.pngbin12594 -> 12594 bytes
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Fluid_Mechanics/screenshots/the-drag.pngbin26466 -> 26466 bytes
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_12.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_13.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_14.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/Chapter_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/README.txt0
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-1.pngbin14936 -> 14936 bytes
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-2.pngbin28772 -> 28772 bytes
-rwxr-xr-x[-rw-r--r--]Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-3.pngbin19748 -> 19748 bytes
-rwxr-xr-xHeat_Transfer/Chapter_2.ipynb2662
-rwxr-xr-xHeat_Transfer/Chapter_3.ipynb3026
-rwxr-xr-xHeat_Transfer/Chapter_4.ipynb1166
-rwxr-xr-xHeat_Transfer/Chapter_5.ipynb1858
-rwxr-xr-xHeat_Transfer/Chapter_6.ipynb1104
-rwxr-xr-xHeat_Transfer/screenshots/Screen1.pngbin0 -> 69067 bytes
-rwxr-xr-xHeat_Transfer/screenshots/screen2.pngbin0 -> 112358 bytes
-rwxr-xr-xHeat_Transfer/screenshots/screen3.pngbin0 -> 112358 bytes
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_03.ipynb457
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_04.ipynb555
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_05.ipynb464
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_06.ipynb363
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_07.ipynb412
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_08.ipynb73
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_09.ipynb612
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_10.ipynb514
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_11.ipynb686
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_12.ipynb483
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_13.ipynb425
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_14.ipynb705
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_15.ipynb815
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_16.ipynb583
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_17.ipynb832
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_18.ipynb658
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_19.ipynb861
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_21.ipynb167
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_22.ipynb544
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_23.ipynb106
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_24.ipynb387
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_26.ipynb167
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_27.ipynb544
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_28.ipynb108
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/README.txt10
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/economics.pngbin0 -> 64537 bytes
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/forced_convention.pngbin0 -> 71086 bytes
-rwxr-xr-xHeat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/shell_heat.pngbin0 -> 79427 bytes
-rwxr-xr-x[-rw-r--r--]Hydraulics/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Hydraulics/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Hydraulics/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Hydraulics/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Hydraulics/Chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Hydraulics/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Hydraulics/README.txt0
-rwxr-xr-x[-rw-r--r--]Hydraulics/screenshots/pic11.pngbin112429 -> 112429 bytes
-rwxr-xr-x[-rw-r--r--]Hydraulics/screenshots/pic22.pngbin130446 -> 130446 bytes
-rwxr-xr-x[-rw-r--r--]Hydraulics/screenshots/pic33.pngbin119096 -> 119096 bytes
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/Chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/README.txt0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/screenshots/chapter8.pngbin37484 -> 37484 bytes
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/screenshots/coldair-stardotto.pngbin24596 -> 24596 bytes
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/screenshots/decreaseentropy.pngbin25885 -> 25885 bytes
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/screenshots/mechanicsesmicinst.pngbin38036 -> 38036 bytes
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/screenshots/pvdiagram.pngbin30463 -> 30463 bytes
-rwxr-xr-x[-rw-r--r--]Industrial_Instrumentation/screenshots/rangeflowratameter.pngbin71638 -> 71638 bytes
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/README.txt0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/screenshots/pic11.pngbin123848 -> 123848 bytes
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/screenshots/pic22.pngbin133387 -> 133387 bytes
-rwxr-xr-x[-rw-r--r--]Introduction_To_Chemical_Engineering/screenshots/pic33.pngbin133230 -> 133230 bytes
-rwxr-xr-x[-rw-r--r--]Let_us_C/README.txt0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-1.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-10.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-11.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-12.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-13.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-14.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-15.ipynb1203
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-16.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-17.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-18.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-2.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-20.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-21.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-3.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-4.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-5.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-6.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-7.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-8.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/chapter-9.ipynb0
-rwxr-xr-x[-rw-r--r--]Let_us_C/screenshots/binary.pngbin30718 -> 30718 bytes
-rwxr-xr-x[-rw-r--r--]Let_us_C/screenshots/hellowindows.pngbin67812 -> 67812 bytes
-rwxr-xr-x[-rw-r--r--]Let_us_C/screenshots/macro.pngbin32392 -> 32392 bytes
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/Chapter_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/README.txt0
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/screenshots/frequency_response.JPGbin20522 -> 20522 bytes
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/screenshots/input_output_differentiator.JPGbin29835 -> 29835 bytes
-rwxr-xr-x[-rw-r--r--]Linear_Integrated_Circuits/screenshots/ip_and_op_integrator.JPGbin32114 -> 32114 bytes
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH10.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH12.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH14.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH16.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH17.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH18.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH19.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH20.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH21.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH3.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH4.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH5.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH6.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH7.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH8.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/CH9.ipynb0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/README.txt0
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/screenshots/10_2.pngbin12360 -> 12360 bytes
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/screenshots/8_1.pngbin16879 -> 16879 bytes
-rwxr-xr-x[-rw-r--r--]Materials_science_and_engineering_an_introduction/screenshots/9_3.pngbin27656 -> 27656 bytes
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/README.txt0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter1.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter11.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter12.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter2.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter3.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter4.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter5.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter6.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter7.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter8.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/chapter9.ipynb0
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/screenshots/screen1.pngbin64967 -> 64967 bytes
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/screenshots/screen2.pngbin18650 -> 18650 bytes
-rwxr-xr-x[-rw-r--r--]Mechanics_of_Materials/screenshots/screen3.pngbin95229 -> 95229 bytes
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_8.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/Chapter_9.ipynb0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/README.txt0
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/screenshots/sachin1.pngbin56781 -> 56781 bytes
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/screenshots/sachin2.pngbin14611 -> 14611 bytes
-rwxr-xr-x[-rw-r--r--]Microwave_and_Radar_Engineering/screenshots/sachin3.pngbin13515 -> 13515 bytes
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1.ipynb20
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10.ipynb284
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10_1.ipynb284
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11.ipynb466
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11_1.ipynb466
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12.ipynb209
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12_1.ipynb209
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13.ipynb62
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13_1.ipynb62
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14.ipynb188
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14_1.ipynb188
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15.ipynb95
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15_1.ipynb95
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16.ipynb104
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16_1.ipynb104
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1_1.ipynb20
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2.ipynb363
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2_1.ipynb363
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3.ipynb503
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3_1.ipynb503
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4.ipynb563
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4_1.ipynb563
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5.ipynb601
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5_1.ipynb601
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6.ipynb146
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6_1.ipynb146
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7.ipynb362
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7_1.ipynb362
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8.ipynb284
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8_1.ipynb284
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9.ipynb146
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9_1.ipynb146
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/README.txt10
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1.pngbin0 -> 8828 bytes
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1_1.pngbin0 -> 8828 bytes
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2.pngbin0 -> 3473 bytes
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2_1.pngbin0 -> 3473 bytes
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3.pngbin0 -> 6576 bytes
-rwxr-xr-xMiller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3_1.pngbin0 -> 6576 bytes
-rwxr-xr-xOptical_Communication_/Chapter_2.ipynb1146
-rwxr-xr-xOptical_Communication_/Chapter_4.ipynb1221
-rwxr-xr-xOptical_Communication_/Chapter_5.ipynb1335
-rwxr-xr-xOptical_Communication_/Chapter_6.ipynb888
-rwxr-xr-xOptical_Communication_/screenshots/finding_angles.pngbin0 -> 59376 bytes
-rwxr-xr-xOptical_Communication_/screenshots/optical_power.pngbin0 -> 47182 bytes
-rwxr-xr-xOptical_Communication_/screenshots/responsivity.pngbin0 -> 51139 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter1.ipynb28
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter10.ipynb104
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter10_1.ipynb104
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter10_2.ipynb104
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter11.ipynb62
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter11_1.ipynb62
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter11_2.ipynb62
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter12.ipynb488
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter12_1.ipynb488
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter12_2.ipynb488
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter13.ipynb146
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter13_1.ipynb146
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter13_2.ipynb146
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter14.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter14_1.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter14_2.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter15.ipynb28
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter15_1.ipynb28
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter15_2.ipynb28
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter1_1.ipynb28
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter1_2.ipynb28
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter2.ipynb251
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter2_1.ipynb251
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter2_2.ipynb251
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter3.ipynb322
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter3_1.ipynb322
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter3_2.ipynb322
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter4.ipynb35
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter4_1.ipynb35
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter4_2.ipynb35
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter5.ipynb239
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter5_1.ipynb239
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter5_2.ipynb239
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter6.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter6_1.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter6_2.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter7.ipynb167
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter7_1.ipynb167
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter7_2.ipynb167
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter8.ipynb209
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter8_1.ipynb209
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter8_2.ipynb209
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter9.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter9_1.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/Chapter9_2.ipynb188
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_001.pngbin0 -> 86216 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_002.pngbin0 -> 89779 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes.pngbin0 -> 10443 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_1.pngbin0 -> 10443 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_2.pngbin0 -> 10443 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_3.pngbin0 -> 10443 bytes
-rwxr-xr-xOptical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_4.pngbin0 -> 10443 bytes
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/README.txt0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch15.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic111.pngbin166886 -> 166886 bytes
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic222.pngbin154279 -> 154279 bytes
-rwxr-xr-x[-rw-r--r--]Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic333.pngbin143158 -> 143158 bytes
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_10_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_11_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_12_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_13_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_14_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_15_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_16_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_17_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_18_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_19_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_21_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_23_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_2_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_3_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_4_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_5_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_6_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_7_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_8_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/Chapter_9_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/README.txt0
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/screenshots/ancientcompilers.pngbin38427 -> 38427 bytes
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/screenshots/bitoperations.pngbin44165 -> 44165 bytes
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/screenshots/mahesh-1.pngbin30367 -> 30367 bytes
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/screenshots/mahesh-2.pngbin20249 -> 20249 bytes
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/screenshots/mahesh-3.pngbin33358 -> 33358 bytes
-rwxr-xr-x[-rw-r--r--]Practical_C_Programming/screenshots/programmingprocess.pngbin41674 -> 41674 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter1.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter2.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter3.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter4.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter5.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter6.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter7.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter8.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter9.ipynb0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/README.txt0
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1.pngbin18073 -> 18073 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_1.pngbin18073 -> 18073 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_2.pngbin18073 -> 18073 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2.pngbin41767 -> 41767 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_1.pngbin41767 -> 41767 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_2.pngbin41767 -> 41767 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3.pngbin23603 -> 23603 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_1.pngbin23603 -> 23603 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_2.pngbin23603 -> 23603 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/programmingprocess.pngbin41674 -> 41674 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter.pngbin35988 -> 35988 bytes
-rwxr-xr-x[-rw-r--r--]Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter_1.pngbin35988 -> 35988 bytes
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/README.txt0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/screenshots/pic1.pngbin126788 -> 126788 bytes
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/screenshots/pic2.pngbin163897 -> 163897 bytes
-rwxr-xr-x[-rw-r--r--]Problems_In_Fluid_Flow/screenshots/pic3.pngbin129162 -> 129162 bytes
-rwxr-xr-xProgramming_With_C/README.txt10
-rwxr-xr-xProgramming_With_C/chapter1.ipynb62
-rwxr-xr-xProgramming_With_C/chapter10.ipynb556
-rwxr-xr-xProgramming_With_C/chapter11.ipynb977
-rwxr-xr-xProgramming_With_C/chapter12.ipynb565
-rwxr-xr-xProgramming_With_C/chapter13.ipynb180
-rwxr-xr-xProgramming_With_C/chapter14.ipynb232
-rwxr-xr-xProgramming_With_C/chapter2.ipynb117
-rwxr-xr-xProgramming_With_C/chapter3.ipynb132
-rwxr-xr-xProgramming_With_C/chapter4.ipynb561
-rwxr-xr-xProgramming_With_C/chapter5.ipynb96
-rwxr-xr-xProgramming_With_C/chapter6.ipynb1297
-rwxr-xr-xProgramming_With_C/chapter7.ipynb708
-rwxr-xr-xProgramming_With_C/chapter8.ipynb555
-rwxr-xr-xProgramming_With_C/chapter9.ipynb555
-rwxr-xr-xProgramming_With_C/screenshots/Untitled1.pngbin0 -> 19174 bytes
-rwxr-xr-xProgramming_With_C/screenshots/Untitled2.pngbin0 -> 20364 bytes
-rwxr-xr-xProgramming_With_C/screenshots/Untitled3.pngbin0 -> 23339 bytes
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_03.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_04.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_05.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_06.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_07.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_08.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_09.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_10.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_11.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_12.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_13.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_14.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_16.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_17.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_18.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/Chapter_19.ipynb0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/README.txt0
-rwxr-xr-x[-rw-r--r--]Programming_in_C/screenshots/nalin-1.pngbin37400 -> 37400 bytes
-rwxr-xr-x[-rw-r--r--]Programming_in_C/screenshots/nalin-2.pngbin40842 -> 40842 bytes
-rwxr-xr-x[-rw-r--r--]Programming_in_C/screenshots/nalin-3.pngbin52280 -> 52280 bytes
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter10.ipynb2940
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter11.ipynb446
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter12.ipynb849
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter13.ipynb2367
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter14.ipynb2311
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter3.ipynb1060
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter4.ipynb972
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter5.ipynb2624
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter6.ipynb42312
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter7.ipynb3644
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter8.ipynb2750
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter9.ipynb1999
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter_15.ipynb754
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/Chapter_16.ipynb2160
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/screenshots/screenshot1.pngbin0 -> 124312 bytes
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/screenshots/screenshot2.pngbin0 -> 133043 bytes
-rwxr-xr-xProgramming_with_ANSI_and_Turbo_C/screenshots/screenshot3.pngbin0 -> 125297 bytes
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/README.txt0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/chapter_3.ipynb0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/chapter_4.ipynb0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/chapter_5.ipynb0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/chapter_6.ipynb0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/chapter_7.ipynb0
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/screenshots/a.pngbin170436 -> 170436 bytes
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/screenshots/b.pngbin241075 -> 241075 bytes
-rwxr-xr-x[-rw-r--r--]Satellite_Communication/screenshots/c.pngbin220776 -> 220776 bytes
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/README.txt0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch8.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/screenshots/ratio.pngbin46696 -> 46696 bytes
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/screenshots/swap.pngbin37083 -> 37083 bytes
-rwxr-xr-x[-rw-r--r--]Schaum's_Outlines_-_Programming_with_C++/screenshots/vector.pngbin40040 -> 40040 bytes
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_1.ipynb0
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_10.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_10_1.ipynb181
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_11.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_11_1.ipynb102
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_12.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_12_1.ipynb252
-rwxr-xr-xSolid_state_physics/Chapter_1_1.ipynb200
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_2.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_2_1.ipynb331
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_3.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_3_1.ipynb459
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_4.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_4_1.ipynb189
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_5.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_5_1.ipynb498
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_6.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_6_1.ipynb386
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_7.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_7_1.ipynb330
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_8.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_8_1.ipynb436
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/Chapter_9.ipynb0
-rwxr-xr-xSolid_state_physics/Chapter_9_1.ipynb845
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/README.txt2
-rwxr-xr-xSolid_state_physics/screenshots/debrogile.pngbin0 -> 49555 bytes
-rwxr-xr-xSolid_state_physics/screenshots/hall.pngbin0 -> 47926 bytes
-rwxr-xr-xSolid_state_physics/screenshots/lowestenergy.pngbin0 -> 50174 bytes
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/screenshots/muktesh_1.pngbin64674 -> 64674 bytes
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/screenshots/muktesh_2.pngbin34065 -> 34065 bytes
-rwxr-xr-x[-rw-r--r--]Solid_state_physics/screenshots/muktesh_3.pngbin36700 -> 36700 bytes
-rwxr-xr-x[-rw-r--r--]Surveying_Volume_3/Chapter_1_.ipynb0
-rwxr-xr-x[-rw-r--r--]Surveying_Volume_3/Chapter_2.ipynb0
-rwxr-xr-x[-rw-r--r--]Surveying_Volume_3/screenshots/solved_example.png.PNGbin54057 -> 54057 bytes
-rwxr-xr-x[-rw-r--r--]Surveying_Volume_3/screenshots/solved_example_2.png.PNGbin24587 -> 24587 bytes
-rwxr-xr-x[-rw-r--r--]Surveying_Volume_3/screenshots/solved_example_3.png.PNGbin31657 -> 31657 bytes
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/CH2.ipynb0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/CH3.ipynb0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/CH4.ipynb0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/CH5.ipynb0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/CH6.ipynb0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/CH7.ipynb0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/README.txt0
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/screenshots/deepak-2-1.pngbin64676 -> 64676 bytes
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/screenshots/deepak-2-2.pngbin81768 -> 81768 bytes
-rwxr-xr-x[-rw-r--r--]Thermodynamics:_A_Core_Course/screenshots/deepak-2-3.pngbin77102 -> 77102 bytes
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/README.txt0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch1.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch10.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch11.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch12.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch13.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch14.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch15.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch2.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch3.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch4.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch5.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch6.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch7.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/ch9.ipynb0
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/screenshots/pic1.pngbin139232 -> 139232 bytes
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/screenshots/pic2.pngbin123486 -> 123486 bytes
-rwxr-xr-x[-rw-r--r--]Transport_Phenomena/screenshots/pic3.pngbin113769 -> 113769 bytes
1147 files changed, 212012 insertions, 603 deletions
diff --git a/ANSI_C_Programming/chapter1.ipynb b/ANSI_C_Programming/chapter1.ipynb
index 1c3108fa..1c3108fa 100644..100755
--- a/ANSI_C_Programming/chapter1.ipynb
+++ b/ANSI_C_Programming/chapter1.ipynb
diff --git a/ANSI_C_Programming/chapter10.ipynb b/ANSI_C_Programming/chapter10.ipynb
index 370cbcea..370cbcea 100644..100755
--- a/ANSI_C_Programming/chapter10.ipynb
+++ b/ANSI_C_Programming/chapter10.ipynb
diff --git a/ANSI_C_Programming/chapter11.ipynb b/ANSI_C_Programming/chapter11.ipynb
index f0dba284..f0dba284 100644..100755
--- a/ANSI_C_Programming/chapter11.ipynb
+++ b/ANSI_C_Programming/chapter11.ipynb
diff --git a/ANSI_C_Programming/chapter12.ipynb b/ANSI_C_Programming/chapter12.ipynb
index 8bab1a13..8bab1a13 100644..100755
--- a/ANSI_C_Programming/chapter12.ipynb
+++ b/ANSI_C_Programming/chapter12.ipynb
diff --git a/ANSI_C_Programming/chapter13.ipynb b/ANSI_C_Programming/chapter13.ipynb
index b37b75e4..b37b75e4 100644..100755
--- a/ANSI_C_Programming/chapter13.ipynb
+++ b/ANSI_C_Programming/chapter13.ipynb
diff --git a/ANSI_C_Programming/chapter14.ipynb b/ANSI_C_Programming/chapter14.ipynb
index 35f6efe1..35f6efe1 100644..100755
--- a/ANSI_C_Programming/chapter14.ipynb
+++ b/ANSI_C_Programming/chapter14.ipynb
diff --git a/ANSI_C_Programming/chapter15.ipynb b/ANSI_C_Programming/chapter15.ipynb
index 6421f521..6421f521 100644..100755
--- a/ANSI_C_Programming/chapter15.ipynb
+++ b/ANSI_C_Programming/chapter15.ipynb
diff --git a/ANSI_C_Programming/chapter2.ipynb b/ANSI_C_Programming/chapter2.ipynb
index 644241bb..644241bb 100644..100755
--- a/ANSI_C_Programming/chapter2.ipynb
+++ b/ANSI_C_Programming/chapter2.ipynb
diff --git a/ANSI_C_Programming/chapter3.ipynb b/ANSI_C_Programming/chapter3.ipynb
index 24b5eb3a..24b5eb3a 100644..100755
--- a/ANSI_C_Programming/chapter3.ipynb
+++ b/ANSI_C_Programming/chapter3.ipynb
diff --git a/ANSI_C_Programming/chapter4.ipynb b/ANSI_C_Programming/chapter4.ipynb
index 3a15cce2..3a15cce2 100644..100755
--- a/ANSI_C_Programming/chapter4.ipynb
+++ b/ANSI_C_Programming/chapter4.ipynb
diff --git a/ANSI_C_Programming/chapter5.ipynb b/ANSI_C_Programming/chapter5.ipynb
index 6e2f2667..6e2f2667 100644..100755
--- a/ANSI_C_Programming/chapter5.ipynb
+++ b/ANSI_C_Programming/chapter5.ipynb
diff --git a/ANSI_C_Programming/chapter6.ipynb b/ANSI_C_Programming/chapter6.ipynb
index 08372811..08372811 100644..100755
--- a/ANSI_C_Programming/chapter6.ipynb
+++ b/ANSI_C_Programming/chapter6.ipynb
diff --git a/ANSI_C_Programming/chapter7.ipynb b/ANSI_C_Programming/chapter7.ipynb
index ad0fddd9..ad0fddd9 100644..100755
--- a/ANSI_C_Programming/chapter7.ipynb
+++ b/ANSI_C_Programming/chapter7.ipynb
diff --git a/ANSI_C_Programming/chapter8.ipynb b/ANSI_C_Programming/chapter8.ipynb
index 50b1b566..50b1b566 100644..100755
--- a/ANSI_C_Programming/chapter8.ipynb
+++ b/ANSI_C_Programming/chapter8.ipynb
diff --git a/ANSI_C_Programming/chapter9.ipynb b/ANSI_C_Programming/chapter9.ipynb
index 54eec269..54eec269 100644..100755
--- a/ANSI_C_Programming/chapter9.ipynb
+++ b/ANSI_C_Programming/chapter9.ipynb
diff --git a/ANSI_C_Programming/screenshots/code1.png b/ANSI_C_Programming/screenshots/code1.png
index 0af5c5b5..0af5c5b5 100644..100755
--- a/ANSI_C_Programming/screenshots/code1.png
+++ b/ANSI_C_Programming/screenshots/code1.png
Binary files differ
diff --git a/ANSI_C_Programming/screenshots/code2.png b/ANSI_C_Programming/screenshots/code2.png
index 939e13d3..939e13d3 100644..100755
--- a/ANSI_C_Programming/screenshots/code2.png
+++ b/ANSI_C_Programming/screenshots/code2.png
Binary files differ
diff --git a/ANSI_C_Programming/screenshots/code3.png b/ANSI_C_Programming/screenshots/code3.png
index 0a94f7ba..0a94f7ba 100644..100755
--- a/ANSI_C_Programming/screenshots/code3.png
+++ b/ANSI_C_Programming/screenshots/code3.png
Binary files differ
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter1.ipynb b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter1.ipynb
new file mode 100755
index 00000000..1cb4536f
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter1.ipynb
@@ -0,0 +1,504 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b9d3600de62f2e313ebd68d87880d0cad19ed95bdfc9a86e635db985c6359259"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "UNIT-1:Waves & Vibrations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.1,Page no:11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "n=512 #frequency in Hz\n",
+ "l=67 #wavelength in cm\n",
+ "\n",
+ "#Calculation\n",
+ "v=n*l #calculating velocity\n",
+ "\n",
+ "#Result\n",
+ "print\"Velocity = \",v,\" cm/sec\" \n",
+ "print\"NOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 34304 cm/sec\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.2,Page no:11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "v=340 #velocity in m/sec\n",
+ "l=0.68 #wavelength in m\n",
+ "\n",
+ "#Calculation\n",
+ "n=v/l #calculating frequency\n",
+ "\n",
+ "#Result\n",
+ "print\"Frequency\",n,\"Hz\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency 500.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.3,Page no:12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "v=3*10**8 #velocity in m/sec\n",
+ "n=500*10**3 #frequency in Hz\n",
+ "\n",
+ "#Calculation\n",
+ "l=v/n #calculating wavelength\n",
+ "\n",
+ "#Result\n",
+ "print\"Wavelength=\",l,\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength= 600 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.4,Page no:12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "v=330 #velocity in m/sec\n",
+ "n=560.0 #frequency in Hz\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=v/n #calculating wavelength\n",
+ "\n",
+ "#Result\n",
+ "print\"lambda=\",round(lamda,3),\"m\"\n",
+ "print\"Distance travelled in 30 vibrations in m = \",round(lamda*30,2),\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lambda= 0.589 m\n",
+ "Distance travelled in 30 vibrations in m = 17.68 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.5,Page no:12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "s=90.0 #distance in m\n",
+ "u=0 #initial velocity in m/sec\n",
+ "\n",
+ "#Calculation\n",
+ "t=math.sqrt(90/4.9) #calculating time using kinematical equation\n",
+ "later=4.56 #Time after which sound is heard\n",
+ "t1=later-t #calculating time taken by sound to travel\n",
+ "t1=round(t1,2)\n",
+ "v=s/t1 #calculating velocity\n",
+ "\n",
+ "#Result\n",
+ "print\"Velocity in m/sec = \",round(v,2),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity in m/sec = 333.33 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.6,Page no:13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "l1=1.5 #wavelength in m\n",
+ "l2=2 #wavelength in m\n",
+ "v1=120 #velocity in m/sec\n",
+ "\n",
+ "#Calculation\n",
+ "n=v1/l1 #calculating frequency\n",
+ "v2=n*l2 #calculating velocity\n",
+ "\n",
+ "#Result\n",
+ "print\"Velocity in m/sec = \",v2,\"m/sec\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity in m/sec = 160.0 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.7,Page no:14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "l=5641*10**-10 #wavelength in m\n",
+ "c=3*10**8 #velocity in m/sec\n",
+ "u=1.58 #refractive index of glass\n",
+ "\n",
+ "#Calculation\n",
+ "n=c/l #calculating frequency\n",
+ "cg=c/u #calculating velocity of light in glass\n",
+ "l1=cg/n #calculating wavelegth in glass\n",
+ "\n",
+ "#Result\n",
+ "print\"Wavelength in glass in Angstrom =\",l1*10**10,\"Angstrom\" \n",
+ "print\"\\n\\nNOTE:Calculation ambiguity in book,value of cg is taken as 1.9*10**8 ,Therefore final answer is changed\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength in glass in Angstrom = 3570.25316456 Angstrom\n",
+ "\n",
+ "\n",
+ "NOTE:Calculation ambiguity in book,value of cg is taken as 1.9*10**8 ,Therefore final answer is changed\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.8,Page no:15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "n=12*10**6 #frequency in Hz\n",
+ "v=3*10**8 #velocity in m/sec\n",
+ "\n",
+ "#Calculation\n",
+ "l=v/n #calculating wavelength\n",
+ "\n",
+ "#Result\n",
+ "print\"Wavelength in m = \",l,\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength in m = 25 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.9,Page no:15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "n=400 #frequency in Hz\n",
+ "v=300.0 #velocity in m/sec\n",
+ "\n",
+ "#Calculation\n",
+ "l=v/n #calculating wavelength\n",
+ "\n",
+ "#Result\n",
+ "print\"Wavelength=\",l,\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength= 0.75 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.10,Page no:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "a=20 #amplitude in cm\n",
+ "n=6 #frequency per second\n",
+ "\n",
+ "#Calculation\n",
+ "w=2*(math.pi)*n #omega in radians/sec\n",
+ "\n",
+ "#Result\n",
+ "print\"Omega in radians/sec = \",round(w,1),\"rad/sec\" \n",
+ "print\"y=\",a,\"sin\",round(w,1),\"t\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Omega in radians/sec = 37.7 rad/sec\n",
+ "y= 20 sin 37.7 t\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.11,Page no:23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "a=6 #amplitude in cm\n",
+ "n=9 #frequency in Hz.\n",
+ "\n",
+ "#Calculation\n",
+ "vmax=2*(math.pi)*n*6 #calculating velocity in cm/sec\n",
+ "acc=-((18*(math.pi))**2)*6 #calculating acc. in m/sec square\n",
+ "\n",
+ "#Result\n",
+ "print\"Maximum velocity in cm/sec = \",round(vmax,2),\"cm/sec\" \n",
+ "print\"Velocity at extreme position = 0\" \n",
+ "print\"Accelaration at mean position = 0\" \n",
+ "print\"Accelaration at extreme position = \",round(acc,1),\"m/sec^2\" \n",
+ "print\"\\n\\nNOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum velocity in cm/sec = 339.29 cm/sec\n",
+ "Velocity at extreme position = 0\n",
+ "Accelaration at mean position = 0\n",
+ "Accelaration at extreme position = -19186.5 m/sec^2\n",
+ "\n",
+ "\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.12,Page no:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "g=9.8 #gravitational constant\n",
+ "m=50 #mass in kg\n",
+ "l=0.2 #length in m\n",
+ "T=0.6 #time period\n",
+ "\n",
+ "#Calculation\n",
+ "k=(m*g)/l #calculating constant\n",
+ "m=2450*((T/(2*(math.pi)))**2) #calcualting mass using given time period\n",
+ "\n",
+ "#Result\n",
+ "print\"Mass of body= \",round(m,2),\"kg\" \n",
+ "print\"Weight of suspended body=\",round(m,2)*g,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of body= 22.34 kg\n",
+ "Weight of suspended body= 218.932 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter2.ipynb b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter2.ipynb
new file mode 100755
index 00000000..b50ddf47
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter2.ipynb
@@ -0,0 +1,339 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:bc446a4cb1141cc1fc3a73e237c82b9c455db1185763ba734b760bbf57d3288c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "UNIT-2:Application of Sound Waves"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.1,Page no:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=3000 #volume in metre cube.\n",
+ "theta=0.2 #theta in owu(open window unit).\n",
+ "s=1850 #area in metre cube.\n",
+ "\n",
+ "#Calculation\n",
+ "a=theta*s #calculating total absorbtion of surface.\n",
+ "T=(0.165*v)/a #calculating T using Sabine formula\n",
+ "\n",
+ "#Result\n",
+ "print\"Reverberation time of Room = \",round(T,2) ,\"sec\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reverberation time of Room = 1.34 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.2,Page no:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "v=120000 #volume in metre cube.\n",
+ "t=1.5 #time in second.\n",
+ "s=25000 #area in metre cube.\n",
+ "\n",
+ "#Calculation\n",
+ "a=(0.16*v)/(t*s) #using Sabine formula for calculating a\n",
+ "\n",
+ "#Variable declaration\n",
+ "print\"Average Absorbing Power of Surface = \",a,\"o w u\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average Absorbing Power of Surface = 0.512 o w u\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.3,Page no:42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=6000.0 #Volume in metre cube.\n",
+ "a=20.0 #surface absorbtion in owu(open window unit).\n",
+ "\n",
+ "#Calculation\n",
+ "T=(0.165*v)/(a) #calculating T using Sabine Formula.\n",
+ "\n",
+ "#Result\n",
+ "print\"Reverberation Time = \",T,\"sec\"\n",
+ "print\"\\nNOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reverberation Time = 49.5 sec\n",
+ "\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.4,Page no:42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "v=3500 #volume in metre cube.\n",
+ "n1=370-300 #no. of audience on wooden seats.\n",
+ "n2=300-70 #no. of empty wooden seats.\n",
+ "\n",
+ "#Calculation\n",
+ "a1s1=0.04*60 #absorption due to wooden doors.\n",
+ "a2s2=0.03*700 #absorption due to plastered walls.\n",
+ "a3s3=0.06*50 #absorption due to glass work.\n",
+ "a4s4=4.2*370 #absorption due to audience on spungy and wooden \n",
+ "#seats.\n",
+ "a5s5=2*230 #absorption due to empty seats.\n",
+ "sum=a1s1+a2s2+a3s3+a4s4+a5s5 #total absorption of cinema hall.\n",
+ "T=(0.165*v)/sum #calculating T using Sabine Formula.\n",
+ "\n",
+ "#Result\n",
+ "print\"Reverberation Time = \",round(T,2),\"sec\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reverberation Time = 0.28 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.5,Page no:49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=10 #length in centimetres.\n",
+ "Y=20*10**11 #Young's Modulus in dyne/cm square.\n",
+ "R=8 #Density in gram/cc\n",
+ "\n",
+ "#Calculation\n",
+ "n=(1.0/(2*l))*math.sqrt(Y/R) #calculating frequency of vibration using \n",
+ "#young's modulus.\n",
+ "\n",
+ "#Result\n",
+ "print\"Frequency of vibration=\",n,\"Hz\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of vibration= 25000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.6,Page no:50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "t=0.1 #thickness in centimetre.\n",
+ "Y=8.75*10**11 #Young's Modulus in dyne/cm square.\n",
+ "R=2.654 #Density in gram/cm square.\n",
+ "\n",
+ "#Calculation\n",
+ "n=(1/(2*t))*math.sqrt(Y/R) #calculating frequency using Young's modulus.\n",
+ "\n",
+ "#Result\n",
+ "print\"Frequency of Vibration=\",round(n),\"Hz\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of Vibration= 2870936.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.7,Page no:50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "K=2.026*10**9 #Bulk Modulus in N/m square.\n",
+ "R=10**3 #Density in Kg/m cube.\n",
+ "\n",
+ "#Calculation\n",
+ "V=math.sqrt(K/R) #Calculating speed using Bulk Modulus.\n",
+ "\n",
+ "#Result\n",
+ "print\"Velocity of sound waves in water = \",round(V,2),\"m/sec\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of sound waves in water = 1423.38 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.8,Page no:51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Y=1.41 #Young's Modulus.\n",
+ "R=1.293*10**-3 #Density of air in g/centimetre cube.\n",
+ "P=76*13.6*980 #atmospheric pressure in dyne/cm square.\n",
+ "\n",
+ "#Calculation\n",
+ "V=math.sqrt((Y*P)/R) #calculating speed using young's modulus.\n",
+ "\n",
+ "#Result\n",
+ "print\"Speed of ultrasonic wave in air at n.t.p=\",round(V*10**-2,1),\"m/sec\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of ultrasonic wave in air at n.t.p= 332.4 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter3.ipynb b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter3.ipynb
new file mode 100755
index 00000000..147c1c8d
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter3.ipynb
@@ -0,0 +1,605 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:040e38e52e7b9682cfcedeffe89e523ef70aa22db1a3d6616f3de2ca6dd532ec"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "UNIT-3:Principle of Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.1,Page no:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "f=15.0 #focal length in cm\n",
+ "v=10.0 #image distance in cm\n",
+ "\n",
+ "#Calculation\n",
+ "u=1/((1/v)-(1/f)) #calculating u using (1/f)=(1/v)-(1/u)\n",
+ "\n",
+ "#Result\n",
+ "print\"Object Distance ,u= \",u,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Object Distance ,u= 30.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.2,Page no:70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=80.0 #focal length in cm\n",
+ "f1=20.0 #focallength of first lens in cm\n",
+ "\n",
+ "#Calculation\n",
+ "f2=1/((1/f)-(1/f1)) #using (1/F)=(1/f1)+(1/f2)\n",
+ "P=(100.0/f) #power in D\n",
+ "P1=100.0/20 #power of first lens\n",
+ "P2=P1-P #power in D\n",
+ "\n",
+ "#Variable declaration\n",
+ "print\"Power= \",P2,\"D\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power= 3.75 D\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.3,Page no:71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "P=2.5 #Power in D\n",
+ "\n",
+ "#Calculation\n",
+ "f=-(1/P) #calculating f in m\n",
+ "\n",
+ "#Result\n",
+ "print\"Focal length =\",f,\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Focal length = -0.4 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.4,Page no:72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "m=4 #magnigication\n",
+ "f=20 #focal length in cm\n",
+ "\n",
+ "#Calculation\n",
+ "u=(20*3)/(4) #on simplifying (1/f)=(1/v)-(1/u)\n",
+ "v=(4*u) #calculating v in cm\n",
+ "\n",
+ "#Result\n",
+ "print\"Object distance,u= \",u,\"cm\" \n",
+ "print\"Image distance,v= \",v,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Object distance,u= 15 cm\n",
+ "Image distance,v= 60 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.5,Page no:72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from scipy.optimize import fsolve \n",
+ "\n",
+ "#Variable declaration\n",
+ "u=14.0 #object distance in cm\n",
+ "f=-21.0 #focal distance in cm\n",
+ "\n",
+ "#Calculation\n",
+ "v=1/((1/f)-(1/u))\n",
+ "I=(3.0*v)/(-u) #using m=(1/0)=(v/u) \n",
+ "\n",
+ "#Result\n",
+ "print\"Image distance= \",v,\"cm\" \n",
+ "print\"I= \",I,\"cm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Image distance= -8.4 cm\n",
+ "I= 1.8 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.6,Page no:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "fe=5 #focal length in cm\n",
+ "D=25 #distance od distinct vision in cm\n",
+ "\n",
+ "#Calculation\n",
+ "m=1+(D/fe) #calculating magnifying power\n",
+ "\n",
+ "#Result\n",
+ "print\"magnifying Power = \",m "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnifying Power = 6\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.7,Page no:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "fe=5 #focal length in cm\n",
+ "D=25 #distance od distinct vision in cm\n",
+ "\n",
+ "#Calculation\n",
+ "mo=30/(1+(D/fe)) #calculating magnification of objective lens\n",
+ "\n",
+ "#Result\n",
+ "print\"Magnification produced by objective lens = \",mo "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnification produced by objective lens = 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.8,Page no:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "u=-6.0 #object distance in cm\n",
+ "fo=4.0 #focal distance in cm\n",
+ "fe=6.0 #focal length in cm\n",
+ "D=25.0 #distance of distinct vision in cm\n",
+ "\n",
+ "#Calculation\n",
+ "v=1/((1/u)+(1/fo)) #using (1/f)=(1/v)-(1/u)\n",
+ "m=(v/u)*(1+(D/fe)) #calculating m\n",
+ "\n",
+ "#Result\n",
+ "print\"Image distance in cm = \",v,\"cm\" \n",
+ "print\"Magnifying Power = \",round(-m,2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Image distance in cm = 12.0 cm\n",
+ "Magnifying Power = 10.33\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.9,Page no:81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "D=25.0 #distance of distinct vision\n",
+ "u=-9.0 #object distance in cm\n",
+ "fe=10.0 #focal length in cm\n",
+ "\n",
+ "#Calculation\n",
+ "v=1/((1/fe)+(1/u)) #using (1/f)=(1/v)-(1/u)\n",
+ "m=(v/u) #calculating m\n",
+ "M=D/u #calculating Magnifying power of lens\n",
+ "\n",
+ "#Result\n",
+ "print\"Magnification of lens = \",m \n",
+ "print\"Magnifying Power = \",round(-M,1) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnification of lens = 10.0\n",
+ "Magnifying Power = 2.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.10,Page no:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "fo=0.5 #focal length of eye lens\n",
+ "D=25 #distance of distinct vision\n",
+ "L=15 #length in cm\n",
+ "m=375 #magnification\n",
+ "\n",
+ "#Calculation\n",
+ "fe=(-L*D)/(fo*((L/fo)-m)) #calculating fe\n",
+ "\n",
+ "#Result\n",
+ "print\"Focal length of eye lens= \",round(fe,1),\"cm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Focal length of eye lens= 2.2 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.11,Page no:86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "m=5 #magnifying power\n",
+ "L=24 #length in cm\n",
+ "fe=4 #focal length in cm\n",
+ "\n",
+ "#Calculation\n",
+ "fo=5*fe #calculating fo\n",
+ "\n",
+ "#Result\n",
+ "print\"Focal length of lens = \",fo,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Focal length of lens = 20 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.12,Page no:87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "D=25.0 #distance of distinct vision in cm\n",
+ "fo=140.0 #focal length of eye lens\n",
+ "fe=5.0 #focal length in cm\n",
+ "\n",
+ "#Calculation\n",
+ "m=-(fo/fe) #calculating magnifying power\n",
+ "m1=-(fo/fe)*(1+(fe/D)) #calculating magnifying power\n",
+ "\n",
+ "#Result\n",
+ "print\"(a):Magnifying power at normal adjustment = \",m\n",
+ "print\"(b):Magnifying power atleast distance of distinct vision = \",m1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a):Magnifying power at normal adjustment = -28.0\n",
+ "(b):Magnifying power atleast distance of distinct vision = -33.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.13,Page no:88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "M=5 #Magnifying power\n",
+ "fo=10 #focal length of eye lens\n",
+ "\n",
+ "#Calculation\n",
+ "fe=fo/M #calculating fe\n",
+ "\n",
+ "#Result\n",
+ "print\"Focal length of eye lens= \",fe,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Focal length of eye lens= 2 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.14,Page no:88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "fo=75.0 #focal length of eye lens\n",
+ "D=25.0 #distance of distinct vision\n",
+ "fe=5.0 #focal of eye lens in cm\n",
+ "\n",
+ "#Calculation\n",
+ "M=-(fo/fe)*(1+(fe/D)) #calculating M\n",
+ "\n",
+ "#Result\n",
+ "print\"Magnifying power = \",M"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnifying power = -18.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.15,Page no:88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "M=7 #magnifying power\n",
+ "L=40 #length\n",
+ "\n",
+ "#Calculation\n",
+ "fe=(L/(M+1)) #focal length of eye lens in cm\n",
+ "fo=(M*fe) #calculating focal length\n",
+ "\n",
+ "#Result\n",
+ "print\"Focal Length of lens=\",fo,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Focal Length of lens= 35 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter4.ipynb b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter4.ipynb
new file mode 100755
index 00000000..67ec2ab8
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter4.ipynb
@@ -0,0 +1,1106 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5389b8ee7db605c2b6709900953f8acf2763d42f0399c64611452653d4ee8704"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "UNIT-4:Electrostatics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.1,Page no:103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "q=1.0 #no of coulomb\n",
+ "e=1.6*10**-19 #charge on an electron\n",
+ "\n",
+ "#Calculation\n",
+ "n=(q/e) #calculating no of electrons\n",
+ "\n",
+ "#Result\n",
+ "print\"No of electrons =\",n\n",
+ "print\"NOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No of electrons = 6.25e+18\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.2,Page no:103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "g=9.8\n",
+ "m=4.5 #Massin [kg]\n",
+ "r=0.03 #radius in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "F=m*g #in Newton\n",
+ "q=math.sqrt(((r**2)*m*g)/(9*10**9)) #calculating q using F=(1/4*3.14*eo)*((q1*q2)/(r**2))\n",
+ "\n",
+ "#Result\n",
+ "print\"Charge = \",q,\"C\"\n",
+ "print\"\\nNOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge = 2.1e-06 C\n",
+ "\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.3,Page no:103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "q1=2*10**-7 #charge in C\n",
+ "q2=3*10**-7 #charge in C\n",
+ "r=30*10**-2 #r in m\n",
+ "\n",
+ "#Calculation\n",
+ "F=(9*10**9)*((q1*q2)/r**2) #calculating F\n",
+ "\n",
+ "#Result\n",
+ "print\"Force = %.e\"%F,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force = 6e-03 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.4,Page no:104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "q1=1 #charge in C\n",
+ "q2=1 #charge in C\n",
+ "r=1 #r in m\n",
+ "\n",
+ "#Calculation\n",
+ "F=(9*10**9)*((q1*q2)/r**2) #calculating F\n",
+ "\n",
+ "#Result\n",
+ "print\"Force = %.e\"%F,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force = 9e+09 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.5,Page no:104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "m=9*10**-31 #mass of electron in kg\n",
+ "q=-3.2*10**-7 #charge in C\n",
+ "e=-1.6*10**-19 #charge on electron in C\n",
+ "\n",
+ "#Calculation\n",
+ "n=(q/e) #calculating n\n",
+ "M=n*m #calculating mass transfered\n",
+ "\n",
+ "#Result\n",
+ "print\"(a):No. of electrons = \",n\n",
+ "print\"(b):Mass transfered to polythene= \",M,\"kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a):No. of electrons = 2e+12\n",
+ "(b):Mass transfered to polythene= 1.8e-18 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.6,Page no:105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "q1=1.6*10**-19 #charge in C\n",
+ "q2=-1.6*10**-19 #charge in C\n",
+ "r=10**-9 #r in m\n",
+ "\n",
+ "#Calculation\n",
+ "F=(9*10**9)*((q1*q2)/r**2) #calculating F\n",
+ "\n",
+ "#Result\n",
+ "print\"Force=\",F,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force= -2.304e-10 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.7,Page no:110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "Va=-10 #voltage in volts\n",
+ "W=100 #work in Joule\n",
+ "q=2 #charge in Coulomb\n",
+ "\n",
+ "#Calculation\n",
+ "v=(Va)+(W/q) #calculating v\n",
+ "\n",
+ "#Result\n",
+ "print\"Voltage = \",v,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage = 40 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.8,Page no:111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "eo=(8.854*10**-12) #constant\n",
+ "E=2 #magnitude of electric field in N/C\n",
+ "r=0.5 #r in m\n",
+ "\n",
+ "#Calculation\n",
+ "q=E*4*(math.pi)*(eo)*(r**2) #calculating charge\n",
+ "\n",
+ "#Result\n",
+ "print\"Charge= %.2e\"%q,\"C\"\n",
+ "print\"\\nNOTE:Calcualtion mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge= 5.56e-11 C\n",
+ "\n",
+ "NOTE:Calcualtion mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 73
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.9,Page no:111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "e=-1.6*10**-19 #charge on electron in Coulomb\n",
+ "q=20*10**-6 #charge in Coulomb\n",
+ "r1=0.1 #r1 in m\n",
+ "r2=0.05 #r2 in m\n",
+ "\n",
+ "#Calculation\n",
+ "Va=9*10**9*(q/r1) #calculating voltage at A\n",
+ "Vb=9*10**9*(q/r2) #calculating voltage at B\n",
+ "V=Va-Vb #potential difference\n",
+ "W=V*e #calculating work done in joule\n",
+ "\n",
+ "#Result\n",
+ "print\"Work done to take the electron from A to B = \",W,\"Joule\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done to take the electron from A to B = 2.88e-13 Joule\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.10,Page no:112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "q1=(2.0*10**-8) #charge in coulomb\n",
+ "q2=(-2.0*10**-8) #charge in coulomb\n",
+ "q3=(3.0*10**-8) #charge in coulomb\n",
+ "q4=(6.0*10**-8) #charge in coulomb\n",
+ "s=1.0 #side in m\n",
+ "\n",
+ "#Calculation\n",
+ "V=(9.0*10**9)*(1.0/s)*(q1+q2+q3+q4) #calculating voltage\n",
+ "\n",
+ "#Result\n",
+ "print\"Voltage in Volts = \",V,\"Volts\"\n",
+ "print\"\\nNOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage in Volts = 810.0 Volts\n",
+ "\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.11,Page no:123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "eo=8.85*10**-12 #constant\n",
+ "q=2*10**-6 #charge in coulomb\n",
+ "l=9 #length in cm\n",
+ "\n",
+ "#Calculation\n",
+ "fi=(q/eo) #calcualting flux in (N m square)/c\n",
+ "\n",
+ "#Result\n",
+ "print\"Flux through the surface=%2e\"%fi,\"N m^2/c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flux through the surface=2.259887e+05 N m^2/c\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.12,Page no:124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "eo=8.85*10**-12 #constant\n",
+ "r=1.2 #r in m\n",
+ "t=80*10**-6 #surface sharge density in c/m square\n",
+ "\n",
+ "#Calculation\n",
+ "q=t*4*(math.pi)*(r**2) #calculating charge\n",
+ "fi=q/eo #calculating flux\n",
+ "\n",
+ "#Result\n",
+ "print\"Flux=%g\"%fi,\"N c^-1 m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flux=1.63576e+08 N c^-1 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.13,Page no:124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "eo=8.85*10**-12 #constant\n",
+ "E=9*10**4 #Electric field in N/C\n",
+ "r=2*10**-2 #r in m\n",
+ "\n",
+ "#Calculation\n",
+ "L=2*(math.pi)*E*eo*r #calculating linear charge density\n",
+ "\n",
+ "#Result\n",
+ "print\"Linear charge density = \",round(L,7),\"cm^-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Linear charge density = 1e-07 cm^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.14,Page no:125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "o=17*10**-22 #surface charge density in cm**-2\n",
+ "eo=8.85*10**-12 #constant\n",
+ "\n",
+ "#Calculation\n",
+ "E=o/eo #calculating electric intensity in region III\n",
+ "\n",
+ "#Result\n",
+ "print\"Electric Intensity in regions I and II = 0\" \n",
+ "print\"Electric Intensity in region III = \",round(E,12),\"N/C\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Electric Intensity in regions I and II = 0\n",
+ "Electric Intensity in region III = 1.92e-10 N/C\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.15,Page no:125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.05 # in m\n",
+ "eo=8.85*10**-12 #constant\n",
+ "q=10.0**-9 #charge at point P in Coulomb\n",
+ "\n",
+ "#Calculation\n",
+ "E=q/(4*(math.pi)*eo*(r**2)) #calculating electric field\n",
+ "r1=0.2 #in m\n",
+ "V1=q/(4*(math.pi)*eo*r1) #calculating potential difference\n",
+ "\n",
+ "#Result\n",
+ "print\"Electric field= \",round(E),\"v/m\"\n",
+ "print\"\\nNOTE:Approximate answer is calculated in book\\n\\n\"\n",
+ "print\"Potential difference between two points = \",round(V1),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Electric field= 3597.0 v/m\n",
+ "\n",
+ "NOTE:Approximate answer is calculated in book\n",
+ "\n",
+ "\n",
+ "Potential difference between two points = 45.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.16,Page no:126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "eo=8.85*10**-12 #constant\n",
+ "o=80.0*10**-6 #surface charge density in c/ square\n",
+ "r=1.2 #in m\n",
+ "\n",
+ "#Calculation\n",
+ "q=o*(math.pi)*(r**2) #calculating charge in Coulomb\n",
+ "fi=q/eo #calculating electric flux\n",
+ "\n",
+ "#Result\n",
+ "print\"Charge= \",q,\"C\"\n",
+ "print\"Electric flux = \",fi,\"N m^2/c\"\n",
+ "print\"\\nNOTE:Wrong answers in book\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge= 0.000361911473694 C\n",
+ "Electric flux = 40893951.8298 N m^2/c\n",
+ "\n",
+ "NOTE:Wrong answers in book\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.17,Page no:138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "V=250 #potential difference in Volt\n",
+ "C=10**-11 #capacitance in farad\n",
+ "\n",
+ "#Calculation\n",
+ "q=C*V #calculating charge\n",
+ "\n",
+ "#Result\n",
+ "print\"Charge = \",q,\"C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge = 2.5e-09 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.18,Page no:138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "r=6.4*10**6 #in m\n",
+ "\n",
+ "#Calculation\n",
+ "C=r/(9*10**9) #calculating charge\n",
+ "\n",
+ "#Result\n",
+ "print\"Capacitance = \",round(C*10**6),\"mu F\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance = 711.0 mu F\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.19,Page no:138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "C=2 #capacitance in Farad\n",
+ "d=0.5*10**-2 #distance in m\n",
+ "eo=8.85*10**-12 #constant\n",
+ "\n",
+ "#Calculation\n",
+ "A=(C*d)/(eo) #calculating area\n",
+ "\n",
+ "#Result\n",
+ "print\"Area=%.2e\"%A,\"m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area=1.13e+09 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.20,Page no:139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "A=0.02 #area in m square\n",
+ "r=0.5 #r in m\n",
+ "\n",
+ "#Calculation\n",
+ "d=(A/(4*(math.pi)*r)) #calculating distance\n",
+ "\n",
+ "#Result\n",
+ "print\"Distance between the plates = \",round(d*1000,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance between the plates = 3.18 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.21,Page no:139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "eo=8.85*10**-12 #constant\n",
+ "A=1 #area in m square\n",
+ "d=2*10**-3 #r in m\n",
+ "K=4 #constant\n",
+ "\n",
+ "#Calculation\n",
+ "C=(K*eo*A)/d #calculating capacitance\n",
+ "\n",
+ "#Result\n",
+ "print\"Capacitance = \",C,\"Farad\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance = 1.77e-08 Farad\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.22,Page no:140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "cm=10*10**-6 #capacitance in Farad\n",
+ "K=2 #constant\n",
+ "\n",
+ "#Calculation\n",
+ "co=cm/K #calculating co\n",
+ "\n",
+ "#Result\n",
+ "print\"capacity of capacitor with air between the plates= \",co*10**6,\"muF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacity of capacitor with air between the plates= 5.0 muF\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.23,Page no:140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "v=100.0 #v in volt\n",
+ "c1=8.0*10**-6 #capacitance in Farad\n",
+ "c2=12.0*10.0**-6 #capacitance in Farad\n",
+ "c3=24.0*10.0**-6 #capacitance in Farad\n",
+ "cs=4.0/(10.0**6) #calculating series capacitance\n",
+ "\n",
+ "#Calculation\n",
+ "cp=(c1+c2+c3) #calculating parallel capacitance\n",
+ "qs=cs*v #calculating charge\n",
+ "\n",
+ "#Result\n",
+ "print\"Equivalent Series capacitance,C= \",cs*10**6,\"muF\"\n",
+ "print\"Equivalent parallel capacitance,Cp= \",cp*10**6,\"muF\" \n",
+ "print\"charge on plate=%.e\"%qs,\"C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equivalent Series capacitance,C= 4.0 muF\n",
+ "Equivalent parallel capacitance,Cp= 44.0 muF\n",
+ "charge on plate=4e-04 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.24,Page no:141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "C=9*10**-10 #capacitance in farad\n",
+ "V=100.0 #in volt\n",
+ "\n",
+ "#Calculation\n",
+ "U=(1/2.0)*(C*(V**2)) #calculating energy stored\n",
+ "\n",
+ "#Result\n",
+ "print\"Energy stored = \",U,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy stored = 4.5e-06 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.25,Page no:141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "eo=8.85*10**-12 #constant\n",
+ "A=90.0*10**-4 #area in m square\n",
+ "d=2.5*10**-3 #distance in m\n",
+ "V=400.0 #in volt\n",
+ "\n",
+ "#Calculation\n",
+ "C=(eo*A)/d #calculating capacitance\n",
+ "W=(1/2.0)*(C*(V**2)) #calculating electrical energy stored\n",
+ "\n",
+ "#Result\n",
+ "print\"Capacitance = \",C,\"Farad\"\n",
+ "print\"Electrical Energy stored in capacitor =%.2e\"%W,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance = 3.186e-11 Farad\n",
+ "Electrical Energy stored in capacitor =2.55e-06 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.26,Page no:142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "v=100 #v in volt\n",
+ "c1=1*10**-6 #capacitance in Farad\n",
+ "c2=2*10**-6 #capacitance in Farad\n",
+ "c3=3*10**-6 #capacitance in Farad\n",
+ "cs=6/11.0 #calculating series capacitance\n",
+ "\n",
+ "#Calculation\n",
+ "cp=(c1+c2+c3) #calculating parallel capacitance\n",
+ "\n",
+ "#Result\n",
+ "print\"Equivalent Series capacitance = \",cs,\"muF\"\n",
+ "print\"Equivalent parallel capacitance= \",cp*10**6,\"muF\"\n",
+ "print\"Therefore Cp=(11*Cs)\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equivalent Series capacitance = 0.545454545455 muF\n",
+ "Equivalent parallel capacitance= 6.0 muF\n",
+ "Therefore Cp=(11*Cs)\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.27,Page no:143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "eo=8.85*10**-12 #constant\n",
+ "V=6 #v in volt\n",
+ "A=25*10**-4 #area in m square\n",
+ "d=10**-3 #distance in m\n",
+ "\n",
+ "#Calculation\n",
+ "q=(eo*A*V)/d #calculating charge\n",
+ "W=q*V #calculating work done\n",
+ "\n",
+ "#Result\n",
+ "print\"Charge through battery =%.3g\"%q,\"C\"\n",
+ "print\"Work done by Battery=%.e\"%W,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge through battery =1.33e-10 C\n",
+ "Work done by Battery=8e-10 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter5.ipynb b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter5.ipynb
new file mode 100755
index 00000000..581d450b
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/Chapter5.ipynb
@@ -0,0 +1,1035 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1f51544adf15fc8ba28e47ac7da1a371a1d8835331773ecfcfa211468f9b325d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "UNIT-5 Electricity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.1,Page no:152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "n=10**6 #no. of electrons\n",
+ "e=1.6*10**-19 #charge on an electron in C\n",
+ "\n",
+ "#Calculation\n",
+ "q=n*e #calculating total charge\n",
+ "t=10**-3 #time in second\n",
+ "I=q/t #calculating current\n",
+ "\n",
+ "#Result\n",
+ "print\"Current flowing = \",I,\"Ampere\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current flowing = 1.6e-10 Ampere\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.2,Page no:152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "I=300*10**-3 #current n Ampere\n",
+ "t=60 #time in second\n",
+ "e=1.6*10**-19 #chatge on electron in C\n",
+ "\n",
+ "#Calculation\n",
+ "q=I*t #calculating charge\n",
+ "n=q/e #calculating no of electrons\n",
+ "\n",
+ "#Result\n",
+ "print\"No. of electrons = \",n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of electrons = 1.125e+20\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.3,Page no:154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "V=200 #voltage in volt\n",
+ "R=100 #resistance in Ohm\n",
+ "e=1.6*10**-19 #charge on an electron in C\n",
+ "\n",
+ "#Calculation\n",
+ "I=V/R #Ohm's law\n",
+ "t=1 #time in second\n",
+ "q=I*t #calculating charge\n",
+ "n=q/e #calculating no of electrons\n",
+ "\n",
+ "#Result\n",
+ "print\"No. of electrons = \",n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of electrons = 1.25e+19\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.4,Page no:156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "l=15 #length in m\n",
+ "A=6*10**-7 #area in m square\n",
+ "R=5 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "p=(A*R)/l #calculating resistivity\n",
+ "\n",
+ "#Result\n",
+ "print\"Resistivity= \",p,\"Ohm metre\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistivity= 2e-07 Ohm metre\n"
+ ]
+ }
+ ],
+ "prompt_number": 73
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.5,Page no:157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "l=0.1 #length in m\n",
+ "A=10**-4 #area in m square\n",
+ "R=0.01 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "p=(A*R)/l #calculating resistivity\n",
+ "\n",
+ "#Result\n",
+ "print\"Resistivity = \",p,\"Ohm metre\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistivity = 1e-05 Ohm metre\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.6,Page no:157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "L=1 #length in m\n",
+ "r=0.2*10**-3 #radius in m\n",
+ "R=2 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*(r)**2 #calculating area\n",
+ "P=(R*A)/L #calculating resistivity\n",
+ "\n",
+ "#Result\n",
+ "print\"Resistivity =%.2g\"%P,\"Ohm.metre\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistivity =2.5e-07 Ohm.metre\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.7,Page no:158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "R1=5 #resisitance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "#A2=A/3\n",
+ "#R2/5=3l*3/A*A/l\n",
+ "#R2=9*5\n",
+ "\n",
+ "R2=9*R1 #calculating using R2/A1=(l2/A2)*(A1/l1)\n",
+ "print\"Resisitance = \",R2,\"Ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resisitance = 45 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.8,Page no:159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "R1=5 #resisitance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "#A2=A/2\n",
+ "#R1=rho*l1/A1*R2\n",
+ "#R2=rho*l2/A2\n",
+ "#R2/R1=A1/l1\n",
+ "R2=4*R1 #calculating using R2/A1=(l2/A2)*(A1/l1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Resisitance= \",R2,\"Ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resisitance= 20 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.9,Page no:162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "R1=2 #resisitance in Ohm\n",
+ "R2=4 #resistance in Ohm\n",
+ "R3=5 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "R=(R1**-1)+(R2**-1)+(R3**-1) #calculating parallel resistance\n",
+ "Rp=(1/R) \n",
+ "\n",
+ "#Result\n",
+ "print\"Resisitance = \",Rp,\"Ohm\"\n",
+ "print\"\\nNOTE:Incorrect answer in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resisitance = 1.05263157895 Ohm\n",
+ "\n",
+ "NOTE:Incorrect answer in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.10,Page no:163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from scipy.optimize import fsolve \n",
+ "\n",
+ "#Variable declaration\n",
+ "Rs=40 #resisitance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "#R1+R2=40\n",
+ "#R1*R2=256\n",
+ "#R1=256/R2\n",
+ "#Putting this value in eq 1:\n",
+ "#(256/R2)+R2=40\n",
+ "from sympy import solve, symbols, pprint\n",
+ "R2= symbols('R2')\n",
+ "a=1\n",
+ "b=-40\n",
+ "c=256\n",
+ "f = a*R2**2 + b*R2 + c\n",
+ "solution = solve(f, R2)\n",
+ "\n",
+ "#Result\n",
+ "print\"When R2=\",solution[0],\"Ohm R1=\",solution[1],\"Ohm\"\n",
+ "print\"When R2=\",solution[1],\"Ohm R1=\",solution[0],\"Ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When R2= 8 Ohm R1= 32 Ohm\n",
+ "When R2= 32 Ohm R1= 8 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.11,Page no:164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "V=2.0 #in volts\n",
+ "R1=30.0 #resisitance in Ohm\n",
+ "R2=60.0 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "Rp=(R1*R2)/(R1+R2) #calculating parallel resistance\n",
+ "I=V/Rp #Ohm's law\n",
+ "\n",
+ "#Result\n",
+ "print\"Resisitance = \",Rp,\"Ohm\"\n",
+ "print\"Current = \",I,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resisitance = 20.0 Ohm\n",
+ "Current = 0.1 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.12,Page no:165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "R1=2.0 #resisitance in Ohm\n",
+ "R2=3.0 #resistance in Ohm\n",
+ "R3=1.0 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "Rp=(R1*R2)/(R1+R2) #calculating parallel resistance\n",
+ "R=Rp+1.0 #1 Ohm in series\n",
+ "Rs=(R1+R2+R3) #series resistances\n",
+ "Rp=(1.0/R1)+(1.0/R2)+(1.0/R3) #calculating parallel resistance\n",
+ "\n",
+ "#Result\n",
+ "print\"(1)Equivalent Resisitance= \",R,\"Ohm\" \n",
+ "print\"(2)All resistances in series = \",Rs,\"Ohm\"\n",
+ "print\"(3)All in Parallel = \",(1/Rp),\"Ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(1)Equivalent Resisitance= 2.2 Ohm\n",
+ "(2)All resistances in series = 6.0 Ohm\n",
+ "(3)All in Parallel = 0.545454545455 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.13,Page no:166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "V=20 #voltage in Volts\n",
+ "R1=2.0 #resisitance in Ohm\n",
+ "R2=4.0 #resistance in Ohm\n",
+ "R3=5.0 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "Rp=(1/R1)+(1/R2)+(1/R3) #calculating parallel resistance\n",
+ "R=1/Rp #Parallel\n",
+ "I1=V/R1 #calculating current through R1\n",
+ "I2=V/R2 #calculating current through R2\n",
+ "I3=V/R3 #calculating current through R3\n",
+ "I=V/R #calculating total current\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)Equivalent Resisitance = \",R,\"Ohm\"\n",
+ "print\"Current through R1 = \",I1,\"Ampere\"\n",
+ "print\"Current through R2 = \",I2,\"Ampere\" \n",
+ "print\"Total current = \",I,\"Ampere\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Equivalent Resisitance = 1.05263157895 Ohm\n",
+ "Current through R1 = 10.0 Ampere\n",
+ "Current through R2 = 5.0 Ampere\n",
+ "Total current = 19.0 Ampere\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.14,Page no:166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "R=7 #Total resistanc of combination\n",
+ "\n",
+ "#Calculation\n",
+ "def f(n):\n",
+ " Rp = 6*(1/n) #resistance in parallel\n",
+ " return(R-Rp-5)\n",
+ "n=fsolve(f,1)\n",
+ "\n",
+ "#Result\n",
+ "print\"n=\",n[0]"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n= 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.15,Page no:173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "R1=2 #resistance in Ohm\n",
+ "R2=6 #resistance in Ohm\n",
+ "R3=3 #resistance in Ohm\n",
+ "V=24 #voltage in volts\n",
+ "R=8 #resistance in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "I=V/R #Ohm's Law\n",
+ "V1=I*R1 #Ohm's Law\n",
+ "V2=I*R2 #Ohm's Law\n",
+ "V3=I*R3 #Ohm's Law\n",
+ "\n",
+ "#Result\n",
+ "print\"Current = \",I,\"Ampere\" \n",
+ "print\"Voltage drop across R1 = \",V1,\"Volts\"\n",
+ "print\"Voltage drop across R2 = \",V2,\"Volts\" \n",
+ "print\"Voltage drop across R3 = \",V3,\"Volts\"\n",
+ "print\"\\nNOTE:Wrong answer of R3 in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current = 3 Ampere\n",
+ "Voltage drop across R1 = 6 Volts\n",
+ "Voltage drop across R2 = 18 Volts\n",
+ "Voltage drop across R3 = 9 Volts\n",
+ "\n",
+ "NOTE:Wrong answer of R3 in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.16,Page no:173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "R=15 #resistance in Ohm\n",
+ "print\"KVL: 16I1+15I2=6 (1)\" #KVL equation\n",
+ "I1=-1.66 #from(1)\n",
+ "I2=2.17 #from (1)\n",
+ "#Calculation\n",
+ "V=(I1+I2)*R #calculating potential difference\n",
+ "\n",
+ "#Result\n",
+ "print\"Potential difference= \",V,\"Volt\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KVL: 16I1+15I2=6 (1)\n",
+ "Potential difference= 7.65 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.17,Page no:174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print\"3I1-I2-1=0 (1)\" #KVL equation\n",
+ "print\"3I1-I2+2I=2 (2)\" #KVL equation\n",
+ "print\"3I1-I1+2I=2 (3)\" #KVL equation\n",
+ "\n",
+ "#Variable declaration\n",
+ "I1=4/17.0 #from (1)(2)(3)through AB \n",
+ "I2=-2/17.0 #from (1)(2)(3)through BD\n",
+ "I=3*I1+I2 #from (1)(2)(3)through main circuit\n",
+ "\n",
+ "#Calculation\n",
+ "Ibc=I1-I2 #calculating current in BC\n",
+ "Iad=I-I1 #calculating current in AD\n",
+ "Idc=I-I1+I2 #calculating current in DC\n",
+ "\n",
+ "#Result\n",
+ "print\"Current in branch BC = \",Ibc,\"Ampere\"\n",
+ "print\"NOTE:Calculation mistake in book while calculating for BC\"\n",
+ "print\"Current in branch AD = \",Iad,\"Ampere\"\n",
+ "print\"Current in branch DC = \",Idc,\"Ampere\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3I1-I2-1=0 (1)\n",
+ "3I1-I2+2I=2 (2)\n",
+ "3I1-I1+2I=2 (3)\n",
+ "Current in branch BC = 0.352941176471 Ampere\n",
+ "NOTE:Calculation mistake in book while calculating for BC\n",
+ "Current in branch AD = 0.352941176471 Ampere\n",
+ "Current in branch DC = 0.235294117647 Ampere\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.18,Page no:176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "P=10 #Ohm\n",
+ "Q=3 #Ohm\n",
+ "R=12 #Ohm\n",
+ "S=6 #Ohm\n",
+ "G=20 #Ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "print\"-12I+22I1+IgG=0 (1)\" #KVL\n",
+ "print\"6I-9I1+29Ig=0 (2)\" #KVL\n",
+ "print\"13I1-3Ig=2 (3)\" #KVL\n",
+ "#From above equations\n",
+ "import numpy as np\n",
+ "a = np.array([[-12,22,20],[6,-9,29],[0,13,-3]]) \n",
+ "b = np.array([[0],[0],[2]])\n",
+ "np.linalg.solve(a,b)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Current through Galvanometer = \",round(Ig*1000,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-12I+22I1+IgG=0 (1)\n",
+ "6I-9I1+29Ig=0 (2)\n",
+ "13I1-3Ig=2 (3)\n",
+ "Current through Galvanometer = 7.8 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.19,Page no:179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "P=500 #power in Watts\n",
+ "V=200 #voltage in Volts\n",
+ "V1=160 #voltage in Volts\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V**2)/P #using P=V**2*R\n",
+ "P1=(V1**2)/R #calculating power\n",
+ "Dp=500-P1 #drop in heat\n",
+ "D=(Dp*100)/500 #percentage drop\n",
+ "\n",
+ "#Result\n",
+ "print\"Resistance= \",R,\"Ohm\"\n",
+ "print\"% Drop in heat production = \",D,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance= 80 Ohm\n",
+ "% Drop in heat production = 36 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.20,Page no:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "P1=100 #power in Watts\n",
+ "P2=500 #power in Watts\n",
+ "\n",
+ "#Calculation\n",
+ "P=P2/P1 #ratio\n",
+ "\n",
+ "#Result\n",
+ "print \"P=\",P\n",
+ "print\"P>0,I2=5I Therefore I2>I1\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P= 5\n",
+ "P>0,I2=5I Therefore I2>I1\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.21,Page no:181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "t=1200 #time in second\n",
+ "P=100 #power in Watts\n",
+ "V=230 #voltage in Volts\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V**2)/P #calculating resistance\n",
+ "V1=115 #supply voltage in Volts\n",
+ "E=((V1**2)*t)/R #calculating energy\n",
+ "\n",
+ "#Result\n",
+ "print\"Energy dissipated by bulb = \",E,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy dissipated by bulb = 30000 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.22,Page no:181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "P=10**4 #power in Watts\n",
+ "V=250 #voltage in Volts\n",
+ "R=0.2 #resistance in ohm\n",
+ "\n",
+ "#Calculation\n",
+ "Pl=((P/V)*(P/V))*R #calculating power loss\n",
+ "print P1\n",
+ "E=P/(Pl+P) #calculating efficiency\n",
+ "\n",
+ "#Result\n",
+ "print\"Percent Efficiency = \",round(E*100),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "100\n",
+ "Percent Efficiency = 97.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.23,Page no:182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "P=100.0 #power in Watts\n",
+ "V=220.0 #voltage in Volts\n",
+ "\n",
+ "#Calculation\n",
+ "I=P/V #Current in Ampere\n",
+ "R=V/I #resistance\n",
+ "\n",
+ "#Result\n",
+ "print\"Current = \",round(I,3),\"A\" \n",
+ "print\"Resistance=\",R,\"Ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current = 0.455 A\n",
+ "Resistance= 484.0 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.24,Page no:182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration \n",
+ "V=50 #voltage in Volts\n",
+ "I=12 #Current in Ampere\n",
+ "\n",
+ "#Calculation\n",
+ "P=V*I #power\n",
+ "Pd=P*0.7 #power dissipated\n",
+ "R=(Pd/(I)**2) \n",
+ "\n",
+ "#Result\n",
+ "print\"Resistance = \",round(R,2),\"Ohm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance = 2.92 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 82
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/README.txt b/A_Comprehensive_Textbook_Of_Applied_Physics/README.txt
new file mode 100755
index 00000000..121834de
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Deepak Shakya
+Course: btech
+College/Institute/Organization: DCRUST
+Department/Designation: Chemical Engg
+Book Title: A Comprehensive Textbook Of Applied Physics
+Author: M. Kumar
+Publisher: Abhishek Publications,Chandigarh
+Year of publication: 2009
+Isbn: 978-81-8247-226-6
+Edition: 1 \ No newline at end of file
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k1.png b/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k1.png
new file mode 100755
index 00000000..995e3ebf
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k1.png
Binary files differ
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k2.png b/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k2.png
new file mode 100755
index 00000000..f0b1ec67
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k2.png
Binary files differ
diff --git a/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k3.png b/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k3.png
new file mode 100755
index 00000000..90f96617
--- /dev/null
+++ b/A_Comprehensive_Textbook_Of_Applied_Physics/screenshots/k3.png
Binary files differ
diff --git a/A_Heat_Transfer_Text_Book/Chapter1.ipynb b/A_Heat_Transfer_Text_Book/Chapter1.ipynb
new file mode 100755
index 00000000..9c3e159f
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter1.ipynb
@@ -0,0 +1,332 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 - \"Introduction\""
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page number: 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "k=35; #Thermal Conductivity, [W/m*K]\n",
+ "T1=110 # Temperature of front[C]\n",
+ "T2=50; # Temperature of back,[C]\n",
+ "A=0.4 #area of slab,[m**2]\n",
+ "x=0.03; #Thickness of slab,[m]\n",
+ "\n",
+ "#Calculations\n",
+ "q=-k*(T2-T1)/(1000*x); #formula for heat flux[KW/m^2]\n",
+ "Q=q*A; #formula for heat transfer rate[KW]\n",
+ "\n",
+ "#Results\n",
+ "print \"Heat flux is:\",q,\"KW/m^2\\n\"\n",
+ "print \"Heat transfer rate is:\",Q,\"KW \\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flux is: 70.0 KW/m^2\n",
+ "\n",
+ "Heat transfer rate is: 28.0 KW \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page number: 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from sympy import solve,symbols\n",
+ "\n",
+ "#Variables\n",
+ "x=symbols('x');\n",
+ "k1=372; # Thermal Conductivity of slab,W/m*K\n",
+ "x1=0.003; # Thickness of slab,m\n",
+ "x2=0.002 # Thickness of steel,m\n",
+ "k2=17; # Thermal Conductivity of steel,W/m*K\n",
+ "T1=400; # Temperature on one side,C\n",
+ "T2=100 #Temperature on other side,C\n",
+ "\n",
+ "#Calculations\n",
+ "Tcu=solve(x+2*x*(k1/x1)*(x2/k2)-(T1-T2),x);\n",
+ "#q=k1*(Tcu/x1)=k2*(Tss/x2);\n",
+ "Tss = Tcu[0]*(k1/x1)*(x2/k2); # formula for temperature gradient in steel side\n",
+ "Tcul=T1-Tss;\n",
+ "Tcur=T2+Tss;\n",
+ "q=k2*Tss/(1000*x2); # formula for heat conducted, kW\\m^2\n",
+ "\n",
+ "#Results\n",
+ "print \"Temperature on left copper side is :\",round(Tcul,3),\"C\\n\"\n",
+ "print \"Temperature on right copper side is :\",round(Tcur,3),\"C\\n\"\n",
+ "print \"Heat conducted through the wall is :\",round(q,3),\"kW\\m^2\\n\"\n",
+ "print \"Our initial approximation was accurate within a few percent.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature on left copper side is : 254.971 C\n",
+ "\n",
+ "Temperature on right copper side is : 245.029 C\n",
+ "\n",
+ "Heat conducted through the wall is : 1232.749 kW\\m^2\n",
+ "\n",
+ "Our initial approximation was accurate within a few percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page number: 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "q1=6000; #Heat flux, W*m**-2\n",
+ "T1=120; #Heater Temperature, C\n",
+ "T2=70; #final Temperature of Heater, C\n",
+ "q2=2000; #final heat flux, W*m**-2\n",
+ "\n",
+ "#Calculations\n",
+ "h=q1/(T1-T2) #formula for average heat transfer cofficient\n",
+ "Tnew=T2+q2/h; #formula for new Heater temperature, C\n",
+ "\n",
+ "#Results\n",
+ "print \"Average Heat transfer coefficient is:\",h,\"W/(m^2*K)\\n\"\n",
+ "print \"New Heater Temperature is:\",round(Tnew,3),\"C\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average Heat transfer coefficient is: 120.0 W/(m^2*K)\n",
+ "\n",
+ "New Heater Temperature is: 86.667 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page number: 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from numpy import array\n",
+ "from numpy import linspace\n",
+ "import matplotlib.pyplot as plt\n",
+ "from pylab import *\n",
+ "%pylab inline\n",
+ "\n",
+ "#Variables\n",
+ "h=250; #Heat Transfer Coefficient, W/(m**2*K)\n",
+ "k=45; #Thermal Conductivity, W/(m*K)\n",
+ "c=180; #Heat Capacity, J/(kg*K)\n",
+ "a=9300; #density, kg/m**3\n",
+ "T1=200; #temperature, C\n",
+ "D=0.001; #diameter of bead, m\n",
+ "t1=linspace(0,5,50); #defining time interval of 0.1 seconds\n",
+ "T=linspace(0,5,50);\n",
+ "i=0;\n",
+ "\n",
+ "#Calculations\n",
+ "while i<50:\n",
+ " T[i]=T1-c*math.exp(-t1[i]/((a*c*D)/(6*h))); #Calculating temperature at each time in degree C\n",
+ " i=i+1;\n",
+ "\n",
+ "plt.plot(t1,T);\n",
+ "plt.xlabel(\"Time(in sec)\");\n",
+ "plt.ylabel(\"Temperature(in degree C)\");\n",
+ "plt.title(\"Thermocouple response to a hot gas flow\");\n",
+ "plt.show();\n",
+ "\n",
+ "Bi = h*(D/2)/k; #biot no.\n",
+ "\n",
+ "#Results\n",
+ "print \"The value of Biot no for this thermocouple is\",round(Bi,5);\n",
+ "print \"Bi is <0.1 and hence the thermocouple could be considered as a lumped heat capacity system and the assumption taken is valid.\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "ImportError",
+ "evalue": "DLL load failed: %1 is not a valid Win32 application.",
+ "output_type": "pyerr",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mImportError\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m<ipython-input-4-48a98dda89ad>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mdivision\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmath\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0marray\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mlinspace\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpyplot\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 151\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mloader\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mpackages\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0moptions\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 152\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 153\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0madd_newdocs\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 154\u001b[0m \u001b[0m__all__\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;34m'add_newdocs'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'ModuleDeprecationWarning'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 155\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\add_newdocs.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mdivision\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mabsolute_import\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 12\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 13\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlib\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0madd_newdoc\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###############################################################################\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\lib\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 6\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mversion\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mversion\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0m__version__\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mtype_check\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 9\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mindex_tricks\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 10\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mfunction_base\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\lib\\type_check.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 9\u001b[0m 'common_type']\n\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 11\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnumeric\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0m_nx\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 12\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnumeric\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0masarray\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0masanyarray\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marray\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0misnan\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0;31m \u001b[0m\u001b[0;31m\\\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 13\u001b[0m \u001b[0mobj2sctype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mzeros\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\core\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mversion\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mversion\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0m__version__\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmultiarray\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 7\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mumath\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0m_internal\u001b[0m \u001b[1;31m# for freeze programs\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;31mImportError\u001b[0m: DLL load failed: %1 is not a valid Win32 application."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page number: 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from sympy import solve,symbols\n",
+ "\n",
+ "#Variables\n",
+ "x=symbols('x');\n",
+ "T1=293; #Temperature of air around thermocouple, K\n",
+ "T2=373; #Wall temperature, K\n",
+ "h=75; #Average Heat Transfer Coefficient, W/(m**2*K)\n",
+ "s=5.67*10**-8; #stefan Boltzman constant, W/(m**2*K**4)\n",
+ "\n",
+ "#Calculations\n",
+ "x=solve((h*(x-T1)+s*(x**4-T2**4)),x);\t #Calculating Thermocouple Temperature, K\n",
+ "y=x[1]-273;\t\t\t\t #Thermocouple Temperature, C\n",
+ "\n",
+ "#Results\n",
+ "print \"Thermocouple Temperature is :\",round(y,3),\"C\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermocouple Temperature is : 28.395 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page number: 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from sympy import solve,symbols\n",
+ "\n",
+ "#Variables\n",
+ "x=symbols('x');\n",
+ "e=0.4; #emissivity\n",
+ "T1=293; #Temperature of air around Thermocouple, K\n",
+ "T2=273; #wall Temperature, K\n",
+ "h=75; #Average Heat Transfer Coefficient, W/(m**2*K)\n",
+ "s=5.6704*10**-8; #stefan Boltzman constant, W/(m**2*K**4)\n",
+ "\n",
+ "#Calculations\n",
+ "z=solve(((s*e*((373)**4 - (x)**4)) - h*(x-293)),x);\t#Calculating Thermocouple Temperature, K\n",
+ "y=z[0]-273;\t\t\t\t\t #Thermocouple Temperature, C\n",
+ "\n",
+ "'''NOTE: Equation written is absolutely correct and solving this equation\n",
+ " should give real result as: 296.112 i.e. 23.112 C, but somehow python is giving wrong result.'''\n",
+ "\n",
+ "#Results\n",
+ "print \"Thermocouple Temperature is :\",round(y,1),\"C \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermocouple Temperature is : 25.9 C \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter10.ipynb b/A_Heat_Transfer_Text_Book/Chapter10.ipynb
new file mode 100755
index 00000000..71f05ef1
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter10.ipynb
@@ -0,0 +1,520 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: Radiative heat transfer "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.1, Page number: 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=2273; #temp. of liquid air,K\n",
+ "T2=303; #temp. of room,K\n",
+ "T3=973; #temp. of shield,K\n",
+ "D1=0.003; #diameter of crucible,m\n",
+ "D2=0.05; #diameter of shield,m\n",
+ "theta1=330; #surrounding angle of jet,degree\n",
+ "theta2=30 # angle of slit,degree\n",
+ "Fjr=theta2/360; #fraction of energy of view of jet occupied by room\n",
+ "Fjs=theta1/360 ; #fraction of energy of view of jet occupied by shield\n",
+ "sigma=5.67*10**-8; #Stefen-Boltzman constant\n",
+ "\n",
+ "#Calculations\n",
+ "Qnjr=math.pi*D1*Fjr*sigma*(T1**4-T2**4); #net heat transfer from jet to room,W/m\n",
+ "Qnjs=math.pi*D1*Fjs*sigma*(T1**4-T3**4); #net heat transfer from jet to shield,W/m\n",
+ "#to find the radiation from the inside of the shield to the room, we need Fshield-room.since any radiation passing out of the slit goes to the room,we can find this view factor equating view factors to the room with view factors to the slit.\n",
+ "Aslit=math.pi*D2*Fjr; #Slit's area, m^2\n",
+ "Fsj=math.pi*D1/Aslit*Fjr; #fraction of energy of view of slit occupied by jet\n",
+ "Fss=1-Fsj; #fraction of energy of view of slit occupied by shield.\n",
+ "Fsr=Aslit*Fss/(math.pi*D2*Fjs); #fraction of energy of view of shield occupied by room\n",
+ "Qnsr=math.pi*D2*Fjs*sigma*Fsr*(T3**4-T2**4); #net heat transfer from shield to room, W/m\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Heat transfer from jet to room through the slit is :\",round(Qnjr,2),\"W/m\\n\"\n",
+ "print \"Heat transfer from the jet to shield is :\",round(Qnjs,2),\" W/m\\n\"\n",
+ "print \"Heat transfer from inside of shield to the room is :\",round(Qnsr,2),\"W/m\\n\"\n",
+ "print \"Both the jet and the inside of the shield have relatively small view factors to the room, so that comparatively little heat is lost through the silt \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer from jet to room through the slit is : 1188.32 W/m\n",
+ "\n",
+ "Heat transfer from the jet to shield is : 12636.6 W/m\n",
+ "\n",
+ "Heat transfer from inside of shield to the room is : 619.44 W/m\n",
+ "\n",
+ "Both the jet and the inside of the shield have relatively small view factors to the room, so that comparatively little heat is lost through the silt \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.2, Page number: 542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=373; #temp. of shield,K \n",
+ "T2=1473; #temp of heater,K\n",
+ "h=0.2 ; #height of disc heater,m\n",
+ "r1=0.05; #smaller radius of heater,m\n",
+ "r2=0.1; #larger radius of heater,m \n",
+ "R1=r1/h ; #factors necessary for finding view factor\n",
+ "R2=r2/h ; #factors necessary for finding view factor\n",
+ "sigma=5.67*10**-8; #Stefen-Boltzman constant\n",
+ "\n",
+ "#Calculations\n",
+ "X=1+(1+R2**2)/R1**2; #factors necessary for finding view factor\n",
+ "Fht=0.5*(X-math.sqrt(X**2-4*(R2**2/R1**2))); #view factor\n",
+ "Fhs=1-Fht; #view factor of heater occupied by shield\n",
+ "Qnhs=math.pi*r2**2*Fhs*sigma*(T2**4-T1**4)/4; #Net heat transfer from the heater to shield\n",
+ "\n",
+ "#Result\n",
+ "print \"Net heat transfer from the heater to shield is : \",round(Qnhs),\" W\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat transfer from the heater to shield is : 1686.0 W\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.3, Page number: 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "h=0.2 ; #height of disc heater,m\n",
+ "r1=0.05; #smaller radius of heater,m\n",
+ "r2=0.1; #larger radius of heater,m\n",
+ "Fhs=0.808; #view factor of heater occupied by shield\n",
+ "\n",
+ "#Calculations\n",
+ "As=math.pi*(r1+r2)*math.sqrt(h**2+(r2-r1)**2); #area of frustrum shaped shield,m**2\n",
+ "Ah=math.pi/4*r2**2; #heater area,m**2\n",
+ "Fsh=Ah/As*Fhs; #view factor of shield occupied by heater\n",
+ "\n",
+ "#Result\n",
+ "print \"View factor of shield occupied by heater is :\",round(Fsh,3),\"\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "View factor of shield occupied by heater is : 0.065 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.4, Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "F1342=0.245; #view factor of 1and 3 occupied by 2 and 4\n",
+ "F14=0.2; #view factor of 1 occupied by 4\n",
+ "\n",
+ "#Calculations\n",
+ "F12=F1342-F14; #view factor of 1 occupied by 2 \n",
+ "\n",
+ "#Results\n",
+ "print \"View factor of 1 occupied by 2 is :\",F12,\"\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "View factor of 1 occupied by 2 is : 0.045 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.8, Page number: 554"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variables\n",
+ "T1=80; #temp.of liquid nitrgen,K \n",
+ "T2=230; #temp of chamber walls,K\n",
+ "D1=0.00635; #outer diameter of steel, m\n",
+ "D2=0.0127; #diameter of 2nd steel tube, m\n",
+ "e1=0.2 ; #emissivity 0f steel\n",
+ "sigma=5.67*10**-8; #Stefen-Boltzman constant\n",
+ "\n",
+ "#Calculations\n",
+ "x = Symbol('x');\n",
+ "#the nitrogen coolant will hold the surface of the line at essentially 80 K, since the thermal ressistance of tube wall and int. convection or boiling process are small.\n",
+ "Qgain=math.pi*D1*e1*sigma*(T2**4-T1**4); # net heat gain of line per unit length,W/m\n",
+ "#with the shield , assuming that the chamber area is large compared to the shielded line.\n",
+ "Qgain1=math.pi*D1*sigma*(T2**4-T1**4)/(((1-e1)/e1+1)+D1/D2*(2*(1-e1)/e1+1)); #net heat gain with shield,W/m\n",
+ "s=(Qgain-Qgain1)/Qgain*100; \t\t\t\t\t\t\t\t\t#rate of heat gain reducton in percentage\n",
+ "T = (230**4 -0.328/(3.14*D2*e1*sigma))**(1/4) \t\t\t\t\t\t#Temp. of the shield\n",
+ "\n",
+ "#Result\n",
+ "print \"Net heat gain of line per unit length is :\",round(Qgain,2),\" W/m\\n\"\n",
+ "print \"Rate of heat gain reducton is :\",round(s,2),\" percent \\n\"\n",
+ "print \"Temp. of the shield is : \",round(T,2),\" C\\n\"\n",
+ " \n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat gain of line per unit length is : 0.62 W/m\n",
+ "\n",
+ "Rate of heat gain reducton is : 47.37 percent \n",
+ "\n",
+ "Temp. of the shield is : 213.38 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.9, Page number: 557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import mat\n",
+ "from numpy.linalg import inv\n",
+ "from sympy import solve, symbols\n",
+ "\n",
+ "#Variables\n",
+ "T1=250 ; #temp.of surrounding,K \n",
+ "l1=1; #width of strips, m\n",
+ "l2=2.4; #distance between strips,m\n",
+ "F12=0.2; #view factor of 1 occupied by 2.\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "A=mat('1 -0.14;-1, 10') ; #matrix representation for solving the linear equations, for black surroundings\n",
+ "B=mat('559.6;3182.5'); #matrix representation for solving the linear equations.\n",
+ "X=inv(A)*B;\n",
+ "\n",
+ "\n",
+ "Qn12=(X.item(0)-X.item(1))/(1/(0.9975*F12)); #net heat flow from 1 to 2 for black surroundings.\n",
+ " #since each strip loses heat to the surrounding,Qnet1, Qnet2 and Qnet1-2 are different.\n",
+ " # three equations will be \n",
+ " #(1451-B1)/2.33 = (B1-B2)/(1/0.2)+(B1-B3)/(1/0.8)......(1)\n",
+ " #(459.B2) = (B2-B1)/(1/0.2)+(B2-B3)/(1/0.8)............(2)\n",
+ " #0=(B3-B1)/(1/0.8)+(B3-B2)/(1/0.8).....................(3)\n",
+ " #solving these equations, we get the values of B1,B2 and B3.\n",
+ "B1=987.7 #heat flux by surface 1.\n",
+ "B2=657.4 #heat flux by surface 2.\n",
+ "B3=822.6 #heat flux by surface 3.\n",
+ "qn12=(B1-B2)/(1/F12)+(B1-B3)/(1/(1-F12));# net heat transfer between 1 and 2 if they are connected by an insulated diffuse reflector between the edges on both sides.\n",
+ "\n",
+ "#Results\n",
+ "print \"Net heat transfer between 1 and 2 if the surroundings are black is :\",round(Qn12,2),\"W/m^2\\n\"\n",
+ "print \"Net heat transfer between 1 and 2 if they are connected by an insulated diffuse reflector between the edges on both sides is : \",qn12,\" W/m^2\\n\"\n",
+ "\n",
+ "x=symbols('x');\n",
+ "x=solve(sigma*(x**4)-822.6,x); #Solving for Temp. of the reflector.\n",
+ "print \"Temperature of the reflector is : \",round(x[1],2),\" K\\n\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat transfer between 1 and 2 if the surroundings are black is : 46.53 W/m^2\n",
+ "\n",
+ "Net heat transfer between 1 and 2 if they are connected by an insulated diffuse reflector between the edges on both sides is : 198.14 W/m^2\n",
+ "\n",
+ "Temperature of the reflector is : "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 347.06 K\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.10, Page number: 561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import array,dot\n",
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#Variables\n",
+ "T1=773; #temp.of two sides of duct,K\n",
+ "T2=373; #temperature of the third side,K\n",
+ "e1=0.5; #emissivity of stainless steel\n",
+ "e2=0.15; #emissivity of copper\n",
+ "a=5.67*10**-8; #stefan constant\n",
+ "f12=0.4; #view factor of 1 occupied by 2.\n",
+ "f21=0.67; #view factor of 2 occupied by 1\n",
+ "f13=0.6; # view factor of 1 occupied by 3\n",
+ "f31=0.75; #view factor of 3 occupied by 1\n",
+ "f23=0.33; #view factor of 2 occupied by 3\n",
+ "f32=0.25; #view factor of 2 occupied by 3\n",
+ "\n",
+ "#Calculations\n",
+ "A=array(([1, (-1+e2)*f12, (e2-1)*f13],[(-1*e1*f21), 1, (e1*-1*f23)],[(e1*-1*f31), (e1*-1*f32), 1]));#matrix method to solve three equations to find radiosity\n",
+ "B=array(([e2*a*T2**4],[e1*a*T1**4],[e1*a*T1**4])); #matrix method to solve three equations to find radiosity\n",
+ "X=dot(inv(A),B); #solution of above matrix method\n",
+ "Qn1=0.5*e2/(1-e2)*(a*T2**4-X.item(0)); #net heat transfer to the copper base per meter of the length of the duct,W/m\n",
+ "Qn2=Qn1+2.6;\n",
+ "\n",
+ "#Result\n",
+ "print \"Net heat transfer to the copper base per meter of length of the duct is : \",round(Qn2,2),\"W/m ,the -ve sign indicates that the copper base is gaining heat.\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat transfer to the copper base per meter of length of the duct is : -1294.01 W/m ,the -ve sign indicates that the copper base is gaining heat.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.11, Page number: 573"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "T1=1473 ; #temp.of gas,K \n",
+ "T2=573 ; #temp of walls,K\n",
+ "D1=0.4; #diameter of combustor, m\n",
+ "a=5.67*10**-8; #stefan boltzman coefficient,W/(m**2*K**4)\n",
+ "#we have Lo=D1=0.4m, a total pressure of 1 atm., pco2=0.2 atm. , using figure, we get eg=0.098.\n",
+ "eg=0.098; #total emittance\n",
+ "\n",
+ "#Calculations\n",
+ "ag=(T1/T2)**0.5*(0.074); #total absorptance\n",
+ "#now we can calculate Qnetgas to wall. for these problems with one wall surrounding one gas, the use of the mean beam length in finding eg and ag accounts for all geometric effects and no view factor is required. \n",
+ "Qngw=math.pi*D1*a*(eg*T1**4-ag*T2**4)/1000; #net heat radiated to the walls,kW/m\n",
+ "\n",
+ "#Result\n",
+ "print \"Net heat radiated to the walls is : \",round(Qngw,2),\"KW/m\\n\"\n",
+ "#end"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat radiated to the walls is : 31.96 KW/m\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.12, Page number: 577"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from sympy import solve,symbols\n",
+ "\n",
+ "#Variables\n",
+ "T1=291; #temp.of sky,K \n",
+ "T2=308; #temp of air,K\n",
+ "e1=0.9; #emissivity 0f black paint\n",
+ "h=8; #heat transfer coefficient,W/(m**2*K)\n",
+ "P=600 ; #Solar radiation of roof, W/m**2 \n",
+ "aacr=0.26; #heat flux,W/m**2\n",
+ "ablk=0.9; #heat flux,W/m**2\n",
+ "sigma=5.67*10**-8; #Stefen-Boltzman constant\n",
+ "\n",
+ "#Calculations-1\n",
+ "#heat loss from the roof to the inside of the barn will lower the roof temp., since we dont have enough information to evaluate the loss, we can make an upper bound on roof temp. by assuming that no heat is transferred to the interior.\n",
+ "T=symbols('T');\n",
+ "T=solve(((e1*sigma*(T**4-T1**4)+h*(T-T2))-ablk*P),T);\n",
+ "Tn=T[1]\n",
+ "\n",
+ "#Result-1\n",
+ "print \"For non-sensitive black paint, temp. of roof is:\",round(Tn)-273,\"degree C \\n\" \n",
+ "\n",
+ "#Calculations-2\n",
+ " #for white acrylic paint, by using table, e=0.9 and absorptivity is 0.26,Troof \n",
+ "T=symbols('T');\n",
+ "T=solve(((e1*sigma*(T**4-T1**4)+h*(T-T2))-0.26*P),T);\n",
+ "Tn=T[1]\n",
+ "\n",
+ "#Result-2\n",
+ "print \"For acrylic paint temp. of the root is :\",round(Tn)-273,\"degree C \\n\\nThe white painted roof is only a few degrees warmer than the air.\\n\"\n",
+ "#end\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For non-sensitive black paint, temp. of roof is: 65.0 degree C \n",
+ "\n",
+ "For acrylic paint temp. of the root is :"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 39.0 degree C \n",
+ "\n",
+ "The white painted roof is only a few degrees warmer than the air.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter11.ipynb b/A_Heat_Transfer_Text_Book/Chapter11.ipynb
new file mode 100755
index 00000000..e723954c
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter11.ipynb
@@ -0,0 +1,637 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: An introduction to mass transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.1, Page number:603"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "Mn2=0.7556; #mass fraction of nitrogen\n",
+ "Mo2=0.2315; #mass fraction of oxygen\n",
+ "Mar=0.01289; #mass fraction of argon gas\n",
+ "M1=28.02; #molar mass of N2,kg/kmol\n",
+ "M2=32; #molar mass of O2,kg/kmol\n",
+ "M3=39.95 ; #molar mass of Ar,kg/kmol\n",
+ "p=101325; #Atmospheric pressure in Pascal(Pa)\n",
+ "R=8314.5; #Gas constant, J/kmol-K\n",
+ "T=300; #Approximate room temperature, K\n",
+ "\n",
+ "#Calculations\n",
+ "Mair=(Mn2/M1+Mo2/M2+Mar/M3)**-1; #molar mass of air,kg/kmol\n",
+ "Xo2=Mo2*Mair/M2; #mole fraction of O2\n",
+ "PO2=Xo2*p; #partial pressure of O2,Pa\n",
+ "Co2=PO2/(R*T); #molar volume of O2,kmol/m**3\n",
+ "ao2=Co2*M2; #density of O2,kg/m**3\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Mole fraction of O2 is :\",round(Xo2,4),\"\\n\"\n",
+ "print \"Partial pressure of O2 is :\",round(PO2,4),\"\\n\"\n",
+ "print \"Molar volume of O2 is :\",round(Co2,4),\" kmol/m^3\\n\"\n",
+ "print \"Density of O2 is :\",round(ao2,4),\" kg/m^3\\n\"\n",
+ " #end"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mole fraction of O2 is : 0.2095 \n",
+ "\n",
+ "Partial pressure of O2 is : 21232.5938 \n",
+ "\n",
+ "Molar volume of O2 is : 0.0085 kmol/m^3\n",
+ "\n",
+ "Density of O2 is : 0.2724 kg/m^3\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.2, Page number: 606"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "r=0.00241; #rate of consumption of carbon,kg/(m**2*s)\n",
+ "Mo2=0.2; #concentration of oxygen at surface s\n",
+ "Mco2=0.052; #concentration of CO2 at surface s\n",
+ "sd=0.29; #density of surface s,kg/m**3\n",
+ "\n",
+ "#since carbon flows through a second imaginary surface u, the mass fluxes are relatedd by Ncu=-12/32*No2s=12/44*Nco2s\n",
+ "#the minus sign arises because the O2 flow is opposite the C and CO2 flows.in steady state if we apply mass conservation to the control volume between the u and s surface, wee find that the total mass flux entering the u surface equals that leaving the s surface\n",
+ "Ncu=r; #mass fluxes of carbon in u surface,kg/m**2/s\n",
+ "\n",
+ "#Calculations\n",
+ "No2s=-32/12*Ncu; #mass flux of O2 in surface s,kg/(m**2*s)\n",
+ "Nco2s=44/12*Ncu; #mass flux of CO2 in surface s,kg/(m**2*s)\n",
+ "Vo2s=No2s/(Mo2*sd); #mass average speed,m/s\n",
+ "Vco2s=Nco2s/(sd); #mass average speed,m/s\n",
+ "Vs=(Nco2s+No2s)/sd; #effective mass average speed,m/s\n",
+ "j1=sd*Mo2*(Vo2s-Vs); #diffusional mass flux,kg/(m**2*s)\n",
+ "j2=sd*Mco2*(Vco2s-Vs); #diffusional mass flux,kg/(m**2*s)\n",
+ "#the diffusional mass fluxes are very nearly equal to the species m ss fluxes. tha is because the mass average speed is much less than species speeds.\n",
+ "\n",
+ "N1 = Ncu/12; #mole flux of carbon through the surface s,kmol/(m**2*s)\n",
+ "N2 = -N1; #mole flux of oxygen through the surface s,kmol/(m**2*s)\n",
+ "\n",
+ "#Result\n",
+ "print \"Mass flux of O2 through an imaginary surface is :\",round(j1,5),\"kg/(m^2*s)\\n\"\n",
+ "print \"Mass flux of CO2 through an imaginary surface is :\",round(j2,5),\"kg/(m^2*s)\\n\"\n",
+ "\n",
+ "print \"Mole flux of Co2 through an imaginary surface is :\",round(N1,5),\"kmol/(m^2*s)\\n\"\n",
+ "print \"Mole flux of O2through an imaginary surface is :\",round(N2,5),\"kmol/(m^2*s)\\n\"\n",
+ "print \"The two diffusional mole fluxes sum to zero themselves because ther is no convective mole flux for other species to diffuse against. the reader may find the velocity of the interface.that calculation shows the interface to be receding so slowly that the velocities are equal to those that would be seen by a stationary observer.\"\n",
+ " #end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flux of O2 through an imaginary surface is : -0.00691 kg/(m^2*s)\n",
+ "\n",
+ "Mass flux of CO2 through an imaginary surface is : 0.00033 kg/(m^2*s)\n",
+ "\n",
+ "Mole flux of Co2 through an imaginary surface is : 0.0002 kmol/(m^2*s)\n",
+ "\n",
+ "Mole flux of O2through an imaginary surface is : -0.0002 kmol/(m^2*s)\n",
+ "\n",
+ "The two diffusional mole fluxes sum to zero themselves because ther is no convective mole flux for other species to diffuse against. the reader may find the velocity of the interface.that calculation shows the interface to be receding so slowly that the velocities are equal to those that would be seen by a stationary observer.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.3, Page number: 617"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=276; #temp.of air,K\n",
+ "aa=3.711; #lennard jones constant or collision diameter,A\n",
+ "ab=2.827; #lennard jones constant or collision diameter,A\n",
+ "b1=78.6; #lennard jones constant,K\n",
+ "b2=59.7; #lennard jones constant,K\n",
+ "Ma=28.97; #Molecular mass of air, kg/kmol\n",
+ "Mh=2.016; #Molecular mass of hydrogen, kg/kmol\n",
+ "\n",
+ "#Calculations\n",
+ "a=(aa+ab)/2; #effective molecular diameter for collisions of hydrogen and air,m\n",
+ "b=math.sqrt(b1*b2); #effective potential well depth,K\n",
+ "c=T1/b; \n",
+ "\n",
+ "d=0.8822; #potential well function, from table 11.3\n",
+ "Dab=(1.8583*math.pow(10,-7))*math.pow(T1,1.5)/(math.pow(a,2)*d)*math.sqrt(1/Mh+1/Ma); #diffusion coefficient of hydrogen in air,m**2/s\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Diffusion coefficient of hydrogen in air is :\",round(Dab,6),\"m^2/s an experimental value from table is 6.34*10^-5 m^2/s,so the prediction is high by 5 percent.\\n\"\n",
+ " #end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diffusion coefficient of hydrogen in air is : 6.6e-05 m^2/s an experimental value from table is 6.34*10^-5 m^2/s,so the prediction is high by 5 percent.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.4, Page number: 625"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from numpy import array\n",
+ "\n",
+ "#Variables\n",
+ "T1=373.15; #temp.of tea,K\n",
+ "XN2=0.7808; #mole fraction of nitrogen\n",
+ "XO2=0.2095; #mole fraction of oxygen\n",
+ "Xar=0.0093; #mole fraction of\n",
+ "Cp=1006 #mixture diffusivity,j/(kg*K)\n",
+ "\n",
+ "#Calculations\n",
+ "a=array(([3.798, 3.467, 3.542])); #collisin diameter,m\n",
+ "b=array(([71.4, 106.7, 93.3])); #lennard jones constant,K\n",
+ "M=array(([28.02, 32, 39.95])); #molar masses,kg/kmol\n",
+ "c=array(([0.9599, 1.057, 1.021])); #potential well function\n",
+ "d=array(([1.8*10**-5, 2.059*10**-5, 2.281*10**-5])); #calculated viscosity,kg/(m*s)\n",
+ "e=array(([1.8*10**-5, 2.07*10**-5, 2.29*10**-5])); # theoritical viscosity,kg/(m*s)\n",
+ "f=array(([0.0260, 0.02615, 0.01787])); #theoritical thermal conducitvity,W/(m*K)\n",
+ "\n",
+ "u=2.6693*10**-6*(M*T1)**0.5/((a**2*c)); #viscosity,kg/(m*s)\n",
+ "k=0.083228/((a**2*c*(T1/M**0.5))) #thermal conductivity,W/(m*s)\n",
+ "umc = XN2*u.item(0)/0.9978+XO2*u.item(1)/1.008+Xar*u.item(2)/0.9435 ; #calculated mixture viscosity,kg/(m*s)\n",
+ "umc1=1.857*10**-5;\n",
+ "\n",
+ "umd=XN2*e.item(0)/0.9978+XO2*e.item(1)/1.008+e.item(2)*Xar/0.9435; #theoritical mixture viscosity,kg/(m*s)\n",
+ "kmc=XN2*k.item(0)/0.9978+XO2*k.item(1)/1.008+Xar*k.item(2)/0.9435; #calculated thermal conducitvity,W/(m*K)\n",
+ "kmc1=0.02623;\n",
+ "kmd=XN2*f.item(0)/0.9978+XO2*f.item(1)/1.008+Xar*f.item(2)/0.9435; #theoritical thermal conductivity, W/(m*K)\n",
+ "pr=umd*Cp/kmd; #prandtl no.\n",
+ "\n",
+ "#Result\n",
+ "print \"Theoritical mixture viscosity is :\",round(umc1,6),\"kg/(m*s)\\n\"\n",
+ "print \"Calculated mixture viscosity is :\",round(umd,6),\"kg/(m*s)\\n\"\n",
+ "print \"Theoritical thermal conducitvity is :\",round(kmc1,4),\" W/(m*K)\\n\"\n",
+ "print \"Calculated thermal conducitvity is :\",round(kmd,4),\"W/(m*K)\\n\" \n",
+ "print \"Prandtl no. is :\",round(pr,4),\"\\n\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "ImportError",
+ "evalue": "DLL load failed: %1 is not a valid Win32 application.",
+ "output_type": "pyerr",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mImportError\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m<ipython-input-1-f818c437f68e>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mdivision\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmath\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0marray\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[1;31m#Question\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;34m'''Compute the transport properties of normal air at 300 K.'''\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 151\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mloader\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mpackages\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0moptions\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 152\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 153\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0madd_newdocs\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 154\u001b[0m \u001b[0m__all__\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;34m'add_newdocs'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'ModuleDeprecationWarning'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 155\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\add_newdocs.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mdivision\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mabsolute_import\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 12\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 13\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlib\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0madd_newdoc\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###############################################################################\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\lib\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 6\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mversion\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mversion\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0m__version__\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mtype_check\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 9\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mindex_tricks\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 10\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mfunction_base\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\lib\\type_check.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 9\u001b[0m 'common_type']\n\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 11\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnumeric\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0m_nx\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 12\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnumeric\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0masarray\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0masanyarray\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marray\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0misnan\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0;31m \u001b[0m\u001b[0;31m\\\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 13\u001b[0m \u001b[0mobj2sctype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mzeros\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;32mC:\\Users\\jaidev\\Anaconda\\lib\\site-packages\\numpy\\core\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mversion\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mversion\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0m__version__\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmultiarray\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 7\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mumath\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0m_internal\u001b[0m \u001b[1;31m# for freeze programs\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;31mImportError\u001b[0m: DLL load failed: %1 is not a valid Win32 application."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.5, Page number: 632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from numpy import array\n",
+ "import matplotlib.pyplot as plt\n",
+ "%pylab inline\n",
+ "\n",
+ "#Variables\n",
+ "Patm=101.325;\t\t\t#Atmospheric pressure in kPa.\n",
+ "Mh20=18.02;\t\t\t\t#Molecular mass of H20 in kg/kmol.\n",
+ "Mair=28.96;\t\t\t\t#Molecular mass of air in kg/kmol.\n",
+ "Psat =array(([0.6113, 1.2276, 2.3385, 4.2461, 7.3837, 12.35, 19.941, 31.188, 47.39, 70.139, 101.325]));\t\t#Saturated pressure of watrer in kPa \n",
+ "T=array(([0.01, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]));\t\t#Temperature of air in in degree C\n",
+ "#Calculations\n",
+ "xw=Psat/Patm;\t\t\t\t\n",
+ "\n",
+ "mw=(xw*Mh20)/(xw*Mh20+(1-xw)*Mair);\t\t#Mass fraction of water vapour.\n",
+ "#Result\n",
+ "plt.plot(T,mw);\n",
+ "plt.xlabel(\"Temperature(Degree C)\")\n",
+ "plt.ylabel(\"Mass fraction of water vapour\");\n",
+ "plt.show()\n",
+ "\n",
+ "\n"
+ ],
+ "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": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEPCAYAAACp/QjLAAAABHNCSVQICAgIfAhkiAAAAAlwSFl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fu2pp56SNbDK2OdARHI4exYICABSUqTF9ZoaWfsc1q5di6VLl6Jz586wsLBQv55m\nylMHicjoqVRSc9IHHzTNxNBQGmsOjo6OOHHiBDp06KCvmKphzYGIGttHHwG7d0vLZJg30QZ2WWsO\nTz31FNq2batT4UREhigjA1ixAjh+vOkmhobSmBy6d++OZ599FqNHj0azP7ZBMjMzw6JFi2QPjoio\nsZWXA6+8AvzlL4Cjo9LRGC6NOfOpp57Cc889h5KSEuTn5yMvLw95eXlaFR4fHw9XV1c4Oztj5cqV\ntR73888/w9LSEjt37tQ+ciIiHaxfDxQXS2soUe20niFdkRDaaLlMoUqlgouLC/bv3w9bW1v069cP\n0dHRcHNzq3ZcYGAgWrVqhdDQULz00kvVg2SfAxE1gqwswNcXOHQIcHdXOhr5ybq2UlpaGnx8fODh\n4QEPDw/06dMHv/76q8aCT5w4AScnJzg4OMDKygohISGIi4urdtzatWsxYcIEdOrUSacvQESkDSGA\niAhg4ULTSAwNpTE5zJ49G//85z9x5coVXLlyBR999BFmz56tseCcnBzYVxofZmdnh5ycnGrHxMXF\nYc6cOQCkLEdEJIctW4CrV4G331Y6EuOgsUO6sLAQzz77rPp5QEAACgoKNBaszY3+9ddfx4cffqiu\n+rDpiIjkcP068OabwN69gJWV0tEYB61GKy1btgzTp0+HEAJbt25Fjx49NBZsa2uLrKws9fOsrCzY\n2dlVOebkyZMICQkBANy6dQt79+6FlZUVxo4dW628yMhI9e8BAQEICAjQGAMREQDMmydNePP1VToS\neSUmJiIxMbFRytLYIX3nzh289957OHr0KADA398fkZGRePLJJ+ssuKysDC4uLjhw4AC6deuG/v37\n19ghXSE0NBTBwcEYP3589SDZIU1EOvrmG2nY6unTgJ43sVScrJPg2rdvj7Vr19a/YEtLREVFISgo\nCCqVCmFhYXBzc8O6desAABEREfWPloioHu7cAebPB77+2vQSQ0PVWnNYuHAhVq9ejeDg4OofMjPD\nrl27ZA+u8vlYcyCi+poxA2jXDli9WulIlCFLzeFPf/oTAGDx4sU1np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4MDTp48CQDYtWsXSktLa4wnKCgI//rXv9TJ6/z58ygsLMTTTz+t7veoSWpqKj744APMnTsX\nADBixAisWbNG/f6ZM2cAAIMGDcKOHTsASLWDu3fv1hrHF198gYKCAgDSLoq5ubkYPnw4YmNjkZub\nC0DafP7KlStVPtuqVSuEhYVh4cKF6u+Zm5urrg0B0u5ipraXCjE5kJ5YWFggNjYWb7/9Nnr37g0f\nH58ah4/WtXuVi4sLPv30U7i7u+P+/fuYM2cOrKys6iy3clmRkZF4+eWX0bdvX3Tq1En9XnBwMP77\n3//Cx8cHR48eRXh4OA4dOoTevXsjOTlZ3SH9eHmvvPIK3N3d4evrCy8vL8yZMwcqlQpdu3ZFWVkZ\nCgsL1Z85fPiweijrvHnzsHbtWjz77LMAgDVr1uCXX36Bt7c3PDw8sG7dOgDAe++9h3379sHLywux\nsbHo2rWr+q/7ynEEBgZiypQpGDhwIHr16oWJEyciPz8fbm5u+OCDDzBixAh4e3tjxIgRNSatDz74\nAJ06dYK7uzu8vLwQHByMJ554AgBw/fp1dOjQoVpNhZo+LtlNRiEzMxPBwcFIS0tTOhStREZGws3N\nrUqfR32VlJTAwsICFhYWSEpKwty5c5GSktKIUWq2fv16FBQU4I033tDreUl57HMgo2FM7d5z587F\njBkzGpQcrly5gokTJ6K8vBzNmjXDhg0bGjFC7cTExCAuLk7v5yXlseZARETVsM+BiIiqYXIgIqJq\nmByIiKgaJgciIqqGyYGIiKphciAiomr+P6Ksmp778+IaAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x8a7c4e0>"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.6, Page number: 634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=263.15; #temp.of ice,K\n",
+ "p=101.325; #Atmospheric pressure, KPa\n",
+ "Molw=18.02; #Molecular mass of water vapour, g/mol\n",
+ "Mola=28.96; #Molecular mass of air, g/mol\n",
+ "\n",
+ "#Calculations\n",
+ "Pv=math.exp(21.99-6141/(T1)); #vapor pressure,KPa\n",
+ "xw=Pv/p; #mole fraction of water\n",
+ "mw=xw*Molw/(xw*Molw+(1-xw)*Mola); #mass fraction\n",
+ "\n",
+ "#Result\n",
+ "print \"Mass fraction of watervapor above the surface of ice is :\",round(mw,5),\"\\n\"\n",
+ "#end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass fraction of watervapor above the surface of ice is : 0.0016 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.10, Page number:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "T1=303; # isothermal temp.,K\n",
+ "v=5; #air speed,m/s\n",
+ "l=0.05; #length of naphthalene model that is flat, m\n",
+ "Mnap=128.2; #molar mass of naphthalene,kg/kmol\n",
+ "nu=1.867*10**-5; #Dynamic viscocity, m^2/s\n",
+ "\n",
+ "#Calculations\n",
+ "D=0.86*(10**-5); #diffusion coefficient of naphthalene in air,m/s\n",
+ "\n",
+ "Pv=10**(11.45-3729.3/T1)*133.31; #vapor pressure of napthalene, Pa\n",
+ "xn=Pv/101325; #mole fraction of naphthalene\n",
+ "mn=xn*Mnap/(xn*Mnap+(1-xn)*28.96); #mass fraction of naphthalene\n",
+ "mnp=0; #mass fraction of naphthalene in free stream is 0\n",
+ "\n",
+ "Rel=v*l/nu; #reynolds no.\n",
+ "Sc=nu/D; #schimidt no.\n",
+ "Nul=0.664*math.sqrt(Rel)*(Sc**(1/3)); #mass transfer nusselt no.\n",
+ "Gmn=D*Nul*1.166/l; #gas phase mass transfer coefficient,kg/(m**2*s)\n",
+ "n=Gmn*(mn-mnp); #average mass flux,kg/(m**2*s)\n",
+ "n1=n*1000*3600;# average mass flux, g/m**2.h\n",
+ "\n",
+ "#Result\n",
+ "print \"Average rate of loss of naphthalene from a part of model is :\",round(n,7),\"kg/(m^2*s) or \",round(n1),\"g/(m^2*h)\\n\"\n",
+ "print \"Naphthalene sublimatin can be used to infer heat transfer coefficient by measuring the loss of naphthalene from a model over some length of time.since the schimidt no. of naphthalene is not generally equal to prandtl no. under the conditions of interest, some assumption about the dependence of nusselt no. on the prandtl no. must usually be introduced.\\n\"\n",
+ " #end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average rate of loss of naphthalene from a part of model is : 1.61e-05 kg/(m^2*s) or 58.0 g/(m^2*h)\n",
+ "\n",
+ "Naphthalene sublimatin can be used to infer heat transfer coefficient by measuring the loss of naphthalene from a model over some length of time.since the schimidt no. of naphthalene is not generally equal to prandtl no. under the conditions of interest, some assumption about the dependence of nusselt no. on the prandtl no. must usually be introduced.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.11, Page number:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "T1=300; #temp. of helium-water tube,K\n",
+ "h=0.4; #height of vertical wall,m\n",
+ "m=0.087*10**-3; #flow rate of helium,kg/(m**2*s)\n",
+ "#this is a uniform flux natural convection problem.\n",
+ "Mhes=0.01; # assuming the value of mass fraction of helium at the wall to be 0.01\n",
+ "Mhef=Mhes/2; #film composition\n",
+ "af=1.141; #film density,kg/m**3\n",
+ "wd=1.107; #wall density,kg/m**3\n",
+ "Dha=7.119*10**-5; #diffusion coefficient,m**2/s\n",
+ "u=1.857*10**-5; #film viscosity at 300K,kg/(m*s)\n",
+ "aa=1.177; #air density,kg/m**3\n",
+ "g=9.8; #Gravity constant, m/s**2\n",
+ "#Calculations\n",
+ "Sc=(u/af)/Dha; #schimidt no.\n",
+ "Ra1=g*(aa-wd)*m*h**4/(u*af*Dha**2*Mhes); #Rayleigh no.\n",
+ "Nu=6/5*(Ra1*Sc/(4+9*math.sqrt(Sc)+10*Sc))**(1/5); #approximate nusselt no.\n",
+ "s=m*h/(af*Dha*Nu); #average concentration of helium at the wall\n",
+ "#thus we have obtained an average wall concentration 14 oercent higher than our initial guess of Mhes.we repeat this calclations with revised values of densities to obtain Mhes = 0.01142\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Average conentration of helium at the wall is \",round(s,5),\",since the result is within 0.5 percent of our second guess, a third iteration is not needed\"\n",
+ " #end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average conentration of helium at the wall is 0.01136 ,since the result is within 0.5 percent of our second guess, a third iteration is not needed\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.14, Page number:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=325; #temp. of helium-water tube,K\n",
+ "l=0.2; #length of tube,m\n",
+ "x=0.01; # mole fraction of water\n",
+ "R=8314.472; #gas constant,J/(kmol*K)\n",
+ "Mw=18.02;#Molecular mass of water, g/mol\n",
+ "#the vapor pressure of the liquid water is approximately the saturation pressure at the water temp.\n",
+ "\n",
+ "#Calculations\n",
+ "p=1.341*10000 ; #vapor pressure using steam table,Pa\n",
+ "x1=p/101325; #mole fraction of saturated water\n",
+ "c=101325/(R*T1); #mole concentration in tube,kmol/m**3\n",
+ "D12=1.067*math.pow(10,-4); #diffusivity ofwater with respect to helium,m**2/s \n",
+ "Nw=c*D12*math.log(1+(x-x1)/(x1-1))/l ; #molar evaporation rate,kmol/(m**2*s)\n",
+ "nw=Nw*Mw; # mass evaporation rate,kg/(m**2*s)\n",
+ "\n",
+ "#S=1+(x1-1)*math.exp(Nw*y/(c*D12)) conentration distribution of water-vapor\n",
+ "#Result\n",
+ "print \"Conentration distribution of water-vapor is : x1(y)=1-0.8677*exp(0.6593*y) where y is expressed in meters.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conentration distribution of water-vapor is : x1(y)=1-0.8677*exp(0.6593*y) where y is expressed in meters.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.15, Page number:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "T1=1473; #suraface temp.of hot water,K\n",
+ "x=0.05; #mass fraction of water\n",
+ "Gm=0.017; #average mass transfer coefficient,kg/(m**2*s)\n",
+ "A=0.04; #suraface area of pan,m**2\n",
+ "\n",
+ " #only water vapour passes through the liquid surface, since air is not strongly absorbed into water under normal conditions.\n",
+ "#Calculations\n",
+ "p=38.58*1000; #saturation pressure of water,kPa\n",
+ "Xwater=p/101325; #mole fraction of saturated water\n",
+ "Mwater=Xwater*18.02/(Xwater*18.02+(1-Xwater)*28.96); #mass fraction of saturated water\n",
+ "\n",
+ "B=(x-Mwater)/(Mwater-1); #mass transfer driving force\n",
+ "m=Gm*B*A; #evaporation rate,kg/s\n",
+ "\n",
+ "#Result\n",
+ "print \"Evaporation rate is:\",round(m,6),\" kg/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Evaporation rate is: 0.000213 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.16, Page number:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=298; #temp.of air,K\n",
+ "T2=323.15; #film temp.,K\n",
+ "x=0.05; #mass fraction of water at 75 C\n",
+ "Gm=0.017; #average mass transfer coefficient,kg/(m**2*s)\n",
+ "A=0.04; #suraface area of pan,m**2\n",
+ "l=0.2; #length of pan in flow direction,m\n",
+ "v=5; #air speed,m/s\n",
+ "m=(x+0.277)/2; #film composition of water at 50 C\n",
+ "Mf=26.34; #mixture molecular weight,kg/kmol\n",
+ "p=101325; #Atmospheric pressure, Pa\n",
+ "R=8314.5; #Gas constant, J/kmol-K\n",
+ "Uf=1.75*math.pow(10,-5); #film viscosity,kg/(m*s)\n",
+ "B=0.314; #mass transfer driving force\n",
+ "D=2.96*math.pow(10,-5); #diffusivity of water in air,m**2/s\n",
+ "df=0.993; #Density of ideal air, kg/m**#\n",
+ "\n",
+ "#Calculations\n",
+ "af=p*Mf/(R*T2); \t #film density from ideal gas law,kg/m**3\n",
+ "Vf=Uf/af; #kinematic viscosity,m**2/s\n",
+ "Rel=v*l/Vf; #reynolds no. comes out to be 56,800 so the flow is laminar.\n",
+ "Sc=Vf/D; #scimidt no.\n",
+ "Nu=0.664*math.sqrt(Rel)*math.pow(Sc,1/3); #nussselt no.\n",
+ "Gmw1=Nu*(D*df/l); #appropriate value of mass transfer gas phase coeffficient of water in air,kg/(m**2*s)\n",
+ "Gmw=Gmw1*(math.log(1+B)/B); \t #mass transfer gas phase coeffficient of water in air,kg/(m**2*s)\n",
+ "\n",
+ "#Results\n",
+ "print \"Mass transfer gas phase coeffficient of water in air is :\",round(Gmw,4),\"kg/(m^2*s)\\nIn this caes, the blowing factor is 0.870. Thus the mild blowing has reduced the mass transfer coefficient by about 13 percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.01955648559 133.069905487\n",
+ "Mass transfer gas phase coeffficient of water in air is : 0.017 kg/(m^2*s)\n",
+ "In this caes, the blowing factor is 0.870. Thus the mild blowing has reduced the mass transfer coefficient by about 13 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter2.ipynb b/A_Heat_Transfer_Text_Book/Chapter2.ipynb
new file mode 100755
index 00000000..d6316e5a
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter2.ipynb
@@ -0,0 +1,329 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Heat conduction concepts, thermal resistance, and the overall heat transfer coefficient "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page number: 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "l=1; # tube length, m\n",
+ "m=0.01; # mass fraction\n",
+ "D12=2.84*10**-5; # diffusivity, m**2/s\n",
+ "a=1.18; # density, kg/m**3\n",
+ "\n",
+ "#Calculations\n",
+ "J=a*D12*m/l;\t\t\t\t\t\t\t\t #steady state flux of water from one side to the other,kg/(m**2*s)\n",
+ "\n",
+ "#Results\n",
+ "print \"Steady flux of water is\",J,\"kg/(m^2*s)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steady flux of water is 3.3512e-07 kg/(m^2*s)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.7, Page number: 72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "h=20; #convective heat transfer coefficient, W/(m**2*K)\n",
+ "k=0.074; #thermal conductivity, J/(m*K)\n",
+ "\n",
+ "#Calculations\n",
+ "Ro=k/h; # formula for critical thickness of insulation, m.\n",
+ "\n",
+ "#Results\n",
+ "print \"Critical thickness of insulation is :\",Ro,\"m\\n\"\n",
+ "print \"Insulation will not even start to do any good until ratio of outer radius and inner radius is 2.32 or outer radius is 0.0058 m.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical thickness of insulation is : 0.0037 m\n",
+ "\n",
+ "Insulation will not even start to do any good until ratio of outer radius and inner radius is 2.32 or outer radius is 0.0058 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.8, Page number: 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "P=0.1; #dissipating power,W\n",
+ "D=0.0036; #outer diameter of cylinder, m\n",
+ "l=0.01; #length of cylinder, m\n",
+ "T=308; #temperature of air in the cabinet,K\n",
+ "Test=323; #Estimated temp of resistor, K\n",
+ "h=13; #convection coefficient, W/(m**2*K)\n",
+ "e=0.9;\t\t\t\t\t\t #emmisivity\n",
+ "A=1.33*math.pow(10,-4); #area of ressistor's surface, m**2\n",
+ "sigma=5.67*math.pow(10,-8); #Stefan-Boltzmann constant, Wm**-2K**-4\n",
+ "\n",
+ "#Calculations\n",
+ "Tm=(T+Test)/2; #ressistor's temperature at 50 K\n",
+ "Hr=4*sigma*math.pow(Tm,3)*e; #radiative heat transfer coefficient,W/(m**2*K)\n",
+ "Rteq=1/(A*(Hr+h)); #Equivalent thermal resistance K/W\n",
+ "Tres=T+P*Rteq; #Resistor's temp. C\n",
+ "#we guessed a ressistor's temperature of 323K in finding Hr,recomputing with this higher temperature,\n",
+ "#we have Tm=327K and Hr=7.17W/(m**2*K). if we repeat the rest of calculations, we get a new value Tres=345.3K,\n",
+ "#since the use of hr is an approximation, we should check its applicability: 1/4*((345.3-308)/327)**2=0.00325<<1,\n",
+ "#in this case, the approximation is a very good one.\n",
+ "Tr=Tres-273.06; #Resistor's temp. , K\n",
+ "\n",
+ "#Results\n",
+ "print \"Temperature of ressistor is :\",round(Tr,3),\"K\\n\"\n",
+ "print \"Since 1/4*(temperature diffference/mean temperature)= 1/4*((72.3-35)/327)^2=0.00325<<1, in this case, the approximation is a very good one.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of ressistor is : 73.676 K\n",
+ "\n",
+ "Since 1/4*(temperature diffference/mean temperature)= 1/4*((72.3-35)/327)^2=0.00325<<1, in this case, the approximation is a very good one.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.9, Page number: 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "k=10; #thermal conductivity of ressistor, W/(m*K)\n",
+ "a=2000; #density of ressistor, kg/m**3\n",
+ "l=0.01; #length of cylinder, m\n",
+ "A=1.33*math.pow(10,-4); #area of ressistor's surface, m**2\n",
+ "T1=308; #temperature of air in the cabinet,K\n",
+ "Cp=700; #heat capacity of ressistor, J/kg/K\n",
+ "Heff=18.44; #the effective heat transfer coefficient of parallel convection and radiation process, W/(m**2*K)\n",
+ "D=0.0036; #outer diameter of cylinder, m\n",
+ "\n",
+ "#Calculations\n",
+ "Bi=Heff*(D/2)/k; #Biot no.\n",
+ "T=a*Cp*math.pi*l*math.pow(D,2)/(4*Heff*A); #since from previous example,To=72.3C, we have Tres=T1+(To-T)*exp(-t/T),Tres=308+(37.3)*.exp(-t/T). 95% of the temperature drop has occured when t=T*3=174s.\n",
+ "t=3*T; #Time for 95 percent cooling of ressistor, seconds.\n",
+ "\n",
+ "#Results\n",
+ "print \"Time for 95 percent cooling of ressistor is :\",t,\"s\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time for 95 percent cooling of ressistor is : 174.313737829 s\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.10, Page number: 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "h1=200; #convective heat transfer coefficient, W/(m**2*K)\n",
+ "a=1/160000; #1/a=l/Kal, l=0.001m, Kal=160 W/(m*K)\n",
+ "h2=5000; #convective heat transfer coefficient during boiling,W/(m**2*K)\n",
+ "\n",
+ "#Calculations\n",
+ "U=1/(1/h1+a+1/h2); \t\t\t\t #Overall heat transfer coefficient,W/(m^2*K) \n",
+ "\n",
+ "#Results\n",
+ "print \"Overall heat transfer coefficient is :\",round(U,3),\"W/(m^2*K)\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall heat transfer coefficient is : 192.077 W/(m^2*K)\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.12, Page number: 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "Rf=0.0005; #fouling ressistance,m**2*K/W\n",
+ "U=5; #heat transfer coefficient,W/(m**2*K)\n",
+ "\n",
+ "#Calculations\n",
+ "Ucor=(U*Rf+1)/(U);\t\t\t\t\t #Corrected heat transfer coefficient, W/m^2.K\n",
+ "\n",
+ "#Results\n",
+ "print \"Corrected heat transfer coefficient is :\", Ucor,\"W/(m^2*K)\\n Therefore the fouling is entirely irrelevant to domestic heat holds.\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Corrected heat transfer coefficient is : 0.2005 W/(m^2*K)\n",
+ " Therefore the fouling is entirely irrelevant to domestic heat holds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.13, Page number: 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "U1=4000; # overall heat transfer coefficient of water cooled steam condenser, W/(m**2*K)\n",
+ "Rf1=0.0006; # lower limit of fouling ressistance of water side, m**2*K/W\n",
+ "Rf2=0.0020; # upper limit of fouling ressistance of water side, m**2*K/W\n",
+ "\n",
+ "#Calculations\n",
+ "U2=U1/(U1*Rf1+1);\t\t\t\t\t\t\t #Upper limit of the corrected overall heat transfer coefficient\n",
+ "U3=U1/(U1*Rf2+1);\t\t\t\t\t\t\t #Lower limit of corrected overall heat transfer coefficient\n",
+ "\n",
+ "#Results\n",
+ "print \"Upper limit of the corrected overall heat transfer coefficient is :\",round(U2,3),\"W/(m^2*K)\\n\"\n",
+ "print \"Lower limit of corrected overall heat transfer coefficient is :\",round(U3,3),\"W/m^2/K, U is reduced from 4000 to between 444 and 1176 W/(m^2*K),fouling is crucial in this case and engineering was in serious error.\\n\"\n",
+ " #end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Upper limit of the corrected overall heat transfer coefficient is : 1176.471 W/(m^2*K)\n",
+ "\n",
+ "Lower limit of corrected overall heat transfer coefficient is : 444.444 W/m^2/K, U is reduced from 4000 to between 444 and 1176 W/(m^2*K),fouling is crucial in this case and engineering was in serious error.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter3.ipynb b/A_Heat_Transfer_Text_Book/Chapter3.ipynb
new file mode 100755
index 00000000..6791eb70
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter3.ipynb
@@ -0,0 +1,227 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 - Heat exchanger design "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page number: 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=20; #Entering Temperature of Water, K\n",
+ "T2=40; #Exit Temperature of water, K\n",
+ "m=25/60 #Condensation rate of steam, kg/s\n",
+ "T3=60; #Condensation Temperature,K\n",
+ "A=12; #area of exchanger, m**2\n",
+ "h=2358.7*math.pow(10,3); #latent heat, J/kg\n",
+ "Cp=4174; #Specific heat of water, J/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "U=(m*h)/(A*((T2-T1)/math.log((T3-T1)/(T3-T2))));#Overall heat transfer coefficient, W/(m^2*K)\n",
+ "Mh=(m*h)/(Cp*(T2-T1));\t\t #Required flow of water, kg/s\n",
+ "\n",
+ "#Results\n",
+ "print \"Overall heat transfer coefficient is :\",round(U,1),\"W/(m^2*K)\\n\"\n",
+ "print \"Required flow of water is :\",round(Mh,2),\"kg/s\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall heat transfer coefficient is : 2838.4 W/(m^2*K)\n",
+ "\n",
+ "Required flow of water is : 11.77 kg/s\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page number: 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "m=5.795; #flow rate of oil, kg/s\n",
+ "T1=454; #Entering Temperature of oil, K\n",
+ "T2=311; #Exit Temperature of oil, K\n",
+ "T3=305; # Entering Temperature of water, K\n",
+ "T4=322; #Exit Temperature of water, K\n",
+ "c=2282; #heat capacity, J/(kg*K)\n",
+ "U=416; #overall heat transfer coefficient , J/(m**2*K*s)\n",
+ "F=0.92; #Correction factor for 2 shell and 4 tube-pass exchanger,\n",
+ "#since R=(T1-T2)/(T4-T3)=8.412 >1, P=(T4-T3)/(T1-T2)=0.114,we can get this value of F by using value of P =R*0.114\n",
+ "\n",
+ "#Calculations\n",
+ "A=(m*c*(T1-T2))/(U*F*((T1-T4-T2+T3)/math.log((T1-T4)/(T2-T3))));#Area for heat exchanger, m^2.\n",
+ "\n",
+ "#Results\n",
+ "print \"Area for heat exchanger is :\",round(A,3),\"m^2\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area for heat exchanger is : 121.216 m^2\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.5, Page number: 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=313; #entering temperature of cold water, K\n",
+ "T2=423; #Entering temperature of hot water, K\n",
+ "Cc=20000; #heat capacity of cold water, W/K\n",
+ "Ch=10000; #heat capacity of hot water, W/K\n",
+ "A=30; #area, m**2\n",
+ "U=500; #overall heat transfer coefficient, w/(m**2*K)\n",
+ "e=0.596; #no. of transfer units(NTU)=(U*A)/Ch=1.5, the effectiveness of heat exchanger e can be found by using this value of NTU\n",
+ "\n",
+ "#Calculations\n",
+ "Q=e*Ch*(T2-T1);\t\t\t\t\t\t\t\t#Heat transfer, W\n",
+ "Q1=Q/1000\t\t\t\t\t \t\t\t#Heat transfer, KW\n",
+ "Texh=T2-Q/Ch;\t\t\t\t\t\t\t\t#exit hot water temperature, K \n",
+ "Tn1=Texh-273;\t\t\t\t\t\t\t\t#exit hot water temperature, C\n",
+ "Texc=T1+Q/Cc\t\t\t\t\t\t\t\t#exit cold water temperature, K\n",
+ "Tn2=Texc-273;\t\t\t\t\t\t\t\t#exit cold water temperature, C\n",
+ "\n",
+ "#Results\n",
+ "print \"Heat transfer is :\",Q1,\"KW\\n\"\n",
+ "print \"The exit hot water temperature is:\",Tn1,\"C\\n\"\n",
+ "print \"The exit cold water temperature is :\",Tn2,\"C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer is : 655.6 KW\n",
+ "\n",
+ "The exit hot water temperature is: 84.44 C\n",
+ "\n",
+ "The exit cold water temperature is : 72.78 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page number: 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=313; #entering temperature of cold water, K\n",
+ "T2=423; #Entering temperature of hot water, K\n",
+ "T3=363; #Exit temperature of hot water, K\n",
+ "Cc=20000; #heat capacity of cold water, W/K\n",
+ "Ch=10000; #heat capacity of hot water, W/K\n",
+ "U=500; #overall heat transfer coefficient, w/(m**2*K)\n",
+ "\n",
+ "#Calculations\n",
+ "T4=T1+(Ch/Cc)*(T2-T3);\t\t \t\t #Exit cold fluid temp. K\n",
+ "\n",
+ "e=(T2-T3)/(T2-T1);\t\t\t \t #Effectiveness method\n",
+ "NTU=1.15;\t\t\t\t\t #No. of transfer unit\n",
+ "A1=Ch*(NTU)/U; # since NTU=1.15=U*A/Ch, Area can be found by using this formula\n",
+ "#another way to calculate the area is by using log mean diameter method\n",
+ "LMTD=(T2-T1-T3+T4)/math.log((T2-T1)/(T3-T4)); #Logarithmic mean temp. difference\n",
+ "A2=Ch*(T2-T3)/(U*LMTD);\t\t\t\t #Aera by method 2, in meters^2.\n",
+ "\n",
+ "#Results\n",
+ "print \"Area is :\",A1,\"m^2\\n\"\n",
+ "print \"Area is :\",round(A2,3),\"m^2\\n\"\n",
+ "print \"There is difference of 1 percent in answers which reflects graph reading inaccuracy.\"\n",
+ "# we can see that area calulated is same in above 2 methods.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area is : 23.0 m^2\n",
+ "\n",
+ "Area is : 22.73 m^2\n",
+ "\n",
+ "There is difference of 1 percent in answers which reflects graph reading inaccuracy.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter4.ipynb b/A_Heat_Transfer_Text_Book/Chapter4.ipynb
new file mode 100755
index 00000000..6c6f72bd
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter4.ipynb
@@ -0,0 +1,226 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Analysis of heat conduction and some steady one-dimensional problems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.8, Page number: 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "d=0.02; #diameter of alluminium rod,m\n",
+ "k=205; #thermal conductivity of rod,W/(m.K)\n",
+ "l=0.08; #length of rod, m\n",
+ "T1=423; #wall temperature, K\n",
+ "T2=299; #air temperatutre, K\n",
+ "h=120; #convective coefficient, W/(m**2*K)\n",
+ "\n",
+ "#Calculations\n",
+ "mL=math.sqrt(h*(math.pow(l,2))/(k*d/4)); # formula for mL=((h*Perimeter*l**2)/(k*Area))**0.5\n",
+ "Bi=h*l/k #Biot no.\n",
+ "a1=(math.cosh(0)+(Bi/mL)*math.sinh(0))/(math.cosh(mL)+(Bi/mL)*math.sinh(mL));#formula for temperature difference T-Ttip\n",
+ "Ttip1=T2+a1*(T1-T2); # exact tip temperature, C\n",
+ "Tt1=Ttip1-273; #Exact tip temp., K\n",
+ "a2=(math.cosh(0)+(Bi/mL)*math.sinh(0))/(math.cosh(mL));#dimensionless temp. at tip if heat transfer from the tip is not considered\n",
+ "Ttip2=T2+a2*(T1-T2); #Approximate tip temp., K\n",
+ "Tt2=Ttip2-273; #Approximate tip temp., C\n",
+ "\n",
+ "#Results\n",
+ "print \"The exact tip temperature is :\",round(Tt1,3),\"C\\n\"\n",
+ "print \"Approximate tip temperature is : \",round(Tt2,3),\" C\\n\"\n",
+ "print \"Thus the insulated tip approximation is adequate for the computation in this case.\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The exact tip temperature is : 111.428 C\n",
+ "\n",
+ "Approximate tip temperature is : 114.659 C\n",
+ "\n",
+ "Thus the insulated tip approximation is adequate for the computation in this case.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.9, Page number: 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=423; #wall temperature, K\n",
+ "d=0.02; #diameter of alluminium rod,m\n",
+ "k=205; #thermal conductivity of rod,W/(m.K)\n",
+ "l=0.08; #length of rod, m\n",
+ "T2=299; #air temperatutre, K \n",
+ "h=120; #convective coefficient, W/(m**2*K)\n",
+ "mL=0.8656;\n",
+ "\n",
+ "#Calculations\n",
+ "mr=mL*(d/(2*l)); # by looking at graph of 1-Qact/Q(no temp.depression) vs. mr*math.tanh(mL), we can find out the value of Troot. 1-Qact./Q(no temp. depression) = 0.05 so heat flow is reduced by 5 percent\n",
+ "Troot=T1-(T1-T2)*0.05; #Actual temperature of root, K (0.05 is from graph)\n",
+ "Tr=Troot-273; #Actual temperature of root, \u00b0C\n",
+ "\n",
+ "#Results\n",
+ "print \"Actual temperature of root is :\",Tr,\"C , the correction is modest in this \\n\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual temperature of root is : 143.8 C , the correction is modest in this \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.10, Page number: 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=308; #air temperature, K\n",
+ "Q=0.1; # heat transferred,W\n",
+ "k=16; #thermal conductivity of wires, W/(m*K)\n",
+ "d=0.00062; #diameter of wire,m\n",
+ "Heff=23; #convection coefficient, W/(m**2*K)\n",
+ "A=1.33*math.pow(10,-4); #Aera of resistor surface, m^2 (from example 2.8)\n",
+ "#the wires act actn as very long fins connected to ressistor hence math.tanh(mL)=1\n",
+ "\n",
+ "#Calculations\n",
+ "R1=1/math.sqrt(k*Heff*math.pow(math.pi,2)*math.pow(d,3)/4); #Fin resistance, K/W\n",
+ "Req=math.pow((1/R1+1/R1+7.17*A+13*A),-1); #the 2 thermal ressistances are in parallel to the thermal ressistance for natural...\n",
+ "#convection and thermal radiation from the ressistor's surface found in previous eg.\n",
+ "Tres=T1+Q*Req; #Resistor temperature, K\n",
+ "Trs=Tres-273; #Resistor temperature, \u00b0C\n",
+ "\n",
+ "#Results \n",
+ "print \"Resistor temperature is :\",round(Trs,2),\"C or about 10 C lower than before.\\n\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistor temperature is : 62.68 C or about 10 C lower than before.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.11, Page number: 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "D1=0.03; # outer diameter, m\n",
+ "T1=358; #hot water temperature, K\n",
+ "t1=0.0008; #thickness of fins, m\n",
+ "D2=0.08; # diameter of fins, m\n",
+ "t2=0.02; # spacing between fins, m\n",
+ "h1=20; # convection coefficient, W/(m**2*K)\n",
+ "h2=15; #convection coefficient with fins, W/(m**2*K)\n",
+ "To=295; #surrounding temperature, K\n",
+ "\n",
+ "#Calculations\n",
+ "Q=math.pi*D1*h1*(T1-To); # if fins are not added.\n",
+ "Q1=math.ceil(Q1); #heat loss without fins,W/m\n",
+ "# we set wall temp.=water temp..since the wall is constantly heated by water, we should not have a root temp. depression problem after the fins are added.hence by looking at the graph, ml(l/Perimeter)**0.5=(h*(D2/2-D1/2)/(125*0.025*t1)) = 0.306, we obtain n(efficiency)=89 percent\n",
+ "Qfin=math.ceil(Q*(t2-t1)/t2 + 0.89*(2*3.14*(math.pow(D2,2)/4-math.pow(D1,2)/4))*50*h2*(T1-To)) #Heat transferred with fins, K/W\n",
+ "\n",
+ "#Results\n",
+ "print \"Heat trnsferred without fins is :\",Q1,\"W/m\\n\"\n",
+ "print \"Heat transferred with fins is :\", round(Qfin,3),\"W/m or 4.02 times heat loss without fins.\\n\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat trnsferred without fins is : 199.0 W/m\n",
+ "\n",
+ "Heat transferred with fins is : 478.0 W/m or 4.02 times heat loss without fins.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter5.ipynb b/A_Heat_Transfer_Text_Book/Chapter5.ipynb
new file mode 100755
index 00000000..ae3d2064
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter5.ipynb
@@ -0,0 +1,479 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Transient and multidimensional heat conduction "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.2, Page number: 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "d1=0.1; # diameter of sphere, m\n",
+ "T1=303; # environment temp.,K\n",
+ "T2=278; # fridge temp., K\n",
+ "h=6; #convection coefficient, W/(m**2*K)\n",
+ "k=0.603; #thermal conductivity,W/(m*K)\n",
+ "a=997.6; # density of water, kg/m**3\n",
+ "c=4180; #heat capacity, J/(kg*K)\n",
+ "\n",
+ "#Calculations\n",
+ "F=(k/(a*c))*3600/(math.pow(d1,2))/4;\n",
+ "a1=math.pow(h*(d1/2)/k,-1) # Biot no.=1/2.01 therefore we read from fig. in upper left hand corner\n",
+ "Tcen=a1*(T1-T2)+T2; \t\t# temperature of the center of apple after 1 hour, K\n",
+ "Tc=Tcen-273; # temperature of the center of apple after 1 hour, \u00b0C\n",
+ "F1=1.29 #Bi is still 1/2.01, by looking at the graph we can find time.\n",
+ "t=F1*a*c*math.pow(d1/2,2)/k-2; #Time to bring the temp equal to 283k , seconds.\n",
+ "#finally we look up at Bi=1/2.01 and fouling factor is 1.29, for spheres heta removal is 43.67 kJ per apple.\n",
+ "x=43.67; #heat removal for an apple, kJ\n",
+ "X=12*x; #total heat removal,kJ\n",
+ "\n",
+ "#Results\n",
+ "print \"Temperature after an hour is :\",Tc,\"C\\n\"\n",
+ "print \"Time to bring the temp equal to 283k is :\",round(t,3),\"s or 6 hr 12 min\\n\"\n",
+ "print \"Total energy removal is :\",X,\"kJ\\n\"\n",
+ " #end\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature after an hour is : 55.25 C\n",
+ "\n",
+ "Time to bring the temp equal to 283k is : 22300.068 s or 6 hr 12 min\n",
+ "\n",
+ "Total energy removal is : 524.04 kJ\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.3, Page number: 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "d1=0.001;\t\t\t\t #diameter of nichrome, m\n",
+ "h=30000; #convection coefficient , W/(m**2*K)\n",
+ "T1=373; # wire temperature, K\n",
+ "k=13.8; #thermal conductivity,W/(m*K)\n",
+ "a=3.43*10**-6; # Thermal Diffusivity, m^2/s \n",
+ "w = 2*math.pi*60; # Frequency of current in rad/s\n",
+ "#heat is being generated in proportion to product of voltage and current, if the boiling action removes heat rapidly enough in comparison with the heat capacity of the wire,the surface temperature may well vary.\n",
+ "\n",
+ "#Calculations\n",
+ "Bi = h*d1/2/k; # biot number comes ot to be 1.09 by looking at the chart of cylinders, we find that, (Tmax-Tav)/(Tav-To)=0.04\n",
+ "phi = w*d1**2/4/a; # value of a= w*d1**(2)/4/a1 comes out to be 27.5.\n",
+ "TF=0.04; # (from the charts for cylinders, Fig. 5.12)temperature fluctuation of 4 percent is not serious and experiment is valid.\n",
+ "\n",
+ "#Results \n",
+ "print \"Biot number: \",round(Bi,1);\n",
+ "print \"Psi(\u03a8): \",round(phi,1);\n",
+ "print \"The temperature fluctuation is : \", TF,\"this fluctuation is probably not serious.It therefore appears that the experiment is valid.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Biot number: 1.1\n",
+ "Psi(\u03a8): 27.5\n",
+ "The temperature fluctuation is : 0.04 this fluctuation is probably not serious.It therefore appears that the experiment is valid.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page number:224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "t=0.003; #half thickness of sword, m\n",
+ "a=1.5*math.pow(10,-5); #Thermal diffusivity, m^2/s\n",
+ "\n",
+ "#Calculations\n",
+ "Tmax=math.pow(t,2)/(math.pow(3.64,2)*a); #Maximum time for sword to be in semi infinite region, seconds\n",
+ "\n",
+ "#Results\n",
+ "print \"Maximum time for sword to be in semi infinite region is :\",round(Tmax,4),\"s\\n\"\n",
+ "print \"Thus the quench would be felt at the centerline of the sword within only 1/20 s. the thermal diffusivity of clay is smaller than that of steel by a factor of about 30, so the quench time of coated steel must continue for over 1s before the temperature of the steel is affected at all, if the clay and sword thickness are comparable\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum time for sword to be in semi infinite region is : 0.0453 s\n",
+ "\n",
+ "Thus the quench would be felt at the centerline of the sword within only 1/20 s. the thermal diffusivity of clay is smaller than that of steel by a factor of about 30, so the quench time of coated steel must continue for over 1s before the temperature of the steel is affected at all, if the clay and sword thickness are comparable\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.5, Page number:226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "Tburn=65; #Skin threshold, C\n",
+ "Tbody=37; #Body temp, C\n",
+ "Tflame=800; #Flame temp, C\n",
+ "h=100; #convective heat transfer coefficient, W/(m**2*K)\n",
+ "k=0.63; # thermal conductivity,W/(m*K)\n",
+ "#the short exposure to the flame causes only a very superficial heating,so we consider the finger to be semi-infinite region.it turns out that the burn threshold of human skin,Tburn is about 65 C. h=100 W/(m**2*K), we shall assume that the thermal conductivity of human flesh equals that of its major component - water and that the thermal diffusivity is equal to the known value for beef.\n",
+ "# a=0.963, BE=h*x/k=0(since x=0 at the surface)\n",
+ "# b**2=(h**2)*(0.135*10**-6)*t/(k**2)=0.0034*t. On solving error function by trial and error method, we get the value of t=0.33 sec.\n",
+ "\n",
+ "#Calculations\n",
+ "a=(Tburn-Tflame)/(Tbody-Tflame);\n",
+ "beta=(1-a)*(math.sqrt(math.pi))/2;\n",
+ "# from fig. 5.16, it would require about 1/3 se to bring the skin to burn point.\n",
+ "\n",
+ "#Results\n",
+ "print \"It would require about 1/3 sec to bring the skin to burn point\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "It would require about 1/3 sec to bring the skin to burn point\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.7, Page number:234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "b=0.139*math.pow(10,-6); #thermal diffusivity, m**2/s\n",
+ "t=365*24*3600; #seconds in a year\n",
+ "min=2.356; #first minima from fig 5.19\n",
+ "#w=2*3.14 rad/yr , a=w*t=0 at present.first we find the depths at which a=0 curve reaches its local extrema.(we pick the a=0 curve because it) gives the highest temperature at t=o.).tan(o-e)=1 so e=3%pi/4, 7%pi/4....and the first minima occurs where e=3%pi/4=2.356.\n",
+ "\n",
+ "#Calculations\n",
+ "x=min/math.sqrt((2*math.pi/(2*b*t))); #depth of digging of earth to find the temperature wave, m\n",
+ "\n",
+ "#Results\n",
+ "print \"Depth of digging of earth is :\",round(x,3),\" m, if we dug in the earth, we would find it growing older until it reached a maximum coldness at a depth of about 2.8 m.Farther down, it would begin to warm up again, but nt much. in midwinter, the reverse would be true \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth of digging of earth is : 2.783 m, if we dug in the earth, we would find it growing older until it reached a maximum coldness at a depth of about 2.8 m.Farther down, it would begin to warm up again, but nt much. in midwinter, the reverse would be true \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.8, Page number:240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "l=0.08; #distance between metal walls,m\n",
+ "k=0.12; #thermal conductivity of insulating material, w/(m*K)\n",
+ "l1=0.04; #length of ribs,m\n",
+ "l2=0.14; #projected legth of wall,m\n",
+ "T1=40; #temperature of 1st wall,C\n",
+ "T2=0; #temperature of wall, C\n",
+ "hc=6.15; #Heat flow channels\n",
+ "ii=5.6; #Isothermal increments\n",
+ "\n",
+ "#Calculations\n",
+ "#by looking at the configuration plot, there are approximately 5.6 isothermal increments and 6.15 flow channels.\n",
+ "Q=2*(hc/ii)*k*(T1-T2); #factor of 2 accounts for the fact that there are two halves in the section.\n",
+ "T=2.1/ii*(T1-T2); #(using proportionality and fig 5.23)Temperature in the middle of of wall, 2 cm from a rib, \u00b0C\n",
+ "\n",
+ "#Results\n",
+ "print \"Temperature in the middle of of wall, 2 cm from a rib is :\",T,\"C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in the middle of of wall, 2 cm from a rib is : 15.0 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.9, Page number:242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "r=3; # radius ratio of one-quarter section of cylinder\n",
+ "\n",
+ "#Calculations\n",
+ "S=math.pi/(2*math.log(r)); # shape factor\n",
+ "\n",
+ "#Results\n",
+ "print \"Shape factor is :\",round(S,3),\"\\nThe quarter cylinder will be pictured for the radius ratio of 3, but for the different sizes, in both the cases it will be 1.43.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Shape factor is : 1.43 \n",
+ "The quarter cylinder will be pictured for the radius ratio of 3, but for the different sizes, in both the cases it will be 1.43.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.11, Page number:244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "Q=14; #steady heat transfer,W\n",
+ "D=0.06; #diameter of heat source,m\n",
+ "l=0.3; # length of source below surface ,m\n",
+ "T=308; #temperature of heat source,K\n",
+ "T1=294; #temperature of surface,K\n",
+ "\n",
+ "#Calculations\n",
+ "k=(Q/(T-T1))*(1-(D/2)/(D*10))/(4*3.14*D/2)+0.025;# thermal conductivity of soil, W/m.K\n",
+ "\n",
+ "#Results\n",
+ "print \"Thermal conductivity is :\",round(k,3),\"W/(m*K)\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal conductivity is : 2.546 W/(m*K)\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.12, Page number:250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "l=0.04; # length of square rod, m\n",
+ "T1=373; # temerature of rod, K\n",
+ "T2=293; # temperature of coolant,K\n",
+ "h=800; #convective heat transfer coefficient, W/(m**2*K)\n",
+ "a1=0.93; # ratio of temperature difference for Fo1=0.565, Bi1=0.2105, (x/l)1=0\n",
+ "a2=0.91; # ratio of temperature difference for Fo2=0.565, Bi2=0.2105, (x/l)2=0.5\n",
+ "\n",
+ "#Calculations\n",
+ "a=a1*a2; #ratio of temperature difference at the axial line of interest\n",
+ "T=(T1-T2)*a+T2; #temperature on a line 1 cm. from one side and 2 cm. from the adjoining side after 10 sec. in K\n",
+ "Ta=T-273; #in \u00b0C\n",
+ "\n",
+ "#Results\n",
+ "print \"Temperature is : \",Ta,\"C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature is : 87.704 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.13, Page number: 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=373; # temperature of iron rod,K\n",
+ "T2=293; # temperature of coolant,K\n",
+ "#Biot no., Bi1=Bi2=0.2105,Fo1=Fo2=0.565 \n",
+ "a1=0.10; #Fin effectiveness\n",
+ "a2=0.10; #Fin effectiveness\n",
+ "\n",
+ "#Calculations\n",
+ "a=a1+a2*(1-a1); \n",
+ "T=(T1-T2)*(1-a)+T2; #mean temperature,K\n",
+ "Ta=T-273; #mean temperature in \u00b0C\n",
+ "\n",
+ "#Results\n",
+ "print \"Mean temperature is :\",Ta,\"C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean temperature is : 84.8 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter6.ipynb b/A_Heat_Transfer_Text_Book/Chapter6.ipynb
new file mode 100755
index 00000000..08ce98f7
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter6.ipynb
@@ -0,0 +1,441 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6:Laminar and turbulent boundary layers "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.2, Page number: 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=300; #air temperature,K\n",
+ "v=1.5; #air velocity, m/s\n",
+ "t=0.5; #thickness, m\n",
+ "u=1.853*math.pow(10,-5); #dynamic viscosity,kg/(m*s)\n",
+ "v1=1.566*math.pow(10,-5); #kinematic viscosity,m**2/s\n",
+ "\n",
+ "#Calculations\n",
+ "Rex=v*t/v1; #reynolds no. is low enough to permit the use of laminar flow analysis.\n",
+ "b=4.92*t/(math.sqrt(Rex))*100; # b.l. thickness, cm\n",
+ "#in this case b/x=1.124/50=0.0225 so laminar flow is valid.\n",
+ "v2=0.8604*math.sqrt(v1*v/t);\n",
+ "#since v2 grows larger as x grows smaller, the condition v2<u is not satisfied very near the leading edge.\n",
+ "#in this case del/thickness is 0.0225.\n",
+ "x=0.8604*math.sqrt(v1*v/t); #velocity,m/s\n",
+ "y=x/t;\n",
+ "\n",
+ "#Results\n",
+ "print \"Boundary layer thickness is :\",round(b,3),\"cm\\n\"\n",
+ "print \"Since velocity grows larger as thickness grows smaller, the condition x<<u is not satisfied very near the leading edge. therefore the BI approximation themselves breakdown.\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boundary layer thickness is : 1.124 cm\n",
+ "\n",
+ "Since velocity grows larger as thickness grows smaller, the condition x<<u is not satisfied very near the leading edge. therefore the BI approximation themselves breakdown.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.3, Page number: 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "l=0.5; #total length of surface,m\n",
+ "Cf=0.00607; #overall friction coefficient\n",
+ "\n",
+ "#Calculations\n",
+ "tw=1.183*(2.25)*Cf/2; # wall shear, kg/(m*s**2)\n",
+ "a=0.5; #ratio of wall shear at x=l and average wall shear\n",
+ "#tw(x)=twavg where 0.664/(x**0.5)=1.328/(47,)893, x=1/8 m thus the wall shear stress plummets to twavg one fourth of the way from the leading edge and drops only to one half of twavg in the remaining 75 percent plate.x<600*1.566*10**(-5)/1.5=0.0063 m.\n",
+ "# preceding analysis should be good over almost 99 percent of the 0.5 m length of the surface.\n",
+ "\n",
+ "#Results\n",
+ "print \"Overall friction coefficient is :\",Cf,\"\\n\"\n",
+ "print \"Wall shear is :\",tw,\"kg/(m*s^2)\\n\"\n",
+ "print \"The preceding analysis should be good over almost 99 percent of the 0.5m length of the surface.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall friction coefficient is : 0.00607 \n",
+ "\n",
+ "Wall shear is : 0.00807841125 kg/(m*s^2)\n",
+ "\n",
+ "The preceding analysis should be good over almost 99 percent of the 0.5m length of the surface.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.4, Page number: 296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "l=0.06; #length of heater, m\n",
+ "p=15; #pressure of heater, atm\n",
+ "T1=440; #temperature of heater, K\n",
+ "v=2; #free stream velocity,m/s\n",
+ "T2=460; #constant temperature of heater, K\n",
+ "T3=450; #mean temperature of heater, K\n",
+ "k=0.674; #thermal conductivity ,W/(m.K)\n",
+ "\n",
+ "#Calculations\n",
+ "q=2*(0.332)*(k/l)*math.sqrt(v*l/(1.72*10**-7))*(T2-T1)/1000;\t\t #(from Fig 6.10)formula for heat flux is q=2*(0.664)*k/l*(Rel**0.5)*(T2-T1), in kW/m^2\n",
+ "\n",
+ "#Results\n",
+ "print \"Heat flux is :\",round(q,3),\"kW/m^2\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flux is : 124.604 kW/m^2\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.5, Page number: 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=293; #air temperature,K\n",
+ "v=15; #air velocity,m/s\n",
+ "T2=383; #temperature of plate,K\n",
+ "l=0.5; #length of plate,m\n",
+ "w=0.5; #width of plate,m\n",
+ "Pr=0.707; #prandtl no.\n",
+ "k=0.02885; #thermal conductivity of ,W/(m.K)\n",
+ "\n",
+ "#Calculations\n",
+ "Rel=v*l/(0.0000194); #reynolds no.\n",
+ "Nul=0.664*(Rel)**0.5*Pr**(1/3); \t #nusset no.\n",
+ "h1=367.8*(k)/l; #average convection coefficient, W/(m**2*K)\n",
+ "Q=h1*l**(2)*(T2-T1); #heat transferred,W\n",
+ "h2=h1/2 #convection coefficient at trailing , W/(m**2*K)\n",
+ "a1=4.92*l/math.sqrt(Rel)*1000 #hydrodynamic boundary layer,m\n",
+ "a2=a1/(Pr)**(1/3); #thermal boundary layer,mm\n",
+ "\n",
+ "#Results\n",
+ "print \"Average heat trensfer coefficient is :\",round(h1,3),\"W/m^2/K\\n\"\n",
+ "print \"Total heat transferred is\",round(Q,3),\"W\\n\"\n",
+ "print \"Convection coefficient at trailing is :\",round(h2,3),\"W/(m^2*K)\\n\"\n",
+ "print \"Hydrodynamic boundary layer is : \",round(a1,3),\"m\\n\"\n",
+ "print \"Thermal boundary layer is : \",round(a2,3),\"mm\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average heat trensfer coefficient is : 21.222 W/m^2/K\n",
+ "\n",
+ "Total heat transferred is 477.496 W\n",
+ "\n",
+ "Convection coefficient at trailing is : 10.611 W/(m^2*K)\n",
+ "\n",
+ "Hydrodynamic boundary layer is : 3.956 m\n",
+ "\n",
+ "Thermal boundary layer is : 4.441 mm\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.6, Page number: 310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=288; # air temperature,K\n",
+ "v=1.8; # air velocity,m/s\n",
+ "l=0.6; # length of panel, m\n",
+ "Q=420; # power per unit area, m**2\n",
+ "T2=378; # maximum temperature of surface, K\n",
+ "k=0.0278; #thermal conductivity of ,W/(m.K)\n",
+ "Pr=0.709; #Prandtl no.\n",
+ "\n",
+ "#Calculations\n",
+ "T3=Q*l/(k)/(0.453*(l*v/(1.794*10**-5))**(0.50)*(Pr)**(1/3));#maximum temperature difference \n",
+ "Twmax=T1+T3; #Twmax comes out to be 106.5 C, this is very close to 105 C,if 105 is at all conservative, Q = 420 should be safe.\n",
+ "T4=0.453/0.6795*T3; #average temperature difference,K\n",
+ "Twavg=T1+T4; #average wall temperature,K\n",
+ "Twa=Twavg-273; #average wall temp. in \u00b0C\n",
+ "\n",
+ "#Results\n",
+ "print \"Average wall temperature is :\",round(Twa,3),\"C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average wall temperature is : 75.975 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.8, Page number: 313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "v=15; #air velocity,m/s\n",
+ "T2=383; # temperature of plate,K\n",
+ "l=0.5; # length of plate,m\n",
+ "w=0.5; # width of plate,m\n",
+ "Pr=0.707; # prandtl no.\n",
+ "rho=1.05; #Air desnity, kg/m^3\n",
+ "#Calculations\n",
+ "Rel=v*l/(0.0000194); #reynolds no.\n",
+ "Nul=0.664*math.sqrt(Rel)*Pr**(1/3); # nusset no.\n",
+ "Cf=2*Nul/(Rel*Pr**(1/3)); #friction coefficient\n",
+ "s=Cf*0.5*rho*v**2; #drag shear, kg/(m*s**2)\n",
+ "f=s*0.5**2; #drag force, N\n",
+ "\n",
+ "#Results\n",
+ "print \"Drag force on heat transfer surface is :\",round(f,5),\"N\\n\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drag force on heat transfer surface is : 0.06307 N\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.9, Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=297; # river water temp.,K\n",
+ "T2=283; # ocean water temp., K\n",
+ "n=5; # no. of knots\n",
+ "k=0.5927; # thermal conductivity,W/(m*K)\n",
+ "a=998.8; #density of water, kg/m**3\n",
+ "Cp=4187; # heat capacity, J/kg/K\n",
+ "Pr=7.66; #Prandtle no.\n",
+ "x=1; #distance from forward edge,m\n",
+ "v=1.085*10**-6; # kinematic viscosity, m**2/s\n",
+ "u=2.572; # velocity of knot,m/s\n",
+ "\n",
+ "#Calculations\n",
+ "T3=(T1+T2)/2; # avg. temp.,K\n",
+ "Rex=u/v # reynolds no.\n",
+ "Cf=0.455/(math.log(0.06*Rex))**2 # friction coefficient\n",
+ "h=k/x*0.032*(Rex)**(0.8)*Pr**(0.43); # heat transfer coefficient,W/(m**2*K)\n",
+ "h1=a*Cp*u*Cf/2/(1+12.8*(Pr**0.68-1)*math.sqrt(Cf/2)); #heat transfer coefficient,W/(m**2*K)\n",
+ "\n",
+ "#Results\n",
+ "print \"Friction coefficient is :\",round(Cf,5),\"\\n\"\n",
+ "print \"Convective heat transfer coefficient at a distance of 1 m fom the forward edge is :\",round(h,3),\"W/(m^2*K)\\n\"\n",
+ "print \"Heat transfer coefficient by another method is :\",round(h1,3),\"W/(m^2*K)\\n\"\n",
+ "print \"The two values of h differ by about 18 percent, which is within the uncertainity \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Friction coefficient is : 0.00323 \n",
+ "\n",
+ "Convective heat transfer coefficient at a distance of 1 m fom the forward edge is : 5728.966 W/(m^2*K)\n",
+ "\n",
+ "Heat transfer coefficient by another method is : 6843.244 W/(m^2*K)\n",
+ "\n",
+ "The two values of h differ by about 18 percent, which is within the uncertainity \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.10, Page number: 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "l=2; # length of plate,m\n",
+ "p=1000; # power density,W/m**2\n",
+ "u=10; # air velocity,m/s\n",
+ "T1=290; # wind tunnel temp.,K\n",
+ "p2=1; # pressure,atm\n",
+ "v=1.578*10**-5; # kinematic viscosity, m**2/s\n",
+ "k=0.02623; # thermal conductivity,W/(m*K)\n",
+ "Pr=0.713; # prandtl no.\n",
+ "Rel=u*l/v; # reynolds no. at 10 m/s\n",
+ "Nul=1845; # nusselt no.\n",
+ "Re=400000; #Reynolds no. at the end of turbulent transition engine\n",
+ "\n",
+ "#Calculations\n",
+ "h=Nul*k/l; #convection coefficient,W/(m**2*K)\n",
+ "Tavg=T1+p/h; #Average temperature of plate, K\n",
+ "\n",
+ "#to take better account of the transition region, we can use churchill eqn.\n",
+ "x=Rel*Pr**(2/3)/(math.sqrt(1+(0.0468/Pr)**(2/3))); \n",
+ "x1=1.875*x*Re/Rel;\n",
+ "Nul1=0.45+0.6774*math.sqrt(x)*math.sqrt(1+((x/12500)**(3/5))/(1+(x1/x)**3.5)**0.4);\n",
+ "H=Nul1*k/l; #convection coefficient,W/(m**2*K)\n",
+ "Tw=290+1000/H; #average temperature of plate,K\n",
+ "\n",
+ "#Results\n",
+ "print \"Average temperature of plate is :\",round(Tavg,2),\" K\\n\"\n",
+ "print \"Average temperature of plate is :\",round(Tw,2),\" K , thus in this case, the average heat transfer coefficient is 33 percent higher when the transition regime is included.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average temperature of plate is : 331.33 K\n",
+ "\n",
+ "Average temperature of plate is : 321.54 K , thus in this case, the average heat transfer coefficient is 33 percent higher when the transition regime is included.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter7.ipynb b/A_Heat_Transfer_Text_Book/Chapter7.ipynb
new file mode 100755
index 00000000..c158785b
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter7.ipynb
@@ -0,0 +1,384 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Forced convection in a variety of configurations "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.1, Page number: 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "D=0.001; #diameter of tube,m\n",
+ "T1=293; #temperature of cold water, K\n",
+ "T2=347; #temperature of hot water, K\n",
+ "T3=320; #operating temperature of hot water, K\n",
+ "Q=6000; #heat flux,W/m**2\n",
+ "v=0.2 ; #speed of water,m/s\n",
+ "k=0.6367; #thermal conductivity,W/(m*K)\n",
+ "\n",
+ "#Calculations\n",
+ "v1=1.541*10**-7; # molecular diffusivity, m**2/s\n",
+ "v2=0.556*10**-6; #molecular diffusivity, m**2/s\n",
+ "Re=D*v/v2; #reynolds no.\n",
+ "L=D*(54-11/48*Q*D/k)*v*k/(4*Q*v1); #length that is down the tube for water reach to 74 C at its hottest point,m\n",
+ "\n",
+ "#Results\n",
+ "print \"Length that is down the tube for water reach to 74 C at its hottest point is :\",round(L,3),\"m ,while we did not evaluate the thermal entry length here, it may be shown to be much, much less than 1785 diametres.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length that is down the tube for water reach to 74 C at its hottest point is : 1.785 m ,while we did not evaluate the thermal entry length here, it may be shown to be much, much less than 1785 diametres.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.2, Page number: 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1 = 300; # air temp.,K\n",
+ "T2=313; # final air temp.,K\n",
+ "v=2; # air velocity,m/s\n",
+ "D=0.01; # inner diameter of pipe,m\n",
+ "l=0.2; # length surrounded by heater\n",
+ "nu=16.4*10**-6; # Dynamic viscocity, m^2/s\n",
+ "Pr=0.711; # prandtl no.\n",
+ "Cp=1004; # Specific heat, J/kg.K\n",
+ "k=0.0266; # thermal conductivity ,W/(m.K)\n",
+ "\n",
+ "#Calculations\n",
+ "Red=v*D/(nu); # reynolds no.\n",
+ "G=Red*Pr*D/l; # graetz no.\n",
+ "Q=1.159*Cp*v*(T2-T1)*(1/80); # power input, W/m**2\n",
+ "Tex=T2+Q*D/(5.05*k) # wall temp. at the exit,K\n",
+ "Tex1=Tex-273;\n",
+ "\n",
+ "#Results\n",
+ "print \"Power input is :\",Q,\"W/m^2\\n\"\n",
+ "print \"Wall temp. at the exit is:\",round(Tex1,3),\" C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power input is : 378.1817 W/m^2\n",
+ "\n",
+ "Wall temp. at the exit is: 68.153 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.3, Page number: 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "m=21.5; #mass flow rate, kg/s\n",
+ "D=0.12; #diameter of pipe, m\n",
+ "T1=363; #pipe temperature,K\n",
+ "T2=323; #bulk temp. of fluid,K\n",
+ "a=977; #density, kg/m**3\n",
+ "Uw=3.1*10**-4; #wall side viscosity,N*s/m**2\n",
+ "Ub=5.38*10**-4; #bulk viscosity, N*s/m**2\n",
+ "Pr=2.47; #prandtl no.\n",
+ "nu=4.07*10**-7; #dynamic viscocity, m^2/s\n",
+ "k=0.661; #thermal conductivity ,W/(m.K)\n",
+ "\n",
+ "#Calculations\n",
+ "rt=Ub/Uw; #Ration of bulk and wall side viscocities\n",
+ "u=m/(a*math.pi*(D/2)**2); #average velocity,m/s\n",
+ "Re=u*D/(nu); #reynolds no.\n",
+ "f=1/(1.82/2.303*math.log(Re)-1.64)**2; #formula for friction factor for smooth pipes\n",
+ "Nu=(f/8*Re*Pr)/(1.07+12.7*math.sqrt(f/8)*(Pr**(2/3)-1))*rt**0.11;#formula for nusselt no.in fully developed flow in smooth pipes\n",
+ "h=Nu*k/D # convective heat transfer coefficient,W/(m**2)/K\n",
+ "#corrected friction factor = friction factor at bulk temp.*K where K=(7-u1/u2)/6 for wall temp.>bulk temp.\n",
+ "f1=f*((7-rt)/6); #corrected friction factor\n",
+ "\n",
+ "#Results\n",
+ "print \"Correlation friction factor. is :\",round(f1,4),\"\\n\"\n",
+ "print \"Convection heat transfer coefficient is :\",round(h,1),\"W/(m^2)/K \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Correlation friction factor. is : 0.0112 \n",
+ "\n",
+ "Convection heat transfer coefficient is : 8904.1 W/(m^2)/K \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.4, Page number: 364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "m=21.5; #mass flow rate, kg/s\n",
+ "e=260*10**-6; #wall roughness,m\n",
+ "D=0.12; #diameter of pipe, m\n",
+ "T1=363; #pipe temperature,K\n",
+ "T2=323; #bulk temp. of fluid,K\n",
+ "a=977; #density, kg/m**3\n",
+ "Uw=3.1*10**-4; # wall side viscosity,N*s/m**2\n",
+ "Ub=5.38*10**-4; #bulk viscosity, N*s/m**2\n",
+ "Pr=2.47; #prandtl no.\n",
+ "k=0.661; #thermal conductivity ,W/(m.K)\n",
+ "\n",
+ "#Calculations\n",
+ "u=m/(a*math.pi*(D/2)**2); #average velocity,m/s\n",
+ "Re=u*D/(4.07*10**-7); #reynolds no.\n",
+ "f=math.pow((1.8*math.log((6.9/Re+(e/D/3.7)**1.11),10)),-2);#friction factor from haaland equation.\n",
+ "Re1=Re*e/D*math.sqrt(f/8); #roughness reynols no.\n",
+ "Nu=(f/8)*Re*Pr/(1+math.sqrt(f/8)*(4.5*Re1**(0.2)*math.sqrt(Pr)-8.48));#correlation for local nusselt no.\n",
+ "h=Nu*k/D/1000; #convection heat transfer coefficient, kW/(m**2*K)\n",
+ "\n",
+ "#Results\n",
+ "print \"Correlation friction factor is :\",round(f,6),\"\\n\"\n",
+ "print \"Convection heat transfer coefficient is :\",round(h,1),\"kw/(m^2*K)\\n\"\n",
+ "print \"In this case wall roughness causes a factor of 1.8 increase in h and a factor of 2 increase in f and the pumping power.we have omitted the variable properties hre as they were developed for smooth walled pipes\",\" t in this case wall roughness causes a factor of 1.8 increase in h and a factor of 2 increase in f and the pumping power.we have omitted the variable properties hre as they were developed for smooth walled pipes.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Correlation friction factor is : 0.024241 \n",
+ "\n",
+ "Convection heat transfer coefficient is : 16.4 kw/(m^2*K)\n",
+ "\n",
+ "In this case wall roughness causes a factor of 1.8 increase in h and a factor of 2 increase in f and the pumping power.we have omitted the variable properties hre as they were developed for smooth walled pipes t in this case wall roughness causes a factor of 1.8 increase in h and a factor of 2 increase in f and the pumping power.we have omitted the variable properties hre as they were developed for smooth walled pipes.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.5, Page number: 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1 = 293; # air temp.,K\n",
+ "D=0.01; # inner diameter of pipe,m\n",
+ "v=0.7 # air velocity,m/s\n",
+ "T2=333; #pipe wall temp.,K\n",
+ "t=0.25; # distance down the stream\n",
+ "\n",
+ "#Calculations\n",
+ "Re=v*D/(1.66*10**-5); # reynolds no.\n",
+ "# the flow is therefore laminar, to account for the thermal entry region, we compute the graetz no.\n",
+ "Gz=Re*(0.709)*D/t; # graetz no.\n",
+ "Nu=4.32 # nusselt no., Nu=3.657+(0.0668*Gz**(1/3)/(0.04+Gz**(-2/3)))\n",
+ "h=3.657*(0.0268)/D; # average convective heat transfer coefficient. W/(m**2*K)\n",
+ "a=1-math.exp((-h/(1.14*1007*v))*(4*t)/D); # (Tb-T1)/(T2-T1)=a (suppose)\n",
+ "Tb=a*(T2-T1)+T1; # temperature 0.25 m farther down stream.\n",
+ "Tb1=Tb-270.6;\n",
+ "\n",
+ "#Results\n",
+ "print \"Temperature 0.25 m farther down stream is :\",round(Tb1,3),\" C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature 0.25 m farther down stream is : 50.586 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.6, Page number: 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "Tbin=290; #inlet bulk temp.,K\n",
+ "v=1; #speed of air, m/s\n",
+ "a=0.09; #area of steel,m**2\n",
+ "l=15; #length of duct running outdoors through awarm air,m\n",
+ "To=310; #temp. of warm air,K\n",
+ "h=5; #heat transfer coefficient due to natural convection and thermal radiation.\n",
+ "Dh=0.3; #hydraulic diameter,m\n",
+ "\n",
+ "#Calculations\n",
+ "Re=v*Dh/(1.578*10**-5); #reynolds no.at Tbin\n",
+ "Pr=0.713; #prandtl no.\n",
+ "f=1/(1.82/2.303*math.log(Re)-1.64)**2; # formula for friction factor for smooth pipes\n",
+ "Nu=(f/8*Re*Pr)/(1.07+12.7*(f/8)**(0.5)*(Pr**(2/3)-1));#formula for nusselt no.in fully developed flow in smooth pipes\n",
+ "h=Nu*0.02623/Dh; # convective heat transfer coefficient,W/(m**2)/K\n",
+ "#the remaining problem is to find the bulk temperature change.the thin metal duct wall offers little thermal ressistance, but convection ressistance outside the duct must be considered.\n",
+ "U=(1/4.371+1/5)**-1; #U=1/Ain*(1/(h*A)in+1/(h*A)out)**-1\n",
+ "Tbout=(To-Tbin)*(1-math.exp(-U*4*l/(1.217*v*1007*Dh)))+Tbin;#outlet bulk temp., K\n",
+ "Tbt1=Tbout-273;\t\t\t\t\t\t\t\t #outlet bulk temp. in degree C\n",
+ "\n",
+ "#Results\n",
+ "print \"Outside bulk temp. change is :\",round(Tbt1,3),\"C\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Outside bulk temp. change is : 23.331 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.7, Page number: 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "D=0.0001; #diameter of heater,m\n",
+ "T1 = 293; #air temp.,K\n",
+ "T2=313; #heater temp.,K\n",
+ "p=17.8; #dissipating heat,W/m\n",
+ "\n",
+ "#Calculations\n",
+ "h=p/(3.14*D*(T2-T1)); # average convective heat transfer coefficient. W/(m**2*K)\n",
+ "Nu=h*D/0.0264; #nusselt no., Nu=h*D/thermal conductivity\n",
+ "Pr=0.71; #prandtl no.\n",
+ "Re=((Nu-0.3)*(1+(0.4/Pr)**(2/3))**0.25/(0.62*Pr**(1/3)))**2;#reynolds no.\n",
+ "u=1.596*10**(-5)/(D)*Re+0.2; #air velocity, m/s\n",
+ "\n",
+ "#Results\n",
+ "print \"Air velocity is :\",round(u,3),\"m/s\\n\"\n",
+ "print \"The data scatter in Red is quite small less than 10 percent, it would appear. therefore, this method can be used to measure local velocities with good accuracy.if the device is calliberated, its accuracy is improved further, such an air speed indicator is called a hot wire anemometer.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air velocity is : 73.895 m/s\n",
+ "\n",
+ "The data scatter in Red is quite small less than 10 percent, it would appear. therefore, this method can be used to measure local velocities with good accuracy.if the device is calliberated, its accuracy is improved further, such an air speed indicator is called a hot wire anemometer.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter8.ipynb b/A_Heat_Transfer_Text_Book/Chapter8.ipynb
new file mode 100755
index 00000000..4ada2e95
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter8.ipynb
@@ -0,0 +1,327 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Natural convection in singlephase fluids and during film condensation "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.1, Page number: 410"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=313; #fluid temp.,K\n",
+ "T2=287; #air temp.,K\n",
+ "H=0.4; #height of sides,m\n",
+ "Pr=0.711; #prandtl no.\n",
+ "b=1/T2; # b=1/v*d(R*T/p)/dt=1/To characterisation constant of thermal expansion of solid, K**-1\n",
+ "g=9.8; #gravity constant\n",
+ "nu=1.566*10**-5; #dynamic viscocity, m^3/s\n",
+ "\n",
+ "#Calculations\n",
+ "RaL=g*b*(T1-T2)*H**3/(nu*2.203*10**-5); #Rayleigh no.\n",
+ "Nu=0.678*RaL**(0.25)*(Pr/(0.952+Pr))**(1/4);\t\t # nusselt no.\n",
+ "h=Nu*0.02614/H # average heat transfer coefficient, W/m**2/K\n",
+ "q=h*(T1-T2) # average heat transfer,W/m**2\n",
+ "c=3.936*((0.952+Pr)/Pr**2)**(1/4)*(1/(RaL/Pr)**0.25);#boundary layer thickness.,m\n",
+ "\n",
+ "#Results\n",
+ "print \"Average heat transfer coefficient is : \",round(h,3),\"W/m^2/K\\n\"\n",
+ "print \"Average heat transfer is :\",round(q,3),\"W/m^2\\n\"\n",
+ "print \"Boundary layer thickness is :\",round(c,4),\"m\\n\"\n",
+ "print \"Thus the BL thickness at the end of the plate is only 4 percent of the height, or 1.72 cm thick.this is thicker thsan typical forced convection BL but it is still reasonably thin.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average heat transfer coefficient is : 4.059 W/m^2/K\n",
+ "\n",
+ "Average heat transfer is : 105.528 W/m^2\n",
+ "\n",
+ "Boundary layer thickness is : 0.043 m\n",
+ "\n",
+ "Thus the BL thickness at the end of the plate is only 4 percent of the height, or 1.72 cm thick.this is thicker thsan typical forced convection BL but it is still reasonably thin.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3, Page number: 413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=323; #wall temp.,K\n",
+ "T2=293; #air temp.,K\n",
+ "H=0.3; #height of wall, m\n",
+ "v2=2.318*10**-5; #molecular diffusivity, m**2/s\n",
+ "Pr=0.71; #prandtl no.\n",
+ "\n",
+ "#Calculations\n",
+ "v1=16.45*10**-6; # molecular diffusivity, m**2/s\n",
+ "b=1/T2; # b=1/v*d(R*T/p)/dt=1/To characterisation constant of thermal expansion of solid, K**-1\n",
+ "Ral=9.8*b*(T1-T2)*H**3/((1.566*10**-5)*(2.203*10**-5));# Rayleigh no.\n",
+ "Nu=0.678*Ral**(0.25)*(Pr/(0.952+Pr))**(1/4);\t\t # nusselt no.\n",
+ "h=Nu*0.0267/H # average heat transfer coefficient, W/m**2/K\n",
+ "Nu1=0.68+0.67*((Ral)**(1/4)/(1+(0.492/Pr)**(9/16))**(4/9));#churchill correlation \n",
+ "h1=Nu1*(0.0267/0.3)-.11; #average heat transfer coefficient, W/m**2/K\n",
+ " \n",
+ "#Results \n",
+ "print \"Correlation average heat transfer coefficient is :\",round(h1,3),\"W/m^2/K\\n\"\n",
+ "print \"The prediction is therefore within 5 percent of corelation .we should use the latter result in preference to the theoritical one, although the difference is slight.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Correlation average heat transfer coefficient is : 4.259 W/m^2/K\n",
+ "\n",
+ "The prediction is therefore within 5 percent of corelation .we should use the latter result in preference to the theoritical one, although the difference is slight.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.4, Page number: 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "from numpy import mat\n",
+ "from numpy import array\n",
+ "\n",
+ "#Variables\n",
+ "T1=400; #hot oil temp.,K\n",
+ "D=0.005; #diameter of line carrying oil, m\n",
+ "T2=300; #temp. of air around the tube,K\n",
+ "Tav=350; #average BI temp.,K\n",
+ "\n",
+ "\n",
+ "#Calculations & Results\n",
+ "#we evaluate properties at this temp. and write g as ge*(g-level), where ge is g at the earth surface and the g-level is the fraction of ge in the space vehicle.\n",
+ "b=1/T2; # b=1/v*d(R*T/p)/dt=1/To characterisation constant of thermal expansion of solid, K**-1\n",
+ "v1=2.062*10**-5; # molecular diffusivity, m**2/s\n",
+ "v2=2.92*10**-5; #molecular diffusivity, m**2/s\n",
+ "Pr=0.706; #prandtl no.\n",
+ "g=array(([10**-6, 10**-5, 10**-4, 10**-2]));\n",
+ "i=0;\n",
+ "while i<4:\n",
+ " Ral=0;\n",
+ " Nu=0;\n",
+ " h=0;\n",
+ " Q=0;\n",
+ " Ral=(9.8*b*((T1-T2))*(D**(3))/(v1*v2))*g.item(i);\t\t# Rayleigh no.\n",
+ " \n",
+ " Nu=(0.6+0.387*(Ral/(1+(0.559/Pr)**(9/16))**(16/9))**(1/6))**2;\n",
+ " #Nu(i)=(0.6+0.387*((Ral)/(1+(0.559/Pr)**(9/16))**(16/9))**1/6)**2; churchill correlation. \n",
+ " print \"Nusselt no. are : \",round(Nu,2),\"\\n\"\n",
+ " h=Nu*0.0297/D; # convective heat transfer coefficient,W/(m**2*K)\n",
+ " print \"Convective heat transfer coefficient are : \",round(h,2),\"W/(m^2*K)\\n\"\n",
+ " Q=math.pi*D*h*(T1-T2); #heat transfer,W/m\n",
+ " print \"Heat transfer is :\",round(Q,2),\"W/m of tube\\n\"\n",
+ " i=i+1;\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Nusselt no. are : 0.48 \n",
+ "\n",
+ "Convective heat transfer coefficient are : 2.87 W/(m^2*K)\n",
+ "\n",
+ "Heat transfer is : 4.51 W/m of tube\n",
+ "\n",
+ "Nusselt no. are : 0.55 \n",
+ "\n",
+ "Convective heat transfer coefficient are : 3.25 W/(m^2*K)\n",
+ "\n",
+ "Heat transfer is : 5.11 W/m of tube\n",
+ "\n",
+ "Nusselt no. are : 0.65 \n",
+ "\n",
+ "Convective heat transfer coefficient are : 3.85 W/(m^2*K)\n",
+ "\n",
+ "Heat transfer is : 6.05 W/m of tube\n",
+ "\n",
+ "Nusselt no. are : 1.09 \n",
+ "\n",
+ "Convective heat transfer coefficient are : 6.45 W/(m^2*K)\n",
+ "\n",
+ "Heat transfer is : 10.13 W/m of tube\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.5, Page number: 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T2=300; #air temp.,K\n",
+ "P=15; #delivered power,W\n",
+ "D=0.17; #diameter of heater,m\n",
+ "v1=1.566*10**-5; #molecular diffusivity, m**2/s\n",
+ "b=1/T2; #b=1/v*d(R*T/p)/dt=1/To characterisation constant of thermal expansion of solid, K**-1\n",
+ "Pr=0.71; #prandtl no.\n",
+ "v2=2.203*10**-5; #molecular diffusivity, m**2/s\n",
+ "v3=3.231*10**-5; #molecular diffusivity at a b except at 365 K., m**2/s\n",
+ "v4=2.277*10**-5; #molecular diffusivity at a b except at 365 K., m**2/s\n",
+ "k1=0.02614; #thermal conductivity\n",
+ "k2=0.0314; #thermal conductivity\n",
+ "\n",
+ "#Calculations\n",
+ "#we have no formula for this situation, so the problem calls for some guesswork.following the lead of churchill and chau, we replace RaD with RaD1/NuD in eq. \n",
+ "#(NuD)**(6/5)=0.82*(RaD1)**(1/5)*Pr**0.034\n",
+ "delT=1.18*P/(3.14*D**(2)/4)*(D/k1)/((9.8*b*661*D**(4)/(0.02164*v1*v2))**(1/6)*Pr**(0.028));\n",
+ "#in the preceding computation, all the properties were evaluated at T2.mow we must return the calculation,reevaluating all properties except b at 365 K.\n",
+ "delTc=1.18*661*(D/k2)/((9.8*b*661*D**(4)/(k2*v3*v4))**(1/6)*(0.99));\n",
+ "TS=T2+delTc;\n",
+ "TS1=TS-271.54\n",
+ "\n",
+ "#Results\n",
+ "print \"Average surface temp. is :\",round(TS1,4),\"K\\n\"\n",
+ "print \"That is rather hot.obviously, the cooling process is quite ineffective in this case.\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average surface temp. is : 169.0288 K\n",
+ "\n",
+ "That is rather hot.obviously, the cooling process is quite ineffective in this case.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.6, Page number: 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T2=363; # temp. of strip,K\n",
+ "T1=373; #saturated temp.,K\n",
+ "H=0.3; #height of strip,m\n",
+ "Pr=1.86; #prandtl no.\n",
+ "Hfg=2257; #latent heat. kj/kg\n",
+ "ja=4.211*10/Hfg; #jakob no.\n",
+ "a1=961.9; #density of water,kg/m**3\n",
+ "a2=0.6; #density of air,kg/m**3\n",
+ "k=0.677; #thermal conductivity,W/(m*K)\n",
+ "\n",
+ "#Calculations\n",
+ "Hfg1=Hfg*(1+(0.683-0.228/Pr)*ja); \t\t #corrected latent heat,kj/kg\n",
+ "delta=(4*k*(T1-T2)*(2.99*10**(-4))*0.3/(a1*(a1-a2)*9.806*Hfg1*1000))**(0.25)*1000;\n",
+ "Nul=4/3*H/delta; #average nusselt no.\n",
+ "q=Nul*k*(T1-T2)/H; # heat flow on an area about half the size of a desktop,W/m**2\n",
+ "Q=q*H; #overall heat transfer per meter,kW/m\n",
+ "m=Q/(Hfg1); #mass rate of condensation per meter,kg/(m*s)\n",
+ "\n",
+ "#Results\n",
+ "print \"Overall heat transfer per meter is :\",round(Q,4),\"kW/m^2\\n\"\n",
+ "print \"Film thickness at the bottom is :\",round(delta,4),\"mm\\n\"\n",
+ "print \"Mass rate of condensation per meter. is : \",round(m,4),\"kg/(m*s)\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall heat transfer per meter is : 26.0118 kW/m^2\n",
+ "\n",
+ "Film thickness at the bottom is : 0.1041 mm\n",
+ "\n",
+ "Mass rate of condensation per meter. is : 0.0114 kg/(m*s)\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/Chapter9.ipynb b/A_Heat_Transfer_Text_Book/Chapter9.ipynb
new file mode 100755
index 00000000..90905611
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/Chapter9.ipynb
@@ -0,0 +1,448 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Heat transfer in boiling and \n",
+ "other phase-change \n",
+ "configurations "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.1, Page number: 467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T2=363; # temp. of strip,K\n",
+ "T1=373; #saturated temp.,K\n",
+ "p=1.013*10**5; #pressure of water,N/m**2\n",
+ "psat=1.203*10**5; #saturated pressure at 108 C,N/m**2\n",
+ "psat1=1.769*10**5; #saturated pressure at 116 C,N/m**2\n",
+ "a=57.36*10**-3; #surface tension, N/mat Tsat=108 C\n",
+ "a1=55.78*10**-3; #surface tension, N/mat Tsat=116 C\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=2*a/(psat-p)*1000; #bulk radius at 108 C, mm\n",
+ "Rb1=2*a1/(psat1-p)*1000; # bulk radius at 116 C, mm\n",
+ "\n",
+ "#Results\n",
+ "print \"Bulk radius at 108 C is :\",Rb,\" mm\\n\"\n",
+ "print \"Bulk radius at 116 C is :\",Rb1,\"mm\\n\"\n",
+ "print \"This means that the active nucleation sites would be holes with diameters very roughly on the order magnitude of 0.005 mm atleast on the heater .that is within the ransge of roughness of commercially finished surfaces.\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bulk radius at 108 C is : 0.00603789473684 mm\n",
+ "\n",
+ "Bulk radius at 116 C is : 0.00147566137566 mm\n",
+ "\n",
+ "This means that the active nucleation sites would be holes with diameters very roughly on the order magnitude of 0.005 mm atleast on the heater .that is within the ransge of roughness of commercially finished surfaces.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.2, Page number: 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "q=800; #power delivered per unit area,KW/m**2\n",
+ "T1=373; #saturated temp.of water, K\n",
+ "delT=22; # temp. difference,K\n",
+ "Cp=4.22; #heat capacity of water,kj/(kg*K)\n",
+ "Pr=1.75; #prandtl no.\n",
+ "a=958; #desity difference,kg/m**3\n",
+ "s=0.0589; #surface tension,kg/s**2\n",
+ "Hfg=2257; #latent heat,kj/kg\n",
+ "drho=958; #\n",
+ "mu=0.0000282; #\n",
+ "g=980;\n",
+ "\n",
+ "#Calculations\n",
+ "#by using rohensow correlation applied data for water boiling on 0.61 mm diameter platinum wire\n",
+ "RHS=mu*Cp**3/(Hfg**2*Pr**3)*math.sqrt(g*(drho)/s) #RHS of equation 9.4\n",
+ "Csf=(RHS*(delT)**3/(q))**(1/3); #surface correction factor of the heater surface\n",
+ "\n",
+ "#Results\n",
+ "print \"Surface correction factor of the heater surface is :\",round(Csf,5),\", this value compares favorably with Csf for a platinum or copper surface under water.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Surface correction factor of the heater surface is : 0.01604 , this value compares favorably with Csf for a platinum or copper surface under water.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.3, Page number: 477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "p=1.013*10**5; #pressure of water,N/m**2\n",
+ "D=0.1; #inside diameter,m\n",
+ "l=0.04; #wavelength,m\n",
+ "a=0.0589; #surface tension,N/m\n",
+ "b=0.577; #density of gas, kg/m**3\n",
+ "\n",
+ "#Calculations\n",
+ "u=math.sqrt(2*math.pi*a/(b*l)); #the flow will be helmholtz stable until the steam velocity reaches this value.\n",
+ "\n",
+ "#Results\n",
+ "print \"Steam velocity required to destablize the liquid flow is :\",round(u,4),\"m/s ,beyond that, the liquid will form whitecaps and be blown back upward.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam velocity required to destablize the liquid flow is : 4.0043 m/s ,beyond that, the liquid will form whitecaps and be blown back upward.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.4, Page number: 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "a=13600; #desity difference,kg/m**3\n",
+ "s=0.487; #surface tension,kg/s**2\n",
+ "\n",
+ "#Calculations\n",
+ "L=2*math.pi*(3**0.5)*math.sqrt(s/(9.8*a))*100; #spacing wavelength,cm\n",
+ "\n",
+ "#Results\n",
+ "print \"Maximum spacing is :\",round(L,4),\"cm\\n\"\n",
+ "print \"Actually this spacing would give the maximum rate of collapse.it can be shown that collapse would begin at 1/3^0.5 times this value or at 1.2 cm.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum spacing is : 2.0803 cm\n",
+ "\n",
+ "Actually this spacing would give the maximum rate of collapse.it can be shown that collapse would begin at 1/3^0.5 times this value or at 1.2 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.5, Page number: 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "T1=373; #saturated temp.of water, K\n",
+ "a=957.6; #desity difference,kg/m**3\n",
+ "s=0.0589; #surface tension,kg/s**2\n",
+ "Hfg=2257*1000; #latent heat,J/kg\n",
+ "a2=0.597; #density of gas, kg/m**3\n",
+ "g=9.8; #Gravitational constant, m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "Qmax=0.149*math.sqrt(a2)*Hfg*(g*a*s)**0.25/1000000;\n",
+ "\n",
+ "#Results\n",
+ "print \"Peak heat flux is : \",round(Qmax,3),\",from figure it can be shown that qmax =1.16 MW/m^2, which is less by only about 8 percent.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak heat flux is : 1.26 ,from figure it can be shown that qmax =1.16 MW/m^2, which is less by only about 8 percent.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.6, Page number: 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variables\n",
+ "T1=628; #saturated temp.of water, K\n",
+ "a=13996; #desity difference,kg/m**3\n",
+ "s=0.418; #surface tension,kg/s**2\n",
+ "Hfg=292500; #latent heat,J/kg\n",
+ "a2=4; #density of mercury, kg/m**3\n",
+ "g=9.8; #Gravitational constant, m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "Qmax=0.149*math.sqrt(a2)*Hfg*math.pow((g*a*s),0.25)/(10**6);#Peak heat flux in MW/m^2\n",
+ "\n",
+ "#Results\n",
+ "print \"Peak heat flux is :\",round(Qmax,3),\"MW/m^2\\n\"\n",
+ "print \"The result is very close to that for water,the increase in density and surface tension have not been compensated by amuch lower latent heat.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak heat flux is : 1.349 MW/m^2\n",
+ "\n",
+ "The result is very close to that for water,the increase in density and surface tension have not been compensated by amuch lower latent heat.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.7, Page number: 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=373; #saturated temp.of water, K\n",
+ "a=958 ; #desity difference,kg/m**3\n",
+ "s=0.0589; #surface tension,kg/s**2\n",
+ "Hfg=2257000; #latent heat,J/kg\n",
+ "a2=0.597; #density of gas, kg/m**3\n",
+ "A=400*10**-4; #area of mettalic body,m**2\n",
+ "V=0.0006; #volume of body, m**3\n",
+ "g=9.8; #Gravitational constant, m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "Qmax=(0.131*math.sqrt(a2)*Hfg*math.pow((g*a*s),0.25))*0.9*A/1000 ;#large rate of energy removal, KW as the cooling process progresses,it goes through the boiling curve from film boiling,through qmin, up the transitional boiling regime,through qmax and down the3 nucleate boiling curve. \n",
+ "#R=V/A*(9.8*a/s)**0.5 since this value comes out to be 6.0, which is larger than the specified lower bound of about 4.\n",
+ "#to complete the calculation, it is necessary to check whether or not rate is large enough to justify the use.\n",
+ "R=V/A*math.sqrt(g*958/0.0589); #the most rapid rate of heat removal during the quench\n",
+ "\n",
+ "#Results\n",
+ "print \"The heat flow is :\",round(Qmax,1),\"KW\\n\"\n",
+ "print \"The most rapid rate of heat removal during the quench is :\",round(R),\", this is larger than the specified lower bound of about 4.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat flow is : 39.9 KW\n",
+ "\n",
+ "The most rapid rate of heat removal during the quench is : 6.0 , this is larger than the specified lower bound of about 4.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.8, Page number: 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=373; #saturated temp.of water, K\n",
+ "a=958; #desity difference,kg/m**3\n",
+ "s=0.0589; #surface tension,kg/s**2\n",
+ "Hfg=2257*1000; #latent heat,J/kg\n",
+ "a2=0.597; #density of gas, kg/m**3\n",
+ "g=9.8; #Gravitational constant, m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "Qmin=0.09*a2*Hfg*(g*a*s/(959**2))**0.25; #Using equation 9.34\n",
+ "\n",
+ "#Results\n",
+ "print \"peak heat flux is :\",round(Qmin),\"W/m^2 ,from the figure, we read 20000 W/m^2, which is the same, within the accuracy of graph.\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak heat flux is : 18990.0 W/m^2 ,from the figure, we read 20000 W/m^2, which is the same, within the accuracy of graph.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.9, Page number: 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variables\n",
+ "T1=480; #bulk temp.of water, K\n",
+ "m=0.6; #mass flow rate of saturated water,kg/s\n",
+ "D=0.05; #diameter of vertical tube,m\n",
+ "p=184000; #heating rate f tube, W/m**2\n",
+ "A=0.001964; #area of the pipe,m**2\n",
+ "Pr=0.892; #prandtl no.\n",
+ "x=0.2; #quality\n",
+ "a1=9.014; #density of gas,kg/m**3\n",
+ "a2=856.5 #density of water, kg/m**3\n",
+ "Hfg=1913*1000; #latent heat,J/kg\n",
+ "muf=1.297*10**-4 #\n",
+ "\n",
+ "#Calculations\n",
+ "G=m/A; #superficial mass flux\n",
+ "Relo=G*D/(1.297*10**-4); #reynolds no. for liquid only.\n",
+ "f=1/(1.82/2.303*math.log(Relo)-1.64)**2; # formula for friction factor for smooth pipes\n",
+ "Nu=(f/8*Relo*Pr)/(1.07+12.7*math.sqrt(f/8)*(Pr**(2/3)-1));#formula for nusselt no.in fully developed flow in smooth pipes\n",
+ "hlo=0.659*Nu/D; #heat transfer coefficient,w/(m**2*K)\n",
+ "Co=((1-x)/x)**0.8*math.sqrt(a1/a2); # Convection no.\n",
+ "Bo=p/(G*Hfg); # boiling no.\n",
+ "Hfg1=(1-x)**0.8*(0.6683*Co**(-0.2)+1058*Bo**0.7)*hlo;#heat transfer coefficient for nucleate boiling dominant, w/(m**2*K)\n",
+ "Hfg2=(1-x)**0.8*(1.136*Co**(-0.9)+667.2*Bo**0.7)*hlo;#heat transfer coefficient for connective boiling dominant, w/(m**2*K)\n",
+ "#since the second value is larger,we will use it.\n",
+ "Tw=T1+p/Hfg2; #wall temperature ,K\n",
+ "Tw1=Tw-273; #wall temperature ,C\n",
+ "\n",
+ "#Results\n",
+ "print \"Wall temperature is :\",round(Tw1,3),\"C\\n\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wall temperature is : 220.389 C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/README.txt b/A_Heat_Transfer_Text_Book/README.txt
new file mode 100755
index 00000000..776c9811
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Kshitiz Swaroop
+Course: btech
+College/Institute/Organization: IIT Bombay
+Department/Designation: Aerospace Engineering
+Book Title: A Heat Transfer Text Book
+Author: Lienhard John H.
+Publisher: Phlogiston Press,Cambridge,Massachusets, U.S.A
+Year of publication: 2008
+Isbn: 978097138352
+Edition: 3 \ No newline at end of file
diff --git a/A_Heat_Transfer_Text_Book/screenshots/Chapter_11.png b/A_Heat_Transfer_Text_Book/screenshots/Chapter_11.png
new file mode 100755
index 00000000..4998b711
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/screenshots/Chapter_11.png
Binary files differ
diff --git a/A_Heat_Transfer_Text_Book/screenshots/Chapter_3.png b/A_Heat_Transfer_Text_Book/screenshots/Chapter_3.png
new file mode 100755
index 00000000..78465362
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/screenshots/Chapter_3.png
Binary files differ
diff --git a/A_Heat_Transfer_Text_Book/screenshots/Chapter_6.png b/A_Heat_Transfer_Text_Book/screenshots/Chapter_6.png
new file mode 100755
index 00000000..2d203816
--- /dev/null
+++ b/A_Heat_Transfer_Text_Book/screenshots/Chapter_6.png
Binary files differ
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt
index 38541c7e..38541c7e 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb
index a8b9ed76..a8b9ed76 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb
index 79f16566..79f16566 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb
index 6803c96b..6803c96b 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb
index e9d794c5..e9d794c5 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb
index c3e360ec..c3e360ec 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb
index 2640be69..2640be69 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb
index 9c3402d5..9c3402d5 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb
index 18de8e63..18de8e63 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb
index b00a214c..b00a214c 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png
index 5dd7c85d..5dd7c85d 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png
Binary files differ
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png
index 9bdfe953..9bdfe953 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png
Binary files differ
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png
index d85833ae..d85833ae 100644..100755
--- a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png
Binary files differ
diff --git a/Applied_Physics_II/Chapter_1.ipynb b/Applied_Physics_II/Chapter_1.ipynb
new file mode 100755
index 00000000..c6e00369
--- /dev/null
+++ b/Applied_Physics_II/Chapter_1.ipynb
@@ -0,0 +1,1108 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Interference of Light"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.1, Page number 1-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "i = 45 #angle of incidence(degrees)\n",
+ "t = 4*10**-5 #thickness of film(cm)\n",
+ "u = 1.2\n",
+ "\n",
+ "#Calculations & Result\n",
+ "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n",
+ "for n in range(1,4):\n",
+ " lamda = (2*u*t*math.cos(r*math.pi/180))/n\n",
+ " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-8)\n",
+ "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For n = 1, wavelength = 7756.29 A\n",
+ "For n = 2, wavelength = 3878.14 A\n",
+ "For n = 3, wavelength = 2585.43 A\n",
+ "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.2, Page number 1-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 90 #angle of refraction(degrees)\n",
+ "t = 5*10**-5 #thickness of film(cm)\n",
+ "u = 1.33\n",
+ "\n",
+ "#Calculations & Result\n",
+ "for n in range(1,4):\n",
+ " lamda = (4*u*t*int(math.cos(math.radians(90))))/((2*n)-1)\n",
+ " print \"For n = %d, wavelength = %.2f A\"%(n,lamda)\n",
+ "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\"\n",
+ "\n",
+ "print \"\\nPlease note: Since r=90, cos(r)=0\\nHence, the answers given in the textbook are incorrect\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For n = 1, wavelength = 0.00 A\n",
+ "For n = 2, wavelength = 0.00 A\n",
+ "For n = 3, wavelength = 0.00 A\n",
+ "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\n",
+ "\n",
+ "Please note: Since r=90, cos(r)=0\n",
+ "Hence, the answers given in the textbook are incorrect\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.3, Page number 1-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "i = 45 #angle of incidence(degrees)\n",
+ "t = 1.5*10**-4 #thickness of film(cm)\n",
+ "lamda = 5*10**-5 #wavelength(cm)\n",
+ "u = 4./3. #refractive index\n",
+ "\n",
+ "#Calculations\n",
+ "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n",
+ "n = (2*u*t*math.cos(r*math.pi/180))/lamda\n",
+ "\n",
+ "#Result\n",
+ "print \"The order of interfernce is %.2f, close to 7\"%n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The order of interfernce is 6.78, close to 7\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2.4, Pae number 1-13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "i = 45 #angle of incidence(degrees)\n",
+ "lamda = 5896*10**-8 #wavelength(cm)\n",
+ "u = 1.33 #refractive index\n",
+ "n = 1\n",
+ "\n",
+ "#Calculations\n",
+ "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n",
+ "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The required thickness is\",round((t/1E-5),2),\"*10^-5 cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required thickness is 1.31 *10^-5 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.5, Page number 1-14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "lamda1 = 7000 #wavelength(A)\n",
+ "lamda2 = 5000 #wavelength(A)\n",
+ "u = 1.3 #R.I. of oil\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "2utcosr = (2n-1)7000/2 ----(1)\n",
+ "2utcosr = (2n+1)5000/2 ----(2)\n",
+ "Divinding (1) by (2), we get the following expression\n",
+ "1 = (2n+1)5000\n",
+ " -----------\n",
+ " (2n-1)7000\n",
+ "Solving the above expression, we get,\n",
+ "'''\n",
+ "n = 12000/4000\n",
+ "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The required thickness is\",round((t/1E-5),4),\"*10^-5 cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required thickness is 6.6936 *10^-5 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.6, Page number 1-15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "i = 30 #angle of incidence(degrees)\n",
+ "lamda = 5890*10**-8 #wavelength(cm)\n",
+ "u = 1.46 #refractive index\n",
+ "n = 8\n",
+ "\n",
+ "#Calculations\n",
+ "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n",
+ "t = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n",
+ "\n",
+ "#Result\n",
+ "print \"The required thickness is\",round((t/1E-4),3),\"*10^-4 cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required thickness is 1.718 *10^-4 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.7, Page number 1-15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 60 #angle of refraction(degrees)\n",
+ "lamda = 5890*10**-8 #wavelength(cm)\n",
+ "u = 1.5 #refractive index\n",
+ "n = 1 #for minimumm thickness\n",
+ "\n",
+ "#Calculations\n",
+ "#For r = 60\n",
+ "t1 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n",
+ "\n",
+ "#For normal incidence \n",
+ "r = 0\n",
+ "t2 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n",
+ "\n",
+ "#Result\n",
+ "print \"For r = 60, the required thickness is\",round((t1/1E-5),2),\"*10^-5 cm\"\n",
+ "print \"For r = 0, the required thickness is\",round((t2/1E-5),2),\"*10^-5 cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For r = 60, the required thickness is 3.93 *10^-5 cm\n",
+ "For r = 0, the required thickness is 1.96 *10^-5 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.8, Page number 1-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 0 #for normal incidence(degrees)\n",
+ "lamda = 5.5*10**-5 #wavelength(cm)\n",
+ "n = 1 #for minimumm thickness\n",
+ "A = 10**4 #area(cm^2)\n",
+ "V = 0.2 #volume(cc)\n",
+ "\n",
+ "#Calculations\n",
+ "t = V/A\n",
+ "#for nth dark band,\n",
+ "u = (n*lamda)/(2*t*math.cos(r*math.pi/180))\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index =\",u"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index = 1.375\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2.9, Page number 1-17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 60 #angle of incidence(degrees)\n",
+ "t = 2*10**-7 #thickness of film(cm)\n",
+ "u = 1.2\n",
+ "\n",
+ "#Calculations & Result\n",
+ "for n in range(1,4):\n",
+ " lamda = (4*u*t*math.cos(r*math.pi/180))/(2*n-1)\n",
+ " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-10)\n",
+ "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For n = 1, wavelength = 4800.00 A\n",
+ "For n = 2, wavelength = 1600.00 A\n",
+ "For n = 3, wavelength = 960.00 A\n",
+ "Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3.1, Page number 1-21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "a = 40. #angle(sec)\n",
+ "lamda = 1.2 #distance between fringes(cm)\n",
+ "alpha = 10 #no. of fringes\n",
+ "\n",
+ "#Calculations\n",
+ "Bair = lamda/alpha #cm\n",
+ "alpha = (a*math.pi)/(3600*180) #radians\n",
+ "lamda = 2*alpha*Bair\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength of monochromatic light =\",round((lamda/1E-8),1),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of monochromatic light = 4654.2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3.2, Page number 1-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "lamda = 5893*10**-8 #wavelength(cm)\n",
+ "u = 1.52 #refractive index\n",
+ "B = 0.1 #fringe spacing(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "alpha = (lamda/(2*u*B))*180*3600/math.pi #seconds\n",
+ "\n",
+ "#Result\n",
+ "print \"Angle of wedge =\",round(alpha,2),\"secs\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of wedge = 39.98 secs\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3.3, Page number 1-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "u = 1.4 #refractive index\n",
+ "B = 0.25 #fringe spacing(cm)\n",
+ "a = 20 #angle(secs)\n",
+ "\n",
+ "#Calculations\n",
+ "alpha = (a*math.pi)/(3600*180) #radians\n",
+ "lamda = 2*u*alpha*B\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength of light =\",round((lamda/1E-8),2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 6787.39 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3.4, Page number 1-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "u = 1.5 #refractive index\n",
+ "lamda = 5.82*10**-5 #wavelength(cm)\n",
+ "a = 20 #angle(secs)\n",
+ "\n",
+ "#Calculations\n",
+ "alpha = (a*math.pi)/(3600*180) #radians\n",
+ "B = lamda/(2*u*alpha)\n",
+ "N = 1/B\n",
+ "\n",
+ "#Result\n",
+ "print \"Number of interfernce fronges pr cm is\",round(N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of interfernce fronges pr cm is 5.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3.5, Page number 1-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "u = 1 #refractive index for air film\n",
+ "lamda = 6*10**-5 #wavelength(cm)\n",
+ "B = 1./10 #distance between fringes(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "alpha = lamda/(2*u*B) #radians\n",
+ "d = alpha*10\n",
+ "\n",
+ "#Result\n",
+ "print \"Daimeter of wire =\",d,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Daimeter of wire = 0.003 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3.6, Page number 1-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "alpha = 0.01*10**-1/10 #angle(radians)\n",
+ "u = 1 #refractive index for air film\n",
+ "lamda = 5900*10**-10 #wavlength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "B = lamda/(2*u*alpha)\n",
+ "\n",
+ "#Result\n",
+ "print \"Seperation between fringes is\",B/10**-3,\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Seperation between fringes is 2.95 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.1, Page number 1-32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "n = 40\n",
+ "\n",
+ "#Calculation\n",
+ "#Equating the equation 4*R*n*lamda=4*4R*n*lamda, we get\n",
+ "\n",
+ "N = (4*4*n)/4\n",
+ "\n",
+ "#result\n",
+ "print \"Ring number =\",N"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ring number = 160\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.2, Page number 1-32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "n = 10\n",
+ "Dn = 0.5 #diameter of dark ring(cm)\n",
+ "lamda = 5*10**-5 #waelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "R = Dn**2/(4*n*lamda)\n",
+ "\n",
+ "#Result\n",
+ "print \"Radius of curvature =\",R,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of curvature = 125.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.3, Page number 1-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "n = 5\n",
+ "p = 10\n",
+ "D5 = 0.336 #diameter of 5th ring(cm)\n",
+ "lamda = 5890*10**-8 #waelength(cm)\n",
+ "D15 = 0.59 #diameter of 15th ringcm\n",
+ "\n",
+ "#Calculations\n",
+ "R = (D15**2-D5**2)/(4*p*lamda)\n",
+ "\n",
+ "#Result\n",
+ "print \"Radius of curvature =\",round(R,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of curvature = 99.83 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.4, Page number 1-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "Dn = 0.42 #diameter of dark ring(cm)\n",
+ "p = 8 \n",
+ "R = 200 #radius of curvature(cm)\n",
+ "Dn8 = 0.7 #diameter of (n+8)th ring(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = (Dn8**2-Dn**2)/(4*R*p)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",lamda/1E-8,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 4900.0 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.5, Page number 1-34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "Dn = 0.218 #cm\n",
+ "Dn10 = 0.451 #cm\n",
+ "lamda = 5893*10**-8 #wavelength(cm)\n",
+ "R = 90 #radius of curvature(cm)\n",
+ "p = 10\n",
+ "\n",
+ "#Calculation\n",
+ "u = (4*p*lamda*R)/(Dn10**2-Dn**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index =\",round(u,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index = 1.361\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.6, Page number 1-34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Varaible declaration\n",
+ "D5 = 0.42 #diameter of dark ring(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "For 5th dark ring,\n",
+ "D5^2 = 20*R*lamda -----1\n",
+ "\n",
+ "For 10th dark ring,\n",
+ "D10^2 = 40*R*lamda -----2\n",
+ "\n",
+ "Substituting 1 in 2,\n",
+ "'''\n",
+ "\n",
+ "D10 = math.sqrt((40*D5**2)/20)\n",
+ "\n",
+ "#Result\n",
+ "print \"Diameter of the 10th dark ring =\",round(D10,3),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of the 10th dark ring = 0.594 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.7, Page number 1-35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "lamda_n = 6000 #wavelength of nth ring(A)\n",
+ "lamda_n1 = 5000 #wavelength for (n+1)th ring(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "Dn^2 = 4*R*n*lamda_n ---1\n",
+ "\n",
+ "Dn+1^2 = 4*R(n+1)*lamda_n1 ---2\n",
+ "\n",
+ "Equating 1 and 2, we get,\n",
+ "'''\n",
+ "\n",
+ "n = 5\n",
+ "R = 2\n",
+ "Dn = math.sqrt(4*R*n*lamda_n*10**-8)\n",
+ "\n",
+ "#Result\n",
+ "print \"Diameter =\",round(Dn,3),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter = 0.049 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.8, Page number 1-35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "Dair = 2.3 #diameter of ring in air(cm)\n",
+ "Dliq = 2 #diameter of ring in liquid(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "u = Dair**2/Dliq**2\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index =\",u"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index = 1.3225\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.11, Page number 1-37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "D4 = 0.4 #diameter of 4th ring(cm)\n",
+ "D12 = 0.7 #diameter of 12th ring(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "For D4, \n",
+ "D4 = math.sqrt(4R*4*lamda)\n",
+ "'''\n",
+ "rt_Rl = 0.1\n",
+ "R = 80 \n",
+ "\n",
+ "#For D20,\n",
+ "D20 = math.sqrt(R)*rt_Rl\n",
+ "\n",
+ "#Result\n",
+ "print \"Diameter of 20th ring =\",round(D20,3),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of 20th ring = 0.894 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4.12, Page number 1-36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "n = 5\n",
+ "p = 10\n",
+ "D5 = 0.336 #diameter of 5th ring(cm)\n",
+ "D15 = 0.590 #diameter of 15th ring(cm)\n",
+ "R = 100 #radius of curvature(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = (D15**2-D5**2)/(4*R*p)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavlength =\",lamda/1E-8,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavlength = 5880.1 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7.1, Page number 1-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 560 #wavelength(nm)\n",
+ "u = 2 #refractive index\n",
+ "\n",
+ "#Calculations\n",
+ "lamda_dash = lamda/u\n",
+ "t = lamda_dash/4\n",
+ "\n",
+ "#Result\n",
+ "print \"Thickness of film =\",t,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of film = 70 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7.2, Page number 1-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6000 #wavelength(E)\n",
+ "u = 1.2 #refractive index\n",
+ "\n",
+ "#Calculations\n",
+ "lamda_dash = lamda/u\n",
+ "t = lamda_dash/4\n",
+ "\n",
+ "#Result\n",
+ "print \"Thickness of film =\",t,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of film = 1250.0 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/Chapter_2.ipynb b/Applied_Physics_II/Chapter_2.ipynb
new file mode 100755
index 00000000..ae487344
--- /dev/null
+++ b/Applied_Physics_II/Chapter_2.ipynb
@@ -0,0 +1,1000 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Diffraction of Light"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2.1, Page number 2-10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta = 30 #angle(degrees)\n",
+ "n = 1 \n",
+ "lamda = 6500*10**-8 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "a = (n*lamda)/math.sin(theta*math.pi/180)\n",
+ "\n",
+ "#Result\n",
+ "print \"a =\",a/1e-4,\"*10^-4 cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a = 1.3 *10^-4 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2.2, Page number 2-10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 6*10**-4 #width of slit(cm)\n",
+ "n = 1 #first order\n",
+ "lamda = 6000*10**-8 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "def deg_to_dms(deg):\n",
+ " d = int(deg)\n",
+ " md = abs(deg - d) * 60\n",
+ " m = int(md)\n",
+ " sd = (md - m) * 60\n",
+ " sd=round(sd,2)\n",
+ " return [d, m, sd]\n",
+ "\n",
+ "theta = (math.asin((n*lamda)/a))*180/math.pi\n",
+ "d = 2*theta #angular seperation\n",
+ "\n",
+ "#Result\n",
+ "print \"Angular seperation between the 1st order minima is\",deg_to_dms(d)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angular seperation between the 1st order minima is [11, 28, 42.03]\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2.3, Page number 2-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 2 #for second minimum\n",
+ "n2 = 3 #for third minimum\n",
+ "lamda = 4000 #wavelength(A)\n",
+ "\n",
+ "#Calculations\n",
+ "'''For 2nd order,\n",
+ "a sin0 = n1*lamda\n",
+ "\n",
+ "For 3rd order,\n",
+ "a sin0 = n2*lamda'''\n",
+ "\n",
+ "lamda = (n2*lamda)/n1\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",lamda,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 6000 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2.4, Page number 2-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.16*10**-3 #width of slit(cm)\n",
+ "n = 1 #first order\n",
+ "lamda = 5600*10**-10 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "def deg_to_dms(deg):\n",
+ " d = int(deg)\n",
+ " md = abs(deg - d) * 60\n",
+ " m = int(md)\n",
+ " sd = (md - m) * 60\n",
+ " sd=round(sd,2)\n",
+ " return [d, m, sd]\n",
+ "\n",
+ "theta = (math.asin((n*lamda)/a))*180/math.pi\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Half angular width=\",deg_to_dms(theta)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Half angular width= [0, 12, 1.93]\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2.5, Page number 2-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 12*10**-5 #width of slit(cm)\n",
+ "n = 1 #first order\n",
+ "lamda = 6000*10**-8 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "theta = (math.asin((n*lamda)/a))*180/math.pi\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Half angular width=\",(theta),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Half angular width= 30.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2.6, Page number 2-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 2*10**-6 #width of slit(cm)\n",
+ "n = 1 #first order\n",
+ "lamda = 6500*10**-10 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "theta = (math.asin((n*lamda)/a))*180/math.pi\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Angle theta =\",round(theta,2),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle theta = 18.97 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3.1, Page number 2-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.16 #width(mm)\n",
+ "b = 0.8 #distance(mm)\n",
+ "\n",
+ "#Calculations & Results\n",
+ "m = ((a+b)/a)\n",
+ "\n",
+ "for n in range(1,4):\n",
+ " print \"m =\",m*n\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "m = 6.0\n",
+ "m = 12.0\n",
+ "m = 18.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.1, Page number 2-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda1 = 5*10**-5 #cm\n",
+ "lamda2 = 7*10**-5 #cm\n",
+ "a_plus_b = 1./4000 #cm\n",
+ "\n",
+ "#Calculations\n",
+ "m_max1 = a_plus_b/lamda1\n",
+ "m_max2 = round((a_plus_b/lamda2),1)\n",
+ "\n",
+ "#Results\n",
+ "print m_max2,\"orders are visible for 7000 A and\",m_max1,\"orders for 5000 A and either\",m_max2,\",4 or\",m_max1,\"for intermediate wavelengths\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3.6 orders are visible for 7000 A and 5.0 orders for 5000 A and either 3.6 ,4 or 5.0 for intermediate wavelengths\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.2, Page number 2-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "theta = 30 #angle of diffraction(degrees)\n",
+ "lamda1 = 5400*10**-8 #cm\n",
+ "lamda2 = 4050*10**-8 #cm\n",
+ "\n",
+ "#Calculations\n",
+ "m = lamda2/(lamda1-lamda2)\n",
+ "a_plus_b = (m*lamda1)/math.sin(theta*math.pi/180)\n",
+ "N = 1/a_plus_b\n",
+ "\n",
+ "#Result\n",
+ "print \"Number of lines per cm =\",round(N,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of lines per cm = 3086.42\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.3, Page number 2-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 4992 #A\n",
+ "m1 = 3 #for 3rd order\n",
+ "m2 = 4 #for 4th order\n",
+ "\n",
+ "#Calculations\n",
+ "'''For m = 3,\n",
+ "(a+b)sin0 = 3*lamda\n",
+ "\n",
+ "For m = 4,\n",
+ "(a+b)sin0 = 4*lamda'''\n",
+ "\n",
+ "l = (m2*lamda)/m1\n",
+ "\n",
+ "#Results\n",
+ "print \"Wavelength =\",l,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 6656 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.4, Page number 2-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6328*10**-8 #wavelength(cm)\n",
+ "m1 = 1\n",
+ "m2 = 2\n",
+ "a_plus_b = 1./6000 #cm\n",
+ "\n",
+ "#Calculations\n",
+ "theta1 = math.asin((m1*lamda)/a_plus_b)*180/math.pi\n",
+ "theta2 = math.asin((m2*lamda)/a_plus_b)*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print \"01 =\",round(theta1,2),\"degrees\"\n",
+ "print \"02 =\",round(theta2,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "01 = 22.31 degrees\n",
+ "02 = 49.41 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.5, Page number 2-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 2 #2nd order\n",
+ "lamda = 5*10**-5 #wavelength(cm)\n",
+ "theta = 30\n",
+ "\n",
+ "#Calculations\n",
+ "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n",
+ "N = 1/a_plus_b\n",
+ "\n",
+ "#Result\n",
+ "print \"The number of lines/cm of the grating surface is\",N"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of lines/cm of the grating surface is 5000.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.6, Page number 2-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 3 #3rd order\n",
+ "a_plus_b = 1./7000 #no. of lines/cm\n",
+ "sin0 = 1\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = (a_plus_b*sin0)/m\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round(lamda/1e-8),\"A\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 4762.0 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.7, Page number 2-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 1 #1st order\n",
+ "lamda = 6560*10**-8 #wavelength(cm)\n",
+ "theta = 16+12./60\n",
+ "\n",
+ "#Calculations\n",
+ "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n",
+ "N = 1/a_plus_b\n",
+ "w = 2*N\n",
+ "\n",
+ "#Result\n",
+ "print \"The total number of lines is\",round(w)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total number of lines is 8506.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.8, Page number 2-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 1 #1st order\n",
+ "lamda = 6.56*10**-5 #wavelength(cm)\n",
+ "theta = 18+14./60\n",
+ "\n",
+ "#Calculations\n",
+ "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n",
+ "N = 1/a_plus_b\n",
+ "w = 2*N\n",
+ "\n",
+ "#Result\n",
+ "print \"The total number of lines is\",round(w,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total number of lines is 9539.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.9, Page number 2-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6*10**-5 #wavelength(cm)\n",
+ "a_plus_b = 1./5000 #cm\n",
+ "\n",
+ "#Calculations\n",
+ "m_max = a_plus_b/lamda\n",
+ "\n",
+ "#Result\n",
+ "print \"Order =\",round(m_max)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Order = 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.10, Page number 2-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6000*10**-8 #wavelength(cm)\n",
+ "a_plus_b = 1./5000 #cm\n",
+ "\n",
+ "#Calculations\n",
+ "m_max = a_plus_b/lamda\n",
+ "\n",
+ "#Result\n",
+ "print \"m_max =\",round(m_max)\n",
+ "\n",
+ "#The rest of the solution is theoretical"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "m_max = 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.11, Page number 2-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 1 #1st order\n",
+ "lamda = 5790*10**-8 #wavelength(cm)\n",
+ "theta = 19.994\n",
+ "\n",
+ "#Calculations\n",
+ "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n",
+ "N = 1/a_plus_b\n",
+ "w = 2.54*N\n",
+ "\n",
+ "#Result\n",
+ "print \"The total number of lines is\",round(w)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total number of lines is 15000.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.1, Page number 2-31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "n = 3000./0.5 #no. of lines per cm\n",
+ "m = 2 #for 2nd order\n",
+ "lamda1 = 5893*10**-8 #wavelength(cm)\n",
+ "lamda2 = 5896*10**-8 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "a_plus_b = 1/n\n",
+ "theta1 = math.degrees(math.asin((2*lamda1)/(a_plus_b)))\n",
+ "theta2 = math.degrees(math.asin((2*lamda2)/(a_plus_b)))\n",
+ "d = theta2-theta1 #angular seperation\n",
+ "N = lamda1*10**8/(m*3)\n",
+ "\n",
+ "#Result\n",
+ "print \"Since N=\",round(N),\"which is smaller than 3000 lines, the two lines will be resolved in the second order\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Since N= 982.0 which is smaller than 3000 lines, the two lines will be resolved in the second order\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.2, Page number 2-32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "m = 3 #for 3rd order\n",
+ "lamda = 481 #wavelength(nm)\n",
+ "n = 620 #no. of ruling per mm\n",
+ "w = 5.05 #width(mm)\n",
+ "\n",
+ "#Calculations\n",
+ "N = n*w\n",
+ "dl = lamda/(m*N)\n",
+ "\n",
+ "#Result\n",
+ "print \"Smallest wavelength interval =\",round(dl,4),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Smallest wavelength interval = 0.0512 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.3, Page number 2-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "m = 2 #for 2nd order\n",
+ "lamda = 5890 #wavelength(A)\n",
+ "dl = 6 #A\n",
+ "n = 500. #no. of lines per cm\n",
+ "\n",
+ "#Calculations\n",
+ "N = lamda/(dl*m)\n",
+ "W = N/n\n",
+ "\n",
+ "#Result\n",
+ "print \"Least width =\",W,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least width = 0.98 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.4, Page number 2-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "N = 3*5000 #no. of lines per cm\n",
+ "a_plus_b = 1./5000 #cm\n",
+ "lamda = 5890*10**-8 #wavelength(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "m_max = round(a_plus_b/lamda)\n",
+ "RP = m_max*N\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum value of resolving power =\",RP"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value of resolving power = 45000.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.5, Page number 2-34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "m = 2 #for 2nd order\n",
+ "lamda = 5890 #wavelength(A)\n",
+ "dl = 6 #A\n",
+ "w = 3. #width of a line(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda2 = lamda+dl\n",
+ "N = lamda/(dl*m)\n",
+ "\n",
+ "a_plus_b = w/N\n",
+ "\n",
+ "#Results\n",
+ "print \"The minimum no. of lines a grating must have is\",N\n",
+ "print \"The grating element is\",round(a_plus_b/1e-3,2),\"*10^-3 cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum no. of lines a grating must have is 490\n",
+ "The grating element is 6.12 *10^-3 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.6, Page number 2-34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "N = 40000 #no. of lines per cm\n",
+ "m = 2 #for 2nd order\n",
+ "\n",
+ "#Calculations\n",
+ "RP = m*N\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum value of resolving power =\",RP"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value of resolving power = 80000\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/Chapter_3.ipynb b/Applied_Physics_II/Chapter_3.ipynb
new file mode 100755
index 00000000..61c99435
--- /dev/null
+++ b/Applied_Physics_II/Chapter_3.ipynb
@@ -0,0 +1,779 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Fibre Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.1, Page number 3-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.54 #refractive index of core\n",
+ "NA = 0.5 #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "n2 = math.sqrt(n1**2-NA**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index of cladding is\",round(n2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of cladding is 1.46\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.2, Page number 3-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n2 = 1.59 #refractive index of cladding\n",
+ "NA = 0.2 #numerical aperture\n",
+ "n0 = 1.33\n",
+ "\n",
+ "#Calculation\n",
+ "n1 = (math.sqrt(n2**2-NA**2))\n",
+ "theta_o = (math.asin((math.sqrt(n2**2-n1**2)/n0)))*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index of core is\",n2\n",
+ "print \"Acceptance angle =\",round(theta_o,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of core is 1.59\n",
+ "Acceptance angle = 8.65 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.3, Page number 3-6\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.49 #refractive index of core\n",
+ "n2 = 1.44 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "theta_o = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical Aperture =\",round(NA,5)\n",
+ "print \"Acceptance angle =\",round(theta_o,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical Aperture = 0.38275\n",
+ "Acceptance angle = 22.5 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.4, Page number 3-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.6 #refractive index of core\n",
+ "n2 = 1.3 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "\n",
+ "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n",
+ "AC = 2*theta_o\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical angle =\",round(theta_c,2),\"degrees\"\n",
+ "print \"Value of angle of acceptance cone =\",round(AC,3),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical angle = 54.34 degrees\n",
+ "Value of angle of acceptance cone = 137.731 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.5, Page number 3-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.4 #refractive index of core\n",
+ "theta_o = 30 #acceptance angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "n2 = math.sqrt(n1**2-math.sin(math.radians(theta_o))**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index of cladding is\",round(n2,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of cladding is 1.3077\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.6, Page number 3-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.563 #refractive index of core\n",
+ "n2 = 1.498 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "delta = (n1-n2)/n1\n",
+ "\n",
+ "#Result\n",
+ "print \"Fractional index change =\",round(delta,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fractional index change = 0.0416\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.7, Page number 3-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.50 #refractive index of cladding\n",
+ "theta_c = 90-5 #critical angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "n2 = math.sin(theta_c*math.pi/180)*n1\n",
+ "\n",
+ "#Result\n",
+ "print \"The maximum index of refraction allowed for cladding is\",round(n2,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum index of refraction allowed for cladding is 1.4943\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3.8, Page number 3-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.33 #refractive index \n",
+ "theta_o = 30 #acceptance angle in air\n",
+ "\n",
+ "#Calculations\n",
+ "theta_0 = math.degrees(math.asin(math.sin(theta_o*math.pi/180)/n1))\n",
+ "\n",
+ "#Result\n",
+ "print \"Acceptance angle =\",round(theta_0,2),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptance angle = 22.08 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4.1, Page number 3-10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.52 #refractive index of core\n",
+ "n2 = 1.5189 #refractive index of cladding\n",
+ "d = 29*10**-6 #core diameter(m)\n",
+ "lamda = 1.3*10**-6 #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "V = (math.pi*d*math.sqrt(n1**2-n2**2))/lamda\n",
+ "\n",
+ "N = V**2/2\n",
+ "\n",
+ "#Results\n",
+ "print \"Normalized frequency =\",round(V,3)\n",
+ "print \"Number of modes =\",round(N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized frequency = 4.052\n",
+ "Number of modes = 8.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4.2, Page number 3-10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.47 #refractive index of core\n",
+ "n2 = 1.46 #refractive index of cladding\n",
+ "lamda = 1300*10**-9 #wavelength(nm)\n",
+ "V = 2.405 #for single mode fibre\n",
+ "\n",
+ "#Calculation\n",
+ "d = (V*lamda)/(math.pi*math.sqrt(n1**2-n2**2))\n",
+ "r = d/2\n",
+ "\n",
+ "#Result\n",
+ "print \"Radius =\",round(r/1e-6,3),\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius = 2.907 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4.3, Page number 3-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.48 #refractive index of core\n",
+ "delta = 0.055 #relative RI\n",
+ "lamda = 1 #wavelength(um)\n",
+ "r = 50 #core radius(um)\n",
+ "\n",
+ "#Calculations\n",
+ "n2 = -((delta*n1)-n1)\n",
+ "\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "theta_o = math.degrees(math.asin(NA))\n",
+ "\n",
+ "V = (math.pi*2*r*NA)/lamda\n",
+ "\n",
+ "N = V**2/2\n",
+ "\n",
+ "#Results\n",
+ "print \"Refractive index of cladding =\",n2\n",
+ "print \"NA =\",round(NA,3)\n",
+ "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"\n",
+ "print \"Normalized frequency =\",round(V,3)\n",
+ "print \"Number of modes =\",round(N) #Answer differs due to rounding off in 'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of cladding = 1.3986\n",
+ "NA = 0.484\n",
+ "Acceptance angle = 28.95 degrees\n",
+ "Normalized frequency = 152.073\n",
+ "Number of modes = 11563.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4.4, Page number 3-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.45 #refractive index of core\n",
+ "n2 = 1.448 #refractive index of cladding\n",
+ "lamda = 1*10**-6 #wavelength(m)\n",
+ "d = 6*10**-6 #core diameter(m)\n",
+ "\n",
+ "#Calculations\n",
+ "#Case i\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "\n",
+ "#Case ii\n",
+ "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n",
+ "\n",
+ "#Case iii\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n",
+ "\n",
+ "#Results\n",
+ "print \"Critical angle =\",round(theta_c),\"degrees\"\n",
+ "print \"Acceptance angle =\",round(theta_o,3),\"degrees\"\n",
+ "print \"Number of modes =\",round(N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical angle = 87.0 degrees\n",
+ "Acceptance angle = 4.366 degrees\n",
+ "Number of modes = 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4.5, Page number 3-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.50 #refractive index of core\n",
+ "n2 = 1.48 #refractive index of cladding\n",
+ "lamda = 1*10**-6 #wavelength(m)\n",
+ "d = 2*50*10**-6 #core diameter(m)\n",
+ "\n",
+ "#Calculations\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Number of modes =\",round(N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of modes = 2941.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4.6, Page number 3-13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.55 #refractive index of core\n",
+ "n2 = 1.50 #refractive index of cladding\n",
+ "lamda = 1400*10**-9 #wavelength(m)\n",
+ "d = 40*10**-6 #core diameter(m)\n",
+ "\n",
+ "#Calculations\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "delta = (n1-n2)/n1\n",
+ "\n",
+ "V = (math.pi*d*NA)/lamda\n",
+ "\n",
+ "#Results\n",
+ "print \"NA =\",round(NA,4)\n",
+ "print \"Fractional index change =\",round(delta,5)\n",
+ "print \"V-number =\",round(V,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NA = 0.3905\n",
+ "Fractional index change = 0.03226\n",
+ "V-number = 35.05\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6.1, Page number 3-17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pout = 0.3 #output power(mW)\n",
+ "Pin = 1 #input power(mW)\n",
+ "L = 0.1 #fibre length(km)\n",
+ "\n",
+ "#Calculation\n",
+ "a = (-10/L)*math.log10(Pout/Pin)\n",
+ "\n",
+ "#Result\n",
+ "print \"Attenuation =\",round(a,2),\"dB/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Attenuation = 52.29 dB/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6.2, Page number 3-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pin = 9 #input power(mW)\n",
+ "L = 3 #fibre length(km)\n",
+ "a = 1.5 #loss(dB/km)\n",
+ "\n",
+ "#Calculation\n",
+ "Pl = a*L\n",
+ "Pout = Pin*10**(-Pl/10)\n",
+ "\n",
+ "#Result\n",
+ "print \"Output power =\",round(Pout,3),\"uW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output power = 3.193 uW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6.3, Page number 3-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "a = 2.2 #attenuation(dB/km)\n",
+ "l1 = 2 #km\n",
+ "l2 = 6 #km\n",
+ "from sympy import * \n",
+ "Pin = symbols('Pin')\n",
+ "\n",
+ "#Calculations\n",
+ "#For 2km,\n",
+ "Pl1 = a*l1\n",
+ "Po1 = Pin*round(10**(-Pl1/10),3)\n",
+ "\n",
+ "#For 6km,\n",
+ "Pl2 = a*l2\n",
+ "Po2 = Pin*round(10**(-Pl2/10),3)\n",
+ "\n",
+ "#Results\n",
+ "print \"After 2 km, Pout =\",Po1\n",
+ "print \"After 6 km, Pout =\",Po2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "After 2 km, Pout = 0.363*Pin\n",
+ "After 6 km, Pout = 0.048*Pin\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6.4, Page number 3-19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Pout = 7.5 #output power(mW)\n",
+ "Pin = 8.6 #input power(mW)\n",
+ "L = 0.5 #fibre length(km)\n",
+ "\n",
+ "#Calculation\n",
+ "Pl = -10*math.log10(Pout/Pin)\n",
+ "a = Pl/L\n",
+ "\n",
+ "#Result\n",
+ "print \"Loss specification =\",round(a,4),\"dB/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss specification = 1.1887 dB/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/Chapter_4.ipynb b/Applied_Physics_II/Chapter_4.ipynb
new file mode 100755
index 00000000..f94b4b09
--- /dev/null
+++ b/Applied_Physics_II/Chapter_4.ipynb
@@ -0,0 +1,141 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Lasers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6.1, Page number 4-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "P = 3.147*10**-3 #output power(W)\n",
+ "t = 60 #time(sec)\n",
+ "lamda = 632.8*10**-9 #wavelength(m)\n",
+ "h = 6.63*10**-34 #Planc's constant(J-s)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "N = (P*t*lamda)/(h*c)\n",
+ "\n",
+ "#Result\n",
+ "print \"No. of photons emittd each minute is\",round(N/1e+17),\"*10^17\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of photons emittd each minute is 6.0 *10^17\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6.2, Page number 4-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 300 #temperature(K)\n",
+ "lamda = 694.3*10**-9 #wavelength(m)\n",
+ "h = 6.63*10**-34 #Planc's constant(J-s)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "k = 1.38*10**-23 #Boltman's constant(J/K)\n",
+ "\n",
+ "#Calculations\n",
+ "N2_by_N1 = math.exp((-h*c)/(lamda*k*T))\n",
+ " \n",
+ "#Result\n",
+ "print \"Ratio of population =\",round(N2_by_N1/1e-31,3),\"*10^-31\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of population = 8.874 *10^-31\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6.3, Page number 4-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "P = 100*10**3 #output power(W)\n",
+ "t = 20*10**-9 #time(sec)\n",
+ "N = 6.981*10**15 #no. of photons\n",
+ "h = 6.63*10**-34 #Planc's constant(J-s)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = (N*h*c)/(P*t)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round(lamda/1e-10),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 6943.0 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/Chapter_5.ipynb b/Applied_Physics_II/Chapter_5.ipynb
new file mode 100755
index 00000000..2ad76975
--- /dev/null
+++ b/Applied_Physics_II/Chapter_5.ipynb
@@ -0,0 +1,1097 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.1, Page number 5-5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 10**-2 #mass of object(kg)\n",
+ "v = 1 #velocity(m/s)\n",
+ "l = 1*10**-10 #wavelength(m)\n",
+ "d = 10**-3 #distance travelled(m)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = h/(m*v)\n",
+ "\n",
+ "v = h/(m*l)\n",
+ "\n",
+ "t1 = d/v\n",
+ "t = t1/(365*24*60*60)\n",
+ "\n",
+ "#Results\n",
+ "print \"de Brogile wavelength =\",round(lamda/1e-32,2),\"*10^-32 m\"\n",
+ "print \"Velocity =\",round(v/1e-22,2),\"*10^-22 m/s(Calculation mistake in the textbook)\"\n",
+ "print \"Distance travelled =\",round(t/1e+10,2),\"*10^10 years(Calculation mistake in the textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Brogile wavelength = 6.63 *10^-32 m\n",
+ "Velocity = 6.63 *10^-22 m/s(Calculation mistake in the textbook)\n",
+ "Distance travelled = 4.78 *10^10 years(Calculation mistake in the textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.2, Page number 5-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "lamda = 1*10**-10 #wavelength(m)\n",
+ "\n",
+ "#calculation\n",
+ "v = h/(m*lamda)\n",
+ "\n",
+ "#Result\n",
+ "print \"Velocity =\",round(v/1e+6,2),\"*10^6 m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 7.29 *10^6 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.3, Page number 5-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "lamda = 5000*10**-10 #wavelength(m)\n",
+ "\n",
+ "#calculation\n",
+ "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n",
+ "\n",
+ "#Result\n",
+ "print \"Kinetic energy =\",round(E/1e-6,5),\"*10^-6 eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy = 6.03804 *10^-6 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.4, Page number 5-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 1.676*10**-27 #mass of object(kg)\n",
+ "E = 0.025*1.6*10**-19 #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = h/math.sqrt(2*m*E)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round(lamda/1e-10,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 1.81 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.5, Page number 5-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "E = 120*1.6*10**-19 #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = h/math.sqrt(2*m*E)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round(lamda/1e-10,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 1.12 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.6, Page number 5-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 1.67*10**-27 #mass of neutron(kg)\n",
+ "lamda = 1*10**-10 #wavelength(m)\n",
+ "\n",
+ "#calculation\n",
+ "v = h/(m*lamda)\n",
+ "\n",
+ "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n",
+ "\n",
+ "#Result\n",
+ "print \"Velocity =\",round(v,2),\"m/s\"\n",
+ "print \"Kinetic energy =\",round(E/1e-2,3),\"*10^-2 eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 3970.06 m/s\n",
+ "Kinetic energy = 8.225 *10^-2 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.7, Page number 5-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 1 #mass of object(kg)\n",
+ "v = 1 #velocity(m/s)\n",
+ "V = 182 #potential differnce(V)\n",
+ "\n",
+ "#Calculation\n",
+ "#Case i\n",
+ "lamda = 12.27/math.sqrt(V)\n",
+ "\n",
+ "#Case ii\n",
+ "l = h/(m*v)\n",
+ "\n",
+ "#Results\n",
+ "print \"de Brogile wavelength for accelerated electron=\",round(lamda,2),\"A\"\n",
+ "print \"de Brogile wavelength for object=\",l,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Brogile wavelength for accelerated electron= 0.91 A\n",
+ "de Brogile wavelength for object= 6.63e-34 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.8, Page number 5-9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "lamda = 10**-14 #wavelength(m)\n",
+ "\n",
+ "#Calculations\n",
+ "p = h/lamda\n",
+ "\n",
+ "E = (p**2/(2*m))/(1.6*10**-13)\n",
+ "\n",
+ "#Results\n",
+ "print \"Momentum =\",p,\"kg-m/s\"\n",
+ "print \"Energy =\",round(E,2),\"MeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Momentum = 6.63e-20 kg-m/s\n",
+ "Energy = 15095.09 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.9, Page number 5-10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "V = 3000 #potential differnce(V)\n",
+ "\n",
+ "#Calculation\n",
+ "#Case i\n",
+ "lamda = 12.27/math.sqrt(V)\n",
+ "\n",
+ "#Case ii\n",
+ "p = h/(lamda*10**-10)\n",
+ "\n",
+ "#Case iii\n",
+ "lamda_b = 1/(lamda*10**-10)\n",
+ "\n",
+ "#Case iv\n",
+ "d = 2.04*10**-10 #m\n",
+ "n = 1 #for first order\n",
+ "theta = math.degrees(math.asin((n*lamda*10**-10)/(2*d)))\n",
+ "\n",
+ "#Results\n",
+ "print \"Momentum =\",round(p/1e-23,2),\"*10^-23 kg-m/s\"\n",
+ "print \"de Brogile wavelength =\",round(lamda,3),\"A\"\n",
+ "print \"Wave number =\",round(lamda_b/1e+10,3),\"*10^10 /m\"\n",
+ "print \"Bragg angle =\",round(theta,3),\"degrees\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Momentum = 2.96 *10^-23 kg-m/s\n",
+ "de Brogile wavelength = 0.224 A\n",
+ "Wave number = 4.464 *10^10 /m\n",
+ "Bragg angle = 3.147 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.10, Page number 5-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "V = 10*10**3 #potential differnce(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.27/math.sqrt(V)\n",
+ "\n",
+ "p = h/(lamda*10**-10)\n",
+ "\n",
+ "#result\n",
+ "print \"Wavelength =\",lamda,\"A\"\n",
+ "print \"Momentum =\",round(p/1e-23,3),\"*10^-23 kg-m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 0.1227 A\n",
+ "Momentum = 5.403 *10^-23 kg-m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.12, Page number 5-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 6.68*10**-27 #mass of particle(kg)\n",
+ "E = 1.6*10**-16 #energy(J)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = h/math.sqrt(2*m*E)\n",
+ "\n",
+ "v = h/(m*lamda)\n",
+ "\n",
+ "#Results\n",
+ "print \"Wavelength =\",round(lamda/1e-13,3),\"*10^-13 A\"\n",
+ "print \"Velocity =\",round(v/1e+5,2),\"*10^5 m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 4.535 *10^-13 A\n",
+ "Velocity = 2.19 *10^5 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.13, Page number 5-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "E = 1.6*10**-19 #energy(J)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda_ph = (h*c)/E #wavelength of photon\n",
+ " \n",
+ "lamda_e = h/math.sqrt(2*m*E) #wavelength of electron\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength of proton =\",round(lamda_ph/1e-6,3),\"*10^-6 m\"\n",
+ "print \"Wavelength of electron =\",round(lamda_e/1e-10,3),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of proton = 1.243 *10^-6 m\n",
+ "Wavelength of electron = 12.286 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3.14, Page number 5-13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "\n",
+ "#Calculations\n",
+ "E = m*c**2\n",
+ "lamda = h/math.sqrt(2*m*E)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Brogile wavelength =\",round(lamda/1e-12,3),\"*10^-12 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Brogile wavelength = 1.717 *10^-12 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.1, Page number 5-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "del_v = (0.01*400)/100\n",
+ "\n",
+ "#Calculation\n",
+ "del_x = h/(4*math.pi*m*del_v)\n",
+ "\n",
+ "#Result\n",
+ "print \"Accuracy =\",round(del_x/1e-3,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Accuracy = 1.45 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.2, Page number 5-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "del_x = 10*10**-9 #m\n",
+ "E = 1.6*10**-16 #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "del_px = h/(4*math.pi*del_x)\n",
+ "p = math.sqrt(2*m*E)\n",
+ "per = (del_px/p)*100\n",
+ "\n",
+ "#Result\n",
+ "print \"Percentage of uncertainity =\",round(per,4),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of uncertainity = 0.0309 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.3, Page number 5-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "del_v = (0.01*4*10**5)/100\n",
+ "\n",
+ "#Calculation\n",
+ "del_x = h/(4*math.pi*m*del_v)\n",
+ "\n",
+ "#Result\n",
+ "print \"Accuracy =\",round(del_x/1e-6,2),\"*10^-6 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Accuracy = 1.45 *10^-6 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.4, Page number 5-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "del_v = (1.88*10**6)/100\n",
+ "\n",
+ "#Calculation\n",
+ "del_x = h/(4*math.pi*m*del_v)\n",
+ "\n",
+ "#Result\n",
+ "print \"Precision =\",round(del_x/1e-9,3),\"*10^-9 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Precision = 3.084 *10^-9 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.5, Page number 5-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 4*10**-7 #wavelength(m)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "del_l = 8*10**-15 #spectral width(m)\n",
+ "\n",
+ "#calculation\n",
+ "del_t = lamda**2/(4*math.pi*c*del_l)\n",
+ "\n",
+ "#Result\n",
+ "print \"Time spent by the elctrons =\",round(del_t/1e-9,3),\"*10^-9 s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time spent by the elctrons = 5.305 *10^-9 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.6, Page number 5-29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "del_t = 1.4*10**-10 #time spent(s)\n",
+ "\n",
+ "#calculation\n",
+ "E = (h/(4*math.pi*del_t))/(1.6*10**-19)\n",
+ "\n",
+ "#Result\n",
+ "print \"Uncertainity =\",round(E/1e-6,2),\"*10^-6 eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uncertainity = 2.36 *10^-6 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7.7, Page number 5-29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 546*10**-9 #wavelength(m)\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "del_l = 10**-14 #spectral width(m)\n",
+ "\n",
+ "#calculation\n",
+ "del_t = lamda**2/(4*math.pi*c*del_l)\n",
+ "\n",
+ "#Result\n",
+ "print \"Time spent by the elctrons =\",round(del_t/1e-9,2),\"*10^-9 s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time spent by the elctrons = 7.91 *10^-9 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15.1, Page number 5-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 2*10**-10 #width(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E1 = (h**2/(8*m*L**2))/(1.6*10**-19)\n",
+ "E2 = 4*E1\n",
+ "E3 = 9*E1\n",
+ "\n",
+ "#Result\n",
+ "print \"Energy of electron in ground state =\",round(E1,3),\"eV\"\n",
+ "print \"Energy of electron in first state =\",round(E2,3),\"eV\"\n",
+ "print \"Energy of electron in second state =\",round(E3,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy of electron in ground state = 9.434 eV\n",
+ "Energy of electron in first state = 37.738 eV\n",
+ "Energy of electron in second state = 84.91 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15.2, Page number 5-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "L = 5.6*10**-3 #width(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E = L/4\n",
+ "\n",
+ "#Result\n",
+ "print \"Ground state energy =\",E,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ground state energy = 0.0014 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15.4, Page number 5-43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "#Variable declaration\n",
+ "#Intervals\n",
+ "x1 = 0\n",
+ "x2 = 1./2\n",
+ "\n",
+ "#Calculation\n",
+ "x = lambda x: 3*x**2\n",
+ "P = integrate.quad(x, x1, x2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Probability =\",P[0]"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Probability = 0.125\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15.5, Page number 5-44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m1 = 9.1*10**-31 #mass of electron(kg)\n",
+ "m2 = 10**-9 #mass of grain dust(kg)\n",
+ "L1 = 10**-9 #width(m)\n",
+ "L2 = 10**-4 #width(m)\n",
+ "\n",
+ "#Calculation\n",
+ "#For electron\n",
+ "print \"For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\"\n",
+ "for n in range(1,4):\n",
+ " En1 = ((n**2*h**2)/(8*m*L1**2))/(1.6*10**-19)\n",
+ " print round(En1,4),\"eV\"\n",
+ " \n",
+ "#For the grain of dust\n",
+ "print \"\\nFor a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\"\n",
+ "for n in range(1,4):\n",
+ " En2 = ((n**2*h**2)/(8*m2*L2**2))/(1.6*10**-19)\n",
+ " print round(En2/1e-32,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\n",
+ "0.3774 eV\n",
+ "1.5095 eV\n",
+ "3.3964 eV\n",
+ "\n",
+ "For a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\n",
+ "3.434 eV\n",
+ "13.737 eV\n",
+ "30.907 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15.6, Page number 5-45\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "E1 = 38*1.6*10**-19 #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "L = math.sqrt(h**2/(8*m*E1))\n",
+ " \n",
+ "#Result\n",
+ "print \"Width of well =\",round(L/1e-10,4),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of well = 0.9965 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15.7, Page number 5-45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 5*10**-10 #width(m)\n",
+ "n1 = 1\n",
+ "n2 = 2\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "E = ((3*h**2)/(8*m*L**2)) #E2-E1\n",
+ "Ev = E/(1.6-10**-19) #J\n",
+ "lamda = (h*c)/E\n",
+ "\n",
+ "#Result\n",
+ "print \"Energy =\",round(Ev/1e-19,2),\"eV\"\n",
+ "print \"Wavelength =\",round(lamda/1e-7,3),\"*10^-7 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy = 4.53 eV\n",
+ "Wavelength = 2.745 *10^-7 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/Chapter_6.ipynb b/Applied_Physics_II/Chapter_6.ipynb
new file mode 100755
index 00000000..cc609a3f
--- /dev/null
+++ b/Applied_Physics_II/Chapter_6.ipynb
@@ -0,0 +1,189 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Motion of charge particle in Electric & Magnetic fields"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1.1, Page number 6-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "v = 2.5*10**6 #velocity of electron(m/s)\n",
+ "theta = 30*math.pi/180 #angle(degrees)\n",
+ "B = 0.94*10**-4 #field strength(Wb/m^2)\n",
+ "e = 1.6*10**-19 #electron charge(C)\n",
+ "\n",
+ "#Calculations\n",
+ "r = (m*v*math.sin(theta))/(B*e)\n",
+ "\n",
+ "l = (5*v*math.cos(theta)*2*math.pi*m)/(B*e)\n",
+ "\n",
+ "#Results\n",
+ "print \"Radius =\",round(r/1e-3,2),\"mm\"\n",
+ "print \"Distance covered =\",round(l,3),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius = 75.63 mm\n",
+ "Distance covered = 4.115 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1.2, Page number 6-7 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "v = 3*10**7 #velocity of electron(m/s)\n",
+ "theta = 45*math.pi/180 #angle(degrees)\n",
+ "B = 0.23*10**-4 #field strength(Wb/m^2)\n",
+ "e = 1.6*10**-19 #electron charge(C)\n",
+ "\n",
+ "#Calculations\n",
+ "r = (m*v*math.sin(theta))/(B*e)\n",
+ "\n",
+ "l = (v*math.cos(theta)*2*math.pi*m)/(B*e)\n",
+ "\n",
+ "#Results\n",
+ "print \"Radius =\",round(r,2),\"m\"\n",
+ "print \"Distance covered =\",round(l,3),\"m\"\n",
+ "#Calculation mistakes in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius = 5.25 m\n",
+ "Distance covered = 32.959 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1.3, Page number 6-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "y = 1.5 #displacement(cm)\n",
+ "d = 0.42 #distance(cm)\n",
+ "Va = 1.6*10**3 #anode voltage(V)\n",
+ "D = 28 #cm\n",
+ "l = 1.8 #length of plates(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "V = (2*y*d*Va)/(D*l)\n",
+ "Vin = V/6\n",
+ "\n",
+ "#Result\n",
+ "print \"Input voltage =\",round(Vin,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input voltage = 6.67 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5.1, Page number 6-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "da = 0.8 #minor axis(cm)\n",
+ "db = 2 #major axis(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "ps = math.degrees(math.asin(da/db))\n",
+ "\n",
+ "#Result\n",
+ "print \"Phase shift =\",round(ps,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase shift = 23.58 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/Chapter_7.ipynb b/Applied_Physics_II/Chapter_7.ipynb
new file mode 100755
index 00000000..3425e831
--- /dev/null
+++ b/Applied_Physics_II/Chapter_7.ipynb
@@ -0,0 +1,178 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3.1, Page number 7-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ho = 2.*10**5 #A/m\n",
+ "Hc = 1.*10**5 #A/m\n",
+ "T = 8. #temperature(K)\n",
+ "\n",
+ "#Calculations\n",
+ "Tc = math.sqrt(T**2/(1-(Hc/Ho)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical temperature =\",round(Tc,3),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical temperature = 11.314 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3.2, Page number 7-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Bo = 0.0306 #Critical field at 0K(T)\n",
+ "Tc = 3.7 #critical temperature(K)\n",
+ "T = 2 #K\n",
+ "\n",
+ "#calculation\n",
+ "Bc = Bo*(1-((T/Tc)**2))\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical field at 2K is\",round(Bc,5),\"T\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical field at 2K is 0.02166 T\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3.3, Page number 7-7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ho = 6.5*10**4 #Critical field at 0K(T)\n",
+ "Tc = 7.18 #critical temperature(K)\n",
+ "T = 4.2 #K\n",
+ "r = 0.5*10**-3 #radius(m)\n",
+ "\n",
+ "#calculation\n",
+ "Hc = Ho*(1-((T/Tc)**2))\n",
+ "Ic = 2*math.pi*r*Hc\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical current =\",round(Ic,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical current = 134.33 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3.4, Page number 7-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Tc1 = 4.185 #critical temperature(K)\n",
+ "M1 = 199.5 #isotopic mass\n",
+ "Tc2 = 4.133 #K\n",
+ "\n",
+ "#calculation\n",
+ "M2 = ((Tc1*M1**0.5)/Tc2)**2\n",
+ "\n",
+ "#Result\n",
+ "print \"Isotopic mass =\",round(M2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Isotopic mass = 204.55\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Physics_II/README.txt b/Applied_Physics_II/README.txt
new file mode 100755
index 00000000..717d1591
--- /dev/null
+++ b/Applied_Physics_II/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Muktesh Chaudhary
+Course: be
+College/Institute/Organization: Anglo Eastern ship management india Pvt. Ltd
+Department/Designation: Electrical & Electronics Officer
+Book Title: Applied Physics II
+Author: H. J. Sawant
+Publisher: Technical Publications
+Year of publication: 2014
+Isbn: 978-93-5038-883-9
+Edition: 2nd \ No newline at end of file
diff --git a/Applied_Physics_II/screenshots/halfangular.png b/Applied_Physics_II/screenshots/halfangular.png
new file mode 100755
index 00000000..6c38e8b8
--- /dev/null
+++ b/Applied_Physics_II/screenshots/halfangular.png
Binary files differ
diff --git a/Applied_Physics_II/screenshots/probability.png b/Applied_Physics_II/screenshots/probability.png
new file mode 100755
index 00000000..f8d2ba6f
--- /dev/null
+++ b/Applied_Physics_II/screenshots/probability.png
Binary files differ
diff --git a/Applied_Physics_II/screenshots/visiblerange.png b/Applied_Physics_II/screenshots/visiblerange.png
new file mode 100755
index 00000000..c4d798f7
--- /dev/null
+++ b/Applied_Physics_II/screenshots/visiblerange.png
Binary files differ
diff --git a/Basic_Electrical_Engineering/Chapter10.ipynb b/Basic_Electrical_Engineering/Chapter10.ipynb
new file mode 100755
index 00000000..946a157a
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter10.ipynb
@@ -0,0 +1,1357 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: AC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1,Page number: 274 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power factor and the average power dissipated.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,cos,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm=141.0 #Peak value of supply voltage(in Volts)\n",
+ "ang_freq=100.0*pi #Angular frequency(in radians per second) \n",
+ "R=3.0 #Resistance(in Ohms) \n",
+ "L=0.0127 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calcultaions:\n",
+ "Vrms=Vm/sqrt(2.0)\n",
+ "V=rect(Vrms,0.0)\n",
+ "X_L=ang_freq*L\n",
+ "Z=R+ (X_L*1j)\n",
+ "I=V/Z\n",
+ "ang_I=degrees(phase(I))\n",
+ "P=Vrms*abs(I)*cos(phase(I))\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rms value of the steady-state current is %.2f A and the relative phase angle is %.2f degrees.\" %(abs(I),-ang_I)\n",
+ "print \"(b)The expression for the instantaneous current is i=%.3f sin(100*pi*t%.2f degrees) A.\" %((sqrt(2)*abs(I)),ang_I)\n",
+ "print \"(c)The average power dissipated in the circuit is %.2f W.\" %(P)\n",
+ "print \"(d)The power factor is %.3f lagging.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rms value of the steady-state current is 19.97 A and the relative phase angle is 53.06 degrees.\n",
+ "(b)The expression for the instantaneous current is i=28.246 sin(100*pi*t-53.06 degrees) A.\n",
+ "(c)The average power dissipated in the circuit is 1196.75 W.\n",
+ "(d)The power factor is 0.601 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2,Page number: 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance required,the phase angle,the power factor,the apparent power,and the reactive power.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,degrees,acos,cos,sin\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V=230.0 #Rms value of supply voltage(in Volts)\n",
+ "f=50.0 #Frequency of supply(in Hertz) \n",
+ "P_lamp=750.0 #Power rating of the lamp(in Watts) \n",
+ "V_lamp=100.0 #Voltage rating of the lamp(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_rated=P_lamp/V_lamp\n",
+ "Vc=sqrt((V*V)-(V_lamp*V_lamp))\n",
+ "Xc=Vc/I_rated\n",
+ "C=1/(2*pi*f*Xc)\n",
+ "phase_angle=acos(V_lamp/V)\n",
+ "pf=cos(phase_angle)\n",
+ "app_P=V*I_rated\n",
+ "rea_P=V*I_rated*sin(phase_angle)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The required capacitance is %e F.\" %(C)\n",
+ "print \"(b)The phase angle is %.3f degrees.\" %(degrees(phase_angle))\n",
+ "print \"(c)The power factor is %.3f leading.\" %(pf)\n",
+ "print \"(d)The apparent power is %.3f VA.\" %(app_P)\n",
+ "print \"(e)The reactive power is %.3f VAr.\" %(rea_P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The required capacitance is 1.152611e-04 F.\n",
+ "(b)The phase angle is 64.229 degrees.\n",
+ "(c)The power factor is 0.435 leading.\n",
+ "(d)The apparent power is 1725.000 VA.\n",
+ "(e)The reactive power is 1553.424 VAr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3,Page number: 277 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question: \n",
+ "\"\"\"Finding the impedance,the power factor,supply voltage,voltage across resistor,apparent power and reactive power.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import pi,cos,sin,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=rect(0.9,0) #Current in the circuit(in Amperes)\n",
+ "R=120.0 #Resistance of the resistor(in Ohms) \n",
+ "Xc=250.0 #Reactance of the capacitor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=R- Xc*1j\n",
+ "pf=cos(phase(Z))\n",
+ "V=I*Z\n",
+ "V_R=I*R\n",
+ "V_C=I*Xc\n",
+ "act_P=abs(V)*abs(I)*cos(phase(Z))\n",
+ "app_P=abs(V)*abs(I)\n",
+ "rea_P=abs(V)*abs(I)*sin(phase(Z))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The impedance is %.3f ohm at a phase angle of %.3f degrees.\" %(abs(Z),degrees(phase(Z)))\n",
+ "print \"The power factor is %.3f leading.\" %(pf)\n",
+ "print \"The supply voltage is %.3f V at a phase angle of %.3f degrees.\" %(abs(V),degrees(phase(V)))\n",
+ "print \"The voltage across resistor is %.3f V at a phase angle of %.3f degrees.\" %(abs(V_R),degrees(phase(V_R)))\n",
+ "print \"The voltage across capacitor is %.3f V at a phase angle of %.3f degrees.\" %(abs(V_C),-90)\n",
+ "print \"The apparent power is %.3f VA.\" %(app_P)\n",
+ "print \"The active power is %.3f W.\" %(act_P)\n",
+ "print \"The reactive power is %.3f VAr.\" %(rea_P)\n",
+ "print \"Note: Negative sign indicates the capacitor supplies reactive power.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The impedance is 277.308 ohm at a phase angle of -64.359 degrees.\n",
+ "The power factor is 0.433 leading.\n",
+ "The supply voltage is 249.578 V at a phase angle of -64.359 degrees.\n",
+ "The voltage across resistor is 108.000 V at a phase angle of 0.000 degrees.\n",
+ "The voltage across capacitor is 225.000 V at a phase angle of -90.000 degrees.\n",
+ "The apparent power is 224.620 VA.\n",
+ "The active power is 97.200 W.\n",
+ "The reactive power is -202.500 VAr.\n",
+ "Note: Negative sign indicates the capacitor supplies reactive power.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4,Page number: 279 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance of the circuit and state whether it is inductive or capacitive.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import pi,degrees,radians,cos,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=160.0 +120.0*1j #ac sinusoidal voltage(in Volts) \n",
+ "I=-4.0+10.0*1j #Current in circuit(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=V/I\n",
+ "\n",
+ "if Z.imag>0:\n",
+ " print(\"The nature of circuit is inductive\\n\")\n",
+ " pf_type=\"lagging\"\n",
+ "\n",
+ "elif Z.imag<0:\n",
+ " print(\"The nature of circuit is capacitive\\n\")\n",
+ " pf_type=\"leading\" \n",
+ " \n",
+ "else:\n",
+ " print(\"The nature of circuit is resistive\\n\")\n",
+ "\n",
+ "pf=cos(phase(Z))\n",
+ "act_P=abs(V)*abs(I)*pf\n",
+ "rea_P=abs(V)*abs(I)*sin(pi+phase(Z))\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power factor is %.3f %s.\" %(pf,pf_type)\n",
+ "print \"The active power is %.2f W.\" %(act_P)\n",
+ "print \"The reactive power is %.2f VAr.\" %(rea_P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nature of circuit is capacitive\n",
+ "\n",
+ "The power factor is 0.260 leading.\n",
+ "The active power is 560.00 W.\n",
+ "The reactive power is 2080.00 VAr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5,Page number: 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the values of the two circuit elements.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50 #Frequency of the source(in Hertz)\n",
+ "Z=10+10*1j #Impedance of the circuit(in Ohm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "R=Z.real\n",
+ "X_L=Z.imag\n",
+ "L=X_L/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The nature of the impedance indicates that the circiut is inductive.\\n\"\n",
+ "print \"The values of the two elements are: \\n(a)Resistance(R)=%.2f ohm \\n(b)Inductance(C)=%e H.\" %(R,L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nature of the impedance indicates that the circiut is inductive.\n",
+ "\n",
+ "The values of the two elements are: \n",
+ "(a)Resistance(R)=10.00 ohm \n",
+ "(b)Inductance(C)=3.183099e-02 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6,Page number: 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the values of the two circuit elements.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Frequency of the source(in Hertz)\n",
+ "Z=10.0-10.0*1j #Impedance of the circuit(in Ohm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2.0*pi*f\n",
+ "Y=1.0/Z\n",
+ "R=1/Y.real\n",
+ "C=Y.imag/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The nature of the impedance indicates that the circiut is capacitive.\\n\"\n",
+ "print \"The values of the two elements are: \\n(a)Resistance(R)=%.2f ohm \\n(b)Capacitance(C)=%e F.\" %(R,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nature of the impedance indicates that the circiut is capacitive.\n",
+ "\n",
+ "The values of the two elements are: \n",
+ "(a)Resistance(R)=20.00 ohm \n",
+ "(b)Capacitance(C)=1.591549e-04 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7,Page number: 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance,the current,the phase angle,the voltage across each element and power factor.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import cos,pi,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=12.0 #Resistance of the resistor(in Ohms)\n",
+ "L=0.15 #Self-inductance of the inductor(in Henry)\n",
+ "C=100e-06 #Capacitance of the capacitor(in Farad)\n",
+ "f=50 #Frequency of the source(in Hertz) \n",
+ "V=rect(100,0) #Supply voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "X_L=ang_freq*L\n",
+ "X_C=1/(ang_freq*C)\n",
+ "Z=R + (X_L-X_C)*1j\n",
+ "\n",
+ "if Z.imag>0:\n",
+ " pf_type=\"lagging\"\n",
+ "\n",
+ "elif Z.imag<0:\n",
+ " pf_type=\"leading\" \n",
+ " \n",
+ "else:\n",
+ " print(\"The nature of circuit is resistive\\n\")\n",
+ "\n",
+ "I=V/Z\n",
+ "V_R=abs(I)*R\n",
+ "V_C=abs(I)*X_C\n",
+ "V_L=abs(I)*X_L\n",
+ "pf=cos(phase(I))\n",
+ "app_P=abs(V)*abs(I)\n",
+ "avg_P=abs(V)*abs(I)*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The impedance is %.3f ohm at a phase angle of %.3f degrees.\" %(abs(Z),degrees(phase(Z)))\n",
+ "print \"(b)The current is %.3f A at a phase angle of %.3f degrees.\" %(abs(I),degrees(phase(I)))\n",
+ "print \"(c)The phase angle is %.3f degrees.\" %(degrees(phase(I)))\n",
+ "print \"(d)The voltage across the resistor is %.2f V.\" %(V_R) \n",
+ "print \" The voltage across the capacitor is %.2f V.\\n The voltage across the inductor is %.2f V.\" %(V_C,V_L)\n",
+ "print \"(e)The power factor is %.3f %s.\" %(pf,pf_type)\n",
+ "print \"(f)The apparent power is %.3f VA.\" %(app_P) \n",
+ "print \"(g)The average power is %.3f W.\" %(avg_P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The impedance is 19.439 ohm at a phase angle of 51.880 degrees.\n",
+ "(b)The current is 5.144 A at a phase angle of -51.880 degrees.\n",
+ "(c)The phase angle is -51.880 degrees.\n",
+ "(d)The voltage across the resistor is 61.73 V.\n",
+ " The voltage across the capacitor is 163.75 V.\n",
+ " The voltage across the inductor is 242.42 V.\n",
+ "(e)The power factor is 0.617 lagging.\n",
+ "(f)The apparent power is 514.431 VA.\n",
+ "(g)The average power is 317.567 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.8,Page number: 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the capacitor by applying Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "from math import sqrt,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" Note: All the impedances are expresssed in kilo ohm.\"\"\" \n",
+ "ang_freq=3000.0 #Angular frequency(in radians per second)\n",
+ "Vs_m=40.0 #Peak value of the supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vs_rms=Vs_m/sqrt(2.0)\n",
+ "Vs=rect(Vs_rms,0)\n",
+ "Zeq=1.5 + ((1.0-(2.0*1j))/(1j+1.0-2.0*1j))*1.0j\n",
+ "I=Vs/Zeq\n",
+ "Im=abs(I)*sqrt(2)\n",
+ "V_Th=Vs*(1j/(1.5+1j))\n",
+ "Z_Th=1+ ((1.5*1j)/(1.5+1j))\n",
+ "Vc=V_Th*((-2*1j)/(Z_Th-2*1j))\n",
+ "Z_L=Z_Th.real-Z_Th.imag*1j \n",
+ "C=1/(ang_freq*abs(Z_L.imag)*1000)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The expression for i(t) can be written as i(t)=%.1f sin(%dt%.2fdegrees) mA.\" %(Im,ang_freq,degrees(phase(I)))\n",
+ "print \"(b)The voltage across the capacitor by applying Thevenin's theorem is %.3f V at a phase angle of %.3f degrees.\" %(abs(Vc),degrees(phase(Vc)))\n",
+ "print \"(c)The values of the two elements of the load impedance that consumes maximum power are R=%e kilo Ohms and C=%e F.\" %(Z_L.real,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The expression for i(t) can be written as i(t)=16.0 sin(3000t-36.87degrees) mA.\n",
+ "(b)The voltage across the capacitor by applying Thevenin's theorem is 16.000 V at a phase angle of 8.130 degrees.\n",
+ "(c)The values of the two elements of the load impedance that consumes maximum power are R=1.461538e+00 kilo Ohms and C=4.814815e-07 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.9,Page number: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of resistance for a desired power factor.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "from cmath import atan\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "pf=0.8 #Power factor of the circuit\n",
+ "X_C=60.0 #Capacitive reactance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "sin_ang=sqrt(1-(pf*pf))\n",
+ "tan_ang=sin_ang/pf\n",
+ "R=X_C/tan_ang\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of R for which the power factor of the circuit is 0.8 is %.2f Ohms.\" %(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of R for which the power factor of the circuit is 0.8 is 80.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10,Page number: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance and the inductance of the coil.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vdc=20.0 #Supply dc voltage(in Volts)\n",
+ "Idc=4.0 #Current drawn by the coil(in Amperes)\n",
+ "f=50.0 #Frequency of supply voltage(in Hertz)\n",
+ "Vs=65.0 #Ac supply voltage(in Volts)\n",
+ "I=5.0 #Current drawn by the choke when connected ac supply(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=Vdc/Idc\n",
+ "Z=Vs/I\n",
+ "X_L=sqrt((Z*Z)-(R*R))\n",
+ "L=X_L/(2*pi*f)\n",
+ "pf=R/Z\n",
+ "P=Vs*I*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of the coil is %.2f Ohms and the inductance of the coil is %.5f H.\" %(R,L)\n",
+ "print \"(b)The power factor is %.3f lagging.\" %(pf)\n",
+ "print \"(c)The power(real) drawn by the coil is %.3f W.\" %(P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of the coil is 5.00 Ohms and the inductance of the coil is 0.03820 H.\n",
+ "(b)The power factor is 0.385 lagging.\n",
+ "(c)The power(real) drawn by the coil is 125.000 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.11,Page number: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance and inductance of the coil.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=240.0 #AC supply voltage(in Volts)\n",
+ "f1=50.0 #Frequency of the ac supply voltage(in Hertz) \n",
+ "I1=60.0 #First reading of the ammeter(in Amperes)\n",
+ "f2=100.0 #Frequency of the ac supply voltage(in Hertz)\n",
+ "I2=40.0 #Second reading of the ammeter(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z1=Vs/I1\n",
+ "Z2=Vs/I2\n",
+ "L=sqrt(((Z2*Z2)-(Z1*Z1))/((pow((200*pi),2.0))-(pow((100*pi),2.0))))\n",
+ "X1=2*pi*f1*L\n",
+ "R=sqrt((Z1*Z1)-(X1*X1))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance of the coil is %.2f Ohms.\" %(R)\n",
+ "print \"The inductance of the coil is %.5f H.\" %(L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of the coil is 3.06 Ohms.\n",
+ "The inductance of the coil is 0.00822 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.12,Page number: 287 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power consumed by the choke coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=100.0 #Resistance of the resistor(in Ohms)\n",
+ "V_R=200.0 #Voltage across resistor(in Volts)\n",
+ "V_Ch=300.0 #Voltage across choke coil(in Volts)\n",
+ "Vs=440.0 #Supply voltage(in Volts)\n",
+ "\n",
+ " \n",
+ "#Calculations:\n",
+ "pf=((Vs*Vs)-(V_R*V_R)-(V_Ch*V_Ch))/(2*V_R*V_Ch)\n",
+ "I=V_R/R\n",
+ "P=V_Ch*I*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power consumed by the choke coil is %.2f W.\" %(P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power consumed by the choke coil is 318.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.13,Page number: 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power dissipated in each coil.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=15.0 #Resistance of the first coil(in Ohms)\n",
+ "L1=0.2 #Inductance of the first coil(in Henry)\n",
+ "R2=25.0 #Resistance of the second coil(in Ohms)\n",
+ "L2=0.04 #Inductance of the second coil(in Henry)\n",
+ "V=230.0 #Supply voltage(in Volts)\n",
+ "f=50.0 #Frequency of supply voltage(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "X1=2*pi*f*L1\n",
+ "X2=2*pi*f*L2\n",
+ "Z1=R1+(1j*X1)\n",
+ "Z2=R2+(1j*X2)\n",
+ "Z=Z1+Z2\n",
+ "I=V/Z\n",
+ "V1=abs(I)*abs(Z1)\n",
+ "V2=abs(I)*abs(Z2)\n",
+ "P1=abs(I)*abs(I)*R1\n",
+ "P2=abs(I)*abs(I)*R2\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The voltage across the first coil is %.2f V and the voltage across the second coil is %.2f V.\" %(V1,V2)\n",
+ "print \"(b)The power dissipated by the first coil is %.2f W and power dissipated by the second coil is %.2f W.\" %(P1,P2)\n",
+ "print \"(c)The power factor of the whole circuit is %.3f lagging.\" %(pf) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The voltage across the first coil is 174.07 V and the voltage across the second coil is 75.40 V.\n",
+ "(b)The power dissipated by the first coil is 108.92 W and power dissipated by the second coil is 181.54 W.\n",
+ "(c)The power factor of the whole circuit is 0.469 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.14,Page number: 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current and power drawn from the source.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_A=8.0 #Current through coil A(in Amperes)\n",
+ "I_B=10.0 #Current through coil B(in Amperes)\n",
+ "V=100.0 #Voltage of the source(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "P_A=120.0 #Power delivered to coil A(in Watts) \n",
+ "P_B=500.0 #Power delivered to coil B(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z_A=V/I_A\n",
+ "Z_B=V/I_B\n",
+ "R_A=P_A/(I_A*I_A)\n",
+ "R_B=P_B/(I_B*I_B)\n",
+ "X_A=sqrt((Z_A*Z_A)-(R_A*R_A))\n",
+ "X_B=sqrt((Z_B*Z_B)-(R_B*R_B))\n",
+ "R=R_A+R_B\n",
+ "X=X_A+X_B\n",
+ "Z=sqrt((R*R)+(X*X))\n",
+ "I=V/Z\n",
+ "P=I*I*R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current when the two coils are in series is %.2f A and the power taken from the source is %.2f W.\" %(I,P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current when the two coils are in series is 4.52 A and the power taken from the source is 140.58 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.15,Page number: 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage drop across each coil.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=240.0 #Voltage of the source(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "R_A=5.0 #Resistance of coil A(in Ohms)\n",
+ "L_B=0.015 #Inductance of the coil B(in Henry)\n",
+ "P=3e03 #Active power(in Watts)\n",
+ "Q=2e03 #Reactive power(in VAr)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "S=sqrt((P*P)+(Q*Q))\n",
+ "I=S/V\n",
+ "R_B=(P/(I*I))-R_A\n",
+ "X_B=2*pi*f*L_B\n",
+ "X_A=(Q/(I*I))-X_B\n",
+ "L_A=X_A/(2*pi*f)\n",
+ "Z_A=sqrt((R_A*R_A)+(X_A*X_A))\n",
+ "Z_B=sqrt((R_B*R_B)+(X_B*X_B))\n",
+ "V_A=Z_A*I\n",
+ "V_B=Z_B*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of coil B is %.2f Ohms.\" %(R_B)\n",
+ "print \"(b)The inductance of coil A is %.5f Henry.\" %(L_A)\n",
+ "print \"(c)The voltage drop across coil A is %.2f V and across coil B is %.2f V.\" %(V_A,V_B)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of coil B is 8.29 Ohms.\n",
+ "(b)The inductance of coil A is 0.01321 Henry.\n",
+ "(c)The voltage drop across coil A is 97.61 V and across coil B is 143.29 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.16,Page number: 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power consumed by the circuit and the power factor of the circuit.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=100.0 #Power rating of the bulb(in Watts)\n",
+ "V=120.0 #Voltage rating of the bulb(in Volts)\n",
+ "Vs=240.0 #Supply voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I=P/V\n",
+ "V_R=Vs-V\n",
+ "R=V_R/I\n",
+ "pf_a=1.0\n",
+ "Pt_a=Vs*I\n",
+ "V_C=sqrt((Vs*Vs)-(V*V))\n",
+ "X_C=V_C/I\n",
+ "C=1/(2*pi*X_C*f)\n",
+ "pf_b=V/Vs\n",
+ "Pt_b=Vs*I*pf_b\n",
+ "Vr=I*10.0\n",
+ "V_L=sqrt((Vs*Vs)-((V+Vr)*(V+Vr)))\n",
+ "X_L=V_L/I\n",
+ "L=X_L/(2*pi*f)\n",
+ "V_R_c=V+Vr\n",
+ "pf_c=V_R_c/Vs\n",
+ "Pt_c=Vs*I*pf_c\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the component used R=%.2f Ohms.\" %(R)\n",
+ "print \" The total power consumed is %.2f W.\" %(Pt_a)\n",
+ "print \" The power factor is %.2f.\" %(pf_a)\n",
+ "print \"(b)The value of the component used C=%e Farad.\" %(C)\n",
+ "print \" The total power consumed is %.2f W.\" %(Pt_b)\n",
+ "print \" The power factor is %.2f leading.\" %(pf_b)\n",
+ "print \"(c)The value of the component used R=10 Ohms and L=%.3f Henry.\" %(L)\n",
+ "print \" The total power consumed is %.2f W.\" %(Pt_c)\n",
+ "print \" The power factor is %.3f lagging.\" %(pf_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the component used R=144.00 Ohms.\n",
+ " The total power consumed is 200.00 W.\n",
+ " The power factor is 1.00.\n",
+ "(b)The value of the component used C=1.276224e-05 Farad.\n",
+ " The total power consumed is 100.00 W.\n",
+ " The power factor is 0.50 leading.\n",
+ "(c)The value of the component used R=10 Ohms and L=0.775 Henry.\n",
+ " The total power consumed is 106.94 W.\n",
+ " The power factor is 0.535 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.17,Page number: 289\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of capacitance C in the cirucit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=20.0 #Resistance connected in series(in Ohms)\n",
+ "L=15e-03 #Pure inductance in parallel with the capacitor(in Henry)\n",
+ "ang_fre=1000.0 #Angular frequency of voltage source(in radians per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "X_L=ang_fre*L\n",
+ "X=R*tan(pi/4.0)\n",
+ "\"\"\"Case 1:(X is inductive)\"\"\"\n",
+ "X_C1=1.0/((1.0/X_L)-(1.0/X))\n",
+ "C1=1.0/(ang_fre*X_C1)\n",
+ "\"\"\"Case 2:(X is capacitive)\"\"\"\n",
+ "X_C2=1.0/((1.0/X_L)+(1.0/X))\n",
+ "C2=1.0/(ang_fre*X_C2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance is:\"\n",
+ "print \"Case 1: If net reactance X is inductive, C=%e Farad.\" %(C1) \n",
+ "print \"Case 2: If net reactance X is capacitive, C=%e Farad.\" %(C2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance is:\n",
+ "Case 1: If net reactance X is inductive, C=1.666667e-05 Farad.\n",
+ "Case 2: If net reactance X is capacitive, C=1.166667e-04 Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.18,Page number: 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding total current in the circuit.\"\"\"\n",
+ "\n",
+ "from cmath import phase\n",
+ "from math import degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Z1=(12+1j*15) #Impedance of the first branch(in Ohms) \n",
+ "Z2=(8-1j*4) #Impedance of the second branch(in Ohms)\n",
+ "V=(230+1j*0) #Potential difference across the parallel combination(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V/Z1\n",
+ "I2=V/Z2\n",
+ "I=I1+I2\n",
+ "P=abs(V)*abs(I)*cos(phase(I))\n",
+ "P1=abs(I1)*abs(I1)*(Z1.real)\n",
+ "P2=abs(I2)*abs(I2)*(Z2.real)\n",
+ "pf1=Z1.real/abs(Z1)\n",
+ "pf2=Z2.real/abs(Z2)\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current supplied to branch 1 is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1))) \n",
+ "print \" The current supplied to branch 2 is %.2f A at a phase angle of %.2f degrees.\" %(abs(I2),degrees(phase(I2))) \n",
+ "print \" The total current is %.2f A at a phase angle of %.2f degrees.\\n\" %(abs(I),degrees(phase(I)))\n",
+ "print \"(b)The power consumed by branch 1 is %.2f W.\" %(P1)\n",
+ "print \" The power consumed by branch 2 is %.2f W.\" %(P2)\n",
+ "print \" The total power consumed is %.2f W.\\n\" %(P)\n",
+ "print \"(c)The power factor of branch 1 is %.4f lagging.\" %(pf1)\n",
+ "print \" The power factor of branch 2 is %.4f leading.\" %(pf2)\n",
+ "print \" The overall power factor of the circuit is %.4f leading.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current supplied to branch 1 is 11.97 A at a phase angle of -51.34 degrees.\n",
+ " The current supplied to branch 2 is 25.71 A at a phase angle of 26.57 degrees.\n",
+ " The total current is 30.56 A at a phase angle of 4.04 degrees.\n",
+ "\n",
+ "(b)The power consumed by branch 1 is 1720.33 W.\n",
+ " The power consumed by branch 2 is 5290.00 W.\n",
+ " The total power consumed is 7010.33 W.\n",
+ "\n",
+ "(c)The power factor of branch 1 is 0.6247 lagging.\n",
+ " The power factor of branch 2 is 0.8944 leading.\n",
+ " The overall power factor of the circuit is 0.9975 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.19,Page number: 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance and inductance of a coil.\"\"\"\n",
+ "\n",
+ "from math import acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=230.0 #Voltage of the supply(in Volts)\n",
+ "f=50.0 #Frequency of the supply ac voltage(in Hertz)\n",
+ "R=50.0 #Reistance in series with the coil(in Ohms) \n",
+ "V_coil=180.0 #Voltage across coil(in Volts)\n",
+ "V_R=130.0 #Voltage across resistance(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I=V_R/R\n",
+ "\"\"\"From parallelogram OACB,the angle theta is calculated.\"\"\"\n",
+ "cos_theta=((V*V)-(V_R*V_R)-(V_coil*V_coil))/(2*V_R*V_coil)\n",
+ "theta=acos(cos_theta)\n",
+ "V_L=V_coil*sin(theta)\n",
+ "V_r=V_coil*cos(theta)\n",
+ "L=V_L/(I*2*pi*f)\n",
+ "r=V_r/I\n",
+ "P=I*V_r\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of the coil is %.2f Ohms and the inductance is %.2f H.\" %(r,L)\n",
+ "print \"(b)The power dissipated in the coil is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of the coil is 5.33 Ohms and the inductance is 0.22 H.\n",
+ "(b)The power dissipated in the coil is 36.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.20,Page number: 291\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the component values of the circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,radians,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm=141.4 #Peak value of supply voltage(in Volts) \n",
+ "Im=7.07 #Peak value of current in the series circuit(in Amperes)\n",
+ "ang_fre=2000.0 #Angular frequency of the ac signal(in radians per second) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=Vm/sqrt(2.0)\n",
+ "I=Im/sqrt(2.0)\n",
+ "Z=V/I\n",
+ "\"\"\" We know that V=I*Z; \n",
+ " \n",
+ " 100=5*sqrt((R*R)+(X_C*X_C));\n",
+ " \n",
+ " (R*R)+(X_C*X_C)=400; \n",
+ " \n",
+ " From the triangle OAB,\n",
+ " \n",
+ " cos(36.87)=V_R/V; \"\"\"\n",
+ "R=(V*cos(radians(36.87)))/I\n",
+ "X_C=sqrt((Z*Z)-(R*R))\n",
+ "C=1.0/(ang_fre*X_C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The elements of the circuit are R=%.2f Ohms and C=%e Farad.\" %(R,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The elements of the circuit are R=16.00 Ohms and C=4.166657e-05 Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.21,Page number: 292\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current by Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=rect(100,radians(20))\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Using voltage divider rule,\"\"\"\n",
+ "Z2=((1j*20)*(15-1j*30))/((1j*20)+(15-1j*30))\n",
+ "Z=10+Z2\n",
+ "I=Vs/Z\n",
+ "V2_div=Vs*(Z2/(10+Z2))\n",
+ "V1_div=V2_div*((-1j*30)/(15-1j*30))\n",
+ "\"\"\"Using Thevenin's theorem,\"\"\"\n",
+ "V_Th=Vs*((15-1j*30)/(10+15-1j*30))\n",
+ "Z_Th=(10*(15-1j*30))/(10+(15-1j*30))\n",
+ "V2=V_Th*((1j*20)/(Z_Th+1j*20))\n",
+ "V_Th=Vs*((1j*20)/(10+1j*20))\n",
+ "Z_Th=15+(1.0/((1.0/10)+(1.0/(1j*20))))\n",
+ "V1=V_Th*((-1j*30)/(Z_Th-1j*30))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)By voltage divider rule,\"\n",
+ "print \"(i)The current I is %.2f A at an angle of %.2f degrees.\" %(abs(I),degrees(phase(I))) \n",
+ "print \"(ii)The voltage V1 is %.2f V at an angle of %.2f degrees.\" %(abs(V1_div),degrees(phase(V1_div)))\n",
+ "print \"(b)By applying Thevenin's theorem,\"\n",
+ "print \"(i)The voltage V1 is %.2f V at an angle of %.2f degrees.\" %(abs(V1),degrees(phase(V1)))\n",
+ "print \"(ii)The voltage V2 is %.2f V at an angle of %.2f degrees.\" %(abs(V2),degrees(phase(V2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)By voltage divider rule,\n",
+ "(i)The current I is 2.32 A at an angle of -28.62 degrees.\n",
+ "(ii)The voltage V1 is 77.30 V at an angle of 5.07 degrees.\n",
+ "(b)By applying Thevenin's theorem,\n",
+ "(i)The voltage V1 is 77.30 V at an angle of 5.07 degrees.\n",
+ "(ii)The voltage V2 is 86.42 V at an angle of 31.63 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.22,Page number: 293\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current by Norton's theorem.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Is=rect(20,radians(45)) #Current supplied by current source(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Using current divider rule,\"\"\"\n",
+ "Z2=(1j*3)+1.0/((1.0/4)+(1.0/(-1j*5)))\n",
+ "I=Is*(2/(Z2+2))\n",
+ "I_R_div=I*((-1j*5)/(4-1j*5))\n",
+ "\"\"\"Using Norton's theorem,\"\"\"\n",
+ "I_N=Is*(2/(2+1j*3))\n",
+ "Z_N=1.0/((1.0/(2+1j*3))+(1.0/(-1j*5)))\n",
+ "I_R=I_N*(Z_N/(Z_N+4))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)By current divider rule,\"\n",
+ "print \" The current I_R is %.2f A at an angle of %.2f degrees.\" %(abs(I_R_div),degrees(phase(I_R_div)))\n",
+ "print \"(a)By Norton's theorem,\"\n",
+ "print \" The current I_R is %.2f A at an angle of %.2f degrees.\" %(abs(I_R),degrees(phase(I_R)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)By current divider rule,\n",
+ " The current I_R is 6.85 A at an angle of -6.95 degrees.\n",
+ "(a)By Norton's theorem,\n",
+ " The current I_R is 6.85 A at an angle of -6.95 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.23,Page number: 294\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage by Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=rect(200,radians(30.0))\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z2=((40)*(20+1j*50))/(40+(20+1j*50))\n",
+ "V2=(Vs*Z2)/(Z2-1j*20)\n",
+ "V_div=V2*(20/(20+1j*50))\n",
+ "V_Th=Vs*(40/(40-1j*20))\n",
+ "Z_Th=(1j*50)+1.0/((1.0/(-1j*20))+(1.0/40))\n",
+ "V=(V_Th*20)/(Z_Th+20)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)V using voltage divider rule is %.2f V at an angle of %.2f degrees.\" %(abs(V_div),degrees(phase(V_div)))\n",
+ "print \"(b)The voltage V using Thevenin's theorem is %.2f V at an angle of %.2f degrees.\" %(abs(V),degrees(phase(V)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)V using voltage divider rule is 81.23 V at an angle of 6.04 degrees.\n",
+ "(b)The voltage V using Thevenin's theorem is 81.23 V at an angle of 6.04 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter11.ipynb b/Basic_Electrical_Engineering/Chapter11.ipynb
new file mode 100755
index 00000000..e9007ce3
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter11.ipynb
@@ -0,0 +1,929 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: RESONANCE IN AC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1,Page number: 315"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonant frequency,quality factor,voltage across each element in a series RLC circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=12.0 #Resistance of resistor(in Ohms)\n",
+ "L=0.15 #Self-inductance of inductor(in Henry)\n",
+ "C=100e-06 #Capacitance of capacitor(in Farads) \n",
+ "V=100.0 #Voltage(rms) of ac source(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "resonant_freq=1/(2.0*pi*sqrt(L*C))\n",
+ "I_max=V/R\n",
+ "freq_c=(sqrt((1.0/(L*C))-(0.5*pow((R/L),2))))/(2.0*pi)\n",
+ "freq_l=1.0/(sqrt((L*C)-(0.5*pow((R*C),2)))*2*pi)\n",
+ "cap_rea=1.0/(2.0*pi*freq_l*C)\n",
+ "ind_rea=2.0*pi*round(freq_l,2)*L\n",
+ "Q=cap_rea/R\n",
+ "Vr=V\n",
+ "Vl=Q*V\n",
+ "Vc=Vl\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The Resonant frequency(at which the circuit current becomes maximum) is %.2f Hz.\" %(resonant_freq)\n",
+ "print \"(b)The maximum current supplied by the source is %.2f A.\" %(I_max)\n",
+ "print \"(c)The frequency at which voltage across the capacitor is maximum is %.2f Hz.\" %(freq_c)\n",
+ "print \"(d)The frequency at which voltage across the inducttor is maximum is %.2f Hz.\" %(freq_l)\n",
+ "print \"(e)The inductive reactance is %.2f Ohms.\" %(ind_rea)\n",
+ "print \"(f)The capacitive reactance is %.2f Ohms.\" %(cap_rea)\n",
+ "print \"(g)The quality factor of the circiut is %.2f.\" %(Q)\n",
+ "print \"(h)The voltage drop across resistor is %.2f V.\" %(Vr)\n",
+ "print \" The voltage drop across inductor is %.2f V.\" %(Vl)\n",
+ "print \" The voltage drop across capacitor is %.2f V.\" %(Vc) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The Resonant frequency(at which the circuit current becomes maximum) is 41.09 Hz.\n",
+ "(b)The maximum current supplied by the source is 8.33 A.\n",
+ "(c)The frequency at which voltage across the capacitor is maximum is 40.10 Hz.\n",
+ "(d)The frequency at which voltage across the inducttor is maximum is 42.12 Hz.\n",
+ "(e)The inductive reactance is 39.70 Ohms.\n",
+ "(f)The capacitive reactance is 37.79 Ohms.\n",
+ "(g)The quality factor of the circiut is 3.15.\n",
+ "(h)The voltage drop across resistor is 100.00 V.\n",
+ " The voltage drop across inductor is 314.91 V.\n",
+ " The voltage drop across capacitor is 314.91 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2,Page number: 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance value to give resonance in a series RLC circuit. \"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=50.0 #Resonant frequency(in Hertz)\n",
+ "L=0.5 #Self-inductance of inductor(in Henry)\n",
+ "R=4.0 #Resistance of resistor(in Ohms)\n",
+ "V=100.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "I_max=V/R\n",
+ "V_L=I_max*(2*pi*res_freq*L)\n",
+ "V_C=V_L\n",
+ "Q=(2.0*pi*res_freq*L)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The capacitance to give resonance is %e F.\" %(C)\n",
+ "print \"(b)The voltage across the inductor is %.2f V.\" %(V_L)\n",
+ "print \" The voltage across the capacitor is %.2f V.\" %(V_C)\n",
+ "print \"(c)The quality factor of the circuit is %.2f.\" %(Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The capacitance to give resonance is 2.026424e-05 F.\n",
+ "(b)The voltage across the inductor is 3926.99 V.\n",
+ " The voltage across the capacitor is 3926.99 V.\n",
+ "(c)The quality factor of the circuit is 39.27.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3,Page number: 317 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance,the circuit current and the voltage across the capacitor under resonance.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=175e03 #Resonant frequency(in Hertz) \n",
+ "V=0.85 #Voltage applied(in Volts)\n",
+ "Q=50.0 #Quality factor of the coil\n",
+ "C=320e-012 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=1/(pow((2*pi*res_freq),2)*C)\n",
+ "ind_rea=2*pi*res_freq*L\n",
+ "R=ind_rea/Q\n",
+ "Io=V/R\n",
+ "Vc=Q*V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of inductance is %e H.\" %(L)\n",
+ "print \"The circuit current is %e A.\" %(Io)\n",
+ "print \"The voltage across the capacitor under resonance is %.2f V.\" %(Vc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of inductance is 2.584724e-03 H.\n",
+ "The circuit current is 1.495398e-02 A.\n",
+ "The voltage across the capacitor under resonance is 42.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4,Page number: 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current at the resonant frequency and the energy stored by inductor.\"\"\"\n",
+ "\n",
+ "from math import pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=5e03 #Resonant frequency(in Hertz)\n",
+ "L=1e-03 #Self-inductance of the inductor(in Henry)\n",
+ "V=120.0 #Voltage of the supply(in Volts)\n",
+ "R=2.0 #Resistance of the coil(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "I_max=V/R\n",
+ "\"\"\" U=0.5*L*I*I=L*Irms*Irms\"\"\"\n",
+ "U=L*I_max*I_max\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of capacitance is %e F.\" %(C)\n",
+ "print \"(a)The current at the resonance frequency is %.2f A.\" %(I_max)\n",
+ "print \"(b)The maximum instantaneous energy is %.2f J.\" %(U)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of capacitance is 1.013212e-06 F.\n",
+ "(a)The current at the resonance frequency is 60.00 A.\n",
+ "(b)The maximum instantaneous energy is 3.60 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5,Page number: 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonance frequency and the quality factor for the overall circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=0.51 #Resistor of the resistor-1(in Ohms) \n",
+ "R2=1.3 #Resistor of the resistor-2(in Ohms) \n",
+ "R3=0.24 #Resistor of the resistor-3(in Ohms)\n",
+ "L1=32e-03 #Self-inductance of the inductor-1(in Henry)\n",
+ "L2=15e-03 #Self-inductance of the inductor-2(in Henry)\n",
+ "C1=25e-06 #Capacitance of the capacitor-1(in Farads)\n",
+ "C2=62e-06 #Capacitance of the capacitor-2(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Req=R1+R2+R3\n",
+ "Leq=L1+L2\n",
+ "Ceq=(C1*C2)/(C1+C2)\n",
+ "res_freq=1/(2*pi*sqrt(Leq*Ceq))\n",
+ "Q=(sqrt(Leq/Ceq))/Req\n",
+ "Q1=(2*pi*res_freq*L1)/R1\n",
+ "Q2=(2*pi*res_freq*L2)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resonance frequency is %.2f Hz.\" %(res_freq)\n",
+ "print \"(b)The quality factor of the overall circuit is %.2f.\" %(Q)\n",
+ "print \"(c)The quality factor of coil-1 is %.2f.\" %(Q1)\n",
+ "print \"(d)The quality factor of coil-2 is %.2f.\" %(Q2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resonance frequency is 173.93 Hz.\n",
+ "(b)The quality factor of the overall circuit is 25.05.\n",
+ "(c)The quality factor of coil-1 is 68.57.\n",
+ "(d)The quality factor of coil-2 is 12.61.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6,Page number: 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies of a series ac circuit.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "bandwidth=75e03 #Bandwidth of the resonant circuit(in Hertz) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "pro=pow((150e03),2)\n",
+ "sum=sqrt(pow(bandwidth,2)+(4*pro))\n",
+ "f2=(sum+bandwidth)/2.0\n",
+ "f1=(sum-bandwidth)/2.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Lower Half-power frequency is %e Hz.\" %(f1)\n",
+ "print \"Upper Half-power frequency is %e Hz.\" %(f2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lower Half-power frequency is 1.171165e+05 Hz.\n",
+ "Upper Half-power frequency is 1.921165e+05 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7,Page number: 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,quality factor and the dynamic impedance of a series-parallel ac circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=200e-06 #Self-inductance of the inductor coil(in Henry) \n",
+ "res_freq=1e06 #Resonant frequency(in Hertz)\n",
+ "R=20.0 #Resistance of the coil(in Ohms)\n",
+ "Rs=8e03 #Series resistance(in Ohms)\n",
+ "V=230.0 #Voltage(rms) of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "XL=2*pi*res_freq*L\n",
+ "Q=XL/R\n",
+ "Zo=L/(C*R)\n",
+ "Z=Zo+Rs\n",
+ "I=V/Z\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of capacitance to cause resonance is %e F.\" %(C)\n",
+ "print \"(b)The Q factor of the circuit is %.5f.\" %(Q)\n",
+ "print \"(c)The dynamic impedance of the parallel resonant circuit is %.2f Ohms.\" %(Zo)\n",
+ "print \"(d)The total line current is %e A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of capacitance to cause resonance is 1.266515e-10 F.\n",
+ "(b)The Q factor of the circuit is 62.83185.\n",
+ "(c)The dynamic impedance of the parallel resonant circuit is 78956.84 Ohms.\n",
+ "(d)The total line current is 2.644990e-03 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8,Page number: 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonant frequency,Q-factor and bandwidth of a practical parallel resonant circuit.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=150.0 #Resistance of the coil(in Ohms)\n",
+ "L=0.24 #Self-inductance of the coil(in Henry)\n",
+ "C=3e-06 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res_freq=(sqrt(1-((R*R*C)/L)))/(2*pi*sqrt(L*C))\n",
+ "Q=(2*pi*res_freq*L)/R\n",
+ "BW=res_freq/Q\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resonant frequency is %.2f Hz.\" %(res_freq)\n",
+ "print \"The quality factor is %.2f.\" %(Q)\n",
+ "print \"The bandwidth is %.2f Hz.\" %(BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resonant frequency is 159.02 Hz.\n",
+ "The quality factor is 1.60.\n",
+ "The bandwidth is 99.47 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9,Page number: 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the source frequency and the current supplied by the source.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow,degrees\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=125.0 #Voltage of the source(in Volts)\n",
+ "C=20.5e-06 #Capacitance of the capacitor(in Farads)\n",
+ "R=1.06 #Resistance of the coil(in Ohms)\n",
+ "L=25.4e-03 #Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "fo=1.0/(2*pi*sqrt(L*C))\n",
+ "Io=V/R\n",
+ "V_L=Io*(2*pi*fo*L)\n",
+ "V_C=V_L\n",
+ "X_L=(2*pi*fo*L)\n",
+ "Z_coil=R+(1j*X_L)\n",
+ "V_coil=Io*Z_coil\n",
+ "I=300.0/X_L\n",
+ "R_new=V/I\n",
+ "Rx=R_new-R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a) (i)The source frequency is %.2f Hz, and\\n (ii)The current supplied by the source is %.2f A.\\n\" %(fo,Io)\n",
+ "print \"(b) (i)The voltage across the capacitor is %.2f V and\" %(V_C)\n",
+ "print \" (ii)The voltage across the coil is %.2f V at an angle of %.2f degrees.\\n\" %(abs(V_coil),degrees(phase(V_coil)))\n",
+ "print \"(c)The resistance that must be connected in series with the circuit to limit the capacitor voltage to 300V is %.3f Ohms.\" %(Rx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) (i)The source frequency is 220.56 Hz, and\n",
+ " (ii)The current supplied by the source is 117.92 A.\n",
+ "\n",
+ "(b) (i)The voltage across the capacitor is 4150.92 V and\n",
+ " (ii)The voltage across the coil is 4152.80 V at an angle of 88.28 degrees.\n",
+ "\n",
+ "(c)The resistance that must be connected in series with the circuit to limit the capacitor voltage to 300V is 13.607 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.10,Page number: 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the maximum instantaneous energy stored in the inductor.\"\"\"\n",
+ "\n",
+ "from math import pow,pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3.0 #Resistance of the coil(in Ohms)\n",
+ "L=12e-03 #Self-inductance of the coil(in Henry)\n",
+ "fo=9e03 #Resonant frequency(in Hertz)\n",
+ "V=240.0 #Supply voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "Io=V/R\n",
+ "ener=0.5*L*Io*Io\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance to be connected in series with the coil is %e F.\" %(C)\n",
+ "print \"The maximum instantaneous energy stored in the inductor is %.2f J.\" %(ener)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance to be connected in series with the coil is 2.605998e-08 F.\n",
+ "The maximum instantaneous energy stored in the inductor is 38.40 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.11,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the parameters of a series RLC circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fo=10e03 #Resonant frequency(in Hertz)\n",
+ "BW=1e03 #Bandwidth(in HErtz)\n",
+ "P=15.3 #Power drawn(in Watts)\n",
+ "V=200.0 #Voltage of generator(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_R=V\n",
+ "R=(V_R*V_R)/P\n",
+ "\"\"\" Q=fo/BW=(2*pi*fo*L)/R; Q=Quality factor of the circuit. \"\"\"\n",
+ "L=R/(2*pi*BW)\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The parameters of the circuit are:\\n R=%.2f Ohms,\\n L=%.3f H,\\n C=%e F.\" %(R,L,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The parameters of the circuit are:\n",
+ " R=2614.38 Ohms,\n",
+ " L=0.416 H,\n",
+ " C=6.087677e-10 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.12,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies and the circuit current.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fo=200.0 #Resonant frequency(in Hertz)\n",
+ "V=400.0 #Voltage of the source(in Volts)\n",
+ "R=20e-03 #Resistance of the coil(in Ohms)\n",
+ "L=6e-03 #Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "Io=V/R\n",
+ "X_C=1.0/(2*pi*fo*C)\n",
+ "V_C=Io*X_C\n",
+ "Im=sqrt(2)*Io\n",
+ "U_max=0.5*L*Im*Im\n",
+ "Q=(2*pi*fo*L)/R\n",
+ "BW=fo/Q\n",
+ "f1=fo-(BW/2.0)\n",
+ "f2=fo+(BW/2.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The capacitance of the capacitor is %e F.\" %(C)\n",
+ "print \"(b)The circuit current is %.2f kA.\" %(Io/1000)\n",
+ "print \"(c)The voltage across the capacitor is %.2f kV.\" %(V_C/1000)\n",
+ "print \"(d)The maximum energy stored in the coil is %.2f MJ.\" %(U_max/1000000)\n",
+ "print \"(e)The lower half-power frequency is %.3f Hz and the upper half-power frequency is %.3f Hz.\" %(f1,f2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The capacitance of the capacitor is 1.055429e-04 F.\n",
+ "(b)The circuit current is 20.00 kA.\n",
+ "(c)The voltage across the capacitor is 150.80 kV.\n",
+ "(d)The maximum energy stored in the coil is 2.40 MJ.\n",
+ "(e)The lower half-power frequency is 199.735 Hz and the upper half-power frequency is 200.265 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.13,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the bandwidth,resonant frequency,inductance and capacitance.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=1e03 #Resistance of the resistor(in Ohms)\n",
+ "f1=20e03 #Lower half-power frequency(in Hertz) \n",
+ "f2=100e03 #Upper half-power frequency(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "BW=f2-f1\n",
+ "res_freq=sqrt(f1*f2)\n",
+ "Q=res_freq/BW\n",
+ "L=(Q*R)/(2*pi*res_freq)\n",
+ "C=1.0/(pow((2*pi*res_freq),2)*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The bandwidth is %.2f kHz.\" %(BW/1000.0)\n",
+ "print \"(b)The resonant frequency is %.2f kHz.\" %(res_freq/1000.0)\n",
+ "print \"(c)The inductance is %e H.\" %(L)\n",
+ "print \"(d)The capacitance is %e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The bandwidth is 80.00 kHz.\n",
+ "(b)The resonant frequency is 44.72 kHz.\n",
+ "(c)The inductance is 1.989437e-03 H.\n",
+ "(d)The capacitance is 6.366198e-09 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.14,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power at half-power frequencies.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=5.0 #Resistance of resistor(in Ohms)\n",
+ "V=20.0 #Voltage of the source(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zo=R\n",
+ "Io=V/Zo\n",
+ "Po=(Io*Io)*R\n",
+ "P_half=Po/2.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power at half-power frequencies is %.2f W.\" %(P_half) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power at half-power frequencies is 40.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.15,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies and the quality factor.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=100.0 #Resonant frequency(in Hertz)\n",
+ "V=240.0 #Voltage of the source(in Volts)\n",
+ "R=55e-03 #Resistance of the coil(in Ohms)\n",
+ "L=7e-03 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*res_freq),2)*L)\n",
+ "Q=(2*pi*res_freq*L)/R\n",
+ "BW=res_freq/Q\n",
+ "f1=res_freq-(BW/2.0)\n",
+ "f2=res_freq+(BW/2.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the capacitance is %e F.\" %(C)\n",
+ "print \"(b)The quality factor of the circuit is %.2f.\" %(Q)\n",
+ "print \"(c)The lower half-power frequency is %.2f Hz and The upper half-power frequency is %.2f Hz.\" %(f1,f2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the capacitance is 3.618614e-04 F.\n",
+ "(b)The quality factor of the circuit is 79.97.\n",
+ "(c)The lower half-power frequency is 99.37 Hz and The upper half-power frequency is 100.63 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.16,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonance frequency and the effective resistance at resonance.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=20.0 #Resistance of the coil(in Ohms)\n",
+ "L=0.2 #Inductance of the coil(in Henry)\n",
+ "C=100e-06 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res_freq=sqrt(1-((R*R*C)/L))/(2*pi*sqrt(L*C))\n",
+ "Zo=L/(C*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The frequency at which the circuit behaves as a non-inductive reactance is %.2f Hz.\" %(res_freq)\n",
+ "print \"The effective resistance at resonance is %.2f Ohms.\" %(Zo) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency at which the circuit behaves as a non-inductive reactance is 31.83 Hz.\n",
+ "The effective resistance at resonance is 100.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.17,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the quality factor at the upper tuning frequency.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=20e-06 #Self-inductance of the coil(in Henry)\n",
+ "fo_1=570e03 #Lower tuning frequency(in Hertz) \n",
+ "fo_2=1560e03 #Upper tuning frequency(in Hertz)\n",
+ "Q1=50.0 #Quality factor at the lower tuning frequency\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C1=1.0/(pow((2*pi*fo_1),2)*L)\n",
+ "C2=1.0/(pow((2*pi*fo_2),2)*L)\n",
+ "R=(2*pi*fo_1*L)/Q1\n",
+ "BW=fo_1/Q1\n",
+ "Q2=(2*pi*fo_2*L)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The range of tuning capacitor is from %.3f nF to %.3f nF.\" %((C2*1e09),(C1*1e09))\n",
+ "print \"(b)The resistance of the coil is %.3f Ohms and the bandwidth of the circuit is %.3f kHz.\" %(R,(BW/1000))\n",
+ "print \"(c)The quality factor of the circuit at the upper tuning frequency is %.3f.\" %(Q2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The range of tuning capacitor is from 0.520 nF to 3.898 nF.\n",
+ "(b)The resistance of the coil is 1.433 Ohms and the bandwidth of the circuit is 11.400 kHz.\n",
+ "(c)The quality factor of the circuit at the upper tuning frequency is 136.842.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter12.ipynb b/Basic_Electrical_Engineering/Chapter12.ipynb
new file mode 100755
index 00000000..eb96a9e1
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter12.ipynb
@@ -0,0 +1,1251 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: THREE-PHASE CIRCUITS AND SYSTEMS "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1,Page number: 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current drawn from the power mains by a balanced three-phase load.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=32 #Resistance of the load(in Ohms)\n",
+ "X_L=24 #Inductive reactance of the load(in Ohms) \n",
+ "V_L=400 #Line Voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=R + X_L *1j\n",
+ "Z_mod=abs(Z)\n",
+ "V_ph_star=V_L/(sqrt(3))\n",
+ "I_ph_star=V_ph_star/Z_mod\n",
+ "I_L_star=I_ph_star\n",
+ "V_ph_delta=V_L\n",
+ "I_ph_delta=V_ph_delta/Z_mod\n",
+ "I_L_delta=I_ph_delta*(sqrt(3))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For star connection:\"\n",
+ "print \"The current drawn from the power mains is %.3f A.\" %(I_L_star)\n",
+ "print \"(b)For delta connection:\"\n",
+ "print \"The current drawn from the power mains is %.3f A.\" %(I_L_delta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For star connection:\n",
+ "The current drawn from the power mains is 5.774 A.\n",
+ "(b)For delta connection:\n",
+ "The current drawn from the power mains is 17.321 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2,Page number: 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in each line and the current in the nuetral conductor for a star-connected three-phase system.\"\"\"\n",
+ "\n",
+ "from math import sqrt,cos,sin,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=415 #Line voltage(in Volts)\n",
+ "P_R=10e03 #Load in Red line(in kilo-Watts)\n",
+ "P_Y=8e03 #Load in Yellow line(in kilo-Watts)\n",
+ "P_B=5e03 #Load in Blue line(in kilo-Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph=V_L/sqrt(3)\n",
+ "I_R=P_R/Vph\n",
+ "I_Y=P_Y/Vph\n",
+ "I_B=P_B/Vph\n",
+ "I_H=(I_Y*cos(pi/6))-(I_B*cos(pi/6))\n",
+ "I_V=I_R-(I_Y*sin(pi/6))-(I_B*sin(pi/6))\n",
+ "I_N=sqrt((I_H*I_H)+(I_V*I_V))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current taken by the 10-kW load is %.2f A.\" %(I_R) \n",
+ "print \" The current taken by the 8-kW load is %.2f A.\" %(I_Y) \n",
+ "print \" The current taken by the 5-kW load is %.2f A.\" %(I_B)\n",
+ "print \"(b)The current in the nuetral conductor is %.2f A.\" %(I_N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current taken by the 10-kW load is 41.74 A.\n",
+ " The current taken by the 8-kW load is 33.39 A.\n",
+ " The current taken by the 5-kW load is 20.87 A.\n",
+ "(b)The current in the nuetral conductor is 18.19 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3,Page number: 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the phase currents and the line currents.\"\"\"\n",
+ "\n",
+ "from math import cos,pi,atan,radians,degrees,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50 #Frequency of the source(in Hertz)\n",
+ "V_L=415 #Line Voltage(in Volts)\n",
+ "R1=100 #Resistance of the first load(in Ohms)\n",
+ "R2=20.0 #Resistance of the second load(in Ohms)\n",
+ "L2=191e-03 #Self-inductance of the second load(in Henry)\n",
+ "R3=0.0 #Resistance of the third load(in Ohms)\n",
+ "C3=30e-06 #Capacitance of the third load(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z1=R1\n",
+ "angle_1=0.0\n",
+ "X2=2*pi*f*L2\n",
+ "Z2=sqrt((R2*R2)+(X2*X2))\n",
+ "angle_2=atan(X2/R2)\n",
+ "Z3=1/(2*pi*f*C3)\n",
+ "angle_3=pi/2\n",
+ "Vph=V_L\n",
+ "I1=Vph/Z1\n",
+ "I2=Vph/Z2\n",
+ "I3=Vph/Z3\n",
+ "I_R=sqrt((I1*I1)+(I3*I3)+(2*I1*I3*cos(pi/6)))\n",
+ "angle_Y=radians(degrees(angle_2)-60)\n",
+ "I_Y=sqrt((I1*I1)+(I2*I2)+(2*I1*I2*cos(angle_Y)))\n",
+ "angle_B=pi-angle_Y-(pi/6)\n",
+ "I_B=sqrt((I2*I2)+(I3*I3)+(2*I2*I3*cos(angle_B)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The phase current I1 in the load RY is %.2f A in phase with V_RY.\" %(I1) \n",
+ "print \" The phase current I2 in load YB is %.2f A lagging V_YB by %.2f degrees.\" %(I2,degrees(angle_2)) \n",
+ "print \" The phase current I3 in load BR is %.2f A leading V_BR by %.2f degrees.\" %(I3,degrees(angle_3))\n",
+ "print \"(b)The line current I_R is %.2f A.\" %(I_R)\n",
+ "print \" The line current I_Y is %.2f A.\" %(I_Y) \n",
+ "print \" The line current I_B is %.2f A.\" %(I_B)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The phase current I1 in the load RY is 4.00 A in phase with V_RY.\n",
+ " The phase current I2 in load YB is 6.56 A lagging V_YB by 71.57 degrees.\n",
+ " The phase current I3 in load BR is 3.91 A leading V_BR by 90.00 degrees.\n",
+ "(b)The line current I_R is 7.64 A.\n",
+ " The line current I_Y is 10.51 A.\n",
+ " The line current I_B is 4.47 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4,Page number: 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,the power factor and the total power for a balanced three-phase system.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_ph=20.0 #Resistance of each phase(in Ohms)\n",
+ "X_L_ph=15.0 #Inductive reactance of each phase(in Ohms)\n",
+ "V_L=400.0 #Line Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z_ph=R_ph + X_L_ph *1j\n",
+ "Z_mod=abs(Z_ph)\n",
+ "V_ph_star=V_L/(sqrt(3))\n",
+ "I_ph_star=V_ph_star/Z_mod\n",
+ "I_L_star=I_ph_star\n",
+ "pf_star=R_ph/Z_mod\n",
+ "P_active_star=sqrt(3)*V_L*I_L_star*pf_star\n",
+ "V_ph_delta=V_L\n",
+ "I_ph_delta=V_ph_delta/Z_mod\n",
+ "I_L_delta=I_ph_delta*(sqrt(3))\n",
+ "pf_delta=R_ph/Z_mod\n",
+ "P_active_delta=sqrt(3)*V_L*I_L_delta*pf_delta\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For star connected load:\"\n",
+ "print \"(i)The line current is %.2f A.\" %(I_L_star)\n",
+ "print \"(ii)The power factor is %.2f lagging.\" %(pf_star)\n",
+ "print \"(iii)The total active power is %.2f kW.\" %(P_active_star/1000)\n",
+ "print \"\\n(b)For delta connection:\"\n",
+ "print \"(i)The line current is %.2f A.\" %(I_L_delta)\n",
+ "print \"(ii)The power factor is %.2f lagging.\" %(pf_delta)\n",
+ "print \"(iii)The total active power is %.2f kW.\" %(P_active_delta/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For star connected load:\n",
+ "(i)The line current is 9.24 A.\n",
+ "(ii)The power factor is 0.80 lagging.\n",
+ "(iii)The total active power is 5.12 kW.\n",
+ "\n",
+ "(b)For delta connection:\n",
+ "(i)The line current is 27.71 A.\n",
+ "(ii)The power factor is 0.80 lagging.\n",
+ "(iii)The total active power is 15.36 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5,Page number: 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Fidning the total power consumed and the power factor of a balanced three-phase circuit.\"\"\"\n",
+ "\n",
+ "from math import atan,cos,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W1=3e03 #Reading of wattmeter-1(in Watts)\n",
+ "W2=1.5e03 #Reading of wattmeter-2(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=W1+W2\n",
+ "pf_angle=atan(sqrt(3)*((W1-W2)/(W1+W2)))\n",
+ "pf=cos(pf_angle)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total power consumed is %e W.\" %(P)\n",
+ "print \"The power factor of the balanced three-phase circuit is %.3f.\" %(pf)\n",
+ "print \"NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total power consumed is 4.500000e+03 W.\n",
+ "The power factor of the balanced three-phase circuit is 0.866.\n",
+ "NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6,Page number: 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power,the power factor and the line current for a balanced three-phase circuit.\"\"\"\n",
+ "\n",
+ "from math import atan,cos,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=415 #Line voltage(in Volts)\n",
+ "W1=5.2e03 #Reading of wattmeter-1(in Watts)\n",
+ "W2=-1.7e03 #Reading of wattmeter-2(in Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=W1+W2\n",
+ "pf_angle=atan(sqrt(3)*((W1-W2)/(W1+W2)))\n",
+ "pf=cos(pf_angle)\n",
+ "I_L=P/(sqrt(3)*V_L*pf)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total power consumed is %e W.\\n\" %(P)\n",
+ "print \"The power factor of the balanced three-phase circuit is %.3f.\" %(pf)\n",
+ "print \"NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\"\n",
+ "print \"\\nThe line current is %.2f A.\" %(I_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total power consumed is 3.500000e+03 W.\n",
+ "\n",
+ "The power factor of the balanced three-phase circuit is 0.281.\n",
+ "NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\n",
+ "\n",
+ "The line current is 17.32 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.7,Page number: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power consumed in a star-connected three-phase network.\"\"\"\n",
+ "\n",
+ "from math import sqrt,radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=6.0 #Resistance per phase(in Ohms)\n",
+ "X_L=8.0 #Inductive reactance per phase(in Ohms)\n",
+ "V_L=220.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=6+ (1j*8)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "V_RN=rect(Vph,0)\n",
+ "V_YN=rect(Vph,radians(-120.0))\n",
+ "V_BN=rect(Vph,radians(120.0))\n",
+ "V_RY=V_RN-V_YN\n",
+ "V_YB=V_YN-V_BN\n",
+ "V_BR=V_BN-V_RN\n",
+ "I_R=V_RN/Z\n",
+ "I_Y=V_YN/Z\n",
+ "I_B=V_BN/Z\n",
+ "P=sqrt(3.0)*V_L*abs(I_R)*cos(phase(Z))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The phase voltages are:\"\n",
+ "print \" V_RN=%.2f V at an angle of %.3f degrees.\" %(abs(V_RN),degrees(phase(V_RN))) \n",
+ "print \" V_YN=%.2f V at an angle of %.3f degrees.\" %(abs(V_YN),degrees(phase(V_YN)))\n",
+ "print \" V_BN=%.2f V at an angle of %.3f degrees.\" %(abs(V_BN),degrees(phase(V_BN)))\n",
+ "print \"(b)The line voltages are:\"\n",
+ "print \" V_RY=%.2f V at an angle of %.3f degrees.\" %(abs(V_RY),degrees(phase(V_RY))) \n",
+ "print \" V_YB=%.2f V at an angle of %.3f degrees.\" %(abs(V_YB),degrees(phase(V_YB)))\n",
+ "print \" V_BR=%.2f V at an angle of %.3f degrees.\" %(abs(V_BR),degrees(phase(V_BR)))\n",
+ "print \"(c)The line currents(same as phase currents) are:\"\n",
+ "print \" I_R=%.2f A at an angle of %.3f degrees.\" %(abs(I_R),degrees(phase(I_R))) \n",
+ "print \" I_Y=%.2f A at an angle of %.3f degrees.\" %(abs(I_Y),degrees(phase(I_Y)))\n",
+ "print \" I_B=%.2f A at an angle of %.3f degrees.\" %(abs(I_B),degrees(phase(I_B)))\n",
+ "print \"(d)The total power consumed is %.2f W.\" %(round(P,2)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The phase voltages are:\n",
+ " V_RN=127.02 V at an angle of 0.000 degrees.\n",
+ " V_YN=127.02 V at an angle of -120.000 degrees.\n",
+ " V_BN=127.02 V at an angle of 120.000 degrees.\n",
+ "(b)The line voltages are:\n",
+ " V_RY=220.00 V at an angle of 30.000 degrees.\n",
+ " V_YB=220.00 V at an angle of -90.000 degrees.\n",
+ " V_BR=220.00 V at an angle of 150.000 degrees.\n",
+ "(c)The line currents(same as phase currents) are:\n",
+ " I_R=12.70 A at an angle of -53.130 degrees.\n",
+ " I_Y=12.70 A at an angle of -173.130 degrees.\n",
+ " I_B=12.70 A at an angle of 66.870 degrees.\n",
+ "(d)The total power consumed is 2904.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.8,Page number: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power consumed in a delta-connected three-phase network.\"\"\"\n",
+ "\n",
+ "from math import sqrt,radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=6.0 #Resistance per phase(in Ohms)\n",
+ "X_L=8.0 #Inductive reactance per phase(in Ohms)\n",
+ "V_L=220.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=6+ (1j*8)\n",
+ "Vph=V_L\n",
+ "V_RY=rect(Vph,0)\n",
+ "V_YB=rect(Vph,radians(-120.0))\n",
+ "V_BR=rect(Vph,radians(120.0))\n",
+ "I_RY=V_RY/Z\n",
+ "I_YB=V_YB/Z\n",
+ "I_BR=V_BR/Z\n",
+ "I_R=I_RY-I_BR\n",
+ "I_Y=I_YB-I_RY\n",
+ "I_B=I_BR-I_YB\n",
+ "P=sqrt(3.0)*V_L*abs(I_R)*cos(phase(Z))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The phase voltages(same as line voltages) are:\"\n",
+ "print \" V_RY=%.2f V at an angle of %.3f degrees.\" %(abs(V_RY),degrees(phase(V_RY))) \n",
+ "print \" V_YB=%.2f V at an angle of %.3f degrees.\" %(abs(V_YB),degrees(phase(V_YB)))\n",
+ "print \" V_BR=%.2f V at an angle of %.3f degrees.\" %(abs(V_BR),degrees(phase(V_BR)))\n",
+ "print \"(b)The phase currents in the three load impedances are:\"\n",
+ "print \" I_RY=%.2f A at an angle of %.3f degrees.\" %(abs(I_RY),degrees(phase(I_RY))) \n",
+ "print \" I_YB=%.2f A at an angle of %.3f degrees.\" %(abs(I_YB),degrees(phase(I_YB)))\n",
+ "print \" I_BR=%.2f A at an angle of %.3f degrees.\" %(abs(I_BR),degrees(phase(I_BR)))\n",
+ "print \"(c)The line currents are:\"\n",
+ "print \" I_R=%.2f A at an angle of %.3f degrees.\" %(abs(I_R),degrees(phase(I_R))) \n",
+ "print \" I_Y=%.2f A at an angle of %.3f degrees.\" %(abs(I_Y),degrees(phase(I_Y)))\n",
+ "print \" I_B=%.2f A at an angle of %.3f degrees.\" %(abs(I_B),degrees(phase(I_B)))\n",
+ "print \"(d)The total power consumed is %.2f W.\" %(round(P,2)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The phase voltages(same as line voltages) are:\n",
+ " V_RY=220.00 V at an angle of 0.000 degrees.\n",
+ " V_YB=220.00 V at an angle of -120.000 degrees.\n",
+ " V_BR=220.00 V at an angle of 120.000 degrees.\n",
+ "(b)The phase currents in the three load impedances are:\n",
+ " I_RY=22.00 A at an angle of -53.130 degrees.\n",
+ " I_YB=22.00 A at an angle of -173.130 degrees.\n",
+ " I_BR=22.00 A at an angle of 66.870 degrees.\n",
+ "(c)The line currents are:\n",
+ " I_R=38.11 A at an angle of -83.130 degrees.\n",
+ " I_Y=38.11 A at an angle of 156.870 degrees.\n",
+ " I_B=38.11 A at an angle of 36.870 degrees.\n",
+ "(d)The total power consumed is 8712.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9,Page number: 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current and the total power supplied by a three-phase system.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,degrees,sqrt,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Z_A_delta=rect(12.0,radians(30.0))\n",
+ "Z_star=rect(5.0,radians(45.0))\n",
+ "V_L=400.0\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z_A_star=Z_A_delta/3.0\n",
+ "Zeq=(Z_A_star*Z_star)/(Z_A_star+Z_star)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "I_L=Vph/Zeq\n",
+ "P=sqrt(3.0)*I_L*V_L*cos(phase(Zeq))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current is %.3f A.\" %(round((abs(I_L)),3))\n",
+ "print \"(b)The power suppiled is %e W.\" %(abs(P))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current is 103.045 A.\n",
+ "(b)The power suppiled is 5.726843e+04 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10,Page number: 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the constants of the load per phase.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=100.0 #Line current(in Amperes)\n",
+ "V_L=1100.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "P=150e03 #Power delivered by the three-phase system(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=P/(3*I_L*I_L)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "Iph=I_L\n",
+ "Z=Vph/Iph\n",
+ "X_C=sqrt((Z*Z)-(R*R))\n",
+ "C=1/(2*pi*f*X_C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The constants of the load per phase are:\"\n",
+ "print \"R=%.3f Ohms and C=%e F.\" %(R,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The constants of the load per phase are:\n",
+ "R=5.000 Ohms and C=8.128901e-04 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11,Page number: 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance in each branch and the power factor in a balanced delta-connected three-phase circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=400.0 #Line voltage(in Volts)\n",
+ "I_L=20.0 #Line current(in Amperes)\n",
+ "P=10e03 #Total power absorbed by the load(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_ph=V_L\n",
+ "I_ph=I_L/sqrt(3.0)\n",
+ "Z_ph=V_ph/I_ph\n",
+ "pf=P/(sqrt(3.0)*V_L*I_L)\n",
+ "V_ph_star=V_L/sqrt(3.0)\n",
+ "I_L_star=V_ph_star/Z_ph\n",
+ "I_ph_star=I_L_star\n",
+ "P=sqrt(3.0)*V_L*I_L_star*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The impedance in each branch is %.2f Ohms.\" %(round(Z_ph,2))\n",
+ "print \"(b)The power factor is %.4f lagging.\" %(pf)\n",
+ "print \"(c)The total power consumed if the same impedances are star-connected is %.2f kW.\" %(round((P/1000.0),2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The impedance in each branch is 34.64 Ohms.\n",
+ "(b)The power factor is 0.7217 lagging.\n",
+ "(c)The total power consumed if the same impedances are star-connected is 3.33 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12,Page number: 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power in the three-phase system.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import pi,sin,radians,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=100.0 #Resistance of the first phase(in Ohms)\n",
+ "R2=200.0 #Resistance of the second phase(in Ohms)\n",
+ "L3=0.3 #Inductance of the third phase(in Henry)\n",
+ "V_L=100.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vab=rect(V_L,0)\n",
+ "Vbc=rect(V_L,radians(-120))\n",
+ "Vca=rect(V_L,radians(120))\n",
+ "Zab=R1\n",
+ "Zca=R2\n",
+ "Zbc=1j*(2*pi*f*L3)\n",
+ "Iab=Vab/Zab\n",
+ "Ibc=Vbc/Zbc\n",
+ "Ica=Vca/Zca\n",
+ "Pab=(abs(Vab)*abs(Vab))/R1\n",
+ "Pbc=0\n",
+ "Pca=(abs(Vca)*abs(Vca))/R2\n",
+ "act_P=Pab+Pbc+Pca\n",
+ "rea_P=abs(Vbc)*abs(Ibc)*sin(phase(Zbc))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The total active power in the system is %.2f W.\" %round(act_P,2)\n",
+ "print \"(b)The total reactive power in the system is %.2f VAr.\" %round(rea_P,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The total active power in the system is 150.00 W.\n",
+ "(b)The total reactive power in the system is 106.10 VAr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.13,Page number: 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the load circuit parameters per phase.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,sin,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=160.0 #Line current(in Amperes)\n",
+ "V_L=1.1e03 #Line voltage(in Volts)\n",
+ "P=210e03 #Total power load(in kilo-Watts)\n",
+ "f=50.0 #Frequency of the supply voltage(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "pf=P/(sqrt(3.0)*V_L*I_L)\n",
+ "V_ph=V_L/sqrt(3.0)\n",
+ "I_ph=I_L\n",
+ "Z_ph=V_ph/I_ph\n",
+ "R_ph=Z_ph*pf\n",
+ "X_C=Z_ph*sin(acos(pf))\n",
+ "C=1.0/(2*pi*f*X_C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The load circuit parameters per phase are:\"\n",
+ "print \"R=%.3f Ohms.\" %(round(R_ph,3))\n",
+ "print \"C=%e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load circuit parameters per phase are:\n",
+ "R=2.734 Ohms.\n",
+ "C=1.106310e-03 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.14,Page number: 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\"\"\"Finding the resistance and the inductance of the load per phase.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,sin,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=400.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "Iph=25.0 #Phase current(in Amperes)\n",
+ "P=13.856e03 #Total active power absorbed by the load(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=Iph\n",
+ "pf=P/(sqrt(3.0)*V_L*I_L)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "Zph=Vph/Iph\n",
+ "Rph=Zph*pf\n",
+ "Xph=Zph*sin(acos(pf))\n",
+ "L=Xph/(2*pi*f)\n",
+ "Q=3*Vph*Iph*sin(acos(pf))\n",
+ "S=3*Vph*Iph\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of the load per phase is %.3f Ohms and the inductance of the load per phase is %e H.\" %(Rph,L)\n",
+ "print \"(b)The total reactive power is %e VAR.\" %(Q)\n",
+ "print \"(c)The total apparent power is %e VA.\" %(S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of the load per phase is 7.390 Ohms and the inductance of the load per phase is 1.764344e-02 H.\n",
+ "(b)The total reactive power is 1.039285e+04 VAR.\n",
+ "(c)The total apparent power is 1.732051e+04 VA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.15,Page number: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,the power factor and the total kVA.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,cos\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Z1=100+(1j*0) #First impedance(in Ohms)\n",
+ "C=32e-06 #Capacitance of the capacitor(in Farads)\n",
+ "V_L=415.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z2=-(1j*(1/(2*pi*f*C)))\n",
+ "Zph=(Z1*Z2)/(Z1+Z2)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "Iph=Vph/Zph\n",
+ "I_L=Iph\n",
+ "pf=cos(phase(Zph))\n",
+ "P=sqrt(3.0)*V_L*I_L*pf\n",
+ "kVA=sqrt(3.0)*V_L*I_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current is %.3f A.\" %(abs(I_L))\n",
+ "print \"(b)The power factor is %.4f leading.\" %(pf)\n",
+ "print \"(c)The power absorbed is %e W.\" %(abs(P))\n",
+ "print \"(d)The total kVA is %e kVA.\" %(abs(kVA))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current is 3.397 A.\n",
+ "(b)The power factor is 0.7052 leading.\n",
+ "(c)The power absorbed is 1.722250e+03 W.\n",
+ "(d)The total kVA is 2.442104e+03 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.16,Page number: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,input and output power in a three-phase motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,atan,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "effi=0.86 #Efficiency of the motor\n",
+ "W1=255e03 #Reading of the first wattmeter(in Watts)\n",
+ "W2=85e03 #Reading of the second wattmeter(in Watts)\n",
+ "V_L=1.6e03 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=W1+W2\n",
+ "phi=atan(sqrt(3.0)*((W1-W2)/(W1+W2)))\n",
+ "pf=cos(phi)\n",
+ "I_L=P/(sqrt(3.0)*V_L*pf)\n",
+ "Po=P*effi\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The input power is %.2f kW.\" %(round((P/1000.0),2))\n",
+ "print \"(b)The power factor is %.3f lagging.\" %(round(pf,3))\n",
+ "print \"(c)The line current is %.2f A.\" %(round(I_L,2))\n",
+ "print \"(d)The output power is %.2f kW.\" %(round((Po/1000.0),2)) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The input power is 340.00 kW.\n",
+ "(b)The power factor is 0.756 lagging.\n",
+ "(c)The line current is 162.30 A.\n",
+ "(d)The output power is 292.40 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.17,Page number: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the readings of the two wattmeters.\"\"\"\n",
+ "\n",
+ "from math import sqrt,acos,tan \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=25e03 #Total input power(in Watts)\n",
+ "pf=0.8 #Power factor\n",
+ "V_L=400.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"W1-W2=(1.0/sqrt(3.0))*(W1+W2)*tan(phi);\"\"\"\n",
+ "eq_1=P\n",
+ "eq_2=(1.0/sqrt(3.0))*P*tan(acos(pf))\n",
+ "W1=(eq_1+eq_2)/2.0\n",
+ "W2=P-W1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The readings of the wattmeters are:\" \n",
+ "print \"W1=%.4f kW.\" %(round((W1/1000.0),4))\n",
+ "print \"W2=%.4f kW.\" %(round((W2/1000.0),4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The readings of the wattmeters are:\n",
+ "W1=17.9127 kW.\n",
+ "W2=7.0873 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.18,Page number: 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total active power consumed by the load.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(200,0) #Line Voltage V_RY(in Volts)\n",
+ "V_YB=rect(200,radians(-120)) #Line Voltage V_YB(in Volts)\n",
+ "V_BR=rect(200,radians(120)) #Line Voltage V_BR(in Volts)\n",
+ "Z1=rect(10,radians(60)) #Impedance of the first phase(in Ohms) \n",
+ "Z2=rect(10,radians(0)) #Impedance of the second phase(in Ohms)\n",
+ "Z3=rect(10,radians(60)) #Impedance of the third phase(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V_RY/Z1\n",
+ "I2=V_YB/Z2\n",
+ "I3=V_BR/Z3\n",
+ "IR=I1-I3\n",
+ "IB=I3-I2\n",
+ "W1=abs(V_RY)*abs(IR)*cos(phase(IR))\n",
+ "W2=-abs(V_YB)*abs(IB)*cos(phase(IB)-phase(V_YB))\n",
+ "P=W1+W2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The readings of the wattmeters are: W1=%.2f W and W2=%.2f W.\" %(W1,W2)\n",
+ "print \"(b)The total active power consumed by the load is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The readings of the wattmeters are: W1=0.00 W and W2=8000.00 W.\n",
+ "(b)The total active power consumed by the load is 8000.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.19,Page number: 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total active power consumed by the load.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(200,0) #Line Voltage V_RY(in Volts)\n",
+ "V_YB=rect(200,radians(-120)) #Line Voltage V_YB(in Volts)\n",
+ "V_BR=rect(200,radians(120)) #Line Voltage V_BR(in Volts)\n",
+ "Z1=rect(10,radians(60)) #Impedance of the first phase(in Ohms) \n",
+ "Z2=rect(10,radians(0)) #Impedance of the second phase(in Ohms)\n",
+ "Z3=rect(10,radians(60)) #Impedance of the third phase(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V_RY/Z1\n",
+ "I2=V_YB/Z2\n",
+ "I3=V_BR/Z3\n",
+ "IR=I1-I3\n",
+ "IY=I2-I1\n",
+ "W1=-abs(V_BR)*abs(IR)*cos(phase(IR)-phase(V_BR))\n",
+ "W2=abs(V_YB)*abs(IY)*cos(phase(IY)-phase(V_YB))\n",
+ "P=W1+W2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The readings of the wattmeters are: W1=%.2f W and W2=%.2f W.\" %(W1,W2)\n",
+ "print \"(b)The total active power consumed by the load is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The readings of the wattmeters are: W1=6000.00 W and W2=2000.00 W.\n",
+ "(b)The total active power consumed by the load is 8000.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.20,Page number: 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reading of the wattmeter.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(440.0,0) #Line voltage in RY line(in Volts)\n",
+ "V_YB=rect(440.0,radians(-120)) #Line voltage in YB line(in Volts)\n",
+ "V_BR=rect(440.0,radians(120)) #Line voltage in BR line(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_RB=rect(440.0,radians(120-180)) \n",
+ "I1=V_RY/(60.0+(1j*45.0))\n",
+ "I2=V_RB/(-(1j*56.0))\n",
+ "I_AB=I1+I2\n",
+ "V_CD=V_YB\n",
+ "P=abs(I_AB)*abs(V_CD)*cos(phase(V_CD))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The reading of the wattmeter is %.4f W.\" %(round(P,4))\n",
+ "print \"Note: There is a calculation error in the textbook.\"\n",
+ "print \"I_AB=11.50 A at an angle of 2.035 degrees and not 11.05 A. Therefore P=-2531.1166 W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reading of the wattmeter is -2531.1166 W.\n",
+ "Note: There is a calculation error in the textbook.\n",
+ "I_AB=11.50 A at an angle of 2.035 degrees and not 11.05 A. Therefore P=-2531.1166 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.21,Page number: 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line and phase current in a motor.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import acos,sqrt,radians,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(440,0) #Line voltage in RY line(in Volts)\n",
+ "Zph=3+1j*4 #Phase Impedance(in Ohms)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "P=75e03 #Total active power(in Watts)\n",
+ "V_L=440.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L_mod=P/(sqrt(3.0)*V_L*pf)\n",
+ "phi=acos(pf)\n",
+ "I_L_delta=rect(I_L_mod,(radians(-30-degrees(phi))))\n",
+ "Iph=rect((I_L_mod/sqrt(3.0)),-phi)\n",
+ "Vph=rect((V_L/sqrt(3.0)),radians(-30))\n",
+ "I_L_star=Vph/Zph\n",
+ "I_L=I_L_delta+I_L_star\n",
+ "P1=sqrt(3.0)*abs(V_L)*abs(I_L_delta)*pf\n",
+ "P2=sqrt(3.0)*abs(V_L)*abs(I_L_star)*cos(phase(Zph))\n",
+ "P_tot=P1+P2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current in the motor is %.2f A at a phase angle of %.2f degrees.\" %(abs(I_L_delta),degrees(phase(I_L_delta)))\n",
+ "print \" The phase current in the motor is %.2f A at a phase angle of %.2f degrees.\" %(abs(Iph),degrees(phase(Iph)))\n",
+ "print \"(b)The line current and phase current in the load is %.2f A at a phase angle of %.2f degrees.\" %(abs(I_L_star),degrees(phase(I_L_star)))\n",
+ "print \"(c)The total line current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I_L),degrees(phase(I_L)))\n",
+ "print \"(d)The total power consumed is %.3f W.\" %(P_tot) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current in the motor is 123.01 A at a phase angle of -66.87 degrees.\n",
+ " The phase current in the motor is 71.02 A at a phase angle of -36.87 degrees.\n",
+ "(b)The line current and phase current in the load is 50.81 A at a phase angle of -83.13 degrees.\n",
+ "(c)The total line current is 172.38 A at a phase angle of -71.60 degrees.\n",
+ "(d)The total power consumed is 98232.000 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter13.ipynb b/Basic_Electrical_Engineering/Chapter13.ipynb
new file mode 100755
index 00000000..163431b5
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter13.ipynb
@@ -0,0 +1,1498 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: TRANSFORMERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1,Page number: 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the secondary of the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E_p=6400 #Primary voltage(in Volts) \n",
+ "f=50 #Frequency of primary supply(in Hertz)\n",
+ "N1=480 #Number of turns in the primary of the transformer\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=E_p/(4.44*f*N1)\n",
+ "N2=20.0\n",
+ "Es=4.44*f*N2*flux_m\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The peak value of the flux produced in the core is %.2f Wb.\" %(flux_m)\n",
+ "print \"(b)The voltage across the secondary winding if it has 20 turns is %.2f V.\" %(Es)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The peak value of the flux produced in the core is 0.06 Wb.\n",
+ "(b)The voltage across the secondary winding if it has 20 turns is 266.67 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2,Page number: 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the peak value of the flux density in the core.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "N1=30.0 #Number of turns in the primary of transformer\n",
+ "N2=350.0 #Number of turns in the secondary of transformer\n",
+ "A=250e-04 #Cross-sectional area of the core(in square-metres)\n",
+ "E1=230.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=E1/(4.44*f*N1)\n",
+ "B_m=flux_m/A\n",
+ "E2=E1*(N2/N1)\n",
+ "I2=100.0\n",
+ "I1=I2*(N2/N1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The peak value of flux density in the core is %.2f T.\" %(B_m)\n",
+ "print \"(b)The voltage induced in the secondary winding is %e V.\" %(E2)\n",
+ "print \"(c)The primary current when the secondary current is 100 A is %e A.\" %(I1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The peak value of flux density in the core is 1.38 T.\n",
+ "(b)The voltage induced in the secondary winding is 2.683333e+03 V.\n",
+ "(c)The primary current when the secondary current is 100 A is 1.166667e+03 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3,Page number: 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the turns-ratio of the transformer.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Req=50.0 #Output resistance of the source(in Ohms) \n",
+ "R_L=800.0 #Load resistance(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "K=sqrt(R_L/Req)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The turns-ratio of the transformer to be used for maximising the load power is %d.\" %(K)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The turns-ratio of the transformer to be used for maximising the load power is 4.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4,Page number: 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the load current in the ac circuit.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees\n",
+ "\n",
+ "#Calculations:\n",
+ "V=rect(30,0)\n",
+ "Ip=V/(20+20*1j+(pow(2,2)*(2-10*1j)))\n",
+ "I_L=2.0*Ip\n",
+ "\n",
+ "#Result:\n",
+ "print \"The load current is %.3f A at a phase angle of %.3f degrees.\" %(abs(I_L),degrees(phase(I_L)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load current is 1.744 A at a phase angle of 35.538 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.5,Page number: 378 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the output of the transformer in kVA.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B_m=1.1 #Maximum magnetic flux density(in Weber per square-metre)\n",
+ "A=150e-04 #Cross-sectional area of the core(in square-metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=B_m*A\n",
+ "N2=66\n",
+ "f=50\n",
+ "Z_L=4.0\n",
+ "E2=4.44*N2*f*flux_m\n",
+ "V2=E2\n",
+ "I2=V2/Z_L\n",
+ "output=(I2*V2)/1000.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The output when connected to a load of 4 Ohms impedance is %.3f kVA.\" %(output)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output when connected to a load of 4 Ohms impedance is 14.612 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.6,Page number: 378 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of turns in each winding of the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=9e-04 #Cross-sectional area of the core(in square-metre) \n",
+ "E1=230.0 #Primary Voltage(in Volts)\n",
+ "E2=110.0 #Secondary Voltage(in Volts)\n",
+ "E3=6.0 #Tertiary Voltage(in Volts)\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "Bm=1.0 #Maximum magnetic flux density(in Tesla) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=Bm*A\n",
+ "N3_half=E3/(4.44*f*flux_m)\n",
+ "N3=2*N3_half\n",
+ "N1=N3_half*(E1/E3)\n",
+ "N2=N3_half*(E2/E3)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total number of turns on the primary winding is %d turns.\" %(N1)\n",
+ "print \"The total number of turns on the secondary winding is %d turns.\" %(N2)\n",
+ "print \"The total number of turns on the tertiary winding is %d turns.\" %(N3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total number of turns on the primary winding is 1151 turns.\n",
+ "The total number of turns on the secondary winding is 550 turns.\n",
+ "The total number of turns on the tertiary winding is 60 turns.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.7,Page number: 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the no-load power factor of the transformer.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=350.0 #Input at no-load(in Volt-Amperes) \n",
+ "V1=230.0 #Primary voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=VA/V1\n",
+ "Pi=110.0\n",
+ "pf=Pi/(V1*Io)\n",
+ "Iw=Io*pf\n",
+ "Im=sqrt(pow(Io,2)-pow(Iw,2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The loss component of no-load current is given as %.4f A.\" %(Iw)\n",
+ "print \"The magnetising component of no-load current is %.4f A.\" %(Im)\n",
+ "print \"The no-load power factor is %.4f.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The loss component of no-load current is given as 0.4783 A.\n",
+ "The magnetising component of no-load current is 1.4446 A.\n",
+ "The no-load power factor is 0.3143.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.8,Page number: 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the hysterisis and eddy-current losses of the transformer.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "eq1=100.0 #Iron loss at 60 Hz(in Watts)\n",
+ "eq2=60.0 #Iron loss at 40 Hz(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" P_h=A*f ; P_e=B*f*f ; \n",
+ " \n",
+ " P_i=P_h+P_e=(A*f)+(B*f*f); \"\"\"\n",
+ "\n",
+ "A=((eq2*36)-(eq1*16))/((40*36)-(60*16))\n",
+ "B=((eq1*4)-(eq2*6))/((3600*4)-(1600*6))\n",
+ "P_h=A*f\n",
+ "P_e=B*f*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Hysteresis loss at 50 Hz is %.2f W.\" %(P_h) \n",
+ "print \"The Eddy-current loss at 50 Hz is %.2f W.\" %(P_e) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Hysteresis loss at 50 Hz is 58.33 W.\n",
+ "The Eddy-current loss at 50 Hz is 20.83 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.9,Page number: 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the primary current snd the primary power factor.\"\"\"\n",
+ "\n",
+ "from math import acos,degrees,cos\n",
+ "from cmath import phase,rect\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V1=440.0 #Primary voltage(in Volts)\n",
+ "V2=110.0 #Secondary voltage(in Volts)\n",
+ "I_0_mod=5.0 #No-load current(in Amperes) \n",
+ "I2=120.0 #Secondary current(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "phi_0=acos(0.2)\n",
+ "phi_2=acos(0.8)\n",
+ "K=V2/V1\n",
+ "I1_load_mod=K*I2\n",
+ "I1_load=rect(I1_load_mod,-phi_2)\n",
+ "I0=rect(I_0_mod,-phi_0)\n",
+ "I1_total=I0+I1_load\n",
+ "pf_primary=cos(phase(I1_total))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The primary current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1_total),degrees(phase(I1_total)))\n",
+ "print \"The primary power factor is %.3f lagging.\" %(pf_primary)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The primary current is 33.90 A at a phase angle of -42.49 degrees.\n",
+ "The primary power factor is 0.737 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.10,Page number: 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent resistance as referred to the primary and secondary.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=50e03 #Power rating of the transformer(in Volt-Amperes) \n",
+ "V1=4400.0 #Primary voltage(in Volts) \n",
+ "V2=220.0 #Secondary voltage(in Volts)\n",
+ "R1=3.45 #Primary resistance(in Ohms)\n",
+ "R2=0.009 #Secondary resistance(in Ohms)\n",
+ "X1=5.2 #Leakage reactance of primary(in Ohms)\n",
+ "X2=0.015 #Leakage reactance of secondary(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=VA/V1\n",
+ "I2=VA/V2\n",
+ "K=V2/V1\n",
+ "Re1=R1+(R2/(K*K))\n",
+ "Re2=(K*K*R1)+R2\n",
+ "Xe1=X1+(X2/(K*K))\n",
+ "Xe2=(K*K*X1)+X2\n",
+ "Ze1=sqrt((Re1*Re1)+(Xe1*Xe1))\n",
+ "Ze2=sqrt((Re2*Re2)+(Xe2*Xe2))\n",
+ "tot_copp_loss=(I1*I1*R1)+(I2*I2*R2)\n",
+ "tot_copp_eq_p=I1*I1*Re1\n",
+ "tot_copp_eq_s=I2*I2*Re2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equivalent resistance as referred to the primary is %.2f Ohms.\" %(Re1)\n",
+ "print \"(b)The equivalent resistance as referred to the secondary is %.4f Ohms.\" %(Re2)\n",
+ "print \"(c)The equivalent reactance as referred to the primary is %.2f Ohms.\" %(Xe1)\n",
+ "print \"(d)The equivalent reactance as referred to the secondary is %.3f Ohms.\" %(Xe2)\n",
+ "print \"(e)The equivalent impedance as referred to the primary is %.2f Ohms.\" %(Ze1)\n",
+ "print \"(f)The equivalent impedance as referred to the secondary is %.4f Ohms.\" %(Ze2)\n",
+ "print \"(g)The total copper loss by using the individual resistances of the two windings is %.2f W.\" %(tot_copp_loss)\n",
+ "print \" By considering equivalent resistances,\"\n",
+ "print \" Total copper loss(referred to primary equivalent resistance)=%.2f W.\" %(tot_copp_eq_p) \n",
+ "print \" Total copper loss(referred to secondary equivalent resistance)=%.2f W\" %(tot_copp_eq_s)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equivalent resistance as referred to the primary is 7.05 Ohms.\n",
+ "(b)The equivalent resistance as referred to the secondary is 0.0176 Ohms.\n",
+ "(c)The equivalent reactance as referred to the primary is 11.20 Ohms.\n",
+ "(d)The equivalent reactance as referred to the secondary is 0.028 Ohms.\n",
+ "(e)The equivalent impedance as referred to the primary is 13.23 Ohms.\n",
+ "(f)The equivalent impedance as referred to the secondary is 0.0331 Ohms.\n",
+ "(g)The total copper loss by using the individual resistances of the two windings is 910.38 W.\n",
+ " By considering equivalent resistances,\n",
+ " Total copper loss(referred to primary equivalent resistance)=910.38 W.\n",
+ " Total copper loss(referred to secondary equivalent resistance)=910.38 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.11,Page number: 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load regulation for different load power factors.\"\"\"\n",
+ "\n",
+ "from math import cos,acos,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=40e03 #Power rating of the transformer(in Volt-Amperes) \n",
+ "V1=6600.0 #Primary voltage(in Volts) \n",
+ "V2=250.0 #Secondary voltage(in Volts)\n",
+ "R1=10.0 #Primary resistance(in Ohms)\n",
+ "R2=0.02 #Secondary resistance(in Ohms)\n",
+ "Xe1=35.0 #Equivalent leakage reactance as referred to the primary(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "K=V2/V1\n",
+ "I2=VA/V2\n",
+ "Re2=(K*K*R1)+R2\n",
+ "Xe2=(K*K*Xe1)\n",
+ "pf=1\n",
+ "phi=acos(pf)\n",
+ "per_reg_a=(((I2*Re2*pf)+(I2*Xe2*sin(phi)))/V2)*100\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "per_reg_b=(((I2*Re2*pf)+(I2*Xe2*sin(phi)))/V2)*100\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "per_reg_c=(((I2*Re2*pf)-(I2*Xe2*sin(phi)))/V2)*100\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For unity power factor of the load:\"\n",
+ "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_a)\n",
+ "print \"\\n(b)For power factor of the load=0.8 lagging:\"\n",
+ "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_b)\n",
+ "print \"\\n(c)For power factor of the load=0.8 leading:\"\n",
+ "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For unity power factor of the load:\n",
+ "The full-load percentage regulation is 2.198 percent.\n",
+ "\n",
+ "(b)For power factor of the load=0.8 lagging:\n",
+ "The full-load percentage regulation is 3.687 percent.\n",
+ "\n",
+ "(c)For power factor of the load=0.8 leading:\n",
+ "The full-load percentage regulation is -0.170 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.12,Page number: 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of turns in each winding.\"\"\"\n",
+ "\n",
+ "from math import sqrt \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "E1=5000.0 #Primary voltage at no-load(in Volts)\n",
+ "E2=250.0 #Secondary voltage at no-load(in Volts)\n",
+ "VA_full=150e03 #Power rating of the transformer(in Volt-Ampere) \n",
+ "flux=0.06 #Maximum core flux(in Weber)\n",
+ "Pi=1500.0 #Core losses(in Watts)\n",
+ "Pc_FL=1800.0 #Full-load copper losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "N2=E2/(4.44*f*flux)\n",
+ "N1=(E1/E2)*round(N2,0)\n",
+ "pf=1\n",
+ "Po=0.5*VA_full*pf\n",
+ "Pc=0.5*0.5*Pc_FL\n",
+ "effi_b=(Po/(Po+Pi+Pc))*100\n",
+ "pf=0.8\n",
+ "Po=VA_full*pf\n",
+ "Pc=Pc_FL\n",
+ "effi_c=(Po/(Po+Pi+Pc))*100\n",
+ "x=sqrt(Pi/Pc_FL)\n",
+ "VA_load=VA_full*x\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of turns in the primary winding is %d.\" %(round(N1,0)) \n",
+ "print \" The number of turns in the secondary winding is %d.\" %(round(N2,0))\n",
+ "print \"(b)The efficiency at half rated kVA and unity power factor is %.3f percent\" %(effi_b)\n",
+ "print \"(c)The efficiency at full load and 0.8 power factor lagging is %.3f percent.\" %(effi_c)\n",
+ "print \"(d)The kVA load for maximum efficiency is %d kVA.\" %(round((VA_load/1000),0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of turns in the primary winding is 380.\n",
+ " The number of turns in the secondary winding is 19.\n",
+ "(b)The efficiency at half rated kVA and unity power factor is 97.466 percent\n",
+ "(c)The efficiency at full load and 0.8 power factor lagging is 97.324 percent.\n",
+ "(d)The kVA load for maximum efficiency is 137 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.13,Page number: 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the all-day efficiency of a distribution transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "kVA_FL=200.0 #Power rating of transformer at full-load(in Volt-Ampere) \n",
+ "Pc_FL=3.02 #Full-load copper losses(in kilo-Watts) \n",
+ "Pi=1.6 #Iron-losses(in kilo-Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pi_24_hrs=24.0*Pi\n",
+ "\"\"\" For 80 kW load at unity power factor in 6 hrs:\"\"\"\n",
+ "Po_1=80\n",
+ "t1=6\n",
+ "pf_1=1\n",
+ "output_ene_1=Po_1*t1\n",
+ "kVA_1=Po_1/pf_1\n",
+ "Pc_1=pow((kVA_1/kVA_FL),2)*Pc_FL*t1\n",
+ "\"\"\" For 160 kW load at 0.8 power factor in 8 hrs:\"\"\"\n",
+ "Po_2=160\n",
+ "t2=8\n",
+ "pf_2=0.8\n",
+ "output_ene_2=Po_2*t2\n",
+ "kVA_2=Po_2/pf_2\n",
+ "Pc_2=pow((kVA_2/kVA_FL),2)*Pc_FL*t2\n",
+ "\"\"\" For no load period of 10 hrs:\"\"\"\n",
+ "Po_3=0\n",
+ "t3=10\n",
+ "output_ene_3=0\n",
+ "Pc_3=0\n",
+ "Po_total=output_ene_1+output_ene_2+output_ene_3\n",
+ "Pc_total=Pc_1+Pc_2+Pc_3\n",
+ "all_day_effi=Po_total/(Po_total+Pc_total+Pi_24_hrs)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The all day efficiency of the distribution transformer is %.3f percent.\" %(all_day_effi*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The all day efficiency of the distribution transformer is 96.414 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.14,Page number: 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the apparent power rating of an autotransformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_rated=120.0 #Voltage rating of the transformer(in Volts)\n",
+ "VA=12e03 #Power rating of the transformer(in Volt-Ampere)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=VA/V_rated\n",
+ "I2=I1\n",
+ "input_app_pow=240*I1\n",
+ "output_app_pow=120*2*I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"In auto-tranformer mode, the input apparent power is %d kVA and the output apparent power is %d kVA.\" %(round((input_app_pow/1000),0),round((output_app_pow/1000),0))\n",
+ "print \"Thus, the apparent power capacity of the 12-kVA transformer is doubled by the auto-transformer connection.\"\n",
+ "print \"In effect,half the apparent power is transformed and half is conducted directly to the secondary side.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In auto-tranformer mode, the input apparent power is 24 kVA and the output apparent power is 24 kVA.\n",
+ "Thus, the apparent power capacity of the 12-kVA transformer is doubled by the auto-transformer connection.\n",
+ "In effect,half the apparent power is transformed and half is conducted directly to the secondary side.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.15,Page number: 401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the secondary line voltage on no load when the windings are connected(a)star/delta,(b)delta/star.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L1=3300.0 #Supply voltage(in Volts)\n",
+ "Np=840.0 #Number of turns in the primary\n",
+ "Ns=72.0 #Number of turns in the secondary\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph_1a=V_L1/sqrt(3)\n",
+ "Vph_2a=Vph_1a*(Ns/Np)\n",
+ "V_L2a=Vph_2a\n",
+ "Vph_1b=V_L1\n",
+ "Vph_2b=Vph_1b*(Ns/Np)\n",
+ "V_L2b=Vph_2b*sqrt(3)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print(\"(a)For star/delta connection: \")\n",
+ "print \"The secondary line voltage on no load is %.2f V.\" %(V_L2a)\n",
+ "print(\"(b)For delta/star connection: \")\n",
+ "print \"The secondary line voltage on no load is %.2f V.\" %(V_L2b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For star/delta connection: \n",
+ "The secondary line voltage on no load is 163.31 V.\n",
+ "(b)For delta/star connection: \n",
+ "The secondary line voltage on no load is 489.92 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.16,Page number: 403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetising current and the core-loss current in a single-phase transformer.\"\"\" \n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=12e03 #Power rating of the transformer(in Volt-Ampere) \n",
+ "Vp=400.0 #Primary voltage(in Volts)\n",
+ "Vs=200.0 #Secondary voltage(in Volts)\n",
+ "Wo=120.0 #Power in open-circuit test(in Watts) \n",
+ "V1=200.0 #Voltage in open-circuit test(in Volts)\n",
+ "I_0=1.3 #Current in open-circuit test(in Amperes)\n",
+ "Isc=30.0 #Current in short-circuit test(in Amperes)\n",
+ "Wsc=200.0 #Power in short-circuit test(in Watts)\n",
+ "Vsc=22.0 #Voltage in short-circuit test(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Iw=Wo/V1\n",
+ "Im=sqrt((I_0*I_0)-(Iw*Iw))\n",
+ "R_0=V1/Iw\n",
+ "X_0=V1/Im\n",
+ "K=Vs/Vp\n",
+ "I_FL=VA/Vp\n",
+ "Re1=Wsc/(Isc*Isc)\n",
+ "Ze1=Vsc/Isc\n",
+ "Xe1=sqrt((Ze1*Ze1)-(Re1*Re1))\n",
+ "Re2=K*K*Re1\n",
+ "Xe2=K*K*Xe1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnetising current is %.2f A and the core-loss current is %.2f A\" %(Im,Iw)\n",
+ "print \"(b)The parameters of equivalent circuit as referred to the low voltage winding(secondary winding) are: \\n Re2=%.4f ohm \\n Xe2=%.4f ohm\" %(Re2,Xe2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnetising current is 1.15 A and the core-loss current is 0.60 A\n",
+ "(b)The parameters of equivalent circuit as referred to the low voltage winding(secondary winding) are: \n",
+ " Re2=0.0556 ohm \n",
+ " Xe2=0.1747 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.17,Page number: 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the secondary emf in a transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=25.0e03 #Power rating of the transformer(in VA)\n",
+ "N1=500.0 #Number of turns in the primary winding \n",
+ "N2=40.0 #Number of turns in the secondary winding\n",
+ "V1=3e03 #Voltage of the supply connected to primary(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "K=N2/N1\n",
+ "E2=K*V1\n",
+ "I1=VA/V1\n",
+ "I2=I1/K\n",
+ "flux=V1/(4.44*f*N1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The secondary emf is %.2f V.\" %(E2)\n",
+ "print \"(b)The primary current on full-load is %.2f A and the secondary current on full-load is %.2f A.\" %(I1,I2)\n",
+ "print \"(c)The maximum flux in the core is %.4f Wb.\" %(flux)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The secondary emf is 240.00 V.\n",
+ "(b)The primary current on full-load is 8.33 A and the secondary current on full-load is 104.17 A.\n",
+ "(c)The maximum flux in the core is 0.0270 Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.18,Page number: 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the active cross-sectional area of the core.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=50.0 #Number of turns in the primary winding\n",
+ "B=1.0 #Maximum flux density(in Tesla)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "V=230.0 #Voltage rating of the transformer(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E1=V\n",
+ "flux=E1/(4.44*f*N1)\n",
+ "A=flux/B\n",
+ "\"\"\"Due to the insulation of laminations from each other,the gross area is about 10% greater than the active area.\"\"\" \n",
+ "gross=1.1*A\n",
+ "a=sqrt(gross)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The active cross sectional area of the core is %.5f square m.\" %(A)\n",
+ "print \"(b)The side of a square core is %.2f m.\" %(a)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The active cross sectional area of the core is 0.02072 square m.\n",
+ "(b)The side of a square core is 0.15 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.19,Page number: 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the output of the transformer in kVA.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=150e-04 #Cross-sectional area of the core(in square metres)\n",
+ "Bm=1.1 #Maximum flux density(in Tesla)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "N2=66.0 #Number of turns in the secondary winding\n",
+ "Z_L=4.0 #Load impedance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux=Bm*A\n",
+ "E2=4.44*flux*f*N2\n",
+ "I2=E2/Z_L\n",
+ "kVA=(E2*I2)/1000.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The output in kVA when connected to a 4 Ohms load impedance is %.2f kVA.\" %(kVA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output in kVA when connected to a 4 Ohms load impedance is 14.61 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.20,Page number: 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetising current and the iron loss.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I0=1.0 #No-load primary current(in Amperes)\n",
+ "pf=0.24 #Power factor\n",
+ "V1=11e03 #Primary voltage(in Volts)\n",
+ "V2=400 #Secondary voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Iw=I0*pf\n",
+ "Im=sqrt((I0*I0)-(Iw*Iw))\n",
+ "Pi=V1*I0*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The core-loss current is %.2f A.\" %(Iw) \n",
+ "print \"(b)The magnetising current is %.3f A.\" %(Im)\n",
+ "print \"(c)The iron loss is %.2f W.\" %(Pi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The core-loss current is 0.24 A.\n",
+ "(b)The magnetising current is 0.971 A.\n",
+ "(c)The iron loss is 2640.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.21,Page number: 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the supply voltage and the power factor.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "K=0.5 #Turns ratio of the step-down transformer\n",
+ "R1=2.5 #Resistance of the primary winding(in Ohms)\n",
+ "X1=6.0 #Reactance of the primary winding(in Ohms)\n",
+ "R2=0.25 #Resistance of the secondary winding(in Ohms)\n",
+ "X2=1 #Reactance of the secondary winding(in Ohms)\n",
+ "Im=51.5e-03 #Magnetising current(in Amperes)\n",
+ "Iw=20.6e-03 #Core-loss current(in Amperes)\n",
+ "Z_L=rect(25,radians(30)) #Load impedance(in Ohms)\n",
+ "Vo=50.0 #Output voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z1=R1+1j*X1\n",
+ "Z2=R2+1j*X2\n",
+ "V2=rect(Vo,0)\n",
+ "I2=V2/Z_L\n",
+ "E2=V2+(I2*Z2)\n",
+ "E1=E2/K\n",
+ "E1_minus=-E1\n",
+ "I1_a=-I2*K\n",
+ "\"\"\"Im lags -E1 by 90 degrees and Iw is in phase with -E1.\"\"\"\n",
+ "Im_com=rect(Im,(phase(E1_minus)-radians(90)))\n",
+ "Iw_com=rect(Iw,phase(E1_minus))\n",
+ "I1=I1_a+Im_com+Iw_com\n",
+ "V1=E1_minus+(I1*Z1)\n",
+ "pf_ang=phase(V1)-phase(I1)\n",
+ "pf=cos(pf_ang)\n",
+ "\n",
+ "\n",
+ "#Result:I\n",
+ "print \"The supply voltage is %.4f V at a phase angle of %.2f degrees.\" %(abs(V1),degrees(phase(V1)))\n",
+ "print \"The current drawn from the supply is %.4f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1)))\n",
+ "print \"The power factor is %.3f lagging.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The supply voltage is 108.6120 V at a phase angle of -176.35 degrees.\n",
+ "The current drawn from the supply is 1.0451 A at a phase angle of 148.19 degrees.\n",
+ "The power factor is 0.815 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.22,Page number: 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the copper loss in the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "K=0.25 #Turns ratio of the step-down transformer\n",
+ "R1=1.4 #Resistance of the primary(in Ohms)\n",
+ "X1=5.5 #Reactance of the primary(in Ohms)\n",
+ "R2=0.06 #Resistance of the secondary(in Ohms)\n",
+ "X2=0.04 #Reactance of the secondary(in Ohms)\n",
+ "Vsc=24.0 #Voltage of the HV winding(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Re1=R1+(R2/(K*K))\n",
+ "Xe1=X1+(X2/(K*K))\n",
+ "Ze1=sqrt((Re1*Re1)+(Xe1*Xe1))\n",
+ "Isc=Vsc/Ze1\n",
+ "I1=Isc\n",
+ "I2=I1/K\n",
+ "P=I1*I1*Re1\n",
+ "pf=P/(Vsc*I1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the LV winding is %.3f A.\" %(I2)\n",
+ "print \"(b)The copper loss in the transformer is %.2f W.\" %(P)\n",
+ "print \"(c)The power factor is %.4f.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the LV winding is 14.594 A.\n",
+ "(b)The copper loss in the transformer is 31.42 W.\n",
+ "(c)The power factor is 0.3588.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.23,Page number: 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the regulation and efficiency.\"\"\"\n",
+ "\n",
+ "from math import acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=20e03 #Power rating of the transformer(in Volt-Amperes)\n",
+ "V1=2200.0 #Voltage of the primary winding(in Volts)\n",
+ "V2=220.0 #Voltage of the secondary winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "Vsc=86.0 #Voltage measured during short-circuit test(in Volts)\n",
+ "Isc=10.5 #Current measured during short-circuit test(in Amperes)\n",
+ "Psc=360.0 #Power measured during short-circuit test(in Watts)\n",
+ "Voc=220.0 #Voltage measured during open-circuit test(in Volts)\n",
+ "Ioc=4.2 #Current measured during open-circuit test(in Amperes)\n",
+ "Poc=148.0 #Power measured during open-circuit test(in Watts)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ze1=Vsc/Isc\n",
+ "Re1=Psc/(Isc*Isc)\n",
+ "Xe1=sqrt((Ze1*Ze1)-(Re1*Re1))\n",
+ "I1=VA/V1\n",
+ "reg=(I1*((Re1*pf)+(Xe1*sin(acos(pf)))))/V1\n",
+ "Pc=(I1/Isc)*(I1/Isc)*Psc\n",
+ "Pi=Poc\n",
+ "Po=VA*pf\n",
+ "effi=Po/(Po+Pc+Pi)\n",
+ "pf_sc=Re1/Ze1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The regulation at 0.8 pf lagging at full load is %.2f per cent.\" %(reg*100) \n",
+ "print \" The efficiency is %.2f per cent.\" %(effi*100)\n",
+ "print \"(b)The power factor on short circuit is %.3f lagging.\" %(pf_sc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The regulation at 0.8 pf lagging at full load is 2.94 per cent.\n",
+ " The efficiency is 97.45 per cent.\n",
+ "(b)The power factor on short circuit is 0.399 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.24,Page number: 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the efficiency at half of full-load current.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=200e03 #Power rating of the transformer(in VA)\n",
+ "effi_FL=0.98 #Full-load efficiency of the transformer\n",
+ "pf=0.8 #Lagging power factor\n",
+ "x=0.75 #Fraction of load at which maximum efficiency occurs\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Po=VA*pf\n",
+ "Pin=Po/effi_FL\n",
+ "tot_loss=Pin-Po\n",
+ "Pc=tot_loss/(1+(x*x))\n",
+ "Pi=tot_loss-Pc\n",
+ "x_new=0.5\n",
+ "P1=(x_new*x_new*Pc)+Pi\n",
+ "effi_half=(Po/2.0)/((Po/2.0)+P1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The efficiency at half of full-load current is %.3f per cent.\" %(effi_half*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency at half of full-load current is 97.922 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.25,Page number: 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the efficiency at different rated kVAs.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=150e03 #Power rating of the transformer(in Volt-Amperes)\n",
+ "V1=5000.0 #Voltage of the primary winding(in Volts)\n",
+ "V2=250.0 #Voltage of the secondary winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "Pc=1.8e03 #Full-load copper losses(in Watts)\n",
+ "Pi=1.5e03 #Core losses(in Watts)\n",
+ "flux=60e-03 #Maximum core flux(in Webers)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "N2=V2/(4.44*f*flux)\n",
+ "N1=round(N2,0)*(V1/V2)\n",
+ "\"\"\"Case 1:\"\"\"\n",
+ "Po=(VA*pf)\n",
+ "effi_a=Po/(Po+Pi+Pc)\n",
+ "\"\"\"Case 2:\"\"\"\n",
+ "pf=1.0\n",
+ "Po=0.5*VA*pf\n",
+ "Pc_new=0.5*0.5*Pc\n",
+ "effi_b=Po/(Po+Pi+Pc_new)\n",
+ "\n",
+ "x=sqrt(Pi/Pc)\n",
+ "VA_max_effi=x*VA\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of turns in the primary winding is %d turns.\" %(round(N1,0))\n",
+ "print \" The number of turns in the secondary winding is %d turns.\" %(round(N2,0))\n",
+ "print \"(b)The efficiency at full rated kVA with 0.8 pf lagging is %.2f percent.\" %(effi_a*100) \n",
+ "print \"(c)The efficiency at half rated kVA with unity pf is %.2f percent.\" %(effi_b*100)\n",
+ "print \"(d)The kVA load for maximum efficieny is %d kVA.\" %(round((VA_max_effi/1000),0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of turns in the primary winding is 380 turns.\n",
+ " The number of turns in the secondary winding is 19 turns.\n",
+ "(b)The efficiency at full rated kVA with 0.8 pf lagging is 97.32 percent.\n",
+ "(c)The efficiency at half rated kVA with unity pf is 97.47 percent.\n",
+ "(d)The kVA load for maximum efficieny is 137 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.26,Page number: 409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance on the high voltage side.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=50e03 #Power rating of the transformer(in VA)\n",
+ "V1=2400.0 #Voltage of primary winding(in Volts)\n",
+ "V2=240.0 #Voltage of secondary winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "LV=240.0 #Low tension voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I2=VA/V2\n",
+ "Z_L=V2/I2\n",
+ "K=V2/V1\n",
+ "Zeq=Z_L/(K*K)\n",
+ "I_high=K*I2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The load impedance connected to the LV side is %.3f Ohms.\" %(Z_L)\n",
+ "print \"(b)The load impedance referred to to the high voltage side is %.2f Ohms.\" %(Zeq)\n",
+ "print \"(c)The current referred to the high voltage side is %.3f A.\" %(I_high) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The load impedance connected to the LV side is 1.152 Ohms.\n",
+ "(b)The load impedance referred to to the high voltage side is 115.20 Ohms.\n",
+ "(c)The current referred to the high voltage side is 20.833 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.27,Page number: 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the kVA output of the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=10e03 #Power rating of the transformer(in VA)\n",
+ "V1=2300.0 #Voltage of HT winding(in Volts)\n",
+ "V2=230.0 #Voltage of LT winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_HT=VA/V1\n",
+ "I_LT=VA/V2\n",
+ "I2=I_HT+I_LT\n",
+ "I1=I_LT\n",
+ "kVA_out=(V1*I2)/1000.0\n",
+ "VA_c=(V1*I1)\n",
+ "VA_i=V1*(I2-I1)\n",
+ "K=V1/(V1+V2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current distribution in the windings: load current=%.2f A and the input current is %.2f A.\" %(I2,I1)\n",
+ "print \"(b)The kVA output is %.2f kVA.\" %(kVA_out)\n",
+ "print \"(c)The volt-amperes transferred conductively is %.2f kVA\" %(VA_c/1000.0) \n",
+ "print \" The volt-amperes transferred inductively is %.2f kVA\" %(VA_i/1000.0)\n",
+ "print \"(d)The saving in copper as compared to the two-winding transformer is %.2f per cent.\" %(K*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current distribution in the windings: load current=47.83 A and the input current is 43.48 A.\n",
+ "(b)The kVA output is 110.00 kVA.\n",
+ "(c)The volt-amperes transferred conductively is 100.00 kVA\n",
+ " The volt-amperes transferred inductively is 10.00 kVA\n",
+ "(d)The saving in copper as compared to the two-winding transformer is 90.91 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter14.ipynb b/Basic_Electrical_Engineering/Chapter14.ipynb
new file mode 100755
index 00000000..8d806acc
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter14.ipynb
@@ -0,0 +1,1213 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14: ALTERNATORS AND SYNCHRONOUS MOTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1,Page number: 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of poles on the generator if the frequency of the generated voltage is decreased.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=60 #Frequency of ac-generator(in Hertz)\n",
+ "P=6 #Number of poles\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120*f)/P\n",
+ "f=20\n",
+ "P=(120*f)/Ns\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of rotation of the generator is %d rpm.\" %(Ns)\n",
+ "print \"If the frequency is reduced to 20Hz,the required number of poles is %d.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of rotation of the generator is 1200 rpm.\n",
+ "If the frequency is reduced to 20Hz,the required number of poles is 2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.2,Page number: 441\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the distribution factor for a machine.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "slots=9 #Number of slots\n",
+ "slot_angle=radians(180/9) #Slot angle(in radians)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "q_a=120.0/degrees(slot_angle)\n",
+ "k_d_a=sin(q_a*(slot_angle/2.0))/(q_a*sin(slot_angle/2.0))\n",
+ "q_b=60.0/degrees(slot_angle)\n",
+ "k_d_b=sin(q_b*(slot_angle/2.0))/(q_b*sin(slot_angle/2.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The distribution factor for a machine for a three phase winding with 120 degrees phase group is %.3f.\" %(k_d_a)\n",
+ "print \"(b)The distribution factor for a machine for a three phase winding with 60 degrees phase group is %.3f.\" %(k_d_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The distribution factor for a machine for a three phase winding with 120 degrees phase group is 0.831.\n",
+ "(b)The distribution factor for a machine for a three phase winding with 60 degrees phase group is 0.960.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.3,Page number: 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed,the generated emf per phase,and the line emf of a three-phase alternator.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees,sqrt,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "phase=3 #Number of phases\n",
+ "f=50 #Frequency rating(in Hertz)\n",
+ "P=20 #Number of poles \n",
+ "slots=180 #Number of slots on the stator\n",
+ "cond_per_slot=8 #Number of conductors per slot\n",
+ "flux=25e-03 #Flux per pole(in Weber) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=slots*cond_per_slot\n",
+ "T=(Z/2)/phase\n",
+ "Ns=(120*f)/P\n",
+ "k_p=1\n",
+ "slots_per_pole=slots/P\n",
+ "slot_angle=radians(180/slots_per_pole)\n",
+ "q=slots_per_pole/phase\n",
+ "k_d=sin(q*(slot_angle/2))/(q*sin(slot_angle/2))\n",
+ "E=4.44*f*flux*T*k_p*k_d\n",
+ "line_emf=sqrt(3.0)*E\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The speed of the alternator is %d rpm.\" %(round(Ns,0))\n",
+ "print \"(b)The rms value of generated EMF per phase is %.2f V.\" %(E)\n",
+ "print \"(c)The line EMF is %.2f V.\" %(line_emf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed of the alternator is 300 rpm.\n",
+ "(b)The rms value of generated EMF per phase is 1278.45 V.\n",
+ "(c)The line EMF is 2214.34 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.4,Page number: 446\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage regulation for full-load for a three-phase alternator.\"\"\"\n",
+ "\n",
+ "from math import sqrt,cos,acos \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=600e06 #Power rating of the alternator(in VA) \n",
+ "V_L=22e03 #Rated terminal voltage(in Volts) \n",
+ "sync_imp=0.16 #Synchronous impedance per phase(in Ohms)\n",
+ "res_phase=0.014 #Resistance per phase(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=P/(sqrt(3)*V_L)\n",
+ "Iph=I_L\n",
+ "V=V_L/sqrt(3)\n",
+ "Vz=Iph*sync_imp\n",
+ "theta=acos(res_phase/sync_imp)\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta-phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_a=(E-V)/V\n",
+ "pf=1\n",
+ "phi=acos(pf)\n",
+ "alpha=theta-phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_b=(E-V)/V\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta+phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_c=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For a power factor of 0.8 lagging:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_a*100)\n",
+ "print \"(b)For unity power factor:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_b*100)\n",
+ "print \"(c)For a power factor of 0.8 leading:\" \n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_c*100)\n",
+ "print \"\\nNote:The voltage regulation for leading power-factor load is negative.\"\n",
+ "print \"It means that on removing the load, the terminal voltage decreases.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For a power factor of 0.8 lagging:\n",
+ "The voltage regulation for full load is 14.20 percent.\n",
+ "(b)For unity power factor:\n",
+ "The voltage regulation for full load is 3.64 percent.\n",
+ "(c)For a power factor of 0.8 leading:\n",
+ "The voltage regulation for full load is -8.90 percent.\n",
+ "\n",
+ "Note:The voltage regulation for leading power-factor load is negative.\n",
+ "It means that on removing the load, the terminal voltage decreases.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.5,Page number: 450\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the synchronous reactance per phase and the voltage regulation for a three-phase star-connected alternator.\"\"\"\n",
+ "\n",
+ "from math import acos,sqrt,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=900 #Open-circuit voltage(line to line)(in Volts)\n",
+ "V_L_rated=3.3e03 #Rated voltage of the alternator(in Volts)\n",
+ "I_f=100 #Full-load current(in Amperes)\n",
+ "R=0.9 #Armature Resistance(in Ohm/phase)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_oc=V_L/sqrt(3)\n",
+ "I_sc=I_f\n",
+ "sync_imp=V_oc/I_sc\n",
+ "sync_rea=sqrt((sync_imp*sync_imp)-(R*R))\n",
+ "theta=acos(R/sync_imp)\n",
+ "V=V_L_rated/sqrt(3)\n",
+ "Vz=I_f*sync_imp\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta-phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_a=(E-V)/V\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta+phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_b=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The synchronous reactance per phase is %.3f Ohms.\" %(sync_rea)\n",
+ "print \"(a) For a power factor of 0.8 lagging:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent\" %(vol_reg_a*100)\n",
+ "print \"(b) For a power factor of 0.8 leading:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_b*100)\n",
+ "print \"\\nNote: The voltage regulation for leading power-factor load is negative.\"\n",
+ "print \"It means that on removing the load, the terminal voltage decreases.\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The synchronous reactance per phase is 5.118 Ohms.\n",
+ "(a) For a power factor of 0.8 lagging:\n",
+ "The voltage regulation for full load is 21.34 percent\n",
+ "(b) For a power factor of 0.8 leading:\n",
+ "The voltage regulation for full load is -9.03 percent.\n",
+ "\n",
+ "Note: The voltage regulation for leading power-factor load is negative.\n",
+ "It means that on removing the load, the terminal voltage decreases.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.6,Page number: 455\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the angle of retard of a synchronous motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,acos,cos,pi,asin,sin,degrees\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po=9e03 #Power rating of synchronous motor(in Watts) \n",
+ "V_L=400 #Voltage rating of synchronous motor(in Watts)\n",
+ "Zs=0.4+3*1j #Synchronous impedance per phase(in Ohms) \n",
+ "pf=0.8 #Power factor(leading) \n",
+ "effi=0.9 #Efficiency of the motor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=Po/effi\n",
+ "I_L=Pin/(sqrt(3)*V_L*pf)\n",
+ "I=I_L\n",
+ "phi=acos(pf)\n",
+ "mod_Zs=abs(Zs)\n",
+ "theta=phase(Zs)\n",
+ "V=V_L/sqrt(3)\n",
+ "Er=I*mod_Zs\n",
+ "E=sqrt((V*V)+(Er*Er)+(2*V*Er*cos(pi-(theta+phi))))\n",
+ "E_L=sqrt(3)*E\n",
+ "angle_retard=asin((Er*sin(theta+phi))/E)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The angle of retard of the rotor is %.2f degrees.\" %(degrees(angle_retard))\n",
+ "print \"The excitation emf E to which the motor has to be excited to give a full-load output at 0.8 leading power factor is %.2f V.\" %(E_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of retard of the rotor is 10.47 degrees.\n",
+ "The excitation emf E to which the motor has to be excited to give a full-load output at 0.8 leading power factor is 453.81 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.7,Page number: 459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line emf generated by the alternator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "S=24.0 #Number of slots in the alternator\n",
+ "C=12.0 #Number of conductors per slot\n",
+ "flux=0.1 #Flux per pole(in Weber)\n",
+ "P=4.0 #Number of poles in the alternator\n",
+ "Ns=1500.0 #Synchronous speed of the alternator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zph=S*C/3.0\n",
+ "T=Zph/2.0\n",
+ "S_pole=S/P\n",
+ "slot_ang=180.0/S_pole\n",
+ "q=S_pole/3.0\n",
+ "kd=sin((q*radians(slot_ang)/2))/(q*sin(radians(slot_ang/2)))\n",
+ "f=(P*Ns)/120.0\n",
+ "kp=1.0\n",
+ "E=4.44*flux*f*T*kp*kd\n",
+ "E_L=sqrt(3.0)*E\n",
+ " \n",
+ " \n",
+ "#Result:\n",
+ "print \"The line emf generated when the alternator runs at 1500 rpm is %.2f V.\" %(E_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line emf generated when the alternator runs at 1500 rpm is 1782.78 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.8,Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the net emf induced in the 6 coil in series constituting the alternator winding.\"\"\"\n",
+ "\n",
+ "from math import radians,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "q=6.0 #Number of slots per pole per phase\n",
+ "angle=30.0 #Electrical angle between two consecutive slotss(in degrees) \n",
+ "e=10.0 #Emf of each coil(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "kd=sin(q*(radians(angle/2.0)))/(q*sin(radians(angle/2.0)))\n",
+ "arith_sum=6*e\n",
+ "Er=kd*arith_sum\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net emf induced in the six coils in series is %.3f V.\" %(round(Er,3)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net emf induced in the six coils in series is 38.637 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.9,Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of poles and the current rating of an alternator.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=120.0 #Speed of the alternator(in rpm)\n",
+ "f=50.0 #Frequency of the alternator(in Hertz)\n",
+ "VA=100e06 #VA rating of the alternator(in Volt-Ampere)\n",
+ "pf=1.0 #Power factor\n",
+ "V_L=11e03 #Line voltage(in Volts)\n",
+ "effi=0.97 #Efficiency of the alternator \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=(120.0*f)/N\n",
+ "Po=VA*pf\n",
+ "I_L=VA/(sqrt(3.0)*V_L)\n",
+ "Pin=Po/effi\n",
+ "tor=Pin/(2*pi*N/60.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of poles is %d.\" %(P)\n",
+ "print \"(b)The current rating is %.2f A.\" %(I_L)\n",
+ "print \"(c)The input power is %.2f MW.\" %(round((Pin/1000000),2))\n",
+ "print \"(d)The prime-mover torque applied to the genrator shaft is %e Nm.\" %(tor)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of poles is 50.\n",
+ "(b)The current rating is 5248.64 A.\n",
+ "(c)The input power is 103.09 MW.\n",
+ "(d)The prime-mover torque applied to the genrator shaft is 8.203863e+06 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.10,Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage regulation for a load.\"\"\"\n",
+ "\n",
+ "from math import atan,radians,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=11e03 #Line voltage of the star-connected alternator(in Volts)\n",
+ "VA=800e03 #Power rating of the alternator(in Volt-Amperes)\n",
+ "Rs=1.5 #Resistance per phase(in Ohms)\n",
+ "Xs=25.0 #Synchronous reactance(in Ohms)\n",
+ "pf=0.8 #Leading power factor\n",
+ "Po=600e03 #Output power(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "V=Vph\n",
+ "Iph=Po/(sqrt(3.0)*V_L*pf)\n",
+ "Zs=sqrt((Rs*Rs)+(Xs*Xs))\n",
+ "theta=atan(Xs/Rs)\n",
+ "Vz=Iph*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta+pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage regulation is %.3f per cent.\" %(reg*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage regulation is -7.641 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.11,Page number: 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load voltage regulation of the alternator.\"\"\"\n",
+ "\n",
+ "from math import atan,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6e03 #Line voltage of the alternator(in Volts)\n",
+ "VA=6000e03 #Power rating of the alternator(in Volt-Amperes)\n",
+ "R=0.2 #Winding resistance per phase(in Ohms)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "V_L_OC=480.0 #Line voltage in open-circuit test(in Volts)\n",
+ "I_f_OC=10.0 #Field current in open-circuit test(in Amperes)\n",
+ "I_L_SC=105.0 #Line current in short-circuit test(in Amperes)\n",
+ "I_f_SC=5.0 #Field current in short-circuit test(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"In the short-circuit test,the currents are small compared to the full-load current.\"\"\"\n",
+ "V=V_L/sqrt(3.0)\n",
+ "I=VA/(3*V)\n",
+ "V_ph_OC=V_L_OC/sqrt(3.0)\n",
+ "\"\"\"Since the field current of 5 A gives an armature current of 105 A,a field current of 10 A will give an armature \n",
+ " current of (105*2)=210 A.\"\"\"\n",
+ "I_ph=I_L_SC*2\n",
+ "Zs=V_ph_OC/I_ph\n",
+ "Xs=sqrt((Zs*Zs)-(R*R))\n",
+ "theta=atan(Xs/R)\n",
+ "Vz=I*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The full-load voltage regulation of the alternator at 0.8 lagging power factor is %.2f per cent.\" %(reg*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The full-load voltage regulation of the alternator at 0.8 lagging power factor is 16.73 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.12,Page number: 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage of the generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Frequency rating of the generator(in Hertz)\n",
+ "Z_p=96.0 #Number of conductors per phase\n",
+ "flux=0.1 #Flux per pole(in Webers)\n",
+ "Xs=5.0 #Synchronous reactance per phase(in Ohms)\n",
+ "kd=0.96 #Distribution factor for the stator winding\n",
+ "Z_L=10.0 #Load impedance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zs=1j*Xs\n",
+ "kp=1.0\n",
+ "T=Z_p/2.0\n",
+ "E=4.44*f*flux*kp*kd*T\n",
+ "V=E/(1+(Zs/Z_L))\n",
+ "V_L=sqrt(3.0)*abs(V)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The terminal voltage of the generator is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The terminal voltage of the generator is 1584.79 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.13,Page number: 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage change of voltage.\"\"\"\n",
+ "\n",
+ "from math import atan,radians,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6.6e03 #Line voltage of the star-connected alternator(in Volts)\n",
+ "VA=1500e03 #Power rating of the alternator(in Volt-Amperes)\n",
+ "Rs=0.5 #Resistance per phase(in Ohms)\n",
+ "Xs=5.0 #Synchronous reactance(in Ohms)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "V=Vph\n",
+ "Iph=VA/(3.0*Vph)\n",
+ "Zs=sqrt((Rs*Rs)+(Xs*Xs))\n",
+ "theta=atan(Xs/Rs)\n",
+ "Vz=Iph*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage change in voltage is %.3f per cent.\" %(reg*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage change in voltage is 12.432 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14,Page number: 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage and load regulation.\"\"\"\n",
+ "\n",
+ "from math import atan,radians,acos,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6599.0 #Line voltage of the star-connected alternator(in Volts)\n",
+ "Rs=0.5 #Resistance per phase(in Ohms)\n",
+ "Xs=5.0 #Synchronous reactance(in Ohms)\n",
+ "I=130.0 #Full-load current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E=V_L/sqrt(3.0)\n",
+ "Zs=Rs+1j*Xs\n",
+ "theta=atan(Xs/Rs)\n",
+ "Vz=I*abs(Zs)\n",
+ "pf=0.8\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "tor_ang=asin((Vz*sin(alpha))/E)\n",
+ "V_a=(E*cos(tor_ang))-(Vz*cos(alpha))\n",
+ "reg_a=(E-V_a)/V_a\n",
+ "pf=0.6\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta+pf_ang\n",
+ "beta=pi-alpha\n",
+ "tor_ang=asin((Vz*sin(beta))/E)\n",
+ "V_b=(E*cos(tor_ang))+(Vz*cos(beta))\n",
+ "reg_b=(E-V_b)/V_b\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The terminal voltage when the power factor is 0.8 lagging is %.2f V.\" %(V_a)\n",
+ "print \" The load regulation is %.2f per cent.\" %(reg_a*100) \n",
+ "print \"(b)The terminal voltage when the power factor is 0.6 leading is %.2f V.\" %(V_b)\n",
+ "print \" The load regulation is %.2f per cent.\" %(reg_b*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The terminal voltage when the power factor is 0.8 lagging is 3337.45 V.\n",
+ " The load regulation is 14.16 per cent.\n",
+ "(b)The terminal voltage when the power factor is 0.6 leading is 4265.21 V.\n",
+ " The load regulation is -10.67 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.15,Page number: 464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage load regulation.\"\"\"\n",
+ "\n",
+ "from math import acos,atan\n",
+ "\n",
+ "#Variable Declration:\n",
+ "VA=1.5e06 #Power rating of the synchronous generator(in Volt-Amperes)\n",
+ "V_L=11e03 #Line voltage(in Volts)\n",
+ "Rs=1.2 #Armature resistance(in Ohms)\n",
+ "Xs=25.0 #Synchronous reactance per phase(in Ohms)\n",
+ "P_L=1.4375e06 #Load to be delivered(in Volt-Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "I=P_L/(3*V)\n",
+ "Zs=sqrt((Rs*Rs)+(Xs*Xs))\n",
+ "Vz=I*Zs\n",
+ "pf=0.8\n",
+ "pf_ang=acos(pf)\n",
+ "theta=atan(Xs/Rs)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg_a=(E-V)/V\n",
+ "alpha=theta+pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg_b=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The percentage load regulation for a power factor of 0.8 lagging is %.2f per cent.\" %(reg_a*100)\n",
+ "print \"(b)The percentage load regulation for a power factor of 0.8 leading is %.2f per cent.\" %(reg_b*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The percentage load regulation for a power factor of 0.8 lagging is 21.15 per cent.\n",
+ "(b)The percentage load regulation for a power factor of 0.8 leading is -13.12 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.16,Page number: 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the torque angle of the alternator.\"\"\"\n",
+ "\n",
+ "from math import acos,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=0.5 #Effective resistance per phase of the alternator(in Ohms)\n",
+ "V_L=2200.0 #Line voltage of the alternator(in Volts)\n",
+ "I_FL=200.0 #Full-load current(in Amperes)\n",
+ "If=30.0 #Field current(in Amperes)\n",
+ "V_L_oc=1100.0 #Line-to-line voltage on open circuit(in Volts)\n",
+ "pf=0.8 #Lagging power factor \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zs=V_L_oc/(sqrt(3.0)*I_FL)\n",
+ "theta=acos(R/Zs)\n",
+ "Vz=I_FL*Zs\n",
+ "V=V_L/sqrt(3.0)\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "Po=V*I_FL*pf\n",
+ "tor_ang=theta-acos((Po+(V*V*cos(theta)/Zs))*(Zs/(E*V)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The torque angle of the alternator is %.2f degrees.\" %(degrees(tor_ang))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The torque angle of the alternator is 14.35 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.17,Page number: 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"\"Finding the synchronising power of the alternator.\"\"\"\n",
+ "\n",
+ "from math import acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=6.0 #Number of poles\n",
+ "VA=3e06 #Power rating of the alternator(in Volt-Amperes)\n",
+ "Ns=1000.0 #Speed of operation of the alternator(in rpm)\n",
+ "V_L=3.3e03 #Line voltage of the load(in Volts)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "I=VA/(sqrt(3.0)*V_L)\n",
+ "IXs=0.25*V\n",
+ "Xs=IXs/I\n",
+ "rotor_dis=radians(1*(P/2.0))\n",
+ "Vz=I*Xs\n",
+ "theta=pi/2\n",
+ "pf_ang=acos(0.8)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "Psy=(3*E*V*sin(rotor_dis))/(Xs)\n",
+ "tor=(3*Psy)/(2*pi*Ns/60)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The synchronising power is %.2f kW.\" %(Psy/1000)\n",
+ "print \"(b)The synchronising torque per mechanical degree is %.2f kNm.\" %(tor/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The synchronising power is 733.08 kW.\n",
+ "(b)The synchronising torque per mechanical degree is 21.00 kNm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.18,Page number: 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the armature current and power factor.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=2300.0 #Line voltage of the winding(in Volts)\n",
+ "f=50.0 #Operating frequency of the synchronous motor(in Hertz)\n",
+ "Psh=205.0 #Power delivered by the motor(in Horse Power)\n",
+ "ang=15.0 #Power angle(in degrees)\n",
+ "Xs=11.0 #Synchronous reactance(in Ohms)\n",
+ "effi=0.90 #Efficiency of the motor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "Psh=Psh*746.0\n",
+ "Pd=Psh/effi\n",
+ "E=(Pd*Xs)/(3.0*V*sin(radians(ang)))\n",
+ "I=(rect(V,0)-rect(E,radians(-ang)))/(1j*Xs)\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The excitation voltage per phase is %.2f V per phase.\" %(E)\n",
+ "print \"(b)The armature current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I),degrees(phase(I)))\n",
+ "print \"(c)The power factor is %.4f leading.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The excitation voltage per phase is 1812.83 V per phase.\n",
+ "(b)The armature current is 57.44 A at a phase angle of 42.05 degrees.\n",
+ "(c)The power factor is 0.7426 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.19,Page number: 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current and the power factor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6600.0 #Line voltage(in Volts)\n",
+ "Xs=20.0 #Synchronous reactance per phase(in Ohms)\n",
+ "Pin=915e03 #Power consumed by the motor(in Watts)\n",
+ "E_L=8942.0 #Induced line emf per phase(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "E=E_L/sqrt(3.0)\n",
+ "I_cos=Pin/(sqrt(3.0)*V_L)\n",
+ "BN=Xs*I_cos\n",
+ "NA=sqrt((E*E)-(BN*BN))\n",
+ "NO=NA-V\n",
+ "Er=sqrt((NO*NO)+(BN*BN))\n",
+ "I_L=Er/Xs\n",
+ "pf=I_cos/I_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current is %.2f A.\" %(I_L)\n",
+ "print \"(b)The power factor is %.4f leading.\" %(pf) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current is 97.05 A.\n",
+ "(b)The power factor is 0.8247 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.20,Page number: 467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power factor when the load on the motor increases.\"\"\"\n",
+ "\n",
+ "from math import acos,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6600.0 #Line voltage(in Volts)\n",
+ "Xs=15.0 #Synchronous reactance per phase(in Ohms)\n",
+ "Pin=500e03 #Power consumed by the motor(in Watts)\n",
+ "pf=0.8 #Leading power factor\n",
+ "Pin_new=800e03 #New Input power(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "Zs=Xs\n",
+ "I_L=Pin/(sqrt(3.0)*V_L*pf)\n",
+ "Er=I_L*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=(pi/2)-pf_ang\n",
+ "E=sqrt((V*V)+(Er*Er)+(2*V*Er*cos(alpha)))\n",
+ "I1_cos=Pin_new/(sqrt(3.0)*V_L)\n",
+ "sin_tor=(Pin_new*Xs)/(E*V)\n",
+ "AN=V*sin_tor\n",
+ "NB=E-(V*cos(asin(sin_tor)))\n",
+ "Er1=sqrt((AN*AN)+(NB*NB))\n",
+ "I1=Er1/Xs\n",
+ "pf=I1_cos/I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power factor when the load on the motor increases is %.4f leading.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power factor when the load on the motor increases is 0.3229 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.21,Page number: 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power factor and kVA rating of the synchronous motor.\"\"\"\n",
+ "\n",
+ "from math import atan,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Si=500e03 #Load supplied by the three-phase system(in Volt-Amperes)\n",
+ "pf_i=0.5 #Lagging power factor of three-phase system\n",
+ "Po=100.0 #Load supplied by the synchronous motor(in Horse-Power)\n",
+ "pf_t=0.9 #Overall lagging power factor \n",
+ "effi=0.87 #Efficiency of the synchronous motor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pi=Si*pf_i\n",
+ "Qi=Si*sin(acos(pf_i))\n",
+ "Ps=(Po*746)/effi\n",
+ "Pt=Pi+Ps\n",
+ "St=Pt/pf_t\n",
+ "Qt=St*sin(acos(pf_t))\n",
+ "Qs=Qt-Qi\n",
+ "pf_ang=atan(Qs/Ps)\n",
+ "pf_s=cos(pf_ang)\n",
+ "Ss=sqrt((Ps*Ps)+(Qs*Qs))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The power faactor of the synchronous motor is %.2f leading.\" %(pf_s)\n",
+ "print \"(b)The kVA rating of the synchronous motor is %.2f kVA.\" %(Ss/1000.0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The power faactor of the synchronous motor is 0.30 leading.\n",
+ "(b)The kVA rating of the synchronous motor is 283.67 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter15.ipynb b/Basic_Electrical_Engineering/Chapter15.ipynb
new file mode 100755
index 00000000..f49bd253
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter15.ipynb
@@ -0,0 +1,957 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15: INDUCTION MOTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.1,Page number: 480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the synchronous speed of an induction motor and the frequency of rotor currents at standstill.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=6.0 #Number of poles \n",
+ "f=50.0 #Operating frequency of the induction motor(in Hertz)\n",
+ "s_no_load=0.01 #Slip at no-load \n",
+ "s_full_load=0.03 #Slip at full-load\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "N_no_load=Ns*(1-s_no_load)\n",
+ "N_full_load=Ns*(1-s_full_load)\n",
+ "s_standstill=1.0\n",
+ "fr_standstill=s_standstill*f\n",
+ "fr_full_load=s_full_load*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The synchronous speed is %d rpm.\" %(Ns) \n",
+ "print \"(b)The no-load speed is %d rpm.\" %(N_no_load) \n",
+ "print \"(c)The full-load speed is %d rpm.\" %(N_full_load) \n",
+ "print \"(d)The frequency of rotor-currents at standstill is %.2f Hz.\" %(fr_standstill)\n",
+ "print \"(e)The frequency of rotor-currents at full-load is %.2f Hz.\" %(fr_full_load)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The synchronous speed is 1000 rpm.\n",
+ "(b)The no-load speed is 990 rpm.\n",
+ "(c)The full-load speed is 970 rpm.\n",
+ "(d)The frequency of rotor-currents at standstill is 50.00 Hz.\n",
+ "(e)The frequency of rotor-currents at full-load is 1.50 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.2,Page number: 480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the frequency of rotor-current in an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=12.0 #Number of poles \n",
+ "f=50.0 #Operating frequency of induction motor(in Hertz)\n",
+ "N=485.0 #Speed of the motor(in rpm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "fr=s*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The frequency of the rotor-currents is %.2f Hz.\" %(fr) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of the rotor-currents is 1.50 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.3,Page number: 481 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load slip and speed of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fr=2.0 #Frequency of thr rotoremf at full-load(in Hertz) \n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "P=6.0 #Number of poles \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "s=fr/f\n",
+ "Ns=(120*f)/P\n",
+ "N=Ns*(1-s)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The slip at full-load is %.2f percent.\" %(s*100)\n",
+ "print \"The full-load speed is %d rpm.\" %(N) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The slip at full-load is 4.00 percent.\n",
+ "The full-load speed is 960 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.4,Page number: 481 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the synchronous speed and the rotor frequency of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Frequency of the supply(in Hertz) \n",
+ "P=4.0 #Number of poles\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120*f)/P\n",
+ "s1=0.04\n",
+ "N1=Ns*(1-s1) \n",
+ "N2=600\n",
+ "s2=(Ns-N2)/Ns\n",
+ "fr=s2*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The synchronous speed is %d rpm.\" %(Ns)\n",
+ "print \"(b)The speed of the rotor when the slip is 0.04 is %d rpm.\" %(N1)\n",
+ "print \"(c)The rotor frequency when the speed of the rotor is 600 rpm is %.2f Hz.\" %(fr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The synchronous speed is 1500 rpm.\n",
+ "(b)The speed of the rotor when the slip is 0.04 is 1440 rpm.\n",
+ "(c)The rotor frequency when the speed of the rotor is 600 rpm is 30.00 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.5,Page number: 484 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor current of a three-phase induction motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,acos,radians,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E_L=100.0 #Induced EMF(in Volts)\n",
+ "R2=0.05 #Resistance of rotor windings(in Ohms) \n",
+ "X_20=0.1 #Standstill reactance of rotor windings(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E_20=E_L/sqrt(3.0)\n",
+ "s_a=0.04\n",
+ "E2_a=s_a*E_20\n",
+ "Z2_a=sqrt((R2*R2)+pow((s_a*X_20),2))\n",
+ "I2_a=E2_a/Z2_a\n",
+ "angle_a=acos(R2/Z2_a)\n",
+ "s_b=1.0\n",
+ "E2_b=s_b*E_20\n",
+ "Z2_b=sqrt((R2*R2)+pow((s_b*X_20),2))\n",
+ "I2_b=E2_b/Z2_b\n",
+ "angle_b=acos(R2/Z2_b)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)At 4% slip : \"\n",
+ "print \" The rotor current is %.2f A.\" %(round(I2_a,2))\n",
+ "print \" The phase difference between the rotor voltage and the rotor current is %.2f degrees.\" %(round(degrees(angle_a),2))\n",
+ "print \"\\n(b)At 100% slip :\"\n",
+ "print \" The rotor current is %.2f A.\" %(round(I2_b,2))\n",
+ "print \" The phase difference between the rotor voltage and the rotor current is %.2f degrees.\" %(round(degrees(angle_b),2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)At 4% slip : \n",
+ " The rotor current is 46.04 A.\n",
+ " The phase difference between the rotor voltage and the rotor current is 4.57 degrees.\n",
+ "\n",
+ "(b)At 100% slip :\n",
+ " The rotor current is 516.40 A.\n",
+ " The phase difference between the rotor voltage and the rotor current is 63.43 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.6,Page number: 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the developed power,air-gap power,rotor copper loss,and stator loss in an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "HP=746.0 #Value of Horse-Power(in Watts) \n",
+ "f=50.0 #Operating frequency of the induction motor(in Hertz)\n",
+ "N=1470.0 #Speed of the motor(in rpm)\n",
+ "P=4.0 #Number of poles\n",
+ "phase=3.0 #Number of phases \n",
+ "effi=87.5e-02 #Efficiency of the motor at full-load \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Po=5.0*HP\n",
+ "Pin=Po/effi\n",
+ "total_loss=Pin-Po\n",
+ "mech_loss=0.05*total_loss\n",
+ "elec_loss=total_loss-mech_loss\n",
+ "dev_pow=Po+mech_loss\n",
+ "Ns=(120*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "Pg=dev_pow/(1-s)\n",
+ "P_R=s*Pg\n",
+ "P_S=Pin-Pg\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The developed power is %.2f W.\" %(round(dev_pow,2))\n",
+ "print \"The air-gap power is %.2f W.\" %(round(Pg,2))\n",
+ "print \"The rotor copper loss is %.2f W.\" %(round(P_R,2))\n",
+ "print \"The stator loss is %.2f W.\" %(round(P_S,2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The developed power is 3756.64 W.\n",
+ "The air-gap power is 3833.31 W.\n",
+ "The rotor copper loss is 76.67 W.\n",
+ "The stator loss is 429.55 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.7,Page number: 490 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor speed,the stator current,the power factor and the efficiency of an induction motor. \"\"\"\n",
+ "\n",
+ "from math import sqrt,cos,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=400.0 #Operating voltage of the induction motor(in Volts)\n",
+ "P=4.0 #Number of poles\n",
+ "f=50.0 #Operating frequency of the motor(in Hertz)\n",
+ "s=0.02 #Slip at rated load \n",
+ "rot_loss=0.34e03 #Rotational losses(in Watts)\n",
+ "R1=0.641 #Impedance per phase on the stator side(in Ohms) \n",
+ "X1=1.106 #Impedance per phase on the stator side(in Ohms) \n",
+ "R2_eq=0.332 #Impedance per phase on the stator side(in Ohms)\n",
+ "X_20_eq=0.464 #Impedance per phase on the stator side(in Ohms) \n",
+ "Xg=26.3 #Impedance per phase on the stator side(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V1_mod=V_L/sqrt(3)\n",
+ "V1=rect(V1_mod,0)\n",
+ "Ns=(120*f)/P\n",
+ "N=Ns*(1-s)\n",
+ "V_Th=V1*((Xg/(R1+(X1+Xg)*1j))*1j)\n",
+ "Z_Th=((Xg*(R1+X1*1j))/(R1+(X1+Xg)*1j))*1j\n",
+ "R_L_eq=((1-s)/s)*R2_eq\n",
+ "I1=V_Th/(Z_Th +(R2_eq+X_20_eq*1j)+R_L_eq)\n",
+ "angle=phase(I1)\n",
+ "pf=cos(angle)\n",
+ "Po=(3*abs(I1)*abs(I1)*R_L_eq)-rot_loss\n",
+ "Pi=3*abs(V1)*abs(I1)*cos(phase(I1))\n",
+ "effi=(Po/Pi)*100\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor speed is %d rpm.\" %(round(N,0))\n",
+ "print \"(b)The stator current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1))) \n",
+ "print \"(c)The power factor is %.3f lagging.\" %(pf)\n",
+ "print \"(d)The output power is %.2f W.\" %(Po)\n",
+ "print \" The input power is %.2f W.\" %(Pi)\n",
+ "print \"(e)The efficiency of the motor is %.2f percent.\" %(effi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor speed is 1470 rpm.\n",
+ "(b)The stator current is 12.84 A at a phase angle of -3.78 degrees.\n",
+ "(c)The power factor is 0.998 lagging.\n",
+ "(d)The output power is 7703.00 W.\n",
+ " The input power is 8874.78 W.\n",
+ "(e)The efficiency of the motor is 86.80 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.8,Page number: 495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the standstill rotor reactance of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of induction motor(in Hertz)\n",
+ "P=6.0 #Number of poles\n",
+ "N=940.0 #Speed of motor(in rpm)\n",
+ "R2=0.1 #Resistance per phase(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "X_20=R2/s\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The standstill rotor resistance is %.3f Ohms.\" %(X_20)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The standstill rotor resistance is 1.667 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.9,Page number: 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load slip of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P_motor=6.0 #Number of poles in the induction motor\n",
+ "N_motor=960.0 #Full-load speed of the induction motor(in rpm)\n",
+ "P_alt=4.0 #Number of poles in the alternator\n",
+ "N_alt=1500.0 #Speed of the alternator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "f=(N_alt*P_alt)/120.0\n",
+ "Ns=(120.0*f)/P_motor\n",
+ "s=(Ns-N_motor)/Ns\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The full-load slip of the motor is %.2f percent.\" %(s*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The full-load slip of the motor is 4.00 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.10,Page number: 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor input,motor input and the efficiency of an induction motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4.0 #Number of poles in the induction motor\n",
+ "useful_tor=160.0 #Useful torque(in Newton-metre)\n",
+ "s=0.05 #Slip\n",
+ "P_S=1000.0 #Stator losses(in Watts)\n",
+ "Pm=500.0 #Frictional and windage losses(in Watts)\n",
+ "f=50.0 #Frequency of induction motor(in Hertz)\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "N=(1-s)*Ns\n",
+ "Po=(2*pi*useful_tor*N)/60.0\n",
+ "Pd=Po+Pm\n",
+ "Pg=Pd/(1-s)\n",
+ "Pin=Pg+P_S\n",
+ "effi=Po/Pin\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor input is %.4f kW.\" %(Pg/1000.0)\n",
+ "print \"(b)The motor input is %.4f W.\" %(Pin)\n",
+ "print \"(c)The efficiency is %.4f percent.\" %(effi*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor input is 25.6591 kW.\n",
+ "(b)The motor input is 26659.0570 W.\n",
+ "(c)The efficiency is 89.5609 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.11,Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the slip of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "effi=0.9 #Efficiency of the induction motor\n",
+ "Po=50e03 #Load driven by the motor(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=Po/effi\n",
+ "P_tot=Pin-Po\n",
+ "\"\"\"The no-load losses comprise of the stator iron loss(Pi) and mechanical losses(Pm)\n",
+ " (since the stator and rotor copper losses are negligible).These two losses are independent of the load.\n",
+ " \n",
+ " Given,the mechanical loss,Pm=(no-load loss)/3.0=((Pi+Pm)/3.0).\n",
+ " \n",
+ " Therefore,Pm=(Pi/2.0).\n",
+ " \n",
+ " Total loss=(Stator copper loss)+(Stator iron loss)+(Rotor copper loss)+(Mechanical loss).\"\"\"\n",
+ "Pi=(2.0/7.0)*P_tot\n",
+ "P_R=Pi\n",
+ "Pm=Pi/2.0\n",
+ "Pd=Po+Pm\n",
+ "Pg=Pd+P_R\n",
+ "s=P_R/Pg\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The slip of the induction motor is %.2f percent.\" %(s*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The slip of the induction motor is 3.03 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.12,Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor current in an induction motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V2=100.0 #Induced emf between slip ring terminals(in Volts)\n",
+ "R2=0.4 #Resistance per phase of star-connected rotor windings(in Ohms)\n",
+ "s=0.04 #Slip of rotor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E20=V2/sqrt(3.0)\n",
+ "\"\"\"The rotor reactance X2=(s*X20) is negligible for small values of sand hence cam be ignored.\"\"\"\n",
+ "I2=(s*E20)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rotor current is %.3f A.\" %(I2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rotor current is 5.774 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.13,Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of poles and the slip of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=285.0 #Full-load speed of an induction motor(in rpm)\n",
+ "f=50.0 #Frequency of supply(in Hertz)\n",
+ "P_R=250.0 #Original rotor losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=(120.0*f)/N\n",
+ "\"There has to be even number of poles,such that Ns>N.Thus,the actual number of poles is 20.\"\"\"\n",
+ "P=round((P-1),0)\n",
+ "Ns=(120.0*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "\"\"\"For small values of s,the reactance of (s*X20) is much smaller than the resistance R2,hence\n",
+ " torque is directly proportional to (s/R2).\n",
+ " \n",
+ " It means that the to keep the torque same,the (s/R2) ratio should remain the same.If R2 is doubled,then s also has to be \n",
+ " doubled.\"\"\" \n",
+ "s_new=2*s\n",
+ "\"\"\"Since the full-load current remains the same,on doubling the rotor resistance,the copper loss(I*I*R) is also doubled.\"\"\"\n",
+ "P_R_new=2*P_R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of poles is %d.\" %(P)\n",
+ "print \"(b)The slip is %.2f percent.\" %(s*100)\n",
+ "print \"(c)The slip for full-load torque if the rotor resistance is doubled is %.2f percent.\" %(s_new*100)\n",
+ "print \"(d)The rotor copper losses with added rotor resistance is %.2f W.\" %(P_R_new)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of poles is 20.\n",
+ "(b)The slip is 5.00 percent.\n",
+ "(c)The slip for full-load torque if the rotor resistance is doubled is 10.00 percent.\n",
+ "(d)The rotor copper losses with added rotor resistance is 500.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.14,Page number: 500"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the slip and the power output of an induction motor when external resistances are inserted in each rotor phase.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "s=0.02 #Full-load slip of the induction motor\n",
+ "Po=500 #Power rating of the motor(in HorsePower)\n",
+ "R2=0.25 #Resistance per phase of the rotor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2_new=2.0+R2\n",
+ "s_new=(s/R2)*(R2_new)\n",
+ "\"\"\"If Ns is the synchronous speed of the motor,then the speed of the rotor before inserting external resistance,\n",
+ " N=(1-s)*Ns;\n",
+ " \n",
+ " The speed of the rotor after inserting external resistance is N_new=(1-s_new)*Ns;\"\"\"\n",
+ "\n",
+ "Po_new=((1-s_new)/(1-s))*Po\n",
+ " \n",
+ "\n",
+ "#Result:\n",
+ "print \"The new slip is %.2f percent.\" %(s_new*100)\n",
+ "print \"The new power output is %.2f HP.\" %(Po_new)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new slip is 18.00 percent.\n",
+ "The new power output is 418.37 HP.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15,Page number: 500"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load speed of an induction motor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4.0 #Number of poles in the induction motor\n",
+ "f=50.0 #Rated frequency of the induction motor(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" Starting torque(tor_st)=1.6*(tor_fl) where tor_fl=full-load torque;\n",
+ " Maximum torque(tor_max)=2.0*(tor_fl);\n",
+ " \n",
+ " tor_st/tor_max=0.8;\n",
+ " \n",
+ " (tor_st/tor_max)=(2*s_m)/((s_m*s_m)+1))\n",
+ " \n",
+ " (s_m*s_m)-(2.5*s_m)+1=0 is a quadratic equation whose roots are 2 and 0.5 \n",
+ " \n",
+ " s_m has to be less than 1. Therefore, s_m=0.5; \n",
+ " \n",
+ " Similarly,\n",
+ " (tor_fl)/(tor_max)=0.5; \n",
+ " \n",
+ " (tor_fl)/(tor_max)=(2*s_fl*s_m)/((s_m*s_m)+(s_fl*s_fl))\n",
+ " \n",
+ " Substituting s_m=0.5,we get a quadratic equation,\n",
+ " \n",
+ " (s_fl*s_fl)-(s_fl)+0.125=0 whose roots are 0.8535,0.1465.\n",
+ " \n",
+ " s_fl=0.1465 as s_fl should be less than s_m. \"\"\"\n",
+ "\"\"\"Finding the roots:\"\"\"\n",
+ "s_m,s_fl= symbols('s_m s_fl')\n",
+ "a=solve(s_m**2-(2.5*s_m)+1.0,s_m)\n",
+ "b=solve(s_fl**2-s_fl+0.125, s_fl)\n",
+ "Ns=(120*f)/P\n",
+ "Nfl=Ns*(1-b[0])\n",
+ "Nm=Ns*(1-a[0])\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The full-load speed is %.2f rpm.\" %(Nfl)\n",
+ "print \"(b)The speed at maximum torque is %.2f rpm.\" %(Nm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The full-load speed is 1280.33 rpm.\n",
+ "(b)The speed at maximum torque is 750.00 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.16,Page number: 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor copper loss and the gross torque for an induction motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "s=0.04 #Full-load slip\n",
+ "P=4.0 #Number of poles\n",
+ "f=50.0 #Frequency of the induction motor(in Hertz)\n",
+ "Po=18.65e03 #Power output(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pm=0.025*Po\n",
+ "Pd=Pm+Po\n",
+ "P_R=Pd*(s/(1-s))\n",
+ "Pg=P_R/s\n",
+ "Ns=(120*f)/P\n",
+ "N=Ns*(1-s)\n",
+ "sh_tor=Po/(2*pi*(N/60.0))\n",
+ "gross_tor=Pd/(2*pi*(N/60.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor copper loss is %.2f W.\" %(P_R)\n",
+ "print \"(b)The rotor input is %.2f W.\" %(Pg)\n",
+ "print \"(c)The output(shaft) torque is %.2f Nm.\" %(sh_tor)\n",
+ "print \"(d)The gross torque is %.2f Nm.\" %(gross_tor)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor copper loss is 796.51 W.\n",
+ "(b)The rotor input is 19912.76 W.\n",
+ "(c)The output(shaft) torque is 123.68 Nm.\n",
+ "(d)The gross torque is 126.77 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.17,Page number: 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor current and the rotor power factor for an induction motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,cos,atan\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4.0 #Number of poles in the induction motor\n",
+ "E1=1100.0 #Line voltage(in Volts) \n",
+ "f=50.0 #Operating frequency of the motor(in Hertz)\n",
+ "K=1.0/3.8 #Transformation ratio\n",
+ "R2=0.012 #Rotor resistance per phase(in Ohms)\n",
+ "X20=0.25 #Rotor stanstill reactance per phase(in Ohms) \n",
+ "N=1440.0 #Full-load speed of the motor(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "E20=K*E1\n",
+ "Z20=sqrt((R2*R2)+(X20*X20))\n",
+ "Z2=sqrt((R2*R2)+(s*X20*s*X20))\n",
+ "I20=E20/Z20\n",
+ "pf_20=cos(atan(X20/R2))\n",
+ "I2=(s*E20)/Z2\n",
+ "pf=R2/Z2\n",
+ "I1=100.0/sqrt(3.0)\n",
+ "I_20=I1/K\n",
+ "Z2_rot=E20/I_20\n",
+ "r=sqrt((Z2_rot*Z2_rot)-(X20*X20))-R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor current at starting with slip-rings shorted is %.2f A.\" %(I20)\n",
+ "print \"(b)The rotor power factor at starting with slip-rings shorted is %.5f,lagging.\" %(pf_20)\n",
+ "print \"(c)The rotor current while running at full load with slip-rings shorted is %.3f A.\" %(I2)\n",
+ "print \"(d)The rotor power factor while running at full-load with slip-rings shorted is %.5f,lagging.\" %(pf)\n",
+ "print \"(e)The external rotor resistance is %.4f Ohms.\" %(r)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor current at starting with slip-rings shorted is 1156.56 A.\n",
+ "(b)The rotor power factor at starting with slip-rings shorted is 0.04794,lagging.\n",
+ "(c)The rotor current while running at full load with slip-rings shorted is 741.266 A.\n",
+ "(d)The rotor power factor while running at full-load with slip-rings shorted is 0.76822,lagging.\n",
+ "(e)The external rotor resistance is 1.2835 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter16.ipynb b/Basic_Electrical_Engineering/Chapter16.ipynb
new file mode 100755
index 00000000..7078e036
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter16.ipynb
@@ -0,0 +1,1654 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: DC MACHINES "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.1,Page number: 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage,output current and total power generated by a dc generator.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "e=2.1 #Average emf generated in each conductor(in Volts) \n",
+ "full_load_I=200.0 #Full-load current(in Amperes) \n",
+ "Z=480.0 #Number of conductors in armature\n",
+ "P=8.0 #Number of poles\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A_1=P\n",
+ "E_1=e*(Z/A_1)\n",
+ "I_L_1=full_load_I*A_1\n",
+ "Po_1=E_1*I_L_1\n",
+ "A_2=2\n",
+ "E_2=e*(Z/A_2)\n",
+ "I_L_2=full_load_I*A_2\n",
+ "Po_2=E_2*I_L_2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print(\"(a) When the armature is lap wound \\n \")\n",
+ "print \"The terminal voltage on no load is %.2f V\" %(E_1)\n",
+ "print \"The output current on full load is %.2f A\" %(I_L_1) \n",
+ "print \"The total power generated on full load is %e W\" %(Po_1)\n",
+ "print(\"\\n(b)When the armature is wave wound \\n \")\n",
+ "print \"The terminal voltage on no load is %.2f V\" %(E_2)\n",
+ "print \"The output current on full load is %.2f A\" %(I_L_2) \n",
+ "print \"The total power generated on full load is %e W\" %(Po_2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) When the armature is lap wound \n",
+ " \n",
+ "The terminal voltage on no load is 126.00 V\n",
+ "The output current on full load is 1600.00 A\n",
+ "The total power generated on full load is 2.016000e+05 W\n",
+ "\n",
+ "(b)When the armature is wave wound \n",
+ " \n",
+ "The terminal voltage on no load is 504.00 V\n",
+ "The output current on full load is 400.00 A\n",
+ "The total power generated on full load is 2.016000e+05 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.2,Page number: 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf induced in the armature of a dc generator. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "slots=65.0 #Number of slots\n",
+ "cond_per_slot=12.0 #Number of conductors per slot\n",
+ "A=4.0 #Number of parallel paths\n",
+ "P=4.0 #Number of poles\n",
+ "flux=0.02 #Flux per pole(in Webers) \n",
+ "N=1200.0 #Speed of operation of the dc generator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=slots*cond_per_slot\n",
+ "E=(flux*Z*N*P)/(60*A)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the armature is %.2f V\" %(E)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the armature is 312.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.3,Page number: 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the induced emf in a dc machine.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=500.0 #Initial speed of operation of dc machine(in rpm) \n",
+ "E1=180.0 #Induced emf at 500rpm(in Volts)\n",
+ "N2=600.0 #New speed of operation(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E2=(N2/N1)*E1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The induced emf when the machine runs at 600 rpm is %.2f V\" %(E2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The induced emf when the machine runs at 600 rpm is 216.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.4,Page number: 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"\"Finding the percentage increase in the field flux in a dc generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=750.0 #Initial speed of operation of dc machine(in rpm)\n",
+ "E1=220.0 #Induced emf at 750 rpm(in Volts) \n",
+ "E2_a=250.0 #New emf(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations and Result:\n",
+ "N2_a=(E2_a/E1)*N1\n",
+ "E2_b=250.0\n",
+ "N2_b=600.0\n",
+ "flux_ratio=(E2_b/E1)*(N1/N2_b)\n",
+ " \n",
+ " \n",
+ "#Result:\n",
+ "print \"(a)The speed at which the induced emf is 250V(assuming the flux to be constant) is %d rpm \" %(round(N2_a,0))\n",
+ "print \"(b)The required percentage increase in the field flux so that the induced emf is 250V,while the speed is only 600rpm is %d percent\" %(round(((flux_ratio-1)*100),0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed at which the induced emf is 250V(assuming the flux to be constant) is 852 rpm \n",
+ "(b)The required percentage increase in the field flux so that the induced emf is 250V,while the speed is only 600rpm is 42 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.5,Page number: 525 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the emf induced in the armature.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=440.0 #Load voltage(in Volts) \n",
+ "Rsh=110.0 #Resistance of shunt field coil(in Ohms)\n",
+ "Ra=0.02 #Armature resistance(in Ohms)\n",
+ "I_L=496.0 #Load current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "Eg=V+(Ia*Ra)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the armature is %.2f V\" %(Eg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the armature is 450.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.6,Page number: 525 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the total armature current and the generated emf.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "no_of_lamps=100.0 #Number of lamps\n",
+ "P=60.0 #Power rating of each lamp(in Watts) \n",
+ "V=200 #Voltage rating of each lamp(in Volts)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "Rsh=50 #Shunt field resistance(in Ohms)\n",
+ "Poles=4.0 #Number of poles\n",
+ "no_of_brushes=2.0 #Number of brushes\n",
+ "brush_drop_per_brush=1.0 #Brush drop at each brush(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=P/V\n",
+ "I_L=no_of_lamps*I1\n",
+ "Ish=V/Rsh\n",
+ "Ia=Ish+I_L\n",
+ "A=Poles\n",
+ "Ic=Ia/A\n",
+ "brush_drop=no_of_brushes*brush_drop_per_brush\n",
+ "Eg=V+(Ia*Ra)+brush_drop\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total armature current is %.2f A\" %(Ia)\n",
+ "print \"The current per path is %.2f A\" %(Ic)\n",
+ "print \"The generated emf is %.2f V\" %(Eg)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total armature current is 34.00 A\n",
+ "The current per path is 8.50 A\n",
+ "The generated emf is 208.80 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.7,Page number: 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated in a compound-wound dc generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Load voltage(in Volts)\n",
+ "Rsh=130.0 #Shunt field resistance(in Ohms)\n",
+ "Ra=0.1 #Armature resistance(in Ohms)\n",
+ "Rse=0.1 #Series field resistance(in Ohms)\n",
+ "I_L=100.0 #Load current(in Amperes)\n",
+ "no_of_brushes=2 #Number of brushes \n",
+ "brush_drop_per_brush=1.0 #Brush drop at each brush(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ise=I_L\n",
+ "Vse=Ise*Rse\n",
+ "Vsh=V+Vse\n",
+ "Ish=Vsh/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "brush_drop=no_of_brushes*brush_drop_per_brush\n",
+ "Eg=V+Vse+(Ia*Ra)+brush_drop\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf generated is %.2f V.\" %(Eg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf generated is 272.20 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.8,Page number: 528 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated,the copper losses,and efficiency of a shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po=30e03 #Full-load output power(in Watts)\n",
+ "V=200.0 #Terminal voltage(in Volts)\n",
+ "Ra=0.05 #Armature resistance(in Ohms)\n",
+ "Rsh=50.0 #Shunt field resistance(in Ohms)\n",
+ "loss=1000.0 #Friction losses(in Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=Po/V\n",
+ "Ish=V/Rsh\n",
+ "Ia=Ish+I_L\n",
+ "Eg=V+(Ia*Ra)\n",
+ "copper_loss=(pow(Ish,2)*Rsh)+(pow(Ia,2)*Ra)\n",
+ "effi=Po/(Po+copper_loss+loss)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The emf generated is %.2f V\" %(Eg)\n",
+ "print \"(b)The copper loss is %.2f W\" %(copper_loss)\n",
+ "print \"(c)The efficiency is %.2f percent\" %(effi*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The emf generated is 207.70 V\n",
+ "(b)The copper loss is 1985.80 W\n",
+ "(c)The efficiency is 90.95 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.9,Page number:529 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding armature resistance and the load-current corresponding to maximum efficiency of dc shunt generator.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=210.0 #Full-load voltage(in Volts)\n",
+ "I_L=195.0 #Full-load current(in Amperes)\n",
+ "Rsh=52.5 #Shunt field resistance(in Ohms)\n",
+ "effi=0.90 #Full-load efficiency\n",
+ "stray_loss=710.0 #Stray losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Po=V*I_L\n",
+ "Pin=Po/effi\n",
+ "total_loss=Pin-Po\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "sh_copp_loss=pow(Ish,2)*Rsh\n",
+ "const_loss=sh_copp_loss+stray_loss\n",
+ "arma_copp_loss=total_loss-const_loss\n",
+ "Ra=arma_copp_loss/(pow(Ia,2))\n",
+ "Ia_max_effi=sqrt(const_loss/Ra)\n",
+ "I_L_max_effi=Ia_max_effi-Ish\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The armature resistance is %.5f ohm \" %(Ra)\n",
+ "print \"The load current corresponding to maximum efficiency is %.2f A\" %(I_L_max_effi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The armature resistance is 0.07576 ohm \n",
+ "The load current corresponding to maximum efficiency is 139.04 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.10,Page number: 534 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of series turns required per pole for a level-compounded generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_full_load=100.0 #Full-load current(in Amperes)\n",
+ "sh_turns=1500.0 #Number of turns in the shunt winding \n",
+ "Ish_no_load=4.0 #Shunt current at no-load(in Amperes) \n",
+ "Ish_full_load=6.0 #Shunt current at full-load(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "At_no_load=Ish_no_load*sh_turns\n",
+ "At_full_load=Ish_full_load*sh_turns\n",
+ "At_series=At_full_load-At_no_load\n",
+ "Nse=At_series/I_full_load\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of series turns required per pole is %d \" %(Nse)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of series turns required per pole is 30 \n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.11,Page number: 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the back emf generated in a dc shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=41.0 #Full-load current(in Amperes)\n",
+ "V=250.0 #Full-load voltage(in Volts) \n",
+ "Ra=0.1 #Armature resistance(in Ohms) \n",
+ "Rsh=250.0 #Shunt field resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L-Ish\n",
+ "Eb=V-(Ia*Ra)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The back emf generated in the motor is %.2f V\" %(Eb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The back emf generated in the motor is 246.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.12,Page number: 536 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=2.0 #Number of parallel paths\n",
+ "P=4.0 #Number of poles \n",
+ "Z=888.0 #Number of conductors \n",
+ "flux=23e-03 #Flux per pole(in Webers) \n",
+ "Ia=50.0 #Armature current(in Amperes)\n",
+ "Ra=0.28 #Armature resistance(in Ohms) \n",
+ "V=440.0 #Rated voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb=V-(Ia*Ra)\n",
+ "N=(60*A*Eb)/(flux*Z*P)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the motor is %d rpm\" %(round(N,0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the motor is 626 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.13,Page number: 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V1=460.0 #Initial supply voltage(in Volts)\n",
+ "N1=900.0 #Speed of motor at 460-V(in rpm)\n",
+ "V2=200.0 #Final supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "kflux=V1/N1\n",
+ "N2=V2/(0.7*kflux)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "ans_N2=\"The approximate speed of the motor when the motor is connected across a 200V supply is %d rpm\" %(round(N2,0))\n",
+ "print(ans_N2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The approximate speed of the motor when the motor is connected across a 200V supply is 559 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.14,Page number: 537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed and the gross torque developed by the armature of a dc motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=480.0 #Rated voltage(in Volts) \n",
+ "Ia=110.0 #Armature current at rated voltage(in Amperes)\n",
+ "Ra=0.2 #Armature resistance(in Ohms) \n",
+ "flux=50e-03 #Flux per pole(in Webers) \n",
+ "A=6.0 #Number of parallel paths\n",
+ "P=6.0 #Number of poles \n",
+ "Z=864.0 #Number of conductors\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb=V-(Ia*Ra)\n",
+ "N=(60*A*Eb)/(flux*Z*P)\n",
+ "torque=((flux*Z)/(2*pi))*(P/A)*Ia\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The speed of the motor is %d rpm \" %(round(N,0))\n",
+ "print \"(b)The gross torque developed by the armature is %.2f Nm\" %(torque)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed of the motor is 636 rpm \n",
+ "(b)The gross torque developed by the armature is 756.30 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.15,Page number: 538 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power generated in the armature winding of a dc generator.\"\"\"\n",
+ "\n",
+ "from math import pi \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=900.0 #Operating speed of generator(in rpm)\n",
+ "torque=2e03 #Torque(in N-metre) \n",
+ "P_losses=8e03 #Power losses(in Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=(2*pi*torque*N)/60.0\n",
+ "Pd=Pin-P_losses\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power generated in the armature winding is %e W\" %(Pd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power generated in the armature winding is 1.804956e+05 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16,Page number: 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a series motor when the current changes.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=230.0 #Supply voltage(in Volts)\n",
+ "Ra=0.12 #Armature resistance(in Ohms) \n",
+ "Rse=0.03 #Series field resistance(in Ohms)\n",
+ "Ia1=110.0 #Current at 230 V(in Amperes)\n",
+ "flux1=24e-03 #Flux per pole at 110 A(in Webers)\n",
+ "N1=600.0 #Speed at 230 V(in rpm) \n",
+ "Ia2=50.0 #Armature current(in Amperes) \n",
+ "flux2=16e-03 #Flux per pole at 50 A(in Webers) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb1=V-Ia1*(Ra+Rse)\n",
+ "k=Eb1/(N1*flux1)\n",
+ "Eb2=V-Ia2*(Ra+Rse)\n",
+ "N2=Eb2/(k*flux2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the motor when the currenthas fallen to 50 A is %d rpm\" %(round(N2,0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the motor when the currenthas fallen to 50 A is 938 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.17,Page number: 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current drawn by the machine.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Supply voltage(in Volts)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb_1=0\n",
+ "Ia_1=(V-Eb_1)/Ra\n",
+ "Eb_2=200\n",
+ "Ia_2=(V-Eb_2)/Ra\n",
+ "Eb_3=250\n",
+ "Ia_3=(V-Eb_3)/Ra\n",
+ "Eb_4=-250\n",
+ "Ia_4=(V-Eb_4)/Ra\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)When the machine is at rest,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_1)\n",
+ "print \"(b)When the machine is generating an emf of 200V and is connected to the supply with correct polarities,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_2)\n",
+ "print \"(c)When the machine is generating an emf of 250V and is connected to the supply with correct polarities,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_3)\n",
+ "print \"(d)When the machine is generating an emf of 250V and is connected to the supply with reversed polarities,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_4) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)When the machine is at rest,\n",
+ "The current drawn by the machine is 1250.00 A\n",
+ "(b)When the machine is generating an emf of 200V and is connected to the supply with correct polarities,\n",
+ "The current drawn by the machine is 250.00 A\n",
+ "(c)When the machine is generating an emf of 250V and is connected to the supply with correct polarities,\n",
+ "The current drawn by the machine is 0.00 A\n",
+ "(d)When the machine is generating an emf of 250V and is connected to the supply with reversed polarities,\n",
+ "The current drawn by the machine is 2500.00 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.18,Page number: 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed and the gross torque developed by the armature of a dc series motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=6.0 #Number of poles\n",
+ "A=6.0 #Number of parallel paths \n",
+ "Z=864.0 #Number of conductors \n",
+ "flux=50e-03 #Flux per pole(in Webers)\n",
+ "Ia=110.0 #Armature current(in Amperes)\n",
+ "V=480.0 #Load voltage(in Volts)\n",
+ "Ra=0.18 #Armature resistance(in Ohms) \n",
+ "Rse=0.02 #Series field resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb=V-Ia*(Ra+Rse)\n",
+ "N=(60*A*Eb)/(flux*Z*P)\n",
+ "torque=(60*Eb*Ia)/(2*pi*N)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The speed of the motor is %d rpm\" %(round(N,0))\n",
+ "print \"(b)The gross torque developed by the armature is %.2f Nm \" %(torque) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed of the motor is 636 rpm\n",
+ "(b)The gross torque developed by the armature is 756.30 Nm \n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.19,Page number: 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the series resistance to reduce the speed of a shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=220.0 #Rated voltage of the motor(in Volts)\n",
+ "Ia=22.0 #Armature current(in Amperes)\n",
+ "Ra=0.45 #Armature resistance(in Ohms)\n",
+ "N1=700.0 #Initial speed of motor(in rpm)\n",
+ "N2=450.0 #Final speed of motor(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E1=V-(Ia*Ra)\n",
+ "E2=(N2/N1)*E1\n",
+ "R=((V-E2)/Ia)-Ra\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance that should be placed in series with the armature to reduce the speed to 450 rpm is %.3f ohm \" %(R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance that should be placed in series with the armature to reduce the speed to 450 rpm is 3.411 ohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.20,Page number: 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc series motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=230.0 #Rated voltage of the dc series motor(in Volts) \n",
+ "Ra=0.2 #Armature resistance(in Ohms) \n",
+ "Rse=0.1 #Series field resistance(in Ohms) \n",
+ "Ia1=40.0 #Line current at rated voltage(in Amperes)\n",
+ "N1=1000.0 #Speed of motor at rated voltage(in rpm)\n",
+ "Ia2=20.0 #Line current at 230 V(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb1=V-Ia1*(Ra+Rse)\n",
+ "Eb2=V-Ia2*(Ra+Rse)\n",
+ "\"\"\" Eb=k*flux*N \"\"\"\n",
+ "N2=(Eb2*N1)/(Eb1*0.6)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the motor for a line current of 20A at 230V is %d rpm\" %(round(N2,0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the motor for a line current of 20A at 230V is 1713 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.21,Page number: 543 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage of a dc shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4 #Number of poles\n",
+ "turns=260 #Number of turns in the armature winding\n",
+ "R=0.006 #Resistance of each turn of armature(in Ohms)\n",
+ "flux=0.08 #Useful flux per pole(in Webers)\n",
+ "I_L=55 #Load current(in Amperes)\n",
+ "N=1000 #Speed of the generator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=2*turns\n",
+ "A=P\n",
+ "Eg=(flux*Z*N*P)/(60.0*A)\n",
+ "Rw=turns*R\n",
+ "R1=Rw/4.0\n",
+ "Ra=R1/4\n",
+ "V=Eg-(I_L*Ra)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The terminal voltage of the generator when it is running at 1000 rpm and supplying load current of 55 A is %.3f V.\" %(V)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The terminal voltage of the generator when it is running at 1000 rpm and supplying load current of 55 A is 687.971 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.22,Page number: 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the armature current,the emf induced and the flux per pole for a dc shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=8.0 #Number of poles\n",
+ "A=2.0 #Number of parallel paths\n",
+ "Z=778 #Number of conductors\n",
+ "V=250.0 #Load voltage(in Volts)\n",
+ "R_L=12.5 #Load resistance(in Ohms)\n",
+ "Ra=0.24 #Armature resistance(in Ohms)\n",
+ "Rsh=250.0 #Shunt field resistance(in Ohms)\n",
+ "N=500 #Speed of the dc shunt generator(in rpm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=V/R_L\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "Eg=V+(Ia*Ra)\n",
+ "flux=(60.0*A*Eg)/(Z*N*P)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The armature current is %.2f A.\" %(Ia)\n",
+ "print \"The emf induced is %.2f V.\" %(Eg)\n",
+ "print \"The flux per pole is %e Wb.\" %(flux)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The armature current is 21.00 A.\n",
+ "The emf induced is 255.04 V.\n",
+ "The flux per pole is 9.834447e-03 Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.23,Page number: 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage reduction in speed of dynamo.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po_1=500e03 #Initial power output(in Watts)\n",
+ "Po_2=250e03 #Final power output(in Watts)\n",
+ "V=500.0 #Constant excitation voltage(in Volts)\n",
+ "Ra=0.015 #Resistance between the terminals of dynamo(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ia_1=Po_1/V\n",
+ "E1=V+(Ia_1*Ra)\n",
+ "Ia_2=Po_2/V\n",
+ "E2=V+(Ia_2*Ra)\n",
+ "\"\"\" Since excitation emf remains constant in the two cases,we have \n",
+ "\n",
+ " E=(flux*Z*N*P)/(60*A) where E=emf generated;Z=number of conductors;N=speed of motor(in rpm);P=number of poles;A=number of parallel paths;\n",
+ " flux=useful flux per pole(in Wb).\n",
+ " \n",
+ " N=KE, where K is a constant.\n",
+ " \n",
+ " Hence,fractional reduction in speed is given as,\n",
+ " \n",
+ " (N1-N2)/N1=((K*(E1-E2))/(K*E1)). \"\"\"\n",
+ "\n",
+ "fract=((E1-E2)/E1)*100\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage reduction in speed of the dynamo is %.3f percent.\" %(fract) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage reduction in speed of the dynamo is 1.456 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.24,Page number: 545 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage between the far end of the feeder and the bus-bar of a dc series generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Rt=0.3 #Resistance of transmission line(in Ohms) \n",
+ "I_L_1=160.0 #Load current in first case(in Amperes) \n",
+ "I_L_2=50.0 #Load current in second case(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vt_1=I_L_1*Rt\n",
+ "Vb_1=(50.0/200.0)*I_L_1\n",
+ "Vd_1=Vt_1-Vb_1\n",
+ "Vt_2=I_L_2*Rt\n",
+ "Vb_2=(50.0/200.0)*I_L_2\n",
+ "Vd_2=Vt_2-Vb_2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The voltage between far end of the feeder and the bus-bar at a cusrrent of 160 A is %.2f V.\" %(Vd_1)\n",
+ "print \"(b)The voltage between far end of the feeder and the bus-bar at a cusrrent of 50 A is %.2f V.\" %(Vd_2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The voltage between far end of the feeder and the bus-bar at a cusrrent of 160 A is 8.00 V.\n",
+ "(b)The voltage between far end of the feeder and the bus-bar at a cusrrent of 50 A is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.25,Page number: 545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the emf generated and the armature current in a dc long-shunt compound generator. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=50 #Load current(in Amperes)\n",
+ "V=500 #Terminal voltage(in Volts)\n",
+ "Ra=0.05 #Armature resistance(in Ohms)\n",
+ "Rse=0.03 #Series field resistance(in Ohms)\n",
+ "Rsh=250 #Shunt field resistance(in Ohms)\n",
+ "brush_drop=1.0 #Brush contact drop(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=Ish+I_L\n",
+ "Eg=V+(Ia*(Ra+Rse))+brush_drop\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The armature current is %.2f A.\" %(Ia)\n",
+ "print \"The emf generated is %.2f V\" %(Eg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The armature current is 52.00 A.\n",
+ "The emf generated is 505.16 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.26,Page number: 545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the voltage and the power generated by a dc generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=8 #Number of poles\n",
+ "Z=500 #Number of conductors on the armature\n",
+ "flux =0.02 #Magnetic flux per pole(in Webers)\n",
+ "N=1800 #Speed of the generator(in rpm)\n",
+ "I=5.0 #Allowable current per path(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A_1=2\n",
+ "Eg_1=(flux*Z*N*P)/(60*A_1)\n",
+ "A_2=P\n",
+ "Eg_2=(flux*Z*N*P)/(60*A_2)\n",
+ "Ia_1=A_1*I\n",
+ "Pd_1=Eg_1*Ia_1\n",
+ "Ia_2=A_2*I\n",
+ "Pd_2=Eg_2*Ia_2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"When the armature is wave wound:\"\n",
+ "print \"(a)The generated voltage is %.2f V.\" %(Eg_1)\n",
+ "print \"(b)The kW generated by the machine is %.2f kW.\" %(Pd_1/1000.0)\n",
+ "print \"\\nWhen the armature is lap wound:\"\n",
+ "print \"(a)The generated voltage is %.2f V.\" %(Eg_2)\n",
+ "print \"(b)The kW generated by the machine is %.2f kW.\" %(Pd_2/1000.0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When the armature is wave wound:\n",
+ "(a)The generated voltage is 1200.00 V.\n",
+ "(b)The kW generated by the machine is 12.00 kW.\n",
+ "\n",
+ "When the armature is lap wound:\n",
+ "(a)The generated voltage is 300.00 V.\n",
+ "(b)The kW generated by the machine is 12.00 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.27,Page number: 546"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated and the copper losses in a dc shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Terminal voltage(in Volts)\n",
+ "I_L=195 #Load current(in Amperes)\n",
+ "Ra=0.02 #Armature resistance(in Ohms)\n",
+ "Rsh=50.0 #Shunt-field resistance(in Ohms)\n",
+ "loss=950.0 #Iron and frictional losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "Eg=V+(Ia*Ra)\n",
+ "copp=(Ia*Ia*Ra)+(V*Ish)\n",
+ "Po=V*I_L\n",
+ "tot_loss=copp+loss\n",
+ "Pin=Po+tot_loss\n",
+ "Pe=Pin-loss\n",
+ "mech_effi=Pe/Pin\n",
+ "ele_effi=Po/Pe\n",
+ "comm_effi=Po/Pin\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The emf generated is %.2f V.\" %(Eg)\n",
+ "print \"(b)The copper losses is %.2f W.\" %(copp)\n",
+ "print \"(c)The output of the prime mover is %.3f kW.\" %(Pin/1000.0)\n",
+ "print \"(d)The commercial efficiency is %.2f.\\n The mechanical efficiency is %.2f.\" %((comm_effi*100),(mech_effi*100))\n",
+ "print \" The electrical efficiency is %.2f.\" %(ele_effi*100) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The emf generated is 254.00 V.\n",
+ "(b)The copper losses is 2050.00 W.\n",
+ "(c)The output of the prime mover is 51.750 kW.\n",
+ "(d)The commercial efficiency is 94.20.\n",
+ " The mechanical efficiency is 98.16.\n",
+ " The electrical efficiency is 95.96.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.28,Page number: 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the back emf generated by a dc shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Terminal Voltage(in Volts)\n",
+ "I_L1=2.0 #No-load current(in Amperes)\n",
+ "N1=1000.0 #No-load speed(in rpm)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "Rsh=250.0 #Field resistance(in Ohms)\n",
+ "I_L2=51.0 #Current after loading(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia1=I_L1-Ish\n",
+ "E1=V-(Ia1*Ra)\n",
+ "Ia2=I_L2-Ish\n",
+ "E2=V-(Ia2*Ra)\n",
+ "\"\"\"As the motor is shunt-wound,the flux remains constant.The emf generated is directly proportional to the speed.\"\"\"\n",
+ "N2=(E2/E1)*N1\n",
+ "speed_drop=(N1-N2)/N1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The back emf generated at no-load is %.3f V.\" %(E1)\n",
+ "print \"(b)On loading,\\n The back emf generated is %.2f V.\\n The speed of the motor is %d rpm.\" %(E2,round(N2,0))\n",
+ "print \" The percentage speed drop is %.3f percent.\" %(speed_drop*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The back emf generated at no-load is 249.800 V.\n",
+ "(b)On loading,\n",
+ " The back emf generated is 240.00 V.\n",
+ " The speed of the motor is 961 rpm.\n",
+ " The percentage speed drop is 3.923 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.29,Page number: 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of starting resistance for a shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po=14920.0 #Output power(in Watts)\n",
+ "V=240.0 #Supply voltage(in Volts)\n",
+ "Ra=0.25 #Armature resistance(in Ohms)\n",
+ "effi=0.86 #Efficiency at full-load\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=Po/effi\n",
+ "I_L=Pin/V\n",
+ "Ist=1.5*I_L\n",
+ "Rt=V/Ist\n",
+ "Rst=Rt-Ra\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The starting resistance for the shunt motor is %.3f Ohms.\" %(Rst)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The starting resistance for the shunt motor is 1.963 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.30,Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed and efficiency of a dc shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L1=4.0 #No-load current(in Amperes)\n",
+ "N1=1000 #No-load speed(in rpm)\n",
+ "V=500.0 #Voltage rating of the dc shunt motor(in Volts)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "Ish=1.0 #Field current(in Amperes)\n",
+ "I_L2=100.0 #Full-load current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ia1=I_L1-Ish\n",
+ "E1=V-(Ia1*Ra)\n",
+ "Ia2=I_L2-Ish\n",
+ "E2=V-(Ia2*Ra)\n",
+ "\"\"\" For a shunt motor,the flux remains constant and hence E is directly proportional to speed of the motor(N).\n",
+ " \n",
+ " E=kN where k is a constant. \"\"\"\n",
+ "N2=(E2/E1)*N1\n",
+ "\"\"\"At no-load,the power taken by the motor mainly meets the constant losses(iron and frictional losses).\"\"\"\n",
+ "Pc=V*I_L1\n",
+ "\"\"\"On loading,the copper loss in shunt field winding is negligible compared to the copper loss in armature winding.\"\"\"\n",
+ "Pv=Ia2*Ia2*Ra\n",
+ "Pin=V*I_L2\n",
+ "effi=(Pin-(Pv+Pc))/Pin\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the dc shunt motor on loading is %d rpm.\" %(round(N2,0))\n",
+ "print \"The efficiency of the motor is %.2f percent.\" %(effi*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the dc shunt motor on loading is 962 rpm.\n",
+ "The efficiency of the motor is 92.08 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.31,Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc generator running as a shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Ra=0.02 #Armature resistance(in Ohms)\n",
+ "Rsh=50.0 #Shunt-field resistance(in Ohms)\n",
+ "V=250.0 #Terminal voltage(in Volts)\n",
+ "Po=50e03 #Output power(in Watts)\n",
+ "N1=500.0 #Speed of the dc generator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "\"\"\" When working as a generator,the machine supplies a load of 50 kW at 250 V. \"\"\"\n",
+ "I_L=Po/V\n",
+ "Ia1=I_L+Ish\n",
+ "E1=V+(Ia1*Ra)\n",
+ "\"\"\"When working as a motor,the machine takes a power of 50 kW at 250 V. \"\"\"\n",
+ "Ia2=I_L-Ish\n",
+ "E2=V-(Ia2*Ra)\n",
+ "N2=(E2/E1)*N1\n",
+ "\"\"\" NOTE: The field current and the flux per pole is same in both cases.\"\"\"\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the machine running as a shunt motor is %d rpm.\" %(round(N2,0)) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the machine running as a shunt motor is 484 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.32,Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the applied voltage and the current to run the motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Ra=0.6 #Resistance of the armature(in Ohms)\n",
+ "Rse=0.4 #Series field resistance(in Ohms)\n",
+ "Ia1=20.0 #Initial armature current(in Amperes)\n",
+ "V1=400.0 #Initial terminal voltage(in Volts)\n",
+ "N1=250.0 #Initial speed of the motor(in rpm)\n",
+ "N2=350.0 #Final speed of the motor(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" In a series motor,torque is directly proprtional to the square of the armature current(Ia).\n",
+ " \n",
+ " Given: Torque is directly proprtional to the square of the speed(N).\n",
+ " \n",
+ " Therefore, Ia is directly proportional to N. Ia=kN where k is a constant. \"\"\"\n",
+ "Ia2=(N2/N1)*Ia1\n",
+ "E1=V1-(Ia1*(Ra+Rse))\n",
+ "\"\"\"In a series motor,as the flux is directly proportional to Ia,the back emf is proportional to (Ia*N). \"\"\"\n",
+ "E2=E1*((Ia2*N2)/(Ia1*N1))\n",
+ "V2=E2+(Ia2*(Ra+Rse))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The applied voltage is %.2f V and the current is %.2f A to run the motor at 350 rpm.\" %(V2,Ia2) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The applied voltage is 772.80 V and the current is 28.00 A to run the motor at 350 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter17.ipynb b/Basic_Electrical_Engineering/Chapter17.ipynb
new file mode 100755
index 00000000..e240ccf5
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter17.ipynb
@@ -0,0 +1,332 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: FRACTIONAL HORSE POWER MOTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.1,Page number: 570\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the slip and efficiency of induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50 #Frequency rating of the induction motor(in Hertz) \n",
+ "P=4 #Number of poles in the induction motor \n",
+ "N=1410 #Speed of the motor(in rpm)\n",
+ "Po=375 #Output Power(in Watts)\n",
+ "V=230 #Voltage rating of the induction motor(in Volts) \n",
+ "I=2.9 #Input current(in Amperes)\n",
+ "pf=0.71 #Power factor(lagging) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "slip=(Ns-N)/Ns\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Slip is %.2f percent.\" %(slip*100)\n",
+ "Pin=V*I*pf\n",
+ "efficiency=Po/Pin\n",
+ "print \"The efficiency is %.2f percent.\" %(efficiency*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slip is 6.00 percent.\n",
+ "The efficiency is 79.19 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.2,Page number: 570\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\n",
+ "\"\"\"Finding the currents and the power factor in the induction motor.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect,polar\n",
+ "from math import radians,degrees,cos\n",
+ "\n",
+ "#Variable Declartion:\n",
+ "V=rect(230,0) #Voltage rating of the split-phase induction motor(in Volts) \n",
+ "Z_M=5+ 12*1j #Impedance of the main winding(in Ohms)\n",
+ "Z_A=12+ 5*1j #Start-winding impedance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "mod_Z_M=abs(Z_M)\n",
+ "mod_Z_A=abs(Z_A)\n",
+ "phi_M=phase(Z_M)\n",
+ "phi_A=phase(Z_A)\n",
+ "I_M=V/Z_M\n",
+ "mod_I_M=abs(I_M)\n",
+ "phi_I_M=degrees(phase(I_M))\n",
+ "I_A=V/Z_A\n",
+ "mod_I_A=abs(I_A)\n",
+ "phi_I_A=degrees(phase(I_A))\n",
+ "I_L=I_M+I_A\n",
+ "mod_I_L=abs(I_L)\n",
+ "phi_I_L=degrees(phase(I_L))\n",
+ "phi=phi_I_A-phi_I_M\n",
+ "pf=cos(radians(phi_I_L))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the main winding is %.2f A at a phase angle of %.2f degrees.\" %(mod_I_M,phi_I_M)\n",
+ "print \"(b)The current in the starting winding is %.2f A at a phase angle of %.2f degrees.\" %(mod_I_A,phi_I_A)\n",
+ "print \"(c)The line current is %.2f A at a phase angle of %.2f degrees.\" %(mod_I_L,phi_I_L)\n",
+ "print \"(d)The phase displacement between the two winding currents is %.2f degrees.\" %(phi)\n",
+ "print \"(e)The power factor is %.4f lagging.\" %(pf) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the main winding is 17.69 A at a phase angle of -67.38 degrees.\n",
+ "(b)The current in the starting winding is 17.69 A at a phase angle of -22.62 degrees.\n",
+ "(c)The line current is 32.72 A at a phase angle of -45.00 degrees.\n",
+ "(d)The phase displacement between the two winding currents is 44.76 degrees.\n",
+ "(e)The power factor is 0.7071 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.3,Page number: 571\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance in series with the auxiliary winding to maximize starting torque.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees,atan,pi,tan\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "X_M=20 #Inductive reactance of the main winding(in Ohm)\n",
+ "R_M=2 #Resistance of the main winding(in Ohm)\n",
+ "X_A=5 #Inductive reactance of the auxiliary winding(in Ohm)\n",
+ "R_A=25 #Resistance of the auxiliary winding(in Ohm)\n",
+ "f=50 #Frequency rating of the split-phase induction motor(in Hertz) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "angle_M=atan(X_M/R_M)\n",
+ "angle_A=degrees(angle_M)-90\n",
+ "Xc=X_A-(R_A*tan(radians(angle_A)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "C=1/(2*pi*f*Xc)\n",
+ "print \"The value of capacitance connected in series with the auxiliary winding to obtain maximum starting torque is %e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance connected in series with the auxiliary winding to obtain maximum starting torque is 4.244132e-04 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.4,Page number: 576\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resolution and shaft speed of a stepper motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "beta=2.5 #Step-angle of a stepper motor(in degrees)\n",
+ "step_freq=3600 #Stepping frequency(in pps)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res=360/beta\n",
+ "number_steps=res*25\n",
+ "shaft_speed=(beta*step_freq)/360\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resolution is %d steps per revolution.\" %(res)\n",
+ "print \"(b)The number of steps required for the shaft to make 25 revolutions=%d.\" %(number_steps)\n",
+ "print \"(c)The shaft speed is %.2f rps.\" %(shaft_speed)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resolution is 144 steps per revolution.\n",
+ "(b)The number of steps required for the shaft to make 25 revolutions=3600.\n",
+ "(c)The shaft speed is 25.00 rps.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.5,Page number:577\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of stator and rotor poles in a VR motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "m=3 #Number of phases\n",
+ "beta=15 #Step angle(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Nr=360/(m*beta)\n",
+ "Ns1=(Nr*360)/(360-(beta*Nr))\n",
+ "Ns2=(Nr*360)/(360+(beta*Nr))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a) The number of rotor poles is %d.\" %(Nr)\n",
+ "print \"(b)\"\n",
+ "print \" Case 1: Ns>Nr\"\n",
+ "print \" The number of stator poles is %d. \\n\" %(Ns1)\n",
+ "print \" Case 2: Ns<Nr\"\n",
+ "print \" The number of stator poles is %d.\" %(Ns2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The number of rotor poles is 8.\n",
+ "(b)\n",
+ " Case 1: Ns>Nr\n",
+ " The number of stator poles is 12. \n",
+ "\n",
+ " Case 2: Ns<Nr\n",
+ " The number of stator poles is 6.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.6,Page number: 579\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of rotor and stator teeth in VR stepper motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "m=4 #Number of stacks\n",
+ "beta=1.8 #Step angle(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Nr=360/(m*beta)\n",
+ "Ns=Nr\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of rotor teeth is %d.\" %(Nr)\n",
+ "print \"The number of stator teeth is %d.\" %(Ns)\n",
+ "print \"\\nNOTE: In a multistack stepper motor the number of stator teeth is same as that of the rotor teeth.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of rotor teeth is 50.\n",
+ "The number of stator teeth is 50.\n",
+ "\n",
+ "NOTE: In a multistack stepper motor the number of stator teeth is same as that of the rotor teeth.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter18.ipynb b/Basic_Electrical_Engineering/Chapter18.ipynb
new file mode 100755
index 00000000..99017984
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter18.ipynb
@@ -0,0 +1,542 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18: ELECTRICAL MEASURING INSTRUMENTS\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1,Page number: 598\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflecting torque in Newton-metres for a PMMC instrument.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=15e-03 #Current flowing through the coil(in Amperes) \n",
+ "B=0.2 #Flux density in the air gap(in Tesla)\n",
+ "l=2e-02 #Length of the magnetic field(in m)\n",
+ "d=2.5e-02 #Mean width of the coil(in m) \n",
+ "r=d/2 #Radius of the coil(in cm) \n",
+ "n1=42 #Number of turns(lower limit) \n",
+ "n2=43 #Number of turns(upper limit)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F1=I*B*l*n1\n",
+ "F2=I*B*l*n2\n",
+ "net_torque=(F1+F2)*r\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The deflecting torque is %e Nm.\" %(net_torque)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The deflecting torque is 6.375000e-05 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2,Page Number: 604\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the shunt resistance for measuring a maximum current of 10 mA.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Ifsd=10e-03 #Maximum current(in Amperes)\n",
+ "Im=100e-06 #Full-scale deflection current(in Amperes) \n",
+ "Rm=100 #Meter Resistance(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=Ifsd-Im\n",
+ "Rsh=(Im*Rm)/Ish\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The shunt resistance needed is %.6f Ohms.\" %(Rsh)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The shunt resistance needed is 1.010101 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.3,Page number: 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Designing an universal shunt for a multi-range ammeter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=100e-06 #Full-scale deflection current(in Amperes)\n",
+ "Rm=100.0 #Internal resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"For 1-mA range,the required shunt can be calculated as follows.\"\"\"\n",
+ "Ifsd=1e-03\n",
+ "Rsh=(Im*Rm)/(Ifsd-Im)\n",
+ "\n",
+ "Rm=900.0\n",
+ "R=100.0\n",
+ "\"\"\"(a)Range-switch at 1 mA:\"\"\"\n",
+ "Rm1=Rm\n",
+ "Ish1=(1e-03)-(0.1e-03)\n",
+ "Rsh1=(Rm1*Im)/(Ish1)\n",
+ "\n",
+ "\"\"\"(b)Range-switch at 10 mA:\"\"\"\n",
+ "\"\"\"Rm2=Rm+R1\"\"\"\n",
+ "Ish2=(10e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh2=R2+R3+R4+R5=R-R1=100-R1;\"\"\"\n",
+ "\"\"\"Rsh2=(Rm2*Im)/Ish2;\"\"\"\n",
+ "R1=(9900.0-900.0)/100.0\n",
+ "\n",
+ "\"\"\"(c)Range-switch at 100 mA:\"\"\"\n",
+ "\"\"\"Rm3=Rm+R1+R2\"\"\"\n",
+ "Ish3=(100e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh3=R3+R4+R5=R-R1-R2=100-90-R2=90-R2;\"\"\"\n",
+ "\"\"\"Rsh3=(Rm3*Im)/Ish3;\"\"\"\n",
+ "R2=(9990.0-990.0)/1000.0\n",
+ "\n",
+ "\"\"\"(d)Range-switch at 500 mA:\"\"\"\n",
+ "\"\"\"Rm4=Rm+R1+R2+R3\"\"\"\n",
+ "Ish3=(500e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh4=R4+R5=R-R1-R2-R3=100-90-9-R3=1-R3;\"\"\"\n",
+ "\"\"\"Rsh4=(Rm4*Im)/Ish4;\"\"\"\n",
+ "R3=(4999.0-999.0)/5000.0\n",
+ "\n",
+ "\n",
+ "\"\"\"(e)Range-switch at 1 A:\"\"\"\n",
+ "\"\"\"Rm5=Rm+R1+R2+R3+R4\"\"\"\n",
+ "Ish3=(1000e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh5=R5=R-R1-R2-R3-R4=100-90-9-0.8-R4=0.2-R4;\"\"\"\n",
+ "\"\"\"Rsh5=(Rm5*Im)/Ish5;\"\"\"\n",
+ "R4=(1999.8-999.8)/10000.0\n",
+ "R5=R-R1-R2-R3-R4\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistor values are: \"\n",
+ "print \"R1=%.2f Ohms.\" %(R1)\n",
+ "print \"R2=%.2f Ohms.\" %(R2)\n",
+ "print \"R3=%.2f Ohms.\" %(R3)\n",
+ "print \"R4=%.2f Ohms.\" %(R4)\n",
+ "print \"R5=%.2f Ohms.\" %(R5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistor values are: \n",
+ "R1=90.00 Ohms.\n",
+ "R2=9.00 Ohms.\n",
+ "R3=0.80 Ohms.\n",
+ "R4=0.10 Ohms.\n",
+ "R5=0.10 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.4,Page number: 609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To convert a d'Arsonval meter movement into a voltmeter.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=100e-06 #Current sensitivity(in Amperes)\n",
+ "Rm=100 #Resistance of the coil(in Ohms)\n",
+ "Vfsd=100 #Full-scale deflection of voltmeter(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rs=(Vfsd/Im)-Rm\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"To convert the d'Arsonval meter movement into a voltmeter of range 100V, we connect a resistor Rs in series.\"\n",
+ "print \"Rs = %.3f kilo Ohms. \" %(Rs/1000)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "To convert the d'Arsonval meter movement into a voltmeter of range 100V, we connect a resistor Rs in series.\n",
+ "Rs = 999.900 kilo Ohms. \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.5,Page number: 609\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the multipiler resistance and the voltage mutiplyiing factor of a dc voltmeter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=50e-06 #Full-scale deflection current(in Amperes) \n",
+ "Rm=1e03 #Meter Resistance(in Ohms) \n",
+ "Vfsd=50 #Full-scale deflection of voltmeter(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rs=(Vfsd/Im)-Rm\n",
+ "n=Vfsd/(Im*Rm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The multiplier resistance needed is %.2f kilo Ohms.\" %(Rs/1000)\n",
+ "print \"(b)The voltage multiplying factor is %d.\" %(round(n,0))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The multiplier resistance needed is 999.00 kilo Ohms.\n",
+ "(b)The voltage multiplying factor is 1000.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.6,Page number: 612"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reading and error in measurement of voltmeter.\"\"\"\n",
+ " \n",
+ "\"\"\" NOTE: All resistances expressed in kilo Ohms.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "range_A=50 #Range of voltmeter-A(in Volts)\n",
+ "range_B=50 #Range of voltmeter-B(in Volts)\n",
+ "sens_A=1000 #Sensitivity of voltmeter-A(in Ohm/Volts) \n",
+ "sens_B=20000 #Sensitivity of voltmeter-B(in Ohm/Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vt=150.0*(50.0/(100.0+50.0))\n",
+ "R_i1=(range_A*sens_A)/1000.0\n",
+ "Req=1/((1/R_i1)+(1.0/50))\n",
+ "V1=(150.0)*(Req/(100+Req))\n",
+ "R_i2=(range_B*sens_B)/1000.0\n",
+ "Req=1/((1/R_i2)+(1.0/50))\n",
+ "V2=(150.0)*(Req/(Req+100))\n",
+ "err_A=((Vt-V1)/Vt)*100.0\n",
+ "err_B=((Vt-V2)/Vt)*100.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The reading of voltmeter-A is %.2f V\\nThe reading of voltmeter-B is %.2f V.\" %(V1,V2)\n",
+ "print \"\\nThe error in the reading of voltmeter-A is %.2f percent.\" %(err_A)\n",
+ "print \"The error in the reading of voltmeter-B is %.2f percent.\" %(err_B)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reading of voltmeter-A is 30.00 V\n",
+ "The reading of voltmeter-B is 48.39 V.\n",
+ "\n",
+ "The error in the reading of voltmeter-A is 40.00 percent.\n",
+ "The error in the reading of voltmeter-B is 3.23 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.7,Page number: 617"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflection in an ammeter.\"\"\"\n",
+ "\n",
+ "from math import sin,asin,degrees,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=20.0 #Initial current(in Amperes) \n",
+ "I2=12.0 #Final current(in Amperes)\n",
+ "angle1=60 #Initial deflection(in degrees)\n",
+ "\"\"\" Given: Deflecting torque is directly proportional to the current.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"For spring control: Controlling torque is directly proportional to deflection.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,deflection is directly proportional to current. \"\"\"\n",
+ "angle2_a=(I2/I1)*angle1\n",
+ "\"\"\"For gravity control: Controlling torque is directly proportional to sine of the deflection angle.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,sine of the angle of deflection is directly proportional to the current. \"\"\" \n",
+ "angle2_b=asin((I2/I1)*sin(radians(angle1)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The deflection for a current of 12A when the instrument is spring controlled is %.2f degrees.\" %(angle2_a) \n",
+ "print \"(b)The deflection for a current of 12A when the instrument is gravity controlled is %.2f degrees.\" %(degrees(angle2_b)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The deflection for a current of 12A when the instrument is spring controlled is 36.00 degrees.\n",
+ "(b)The deflection for a current of 12A when the instrument is gravity controlled is 31.31 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.8,Page number: 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflection in degrees in a gravity-controlled instrument.\"\"\"\n",
+ "\n",
+ "from math import asin,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W=0.005 #Controlling weight(in kilograms)\n",
+ "l=2.4e-02 #Distance of controlling weight from the axis(in metres)\n",
+ "torque=1.05e-04 #Deflecting torque(in kg-m)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "angle=asin(torque/(W*l))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The deflection corresponding to a deflecting torque of 1.05e-04 kg-m is %.2f degrees.\" %(degrees(angle))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The deflection corresponding to a deflecting torque of 1.05e-04 kg-m is 61.04 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.9,Page number: 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflection in an ammeter.\"\"\"\n",
+ "\n",
+ "from math import sin,asin,degrees,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=10.0 #Initial current(in Amperes) \n",
+ "I2=5.0 #Final current(in Amperes)\n",
+ "angle1=90 #Initial deflection(in degrees)\n",
+ "\"\"\" Given: Deflecting torque is directly proportional to square of the current.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"For spring control: Controlling torque is directly proportional to deflection.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,deflection is directly proportional to square of the current. \"\"\"\n",
+ "angle2_a=pow((I2/I1),2)*angle1\n",
+ "\"\"\"For gravity control: Controlling torque is directly proportional to sine of the deflection angle.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,sine of the angle of deflection is directly proportional to square of the current. \"\"\" \n",
+ "angle2_b=asin((pow((I2/I1),2))*sin(radians(angle1)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The deflection for a current of 5A when the instrument is spring controlled is %.2f degrees.\" %(angle2_a) \n",
+ "print \"(b)The deflection for a current of 5A when the instrument is gravity controlled is %.2f degrees.\" %(degrees(angle2_b)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The deflection for a current of 5A when the instrument is spring controlled is 22.50 degrees.\n",
+ "(b)The deflection for a current of 5A when the instrument is gravity controlled is 14.48 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.10,Page number: 619 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current required to produce a deflection of 60 degrees in a moving coil instrument.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "w=4e-02 #Width of the coil(in metres)\n",
+ "l=5e-02 #Length of the coil(in metres)\n",
+ "N=80.0 #Number of turns in the coil\n",
+ "torque_control=0.5e-07 #Controlling torque per degree deflection of the coil(in Nm)\n",
+ "B=0.1 #Magnetic flux density in the air gap(in Wb per square-metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A=w*l\n",
+ "torque_c=torque_control*60.0\n",
+ "I=torque_c/(B*N*A)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current required to give a deflection of 60 degrees is %e A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current required to give a deflection of 60 degrees is 1.875000e-04 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter2.ipynb b/Basic_Electrical_Engineering/Chapter2.ipynb
new file mode 100755
index 00000000..496486a8
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter2.ipynb
@@ -0,0 +1,1532 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:OHM'S LAW"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page number: 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Calculating the resistance of a wire.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\n",
+ "\"\"\" R=(rho*L)/A\n",
+ " R=Resistance of conductor;\n",
+ " L=Length of conductor;\n",
+ " d=diameter of conductor;\n",
+ " A=Area of Cross Section of conductor=(pi*d*d)/4; \"\"\"\n",
+ "\n",
+ "R1=5 #Resistance of conductor(in Ohms)\n",
+ "\n",
+ "\"\"\" L2=4L1;\n",
+ " d2=0.5d1;\n",
+ " A1=(pi*d1*d1)/4;\n",
+ " A2=(pi*d2*d2)/4=(pi*d1*d1)/16 ; \n",
+ " rho1=rho2=rho(As both the conductors are made of the same material);\n",
+ " R1=(rho*L1)/A1;\n",
+ " R2=(rho*L2)/L2; \n",
+ " R2/R1=(rho*(L2/A2)/(rho*(L1/A1)) \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=R1*(4/1)*(2/1)*(2/1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of resistance is: %d Ohms.\" % (R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of resistance is: 80 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2,Page number: 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding resistance of Copper wire.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" R=(rho*L)/A\n",
+ " R=Resistance of conductor;\n",
+ " L=Length of conductor;\n",
+ " d=diameter of conductor;\n",
+ " A=Area of Cross Section of conductor=(pi*d*d)/4; \"\"\"\n",
+ "\n",
+ "R1=10 #Resistance of Copper Wire(in Ohms)\n",
+ "\n",
+ "\"\"\" L2=3L1;\n",
+ " d2=0.5d1;\n",
+ " A2=A1/3;(If the length of the wire is made three times by drawing it,its area of cross section must \n",
+ " decrease three times as the volume of the wire remains same in the drawing process.) \n",
+ " rho1=rho2=rho(As both the conductors are made of the same material);\n",
+ " R1=(rho*L1)/A1;\n",
+ " R2=(rho*L2)/L2; \n",
+ " R2/R1=(rho*(L2/A2)/(rho*(L1/A1))\n",
+ " R2=R1*(L2/L1)*(A1/A2) \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=R1*(3/1)*(3/1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of resistance is: %d Ohms.\" % (R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of resistance is: 90 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3,Page number: 19 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the four resistors.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" Req=(4+4)||(8+4) \"\"\"\n",
+ "\n",
+ "Req=(8.0*12)/(8+12) #Equivalent Resistance of the circuit(in Ohms)\n",
+ "I=5 #Current in the circuit(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=I*Req\n",
+ "V1=(4.0*V)/(4+4)\n",
+ "V2=(4.0*V)/(4+4)\n",
+ "V3=(8.0*V)/(8+4)\n",
+ "V4=(4.0*V)/(8+4)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across resistor 1 is: %d V.\" % (V1)\n",
+ "print \"The voltage across resistor 2 is: %d V.\" % (V2)\n",
+ "print \"The voltage across resistor 3 is: %d V.\" % (V3)\n",
+ "print \"The voltage across resistor 4 is: %d V.\" % (V4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across resistor 1 is: 12 V.\n",
+ "The voltage across resistor 2 is: 12 V.\n",
+ "The voltage across resistor 3 is: 16 V.\n",
+ "The voltage across resistor 4 is: 8 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page number:20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents through and voltage across the resistors.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=2.0 #Current in Circuit(in Amperes)\n",
+ "R1=2.0 #Resistance of resistor 1(in Ohms) \n",
+ "R2=4.0 #Resistance of resistor 2(in Ohms)\n",
+ "R3=6.0 #Resistance of resistor 3(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp=1/((1/R2)+(1/R3))\n",
+ "Req=R1+Rp\n",
+ "Vs=I*Req\n",
+ "v1=Vs*(R1/(R1+Rp))\n",
+ "v2=Vs*(Rp/(R1+Rp))\n",
+ "v3=v2\n",
+ "i1=I\n",
+ "i2=v2/R2\n",
+ "i3=v3/R3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current i1= %.2f A.\\nThe current i2= %.2f A.\\nThe current i3= %.2f A.\" %(i1,i2,i3)\n",
+ "print \"The voltage v1= %.2f V.\\nThe voltage v2= %.2f V.\\nThe voltage v3= %.2f V.\\n\" %(v1,v2,v3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current i1= 2.00 A.\n",
+ "The current i2= 1.20 A.\n",
+ "The current i3= 0.80 A.\n",
+ "The voltage v1= 4.00 V.\n",
+ "The voltage v2= 4.80 V.\n",
+ "The voltage v3= 4.80 V.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5,Page number: 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the effective resistance.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp=1.0/((1.0/20)+(1.0/10)+(1.0/20))\n",
+ "R_AB_1=15+Rp\n",
+ "R = symbols('R')\n",
+ "R1=1.0/((1.0/2.0)+1.0)+ 1.0\n",
+ "R2=R1\n",
+ "R_AB_2= 1.0/((1/R1)+(1/R2)+(1))\n",
+ "R_AB_b=round(R_AB_2,4)*R\n",
+ "R3=1.0/((1.0/3)+(1.0/6)) + 18\n",
+ "R_AB_3= 1.0/((1.0/20)+(1/R3)) + 5\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The effective resistance between points A and B for the combination of resistances is R_AB = %.2f Ohms.\" %(R_AB_1)\n",
+ "print \"(b)The effective resistance between points A and B for the combination of resistances is R_AB = %s Ohms.\" %(R_AB_b)\n",
+ "print \"(c)The effective resistance between points A and B for the combination of resistances is R_AB = %.2f Ohms.\" %(R_AB_3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The effective resistance between points A and B for the combination of resistances is R_AB = 20.00 Ohms.\n",
+ "(b)The effective resistance between points A and B for the combination of resistances is R_AB = 0.4545*R Ohms.\n",
+ "(c)The effective resistance between points A and B for the combination of resistances is R_AB = 15.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6,Page number: 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding currents in parallel branches.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100 #Voltage of the DC source(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Reff= 2+ (1.0/((1.0/12)+(1.0/20)+(1.0/30)))+2\n",
+ "I=V/Reff\n",
+ "\n",
+ "\"\"\" Applying Ohm's Law, we have 12*I1=20*I2=30*I3;\n",
+ " \n",
+ " I2=0.6*I1; I3=0.4*I1 \"\"\"\n",
+ "\n",
+ "\"\"\" I=I1+I2+I3; \"\"\"\n",
+ "I1=I/(0.6+0.4+1)\n",
+ "I2=0.6*I1\n",
+ "I3=0.4*I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I1= %.2f A.\\nThe current I2= %.2f A.\\nThe current I3= %.2f A.\" %(I1,I2,I3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I1= 5.00 A.\n",
+ "The current I2= 3.00 A.\n",
+ "The current I3= 2.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7,Page number: 25 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the supply current I.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=20.0 #Power dissipated by resistor(in Watts)\n",
+ "RL=5.0 #Resistance of the load resistor(in Ohms)\n",
+ "R=10.0 #Resistance of resistor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=sqrt(P/RL)\n",
+ "I=(I1*(R+RL))/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The supply current( I ) is %d A.\"%(I)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The supply current( I ) is 3 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8,Page number:25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding voltage and the total power dissipated.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=120.0 #Voltage of the power line(in Volts)\n",
+ "P_bulb=60.0 #Power rating of the bulb(in Watts)\n",
+ "V_bulb=120.0 #Voltage rating of the bulb(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=(V_bulb*V_bulb)/P_bulb\n",
+ "R_A=R\n",
+ "R_B=R\n",
+ "R_C=R\n",
+ "R_BC=1.0/((1.0/R)+(1.0/R))\n",
+ "V_B=V*(R_BC/(R_BC+R_A)) \n",
+ "V_C=V*(R_BC/(R_BC+R_A))\n",
+ "V_A=V-V_B\n",
+ "P_A=(V_A*V_A)/R_A \n",
+ "P_B=(V_B*V_B)/R_B\n",
+ "P_C=(V_C*V_C)/R_C\n",
+ "P=P_A+P_B+P_C\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across bulb A is %.2f V. \\nThe voltage across bulb B is %.2f V. \\nThe voltage across bulb C is %.2f V.\" %(V_A,V_B,V_C)\n",
+ "print \"The total power dissipated in the three bulbs is %.2f W.\" %(P)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across bulb A is 80.00 V. \n",
+ "The voltage across bulb B is 40.00 V. \n",
+ "The voltage across bulb C is 40.00 V.\n",
+ "The total power dissipated in the three bulbs is 40.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9,Page number: 26\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Designing a variable resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=30.0 #Resistance of the resistor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=75-R1\n",
+ "Req=(30+75)/2.0\n",
+ "Rp=Req-R1\n",
+ "R=1/((1/Rp)-(1/R2))\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)Minimum value of Req is obtained when R=0(i.e.,a short circuit,because the parallel combination of R2 and R is reduced to 0).\" \n",
+ "print \" Maximum value of Req is obtained when R is an open ciruit.\\n Hence, R1 = %.2f Ohms and R2 = %.2f Ohms. \\n \" %(R1,R2)\n",
+ "print \"(b)The resistance R to give Req=(30+75)/2 ohm is R = %.2f Ohms.\" %(R)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Minimum value of Req is obtained when R=0(i.e.,a short circuit,because the parallel combination of R2 and R is reduced to 0).\n",
+ " Maximum value of Req is obtained when R is an open ciruit.\n",
+ " Hence, R1 = 30.00 Ohms and R2 = 45.00 Ohms. \n",
+ " \n",
+ "(b)The resistance R to give Req=(30+75)/2 ohm is R = 45.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10,Page number: 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\n",
+ "\"\"\"Finding the equivalent resistance for the infinite ladder network.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" If we remove the first two resistances(i.e. the first rung of the ladder), the remaining circuit across the terminals C and D \n",
+ " has an equivalent resistance ,which must be double of the original ladder. If R_AB=Rx, then R_CD=2*Rx; \"\"\" \n",
+ "\"\"\" Rx=R + (R || (2*Rx)) ; (2*Rx*Rx)-(3*Rx*R)-(R*R);\"\"\"\n",
+ "\"\"\" The roots of the above quadratic equation is solved using Shreedharacharya's Formula\"\"\"\n",
+ "\"\"\" We ignore the negative root as Resistance cannot be negative\"\"\" \n",
+ "a=2.0 #Coefficient of squared term in a quadratic equation\n",
+ "b=-3.0 #Coefficient of first degree term in a quadratic equation \n",
+ "c=-1.0 #Constant term in a quadratic equation \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rx=((-b)+sqrt((b*b)-(4*a*c)))/(2*a)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The equivalent resistance between terminals A and B in terms of resistance R,for the infinite ladder network is %.2fR Ohms.\" %(Rx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent resistance between terminals A and B in terms of resistance R,for the infinite ladder network is 1.78R Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11,Page number: 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Converting the pi-section into equivalent T-section.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=3.0 #First resistance of pi-section(in Ohms)\n",
+ "R2=9.0 #Second resistance of pi-section(in Ohms) \n",
+ "R3=6.0 #Third resistance of pi-section(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ra=(R2*R3)/(R1+R2+R3)\n",
+ "Rb=(R1*R3)/(R1+R2+R3)\n",
+ "Rc=(R1*R2)/(R1+R2+R3)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance Ra is %.2f Ohms.\" %(Ra)\n",
+ "print \"The resistance Rb is %.2f Ohm.\" %(Rb)\n",
+ "print \"The resistance Rc is %.2f Ohms.\" %(Rc)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance Ra is 3.00 Ohms.\n",
+ "The resistance Rb is 1.00 Ohm.\n",
+ "The resistance Rc is 1.50 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12,Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance of the coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" Reff is the effective resistance of the two coils. \"\"\"\n",
+ "V=100.0 #Voltage of the dc supply(in Volts)\n",
+ "I=10.0 #Current drawn from the supply(in Amperes)\n",
+ "P=600.0 #Power dissipated in one coil(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Reff=V/I\n",
+ "R1=(V*V)/P\n",
+ "R2=(Reff*R1)/(R1-Reff)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance of first coil is: %.2f Ohms.\" %(R1)\n",
+ "print \"The resistance of second coil is: %.2f Ohms.\" %(R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of first coil is: 16.67 Ohms.\n",
+ "The resistance of second coil is: 25.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13,Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the cost of the boiler operation.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=12.0 #Current drawn by the electric boiler(in Amperes) \n",
+ "V=115.0 #Operating voltage of the electric boiler(in Volts)\n",
+ "t=6.0 #Time of operation of the electric boiler(in hours) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "W=(V*I*t)/1000\n",
+ "Rate=2.50\n",
+ "cost=W*Rate\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The cost of boiler operation is Rs. %.2f.\" %(cost)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cost of boiler operation is Rs. 20.70.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14,Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To find the effect of supply on the rating of toaster.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_rated=240.0 #Voltage rating of the toaster(in Volts)\n",
+ "P_rated=1000.0 #Power rating of the toaster(in Watts) \n",
+ "V=220.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R_toaster=(V_rated*V_rated)/P_rated\n",
+ "I_rated=P_rated/V_rated \n",
+ "I=V/R_toaster\n",
+ "P_consumed=V*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rated current is %.2f A.\" %(I_rated)\n",
+ "print \"The power rating is %.2f W.\" %(P_rated)\n",
+ "print \"The current drawn is %.2f A.\" %(I)\n",
+ "if (I>I_rated): print(\"The toaster will be damaged as the current is greater than the rated current. \\n\")\n",
+ "elif(I<I_rated): print(\"The toaster will not be damaged as the current is lesser than the rated current. \\n\")\n",
+ "else: print(\"The toaster will not be damaged as the current is equal to the rated current. \\n\")\n",
+ "\n",
+ "print \"The power consumed is %.2f W.\" %(P_consumed) \n",
+ "\n",
+ "if (P_consumed>P_rated): print(\"The rating will be affected as the power consumed is greater than the power rating. \\n\")\n",
+ "elif(P_consumed<P_rated): print(\"The rating will not be affected as the power consumed is lesser than the power rating. \\n\") \n",
+ "else: print(\"The rating will not be affected as the power consumed is equal to the power rating. \\n\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rated current is 4.17 A.\n",
+ "The power rating is 1000.00 W.\n",
+ "The current drawn is 3.82 A.\n",
+ "The toaster will not be damaged as the current is lesser than the rated current. \n",
+ "\n",
+ "The power consumed is 840.28 W.\n",
+ "The rating will not be affected as the power consumed is lesser than the power rating. \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15,Page number: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To find the range of resistance of a colour coded resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Yellow=4.0 #Mutilplier corresponding to yellow band\n",
+ "Violet=7.0 #Mutilplier corresponding to violet band\n",
+ "Orange=1.0e03 #Mutilplier corresponding to orange band \n",
+ "Gold=5.0/100 #Mutilplier corresponding to gold band\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=((Yellow*10)+Violet)*Orange\n",
+ "Rmin=R-(Gold*R)\n",
+ "Rmax=R+(Gold*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance should be between %.2f kilo Ohms and %.2f kilo Ohms.\" %(Rmin/1000,Rmax/1000) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance should be between 44.65 kilo Ohms and 49.35 kilo Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16,Page number: 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To find the range of resistance of a colour coded resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Gray=8.0 #Mutilplier corresponding to gray band\n",
+ "Blue=6.0 #Mutilplier corresponding to blue band\n",
+ "Gold_3=1.0e-01 #Mutilplier corresponding to first gold band\n",
+ "Gold_4=5.0/100 #Mutilplier corresponding to second gold band \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=((Gray*10.0)+Blue)*Gold_3\n",
+ "Rmin=R-(Gold_4*R)\n",
+ "Rmax=R+(Gold_4*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance should be between %.2f Ohms and %.2f Ohms.\" %(Rmin,Rmax) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance should be between 8.17 Ohms and 9.03 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17,Page number: 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance at a given temperature.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=126 #Resistance of transmission at 20 degrees Celsius(in Ohms)\n",
+ "T1=20 #Initial temperature(in degrees Celsius) \n",
+ "T2=-35 #Final temperature(in degrees Celsius)\n",
+ "temp_coeff=0.00426 #Temperature coefficient of the material of transmission(in Ohm per degree per Ohm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=(1+(temp_coeff*T2))*(R1/(1+(temp_coeff*T1)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance of the line at -35 degree Celsius is %.2f Ohms.\" %(R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of the line at -35 degree Celsius is 98.80 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.18,Page number: 32 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the temperature rise for change in resistance value.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=3.42 #Resistance of Copper winding at room temperature(in Ohms) \n",
+ "T1=20 #Room temperature(in degrees Celsius)\n",
+ "R2=4.22 #Resistance of Copper winding after an extended operation of motor(in Ohms)\n",
+ "temp_coeff=0.00426 #Temperature coefficient of Copper(in Ohm per degree per Ohm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "T2=(((R2*(1+(temp_coeff*T1)))/R1)-1)/temp_coeff\n",
+ "temp_rise=T2-T1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature rise is %.2f degree Celsius.\" %(temp_rise)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature rise is 59.59 degree Celsius.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19,Page number: 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the ratio of resistances and lengths of two wires.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=1.0 #Resistance per metre of the metallic wire(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" x is the length of the wire 'P'.\n",
+ "\n",
+ " R_P=k*x;\n",
+ " R_Q=k*(1-x);\n",
+ " \n",
+ " R_R=4*R_P;(because length of 'R' is two times length of 'P',the area of cross-section reduces to half.Resistance is directly \n",
+ " proportional to length and inversely proportional to area of cross-section.) \"\"\"\n",
+ "\n",
+ "x=1.0/(1+4)\n",
+ "R_P=k*x\n",
+ "R_Q=(1.0-x)*k\n",
+ "R_R=R_Q\n",
+ "ratio_res=R_P/R_R\n",
+ "ratio_len=x/(1-x)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The ratio of resistances of P and R is %.2f:1. \" %(ratio_res) \n",
+ "print \"(b)The ratio of lengths of P and Q is %.2f:1. \" %(ratio_len)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The ratio of resistances of P and R is 0.25:1. \n",
+ "(b)The ratio of lengths of P and Q is 0.25:1. \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.20,Page number: 32 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent resistance.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\n",
+ "#Calculations:\n",
+ "R1=1.0/((1.0/5)+(1.0/6))\n",
+ "R2=1.0/((1.0/4)+(1.0/3))\n",
+ "R_AB_1=R1+R2\n",
+ "R3=6+(1.0/((1.0/6)+(1.0/12)))\n",
+ "R4=1.0/((1.0/R3)+(1.0/10))\n",
+ "R_AB_2=2+R4+3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance between terminals A and B is %.2f Ohms.\" %(R_AB_1)\n",
+ "print \"(b)The resistance between terminals A and B is %.2f Ohms.\" %(R_AB_2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance between terminals A and B is 4.44 Ohms.\n",
+ "(b)The resistance between terminals A and B is 10.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.21,Page number: 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the pd between two corners.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=20e-03 #Current entering the cube(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp1=12/3\n",
+ "Rp2=12/6\n",
+ "Rp3=Rp1\n",
+ "R_AG=Rp1+Rp2+Rp3\n",
+ "V_AG=R_AG*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The potential difference across the corners A and G is %.2f V.\" %(V_AG)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential difference across the corners A and G is 0.20 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.22,Page number: 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding equivalent resistance between points E and F.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "#The delta connection between points A,B and C is first converted into its equivalent star connection by creating a new node 'O'.\n",
+ "R_AO=(4.0*6.0)/(2.0+4.0+6.0)\n",
+ "R_BO=(2.0*6.0)/(2.0+4.0+6.0)\n",
+ "R_CO=(2.0*4.0)/(2.0+4.0+6.0)\n",
+ "R_EF=(8.0*(8+(32.0/3)))/(8.0+(8.0+(32.0/3)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The equivalent resistance between points E and F is %.2f Ohms.\" %(R_EF)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent resistance between points E and F is 5.60 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.23,Page number: 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Find the current drawn from the 5-V supply.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=5 #Voltage from the battery(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" The star connection between A,C and D can be converted into its equivalent delta connection. \"\"\"\n",
+ "R1=((2*3)+(3*2)+(2*2))/3.0\n",
+ "R2=((2*3)+(3*2)+(2*2))/2.0\n",
+ "R3=((2*3)+(3*2)+(2*2))/2.0\n",
+ "\n",
+ "\"\"\"It is important to note that point B is lost during the process of star-to-delts transformation. \"\"\"\n",
+ "\n",
+ "R4=((16.0/3)*(32.0/9))/((16.0/3)+(32.0/9))\n",
+ "R5=R4+3\n",
+ "I=V/R5\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I drawn from the battery is %.4f A.\" %(I)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I drawn from the battery is 0.9740 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.24,Page number: 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current and the pd between A and B.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=488.0 #Total power dissipated(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R_CD=1.0/((1.0/5)+(1.0/20)+(1.0/2.5))\n",
+ "R_AB=R_CD+10\n",
+ "V=sqrt(P*R_AB)\n",
+ "I=V/R_AB\n",
+ "V_CD=V-(10*I)\n",
+ "I1=V_CD/5.0\n",
+ "I2=V_CD/20.0\n",
+ "I3=V_CD/2.5\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \" The current I1= %.2f A.\" %(I1) \n",
+ "print \" The current I2= %.2f A.\" %(I2)\n",
+ "print \" The current I3= %.2f A.\" %(I3)\n",
+ "print \" The pd between A and B is %.2f V.\" %(V)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The current I1= 2.00 A.\n",
+ " The current I2= 0.50 A.\n",
+ " The current I3= 4.00 A.\n",
+ " The pd between A and B is 75.04 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.25,Page number: 36 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance R.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_AB=5 #Voltage between points A and B(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_AC=15*(10.0/(10+5))\n",
+ "V_BA=-V_AB\n",
+ "V_BC=V_BA+V_AC\n",
+ "\"\"\" V_BC=15.0*(R/(2+R));\n",
+ " 10+(5*R)=(15*R); \"\"\"\n",
+ "R=10/10\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of resistance R is %.2f Ohm.\" %(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of resistance R is 1.00 Ohm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.26,Page number: 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding current supplied by the source.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R1=1.0/((1.0/6)+(1.0/3))\n",
+ "R2=5+3+R1\n",
+ "R_BC=1.0/((1.0/10)+(1/R2))\n",
+ "R3=5+R_BC\n",
+ "R_AD=1.0/((1.0/R3)+(1.0/10))\n",
+ "R_total=R_AD+5\n",
+ "I=V/R_total\n",
+ "\"\"\"The concept of current divider is used to find current I1 through the 6 Ohm resistance.At A,the 10 A current divides into \n",
+ " two parts: I_AD and I_AB.The current I_AB depends on the total resistance on the right of point A(which is 10 Ohms).Thus the two\n",
+ " currents will be equal.\n",
+ " \n",
+ " I_AB= I_AD= 5 A.\n",
+ " \n",
+ " I_AB divides equally into I_BC and I_BE. \n",
+ " I_BC= I_BE= 2.5 A. I_BE divides into I1 and I2. \"\"\"\n",
+ "\n",
+ "I_AB=I/2.0\n",
+ "I_AD=I_AB\n",
+ "I_BC=I_AB/2.0\n",
+ "I_BE=I_BC\n",
+ "I1=I_BE*(3.0/(3.0+6.0))\n",
+ "V_6=I1*6\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current supplied by the 100-V source is %.2f A.\" %(I)\n",
+ "print \"(b)The voltage across the 6-Ohms resistance is %.2f V.\" %(V_6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current supplied by the 100-V source is 10.00 A.\n",
+ "(b)The voltage across the 6-Ohms resistance is 5.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.27,Page number: 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance R.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=80 #Power dissipated(in Watts)\n",
+ "V=20 #Applied voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp=1.0/((1.0/8)+(1.0/12)+(1.0/24))\n",
+ "\"\"\" R_total=R+Rp \"\"\"\n",
+ "R_total=(V*V)/P\n",
+ "R=R_total-Rp\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance R is %.2f Ohm.\" %(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance R is 1.00 Ohm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.28,Page number: 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance R2.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100.0 #Voltage of the supply(in Volts)\n",
+ "I=10.0 #Current drawn from the mains(in Amperes)\n",
+ "P=600.0 #Power dissipated in the resistor R1(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R1=(V*V)/P\n",
+ "I1=V/R1\n",
+ "I2=I-I1\n",
+ "R2=V/I2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance R2 is %.2f Ohms.\" %(R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance R2 is 25.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.29,Page number: 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the electrical energy generated per tonne of the fuel.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P_out=50 #Output power(in kilo-Watts)\n",
+ "effi=0.35 #Efficiency of the diesel generating set\n",
+ "cal=12500 #Calorific value of the fuel(in kcal/kg)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P_in=P_out/effi\n",
+ "Heat_per_hour=P_in*860\n",
+ "Fuel=Heat_per_hour/cal\n",
+ "ener=(P_out/Fuel)*1000\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The quantity of oil needed per hour is %.2f kg.\" %(Fuel)\n",
+ "print \"(b)The electrical energy generated per tonne of the fuel is %.2f kWh.\" %(ener)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The quantity of oil needed per hour is 9.83 kg.\n",
+ "(b)The electrical energy generated per tonne of the fuel is 5087.21 kWh.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.30,Page number: 38 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance of the heater and quantity of heat generated.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_A=10.0 #Resistance of heater A(in Ohms)\n",
+ "t_A=20 #Time of operation of heater-A(in minutes) \n",
+ "t_B=10 #Time of operation of heater-B(in minutes)\n",
+ "H_A=500 #Heat produced by heater-A in time t_A(in kcal) \n",
+ "H_B=1000 #Heat produced by heater-B in time t_B(in kcal)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=sqrt((H_A*4.2*1000*R_A)/(t_A*60))\n",
+ "R_B=(V*V*t_B*60)/(H_B*4.2*1000)\n",
+ "R=R_A+R_B\n",
+ "t=5*60\n",
+ "H=(((V*V)*t)/R)/(4.2*1000)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of heater-B is %.2f Ohms.\" %(R_B)\n",
+ "print \"(b)The heat produced in 5 minutes when the two heaters are connected in series across the same supply voltage is %.2f kcal.\" %(H)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of heater-B is 2.50 Ohms.\n",
+ "(b)The heat produced in 5 minutes when the two heaters are connected in series across the same supply voltage is 100.00 kcal.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.31,Page number: 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding total current taken from the supply and energy consumed in a day.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "lamps=8 #Number of lamps\n",
+ "P_lamp=100 #Power rating of the lamp(in Watts)\n",
+ "fans=3 #Number of fans\n",
+ "P_fan=80 #Power rating of the fan(in Watts)\n",
+ "P_fridge=0.5 #Power rating of the fridge(in HP)\n",
+ "P_heater=1000 #Power rating of the Heater(in Watts)\n",
+ "V=230 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "total_load=(lamps*P_lamp)+(fans*P_fan)+(P_fridge*746)+P_heater\n",
+ "I=total_load/V\n",
+ "ener=(total_load*(1.0/4)*24)/1000\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The total current taken from the supply is %.2f A.\" %(I)\n",
+ "print \"(b)The energy consumed in a day, if on an average only a quarter of the above load persists all the time is %.4f kWh.\" %(ener)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The total current taken from the supply is 10.49 A.\n",
+ "(b)The energy consumed in a day, if on an average only a quarter of the above load persists all the time is 14.4780 kWh.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter3.ipynb b/Basic_Electrical_Engineering/Chapter3.ipynb
new file mode 100755
index 00000000..a6211207
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter3.ipynb
@@ -0,0 +1,2116 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: NETWORK ANALYSIS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1,Page number: 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of capacitance parameter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "per_free_space=8.854e-12 #Permittivity of free space(in Farad per metre)\n",
+ "A=0.113 #Total area(in square metre) \n",
+ "rel_per=10.0 #Relative permittivity of mica layer\n",
+ "d=0.1e-03 #Thickness of mica layer(in metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C1=(per_free_space*rel_per*A)/d\n",
+ "W=0.05\n",
+ "V=100.0\n",
+ "C2=(2*W)/(V*V)\n",
+ "i=5e-03\n",
+ "dv=100\n",
+ "dt=0.1\n",
+ "C3=i/(dv/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(i)The value of capacitance is %.2f micro Farad.\" %(C1*1000000)\n",
+ "print \"(ii)The value of capacitance is %.2f micro Farad.\" %(C2*1000000)\n",
+ "print \"(iii)The value of capacitance is %.2f micro Farad.\" %(C3*1000000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)The value of capacitance is 0.10 micro Farad.\n",
+ "(ii)The value of capacitance is 10.00 micro Farad.\n",
+ "(iii)The value of capacitance is 5.00 micro Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2,Page number: 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of the coil for different cases.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W=0.2 #Energy stored in magnetic field(in Joules) \n",
+ "i=0.2 #Current producing magnetic field(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=(2*W)/(i*i)\n",
+ "v=10\n",
+ "di=0.1\n",
+ "dt=0.2\n",
+ "L2=v/(di/dt)\n",
+ "p=2.5\n",
+ "di=0.5\n",
+ "dt=1\n",
+ "i=0.1\n",
+ "L3=p/(i*(di/dt))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(i)The inductance of the coil is %.2f H.\" %(L1)\n",
+ "print \"(ii)The inductance of the coil is %.2f H.\" %(L2)\n",
+ "print \"(iii)The inductance of the coil is %.2f H.\" %(L3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)The inductance of the coil is 10.00 H.\n",
+ "(ii)The inductance of the coil is 20.00 H.\n",
+ "(iii)The inductance of the coil is 50.00 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3,Page number: 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of 2 coils.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Leq=0.7 #Equivalent self-inductance(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" Leq=0.7 H; \n",
+ " \n",
+ " Leq=((L1*L2)/(L1+L2))+0.5 ;\n",
+ "\n",
+ " L1=(2*L2); \"\"\"\n",
+ "L2=(Leq-0.5)*(3.0/2)\n",
+ "L1=2*L2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"L1=%.2f H. \\nL2=%.2f H.\" %(L1,L2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L1=0.60 H. \n",
+ "L2=0.30 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4,Page number: 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent capacitance of the network and the voltage drop across each capacitor. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=220.0 #Voltage of the DC source(in Volts)\n",
+ "C1=0.05e-06 #Capacitance of the capacitor 1(in Farad)\n",
+ "C2=0.10e-06 #Capacitance of the capacitor 2(in Farad)\n",
+ "C3=0.20e-06 #Capacitance of the capacitor 3(in Farad)\n",
+ "C4=0.05e-06 #Capacitance of the capacitor 4(in Farad) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Cs=1/((1/C1)+(1/C2)+(1/C3)+(1/C4))\n",
+ "Q=Cs*V\n",
+ "V1=Q/C1\n",
+ "V2=Q/C2\n",
+ "V3=Q/C3\n",
+ "V4=Q/C4\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The equivalent capacitance of the network is %.4f micro Farad.\" %(Cs*1000000)\n",
+ "print \"The voltage across capacitor C1= %.2f V.\" %(V1)\n",
+ "print \"The voltage across capacitor C2= %.2f V.\" %(V2)\n",
+ "print \"The voltage across capacitor C3= %.2f V.\" %(V3)\n",
+ "print \"The voltage across capacitor C4= %.2f V.\" %(V4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent capacitance of the network is 0.0182 micro Farad.\n",
+ "The voltage across capacitor C1= 80.00 V.\n",
+ "The voltage across capacitor C2= 40.00 V.\n",
+ "The voltage across capacitor C3= 20.00 V.\n",
+ "The voltage across capacitor C4= 80.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5,Page number: 55\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across each capacitor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Q1=400e-06 #Charge on the capacitor 1(in Coulombs)\n",
+ "Q2=200e-06 #Charge on the capacitor 2(in Coulombs) \n",
+ "C1=2e-06 #Capacitance of the capacitor 1(in Farad)\n",
+ "C2=10e-06 #Capacitance of the capacitor 2(in Farad) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Q=Q1+Q2\n",
+ "C=C1+C2\n",
+ "V=Q/C\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"After the switch is closed, the voltage that exists across each capacitor is %.2f V.\" %(V)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "After the switch is closed, the voltage that exists across each capacitor is 50.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6,Page number: 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" A series combination of 2 capacitances C1=2 micro-F and C2=8 micro-F is connected across a dc-supply of 300-V.Determine(a)the charge,\n",
+ " (b)the voltage,and(c)the energy stored in each capacitor. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C1=2e-06 #Capacitance of the capacitor 1(in Farad) \n",
+ "C2=8e-06 #Capacitance of the capacitor 2(in Farad)\n",
+ "V=300.0 #Voltage of Dc supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=(C1*C2)/(C1+C2)\n",
+ "Q=C*V\n",
+ "V1=Q/C1\n",
+ "V2=Q/C2\n",
+ "W1=(1.0/2)*C1*(V1*V1) \n",
+ "W2=(1.0/2)*C2*(V2*V2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)When connected in series,the charge on each capacitor is the same.The charge on each capacitor is %.2f micro Coulomb.\" %(Q*1000000)\n",
+ "print \"(b)The voltage across the capacitor C1= %.2f V.\\n The voltage across the capacitor C2= %.2f V.\" %(V1,V2)\n",
+ "print \"(c)The energy stored in the capacitor C1= %.2f milli Joule.\" %(W1*1000)\n",
+ "print \" The energy stored in the capacitor C2= %.2f milli Joule.\" %(W2*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)When connected in series,the charge on each capacitor is the same.The charge on each capacitor is 480.00 micro Coulomb.\n",
+ "(b)The voltage across the capacitor C1= 240.00 V.\n",
+ " The voltage across the capacitor C2= 60.00 V.\n",
+ "(c)The energy stored in the capacitor C1= 57.60 milli Joule.\n",
+ " The energy stored in the capacitor C2= 14.40 milli Joule.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7,Page number: 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of capacitance.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C_eq=1e-06 #Equivalent capacitance of the network(in Farad)\n",
+ "C1=1e-06 #Capacitance of the capacitor 1(in Farad)\n",
+ "C2=8e-06 #Capacitance of the capacitor 2(in Farad)\n",
+ "C3=2e-06 #Capacitance of the capacitor 3(in Farad)\n",
+ "C4=2e-06 #Capacitance of the capacitor 4(in Farad)\n",
+ "C5=6e-06 #Capacitance of the capacitor 5(in Farad)\n",
+ "C6=12e-06 #Capacitance of the capacitor 6(in Farad)\n",
+ "C7=4e-06 #Capacitance of the capacitor 7(in Farad) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C8=C3+C4\n",
+ "C9=1/((1/C5)+(1/C6))\n",
+ "C10=1/((1/C2)+(1/C8))\n",
+ "C11=C7+C9\n",
+ "C12=1/((1/C1)+(1/C11))\n",
+ "C13=C12+C10\n",
+ "C=1/((1/C_eq)-(1/C13))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance C is %.2f micro Farad.\" %(C*1e06)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance C is 1.39 micro Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8,Page number: 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the % change in V_L and I_L.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E=3.0 #EMF of the battery(in Volts) \n",
+ "Ri=1.0 #Internal resistance of the battery(in Ohms)\n",
+ "R_L_min=100.0 #Minimum value of variable load resistance(in Ohms)\n",
+ "R_L_max=1000.0 #Maximum value of variable load resistance(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations and Result: \n",
+ "I_L1=E/(R_L_min+Ri)\n",
+ "I_L2=E/(R_L_max+Ri)\n",
+ "V_L1=E-(I_L1*Ri)\n",
+ "V_L2=E-(I_L2*Ri)\n",
+ "\n",
+ "if I_L1>I_L2 :\n",
+ " change_I_L= ((I_L1-I_L2)/I_L1)*100\n",
+ " ans=\"(a)The percentage decrease in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans)\n",
+ "elif I_L2>IL1 : \n",
+ " change_I_L= ((I_L2-I_L1)/I_L1)*100\n",
+ " ans=\"(a)The percentage increase in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans)\n",
+ "else: print(\"(a)The percentage change in I_L is 0 percent.\")\n",
+ "\n",
+ "if V_L2>V_L1 :\n",
+ " change_V_L= ((V_L2-V_L1)/V_L1)*100\n",
+ " ans=\" The percentage increase in V_L is %.2f percent\" %(round(change_V_L,2))\n",
+ " print(ans)\n",
+ "elif V_L1>V_L2 :\n",
+ " change_V_L= ((V_L1-V_L2)/V_L1)*100\n",
+ " ans=\" The percentage decrease in V_L is %.2f percent\" %(round(change_V_L,2))\n",
+ " print(ans)\n",
+ "else : print(\" The percentage change in V_L is 0\",\"%\")\n",
+ "\n",
+ "R_L_min=1e-03\n",
+ "R_L_max=10e-03\n",
+ "I_L1=E/(R_L_min+Ri)\n",
+ "I_L2=E/(R_L_max+Ri)\n",
+ "V_L1=round((E-(I_L1*Ri)),3)\n",
+ "V_L2=round((E-(I_L2*Ri)),2)\n",
+ "\n",
+ "if I_L1>I_L2 :\n",
+ " change_I_L= ((I_L1-I_L2)/I_L1)*100\n",
+ " ans=\"(b)The percentage decrease in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans) \n",
+ "\n",
+ "elif I_L2>I_L1 :\n",
+ " change_I_L= ((I_L2-I_L1)/I_L1)*100\n",
+ " ans=\"(b)The percentage increase in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans)\n",
+ "\n",
+ "else : print(\"(b) The percentage change in I_L is 0 percent\")\n",
+ "\n",
+ "if V_L2>V_L1 :\n",
+ " change_V_L= ((V_L2-V_L1)/V_L1)*100\n",
+ " ans=\" The percentage increase in V_L is %.3f percent\" %(change_V_L)\n",
+ " print(ans)\n",
+ "\n",
+ "elif V_L1>V_L2 :\n",
+ " change_V_L= ((V_L1-V_L2)/V_L1)*100\n",
+ " ans=\" The percentage decrease in V_L is %.2f percent\" %(change_V_L)\n",
+ " print(ans)\n",
+ "\n",
+ "else: print(\" The percentage change in V_L is 0 percent\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The percentage decrease in I_L is 89.91 percent\n",
+ " The percentage increase in V_L is 0.90 percent\n",
+ "(b)The percentage decrease in I_L is 0.89 percent\n",
+ " The percentage increase in V_L is 900.000 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9,Page number: 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power delivered by the ideal part of the sources.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_S=2.0 #Resistance of the current source(in Ohms)\n",
+ "I_S=3.0 #Current from the current source(in Amperes) \n",
+ "R_L=4.0 #Resistance of the load(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_S=R_S*I_S\n",
+ "I_L1=I_S*(R_S/(R_S+R_L))\n",
+ "V_L1=I_L1*R_L\n",
+ "R1=1/((1/R_S)+(1/R_L))\n",
+ "P_S1=I_S*I_S*R1\n",
+ "I_L2=V_S/(R_S+R_L)\n",
+ "V_L2=V_S*(R_L/(R_S+R_L))\n",
+ "R2=R_S+R_L\n",
+ "P_S2=(V_S*V_S)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Case 1:\"\n",
+ "print \"I_L=%.2f A. \\nV_L=%.2f V. \\nP_S=%.2f W.\" %(I_L1,V_L1,P_S1)\n",
+ "print \"\\nCase 2:\"\n",
+ "print \"I_L=%.2f A. \\nV_L=%.2f V. \\nP_S=%.2f W.\" %(I_L2,V_L2,P_S2) \n",
+ "print \"\\nWe find that the two energy sources are equivalent as regards the terminal relationships. But, the total power delivered by the ideal part of the two sources is different.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Case 1:\n",
+ "I_L=1.00 A. \n",
+ "V_L=4.00 V. \n",
+ "P_S=12.00 W.\n",
+ "\n",
+ "Case 2:\n",
+ "I_L=1.00 A. \n",
+ "V_L=4.00 V. \n",
+ "P_S=6.00 W.\n",
+ "\n",
+ "We find that the two energy sources are equivalent as regards the terminal relationships. But, the total power delivered by the ideal part of the two sources is different.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10,Page number: 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents through the two resistors in the circut.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I_2_ohm1=16.0*(6.0/(6+2))\n",
+ "I_6_ohm1=16-I_2_ohm1\n",
+ "V_eq=16*2\n",
+ "I_2_ohm2=V_eq/(2+6)\n",
+ "I_6_ohm2=I_2_ohm2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current through the 2 ohm resistor is %.2f A.\" %(I_2_ohm1) \n",
+ "print \"The current through the 6 ohm resistor is %.2f A. \\n\" %(I_6_ohm1) \n",
+ "print \"After transformation,\\nThe current through the 2 ohm resistor is %.2f A.\" %(I_2_ohm2) \n",
+ "print \"The current through the 6 ohm resistor is %.2f A.\" %(I_6_ohm2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current through the 2 ohm resistor is 12.00 A.\n",
+ "The current through the 6 ohm resistor is 4.00 A. \n",
+ "\n",
+ "After transformation,\n",
+ "The current through the 2 ohm resistor is 4.00 A.\n",
+ "The current through the 6 ohm resistor is 4.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11,Page number: 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reduced network using source transformation.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"First all the voltage sources are transformed to equivalent current sources.\"\"\"\n",
+ "I1=8.0/2.0\n",
+ "I2=6.0/1.0\n",
+ "I3=6.0/2.0\n",
+ "I4=3.0/1.0\n",
+ "I5=I1+I2\n",
+ "I6=I3+I4\n",
+ "R1=1.0/((1.0/2.0)+(1.0/1.0))\n",
+ "R2=1.0/((1.0/2.0)+(1.0/1.0))\n",
+ "V5=I5*R1\n",
+ "V6=I6*R2\n",
+ "V_tot=V5+V6\n",
+ "R_tot=R1+R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The network is equivalent to a voltage source of %.3f V with an internal resistance of %.2f Ohms.\" %(V_tot,R_tot)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The network is equivalent to a voltage source of 10.667 V with an internal resistance of 1.33 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12,Page number: 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across 3 Ohms resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=4.0 #Current delivered by source 1(in Amperes)\n",
+ "R1=1.0 #Resitance of resistor parallel to current source 1(in Ohms) \n",
+ "V2=6.0 #Voltage of the voltage source 2(in Volts)\n",
+ "I2=5.0 #Current delivered by source 2(in Amperes)\n",
+ "R2=2.0 #Resistance of resistor 2(in Ohms) \n",
+ "R3=3.0 #Resistance of resistor 3(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V1=I1*R1\n",
+ "V3=V1+V2\n",
+ "I3=V3/R1\n",
+ "I4=I3-I2\n",
+ "V4=I4*R1\n",
+ "V_res=V4*(R3/(R1+R2+R3))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across 3 Ohms resistor is %.2f Volts.\" %(V_res)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across 3 Ohms resistor is 2.50 Volts.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13,Page number: 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=24.0 #Supply voltage(in Volts)\n",
+ "R1=4.0 #Resistance of resistor 1(in Ohms) \n",
+ "R2=2.0 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" V1=4*I;\n",
+ " Applying Kirchoff's Voltage Law to the closed loop, 24-(4*I)-(2*I)-(4.5*4*I)=0 ; \"\"\"\n",
+ "I=24/((R1+R2)-(4.5*R1))\n",
+ "P=-4.5*R1*I*I\n",
+ "R=V/I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the current I is %.2f A.\" %(abs(I))\n",
+ "print \"(b)The power absorbed by the dependent source is %.2f W.\" %(P)\n",
+ "print \"(c)The resistance 'seen' by the independent voltage source is %.2f Ohms.\" %(R) \n",
+ "print \"\\nNOTE: The negative sign of the resistance is a result of the action of the dependent source.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the current I is 2.00 A.\n",
+ "(b)The power absorbed by the dependent source is -72.00 W.\n",
+ "(c)The resistance 'seen' by the independent voltage source is -12.00 Ohms.\n",
+ "\n",
+ "NOTE: The negative sign of the resistance is a result of the action of the dependent source.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14,Page number: 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Appling KVL in the closed loop, +100-(40*I)-(60*I)=0.\"\"\"\n",
+ "I=V/(40.0+60.0)\n",
+ "V1=I*60.0\n",
+ "\"\"\"Appling KVL in the open loop, -10+V1+(0*10)+30-Vab=0.\"\"\"\n",
+ "Vab=30+V1-10\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage Vab in the circuit is %.2f V.\" %(Vab)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage Vab in the circuit is 80.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15,Page number: 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the unknown voltages Vx and Vcd.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=10.0 #Supply voltage(in Volts)\n",
+ "Vca=4.0 #Voltage between points c and a(in Volts) \n",
+ "V1=6.0 #Voltage across resistor R1(in Volts) \n",
+ "V2=-4.0 #Voltage across resistor R2(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vx=Vca-V2\n",
+ "Vcd=Vca-V1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage Vx in the circuit is %.2f V.\" %(Vx)\n",
+ "print \"The voltage Vcd in the circuit is %.2f V.\" %(Vcd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage Vx in the circuit is 8.00 V.\n",
+ "The voltage Vcd in the circuit is -2.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16,Page number: 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents in the network.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"KVL equations for loops 1,2 and 3 are written and the equations are solved using SymPy.\"\"\" \n",
+ "print \"Note: All currents are expressed in Amperes.\"\n",
+ "Ix, Iy, I1 = symbols('Ix Iy I1');\n",
+ "solve([(5*Ix)+(0*Iy)+(10*I1)-100,(7*Ix)+(2*Iy)+(-2*I1)+50,(3*Ix)+(-5*Iy)+(-3*I1)+50], [Ix,Iy,I1])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Note: All currents are expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 20,
+ "text": [
+ "{I1: 585/49, Ix: -190/49, Iy: 25/49}"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17,Page number: 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents using Kirchoff's laws.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"KCL equations at nodes B and C,we get\n",
+ " \n",
+ " I1+I2=20;\n",
+ " \n",
+ " I3-I2=30;\"\"\"\n",
+ "\"\"\"KVL equation for the outer loop ABCDEFGHA, I1-(3*I2)-(2*I3)=-100; \"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "print \"Resistances R1 and R2 are in Ohms.\"\"\"\n",
+ "I1, I2,I3,R1,R2 = symbols('I1 I2 I3 R1 R2')\n",
+ "solve([I1+I2+(0*I3)-20,(0*I1)-I2+I3-30,I1+(-3*I2)+(-2*I3)+100,(110-(0.1*I1))-(20*R1),(120-(0.2*I3))-(30*R2)],[I1,I2,I3,R1,R2])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n",
+ "Resistances R1 and R2 are in Ohms.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 42,
+ "text": [
+ "{I1: 10.0000000000000,\n",
+ " I2: 10.0000000000000,\n",
+ " I3: 40.0000000000000,\n",
+ " R1: 5.45000000000000,\n",
+ " R2: 3.73333333333333}"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18,Page number: 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=2.0 #Loop current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"KVL Equation: 10-(5*(I1-2))-(8*I1)=0.\"\"\"\n",
+ "I1=(10.0+10.0)/(8.0+5.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current through the 8 Ohms resistor is %.3f A.\" %(I1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current through the 8 Ohms resistor is 1.538 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19,Page number: 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the unknown voltage.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Writing the KVL equation around the loop of I, -(2*I)+(3*I)+6-(1*(I+5-4))=0.\"\"\"\n",
+ "I=(6.0-1.0)/(2+3+1)\n",
+ "v=3*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The unknown voltage in the circuit is %.2f V.\" %(v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The unknown voltage in the circuit is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20,Page number: 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current drawn by the source.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1, 2 and 3 and solving for currents.\"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "print \"The current delivered by the source is I1.\"\n",
+ "I1, I2,I3,Is = symbols('I1 I2 I3 Is')\n",
+ "solve([(19*I1)+(-12*I2)+(0*I3)-60,(-12*I1)+(18*I2)+(-6*I3),(0*I1)+(-6*I2)+(18*I3),Is-I1], [I1,I2,I3,Is]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n",
+ "The current delivered by the source is I1.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "{I1: 6, I2: 9/2, I3: 3/2, Is: 6}"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21,Page number: 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mesh currents using mesh analysis.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1, 2 and 3 and solving for currents.\"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "I1, I2, I3 = symbols('I1 I2 I3')\n",
+ "solve([(7*I1)+(-4*I2)+(0*I3)-13,(-4*I1)+(15*I2)+(-6*I3)-12,(0*I1)+(-6*I2)+(13*I3)-1], [I1,I2,I3]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 34,
+ "text": [
+ "{I1: 3, I2: 2, I3: 1}"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22,Page number: 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across resistor using node-voltage analysis.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at nodes a and b and finding the nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "Va,Vb,Vab = symbols('Va Vb Vab')\n",
+ "solve([(Va/2)+((Va-Vb)/3)-5,((Vb-Va)/3)+(Vb/4)+6,Va-Vb-Vab], [Va,Vb,Vab])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 43,
+ "text": [
+ "{Va: 22/9, Vab: 34/3, Vb: -80/9}"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23,Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at node 1,\n",
+ "\n",
+ " ((V1-0)/12.0)+((V1-60.0)/7.0)+((V1-0)/4.0)=0; \"\"\"\n",
+ "V1=(60.0/7.0)/((1.0/12.0)+(1.0/7.0)+(1.0/4.0))\n",
+ "I1=V1/12.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I1 through the 12 Ohms resistor is %.2f A.\" %(I1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I1 through the 12 Ohms resistor is 1.50 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24,Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through a resistor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL for supernode (a,b) and for node c and finding the nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "print \"The current I is in Amperes.\"\n",
+ "Va,Vb,Vc,I = symbols('Va Vb Vc I')\n",
+ "solve([Va-Vb-6,(Va/3)+((Vb-Vc)/4)-2,((Vc-Vb)/4)+(Vc/5)+7,((Vb-Vc)/4)-I], [Va,Vb,Vc,I])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n",
+ "The current I is in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 47,
+ "text": [
+ "{I: 35/12, Va: -11/4, Vb: -35/4, Vc: -245/12}"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25,Page number: 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across resistor by nodal-voltage method.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at node a,\n",
+ " \n",
+ " ((Va-6.0)/1.0)+((Va-0.0)/5.0)=-4.0+5.0 ; \"\"\"\n",
+ "\n",
+ "Va=(6.0-1.0)/1.2\n",
+ "v=Va*(3.0/(2.0+3.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across 3 Ohms resistor is %.2f V.\" %(v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across 3 Ohms resistor is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26,Page number: 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at nodes 1 and 2 and solving for nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "print \"The current I is in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([(0.7*V1)+(-0.2*V2)-3,(-0.2*V1)+(1.2*V2)-2,((V1-V2)/5.0)-I],[V1,V2,I])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n",
+ "The current I is in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": [
+ "{I: 0.500000000000000, V1: 5.00000000000000, V2: 2.50000000000000}"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.27,Page number: 85 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through a resistor.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at node 1,\n",
+ "\n",
+ " ((V-10.0)/2.0)+((V-0.0)/(1.0+3.0))+((V-8.0)/6.0)=0 ; \"\"\"\n",
+ "\n",
+ "V=((10.0/2.0)+(8.0/6.0))/((1.0/2.0)+(1.0/4.0)+(1.0/6.0))\n",
+ "I=V/(1.0+3.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I is 1.73 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.28,Page number: 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the values of capacitances.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=200.0 #Voltage of the dc supply(in Volts)\n",
+ "V1=120.0 #Potential difference across C1(in Volts)\n",
+ "V_new=140.0 #Potential difference across C1 when a capacitor is added(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Case 1: The charge on each capacitor is the same.\n",
+ "\n",
+ " (C1*V1)=(C2*V2);\n",
+ " (120*C1)=(80*C2);\"\"\"\n",
+ "\"\"\"Case 2: The capacitance of 3 micro Farad in parallel with C2 gives an equivalent capacitance of (C2+3) micro Farad.\n",
+ " \n",
+ " (140*C1)=(60*(C2+3)) ;\"\"\"\n",
+ "print \"Note:The capacitances are expressed in Farads.\" \n",
+ "C1,C2 = symbols('C1 C2')\n",
+ "solve([(120*C1)-(80*C2),(140*C1)-(60*(C2+(3e-06)))],[C1,C2])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Note:The capacitances are expressed in Farads.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 31,
+ "text": [
+ "{C1: 3.60000000000000e-6, C2: 5.40000000000000e-6}"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.29,Page number: 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in each branch.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=20.0/10.0\n",
+ "I4=10.0/5.0\n",
+ "I5=10.0/2.0\n",
+ "I2=(20.0-(10.0+9.0))/1.0\n",
+ "I3=(20.0-50.0-10.0)/20.0\n",
+ "Ia=I1+I2+I3\n",
+ "Ib=I4+I5-I2-I3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The currents are:\" \n",
+ "print \" I1=%.2f A \\n I2=%.2f A \\n I3=%.2f A \\n I4=%.2f A \\n I5=%.2f A \\n Ia=%.2f A \\n Ib=%.2f A\" %(I1,I2,I3,I4,I5,Ia,Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The currents are:\n",
+ " I1=2.00 A \n",
+ " I2=1.00 A \n",
+ " I3=-2.00 A \n",
+ " I4=2.00 A \n",
+ " I5=5.00 A \n",
+ " Ia=1.00 A \n",
+ " Ib=8.00 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.30,Page number: 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents through resistors.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1 and 2 and solving for currents.\"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "print \"Current through R1= Current through R2=I1\"\n",
+ "print \"Current through R3=I3\"\n",
+ "print \"Current through R4=I2\"\n",
+ "I1, I2, I3 = symbols('I1 I2 I3')\n",
+ "solve([(4.5*I1)+(-3*I2)-2,(-3*I1)+(4*I2)-5,I1-I2-I3], [I1,I2,I3]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n",
+ "Current through R1= Current through R2=I1\n",
+ "Current through R3=I3\n",
+ "Current through R4=I2\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 54,
+ "text": [
+ "{I1: 2.55555555555556, I2: 3.16666666666667, I3: -0.611111111111111}"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.31,Page number: 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through each resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E1=4.0 #EMF of cell 1(in Volts)\n",
+ "E2=8.0 #EMF of cell 2(in Volts)\n",
+ "R1=0.5 #Internal resistance of cell 1(in Ohms)\n",
+ "R2=1.0 #Internal resistance of cell 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R3=1.0/((1.0/3.0)+(1.0/6.0))\n",
+ "Rt=R1+R2+R3+4.5\n",
+ "E=E2-E1\n",
+ "I=E/Rt\n",
+ "I_3=I*(6.0/(3.0+6.0))\n",
+ "I_6=I*(3.0/(3.0+6.0))\n",
+ "V1=E1+(I*R1)\n",
+ "V2=E2-(I*R2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current the 3 Ohms resistor is %.2f A.\" %(I_3)\n",
+ "print \" The current the 6 Ohms resistor is %.2f A.\" %(I_6)\n",
+ "print \" The current the 4.5 Ohms resistor is %.2f A.\" %(I)\n",
+ "print \"(b)The potential difference across cell 1 is %.2f V and across cell 2 is %.2f V.\" %(V1,V2)\n",
+ "print \" Note that the pd of cell E1 is greater than its EMF.This is so because the cell is working as a load.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current the 3 Ohms resistor is 0.33 A.\n",
+ " The current the 6 Ohms resistor is 0.17 A.\n",
+ " The current the 4.5 Ohms resistor is 0.50 A.\n",
+ "(b)The potential difference across cell 1 is 4.25 V and across cell 2 is 7.50 V.\n",
+ " Note that the pd of cell E1 is greater than its EMF.This is so because the cell is working as a load.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.32,Page number: 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential of point A.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E1=8.0 #EMF of first source(in Volts)\n",
+ "E2=6.0 #EMF of second source(in Volts)\n",
+ "E3=4.0 #EMF of third source(in Volts)\n",
+ "R1=5.0 #Resistance of resistor 1(in Ohms) \n",
+ "R2=9.0 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_A=E3+E2-E1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The potential of point A is %.2f V.\" %(V_A)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential of point A is 2.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.33,Page number: 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in a capacitor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C=4e-06 #Capacitance of the capacitor(in Farad)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" Applying KCL to the node at the top of the capacitor, current through 5 Ohms resistance is 1+2=3 A. \n",
+ " Applying KCL to the node at the bottom of the capacitor, current through 2 Ohms resistance is 2-1=1 A.\"\"\"\n",
+ "V=(3*5)+(3*1)+(1*2)\n",
+ "W=0.5*C*V*V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The energy stored in the capacitor is %e J.\" %(W)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy stored in the capacitor is 8.000000e-04 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.34,Page number: 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential differnce between two points.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E1=3.0 #EMF of cell 1(in Volts)\n",
+ "E2=2.0 #EMF of cell 2in Volts)\n",
+ "E3=1.0 #EMF of cell 3in Volts)\n",
+ "r1=1.0 #Internal resistance of cell 1(in Ohms)\n",
+ "r2=1.0 #Internal resistance of cell 2(in Ohms)\n",
+ "r3=1.0 #Internal resistance of cell 3(in Ohms) \n",
+ "R=1.0 #Resistance of resistor R(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Assigning loop currents as I1 and I2 and writing KVL equations for the two loops,\n",
+ "\n",
+ " E1-(I1*r1)-((I1-I2)*r2)-E2=0; which is (-2*I1)+I2+1=0; \n",
+ " \n",
+ " E2-(I2*r3)-((I2-I1)*r2)-E3=0; which is (-2*I2)+I1+1=0; \"\"\"\n",
+ "\n",
+ "eq1=-1\n",
+ "eq2=-1\n",
+ "I1=((2*eq1)+eq2)/(-3.0)\n",
+ "I2=((2*eq2)+eq1)/(-3.0)\n",
+ "Vab=E2+((I1-I2)*r2)+(0*R)\n",
+ "\n",
+ "V_CB=E2\n",
+ "V_B=0.0\n",
+ "V_C=V_CB+V_B\n",
+ "I3=(V_C-E1)/r1\n",
+ "I4=(V_C-E3)/r3\n",
+ "I6=V_C/R\n",
+ "I5=I3+I4+I6\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The potential difference between points A and B is %.2f V.\" %(Vab) \n",
+ "print \" The current through r1 is %.2f A,the current through r2=%.2f A.\" %(I1,(I1-I2)) \n",
+ "print \" The current through r3=%.2f A and the current through R is 0(no closed loop).\" %(I2)\n",
+ "print \"(b)The current through E1 is %.2f A.\" %(I3) \n",
+ "print \" The current through E2 is %.2f A.\" %(I5)\n",
+ "print \" The current through E3 is %.2f A.\" %(I4)\n",
+ "print \" The current through R is %.2f A.\" %(I6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The potential difference between points A and B is 2.00 V.\n",
+ " The current through r1 is 1.00 A,the current through r2=0.00 A.\n",
+ " The current through r3=1.00 A and the current through R is 0(no closed loop).\n",
+ "(b)The current through E1 is -1.00 A.\n",
+ " The current through E2 is 2.00 A.\n",
+ " The current through E3 is 1.00 A.\n",
+ " The current through R is 2.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.35,Page number: 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential diiference between two points.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "pd_9=0.0\n",
+ "pd_13=0.0\n",
+ "pd_10=6.0*10.0\n",
+ "pd_5=5.0*8.0\n",
+ "pd_18=15.0\n",
+ "Vab=pd_5-pd_10-pd_18\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage drop Vab is %.2f V.\" %(Vab)\n",
+ "print \"The resistors 4 Ohms,11 Ohms,9 Ohms,18 Ohms and 13 Ohms have no effect on the voltage drop Vab.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage drop Vab is -35.00 V.\n",
+ "The resistors 4 Ohms,11 Ohms,9 Ohms,18 Ohms and 13 Ohms have no effect on the voltage drop Vab.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.36,Page number: 90 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage of dependent voltage source.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1 and 2.\"\"\"\n",
+ "print \"The current I1 is expressed in Amperes and the voltage V1 is expressed in Volts.\"\"\"\n",
+ "V1,I1 = symbols('V1 I1')\n",
+ "solve([V1+(2*I1),24-(16*I1)-(4*V1)], [V1,I1]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I1 is expressed in Amperes and the voltage V1 is expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 33,
+ "text": [
+ "{I1: 3, V1: -6}"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.37,Page number: 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage V.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the upper node and KVL equation for the left loop.\"\"\"\n",
+ "print \"The currents I1 and I2 are expressed in Amperes and the voltage V is expressed in Volts.\"\"\"\n",
+ "I1,I2,V = symbols('I1 I2 V')\n",
+ "solve([I1-I2+(10*I2),36-(20e03*I1),V+(10*I2*(5e03))], [I1,I2,V]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The currents I1 and I2 are expressed in Amperes and the voltage V is expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 37,
+ "text": [
+ "{I1: 0.00180000000000000, I2: -0.000200000000000000, V: 10.0000000000000}"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.38,Page number: 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the loop currents.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1 and 2.\"\"\"\n",
+ "print \"The loop currents i1 and i2 are expressed in Amperes.\"\n",
+ "i1,i2 = symbols('i1 i2')\n",
+ "solve([(3*i2)-((i2-i1)*1)-(i2*2)-3,4-(i1*1)-((i1-i2)*1)-(3*i2)], [i1,i2]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The loop currents i1 and i2 are expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": [
+ "{i1: 3, i2: -1}"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.39,Page number: 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the nodal voltages.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at top node and solving for nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "print \"The current I is in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([9-I-(V1/10)+(3*I),9-(4*V1/5)-(V1/10),V2-V1-108],[V1,V2,I])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n",
+ "The current I is in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 40,
+ "text": [
+ "{I: -4, V1: 10, V2: 118}"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.40,Page number: 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current I by nodal analysis.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the nodes 1 and 2.\"\"\"\n",
+ "print \"The nodal voltages V1 and V2 are expressed in Volts.\"\n",
+ "print \"The current I is expressed in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([(2*V1)-(V2)-12,(-2*V1)+(4*V2)-6,I-((V1-V2)/3)], [V1,V2,I]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1 and V2 are expressed in Volts.\n",
+ "The current I is expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "{I: 1, V1: 9, V2: 6}"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.41,Page number: 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current I in the circuit.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the nodes 1 and 2.\"\"\"\n",
+ "print \"The nodal voltages V1 and V2 are expressed in Volts.\"\n",
+ "print \"The current I is expressed in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([(1*V1)-(0.5*V2)-6,(-0.5*V1)+(0.625*V2)-3,I-((V1-V2)/2)], [V1,V2,I]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1 and V2 are expressed in Volts.\n",
+ "The current I is expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": [
+ "{I: -1.00000000000000, V1: 14.0000000000000, V2: 16.0000000000000}"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.42,Page number: 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the nodes 1,2. and 3\"\"\"\n",
+ "print \"The nodal voltages V1,V2 and V3 are expressed in Volts.\"\n",
+ "print \"The current I flowing through the 2 Ohms resistor is expressed in Amperes.\" \n",
+ "V1,V2,V3,I = symbols('V1 V2 V3 I')\n",
+ "solve([(7*V1)-(3*V2)-(4*V3)+11,(-3*V1)+(6*V2)-(2*V3)-3,(-4*V1)-(2*V2)+(11*V3)-25,I-(2*(V2-V3))], [V1,V2,V3,I]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1,V2 and V3 are expressed in Volts.\n",
+ "The current I flowing through the 2 Ohms resistor is expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 12,
+ "text": [
+ "{I: -2, V1: 1, V2: 2, V3: 3}"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.43,Page number: 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the nodal voltages in the circuit.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "Ieq=13.0*5.0 #Equivalent current source\n",
+ "\"\"\"Apply KCL at the nodes 1 and 2.\"\"\"\n",
+ "print \"The nodal voltages V1 and V2 are expressed in Volts.\"\n",
+ "V1,V2 = symbols('V1 V2')\n",
+ "solve([(9*V1)-(5*V2)-10,(-5*V1)+(11*V2)-52], [V1,V2]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1 and V2 are expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 11,
+ "text": [
+ "{V1: 5, V2: 7}"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter4.ipynb b/Basic_Electrical_Engineering/Chapter4.ipynb
new file mode 100755
index 00000000..74af3cd5
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter4.ipynb
@@ -0,0 +1,1114 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: NETWORK THEOREMS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1,Page number: 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current I in the circuit using superposition theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=-0.5*(0.3/(0.1+0.3))\n",
+ "I2=80e-03/(0.1+0.3)\n",
+ "I=I1+I2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I in the circuit is %.3f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I in the circuit is -0.175 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2,Page number: 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding current I_x in the network using superposition theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=10.0/(50+150)\n",
+ "I2=40*(150.0/(50+150))\n",
+ "I3=-120*(50.0/(150+50))\n",
+ "Ix=I1+I2+I3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current Ix determined using superposition principle is %.2f A.\" %(Ix)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current Ix determined using superposition principle is 0.05 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3,Page number: 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across resistor by applying the principle of superposition.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "i=4.0*(1.0/(1.0+(2+3)))\n",
+ "R=3.0\n",
+ "v_4=i*R\n",
+ "v_5=(-5*(1.0/(1+(2+3))))*R\n",
+ "v_6=6.0*(3.0/(1+2+3))\n",
+ "v=+v_4+v_5+v_6\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total voltage(v) across the 3 ohm resistor is %.2f V.\" %(v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total voltage(v) across the 3 ohm resistor is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4,Page number: 108 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of I_s to reduce the voltage across the 4-ohm resistor to zero. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_source=10.0 #Voltage of the source(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V_source/(2+4+6)\n",
+ "\n",
+ "\"\"\" I2(from top to bottom in the 4 ohm resistor) = -Is*((2+6)/(2+6+4)) = -(2/3)*Is ;\n",
+ " \n",
+ " The voltage across the 4 ohm resistor can be zero,only if the current through this resistor is zero. \n",
+ " \n",
+ " I1+I2=0; \"\"\"\n",
+ "\n",
+ "Is=I1*(3.0/2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current Is to reduce the voltage across the 4 ohm resistor to zero is %.2f A.\" %(Is) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current Is to reduce the voltage across the 4 ohm resistor to zero is 1.25 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5,Page number: 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question: \n",
+ "\"\"\"Finding the voltage across the load resistor using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=(50.0-10.0)/(10+10+20)\n",
+ "I2=1.5*(10.0/(10.0+(10+20)))\n",
+ "I=I1+I2\n",
+ "V_Th=I*20\n",
+ "R_Th=1.0/((1.0/20)+(1.0/(10+10)))\n",
+ "R_L=5.0\n",
+ "V_L=V_Th*(R_L/(R_L+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the load resistor R_L is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the load resistor R_L is 9.17 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6,Page number: 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the resistor by applying Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "V_Th=5.0*1.0\n",
+ "R_Th=3.0\n",
+ "R_L=3.0\n",
+ "V_L=V_Th*(R_L/(R_L+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the resistor by applying Thevenin's Theorem is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the resistor by applying Thevenin's Theorem is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7,Page number: 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding Norton's equivalent circuit with respect to terminals AB.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=10.0/5\n",
+ "I2=5.0/10\n",
+ "I_N=I1+I2\n",
+ "R_N=1.0/((1.0/5)+(1.0/10))\n",
+ "I_L=I_N*((10.0/3)/((10.0/3)+5))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"When terminals AB are shorted, the current I_N is %.2f A.\" %(I_N)\n",
+ "print \"The value of current that would flow through a load resistor of 5 ohm if it were connected across terminals AB is %.2f A.\" %(I_L) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When terminals AB are shorted, the current I_N is 2.50 A.\n",
+ "The value of current that would flow through a load resistor of 5 ohm if it were connected across terminals AB is 1.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8,Page number: 114 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the available power from the battery.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Voc=12.6 #Open-circuit voltage(in Volts)\n",
+ "Isc=300.0 #Short-circuit voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ro=Voc/Isc\n",
+ "P_avl=(Voc*Voc)/(4*Ro)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The available power from the battery is %.2f W.\" %(P_avl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The available power from the battery is 945.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9,Page number: 115 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the available power from the battery.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "no_of_cells=8 #Number of dry cells in the battery\n",
+ "emf=1.5 #EMF of each cell(in Volts)\n",
+ "int_res=0.75 #Internal resistanceof each cell(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Voc=no_of_cells*emf\n",
+ "Ro=no_of_cells*int_res\n",
+ "P_avl=(Voc*Voc)/(4.0*Ro)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The available power from the battery is %.2f W.\" %(P_avl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The available power from the battery is 6.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10,Page number: 115 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Plotting a curve showing the variation of the output power Po with the load resistance R_L.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=25.0 #Power to be delivered to the speaker(in Watts)\n",
+ "Ro=8.0 #Resistance of the speaker(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_Th=sqrt(P*4*Ro)\n",
+ "Vo=V_Th/2.0\n",
+ "R_Th=Ro\n",
+ "R_L=0.0\n",
+ "P1=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=2.0\n",
+ "P2=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=4.0\n",
+ "P3=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=6.0\n",
+ "P4=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=8.0\n",
+ "P5=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=16.0\n",
+ "P6=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=32.0\n",
+ "P7=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "P8=0.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The voltage provided by this amplifier to to the speaker is %.2f V.\" %(Vo)\n",
+ "print \"(b)(i)If the load is a short circuit(R_L=0),the output voltage Vo would be zero and hence the output power,Po= Vo*I_L = 0*I_L =0.\"\n",
+ "print \" (ii) If the load is an open circuit(R_L=0),the load current I_L would be zero and hence the output power,Po= Vo*I_L = Vo*0 = 0.\"\n",
+ "print \"(c)(i) For R_L = 0 , Po = %.2f W. \\n (ii) For R_L = 2 Ohms, Po = %.2f W.\" %(P1,P2) \n",
+ "print \" (iii) For R_L = 4 Ohms, Po = %.2f W. \\n (iv) For R_L = 6 Ohms, Po = %.2f W.\" %(P3,P4) \n",
+ "print \" (v) For R_L = 8 Ohms, Po = %.2f W. \\n (vi) For R_L = 16 Ohms, Po = %.2f W.\" %(P5,P6) \n",
+ "print \" (vii) For R_L = 32 Ohms, Po = %.2f W. \\n (viii) For R_L = infinity, Po = %.2f W.\" %(P7,P8)\n",
+ "print \"Note: Po is the power delivered to the speaker (in Watts) and R_L is the speaker resistance(in Ohms).\" \n",
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from pylab import *\n",
+ "from matplotlib import *\n",
+ "import numpy as np\n",
+ "%pylab inline\n",
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Rdata=[0.0, 2.0, 4.0, 6.0, 8.0, 16.0] #(in ohm)\n",
+ "Podata=[0, 16, 22.22, 24.49, 25, 22.22] #(in Watt)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=np.array(Rdata)\n",
+ "Po=np.array(Podata)\n",
+ "length=len(R)\n",
+ "Rmax=R[length-1]\n",
+ "a=polyfit(R,Po,4)\n",
+ "Rfit=[0]*100\n",
+ "Pofit=[0]*100\n",
+ "for n in range(1,100,1):\n",
+ " Rfit[n-1]=Rmax*(n-1)/100\n",
+ " Pofit[n-1]=a[0]*Rfit[n-1]**4+a[1]*Rfit[n-1]**3+a[2]*Rfit[n-1]**2+a[3]*Rfit[n-1]+a[4]\n",
+ "\n",
+ "#Plot the data and then the fit to compare (convert xfit to cm and Lfit to mH)\n",
+ "plot(Rdata,Podata,'o')\n",
+ "plot(np.array(Rfit),np.array(Pofit),'g.') \n",
+ "xlabel('R_L (in ohm) ')\n",
+ "ylabel('Po (in Watt) ')\n",
+ "title('Ouput power(Po) vs. Speaker Resistance(R_L)')\n",
+ "grid()\n",
+ "print \"\\n\\nThe required plot is shown below: \"\n",
+ "show()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The voltage provided by this amplifier to to the speaker is 14.14 V.\n",
+ "(b)(i)If the load is a short circuit(R_L=0),the output voltage Vo would be zero and hence the output power,Po= Vo*I_L = 0*I_L =0.\n",
+ " (ii) If the load is an open circuit(R_L=0),the load current I_L would be zero and hence the output power,Po= Vo*I_L = Vo*0 = 0.\n",
+ "(c)(i) For R_L = 0 , Po = 0.00 W. \n",
+ " (ii) For R_L = 2 Ohms, Po = 16.00 W.\n",
+ " (iii) For R_L = 4 Ohms, Po = 22.22 W. \n",
+ " (iv) For R_L = 6 Ohms, Po = 24.49 W.\n",
+ " (v) For R_L = 8 Ohms, Po = 25.00 W. \n",
+ " (vi) For R_L = 16 Ohms, Po = 22.22 W.\n",
+ " (vii) For R_L = 32 Ohms, Po = 16.00 W. \n",
+ " (viii) For R_L = infinity, Po = 0.00 W.\n",
+ "Note: Po is the power delivered to the speaker (in Watts) and R_L is the speaker resistance(in Ohms).\n",
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "\n",
+ "\n",
+ "The required plot is shown below: "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['streamplot', 'rc', 'tri', 'axes', 'legend', 'rc_context', 'figure', 'f', 'quiver', 'axis', 'linalg', 'draw_if_interactive', 'text', 'random', 'colors', 'stackplot', 'contour', 'colorbar', 'rcdefaults', 'table', 'power', 'info', 'fft', 'test']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEaCAYAAAAYOoCaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVPX+B/D3oKAggwMIsioqpYIgKGnumJoKWZT7vpRk\nlkVZ1+61cmnxWhoumWlq1EUyrLypuC+4b10l9HZdMFCRlEVAVtk+vz/4cZqBGRiGM8w5w+f1PD6P\n58zM4T1nZs73nM/3nO9REBGBMcZYk2Nh6gCMMcZMgxsAxhhrorgBYIyxJoobAMYYa6K4AWCMsSaK\nGwDGGGuiuAFgovr73/+O1atXN2gZiYmJ6Nevn0iJpG/GjBl4//33TR1DbydOnECXLl1MHaNeNmzY\ngDfffNNoy5frd5YbAB2ioqLg7+8PpVIJV1dXzJ07F7m5uY3yt+W2QaiSkZGBf/3rX5gzZw4AID4+\nHhYWFlAqlWjVqhU6duyIL7/8ss7l+Pv7Q6VSYffu3caOrCElJQXPPPMM7OzsYGdnBx8fH3zzzTdG\n/7sKhQIKhcIoyw4ODoa1tTWUSiXs7OwwYsQIpKSkNGiZAwYMwNWrV+t83uLFizF16tQG/S0xlJSU\n4OOPP8bf/vY3AJWfs/r30s3NDf/4xz+gzyVRXl5eOHz4cI35pvrONhQ3AFqsXLkSCxcuxLp165CX\nl4eEhASkp6dj2LBhKC0tNXU8ySkrKwNQ2WiGhoaiRYsWwmPu7u7Iy8tDQUEBIiMjMW/ePCQkJNS5\nzMmTJ2PDhg1Gy6zNhAkT0LVr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\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x43b9d10>"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11,Page number: 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in branch B due to the voltage source of 36 V in branch A.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_supply_a=36.0 #Supply voltage in the network shown in figure a(in Volts)\n",
+ "Req_a=2+ 1/((1.0/12)+(1.0/(3+1))) + 4 #Equivalent resistance of network shown in figure a(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_supply_a=V_supply_a/Req_a\n",
+ "I=I_supply_a*(12.0/(12+4))\n",
+ "V_supply_b=36.0\n",
+ "Req_b= 3+ 1.0/((1.0/12)+(1.0/(2+4))) + 1\n",
+ "I_supply_b=V_supply_b/Req_b\n",
+ "I_dash= I_supply_b*(12.0/(12+6))\n",
+ "R_tr=V_supply_a/I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I(in figure (a)) is %.2f A and the current I'(in branch A in figure (b)) is %.2f A.\" %(I,I_dash)\n",
+ "if(I==I_dash) : print \"As the two currents I and I' have the same value, the reciprocity theorem is established.\\n \"\n",
+ "else : print \"As the two currents I and I' have different values, the reciprocity theorem is not established.\\n \"\n",
+ "print \"The transfer resistance is %.2f Ohms.\" %(R_tr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I(in figure (a)) is 3.00 A and the current I'(in branch A in figure (b)) is 3.00 A.\n",
+ "As the two currents I and I' have the same value, the reciprocity theorem is established.\n",
+ " \n",
+ "The transfer resistance is 12.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.13,Page number: 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=20.0 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" KVL equation for the loop bacdeb, V_Th+50-20+10=0.\"\"\"\n",
+ "V_Th=-50.0-10.0+20.0\n",
+ "\"\"\"Shorting all the voltage sources.\"\"\"\n",
+ "R_Th=0.0\n",
+ "I3=V_Th/(R_L+R_Th)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I3 in the circuit is %.2f A.\" %(I3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I3 in the circuit is -2.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.14,Page number: 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=1.0 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" KVL equation for the loop bacdeb, V_Th+50-20+10=0.\"\"\"\n",
+ "V_Th=20.0-10.0-9.0\n",
+ "\"\"\"Shorting all the voltage sources.\"\"\"\n",
+ "R_Th=0.0\n",
+ "I2=V_Th/(R_L+R_Th)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I2 in the circuit is %.2f A.\" %(I2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I2 in the circuit is 1.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.15,Page number: 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using superposition theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=0.5 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I=15.0/(1+0.6)\n",
+ "I1=I*(1/(1+(R+1)))\n",
+ "I2=20/((2/3.0)+2)\n",
+ "I1_20=I2*(2.0/(2.0+(R+R)))\n",
+ "Inet=I1-I1_20\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current flowing through R from A to B is %.2f A.\" %(Inet) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current flowing through R from A to B is -1.25 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16,Page number: 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the resistance using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"The first step is to remove the 5 Ohms resistance.Then, find the open-circuit voltage Voc across AB. \n",
+ " Using nodal analysis,for node C we can write ((Voc-20)/2)+((Voc+10)/1)+((Voc-12)/4)=10.\"\"\"\n",
+ "Voc=(10+3)/(0.5+1+0.25)\n",
+ "V_Th=Voc\n",
+ "R_Th=1.0/((1.0/2.0)+(1.0)+(1/4.0))\n",
+ "V_AB=V_Th*(5.0/(5.0+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the 5 Ohms resistance is %.2f V.\" %(V_AB)\n",
+ "print \"Note:There is a calculation error in the textbook.Voc=7.43 V but not 1.74 V. Therefore V_AB=6.67 V.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the 5 Ohms resistance is 6.67 V.\n",
+ "Note:There is a calculation error in the textbook.Voc=7.43 V but not 1.74 V. Therefore V_AB=6.67 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17,Page number: 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using Norton's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "Isc=20.0/10.0\n",
+ "I_N=Isc\n",
+ "R_N=1.0/((1.0/10)+(1.0/10))\n",
+ "I=I_N*(R_N/(R_N+2.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current through the 2 Ohms resistance when connected across terminals AB is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current through the 2 Ohms resistance when connected across terminals AB is 1.43 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.18,Page number: 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finfing the power consumed by resistor using Norton's theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=2.0 #Resistance of load(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"To determine I_N,short circuit the terminals xy and find the current Isc throgh this short circuit.\n",
+ "\n",
+ " Applying node-voltage analysis to determine the voltage at node 1,\n",
+ " \n",
+ " ((V1-12)/3)+(V1/2)=4;\"\"\"\n",
+ "\n",
+ "V1=(4.0+(12.0/3.0))/((1.0/3.0)+0.5)\n",
+ "Isc=V1/2.0\n",
+ "I_N=Isc\n",
+ "R_N=1.0/((1.0/(3.0+2.0))+(1.0/5.0))\n",
+ "I=I_N*(R_N/(R_N+R_L))\n",
+ "P=I*I*R_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power consumed by the 2 Ohms load reistor is %.3f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power consumed by the 2 Ohms load reistor is 14.222 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19,Page number: 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across load.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=5.0 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R_N=1.0/((1.0/20.0)+(1.0/(10.0+10.0)))\n",
+ "I_N=(65.0-10.0)/(10.0+10.0)\n",
+ "I_L=I_N*(R_N/(R_N+R_L))\n",
+ "V_L=I_L*R_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the load using Norton's theorem is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the load using Norton's theorem is 9.17 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.20,Page number: 125 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reading of voltmeter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=500e03 #Resistance across which voltmeter is connected(in Ohms)\n",
+ "Rm=10e06 #Internal resistance of voltmeter(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_a=10.0*(R/(R+800e03))\n",
+ "R_Th=1.0/((1/R)+(1/800e03))\n",
+ "V_Th=V_a\n",
+ "V_b=V_Th*(Rm/(Rm+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The reading of the voltmeter if it assumed to be ideal is %.2f V.\" %(V_a)\n",
+ "print \"(b)The reading of the voltmeter if it has an internal resistance of 10 M Ohms is %.2f V.\" %(V_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The reading of the voltmeter if it assumed to be ideal is 3.85 V.\n",
+ "(b)The reading of the voltmeter if it has an internal resistance of 10 M Ohms is 3.73 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.21,Page number: 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the load resistance for receiving maximum power.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=3e03 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"First, we remove R_L and then find Voc=V_Th. We transform the 5-mA current source into voltage source.\"\"\"\n",
+ "Voc=(60.0-40.0)*((6e03)/((6e03)+(12e03+18e03)))\n",
+ "V_Th=Voc\n",
+ "R_Th=1.0/((1.0/6e03)+(1.0/(12e03+18e03)))\n",
+ "Vab_b=V_Th*(R_L/(R_L+R_Th))\n",
+ "R_L_c=R_Th\n",
+ "\"\"\" The current required through 6 kilo Ohms resistor is 0.1 mA.\"\"\"\n",
+ "Vab_d=(0.1e-03)*(6e03)\n",
+ "V_30k=20-Vab_d\n",
+ "I_30k=V_30k/(30e03)\n",
+ "I_L=I_30k-(0.1e-03)\n",
+ "R_L_d=Vab_d/I_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The Thevenin's equivalent voltage is %.2f V and the Thevenin's resistance is %.2f kilo Ohms.\" %(V_Th,(R_Th/1000.0))\n",
+ "print \"(b)The Vab for R_L=3 kilo Ohms is %.3f V.\" %(Vab_b)\n",
+ "print \"(c)The value of R_L which receives maximum power from the circuit is %.2f kilo Ohms.\" %(R_L_c/1000.0)\n",
+ "print \"(d)The value of R_L which makes the current in the 6 kilo Ohms resistor to be 0.1 mA is %.3f kilo Ohms.\" %(R_L_d/1000.0) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The Thevenin's equivalent voltage is 3.33 V and the Thevenin's resistance is 5.00 kilo Ohms.\n",
+ "(b)The Vab for R_L=3 kilo Ohms is 1.250 V.\n",
+ "(c)The value of R_L which receives maximum power from the circuit is 5.00 kilo Ohms.\n",
+ "(d)The value of R_L which makes the current in the 6 kilo Ohms resistor to be 0.1 mA is 1.098 kilo Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.22,Page number: 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of resistance.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=12.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" To receive maximum power,the resistance R should be equal to the output resistance of the remaining circuit,which is same as \n",
+ " Thevenin's resistance.\"\"\"\n",
+ "R_Th=1.0/((1.0/2.0)+(1.0/6.0))\n",
+ "R=R_Th\n",
+ "\"\"\" Mesh equations to find loop currents I1 and I2, \n",
+ " \n",
+ " (8*I1)-(6*I2)=4 and -(6*I1)+(7.5*I2)=8. Solving these equations, we get I1=3.25 A. \"\"\"\n",
+ "I1=((4*7.5)+(8*6))/((8*7.5)-(6*6))\n",
+ "P=V*I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of R to receive maximum power from the circuit is %.2f Ohms.\" %(R)\n",
+ "print \"(b)The power supplied by the 12 V source is %.2f W.\" %(P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of R to receive maximum power from the circuit is 1.50 Ohms.\n",
+ "(b)The power supplied by the 12 V source is 39.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23,Page number: 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current Is.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=12.0/(80.0+120)\n",
+ "\"\"\" I2=Is*(80/(80+120)); I1+I2=0;\"\"\"\n",
+ "Is=-I1/(80.0/(80+120))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current Is such that the current through 120 Ohms resistor is zero is %.2f A.\" %(Is)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current Is such that the current through 120 Ohms resistor is zero is -0.15 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.24,Page number: 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the Thevenin equivalent circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=12.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"The circuit has no independent source.So,the current I in the 12 Ohms resistor will be zero and hence the dependent voltage source\n",
+ " (8*I) will also be zero. Obviously,Thevenin's voltage V_Th=0 V. \"\"\"\n",
+ "V_Th=0.0\n",
+ "I=12.0/12.0\n",
+ "V=8*I\n",
+ "\"\"\"Applying KCL to node a,\"\"\"\n",
+ "Is=(12.0/12.0)+(12.0/6.0)+((12.0-8.0)/4.0)\n",
+ "R_Th=Vs/Is\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Thevenin's equivalent resistance is %.2f Ohms and the Thevenin's equivalent voltage is %.2f V.\" %(R_Th,V_Th)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Thevenin's equivalent resistance is 3.00 Ohms and the Thevenin's equivalent voltage is 0.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter5.ipynb b/Basic_Electrical_Engineering/Chapter5.ipynb
new file mode 100755
index 00000000..3a8210b4
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter5.ipynb
@@ -0,0 +1,841 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: ELECTROMAGNETISM"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1,Page number: 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current necessary to produce a magnetic field inside the solenoid.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=20e-03 #Magnitude of magnetic field inside the solenoid(in Tesla)\n",
+ "n=20e02 #Number of turns per cm in the long solenoid\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)*(1e-07)\n",
+ "I=B/(abs_per*n)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required current is %.2f A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required current is 7.96 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2,Page number: 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetic field near the centre and the ends of a solenoid.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "abs_per=4*pi*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "I=6.0 #Current carried by the solenoid(in Amperes)\n",
+ "l=50e-02 #Length of solenoid(in metres)\n",
+ "r=1.4e-02 #Radius of the lowest layer(in metres)\n",
+ "turns_per_layer=350 #Number of turns per layer\n",
+ "number_of_layers=4 #Number of layers\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "n=(turns_per_layer*number_of_layers)/l\n",
+ "B_centre=abs_per*n*I\n",
+ "B_end=(abs_per*n*I)/2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnetic field inside the solenois is quite uniform,its strength near the centre on its axis and\" \n",
+ "print \" off its axis is the same and its magnitude is %e T.\" %(B_centre)\n",
+ "print \"(b)The magnetic field strength at the end of the solenoid is %e T.\" %(B_end)\n",
+ "print \"(c)The magnetic field far outside the solenoid near its axis is negligible,compared to the internal field.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnetic field inside the solenois is quite uniform,its strength near the centre on its axis and\n",
+ " off its axis is the same and its magnitude is 2.111150e-02 T.\n",
+ "(b)The magnetic field strength at the end of the solenoid is 1.055575e-02 T.\n",
+ "(c)The magnetic field far outside the solenoid near its axis is negligible,compared to the internal field.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3,Page number: 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force between two long straight parallel wires.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "r=2 #Distance between the parallel current carrying wires(in metres) \n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "I1=80 #Current in the first wire(in Amperes)\n",
+ "I2=30 #Current in the second wire(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F=(abs_per*I1*I2)/(2*pi*r)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnitude of the force between the two wires is %e N/m.\" %(F)\n",
+ "print \"Since the two currents are in the same direction,the force will be attractive.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of the force between the two wires is 2.400000e-04 N/m.\n",
+ "Since the two currents are in the same direction,the force will be attractive.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4,Page number: 148 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force due to current flowing in two straight,parallel wires.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=4.0 #Current in the first wire(in Amperes)\n",
+ "I2=6.0 #Current in the second wire(in Amperes)\n",
+ "r=3e-02 #Distance between the parallel current carrying wires(in metres) \n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F=(abs_per*I1*I2)/(2*pi*r)\n",
+ "l=15e-02\n",
+ "F_net=F*l\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net force on 15cm(=0.15 m) section of wire B near its centre is %e N.\" %(F_net)\n",
+ "print \"Since the currents are in opposite directions,the force F_net is repulsive.\"\n",
+ "print \"It means that its direction is normal to wire A away from it.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net force on 15cm(=0.15 m) section of wire B near its centre is 2.400000e-05 N.\n",
+ "Since the currents are in opposite directions,the force F_net is repulsive.\n",
+ "It means that its direction is normal to wire A away from it.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5,Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf produced in a conductor placed in an uniform magnetic field.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.5 #Magnitude of magnetic field(in Tesla)\n",
+ "l=20e-02 #Active length of the conductor(in metres) \n",
+ "v=5 #Velocity of the conductor(in metres per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "angle_a=0\n",
+ "e_a=B*l*v*sin(radians(angle_a))\n",
+ "angle_b=90\n",
+ "e_b=B*l*v*sin(radians(angle_b))\n",
+ "angle_c=30\n",
+ "e_c=B*l*v*sin(radians(angle_c))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The emf induced in the straight conductor when its motion is parallel to the magnetic field is %.2f V.\" %(e_a)\n",
+ "print \"(b)The emf induced in the straight conductor when its motion is perpendicular to the magnetic field is %.2f V.\" %(e_b)\n",
+ "print \"(c)The emf induced in the straight conductor when its motion is at an angle 30 degrees to the magnetic field is %.2f V.\" %(e_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The emf induced in the straight conductor when its motion is parallel to the magnetic field is 0.00 V.\n",
+ "(b)The emf induced in the straight conductor when its motion is perpendicular to the magnetic field is 0.50 V.\n",
+ "(c)The emf induced in the straight conductor when its motion is at an angle 30 degrees to the magnetic field is 0.25 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6,Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated between the wing-tips of an aeroplane.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=52 #Wing span of the aeroplane(in metres)\n",
+ "B=38e-06 #Magnitude of magnetic field(in Tesla)\n",
+ "v=1100.0*(1000.0/3600.0) #Velocity of the aeroplane(in metres per second)\n",
+ "angle=90 #Angle between the magnetic field vector and the velocity vector(in degrees) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "e=B*l*v*sin(radians(angle))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf generated between the wing tips is %.5f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf generated between the wing tips is 0.60378 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7,Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf developed between the centre and the metallic ring.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" A=(1/2)*R*R*theta; where theta is the angle between the rod and the rod OP(in figure) at time t \"\"\"\n",
+ "B=1.0 #Magnitude of magnetic field(in Tesla)\n",
+ "R=1 #Radius of circular ring(in metres)\n",
+ "f=50 #Frequency of rotation(in revolutions per second) \n",
+ "\n",
+ "\"\"\" B=d(flux)/dt= d(B*A)/dt= (1/2)*B*R*R*d(theta)/dt= (1/2)*B*R*R*ang_freq \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "e=(1.0/2)*B*R*R*ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf developed between the centre and the metallic ring is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf developed between the centre and the metallic ring is 157.08 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8,Page number: 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force needed to pull a rectangular loop placed in an uniform magnetic field.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.5 #Magnitude of magnetic field(in Tesla)\n",
+ "w=3e-02 #Width of the rectangular loop(in metres)\n",
+ "l=10e-02 #Length of the rectangular loop(in metres)\n",
+ "v=1e-02 #Velocity of the rectangular loop(in metre per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "e1=B*w*v\n",
+ "t1=l/v\n",
+ "e2=B*l*v\n",
+ "t2=w/v\n",
+ "R=1e-03\n",
+ "F_a=(pow((B*w),2)*v)/R\n",
+ "F_b=(pow((B*l),2)*v)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The induced emf is %e V and the time for which the induced voltage lasts is %.2f secs.\" %(e1,t1)\n",
+ "print \"(b)The induced emf is %e V and the time for which the induced voltage lasts is %.2f secs.\" %(e2,t2)\n",
+ "print \"(c)Because of the gap,no current can flow.Hence there is no heat produced(or no I*I*R losses).\"\n",
+ "print \" If we neglect friction,no force is required to pull the coil.\"\n",
+ "print \"(d)The force required to pull the loop if it has no cut and has a resistance of 1 mill ohm is :\"\n",
+ "print \" For fig (a): F=%e N.\" %(F_a)\n",
+ "print \" For fig (b): F=%e N.\" %(F_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The induced emf is 1.500000e-04 V and the time for which the induced voltage lasts is 10.00 secs.\n",
+ "(b)The induced emf is 5.000000e-04 V and the time for which the induced voltage lasts is 3.00 secs.\n",
+ "(c)Because of the gap,no current can flow.Hence there is no heat produced(or no I*I*R losses).\n",
+ " If we neglect friction,no force is required to pull the coil.\n",
+ "(d)The force required to pull the loop if it has no cut and has a resistance of 1 mill ohm is :\n",
+ " For fig (a): F=2.250000e-03 N.\n",
+ " For fig (b): F=2.500000e-02 N.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetic field due to a line caryying current.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=90.0 #Current flowing through the line(in Amperes)\n",
+ "x=1.5 #Distance of point of observation from the line(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "B=(abs_per*I)/(2*pi*x)\n",
+ " \n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnetic field due to the current at a point 1.5 m below the line is %e T.\" %(B)\n",
+ "print \"By applying the right-hand thumb rule,we find that the direction of the magnetic field is from north to south.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetic field due to the current at a point 1.5 m below the line is 1.200000e-05 T.\n",
+ "By applying the right-hand thumb rule,we find that the direction of the magnetic field is from north to south.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force per unit length on a current carrying wire.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=8.0 #Current flowing through the wire(in Amperes)\n",
+ "B=0.15 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "angle=30 #Angle between the direction of current and the uniform magnetic field(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Fu=I*B*sin(radians(angle))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The force per unit length of the wire is %.2f N/m.\" %(Fu)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force per unit length of the wire is 0.60 N/m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the torque experienced by a square coil.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=12.0 #Current flowing through the square coil(in Amperes)\n",
+ "N=20.0 #Number of turns in the square coil\n",
+ "l=10e-02 #Length of each side of the square coil(in metres)\n",
+ "B=0.8 #Magnitude of uniform horizontal magnetic field(in Tesla)\n",
+ "angle=30.0 #Angle made by normal to the plane of the coil with the direction of horizontal magnetic field(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F=I*B*l*N\n",
+ "x=l*sin(radians(angle))\n",
+ "T=F*x\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The torque experienced by the coil is %.3f Nm.\" %(T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The torque experienced by the coil is 0.960 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the net force on a rectangular loop.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=15.0 #Current carried by the rectangular loop(in Amperes)\n",
+ "I2=25.0 #Current carried by the straight conductor(in Amperes)\n",
+ "l=25e-02 #Length of the rectangular loop(in metres)\n",
+ "w=10e-02 #Width of the rectangular loop(in metres)\n",
+ "r=2e-02 #Separation between the nearer side of the loop and the conductor(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "\"\"\"Parts AD and BC do not experience any force,since these conductors are at right angles to the long straight conductor.\n",
+ " \n",
+ " The current I1 in AB and the current I2 in the straight conductor are in the same direction.\n",
+ " Hence,the force F_AB is attractive.\"\"\"\n",
+ "\n",
+ "F_AB=((abs_per*I1*I2)/(2*pi*r))*l\n",
+ "\n",
+ "\"\"\" The current I1 in CD and the current I2 in the straight conductor are in opposite directions.\n",
+ " Hence,the force F_CD is repulsive.\"\"\"\n",
+ "\n",
+ "F_CD=((abs_per*I1*I2)/(2*pi*(r+w)))*l\n",
+ "F_net=F_AB-F_CD\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net force on the rectangular loop is %.5f mN.\" %(F_net*1000.0) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net force on the rectangular loop is 0.78125 mN.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13,Page number: 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the location of a point where the resultant magnetic field is zero.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=10.0 #Current flowing through the wire(in Amperes)\n",
+ "B=2.0e-03 #Horizontal component of Earth's magnetic field(in Tesla)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" To make the resultant magnetic field zero,the magnetic filed produced by the long vertical wire must be equal and opposite \n",
+ " to the horizontal component of Earth's magnetic field.This is possible at a point P,west of the wire. \"\"\"\n",
+ "\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "x=(abs_per*I)/(2*pi*B)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The distance between the required point from the wire is %e m,to the west of the wire.\" %(x)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance between the required point from the wire is 1.000000e-03 m,to the west of the wire.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14,Page number: 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force per unit length between two current carrying wires.\"\"\"\n",
+ "\n",
+ "from math import pi \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=300.0 #Current flowing through each wire(in Amperes)\n",
+ "r=1.5e-02 #Separation between the wires(in metres)\n",
+ "l=70e-02 #Length of each wire(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "\"\"\"Since the length of the wires is 70 cm and their separation is only 1.5 cm(i.e, l>>r),\n",
+ " we can conclude that for the given separation the two wires are infinitely long. \"\"\"\n",
+ "F=(abs_per*I*I)/(2*pi*r)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The force per unit length between the two wires is %.2f N/m.\" %(F)\n",
+ "print \"Since the currents in the two wires are in the opposite directions,the force between them will be repulsive.\"\"\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force per unit length between the two wires is 1.20 N/m.\n",
+ "Since the currents in the two wires are in the opposite directions,the force between them will be repulsive.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15,Page number: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the counter torque to prevent a coil from turning.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=30.0 #Number of turns in the circular coil\n",
+ "r=8e-02 #Radius of circular coil(in metres)\n",
+ "I=6.0 #Current flowing through the circular coil(in Amperes)\n",
+ "B=1.0 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "angle=60 #Angle made by the field lines with the normal to the coil(in degrees)\n",
+ "\n",
+ " \n",
+ "#Calculations:\n",
+ "\"\"\"The counter torque required to prevent the coil from moving must be equal(and opposite) to the torque developed.\"\"\"\n",
+ "A=pi*r*r\n",
+ "tor=B*I*N*A*sin(radians(angle))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The counter torque that must be applied to prevent the coil from turning is %.2f Nm.\" %(tor) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The counter torque that must be applied to prevent the coil from turning is 3.13 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16,Page number: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the maximum voltage induced in a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=300e-04 #Area of circular coil(in square-m)\n",
+ "N=25.0 #Number of turns in the circular coil\n",
+ "w=40.0 #Angluar frequency(in radians per second)\n",
+ "B=0.05 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Em=N*B*A*w\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The maximum value of emf induced in the coil is %.2f V.\" %(Em)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum value of emf induced in the coil is 1.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.17,Page number: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the induces emf in a circular conducting loop.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.02 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "r=2e-02 #Radius of the circular loop(in metres)\n",
+ "rate=1.0e-03 #Rate of shrinking of the radius(in metre per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" flux=B*A; A=(pi*r*r);\n",
+ " e=d(flux)/dt; \n",
+ " \n",
+ " e=(B*pi*2*r)*(dr/dt); \"\"\"\n",
+ "\n",
+ "e=B*pi*2*r*rate\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the loop at an instant when the radius is 2 cm is %e V.\" %(e) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the loop at an instant when the radius is 2 cm is 2.513274e-06 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter6.ipynb b/Basic_Electrical_Engineering/Chapter6.ipynb
new file mode 100755
index 00000000..fde4f296
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter6.ipynb
@@ -0,0 +1,627 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: MAGNETIC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1,Page number: 167\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetic field strength and total flux passing through a coil.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=200 #Number of turns in the coil \n",
+ "l=0.60 #Length(Circumference) of the wooden ring(in metres)\n",
+ "A=500e-06 #Cross-sectional area of the ring(in square-metres)\n",
+ "I=4 #Current through the coil(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "H=(N*I)/l\n",
+ "rel_per=1\n",
+ "per=(4*pi)*(1e-07)\n",
+ "B=per*rel_per*H\n",
+ "flux=B*A\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnetic field strength is %.2f A/m.\" %(H)\n",
+ "print \"(b)The flux density is %.2f micro T.\" %(B*1000000)\n",
+ "print \"(c)The total flux is %.5f micro Wb.\" %(flux*1000000)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnetic field strength is 1333.33 A/m.\n",
+ "(b)The flux density is 1675.52 micro T.\n",
+ "(c)The total flux is 0.83776 micro Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2,Page number: 168\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetomotive force(mmf) required to produce flux.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "flux=0.015 #Flux across the air-gap(in Webers)\n",
+ "l=2.5e-03 #Length of the air-fap(in metres)\n",
+ "A=200e-04 #Effective area of the air-gap(in square-metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "abs_per=(4*pi)*(1e-07)\n",
+ "H=B/abs_per\n",
+ "mmf=H*l\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magneto motive force(mmf) required is %.2f At.\" %(mmf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magneto motive force(mmf) required is 1492.08 At.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3,Page number: 168\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reluctance of a mild-steel ring.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=200 #Number of turns in the coil\n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space \n",
+ "rel_per=380 #Relative permeability of mild-steel\n",
+ "l=400e-03 #Length(Circumference) of the mild-steel ring(in metres)\n",
+ "A=500e-06 #Cross-sectional area of the mild-steel ring(in square-metres)\n",
+ "flux=800e-06 #Flux in the ring(in Webers) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rel=l/(abs_per*rel_per*A)\n",
+ "mmf=flux*Rel\n",
+ "I=mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The reluctance of the ring is %6e A/Wb.\" %(Rel)\n",
+ "print \"(b)The magnetising current is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The reluctance of the ring is 1.675315e+06 A/Wb.\n",
+ "(b)The magnetising current is 6.70 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4,Page number: 171\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the coil to produce a flux density of 0.9 T in the air gap.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.90 #Flux Density in the air gap(in Tesla) \n",
+ "N=4000 #Number of turns in the core\n",
+ "l_core=220e-03 #Length of the core(in metres)\n",
+ "A_core=50e-06 #Cross-sectional area of the core(in square-metres)\n",
+ "H_core=820 #Magnetic field intensity of the core(in Ampere per metre) \n",
+ "l_gap=1e-03 #Length of the air-gap(in metres)\n",
+ "A_gap=50e-06 #Cross-sectional area of the air gap(in square-metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "mmf_core=H_core*l_core\n",
+ "abs_per=(4*pi*(1e-07))\n",
+ "H_gap=B/abs_per\n",
+ "mmf_air_gap=H_gap*l_gap\n",
+ "Total_mmf=mmf_core+mmf_air_gap\n",
+ "I=Total_mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnetisation current is %.5f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetisation current is 0.22415 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5,Page number: 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetising current required to produce a flux across the air gap.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "w=40e-03 #Width of the core(in metres)\n",
+ "d=50e-03 #Depth of the core(in metres)\n",
+ "lg=2.0e-03 #Length of the air gap(in metres)\n",
+ "Ag=2500e-06 #Area of the air gap(in square metres)\n",
+ "N=800 #Number of turns in the coil\n",
+ "flux=2.50e-03 #Flux across the air gap(in Webers)\n",
+ "lf=1.2 #Leakage Factor\n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(Henry per metre) \n",
+ "lc=600e-03 #Length of the core(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ac=w*d\n",
+ "Bg=flux/Ag\n",
+ "Hg=Bg/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "eff_Ac=0.92*Ac\n",
+ "flux_c=flux*lf\n",
+ "Bc=flux_c/eff_Ac\n",
+ "Hc=4000.0\n",
+ "mmf_c=Hc*lc\n",
+ "mmf=mmf_c+mmf_g\n",
+ "I=mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnetising current required to produce a flux of 0.0025 Wb across the air gap is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetising current required to produce a flux of 0.0025 Wb across the air gap is 4.99 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6,Page number: 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "lA=0.3 #Length of silicon steel material(in metres)\n",
+ "lB=0.2 #Length of low-carbon mild steel material(in metres)\n",
+ "lC=0.1 #Length of cast iron material(in metres)\n",
+ "N=100 #Number of turns in the exciting coil\n",
+ "A=0.001 #Cross-sectional area(in square-metres)\n",
+ "flux=600e-06 #Flux in the coil(in Webers)\n",
+ "abs_per=(4*pi)*(1e-07)#Absolute permeability of free space(in Henry per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "B_A=B\n",
+ "B_C=B\n",
+ "B_C=B\n",
+ "\"\"\"From magnetisation characteristics of ferromagnetic materials,\"\"\"\n",
+ "H_A=20.0\n",
+ "H_B=700.0\n",
+ "H_C=2500.0\n",
+ "\"\"\"According to Kirchoff's magnetomotive force law(KML),the total mmf required, tot_mmf= mmf_A+mmf_B+mmf_C.\"\"\"\n",
+ "tot_mmf=(H_A*lA)+(H_B*lB)+(H_C*lC)\n",
+ "I=tot_mmf/N\n",
+ "rel_A=B/(abs_per*H_A)\n",
+ "rel_B=B/(abs_per*H_B)\n",
+ "rel_C=B/(abs_per*H_C)\n",
+ "R_A=(H_A*lA)/flux\n",
+ "R_B=(H_B*lB)/flux\n",
+ "R_C=(H_C*lC)/flux\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The mmf for setting up a flux of 600 micro Weber is %.2f At.\" %(tot_mmf)\n",
+ "print \"(b)The current in the coil is %.2f A.\" %(I)\n",
+ "print \"(c)The relative permeability of:\\n Material A: %.2f\\n Material B: %.2f\\n Material C: %.2f.\\n\" %(rel_A,rel_B,rel_C)\n",
+ "print \" The reluctances are :\\n R_A=%.2f At/Wb \\n R_B=%.2f At/Wb \\n R_C=%.2f At/Wb.\" %(R_A,R_B,R_C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The mmf for setting up a flux of 600 micro Weber is 396.00 At.\n",
+ "(b)The current in the coil is 3.96 A.\n",
+ "(c)The relative permeability of:\n",
+ " Material A: 23873.24\n",
+ " Material B: 682.09\n",
+ " Material C: 190.99.\n",
+ "\n",
+ " The reluctances are :\n",
+ " R_A=10000.00 At/Wb \n",
+ " R_B=233333.33 At/Wb \n",
+ " R_C=416666.67 At/Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7,Page number: 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the exciting coil.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=300 #Number of the turns in the exciting coil\n",
+ "flux=600e-06 #Flux in the air gap(in Webers)\n",
+ "lg=1e-03 #Length of the air gap(in metres)\n",
+ "lc=40e-02 #Mean length of the core(in metres)\n",
+ "A=4e-04 #Cross sectional area of the core(in square metres)\n",
+ "abs_per=(4*pi)*1e-07 #Absolute permeability of free space(in Henry per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "Hg=B/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "mmf_c=3000*lc\n",
+ "mmf=mmf_g+mmf_c\n",
+ "I=mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current in the exciting coil to set up a flux of 600 micro Weber in the air gap is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current in the exciting coil to set up a flux of 600 micro Weber in the air gap is 7.98 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8,Page number: 175 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the exciting coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l1=10e-02 #Length of first side of the magnetic circuit(in metres)\n",
+ "l2=18e-02 #Length of second side of the magnetic circuit(in metres)\n",
+ "l3=18e-02 #Length of third side of the magnetic circuit(in metres)\n",
+ "A1=6.25e-04 #Cross sectional area of l1 path(in square-metre) \n",
+ "A2=3.00e-04 #Cross sectional area of l2 path(in square-metre)\n",
+ "A3=3.00e-04 #Cross sectional area of l3 path(in square-metre)\n",
+ "lg=2e-03 #Length of air gap(in metres)\n",
+ "rel_per=800.0 #Relative permeability of core material\n",
+ "N=600 #Number of turns\n",
+ "flux=100e-06 #Flux in the air gap(in Webers)\n",
+ "abs_per=(4*pi)*1e-07 #Absolute permeability of free space(in Farad per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Bg=flux/A1\n",
+ "Hg=Bg/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "B1=Bg\n",
+ "H1=B1/(rel_per*abs_per)\n",
+ "mmf_1=H1*l1\n",
+ "flux2=flux/2.0\n",
+ "B2=flux2/A2\n",
+ "H2=B2/(rel_per*abs_per)\n",
+ "mmf_2=H2*l2\n",
+ "tot_mmf=mmf_g+mmf_1+mmf_2\n",
+ "I=tot_mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current in the 600 turn exciting coil is %.3f A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current in the 600 turn exciting coil is 0.501 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9,Page number: 176 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of exciting current.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A_B=0.01 #Area of cross section of limb B(in square metre)\n",
+ "A_C=0.02 #Area of cross section of limb C(in square metre)\n",
+ "l_B=1e-03 #Length of air gap in limb B(in metres)\n",
+ "l_C=2e-03 #Length of air gap in limb C(in metres)\n",
+ "flux_B=1.5e-03 #Flux in limb B(in Webers)\n",
+ "N=500 #Number of turns in the coil\n",
+ "abs_per=(4*pi)*(1e-07)#Absolute permeability of free space(in Henry per metre) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"The mmf across parallel paths must be same. \n",
+ " (R_B*flux_B)=(R_C*flux_C);\"\"\"\n",
+ "flux_C=flux_B*(l_B/l_C)*(A_C/A_B)\n",
+ "flux=flux_B+flux_C\n",
+ "R_B=l_B/(abs_per*A_B)\n",
+ "R_C=l_C/(abs_per*A_C)\n",
+ "R_net=1.0/((1.0/R_B)+(1.0/R_C))\n",
+ "I=(flux*R_net)/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The flux in limb A is %e Wb.\" %(flux)\n",
+ "print \"The current in the exciting coil is %e A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flux in limb A is 3.000000e-03 Wb.\n",
+ "The current in the exciting coil is 2.387324e-01 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10,Page number: 177 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the ampere turns required to produce a flux.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "D=21e-02 #Mean diameter of the ring(in metres)\n",
+ "A=10e-04 #Cross sectional area(in square metre)\n",
+ "flux=0.8e-03 #Flux to be produced(in Webers)\n",
+ "lg=0.4e-03 #Length of the air gap(in metres) \n",
+ "rel_i=166.0 #Relative permeability of iron\n",
+ "rel_s=800.0 #Relative permeability of steel\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "li=(pi*D)/2.0\n",
+ "ls=(pi*D)/2.0\n",
+ "mmf_g=(B/abs_per)*lg\n",
+ "mmf_i=(B/(abs_per*rel_i))*li\n",
+ "mmf_s=(B/(abs_per*rel_s))*ls\n",
+ "mmf=mmf_g+mmf_i+mmf_s\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total ampere turns required is %.2f At.\" %(mmf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total ampere turns required is 1782.21 At.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11,Page number: 177 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the ampere turns of the coil wound on the central limb.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "flux=1e-03 #Flux in the central limb(in Webers)\n",
+ "Ac=8e-04 #Area of the central limb(in square metres)\n",
+ "As=5e-04 #Area of each side limb(in square metres)\n",
+ "l=0.15 #Length of the central limb(in metres)\n",
+ "lg=0.001 #Length of the air gap(in metres)\n",
+ "abs_per=(4*pi)*1e-07 #Absolute permeability of free space(in Henry per metre)\n",
+ "l1=0.34 #Length of the part ABCD(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/Ac\n",
+ "\"\"\"Corresponding to this value of B, H is 500 At/m from the table.\"\"\"\n",
+ "mmf_DG=500*l\n",
+ "Hg=1.25/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "B1=(flux/2.0)/As\n",
+ "\"\"\"Corresponding to this value of B, H is 200 At/m from the table.\"\"\"\n",
+ "mmf_1=200*l1\n",
+ "mmf_tot=mmf_DG+mmf_g+mmf_1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required ampere turns of the coil wound on the central limb is %.2f At.\" %(mmf_tot)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required ampere turns of the coil wound on the central limb is 1137.72 At.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter7.ipynb b/Basic_Electrical_Engineering/Chapter7.ipynb
new file mode 100755
index 00000000..acf4ea53
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter7.ipynb
@@ -0,0 +1,975 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: SELF AND MUTUAL INDUCTANCES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1,Page number: 184\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf induced in a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=4 #Self inductance of the coil(in Henry) \n",
+ "di=4-10 #Change in current(in Amperes)\n",
+ "dt=0.1 #Time interval(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "e=-L*(di/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the coil is 240.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2,Page number: 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=150 #Number of turns in the coil \n",
+ "flux=0.01 #Flux linked with the coil(in Webers)\n",
+ "I=10 #Current in the coil(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=(N*flux)/I\n",
+ "di=-10-(10)\n",
+ "dt=0.01\n",
+ "e=-L*(di/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inductance of the coil is %.2f H.\" %(L)\n",
+ "print \"The induced emf is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inductance of the coil is 0.15 H.\n",
+ "The induced emf is 300.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3,Page number: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of the coil and the emf induced.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=100 #Number of turns in the coil\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "dflux=-0.4-0.4\n",
+ "di=-10-10\n",
+ "L=N*(dflux/di)\n",
+ "dt=0.01\n",
+ "e=-(L*(di/dt))/1000\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inductance of the coil is %.2f mH.\" %(L)\n",
+ "print \"The induced emf is %.2f V.\" %(e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inductance of the coil is 4.00 mH.\n",
+ "The induced emf is 8.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4,Page number: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in an air-cored solenoid.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "\"\"\" All quantities expresssed in SI System.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=0.30 #Length of the solenoid(in metres) \n",
+ "d=0.015 #Internal diameter of the solenoid(in metres) \n",
+ "r=0.0075 #Internal radius of the solenoid(in metres)\n",
+ "N=900 #Number of turns in the coil \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A=pi*pow(r,2)\n",
+ "L=(pow(N,2)*4*pi*A)/(0.30*10000000)\n",
+ "I=5\n",
+ "W=0.5*L*pow(I,2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inductance of the air-cored solenoid is %.2f mH.\" %(L*1000)\n",
+ "print \"The amount of energy stored in the air-cored solenoid is %.2f mJ.\" %(W*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inductance of the air-cored solenoid is 0.60 mH.\n",
+ "The amount of energy stored in the air-cored solenoid is 7.49 mJ.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5,Page number: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the relative permeability of iron and the inductance of a coil.\"\"\"\n",
+ "\n",
+ "from math import pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "r=0.01 #Radius of circular ring(in metres)\n",
+ "A=pi*pow(r,2) #Area of circular ring(in square metres) \n",
+ "N=3000 #Number of turns in the coil \n",
+ "I=0.5 #Current in the coil(in Amperes)\n",
+ "l=20.0/100 #Length of the iron rod(in metres) \n",
+ "B=1.2 #Magnitude of magnetic field(in Tesla)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "H=(N*I)/l\n",
+ "per=B/H\n",
+ "rel_per=(per*10000000)/(4*pi)\n",
+ "L=(N*B*A)/I\n",
+ "dflux=(0.1-1)*A*B\n",
+ "dt=0.01\n",
+ "e=-N*(dflux/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The permeability of iron is %e Tm/A.\" %(per)\n",
+ "print \"(b)The relative permeability of iron is %d.\" %(rel_per)\n",
+ "print \"(c)The inductance of the coil is %.2f H.\" %(L)\n",
+ "print \"(d)The voltage in the coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The permeability of iron is 1.600000e-04 Tm/A.\n",
+ "(b)The relative permeability of iron is 127.\n",
+ "(c)The inductance of the coil is 2.26 H.\n",
+ "(d)The voltage in the coil is 101.79 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6,Page number: 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential difference across the terminals of a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3 #Resistance of the coil(in Ohms)\n",
+ "i=1 #Current in the coil(in Amperes)\n",
+ "di=10000 #Change in current(in Amperes) \n",
+ "dt=1 #Time interval(in seconds)\n",
+ "L=0.1/1000 #Self inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=(i*R)+(L*(di/dt))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The potential difference that exists across the terminals of the coil is %.2f V.\" %(V) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential difference that exists across the terminals of the coil is 4.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7,Page number: 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and emf induced in a search coil.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=2000 #Number of turns in the solenoid \n",
+ "N2=500 #Number of turns in the search coil\n",
+ "l=0.70 #Length of the solenoid(in metres) \n",
+ "k=1 #Coefficient of coupling\n",
+ "A=30.0/10000 #Mean area of the search coil(in square metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "per=(4*pi)/10000000.0\n",
+ "M=(k*N1*N2*per*A)/l\n",
+ "di1=260.0\n",
+ "dt=1\n",
+ "e=M*(di1/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The mutual inductance is %.4f mH.\" %(M*1000)\n",
+ "print \"(b)The emf induced in the search coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The mutual inductance is 5.3856 mH.\n",
+ "(b)The emf induced in the search coil is 1.40 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8,Page number: 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the coefficient of coupling between two coils.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=600.0 #Number of turns in the first coil\n",
+ "N2=1700.0 #Number of turns in the second coil \n",
+ "flux2=0.8/1000 #Magnetic flux produced in the second coil(in Webers) \n",
+ "I2=6 #Current in the second coil(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L2=(N2*flux2)/I2\n",
+ "L1=L2*pow((N1/N2),2)\n",
+ "flux21=0.5/1000\n",
+ "k=flux21/flux2\n",
+ "M=k*sqrt(L1*L2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"L1=%.4f H.\" %(L1)\n",
+ "print \"L2=%.4f H.\" %(L2)\n",
+ "print \"The coefficient of coupling(k)=%.4f.\" %(k) \n",
+ "print \"M=%.4f H.\" %(M)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L1=0.0282 H.\n",
+ "L2=0.2267 H.\n",
+ "The coefficient of coupling(k)=0.6250.\n",
+ "M=0.0500 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9,Page number: 189 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the coefficient of coupling between two coils.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=1200.0 #Number of turns in the first coil \n",
+ "flux1=0.25/1000 #Magnetic flux produced in the first coil(in Webers) \n",
+ "I1=5 #Current in the first coil(in Amperes)\n",
+ "N2=800.0 #Number of turns in the second coil\n",
+ "flux2=0.15/1000 #Magnetic flux produced in the second coil(in Webers)\n",
+ "I2=5 #Current in the second coil(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=(N1*flux1)/I1\n",
+ "L2=(N2*flux2)/I2\n",
+ "k=0.6\n",
+ "flux12=k*flux1\n",
+ "M=(N2*flux12)/I1\n",
+ "k_new=M/sqrt(L1*L2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mutual inductance(M) is %.4f H.\" %(M)\n",
+ "print \"The coefficient of coupling is %.4f.\" %(k_new)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mutual inductance(M) is 0.0240 H.\n",
+ "The coefficient of coupling is 0.6325.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10,Page number: 192 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the coefficient of coupling between two coils.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Lsa=1.4/1000 #Net inductance in series-aiding connections(in Henry) \n",
+ "Lso=0.6/1000 #Net inductance in series-opposing connections(in Henry) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=(Lsa-Lso)/4\n",
+ "\"\"\"Lsa=L1+L2+2M \n",
+ " L1+L2=1 mH; As the two coils are similar L1=L2=0.5mH \"\"\"\n",
+ "L1=0.5/1000\n",
+ "L2=0.5/1000\n",
+ "k=M/sqrt(L1*L2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mutual inductance is %.2f mH.\" %(M*1000)\n",
+ "print \"The coefficient of coupling(k) is %.2f.\" %(k)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mutual inductance is 0.20 mH.\n",
+ "The coefficient of coupling(k) is 0.40.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11,Page number: 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the self-inductances of two coils. \"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "\"\"\" Equation 1 is L1+L2+(2*M)=1.8;\n",
+ " \n",
+ " Equation 2 is L1+L2-(2*M)=0.8. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=0.6 #Coefficient of coupling\n",
+ "eq1=1.8 #Net inductance when fluxes are in same direction(in Henry)\n",
+ "eq2=0.8 #Net inductance when fluxes are in opposite direction(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=(eq1-eq2)/4\n",
+ "sum=(eq1+eq2)/2\n",
+ "product=(M*M)/(k*k)\n",
+ "diff=sqrt((sum*sum)-(4*product))\n",
+ "L1=(sum+diff)/2\n",
+ "L2=(sum-diff)/2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mutual inductance of the two coils is %.3f H.\" %(M)\n",
+ "print \"The self inducatnce of the first coil is %.3f H and the self inductance of the second coil is %.3f H.\" %(L1,L2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mutual inductance of the two coils is 0.250 H.\n",
+ "The self inducatnce of the first coil is 1.149 H and the self inductance of the second coil is 0.151 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12,Page number:195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent inductance of a combination of inductances connected in parallel.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=0.433 #Coefficient of coupling \n",
+ "L1=8 #Self-inductance of the first coil \n",
+ "L2=6 #Self-inductance of the second coil\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=k*sqrt(L1*L2)\n",
+ "Lpa=((L1*L2)-(M*M))/(L1+L2-(2*M))\n",
+ "Lpo=((L1*L2)-(M*M))/(L1+L2+(2*M))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equivalent inductance such that the mutual induction assists the self induction is %.3f H.\" %(Lpa)\n",
+ "print \"(b)The equivalent inductance such that the mutual induction opposes the self induction is %.3f H.\" %(Lpo) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equivalent inductance such that the mutual induction assists the self induction is 4.875 H.\n",
+ "(b)The equivalent inductance such that the mutual induction opposes the self induction is 1.950 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13,Page number: 196 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of turns in an air-cored coil.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=2.5e-02 #Length of the coil(in metres)\n",
+ "A=2e-04 #Average cross-sectional area of the coil(in square-metres)\n",
+ "L=400e-06 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "N=sqrt((L*l)/(abs_per*A))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of turns in the air-cored coil is %d.\" %(round(N,0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of turns in the air-cored coil is 199.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14,Page number: 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance between two coils and their self inductances.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=0.75 #Coefficient of coupling between two coils\n",
+ "I1=3.0 #Current in the first coil(in Amperes)\n",
+ "N1=250.0 #Number of turns in the first coil\n",
+ "flux1=4e-03 #Flux produced in the first coil(in Webers)\n",
+ "V2=70.0 #Voltage induced in the second coil due to first coil(in Volts)\n",
+ "di1=3.0 #Change in current in the first coil(in Amperes)\n",
+ "dt=3e-03 #Time interval(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=N1*(flux1/I1)\n",
+ "M=(V2*dt)/di1\n",
+ "L2=(M*M)/(k*k*L1)\n",
+ "N2=N1*sqrt(L2/L1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"L1=%.4f H.\" %(L1)\n",
+ "print \"L2=%.4f H.\" %(L2)\n",
+ "print \"M=%.4f H.\" %(M)\n",
+ "print \"N2=%d.\" %(round(N2,0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L1=0.3333 H.\n",
+ "L2=0.0261 H.\n",
+ "M=0.0700 H.\n",
+ "N2=70.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.15,Page number: 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mean value of self inductance of a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=1000.0 #Number of turns in the coil\n",
+ "A=20e-04 #Cross-sectional area of the coil(in square-metre)\n",
+ "I1=4.0 #First current(in Amperes)\n",
+ "B1=1.0 #Flux density associated with the first current(in Weber per sqyare-metre) \n",
+ "I2=9.0 #Second current(in Amperes)\n",
+ "B2=1.4 #Flux density associated with the first current(in Weber per sqyare-metre)\n",
+ "dt=0.05 #Time interval(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=(N*B1*A)/I1\n",
+ "L2=(N*B2*A)/I2\n",
+ "L=(L1+L2)/2.0\n",
+ "di=I2-I1\n",
+ "e=L*(di/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mean value of inductance between the given current limits is %.4f H.\" %(L)\n",
+ "print \"The emf induced in the coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean value of inductance between the given current limits is 0.4056 H.\n",
+ "The emf induced in the coil is 40.56 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.16,Page number: 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance between two coils and their respective self-inductances.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=100.0 #Number of turns in the first coil\n",
+ "N2=150.0 #Number of turns in the second coil\n",
+ "A=125e-04 #Area of cross-section(in square-metres)\n",
+ "l=200e-02 #Mean length(in metres)\n",
+ "rel_per=2000.0 #Relative permeability of iron\n",
+ "k=1 #Coefficient of coupling\n",
+ "\n",
+ "\"\"\" NOTE: As the two coils are wound side by side,there is tight coupling. Therefore, k=1. \"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "L1=(N1*N1*rel_per*abs_per*A)/l\n",
+ "L2=(N2*N2*rel_per*abs_per*A)/l\n",
+ "M=k*sqrt(L1*L2)\n",
+ "di1=5.0\n",
+ "dt=0.02\n",
+ "e2=M*(di1/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The self inductances of the tow coils are: L1=%.3f mH and L2=%.3f mH.\" %((L1*1000.0),(L2*1000.0))\n",
+ "print \"(b)The mutual inductance between the two coils is %.3f mH.\" %(M*1000.0)\n",
+ "print \"(c)The emf induced in the second coil is %.2f V.\" %(e2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The self inductances of the tow coils are: L1=157.080 mH and L2=353.429 mH.\n",
+ "(b)The mutual inductance between the two coils is 235.619 mH.\n",
+ "(c)The emf induced in the second coil is 58.90 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.17,Page number: 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the coeffcient of coupling and the self-inductance of two coils.\"\"\" \n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Lsa=4.0 #Equivalent inductance of series aiding(in Henry)\n",
+ "Lso=0.8 #Equivalent inductance of series opposing(in Henry)\n",
+ "\n",
+ "\"\"\" NOTE: Lsa=L+L+(2*M);\n",
+ " Lso=L+L-(2*M); \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=(Lsa+Lso)/4.0\n",
+ "M=(Lsa-Lso)/4.0\n",
+ "k=M/sqrt(L*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The self inductance of each coil is %.2f H.\" %(L)\n",
+ "print \"The coefficient of coupling is %.3f.\" %(round(k,3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The self inductance of each coil is 1.20 H.\n",
+ "The coefficient of coupling is 0.667.\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.18,Page number: 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent inductance of different combinations of two coils.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L1=200e-03 #Self-inductance of the first coil(in Henry) \n",
+ "L2=800e-03 #Self-inductance of the second coil(in Henry)\n",
+ "k=0.5 #Coefficient of coupling between two coils\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=k*sqrt(L1*L2)\n",
+ "Lsa=L1+L2+(2*M)\n",
+ "Lso=L1+L2-(2*M)\n",
+ "Lpa=((L1*L2)-(M*M))/Lso\n",
+ "Lpo=((L1*L2)-(M*M))/Lsa\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equivalent inductance of series aiding is %.3f mH.\" %(Lsa*1000.0)\n",
+ "print \"(b)The equivalent inductance of series opposing is %.3f mH.\" %(Lso*1000.0)\n",
+ "print \"(c)The equivalent inductance of parallel aiding is %.3f mH.\" %(Lpa*1000.0)\n",
+ "print \"(d)The equivalent inductance of parallel opposing is %.3f mH.\" %(Lpo*1000.0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equivalent inductance of series aiding is 1400.000 mH.\n",
+ "(b)The equivalent inductance of series opposing is 600.000 mH.\n",
+ "(c)The equivalent inductance of parallel aiding is 200.000 mH.\n",
+ "(d)The equivalent inductance of parallel opposing is 85.714 mH.\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.19,Page number: 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the exciting current for a horse-shoe magnet.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=45e-02 #Length of the iron path(in metres)\n",
+ "A=6e-04 #Cross-sectional area of the wrought iron bar(in square-metres)\n",
+ "N=500.0 #Number of turns in exciting coil\n",
+ "load=60.0 #Load to be lifted(in kilograms)\n",
+ "rel_per=800.0 #Relative permeability of iron\n",
+ "g=9.8 #Accelaration due to gravity(in metre per square-seconds) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "F=(load/2.0)*g\n",
+ "B=sqrt((2*abs_per*F)/A)\n",
+ "H=B/(abs_per*rel_per)\n",
+ "At=H*l\n",
+ "I=At/(N*2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The exciting current needed for the magnet is %.5f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The exciting current needed for the magnet is 0.49674 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter8.ipynb b/Basic_Electrical_Engineering/Chapter8.ipynb
new file mode 100755
index 00000000..b22550d5
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter8.ipynb
@@ -0,0 +1,1188 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: DC TRANSIENTS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1,Page number: 207 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current i(0+)=I0.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=24 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Req=20+(1.0/((1.0/20)+(1.0/10)))\n",
+ "I=V/Req\n",
+ "I_L=I*(20.0/(20+10))\n",
+ "Io=I_L\n",
+ "i_0_plus=Io\n",
+ "R=20\n",
+ "v_R=(-Io)*R\n",
+ "R1=(20+10)\n",
+ "v_L=Io*R1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current i(0+)=Io=%.2f A.\" %(i_0_plus)\n",
+ "print \"(b)The magnitude of v_R across the 20 Ohms resistor at the instant just after the switch is opened is %.2f V.\" %(v_R)\n",
+ "print \"(c)The magnitude of v_L across the inductor immediately after the switch is opened is %.2f V.\" %(v_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current i(0+)=Io=0.60 A.\n",
+ "(b)The magnitude of v_R across the 20 Ohms resistor at the instant just after the switch is opened is -12.00 V.\n",
+ "(c)The magnitude of v_L across the inductor immediately after the switch is opened is 18.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2,Page number: 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding i(0),the power being absorbed by the inductor at t=1 s.\"\"\"\n",
+ "\n",
+ "from math import e,pow,sqrt,log\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=1.6 #Self-inductance of the inductor(in Henry)\n",
+ "R=0.8 #Resistance of the resistor(in Ohms)\n",
+ "t=-1.0 #Instant of time(in seconds) \n",
+ "i_minus_1=20.0 #Current at t=1 seconds(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "Io=i_minus_1/pow(e,(-t/time_const))\n",
+ "t=1\n",
+ "i_t=Io*pow(e,(-t/time_const))\n",
+ "p_t=i_t*i_t*R\n",
+ "W=100.0\n",
+ "i_t1=sqrt((2*W)/L)\n",
+ "t=-(log(i_t1/Io))*time_const\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)i(0) = %.3f A.\" %(Io)\n",
+ "print \"(b)The power absorbed by the resistor is %.2f W. \" %(p_t) \n",
+ "print \" The inductor by virtue of the emf induced in it,supplies this power to the resistor.\"\n",
+ "print \" Therefore,the power absorbed by the inductor is %.2f W.\" %(-p_t)\n",
+ "print \"(c)The time at which the energy stored in the inductor is 100J is %.5f seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)i(0) = 12.131 A.\n",
+ "(b)The power absorbed by the resistor is 43.31 W. \n",
+ " The inductor by virtue of the emf induced in it,supplies this power to the resistor.\n",
+ " Therefore,the power absorbed by the inductor is -43.31 W.\n",
+ "(c)The time at which the energy stored in the inductor is 100J is 0.16315 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3,Page number: 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of current in the circuit at an instant 0.4 s after the switch has been closed.\"\"\"\n",
+ "\n",
+ "from math import e,pow,log\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=14.0 #Self-inductance of the inductor(in Henry)\n",
+ "R=10.0 #Resistance of the resistor(in Ohms)\n",
+ "V=140.0 #Supply Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "t=0.4\n",
+ "Io=V/R\n",
+ "i=Io*(1-pow(e,(-t/time_const)))\n",
+ "i_t=8\n",
+ "t=-time_const*log(i_t/Io)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of current in the circuit at an instant 0.4 s after the switch has been closed is %.3f A.\" %(i)\n",
+ "print \"(b)The time taken for the current to drop to 8 A after the switch is opened is %.4f seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of current in the circuit at an instant 0.4 s after the switch has been closed is 3.479 A.\n",
+ "(b)The time taken for the current to drop to 8 A after the switch is opened is 0.7835 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4,Page number: 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnitude of the inductor current at t=0- and at t=0+.\"\"\"\n",
+ "\n",
+ "from math import pow,e\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=40e-03 #Self-inductance of the inductor(in Henry)\n",
+ "R=80.0 #Resistance of the resistor(in Ohm) \n",
+ "V1=20.0 #Supply voltage-1(in Volts) \n",
+ "V2=40.0 #Supply voltage-2(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "I_01=V1/R\n",
+ "i_0_minus=I_01\n",
+ "i_0_plus=I_01\n",
+ "I_02=(V1+V2)/R\n",
+ "t=1e-03\n",
+ "i_t=I_01+(I_02-I_01)*(1-pow(e,(-t/time_const)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnitude of inductor current at t=0- is %.2f A.\" %(i_0_minus)\n",
+ "print \"(b)The magnitude of inductor current at t=0+ is %.2f A.\" %(i_0_plus)\n",
+ "print \"(c)As t tends to infinity,the current approaches its final steady-state value given as %.2f A.\" %(I_02)\n",
+ "print \"(d)The magnitude of inductor current at t=1 ms is %.3f A.\" %(i_t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnitude of inductor current at t=0- is 0.25 A.\n",
+ "(b)The magnitude of inductor current at t=0+ is 0.25 A.\n",
+ "(c)As t tends to infinity,the current approaches its final steady-state value given as 0.75 A.\n",
+ "(d)The magnitude of inductor current at t=1 ms is 0.682 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5,Page number: 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding i_L(0-),i2(0-),i_L(0+),i_L(20 ms) and i_2(20 ms).\"\"\"\n",
+ "\n",
+ "from math import e,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=20.0 #Source Voltage(in Volts)\n",
+ "R1=20.0 #Resistance of resistor-1(in Ohms)\n",
+ "R2=40.0 #Resistance of resistor-2(in Ohms)\n",
+ "R3=30.0 #Resistance of resistor-3(in Ohms)\n",
+ "R4=25.0 #Resistance of resistor-4(in Ohms)\n",
+ "R5=5.0 #Resistance of resistor-5(in Ohms)\n",
+ "L=2.0 #Self-inductance of inductor(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=V/(R4+R5)\n",
+ "i_L_0_minus=Io\n",
+ "i_2_0_minus=V/R3\n",
+ "i_L_0_plus=Io\n",
+ "R_45=R4+R5\n",
+ "R_12=R1+R2\n",
+ "Req=R_45+(1/((1/R_12)+(1/R3)))\n",
+ "time_const=L/Req\n",
+ "t=20e-03\n",
+ "i_L_t=Io*pow(e,(-t/time_const))\n",
+ "i_2_t=-i_L_t*(R_12/(R_12+R3))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)i_L(0-) = %.3f A.\" %(i_L_0_minus)\n",
+ "print \"(b)i_2(0-) = %.3f A.\" %(i_2_0_minus)\n",
+ "print \"(c)i_L(0+) = %.3f A.\" %(i_L_0_plus)\n",
+ "print \"(d)i_L(20 ms) = %.3f A.\" %(i_L_t)\n",
+ "print \"(e)i_2(20 ms) = %.3f A.\" %(i_2_t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)i_L(0-) = 0.667 A.\n",
+ "(b)i_2(0-) = 0.667 A.\n",
+ "(c)i_L(0+) = 0.667 A.\n",
+ "(d)i_L(20 ms) = 0.404 A.\n",
+ "(e)i_2(20 ms) = -0.270 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6,Page number: 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding v(0+),i(0+) and time constant.\"\"\"\n",
+ "\n",
+ "from math import e,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=1.5e03 #Resistance of the resistor(in Ohms) \n",
+ "C=5e-06 #Capacitance of the capacitor(in Farad)\n",
+ "Vo=3.0 #Source Voltage(in Volts)\n",
+ "v_0_plus=0 #Voltage across capacitor at t=0+(in Volts) \n",
+ "v_0_minus=0 #Voltage across capacitor at t=0-(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=Vo/R\n",
+ "i_0_plus=Io\n",
+ "time_const=R*C\n",
+ "t=15e-03\n",
+ "v=Vo*(1-pow(e,(-t/time_const))) \n",
+ "i=Io*pow(e,(-t/time_const))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=%d V.\" %(v_0_plus)\n",
+ "print \"(b)i(0+)= %.3f mA.\" %(i_0_plus*1000)\n",
+ "print \"(c)The time constant is %.2f ms.\" %(time_const*1000)\n",
+ "print \"(d)At t=15 ms, \\n v=%.5f V. \\n i=%.4f mA.\" %(v,(i*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=0 V.\n",
+ "(b)i(0+)= 2.000 mA.\n",
+ "(c)The time constant is 7.50 ms.\n",
+ "(d)At t=15 ms, \n",
+ " v=2.59399 V. \n",
+ " i=0.2707 mA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7,Page number: 216\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding v(0+),i(0+) and time constant.\"\"\"\n",
+ "\n",
+ "from math import e,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=100 #Resistance of the resistor(in Ohms)\n",
+ "C=5e-06 #Capacitance of the capacitor(in Farads) \n",
+ "Vo=3.0 #Source Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v_0_plus=Vo\n",
+ "v_0_minus=Vo\n",
+ "Io=Vo/R\n",
+ "i_0_plus=-Io\n",
+ "time_const=R*C\n",
+ "t=1.2e-03\n",
+ "v=Vo*pow(e,(-t/time_const)) \n",
+ "i=-Io*pow(e,(-t/time_const))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=%d V.\" %(v_0_plus)\n",
+ "print \"(b)At t=0+, the capacitor behaves as a voltage source of emf Vo. Hence, i(0+)= -Io = %.3f mA.\" %(i_0_plus*1000)\n",
+ "print \"(c) The time constant is %.2f ms.\" %(time_const*1000)\n",
+ "print \"(d)At t=1.2 ms, \\n v=%.5f V. \\n i=%.4f mA.\" %(v,(i*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=3 V.\n",
+ "(b)At t=0+, the capacitor behaves as a voltage source of emf Vo. Hence, i(0+)= -Io = -30.000 mA.\n",
+ "(c) The time constant is 0.50 ms.\n",
+ "(d)At t=1.2 ms, \n",
+ " v=0.27215 V. \n",
+ " i=-2.7215 mA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8,Page number: 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current i(t) for t>0 seconds.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" R_Th=(1+10)kilo ohm || (1 kiloohm) \"\"\" #Thevenin's Equivalent Resistance(in Ohms) \n",
+ "\n",
+ "print(\"Note: All currents expressed in mA \\n\")\n",
+ "R_Th=1.0/((1.0/11000)+(1.0/1000))\n",
+ "C=10e-06\n",
+ "time_const=R_Th*C\n",
+ "v_C_0_minus=30.0*((1e03)/((1e03)+(1e03)))\n",
+ "\n",
+ "\"\"\" Applying KVL, 30-(i_0_plus*(1 kilo ohm))-15=0 \"\"\"\n",
+ "\n",
+ "i_0_plus=(30-15)/1.0\n",
+ "i_infinity=30.0/(1+1+10)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"i(t)= (%.1f + (%.1f-%.1f)*(e to the power -t/%.2f ms)) mA.\" %(i_infinity,i_0_plus,i_infinity,(time_const*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Note: All currents expressed in mA \n",
+ "\n",
+ "i(t)= (2.5 + (15.0-2.5)*(e to the power -t/9.17 ms)) mA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9,Page number: 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current at t=1 seconds.\"\"\"\n",
+ "\n",
+ "from math import exp,log\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3.0 #Resistance of the coil(in Ohms)\n",
+ "time_const=1.8 #Time constant of the coil(in seconds)\n",
+ "V=10.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=time_const*R\n",
+ "i_0_plus=0\n",
+ "I0=V/R\n",
+ "i=I0*(1-exp((-1/time_const)))\n",
+ "t=(log(0.5,e))*(-1.8)\n",
+ "growth=V/L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current at t=1 seconds is given as %.2f A.\" %(i)\n",
+ "print \"(b)The time at which current attains half of its final value is %.2f seconds.\" %(t)\n",
+ "print \"(c)The initial rate of growth of current is %.2f A/s.\" %(growth)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current at t=1 seconds is given as 1.42 A.\n",
+ "(b)The time at which current attains half of its final value is 1.25 seconds.\n",
+ "(c)The initial rate of growth of current is 1.85 A/s.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10,Page number: 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of current during a sudden change.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"If I0 is the final steady-state value of current,at t=1 s, we have\n",
+ " \n",
+ " i=Io*(1-exp(-1/time_const)) or (0.741*Io)=Io*(1-exp(-1/time_const));\n",
+ " \n",
+ " exp(-1/time_const)=0.259;\n",
+ " \n",
+ " During the decay of current,we have i(t)=Io*exp(-1/time_const); \n",
+ " \n",
+ " Therefore, at t=1s, we have\n",
+ " \n",
+ " i1=0.259*Io.\n",
+ " \n",
+ " Therefore the value of current in the circuit is 0.259 times the steady state value.\"\"\"\n",
+ "k=1-0.741\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of current in the circuit is %.3f times the steady state value.\" %(k)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of current in the circuit is 0.259 times the steady state value.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.11,Page number: 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the circuit at t=0.6 s.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=120.0 #Supply dc voltage(in Volts)\n",
+ "R=20.0 #Resistance of the resistor(in Ohms)\n",
+ "L=8.0 #Inductance of the inductor(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "Io=V/R\n",
+ "i=Io*(1-exp(-0.6/time_const))\n",
+ "\"\"\"The voltage drop across R,v_R=i*r=Io*(1-exp(-t/time_const))*R;\n",
+ " The voltage drop across L,v_L=L*(di/dt)=((L*Io)/time_const)*exp(-t/time_const); \n",
+ " \n",
+ " We are to find the time at which these two voltage-drops are same. \"\"\"\n",
+ "t=-time_const*log(0.5,e)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the circuit at t=0.6 s is %.2f A.\" %(i)\n",
+ "print \"(b)The time at which the voltage drops across R and L are same is %.3f s.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the circuit at t=0.6 s is 4.66 A.\n",
+ "(b)The time at which the voltage drops across R and L are same is 0.277 s.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.12,Page number: 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in the magnetic field.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=30.0 #Supply dc voltage(in Volts)\n",
+ "R=12.0 #Resistance of the resistor(in Ohms)\n",
+ "L=18.0 #Inductance of the inductor(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "rate_curr=V/L\n",
+ "Io=V/R\n",
+ "i1=(V/R)*(1-exp(-3.0/time_const))\n",
+ "W1=0.5*i1*i1*L\n",
+ "Wlost=(0.5*L*Io*Io)-W1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The time constant is %.2f seconds.\" %(time_const)\n",
+ "print \"(b)The initial rate of change of current is %.3f A/s.\" %(rate_curr)\n",
+ "print \"(c)The current at t=3 s is %.2f A.\" %(i1)\n",
+ "print \"(d)The energy stored in the magnetic field at t=3 s is %.3f J.\" %(W1)\n",
+ "print \"(e)The energy lost as heat till t=3 s is %.3f J.\" %(Wlost)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The time constant is 1.50 seconds.\n",
+ "(b)The initial rate of change of current is 1.667 A/s.\n",
+ "(c)The current at t=3 s is 2.16 A.\n",
+ "(d)The energy stored in the magnetic field at t=3 s is 42.055 J.\n",
+ "(e)The energy lost as heat till t=3 s is 14.195 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.13,Page number: 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current at different time instants.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=200.0 #Resistance of resistor 1(in Ohms)\n",
+ "L=5e-03 #Inductance of the coil(in Henry)\n",
+ "R2=17.0 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "i_0_plus=20e-03\n",
+ "v_0_plus=i_0_plus*R2\n",
+ "time_const=L/R1\n",
+ "v_L_0_plus=(L*i_0_plus)/time_const\n",
+ "t=20e-06 \n",
+ "i_20=i_0_plus*exp(-t/time_const)\n",
+ "v_20=v_0_plus\n",
+ "t=50e-06\n",
+ "i_50=i_0_plus*exp(-t/time_const)\n",
+ "v_50=v_0_plus\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of i(0+)=%e A.\" %(i_0_plus) \n",
+ "print \"(b)The value of v(0+)=%.3f V.\" %(v_0_plus)\n",
+ "print \"(c)The value of v_L(0+)=%.3f V.\" %(v_L_0_plus)\n",
+ "print \"(d)The value of i at t=20 micro seconds is %e A and v=%.3f V.\" %(i_20,v_20)\n",
+ "print \"(d)The value of i at t=50 micro seconds is %e A and v=%.3f V.\" %(i_50,v_50)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of i(0+)=2.000000e-02 A.\n",
+ "(b)The value of v(0+)=0.340 V.\n",
+ "(c)The value of v_L(0+)=4.000 V.\n",
+ "(d)The value of i at t=20 micro seconds is 8.986579e-03 A and v=0.340 V.\n",
+ "(d)The value of i at t=50 micro seconds is 2.706706e-03 A and v=0.340 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.14,Page number: 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents at t=5 mill seconds.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=0.8 #Self Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "i_L_0_minus=(120e-03)*(200.0/(200.0+40.0))\n",
+ "Req=40+(1.0/((1.0/800.0)+(1.0/200.0)))\n",
+ "time_const=L/Req\n",
+ "t=5e-03 \n",
+ "i_L=i_L_0_minus*exp(-t/time_const)\n",
+ "i_x=-i_L*(800.0/(800.0+200.0))\n",
+ "i_y=(120e-03)+(-i_L*(200.0/(200.0+800.0)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"At t=5 milli seconds,\" \n",
+ "print \"(a)The current i_L=%e A.\" %(i_L)\n",
+ "print \"(b)The current i_x=%e A.\" %(i_x)\n",
+ "print \"(c)The current i_y=%e A.\" %(i_y)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At t=5 milli seconds,\n",
+ "(a)The current i_L=2.865048e-02 A.\n",
+ "(b)The current i_x=-2.292038e-02 A.\n",
+ "(c)The current i_y=1.142699e-01 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.15,Page number: 223 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through an inductor at the time of switching.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=4.0 #Self inductance of inductor(in Henry)\n",
+ "R=10.0 #Resistance of resistor parallel to the inductor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"By superposition theorem, I_L_0=I_L_1+I_L_2; \"\"\"\n",
+ "I_L1=12.0/4.0\n",
+ "I_L2=2.0\n",
+ "I_L0=I_L1+I_L2\n",
+ "i_L_0_plus=I_L0\n",
+ "w_L_0_plus=0.5*L*I_L0*I_L0\n",
+ "time_const=L/R\n",
+ "t=1.0\n",
+ "i_L=I_L0*exp(-t/time_const)\n",
+ "v_10=-i_L*R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current i_L(0+)=%.2f A. The energy stored in the inductor is w_L(0+)=%.2f J.\" %(i_L_0_plus,w_L_0_plus)\n",
+ "print \"(b)At t=1 second, the current in the inductance is %.2f A and the voltage v_10=%.2f V.\" %(i_L,v_10) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current i_L(0+)=5.00 A. The energy stored in the inductor is w_L(0+)=50.00 J.\n",
+ "(b)At t=1 second, the current in the inductance is 0.41 A and the voltage v_10=-4.10 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.16,Page number: 223 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in the inductor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=5e-03 #Self inductance of inductor(in Henry)\n",
+ "R=200.0 #Resistance of resistor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L0=5e-03\n",
+ "time_const=L/R\n",
+ "t=20e-06\n",
+ "i_L=I_L0*exp(-t/time_const)\n",
+ "w=0.5*L*i_L*i_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The energy stored in the inductor after 20 micro seconds of throwing the switch is %e J.\" %(w)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy stored in the inductor after 20 micro seconds of throwing the switch is 1.261853e-08 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.17,Page number: 224 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable DEclaration:\n",
+ "L=8.0 #Self inductance of the coil(in Henry)\n",
+ "R=20.0 #Resistance of resistor(in Ohms)\n",
+ "V=120.0 #Voltage of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=V/R\n",
+ "time_const=L/R\n",
+ "t=0.6\n",
+ "i_t=Io*(1-exp(-t/time_const))\n",
+ "\"\"\" The voltage of R at any time is given as v_R(t)=6*(1-exp(-t/0.4))*20=120*(1-exp(-t/0.4));\n",
+ "\n",
+ " The voltage across L at any time is v_L(t)=L*(di/dt)=120*exp(-t/0.4);\n",
+ " \n",
+ " Applying v_L(t)=v_R(t), \"\"\"\n",
+ "t=-log(120.0/240.0)*0.4\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the circuit at t=0.6 seconds is %.2f A.\" %(i_t)\n",
+ "print \"(b)The time at which the voltage drops across R and L are same is %.4f seconds.\"%(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the circuit at t=0.6 seconds is 4.66 A.\n",
+ "(b)The time at which the voltage drops across R and L are same is 0.2773 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.18,Page number: 224 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current i_x in the circuit at different time instants.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=25e-03 #Self inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L0=(10e-03)*(80.0/(80.0+20.0))\n",
+ "i_x_minus_2=I_L0\n",
+ "i_x_0_minus=I_L0\n",
+ "i_x_0_plus=I_L0*(30.0/(30.0+20.0))\n",
+ "Req=1.0/((1.0/20.0)+(1.0/30.0))\n",
+ "time_const=L/Req\n",
+ "t=2e-03\n",
+ "i_L_2=I_L0*exp(-t/time_const)\n",
+ "i_x_2=i_L_2*(30.0/(30.0+20.0))\n",
+ "t=4e-03\n",
+ "i_L_4=I_L0*exp(-t/time_const)\n",
+ "i_x_4=i_L_4*(30.0/(30.0+20.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current i_x:\" \n",
+ "print \"At t=-2 ms, i_x=%e A.\" %(i_x_minus_2) \n",
+ "print \"At t=0- ms, i_x=%e A.\" %(i_x_0_minus)\n",
+ "print \"At t=0+ ms, i_x=%e A.\" %(i_x_0_plus)\n",
+ "print \"At t=2 ms, i_x=%e A.\" %(i_x_2)\n",
+ "print \"At t=4 ms, i_x=%e A.\" %(i_x_4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current i_x:\n",
+ "At t=-2 ms, i_x=8.000000e-03 A.\n",
+ "At t=0- ms, i_x=8.000000e-03 A.\n",
+ "At t=0+ ms, i_x=4.800000e-03 A.\n",
+ "At t=2 ms, i_x=1.837886e-03 A.\n",
+ "At t=4 ms, i_x=7.037134e-04 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.19,Page number: 225 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current and voltage at the time of switching.\"\"\"\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V=1.5 #Voltage of the supply(in Volts)\n",
+ "R1=5e-03 #Resistance of resistor 1(in Ohms) \n",
+ "R2=1.5e03 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Before the switch is thrown from a to b,the capacitor is fully charged to supply voltage.\n",
+ "\n",
+ " When switching takes place,the capacitor starts discharging through the 5 milli Ohms resistance.\"\"\" \n",
+ "V0=V\n",
+ "v_0_plus=V0\n",
+ "i_0_plus=V0/R1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage v(0+)=%.2f V and the current i(0+)=%.2f A.\" %(v_0_plus,i_0_plus)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage v(0+)=1.50 V and the current i(0+)=300.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.20,Page number: 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current at different time intervals.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C=5e-06 #Capacitance of the capacitor(in Farads)\n",
+ "V=6.0 #Voltage of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v_0_minus=6.0*((3.0+2.0)/(3.0+2.0+1.0))\n",
+ "R=(1e03+3e03+2e03)\n",
+ "i_0_minus=V/R\n",
+ "v_0_plus=v_0_minus\n",
+ "Vo=v_0_plus\n",
+ "Req=(5e03+3e03+2e03)\n",
+ "time_const=Req*C\n",
+ "i_0_plus=v_0_plus/Req\n",
+ "Io=i_0_plus\n",
+ "t=0.05\n",
+ "v_t1=Vo*exp(-t/time_const)\n",
+ "i_t1=Io*exp(-t/time_const)\n",
+ "t=0.10\n",
+ "v_t2=Vo*exp(-t/time_const)\n",
+ "i_t2=Io*exp(-t/time_const)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The values of v(t) and i(t) are: \"\n",
+ "print \"At t=0- s, v(t)=%.3f V and i(t)=%e A.\" %(v_0_minus,i_0_minus)\n",
+ "print \"At t=0+ s, v(t)=%.3f V and i(t)=%e A.\" %(v_0_plus,i_0_plus)\n",
+ "print \"At t=0.05 s, v(t)=%.3f V and i(t)=%e A.\" %(v_t1,i_t1)\n",
+ "print \"At t=0.10 s, v(t)=%.3f V and i(t)=%e A.\" %(v_t2,i_t2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The values of v(t) and i(t) are: \n",
+ "At t=0- s, v(t)=5.000 V and i(t)=1.000000e-03 A.\n",
+ "At t=0+ s, v(t)=5.000 V and i(t)=5.000000e-04 A.\n",
+ "At t=0.05 s, v(t)=1.839 V and i(t)=1.839397e-04 A.\n",
+ "At t=0.10 s, v(t)=0.677 V and i(t)=6.766764e-05 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.21,Page number: 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current at the time of switching.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Using current divider rule, the current through branch AB is determined.\"\"\" \n",
+ "I_AB=10e-03*(1000.0/(1000.0+(800.0+200.0)))\n",
+ "v_0_minus=I_AB*800.0\n",
+ "V_AB=v_0_minus\n",
+ "v_0_plus=V_AB\n",
+ "i_C_0_plus=V_AB/(1.0/((1.0/200.0)+(1.0/800.0)))\n",
+ "i_0_plus=i_C_0_plus*(800.0/(800.0+200.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of v(0+)=%.2f V and the current i(0+)=%e A.\" %(v_0_plus,i_0_plus)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of v(0+)=4.00 V and the current i(0+)=2.000000e-02 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.22,Page number: 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltages across resistor,capacitor and switch.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=12.0 #Voltage of the supply(in Volts)\n",
+ "C=50e-03 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v_C_0_minus=12.0*(20.0/(20.0+4.0))\n",
+ "v_C_0_plus=v_C_0_minus\n",
+ "Vo=v_C_0_plus\n",
+ "Req=5.0+20.0\n",
+ "time_const=Req*C\n",
+ "t=1.0\n",
+ "v_C1=Vo*exp(-t/time_const)\n",
+ "v_R1=v_C1*(20.0/(20.0+5.0))\n",
+ "v_SW1=V-V_R1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of v_C at t=1 second is %.3f V.\" %(v_C1) \n",
+ "print \"The value of v_R at t=1 second is %.3f V.\" %(v_R1)\n",
+ "print \"The value of v_SW at t=1 second is %.3f V.\" %(v_SW1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of v_C at t=1 second is 4.493 V.\n",
+ "The value of v_R at t=1 second is 3.595 V.\n",
+ "The value of v_SW at t=1 second is 8.405 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/Chapter9.ipynb b/Basic_Electrical_Engineering/Chapter9.ipynb
new file mode 100755
index 00000000..299b89e3
--- /dev/null
+++ b/Basic_Electrical_Engineering/Chapter9.ipynb
@@ -0,0 +1,1092 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:ALTERNATING CURRENT AND VOLTAGE"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1,Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the angle at which the instantaneous value of voltage is 10 V.\"\"\"\n",
+ "\n",
+ "from math import asin,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm=20.0 #Peak value of sinusoidal voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v=10.0 #Instantaneous Voltage(in Volts)\n",
+ "angle=degrees(asin(v/Vm))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The angle at which the instantaneous value of voltage is 10V is %.2f degrees.\" %(angle)\n",
+ "print \"(b)The maximum value of voltage is Vm=20 V.This occurs twice in one cycle at angles 90 degrees and 270 degrees.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The angle at which the instantaneous value of voltage is 10V is 30.00 degrees.\n",
+ "(b)The maximum value of voltage is Vm=20 V.This occurs twice in one cycle at angles 90 degrees and 270 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2,Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the time represented by a 60 degrees phase angle.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "ang_freq=2000.0 #Angular Frequency(in radians per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "f=ang_freq/(2*pi)\n",
+ "T=1/f\n",
+ "t=160e-06\n",
+ "v=0.04*sin((2000*t)+radians(60))\n",
+ "t_60=(60.0/360)*T\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The frequency is %.2f Hz.\" %(f)\n",
+ "print \"(b)The angular frequency is %.2f rad/sec.\" %(ang_freq)\n",
+ "print \"(c)The instantaneous voltage when t=60 micro seconds, is %e V.\" %(v)\n",
+ "print \"(d)The time represented by 60 degrees phase angle is %e seconds.\" %(t_60)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The frequency is 318.31 Hz.\n",
+ "(b)The angular frequency is 2000.00 rad/sec.\n",
+ "(c)The instantaneous voltage when t=60 micro seconds, is 3.917381e-02 V.\n",
+ "(d)The time represented by 60 degrees phase angle is 5.235988e-04 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3,Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equation for the instantaneous value of a sinusoidal voltage.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,radians,degrees,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_peak_to_peak=20.0 #Peak-to-peak Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_m=V_peak_to_peak/2\n",
+ "T=10.0e-03\n",
+ "f=1/T\n",
+ "ang_freq=2*pi*f\n",
+ "phi=180-degrees(asin(3.6/V_m))\n",
+ "t=12e-03\n",
+ "v_12=V_m*sin((ang_freq*t)-radians(phi))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equation of the given sinusoidal voltage is v(t)=%.2f sin(%.2ft+%.2f) V.\" %(V_m,ang_freq,phi)\n",
+ "print \"(b)The value of voltage at 12ms would be %.3f V.\" %(v_12)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equation of the given sinusoidal voltage is v(t)=10.00 sin(628.32t+158.90) V.\n",
+ "(b)The value of voltage at 12ms would be -9.985 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4,Page number: 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equation for the instantaneous value of an alternating current.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=60.0 #Frequency of alternating current(in Hertz)\n",
+ "i_m=12.0 #Peak value of the alternating current(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "t1=1.0/360\n",
+ "i_t1=i_m*sin(ang_freq*t1)\n",
+ "i2=9.6\n",
+ "t2=(asin(9.6/12))/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equation for the instantaneous value of alternating current is i= %d sin(%.2ft) A.\" %(i_m,ang_freq)\n",
+ "print \"(b)The value of current at t=1/360 second is %.2f A.\" %(i_t1)\n",
+ "print \"(c)The time taken to reach 9.6A for the first time is %e seconds.\" %(t2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equation for the instantaneous value of alternating current is i= 12 sin(376.99t) A.\n",
+ "(b)The value of current at t=1/360 second is 10.39 A.\n",
+ "(c)The time taken to reach 9.6A for the first time is 2.459727e-03 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5,Page number: 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the phase difference between two sinusoidal currents.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=100.0*pi\n",
+ "f=ang_freq/(2.0*pi)\n",
+ "T=1/f\n",
+ "t=(30.0/360.0)*T\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The phase difference in terms of time is %e seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase difference in terms of time is 1.666667e-03 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6,Page number: 248 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power consumed by a resistor.\"\"\"\n",
+ "\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=10 #Resistance of resistance(in Ohms) \n",
+ "I=4+ 1j*3 #Alternating current phasor(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_mod=abs(I)\n",
+ "I_phase= phase(I)\n",
+ "I_rms=I_mod\n",
+ "P=pow(I_rms,2)*R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power consumed by the 10 ohm resistor is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power consumed by the 10 ohm resistor is 250.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7,Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question: \n",
+ "\"\"\"Finding the resultant current obtained by adding two alternating currents.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,degrees,sqrt\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect(10,0)\n",
+ "I2=rect(20,radians(60))\n",
+ "I=I1+I2\n",
+ "Im=abs(I)\n",
+ "I_phase=degrees(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resultant current is %.2f A at a phase angle of %.2f degrees.\" %(Im,I_phase)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant current is 26.46 A at a phase angle of 40.89 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8,Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rms value of the sum of two currents.\"\"\"\n",
+ "\n",
+ "from cmath import rect\n",
+ "from math import radians,sqrt\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect((10*sqrt(2)),0)\n",
+ "I2=rect((20*sqrt(2)),radians(60))\n",
+ "I=I1+I2\n",
+ "Im=abs(I)\n",
+ "Irms=Im/(sqrt(2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rms value of the sum of the currents is %.2f A.\" %(Irms) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms value of the sum of the currents is 26.46 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9,Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rms value of the resultant current.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,sqrt,degrees\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect(5,0)\n",
+ "I2=rect(5,radians(30))\n",
+ "I3=rect(5,radians(-120))\n",
+ "I=I1+I2+I3\n",
+ "Im=abs(I)\n",
+ "Irms=Im/(sqrt(2))\n",
+ "I_phase=degrees(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rms value of the resultant current that leaves the junction is %.2f A at a phase angle of %.2f degrees.\" %(Irms,I_phase) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms value of the resultant current that leaves the junction is 5.00 A at a phase angle of -15.00 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10,Page number: 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average and rms value of the resultant cuurent in a wire.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "I1rms=10.0 #Rms value of direct current(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "avg=10.0 \n",
+ "I2rms=10.0/sqrt(2)\n",
+ "I_rms=sqrt(pow(I1rms,2)+pow(I2rms,2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of the resultant current is %d A as the current goes as much positive as negative around the value of %d A.\" %(avg,avg) \n",
+ "print \"The rms value of the resultant current is %.3f A.\" %(I_rms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of the resultant current is 10 A as the current goes as much positive as negative around the value of 10 A.\n",
+ "The rms value of the resultant current is 12.247 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.11,Page number: 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average value of a voltage waveform.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "area_0_to_1=10*(1e-03)\n",
+ "area_1_to_3=-5*(2e-03)\n",
+ "area_3_to_4=20*(1e-03)\n",
+ "area_4_to_5=0*(1e-03)\n",
+ "area_5_to_8=5*(3e-03)\n",
+ "total_area=(area_0_to_1+area_1_to_3+area_3_to_4+area_4_to_5+area_5_to_8)\n",
+ "total_period=8e-03\n",
+ "avg_value=total_area/total_period\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of the alternating voltage waveform is %.3f V.\" %(avg_value)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of the alternating voltage waveform is 4.375 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.12,Page number: 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the effective value of a voltage waveform.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Calculations:\n",
+ "area_0_to_10=400*(10e-03)\n",
+ "area_10_to_20=100*(10e-03)\n",
+ "total_area=(area_0_to_10+area_10_to_20)\n",
+ "total_period=20e-03\n",
+ "avg_value_of_square=total_area/total_period\n",
+ "rms=sqrt(avg_value_of_square)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The effective(rms) value of the alternating voltage waveform is %.3f V.\" %(rms) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective(rms) value of the alternating voltage waveform is 15.811 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.13,Page number: 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rms value,the average value and the form factor for a current waveform.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "period=3.0 #Time period of the current waveform(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Irms=sqrt( ((pow(10,2)*2)+(pow(0,2)*1))/3 )\n",
+ "Iavg=((10.0*2)+(0*1))/3.0\n",
+ "form_factor=Irms/Iavg\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rms value of current waveform is %.2f A.\" %(Irms) \n",
+ "print \"The average value of current waveform is %.2f A.\" %(Iavg) \n",
+ "print \"The form factor of the current waveform is %.2f.\" %(form_factor) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms value of current waveform is 8.12 A.\n",
+ "The average value of current waveform is 6.67 A.\n",
+ "The form factor of the current waveform is 1.22.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.14,Page number: 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the form factor and the peak factor for a saw-tooth waveform.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "T=5e-03 #Time period of saw-tooth waveform(in seconds) \n",
+ "V_m=10.0 #Peak value of the saw-tooth voltage(in Volts)\n",
+ "\n",
+ "\"\"\" Vav=(Area under the curve in one cycle)/(Duration of one cycle) \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vav=((1.0/2)*V_m*T)/T\n",
+ "Vrms=V_m/(sqrt(3))\n",
+ "form_factor=Vrms/Vav\n",
+ "peak_factor=V_m/Vrms\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of the saw-tooth voltage waveform is %.3f V.\" %(Vav)\n",
+ "print \"The rms value of the saw-tooth voltage waveform is %.3f V.\" %(Vrms)\n",
+ "print \"The form factor for the saw-tooth voltage waveform is %.3f.\" %(form_factor)\n",
+ "print \"The peak factor for the saw-tooth voltage waveform is %.3f.\" %(peak_factor)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of the saw-tooth voltage waveform is 5.000 V.\n",
+ "The rms value of the saw-tooth voltage waveform is 5.774 V.\n",
+ "The form factor for the saw-tooth voltage waveform is 1.155.\n",
+ "The peak factor for the saw-tooth voltage waveform is 1.732.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.15,Page number: 255 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average power,the apparent power,the instantaneous power and the power factor in percentage in an ac circuit.\"\"\"\n",
+ "\n",
+ "from math import cos,sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "phase_angle=pi/5 #Phase difference between the alternating current and alternating voltage(in radians) \n",
+ "Vm=55 #Peak value of the alternating voltage(in Volts) \n",
+ "Im=6.1 #Peak value of the alternating current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vrms=Vm/sqrt(2)\n",
+ "Irms=Im/sqrt(2)\n",
+ "pf=cos(phase_angle)\n",
+ "P_avg=Vrms*Irms*cos(phase_angle)\n",
+ "P_app=Vrms*Irms\n",
+ "P_inst=P_avg-(Vrms*Irms*cos((2*0.3)-(pi/5)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average power is %.2f W.\" %(P_avg)\n",
+ "print \"The apparent power is %.2f VA.\" %(P_app)\n",
+ "print \"The instantaneous power at wt=0.3 is %.2f W.\" %(P_inst)\n",
+ "print \"The power factor is %.3f lagging.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average power is 135.71 W.\n",
+ "The apparent power is 167.75 VA.\n",
+ "The instantaneous power at wt=0.3 is -31.97 W.\n",
+ "The power factor is 0.809 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.16,Page number:262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average and rms values of waveforms.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm1=10.0 #Peak voltage of first waveform(in Volts) \n",
+ "Vm2=10.0 #Peak voltage of second waveform(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vav1=Vm1/2.0\n",
+ "Vrms1=Vm1/sqrt(3.0)\n",
+ "Vav2=Vm2/4.0\n",
+ "Vrms2=Vm2/sqrt(6.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The average value of the voltage is %.2f V and the rms value of the voltage is %.2f V.\" %(Vav1,Vrms1) \n",
+ "print \"(b)The average value of the voltage is %.2f V and the rms value of the voltage is %.2f V.\" %(Vav2,Vrms2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The average value of the voltage is 5.00 V and the rms value of the voltage is 5.77 V.\n",
+ "(b)The average value of the voltage is 2.50 V and the rms value of the voltage is 4.08 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.17,Page number:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"Finding the value of current at a given instant.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=12.0 #Maximum value of the alternating current(in Amperes)\n",
+ "f=60.0 #Frequency of the alternating current(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "w=2*pi*f\n",
+ "t=1/360.0\n",
+ "i=Im*sin(w*t)\n",
+ "i1=9.6\n",
+ "t=asin(i1/Im)/w\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equation for the instantaneous current is i(t)=%.2f sin(%.2f*t) A.\" %(Im,w)\n",
+ "print \"(b)The value of the current after (1/360) second is %.2f A.\" %round(i,2)\n",
+ "print \"(c)The time taken to reach 9.6 A for the first time is %e seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equation for the instantaneous current is i(t)=12.00 sin(376.99*t) A.\n",
+ "(b)The value of the current after (1/360) second is 10.39 A.\n",
+ "(c)The time taken to reach 9.6 A for the first time is 2.459727e-03 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.18,Page number:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the expression of an alternating current in cosine form.\"\"\"\n",
+ "\n",
+ "from math import asin,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Imax=10.0 #Maximum value of current(in Amperes)\n",
+ "Io=5.0 #Value of current at t=0(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "phi=asin(Io/Imax)\n",
+ "phi_new=(pi/2.0)-phi\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The expression for current is i=%.2f cos(wt-%.2f) A.\" %(Imax,phi_new)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The expression for current is i=10.00 cos(wt-1.05) A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.19,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the time(from negative value) at which the instantaneous current is 10/sqrt(2.0) A.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,radians,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Irms=20.0 #Rms value of alternating current(in Amperes)\n",
+ "f=50.0 #Frequency of the alternating current(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "Im=Irms*sqrt(2.0)\n",
+ "i=10.0*sqrt(2.0)\n",
+ "ph_lag=pi/2.0\n",
+ "t=(asin(i/Im)+ph_lag)/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The time(measured from negative value) at which instantaneous current will be 10/sqrt(2.0) is %.2f ms.\" %round((t*1000),2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time(measured from negative value) at which instantaneous current will be 10/sqrt(2.0) is 6.67 ms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.20,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average and rms value of an alternating current.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Idc=10.0 #Dc current(in Amperes)\n",
+ "Im=5.0 #Peak value of sinusoidal component(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Iav=Idc\n",
+ "Irms=sqrt((10*10)+pow((5.0/sqrt(2.0)),2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of current is %.2f A.\" %(Iav)\n",
+ "print \"The rms value of current is %.2f A.\" %(Irms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of current is 10.00 A.\n",
+ "The rms value of current is 10.61 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.21,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the sum of three alternating voltages.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Calculations:\n",
+ "v1=rect(147.3,radians(188.1))\n",
+ "v2=rect(294.6,radians(45))\n",
+ "v3=rect(88.4,radians(135))\n",
+ "v_res=v1+v2+v3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resultant voltage is v=%.2f sin(wt+(%.2f degrees)) V.\" %(abs(v_res),degrees(phase(v_res)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant voltage is v=250.07 sin(wt+(90.01 degrees)) V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.22,Page number:265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reactance offered by an inductor and a capacitor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=0.2 #Inductance of the inductor(in Henry)\n",
+ "C=10e-06 #Capacitance of the capacitor(in Farads)\n",
+ "f=100 #Initial frequency of the ac input voltage(in Hertz)\n",
+ "f1=140 #New frequency of the ac input voltage(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "X_L=2*pi*f*L\n",
+ "X_C=1.0/(2*pi*f*C)\n",
+ "X_L1=2*pi*f1*L\n",
+ "X_C1=1.0/(2*pi*f1*C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For a frequency of 100Hz, X_L=%.2f Ohms and X_C=%.2f Ohms.\" %(X_L,X_C)\n",
+ "print \"(a)For a frequency of 140Hz, X_L=%.2f Ohms and X_C=%.2f Ohms.\" %(X_L1,X_C1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For a frequency of 100Hz, X_L=125.66 Ohms and X_C=159.15 Ohms.\n",
+ "(a)For a frequency of 140Hz, X_L=175.93 Ohms and X_C=113.68 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.23,Page number:265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents in each case.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect(10,0)\n",
+ "I2=rect(10,0)\n",
+ "Ia=I1+I2\n",
+ "I1=rect(10,radians(90))\n",
+ "Ib=I1+I2\n",
+ "I1=rect(10,radians(-90))\n",
+ "I2=rect(10,radians(-90))\n",
+ "Ic=I1+I2\n",
+ "V=250.0+1j*0\n",
+ "X_L=1j*25.0\n",
+ "Id=V/X_L\n",
+ "X_C=-1j*25.0\n",
+ "I=5.0+1j*0\n",
+ "Ve=I*X_C\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ia),degrees(phase(Ia)))\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ib),degrees(phase(Ib)))\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ic),degrees(phase(Ic)))\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Id),degrees(phase(Id)))\n",
+ "print \"(a)The unknown voltage is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ve),degrees(phase(Ve)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The unknown current is 20.00 A at a phase angle of 0.00 degrees.\n",
+ "(a)The unknown current is 14.14 A at a phase angle of 45.00 degrees.\n",
+ "(a)The unknown current is 20.00 A at a phase angle of -90.00 degrees.\n",
+ "(a)The unknown current is 10.00 A at a phase angle of -90.00 degrees.\n",
+ "(a)The unknown voltage is 125.00 A at a phase angle of -90.00 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Electrical_Engineering/screenshots/Screenshot1.png b/Basic_Electrical_Engineering/screenshots/Screenshot1.png
new file mode 100755
index 00000000..0d0af695
--- /dev/null
+++ b/Basic_Electrical_Engineering/screenshots/Screenshot1.png
Binary files differ
diff --git a/Basic_Electrical_Engineering/screenshots/Screenshot2.png b/Basic_Electrical_Engineering/screenshots/Screenshot2.png
new file mode 100755
index 00000000..cb8b214f
--- /dev/null
+++ b/Basic_Electrical_Engineering/screenshots/Screenshot2.png
Binary files differ
diff --git a/Basic_Electrical_Engineering/screenshots/Screenshot3.png b/Basic_Electrical_Engineering/screenshots/Screenshot3.png
new file mode 100755
index 00000000..8fed5b31
--- /dev/null
+++ b/Basic_Electrical_Engineering/screenshots/Screenshot3.png
Binary files differ
diff --git a/Basic_Electronics_and_Linear_Circuits/README.txt b/Basic_Electronics_and_Linear_Circuits/README.txt
index 92007db7..92007db7 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/README.txt
+++ b/Basic_Electronics_and_Linear_Circuits/README.txt
diff --git a/Basic_Electronics_and_Linear_Circuits/ch1.ipynb b/Basic_Electronics_and_Linear_Circuits/ch1.ipynb
index 6ff156a7..6ff156a7 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch1.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch1.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch10.ipynb b/Basic_Electronics_and_Linear_Circuits/ch10.ipynb
index 1268374a..1268374a 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch10.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch10.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch11.ipynb b/Basic_Electronics_and_Linear_Circuits/ch11.ipynb
index dd06f959..dd06f959 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch11.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch11.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch12.ipynb b/Basic_Electronics_and_Linear_Circuits/ch12.ipynb
index 5b2933a1..5b2933a1 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch12.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch12.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch13.ipynb b/Basic_Electronics_and_Linear_Circuits/ch13.ipynb
index 47cf6410..47cf6410 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch13.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch13.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch14.ipynb b/Basic_Electronics_and_Linear_Circuits/ch14.ipynb
index f2764770..f2764770 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch14.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch14.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch2.ipynb b/Basic_Electronics_and_Linear_Circuits/ch2.ipynb
index 56897172..56897172 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch2.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch2.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch4.ipynb b/Basic_Electronics_and_Linear_Circuits/ch4.ipynb
index 701f4aaf..701f4aaf 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch4.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch4.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch5.ipynb b/Basic_Electronics_and_Linear_Circuits/ch5.ipynb
index 89258a51..89258a51 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch5.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch5.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch6.ipynb b/Basic_Electronics_and_Linear_Circuits/ch6.ipynb
index abbcf8b9..abbcf8b9 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch6.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch6.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch7.ipynb b/Basic_Electronics_and_Linear_Circuits/ch7.ipynb
index 7a081d42..7a081d42 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch7.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch7.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch8.ipynb b/Basic_Electronics_and_Linear_Circuits/ch8.ipynb
index 0309b1db..0309b1db 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch8.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch8.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/ch9.ipynb b/Basic_Electronics_and_Linear_Circuits/ch9.ipynb
index 3b1261da..3b1261da 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/ch9.ipynb
+++ b/Basic_Electronics_and_Linear_Circuits/ch9.ipynb
diff --git a/Basic_Electronics_and_Linear_Circuits/screenshots/displaysinevoltagecro.png b/Basic_Electronics_and_Linear_Circuits/screenshots/displaysinevoltagecro.png
index da25031f..da25031f 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/screenshots/displaysinevoltagecro.png
+++ b/Basic_Electronics_and_Linear_Circuits/screenshots/displaysinevoltagecro.png
Binary files differ
diff --git a/Basic_Electronics_and_Linear_Circuits/screenshots/gainatcuttoff.png b/Basic_Electronics_and_Linear_Circuits/screenshots/gainatcuttoff.png
index 9b2cc7ef..9b2cc7ef 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/screenshots/gainatcuttoff.png
+++ b/Basic_Electronics_and_Linear_Circuits/screenshots/gainatcuttoff.png
Binary files differ
diff --git a/Basic_Electronics_and_Linear_Circuits/screenshots/hybridparameters.png b/Basic_Electronics_and_Linear_Circuits/screenshots/hybridparameters.png
index 5dc4f959..5dc4f959 100644..100755
--- a/Basic_Electronics_and_Linear_Circuits/screenshots/hybridparameters.png
+++ b/Basic_Electronics_and_Linear_Circuits/screenshots/hybridparameters.png
Binary files differ
diff --git a/Basic_Mechanical_Engineering/README.txt b/Basic_Mechanical_Engineering/README.txt
index 9d51031d..9d51031d 100644..100755
--- a/Basic_Mechanical_Engineering/README.txt
+++ b/Basic_Mechanical_Engineering/README.txt
diff --git a/Basic_Mechanical_Engineering/bme1.ipynb b/Basic_Mechanical_Engineering/bme1.ipynb
index c8832e7f..c8832e7f 100644..100755
--- a/Basic_Mechanical_Engineering/bme1.ipynb
+++ b/Basic_Mechanical_Engineering/bme1.ipynb
diff --git a/Basic_Mechanical_Engineering/bme2.ipynb b/Basic_Mechanical_Engineering/bme2.ipynb
index 07d17afc..07d17afc 100644..100755
--- a/Basic_Mechanical_Engineering/bme2.ipynb
+++ b/Basic_Mechanical_Engineering/bme2.ipynb
diff --git a/Basic_Mechanical_Engineering/bme6.ipynb b/Basic_Mechanical_Engineering/bme6.ipynb
index 8b37ff4a..8b37ff4a 100644..100755
--- a/Basic_Mechanical_Engineering/bme6.ipynb
+++ b/Basic_Mechanical_Engineering/bme6.ipynb
diff --git a/Basic_Mechanical_Engineering/screenshots/ravi1.png b/Basic_Mechanical_Engineering/screenshots/ravi1.png
index e08f066d..e08f066d 100644..100755
--- a/Basic_Mechanical_Engineering/screenshots/ravi1.png
+++ b/Basic_Mechanical_Engineering/screenshots/ravi1.png
Binary files differ
diff --git a/Basic_Mechanical_Engineering/screenshots/ravi2.png b/Basic_Mechanical_Engineering/screenshots/ravi2.png
index 8807457b..8807457b 100644..100755
--- a/Basic_Mechanical_Engineering/screenshots/ravi2.png
+++ b/Basic_Mechanical_Engineering/screenshots/ravi2.png
Binary files differ
diff --git a/Basic_Mechanical_Engineering/screenshots/ravi3.png b/Basic_Mechanical_Engineering/screenshots/ravi3.png
index be16b4e6..be16b4e6 100644..100755
--- a/Basic_Mechanical_Engineering/screenshots/ravi3.png
+++ b/Basic_Mechanical_Engineering/screenshots/ravi3.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/README.txt b/Basic_Principles_And_Calculations_In_Chemical_Engineering/README.txt
index def5a27e..def5a27e 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/README.txt
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/README.txt
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch1.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch1.ipynb
index c32c32f6..c32c32f6 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch1.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch1.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch10.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch10.ipynb
index e4b7fe7d..e4b7fe7d 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch10.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch10.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch11.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch11.ipynb
index 70f855c2..70f855c2 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch11.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch11.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch12.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch12.ipynb
index 1d00a5b6..1d00a5b6 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch12.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch12.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch13.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch13.ipynb
index d6a85197..d6a85197 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch13.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch13.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch14.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch14.ipynb
index dbfb8f2a..dbfb8f2a 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch14.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch14.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch15.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch15.ipynb
index e0ee646a..e0ee646a 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch15.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch15.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch16.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch16.ipynb
index 37a79df4..37a79df4 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch16.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch16.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch17.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch17.ipynb
index 0c482647..0c482647 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch17.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch17.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch18.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch18.ipynb
index 7e472aab..7e472aab 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch18.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch18.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch19.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch19.ipynb
index 509330f3..509330f3 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch19.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch19.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch2.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch2.ipynb
index 84439d15..84439d15 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch2.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch2.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch20.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch20.ipynb
index 2a777cf6..2a777cf6 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch20.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch20.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch21.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch21.ipynb
index 69c36534..69c36534 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch21.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch21.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch22.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch22.ipynb
index 52b1e9dd..52b1e9dd 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch22.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch22.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch23.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch23.ipynb
index 78279b16..78279b16 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch23.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch23.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
index b4b06951..b4b06951 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch25.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch25.ipynb
index 8e33f5fb..8e33f5fb 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch25.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch25.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch26.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch26.ipynb
index 5000414f..5000414f 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch26.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch26.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch27.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch27.ipynb
index 4bcff200..4bcff200 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch27.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch27.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch28.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch28.ipynb
index f3a9553e..f3a9553e 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch28.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch28.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch29.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch29.ipynb
index 7c95dcbe..7c95dcbe 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch29.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch29.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch3.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch3.ipynb
index 4e398ea9..4e398ea9 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch3.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch3.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch4.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch4.ipynb
index 7ed88091..7ed88091 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch4.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch4.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch5.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch5.ipynb
index 7c4d25d6..7c4d25d6 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch5.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch5.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch6.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch6.ipynb
index 572f406f..572f406f 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch6.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch6.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch7.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch7.ipynb
index f1754ae4..f1754ae4 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch7.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch7.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch8.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch8.ipynb
index 350e9391..350e9391 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch8.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch8.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch9.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch9.ipynb
index 53f8e501..53f8e501 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch9.ipynb
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch9.ipynb
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms.png
index a1bab145..a1bab145 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_1.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_1.png
index a1bab145..a1bab145 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_1.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_1.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_2.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_2.png
index a1bab145..a1bab145 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_2.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_2.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_3.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_3.png
index a1bab145..a1bab145 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_3.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/Adsorptionisotherms_3.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/bb.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/bb.png
index 81ceba34..81ceba34 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/bb.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/bb.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/cc.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/cc.png
index 017d45cd..017d45cd 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/cc.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/cc.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart.png
index 6e061e73..6e061e73 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_1.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_1.png
index 6e061e73..6e061e73 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_1.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_1.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_2.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_2.png
index 6e061e73..6e061e73 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_2.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_2.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_3.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_3.png
index 6e061e73..6e061e73 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_3.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/coxchart_3.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater.png
index 852e9c76..852e9c76 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_1.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_1.png
index 852e9c76..852e9c76 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_1.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_1.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_2.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_2.png
index 852e9c76..852e9c76 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_2.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_2.png
Binary files differ
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_3.png b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_3.png
index 852e9c76..852e9c76 100644..100755
--- a/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_3.png
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/screenshots/heatvaporizationwater_3.png
Binary files differ
diff --git a/Beginning_C++_through_Game_Programming/Chapter 1 .ipynb b/Beginning_C++_through_Game_Programming/Chapter 1 .ipynb
new file mode 100755
index 00000000..b7bd8ecd
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 1 .ipynb
@@ -0,0 +1,1483 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:. Fundamentals of Mass Transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page number:6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.1\n",
+ "#(a)Find Total molar concentration in gas feed\n",
+ "#(b)Find Density of gas feed\n",
+ "#(c)The composition of the gas feed, expressed in terms of mass fractions\n",
+ "#Variable declaration\n",
+ "T = 300 # [K]\n",
+ "P = 500 # [kPa]\n",
+ "R = 8.314 # [J/mole.K]\n",
+ "\n",
+ "\n",
+ "# Solution (a)\n",
+ "# Using equation 1.7 \n",
+ "C = P/(R*T) # [Total molar concentration, kmole/cubic m]\n",
+ "print\"Total molar concentration in the gas feed is\",round(C,1),\"kmole/cubic m\\n\\n\" \n",
+ "\n",
+ "#Illustration 1.1 (b)\n",
+ "# Solution (b)\n",
+ "\n",
+ "# Mixture of gases \n",
+ "# Components a-CH4 , b-C2H6 , c-nC3H8 , d-nC4H10\n",
+ "# Basis: 100 kmole of gas mixture\n",
+ "n_a = 88 # [kmole]\n",
+ "n_b = 4 # [kmole]\n",
+ "n_c = 5 # [kmole]\n",
+ "n_d = 3 # [kmole]\n",
+ "M_a = 16.04 # [gram/mole]\n",
+ "M_b = 30.07 # [gram/mole]\n",
+ "M_c = 44.09 # [gram/mole]\n",
+ "M_d = 58.12 # [gram/mole]\n",
+ "m_a = n_a*M_a # [kg]\n",
+ "m_b = n_b*M_b # [kg]\n",
+ "m_c = n_c*M_c # [kg]\n",
+ "m_d = n_d*M_d # [kg]\n",
+ "n_total = n_a+n_b+n_c+n_d # [kmole]\n",
+ "m_total = m_a+m_b+m_c+m_d # [kg]\n",
+ "M_avg = m_total/n_total # [kg/kmole]\n",
+ "row = C*M_avg # [mass density, kg/cubic m]\n",
+ "print\"Average molecular weight of gas feed is \",round(M_avg,2),\"kg/kmole\\n\" \n",
+ "print\"Density of gas feed is \",round(row,2),\"kg/cubic m\\n\\n\" \n",
+ "\n",
+ "#Illustration 1.1 (c)\n",
+ "\n",
+ "\n",
+ "# Mass fraction of each component\n",
+ "x_a = m_a/m_total \n",
+ "x_b = m_b/m_total \n",
+ "x_c = m_c/m_total \n",
+ "x_d = m_d/m_total \n",
+ "print\"Mass fraction of CH4, C2H6, nC3H8, nC4H10 are\",round(x_a,3),round(x_b,3),round(x_c,3),round(x_d,3),\"respectively\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total molar concentration in the gas feed is 0.2 kmole/cubic m\n",
+ "\n",
+ "\n",
+ "Average molecular weight of gas feed is 19.27 kg/kmole\n",
+ "\n",
+ "Density of gas feed is 3.86 kg/cubic m\n",
+ "\n",
+ "\n",
+ "Mass fraction of CH4, C2H6, nC3H8, nC4H10 are 0.733 0.062 0.114 0.091 respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page number:7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 1.2 \n",
+ "#Concentration of a Potassium Nitrate Wash Solution \n",
+ "#Variable declaration\n",
+ "# Component a-KNO3 b-H20\n",
+ "T = 293.0 # [K]\n",
+ "s_eqm = 24.0 # [percent by weight, %]\n",
+ "row = 1162.0 # [density of saturated solution, kg/cubic m]\n",
+ "\n",
+ "\n",
+ "#Illustration 1.2 (a) \n",
+ "# Solution (a)\n",
+ "\n",
+ "# Basis: 100 kg of fresh wash solution\n",
+ "m_a = (s_eqm/100)*100 # [kg]\n",
+ "m_b = 100 - m_a # [kg]\n",
+ "M_a = 101.10 # [gram/mole]\n",
+ "M_b = 18.02 # [gram.mole]\n",
+ "\t# Therefore moles of component 'a' and 'b' are\n",
+ "n_a = m_a/M_a # [kmole]\n",
+ "n_b = m_b/M_b # [kmole]\n",
+ "\n",
+ "m_total = 100 # [basis, kg]\n",
+ "n_total = n_a+n_b # [kmole]\n",
+ "\t# Average molecular weight\n",
+ "M_avg = m_total/n_total # [kg/kmole]\n",
+ "\t# Total molar density of fresh solution\n",
+ "C = row/M_avg # [kmole/cubic m]\n",
+ "print\"Total molar density of fresh solution is\",round(C,2),\"kmole/cubic m\\n\\n\" \n",
+ "\n",
+ "#Illustration 1.2 (b)\n",
+ "# Solution (b)\n",
+ "\n",
+ "# mole fractions of components 'a' and 'b'\n",
+ "x_a = n_a/n_total \n",
+ "x_b = n_b/n_total \n",
+ "print\"Mole fraction of KNO3 and H2O is\",round(x_a,3),round(x_b,3) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total molar density of fresh solution is 51.77 kmole/cubic m\n",
+ "\n",
+ "\n",
+ "Mole fraction of KNO3 and H2O is 0.053 0.947\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page number:9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.3\n",
+ "# Page: 9\n",
+ "# Material Balances on a Bio- Artificial Kidney\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f_a = 45.0 \t\t\t\t# [percent of blood cells by volume]\n",
+ "f_b = 55.0 \t\t\t\t# [percent of plasma by volume]\n",
+ "r = 1200.0 \t\t\t\t# [Rate of blood which is pumped through artificial \t\t\t\t\tkidney, mL/minute]\n",
+ "m_urine = 1540.0 \t\t\t# [mass of urine collected, g]\n",
+ "x_u = 1.3 \t\t\t\t# [urea concentration, percent by weight]\n",
+ " # Data for sample of blood plasma\n",
+ "c_urea = 155.3 \t\t\t# [mg/dL]\n",
+ "d = 1.0245 \t\t\t\t# [specfic gravity of plasma]\n",
+ "\n",
+ "#CALCULATION\n",
+ "\t#Illustration 1.3 (a)\n",
+ "\t# Solution (a)\n",
+ "\n",
+ "\t# Basis: 4 hours\n",
+ "\t# Assuming that the rate of formation and decomposition of urea during the procedure is \t\tnegligible and that no urea is removed by the patient\u2019s kidneys\n",
+ "\t# Therefore urea in \u201cclean\u201d blood = urea in \u201cdirty\u201d blood - urea in urine\n",
+ "\n",
+ "m_u = m_urine*(x_u/100) \t\t# [mass of urea in urine, g]\n",
+ "\t# total volume of plasma that flows through the artificial kidney in 4 hours\n",
+ "V_b = r*60*(f_b/100)*(1.0/100.0)*4 \t# [dL]\n",
+ "\t# urea in dirty blood from given plasma concentration\n",
+ "m_ud = c_urea*(1.0/1000.0)*V_b \t# [g]\n",
+ "\t\t\t\t\t# urea removal efficiency\n",
+ "n = (m_u/m_ud)*100 \n",
+ "#RESULT\n",
+ "print\"Urea removal efficiency is \",round(n,1),\"%\"\n",
+ " \n",
+ "\t#Illustration 1.3 (b)\n",
+ "\t# Solution (b)\n",
+ "#CALCULATION\n",
+ "m_uc = m_ud-m_u \t\t\t# [mass of urea on clean blood, g]\n",
+ "m_p = d*100*V_b \t\t\t# [Mass of plasma entering, g]\n",
+ "m_rem = m_p-m_urine \t\t\t# [Mass of plasma remaining, g]\n",
+ "V_brem = m_rem/(d*100) \t\t# [Volume of plasma remaining, dL]\n",
+ "#RESULT\n",
+ "c_y = (m_uc*1000)/V_brem \t\t# [urea concentration in remaining plasma, mg/dL]\n",
+ "print\"urea concentration in the plasma of the cleansed blood is\",round(c_y),\"mg/dL\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Urea removal efficiency is 8.1 %\n",
+ "urea concentration in the plasma of the cleansed blood is 144.0 mg/dL\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page number:21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.6\n",
+ "#Calculation of Diffusivity by the Wilke-Lee Equation\n",
+ "import math\n",
+ "\n",
+ "#VARIABLE DECLARATION\n",
+ "\n",
+ "T = 273 \t\t\t\t# [K]\n",
+ "P = 1 \t\t\t\t\t# [bar]\n",
+ "\t# 1 bar = 10**5 Pa\n",
+ "\t# Values of the Lennard-Jones parameters (sigma and E/K) are obtained from Appendix B:\n",
+ "sigma_a = 4.483 \t\t\t# [1st Lennard-Jones parameter, Angstrom]\n",
+ "sigma_b = 3.620 \t\t\t# [Angstrom]\n",
+ "d_a = 467.0 \t\t\t\t# [d = E/K 2nd Lennard-Jones parameter, K]\n",
+ "d_b = 97.0 \t\t\t\t# [K]\n",
+ "M_a = 76.0 \t\t\t\t# [gram/mole]\n",
+ "M_b = 29.0 \t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\n",
+ "#CALCULATION\n",
+ "\n",
+ "sigma_ab = (sigma_a+sigma_b)/2 \t\t# [Angstrom]\n",
+ "d_ab =math.sqrt(d_a*d_b) \t\t# [K]\n",
+ "M_ab = 2/((1/M_a)+(1/M_b)) \t\t\t# [gram/mole]\n",
+ "T_star = T/d_ab \n",
+ "a = 1.06036 \n",
+ "b = 0.15610 \n",
+ "c = 0.19300 \n",
+ "d = 0.47635 \n",
+ "e = 1.03587 \n",
+ "f = 1.52996 \n",
+ "g = 1.76474 \n",
+ "h =3.89411 \n",
+ "ohm = ((a/T_star**b)+(c/math.exp(d*T_star))+(e/math.exp(f*T_star))+(g/math.exp(h*T_star))) \n",
+ "\n",
+ "\t# Substituting these values into the Wilke-Lee equation yields (equation 1.49)\n",
+ "D_ab = ((10**-3*(3.03-(.98/math.sqrt(M_ab)))*T**1.5)/(P*(math.sqrt(M_ab))*(sigma_ab**2)*ohm)) \t\t\n",
+ "#RESULT\n",
+ "\t\t\t\t\t\t# [square cm/s]\n",
+ "print\"The diffusivity of carbon disulfide vapor in air at 273 K and 1 bar is\",round(D_ab,4),\"square cm/s\\n\" \n",
+ "\n",
+ "\t# The math.experimental value of D_ab obtained from Appendix A:\n",
+ "D_abexp = (.894/(P*10**5))*10**4 \t\t\t# [square cm/s]\n",
+ "percent_error = ((D_ab-D_abexp)/D_abexp)*100 \t\t# [%]\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The percent error of the estimate, compared to the math.experimental value is\",round(percent_error,1),\"%\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The diffusivity of carbon disulfide vapor in air at 273 K and 1 bar is 0.0952 square cm/s\n",
+ "\n",
+ "The percent error of the estimate, compared to the math.experimental value is 6.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page number:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.7\n",
+ "#Calculation of Diffusivity by the Wilke-Lee Equation \n",
+ "#with Estimated Values of the Lennard-Jones Parameters\n",
+ "import math\n",
+ "\n",
+ "#VARIABLE DECLARATION\n",
+ "\n",
+ "\t# A-C3H5Cl B-air\n",
+ "T = 298.0 \t\t\t\t\t# [K]\n",
+ "P = 1.0 \t\t\t\t\t\t# [bar]\n",
+ "\n",
+ "\t# Values of the Lennard-Jones parameters for allyl chloride must be estimated from \t\tequations (1.46) and (1.47).\n",
+ "\t\t# From Table 1.2\n",
+ "V_bA = 3*14.8+5*3.7+24.6 \t\t\t# [cubic cm/mole]\n",
+ "\t\t\t\t\t\t# From equation 1.46\n",
+ "sigma_A = 1.18*(V_bA)**(1.0/3.0) \t\t\t# [1st Lennard-Jones parameter, Angstrom]\n",
+ "\t# Normal boiling-point temperature for allyl chloride is Tb = 318.3 K\n",
+ "\t# From equation 1.47, E/K = 1.15*Tb\n",
+ "T_b = 318.3 \t\t\t\t\t# [K]\n",
+ "d_A = 1.15*T_b \t\t\t\t# [2nd Lennard-Jones parameter for C3H5Cl E/K, \t\t\t\t\t\t\tK]\n",
+ "M_A = 76.5 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Lennard-Jones parameters for air\n",
+ "sigma_B = 3.62 \t\t\t\t# [Angstrom]\n",
+ "d_B = 97 \t\t\t\t\t# [2nd Lennard-Jones parameter for air E/K, K]\n",
+ "\n",
+ "M_B = 29.0 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "sigma_AB = (sigma_A+sigma_B)/2 \t\t# [Angstrom]\n",
+ "d_AB = math.sqrt(d_A*d_B) \t\t\t# [K]\n",
+ "M_AB = 2/((1/M_A)+(1/M_B)) \t\t\t# [gram/mole]\n",
+ "\n",
+ "T_star = T/d_AB \n",
+ "a = 1.06036 \n",
+ "b = 0.15610 \n",
+ "c = 0.19300 \n",
+ "d = 0.47635 \n",
+ "e = 1.03587 \n",
+ "f = 1.52996 \n",
+ "g = 1.76474 \n",
+ "h =3.89411 \n",
+ "ohm = ((a/T_star**b)+(c/math.exp(d*T_star))+(e/math.exp(f*T_star))+(g/math.exp(h*T_star))) \n",
+ " \n",
+ "\t# Substituting these values into the Wilke-Lee equation yields (equation 1.49)\n",
+ "D_AB = ((10**-3*(3.03-(.98/math.sqrt(M_AB)))*T**1.5)/(P*(math.sqrt(M_AB))*(sigma_AB**2)*ohm)) # [square cm/s]\n",
+ "print\"The diffusivity of allyl chloride in air at 298 K and 1 bar is\",round(D_AB,4),\"square cm/s\\n\"\n",
+ "\n",
+ "\t# The experimental value of D_AB reported by Lugg (1968) is 0.098 square cm/s\n",
+ "D_ABexp = .098 \t\t\t\t\t# [square cm/s]\n",
+ "percent_error = ((D_AB-D_ABexp)/D_ABexp)*100 \t\t# [%]\n",
+ "print\"The percent error of the estimate, compared to the experimental value is\",round(percent_error,1),\"%\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The diffusivity of allyl chloride in air at 298 K and 1 bar is 0.0992 square cm/s\n",
+ "\n",
+ "The percent error of the estimate, compared to the experimental value is 1.2 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.8 Page number:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.8\n",
+ "#Calculation of Liquid Diffusivity in Aqueous Solution \n",
+ "import math\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# solute A-C2H60 solvent B-water\n",
+ "T = 288\t\t \t\t\t\t# [K]\n",
+ "\n",
+ "\t# Critical volume of solute\n",
+ "V_c = 167.1 \t\t\t\t\t# [cubic cm/mole]\n",
+ "\t# Calculating molar volume using equation 1.48\n",
+ "V_ba = 0.285*(V_c)**1.048 \t\t\t# [cubic cm/mole]\n",
+ "u_b = 1.153 \t\t\t\t\t# [Viscosity of liquid water at 288 K, cP]\n",
+ "M_solvent = 18 \t\t\t\t# [gram/mole]\n",
+ "phi_b = 2.26 \t\t\t\t\t# [association factor of solvent B]\n",
+ "\n",
+ "#Illustration 1.8 (a) \n",
+ "\t# Solution (a)\n",
+ "\n",
+ "\t# Using the Wilke-Chang correlation, equation 1.52\n",
+ "D_abo1 = (7.4*10**-8)*(math.sqrt(phi_b*M_solvent))*T/(u_b*(V_ba)**.6) # [diffusivity of solute A \tin very dilute solution in solvent B, square cm/s]\n",
+ "\n",
+ "#RESULT\n",
+ "print\"Diffusivity of C2H60 in a dilute solution in water at 288 K is\",round(D_abo1,8),\"square cm/s\" \n",
+ "\t# The experimental value of D_abo reported in Appendix A is 1.0 x 10**-5 square cm/s\n",
+ "D_aboexp = 1*10**-5 \t\t\t\t\t# [square cm/s]\n",
+ "percent_error1 = ((D_abo1-D_aboexp)/D_aboexp)*100 \t# [%]\n",
+ "\n",
+ "print\"The percent error of the estimate, compared to the experimental value is\",round(percent_error1,1),\"%\" \n",
+ "\n",
+ "\t#Illustration 1.8 (b) \n",
+ "\t# Solution (b)\n",
+ "#CALCULATION\n",
+ "\t# Using the Hayduk and Minhas correlation for aqueous solutions equation 1.53\n",
+ "E = (9.58/V_ba)-1.12 \n",
+ "D_abo2 = (1.25*10**-8)*(((V_ba)**-.19)-0.292)*(T**1.52)*(u_b**E) \t# [square cm/s]\n",
+ "\n",
+ "#RESULT\n",
+ "print\"\\n\\nDiffusivity of C2H60 in a dilute solution in water at 288 K is\",round(D_abo2,8),\"square cm/s\\n\" \n",
+ "percent_error2 = ((D_abo2-D_aboexp)/D_aboexp)*100 \t\t\t# [%]\n",
+ "print\"The percent error of the estimate, compared to the experimental value is\",round(percent_error2,1),\"%\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diffusivity of C2H60 in a dilute solution in water at 288 K is 1.002e-05 square cm/s\n",
+ "The percent error of the estimate, compared to the experimental value is 0.2 %\n",
+ "\n",
+ "\n",
+ "Diffusivity of C2H60 in a dilute solution in water at 288 K is 9.91e-06 square cm/s\n",
+ "\n",
+ "The percent error of the estimate, compared to the experimental value is -0.9 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.9 Page number:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.9\n",
+ "#Calculation of Liquid Diffusivity in Dilute Nonaqueous Solution\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "\t# A-acetic acid(solute) B-acetone(solvent)\n",
+ "T = 313 \t\t\t\t\t # [K]\n",
+ "\t# The following data are available (Reid, et al., 1987):\n",
+ "\n",
+ "\t# Data for acetic acid\n",
+ "T_bA = 390.4 \t\t\t\t\t# [K]\n",
+ "T_cA = 594.8 \t\t\t\t\t# [K]\n",
+ "P_cA = 57.9 \t\t\t\t\t# [bar]\n",
+ "V_cA = 171 \t\t\t\t\t# [cubic cm/mole]\n",
+ "M_A = 60 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Data for acetone\n",
+ "T_bB = 329.2 \t\t\t\t\t# [K]\n",
+ "T_cB = 508 \t\t\t\t\t# [K]\n",
+ "P_cB = 47 \t\t\t\t\t# [bar]\n",
+ "V_cB = 209 \t\t\t\t\t# [cubic cm/mole]\n",
+ "u_bB = 0.264 \t\t\t\t\t# [cP]\n",
+ "M_B = 58 \t\t\t\t\t# [gram/mole]\n",
+ "phi = 1 \n",
+ "\n",
+ "#CALCULATION\n",
+ "\n",
+ "\t#Illustration 1.9 (a) -\n",
+ "\t# Solution (a)\n",
+ "\t# Using equation 1.48\n",
+ "V_bA = 0.285*(V_cA)**1.048 \t\t\t# [cubic cm/mole]\n",
+ "\n",
+ "\t# Using the Wilke-Chang correlation , equation 1.52\n",
+ "D_abo1 = (7.4*10**-8)*(math.sqrt(phi*M_B))*T/(u_bB*(V_bA)**.6) \n",
+ "\n",
+ "#RESULT\n",
+ "print\"Diffusivity of acetic acid in a dilute solution in acetone at 313 K using the Wilke-Chang correlation is\",round(D_abo1,8),\"square cm/s\\n\" \n",
+ "\t# From Appendix A, the experimental value is 4.04*10**-5 square cm/s\n",
+ "D_aboexp = 4.04*10**-5 \t\t\t\t\t# [square cm/s]\n",
+ "percent_error1 = ((D_abo1-D_aboexp)/D_aboexp)*100 \t\t# [%]\n",
+ "\n",
+ "print\"The percent error of the estimate, compared to the experimental value is \",round(percent_error1,1),\"%\" \n",
+ "\n",
+ "#Illustration 1.9 (b)\n",
+ "# Solution (b)\n",
+ "\n",
+ "#CALCULATION\n",
+ "# Using the Hayduk and Minhas correlation for nonaqueous solutions\n",
+ "\n",
+ "V_bA = V_bA*2 \t\t\t\t\t\t\t# [cubic cm/mole]\n",
+ "V_bB = 0.285*(V_cB)**1.048 \t\t\t\t\t# [cubic cm/mole]\n",
+ "\n",
+ "\t\t# For acetic acid (A)\n",
+ "T_brA = T_bA/T_cA \t\t\t\t\t\t# [K]\n",
+ "\t\t# Using equation 1.55 \n",
+ "alpha_cA = 0.9076*(1+((T_brA)*math.log(P_cA/1.013))/(1-T_brA)) \n",
+ "sigma_cA = (P_cA**(2.0/3.0))*(T_cA**(1.0/3.0))*(0.132*alpha_cA-0.278)*(1-T_brA)**(11.0/9.0) # [dyn/cm]\n",
+ "\n",
+ "# For acetone (B)\n",
+ "T_brB = T_bB/T_cB \t\t\t\t\t\t# [K]\n",
+ "\t\t# Using equation 1.55 \n",
+ "alpha_cB = 0.9076*(1+((T_brB*math.log(P_cB/1.013))/(1-T_brB))) \n",
+ "sigma_cB = (P_cB**(2.0/3.0))*(T_cB**(1.0/3.0))*(0.132*alpha_cB-0.278)*(1-T_brB)**(11.0/9.) # [dyn/cm]\n",
+ "\n",
+ "# Substituting in equation 1.54\n",
+ "D_abo2 = (1.55*10**-8)*(V_bB**0.27)*(T**1.29)*(sigma_cB**0.125)/((V_bA**0.42)*(u_bB**0.92)*(sigma_cA**0.105)) \n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"Diffusivity of acetic acid in a dilute solution in acetone at 313 K using the Hayduk and Minhas correlation is\",round(D_abo2,7),\"square cm/s\\n\" \n",
+ "\n",
+ "percent_error2 = ((D_abo2-D_aboexp)/D_aboexp)*100 # [%]\n",
+ "print\"The percent error of the estimate, compared to the experimental value is\",round(percent_error2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diffusivity of acetic acid in a dilute solution in acetone at 313 K using the Wilke-Chang correlation is 5.596e-05 square cm/s\n",
+ "\n",
+ "The percent error of the estimate, compared to the experimental value is 38.5 %\n",
+ "Diffusivity of acetic acid in a dilute solution in acetone at 313 K using the Hayduk and Minhas correlation is"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 3.84e-05 square cm/s\n",
+ "\n",
+ "The percent error of the estimate, compared to the experimental value is -5.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.10 Page number:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.10\n",
+ "#Diffusion Coefficients in the System Acetone-Benzene\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# acetone-1 benzene-2\n",
+ "T = 298 \t\t\t\t\t# [K]\n",
+ "x_1 = 0.7808 \n",
+ "x_2 = 1-x_1 \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "\t# The infinite dilution diffusivities are\n",
+ "D_12o = 2.75*10**-9 \t\t\t\t# [square m/s]\n",
+ "D_21o = 4.15*10**-9 \t\t\t\t# [square m/s]\n",
+ "\t# From the NRTL equation, for this system at the given temperature and concentration the \tthermodynamic correction factor r = 0.871.\n",
+ "r = 0.871 \n",
+ "D_12exp = 3.35*10**-9 \t\t\t\t# [square m/s]\n",
+ "\n",
+ "\n",
+ "\t# Using equation 1.56\n",
+ "D_12 = (D_12o**x_2)*(D_21o**x_1) \n",
+ "D_12 = D_12*r \n",
+ "\n",
+ "#RESULT\n",
+ "print\"The theoritical value of Fick diffusivity is\",round(D_12,11),\"square m/s\" \n",
+ "\t# The predicted value of the Fick diffusivity is in excellent agreement with the \texperimental result."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The theoritical value of Fick diffusivity is 3.3e-09 square m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.11 Page number:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.11\n",
+ "#Calculation of Effective Diffusivity in a Multicompo-nent Gas Mixture \n",
+ "\n",
+ "#Variable declaration\n",
+ "# ammonia-1 nitrogen-2 hydrogen-3\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 1 \t\t\t\t\t\t# [bar]\n",
+ "y_1 = .40 \n",
+ "y_2 = .20 \n",
+ "y_3 = .40 \n",
+ "import math\n",
+ "\n",
+ "\t# Lennard-Jones parameter for ammonia\n",
+ "sigma_1 = 2.9 \t\t\t\t\t# [Angstrom]\n",
+ "d_1 = 558.3 \t\t\t\t\t# [E/K, K]\n",
+ "M_1 = 17.0 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Lennard-Jones parameter for nitrogen\n",
+ "sigma_2 = 3.798 \t\t\t\t# [Angstrom]\n",
+ "d_2 = 71.4 \t\t\t\t\t# [E/K, K]\n",
+ "M_2 = 28.0 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Lennard-Jones parameter for hydrogen \n",
+ "sigma_3 = 2.827 \t\t\t\t# [Angstrom]\n",
+ "d_3 = 59.7 \t\t\t\t\t# [E/K, K]\n",
+ "M_3 = 2.0 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Binary diffusivitiy of ammonia in nitrogen (D_12)\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "\n",
+ "\n",
+ "sigma_12 = (sigma_1+sigma_2)/2 \t\t# [Angstrom]\n",
+ "d_12 = math.sqrt(d_1*d_2) \t\t\t# [K]\n",
+ "M_12 = 2/((1/M_1)+(1/M_2)) \t\t\t# [gram/mole]\n",
+ "\n",
+ "T_star12 = T/d_12 \n",
+ "a = 1.06036 \n",
+ "b = 0.15610 \n",
+ "c = 0.19300 \n",
+ "d = 0.47635 \n",
+ "e = 1.03587 \n",
+ "f = 1.52996 \n",
+ "g = 1.76474 \n",
+ "h = 3.89411 \n",
+ "ohm12 = ((a/T_star12**b)+(c/math.exp(d*T_star12))+(e/math.exp(f*T_star12))+(g/math.exp(h*T_star12))) \n",
+ " \n",
+ "\t# Substituting these values into the Wilke-Lee equation yields (equation 1.49)\n",
+ "D_12 = ((10**-3*(3.03-(.98/math.sqrt(M_12)))*T**1.5)/(P*(math.sqrt(M_12))*(sigma_12**2)*ohm12)) # [square cm/s]\n",
+ "print\"The diffusivitiy of ammonia in nitrogen\",round(D_12,3),\"square cm/s\"\n",
+ "\n",
+ "\t# Binary diffusivitiy of ammonia in hydrogen (D_13)\n",
+ "\n",
+ "sigma_13 = (sigma_1+sigma_3)/2 \t\t# [Angstrom]\n",
+ "d_13 = math.sqrt(d_1*d_3) \t\t\t# [K]\n",
+ "M_13 = 2/((1/M_1)+(1/M_3)) \t\t\t# [gram/mole]\n",
+ "\n",
+ "T_star13 = T/d_13 \n",
+ "a = 1.06036 \n",
+ "b = 0.15610 \n",
+ "c = 0.19300 \n",
+ "d = 0.47635 \n",
+ "e = 1.03587 \n",
+ "f = 1.52996 \n",
+ "g = 1.76474 \n",
+ "h = 3.89411 \n",
+ "ohm13 = ((a/T_star13**b)+(c/math.exp(d*T_star13))+(e/math.exp(f*T_star13))+(g/math.exp(h*T_star13))) \n",
+ " \n",
+ "\t# Substituting these values into the Wilke-Lee equation yields (equation 1.49)\n",
+ "D_13 = ((10**-3*(3.03-(.98/math.sqrt(M_13)))*T**1.5)/(P*(math.sqrt(M_13))*(sigma_13**2)*ohm13)) \t\t\t\t\t# [square cm/s]\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The diffusivitiy of ammonia in hydrogen\",round(D_13,3),\"square cm/s\\n\" \n",
+ "\n",
+ "\t# Figure 1.5 shows the flux of ammonia (N_1) toward the catalyst surface, where \n",
+ "\t# it is consumed by chemical reaction, and the fluxes of nitrogen (N_2) and hydrogen \t\t(N_3)\n",
+ "\t# produced by the reaction migrating away from the same surface.\n",
+ "\n",
+ "\t# Therefore N_1 = N_2+N_3 \n",
+ "\t# From equation 1.59\n",
+ "\t# N_2 = -(0.5)*N_1 and N_3 = -(1.5)*N_1\n",
+ "\n",
+ "\t# Substituting in equation (1.58) we obtain\n",
+ "D_1eff = (1+y_1)/((y_2+0.5*y_1)/D_12 + (y_3+1.5*y_1)/D_13) \t\t# [square cm/s]\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The effective diffusivity of ammonia in the gaseous mixture is\",round(D_1eff,3),\"square cm/s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The diffusivitiy of ammonia in nitrogen 0.237 square cm/s\n",
+ "The diffusivitiy of ammonia in hydrogen 0.728 square cm/s\n",
+ "\n",
+ "The effective diffusivity of ammonia in the gaseous mixture is 0.457 square cm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.12 Page number:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.12\n",
+ "#Calculation of Effective Diffusivity in a Multicomponent Stagnant Gas Mixture\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# ammonia-1 nitrogen-2 hydrogen-3\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 1 \t\t\t\t\t\t# [bar]\n",
+ "y_1 = 0.40 \n",
+ "y_2 = 0.20 \n",
+ "y_3 = 0.40 \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "\n",
+ "\t# The binary diffusivities are the same as for Example 1.11.\n",
+ "D_12 = 0.237 \t\t\t\t\t# [square cm/s]\n",
+ "D_13 = 0.728 \t\t\t\t\t# [square cm/s]\n",
+ "\n",
+ "\t# mole fractions of nitrogen (2) and hydrogen (3) on an ammonia (1)-free base from \tequation (1.61)\n",
+ "y_21 = y_2/(1-y_1) \n",
+ "y_31 = y_3/(1-y_1) \n",
+ "\t# Substituting in equation (1.60) gives us\n",
+ "D_1eff = 1/((y_21/D_12)+(y_31/D_13)) \n",
+ "print\"The effective diffusivity of ammonia in the gaseous mixture is\",round(D_1eff,3),\"square cm/s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective diffusivity of ammonia in the gaseous mixture is 0.431 square cm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.13 Page number:36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.13\n",
+ "#Calculation of Effective Diffusivity of a Dilute Solute in a Homogeneous Mixture of Solvents\n",
+ "\n",
+ "#VARIABLE DECLARATION\n",
+ "\n",
+ "\t# acetic acid-1 water-2 ethyl alcohol-3\n",
+ "T = 298 \t\t\t\t\t# [K]\n",
+ "\t# The data required data for water at 298 K\n",
+ "u_2 = 0.894 \t\t\t\t\t# [cP]\n",
+ "V_c1 = 171 \t\t\t\t\t# [cubic cm/mole]\n",
+ "\t# From equation 1.48\n",
+ "V_b1 = 62.4 \t\t\t\t\t# [cubic cm/mole]\n",
+ "\t# Substituting in equation (1.53)\n",
+ "\t# the infinite dilution diffusion coefficient of acetic acid in water at 298 K\n",
+ "E = (9.58/V_b1)-1.12 \n",
+ "D_abo12 = (1.25*10**-8)*(((V_b1)**-.19)-0.292)*(T**1.52)*(u_2**E) # [square cm/s]\n",
+ "\n",
+ "import math\n",
+ "\t# Data for acetic acid\n",
+ "T_b1 = 390.4 \t\t\t\t\t# [K]\n",
+ "T_c1 = 594.8 \t\t\t\t\t# [K]\n",
+ "P_c1 = 57.9 \t\t\t\t\t# [bar]\n",
+ "V_c1 = 171 \t\t\t\t\t# [cubic cm/mole]\n",
+ "M_1 = 60.0 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Data for ethanol\n",
+ "T_b3 = 351.4 \t\t\t\t\t# [K]\n",
+ "T_c3 = 513.9 \t\t\t\t\t# [K]\n",
+ "P_c3 = 61.4 \t\t\t\t\t# [bar]\n",
+ "V_c3 = 167 \t\t\t\t\t# [cubic cm/mole]\n",
+ "M_3 = 46.0 \t\t\t\t\t# [gram/mole]\n",
+ "u_3 = 1.043 \t\t\t\t\t# [cP]\n",
+ "\n",
+ "\n",
+ "#CALCULATION\n",
+ "\n",
+ "\t# Using the Hayduk and Minhas correlation for nonaqueous solutions\n",
+ "\n",
+ "\t# According to restriction 3 mentioned above, the molar volume of the acetic acid to be \tused in equation (1.54) should be\t\n",
+ "V_b1 = V_b1*2 \t\t\t\t\t# [cubic cm/mole]\n",
+ "\t# The molar volume of ethanol is calculated from equation (1.48)\n",
+ "V_b3 = 60.9 \t\t\t\t\t# [cubic cm/mole]\n",
+ "\n",
+ "\n",
+ "\t# For acetic acid (1)\n",
+ "T_br1 = T_b1/T_c1 \t\t\t\t# [K]\n",
+ "\t# Using equation 1.55 \n",
+ "alpha_c1 = 0.9076*(1+((T_br1)*math.log(P_c1/1.013))/(1-T_br1)) \n",
+ "sigma_c1 = (P_c1**(2.0/3.0))*(T_c1**(1.0/3.0))*(0.132*alpha_c1-0.278)*(1-T_br1)**(11.0/9.0) # \t\t\t\t\t\t\t\t\t\t\t[dyn/cm]\n",
+ "\n",
+ "\t# For ethanol (3)\n",
+ "T_br3 = T_b3/T_c3 \t\t\t\t# [K]\n",
+ "\t# Using equation 1.55 \n",
+ "alpha_c3 = 0.9076*(1+((T_br3*math.log(P_c3/1.013))/(1-T_br3))) \n",
+ "sigma_c3 = (P_c3**(2.0/3.0))*(T_c3**(1.0/3.0))*(0.132*alpha_c3-0.278)*(1-T_br3)**(11.0/9.0) # [dyn/cm]\n",
+ "\n",
+ "\t# Substituting in equation 1.54\n",
+ "D_abo13 = (1.55*10**-8)*(V_b3**0.27)*(T**1.29)*(sigma_c3**0.125)/((V_b1**0.42)*(u_3**0.92)*(sigma_c1**0.105)) \n",
+ "\n",
+ "\t# The viscosity of a 40 wt% aqueous ethanol solution at 298 K is u_mix = 2.35 cP\n",
+ "u_mix = 2.35 \t\t\t\t\t# [cP]\n",
+ "\t# The solution composition must be changed from mass to molar fractions following a \t\t\tprocedure similar to that illustrated in Example 1.2\n",
+ "\t# Accordingly, a 40 wt% aqueous ethanol solution converts to 20.7 mol%.\n",
+ "\t# Therefore mole fraction of ethanol (x_3) and water (x_2) \n",
+ "\n",
+ "x_3 = 0.207 \n",
+ "x_2 = 1-x_3 \n",
+ "\t# Using equation 1.62\n",
+ "D_1eff = ((x_2*D_abo12*(u_2**0.8))+(x_3*D_abo13*(u_3**0.8)))/(u_mix**0.8) \n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The diffusion coefficient of acetic acid at very low concentrations diffusing into a mixed solvent containing 40.0 wt percent ethyl alcohol in water at a temperature of 298 K is\",round(D_1eff,7),\"cm^2/s\\n\\n\" \n",
+ "\n",
+ "\t# The experimental value reported by Perkins and Geankoplis (1969) is \n",
+ "D_1exp = 5.71*10**-6 # [square cm/s]\n",
+ "percent_error = ((D_1eff-D_1exp)/D_1exp)*100 # [%]\n",
+ "\n",
+ "\n",
+ "print\"The error of the estimate is \",round(percent_error,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The diffusion coefficient of acetic acid at very low concentrations diffusing into a mixed solvent containing 40.0 wt percent ethyl alcohol in water at a temperature of 298 K is 5.9e-06 cm^2/s\n",
+ "\n",
+ "\n",
+ "The error of the estimate is 3.2 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.14 Page number:39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.14\n",
+ "#Steady-State Equimolar Counterdiffusion\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# Binary gaseous mixture of components A and B\n",
+ "P = 1 \t\t\t\t\t\t # [bar]\n",
+ "T = 300 \t\t\t # [K]\n",
+ "R = 8.314 \t\t\t\t\t # [cubic m.Pa/mole.K]\n",
+ "delta = 1 \t\t\t\t\t # [mm]\n",
+ "y_A1 = 0.7 \n",
+ "y_A2 = 0.2 \n",
+ "D_AB = 0.1 \t\t\t\t\t # [square cm/s]\n",
+ "\n",
+ "\t# Using equation 1.72\n",
+ "#CALCULATION\n",
+ "\n",
+ "N_A = (D_AB*10**-4)*(P*10**5)*(y_A1-y_A2)/(R*T*delta*10**-3) \n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The molar flux of component A is\",round(N_A,1),\"mole/square m.s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar flux of component A is 0.2 mole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.15 Page number:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.15\n",
+ "#Steady-State Diffusion of A Through Stagnant B\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t\t# Diffusion of A through stagnant B\n",
+ "P_total = 1.0 \t\t\t\t\t\t# [bar]\n",
+ "P_B1 = 0.8 \t\t\t\t\t\t# [bar]\n",
+ "P_B2 = 0.3 \t\t\t\t\t\t# [bar]\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "\t# Using equation 1.83\n",
+ "P_BM = (P_B2-P_B1)/(math.log(P_B2/P_B1)) \t\t# [bar]\n",
+ "\t# using the result of Example 1.14, we have\n",
+ "N_A = 0.2 \t\t\t\t\t\t# [mole/square m.s]\n",
+ "N_A = N_A*P_total/P_BM \t\t\t\t\t# [moloe/square m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The molar flux of component A is\",round(N_A,2),\"mole/square m.s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar flux of component A is 0.39 mole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.16 Page number:44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.16\n",
+ "#Production of Nickel Carbonyl: Steady-State, One-Dimensional Binary Flux Calculation\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "\t# Nickel Carbonyl-A carbon monoxide-B\n",
+ "T = 323 \t\t\t\t\t# [K]\n",
+ "P = 1 \t\t\t\t\t\t# [atm]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "y_A1 = 1.0 \n",
+ "y_A2 = 0.5 \n",
+ "delta = 0.625 \t\t\t\t\t# [mm]\n",
+ "D_AB = 20 \t\t\t\t\t# [square mm/s]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\n",
+ "\t# The stoichiometry of the reaction determines the relation between the fluxes: from \t\t\tequation (1-59), N_B = - 4N_A and N_A + N_B = -3NA\n",
+ "\t# Molar flux fraction si_A = N_A/(N_A+N_B) = N_A/(-3*N_A) = -1/3\n",
+ "si_A = -1.0/3.0 \n",
+ "\t# Using equation 1.78\n",
+ "N_A = si_A*(D_AB*10**-6*P*10**5*math.log((si_A-y_A2)/(si_A-y_A1))/(R*T*delta*10**-3)) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The molar flux of component A is\",round(N_A,3),\"mole/square m.s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar flux of component A is 0.187 mole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.19 Page number:54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.19\n",
+ "#Steady- State Molecular Diffusion in Liquids\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "# a-CuS04 b-H2O\n",
+ "T = 273 \t\t\t\t\t\t# [K]\n",
+ "delta = 0.01 \t\t\t\t\t\t# [mm]\n",
+ "sol_ab = 24.3 \t\t\t\t\t\t# [gram/100 gram water]\n",
+ "den_ab = 1140 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "D_ab = 3.6*10**-10 \t\t\t\t\t# [square m/s]\n",
+ "den_b = 999.8 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "\n",
+ "\t# both fluxes are in the same direction therefore, they are both positive and relation \tis N_b = 5N_a (where N_b and N_a are molar fluxes of component 'a' and 'b') \n",
+ "\t# From equation (1.76), si_a = 1/6 = 0.167\n",
+ "si_a = 0.167 \n",
+ "\t# Calculation of mole fraction of component 'a'\n",
+ "\t# Basis: 100 gram H2O (b)\n",
+ "M_a = 159.63 \t\t\t\t\t\t# [gram/mole]\n",
+ "M_b = 18 \t\t\t\t\t\t# [gram/mole]\n",
+ "M_c =249.71 \t\t\t\t\t\t# [here M_c is molecular mass of hydrated \t\t\t\t\t\t\t CuSO4, gram/mole]\n",
+ "m_a = 24.3 \t\t\t\t\t\t# [gram]\n",
+ "m_c = m_a*(M_a/M_c) \t\t\t\t\t# [here m_c is the mass of CuSO4 in 24.3 \t\t\t\t\t\t\tgram of crystal, gram]\n",
+ "m_d = m_a-m_c \t\t\t\t\t\t# [here m_d is mass of hydration of water \t\t\t\t\t\t\tin the crystal, gram]\n",
+ "m_b_total = 100+m_d \t\t\t\t\t# [total mass of water, gram]\n",
+ "\n",
+ "x_a1 = (m_c/M_a)/((m_c/M_a)+(m_b_total/M_b)) \n",
+ "x_a2 = 0 \n",
+ "\n",
+ "\t# At point 1, the average molecular weight is\n",
+ "M_1 = x_a1*M_a+(1-x_a1)*M_b \t\t\t\t# [gram/mole]\n",
+ "\t# At point 2, the average molecular weight is\n",
+ "M_2 = x_a2*M_a+(1-x_a2)*M_b\n",
+ "\t# Molar density at point 1 and 2\n",
+ "row_1 = den_ab/M_1 \t\t\t\t\t# [kmole/cubic m]\n",
+ "row_2 = den_b/M_2\n",
+ "row_avg = (row_1+row_2)/2 \t\t\t\t# [kmole/cubic m]\n",
+ "\n",
+ "\t# Using equation 1.96\n",
+ "\n",
+ "N_a = si_a*D_ab*row_avg*math.log((si_a-x_a2)/(si_a-x_a1))/(delta*10**-3) \t# [kmole/square \t\t\t\t\t\t\t\t\t\tm.s]\n",
+ "rate = N_a*M_c*3600 \t\t\t\t\t# [kg/square m of crystal surface area \t\t\t\t\t\t\tper hour]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"the rate at which the crystal dissolves in solution is\",round(rate),\"kg/square m of crystal surface area per hour\" \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the rate at which the crystal dissolves in solution is 30.0 kg/square m of crystal surface area per hour\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.20 Page number:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.20\n",
+ "# Steady-State Molecular Diffusion in Porous Solid \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A-hydrogen B-ethane\n",
+ "T = 373 \t\t\t\t\t# [K]\n",
+ "P = 10 \t\t\t\t\t# [atm]\n",
+ "d = 4000 \t\t\t\t\t# [Angstrom]\n",
+ "e = 0.4 \t\t\t\t\t# [porosity]\n",
+ "t = 2.5 \t\t\t\t\t# [tortuosity]\n",
+ "D_AB = 0.86/P \t\t\t\t\t# [square cm/s]\n",
+ "k = 1.3806*10**-23 \t\t\t\t# [J/K]\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Using data from Appendix B for hydrogen and ethane, and equation (1.45)\n",
+ "sigma_A = 2.827 \t\t\t\t# [Angstrom]\n",
+ "sigma_B = 4.443 \t\t\t\t# [Angstrom]\n",
+ "sigma_AB = ((sigma_A+sigma_B)/2)*10**-10 \t# [m]\n",
+ "\n",
+ "lamda=k*T/(math.sqrt(2)*3.14*(sigma_AB**2)*P*1.01325*10**5) # [m]\n",
+ "lamda=lamda*10**10 # [Angstrom]\n",
+ "\t\t# From equation 1.101\n",
+ "K_n = lamda/d \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The value of a dimensionless ratio, Knudsen number is \",round(K_n,3) \n",
+ "\t# If K_n is less than 0.05 then diffusion inside the pores occurs only by ordinary \t\tmolecular diffusion and equation 1.100 can be used to calculate D_ABeff\n",
+ "D_ABeff = D_AB*e/t \n",
+ "print\"The effective diffusivity of hydrogen in ethane is\",round(D_ABeff,3),\"square cm /s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of a dimensionless ratio, Knudsen number is 0.022\n",
+ "The effective diffusivity of hydrogen in ethane is 0.014 square cm /s\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.21 Page number:60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.21\n",
+ "#Knudsen Diffusion in Porous Solid \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-oxygen b-nitrogen\n",
+ "T = 293 \t\t\t\t\t\t# [K]\n",
+ "P = 0.1 \t\t\t\t\t\t# [atm]\n",
+ "d = 0.1*10**-6 \t\t\t\t\t# [m]\n",
+ "e = 0.305 \t\t\t\t\t \t# [porosity]\n",
+ "t = 4.39 \t\t\t\t\t\t# [tortuosity]\n",
+ "k = 1.3806*10**-23 \t\t\t\t\t# [J/K]\n",
+ "l = 2*10**-3 \t\t\t\t\t\t# [m]\n",
+ "R = 8.314 \t\t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "x_a1 = 0.8 \n",
+ "x_a2 = 0.2 \n",
+ "M_a = 32.0 \t\t\t\t\t\t# [gram/mole]\n",
+ "M_b = 28.0 \t\t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "\t# Using data from Appendix B for oxygen and nitrogen, and equation (1.45)\n",
+ "sigma_a = 3.467 \t\t\t\t\t# [Angstrom]\n",
+ "sigma_b = 3.798 \t\t\t\t\t# [Angstrom]\n",
+ "sigma_AB = ((sigma_a+sigma_b)/2)*10**-10 \t\t# [m]\n",
+ "\n",
+ "lamda = k*T/(math.sqrt(2)*3.14*(sigma_AB**2)*P*1.01325*10**5) # [m]\n",
+ "\t# From equation 1.101\n",
+ "K_n = lamda/d \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The value of a dimensionless ratio, Knudsen number is \",round(K_n,3) \n",
+ "\t# If K_n is greater than 0.05 then transport inside the pores is mainly by Knudsen \t\t\tdiffusion\n",
+ "\t# Using equation 1.103\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "D_Ka = (d/3)*(math.sqrt(8*R*T)/math.sqrt(3.14*M_a*10**-3)) # [square m/s]\n",
+ "\n",
+ "\t# Using equation 1.107\n",
+ "D_Kaeff = D_Ka*e/t \t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "p_a1 = (x_a1*P)*1.01325*10**5 \t\t\t\t# [Pa]\n",
+ "p_a2 = (x_a2*P)*1.01325*10**5 \t\t\t\t# [Pa]\n",
+ "\n",
+ "\t# Using equation 1.108\n",
+ "N_a = D_Kaeff*(p_a1-p_a2)/(R*T*l) \t\t\t# [mole/square m.s]\n",
+ "\t# Now using the Graham\u2019s law of effusion for Knudsen diffusion\n",
+ "\t# N_b/N_a = -math.sqrt(M_a/M_b) ,therefore\n",
+ "N_b = -N_a*math.sqrt(M_a/M_b) \t\t\t\t# [mole/square m.s]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The diffusion fluxes of both components oxygen and nitrogen are \",round(N_a,5),\"mole/square m.s and\",round(N_b,5),\"mole/square m.s respectively\\n\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of a dimensionless ratio, Knudsen number is 6.813\n",
+ "The diffusion fluxes of both components oxygen and nitrogen are 0.00127 mole/square m.s and -0.00136 mole/square m.s respectively\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.22 Page number:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 1.22\n",
+ "#2 Combined Molecular and Knudsen Diffusion in a Porous Solid \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-oxygen b-nitrogen\n",
+ "T = 293 \t\t\t\t\t\t# [K]\n",
+ "P = 0.1 \t\t\t\t\t\t# [atm]\n",
+ "d = 0.3*10**-6 \t\t\t\t\t# [m]\n",
+ "e = 0.305 \t\t\t\t\t\t# [porosity]\n",
+ "t = 4.39 \t\t\t\t\t\t# [tortuosity]\n",
+ "k = 1.3806*10**-23 \t\t\t\t\t# [J/K]\n",
+ "R = 8.314 \t\t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "l = 2*10**-3 \t\t\t\t\t\t# [m]\n",
+ "D_ab = 2.01*10**-4 \t\t\t\t\t# [square m/s]\n",
+ "y_a1 = 0.8 \n",
+ "y_a2 = 0.2 \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "\t# Using data from Appendix B for oxygen and nitrogen, and equation (1.45)\n",
+ "sigma_a = 3.467 \t\t\t\t\t# [Angstrom]\n",
+ "sigma_b = 3.798 \t\t\t\t\t# [Angstrom]\n",
+ "sigma_AB = ((sigma_a+sigma_b)/2)*10**-10 \t\t# [m]\n",
+ "\n",
+ "lamda = k*T/(math.sqrt(2)*3.14*(sigma_AB**2)*P*1.01325*10**5) # [m]\n",
+ "\t# From equation 1.101\n",
+ "K_n = lamda/d \n",
+ "print\"The value of a dimensionless ratio,Knudsen number is \",round(K_n,2) \n",
+ "\n",
+ "\t# It means that both molecular and Knudsen diffusion are important and equation (1.109) \t\tmust be used to calculate N_a\n",
+ "\t# From example 1.21 N_b/N_a = -1.069\n",
+ "\t# Therefore si_a = 1/(1+(N_b/N_a))\n",
+ "si_a = 1/(1+(-1.069)) \n",
+ "\n",
+ "\t# From equation 1.100\n",
+ "D_abeff = D_ab*e/t \t\t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "\t# From equation 1.103\n",
+ "D_Ka = 0.440*10**-4\t\t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "\t# Using equation 1.107\n",
+ "D_Kaeff = D_Ka*e/t \t\t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "Y_a = 1+(D_abeff/D_Kaeff) \n",
+ "\n",
+ "\t# Using equation 1.109 to calculate N_a\n",
+ "N_a = (si_a*P*1.01325*10**5*D_abeff*math.log((si_a*Y_a-y_a2)/(si_a*Y_a-y_a1)))/(R*T*l) \n",
+ "N_b = -1.069*N_a \n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The diffusion fluxes of both components oxygen and nitrogen are\",round(N_a,5),\"mole/square m.s and\",round(N_b,5),\"mole/square m.s respectively\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of a dimensionless ratio,Knudsen number is 2.27\n",
+ "The diffusion fluxes of both components oxygen and nitrogen are 0.00311 mole/square m.s and -0.00332 mole/square m.s respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.23 Page number:62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.23\n",
+ "#Dextrin Diffusion in a Porous Membrane\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# A-beta dextrin B-water\n",
+ "T = 293 \t\t\t\t\t\t# [K]\n",
+ "d = 88.8 \t\t\t\t\t\t# [Average pore diameter, Angstrom]\n",
+ "d_mol = 17.96 \t\t\t\t\t\t# [Molecular diameter, Angstrom]\n",
+ "e = 0.0233 \t\t\t\t\t\t# [porosity]\n",
+ "t = 1.1 \t\t\t\t\t\t# [tortuosity]\n",
+ "D_AB = 3.22*10**-6 \t\t\t\t\t# [square cm/s]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\t# Using equation 1.111 to calculate restrictive factor\n",
+ "K_r = (1-(d_mol/d))**4\n",
+ "\n",
+ "\t# Using equation 1.110 to calculate effective diffusivity\n",
+ "D_ABeff = e*D_AB*K_r/t \t\t\t\t# [square cm/s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The effective diffusivity of beta-dextrin at 298 K is\",round(D_ABeff,10),\"square cm/s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective diffusivity of beta-dextrin at 298 K is 2.76e-08 square cm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.24 Page number:63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 1.24\n",
+ "#Hydrodynamic Flow in a Porous Diaphragm\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-nitrogen\n",
+ "P_atm = 1.01325*10**5 \t\t\t\t\t # [Pa]\n",
+ "T = 300 \t \t\t\t\t # [K]\n",
+ "P_2 = 10130 \t\t\t\t\t\t # [Pa]\n",
+ "P_1 = 500+P_2 \t\t\t\t\t\t # [Pa]\n",
+ "d = 0.01*10**-2 \t\t\t\t\t# [average pore diameter, m]\n",
+ "u = 180 \t\t\t\t\t\t# [micro Poise]\n",
+ "u = 180*10**-6*10**-1 \t\t\t\t\t# [Pa.s] \n",
+ "l = 25.4*10**-3 \t\t\t\t\t# [m]\n",
+ "v = 0.05 \t\t\t\t\t\t# [volumetric flow rate, cubic m/square \t\t\t\t\t\t\tm.s]\n",
+ "R = 8.314 \t\t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\t# Solution (a)\n",
+ "\n",
+ "P_avg = (P_1+P_2)/2 \t\t\t\t\t# [Pa]\n",
+ "\t# The mean free path for nitrogen is from equation (1.102)\n",
+ "lamda = 0.622*10**-6 \t\t\t\t\t# [m]\n",
+ "K_n = lamda/d \n",
+ "\t# Therefore, Knudsen diffusion will not occur and all the flow observed is of a \thydrodynamic nature.\n",
+ "\n",
+ "\t# From the ideal gas law, the nitrogen flux corresponding to the volumetric flow rate of \t0.05 m3/m2-s at 300 K and 1 atm\n",
+ " \n",
+ "N_a = P_atm*v/(R*T) \t\t\t\t\t# [mole/square m.s]\n",
+ "\t# Using equation 1.113\n",
+ "B_o = u*R*T*N_a*l/(P_avg*(P_1-P_2)) \t\t\t# [square m]\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The value of the viscous flow parameter is\",round(B_o,13),\"square m\\n\\n\" \n",
+ "\n",
+ "\t#Illustration 1.24 (b) - Page:64\n",
+ "\t# Solution (b)\t\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "T1 = 393 \t\t\t\t\t\t# [K]\n",
+ "u = 220 \t\t\t\t\t\t# [micro Poise]\n",
+ "u = 220*10**-6*10**-1 \t\t\t\t\t# [Pa.s]\n",
+ "\t# Substituting in equation (1.113) the new values of temperature and viscosity and the \tvalue of B_o, obtained in part (a) while maintaining the pressure conditi# ons unchanged, \twe get N_a\n",
+ "N_a1 = B_o*P_avg*(P_1-P_2)/(l*T*u*R) \t\t\t# [mole/square m.s]\n",
+ "v1 = N_a1*R*T/P_atm \t\t\t\t\t# [cubic m(measured at 300 K and 1 atm)/ \t\t\t\t\t\t\tsquare m.s]\t\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The nitrogen flow to be expected at 393 K with the same pressure difference is \",round(v1,3),\"cubic m/sqm.s (measured at 300 K and 1 atm)\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the viscous flow parameter is 4.463e-10 square m\n",
+ "\n",
+ "\n",
+ "The nitrogen flow to be expected at 393 K with the same pressure difference is 0.041 cubic m/sqm.s (measured at 300 K and 1 atm)\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 2.ipynb b/Beginning_C++_through_Game_Programming/Chapter 2.ipynb
new file mode 100755
index 00000000..f981ce8e
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 2.ipynb
@@ -0,0 +1,1156 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:. Convective Mass Transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page number94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.1\n",
+ "#Mass-Transfer Coefficients in a Blood Oxygenator\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# a-oxygen b-stagnant water\n",
+ "T = 310 \t\t\t\t\t# [K]\n",
+ "\t# Since the solubility of oxygen in water at 310 K is extremely low, we are dealing with \tdilute solutions\n",
+ "k_L = 3.3*10**-5 \t\t\t\t# [coefficient based on the oxygen concentration \t\t\t\t\t\tdifference in the water, m/s]\n",
+ "row = 993 \t\t\t\t\t# [kg/cubic m]\n",
+ "M_b = 18 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ " \n",
+ "\t# Since we are dealing with very dilute solutions\n",
+ "\t# Therefore, c = (row/M_avg) = row/M_b\n",
+ "c = row/M_b \t\t\t\t\t# [kmole/cubic m]\n",
+ "\t# Using equation 2.10\n",
+ "k_x = k_L*c \t\t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The mass-transfer coefficient based on the mole fraction of oxygen in the liquid is\",round(k_x,5),\" kmole/square m.s\" \n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass-transfer coefficient based on the mole fraction of oxygen in the liquid is 0.00182 kmole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.2,Page number:95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.2\n",
+ "#Mass-Transfer Coefficient in a Gas Absorber\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# a-ammonia b-air\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 1 \t\t\t\t\t\t# [atm]\n",
+ "y_a1 = 0.8 \t\t\t\t\t# [ammonia mole fraction in the bulk of the gas \t\t\t\t\t\t\tphase]\n",
+ "y_a2 = 0.732 \t\t\t\t\t# [ammonia gas-phase mole fraction on interface]\n",
+ "N_a = 4.3*10**-4 \t\t\t\t# [ammonia flux, kmole/square m.s]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "\t# Using equation 2.2\n",
+ "F_g = N_a/math.log10((1-y_a2)/(1-y_a1)) \t\t# [kmole/square m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The mass-transfer coefficient in the gas phase at that point where flux is 4.3*10**-4 is\",round(F_g,5),\" kmole/square m.s\"\n",
+ "print\"\\n\\nNOTE:Calculation mistake in book:\\nAnswer written as 1.47*10^-4,Actually,,...it is 1.47*10^-3.Please REDO last calculation manually to check\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass-transfer coefficient in the gas phase at that point where flux is 4.3*10**-4 is 0.00338 kmole/square m.s\n",
+ "\n",
+ "\n",
+ "NOTE:Calculation mistake in book:\n",
+ "Answer written as 1.47*10^-4,Actually,,...it is 1.47*10^-3.Please REDO last calculation manually to check\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.3,Page number:96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.3\n",
+ "#Mass-Transfer Coefficient in a Packed-Bed Distillation Column\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t\t# a-methanol b-water\n",
+ "P = 101.3 \t\t\t\t\t\t# [kPa]\n",
+ "y_a1 = 0.707 \t\t\t\t\t\t# [mole fraction at interface]\n",
+ "y_a2 = 0.656 \t\t\t\t\t\t# [mole fraction at bulk of the gas]\n",
+ "k_g = 1.62*10**-5 \t\t\t\t\t# [mass-transfer coefficient at a point \t\t\t\t\t\t\t in the column, kmole/square m.s.kPa]\n",
+ "#Calculations\n",
+ "\n",
+ "\t# Using equation 2.14\n",
+ "k_y = k_g*P \t\t\t\t\t\t# [kmole/square m.s]\n",
+ "\t# Using equation 2.12\n",
+ "N_a = k_y*(y_a1-y_a2) \t\t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The methanol flux at the point of given mass transfer coefficient is\",round(N_a,7),\"kmole/square m.s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The methanol flux at the point of given mass transfer coefficient is 8.37e-05 kmole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page number:99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.4\n",
+ "# Mass Transfer into a Dilute Stream Flowing Under Forced Convection in a Circular Conduit\n",
+ "\n",
+ "n = 6 # [number of variables]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "import math\n",
+ "# To determine the number of dimensionless parameters to be formed, we must know the rank, r, of the dimensional matrix.\n",
+ "# The dimensional matrix is \n",
+ "DM =matrix([[0,0,1,1,0,0],[1,1,-3,-1,2,1],[-1,-1,0,0,-1,-1]]) \n",
+ "rk= linalg.matrix_rank(DM)\n",
+ "print\"Rank of matrix is \",rk \n",
+ "\n",
+ "#The numbers in the table represent the exponent of M, L, and t in the dimensional expression of each of the six variables involved. For example, the dimensional expression of p is M/Lt hence the exponents are 1, -1, and -1\n",
+ "\n",
+ "# From equation 2.16\n",
+ "i = n-rk # [number of dimensional groups]\n",
+ "# Let the dimensional groups are pi1, pi2 and pi3\n",
+ "# Therefore pi1 = (D_AB)**a*(row)**b*(D)**c*kc\n",
+ "# pi2 = (D_AB)**d*(row)**e*(D)**f*v\n",
+ "# pi3 = (D_AB)**g*(row)**h*(D)**i*u\n",
+ "\n",
+ "# Solving for pi1\n",
+ "# M**0*L**0*t**0 = 1 = (L**2/t)**a*(M/L**3)**b*(L)**c*(L/t)\n",
+ "\n",
+ "# Solution of simultaneous equation\n",
+ "def F(e):\n",
+ " f1 = 2*e[0]-3*e[1]+e[2]+1 \n",
+ " f2 = -e[0]-1 \n",
+ " f3 = -e[1] \n",
+ " return(f1,f2,f3)\n",
+ "\n",
+ "\n",
+ "# Initial guess:\n",
+ "e = [0.1,0.8,0.5] \n",
+ "y = fsolve(F,e) \n",
+ "a = y[0] \n",
+ "b = y[1] \n",
+ "c = y[2] \n",
+ "print\"The coefficients of pi1 are\",a,round(b),c \n",
+ "# Similarly the coefficients of pi2 and pi3 are calculated\n",
+ "# Therefore we get pi1 = kc*D/D_AB = Sh i.e. Sherwood Number\n",
+ "# pi2 = v*D/D_AB = P_ed i.e. Peclet Number\n",
+ "# pi3 = u/(row*D_AB) = Sc i.e. Schmidt Number\n",
+ "\n",
+ "# Dividing pi2 by pi3 gives\n",
+ "# pi2/pi3 = D*v*row/u = Re i.e. Renoylds number\n",
+ "\n",
+ "print\"The result of the dimensional analysis of forced-convection mass transfer in a circular conduit indicates that a correlating relation could be of the form\\n Sh = function(Re,Sc)\\n which is analogous to the heat transfer correlation \\n Nu = function(Re,Pr)\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rank of matrix is 3\n",
+ "The coefficients of pi1 are -1.0 0.0 1.0\n",
+ "The result of the dimensional analysis of forced-convection mass transfer in a circular conduit indicates that a correlating relation could be of the form\n",
+ " Sh = function(Re,Sc)\n",
+ " which is analogous to the heat transfer correlation \n",
+ " Nu = function(Re,Pr)\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.6,Page number:111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.6\n",
+ "#Mass Transfer to Fluid Flow Normal to a Cylinder\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-UF6 b-air\n",
+ "M_a = 352 \t\t\t\t\t# [molecular weight of UF6, gram/mole]\n",
+ "M_b = 29 \t\t\t\t\t# [gram/mole]\n",
+ "d = 0.01 \t\t\t\t\t# [diameter, m]\n",
+ "x = 0.1 \t\t\t\t\t# [length exposed to air stream, m]\n",
+ "v = 1 \t\t\t\t\t\t# [m/s]\n",
+ "Ts = 303 \t\t\t\t\t# [surface temperature of solid, K]\n",
+ "P_a = 27 \t\t\t\t\t# [vapor pressure of UF6, kPa]\n",
+ "Tb = 325 \t\t\t\t\t# [bulk temperature of solid ,K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "import math\n",
+ "\n",
+ "y_a1 = P_a/P \t\t\t\t\t# [mole fraction at point 1]\n",
+ "y_a2 = 0 \t\t\t\t\t# [mole fraction at point 2]\n",
+ "\n",
+ "\t# Along the mass-transfer path-cylinder surface (point 1) to bulk air (point 2)\n",
+ "Tavg = (Ts+Tb)/2 \t\t\t\t# [K]\n",
+ "\n",
+ "\t# At point 1, the gas is saturated with UF6 vapor, while at point 2 the gas is virtually \tfree of UF6\n",
+ "\t# Therefore\n",
+ "Pavg = (P_a+0)/2 \t\t\t\t# [average partial pressure, kPa]\n",
+ "y_a = Pavg/P \t\t\t\t\t# [mole fraction of UF6]\n",
+ "\n",
+ "Mavg = M_a*y_a+M_b*(1-y_a) \t\t\t# [gram/mole]\n",
+ "row_avg = P*Mavg/(R*Tavg) \t\t\t# [kg/cubic m]\n",
+ "\n",
+ "\t# Parameter for c-O2, d-N2 and a-UF6\n",
+ "yi_c = 0.182 \n",
+ "yi_d = 0.685 \n",
+ "yi_a = 0.133 \n",
+ "Tc_c = 154.6 \t\t\t\t# [K]\n",
+ "Tc_d = 126.2 \t\t\t\t\t# [K]\n",
+ "Tc_a = 505.8 \t\t\t\t\t# [K]\n",
+ "Pc_c = 50.4 \t\t\t\t\t# [bar]\n",
+ "Pc_d = 33.9 \t\t\t\t\t# [bar] \n",
+ "Pc_a = 46.6 \t\t\t\t\t# [bar]\n",
+ "M_c = 32 \t\t\t\t# [gram/mole]\n",
+ "M_d = 28 \t\t\t\t\t# [gram/mole] \n",
+ "M_a = 352 \t\t\t\t\t# [gram/mole]\n",
+ "V_c = 73.4 \t\t\t\t# [cubic cm/mole]\n",
+ "V_d = 89.8 \t\t\t\t\t# [cubic cm/mole]\n",
+ "V_a = 250 \t\t\t\t\t# [cubic cm/mole]\n",
+ "Z_c = 0.288 \n",
+ "Z_d = 0.290 \n",
+ "Z_a = 0.277 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\n",
+ "\t# From equation 2.52 and 2.53\n",
+ "Tcm = yi_c*Tc_c+yi_d*Tc_d+yi_a*Tc_a \t\t# [K]\n",
+ "Pcm = 10**6*R*Tcm*(yi_c*Z_c+yi_d*Z_d+yi_a*Z_a)/((yi_c*V_c+yi_d*V_d+yi_a*V_a)*100000) \t# [bar]\n",
+ "M_avg = yi_c*M_c+yi_d*M_d+yi_a*M_a \t\t# [gram/mole]\n",
+ "\n",
+ "\t# From equation 2.50\n",
+ "Em = 0.176*(Tcm/(M_avg**3*Pcm**4))**(1.0/6.0) \t# [uP]**-1\n",
+ "\n",
+ "\t# From equation 2.51\n",
+ "Trm = Tavg/Tcm \n",
+ "f_Trm = (0.807*Trm**0.618)-(0.357*math.exp(-0.449*Trm))+(0.340*math.exp(-4.058*Trm))+0.018 \n",
+ "\t# From equation 2.49 \n",
+ "u = f_Trm/Em \t\t\t\t\t\t# [uP]\n",
+ "u = u*10**-7 \t\t\t\t\t\t# [viscosity, kg/m.s]\n",
+ "\n",
+ "Re = d*v*row_avg/u \t\t\t\t\t# [Renoylds number]\n",
+ "\n",
+ "\t\t# Diffusivity of UF6 vapors in air at 314 K and 1 atm from equation 1.49\n",
+ "D_ab = 0.0904 \t\t\t\t\t\t# [square cm/s]\n",
+ "\n",
+ "Sc = u/(row_avg*D_ab*10**-4) \t\t\t\t# [Schmidt number]\n",
+ "\n",
+ "Sh_avg = 0.43 + 0.532*Re**0.5*Sc**0.31 \t\t# [Sherwood number]\n",
+ "\t\t# From equation 1.7\n",
+ "c = P/(R*Tavg) \t\t\t\t\t# [kmole/cubic m]\n",
+ "\t\t# From Table 2.1 \n",
+ "F_av = Sh_avg*D_ab*c*10**-4/d \t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "\t\t# From equation 2.2\n",
+ "N_avg = F_av*math.log((1-y_a2)/(1-y_a1)) \t\t# [kmole/square m.s]\n",
+ "S = 2*math.pi*d**2/4 +math.pi*d*x \t\t\t# [total surface area of the cylinder, \t\t\t\t\t\t\tsquare m]\n",
+ "\n",
+ "w_a = N_avg*S*M_a \t\t\t\t\t# [rate of sublimation of the solid, \t\t\t\t\t\t\tkg/s] \n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of sublimation of a cylinder of UF6 is\",round(w_a,5),\"kg/s\\n\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of sublimation of a cylinder of UF6 is 0.00023 kg/s\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.7,Page number:116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.7\n",
+ "# The Chilton-Colburn Analogy\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# a-benzene b-nitrogen\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "v =10 \t\t\t\t\t\t# [m/s]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "\n",
+ "\n",
+ "n = -0.5 \n",
+ "\t# Data on the properties of C02 at 300 K and 1 bar\n",
+ "u = 1.5*10**-5 \t\t\t\t# [viscosity, P]\n",
+ "Pr = 0.77 \t\t\t\t\t# [Prandtl number]\n",
+ "Cp = 853 \t\t\t\t\t# [J/kg.K]\n",
+ "\t# Therefore\n",
+ "\t# b = 5.086*l**0.5\n",
+ "\t# j_D = j_H = f(Re) = 5.086*(l**0.5)*Re**-0.5\n",
+ "\t# From Table 2.1\n",
+ "\t# F = j_D*c*v/Sc**(2/3) = 5.086*(l**0.5)*c*v/(Re**0.5*Sc**(2/3)) = \t\t5.086*(row*v*u)**0.5/(Mavg*Sc**(2.0/3.0))\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\t# Vapor pressure of benzene\n",
+ "P_a = math.exp(15.9008-(2788.51/(T-52.36))) \t# [mm of Hg]\n",
+ "P_a = P_a*101.3/760 \t\t\t\t\t# [kPa]\n",
+ "\n",
+ "\t# Parameter for a-benzene, b-nitrogen \n",
+ "yi_a = 0.07 \n",
+ "yi_b = 0.93 \n",
+ "Tc_a = 562.2 \n",
+ "Tc_b = 126.2 \t\t\t\t\t\t# [K]\n",
+ "Pc_a = 48.9 \n",
+ "Pc_b = 33.9 \t\t\t\t\t\t# [bar]\n",
+ "M_a = 78.1 \n",
+ "M_b = 28 \t\t\t\t\t\t# [gram/mole]\n",
+ "V_a = 259 \n",
+ "V_b = 89.8 \t\t\t\t\t\t# [cubic cm/mole]\n",
+ "Z_a = 0.271 \n",
+ "Z_b = 0.290 \n",
+ "sigma_a = 5.349 \n",
+ "sigma_b = 3.798 \t\t\t\t\t# [Angstrom]\n",
+ "ek_a = 412.3 \n",
+ "ek_b = 71.4 \t\t\t\t\t\t# [E/k, K]\n",
+ "\n",
+ "\n",
+ "\t# From equation 2.52 and 2.53\n",
+ "Tcm = yi_b*Tc_b+yi_a*Tc_a \t\t\t\t# [K]\n",
+ "Pcm = 10**6*R*Tcm*(yi_b*Z_b+yi_a*Z_a)/((yi_b*V_b+yi_a*V_a)*100000) \t # [bar]\n",
+ "M_avg = yi_b*M_b+yi_a*M_a \t\t\t\t\t\t# [kg/kmole]\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"Average molecular weight is\",round(M_avg,1),\"kg/kmole\" \n",
+ "\n",
+ "row = P*M_avg/(R*T) \t\t\t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"Density of mixture is\",round(row,2),\"kg/cubic\"\n",
+ "\t# From equation 2.50\n",
+ "Em = 0.176*(Tcm/(M_avg**3*Pcm**4))**(1.0/6.0) \t\t\t# [uP]**-1\n",
+ "\n",
+ "\t# From equation 2.51\n",
+ "Trm = T/Tcm \n",
+ "f_Trm = (0.807*Trm**0.618)-(0.357*math.exp(-0.449*Trm))+(0.340*math.exp(-4.058*Trm))+0.018 \n",
+ "\t# From equation 2.49 \n",
+ "u = f_Trm/Em \t\t\t\t\t\t\t\t# [uP]\n",
+ "u = u*10**-7 \t\t\t\t\t\t\t\t# [viscosity, kg/m.s]\n",
+ "print\"Average viscosity of mixture is \",round(u,7),\"kg/m.s\\n\\n\" \n",
+ "\n",
+ "\t# Calculating diffusivity of benzene using equation 1.49\n",
+ "D_ab = 0.0986 \t\t\t\t\t\t\t\t# [square cm/s]\n",
+ "Sc = u/(row*D_ab*10**-4) \t\t\t\t\t\t# [Schmidt number]\n",
+ "\n",
+ "F = 5.086*(row*v*u)**0.5/(M_avg*Sc**(2.0/3.0)) \t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print\"The required mass transfer coefficient is\",round(F,5),\"kmole/square m.s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average molecular weight is 31.5 kg/kmole\n",
+ "Density of mixture is 1.28 kg/cubic\n",
+ "Average viscosity of mixture is 1.64e-05 kg/m.s\n",
+ "\n",
+ "\n",
+ "The required mass transfer coefficient is 0.00196 kmole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.8,Page number:120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 2.8\n",
+ "#Benzene Evaporation Along a Vertical Flat Plate\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "\t# a-liquid benzene b-nitrogen\n",
+ "T = 300 \t\t\t\t\t\t# [K]\n",
+ "l = 3 \t\t\t\t\t\t\t# [length of vertical plate, m]\n",
+ "b = 1.5 \t\t\t\t\t\t# [width of vertical plate, m]\n",
+ "P = 101.3 \t\t\t\t\t\t# [kPa]\n",
+ "v = 5 \t\t\t\t\t\t\t# [velocity across the width of plate, \t\t\t\t\t\t\tm/s]\n",
+ "row_a = 0.88 \t\t\t\t\t\t# [gram/cubic cm]\n",
+ "\n",
+ "\n",
+ "y_a1 = 0.139 \t\t\t\t\t\t# [mole fraction of benzene at inner \t\t\t\t\t\t\tedge]\n",
+ "y_a2 = 0 \n",
+ "\n",
+ "\t# The film conditions, and average properties, are identical to those in Example 2.7, \tonly the geometry is different\n",
+ "\t# Therefore\n",
+ "M_avg = 31.4 \t\t\t\t\t\t# [kg/kmole]\n",
+ "row = 1.2 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "u = 161*10**-7 \t\t\t\t\t# [kg/m.s]\n",
+ "D_ab = 0.0986 \t\t \t\t\t\t# [square cm/s]\n",
+ "Sc = 1.3 \t\t\t\t\t\t# [Schmidt Number]\n",
+ "Re = row*v*b/u \t\t\t\t\t# [Renoylds Number]\n",
+ "\n",
+ "if Re > 4000:\n",
+ " print\"The flow across the plate is turbulent\\n\" \n",
+ "elif Re<2000:\n",
+ " print\"The flow across the plate is laminar\\n\" \n",
+ "\t#Using equation 2.57\n",
+ "Sh_l = 0.036*Re**0.8*Sc**(1.0/3.0) \n",
+ "\n",
+ "\t# Nitrogen (component B) does not react with benzene (component A), neither dissolves in \t\tthe liquid therefore, NB = 0 and siA = 1. The F-form of the mass-transfer coefficient \t\t\tshould be used \n",
+ "F = Sh_l*1.26*D_ab*10**-4/(M_avg*b) \t\t\t# [kmole/square m.s]\n",
+ "N_a = F*math.log((1-y_a2)/(1-y_a1)) \t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "\t# The total mass rate of evaporation over the surface of the plate\n",
+ "S = 1.5*3 \t\t\t\t\t\t# [square m]\n",
+ "M_a = 78.1 \t\t\t\t\t\t# [gram/mole]\n",
+ "wa = N_a*S*M_a*60*1000 \t\t\t\t# [gram/min]\n",
+ "\n",
+ "V = wa/row_a \t\t\t\t\t\t# [volumetric flow rate, ml/min]\n",
+ "\n",
+ "print\"Liquid benzene should be supplied at the top of the plate at the rate \",round(V),\"ml/min\\nso that evaporation will just prevent it from reaching the bottom of the plate.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flow across the plate is turbulent\n",
+ "\n",
+ "Liquid benzene should be supplied at the top of the plate at the rate 1473.0 ml/min\n",
+ "so that evaporation will just prevent it from reaching the bottom of the plate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.9,Page number:123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 2.9\n",
+ "#Evaporation of a Drop of Water Falling in Air\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-water b-air\n",
+ "dp1 = 10**-3 \t\t\t\t\t# [diameter of spherical drop of water, m]\n",
+ "Tair = 323 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "Twater = 293 \t\t\t\t\t# [K]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "M_a = 18.0 \t\t\t\t\t# [gram/mole]\n",
+ "M_b = 29.0 \t\t\t\t\t# [gram/mole]\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "dp2 = (1.0/2.0)**(1.0/3.0)*dp1 \t\t# [m]\n",
+ "dp = (dp1+dp2)/2 \t\t\t\t# [m]\n",
+ "\n",
+ "row_p = 995 \t\t\t\t\t# [density of water, kg/cubic m]\n",
+ "row1b = 1.094 \t\t\t\t\t# [density of air, kg/cubic m]\n",
+ "u = 1.95*10**-5 \t\t\t\t# [kg/m.s]\n",
+ "row_pr = row_p-row1b \t\t\t\t# [kg/cubic m]\n",
+ "g = 9.8 \t\t\t\t\t# [accleration due to gravity, square m/s]\n",
+ "\t# Combining equation 2.68 and 2.69\n",
+ "Ga = 4*dp**3*row1b*row_pr*g/(3*u**2) \t\t# [Galileo Number]\n",
+ "\n",
+ "\t# Relationship between Re and Cd\n",
+ "\t# Re/Cd = Re**3/Ga = 3*row**2*vt**3/(4*g*u*row_pr)\n",
+ "\n",
+ "\t# The following correlation is used to relate Re/Cd, to Ga\n",
+ "\t# ln(Re/Cd)**(1/3) = -3.194 + 2.153*ln(Ga)**(1/3) - 0.238*(ln(Ga)**(1/3))**2 + \t0.01068*(ln(Ga)**(1/3))**3\n",
+ "\t# Therefore let A = (Re/Cd)\n",
+ "A = math.exp(-3.194 + 2.153*math.log(Ga**(1.0/3.0)) - 0.238*(math.log(Ga**(1.0/3.0)))**2 + 0.01068*(math.log(Ga**(1.0/3.0)))**3) \n",
+ "\n",
+ "\t# Therefore 'vt' will be\n",
+ "vt = A*(4*g*row_pr*u/(3*row1b**2))**(1.0/3.0) \t# [Terminal velocity of particle, m/s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Terminal velocity of particle is\",round(vt,2),\"m/s\" \n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "P_w = 2.34 \t\t\t\t\t# [vapor pressure of water, kPa]\n",
+ "y_w = P_w/P \t\t\t\t\t# [mole fraction of water at the inner edge of \t\t\t\t\t\tthe gas film]\n",
+ "M_avg = 18*y_w+29*(1-y_w) \t\t\t# [gram/mole]\n",
+ "\n",
+ "row2b = P*M_avg/(R*Twater) \t\t\t# [kg/cubic.m]\n",
+ "delta_row = row2b - row1b \t\t\t# [kg/cubic.m]\n",
+ "\n",
+ "Tavg = (Tair+Twater)/2 \t\t\t# [K]\n",
+ "\t\t# At Temperature equal to Tavg density and viscosity are\n",
+ "row3 = 1.14 \t\t\t\t\t# [kg/cubic.m]\n",
+ "u1 = 1.92*10**-5 \t\t\t\t# [kg/m.s]\n",
+ "\n",
+ "Grd = g*row3*delta_row*(dp**3)/(u1**2) \n",
+ "\n",
+ "\t\t# Diffusivity of water at Tavg and 1 atm is\n",
+ "D_ab = 0.242*10**-4 \t\t\t\t# [square m/s]\n",
+ "Sc = u1/(row3*D_ab) \t\t\t\t# [Schmidt Number]\n",
+ "Re = dp*row3*vt/u1 \t\t\t\t# [Renoylds Number]\n",
+ "\t\n",
+ "\t# From equation 2.65 Re is greater than 0.4*Grd**0.5*Sc**(-1/6)\n",
+ "\t# Therfore equation 2.64 can be used to calculate mass transfer coefficient\n",
+ "\n",
+ "Sh = 2+0.552*(Re**0.5)*Sc**(1.0/3.0) \t\t# [Sherwood Number]\n",
+ "\t# From Table 2.1\n",
+ "\t# Sh = kc*P_bm*dp/(P*D_ab), since P_bm is almost equal to P\n",
+ "\t# Therefore \n",
+ "\t# Sh = kc*dp/D_ab \n",
+ "kc = Sh*D_ab/dp \t\t\t\t# [m/s]\n",
+ "\n",
+ "ca2 = 0 \t\t\t\t\t# [dry air concentration]\n",
+ "ca1 = P_w/(R*Twater) \t\t\t\t# [interface concentration, kmole/cubic.m]\n",
+ "\t# Average rate of evaporation \n",
+ "wa = math.pi*dp**2*M_a*kc*(ca1-ca2)*1000 \t# [g/s]\n",
+ "\n",
+ "\t# Amount of water evaporated\n",
+ "m = row_p*math.pi*dp1**3/12*1000 \t\t# [g]\n",
+ "\t# Time necessary to reduce the volume by 50%\n",
+ "t = m/wa \t\t\t\t\t# [s]\n",
+ "\n",
+ "D = t*vt \t\t\t\t\t# [distance of fall, m]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The distance of fall is\",round(D),\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Terminal velocity of particle is 3.59 m/s\n",
+ "The distance of fall is 90.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.10,Page number:127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 2.10\n",
+ "#Mass Transfer for a Single Cylinder\n",
+ "\n",
+ "#Variable declaratiopn\n",
+ "\n",
+ "\t# Example 2.6 using equation 2.73\n",
+ "\t# Values of the dimensionless parameters calculated in Example 2.6\n",
+ "Re = 1223 \t\t\t\t# [Renoylds Number]\n",
+ "Sc = 0.905 \t\t\t\t# [Schmidt Number]\n",
+ "c = 0.039 \t\t\t\t# [molar density, kg/cubic m]\n",
+ "v = 1 \t\t\t\t\t# [gas velocity, m/s]\n",
+ "\t# Therefore \n",
+ "#Calculations\n",
+ "\n",
+ "Gm = c*v \t\t\t\t# [kmole/square m.s]\n",
+ "\t# From equation 2.9 \n",
+ "\t# Kg*P = ky\n",
+ "\t# Therefore substituting in equation 2.73 we obtain\n",
+ "ky = 0.281*Gm/(Re**0.4*Sc**0.56) \t# [kmole/square m.s]\n",
+ "\t# Now equation 2.73 were obtained under very dilute concentrations\n",
+ "\t# Therefore\n",
+ "y_bm = 1 \n",
+ "\t# From equation 2.6\n",
+ "F = ky*y_bm \t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Mass transfer coefficient is \",round(F,6),\"kmol/m.^2-s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass transfer coefficient is 0.000675 kmol/m.^2-s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.11,Page number:129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.11\n",
+ "#Simultaneous Heat and Mass Transfer in Pipe\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "# a-water b-air\n",
+ "D = 25.4*10**-3 \t\t\t\t# [diameter of wetted wall tower, m]\n",
+ "Gy = 10 \t\t\t\t\t# [mass velocity, kg/square m.s]\n",
+ "T1 = 308 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "p_a1 = 1.95 \t\t\t\t\t# [partial pressure of water vapor, kPa]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "M_a = 18 \t\t\t\t\t# [gram/mole]\n",
+ "Cpa = 1.88 \t\t\t\t\t# [kJ/kg.K]\n",
+ "\n",
+ "\n",
+ "# Properties of dry air at 308 K and 1 atm pressure are\n",
+ "u = 1.92*10**-5 \t\t\t\t# [kg/m.s]\n",
+ "row = 1.14 \t\t\t\t\t# [kg/cubic m]\n",
+ "D_ab = 0.242*10**-4 \t\t\t\t# [square m/s]\n",
+ "Sc = 0.696 \t\t\t\t\t# [Schmidt number]\n",
+ "Cp = 1.007 \t\t\t\t\t# [kJ/kg.K]\n",
+ "k = 0.027 \t\t\t\t\t# [W/m.K]\n",
+ "Pr = 0.7 \t\t\t\t\t# [Prandtl number]\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "\n",
+ "Re = D*Gy/u \t\t\t\t\t# [Renoylds number]\n",
+ "# From equation 2,74\n",
+ "Sh = 0.023*Re**0.83*Sc**0.44 \t\t\t#[Sherwood number]\n",
+ "# From Table 2.1\n",
+ "kg = Sh*D_ab/(R*T1*D)*1000 \t\t\t# [mole/square m.s.kPa]\n",
+ "\n",
+ "# To estimate the heat-transfer coefficient, we use the Dittus-Boelter equation for cooling, equation 2.80\n",
+ "Nu = 0.023*Re**0.8*Pr**0.3 \t\t\t# [Nusselt number]\n",
+ "# From Table 2.1\n",
+ "h = Nu*k/D \t\t\t\t\t# [W/square m.K]\n",
+ "\n",
+ "T =373.15 \t\t\t\t\t# [K]\n",
+ "lambda_a = 40.63 \t\t\t\t# [kJ/mole]\n",
+ "Tc = 647.1 \t\t\t\t\t# [K]\n",
+ "\n",
+ "# Solution of simultaneous equation 2.78 and 2.79\n",
+ "def F(e): \n",
+ " f1=kg*(p_a1 - math.exp(16.3872-(3885.7/(e[0]-42.98))))-e[1] \n",
+ " f2=e[1]*M_a*Cpa*(T1-e[0])/(1-exp(-e[1]*M_a*Cpa/h)) + 1000*e[1]*lambda_a*((1-(e[0]/Tc))/(1-(T/Tc)))**0.38 \n",
+ " return(f1,f2) \n",
+ "\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [292,-0.003] \n",
+ "y = fsolve(F,e) \n",
+ "Ti = y[0] \n",
+ "Na = y[1] \n",
+ "\n",
+ "print\"The temperature of the liquid water and the rate of water evaporation is\",round(Ti),\"K and\",round(Na,3),\" mole/square m.s respectively\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature of the liquid water and the rate of water evaporation is 295.0 K and -0.013 mole/square m.s respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.12,Page number:131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.12\n",
+ "#Air Humidification in Wetted- Wall Column \n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-water b-dry air\n",
+ "D = 25.4*10**-3 \t\t\t# [Internal diameter of tower, m]\n",
+ "Z = 1.5 \t\t\t\t# [length of the wetted section, m]\n",
+ "Gy = 10 \t\t\t\t# [mass velocity of air, kg/square m.s]\n",
+ "Tair = 308 \t\t\t\t# [K]\n",
+ "Twater = 295 \t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t# [kPa]\n",
+ "M_a = 18.0 \t\t\t\t# [gram/mole]\n",
+ "M_b = 29.0 \t\t\t\t# [gram/mole]\n",
+ "R = 8.314 \t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "Pa = 2.64 # [kPa]\n",
+ "\n",
+ "Gm = Gy/M_b \t# [Assuming that gas phase is basically dry air, kmole/square m.s]\n",
+ "\t\t# The properties of dry air at 308 K and 1 atm are (from example 2.9)\n",
+ "row = 1.14 \t\t\t\t# [kg/cubic m]\n",
+ "u = 1.92*10**-5 \t\t\t# [kg/m.s]\n",
+ "D_ab = 0.242*10**-4 \t\t\t# [square m/s]\n",
+ "Sc = 0.692 \t\t\t\t# [Schmidt number]\n",
+ "\n",
+ "Re = Gy*D/u \t\t\t\t# [Renoylds number]\n",
+ "\n",
+ "if Re<35000 and Re>2000:\n",
+ " Sh = 0.023*Re**0.83*Sc**0.44 \t# [Sherwood number] \n",
+ " print\"Sherwood number is\",round(Sh,1) \n",
+ "else:\n",
+ " print\"We cannot use equation 2.74\"\n",
+ "\n",
+ "c = P/(R*Tair) \t\t\t# [kmole/cubic m]\n",
+ "\t# Now using equation 2.89\n",
+ "Pa_out = Pa*(1-math.exp((-4*Sh*Z*c*D_ab)/(Gm*D**2))) \t\t# [kPa]\n",
+ "\n",
+ "#Result\n",
+ "print\"The partial pressure of water in the air leaving the tower is\",round(Pa_out,2),\"kPa\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sherwood number is 51.6\n",
+ "The partial pressure of water in the air leaving the tower is 1.94 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.13,Page number:134"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 2.13\n",
+ "# Air Humidification in a Packed Bed\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-water b-dry air\n",
+ "Gy = 10.0 \t\t\t\t# [kg/square m.s]\n",
+ "dp = 3.5*10**-3 \t\t\t# [diameter of spherical glass beads, m]\n",
+ "D = 25.4*10**-3 \t\t\t# [Internal diameter of tower, m]\n",
+ "Tair = 308 \t\t\t\t# [K]\n",
+ "Twater = 295 \t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t# [kPa]\n",
+ "M_a = 18 \t\t\t\t# [gram/mole]\n",
+ "M_b = 29 \t\t\t\t# [gram/mole]\n",
+ "R = 8.314 \t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\t# The properties of dry air at 308 K and 1 atm are (from example 2.12)\n",
+ "row = 1.14 \t\t\t\t# [kg/cubic m]\n",
+ "u = 1.92*10**-5 \t\t\t# [kg/m.s]\n",
+ "D_ab = 0.242*10**-4 \t\t\t# [square m/s]\n",
+ "Sc = 0.692 \t\t\t\t# [Schmidt number]\n",
+ "c = 0.04 \t \t\t\t# [mole/cubic m]\n",
+ "Gm = 0.345 \t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "Re = Gy*dp/u \t\t\t\t# [Renoylds number]\n",
+ "if Re<2500 and Re>10:\n",
+ " \t\t\t\t\t# Subsituting in equation 2.90\n",
+ " jd = 1.17*Re**-0.415 \n",
+ " print\"Renoylds number is \",Re\n",
+ "else:\n",
+ " print \" \"\n",
+ "Std = 0.052/(Sc**(2.0/3.0)) \n",
+ "\t\t# From Table 2.1 \n",
+ "Sh = Std*Re*Sc \t\t\t# [Sherwood number]\n",
+ "\t\t# From equation 2.94\n",
+ "e = 0.406+0.571*(dp/D) \t\t# [bed porosity]\n",
+ "e=round(e,3)\n",
+ "\t#Illustration 2.13(a) \n",
+ "\t# Solution(a)\n",
+ "\t# Now Paout = 0.99*Pa\n",
+ "\t# Using equation 2.93 to calculate 'Z'\n",
+ "def f12(Z):\n",
+ " return(0.99 - 1 + math.exp(-6*(1-e)*Sh*c*Z*D_ab/(Gm*dp**2))) \n",
+ "Z = fsolve(f12,0.06) \n",
+ "\n",
+ "#Result\n",
+ "Z=round(Z[0],3)\n",
+ "print\"The depth of packing required is\",Z,\"m=\",Z*100,\"cm\" \n",
+ "\n",
+ "\t#Illustration 2.13(b)\n",
+ "\t# Solution(b)\n",
+ "\t# From equation 2.95\n",
+ "deltaP = (150*(1-e)/Re + 1.75)*((1-e)*(Gy**2)*Z)/(dp*row*e**3) \t# [Pa]\n",
+ "\n",
+ "#Result\n",
+ "print\"The gas pressure drop through the bed is\",round(deltaP),\"Pa (Approx) \\nDUE TO LACK OF PRECISION IN CALCULATION IN BOOK.\\niF DONE MANUALLY,THIS ANSWER STANDS CORRECT\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Renoylds number is 1822.91666667\n",
+ "The depth of packing required is 0.078 m= 7.8 cm\n",
+ "The gas pressure drop through the bed is 15817.0 Pa (Approx) \n",
+ "DUE TO LACK OF PRECISION IN CALCULATION IN BOOK.\n",
+ "iF DONE MANUALLY,THIS ANSWER STANDS CORRECT\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.14,Page number:138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 2.14\n",
+ "#Design of a Hollow-Fiber Boiler Feed Water Deaerator\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-oxygen b-water\n",
+ "\t# To design the deaerator, We will use commercially available microporous polypropylene \thollow fibers in a module\n",
+ "\n",
+ "m = 40000.0 \t\t\t\t\t# [kg/hr]\n",
+ "Twater = 298 \t\t\t\t\t# [K]\n",
+ "v = 0.1 \t\t\t\t\t# [superficial velocity, m/s]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "V = 40*10**-3 \t\t\t\t\t# [Flow rate of nitrogen, cubic m/min]\n",
+ "d = 2.90*10**-4 \t\t\t\t# [Outside diameter of fibres, m]\n",
+ "pf = 0.4 \t\t\t\t\t# [Packing factor]\n",
+ "a = 46.84*100 \t\t\t\t\t# [surface area per unit volume, m**-1]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "dw = 1000 \t\t\t\t\t# [density of water, kg/cubic m]\n",
+ "Ql = m/(3600*1000) \t\t\t\t# [volumetric water flow rate, cubic m/s]\n",
+ "\t# Shell diameter\n",
+ "D = (4*Ql/(math.pi*v))**0.5 \t\t\t# [Shell diameter, m]\n",
+ "\n",
+ "\t# the properties of dilute mixtures of oxygen in water at 298 K\n",
+ "u = 0.9 \t\t\t\t\t# [cP]\n",
+ "\t# Diffusivity from equation 1.53\n",
+ "D_ab = 1.93*10**-9 \t\t\t\t# [square m/s]\n",
+ "Sc = 467 \t\t\t\t\t# [Schmidt number]\n",
+ "\n",
+ "Re = d*v*dw/(u*10**-3) \t\t\t# [Renoylds number]\n",
+ "\n",
+ "\t# Substituting in equation (2-97) gives\n",
+ "Sh = 0.53*(1-1.1*pf)*((1-pf)/pf)**-0.47*(Re**0.53*Sc**0.33) \n",
+ "\n",
+ "kl = Sh*D_ab/d \t\t\t\t# [mass-transfer coefficient on the shell side, \t\t\t\t\t\tm/s]\n",
+ "\n",
+ "\t# From the specified BFW flow rate\n",
+ "L = m/(3600*18) \t\t\t\t# [kmole/s]\n",
+ "\t# From ideal gas law\n",
+ "V1 = V*P/(Twater*R*60) \t\t\t# [kmole/s]\n",
+ "\t# From the solubility of oxygen in water at 298 K,\n",
+ "M = 4.5*10**4 \n",
+ "A = L/(M*V1) \t\t\t\t\t# [Absorption factor]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Absorption factor is\",round(A,3) \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\t# For 99% removal of the dissolved oxygen\n",
+ "\t# x_in/x_out = b = 100\n",
+ "b = 100 \n",
+ "c = 55.5 \t\t\t\t\t# [molar density, kmole/cubic m]\n",
+ "\t# Substituting in equation 2.99 yields\n",
+ "V_T = (L*math.log(b*(1-A)+A))/(kl*a*c*(1-A)) \t # [cubic m]\n",
+ "\n",
+ "\t# The module length, Z is\n",
+ "Z = V_T/(math.pi*D**2.0/4.0) \n",
+ "\n",
+ "#Result\n",
+ "print\"The shell diameter and module length is\",round(D,3),\"m and\",round(Z,2),\" m respectively\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absorption factor is 0.503\n",
+ "The shell diameter and module length is 0.376 m and 2.15 m respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.15,Page number:140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 2.15\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=2.21/100\t\t\t#[m]\n",
+ "mu=8.82*10**-6\t\t#[kg/m-s]\n",
+ "rho=2.81\t\t#[kg/m**3]\n",
+ "\n",
+ "c=34.14\t\t\t#[mol/m**3]\n",
+ "D=array([2.228/(10**6),2.065/(10**6),1.832/(10**6)]) #Velocities in [m**2/s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#Gy=rho*v\t\t\n",
+ "#Re=Gy*d/mu\t\t#Reynolds number\n",
+ "Re=21750\n",
+ "print \"Reynolds number=\",Re\n",
+ "Sc=[]\n",
+ "Sh=[]\n",
+ "F=[]\n",
+ "for i in range(0, 3):\n",
+ " sc=mu/(rho*D[i]) #Schmidt number\n",
+ " Sc.append(sc)\n",
+ " sh=0.023*Re**(0.83)*sc**(0.44) #Sherwood number\n",
+ " Sh.append(sh)\n",
+ " f=sh*c*D[i]/d #Binary mass transfer coefficient in [mol/m^2-s]\n",
+ " F.append(f)\n",
+ "print \"Schmidt number are:\"\n",
+ "for i in range(0,3):\n",
+ " print round(Sc[i],3)\n",
+ "print \"Sherwood number number are:\"\n",
+ "for i in range(0,3):\n",
+ " print round(Sh[i],1)\n",
+ "print\"Binary mass transfer coefficients are:\"\n",
+ "for i in range(0,3):\n",
+ " print round(F[i],3)\n",
+ "#After modifying mathcad program of example 1.17,we have\n",
+ "N1=-0.0527 #[mol/m^2-s]\n",
+ "N2=0.0395 #[mol/m^2-s]\n",
+ "N3=0.0132 #[mol/m^2-s]\n",
+ "print\"The program yields the following results:\"\n",
+ "print \"N1=\",N1,\"mol/m**2-s\"\n",
+ "print \"N2=\",N2,\"mol/m**2-s\"\n",
+ "print \"N3=\",N3,\"mol/m**2-s\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number= 21750\n",
+ "Schmidt number are:\n",
+ "1.409\n",
+ "1.52\n",
+ "1.713\n",
+ "Sherwood number number are:\n",
+ "106.5\n",
+ "110.1\n",
+ "116.1\n",
+ "Binary mass transfer coefficients are:\n",
+ "0.367\n",
+ "0.351\n",
+ "0.328\n",
+ "The program yields the following results:\n",
+ "N1= -0.0527 mol/m**2-s\n",
+ "N2= 0.0395 mol/m**2-s\n",
+ "N3= 0.0132 mol/m**2-s\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 3.ipynb b/Beginning_C++_through_Game_Programming/Chapter 3.ipynb
new file mode 100755
index 00000000..5994f443
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 3.ipynb
@@ -0,0 +1,889 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:lnterphase Mass Transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.1,Page number:161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 3.1\n",
+ "#Application of Raoult\u2019s Law to a Binary System\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-benzene b-toluene\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "x_a = 0.4 \t\t\t\t\t# [mole fraction in liquid phase]\n",
+ "\t# Antoine constants for benzene and toluene are given\n",
+ "\t# For benzene\n",
+ "A_a = 15.9008 \n",
+ "B_a = 2788.51 \n",
+ "C_a = -52.36 \n",
+ "# For toluene\n",
+ "A_b = 16.0137 \n",
+ "B_b = 3096.52 \n",
+ "C_b = -53.67 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "\t# Using equation 3.5 vapor pressure of component 'a' and 'b'\n",
+ "P_a = math.exp(A_a-(B_a/(T+C_a))) \t\t# [mm of Hg]\n",
+ "P_b = math.exp(A_b-(B_b/(T+C_b))) \t\t# [mm of Hg]\n",
+ "\n",
+ "P_a = P_a*101.3/760 \t\t\t\t# [kPa]\n",
+ "P_b = P_b*101.3/760 \t\t\t\t# [kPa]\n",
+ "\t# Partial pressure of component 'a' and 'b'\n",
+ "p_a = x_a*P_a \t\t\t\t\t# [kPa]\n",
+ "p_b = (1-x_a)*P_b \t\t\t\t# [kPa]\n",
+ "P_total = p_a+p_b \t\t\t\t# [kPa]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The total equilibrium pressure of the binary system of benzene and toluene is\",round(P_total,2),\" kPa\" \n",
+ "\n",
+ "y_a = p_a/P_total \t\t\t\t# [mole fraction in vapor phase]\n",
+ "print\"The composition of the vapor in equilibrium is\",round(y_a,3) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total equilibrium pressure of the binary system of benzene and toluene is 8.02 kPa\n",
+ "The composition of the vapor in equilibrium is 0.688\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.2,Page number:162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 3.2\n",
+ "#Henry's Law: Saturation of Water with Oxygen\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A-oxygen B-water\n",
+ "T = 298 \t\t\t\t\t# [K]\n",
+ "H = 4.5*10**4 \t\t\t\t\t# [atm/mole fraction]\n",
+ "P = 1 \t\t\t\t\t\t# [atm]\n",
+ "row_B = 1000.0 \t\t\t\t\t# [density of water, kg/cubic m]\n",
+ "M_B = 18.0 \t\t\t\t\t# [Molecular mass of water, gram/mole]\n",
+ "M_A = 32.0 \t\t\t\t\t# [,Molecular mass of oxygen, gram/mole]\n",
+ "\n",
+ "\n",
+ "\t# Dry air contains 21% oxygen then p_A = y*P = 0.21 atm\n",
+ "\t# Therefore using Henry's Law\n",
+ "p_A = 0.21 \t\t\t\t\t# [atm]\n",
+ "x_A = p_A/H \t\t\t\t\t# [mole fraction in liquid phase]\n",
+ "\n",
+ "\t# Basis: 1L of saturated solution\n",
+ "\t# For 1 L of very dilute solution of oxygen in water, the total moles of solution, n_t, \twill be approximately equal to the moles of water\n",
+ "n_t = row_B/M_B\n",
+ "\t# Moles of oxygen in 1L saturated solution is\n",
+ "n_o = n_t*x_A \t\t\t\t\t# [mole]\n",
+ "\t# Saturation concentration\n",
+ "c_A = n_o*M_A*1000 \t\t\t\t# [mg/L]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The saturation concentration of oxygen in water exposed to dry air at 298 K and 1 atm is\",round(c_A,2),\"mg/L\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The saturation concentration of oxygen in water exposed to dry air at 298 K and 1 atm is 8.3 mg/L\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3,Page number:162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.3\n",
+ "#Material Balances Combined with Equilibrium Relations: Algebraic Solution \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-ammonia b-air c-water\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "R = 8.314 \t\t\t\t\t# [cubic m.Pa/mole.K]\n",
+ "V_b = 15.0 \t\t\t\t\t# [cubic m]\n",
+ "m_a = 10.0 \t\t\t\t\t# [kg]\n",
+ "m_c = 45.0 \t\t\t\t\t# [kg]\n",
+ "M_a = 17.0 \t\t\t\t\t# [molecular mass of ammonia, gram/mole\n",
+ "M_c = 18.0 \t\t\t\t\t# [molecular mass of water, gram/mole]\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "n_b = V_b*P/(R*T) \t\t\t\t# [kmole]\n",
+ "n_a = m_a/M_a \t\t\t\t\t# [kmole]\n",
+ "n_c = m_c/M_c \t\t\t\t\t# [kmole]\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "def f12(L_a):\n",
+ " return(((n_a-L_a)/(n_b+n_a-L_a))-(10.51*(0.156+(0.622*(L_a/(n_c+L_a))*(5.765*(L_a/(n_c+L_a))-1)))*(L_a/(n_c+L_a)))) \n",
+ "L_a = fsolve(f12,0.3) # [kmole]\n",
+ "\n",
+ "x_a = L_a/(n_c+L_a) \n",
+ "y_a = (n_a-L_a)/(n_b+n_a-L_a) \n",
+ "gammma_a = 0.156+0.622*x_a*(5.765*x_a-1) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"At equilibrium the ammonia content of the liquid phase will be\",x_a[0] \n",
+ "print\"At equilibrium the ammonia content of the gas phase will be\",y_a[0] \n",
+ "print\"The amount of ammonia absorbed by the water will be\",round(L_a[0],3),\"kmole\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At equilibrium the ammonia content of the liquid phase will be 0.144495485596\n",
+ "At equilibrium the ammonia content of the gas phase will be 0.214117393686\n",
+ "The amount of ammonia absorbed by the water will be 0.422 kmole\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.4,Page number:169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.4\n",
+ "#Mass-Transfer Resistances During Absorption of Ammonia by Water\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-ammonia\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "Kg = 2.75*10**-6 \t\t\t\t# [kmole/square m.s.kPa]\n",
+ "m = 1.64 \n",
+ "res = 0.85 \t\t\t\t\t# [gas phase resistance]\n",
+ "xa_g = 0.115/100.0 \t\t\t\t# [mole fraction of NH3 in liquid phase at a \t\t\t\t\t\t\tpoint]]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "ya_g = 8.0/100.0 \t\t\t\t\t# [mole fraction of NH3 in gas phase at a \t\t\t\t\t\t\tpoint]\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "Ky = Kg*P \t\t\t\t\t# [kmole/square m.s]\n",
+ "\t# Using equation 3.24\n",
+ "ky = Ky/res \t\t\t\t\t# [kmole/square m.s]\n",
+ "\t\t\t\t\t\t# Using equation 3.21\n",
+ "def f12(kx):\n",
+ " return((m/kx)-(1/Ky)+(1/ky)) \n",
+ "kx = fsolve(f12,0.0029) \t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "\t# Interfacial concentrations at this particular point in the column, using equation \t\t\t(3.15)\n",
+ "ystar_a = m*xa_g \n",
+ "\t# Using equation 3.12\n",
+ "N_a = Ky*(ya_g-ystar_a) \t\t\t# [kmole/square m.s]\n",
+ "\t# Gas-phase interfacial concentration from equation (3.9)\n",
+ "ya_i = ya_g-(N_a/ky) \n",
+ "\t# Since the interfacial concentrations lie on the equilibrium line, therefore\n",
+ "xa_i = ya_i/m \n",
+ "\t# Cross checking the value of N_a\n",
+ "N_a = kx*(xa_i-xa_g) \t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The individual liquid film coefficient and gas film coefficient are\",round(kx[0],5),\"kmole/square m.s and \",round(ky,6),\"kmole/square m.s respectively\" \n",
+ "\n",
+ "print\"The gas phase and liquid phase interfacial concentrations are\",round(ya_i,5),\"and,\",round(xa_i,5),\"respectively\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The individual liquid film coefficient and gas film coefficient are 0.00305 kmole/square m.s and 0.000328 kmole/square m.s respectively\n",
+ "The gas phase and liquid phase interfacial concentrations are 0.0136 and, 0.00829 respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.5,Page number:171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.5\n",
+ "#Absorption of Ammonia by Water: Use of F-Type Mass-Transfer Coefficients \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-ammonia\n",
+ "T = 300 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "ya_g = 0.6 \t\t\t\t\t# [ammonia concentration in bulk gas]\n",
+ "xa_l = 0.12 \t\t\t\t\t# [ammonia concentration in bulk liquid]\n",
+ "Fl = 3.5*10**-3 \t \t\t\t# [kmole/square m.s]\n",
+ "Fg = 2*10**-3 \t\t\t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve \n",
+ "# Algebraic solution (a)\n",
+ "\n",
+ "\n",
+ "def f12(xa_i):\n",
+ " return(1-(1-ya_g)*((1-xa_l)/(1-xa_i))**(Fl/Fg) - 10.51*(0.156+0.622*xa_i*(5.765*xa_i-1))*xa_i) \n",
+ "xa_i = fsolve(f12,0.2) \n",
+ "\n",
+ "ya_i = 1-(1-ya_g)*((1-xa_l)/(1-xa_i))**(Fl/Fg) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The local gas and liquid interfacial concentrations are\",round(ya_i[0],3),\"and\",round(xa_i[0],3),\"respectively\" \n",
+ "\t# Using equation 3.28 \n",
+ "\n",
+ "N_a = Fg*math.log((1-ya_i)/(1-ya_g)) \n",
+ "\n",
+ "print\"The local ammonia mass-transfer flux is\",round(N_a,5),\"kmole/square m.s\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The local gas and liquid interfacial concentrations are 0.494 and 0.231 respectively\n",
+ "The local ammonia mass-transfer flux is 0.00047 kmole/square m.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.6,Page number:174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.6\n",
+ "#Distillation of a Mixture of Methanol and Water in a Packed Tower: Use of F-Type #Mass-Transfer oefficients\n",
+ "\n",
+ "#Variable declaration\n",
+ "# a-methanol b-water\n",
+ "T = 360.0 # [K]\n",
+ "P = 101.3 # [kPa]\n",
+ "lambda_a = 33.3 # [MJ/kmole]\n",
+ "lambda_b = 41.3 # [MJ/kmole]\n",
+ "Fg = 0.0017 # [kmole/square m.s]\n",
+ "Fl = 0.0149 # [kmole/square m.s]\n",
+ "yag = 0.36 # [bulk gas phase concentration]\n",
+ "xag = 0.20 # [bulk liquid phase concentration]\n",
+ "R = 1.987 \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "\n",
+ "sia_ag= 1.0/(1-(lambda_a/lambda_b))\n",
+ "print\"sia_g is\",sia_ag\n",
+ "#sia_ag =5.155 \n",
+ "sia_al = sia_ag \n",
+ "# Therefore equation 3.29 becomes\n",
+ "# yai = 5.155-4.795(4.955/(5.155-xai))**8.765\n",
+ "\n",
+ "# Using equation 3.33, 3.34, 3.35\n",
+ "V2 = 18.07 # [cubic cm/mole]\n",
+ "V1 = 40.73 # [cubic cm/mole]\n",
+ "a12 = 107.38 # [cal/mole]\n",
+ "a21 = 469.5 # [cal/mole]\n",
+ "\n",
+ "# Solution of simultaneous equation \n",
+ "def F(e):\n",
+ " x1,x2,y1,y2,e4=e\n",
+ " \n",
+ " #####SIDE Quantities#####\n",
+ " a=(V1/V2)*math.exp(-a21/(R*e4)) #d2lT\n",
+ " a1=(V2/V1)*math.exp(-a12/(R*e4)) #dl2(T) \n",
+ " b=math.exp(16.2620-3800.0/(e4-47)) #P2(T)\n",
+ " b1=math.exp(16.5938-3644.3/(e4-33)) #P1(T)\n",
+ " c=math.exp(-log(x2+x1*a)-x1*(a1/(x1+x2*a1)-a/(x2+x1*a))) #gamma_2\n",
+ " d=math.exp(-log(x1+x2*a1)-x1*(a1/(x1+x2*a1)-a/(x2+x1*a))) #gamma_1\n",
+ " #########################\n",
+ " x1=1-x2\n",
+ " y2=1-y1\n",
+ " y1=5.155-4.795*(4.955/(5.155-x2))**(Fl/Fg) \n",
+ " y1=x1*d*b1/P\n",
+ " y2=x2*c*b/P\n",
+ " return(x1,x2,y1,y2,e4) \n",
+ "# Initial guess\n",
+ "y = fsolve(F,(0.1,0.9,0.2,0.8,300)) \n",
+ "xai = y[0] \n",
+ "xbi = y[1] \n",
+ "yai = y[2] \n",
+ "ybi = y[3] \n",
+ "T = y[4] # [K]\n",
+ "\n",
+ "print\"yai is\",yai\n",
+ "print\"ybi is\",ybi\n",
+ "print\"xai is\",xai\n",
+ "print\"xbi is\",xbi\n",
+ "print\"Temperature is\",T,\"K\" \n",
+ "# Local Methanol flux, using equation 3.28\n",
+ "Na = sia_ag*Fg*math.log((sia_ag-yai)/(sia_ag-yag)) # [kmole/square m.s]\n",
+ "# From energy balance\n",
+ "Nb = -(lambda_a/lambda_b)*Na\n",
+ "#Result\n",
+ "\n",
+ "print\"Local Methanol flux is\",round(Na,4),\" (APPROX) kmole/square m.s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "sia_g is 5.1625\n",
+ "yai is 0.2\n",
+ "ybi is 0.8\n",
+ "xai is 0.1\n",
+ "xbi is 0.9\n",
+ "Temperature is 300.0 K\n",
+ "Local Methanol flux is 0.0003 (APPROX) kmole/square m.s\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "-c:46: RuntimeWarning: invalid value encountered in log\n",
+ "-c:51: RuntimeWarning: invalid value encountered in double_scalars\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.7,Page number:183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.7\n",
+ "#Recovery of Benzene Vapors from a Mixture with Air\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# 1-benzene a-absorber s-steams\n",
+ "T = 300 \t\t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t\t# [kPa]\n",
+ "R = 8.314 \t\t\t\t\t\t# [gas constant]\n",
+ "v = 1 \t\t\t\t\t\t\t# [cubic m/s]\n",
+ "\t# Gas in\n",
+ "y1a = 0.074 \n",
+ "\t# Liquid in\n",
+ "x2a = 0.0476\n",
+ "\t# Recovery is 85 %\n",
+ "\t# Calculations for absorber section\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "from pylab import *\n",
+ "from numpy import *\n",
+ "\n",
+ "\n",
+ "V1a = P*v/(R*T) \t\t\t\t\t# [kmole/s]\n",
+ "\t\t\t\t\t\t\t# Inert gas molar velocity\n",
+ "Vsa = V1a*(1-y1a) \t\t\t\t\t# [kmole/s]\n",
+ "Y1a = y1a/(1-y1a) \t\t\t\t\t# [kmole of benzene/kmole of dry gas]\n",
+ "\n",
+ "X2a = x2a/(1-x2a) \t\t\t\t\t# [kmole of benzene/kmole of oil]\n",
+ "\t# Since the absorber will recover 85% of the benzene in the entering gas, the \t\tconcentration of the gas leaving it will be\n",
+ "r = 0.85 \n",
+ "Y2a = (1-r)*Y1a \t\t\t\t\t# [kmole of benzene/kmole of dry gas]\n",
+ "\t# The benzene-wash oil solutions are ideal, and the pressure is low therefore, Raoult\u2019s \t\tlaw applies. From equations 3.1, 3.44, and 3.45\n",
+ "\t# yia = 0.136*xia\n",
+ "\t# or Yia/(1+Yia) = 0.136*Xia/(1+Xia)\n",
+ "\n",
+ "\t# Data_eqm = [Xia,Yia]\n",
+ "Data_eqm =matrix([[0,0],[0.1,0.013],[0.2,0.023],[0.3,0.032],[0.4,0.04],[0.6,0.054],[0.8,0.064],[1,0.073],[1.2,0.080],[1.4,0.086]])\n",
+ "\n",
+ "\t# Here because of the shape of equilibrium curve, the operating line for minimum oil rate \tmust be tangent to curve\n",
+ "\t# Therefore\n",
+ "\t# From the curve X1a_max = 0.91\n",
+ "X1a_max = 0.91 \t\t\t\t\t# [kmol benzene/kmol oil]\n",
+ "\n",
+ "\t# For minimum operating line slope is \n",
+ "S = (Y1a-Y2a)/(X1a_max-X2a) \t\t\t\t# [kmol oil/kmol air]\n",
+ "\t# Therfore\n",
+ "Lsa_min = S*Vsa \t\t\t\t\t# [kmole oil/s]\n",
+ "Data_minSlope1 = matrix([[X2a,Y2a],[X1a_max,Y1a]]) \n",
+ " \n",
+ "\t# For Actual operating line, oil flow rate is twice the minimum\n",
+ "Lsa = 2*Lsa_min \t\t\t\t\t# [kmole oil/s]\n",
+ "M_oil = 198 \t\t\t\t\t\t# [molecular weight of oil, gram/mole]\n",
+ "\n",
+ "Wsa = Lsa*M_oil \t\t\t\t\t# [mass flow rate of oil, kg/s]\n",
+ "\t# Using equation 3.47 to calculate the actual concentration of the liquid phase leaving \tthe absorber\n",
+ "X1a = X2a + Vsa*(Y1a-Y2a)/Lsa \t\t\t\t# [kmol benzene/kmol oil]\n",
+ "Data_opline1 = matrix([[X2a,Y2a],[X1a,Y1a]]) \n",
+ "figure(1)\n",
+ "a1=plot(Data_eqm[:,0],Data_eqm[:,1],label='$Equilibrium line for absorber$')\n",
+ "a2=plot(Data_minSlope1[:,0],Data_minSlope1[:,1],label='$Minimum Flow Rate Line for absorber$')\n",
+ "a3=plot(Data_opline1[:,0],Data_opline1[:,1],label='$Operating Line for absorber$') \n",
+ "legend(loc='lower right')\n",
+ "plt.grid()\n",
+ "xlabel(\"Xa,mole benzene/mole oil\") \n",
+ "ylabel(\"Ya, mole benzene/mole air\") \n",
+ "title(\"XY diagram for the absorber of Example 3.7\")\n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "show(a3)\n",
+ "\t# Calculations for stripping section\n",
+ "Lss = Lsa \n",
+ "X2s = X1a \n",
+ "X1s = X2a \n",
+ "Y1s = 0 \n",
+ "T = 373 # [K]\n",
+ "\t# Applying Raoult\u2019s law at this temperature gives us\n",
+ "\t# yis = 1.77*xis\n",
+ "\t# Yis/(1+Yis) = 1.77*Xis/(1+Xis)\n",
+ "\n",
+ "\t# Equilibrium data \n",
+ "\t# Data_equm = [Xis,Yis]\n",
+ "Data_equm = matrix([[0,0],[0.05,0.092],[0.1,0.192],[0.15,0.3],[0.2,0.418],[0.25,0.548],[0.3,0.691],[0.35,0.848],[0.4,1.023],[0.45,1.219],[0.5,1.439]]) \n",
+ "\n",
+ "\t# Similar procedure as above is followed\n",
+ "\t# The operating line for minimum oil rate must be tangent to curve \t\n",
+ "\t# Therefore from the curve\n",
+ "Y2s_max = 1.175 \t\t\t\t\t# [kmol benzene/kmol steam]\n",
+ "S = (Y2s_max-Y1s)/(X2s-X1s) \t\t\t\t# [kmole oil/kmole steam]\n",
+ "Vss_min = Lss/S \t\t\t\t\t# [kmole/s]\n",
+ "Vss = 1.5*Vss_min \t\t\t\t\t# [kmole/s]\n",
+ "Mss = 18 \t\t\t\t\t\t# [molecular weight of steam, gram/mole]\n",
+ "Wss = Vss*Mss \t\t\t\t\t\t# [kg steam/s]\n",
+ "\n",
+ "Data_minSlope2 = matrix([[X1s,Y1s],[X2s,Y2s_max]]) \n",
+ "\n",
+ "Y2s_act = Y1s + Lss*(X2s-X1s)/Vss \t\t\t# [kmol benzene/kmol steam]\n",
+ "\n",
+ "Data_opline2 = matrix([[X1s,Y1s],[X2s,Y2s_act]]) \n",
+ "\n",
+ "figure(2)\n",
+ "a1=plot(Data_equm[:,0],Data_equm[:,1],label='$Equilibrium line for stripping$')\n",
+ "a2=plot(Data_minSlope2[:,0],Data_minSlope2[:,1],label='$Minimum Flow Rate for stripping Line$')\n",
+ "a3=plot(Data_opline2[:,0],Data_opline2[:,1],label='$Operating Line for stripping$') \n",
+ "#legend(\"Equilibrium line for stripping\",\"Minimum Flow Rate for stripping Line\",\"Operating Line #for stripping\") \n",
+ "legend(loc='upper left')\n",
+ "xlabel(\"Xa, mole benzene/mole oil\") \n",
+ "ylabel(\"Ya, mole benzene/mole air\") \n",
+ "title(\"XY diagram for stripper of Example 3.7\")\n",
+ "plt.grid()\n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "show(a3)\n",
+ "#Result\n",
+ "\n",
+ "print\"The oil circulation rate and steam rate required for the operation is\",round(Wsa,2),\"kg/s\",round(Wss,3),\" kg steam/s respectively\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "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0ic6dO2NnZ8f169c1z2dlZRXb8Wr58uXcuXOnwK9yd3d3/Pz8SE9P\nB2SnrevXrz/2vdaqVYsmTZpoVjlCCGJiYgAIDg7WrGC05dVXX9VU0QwICKBLly6aeYu734N07tyZ\ngIAAQDaVr1+//iMVfItyQIqKiVoxKErNmjVrsLa21mwfffjhh/j7+3PkyBEGDx5Mnz59cHR0xNnZ\nGXt7e0D+Ur1w4UKhTUIe/CVqYmLyyDXAW2+9RUREBE5OTpiYmPD1119jYWFBQkKCZszIkSNJSEig\nTZs2CCGwsLDgp59+euRednZ2LF++HG9vb15++WV8fHwwNzcnMDCQcePGcfPmTbKzs5kwYQItWrR4\nrN5FixZRtWpVzbaRj48Po0aN4vfff9dsVdWqVYuNGzc+8r4enCcgIAAfHx/mzJlDVlYW7733Hi+8\n8ALVqlXT9HIu7PWF2WzZsmV4eXlp7JNXov7BMYXdL2+LK4+ZM2fi7e2Nk5MTNWrUYP369Y/MU5Qm\nRcVEld1W6JUzZ87g7+/PwoULDS2lQhAQEEBycvIjMQKFQpcox6BQKBSKAqgYg0KhUCgKoByDQqFQ\nKAqgHINCoVAoCqAcg0KhUCgKoByDQqFQKAqgHINCoVAoCqAcg0KhUCgK8P8uGUYSKPf5XQAAAABJ\nRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x79ad6a0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The oil circulation rate and steam rate required for the operation is 1.18 kg/s 0.059 kg steam/s respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.8,Page number:190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 3.8\n",
+ "#Adsorption of Nitrogen Dioxide on Silica Gel\n",
+ "\n",
+ "\n",
+ "from numpy import *\n",
+ "from pylab import *\n",
+ "#Variable declaration\n",
+ "\t# 1-Nitrogen dioxide 2-air\n",
+ "T = 298 \t\t\t\t\t# [K]\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "y1 = 0.015 \n",
+ "V1 = 0.5 \t\t\t\t\t# [mass flow rate of the gas entering the \t\t\t\t\t\tadsorber, kg/s]\n",
+ "M1 = 46 \t\t\t\t\t# [gram/mole]\n",
+ "M2 = 29 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\t# Data_eqm1 = [P1 m] (where 'P1' is Partial pressure of NO2 in mm of Hg, 'm' is solid \tconcentration in kg NO2/kg gel)\n",
+ "Data_eqm1 = matrix([[0,0],[2,0.4],[4,0.9],[6,1.65],[8,2.60],[10,3.65],[12,4.85]]) \n",
+ "\n",
+ "\n",
+ "Y1 = y1*M1/((1-y1)*M2) \t\t\t# [kg NO2/kg air]\n",
+ "\t# For 85% removal of the NO2,\n",
+ "Y2 = 0.15*Y1 \t\t\t\t\t# [kg NO2/kg air]\n",
+ "\t# Since the entering gel is free of NO2,\n",
+ "X2 = 0 \n",
+ "\n",
+ "Data_eqm =matrix([[0,0],[0.4,0.42],[0.9,0.83],[1.65,1.26],[2.6,1.69],[3.65,2.11],[4.85,2.54]]) \n",
+ "\n",
+ "\t# The operating line for minimum slope is tangent to curve, from which we get\n",
+ "X1_max = 0.0375 \t\t\t\t# [kg NO2/kg gel]\n",
+ "\n",
+ "wb1 = 1/(1+Y1) \n",
+ "Vs = V1*wb1 \t\t\t\t\t# [mass velocity of the air, kg/s] \n",
+ "Ls_min = Vs*(Y1-Y2)/(X1_max-X2) \t\t# [kg gel/s]\n",
+ "Data_minSlope = matrix([[X2,Y2],[X1_max,Y1]])*100 \n",
+ "\t\t\t\t\t\t# Operating line\n",
+ "Ls = 2*Ls_min \t\t\t\t\t# [kg gel/s]\n",
+ "\n",
+ "X1 = X2 + Vs*(Y1-Y2)/Ls \t\t\t# [kg NO2/kg gel]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "\n",
+ "a1=plot(Data_eqm[:,0],Data_eqm[:,1],label='$Equilibrium line$')\n",
+ "a2=plot(Data_minSlope[:,0],Data_minSlope[:,1],label='$Minimum Flow Rate Line$')\n",
+ "a3=plot((3.75,3.75),(0,2.45),'--')\n",
+ "a4=plot((0,3.75),(2.45,2.45),'r--')\n",
+ "legend(loc='upper left')\n",
+ "xlabel(\"$Xa*100, kg NO2/kg gel$\") \n",
+ "ylabel(\"$Ya*100, kh NO2/kg air$\") \n",
+ "title('X-Y diagram for the adsorber')\n",
+ "annotate(\"X1(max)\", xy=(3.75, 2.45), xytext=(4,2.5),\n",
+ " arrowprops=dict(facecolor='black', shrink=0.01),\n",
+ " )\n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "show(a3)\n",
+ "show(a4)\n",
+ "print\"Mass flow rate of the and the composition of the gel leaving the absorber are\",round(Ls,3),\"kg gel/s and\",round(X1,4),\"kg No2/kg gel\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEfCAYAAACqKwpQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYU0n3B/BvABtVQAUBG1awghVFBFGxl1fX3lZXEeyu\nde2rr12xu1awLSr2FVAEARtNqojKWpCODVQQpeT8/sjPvCLFgCEBOZ/n4VmTO3fuSXI3J3Nn7oyA\niAiMMcbYVxTkHQBjjLGyh5MDY4yxfDg5MMYYy4eTA2OMsXw4OTDGGMuHkwNjjLF8ODkwmbC0tMTh\nw4cBACdPnoSNjY2cIyqZlJQUWFhYQF1dHQsWLCiVY0ycOBHLly8vlbq/R0FBAc+ePSs39bLSw8mh\nAktPT0eDBg3w999/i5/78OED6tati/Pnz4ufS0lJQc2aNeHr65tn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P5Gd\nnY2rqyuHDx9m2bJlZGRkGF8bFRVlnOX4+voSHh7O119/TVJSEuvXr2fDhg24uLjw3XffsXjxYlQq\nFSqVip49ewKGEtbhw4e3OJZH29zc3Jg4cSLnzp0jPT2d5ORknJ2d8fDw4MSJE/j6+j6z362wEHoh\nxBNlZmY2+f2Kigq9Xq/XV1VV6adPn/7M4khISHhin4dj+eijj9o0PmE95DkHIZrhzp07TX7/s88+\nY+zYsRQWFrJs2bJnEkN5eXmDhenmxLJ06dI2i09YFzlDWggLkZycTHh4eKOVUEKYmyQHIYQQJmRB\nWgghhAlJDkIIIUxIchBCCGFCkoMQQggTkhyEEEKYkOQghBDChCQHIYQQJiQ5CCGEMPF/dKEv/A4J\nJaAAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x79c2c50>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate of the and the composition of the gel leaving the absorber are 0.535 kg gel/s and 0.0187 kg No2/kg gel\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.9,Page number:194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.9\n",
+ "#Cocurrent Adsorption of NO, on Silica Gel\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# 1-Nitrogen dioxide 2-air\n",
+ "\t# From Example 3.8\n",
+ "Y1 = 0.0242 \t\t\t\t\t# [kg NO2/kg air]\n",
+ "Y2 = 0.0036 \t\t\t\t\t# [kg NO2/kg air]\n",
+ "Vs = 0.488 \t\t\t\t\t# [kg air/s]\n",
+ "M1 = 46 \t\t\t\t\t# [gram/mole]\n",
+ "M2 = 29 \t\t\t\t\t# [gram/mole]\n",
+ "\t# However here\n",
+ "import math \n",
+ "from pylab import *\n",
+ "from numpy import *\n",
+ "X1 = 0 \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\t# Data_eqm1 = [P1 m] (where 'P1' is Partial pressure of NO2 in mm of Hg, 'm' is solid \tconcentration in kg NO2/kg gel)\n",
+ "Data_eqm1 =matrix([[0,0],[2,0.4],[4,0.9],[6,1.65],[8,2.60],[10,3.65],[12,4.85]]) \n",
+ "\n",
+ "\t# The equilibrium data are converted to mass ratios as follows:\n",
+ "\t# Yi = P1/(760-P1)*46/29 (kg NO2/kg air) Xi = m/100 (kg NO2/kg gel)\n",
+ "\t# Equilibrium data\n",
+ "\t# Data_eqm = [Xi*100 Yi*100]\n",
+ "\n",
+ "Data_eqm=matrix([[0,0],[0.4,0.4185242],[0.9,0.8392629],[1.65,1.2622336],[2.6,1.6874541],[3.65,2.1149425],[4.85,2.5447169]]) \n",
+ "\t# From the intersection of the minimum operating line and equilibrium curve\n",
+ "X2_max = 0.0034 \t\t\t\t# [kg NO2/kg gel]\n",
+ "S = (Y1-Y2)/(X1-X2_max) \t\t\t# [kg gel/kg air]\n",
+ "Ls_min = -S*Vs \t\t\t\t# [kg/s]\n",
+ "\n",
+ "Ls = 2*Ls_min \t\t\t\t\t# [kg/s]\n",
+ "Data_minSlope =matrix([[X1,Y1],[X2_max,Y2]])*100 \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "\n",
+ "a1=plot(Data_eqm[:,0],Data_eqm[:,1],label='$Equilibrium line $')\n",
+ "a2=plot(Data_minSlope[:,0],Data_minSlope[:,1],label='$Minimum Flow Rate Line$') \n",
+ "legend(loc='upper right') \n",
+ "xlabel(\"Xa*100, kg NO2/kg gel\") \n",
+ "ylabel(\"Ya*100, kh NO2/kg air\") \n",
+ "title('X-Y diagram for the cocurrent adsorber')\n",
+ "annotate(\"M\", xy=(0.34,0.36), xytext=(0.34,0.36)\n",
+ " )\n",
+ "annotate(\"X2(max)\", xy=(0.34,0.0), xytext=(0.34,0.01)\n",
+ " )\n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "print\"The mass velocity of the silica gel required for cocurrent operation is\",round(Ls,2),\"kg/s which is 11 times that required for countercurrent operation\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEZCAYAAABxbJkKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYFNf3P/D3IlgoIkVFmkoVLIANNSgoFuyYGIXEFv0a\nSzSaxJqfiRqNxsRo9GOJRgUVFTU2IiU2sIIoItgioqI0sQBKr+f3x4SNKywgsLvAntfz8MjuzNw5\nM6z37Nw7c6+IiAiMMcaUkoqiA2CMMaY4nAQYY0yJcRJgjDElxkmAMcaUGCcBxhhTYpwEGGNMiXES\nqKdcXFywc+dOAMC+ffswaNAgBUdUNSkpKejTpw+aNm2K+fPny2QfkyZNwnfffSeTsllpKioqePTo\nUZ0pt77jJCBHmZmZaNu2Lfbv3y9+LyMjA6ampjh69Kj4vZSUFDRv3hznz5+X2H7y5Mnw9PSs1L5E\nIhFEIhEA4NNPP8Xff/9dA0cgf9u3b0eLFi3w5s0b/PLLL9Uuz9vbG71795Z47+1zxSSVdb5Y/cJJ\nQI40NTWxbds2zJ07Fy9fvgQALFiwAN27d8eHH34oXq9ly5ZYv349pk6ditzcXADA2bNn4e/vj02b\nNikk9rIUFhbKfB9PnjyBjY1NlbaVR3y1SVnHqwznoKaPURnOmQRicjdp0iTy9PSk4OBg0tPTo5SU\nlDLXGzZsGM2fP5+ys7PJ3NycDh48KLXMU6dOkbW1NWlra9OsWbPI2dmZdu7cSUREXl5e5OTkJF73\nyy+/JBMTE2ratCl16dKFLl68KF6WnZ1NEyZMIB0dHbKxsaE1a9aQsbGxeHnr1q1pzZo11LFjR2rc\nuDEVFhbS6tWrydzcnLS0tMjW1paOHTsmXt/Ly4t69epFX331FTVr1ozMzc3p8uXLtGvXLjIxMaEW\nLVrQ7t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KpRKJd+/f8fS0nLR\n/I4ePYqdnR1ubm5ER0eza9cuLC0tMTMz4/bt22RkZODp6YlSqaStrc1gPOHPJVJJC0ZncnISlUrF\nrVu3Vt3m27dvWFhYMDs7y5EjR0hISODQoUNrOMt5KpUKlUplsDy03Pxg/iezIyMjFBUVLXncly9f\n8PHxobW1VVo+E4yTCAKCsApqtZqGhgampqY4cOAAxcXF//aUDNTU1JCfn8/s7CwODg6UlZWxcePG\nRcft3buX8fFxpqenycjIMOoSjMI8EQQEQRCMmNgTEARBMGIiCAiCIBgxEQQEQRCMmAgCgiAIRkwE\nAUEQBCMmgoAgCIIR+y8GWmE/HhvA+QAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x79d1da0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass velocity of the silica gel required for cocurrent operation is 5.91 kg/s which is 11 times that required for countercurrent operation\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.10,Page number:199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 3.10\n",
+ "#Benzene Recovery System: Number of Ideal Stages\n",
+ "\n",
+ "#Variable declaration\n",
+ "# From Example 3.7\n",
+ "X2a = 0.05 \n",
+ "X0 = X2a \t\t\t\t# [kmole benzene/kmole oil]\n",
+ "Y2a = 0.012 \n",
+ "Y1 = Y2a \t\t\t\t# [kmole benzene/kmole dry gas]\n",
+ "X1a = 0.480 \n",
+ "Xn = X1a \t\t\t\t# [kmole benzene/kmole oil]\n",
+ "Y1a = 0.080 \n",
+ "Yn1 = Y1a \t\t\t\t# [kmole benzene/kmole dry gas]\n",
+ "\t# Ideal stages for absorber section\n",
+ "\n",
+ "m = 0.097 \t\t\t\t# [mole of oil/mole of dry gas]\n",
+ "Lsa = 0.006 \t\t\t\t# [kmole/s]\n",
+ "Vsa = 0.038 \t\t\t\t# [kmole/s]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "A = Lsa/(m*Vsa) \t\t\t# [Absorption factor]\n",
+ "import math\n",
+ "\t# From equation 3.54 by Kremser equation\n",
+ "Nk = math.log((((Yn1-m*X0)*(1-1/A))/(Y1-m*X0))+1/A)/(math.log(A)) \n",
+ "\n",
+ "\n",
+ "\t# Ideal stages from graph \n",
+ "\t# Stair case construction is being made between equilibrium curve and operating line from \tpiont X2a,Y2a to X1a,Y1a\n",
+ "\t# A more precise estimate of stages\n",
+ "\t# From figure 3.25 or from graph made for absorber in Example 3.7\n",
+ "Xa = 0.283 \n",
+ "Xb = 0.480 \n",
+ "Xc = 0.530 \n",
+ "Na = 3+(Xb-Xa)/(Xc-Xa)\n",
+ "print\"ABSORBER\"\n",
+ "print\"The number of ideal stages from graph in the absorber is\",round(Na,1)\n",
+ "print\"Number of ideal stages from Kremser equation in the absorber is\",round(Nk,2)\n",
+ "\t# Ideal satges for stripping section\n",
+ "X2s = 0.480 \n",
+ "X0 = X2s \t\t\t\t# [kmol benzene/kmol oil]\n",
+ "Y2s = 0.784 \n",
+ "Y1 = Y2s \t\t\t\t# [kmol benzene/kmol steam]\n",
+ "X1s = 0.05 \n",
+ "Xn = X1s \t\t\t\t# [kmol benzene/kmol oil]\n",
+ "Y1s = 0 \n",
+ "Yn1 = Y1s \t\t\t\t# [kmol benzene/kmol steam]\n",
+ "\n",
+ "\t# Similarly here also stair case construction is being made between equilibrium curve and \toperating line from piont X0,Y1 to Xn,Yn1\n",
+ "\t# A more precise estimate of stages\n",
+ "\t# From figure 3.26 or from graph made for stripping section in Example 3.7\n",
+ "Ns = 5+(0.070-0.050)/(0.070-0.028) \n",
+ "\n",
+ "#Result\n",
+ "print\"STRIPPER\"\n",
+ "print\"The number of ideal stages from graph in the stripping section is\",round(Ns,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ABSORBER\n",
+ "The number of ideal stages from graph in the absorber is 3.8\n",
+ "Number of ideal stages from Kremser equation in the absorber is 3.16\n",
+ "STRIPPER\n",
+ "The number of ideal stages from graph in the stripping section is 5.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 4.ipynb b/Beginning_C++_through_Game_Programming/Chapter 4.ipynb
new file mode 100755
index 00000000..89ea220d
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 4.ipynb
@@ -0,0 +1,996 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:Equipment for Gas-Liquid Mass-Transfer Operations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.2,Page number:227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 4.2\n",
+ "#Specific Liquid Holdup and Void Fraction in Second- and Third-Generation Random Packings \n",
+ "\n",
+ "#Variable declaration\n",
+ "u = 3*10**-6 \t\t\t\t# [Kinematic viscosity, square m/s]\n",
+ "v = 0.01 \t\t\t\t# [Superficial liquid velocity, m/s]\n",
+ "g = 9.8 \t\t\t\t# [square m/s]\n",
+ "\n",
+ "\t# From table 4.1\n",
+ "\t# For metal pall rings\n",
+ "a_pr = 112.6 \t\t\t\t# [ square m/cubic m]\n",
+ "e_pr = 0.951 \n",
+ "Ch_pr = 0.784 \n",
+ "\t# For Hiflow rings\n",
+ "a_hr = 92.3 \t\t\t\t# [square m/cubic m]\n",
+ "e_hr = 0.977 \n",
+ "Ch_hr = 0.876 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\t# Renoylds and Froude's number for metal pall rings\n",
+ "Rel_pr = v/(u*a_pr) \n",
+ "Frl_pr = v**2*a_pr/g \n",
+ "\t# From equation 4.5 since Rel is greater than 5, for pall rings\n",
+ "\t# ah/a = x_pr\n",
+ "x_pr = 0.85*Ch_pr*Rel_pr**0.25*Frl_pr**0.1 \n",
+ "\t# From equation 4.3\n",
+ "hl_pr = (12*Frl_pr/Rel_pr)**(1.0/3.0)*(x_pr)**(2.0/3.0) \n",
+ "\n",
+ "\n",
+ "\t# Renoylds and Froude's number for Hiflow rings\n",
+ "Rel_hr = v/(u*a_hr) \n",
+ "Frl_hr = v**2*a_hr/g \n",
+ "\t# From equation 4.5 since Rel is greater than 5, for pall rings\n",
+ "\t# ah/a = x_pr\n",
+ "x_hr = 0.85*Ch_hr*Rel_hr**0.25*Frl_hr**0.1 \n",
+ "\t# From equation 4.3\n",
+ "hl_hr = (12*Frl_hr/Rel_hr)**(1.0/3.0)*(x_hr)**(2.0/3.0) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The specific liquid holdup for Metal pall ring and Hiflow ring are\",round(hl_pr,3),\"cubic m holdup/cubic m packed bed and\",round(hl_hr,3),\"cubic m holdup/cubic m packed bed respectively\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The specific liquid holdup for Metal pall ring and Hiflow ring are 0.066 cubic m holdup/cubic m packed bed and 0.064 cubic m holdup/cubic m packed bed respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.3,Page number:233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 4.3\n",
+ "#Pressure Drop in Beds Packed with First- and Third-Generation Random Packings\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-ammonia b-air c-water\n",
+ "P = 101.3 \t\t\t\t\t# [kPa]\n",
+ "T = 293 \t\t\t\t\t# [K]\n",
+ "R = 8.314 \n",
+ "Vb = 20 \t\t\t\t\t# [kmole/h]\n",
+ "xab = 0.05 \n",
+ "Vc = 1500 \t\t\t\t\t# [kg/h]\n",
+ "d = 0.9 \t\t\t\t\t# [ammonia absorbed]\n",
+ "Ma = 17 \t\t\t\t\t# [gram/mole]\n",
+ "Mb = 29 \t\t\t\t\t# [gram/mole]\n",
+ "Mc = 18 \t\t\t\t\t# [gram/mole]\n",
+ "g = 9.8 \t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "\t# For Inlet gas\n",
+ "Mg = (1-xab)*Mb+xab*Ma \t\t\t# [gram/mole]\n",
+ "V = Vb*Mg/3600 \t\t\t\t# [kg/h]\n",
+ "rowg = P*Mg/(R*T) \t\t\t\t# [kg/cubic m]\n",
+ "Qg = V/rowg \t\t\t\t\t# [cubic m/s]\n",
+ "\n",
+ "\t# For exiting liquid\n",
+ "b = Vb*xab*Ma*d \t\t\t\t# [ammonia absorbed in kg/h]\n",
+ "L = (Vc+b)/3600 \t\t\t\t# [kg/s]\n",
+ "rowl = 1000 \t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "X = (L/V)*(math.sqrt(rowg/rowl)) \n",
+ "\t# From equation 4.8\n",
+ "Yflood = math.exp(-(3.5021+1.028*math.log(X)+0.11093*(math.log(X))**2)) \n",
+ "\n",
+ "\t\n",
+ "\t#Illustration 4.3(a)\n",
+ "\t# Solution(a)\n",
+ "\t# For 25-mm ceramic Raschig rings\n",
+ "Fp = 179 \t\t\t\t\t# [square ft/cubic ft]\n",
+ "ul = 0.001 \t\t\t\t\t# [Pa.s]\n",
+ "\t# From equation 4.6\n",
+ "Csflood = math.sqrt(Yflood/(ul**0.1*Fp)) \t# [m/s]\n",
+ "\t# From equation 4.7\n",
+ "vgf = Csflood/(math.sqrt(rowg/(rowl-rowg))) \t# [m/s]\n",
+ "\t# From equation 4.9\n",
+ "deltaPf = 93.9*(Fp)**0.7 \t\t\t# [Pa/m of packing]\n",
+ "\n",
+ "\t# For operation at 70% of the flooding velocity\n",
+ "f = 0.7 \n",
+ "\t# From equation 4.10\n",
+ "vg = f*vgf \t\t\t\t\t# [m/s]\n",
+ "D = math.sqrt(4*Qg/(vg*math.pi)) \n",
+ "\t\n",
+ "\t# From Table 4.1, for 25 mm ceramic Raschig rings\n",
+ "a_c = 190 \t\t\t\t\t# [square m/cubic m]\n",
+ "Ch_c = 0.577 \n",
+ "e_c = 0.68 \n",
+ "Cp_c = 1.329 \n",
+ "\n",
+ "\t# From equation 4.13\n",
+ "dp = 6*(1-e_c)/a_c \t\t\t\t # [m]\n",
+ "\t# From equation 4.12\n",
+ "Kw = 1/(1+(2*dp/(3*D*(1-e_c)))) \n",
+ "\n",
+ "\t# The viscosity of the gas phase is basically that of air at 293 K and 1 atm\n",
+ "ug = 1.84*10**-5 \t\t\t\t# [kg/m.s]\n",
+ "\t# From equation 4.15\n",
+ "Reg = vg*rowg*dp*Kw/(ug*(1-e_c)) \n",
+ "\t# From equation 4.14\n",
+ "sia_o = Cp_c*((64/Reg)+(1.8/(Reg**0.08))) \n",
+ "\n",
+ "\t# From equation 4.11\n",
+ "\t# deltaP_o/z = T\n",
+ "T = sia_o*a_c*rowg*vg**2/(2*Kw*e_c**3) \t# [Pa/m]\n",
+ "\n",
+ "\t# Now\n",
+ "Gx = L/((math.pi*D**2.0)/4) \t\t\t# [kg/square m.s]\n",
+ "Rel = Gx/(a_c*ul) \n",
+ "Frl = Gx**2*a_c/(rowl**2*g) \n",
+ "\n",
+ "\t# From equation 4.5\n",
+ "\t# ah/a = x_pr\n",
+ "x = 0.85*Ch_c*Rel**0.25*Frl**0.1 \n",
+ "\t# From equation 4.3\n",
+ "hl = (12*Frl/Rel)**(1.0/3.0)*(x)**(2.0/3.0) \n",
+ "\n",
+ "\t# From equation 4.16\n",
+ "\t# daltaP/deltaP_o = Y\n",
+ "Y = (e_c/(e_c-hl))**1.5*math.exp(Rel/200) \n",
+ "\t# Therefore \n",
+ "\t# deltaP/z = H\n",
+ "H = Y*T \t\t\t\t\t# [Pa/m]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "\n",
+ "print\"The superficial velocity is\",round(vgf,3),\" m/s\\n\" \n",
+ "print\"The pressure drop at flooding is\",round(deltaPf),\"Pa/m\\n\" \n",
+ "print\"The superficial velocity at 70 percent of flooding is\",round(vg,4),\"m/s\\n\" \n",
+ "print\"The column inside diameter at 70 percent of flooding is\" ,round(D,3),\" m\\n\" \n",
+ "print\"The pressure drop for operation at 70 percent of flooding is\",round(H),\"Pa/m\\n\\n\" \n",
+ "\n",
+ "\n",
+ "#Illustration 4.3(b) \n",
+ "# Solution (b)\n",
+ "# Similarly for 25 mm metal Hiflow rings above quantities are determined\n",
+ "\n",
+ "#Calcualtion\n",
+ "\n",
+ "Fp1 = 42 \t\t\t\t\t\t# [square ft/cubic ft]\n",
+ "Csflood1 = math.sqrt(Yflood/(ul**0.1*Fp1)) \t\t# [m/s]\n",
+ "vgf1 = Csflood1/(math.sqrt(rowg/(rowl-rowg))) \t\t# [m/s]\n",
+ "\t# From equation 4.9\n",
+ "deltaPf1 = 93.9*(Fp1)**0.7 \t\t\t\t# [Pa/m of packing]\n",
+ "\n",
+ "\t# For operation at 70% of the flooding velocity\n",
+ "f = 0.7 \n",
+ "\t# From equation 4.10\n",
+ "vg1 = f*vgf1 \t\t\t\t\t\t# [m/s]\n",
+ "D1 = math.sqrt(4*Qg/(vg1*math.pi)) \n",
+ "\n",
+ "\t# For Hiflow rings\n",
+ "a_h = 202.9 \t\t\t\t\t\t# [square m/cubic m]\n",
+ "e_h = 0.961 \n",
+ "Ch_h = 0.799 \n",
+ "Cp_h = 0.689 \n",
+ "\n",
+ "\t# From equation 4.13\n",
+ "dp1 = 6*(1-e_h)/a_h \t\t\t\t\t# [m]\n",
+ "\t# From equation 4.12\n",
+ "Kw1 = 1/(1+(2*dp1/(3*D1*(1-e_h)))) \n",
+ "\n",
+ "\t# The viscosity of the gas phase is basically that of air at 293 K and 1 atm\n",
+ "ug = 1.84*10**-5 \t\t\t\t\t# [kg/m.s]\n",
+ "\t# From equation 4.15\n",
+ "Reg1 = vg1*rowg*dp1*Kw1/(ug*(1-e_h)) \n",
+ "\t# From equation 4.14\n",
+ "sia_o1 = Cp_h*((64/Reg1)+(1.8/(Reg1**0.08))) \n",
+ "\n",
+ "\t# From equation 4.11\n",
+ "\t# deltaP_o/z = T\n",
+ "T1 = sia_o1*a_h*rowg*vg1**2/(2*Kw1*e_h**3) \t\t# [Pa/m]\n",
+ "\n",
+ "\t# Now\n",
+ "Gx1 = L/(math.pi*D1**2/4) \t\t\t\t# [kg/square m.s]\n",
+ "Rel1 = Gx1/(a_h*ul) \n",
+ "Frl1 = Gx1**2*a_h/(rowl**2*g) \n",
+ "\n",
+ "\t# From equation 4.5\n",
+ "\t# ah/a = x_pr\n",
+ "x1 = 0.85*Ch_h*Rel1**0.25*Frl1**0.1 \n",
+ "\t# From equation 4.3\n",
+ "hl1 = (12*Frl1/Rel1)**(1.0/3.0)*(x1)**(2.0/3.0) \n",
+ "\n",
+ "\t# From equation 4.16\n",
+ "\t# daltaP/deltaP_o = Y\n",
+ "Y1 = (e_h/(e_h-hl1))**1.5*math.exp(Rel1/200) \n",
+ "\t# Therefore \n",
+ "\t# deltaP/z = H\t\n",
+ "H1 = Y1*T1 # [Pa/m]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The superficial velocity is\",round(vgf1,3),\"m/s\\n\"\n",
+ "print\"The pressure drop at flooding is\",round(deltaPf1),\" Pa/m\\n\" \n",
+ "print\"The superficial velocity at 70 percent of flooding is\",round(vg1,2),\"m/s\"\n",
+ "print\"The column inside diameter at 70 percent of flooding is\",round(D1,3),\" m\\n\" \n",
+ "print\"The pressure drop for operation at 70 percent of flooding is\",round(H1),\"Pa/m\\n\\n\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The superficial velocity is 1.326 m/s\n",
+ "\n",
+ "The pressure drop at flooding is 3545.0 Pa/m\n",
+ "\n",
+ "The superficial velocity at 70 percent of flooding is 0.9283 m/s\n",
+ "\n",
+ "The column inside diameter at 70 percent of flooding is 0.428 m\n",
+ "\n",
+ "The pressure drop for operation at 70 percent of flooding is 505.0 Pa/m\n",
+ "\n",
+ "\n",
+ "The superficial velocity is 2.738 m/s\n",
+ "\n",
+ "The pressure drop at flooding is 1285.0 Pa/m\n",
+ "\n",
+ "The superficial velocity at 70 percent of flooding is 1.92 m/s\n",
+ "The column inside diameter at 70 percent of flooding is 0.298 m\n",
+ "\n",
+ "The pressure drop for operation at 70 percent of flooding is 443.0 Pa/m\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.4,Page number:237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 4.4\n",
+ "#Design of a Packed-Bed Ethanol Absorber\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-ethanol b- gas(CO2 rich vapor) c-liquid water\n",
+ "P = 110 \t\t\t\t\t\t# [kPa]\n",
+ "T = 303 \t \t\t\t\t\t# [K]\n",
+ "R = 8.314 \n",
+ "Vb = 180 \t\t\t\t\t\t# [kmole/h]\n",
+ "xab = 0.02 \t\t\t\t\t\t# [molar composition of ethanol in gas]\n",
+ "Vc = 151.5 \t\t\t\t\t\t# [kmole/h]\n",
+ "d = 0.97 \t\t\t\t\t\t# [ethanol absorbed]\n",
+ "Ma = 46 \t\t\t\t\t\t# [gram/mole]\n",
+ "Mb = 44 \t\t\t\t\t\t# [gram/mole]\n",
+ "Mc = 18 \t\t\t\t\t\t# [gram/mole]\n",
+ "g = 9.8 \t\t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "\t# For Inlet gas\n",
+ "Mg = (1-xab)*Mb+xab*Ma \t\t\t\t# [gram/mole]\n",
+ "V = Vb*Mg/3600 \t\t\t\t\t# [kg/h]\n",
+ "rowg = P*Mg/(R*T) \t\t\t\t\t# [kg/cubic m]\n",
+ "Qg = V/rowg \t\t\t\t\t\t# [cubic m/s]\n",
+ "\n",
+ "\t# For exiting liquid\n",
+ "b = Vb*xab*Ma*d \t\t\t\t\t# [ethanol absorbed in kg/h]\n",
+ "L = (Vc*Mc+b)/3600 \t\t\t\t\t# [kg/s]\n",
+ "rowl = 986 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "X = (L/V)*(math.sqrt(rowg/rowl)) \n",
+ "\t# From equation 4.8\n",
+ "Yflood = math.exp(-(3.5021+1.028*math.log(X)+0.11093*(math.log(X))**2)) \n",
+ "\t#Illustration 4.4(a) \n",
+ "\t# Solution(a)\n",
+ "\n",
+ "\t# For 50 mm metal Hiflow rings\n",
+ "Fp = 16 \t\t\t\t\t\t# [square ft/cubic ft]\n",
+ "ul = 6.31*10**-4 \t\t\t\t\t# [Pa.s]\n",
+ "\t# From equation 4.6\n",
+ "Csflood = math.sqrt(Yflood/(ul**0.1*Fp)) \t\t# [m/s]\n",
+ "\t# From equation 4.7\n",
+ "vgf = Csflood/(math.sqrt(rowg/(rowl-rowg))) \t\t# [m/s]\n",
+ "\t# From equation 4.9\t\n",
+ "deltaPf = 93.9*(Fp)**0.7 \t\t\t\t# [Pa/m of packing]\n",
+ "\n",
+ "\t# For operation at 70% of the flooding velocity\n",
+ "f = 0.7 \n",
+ "\t# From equation 4.10\n",
+ "vg = f*vgf \t\t\t\t\t\t# [m/s]\n",
+ "D = math.sqrt(4*Qg/(vg*math.pi)) \n",
+ "\n",
+ "\t# From Table 4.1, for 50 mm metal Hiflow rings\n",
+ "a = 92.3 \t\t\t\t\t\t # [square m/cubic m]\n",
+ "Ch = 0.876 \n",
+ "e = 0.977 \n",
+ "Cp = 0.421 \n",
+ "\n",
+ "\t# From equation 4.13\n",
+ "dp = 6*(1-e)/a \t\t\t\t\t# [m]\n",
+ "\n",
+ "\t# From equation 4.12\n",
+ "Kw = 1/(1+(2*dp/(3*D*(1-e)))) \n",
+ "\n",
+ "\t# The viscosity of the gas phase is basically that of air at 303 K and 110 kPa\n",
+ "ug = 1.45*10**-5 \t\t\t\t\t# [kg/m.s]\n",
+ "\t# From equation 4.15\n",
+ "Reg = vg*rowg*dp*Kw/(ug*(1-e)) \n",
+ "\t# From equation 4.14\n",
+ "sia_o = Cp*((64/Reg)+(1.8/(Reg**0.08))) \n",
+ "\n",
+ "\t# From equation 4.11\n",
+ "\t# deltaP_o/z = I\n",
+ "I = sia_o*a*rowg*vg**2/(2*Kw*e**3) \t\t\t# [Pa/m]\n",
+ "\n",
+ "\t# Now\n",
+ "Gx = L/(math.pi*D**2.0/4.0) \t\t\t\t# [kg/square m.s]\n",
+ "Rel = Gx/(a*ul) \n",
+ "Frl = Gx**2*a/(rowl**2*g) \n",
+ "\n",
+ "\t# From equation 4.5\n",
+ "\t# ah/a = x\n",
+ "x = 0.85*Ch*Rel**0.25*Frl**0.1 \n",
+ "\t# From equation 4.3\n",
+ "hl = (12*Frl/Rel)**(1.0/3.0)*(x)**(2.0/3.0) \n",
+ "\n",
+ "\t# From equation 4.16\n",
+ "\t# daltaP/deltaP_o = Y\n",
+ "Y = (e/(e-hl))**1.5*math.exp(Rel/200) \n",
+ "\t# Therefore \n",
+ "\t# deltaP/z = H\n",
+ "H = Y*I \t\t\t\t\t\t# [Pa/m]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"PArt-a\\n\"\n",
+ "\n",
+ "print\"Since the pressure drop is too high, we must increase the tower diameter to reduce the pressure drop\"\n",
+ "\t# The resulting pressure drop is too high therefore, we must increase the tower diameter \tto reduce the pressure drop. Appendix D presents a Mathcad computer \n",
+ "\t# program designed to iterate automatically until the pressure drop criterion is \t\t\tsatisfied.\n",
+ "\t# From the Mathcad program we get\n",
+ "D1 = 0.738 \t\t\t\t\t\t# [m]\n",
+ "\n",
+ "print\"The tower diameter for pressure drop of 300 Pa/m of packed height is\",D1,\"m\"\n",
+ "\n",
+ "\t#Illustration 4.4(b) \n",
+ "\t# Solution(b)\n",
+ "\n",
+ "print\"\\nPart-(b)\\n\"\n",
+ "\t# For the tower diameter of D = 0.738 m, the following intermediate results were obtained \tfrom the computer program in Appendix D:\n",
+ "vg1 = 2.68 \t\t\t\t\t\t# [m/s]\n",
+ "vl1 = 0.00193 \t\t\t\t\t\t# [m/s]\n",
+ "hl1 = 0.017 \n",
+ "ah1 = 58.8 \t\t\t\t\t\t# [square m/cubic m]\n",
+ "Reg1 = 21890 \n",
+ "Rel1 = 32.6 \n",
+ "Kw1 = 1/(1+(2*dp/(3*D1*(1-e)))) \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f1 = vg1/vgf \n",
+ "print\"The fractional approach to flooding conditions is \",round(f1,2)\n",
+ "\n",
+ "\t#Illustration 4.4(c) \n",
+ "\t# Solution(c)\n",
+ "\t# For ethanol\n",
+ "\n",
+ "print \"\\nPart-(c)\\n\"\n",
+ "Vc_a = 167.1 \t\t\t\t\t\t# [cubic cm/mole]\n",
+ "sigma_a = 4.53*10**-10 \t\t\t\t# [m]\n",
+ "\t# E/k = M\n",
+ "M_a = 362.6 \t\t\t\t\t\t# [K]\n",
+ "\n",
+ "\t# For carbon dioxide\n",
+ "sigma_b = 3.94*10**-10 \t\t\t\t# [m]\n",
+ "M_b = 195.2 \t\t\t\t\t\t# [K]\n",
+ "\n",
+ "\t# From equation 1.48\n",
+ "Vb_a = 0.285*Vc_a**1.048 \t\t\t\t# [cubic cm/mole]\n",
+ "\n",
+ "e1 = (9.58/(Vb_a)-1.12) \n",
+ "\t# From equation 1.53\n",
+ "Dl = 1.25*10**-8*((Vb_a)**-0.19 - 0.292)*T**1.52*(ul*10**3)**e1 \t # [square cm/s]\n",
+ "\n",
+ "\t# From equation 1.49\n",
+ "Dg = 0.085 \t\t\t\t\t\t# [square cm/s] \n",
+ "\n",
+ "\t# From Table 4.2, for 50 mm metal Hiflow rings\n",
+ "Cl = 1.168\n",
+ "Cv = 0.408 \n",
+ "\t# From equation 4.17\n",
+ "kl = 0.757*Cl*math.sqrt(Dl*a*vl1*10**-4/(e*hl1)) \t# [m/s]\n",
+ "mtcl = kl*ah1 \t\t\t\t\t\t# [s**-1]\n",
+ "\n",
+ "Sc = ug/(rowg*Dg*10**-4) \n",
+ "\t# From equation 4.18\n",
+ "ky = 0.1304*Cv*(Dg*10**-4*P*1000/(R*T))*(Reg1/Kw1)**(3.0/4.0)*Sc**(2.0/3.0)*(a/(math.sqrt(e*(e-hl1)))) \t\t\t\t\t\t\t # [mole/square m.s]\n",
+ "mtcg = ky*ah1*10**-3 \t\t\t\t\t # [kmole/cubic m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The gas and liquid volumetric mass transfer coefficients are\",round(mtcg,3),\"kmole/cubic m.s and\",round(mtcl,4),\"s**-1 respectively\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "PArt-a\n",
+ "\n",
+ "Since the pressure drop is too high, we must increase the tower diameter to reduce the pressure drop\n",
+ "The tower diameter for pressure drop of 300 Pa/m of packed height is 0.738 m\n",
+ "\n",
+ "Part-(b)\n",
+ "\n",
+ "The fractional approach to flooding conditions is 0.58\n",
+ "\n",
+ "Part-(c)\n",
+ "\n",
+ "The gas and liquid volumetric mass transfer coefficients are 0.192 kmole/cubic m.s and 0.0074 s**-1 respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.5,Page number:245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 4.5\n",
+ "#Stripping Chloroform from Water by Sparging with Air\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-chloroform b-water c-air\n",
+ "T = 298 \t\t\t\t\t\t# [K]\n",
+ "Dv = 1 \t\t\t\t\t\t# [vessel diameter, m]\n",
+ "Vb = 10 \t\t\t\t\t\t# [kg/s]\n",
+ "ca = 240*10**-6 \t\t\t\t\t# [gram/l]\n",
+ "xr = 0.9 \t\t\t\t\t\t# [chloroform which is to be removed]\n",
+ "m = 220 \n",
+ "Ds = 0.5 \t\t\t\t\t\t# [diameter of sparger, m]\n",
+ "no = 90 \t\t\t\t\t\t# [number of orifices]\n",
+ "Do = 3*10**-3 \t\t\t\t\t\t# [diameter of orifice, m]\n",
+ "nm = 0.6 \t\t\t\t\t\t# [mechanical efficiency]\n",
+ "rowb = 1000 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "R = 8.314 \n",
+ "Mc = 29 \t\t\t\t\t\t# [gram/mole]\n",
+ "Mb = 18 \t\t\t\t\t\t# [gram/mole]\n",
+ "g = 9.8 \t \t\t\t\t\t# [square m/s]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "Vair = 0.1 \t\t\t\t\t\t# [kg/s as calculated in chapter 3]\n",
+ "mg = Vair/no \t\t\t\t\t\t# [mass flow rate through each orifice, \t\t\t\t\t\t\tkg/s]\n",
+ "ug = 1.8*10**-5 \t\t\t\t\t# [kg/m.s]\n",
+ "Reo = 25940 \t\t\t\t\t\t# [Renoylds number]\n",
+ "\t# From equ. 4.20\n",
+ "dp = 0.0071*Reo**-0.05 \t\t\t\t# [m]\n",
+ "\n",
+ "\t# Since the water column height is not known, therefore an iterative procedure must be \t\timplemented.\n",
+ "\t# Assuming column height, Z = 0.5 m\n",
+ "Z = 0.5 \t\t\t\t\t\t# [m]\n",
+ "\t# For Z = 0.5 m\n",
+ "rowl = 1000 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "Ps = 101.3 \t\t\t\t\t\t# [kPa]\n",
+ "Po = Ps+(1000*9.8*0.5/1000) \t\t\t\t# [kPa]\n",
+ "Pavg = (Po+Ps)/2 \t\t\t\t\t# [kPa]\n",
+ "rowg = Pavg*Mc/(R*T) \t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "area = math.pi*Dv**2.0/4.0 \t\t\t\t# [square m]\n",
+ "vg = Vair/(rowg*area) \t\t\t\t\t# [m/s]\n",
+ "\t# In this case rowl = rowg and sigma = sigmaAW\n",
+ "\t# From equation 4.22\n",
+ "\t# Vg = vg\n",
+ "\t# vg/vs = 0.182\n",
+ "vs = vg/0.182 \t\t\t\t\t\t# [m/s]\n",
+ "vl = -Vb/(rowl*area) \t\t\t\t\t# [negative because water flows downward, \t\t\t\t\t\t\tm/s]\n",
+ "\t# From equ 4.21\n",
+ "\n",
+ "def f12(phig):\n",
+ " return(vs - (vg/phig)-(-vl/(1-phig))) \n",
+ "phig = fsolve(f12,0.1) \n",
+ "\t# Now in this case\n",
+ "S = vl/(1-phig) \n",
+ "\t# Value of 'S' comes out to be less than 0.15 m/s\n",
+ "\t# Therefore \n",
+ "dp = (dp**3*Po/Pavg)**(1.0/3.0) \t\t\t# [m]\n",
+ "\t# From equ 4.23\n",
+ "a = 6*phig/dp \t\t\t\t\t\t# [m**-1]\n",
+ "\t# Now we calculate diffusivity of chloroform\n",
+ "Vba = 88.6 \t\t\t\t\t\t# [cubic cm/mole]\n",
+ "u = 0.9*10**-3 \t\t\t\t\t# [Pa-s]\n",
+ "e = (9.58/(Vba)-1.12) \n",
+ "\t# From equation 1.53\n",
+ "Dl = 1.25*10**-8*((Vba)**-0.19 - 0.292)*T**1.52*(u*10**3)**e \t# [square cm/s]\n",
+ "\n",
+ "\t# And Schmidt number is \n",
+ "Scl = 833 \t\t\t\t\t\t# [Schmidt Number]\n",
+ "\n",
+ "\t# Now we calculate dp*g**(1/3)/Dl**(2/3) = J\n",
+ "J = dp*g**(1.0/3.0)/(Dl*10**-4)**(2.0/3.0)\n",
+ "Reg = dp*vs*rowl/u \t\t\t\t\t# [Gas bubble Renoylds number]\n",
+ "\t# From equ 4.25\n",
+ "Shl = 2 + 0.0187*Reg**0.779*Scl**0.546*J**0.116 \n",
+ "\n",
+ "\t# For dilute solution xbm = 1 or c = 55.5 kmole/cubic m\n",
+ "\t# Then for Nb = 0\n",
+ "c = 55.5 \t\t\t\t\t\t# [kmole/cubic m]\n",
+ "kx = Shl*c*Dl*10**-4/dp \t\t\t\t# [kmole/square m.s]\n",
+ "mtc = kx*a \t\t\t\t\t\t# [kmole/cubic m.s]\n",
+ "\n",
+ "L = Vb/Mb \t\t\t\t\t\t# [kmole/s]\n",
+ "Gmx = L/area \t\t\t\t\t\t# [kmole/square m.s]\n",
+ "V = Vair/Mc \t\t\t\t\t\t# [kmole/s]\n",
+ "A = L/(m*V) \t\t\t\t\t\t# [absorption factor]\n",
+ "\n",
+ "\t# From equ 4.28\n",
+ " \t# For, xin/xout = x = 10\n",
+ "x = 10 \n",
+ "Z = (Gmx/(kx*a*(1-A)))*math.log(x*(1-A)+A) \n",
+ "\n",
+ "\t# With this new estimated Z ,we again calculate average pressure in the # column of \twater\n",
+ "Po1 = 110.1 \t\t\t\t\t\t# [kPa]\n",
+ "Pavg1 = 105.7 \t\t\t\t\t\t# [kPa]\n",
+ "rowg1 = Pavg1*Mc/(R*T) \n",
+ "\t# Now value of rowg1 obtained is very close to value used in the first # iteration. \tTherefore on three iteractions we achieve a value of 'Z'\n",
+ "Z1 = 0.904 \t\t\t\t\t\t# [m]\n",
+ "\n",
+ "rowgo = Po1*Mc/(R*T) \t\t\t\t\t# [kg/cubic m]\n",
+ "vo1 = 4*mg/(math.pi*Do**2*rowgo) \t\t\t# [m/s]\n",
+ "\t# Therefore, vo1**2/(2*gc) = F\n",
+ "gc = 1 \n",
+ "F = vo1**2/(2*gc) \t\t\t\t\t# [J/kg]\n",
+ "\t# And R*T*math.log(Po/Ps)/Mc = G\n",
+ "G = R*T*1000*math.log(Po1/Ps)/Mc \t\t\t# [J/kg]\n",
+ "Zs = 0\n",
+ "\t# And (Z1-Zs)*g/gc = H\n",
+ "H = (Z1-Zs)*g/gc \t\t\t\t\t# [J/kg]\n",
+ "\t# From equ 4.27\n",
+ "W = F+G+H \t\t\t\t\t\t# [J/kg]\n",
+ "\t# Now the air compressor power is\n",
+ "W1 = W*Vair*10**-3/nm \t\t\t\t\t# [kW]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The depth of the water column required to achieve the specified 90percent removal efficiency is \",Z1,\"m\"\n",
+ "\n",
+ "print\"The power required to operate the air compressor is\",round(W1,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The depth of the water column required to achieve the specified 90percent removal efficiency is 0.904 m\n",
+ "The power required to operate the air compressor is 2.43 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.6,Page number:255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 4.6\n",
+ "#Design of a Sieve-may Column for Ethanol Absorption\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ff = 0.9 \t\t\t\t\t# [foaming factor]\n",
+ "sigma = 70 \t\t\t\t\t# [liquid surface tension, dyn/cm]\n",
+ "Do = 5 \t\t\t\t\t# [mm]\n",
+ "\t#From Example 4.4\n",
+ "\t# X = 0.016 \n",
+ "p = 15 \t\t\t\t\t\t# [pitch, mm]\n",
+ "\t# From equ 4.35\n",
+ "\t# Ah/Aa\t = A\n",
+ "A = 0.907*(Do/p)**2 \t\t\t\t# [ratio of vapor hole area to tray active area]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\t# Assume \n",
+ "t = 0.5 \t\t\t\t\t # [m]\n",
+ "\t# From equ 4.32\n",
+ "alpha = 0.0744*t+0.01173 \n",
+ "beeta = 0.0304*t+0.015 \n",
+ "\n",
+ "\t# Since X<0.1, therefore\n",
+ "X = 0.1 \n",
+ "\t# From equ 4.31\n",
+ "Cf = alpha*math.log10(1.0/X) + beeta \n",
+ "\t# Since Ah/Aa > 0.1, therefore\n",
+ "Fha = 1 \n",
+ "Fst = (sigma/20)**0.2 \t\t\t\t# [surface tension factor]\n",
+ "\t# From equ 4.30\n",
+ "C = Fst*Ff*Fha*Cf \n",
+ "\n",
+ "\t# From Example 4.4\n",
+ "rowg = 1.923 \t\t\t\t\t# [kg/cubic m]\n",
+ "rowl = 986 \t\t\t\t\t# [kg/cubic m]\n",
+ "Qg = 1.145 \t\t\t\t\t# [cubic m/s]\n",
+ "\t# From equation 4.29\n",
+ "vgf = C*(math.sqrt((rowl-rowg)/rowg)) \t\t# [m/s]\n",
+ "vgf=2.07 #approximated for precise answer\n",
+ "\t# Since X<0.1\n",
+ "\t# Equ 4.34 recommends Ad/At = B = 0.1\n",
+ "B = 0.1 \n",
+ "\t# For an 80% approach to flooding, equation 4.33 yields\n",
+ "f = 0.8 \n",
+ "D =math.sqrt((4*Qg)/(f*vgf*math.pi*(1-B))) \t# [m]\n",
+ "\t# At this point, the assumed value of tray spacing ( t = 0.5 m) must be # checked \tagainst the recommended values of Table 4.3. Since the calculated\n",
+ "\t# value of D < 1.0 m, t = 0.5 m is the recommended tray spacing, and no\n",
+ "\t# further iteration is needed.\n",
+ "\n",
+ "def f14(Q):\n",
+ " return(B-((Q-math.sin(Q))/(2*math.pi)))\n",
+ "Q = fsolve(f14,1.5) \n",
+ "Lw = D*math.sin(Q/2) \t\t\t\t# [m]\n",
+ "rw = D/2*math.cos(Q/2) \t\t\t# [m]\n",
+ "\n",
+ "At = math.pi/4*D**2 \t\t\t\t# [total cross sectional area, square m]\n",
+ "Ad = B*At \t\t\t\t\t# [Downcomer area, square m]\n",
+ "Aa = At-2*Ad \t\t\t\t\t# [ Active area over the tray, square m]\n",
+ "Ah = 0.101*Aa \t\t\t\t\t# [Total hole area, square m]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Summarizing, the details of the sieve-tray design are as follows\"\n",
+ "\n",
+ "print\"Diameter =\",round(D,3),\"m\\n Tray spacing =\",t,\" m\\n Total cross-sectional area=\",round(At,3),\"square m\\n Downcomer area =\",round(Ad,3),\" square m\\n Active area over the tray = \",round(Aa,3),\" square m\\n Weir length =\",round(Lw,3),\" m\\n Distance from tray center to weir = \",round(rw,2),\" m\\n Total hole area =\",round(Ah,3),\" square m\\n Hole arrangement: 5 mm diameter on an equilateral-triangular pitch 15 mm between hole centers, punched in stainless steel sheet metal 2 mm thick\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Summarizing, the details of the sieve-tray design are as follows\n",
+ "Diameter = 0.989 m\n",
+ " Tray spacing = 0.5 m\n",
+ " Total cross-sectional area= 0.768 square m\n",
+ " Downcomer area = 0.077 square m\n",
+ " Active area over the tray = 0.615 square m\n",
+ " Weir length = 0.719 m\n",
+ " Distance from tray center to weir = 0.34 m\n",
+ " Total hole area = 0.062 square m\n",
+ " Hole arrangement: 5 mm diameter on an equilateral-triangular pitch 15 mm between hole centers, punched in stainless steel sheet metal 2 mm thick\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.7,Page number:257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 4.7\n",
+ "#Gas-Pressure Drop in a Sieve-Tray Ethanol Absorber \n",
+ "\n",
+ "#Variable declaration\n",
+ "Do = 5 \t\t\t\t\t\t# [mm] \n",
+ "g = 9.8 \t\t\t\t\t\t# [square m/s]\n",
+ "hw = 50 \t\t\t\t\t\t# [mm]\n",
+ "\t# From example 4.4\n",
+ "Qg = 1.145 \t\t\t\t\t\t# [cubic m/s]\n",
+ "\t# From example 4.6\n",
+ "Ah = 0.062 \t\t\t\t\t\t # [square m]\n",
+ "\t# Do/l = t = 5/2 = 2.5\n",
+ "t = 2.5 \n",
+ "\t# Ah/Aa = A = 0.101\n",
+ "A = 0.101 \n",
+ "rowg = 1.923 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "rowl = 986 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "roww = 995 \t\t\t\t\t\t# [kg/cubic m] \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "vo = Qg/Ah \t\t\t\t\t\t# [m/s]\n",
+ "\t# From equation 4.39\n",
+ "Co = 0.85032 - 0.04231*t + 0.0017954*t**2 \t \t# [for t>=1]\n",
+ "\t# From equation 4.38\n",
+ "hd = 0.0051*(vo/Co)**2*rowg*(roww/rowl)*(1-A**2) \t# [cm]\n",
+ "\n",
+ "\t# From example 4.6 \n",
+ "Aa = 0.615 \t\t\t\t\t\t# [square m]\n",
+ "va = Qg/Aa \t\t\t\t\t\t# [m/s]\n",
+ "\n",
+ "\t# From equation 4.41\n",
+ "Ks = va*math.sqrt(rowg/(rowl-rowg)) \t\t\t# [m/s] \n",
+ "phie = 0.274 \n",
+ "\n",
+ "\t# From equation 4.4\n",
+ "ql = 0.000815 \t\t\t\t\t\t# [cubic m/s]\n",
+ "\n",
+ "\t# From example 4.6\n",
+ "Lw = 0.719 \t\t\t\t\t\t# [m]\n",
+ "Cl = 50.12 + 43.89*math.exp(-1.378*hw) \n",
+ "sigma = 0.07 \t\t\t\t\t\t# [N/m]\n",
+ "\t# From eqution 4.40\n",
+ "hl = phie*(hw*10**(-1)+Cl*(ql/(Lw*phie))**(2.0/3.0)) \n",
+ "\n",
+ "\t# From equation 4.42\n",
+ "ho = 6*sigma/(g*rowl*Do*10**-3)*10**2 \t\t\t# [cm] \t\n",
+ "\t# From equation 4.37\n",
+ "ht = hd+hl+ho \t\t\t\t\t\t# [cm of clear liquid/tray]\n",
+ "deltaPg = ht*g*rowl*10**-2 \t\t\t\t# [Pa/tray]\n",
+ "\n",
+ "#Result\n",
+ "print\"The tray gas-pressure drop for the ethanol is \",round(deltaPg),\"Pa/tray\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The tray gas-pressure drop for the ethanol is 811.0 Pa/tray\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.8,Page number:259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 4.8\n",
+ "#Weeping and Entrainment in a Sieve-Tray EthanolAbsorber\n",
+ "# From Example 4.4, 4.6 and 4.7\n",
+ "\n",
+ "#Variable declaration\n",
+ "Do = 5*10**-3 \t\t\t\t\t\t# [m]\n",
+ "rowg = 1.923 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "rowl = 986.0 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "g = 9.8 \t\t\t\t\t\t# [square m/s]\n",
+ "hl = 0.0173 \t\t\t\t\t\t# [m]\n",
+ "vo = 18.48 \t\t\t\t\t\t# [m/s]\n",
+ "phie = 0.274 \n",
+ "Ks = 0.082 \t\t\t\t\t\t# [m]\n",
+ "A = 0.101 \t\t\t\t\t\t# [Ah/Aa]\n",
+ "t = 0.5 \t\t\t\t\t\t# [m]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "Fr = math.sqrt(rowg*vo**2/(rowl*g*hl)) \t\t# [Froude number]\n",
+ "if Fr>0.5:\n",
+ " print\"Weeping is not significant\" \n",
+ "else:\n",
+ " print\"Significant weeping occurs\" \n",
+ " \n",
+ "\t# From above weeping is not a problem under this circumstances\n",
+ "\t# From equation 4.47\n",
+ "k = 0.5*(1-math.tanh(1.3*math.log(hl/Do)-0.15)) \n",
+ "\n",
+ "\t# From equation 4.46\n",
+ "h2q = (hl/phie) + 7.79*(1+6.9*(Do/hl)**1.85)*(Ks**2/(phie*g*A)) \t# [m]\n",
+ "\t# From equation 4.45\n",
+ "E = 0.00335*(h2q/t)**1.1*(rowl/rowg)**0.5*(hl/h2q)**k \n",
+ "\t# From Example 4.4, the gas mass flow rate is V = 2.202 kg/s\n",
+ "V = 2.202 \t\t\t\t\t\t\t\t# [kg/s]\n",
+ "Le = E*V \t\t\t\t\t\t\t\t # [kg/s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The entrainment flow rate for the ethanol absorber is\",round(Le,2),\"kg/s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weeping is not significant\n",
+ "The entrainment flow rate for the ethanol absorber is 0.11 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.9,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 4.9\n",
+ "#Murphree Efficiency of a Sieve-Tray Ethanol Absorber\n",
+ "# From examples 4.4, 4.6 and 4.7\n",
+ "\n",
+ "#Variable declaration\n",
+ "Do = 5*10**-3 \t\t\t\t\t\t# [m]\n",
+ "Ml = 18.63 \t\t\t\t\t\t# [molecular weight of water, gram/mole]\n",
+ "Mg = 44.04 \t\t\t\t\t\t# [molecular weight of carbon dioxide, \t\t\t\t\t\t\tgram/mole]\n",
+ "rowg = 1.923 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "rowl = 986 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "vo = 18.48 \t\t\t\t\t\t# [m/s]\n",
+ "hl = 0.0173 \t\t\t\t\t\t# [m]\n",
+ "ug = 1.45*10**-5 \t\t\t\t\t# [kg/m.s]\n",
+ "phie = 0.274 \n",
+ "A = 0.101 \t\t\t\t\t\t# [Ah/Aa]\n",
+ "Dg = 0.085 \t\t\t\t\t\t# [square cm/s]\n",
+ "Dl = 1.91*10**-5 \t\t\t\t\t# [square cm/s]\n",
+ "Aa = 0.614 \t\t\t\t\t\t# [square m]\n",
+ "Qg = 1.145 \t\t\t\t\t\t# [cubic m/s]\n",
+ "t = 0.5 \t\t\t\t\t\t# [m]\n",
+ "h2q = 0.391 \t\t\t\t\t\t# [m]\n",
+ "rw = 0.34 \t\t\t\t\t\t# [m]\n",
+ "ql = 0.000815 \t\t\t\t\t\t# [cubic m/s]\n",
+ "g = 9.8 \t\t\t\t\t\t# [square m/s]\n",
+ "G = 2.202/44.04 \t\t\t\t\t# [kg/s]\n",
+ "L = 0.804/18.63 \t\t\t\t\t# [kg/s]\n",
+ "\n",
+ "Refe = rowg*vo*hl/(ug*phie) \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "cg =rowg/Mg \t\t\t\t\t\t# [kmole/cubic m]\n",
+ "cl = rowl/Ml \t\t\t\t\t\t# [kmole/cubic m]\n",
+ "\n",
+ "\t# For the low concentrations prevailing in the liquid phase, the ethanol- # water \tsolution at 303 K obeys Henry's law, and the slope of the equilibriu# m curve is m = 0.57\n",
+ "m = 0.57 \n",
+ "\t# From equation 4.53\n",
+ "a1 = 0.4136 \n",
+ "a2 = 0.6074 \n",
+ "a3 = -0.3195 \n",
+ "Eog = 1-math.exp(-0.0029*Refe**a1*(hl/Do)**a2*A**a3/((math.sqrt(Dg*(1-phie)/(Dl*A)))*m*cg/cl+1)) \n",
+ "\t# From equation 4.62\n",
+ "Deg = 0.01 \t\t\t\t\t\t# [square m/s]\n",
+ "Peg = 4*Qg*rw**2/(Aa*Deg*(t-h2q)) \t\t\t# [Peclet number]\n",
+ "\t# Since Peclet number is greater than 50, therefore vapor is unmixed\n",
+ "\t# From equation 4.60\n",
+ "Del = 0.1*math.sqrt(g*h2q**3) \t\t\t\t# [square m/s]\n",
+ "\t# From equation 4.59\n",
+ "Pel = 4*ql*rw**2/(Aa*hl*Del) \n",
+ "N = (Pel+2)/2 \n",
+ "lamda = m*G/L \n",
+ "\t# From equation 4.58\n",
+ "Emg = ((1+lamda*Eog/N)**N -1)/lamda*(1-0.0335*lamda**1.073*Eog**2.518*Pel**0.175) \n",
+ "\t# From example 4.8\n",
+ "E = 0.05 \n",
+ "\t# Substituting in equation 4.63\n",
+ "Emge = Emg*(1-0.8*Eog*lamda**1.543*E/m) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The entrainment corrected Murphree tray efficiency for the ethanol is\",round(Emge,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The entrainment corrected Murphree tray efficiency for the ethanol is 0.812\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 5.ipynb b/Beginning_C++_through_Game_Programming/Chapter 5.ipynb
new file mode 100755
index 00000000..0ce97db1
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 5.ipynb
@@ -0,0 +1,517 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Absorption and Stripping"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.1,Page number:287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 5.1\n",
+ "#Number of Real Sieve Trays in an Absorber\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# Component 'A' is to be absorbed #\n",
+ "y_N1 = 0.018\t\t\t\t\t\t# [mole fraction 'A' of in entering gas]\n",
+ "y_1 = 0.001\t\t\t\t\t\t# [mole fractio of 'A'in leaving gas]\n",
+ "x_0 = 0.0001\t\t\t\t\t\t# [mole fraction of 'A' in entering \t\t\t\t\t\t\tliquid]\n",
+ "m = 1.41\t\t\t\t\t\t# [m = yi/xi]\n",
+ "n_1 = 2.115\t\t\t\t\t\t# [molar liquid to gas ratio at bottom, \t\t\t\t\t\t\tL/V]\t\n",
+ "n_2 = 2.326\t\t\t\t\t\t# [molar liquid to gas ratio at top, L/V]\n",
+ "E_MGE = 0.65 \n",
+ "\n",
+ "\n",
+ "print\"Answer 5.1 (a)\"\n",
+ "\t# Solution (a)\n",
+ "\n",
+ "\n",
+ "A_1 = n_1/m\t\t\t\t\t\t# [absorption factor at bottom]\n",
+ "A_2 = n_2/m\t\t\t\t\t\t# [absorption factor at top]\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "A = math.sqrt(A_1*A_2) \n",
+ "\t# Using equation 5.3 to calculate number of ideal stages\n",
+ "N = (math.log(((y_N1-m*x_0)/(y_1-m*x_0))*(1-1/A) + 1/A))/math.log(A)\t# [number of ideal \t\t\t\t\t\t\t\t\tstages]\n",
+ "print\"Number of ideal trays is\",round(N,3)\n",
+ "\t# Using equation 5.5\n",
+ "E_o = math.log(1+E_MGE*(1/A-1))/math.log(1/A) \n",
+ "\t# Therefore number of real trays will be\n",
+ "n = N/E_o\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"Number of real trays is\",round(n,2)\n",
+ "\n",
+ "print\"Since it is not possible to specify a fractional number of trays, therefore number of real trays is\",round(n)\n",
+ "\n",
+ "\n",
+ "print\"\\nAnswer5.1 (b)\"\n",
+ "\n",
+ "\t# Solution (b)\n",
+ "\n",
+ "\t# Back checking the answer\n",
+ "print\"Back checking the answer\"\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "N_o = E_o*n \n",
+ "\t# Putting N_o in equation 5.3 to calculate y_1\n",
+ "def f16(Z):\n",
+ " return(N_o-(math.log(((y_N1-m*x_0)/(Z-m*x_0))*(1-1/A) + 1/A))/math.log(A)) \n",
+ "Z = fsolve(f16,0.001) \n",
+ "print\"Mole fraction of A in leaving gas is\",Z[0],\"percent which satisfies the requirement that the gas exit concentration should not exceed 0.1 percent\"\n",
+ "\n",
+ "\t# For a tower diameter of 1.5 m, Table 4.3 recommends a plate spacing of 0.6 m\n",
+ "Z = n*0.6\t\t\t\t\t\t# [Tower height, m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The tower height will be\",round(Z,1),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Answer 5.1 (a)\n",
+ "Number of ideal trays is"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 4.647\n",
+ "Number of real trays is 7.79\n",
+ "Since it is not possible to specify a fractional number of trays, therefore number of real trays is 8.0\n",
+ "\n",
+ "Answer5.1 (b)\n",
+ "Back checking the answer\n",
+ "Mole fraction of A in leaving gas is 0.001 percent which satisfies the requirement that the gas exit concentration should not exceed 0.1 percent\n",
+ "The tower height will be 4.7 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Exmaple 5.3,Page number:295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 5.3\n",
+ "#Packed-Tower Absorber for Recovery of Benzene Vapors \n",
+ "\n",
+ "%pylab inline\n",
+ "#Variable declaration\n",
+ "\t# For tower diameter, packed tower design program of Appendix D is run using # the data \t\tfrom Example 5.2 and packing parameters from Chapter 4.\n",
+ "\n",
+ "\t# For a pressure drop of 300 Pa/m, the program converges to a tower diameter \n",
+ "Db = 0.641 \t\t\t\t\t\t# [m]\n",
+ "\t# Results at the bottom of tower\n",
+ "fb= 0.733 \t\t\t\t\t\t# [flooding]\n",
+ "ahb = 73.52 \t\t\t\t\t\t# [m**-1]\n",
+ "Gmyb = 126 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "kyb = 3.417 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "klb = 9.74*10**-5 \t\t\t\t\t# [m/s]\n",
+ "\n",
+ "\t# From equation 2.6 and 2.11\n",
+ "\t# Fg = ky*(1-y), Fl = kx*(1-x)\n",
+ "\t# Assume 1-y = 1-y1 1-x = 1-x1\n",
+ "\t# let t = 1-y1 u = 1-x1\n",
+ "\t# Therefore\n",
+ "t = 0.926 \n",
+ "u = 0.676 \n",
+ "Fgb = kyb*t \t\t\t\t\t\t# [mol/square m.s]\n",
+ "rowlb = 780 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "Mlb = 159.12 \t\t\t\t\t\t# [gram/mole]\n",
+ "c = rowlb/Mlb \t\t\t\t\t\t# [kmle/cubic m]\n",
+ "Flb = klb*c*u \t\t\t\t\t\t# [mol/square m.s]\n",
+ "\t# From equ 5.19\n",
+ "Htgb = Gmyb/(Fgb*ahb) \t\t\t\t\t# [m]\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "from pylab import *\n",
+ "\t# Now, we consider the conditions at the top of the absorber\n",
+ "\t# For a pressure drop of 228 Pa/m, the program converges to a tower # diameter\n",
+ "Dt = 0.641 \t\t\t\t\t\t# [m]\n",
+ "\t# Results at the top of tower\n",
+ "ft = 0.668 \t\t\t\t\t\t# [flooding]\n",
+ "aht = 63.31 \t\t\t\t\t\t# [m**-1]\n",
+ "Gmyt = 118 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "kyt = 3.204 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "klt = 8.72*10**-5 \t\t\t\t\t# [m/s]\n",
+ "\n",
+ "rowlt = 765 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "Mlt = 192.7 \t\t\t\t\t\t# [gram/mole]\n",
+ "cl = rowlt/Mlt \t\t\t\t\t# [kmole/cubic m]\n",
+ "Fgt = kyt*0.99 \t\t\t\t\t# [mole/square m.s]\n",
+ "Flt = klb*cl*0.953 \t\t\t\t\t# [mole/square m.s]\n",
+ "\t# From equ 5.19\n",
+ "Htgt = Gmyt/(Fgt*aht) \t\t\t\t\t# [m]\n",
+ "Htg_avg = (Htgb+Htgt)/2 \t\t\t\t# [m]\n",
+ "Fg_avg = (Fgt+Fgb)/2 \t\t\t\t\t# [mole/square m.s]\n",
+ "Fl_avg = (Flb+Flt)*1000/2 \t\t\t\t# [mole/square m.s]\n",
+ "\n",
+ "\t# The operating curve equation for this system in terms of mole fractions\n",
+ "\t# y = \n",
+ "\n",
+ "\t# From Mathcad program figure 5.3\n",
+ "x1 = 0.324 \n",
+ "x2 = 0.0476 \n",
+ "n = 50 \n",
+ "dx = (x1-x2)/n \n",
+ "me = 0.136 \n",
+ "T = zeros((50,2)) \n",
+ "y=zeros((50))\n",
+ "x=zeros((50))\n",
+ "yint=zeros((50))\n",
+ "fd=zeros((50))\n",
+ "for j in range(1,51):\n",
+ " x[j-1] = x2+j*dx \n",
+ " y[j-1] = (0.004+0.154*x[j-1])/(1.004-0.846*x[j-1]) \n",
+ " \n",
+ " def f12(yint):\n",
+ " return((1-yint)/(1-y[j-1]) - ((1-x[j-1])/(1-yint/me))**(Fl_avg/Fg_avg)) \n",
+ " yint[j-1] = fsolve(f12,0.03) \n",
+ " fd[j-1] = 1/(y[j-1]-yint[j-1]) \n",
+ " T[j-1][0] = y[j-1] \n",
+ "\n",
+ " T[j-1][1] = fd[j-1] \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "a1=plot(T[:,0],T[:,1]) \n",
+ "\n",
+ "xlabel(\"y\") \n",
+ "ylabel(\"f = 1/(y-yint)\") \n",
+ "\n",
+ "yo = y[0] \n",
+ "yn = y[49] \n",
+ "\t# From graph between f vs y\n",
+ "Ntg = 10.612 \n",
+ "\t# Therefore\n",
+ "Z = Htg_avg*Ntg\t\t \t\t\t\t\t# [m]\n",
+ "\t\n",
+ "print\"The total packed height is\",round(Z),\"m.\"\t\n",
+ "deltaPg = 300*Z \t \t\t\t\t\t# [Pa]\n",
+ "Em = 0.60 \t\t\t\t\t\t\t # [mechanical efficiency]\n",
+ "Qg = 1.0 \n",
+ "Wg = (Qg*deltaPg)/Em \t\t\t\t\t\t# [Power required to force the \t\t\t\t\t\t\t\tgas through the tower, W]\n",
+ "L2 = 1.214 \t\t\t\t\t\t\t# [kg/s]\n",
+ "g = 9.8 \t\t\t\t\t\t\t# [m/square s]\n",
+ "Wl = L2*g*Z/Em \t\t\t\t\t\t# [Power required to pump the \t\t\t\t\t\t\t\tliquid to the top of the \t\t\t\t\t\t\t\tabsorber, W]\n",
+ "\n",
+ "\n",
+ "print\"The power required to force the gas through the tower is \",round(Wg),\"W.\\n\\n\"\n",
+ "print\"The power required to pump the liquid to the top of the absorber is \",round(Wl),\"W.\\n\\n\"\n",
+ "\n",
+ "show(a1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "The total packed height is"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 6.0 m.\n",
+ "The power required to force the gas through the tower is 2996.0 W.\n",
+ "\n",
+ "\n",
+ "The power required to pump the liquid to the top of the absorber is 119.0 W.\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['power', 'draw_if_interactive', 'random', 'fft', 'linalg', 'info']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEPCAYAAABRHfM8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJ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\nFtcEv0C2uvz8r169mri4OIKDg50f+CK5Lid7dnY2v/nNbwgMDKRBgwbceeedfPnllxe/oYPGXux2\n/Phxo1WrVobNZjPKy8uNrl27Grm5uWe85t133zUGDhxoGIZh5ObmGjExMWd8fdeuXZYNetuTv7q6\n2hg9erQxefJkl+c2DPuyl5SUGIcPHzYMwxz87tmzp7Fy5UqPyX+6rKwso3///i7JfDp78h89etQ4\nevSoYRiGUVZWZvTq1cv48MMPPSa/YRhGXFyckZ+fbxiGYaSmphp//OMfXRfecMzPT0pKivHmm2+6\nLPMp9mTfuHGjERkZaRw7dsyorq42xowZYzz//PMXvZ/bFAzDMIxVq1YZkZGRRseOHY2nn37aMAzD\neO2114zXXnut5jUTJ040IiIijNjY2DO+McOGDTOuueYao2HDhkZ4eLixYMECj8n/xRdfGD4+Pkan\nTp2Mzp07G507dzZWr17tEdnz8vKMzp07G506dTLat29vzJw506W57c1/uqysLEtmSRlG3fPv3LnT\niImJMTp16mTccMMNxhNPPOFR+Q3DMLZs2WJ07drViIiIMPr162eUlpZ6VP6ysjIjMDCw5g8nV7Mn\ne2pqqtG2bVujXbt2RkpKinH8+PGL3ksL90REpFbcZgxDRETcmwqGiIjUigqGiIjUigqGiIjUigqG\niIjUigqGiIjUigqGiIjUigqGiIjUigqGiJ1SU1OZM2dOzT//5S9/0Vn04pW00lvETnv27OHOO+8k\nNzeX6upq2rVrR05OjqXns4g4QwOrA4h4ulatWhEYGMiWLVvYu3cvXbp0UbEQr6SCIeIA9957LwsX\nLmTfvn2MHTvW6jgiTqEuKREHqKioICoqiqqqKn788Ue3OdhLxJHUwhBxAH9/f/r06UOzZs1ULMRr\nqWCIOIBhGGzcuJGlS5daHUXEaTStVsRO3333HR06dCAhIYG2bdtaHUfEaTSGISIitaIWhoiI1IoK\nhoiI1IoKhoiI1IoKhoiI1IoKhoiI1IoKhoiI1Mr/B9vFJr0h3OG9AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x3381d90>"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.4,Page number:299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 5.4\n",
+ "#Packed Height of an Ethanol Absorber\n",
+ "\n",
+ "# From example 4.4\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 0.57 \n",
+ "D = 0.738 \t\t\t\t# [tower diameter, m]\n",
+ "G = 180.0 \t\t\t\t# [rate of gas entering the tower, kmole/h]\n",
+ "L = 151.5 \t\t\t\t# [rate of liquid leaving the tower, kmole/h]\n",
+ "\t# Amount of ethanol absorbed \n",
+ "M = G*0.02*0.97 \t\t\t# [kmole/h]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "\t# Inlet gas molar velocity\n",
+ "Gmy1 = G*4/(3600*math.pi*D**2) \t# [kmole/square m.s]\n",
+ "\t# Outlet gas velocity\n",
+ "Gmy2 = (G-M)*4/(3600*math.pi*D**2) \t# [kmole/square m.s]\n",
+ "\t# Average molar gas velocity\n",
+ "Gmy = (Gmy1+Gmy2)/2 \t\t\t# [kmole/square m.s]\n",
+ "\n",
+ "\t# Inlet liquid molar velocity\n",
+ "Gmx2 = L*4/(3600*math.pi*D**2) \t# [kmole/square m.s]\n",
+ "\t# Outlet liquid molar velocity\n",
+ "Gmx1 = (L+M)*4/(3600*math.pi*D**2) \t# [kmole/square m.s]\n",
+ "\n",
+ "\t# Absorption factor at both ends of the column:\n",
+ "A1 = Gmx1/(m*Gmy1) \n",
+ "A2 = Gmx2/(m*Gmy2) \n",
+ "\t# Geometric average\n",
+ "A = math.sqrt(A1*A2) \n",
+ "\n",
+ "y1 = 0.02 \n",
+ "\t# For 97% removal of the ethanol\n",
+ "y2 = 0.03*0.02 \n",
+ "\t# Since pure water is used \n",
+ "x2 = 0 \n",
+ "\t# From equation 5.24\n",
+ "Ntog = math.log((y1-m*x2)/(y2-m*x2)*(1-1/A)+1/A)/(1-1/A) \n",
+ "\n",
+ "\t# From example 4.4\n",
+ "\t# ky*ah = 0.191 kmole/cubic m.s\n",
+ "\t# kl*ah = 0.00733 s**-1\n",
+ "kyah = 0.191 \t\t\t\t# [kmole/cubic m.s]\n",
+ "klah = 0.00733 \t\t\t# [s**-1]\n",
+ "rowl = 986 \t\t\t\t# [kg/cubic m]\n",
+ "Ml = 18.0 \t\t\t\t# [gram/mole]\n",
+ "c = rowl/Ml \t\t\t\t# [kmole/cubic m]\n",
+ "kxah = klah*c \t\t\t\t# [kmole/cubic m.s]\n",
+ "\n",
+ "\t# Overall volumetric mass transfer coefficient\n",
+ "Kyah = (kyah**-1 + m/kxah)**-1 \t# [kmole/cubic m.s]\n",
+ "\n",
+ "\t# From equation 5.22\n",
+ "Htog = Gmy/Kyah \t\t\t\t# [m]\n",
+ "\t# The packed height is given by equation 5.21,\n",
+ "Z = Htog*Ntog \t\t\t\t\t# [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The packed height of an ethanol absorber is\",round(Z,2),\"m.\\n\\n\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The packed height of an ethanol absorber is 5.66 m.\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.5,Page number:302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 5.5\n",
+ "#Tray Tower for Adiabatic Pentane Absorption\n",
+ "\n",
+ "#Variable declaration\n",
+ "# a = CH4 b = C5H12\n",
+ "Tempg = 27 \t\t\t\t\t\t\t# [OC]\n",
+ "Tempo = 0 \t\t\t\t\t\t\t# [base temp,OC]\n",
+ "Templ = 35 \t\t\t\t\t\t\t# [OC]\n",
+ "xa = 0.75 \t\t\t\t\t\t\t# [mole fraction of CH4 in gas]\n",
+ "xb = 0.25 \t\t\t\t\t\t\t# [mole fraction of C5H12 in gas]\n",
+ "M_Paraffin = 200 \t\t\t\t\t\t# [kg/kmol]\n",
+ "hb = 1.884 \t\t\t\t\t\t\t# [kJ/kg K]\n",
+ "\n",
+ "\n",
+ "Ha = 35.59 \t\t\t\t\t\t\t# [kJ/kmol K]\n",
+ "Hbv = 119.75 \t\t\t\t\t\t\t# [kJ/kmol K]\n",
+ "Hbl = 117.53 \t\t\t\t\t\t\t# [kJ/kmol K]\n",
+ "Lb = 27820 \t\t\t\t\t\t\t# [kJ/kmol]\n",
+ "\t\t# M = [Temp (OC) m]\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "from pylab import *\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "M = matrix([[20,0.575],[25,0.69],[30,0.81],[35,0.95],[40,1.10],[43,1.25]])\n",
+ "\t# Basis: Unit time\n",
+ "GNpPlus1 = 1.0 \t\t\t\t\t\t\t# [kmol]\n",
+ "yNpPlus1 = 0.25 \t\t\t\t\t\t# [kmol]\n",
+ "HgNpPlus1 = ((1-yNpPlus1)*Ha*(Tempg-Tempo))+(yNpPlus1*(Hbv*(Tempg-Tempo)+Lb)) # [kJ/kmol]\n",
+ "L0 = 2.0 \t\t\t\t\t\t\t# [kmol]\n",
+ "x0 = 0 \t\t\t\t\t\t\t\t# [kmol]\n",
+ "HL0 = ((1-x0)*hb*M_Paraffin*(Templ-Tempo))+(x0*hb*(Templ-Tempo))\t # [kJ/kmol]\n",
+ "C5H12_absorbed = 0.98*xb \t\t\t\t\t# [kmol]\n",
+ "C5H12_remained = xb-C5H12_absorbed \n",
+ "G1 = xa+C5H12_remained \t\t\t\t\t\t# [kmol]\n",
+ "y1 = C5H12_remained/G1 \t\t\t\t\t\t# [kmol]\n",
+ "LNp = L0+C5H12_absorbed \t\t\t\t\t# [kmol]\n",
+ "xNp = C5H12_absorbed/LNp \t\t\t\t\t# [kmol]\n",
+ "\t# Assume:\n",
+ "Temp1 = 35.6 \t\t\t\t\t\t\t# [OC]\n",
+ "Hg1 = ((1-y1)*Ha*(Temp1-Tempo))+(y1*(Hbv*(Temp1-Tempo)+Lb)) \t# [kJ/kmol]\n",
+ "Qt = 0 \n",
+ "def f30(HlNp):\n",
+ " return(((L0*HL0)+(GNpPlus1*HgNpPlus1))-((LNp*HlNp)+(G1*Hg1)+Qt)) \n",
+ "HlNp = fsolve(f30,2) \n",
+ "\n",
+ "def f31(TempNp):\n",
+ " return(HlNp-(((1-x0)*hb*M_Paraffin*(TempNp-Tempo))+(x0*hb*(TempNp-Tempo)))) \n",
+ "TempNp = fsolve(f31,35.6) \n",
+ "\t# At Temp = TempNp:\n",
+ "mNp = 1.21 \n",
+ "yNp = mNp*xNp \t\t\t\t\t\t\t# [kmol]\n",
+ "GNp = G1/(1-yNp) \t\t\t\t\t\t# [kmol]\n",
+ "HgNp = ((1-yNp)*Ha*(TempNp-Tempo))+(yNp*(Hbv*(TempNp-Tempo)+Lb)) # [kJ/kmol]\n",
+ "\t# From equation 5.28 with n = Np-1\n",
+ "def f32(LNpMinus1):\n",
+ " return(LNpMinus1+GNpPlus1-(LNp+GNp)) \n",
+ "LNpMinus1 = fsolve(f32,2) \t\t\t\t\t# [kmol]\n",
+ "\n",
+ "\t# From equation 5.29 with n = Np-1\n",
+ "def f33(xNpMinus1):\n",
+ " return(((LNpMinus1*xNpMinus1)+(GNpPlus1*yNpPlus1))-((LNp*xNp)+(GNp*yNp))) \n",
+ "xNpMinus1 = fsolve(f33,0) # [kmol]\n",
+ "\n",
+ "\t# From equation 5.30 with n = Np-1\n",
+ "def f34(HlNpMinus1):\n",
+ " return(((LNpMinus1*HlNpMinus1)+(GNpPlus1*HgNpPlus1))-((LNp*HlNp)+(GNp*HgNp))) \n",
+ "HlNpMinus1 = fsolve(f34,0) # [kJ/kmol]\n",
+ "def f35(TempNpMinus1):\n",
+ " return(HlNpMinus1-(((1-xNpMinus1)*hb*M_Paraffin*(TempNpMinus1-Tempo))+(xNpMinus1*hb*(TempNpMinus1-Tempo)))) \n",
+ "TempNpMinus1 = fsolve(f35,42) # [OC]\n",
+ "\n",
+ "\t# The computation are continued upward through the tower in this manner until the gas \tcomposition falls atleast to 0.00662.\n",
+ "\t# Results = [Tray No.(n) Tn(OC) xn yn]\n",
+ "Results = matrix([[4.0,42.3,0.1091,0.1320],[3,39.0,0.0521,0.0568],[2,36.8,0.0184,0.01875],[1,35.5,0.00463, 0.00450]]) \n",
+ "figure(1)\n",
+ "a1=plot(Results[:,0],Results[:,3]) \n",
+ "xlabel(\"Tray Number\") \n",
+ "ylabel(\"mole fraction of C5H12 in gas\") \n",
+ "show(a1)\n",
+ "figure(2)\n",
+ "a2=plot(Results[:,0],Results[:,1]) \n",
+ "\n",
+ "xlabel(\"Tray Number\") \n",
+ "ylabel(\"Temparature( degree C)\") \n",
+ "\n",
+ "show(a2)\n",
+ "# For the cquired y1\n",
+ "Np = 3.75\n",
+ " \n",
+ "\n",
+ "#result\n",
+ "print\"The No. of trays will be\",round(Np)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEPCAYAAABRHfM8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclWXex/HPUTBzSc1xSdAHExdwARSkaRMzMy1pc54w\nTTMceZpR05qmUStlKs3USrOZrJlsnIyYNiVFxixxyZTMfXBXDHDJMhRcEg7388edZzgKnMNyNvi+\nXy9eL8459/K7vev8uO7run6XxTAMAxEREQfqeDoAERHxDUoYIiLiFCUMERFxihKGiIg4RQlDRESc\nooQhIiJOcWnCSEtLo0uXLnTs2JGZM2de8fmePXv49a9/Tf369ZkzZ84Vn1utViIiIhg8eLArwxQR\nESf4uerAVquVsWPHsmrVKgICAoiKiiI2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IVu2bCn3\nmFOmTOH555/H39/f9p6fnx/FxcWAuX50SfXq1QPM9RhK7lOnTp0yO+QvJTnDMNi0aZPtGGVdm0h1\n0yMpqdXOnDlDmzZtAK6o1Dl69GjGjx9P7969adKkSbnH6d+/P3l5eezYscP2XlBQkG19hY8//tj2\nvqOO7EufG4ZBcnIyAMnJydx4440A3HHHHcybN8+2fcm+FhFXUsKQWqdk38If//hHJk2aRM+ePbFa\nrXaf9ezZkyZNmpT5OOryEVFTpkyxW95y6tSpPP7440RFReHn52fb9vL9Lu/rKLndTz/9RFhYGK+/\n/jqvvvoqAPPmzWPz5s2EhYXRtWtXW7nq0o4lUp1U3lykDEePHqVv377s3bvX06GIeAW1MERKsWjR\nIm644QamT5/u6VBEvIZaGCIi4hS1MERExClKGCIi4hQlDBERcYoShoiIOEUJQ0REnKKEISIiTvl/\nQTWVrgp1O2cAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x79d2b70>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEPCAYAAACgFqixAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYlHX+//HnIJ7IlLIEy64oywo8MGRihjlqaJpYiuZX\nV8PS/VltWbaaafUVw8xvnlYrd7NsXTus5qlFI0uLMclTJh7KDEtTWY+UiAdQYO7fH/cy6wEcGLkZ\nBl6P6+IC5nDP++7O+83n9P7YDMMwEBGRai3A1wGIiIjvKRmIiIiSgYiIKBmIiAhKBiIigpKBiIhQ\nAcmgsLAQu91OXFwcAC+//DKtWrUiMjKSzp07s3//fqtDEBERD2xWrzOYNm0a3333HSdOnCA5OZkT\nJ05w5ZVXAvDGG2+wdetW3n33XStDEBERDyxtGWRmZpKSksLQoUMpyjlFiQDg5MmTXHPNNVaGICIi\npRBo5cFHjBjB5MmTycnJOe/xF198kffff5+goCDWr19vZQgiIl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UI2b958yWO++OKLJCUlUbNmTfdjgYGBuFwuwNxr\n91y1atUCzFr6574nICCgxMHtogRmGAYbNmxwH6OkcxOxgrqJpErKycnhuuuuA7ioYuPQoUMZPnw4\nbdq0oUGDBpc8TmxsLNnZ2Wzbts39WFhYmLs2/uLFi92PexoULnreMAwWLFgAwIIFC2jXrh0AXbp0\nYebMme7Xnzu2IWI1JQOpMs7ty3/++ecZM2YMUVFRFBYWnvdcVFQUDRo0KLGL6MKZQy+++OJ5WwaO\nGzeOZ555hrvuuovAwED3ay9834VjC+e+7tixY7Rq1Yo33niD6dOnAzBz5kw2bdpEq1atiIiIcJck\nLu5YIuVNJayl2jlw4AAdO3bkp59+8nUoIpWGWgZSrcybN4+2bdsyceJEX4ciUqmoZSAiImoZiIiI\nkoGIiKBkICIiKBmIiAhKBiIigpKBiIgA/x8nsUSmp5O6NgAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7e3dcc0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The No. of trays will be 4.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 6.ipynb b/Beginning_C++_through_Game_Programming/Chapter 6.ipynb
new file mode 100755
index 00000000..fd173e33
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 6.ipynb
@@ -0,0 +1,1088 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6:Distillation "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.1,Page number:324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 6.1\n",
+ "#Flash Vaporization of a Heptan+Octane Mixture\n",
+ "# solution\n",
+ "# n-heptane - a n-octane - b\n",
+ "T1 = 303 # [K]\n",
+ "P = 1 # [bar]\n",
+ "D = 0.6 \n",
+ "W = 0.4 \n",
+ "zf = 0.5 \n",
+ " \n",
+ "# Parameters for componenr 'A'\n",
+ "Tc_a = 540.3 # [K]\n",
+ "Pc_a = 27.4 # [bar]\n",
+ "A_a = -7.675 \n",
+ "B_a = 1.371 \n",
+ "C_a =-3.536 \n",
+ "D_a = -3.202 \n",
+ "\n",
+ "# Parameters for component 'B'\n",
+ "Tc_b = 568.8 # [K]\n",
+ "Pc_b = 24.9 # [bar]\n",
+ "A_b = -7.912 \n",
+ "B_b = 1.380 \n",
+ "C_b = -3.804 \n",
+ "D_b = -4.501 \n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "from scipy.optimize import fsolve\n",
+ "# Using equation 6.5\n",
+ "# x_a = 1-(T/Tc_a) \n",
+ "# P_a = Pc_a*math.exp((A_a*x_a+B_a*x_a**1.5+C_a*x_a**3+D_a*x_a**6)/(1-x_a)) # [bar]\n",
+ "\n",
+ "# x_b = 1-(T/Tc_b) \n",
+ "# P_b = Pc_b*math.exp((A_b*x_b+B_b*x_b**1.5+C_b*x_b**3+D_b*x_b**6)/(1-x_b)) # [bar]\n",
+ "\n",
+ "# m_a = P_a/P \n",
+ "# m_b = P_b/P \n",
+ "\n",
+ "# Solution of simultaneous equation\n",
+ "def F(e):\n",
+ " f1 = e[1] - (e[2]*Pc_a*math.exp(((A_a*(1-(e[0]/Tc_a))+B_a*(1-(e[0]/Tc_a))**1.5+C_a*(1-(e[0]/Tc_a))**3+D_a*(1-(e[0]/Tc_a))**6))/(1-(1-(e[0]/Tc_a)))))/P \n",
+ " f2 = 1-e[1] - ((1-e[2])*Pc_b*math.exp((A_b*(1-(e[0]/Tc_b))+B_b*(1-(e[0]/Tc_b))**1.5+C_b*(1-(e[0]/Tc_b))**3+D_b*(1-(e[0]/Tc_b))**6)/(1-(1-(e[0]/Tc_b)))))/P \n",
+ " f3 = (-W/D) - ((e[1]-zf)/(e[2]-zf)) \n",
+ " return(f1,f2,f3)\n",
+ "\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [400,0.6,0.4] \n",
+ "y = fsolve(F,e) \n",
+ "T = y[0] # [K] \n",
+ "Yd = y[1] \n",
+ "Xw = y[2] \n",
+ "\n",
+ "print\"The composition of the vapor and liquid and the temperature in the separator if it behaves as an ideal stage are\",round(Yd,3),round(Xw,3),\"and\",round(T,1),\"K respectively\\n\\n\"\n",
+ "\n",
+ "# For the capculation of the amount of heat to be added per mole of feed\n",
+ "T0 = 298 # [K]\n",
+ "lambdaA = 36.5 # [Latent heats of vaporization at To = 298 K ,kJ/mole]\n",
+ "lambdaB = 41.4 # [Latent heats of vaporization at To = 298 K ,kJ/mole]\n",
+ "CpA = 0.187 # [kJ/mole.K]\n",
+ "CpB = 0.247 # [kJ/mole.K]\n",
+ "CLA1 = 0.218 # [ 298-303 K, kJ/mole.K]\n",
+ "CLB1 = 0.253 # [ 298-303 K, kJ/mole.K]\n",
+ "CLA2 = 0.241 # [ 298-386 K, kJ/mole.K]\n",
+ "CLB2 = 0.268 # [ 298-386 K, kJ/mole.K]\n",
+ "# Bubble point calculated when 'D' approaches 0 and Dew point calculated when 'D' approaches 1\n",
+ "Tbp = 382.2 # [Bubble point of the mixture, K]\n",
+ "Tdp = 387.9 # [Dew point of mixture, K]\n",
+ "\n",
+ "HF = (T1-T0)*(Xw*CLA1+CLB1*(1-Xw)) # [kJ/mole]\n",
+ "HW = (Tbp-T0)*(Xw*CLA2+CLB2*(1-Xw)) # [kJ/mole]\n",
+ "HG = (Tdp-T0)*(Yd*CpA+(1-Yd)*CpB) + Yd*lambdaA +(1-Yd)*lambdaB # [kJ/mole]\n",
+ "\n",
+ "f =1 # [feed]\n",
+ "# Using equation 6.4\n",
+ "def f14(Q):\n",
+ " return(W/D + (HG-(HF+Q/f))/(HW -(HF+Q/f)))\n",
+ "Q = fsolve(f14,40) \n",
+ "print\"The amount of heat to be added per mole of feed is\",round(Q[0],2),\"kJ/mole\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The composition of the vapor and liquid and the temperature in the separator if it behaves as an ideal stage are 0.576 0.385 and 385.4 K respectively\n",
+ "\n",
+ "\n",
+ "The amount of heat to be added per mole of feed is 42.08 kJ/mole\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.2,Page number:326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 6.2\n",
+ "\n",
+ "# solution\n",
+ "\n",
+ "# a-benzene b-toluene c-orthoxylene\n",
+ "T = 373 # [K]\n",
+ "P = 101.3 # [kPa]\n",
+ "Pa = 182.7 # [kPa]\n",
+ "Pb = 73.3 # [kPa]\n",
+ "Pc= 26.7 # [kPa]\n",
+ "Zfa = 0.5 \n",
+ "Zfb = 0.25 \n",
+ "Zfc = 0.25 \n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "from scipy.optimize import fsolve\n",
+ "# Therefore\n",
+ "ma = Pa/P \n",
+ "mb = Pb/P \n",
+ "mc = Pc/P \n",
+ "# Let Feed is 1 kmole\n",
+ "# Therefore D+W = 1\n",
+ "\n",
+ "# Solution of simultaneous equation\n",
+ "def F(e):\n",
+ " f1 = e[0]+e[1]-1 \n",
+ " f2 = e[1]/e[0] + (e[2]-Zfa)/(e[3]-Zfa) \n",
+ " f3 = e[2]-ma*e[3] \n",
+ " f4 = e[4]-mb*e[5] \n",
+ " f5 = 1-e[2]-e[4] -mc*(1-e[3]-e[5]) \n",
+ " f6 = e[1]/e[0] + (e[4]-Zfb)/(e[5]-Zfb) \n",
+ "\n",
+ " return(f1,f2,f3,f4,f5,f6)\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [0.326,0.674,0.719,0.408,0.198,0.272] \n",
+ "y = fsolve(F,e) \n",
+ "D = y[0] \n",
+ "W = y[1] \n",
+ "Yad = y[2] \n",
+ "Xaw = y[3] \n",
+ "Ybd = y[4] \n",
+ "Xbw = y[5] \n",
+ "Ycd = 1-Yad-Ybd \n",
+ "Xcw = 1-Xaw-Xbw \n",
+ "\n",
+ "print\"The amounts of liquid and vapor products are D=\",round(D,3),\"and W=\",round(W,3),\"respectively\"\n",
+ "print\"The vapor compositions of components A(Yad), B(Ybd) and C(Ycd) are\",round(Yad,3),round(Ybd,3),round(Ycd,3),\"respectively\"\n",
+ "print\"The liquid composition of components A(Xaw), B(Xbw) and C(Xcw) are\",round(Xaw,3),round(Xbw,3),round(Xcw,3),\"respectively\\n\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amounts of liquid and vapor products are D= 0.326 and W= 0.674 respectively\n",
+ "The vapor compositions of components A(Yad), B(Ybd) and C(Ycd) are 0.714 0.199 0.087 respectively\n",
+ "The liquid composition of components A(Xaw), B(Xbw) and C(Xcw) are 0.396 0.275 0.329 respectively\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.3,Page number:328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 6.3\n",
+ "#Differential Distillation of a Heptane-Octane Mixture\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# n-heptane - a n-octane - b\n",
+ "P = 1 \t\t\t\t\t\t# [bar]\n",
+ "\n",
+ "\t# Basis:\n",
+ "F = 100 \t\t\t\t\t# [mole]\n",
+ "\t# Therefore\n",
+ "D = 60 \t\t\t\t\t# [mole]\n",
+ "W = 40 \t\t\t\t\t# [mole]\n",
+ "xf = 0.5 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "from pylab import *\n",
+ "y_star = [0.5,0.55,0.60,0.65,0.686,0.70,0.75] \n",
+ "x = [0.317,0.361,0.409,0.460,0.5,0.516,0.577] \n",
+ "#for i in range(1,7):\n",
+ "# f(i-1) = 1/(y_star(i-1)-x(i-1)) \n",
+ "area = matrix([[0.317,5.464],[0.361,5.291],[0.409,5.236],[0.460,5.263],[0.5,5.376],[0.516,5.435],[0.577,7.78]]) \n",
+ "\t# LHS of equation 6.11\n",
+ "a = math.log(F/W) \n",
+ "\n",
+ "\n",
+ "a1=plot(area[:,0],area[:,1],label='$area under curve$') \n",
+ "legend(loc='upper left')\n",
+ "xlabel(\"x\") \n",
+ "ylabel(\"1/(y_satr-x)\") \n",
+ "\n",
+ "# When the area becomes equal to 0.916, integration is stopped this occurs at \n",
+ "xw = 0.33 # [mole fraction of heptane in residue]\n",
+ "yd =( F*xf-W*xw)/D # [mole fraction of heptane]\n",
+ "#Result\n",
+ "\n",
+ "print\"The composition of the composited distillate and the residue are \",round(yd,3),\"and\",round(xw,3),\"respectively\\n\\n\"\n",
+ "show(a1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The composition of the composited distillate and the residue are 0.613 and 0.33 respectively\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUU1e+B/BvFKqCCOIThfoAKj4wBhGVO0isFoVWL7bW\noWqlaC3V6ahd09XermlH67iW9tY+Rl3jWN/YWpyiVcoAWrSxthRRQe2tUxQL00gFREQFFAic+8cp\n0QjEhOTkJOH7WSuLR06S3/ZIvtl7n32OQhAEAURERG3oJHcBRERk3xgURERkFIOCiIiMYlAQEZFR\nDAoiIjKKQUFEREZJHhRr167FyJEjERwcjLlz56Kurq7FNsuWLUNgYCCUSiXy8/OlLomIiMwgaVAU\nFxdj69atyMvLww8//IDGxkYkJycbbJOeno7CwkJcunQJH3/8MZYsWSJlSUREZCZJg6JHjx5wdXVF\nbW0tdDodamtrMXDgQINtUlNTER8fDwAYP348qqqqUFZWJmVZRERkBkmDwtvbG3/605/w6KOPYsCA\nAfDy8sLUqVMNtikpKYGfn5/+Z19fX1y5ckXKsoiIyAySBsXly5fx0Ucfobi4GL/++iuqq6vx6aef\nttjuwbOIKBQKKcsiIiIzuEj55KdPn0Z4eDh69eoFAHj66aeRnZ2NefPm6bcZOHAgtFqt/ucrV660\nGJ4CgICAAFy+fFnKcomInI6/vz8KCwsteg5JexRBQUHIycnBnTt3IAgCsrKyMGLECINtZs6ciaSk\nJABATk4OvLy80K9fvxbPdfnyZQiC4LS3lStXyl4D28b2sX3Od7PGB2xJexRKpRILFixAaGgoOnXq\nhJCQECxevBhbtmwBACQmJiImJgbp6ekICAiAu7s7du7cKWVJRERkJkmDAgBef/11vP766wa/S0xM\nNPh506ZNUpdBRETtxJXZdkKtVstdgmScuW0A2+fonL191qAQBMEhLlykUCjgIKUSEdkNa7x3Sj70\nJDVvb2/cuHFD7jJIJj179kRlZaXcZRA5NYfvUbCn0bFx/xMZZ42/Ec5REBGRUQwKIiIyikFBRERG\nMSiIiMgoBgURERnFoOjgvv76awwYMMDgxIxERPdjUHRwERER6Nevn8E1QYiI7seg6ODOnDmDcePG\nyV0GUYeSnAzk5cldhemcPigUCuvc2uvixYt4++23kZ6ejueffx5paWnIy8vDvn37oFar8be//Q0h\nISHQarX48ccf8cYbb+Bf//oXVq9e3epzzJ8/H2lpadBqtThw4ACee+45AEBDQ4P+6oFnzpzB3//+\nd7z11ls4ePAg9u/fj4ULF7Z4vszMTKxduxZTpkwBgFZfv61aS0pKsHr1amRkZCA0NBT19fV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qakJ4eHh0Gg0UKvVcpdGZHXsURARkVGcoyAi\nIqMYFEREZBSDgoiIjGJQEBGRUQwKIiIyikFBRERGMSiIiMgoBgURERn1/9PstASQFiXjAAAAAElF\nTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x762d0b8>"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.4,Page number:342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 6.4\n",
+ "# Page: 342\n",
+ "\n",
+ "\n",
+ "# solution\n",
+ "\n",
+ "T = 298 \t\t\t\t\t\t\t\t# [K]\n",
+ "Fa = 200 \t\t\t\t\t\t\t\t# [feed, kmole/hr]\n",
+ "zf = 0.6 \n",
+ "yd = 0.95 \n",
+ "xd = yd \n",
+ "xw = 0.05 \n",
+ "q = 0.5 \t\t\t\t\t\t\t\t# [Lf/F]\n",
+ "\n",
+ "\n",
+ "print\"Illustration 6.4(a)\"\n",
+ "\t# Solution (a)\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "\n",
+ "\t# Solution of simultaneous equation \n",
+ "def F(e):\n",
+ " f1 = Fa - e[0]-e[1] \n",
+ " f2 = zf*Fa - yd*e[0] - xw*e[1] \n",
+ " return(f1,f2)\n",
+ "\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [120,70] \n",
+ "y = fsolve(F,e) \n",
+ "D = y[0] \n",
+ "W = y[1] \n",
+ "print\"Quantity of liquid and vapor products are \",round(D,1),\"kmole/h and\",round(W,1),\"kmole/h respectively\"\n",
+ "\n",
+ "\n",
+ "print\"Illustration 6.4(b)\"\n",
+ "# Solution(b)\n",
+ "\t# VLE data is generated in the same manner as generated in Example 6.1 by applying \tRaoult's law\n",
+ "\t# VLE_data = [T,x,y]\n",
+ "VLE_data = matrix([[379.4,0.1,0.21],[375.5,0.2,0.37],[371.7,0.3,0.51],[368.4,0.4,0.64],[365.1,0.5,0.71],[362.6,0.6,0.79],[359.8,0.7,0.86],[357.7,0.8,0.91],[355.3,0.9,0.96]]) \n",
+ "\t# From figure 6.14\n",
+ "\t# The minimum number of equilibrium stages is stepped off between the equilibrium curve and the 45 degree Iine, starting from the top, giving\n",
+ "Nmin = 6.7 \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The minimum number of theoretical stages is\",Nmin\n",
+ "\n",
+ "print\"Illustration 6.4(c)\"\n",
+ "\t# Solution(c)\n",
+ "\t# Slope of q-line = Lf/F/(1-(Lf/F))\n",
+ "s = q/(1-q) \n",
+ "\t# For minimum reflux ratio\n",
+ "\t# From figure 6.12 y-intercept is\n",
+ "i = 0.457 \n",
+ "# Therefore Rmin is\n",
+ "Rmin = xd/i -1 \n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print\"The minimum reflux ratio is\",round(Rmin,3),\"mole reflux/mole distillate\"\n",
+ "\n",
+ "print\"Illustration 6.4(d)\"\n",
+ "\n",
+ "\t# Solution(d)\n",
+ "R = 1.3*Rmin \n",
+ "\t# The y-intercept of the rectifying-section operating line is\n",
+ "ia = xd/(R+1) \n",
+ "\t# The operating line for the stripping section is drawn to pass through the point x = y = \txw =0.05 on the 45\" line and the point of intersection of the q-line # and the \t\t\trectifying-section operating line.\n",
+ "\t# Therefore from figure 6.15 \n",
+ "Nact = 13 \n",
+ "\t# But it include boiler\n",
+ "Nact1 = Nact-1 \n",
+ "print\"The number of equilibrium stages for the reflux ratio specified is\",Nact1\n",
+ "\t# For the optimal feed-stage location, the transition from one operating line to the \tother occurs \tat the first opportunity\n",
+ "\t# after passing the operating-line intersection \n",
+ "\t# Therefore from figure 6.15 shows that \n",
+ "\n",
+ "\n",
+ "print\"The optimal location of the feed stage for the reflux ratio specified is sixth from the top\"\n",
+ "\n",
+ "print\"Illustration 6.4(e)\"\n",
+ "# Solution(e)\n",
+ "L = R*D \t\t\t\t\t\t\t\t# [kmole/h]\n",
+ "V = L+D \t\t\t\t\t\t\t\t# [kmole/h]\n",
+ "# From equation 6.27\n",
+ "Lst = L+q*Fa \t\t\t\t\t\t\t\t# [kmole/h]\n",
+ "# From equation 6.28\n",
+ "Vst = V+(q-1)*Fa \t\t\t\t\t\t\t# [kmole/h]\n",
+ "\n",
+ "\t# For 50% vaporization of the feed ( zf = 0.60), from calculations similar to those \t\tillustrated in Example 6.1, the separator temperature and the equilibrium # \tcompositions are\n",
+ "Tf = 365.5 \t\t\t\t\t\t\t\t# [K]\n",
+ "yf = 0.707 \n",
+ "xf = 0.493 \n",
+ "\n",
+ "\t# Latent heat vaporisation data at temperature T = 298 K\n",
+ "lambdaA = 33.9 \t\t\t\t\t\t\t# [kJ/mole]\n",
+ "lambdaB = 38 \t\t\t\t\t\t\t\t# [kJ/mole]\n",
+ "\t# Heat capacities of liquids (298-366 K)\n",
+ "Cla = 0.147 \t\t\t\t\t\t\t\t# [kJ/mole.K]\n",
+ "Clb = 0.174 \t\t\t\t\t\t\t\t# [kJ/mole.K]\n",
+ "\t# Heat capacities of gases, average in the range 298 to 366 K\n",
+ "Cpa = 0.094 \t\t\t\t\t\t\t\t# [kJ/mole.K]\n",
+ "Cpb = 0.118 \t\t\t\t\t\t\t\t# [kJ/mole.K]\n",
+ "\t# Substituting in equation 6.6 gives\n",
+ "Hf = 0 \n",
+ "Hlf = (Tf-T)*(xf*Cla+(1-xf)*Clb) \t\t\t\t\t# [kJ/mole of liquid \t\t\t\t\t\t\t\t\tfeed]\n",
+ "\t# From equation 6.7\n",
+ "Hvf = (Tf-T)*(yf*Cpa+(1-yf)*Cpb) + yf*lambdaA + (1-yf)*lambdaB \t# [kJ/mole of vapor feed]\n",
+ "\n",
+ "Lf = Fa*q \t\t\t\t\t# [kmole/h]\n",
+ "Vf = Fa*(1-q) \t\t\t\t\t# [kmole/h]\n",
+ "\t# From equation 6.3\n",
+ "Qf = (Hvf*Vf +Hlf*Lf-Fa*Hf)*1000.0/3600.0 # [kW]\n",
+ "\n",
+ "\n",
+ "Tlo = 354.3 \t\t\t\t\t# [Bubble point temperature, K]\n",
+ "T1 = 355.8 \t\t\t\t\t# [Dew point temperature, K]\n",
+ "y1 = 0.95 \t\t\t\t\t# [composition of saturated vapor at dew point]\n",
+ "x0 = 0.95 \t\t\t\t\t# [composition of saturated liquid at bubble \t\t\t\t\t\tpoint]\n",
+ "Hv1 = (T1-T)*(y1*Cpa+(1-y1)*Cpb) + y1*lambdaA + (1-y1)*lambdaB # [kJ/mole of vapor feed]\n",
+ "Hlo = (Tlo-T)*(x0*Cla+(1-x0)*Clb) \t\t# [kJ/mole of liquid feed]\n",
+ "\n",
+ "\t# An energy balance around condenser\n",
+ "Qc = V*(Hv1-Hlo)*1000/3600 \t\t\t# [kW]\n",
+ "\n",
+ "\t# A flash-vaporization calculation is done in which the fraction vaporized is known \t(53.8/75.4 = \t0.714) and the concentration\n",
+ "\t# of the liquid residue is fixed at xw = 0.05\n",
+ "\t# The calculations yield\n",
+ "Tr = 381.6 \t\t\t\t\t# [K]\n",
+ "x12 = 0.093 \n",
+ "y13 = 0.111 \n",
+ "T12 = 379.7 \t\t\t\t\t# [Bubble point of the liquid entering in the \t\t\t\t\t\treboiler, K]\n",
+ "\n",
+ "Hl12 = (T12-T)*(x12*Cla+(1-x12)*Clb) \t\t# [kJ/mole of liquid feed]\n",
+ "Hv13 = (Tr-T)*(y13*Cpa+(1-y13)*Cpb) + y13*lambdaA + (1-y13)*lambdaB # [kJ/mole of vapor feed]\n",
+ "\n",
+ "Hlw = (Tr-T)*(xw*Cla+(1-xw)*Clb) # [kJ/mole of liquid feed]\n",
+ "\n",
+ "\t# An energy balance around the reboiler \n",
+ "Qr = (Vst*Hv13+W*Hlw-Lst*Hl12)*1000.0/3600.0 \t# [kW]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The thermal load of the condenser, reboiler, and feed preheater are\",round(Qc),\"kW\",round(Qr),\"kW\",\"and\", round(Qf),\"kW respectively\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Illustration 6.4(a)\n",
+ "Quantity of liquid and vapor products are 122.2 kmole/h and 77.8 kmole/h respectively\n",
+ "Illustration 6.4(b)\n",
+ "The minimum number of theoretical stages is 6.7\n",
+ "Illustration 6.4(c)\n",
+ "The minimum reflux ratio is 1.079 mole reflux/mole distillate\n",
+ "Illustration 6.4(d)\n",
+ "The number of equilibrium stages for the reflux ratio specified is 12\n",
+ "The optimal location of the feed stage for the reflux ratio specified is sixth from the top\n",
+ "Illustration 6.4(e)\n",
+ "The thermal load of the condenser, reboiler, and feed preheater are 2549.0 kW 1794.0 kW and 1466.0 kW respectively\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "C:\\Anaconda\\lib\\site-packages\\scipy\\optimize\\minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last ten iterations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.7,Page number:357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 6.7\n",
+ "\n",
+ "#Overall Efficiency of a Benzene-Toluene Fractionator\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-benzene b-toluene\n",
+ "xa = 0.46 \n",
+ "xb = 0.54 \n",
+ "Tb = 395 \t\t\t\t# [bottom temp., K]\n",
+ "Tt = 360 \t\t\t\t# [top temp., K]\n",
+ "alphab = 2.26 \n",
+ "alphat = 2.52 \n",
+ "D = 1.53 \t\t\t\t# [diameter of column, m]\n",
+ "f = 0.81 \t\t\t\t# [flooding]\n",
+ "deltaP = 700 \t\t\t\t# [average gas-pressure drop, Pa/tray]\n",
+ "import math\n",
+ "\n",
+ "Tavg = (Tb+Tt)/2 \t\t\t# [K]\n",
+ "alpha_avg = (alphab+alphat)/2 \n",
+ "\n",
+ "print \"Solution6.7(a)\" \n",
+ "\t# Solution(a)\n",
+ "\t\n",
+ "\t# Constants for components 'a' and 'b'\n",
+ "Aa = 4.612 \n",
+ "Ba = 148.9 \n",
+ "Ca = -0.0254 \n",
+ "Da = 2.222*10**-5 \n",
+ "ua =math.exp(Aa+Ba/Tavg+Ca*Tavg+Da*Tavg**2) \t\t\t# [cP]\n",
+ "\n",
+ "Ab = -5.878 \n",
+ "Bb = 1287 \n",
+ "Cb = 0.00458 \n",
+ "Db = -0.450*10**-5 \n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "ub = math.exp(Ab+Bb/Tavg+Cb*Tavg+Db*Tavg**2) \t\t\t# [cP]\n",
+ "\n",
+ "\t# At the average column temperature \n",
+ "ul = ua**xa*ub**xb \t\t\t\t\t\t# [cP]\n",
+ "K = alpha_avg*ul \n",
+ "\t# From the O\u2019Connell correlation\n",
+ "Eo = 0.52782-0.27511*math.log10(K) + 0.044923*(math.log10(K))**2 \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The overall tray efficiency using the O\u2019Connell correlation is \",round(Eo,1) \n",
+ "\n",
+ "print \"Example 6.7(b)\"\n",
+ "\t# Solution(b)\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Nideal = 20 \t\t\t\t\t\t\t# [number of ideal stages]\n",
+ "Nreal = Nideal/(Eo) \t\t\t\t\t\t# [nnumber of real stages]\n",
+ "print Nreal \n",
+ "\t# Since real stages cannot be fractional, therefore\n",
+ "Nreal = 34 \n",
+ "\t# From Table 4.3 tray spacing \n",
+ "t = 0.6 \t\t\t\t\t\t\t# [m]\n",
+ "\t# Adding 1 m over the top tray as an entrainment separator and 3 m beneath # the bottom \ttray for bottoms surge capacity, the total column height is\n",
+ "Z = 4+Nreal*t \t\t\t\t\t\t\t# [m]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The number of real trays and the total tower height are\",Nreal,\"and\",Z,\" m respectively\"\n",
+ "\n",
+ "print \"Solution 6.7(c)\"\n",
+ "\t# Solution(c)\n",
+ "\n",
+ "\t# Total gas pressure drop\n",
+ "deltaPc = deltaP*Nreal/1000 \t\t\t\t\t# [kPa]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The total gas-pressure drop through the column is\",deltaPc,\"kPa\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution6.7(a)\n",
+ "The overall tray efficiency using the O\u2019Connell correlation is 0.6\n",
+ "Example 6.7(b)\n",
+ "32.1801990089\n",
+ "The number of real trays and the total tower height are 34 and 24.4 m respectively\n",
+ "Solution 6.7(c)\n",
+ "The total gas-pressure drop through the column is 23 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.10,Page number:371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 6.10\n",
+ "# Use of Fenske Equation for Ternary Distillation \n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A-toluene B-1,2,3-trimethyl benzene C-benzene\n",
+ "\t# Solution of above three are ideal \n",
+ "\t# Feed\n",
+ "za = 0.40 \n",
+ "zb = 0.30 \n",
+ "zc = 0.30 \n",
+ "\t# Bottom \n",
+ "FRAd = 0.95 \t\t\t\t# [recovery of toluene in distillate]\n",
+ "FRBw = 0.95 \t\t\t\t# [recovery of 1,2,3-trimethyl benzene in the bottom]\n",
+ "P = 1 \t\t\t\t\t# [atm]\n",
+ "\n",
+ "\t# First estimate of distillate composition \n",
+ "xc = 40/70 \n",
+ "xa = 30/70 \n",
+ "xb = 0 \n",
+ "\t# The bubble point temperature for this solution is \n",
+ "Tb = 390 \t\t\t\t# [K]\n",
+ "\t# The corresponding parameters for benzene, toluene and 1,2,3-trimethyl benzene\n",
+ "\t# For toluene\n",
+ "Tc_a = 568.8 \t\t\t\t\t# [K]\n",
+ "Pc_a = 24.9 \t\t\t\t\t# [bar]\n",
+ "A_a = -7.912 \n",
+ "B_a = 1.380 \n",
+ "C_a =-3.804 \n",
+ "D_a = -4.501 \n",
+ "\t# For 1,2,3-trimethyl benzene\n",
+ "Tc_b = 664.5 \t\t\t\t\t# [K]\n",
+ "Pc_b = 34.5 \t\t\t\t\t# [bar]\n",
+ "A_b = -8.442 \n",
+ "B_b = 2.922 \n",
+ "C_b =-5.667 \n",
+ "D_b = -2.281 \n",
+ "\t# For benzene\n",
+ "Tc_c = 540.3 \t\t\t\t\t# [K]\n",
+ "Pc_c = 27.4 \t\t\t\t\t# [bar]\n",
+ "A_c = -7.675 \n",
+ "B_c = 1.371 \n",
+ "C_c =-3.536 \n",
+ "D_c = -3.202 \n",
+ "\n",
+ "\n",
+ "\t# At the estimated reboiler temperature of 449.3 K\n",
+ "Tr = 449.3 \t\t\t\t\t# [K]\n",
+ "\t# P = [Toluene 1,2,3-trimethyl benzene Benzene]\n",
+ "\n",
+ "\t# P = [Tc Pc A B C D]\n",
+ "P1=zeros((3,6))\n",
+ "P1= matrix([[568.8,24.9,-7.912,1.380,-3.804,-4.501],[664.5,34.5,-8.442,2.922,-5.667,2.281],[540.3,27.4,-7.675,1.371,-3.536,-3.202]]) \n",
+ "\n",
+ "for i in range(0,3):\n",
+ " P1[i]= P1[i,1]*math.exp((P1[i,2]*(1-Tr/P1[i,0])+P1[i,3]*(1-Tr/P1[i,0])**1.5+P1[i,4]*(1-Tr/P1[i,0])**3+P1[i,5]*(1-Tr/P1[i,0])**6)/(1-(1-Tr/P1[i,0]))) \n",
+ "\n",
+ "PA1 = P1.item(0) \t\t\t\t\t# [bar]\n",
+ "PB1 = P1.item(6) \t\t\t\t\t# [bar]\n",
+ "PC1 = P1.item(12)\t\t\t\t# [bar]\n",
+ "alphaAB1 = PA1/PB1 \n",
+ "alphaCB1 = PC1/PB1 \n",
+ "\n",
+ "\t\t# At the estimated distillate temperature of 390 K\n",
+ "Td = 390 \t\t\t\t\t# [K]\n",
+ "\t# P = [Toluene 1,2,3-trimethyl benzene Benzene]\n",
+ "\t# P = [Tc,Pc,A,B,C,D]\n",
+ "P2 = zeros((3,6)) \n",
+ "P2= matrix([[568.8,24.9,-7.912,1.380,-3.804,-4.501],[664.5,34.5,-8.442,2.922,-5.667,2.281],[540.3,27.4,-7.675,1.371,-3.536,-3.202]]) \n",
+ "for i in range(0,3):\n",
+ " P2[i] = P2[i,1]*math.exp((P2[i,2]*(1-Td/P2[i,0])+P2[i,3]*(1-Td/P2[i,0])**1.5+P2[i,4]*(1-Td/P2[i,0])**3+P2[i,5]*(1-Td/P2[i,0])**6)/(1-(1-Td/P2[i,0])))\n",
+ " \n",
+ "PA2 = P2.item(0) # [bar]\n",
+ "PB2 = P2.item(6) # [bar]\n",
+ "PC2 = P2.item(12) # [bar]\n",
+ "alphaAB2 = PA2/PB2 \n",
+ "alphaCB2 = PC2/PB2 \n",
+ "# The geometric-average relative volatilities are\n",
+ "alphaAB_avg = math.sqrt(alphaAB1*alphaAB2) \n",
+ "alphaCB_avg = math.sqrt(alphaCB1*alphaCB2) \n",
+ "\n",
+ "# From equation 6.66\n",
+ "Nmin = math.log(FRAd*FRBw/((1-FRAd)*(1-FRBw)))/log(alphaAB_avg) \n",
+ "\n",
+ "# From equation 6.67\n",
+ "FRCd = alphaCB_avg**Nmin/((FRBw/(1-FRBw))+alphaCB_avg**Nmin) # [fractional recovery of benzene in the distillate]\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print\"The number of equilibrium stages required at total reflux is\",round(Nmin,2)\n",
+ "print\"The recovery fraction of benzene in the distillate is \",round(FRCd,3)\n",
+ "print\"\\n\\nThus, the assumption that virtually all of the LNK will be recovered in the distillate is justified\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of equilibrium stages required at total reflux is 4.32\n",
+ "The recovery fraction of benzene in the distillate is 0.997\n",
+ "\n",
+ "\n",
+ "Thus, the assumption that virtually all of the LNK will be recovered in the distillate is justified\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.11,Page number:376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 6.11\n",
+ "#Underwood Equations for Ternary Distillation \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# 1-toluene 2-1,2,3--trimethylbenzene 3-benzene\n",
+ "\t# Basis: 100 kmol/h of feed\n",
+ "F = 100 \t\t\t\t\t\t# [kmole/h]\n",
+ "\t# Since feed is saturated, therefore\n",
+ "q = 0 \n",
+ "\t# From example 6.10\n",
+ "x1d = 0.3 \n",
+ "x2d = 0.3 \n",
+ "x3d = 0.4 \n",
+ "a12 = 3.91 \n",
+ "a32 = 7.77 \n",
+ "a22 = 1 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\t# Equ 6.78 gives\n",
+ "def f14(Q):\n",
+ " return(1- a12*x1d/(a12-Q)-a22*x2d/(a22-Q)-a32*x3d/(a32-Q)) \n",
+ "Q = fsolve(f14,2) \n",
+ "\n",
+ "\t# From the problem statement\n",
+ "\t# d1 = D*x1d d2 = D*x2d\n",
+ "d1 = F*x1d*0.95 \t\t\t\t\t# [kmol/h]\n",
+ "d2 = F*x2d*0.05 \t\t\t\t\t# [kmol/h]\n",
+ "d3 = F*x3d*0.997 \t\t\t\t\t# [kmol/h]\n",
+ "\n",
+ "\t\t# Summing the three distillate, d1,d2 and d3\n",
+ "D = d1+d2+d3 \t\t\t\t\t\t# [kmole/h]\n",
+ "\n",
+ "Vmin = a12*d1/(a12-Q)+a22*d2/(a22-Q)+a32*d3/(a32-Q) \n",
+ "\n",
+ "\t\t# From the mass balance \n",
+ "Lmin = Vmin-D \t\t\t\t\t\t# [kmol/h]\n",
+ "\t# Minimum reflux ratio\n",
+ "Rmin = Lmin/D \n",
+ "\n",
+ "#Results\n",
+ "print\"The minimum reflux ratio is \",round(Rmin[0],3) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum reflux ratio is 0.717\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.12,Page number:377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 6.12\n",
+ "\n",
+ "# solution\n",
+ "\n",
+ "# Componenets A-propane B-pentane C-methane D-ethane E-butane F-hexane\n",
+ "# x-mole fraction a-relative volatility\n",
+ "xA = 0.25 \n",
+ "aA = 4.08 \n",
+ "xB = 0.11 \n",
+ "aB = 1.00 \n",
+ "xC = 0.26 \n",
+ "aC = 39.47 \n",
+ "xD = 0.09 \n",
+ "aD = 10.00 \n",
+ "xE = 0.17 \n",
+ "aE = 2.11 \n",
+ "xF = 0.12 \n",
+ "aF = 0.50 \n",
+ "\n",
+ "FRlkd = 0.98 \n",
+ "FRhkd = 0.01 \n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "\t# For methane\n",
+ "D_CR = (aC-1)/(aA-1)*FRlkd + (aA-aC)/(aA-1)*FRhkd \n",
+ "\t# For ethane\n",
+ "D_DR = (aD-1)/(aA-1)*FRlkd + (aA-aD)/(aA-1)*FRhkd \n",
+ "\t# For butane\n",
+ "D_ER = (aE-1)/(aA-1)*FRlkd + (aA-aE)/(aA-1)*FRhkd \n",
+ "\t# For hexane\n",
+ "D_FR = (aF-1)/(aA-1)*FRlkd + (aA-aF)/(aA-1)*FRhkd \n",
+ "\t# Since the feed is 66% vaporized\n",
+ "q = 1-0.66 \n",
+ "\n",
+ "\t# Now equation 6.82 is solved for two values of Q\n",
+ "def f14(Q1):\n",
+ " return(0.66 - aA*xA/(aA-Q1)-aB*xB/(aB-Q1)-aC*xC/(aC-Q1)-aD*xD/(aD-Q1)-aE*xE/(aE-Q1)-aF*xF/(aF-Q1)) \n",
+ "Q1 = fsolve(f14,1.2) \n",
+ "\n",
+ "def f15(Q2):\n",
+ " return(0.66 - aA*xA/(aA-Q2)-aB*xB/(aB-Q2)-aC*xC/(aC-Q2)-aD*xD/(aD-Q2)-aE*xE/(aE-Q2)-aF*xF/(aF-Q2)) \n",
+ "Q2 = fsolve(f15,2.5) \n",
+ "\n",
+ "\t# Basis: 100 mole of feed\n",
+ "F = 100 \t\t\t\t\t\t\t# [mole]\n",
+ "\t# Let d1 = Dxad, d2 = Dxbd, d3 = Dxcd, and so on\n",
+ "d1 = F*xA*FRlkd \t\t\t\t\t\t# [moles of propane]\n",
+ "d2 = F*xB*FRhkd \t\t\t\t\t\t# [moles of pentane]\n",
+ "d3 = F*xC \t\t\t\t\t\t\t# [moles of methane]\n",
+ "d4 = F*xD \t\t\t\t\t\t\t# [moles of ethane]\n",
+ "d6 = F*xF*0 \t\t\t\t\t\t\t# [moles of hexane]\n",
+ "\t# And d5 is unknown\n",
+ "\t# Applying equation 6,78 for each value of Q\n",
+ "\n",
+ "\t# Solution of simultaneous equation \n",
+ "#Vmin=aA*d1/(aA-Q1)+aB*d2/(aB-Q1)+aC*d3/(aC-Q1)+aD*d4/(aD-Q1)+aE*d5/(aE-Q1)+aF*d6/(aF-Q1)\n",
+ "#Vmin=aA*d1/(aA-Q2)+aB*d2/(aB-Q2)+aC*d3/(aC-Q2)+aD*d4/(aD-Q2)+aE*d5/(aE-Q2)+aF*d6/(aF-Q2)\n",
+ "# we get\n",
+ "d5=-(72.243-121.614)/(2.494+2.863)\n",
+ "Vmin=72.243 + 2.494*D5\n",
+ "\n",
+ "\t# From equ 6.84\n",
+ "D = d1+d2+d3+d4+d5+d6 \t\t\t\t\t\t# [mole]\n",
+ "# From mass balance \n",
+ "Lmin = Vmin-D \t\t\t\t\t\t\t# [mole]\n",
+ "# For minimum reflux ratio\n",
+ "Rmin = Lmin/D \n",
+ "print\"The minimum reflux ratio is\",round(Rmin,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum reflux ratio is 0.384\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.13,Page number:380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 6.13\n",
+ "# Application of the Gilliland Correlation \n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A-benzene B-toluene C-1,2,3-trimethylbenzene\n",
+ "\t# From example 6.10\n",
+ "Nmin = 4.32 # [stages]\n",
+ "\t# From example 6.11\n",
+ "Rmin = 0.717 \t\t\t\t\t\t# [minimum reflux ratio]\n",
+ "\t# For R = 1\n",
+ "R = 1 \n",
+ "X = (R-Rmin)/(R+1) \n",
+ "\t# From equ 6.88\n",
+ "Y = 1-math.exp((1+54.4*X)/(11+117.2*X)*(X-1)/math.sqrt(X)) \n",
+ "\t# Fro equ 6.86\n",
+ "N = (Y+Nmin)/(1-Y) \n",
+ "\t# From example 6.10 99.7% of the LNK (benzene) is recovered in the distillate# , 95% of \t\tthe light key is in the distillate, and 95% of the heavy key is in# the bottoms\n",
+ "\n",
+ "\t# For a basis of 100 mol of feed, the material balances for three components # are\n",
+ "\t# For distillate\n",
+ "nAd = 39.88 \t\t\t\t\t\t# [LNK, moles of benzene]\n",
+ "nBd = 28.5 \t\t\t\t\t\t# [LK, moles of toluene]\n",
+ "nCd = 1.50 \t\t\t\t\t\t# [HK, moles of 1,2,3-trimethylbenzene]\n",
+ "nTd = nAd+nBd+nCd \t\t\t\t\t# [total number of moles]\n",
+ "xAd = nAd/nTd \n",
+ "xBd = nBd/(nTd) \n",
+ "xCd = nCd/(nTd) \n",
+ "\n",
+ "\t# For bottoms\n",
+ "nAb = 0.12 \n",
+ "nBb = 1.50 \n",
+ "nCb = 28.50 \n",
+ "nTb = nAb+nBb+nCb \n",
+ "xAb = nAb/nTb \n",
+ "xBb = nBb/nTb \n",
+ "xCb = nCb/nTb \n",
+ "\n",
+ "D = nTd \n",
+ "W = nTb \n",
+ "\t# From problem statement\n",
+ "Zlk = 0.3 \n",
+ "Zhk = Zlk \n",
+ "\t# Substituting in equation 6.89\n",
+ "\t# T = Nr/Ns\n",
+ "T = (Zhk/Zlk*W/D*(xBb/xCd)**2)**0.206 \n",
+ "\n",
+ "\t# Solution of simultaneous equation \n",
+ "def H(e):\n",
+ " f1 = e[0]-e[1]*T \n",
+ " f2 = e[0]+e[1]-N \n",
+ " return(f1,f2) \n",
+ "\n",
+ "\n",
+ "\t# Initial guess\n",
+ "e = [5,4] \n",
+ "y = fsolve(H,e) \n",
+ "Nr = y[0] \t\t\t\t\t# [number of stages in rectifying section]\n",
+ "Ns = y[1] \t\t\t\t\t# [number of stages in stripping section]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"Nr=\",round(Nr,2),\"Ns=\",round(Ns,2),\"\\n\"\n",
+ "print\"Rounding the estimated equilibrium stage requirement leads to 1 stage as a partial reboiler, 4 stages below the feed, and 5 stages above the feed\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Nr= 5.39 Ns= 4.53 \n",
+ "\n",
+ "Rounding the estimated equilibrium stage requirement leads to 1 stage as a partial reboiler, 4 stages below the feed, and 5 stages above the feed\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.14,Page number:387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 6.14\n",
+ "# Rate-Based Ternary Distillation Calculations\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a-acetone b-methanol c-water\n",
+ "yna = 0.2971 \n",
+ "yn1a = 0.17 \n",
+ "ynIa = 0.3521 \n",
+ "mnIa = 2.759 \n",
+ "xna = 0.1459 \n",
+ "ynb = 0.4631 \n",
+ "yn1b = 0.429 \n",
+ "ynIb = 0.4677 \n",
+ "mnIb = 1.225 \n",
+ "xnb = 0.3865 \n",
+ "ync = 0.2398 \n",
+ "yn1c = 0.4010 \n",
+ "ynIc = 0.1802 \n",
+ "mnIc = 0.3673 \n",
+ "xnc = 0.4676 \n",
+ "\n",
+ "Fabv = 4.927 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "Facv = 6.066 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "Fbcv = 7.048 \t\t\t\t\t\t# [mol/square m.s]\n",
+ "aI = 50 \t\t\t\t\t\t# [square m]\n",
+ "Vn1 = 188 \t\t\t\t\t\t# [mol/s]\n",
+ "Vn = 194.8 \t\t\t\t\t\t# [mol/s]\n",
+ "\n",
+ "print \"Solution6.14(a)\" \n",
+ "from numpy import *\n",
+ "import math\n",
+ "\t# Solution(a)\n",
+ "\n",
+ "ya = (yna+ynIa)/2 \n",
+ "yb = (ynb+ynIb)/2 \n",
+ "yc = (ync+ynIc)/2 \n",
+ "\n",
+ "Rav = ya/Facv+yb/Fabv+yc/Facv \n",
+ "Rbv = yb/Fbcv+ya/Fabv+yc/Fbcv \n",
+ "\n",
+ "Rabv = -ya*(1/Fabv-1/Facv) \n",
+ "Rbav = -yb*(1/Fabv-1/Fbcv) \n",
+ "\t# Thus in matrix form\n",
+ "Rv =matrix([[Rav,Rabv],[Rbav,Rbv]]) \n",
+ "kv = Rv.I \t\t\t# [inverse of Rv]\n",
+ "\t# From equ 6.99\n",
+ "b =matrix([[yna-ynIa],[ynb-ynIb]]) \n",
+ "J = kv*b \n",
+ "\n",
+ "\t# From equ 6.98\n",
+ "Jc = -sum(J) \t\t\t\t# [mol/square m.s]\n",
+ "\n",
+ "print\"The molar diffusional rates of acetone, methanol and water are\",round(J[0][0],4),\"mol/square m.s\",round(J[1][0],4),\"mol/square m.s and\",round(Jc,3) ,\"mol/square m.s respectively\"\n",
+ "print \"Solution 6.14(b)\\n\" \n",
+ "\t# Solution(b)\n",
+ "Ntv = Vn1-Vn \t\t\t\t\t\t# [mol/s]\n",
+ "\n",
+ "\t# From equation 6.94\n",
+ "Nta = aI*J[0][0]+ya*Ntv \n",
+ "Ntb = aI*J[1][0]+yb*Ntv \n",
+ "Ntc = aI*Jc+yc*Ntv \n",
+ "print\"The mass transfer rates of acetone, methanol and water are\",round(Nta,1),\"mol/s\" ,round(Ntb,1),\" mol/s and\", round(Ntc),\" mol/s respectively\"\n",
+ "\n",
+ "print \"Example6.14(c)\\n\"\n",
+ "\t# Solution(c)\n",
+ "\n",
+ "\t# Approximate values of Murphree vapor tray efficiency are obtained from # equation \t6.105\n",
+ "\n",
+ "EMG_a = (yna-yn1a)/(mnIa*xna-yn1a) \n",
+ "EMG_b = (ynb-yn1b)/(mnIb*xnb-yn1b) \n",
+ "EMG_c = (ync-yn1c)/(mnIc*xnc-yn1c) \n",
+ "\n",
+ "print\"The Murphree vapor tray efficiencies for acetone, methanol and water are\",round(EMG_a,3), round(EMG_b,3),\"and\",round(EMG_c,3), \"respectively\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution6.14(a)\n",
+ "The molar diffusional rates of acetone, methanol and water are"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " -0.3068 mol/square m.s -0.0824 mol/square m.s and 0.389 mol/square m.s respectively\n",
+ "Solution 6.14(b)\n",
+ "\n",
+ "The mass transfer rates of acetone, methanol and water are -17.5 mol/s -7.3 mol/s and 18.0 mol/s respectively\n",
+ "Example6.14(c)\n",
+ "\n",
+ "The Murphree vapor tray efficiencies for acetone, methanol and water are 0.547 0.767 and 0.703 respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 7.ipynb b/Beginning_C++_through_Game_Programming/Chapter 7.ipynb
new file mode 100755
index 00000000..be65a231
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 7.ipynb
@@ -0,0 +1,894 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:Liquid-Liquid Extraction "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.1,Page number:429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from pylab import *\n",
+ "\n",
+ "#For water phase:\n",
+ "Cw=[1.23,1.29,1.71,5.10,9.8,16.90] #Chloroformm concentration in wt %\n",
+ "Aw=[15.80,25.6,36.0,49.30,55.7,59.60] #Acetone concentration in wt %\n",
+ "\n",
+ "#For Chloroform phase\n",
+ "Cc=[70.0,55.7,42.9,28.4,20.4,16.9] #Chloroformm concentration in wt% \n",
+ "Ac=[28.70,42.10,52.70,61.30,61.00,59.6] #Acetone concentration in wt %\n",
+ "for i in range(0,6):\n",
+ " Cw[i]=Cw[i]/100 #Weight fraction\n",
+ " Aw[i]=Aw[i]/100 #Weight fraction\n",
+ " Cc[i]=Cc[i]/100 #Weight fraction\n",
+ " Ac[i]=Ac[i]/100 #Weight fraction\n",
+ "\n",
+ "a1=plot(Cw,Aw)\n",
+ "a2=plot(Cc,Ac)\n",
+ "X=linspace(1,0)\n",
+ "Y=linspace(0,1)\n",
+ "a3=plot(X,Y)\n",
+ "xlabel(\"$Weight fraction of chloroform$\")\n",
+ "ylabel(\"$Weight fraction of acetone$\")\n",
+ "title(\"Equilibrium for water-chloroform-acetone at 298 K and 1 atm.\\n\\n\")\n",
+ "a4=plot([Cw[1],Cc[1]],[Aw[1],Ac[1]],label='$Tie line$')\n",
+ "a5=plot([(Cw[2]+Cw[3])/2,(Cc[2]+Cc[3])/2],[(Aw[2]+Aw[3])/2,(Ac[2]+Ac[3])/2],label='$Tie line$')\n",
+ "a6=plot([Cw[5],Cc[3]],[Aw[5],Aw[1]],label='$Conjugate line$')\n",
+ "legend(loc='upper right')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 42,
+ "text": [
+ "<matplotlib.legend.Legend at 0x7a98978>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAE7CAYAAAAVTRylAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYk2f3B/BvWLJHAEWGIEPAgoqCCg7AVa1iB22V11FH\n0W6t1f5crba2FvtqX2utWvfGujduQduq4FbcCsgQlb1Xcn5/RFKCYUoGcD7XxaVJnnFyZ5yc576f\n5xYQEYExxhhrABqqDoAxxljTwUmFMcZYg+GkwhhjrMFwUmGMMdZgOKkwxhhrMJxUGGOMNZgmk1Qe\nP34MIyMjlI+QDggIwJo1awAAW7Zsweuvvy5dVkNDA48ePar1tiuvr0hPnz5F7969YWxsjGnTpill\nn+qm4mtXWXx8PDQ0NCAWixWy77Fjx0IoFKJ79+4K2T5j8tT1O0mdKT2pODg4QF9fH0ZGRtK/L774\n4pW326ZNG+Tm5kIgEAAABAKB9P8jRozA0aNH673tV12/LlauXImWLVsiJycH//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//xooV\nKwAA9fX18PX1xaxZs1BXV4eHH34YV65cMe1/bu1Y8zhDQ0MBoF//169ft3q+ZWVliIqKum3blucr\ntX8pbZmfo9FoNFWh5vERMamQzfn4+KCoqAgLFy40fTYajabbYu7u7khMTMSiRYsQFxeHCxcu4OrV\nq3BxcYHBYEBLSwsefPBBAMCBAwcQHR2N0tJSREdHA+h+KiomJgZHjx5FWVkZHnnkEZSVlcFoNAIA\nTpw4YUoqQgi0trZCo9GY4utpv62tDdeuXUN5eTk6Ojpw//33A+jeOXDv3r192u2J7/jx42hrazMd\nu2PHDqxcuRI3b97E6NGjAXTPI82bNw/FxcVWj+1x4sQJhISEAEC//nNycqye75EjRxAREYH9+/db\nbdvyfKX2L6Ut83MsLy83PUSQm5uLuLg4GAyGO/tFIafEORWyOX9/f6xZs8b0Wa/XIyUlxfQ5KSkJ\nX375JTQaDVpaWrB06VIYjUbcd999aG1tRVRUFEaOHImdO3fi8OHDmDhxInJzczFnzhwAwNixY1FW\nVoakpCQIIXDkyBFotVp4eHgA6J7L6dke9cyZM4iIiOgT36pVq7B3715UVVVBq9Xi999/xyuvvIKs\nrCycOXMGrq6ueOihh5CXlwedTgcPDw80Nzeb4ktNTUVubi6OHTuGpUuXQq/Xo7y83DSf4u3tjbq6\nOsTGxlo9tod5nJb9X716tc/5lpeXY9myZfjtt9/w888/IyUlBQEBAf3arq+v73O+Uvu3dpxlW5WV\nlaZzPHHihCm+CRMm4PDhwzZ/3JocEzfpItU5f/48xo0bhytXrmDNmjX47rvvJP1cdnY22tra8PPP\nP2Pjxo12jnLolI5T6f7JubFSIdVZu3YtFi9ejNraWqSnp0v+OY1Gg7q6Orzxxhv2C84GlI5T6f7J\nubFSISIim+FEPRER2QyTChER2QyTChER2QyTChER2QyTChER2QyTChER2QyTChER2QyTChER2cz/\nA9dtwhN+6SZ1AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x764cd30>"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.2,Page number:433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.2\n",
+ "# Single-Stage Extraction\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# 'b'-solvent 'f'-feed 'r'-raffinate 'e'-extract 'c'-one of the # component in \t feed\n",
+ "F = 50 \t\t\t\t\t# [feed rate, kg/h]\n",
+ "S = 50 \t\t\t\t\t# [solvent rate, kg/h]\n",
+ "xcf = 0.6 \n",
+ "xbf = 0 \n",
+ "ycs = 0 \n",
+ "ybs = 1.0 \n",
+ "\t# The equilibrium data for this system can be obtained from Table 7.1 and # Figure 7.6\n",
+ "\t# Plot streams F (xcF = 0.6, xBF = 0.0) and S (yes = 0.0, yBs = 1.0). After # locating \tstreams F and S, M is on the line FS its exact location is found # by calculating xcm \tfrom\n",
+ "#Calculation\n",
+ "\n",
+ "xcm = (F*xcf+S*ycs)/(F+S) \n",
+ "\n",
+ "\t# From figure 7.8\n",
+ "xcr = 0.189 \n",
+ "xbr = 0.013 \n",
+ "yce = 0.334 \n",
+ "ybe = 0.648 \n",
+ "M = F+S \t\t\t\t\t# [kg/h]\n",
+ "# From equation 7.8 \n",
+ "E = M*(xcm-xcr)/(yce-xcr) \t\t\t# [kg/h]\n",
+ "R = M-E \t\t\t\t\t# [kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"The extract and raffinate flow rates are\",round(E,2),\"kg/h and\",round(R,2),\" kg/h respectively\\n\"\n",
+ "\n",
+ "print\"The compositions when one equilibrium stage is used for the separation is\",xcr,\"and\",xbr,\" in raffinate phase for component b and c respectively and\",yce,\"and\",ybe,\"in extract phase for component b and c respectively\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The extract and raffinate flow rates are 76.55 kg/h and 23.45 kg/h respectively\n",
+ "\n",
+ "The compositions when one equilibrium stage is used for the separation is 0.189 and 0.013 in raffinate phase for component b and c respectively and 0.334 and 0.648 in extract phase for component b and c respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.4,Page number:439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.4\n",
+ "#Multistage Countercurrent Extraction \n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# C-acetic acid A-water\n",
+ "\t# f-feed r-raffinate s-solvent\n",
+ "fd = 1000 \t\t\t\t\t\t# [kg/h]\n",
+ "xCf = 0.35 \t\t\t\t\t\t# [fraction of acid]\n",
+ "xAf = 1-xCf \t\t\t\t\t\t# [fraction of water]\n",
+ "\t# Solvent is pure\n",
+ "xAr = 0.02 \n",
+ "yCs = 0 \n",
+ "\n",
+ "import math\n",
+ "from pylab import *\n",
+ "from numpy import *\n",
+ "print \"Solution 7.4(a)\\n\"\n",
+ "\t# Solution(a)\n",
+ "\n",
+ "\t# From Figure 7.15\n",
+ "xCMmin = 0.144 \n",
+ "\t# From equation 7.11\n",
+ "Smin = fd*(xCMmin-xCf)/(yCs-xCMmin) \t\t\t\t# [kg/h]\n",
+ "\n",
+ "#result\n",
+ "print\"The minimum amount of solvent which can be used is\",round(Smin),\"kg/h\"\n",
+ "\n",
+ "print \"Solution7.4(b)\" \n",
+ "\t# Solution(b)\n",
+ "\n",
+ "S = 1.6*Smin \t\t\t\t\t\t\t# [kg/h]\n",
+ "\t# From equation 7.11\n",
+ "xCM = (fd*xCf+S*yCs)/(fd+S) \n",
+ "\n",
+ "\t# Data for equilibrium line\n",
+ "\t# Data_eqml = [xCeq yCeq]\n",
+ "Data_eqml =matrix([[0.0069,0.0018],[0.0141,0.0037],[0.0289,0.0079],[0.0642,0.0193],[0.1330,0.0482],[0.2530,0.1140],[0.3670,0.2160],[0.4430,0.3110],[0.4640,0.3620]]) \n",
+ "\n",
+ "\t# Data for operating line\n",
+ "\t# Data_opl = [xCop yCop]\n",
+ "Data_opl =matrix([[0.02,0],[0.05,0.009],[0.1,0.023],[0.15,0.037],[0.20,0.054],[0.25,0.074],[0.30,0.096],[0.35,0.121]]) \n",
+ "\n",
+ "\n",
+ "a1=plot(Data_eqml[:,0],Data_eqml[:,1],label='$Equilibrium line$')\n",
+ "a2=plot(Data_opl[:,0],Data_opl[:,1],label='$Operating line$') \n",
+ "legend(loc='upper right') \n",
+ "xlabel(\"wt fraction of acetic acid in water solutions, xC\") \n",
+ "ylabel(\"wt fraction of acetic acid in ether solutions, yC\") \n",
+ "title('Mc-Cabe thiele Diagram')\n",
+ "\n",
+ "\t# Now number of theoritical stages is determined by drawing step by step # stairs from\t \txC = 0.35 to xC = 0.02\n",
+ "\t# From figure 7.16\n",
+ "\t# Number of theoritical stages 'N' is\n",
+ "N = 8 \n",
+ "\n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "print\"\\nThe number of theoretical stages if the solvent rate used is 60 percent above the minimum is \",N"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution 7.4(a)\n",
+ "\n",
+ "The minimum amount of solvent which can be used is 1431.0 kg/h\n",
+ "Solution7.4(b)\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlYlGXbwOHfIOSK+w4qIiqYSgpKLiju2uZWinu5ZPpq\nmdZn2vu6tGqWpWlGpikuZOaCSqCpYOIChQsqrgiJ4Bqisigw3N8fk6PIMgMyDOB1HgeHzMzz3M81\nIzPX3LtGKaUQQgghDLAwdwBCCCGKB0kYQgghjCIJQwghhFEkYQghhDCKJAwhhBBGkYQ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AxisRi7d+/m\nA0q/fv3g6ekJiUSC9evXN8sjxK6mVn///TfGjRsHmUyG4OBgREVFAQBycnJarWNORAgNDcX27dsx\ncOBA7N+/H6GhoaipqcHUqVOxYsUKTJgwAWKxGK6urjqD2qsEm96cwWB0evz8/HDq1CmYm7N/4V8E\nFjAYDAaDIQj2lxSDwWAwBMECBoPBYDAEwQIGg8FgMATBAgaDwWAwBMECBoPBYDAEwQIGg8FgMATB\nAgaDwWAwBPE/TB4aqVW+sZ0AAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7629c88>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The number of theoretical stages if the solvent rate used is 60 percent above the minimum is 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.5,Page number:444"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.5\n",
+ "#Multistage Extraction: Insoluble Liquids\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# C-nicotine A-water B-kerosene\n",
+ "\t# F-feed R-raffinate S-solvent\n",
+ "F = 1000 \t\t\t\t\t# [feed rate, kg/h]\n",
+ "xAF = 0.99 \t\t\t\t\t# [fraction of water in feed]\n",
+ "\t# Because the solutions are dilute therefore\n",
+ "xCF = 0.01 \t\t\t\t\t# [fraction of nicotene in feed, kg nicotene/kg \t\t\t\t\t\twater]\n",
+ "xCR = 0.001 \t\t\t\t\t# [fraction of nicotene in raffinate, kg \t\t\t\t\t\tnicotene/kg water ]\n",
+ "m = 0.926 \t\t\t\t\t# [kg water/kg kerosene]\n",
+ "import math\n",
+ "\n",
+ "print \"Solution 7.5(a) \" \n",
+ "# Solution(a)\n",
+ "\n",
+ "yCS = 0 \t\t\t\t\t# [kg nicotene/kg water]\n",
+ "\n",
+ "\t# Because, in this case, both the equilibrium and operating lines are # straight,if \tthe minimum solvent flow rate Bmin is used, the concentration # of the exiting extract, \tyCmax, will be in equilibrium with xCF. Therefore\n",
+ "yCmax = m*xCF # [kg nicotene/kg kerosene]\n",
+ "\n",
+ "A = F*xAF \t\t\t\t\t# [kg water/h]\n",
+ "\t# From equation 7.17\n",
+ "Bmin = A*(xCF-xCR)/(yCmax-yCS) \t\t# [kg kerosene/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"The minimum amount of solvent which can be used is\",round(Bmin),\"kerosene/h\"\n",
+ "\n",
+ "print\"\\nSolution 7.5(b)\" \n",
+ "\t# Solution(b)\n",
+ "\n",
+ "B = 1.2*Bmin \t\t\t\t\t# [kg kerosene/h]\n",
+ "EF = m*B/A \n",
+ "Nt = math.log((xCF-yCS/m)/(xCR-yCS/m)*(1-1/EF)+1/EF)/math.log(EF) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The number of theoretical stages if the solvent rate used is 20 percent above the minimum is\",round(Nt,2)\n",
+ "\n",
+ "print \"Solution7.5(c)\" \n",
+ "\t# Solution(c)\n",
+ "\n",
+ "Eme = 0.6 \t\t\t\t\t# [Murphree stage efficiency]\n",
+ "\t# from equation 7.20\n",
+ "Eo = math.log(1+Eme*(EF-1))/math.log(EF) \t# [overall efficiency]\n",
+ "Nr = Nt/Eo \t\t\t\t\t# [number of real stages]\n",
+ "\n",
+ "#Result\n",
+ "print\"The number of real stages required is\",round(Nr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution 7.5(a) \n",
+ "The minimum amount of solvent which can be used is 962.0 kerosene/h\n",
+ "\n",
+ "Solution 7.5(b)\n",
+ "The number of theoretical stages if the solvent rate used is 20 percent above the minimum is 6.64\n",
+ "Solution7.5(c)\n",
+ "The number of real stages required is 11.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.6,Page number:449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.6\n",
+ "# solution\n",
+ "\n",
+ "# C-styrene A-ethylbenzene B-diethylene glycol\n",
+ "F = 1000 # [kg/h]\n",
+ "XF = 0.6 # [wt fraction of styrene]\n",
+ "XPE = 0.9 \n",
+ "XN = 0.1 \n",
+ "# All above fractions are on solvent basis\n",
+ "# Equilibrium Data for Ethylbenzene (A)-Diethylene Glycol (B)-Styrene (C) at 298 K\n",
+ "# Data_eqm = [X Y] \n",
+ "# X - kg C/kg (A+C) in raffinate solution\n",
+ "# Y - kg C/kg (A+C) in extract solution\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from pylab import*\n",
+ "from numpy import*\n",
+ "\n",
+ "\n",
+ "Data_eqm=matrix([[0,0],[0.087,0.1429],[0.1883,0.273],[0.288,0.386],[0.384,0.48],[0.458,0.557],[0.464,0.565],[0.561,0.655],[0.573,0.674],[0.781,0.863],[0.9,0.95],[1,1]])\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Illustration 7.6(a)\n",
+ "# Solution(a)\n",
+ "\n",
+ "# Minimum theoretical stages are determined on the XY equilibrium distribution diagram, stepping them off from the diagonal line to the equilibrium curve, beginning at XPE = 0.9 and ending at XN = 0.1\n",
+ "\n",
+ "Data_opl=matrix([[0,0],[0.09,0.09],[0.18,0.18],[0.27,0.27],[0.36,0.36],[0.45,0.45],[0.54,0.54],[0.63,0.63],[0.72,0.72],[0.81,0.81],[0.90,0.90],[1,1]]) \n",
+ "\n",
+ "\n",
+ "a1=plot(Data_eqm[:,0],Data_eqm[:,1],label='$Equilibrium line$')\n",
+ "a2=plot(Data_opl[:,0],Data_opl[:,1],label='$Operating line$') \n",
+ "\n",
+ "legend(loc='upper left') \n",
+ "title('Equilibrium-distribution diagram and minimum number of stages')\n",
+ "xlabel(\"$X,kg C/kg (A+C) in raffinate solution$\") \n",
+ "ylabel(\"$Y,kg C/kg (A+C) in extract solution$\") \n",
+ "\n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "# Figure 7.20\n",
+ "Nmin = 9 # [number of ideal stages]\n",
+ "\n",
+ "print\"Ans.(a)The minimum number of theoretical stages are \",Nmin\n",
+ "\n",
+ "#Illustration 7.6(b) \n",
+ "# Solution(b)\n",
+ "\n",
+ "\t# Since the equilibrium-distribution curve is everywhere concave downward# ,the tie line \twhich when extended passes through F provides the minimum\n",
+ "\t# reflux ratio\n",
+ "\t# From figure 7.19\n",
+ "NdeltaEm = 11.04 \n",
+ "NE1 = 3.1 \n",
+ "\t# From equation 7.30\t\n",
+ "\t# Y = R_O/P_E, external reflux ratio\n",
+ "Ymin = (NdeltaEm-NE1)/NE1 # [kg reflux/kg extract product]\n",
+ "\n",
+ "print\"Ans.(b)The minimum extract reflux ratio is\",round(Ymin,3),\"kg reflux/kg extract product\"\n",
+ "\n",
+ "#Illustration 7.6(c) \n",
+ "# Solution(c)\n",
+ "\n",
+ "Y = 1.5*Ymin # [kg reflux/kg extract product]\n",
+ "# From equation 7.30\n",
+ "NdeltaE = Y*NE1+NE1 \n",
+ "# From figure 7.19\n",
+ "NdeltaR = -24.90 \n",
+ "# From figure 7.21\n",
+ "N = 17.5 # [number of equilibrium stages]\n",
+ "\n",
+ "# From figure 7.19\n",
+ "# For XN = 0.1 NRN = 0.0083\n",
+ "NRN = 0.0083 \n",
+ "# Basis: 1 hour\n",
+ "\n",
+ "# e = [P_E R_N] \n",
+ "# Solution of simultaneous equation\n",
+ "def G(e):\n",
+ " f1 = F-e[0]-e[1] \n",
+ " f2 = F*XF-e[0]*XPE-e[1]*XN \n",
+ " return(f1,f2)\n",
+ "\n",
+ "# Initial guess:\n",
+ "e = [600,300] \n",
+ "y = fsolve(G,e) \n",
+ "P_E = y[0] # [kg/h]\n",
+ "R_N = y[1] # [kg/h]\n",
+ "\n",
+ "R_O = Y*P_E # [kg/h]\n",
+ "E_1 = R_O+P_E # [kg/h]\n",
+ "\n",
+ "B_E = E_1*NE1 # [kg/h]\n",
+ "E1 = B_E+E_1 # [kg/h]\n",
+ "RN = R_N*(1+NRN) # [kg/h]\n",
+ "S = B_E+R_N*NRN # [kg/h]\n",
+ "\n",
+ "print\"Ans(c.)The number of theoretical stages are\",N\n",
+ "print\"The important flow quantities at an extract reflux ratio of 1.5 times the minimum value are\\n\\n\"\n",
+ "print\"PE =\",round(P_E),\"kg/h\\n\",\"RN =\",round(R_N),\"kg/h\\n\",\"RO =\",round(R_O),\"kg/h\\n\",\"E1 =\",round(E_1),\"kg/h\\n\",\"BE =\",round(B_E),\" kg/h\\n\",\"E1 =\",round(E1),\"kg/h\\n\",\"RN =\",round(RN),\"kg/h\\n\",\"S =\",round(S),\"kg/h\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAEfCAYAAADoaHnHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlYVGX7wPEvAioqm7gCLiFupJm5Qiqg5pJkLimYomap\nmVZWWlqppGZZ2ltmmbnkvi+5IKYY+GpuuOeSJrkgKmi4ocj6/P44P+cFWZzBmWGA+3NdXgJzznnu\nOTNz7rnP85znWCmlFEIIIUQBKFHQAQghhCi+JAkJIYQoMJKEhBBCFBhJQkIIIQqMJCEhhBAFRpKQ\nEEKIAlMoktClS5ewt7fn4WhyPz8/5s2bB8DSpUvp2LGjbtkSJUrwzz//6L3tR9c3t8zxDhs2jMmT\nJxtlu3ntM2N48cUXWbx4sdG2l5sFCxbQunVr3e/29vZcuHDB5O1aOkPf53kxZJ/K/oeBAwcybty4\nAmv/tddeo3z58rRs2bLAYjAmG2NurGbNmsTHx2Ntba3722uvvcaMGTOeaLvVq1fn7t27ut+trKyw\nsrICoG/fvvTt2zff237S9Y1p1qxZei1Xs2ZN5s+fT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StWze8vb0Bsn1WY2Ji2LNnD1OnTqVkyZI0atSIN954Q1eJPe7z\nWrJkSS5cuEBsbCwlS5bEx8cn12XLly9P9+7dKV26NOXKlePjjz/WvScvXbrEwYMHmThxIjY2Njz/\n/PO6zwrAkiVLePHFF+nUqRMA7du3p2nTpoSGhmJlZUWJEiX4888/SUpKonLlynh5eeUah1GTkJWV\nFRs2bODmzZu6f6+//joAV69ezXLKp3r16sZsOotH27ly5UqOj+VH5cqVdT/b2dkBULFixSx/S0xM\n1I1Os7e3x8HBAdBvHzx8k40ePRpPT086dOhArVq1mDp16mNje9xze7Tt1NRUbty48djtPs7Vq1ep\nUaNGlm2npaURFxen+1uVKlV0P5cpU4Z79+5l287169dJS0vT+32yf/9+/P39qVSpEk5OTsyePZt/\n//0X0E5puLu765a1s7PDxcUly/qZHwc4e/YsAQEBVK1aFUdHRz755BPd9h569PV/9PfExMQcY42L\niyMoKAh3d3ccHR0JDg7Otu3M+8jOzk63j/Lz2ckcV+nSpalUqVKW33OL89F183pOQLbtZv79ces+\nysXFRfdF4eFn69FYcnrf5Cfux60LOX+uQTvOZX7vlC1blvLly3PlyhUuXrzI/v37s3wRX7Zsme6z\nYGVllefn9MqVK5QvX56yZcvq/la9evUsp8ny8tVXX6GUonnz5jRo0IBffvkl12Xv37/P0KFDqVmz\nJo6Ojvj6+nL79m2UUro4Mn9Rd3d31x2fLl68yOrVq7M8zz/++INr165RpkwZVq5cyU8//YSrqysB\nAQGcOXMm1zjM1idUtWrVLOdNM/8M2guZ+Q127dq1fLf1aDtubm663/Ma1fLwhb9///4Tx/FwdNrd\nu3d1/SOP2weZlStXjmnTphEdHc3GjRv55ptviIiIyPM5PG7EzqNtP/xWXrZs2SzPOT09nevXr+u9\nXVdX1yzDdi9duoSNjU2WD7Y+KlasiI2Njd776NVXX6Vbt25cvnyZW7du8eabb+o+JK6urly+fFm3\nbFJSUraD/qPPa9iwYXh5eXHu3Dlu377N559/nmM/ZH58/PHHWFtbc+LECW7fvs3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qairi4+Nhbm4OKysrmJiY4Pjx41iyZAlWr16NM2fOICoqCkFB\nQZgwYQLEYjEuX74MiUQCALCzs0NiYiKMjIxw7tw5fPjhh2pjdY8XAKRSqVqfDg4OfW4HeQsId2Ee\neVNlZmb2+VltbS1jjLHGxkYmlUp59Xfw4MEB2/TV748//sgePnzIa5yXXbp0iVVWVmq83tWrV9mf\nf/75SmP2JzExkcXFxbF169b1u4wQfUIHXonG+ns6wY4dO7Bw4UKUlZVh7969A/bV27d+TfqVSqWI\nj4/HV199xSd0NbNnz9Z4HQA4d+4cNm/e/Err9sfY2Bjl5eXYsGFDv8sI0ScGjHU78E2IlsXHx8Pf\n35+72u1VXLp0Ce+//z53nmEwKRQKdHR0cIeiCCH/DBUhQgghgqELEwghhAiGihAhhBDBUBEihBAi\nGCpChBBCBENFiBBCiGCoCBFCCBEMFSFCCCGCoSJECCFEMP8HZQKL7wuujS8AAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7961b70>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ans.(a)The minimum number of theoretical stages are 9\n",
+ "Ans.(b)The minimum extract reflux ratio is 2.561 kg reflux/kg extract product\n",
+ "Ans(c.)The number of theoretical stages are 17.5\n",
+ "The important flow quantities at an extract reflux ratio of 1.5 times the minimum value are\n",
+ "\n",
+ "\n",
+ "PE = 625.0 kg/h\n",
+ "RN = 375.0 kg/h\n",
+ "RO = 2401.0 kg/h\n",
+ "E1 = 3026.0 kg/h\n",
+ "BE = 9381.0 kg/h\n",
+ "E1 = 12407.0 kg/h\n",
+ "RN = 378.0 kg/h\n",
+ "S = 9384.0 kg/h\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.7,Page number:454"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.7\n",
+ "#Design of a Mixer-Settler Extractor\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Ff = 1.89 \t\t\t\t\t\t# [cubic m/min]\n",
+ "Fs = 2.84 \t\t\t\t\t\t# [cubic m/min]\n",
+ "t = 2 \t\t\t\t\t\t\t# [min]\n",
+ "\n",
+ "\n",
+ "print \"Solution 7.7(a)\\n\"\n",
+ "\t# Solution(a)\n",
+ "import math\n",
+ "Q = Ff+Fs \t\t\t\t\t# [total flow rate, cubic m/min]\n",
+ "Vt = Q*t \t\t\t\t\t# [cubic m]\n",
+ "\t# For a cylindrical vessel H = Dt\n",
+ "Dt = (4*Vt/math.pi)**(1.0/3.0) \t\t# [m]\n",
+ "H = Dt \t\t\t\t\t# [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The diameter and height of each mixing vessel is\",round(Dt,1),\" m and\",round(H,1),\" m respectively\"\n",
+ "\n",
+ "print\"Solution 7.7(b) \"\n",
+ "\t# Solution(b)\n",
+ "\t# Based on a recommendation of Flynn and Treybal (1955),\n",
+ "P = 0.788*Vt \t\t\t\t\t# [mixer power, kW]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The agitator power for each mixer is\",round(P,2),\"kW\"\n",
+ "\n",
+ "print\"\\nSolution 7.7(c)\"\n",
+ "\t# Solution(c)\n",
+ "\n",
+ "\t# Based on the recommendation by Ryan et al. (1959), the disengaging area # in the \t\tsettler is\n",
+ "\t# Dt1*L1 = Q/a = Y\n",
+ "a = 0.2 \t\t\t\t\t# [cubic m/min-square m]\n",
+ "Y = Q/a \t\t\t\t\t# [square m]\n",
+ "\t\t\t# For L/Dt = 4\n",
+ "Dt1 = (Y/4)**0.5 \t\t\t\t# [m]\n",
+ "L1 = 4*Dt1 \t\t\t\t\t# [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The diameter and length of a settling vessel is\",round(Dt1,2),\" m and\",round(L1,2),\" m respectively\"\n",
+ "\n",
+ "print\"Solution 7.7(d)\"\n",
+ "\t# Solution(d)\n",
+ "\t# Total volume of settler\n",
+ "Vt1 = math.pi*Dt1**2*L1/4 \t\t\t# [cubic m]\n",
+ "tres1 = Vt1/Q \t\t\t\t\t# [min]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The residence time in the settling vessel is\",round(tres1,1),\"min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution 7.7(a)\n",
+ "\n",
+ "The diameter and height of each mixing vessel is 2.3 m and 2.3 m respectively\n",
+ "Solution 7.7(b) \n",
+ "The agitator power for each mixer is 7.45 kW\n",
+ "\n",
+ "Solution 7.7(c)\n",
+ "The diameter and length of a settling vessel is 2.43 m and 9.73 m respectively\n",
+ "Solution 7.7(d)\n",
+ "The residence time in the settling vessel is 9.5 min\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.8,Page number:456"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.8\n",
+ "#Power Requirements of a Mixer-Settler Extractor\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Ff = 1.61 \t\t\t\t\t# [flow rate of feed, kg/s]\n",
+ "Fs = 2.24 \t\t\t\t\t# [flow rate of solvent, kg/s]\n",
+ "t = 2*60 \t\t\t\t\t# [residence time in each mixer, s]\n",
+ "df = 998 \t\t\t\t\t# [density of feed, kg/cubic m]\n",
+ "uf = 0.89*10**-3 \t\t\t\t# [viscosity of feed, kg/m.s]\n",
+ "ds = 868 \t\t\t\t\t# [density of solvent, kg/cubic m]\n",
+ "us = 0.59*10**-3 \t\t\t\t# [viscosity of solvent, kg/m.s]\n",
+ "sigma = 0.025 \t\t\t\t\t# [interfacial tension, N/m]\n",
+ "g = 9.8 \t\t\t\t\t# [square m/s]\n",
+ "import math\n",
+ "\n",
+ "Qf = Ff/df \t\t\t\t\t# [volumetric flow rate of feed, cubic m/s]\n",
+ "Qs = Fs/ds \t\t\t\t\t# [volumetric flow rate of solvent, cubic m/s]\n",
+ "\t# Volume fractions in the combined feed and solvent entering the mixer \n",
+ "phiE = Qs/(Qs+Qf) \n",
+ "phiR = 1-phiE \n",
+ "\n",
+ "print\"\\nSolution7.8(a)\\n\" \n",
+ "\t# Solution(a)\n",
+ "import math\n",
+ "Q = Qf+Qs \t\t\t\t\t# [total flow rate, cubic m/s]\n",
+ "Vt = Q*t \t\t\t\t\t# [vessel volume, cubic m]\n",
+ "\t# For a cylindrical vessel, H = Dt\n",
+ "\t# Therefore,Vt = math.pi*Dt**3/4\n",
+ "Dt = (4*Vt/math.pi)**(1.0/3.0) \t\t# [ diameter, m]\n",
+ "H = Dt \t\t\t\t\t# [height, m]\n",
+ "Di = Dt/3 \t\t\t\t\t# [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The height and diameter of the mixing vessel are\",round(Dt,3),\" m and\",round(H,3),\" m respectively.\\n\"\n",
+ "print\"The diameter of the flat-blade impeller is\",round(Di,3),\" m\"\n",
+ "\n",
+ "print\"\\nSolution (b)\\n\" \n",
+ "\t# Solution(b)\n",
+ "\n",
+ "\t# For the raffinate phase dispersed:\n",
+ "phiD = phiR \n",
+ "phiC = phiE \n",
+ "deltad = df-ds \t\t\t\t# [kg/cubic m]\n",
+ "rowM = phiD*df+phiC*ds \t\t\t# [kg/cubic m]\n",
+ "uM = us/phiC*(1 + 1.5*uf*phiD/(us+uf)) \t# [kg/m.s]\n",
+ "\t# Substituting in equation 7.34\n",
+ "ohm_min=math.sqrt(1.03*phiD**0.106*g*deltad*(Dt/Di)**2.76*(uM**2*sigma/(Di**5*rowM*g**2*deltad**2))**0.084/(Di*rowM))*60 \t\t\t# [rpm]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The minimum rate of rotation of the impeller for complete and uniform dispersion.is\",round(ohm_min),\"rpm.\"\n",
+ "\n",
+ "print\"\\nSolution 7.8(c)\"\n",
+ "\t# Solution(c)\n",
+ "\n",
+ "ohm = 1.2*ohm_min \t\t\t\t# [rpm]\n",
+ "\n",
+ "\t# From equation 7.37\n",
+ "Re = ohm/60*Di**2*rowM/uM \t\t\t# [Renoylds number]\n",
+ "\t# Then according to Laity and Treybal (1957), the power number, Po = 5.7\n",
+ "Po = 5.7\n",
+ "\t# From equation 7.37\n",
+ "P = Po*(ohm/60)**3*Di**5*rowM/1000 \t\t# [kW]\n",
+ "\t# Power density\n",
+ "Pd = P/Vt \t\t\t\t\t# [kW/cubic m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The power requirement of the agitator at 1.20 times the minimum rotation rate is\",round(P,3),\" kW.\"\n",
+ "print\"Power density is\",round(Pd,3),\"kW/m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Solution7.8(a)\n",
+ "\n",
+ "The height and diameter of the mixing vessel are 0.862 m and 0.862 m respectively.\n",
+ "\n",
+ "The diameter of the flat-blade impeller is 0.287 m\n",
+ "\n",
+ "Solution (b)\n",
+ "\n",
+ "The minimum rate of rotation of the impeller for complete and uniform dispersion.is 152.0 rpm.\n",
+ "\n",
+ "Solution 7.8(c)\n",
+ "The power requirement of the agitator at 1.20 times the minimum rotation rate is 0.287 kW.\n",
+ "Power density is 0.571 kW/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.9,Page number:460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.9\n",
+ "#Drop Size and Interfacial Area in an Extractor\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# From example 7.8\n",
+ "Di = 0.288 \t\t\t\t\t# [m]\n",
+ "sigma = 0.025 \t\t\t\t\t# [N/m]\n",
+ "ohm = 152.0*1.2/60.0 \t\t\t\t# [rps]\n",
+ "ds = 868.0 \t\t\t\t\t# [kg/cubic m]\n",
+ "phiD = 0.385 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math \n",
+ "\t# Therefore from equation 7.49\n",
+ "We = Di**3*ohm**2.0*ds/sigma \t\t\t# [Weber number]\n",
+ "\n",
+ "\t# From equation 7.50\n",
+ "dvs = Di*0.052*(We)**-0.6*math.exp(4*phiD) \t# [m]\n",
+ "\t# Substituting in equation 7.48\n",
+ "a = 6*phiD/dvs \t\t\t\t# [square m/cubic m]\n",
+ "dvs=dvs*1000\t\t\t\t\t#[mm]\n",
+ "#Result\n",
+ "print\"The Sauter mean drop diameter and the interfacial area is\",round(dvs,3),\" mm and\",round(a),\" square m/cubic m respectively.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Sauter mean drop diameter and the interfacial area is 0.326 mm and 7081.0 square m/cubic m respectively.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.10,Page number:461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.10\n",
+ "#Mass-Transfer Coefficients in Agitated Extractor\n",
+ "#Variable declaration\n",
+ "\n",
+ "Dd = 1.15*10**-9 \t\t\t# [molecular diffusivity of furfural in water, square \t\t\t\t\tm/s]\n",
+ "Dc = 2.15*10**-9 \t\t\t# [molecular diffusivity of furfural in toluene, square \t\t\t\t\tm/s]\n",
+ "m = 10.15 \t\t\t\t# [equilibrium distribution coefficient, cubic m \t\t\t\t\traffinate/cubic m extract]\n",
+ "\n",
+ "print\"Solution7.10(a)\\n\" \n",
+ "\t# Solution(a)\n",
+ "\t# From example 7.8 and 7.9\n",
+ "dvs = 3.26*10**-4 \t\t\t# [m]\n",
+ "Shd = 6.6 \t\t\t\t# [sherwood number for dispersed phase]\n",
+ "\t# From equation 7.52\n",
+ "kd = Shd*Dd/dvs \t\t\t# [dispersed phase mass transfer coefficient, m/s]\n",
+ "\n",
+ "#Result\n",
+ "print\"The dispersed-phase mass-transfer coefficient is\",round(kd,7),\" m/s\"\n",
+ "\n",
+ "print\"\\n Solution 7.10(b) \"\n",
+ "\t# Solution(b)\n",
+ "\n",
+ "dd = 998 \n",
+ "dc = 868 \t\t\t\t# [density of continuous phase, kg/cubic m]\n",
+ "uc = 0.59*10**-3 \t\t\t# [viscosity of continuous phase, kg/m.s]\n",
+ "ohm = 182.2 \t\t\t\t# [rpm]\n",
+ "g = 9.8 \t\t\t\t# [square m/s]\n",
+ "Di = 0.288 \t\t\t\t# [m]\n",
+ "sigma = 0.025 \t\t\t\t# [N/m]\n",
+ "phiD = 0.385 \n",
+ "Dt = 0.863 \t\t\t\t# [m] \n",
+ "Scc = uc/(dc*Dc) \n",
+ "Rec = Di**2*ohm/60*dc/uc \n",
+ "Fr = Di*(ohm/60)**2/g \n",
+ "Eo = dd*dvs**2*g/sigma \n",
+ "\n",
+ "\t# From equation 7.53\n",
+ "Shc=1.237*10**-5*Rec**(2.0/3.0)*Scc**(1.0/3.0)*Fr**(5.0/12.0)*Eo**(5.0/4.0)*phiD**(-1.0/2.0)*(Di/dvs)**2*(dvs/Dt)**(1.0/2.0) \n",
+ "\t# Therefore \n",
+ "kc = Shc*Dc/dvs \t\t\t# [continuous phase mass transfer coefficient, m/s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The continuous-phase mass-transfer coefficient is\",round(kc,5),\"m/s\"\n",
+ "\n",
+ "print\"Solution 7.10(c)\"\n",
+ "\t# Solution(c)\n",
+ "\n",
+ "a = 7065 \t\t\t\t\t# [square m/cubic m]\n",
+ "Vt = 0.504 \t\t\t\t\t# []\n",
+ "Qd = 0.097/60 \t\t\t\t\t# [cubic m/s]\n",
+ "Qc = 0.155/60 \t\t\t\t\t# [cubic m/s]\n",
+ "\n",
+ "\t# From equation 7.40\n",
+ "Kod = kd*kc*m/(m*kc+kd) \t\t\t# [m/s]\n",
+ "\t# From equation 7.45\n",
+ "N_tod = Kod*a*Vt/Qd \n",
+ "\t# From equation 7.46\n",
+ "Emd = N_tod/(1+N_tod) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The Murphree dispersed phase efficiency is \",round(Emd,3)\n",
+ "\n",
+ "\n",
+ "print\"Solution 7.10(d)\" \n",
+ "\t# Solution(d)\n",
+ "\t# From equation 7.57\n",
+ "fext = Emd/(1+Emd*Qd/(m*Qc)) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The fractional extraction of furfural is\",round(fext,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution7.10(a)\n",
+ "\n",
+ "The dispersed-phase mass-transfer coefficient is 2.33e-05 m/s\n",
+ "\n",
+ " Solution 7.10(b) \n",
+ "The continuous-phase mass-transfer coefficient is 0.00076 m/s\n",
+ "Solution 7.10(c)\n",
+ "The Murphree dispersed phase efficiency is 0.981\n",
+ "Solution 7.10(d)\n",
+ "The fractional extraction of furfural is 0.925\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.11,Page number:466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 7.11\n",
+ "#Preliminary Design of an RDC \n",
+ "#Variable declaration\n",
+ "\t# Preliminary Design of an RDC\n",
+ "T = 293 \t\t\t\t\t# [K]\n",
+ "F1 = 12250 \t\t\t\t\t# [flow rate for dispersed organic phase, kg/h]\n",
+ "F2 = 11340 \t\t\t\t\t# [flow rate for continuous aqueous phase, kg/h]\n",
+ "d1 = 858 \t\t\t\t\t# [kg/cubic m]\n",
+ "d2 = 998 \t\t\t\t\t# [kg/cubic m]\n",
+ "n = 12 \t\t\t\t\t# [Equilibrium stages]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "Qd = F1/d1 \t\t\t\t\t# [cubic m/h]\n",
+ "Qc = F2/d2 \t\t\t\t\t# [cubic m/h]\n",
+ "\n",
+ "\t# Assume that based on information in Table 7.5\n",
+ "\t# Vd+Vc = V = 22 m/h\t\n",
+ "V = 22 \t\t\t\t\t# [m/h]\n",
+ "\t# Therefore column cross sectional area \n",
+ "Ac = (Qd+Qc)/V \t\t\t\t# [square m]\n",
+ "\t# Column diameter\n",
+ "Dt = math.sqrt(4*Ac/math.pi) \t\t\t# [m]\n",
+ "\n",
+ "\t# Assume that based on information in Table 7.5\n",
+ "\t# 1/HETS = 2.5 to 3.5 m^-1\n",
+ "\t# Therefore\n",
+ "HETS = 1.0/3.0 \t\t\t\t# [m/theoritical stages]\n",
+ "\t# Column height\n",
+ "Z = n*HETS \t\t\t\t\t# [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The height and diameter of an RDC to extract acetone from a dilute toluene-acetone solution is\",Z,\" m and\",round(Dt,2),\"square m respectively\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The height and diameter of an RDC to extract acetone from a dilute toluene-acetone solution is 4.0 m and 1.13 square m respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 8.ipynb b/Beginning_C++_through_Game_Programming/Chapter 8.ipynb
new file mode 100755
index 00000000..4e0ec99d
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 8.ipynb
@@ -0,0 +1,769 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Humidification Operations "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.1,Page number:479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.1\n",
+ "#Humidity of a Saturated Gas-Vapor Mixture\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "P_total = 1 \t\t\t\t\t\t# [bar]\n",
+ "T1 = 320.0 \t\t\t\t\t\t# [K]\n",
+ "T_c = 562.2 \t\t\t\t\t\t# [K]\n",
+ "P_c = 48.9 \t\t\t\t\t\t# [bar]\n",
+ "A = -6.983 \n",
+ "B = 1.332 \n",
+ "C = -2.629 \n",
+ "D = -3.333 \n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from pylab import *\n",
+ "\n",
+ "x1 = 1-(T1/T_c) \n",
+ "def f12(P1):\n",
+ " return(math.log(P1/P_c)-(A*x1+B*x1**1.5+C*x1**3+D*x1**6)/(1-x1)) \n",
+ "P1 = fsolve(f12,0.01) # [bar]\n",
+ "print\"Vapor pressure of benzene at 320 K is\",round(P1[0],2),\"bar\"\n",
+ "\n",
+ "M_benzene = 78.0 # [gram/mole]\n",
+ "print\"\\nSolution 8.1 (a)\"\n",
+ "\n",
+ "\t# Solution (a)\n",
+ "\t# For nitrogen\n",
+ "M_nitrogen = 28.0 \t\t\t\t# [gram/mole]\n",
+ "\t# From equation 8.2\n",
+ "Y = P1/(P_total - P1) \t\t\t\t#[mole C6H6/ mole N2]\n",
+ "Y_s1 = Y*(M_benzene/M_nitrogen) \t\t# [gram C6H6/gram N2]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Absolute humidity of mixture of benzene and nitrogen is\",round(Y_s1[0],2),\" gram C6H6/gram N2\\n\\n\"\n",
+ "\n",
+ "print\"\\nSolution 8.1 (b)\\n\"\n",
+ "\t# Solution (b)\n",
+ "\t# For carbon dioxide\n",
+ "M_carbondioxide = 44.0 \t\t\t\t# [gram/mole]\n",
+ "\t# From equation 8.2\n",
+ "Y = P1/(P_total - P1) \t\t\t\t#[mole C6H6/ mole C02]\n",
+ "Y_s2 = Y*(M_benzene/M_carbondioxide) \t\t# [gram C6H6/gram CO2]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nAbsolute humidity of mixture of benzene and carbon dioxide is\",round(Y_s2[0],3),\"gram C6H6/gram CO2\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vapor pressure of benzene at 320 K is 0.32 bar\n",
+ "\n",
+ "Solution 8.1 (a)\n",
+ "Absolute humidity of mixture of benzene and nitrogen is 1.31 gram C6H6/gram N2\n",
+ "\n",
+ "\n",
+ "\n",
+ "Solution 8.1 (b)\n",
+ "\n",
+ "\n",
+ "Absolute humidity of mixture of benzene and carbon dioxide is 0.833 gram C6H6/gram CO2\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.2,Page number:480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.2\n",
+ "#2 Enthalpy of a Saturated Gas-Vapor Mixture\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A - water vapor B - air\n",
+ "\t# REference state is air\n",
+ "\n",
+ "T_ref = 273 \t\t\t\t\t# [Reference temperature, K]\n",
+ "T = 303 \t\t\t\t\t# [K]\n",
+ "P_total = 1 \t\t\t\t\t# [atm]\n",
+ "P_A = 4.24 \t\t\t\t\t# [Vapor pressure of water at 303K, kPa]\n",
+ "M_A = 18.0 \t\t\t\t\t# [gram/mole]\n",
+ "M_B = 29.0 \t\t\t\t\t# [gram/mole]\n",
+ "C_A = 1.884 \t\t\t\t\t# [kJ/kg.K]\n",
+ "C_B = 1.005 \t\t\t\t\t# [kJ/kg.K]\n",
+ "lamda = 2502.3 \t\t\t\t# [Latent heat of Vaporization at 273K, kJ/kg]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "P_total = P_total*101.325 \t\t\t# [kPa]\n",
+ "\n",
+ "\t# From equation 8.2\n",
+ "Y_s = P_A/(P_total - P_A)*(M_A/M_B) \t\t#[kg H2O/ kg dry air]\n",
+ "\n",
+ "\n",
+ "\n",
+ "print\"Absolute humidity of mixture of water vapor and air is\",round(Y_s,3),\"kg H2O/kg dry air\" \n",
+ "\t# From equation 8.3\n",
+ "H_s = C_B*(T-T_ref) + Y_s*(C_A*(T-T_ref) + lamda) \t# [kJ/kg dry air]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Enthalpy per unit mass of dry air of a saturated mixture at 303 K and 1 atm is\",round(H_s,1),\"kJ/kg dry air\" \n",
+ "print\"\\n\\nFollowing graph shows the result of similar calculations form 273 to 333 K\"\n",
+ "x=[273,283,293,303,313,323,333]\n",
+ "y=[9.48,29.36,57.57,99.75,166.79,275.58,461.50]\n",
+ "a=plot(x,y)\n",
+ "xlabel('$Temperature,K$')\n",
+ "ylabel('$Hs,kJ/kg dry air$')\n",
+ "show(a)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute humidity of mixture of water vapor and air is 0.027 kg H2O/kg dry air\n",
+ "Enthalpy per unit mass of dry air of a saturated mixture at 303 K and 1 atm is 99.5 kJ/kg dry air\n",
+ "\n",
+ "\n",
+ "Following graph shows the result of similar calculations form 273 to 333 K\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAETCAYAAAAYm1C6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVXXi//EXJm5paioXBR1MNnEBEnEpC1PUKePrUhiV\n0T6N35qpLK1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RVlbGc889x549exriSy4eRhtKiVyCd999Fy8vL+68806ro5wjMzOTmJgY\nq2OIB9IIROS/KCwsZPbs2RQUFFgd5bzKy8utjiAeSiMQERFxiEYgIiLiEBWIiIg4RAUiIiIOUYGI\niIhDVCAiIuIQFYiIiDhEBSIiIg5RgYiIiEP+P0Lf4pJCPfkAAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x768af60>"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3,Page number:482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.2\n",
+ "# Properties of an Unsaturated Gas-Vapor Mixture\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A - water vapor B - air\n",
+ "\n",
+ "T = 328 \t\t\t\t\t# [dry bulb temperature, K]\n",
+ "P_total = 1.0 \t\t\t\t\t# [atm]\n",
+ "H = 30.0 \t\t\t\t\t# [relative humidity, %]\n",
+ "\n",
+ "P_vapA = 15.73 \t\t\t\t# [vapor pressure of water, kPa]\n",
+ "P_total = P_total*101.325 \t\t\t# [kPa]\n",
+ "M_A = 18.0 \t\t\t\t\t# [gram/mole]\n",
+ "M_B = 29.0 \t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "P_A = (H/100)*P_vapA \t\t\t\t# [partial pressure of A,kPa]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\n",
+ "print\"Solution 8.3 (a)\"\n",
+ "\t# At dew point partial pressure is equal to vapor pressure\n",
+ "\t# Using Antonnie equation we can find dew point temperature\n",
+ "\n",
+ "\n",
+ "\n",
+ "print\"Dew point temperature is 304.5 K\\n\"\n",
+ "\n",
+ "\t# From equation 8.1\n",
+ "Y_s = P_A/(P_total-P_A)*(M_A/M_B) \n",
+ "\n",
+ "\n",
+ "print\"Absolute humidity of air-water mixture at 328 K is\",round(Y_s,2),\"kg H2O/kg dry air\\n\\n\"\n",
+ "\n",
+ "print\"\\n Solution8.3 (b)\"\n",
+ "\n",
+ "\t#soluton (b)\n",
+ "T_ref = 273 \t\t\t\t\t# [K]\n",
+ "C_A = 1.884 \t\t\t\t\t# [kJ/kg.K]\n",
+ "C_B = 1.005 \t\t\t\t\t# [kJ/kg.K]\n",
+ "lamda = 2502.3 \t\t\t\t# [Latent heat of Vaporization at 273 K, kJ/kg]\n",
+ "\n",
+ "\t# From equation 8.3\n",
+ "H_s = C_B*(T-T_ref) + Y_s*(C_A*(T-T_ref) + lamda) \n",
+ "\n",
+ "\n",
+ "print\"Enthalpy per unit mass of dry air of a saturated mixture relative to 273 K is\",round(H_s,1),\"kJ/kg dry air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution 8.3 (a)\n",
+ "Dew point temperature is 304.5 K\n",
+ "\n",
+ "Absolute humidity of air-water mixture at 328 K is 0.03 kg H2O/kg dry air\n",
+ "\n",
+ "\n",
+ "\n",
+ " Solution8.3 (b)\n",
+ "Enthalpy per unit mass of dry air of a saturated mixture relative to 273 K is 134.3 kJ/kg dry air\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.4,Page number:483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.4\n",
+ "#Adiabatic Saturation Temperature\n",
+ "#Variable declaration\n",
+ "\n",
+ "\t# a - water vapor b - air\n",
+ "T_G1 = 356 \t\t\t\t\t\t# [K]\n",
+ "P_total = 101.325 \t\t\t\t\t# [kPa]\n",
+ "Y_1 = .03 \t\t\t\t\t\t# [kg water/kg dry air]\n",
+ "\n",
+ "\n",
+ "C_pa = 1.884 \t \t\t\t\t\t# [kJ/kg.K]\n",
+ "C_pb = 1.005 \t\t\t\t\t\t# [kJ/kg.K]\n",
+ "\n",
+ "C_s1 = C_pb + Y_1*C_pa \t\t\t\t\t# [kJ/kg.K]\n",
+ "\n",
+ "T_1 = 373.15 \t\t\t\t\t\t# [K]\n",
+ "T_c = 647.1 \t\t\t\t\t\t# [K]\n",
+ "M_a = 18.02 \t\t\t\t\t\t# [gram/mole]\n",
+ "M_b = 28.97 \t\t\t\t\t\t# [gram/mole]\n",
+ "lamda_1 = 2256 \t\t\t\t\t# [Latent Heat of Vaporizarion at T_1, \n",
+ "#Calculation\n",
+ "\t\t\t\t\t\t\t\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from pylab import *\n",
+ "\n",
+ "def f12(T_as):\n",
+ " return(T_as - T_G1 + ((math.exp(16.3872 - (3885.7/(T_as - 42.98)))/(P_total - (math.exp(16.3872 - (3885.7/(T_as - 42.98))))))*(M_a/M_b) - Y_1)*(lamda_1*((1-T_as/T_c)/(1-T_1/T_c))**.38/C_s1)) \n",
+ "T_as = fsolve(f12,310) # [K]\n",
+ "\n",
+ "\n",
+ "print\"Adiabatic Saturation Temperature is\",round(T_as[0]),\"K\"\n",
+ "\n",
+ "\t# Now using equation 8.2\n",
+ " \n",
+ "P_a = math.exp(16.3872-(3885.7/(T_as-42.98))) \t\t# [kPa]\n",
+ "Y_as = P_a/(P_total-P_a)*M_a/M_b \t\t\t# [kg water/kg dry air]\n",
+ "\n",
+ "#Result\n",
+ "print\"Absolute humidity is\",round(Y_as,3),\"kg water/kg dry air\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Adiabatic Saturation Temperature is 313.0 K\n",
+ "Absolute humidity is 0.049 kg water/kg dry air\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.5,Page number:487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.5\n",
+ "# Wet-Bulb Temperature of an Air-Water Mixture \n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "T_w = 320 \t\t\t\t\t\t# [K]\n",
+ "T_g = 340 \t\t\t\t\t\t# [K]\n",
+ "lambda_w = 2413 \t\t\t\t\t# [Latent Heat of Vaporization at 320K, \t\t\t\t\t\t\tkJ/kg]\n",
+ "Y_w1 = 0.073 \t\t\t\t\t\t# [kg water/kg dry air]\n",
+ "\n",
+ "A = 0.95 \t\t\t\t\t\t# [For air water system,A, kJ/kg.K]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\t# here A = hg/ky, psychrometric ratio\n",
+ "\t# Air-water mixture is saturated at 320K and 1 atm\n",
+ "\t# Using equation 8.15\n",
+ " \n",
+ "Y_w2 = Y_w1 - ((T_g-T_w)*A/lambda_w) \t\t\t# [kg water/kg dry air]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Absolute humidity of air-water mixture at 340 K and 1 atm is\",round(Y_w2,3),\" kg water/kg dry air\\n \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute humidity of air-water mixture at 340 K and 1 atm is 0.065 kg water/kg dry air\n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.6,Page number:487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.6\n",
+ "#Wet-Bulb and Adiabatic Saturation Temperatures of an Air-Toluene Mixture\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a - toluene b - air\n",
+ "\n",
+ "T_G1 = 333 \t\t\t\t\t\t# [K]\n",
+ "P_total = 101.325 \t\t\t\t\t# [kPa]\n",
+ "Y_1 = 0.05 \t\t\t\t\t\t# [kg vapor/kg dry air]\n",
+ "\n",
+ "\n",
+ "C_pa = 1.256 \t\t\t\t\t\t# [kJ/kg.K]\n",
+ "C_pb = 1.005 \t\t\t\t\t\t# [kJ/kg.K]\n",
+ "\n",
+ "C_s1 = C_pb + Y_1*C_pa\n",
+ "\n",
+ "T_1 = 383.8 \t\t\t\t\t\t# [K]\n",
+ "T_c = 591.8 \t\t\t\t\t\t# [K]\n",
+ "M_a = 92 \t\t\t\t\t\t# [gram/mole]\n",
+ "M_b = 28.97 \t\t\t\t\t\t# [gram/mole]\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_1 = 33.18*1000/92 \t\t\t\t# [Latent heat of vaporization at T_1, \t\t\t\t\t\t\tkJ/kg]\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\t# Constants of antoine equation\n",
+ "A = 13.9320 \n",
+ "B = 3057 \t\t\t\t\t\t# [K]\n",
+ "C = -55.52 \t\t\t\t\t\t# [K]\n",
+ "\n",
+ "print \"\\nSolution 8.6 (a)\"\n",
+ "\n",
+ "\t# Solution (a)\n",
+ "\n",
+ "def f12(T_as):\n",
+ " return(T_as - T_G1 + ((math.exp(13.9320 - (3057/(T_as - 55.52)))/(P_total - (math.exp(13.9320 - (3057/(T_as - 55.52))))))*(M_a/M_b) - Y_1)*(lamda_1*((1-T_as/T_c)/(1-T_1/T_c))**0.38/C_s1))\n",
+ "T_as = fsolve(f12,273) \t\t\t\t# [K] \n",
+ "print\"Adiabatic Saturation Temperature is\",round(T_as),\"K\"\n",
+ "\n",
+ "\t# Now using equation 8.2\n",
+ " \n",
+ "P_a = math.exp(13.9320-(3057/(T_as-55.52))) \t\t# [kPa]\n",
+ "Y_as = P_a/(P_total-P_a)*M_a/M_b \t\t\t# [kg vapor/kg dry air]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Absolute humidity is\",round(Y_as,3),\"kg vapor/kg dry air\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "print\"\\nSolution 8.6 (b)\"\n",
+ "\n",
+ "# Solution (b)\n",
+ "\n",
+ "# Thermodynamic properties of mixture of toluene and air\n",
+ "row = 1.06 \t\t\t\t\t\t# [kg/cubic m]\n",
+ "u = 19.5*10**-6 \t\t\t\t\t# [P]\n",
+ "Pr = 0.7 \n",
+ "Dab = 0.1 \t\t\t\t\t\t#[From Wilke-Lee equation, square cm/s]\n",
+ "Sc = u/(row*Dab*10**-4) \n",
+ "\n",
+ "# Using equation 8.16\n",
+ "\n",
+ "A_1 = C_s1*(Sc/Pr)**0.567 # [kJ/kg.K]\n",
+ "\t# here A_1 = hg/ky, psychrometric ratio\n",
+ "\n",
+ "\t# Using equation 8.15\n",
+ "\t# T_w = T_G1 - (Y_w-Y_1)*lamda_w/(hg/ky)\n",
+ "\t# where lamda_w = lamda_1*((1-T_w/T_c)/(1-T_1/T_c))**.38\n",
+ "\t# Y_w = P_a/(P_total-P_a)*M_a/M_b\n",
+ "\t# P_a = math.exp(A-B/(T+c))\n",
+ "\n",
+ "def f15(T_w):\n",
+ " return(T_w - T_G1 + ((math.exp(13.9320 - (3057/(T_w - 55.52)))/(P_total - (math.exp(13.9320 - (3057/(T_w - 55.52))))))*(M_a/M_b) - Y_1)*(lamda_1*((1-T_w/T_c)/(1-T_1/T_c))**.38/A_1)) \n",
+ "T_w = fsolve(f15,273) # [K]\n",
+ "print\"Wet bulb Temperature is\",round(T_w),\" K\\n\"\n",
+ "\n",
+ "# Now using equation 8.2\n",
+ " \n",
+ "P_a = math.exp(13.9320-(3057/(T_w-55.52))) \t\t# [kPa]\n",
+ "Y_w = P_a/(P_total-P_a)*M_a/M_b \t\t\t# [kg vapor/kg dry air]\n",
+ "\n",
+ "print\"Absolute humidity is\",round(Y_w,3),\"kg vapor/kg dry air\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Solution 8.6 (a)\n",
+ "Adiabatic Saturation Temperature is 300.0 K\n",
+ "Absolute humidity is 0.136 kg vapor/kg dry air\n",
+ "\n",
+ "Solution 8.6 (b)\n",
+ "Wet bulb Temperature is 305.0 K\n",
+ "\n",
+ "Absolute humidity is 0.177 kg vapor/kg dry air\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.7,Page number:493"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 8.7\n",
+ "# solution\n",
+ "\n",
+ "L_min = 2.27 # [kg/square m.s]\n",
+ "G_min = 2 # [kg/square m.s]\n",
+ "L2_prime = 15 # [kg/s]\n",
+ "Templ2 = 318 # [K]\n",
+ "Tempg1 = 303 # [Entering air dry bulb, K]\n",
+ "Tempw1 = 297 # [ Entering air wet bulb, K]\n",
+ "Kya = 0.90 # [kg/cubic m.s]\n",
+ "\n",
+ "import math\n",
+ "from pylab import *\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import*\n",
+ "\n",
+ "H1_prime = 72.5 # [kJ/kg dry air]\n",
+ "Y1_prime = 0.0190 # [kg water/kg dry air]\n",
+ "Templ1 = 302 # [K]\n",
+ "Cal = 4.187 # [kJ/kg]\n",
+ "\n",
+ "# Equilibrium Data:\n",
+ "# Data = [Temp.(K),H_star(kJ/kg)]\n",
+ "Data_star =matrix([[302,100],[305.5,114],[308,129.8],[310.5,147],[313,166.8],[315.5,191],[318,216]]) \n",
+ "\n",
+ "# The operating line for least slope:\n",
+ "H2_star = 210 # [kJ/kg]\n",
+ "Data_minSlope =matrix([[Templ1,H1_prime],[Templ2,H2_star]]) \n",
+ "def f14(Gmin):\n",
+ " return(((L2_prime*Cal)/Gmin)-((H2_star-H1_prime)/(Templ2-Templ1))) \n",
+ "Gmin = fsolve(f14,2) # [kg/s]\n",
+ "Gs = 1.5*Gmin # [kg/s]\n",
+ "\n",
+ "# For the Operating Line:\n",
+ "def f15(H2):\n",
+ " return(((H2-H1_prime)/(Templ2-Templ1))-((L2_prime*Cal)/Gs)) \n",
+ "H2 = fsolve(f15,2) # [kJ/kg dry air]\n",
+ "Data_opline =matrix([[Templ1,H1_prime],[Templ2,H2]]) \n",
+ "\n",
+ "\n",
+ "a1=plot(Data_star[:,0],Data_star[:,1],label='$Equilibrium line$')\n",
+ "a2=plot(Data_minSlope[:,0],Data_minSlope[:,1],label='$Minimum Flow Rate Line$')\n",
+ "a3=plot(Data_opline[:,0],Data_opline[:,1],label='$Operating Line$') \n",
+ "legend(loc='upper right')\n",
+ "title('Operating Diagram')\n",
+ "xlabel(\"$Liquid Temperature, K$\") \n",
+ "ylabel(\"$Enthalphy Of Air Water vapour, kJ / kg dry air$\") \n",
+ "show(a1)\n",
+ "show(a2)\n",
+ "show(a3)\n",
+ "\n",
+ "# Tower cross section Area:\n",
+ "Al = L2_prime/L_min # [square m]\n",
+ "Ag = Gs/G_min # [square m]\n",
+ "A = min(Al,Ag) # [square m]\n",
+ "print\"Cross sectional is\",round(A[0],2),\" square m\\n\"\n",
+ "\n",
+ "# Data from operating line:\n",
+ "# Data1 = [Temp.(K),H_prime(kJ/kg)]\n",
+ "Data1 =matrix([[302,72.5],[305.5,92],[308,106.5],[310.5,121],[313,135.5],[315.5,149.5],[318,164.2]]) \n",
+ "\n",
+ "# Driving Force:\n",
+ "Data2 = zeros((7,2)) \n",
+ "# Data2 = [Temp[K],driving Force]\n",
+ "for i in range(0,7):\n",
+ " Data2[i][0] = Data1[i,0] \n",
+ " Data2[i,1] = 1/(Data_star[i,1]-Data1[i,1]) \n",
+ "\n",
+ "\n",
+ "# The data for operating line as abcissa is plotted against driving force \n",
+ "Area = 3.28 \n",
+ "# From Eqn. 7.54\n",
+ "def f16(Z):\n",
+ " return(Area-(Kya*Z/G_min)) \n",
+ "Z = fsolve(f16,2) \n",
+ "print\"The height of tower is\",round(Z[0],2)\n",
+ "NtoG = 3.28 \n",
+ "HtoG = G_min/Kya # [m]\n",
+ "\n",
+ "# Make up water\n",
+ "# Assuming the outlet air is essentially saturated:\n",
+ "Y2_prime = 0.048 # [kg water/kg dry air]\n",
+ "H2 = 164.2 # [kJ/kg dry air]\n",
+ "# This corresponds to an exit-air temperature of 312.8 K\n",
+ "\n",
+ "# Approximate rate of evaporation \n",
+ "R = Gs*(Y2_prime-Y1_prime) \n",
+ "print\"Rate of evaporation is\",round(R[0],3),\"kg/s\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEdCAYAAAAikTHKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3WdUVNfXgPEHELsI9oKKFAuvWBHBWMDeuygYLCRqmokx\ntpgYSxJBjTVKYqJg7z1WsIBEQRALUVRsKEVBEVQiUs/74f6diJUBhgE8v7WyAndm7tkzjLPn3FO2\njhBCIEmSJElq0tV2AJIkSVLhJBOIJEmSlCMygUiSJEk5IhOIJEmSlCMygUiSJEk5IhOIJEmSlCMy\ngUhSNvj7+9OgQQOtte/m5sbo0aO11r4kvY6OXAciFQSrV69mwYIF3Lx5EwMDA/r374+bmxvly5fX\nSjy6urpcv34dU1NTjbdlb2/P6dOn0dfXR0dHBwsLCwYPHszXX39N8eLFNd6+JOWU7IFIWrdgwQKm\nTp3KggULePz4MYGBgdy+fZvOnTuTlpaW5+1lZGRk63759d1KR0eH5cuX8/jxY+7du8eCBQvYvHkz\nPXr00Hjb6enpGm9DKrpkApG06vHjx8ycOZNly5bRpUsX9PT0qFOnDlu3biUiIoL169cDMHPmTAYN\nGsTQoUMxMDCgRYsWhIaGqs4TExPDwIEDqVKlCqampvz666+q254/1sXFhfLly7NmzRqCg4Oxs7PD\nyMiIGjVqMG7cOFWyateuHQBNmjShXLlybNu2DV9fX2rVqqU6p4mJCQsWLKBJkyYYGhoydOhQUlJS\nVLfPmzePGjVqYGxszMqVK9HV1eXmzZ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7yiANmtrw4YNZGdn13eUhyopKanvCKKBkysQ\nIYQQZpErECGEEGaRAiKEEMIsUkCEEEKYRQqIEEIIs0gBEUIIYRYpIEIIIcwiBUQIIYRZpIAIIYQw\ny/8DTPMaHFV/PpQAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7e784a8>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cross sectional is 5.48 square m\n",
+ "\n",
+ "The height of tower is 7.29\n",
+ "Rate of evaporation is 0.318 kg/s\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.8,Page number:495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 8.8\n",
+ "#Water Cooling Using Air: Numerical Solution\n",
+ "\n",
+ "# solution (a)\n",
+ "print\"Solution8.8 (a)\"\n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# a - water vapor b - air\n",
+ "\n",
+ "T_L2 = 314 \t\t\t\t# [inlet water temperature, K]\n",
+ "T_L1 = 303 \t\t\t\t# [outlet water temperature, K]\n",
+ "T_d = 306 \t\t\t\t# [dry bulb temperature ,K]\n",
+ "T_w1 = 298 \t\t\t\t# [wet bulb temperature, K]\n",
+ "Z = 3 \t\t \t\t\t# [packed tower depth, m]\n",
+ "G_x = 3 \t\t\t\t# [mass velocity, kg/square m.s]\n",
+ "G_s =2.7 \t\t\t\t# [mass velocity, kg/square m.s]\n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "from pylab import *\n",
+ "T_o = 273 \t\t\t\t# [reference temperature, K]\n",
+ "C_al = 4.187 \t\t\t\t# [kJ/kg.K]\n",
+ "C_pb = 1.005 \t\t\t\t# [kJ/kg.K]\n",
+ "C_pa = 1.884 \t\t\t\t# [kJ/kg.K]\n",
+ "P_total = 101.325 \t\t\t# [kPa]\n",
+ "lamda_0 = 2502.3 \t\t\t# [kJ/kg]\n",
+ "M_a = 18.02 \t\t\t\t# [gram/mole]\n",
+ "M_b = 28.97 \t\t\t\t# [gram/mole]\n",
+ "\n",
+ "\t# Equilibrium Data:\n",
+ "\t# Data = [Temp.(K),H_eqm(kJ/kg)],[H_eqm - Equilibrium gas enthalpy]\n",
+ "Data_eqm =matrix([[273,9.48],[283,29.36],[293,57.8],[303,99.75],[313,166.79],[323,275.58],[333,461.5]]) \n",
+ "\n",
+ "\n",
+ "a1=plot(Data_eqm[:,0],Data_eqm[:,1],label='$Equilibrium line$') \n",
+ "\n",
+ "legend(loc='upper right') \n",
+ "xlabel(\"Liquid Temperature, K\") \n",
+ "ylabel(\"Enthalphy Of Air Water vapour, kJ / kg dry air\") \n",
+ "\n",
+ "P_a = math.exp(16.3872-(3885.7/(T_w1-42.98))) \t\t\t\t# [kPa]\n",
+ "Y_m1 = P_a/(P_total-P_a)*(M_a/M_b) \t\t\t\t\t# [kg water/kg dry air]\n",
+ "H_g1 = C_pb*(T_w1-T_o) + Y_m1*(C_pa*(T_w1-T_o)+lamda_0) \t\t# [Enthalpy of saturated \t\t\t\t\t\t\t\t\tmixture, kJ/kg \t\t\t\t\t\t\t\t\tdry air]\n",
+ "\n",
+ "\t# From overall energy balance\n",
+ "H_g2 = H_g1 + G_x*C_al*(T_L2-T_L1)/G_s \t\t\t\t# [Enthalpy of exit air, \t\t\t\t\t\t\t\t\tkJ/kg]\n",
+ "\n",
+ "\t\t# For calculation of mass transfer unit, Ntog\n",
+ "\t\t# Data1 = [T_L1 H_g1,.....,T_L2 H_g2]\n",
+ "\n",
+ "deltaT = (T_L2-T_L1)/9 \n",
+ "\n",
+ "\t# Data for enthalpy of exit air at different temperature varying from T_L1 to T_L2, \t\t\toperating line\n",
+ "Data1=matrix([[303,76.17],[304.22,81.85],[305.44,87.53],[306.67,93.22],[307.89,98.91],[309.11,104.59],[310.33,110.28],[311.56,115.96],[312.78,121.65],[314,127.35]]) \n",
+ "\n",
+ "\t# Data of equilibrium gas enthalpy at different temperature varying from T_L1 to T_L2 \t\tfrom the above equilibrium graph \n",
+ "\n",
+ "Data2=matrix([[303,100],[304.22,107.93],[305.44,116.12],[306.67,124.35],[307.89,132.54],[309.11,140.71],[310.33,148.89],[311.56,157.14],[312.78,165.31],[314,177.67]]) \n",
+ "\n",
+ "\t# Driving force \n",
+ "Data3 = zeros((10,3)) \n",
+ "\t# Data3 =[Equilibrium gas enthalpy, driving force]\n",
+ "for i in range(0,10):\n",
+ " Data3[i][0] = Data1[i,1] \n",
+ " Data3[i][1] = 1/(Data2[i,1]-Data1[i,1]) \n",
+ "\n",
+ "\n",
+ "\t# The data for Equilibrium gas enthalpy as abcissa is plotted against driving force\n",
+ "Area = 1.642 \n",
+ "N_tog = 1.642 \n",
+ "H_tog = Z/N_tog \t\t\t\t# [m]\n",
+ "\n",
+ "\t# Overall volumetric mass-transfer coefficient, K_ya\n",
+ "K_ya = G_s/H_tog \n",
+ "print\"Overall volumetric mass-transfer coefficient is\",K_ya,\"kg/cubic m.s\\n\\n\" \n",
+ "\n",
+ "print\"\\nSolution (b)\"\n",
+ "#Illustration 8.8 (b) \n",
+ "\n",
+ "T_w2 = 288 \t\t\t\t\t# [New entering-air wet-bulb temperature, K]\n",
+ "P_a2 = math.exp(16.3872-(3885.7/(T_w2-42.98))) # [kPa]\n",
+ "Y_m2 = P_a2/(P_total-P_a2)*(M_a/M_b) \t\t# [kg water/kg dry air]\n",
+ "H_g11 = C_pb*(T_w2-T_o) + Y_m2*(C_pa*(T_w2-T_o)+lamda_0) \t# [Enthalpy of saturated mixture, \t\t\t\t\t\t\t\tkJ/kg dry air]\n",
+ "\n",
+ "\t# the change in water temperature through the tower must remain the same as in part (a), \t\tnamely T_L2b-T_L1b = 11K \n",
+ "\t# Since N_tog is a function of both water temperatures(T_L1',T_L2'), this provides the \t\t\tsecond relation needed to calculate the values of T_L2b and T_L1b\n",
+ "\t# The two equations are solved simultaneously by trial and error method, from above we \t\tget T_L1'= 297K\n",
+ "T_L1b = 297 \t\t\t\t\t# [K]\n",
+ "T_L2b = T_L1b + 11 \t\t\t\t#[K]\n",
+ "S = T_L1b - T_w2 \t\t\t\t# [wet bulb temperature approach, K]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The outlet water temperature and wet bulb temperature approach is\",T_L1b,\" K and \",S,\" K respectively \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution8.8 (a)\n",
+ "Overall volumetric mass-transfer coefficient is"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1.4778 kg/cubic m.s\n",
+ "\n",
+ "\n",
+ "\n",
+ "Solution (b)\n",
+ "The outlet water temperature and wet bulb temperature approach is 297 K and 9 K respectively \n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xlc1NX+x/HXIJi5lEsKKhkKIiKrKC6ZYcpiaa7h1TRc\nypbf7ZaaW6t5S8mrt6Syuu6Vu5mSipIpLqlhuCYuuYKIuCDihgJzfn98YxIFRgaGmYHP8/HgEczM\n93vekPCZ8z3ne45OKaUQQgghCmFn6QBCCCGsmxQKIYQQRZJCIYQQokhSKIQQQhRJCoUQQogiSaEQ\nQghRJLMXChcXF3x8fPD39ycwMBCA9PR0goODcXd3JyQkhIyMDMPrJ0+eTNOmTfHw8CA2Ntbc8YQQ\nQhhh9kKh0+mIi4tjz549xMfHAxAZGUlwcDBHjx6lc+fOREZGApCYmMiSJUtITExk3bp1vPbaa+j1\nenNHFEIIUYQyufR09z190dHRREREABAREcHKlSsBWLVqFf3798fBwQEXFxfc3NwMxUUIIYRllEmP\nokuXLrRq1YqZM2cC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ycQs+X\n906/sPNWq1Yt39e//PILO3fupEqVKnTq1KnA7+/un8HNmzfz9azyzqmUokWLFmzfvt3o930nDw8P\nJk6cSHh4OOvXry9y8yRRMUi/UlgVpRQPP/wwNWvW5NdffwXIt4+Bi4sLe/fuRSlFcnLyPds36nQ6\nOnbsyMqVK8nKyuLq1ausXr36vjaVCQ0NZcaMGYY//EePHuXGjRvFyr5s2TKUUhw/fpwTJ07g4eFx\n3+fNzMykVq1aVKlShcOHD7Nz507Dcw4ODobjHR0dOX/+POnp6dy6dYvVq1ffkwO0fUQuXLhgOE92\ndjaJiYmAVri+/PLLAr8HgHbt2vHVV1/RrVu3fPsWiIpJehTCIm7cuMGjjz5q+HrkyJHA3+/A586d\ny9ChQ9HpdIbr+QAdOnSgcePGeHp60rx5cwICAu45t7+/P/369cPX15d69eoZvXST1+aLL77IqVOn\naNmyJUop6tWrx48//ljkrnh3jw80atSIwMBAMjMz+eabb6hcufJ9nzcsLIyvv/4aT09PmjVrRrt2\n7QzPDR8+HB8fHwICAvjuu+94//33CQwMpGHDhve84887Z+XKlVm+fDn/+te/uHLlCjk5OYwYMQJP\nT08OHz5s2Ae9sO+nW7duXLx4kbCwMLZt20atWrWK/DmK8kumxwqrd/r0abp168aBAwcsHaVIQ4YM\noXv37vTu3dvSUYzq3r07P/74Y5FTcoXII/9KhNVTSll8P+Ly5qeffrJ0BGFDpEchhBCiSDKYLYQQ\nokhSKIQQQhRJCoUQQogiSaEQQghRJCkUQgghiiSFQgghRJH+HzGNBEu73QazAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7cb6240>"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/Chapter 9.ipynb b/Beginning_C++_through_Game_Programming/Chapter 9.ipynb
new file mode 100755
index 00000000..d3e5df4a
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/Chapter 9.ipynb
@@ -0,0 +1,759 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:Membranes,Solid Sorption Agents"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.1,Page number:508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 9.1\n",
+ "#Liquid Flux in I\u2019ubular Membrane \n",
+ "\n",
+ "# solution\n",
+ "\n",
+ "\t# A-solute B-solvent\n",
+ "ci_f = 50 \t\t\t\t\t# [feed side concentration, mole/cubic m]\n",
+ "ci_p = 15 \t\t\t\t\t# [permeate side concentration, mole/cubic m]\n",
+ "t = 2*10**-4 \t\t\t\t\t# [membrane thickness, cm]\n",
+ "q_A = 176 \t\t\t\t\t# [permeability, barrer]\n",
+ "D = 4*10**-1 \t\t\t\t\t# [tube inside diameter, cm]\n",
+ "D_A = 5*10**-5 \t\t\t\t# [diffusuvity, square cm/s]\n",
+ "Re = 20000 \t\t\t\t\t# [reynolds number]\n",
+ "Sc = 450 \t\t\t\t\t# [Schmidt number]\n",
+ "mtc_p = 0.12 \t\t\t\t\t# [square cm/s]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\t# From equation 9.6, 1 barrer = 8.3*10**-9 square cm/s \n",
+ "\t# Therefore \n",
+ "q_A = q_A*8.3*10**-9 \t\t\t\t# [square cm/s]\n",
+ "Q_A = q_A/t \t\t\t\t\t# [permeance, cm/s]\n",
+ "\t# The mass-transfer coefficient on the feed side is from equation (2-75) for turbulent \tflow of a liquid inside a circular pipe:\n",
+ "Sh = 0.023*Re**0.83*Sc**(1.0/3.0) \n",
+ "\t# Now mass transfer coefficient\n",
+ "k_af = Sh*D_A/D \t\t\t\t# [cm/s]\n",
+ "\t# Total resistance to mass transfer \n",
+ "res_total = (1/k_af)+(1/Q_A)+(1/mtc_p) \t# [s/cm]\n",
+ "\t# Transmembrane flux of solute A\n",
+ "N_A = (ci_f-ci_p)/(res_total*100) \t\t# [mole/square m.s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The transmembrane flux of solute A is\",round(N_A,5),\"mole/square m.s\"\n",
+ "\n",
+ "percent_mem_res = ((1/Q_A)/res_total)*100 \t# [%]\n",
+ "print\"Membrane resistance is\",round(percent_mem_res),\"percent of the total\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The transmembrane flux of solute A is 0.00222 mole/square m.s\n",
+ "Membrane resistance is 87.0 percent of the total\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.2,Page number:511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Illustration 9.2\n",
+ "\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from numpy import *\n",
+ "\n",
+ "\n",
+ "# solution\n",
+ "\n",
+ "# A-oxygen B-nitrogen\n",
+ "t = 0.2*10**-6 # [m]\n",
+ "qA = 3.97*10**-13 # [mole/m.s.kPa]\n",
+ "qB = 0.76*10**-13 # [mole/m.s.kPa]\n",
+ "v = 1 # [Air flow rate at STP, cubic m/s]\n",
+ "Pp = 0.1*10**6 # [Pa]\n",
+ "R = 8.314 # [cubic m.Pa/mole.K]\n",
+ "T = 298 # [K]\n",
+ "Pf = 1*10**6 # [Pa]\n",
+ "\n",
+ "# Using equation 9.14\n",
+ "alphaA = qA/qB \n",
+ "QA = qA/t # [mole/square m.s.kPa]\n",
+ "# molar flow rate\n",
+ "nf = v*1000/(22.4) # [mole/s]\n",
+ "r = Pp/Pf # [pressure ratio]\n",
+ "QB = qB/t # [mole/square m.s.kPa]\n",
+ "alphaid = QA/QB \n",
+ "xFa = 0.21 \n",
+ "xFb = 0.79 \n",
+ "\n",
+ "# For Q = 0.1\n",
+ "Q1 = 0.1\n",
+ " # Solution of simultaneous equation\n",
+ "def F(e):\n",
+ " f1 = e[0] - (e[2]*(1-e[1]))/((e[1]*(1-e[2]))) \n",
+ " f2 = e[1] - (xFa - (e[2]*Q1))/(1-Q1) \n",
+ " f3 = e[0] - (alphaid*(e[1]*(e[0]-1)+1- (r*e[0])))/(e[1]*(e[0]-1)+1 - r) \n",
+ " return(f1,f2,f3)\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [4,0.13,0.4] \n",
+ "y = fsolve(F,e) \n",
+ "alpha1 = y[0] \n",
+ "Xa1 = y[1] \n",
+ "Ya1 = y[2] \n",
+ "Am1 = Ya1*Q1*nf/(QA*(Xa1*Pf-Ya1*Pp))*1000 # [square m]\n",
+ "\n",
+ "# For Q = 0.2\n",
+ "Q2 = 0.2\n",
+ " # Solution of simultaneous equation\n",
+ "def F(e):\n",
+ " f1 = e[0] - (e[2]*(1-e[1]))/((e[1]*(1-e[2]))) \n",
+ " f2 = e[1] - (xFa - (e[2]*Q2))/(1-Q2) \n",
+ " f3 = e[0] - (alphaid*(e[1]*(e[0]-1)+1- (r*e[0])))/(e[1]*(e[0]-1)+1 - r) \n",
+ " return(f1,f2,f3)\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [4,0.13,0.4] \n",
+ "y = fsolve(F,e) \n",
+ "alpha2 = y[0] \n",
+ "Xa2 = y[1] \n",
+ "Ya2 = y[2] \n",
+ "Am2 = Ya2*Q2*nf/(QA*(Xa2*Pf-Ya2*Pp))*1000 # [square m]\n",
+ "\n",
+ "# For Q = 0.9\n",
+ "Q9 = 0.9\n",
+ " # Solution of simultaneous equation\n",
+ "def F(e):\n",
+ " f1 = e[0] - (e[2]*(1-e[1]))/((e[1]*(1-e[2]))) \n",
+ " f2 = e[1] - (xFa - (e[2]*Q9))/(1-Q9) \n",
+ " f3 = e[0] - (alphaid*(e[1]*(e[0]-1)+1- (r*e[0])))/(e[1]*(e[0]-1)+1 - r) \n",
+ " return(f1,f2,f3)\n",
+ "\n",
+ "# Initial guess\n",
+ "e = [4,0.13,0.4] \n",
+ "y = fsolve(F,e) \n",
+ "alpha9 = y[0] \n",
+ "Xa9 = y[1] \n",
+ "Ya9 = y[2] \n",
+ "Am9 = Ya2*Q9*nf/(QA*(Xa9*Pf-Ya9*Pp))*1000 # [square m]\n",
+ "\n",
+ "# Similarly for Q =0.3......0.9, Xa, Ya, alpha and Am are calculated\n",
+ "# Therefore we obtained\n",
+ "# Solution = [Q,alpha,Xa,Ya]\n",
+ "Solution = zeros((9,4)) \n",
+ "Solution =matrix([[0.1,4.112,0.181,0.475],[0.2,4.062,0.156,0.428],[0.3,4.018,0.135,0.385],[0.4,3.98,0.118,0.348],[0.5,3.949,0.105,0.315],[0.6,3.922,0.093,0.288],[0.7,3.9,0.084,0.264],[0.8,3.881,0.077,0.243],[0.9,3.864,0.07,0.226]]) \n",
+ "Am =matrix([[8037],[17074],[26963],[37531],[48618],[60099],[71876],[83879],[96056]]) \n",
+ "\n",
+ "\n",
+ "print\"The maximum oxygen content of the permeate (%f percent) occurs with the smallest cut (Q = 0.1).\",round(Ya1*100)\n",
+ "print\"The maximum nitrogen content of the retentate (%f percent) occurs at the largest cut (Q = 0.9).\\n\\n\",round((1-Xa9)*100)\n",
+ "\n",
+ "print\"The membrane area requirements are very large (e.g, Am = 60,100 square m for Q = 0.6) even though the volumetric flow rate of air is relatively small)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum oxygen content of the permeate (%f percent) occurs with the smallest cut (Q = 0.1). 48.0\n",
+ "The maximum nitrogen content of the retentate (%f percent) occurs at the largest cut (Q = 0.9).\n",
+ "\n",
+ "93.0\n",
+ "The membrane area requirements are very large (e.g, Am = 60,100 square m for Q = 0.6) even though the volumetric flow rate of air is relatively small)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.4,Page number:520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Illustration 9.4\n",
+ "# Page: 520\n",
+ "\n",
+ "\n",
+ "# solution\n",
+ "#*****Data*****#\n",
+ "import math\n",
+ "from numpy import *\n",
+ "Pexp = array([0.276,1.138,2.413,3.758,5.240,6.274,6.688 ]) # [MPa]\n",
+ "V = array([45.5,91.5,113,121,125,126,126 ]) # [cubic cm of CH4/gram carbon]\n",
+ "Ma = 16 # [gram/mole]\n",
+ "Vstp = 22.4 # [L/mole]\n",
+ "q = V*Ma/Vstp # [mg/g]\n",
+ "\n",
+ "# Linearize data for Langmuir isotherm\n",
+ "y = Pexp/q \n",
+ "\n",
+ "\n",
+ "#y = array([0.0030667,0.01264,0.02681,0.0417556,0.0582,0.06971,0.07431 ])\n",
+ "\n",
+ "\n",
+ "\n",
+ "a2=plot(Pexp,q, marker='o')\n",
+ "\n",
+ "xlabel(\"Pexp, MPa\") \n",
+ "ylabel(\"y, MPa.mg/g\") \n",
+ "\n",
+ "# Now qm = 1/(slope of Pexp v/s y curve)\n",
+ "# From graph of Pexp v/s y, the slope is \n",
+ "s = 0.01022 \n",
+ "# And intercept \n",
+ "i = 5.4865*10**-3 \n",
+ "qm = 1/s # [mg/g]\n",
+ "K = 1/(qm*i) # [1/MPa]\n",
+ "\n",
+ "# Therefore\n",
+ "# qlp = K*qm*p/(1+Kp)\n",
+ "print\"Data for Langmuir isotherm are K =\",round(K,3),\"MPa**-1 and qm =\",round(qm,2) \n",
+ "\n",
+ "# Linearize data for Freundlich isotherm\n",
+ "# y1 = log(q/(mg/g)) , x1 = log(Pexp/MPa)\n",
+ "y1 = numpy.log(q) \n",
+ "x1 = numpy.log(Pexp) \n",
+ "\n",
+ "twiny()\n",
+ "twinx()\n",
+ "plot(x1,y1, linestyle='--', color='r')\n",
+ "plt.xticks(np.arange(min(x1), max(x1)+1, 2))\n",
+ "\n",
+ "xlabel(\"$log(Pexp/(Mpa))$\") \n",
+ "ylabel(\"$log(q/(mg/g))$\") \n",
+ "title(' Langmuir and Freundlich isotherms fitted to data')\n",
+ "\n",
+ "#plt.xlim(0,8)\n",
+ "#plt.ylim(20,100)\n",
+ "\n",
+ "\n",
+ "# From graph of log(q) v/s log(Pexp)\n",
+ "# slope = 0.31\n",
+ "s = 0.31 \n",
+ "# and intercept is\n",
+ "i = 4 \n",
+ "# Therefore n = 1/slope\n",
+ "n = 1/s \n",
+ "k =math.exp(i) # [(mg CH4/g of carbon.MPa**(-1/n)]\n",
+ "print\"Data for Freundlich isotherm are n = \",round(n,2),\"and k =\",round(k,2)\n",
+ "\n",
+ "# Therefore\n",
+ "# qFp = k*(p/1 Mpa)**(1/n)\n",
+ "print\"Figure shows a q-p plot of the experimental data and the corresponding predictions of the Langmuir and Freundlich isotherms.\\n It is evident from the plot that in this case, the Langmuir isotherm fits the data significantly better than the Freundlich isotherm.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Data for Langmuir isotherm are K = 1.863 MPa**-1 and qm = 97.85\n",
+ "Data for Freundlich isotherm are n = "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 3.23 and k = 54.6\n",
+ "Figure shows a q-p plot of the experimental data and the corresponding predictions of the Langmuir and Freundlich isotherms.\n",
+ " It is evident from the plot that in this case, the Langmuir isotherm fits the data significantly better than the Freundlich isotherm.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEZCAYAAAA6xErnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xl4TGf7wPHvJFQSIhsSEa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4nNa6wS0zZo18AAAAA\nSUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7ffd128>"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.5,Page number:526"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 9.5\n",
+ "#Ion-Exchange Equilibrium \n",
+ "\n",
+ "#Variable declaration\n",
+ "\t# A-Na+ B-Cu+2\n",
+ "\t# Using the data from Table 9.1\n",
+ "KA = 1.98 \n",
+ "KB = 3.47 \n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "from pylab import *\n",
+ "from numpy import *\n",
+ "Q = 2.4 \t\t\t\t\t# [eq/L of resin]\n",
+ "\t# Charge ratio is 'n'\n",
+ "n = 2 \n",
+ "C = 0.05 \t\t\t\t\t#[total concentration, eq/L]\n",
+ "\t# From equ 9.48\n",
+ "KAB = KB/KA \n",
+ "\t# From equ 9.47\n",
+ "\t# ya*(1-xa)**2/(xa*(1-ya)**2) = KAB*Q/C = T\n",
+ "T = KAB*Q/C \n",
+ "\t# Substituting values of xA in the range 0.1< xa <1.0, we generate the # \tdistribution curve\n",
+ "ya=zeros((20))\n",
+ "for i in range(1,20):\n",
+ " def f16(ya):\n",
+ " return(ya*(1-i*0.05)**2/(i*0.05*(1-ya)**2)- T) \n",
+ " ya[i] = fsolve(f16,0.99) \n",
+ " \n",
+ "xa =[0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95] \n",
+ "\n",
+ "a1=plot(xa,ya) \n",
+ "ylim(0,1)\n",
+ "xlabel(\"$xa,Fraction of Cu+2 in Solution$\") \n",
+ "ylabel(\"$ya,Fraction of CuR2 in resin$\") \n",
+ "plt.grid()\n",
+ "show(a1)\n",
+ "print\"The curve is similar in shape to an adsorption isotherm of the very favorable type.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAETCAYAAAAoF0GbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUVIXaP/AvBiJ5QwRBGBJFA7yBBt4JvKWiqSd9E19T\nMTOPZmmnfql5LCsztcvSJHvtpImZHgstspBKAz0qNzUxkdcQiauoiAiCcd2/P/bLbBCEGYa9Zw/z\n/aw1C/awmXnmWaz9sJ9nXywEQRBARET0AG2MHQAREakbCwURETWKhYKIiBrFQkFERI1ioSAiokax\nUBARUaMULRTPPvssHB0dMWDAgAeu89JLL6FPnz7w9vbGb7/9pmB0RETUEEULxYIFCxAVFfXAn0dG\nRuLKlStITU3FZ599hiVLligYHRERNUTRQuHv748uXbo88Offf/895s+fDwAYOnQoCgsLcf36daXC\nIyKiBqhqRpGTkwNXV1ftskajQXZ2thEjIiIiVRUKALj/iiIWFhZGioSIiADA0tgB1Obi4oKsrCzt\ncnZ2NlxcXBpcLzc3V8nQiIhMnru7O65cuaL376mqUEydOhWhoaEIDg5GXFwcbG1t4ejoWG+93Nzc\nense5mrdunVYt26dscNQBeZCwlxIlM6FIAAlJcDNm9IjP7/xx+3bQKdOgL39gx9+fkAjB4zqpLkd\nGkULxezZs3H8+HHk5+fD1dUVb731FioqKgAAixcvRlBQECIjI9G7d2+0b98eX3zxhZLhmaQ///zT\n2CGoBnMhYS4khuZCEICiorob/oYeN25I31tYAA4O0sPeXvras2f9ImBnB1iq6t/2uhQNbf/+/U2u\nExoaqkAkRGTOysqkjfv16+LX+x81z9+8CVhb193w1zy6dwcGDqz/fPv2xv6ELUvFNYx0ERISYuwQ\nVIO5kJhjLkpKgLw8cQNf+2tBQQhmzKhbEEpLxQ16t26Ao6P4tebRr1/d5x0cgHbtjP3pjMvCFG9c\nZGFhwRkFkRn466/6G/6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QEBFRo1goiIioUSwURETUKBYKIiJqFAsFERE1ioWCiIga9f8B9Oi5Uysw0u0AAAAASUVO\nRK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x8ef8748>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The curve is similar in shape to an adsorption isotherm of the very favorable type.\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.8,Page number:535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 9.8\n",
+ "#Fixed-Bed Scale-Up Using LUB \n",
+ "#Variable declaration\n",
+ "\t# From example 9.7 \n",
+ "alpha = 0.891 \n",
+ "\t# For bed length Z = 1.829\n",
+ "Z1 = 1.829 \t\t\t\t\t\t# [m]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "LUB = (1-alpha)*Z1 \t\t\t\t\t# [length of unused bed, m]\n",
+ "\t# For this bed length \n",
+ "tb1 = 139.7 \t\t\t\t\t\t# [min]\n",
+ "\t# If the bed length is increased to Z2 = 3 m\n",
+ "Z2 = 3 \t\t\t\t\t\t# [m]\n",
+ "\t# New break through time will be given by equation 9.64\n",
+ "tb2 = tb1*(Z2/Z1)*(1-LUB/Z2)/(1-LUB/Z1) \t\t# [min]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The new time of breakthrough assuming constant LUB is\",round(tb2),\"minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new time of breakthrough assuming constant LUB is 240.0 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.9,Page number:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 9.9\n",
+ "#Ion-Exchanger Ideal Break Time \n",
+ "#Variable declaration\n",
+ "import math\n",
+ "F = 7 \t\t\t\t\t# [water flow rate, L/s]\n",
+ "Z = 3 \t\t\t\t\t# [m]\n",
+ "d = 2.6 \t\t\t\t# [m]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "A = math.pi*d**2/4 \t\t\t# [cross sectional area, square m]\n",
+ "vo = 0.013 \t\t\t\t# [superficial velocity, m/s]\n",
+ "\n",
+ "cf = 7*10**-3 \t\t\t\t# [Ca2+ ion concentration, eq/L]\n",
+ "qstar_F = 2.9 \t\t\t\t# [cation capacity, eq/kg]\n",
+ "rowp = 1.34 \t\t\t\t# [kg/L]\n",
+ "e = 0.38 \t\t\t\t# [porosity]\n",
+ "\t# From equation 9.66\n",
+ "t_star = Z*qstar_F*rowp*(1-e)/(vo*cf*3600) \t\t\t# [hour]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The ideal breakthrough time for the ion exchanger is\",round(t_star),\"hour\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ideal breakthrough time for the ion exchanger is 22.0 hour\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.11,Page number:542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 9.11\n",
+ "#Dialysis for Sulfuric Acid Purification\n",
+ "\n",
+ "#Variable declaration\n",
+ "mtc = 0.02 \t\t\t\t\t# [mass transfer coefficient, cm/min]\n",
+ "p = 0.03 \t\t\t\t\t# [permeance, cm/min]\n",
+ "F = 1 \t\t\t\t\t\t# [cubic m/h]\n",
+ "W = 1000 \t\t\t\t\t# [water wash rate, kg/h]\n",
+ "\t# Density of 25% H2SO4 solution at 298 K is \n",
+ "d1 = 1175 \t\t\t\t\t# [kg/cubic m]\n",
+ "x = 0.25 \t\t\t\t\t# [fraction of H2SO4 in solution]\n",
+ "cF = 294 \t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\n",
+ "K = (1/p+1/mtc)**-1 \t\t\t\t # [overall mass transfer coefficient, cm/min]\n",
+ "\n",
+ "\t# Flow of H2SO4 in feed\n",
+ "F_sul = F*d1*x \t\t\t\t# [kg/h]\n",
+ "import math\n",
+ "\t\t# For 60% recovery and rest in dialysate\n",
+ "yr = 0.60 \n",
+ "yd = 0.40 \n",
+ "\t\t# Transmembrane flow of acid\n",
+ "Ft = F_sul*yr \t\t\t\t\t# [kg/h]\n",
+ "\t# From the given water transport number, Transmembrane counterflow of water \n",
+ "Fw = Ft*0.8 \t\t\t\t\t# [kg/h]\n",
+ "\n",
+ "\t# Now inlet and outlet concentration from material balances\n",
+ "\t# Flow of acid in dialysate\n",
+ "Fad = F_sul*yd \t\t\t\t# [kg/h]\n",
+ "\n",
+ "\t# Total dialysate flow\n",
+ "D = F*d1-Ft+Fw \t\t\t\t# [kg/h]\n",
+ "x_aD = Fad/D \t\t\t\t\t# [mass fraction of acid in dialysate]\n",
+ "\n",
+ "\t# Density of 10.3 wt % aqueous solution of sulfuric acid at 298K is\n",
+ "d2 = 1064 \t\t\t\t\t# [kg/cubic m] \n",
+ "\n",
+ "cR = x_aD*d2 \t\t\t\t\t# [kg/cubic m]\n",
+ "\t# Flow of acid in diffusate\n",
+ "Fd = Ft \t\t\t\t\t# [kg/h]\n",
+ "\t\t# Total Diffusate flow\n",
+ "Di = 1000-Fw+Fd \t\t\t\t # [kg/h]\n",
+ "x_aDi = Fd/Di \t\t\t\t\t# [mass fraction acid in diffusate]\n",
+ "\n",
+ "\t# Density of 17 wt % aqueous solution of sulfuric acid at 298 K is\n",
+ "d3 = 1114 \t\t\t\t\t# [kg/cubic m]\n",
+ "\n",
+ "cP = x_aDi*d3 \t\t\t\t\t# [kg/cubic m]\n",
+ "\t# At the free end of dialyzer \n",
+ "deltaC1 = cF-cP \t\t\t\t# [kg/cubic m]\n",
+ "\t# At the dialysate end\t\n",
+ "deltaC2 = cR-0 \t\t\t\t# [kg/cubic m]\n",
+ "lmdf = (deltaC2-deltaC1)/(math.log(deltaC2/deltaC1)) \t# [math.log-mean driving force, kg/cubic \t\t\t\t\t\t\t\tm]\n",
+ "\n",
+ "\t# Therefore\n",
+ "Am = Fd*100/(K*lmdf*60) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The membrane area required is\",round(Am),\"square m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The membrane area required is 229.0 square m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.12,Page number:545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 9.12\n",
+ "#Water Desalinization by Reverse Osmosis\n",
+ "#Variable declaration\n",
+ "\t# A-NaCl\n",
+ "vo = 0.05 \t\t\t\t\t# [superficial velocity of water in the shell, \t\t\t\t\t\tm/s]\n",
+ "T = 298 \t\t\t\t\t# [K]\n",
+ "Pf = 70 \t\t\t\t\t# [bar]\n",
+ "Pp = 3 \t\t\t\t\t# [pressure at permeate side, bar]\n",
+ "p = 1.1*10**-5 \t\t\t\t# [water permeance, g/square cm.s.bar]\n",
+ "R1 = 0.97 \t\t\t\t\t# [salt rejection]\n",
+ "R = 8.314 \n",
+ "xAf = 0.02 \t\t\t\t\t# [fraction of NaCl in feed side]\n",
+ "xAp = 0.0005 \t\t\t\t\t# [fraction of NaCl in permeate side]\n",
+ "MA = 58.5 \t\t\t\t\t # [gram/mole]\n",
+ "\n",
+ "\n",
+ "print\"\\nSolution 9.12(a)\" \n",
+ "\t# Solution(a)\n",
+ "\n",
+ "deltaP = Pf-Pp \t\t\t\t# [bar]\n",
+ "\t# Density of both feed and permeate is 1 g/cc\n",
+ "df = 1000\t\t\t\t\t # [kg/cubic m]\n",
+ "dp = df \n",
+ "\t# Bulk feed salt concentration \n",
+ "csf = xAf*2*1000/MA \t\t\t\t# [kmole/cubic m]\n",
+ "\t# Bulk permeate salt concentration\n",
+ "csp = xAp*2*1000/MA \t\t\t\t# [kmole/cubic m]\n",
+ "\n",
+ "\t# From equation 9.76\n",
+ "pif = R*T*csf/100 \t\t\t\t# [osmotic pressure at feed side, bar]\n",
+ "pip = R*T*csp/100 \t\t\t\t# [osmotic pressure at permeate side, bar]\n",
+ "deltapi = pif-pip \t\t\t\t# [bar]\n",
+ "\n",
+ "Y = deltaP-deltapi \t\t\t\t# [bar]\n",
+ "\t# Transmembrane flux of water\n",
+ "nH2O = p*Y*10**-3/(df*(10**-4*1/(60*60*24))) \t# [cubic m/square m.day]\n",
+ "\n",
+ "print\"The transmembrane flux of water is\",round(nH2O,2),\"cubic m/square m.day.\"\n",
+ "\n",
+ "print\"\\nSolution 9.12(b)\" \n",
+ "\t# Solution(b)\n",
+ "\n",
+ "\t# Properties of water are\n",
+ "dw = 1000 \t\t\t\t\t# [kg/cubic m]\n",
+ "uw = 0.9*10**-3 \t\t\t\t# [kg/m.s]\n",
+ "DA = 1.6*10**-9 \t\t\t\t# [Diffusivity of NaCl in water, square m/s]\n",
+ "d = 290*10**-6 \t\t\t\t# [outside diameter of fibres, m]\n",
+ "phi = 0.4 \n",
+ "\t# For a superficial velocity of 5 cm/sec\n",
+ "Re = dw*vo*d/uw \t\t\t\t# [Renoylds number]\n",
+ "Sc = uw/(dw*DA) \t\t\t\t# [Schmidt number]\n",
+ "Sh = 8.63 \t\t\t\t\t# [Sherwood number]\n",
+ "\t# Therefore \n",
+ "ks = Sh*DA/d \t\t\t\t\t# [m/s]\n",
+ "\t# From equation 9.81\n",
+ "\n",
+ "t = nH2O*R1/(ks) \n",
+ "#Since we have to find the value of 't' PER DAY...therefore we will divide by day\n",
+ "#.ie\n",
+ "t=t/(24*60*60)\n",
+ "\n",
+ "#result\n",
+ "print\"The concentration polarization factor is\",round(t,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Solution 9.12(a)\n",
+ "The transmembrane flux of water is 0.48 cubic m/square m.day.\n",
+ "\n",
+ "Solution 9.12(b)\n",
+ "The concentration polarization factor is 0.113\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.13,Page number:548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustration 9.13\n",
+ "# Ultrafiltration of Cheese Whey Proteins \n",
+ "#variable declaration\n",
+ "import math\n",
+ "\t# w-water a-proteins\n",
+ "T = 293 \t\t\t\t\t# [K]\n",
+ "d = 2 \t\t\t\t\t\t# [diameter of tube, cm]\n",
+ "dw = 1 \t\t\t\t\t# [g/cubic cm]\n",
+ "uw = 0.01 \t\t\t\t\t# [cP]\n",
+ "Da = 4*10**-7 \t\t\t\t\t# [Diffusivity of proteins, square cm/s]\n",
+ "vo = 1.5*100 \t\t\t\t\t# [m/s]\n",
+ "Qm = 250*10**-3/3600*100 \t\t\t# [water permeance, cm/s.atm]\n",
+ "cR = 40 \t\t\t\t\t# [g/L]\n",
+ "\n",
+ "print\"Solution 9.13(a)\\n\" \n",
+ "\t# Solution(a)\n",
+ "\n",
+ "v = 25*10**-3/3600*100 \t\t\t# [cm/s]\n",
+ "\n",
+ "Re = d*vo*dw/uw \t\t\t\t# [Renoylds number]\n",
+ "Sc = uw/(dw*Da) \t\t\t\t# [Schmidt number]\n",
+ "Sh = 0.0048*Re**0.913*Sc**0.346 \t\t# [Sherwood number]\n",
+ "ks = Sh*Da/d \n",
+ "\t# From equation 9.87\n",
+ "cS = cR*math.exp(v/ks) \t\t\t\t# [g/L]\n",
+ "\n",
+ "\t# From figure 9.12\n",
+ "pi1 = 2 \t\t\t\t\t# [osmotic pressure, atm]\n",
+ "\t# For 100% rejection deltapi = pi1 because pi2 = 0\n",
+ "\t# Therefore\n",
+ "deltapi = pi1 \t\t\t\t\t# [atm]\n",
+ "\t# From equation 9.83\n",
+ "deltaP = deltapi+(v/Qm) \n",
+ "\n",
+ "print\"The required pressure differential to produce a water transmembrane volume flux of 25 L/square m.h when the membrane is clean is\",deltaP,\"atm\"\n",
+ "\n",
+ "\n",
+ "print\"\\nSolution 9.13(b)\\n\" \n",
+ "\t# Solution(b)\n",
+ "\n",
+ "\t# Membrane permeance is reduced fivefold by fouling\n",
+ "Qm = Qm/5 \t\t\t\t\t# [cm/s.atm]\n",
+ "\t# Here deltaP remains same\n",
+ "\t# Equations 9.83 and 9.87, and the osmotic pressure data of Figure 9.12 must be solved \tsimultaneously by trial and error to calculate new values for these three variables.\n",
+ "\t# The results are\n",
+ "cS2 = 213 \t\t\t\t\t# [g/L]\n",
+ "deltapi2 = 1.63 \t\t\t\t# [atm]\n",
+ "v2 = 6.53*10**-4 \t\t\t\t# [cm/s]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The water flux if the applied pressure differential remains the same as calculated in part (a) is\",round(v2*1000*10**-2*3600,1),\"L/square m.hr\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution 9.13(a)\n",
+ "\n",
+ "The required pressure differential to produce a water transmembrane volume flux of 25 L/square m.h when the membrane is clean is 2.1 atm\n",
+ "\n",
+ "Solution 9.13(b)\n",
+ "\n",
+ "The water flux if the applied pressure differential remains the same as calculated in part (a) is 23.5 L/square m.hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/README.txt b/Beginning_C++_through_Game_Programming/README.txt
new file mode 100755
index 00000000..a0639431
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Jatin Pavagadhi
+Course: mca
+College/Institute/Organization: Indian Institute of Engineering Bombay
+Department/Designation: System Administrator
+Book Title: Beginning C++ through Game Programming
+Author: Michel Dawson
+Publisher: Cengage Learning
+Year of publication: 2010
+Isbn: 1435457420
+Edition: 3rd \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch1.ipynb b/Beginning_C++_through_Game_Programming/ch1.ipynb
new file mode 100755
index 00000000..3986f8e6
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch1.ipynb
@@ -0,0 +1,49 @@
+{
+ "metadata": {
+ "name": "ch1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 : The way of the program"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "Example 1 Page no : 7"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 1 page no : 7\n'''\n\nprint \"Hello, world.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Hello, world.\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch10.ipynb b/Beginning_C++_through_Game_Programming/ch10.ipynb
new file mode 100755
index 00000000..cd0445e0
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch10.ipynb
@@ -0,0 +1,142 @@
+{
+ "metadata": {
+ "name": "ch10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "CHAPTER 10. : VECTORS"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 10.1 page no :103\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 10.1 page no :103\n''' \n\nvalues = [] \nc = int(raw_input())\nwhile(c != -1):\n values.append(c)\n c = int(raw_input())\n\nsize=len(values)\nfor i in range(size):\n print values[i] ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "5\n"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "4\n"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3\n"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "2\n"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "-1\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "5\n4\n3\n2\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 10.2 page no :104\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 10.2 page no :104\n'''\nimport random\n\nfor i in range(4):\n x = random.random();\n print x",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "0.16979844903\n0.113100369897\n0.851107623696\n0.0966914962921\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 10.3 page no :105\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 10.3 page no :105\n'''\nimport random\ndef randomVector(n,upperBound):\n vec = []\n for i in range(n):\n vec.append(random.random () * 100 % upperBound)\n return vec\n\ndef printVector(vec):\n for i in range(len(vec)):\n print vec[i] ,\n\nnumValues = 20;\nupperBound = 10;\nvector = randomVector (numValues, upperBound);\nprintVector(vector)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1.84318995426 8.49475291756 7.92488160107 3.93550646061 0.967457025838 6.72758767668 6.22192058422 8.19279912461 7.4898535715 3.02785494125 2.97556694487 4.70451449621 8.21039455753 2.95832700489 7.02858630112 8.72631899097 5.67567455024 7.48090989023 9.14911759876 9.82069257056\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 10.4 page no: 106\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 10.4 page no: 106\n'''\nimport random\ndef howMany(vec,value):\n count = 0\n for i in range(len(vec)):\n if (vec[i] == value):\n count += 1\n return count\n\ndef randomVector(n,upperBound):\n vec = []\n for i in range(n):\n vec.append(int(random.random () * 100 % upperBound))\n return vec\n \nnumValues = 20;\nupperBound = 10;\nvector = randomVector (numValues, upperBound);\nprint \"value \\t howMany\"\nfor i in range(upperBound):\n print i , '\\t' , howMany(vector, i)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "value \t howMany\n0 \t2\n1 \t2\n2 \t0\n3 \t4\n4 \t3\n5 \t1\n6 \t2\n7 \t1\n8 \t2\n9 \t3\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch11.ipynb b/Beginning_C++_through_Game_Programming/ch11.ipynb
new file mode 100755
index 00000000..3f21ca72
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch11.ipynb
@@ -0,0 +1,175 @@
+{
+ "metadata": {
+ "name": "ch11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "CHAPTER 11 : MEMBER FUNCTIONS"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.1 page no :112\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.1 page no :112\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n\nc = Time( 9, 14, 30.0 )\nc.printTime ()",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.2 page no :114\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.2 page no :114\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def increment (self,secs):\n self.second += secs\n while (self.second >= 60.0):\n self.second -= 60.0;\n self.minute += 1;\n\n while (self.minute >= 60):\n self.minute -= 60.0;\n self.hour += 1;\n\nc = Time (9, 14, 30.0)\nc.increment (500.0);\nc.printTime ();",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "9 : 22 : 50.0\nTime is 9 hour 22 minutes 50.0\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.3 page no :115\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.3 page no :115\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n\nc = Time (9, 14, 30.0)\nprint c.convertToSeconds()",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "33270.0\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.4 page no :115\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.4 page no :115\n'''\n\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n def after (self,time2):\n if (self.hour > time2.hour):\n return True;\n if (self.hour < time2.hour): \n return False;\n if (self.minute > time2.minute): \n return True;\n if (self.minute < time2.minute):\n return False;\n if (self.second > time2.second): \n return True;\n return False;\n\nt1 = Time( 11, 59, 3.14159 )\nt2 = Time( 12, 42, 3.234 )\n\nif (t2.after(t1)):\n print \"The bread will be done after it starts.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "The bread will be done after it starts.\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.5 page no :116\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.5 page no :116\n'''\n\nclass Time:\n def __init__(self,h,m=None,s=None):\n if m==None:\n self.hour = int (secs / 3600.0);\n secs -= self.hour * 3600.0;\n self.minute = int (secs / 60.0); \n secs -= self.minute * 60.0;\n self.second = secs;\n else:\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\nc = Time (9, 14, 30.0)\nc.printTime()",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.6 page no : 117\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.6 page no : 117\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\nc = Time (9, 14, 30.0)\nc.printTime()",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 11.7 page no :119\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 11.7 page no :119\n'''\nclass Time:\n def __init__(self,h,m=None,s=None):\n if m==None:\n self.hour = int (secs / 3600.0);\n secs -= self.hour * 3600.0;\n self.minute = int (secs / 60.0); \n secs -= self.minute * 60.0;\n self.second = secs;\n else:\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def after (self,time2):\n if (self.hour > time2.hour):\n return True;\n if (self.hour < time2.hour): \n return False;\n if (self.minute > time2.minute): \n return True;\n if (self.minute < time2.minute):\n return False;\n if (self.second > time2.second): \n return True;\n return False;\n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n def increment (self,secs):\n self.second += secs\n while (self.second >= 60.0):\n self.second -= 60.0;\n self.minute += 1;\n\n while (self.minute >= 60):\n self.minute -= 60.0;\n self.hour += 1;\n\n def add(self,t2):\n a = t2.convertToSeconds()\n self.increment(a)\n\nc = Time(9, 14, 30.0)\nc.increment (500.0);\nc.printTime();\nb = Time(3, 35, 0.0);\ncurent = c\nc.add(b)\nd = c\nd.printTime()\nif(d.after(curent)):\n print \"The bread will be done after it starts.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "9 : 22 : 50.0\nTime is 9 hour 22 minutes 50.0\n12 : 57.0 : 50.0\nTime is 12 hour 57.0 minutes 50.0\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch12.ipynb b/Beginning_C++_through_Game_Programming/ch12.ipynb
new file mode 100755
index 00000000..c78a7ba1
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch12.ipynb
@@ -0,0 +1,169 @@
+{
+ "metadata": {
+ "name": "ch12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 12 : Vectors of Objects"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.1 page no :124\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.1 page no :124\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\nc = Card (0,3)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.2 page no : 126\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.2 page no : 126\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\nc = Card (1, 11)\nc.print_ ();",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Queen of Diamonds\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.3 page no :127\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.3 page no :127\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\nc1 = Card(1, 11);\nc2 =Card(1, 11);\nif (c1.equals(c2)):\n print \"Yup, that's the same card.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Yup, that's the same card.\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.4 page no :129\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.4 page no :129\n'''\n\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def isGreater(self,c2):\n if (self.suit > c2.suit):\n return True;\n if (selfsuit < c2.suit):\n return False;\n if (self.rank > c2.rank):\n return True;\n if (self.rank < c2.rank):\n return False;\n return False;\n\nc1 = Card(2, 11)\nc2 = Card(1, 11)\nif (c1.isGreater (c2)):\n c1.print_()\n print \"is greater than\" \n c2.print_();",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Queen of Hearts\nis greater than\nQueen of Diamonds\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.5 page no :130\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.5 page no :130\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n\ndef printDeck(deck):\n for i in range(len(deck)):\n deck[i].print_()\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nprintDeck(deck)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.6 page no : 131\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.6 page no : 131\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n \n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def find(self,deck):\n for i in range(len(deck)):\n if (self.equals(deck[i])):\n return i;\n return -1;\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nindex = deck[17].find (deck)\nprint \"I found the card at index = \" , index ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "I found the card at index = 17\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 12.7 page no : 133\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 12.7 page no : 133\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n \n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def find(self,deck):\n for i in range(len(deck)):\n if (self.equals(deck[i])):\n return i;\n return -1;\n \n def isGreater(self,c2):\n if (self.suit > c2.suit):\n return True;\n if (self.suit < c2.suit):\n return False;\n if (self.rank > c2.rank):\n return True;\n if (self.rank < c2.rank):\n return False;\n return False;\n \ndef findBisect(deck,card,low,high):\n print low , \", \" , high \n if (high < low):\n return -1;\n mid = (high + low) / 2\n if (card.equals(deck[mid])):\n return mid;\n if (deck[mid].isGreater (card)):\n return findBisect (deck, card,low, mid-1);\n else:\n return findBisect (deck,card, mid+1, high)\n\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nprint findBisect (deck, deck[23], 0, 51)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "0 , 51\n0 , 24\n13 , 24\n19 , 24\n22 , 24\n23\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch13.ipynb b/Beginning_C++_through_Game_Programming/ch13.ipynb
new file mode 100755
index 00000000..f9a283c6
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch13.ipynb
@@ -0,0 +1,121 @@
+{
+ "metadata": {
+ "name": "ch13"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 13 : Objects of Vectors"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 13.1 page no: 137\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 13.1 page no: 137\n'''\nclass Suit:\n CLUBS = 0\n DIAMOND = 1\n HEARTS = 2\n SPADES = 3\n\nclass Rank: \n ACE=1\n TWO = 2\n THREE = 3\n FOUR =4\n FIVE = 5\n SIX = 6\n SEVEN = 7\n EIGHT = 8\n NINE= 9\n TEN = 10\n JACK = 11 \n QUEEN = 12\n KING =13\n \nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\ndeck = []\n\nfor suit in range(Suit.SPADES):\n for rank in range(Rank.KING):\n a = Card(suit,rank)\n deck.append(a)\n \n\nfor i in deck:\n i.print_() ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 13.2 page no : 140\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 13.2 page no : 140\n'''\nclass Suit:\n CLUBS = 0\n DIAMOND = 1\n HEARTS = 2\n SPADES = 3\n\nclass Rank: \n ACE=1\n TWO = 2\n THREE = 3\n FOUR =4\n FIVE = 5\n SIX = 6\n SEVEN = 7\n EIGHT = 8\n NINE= 9\n TEN = 10\n JACK = 11 \n QUEEN = 12\n KING =13\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n \n for suit in range(Suit.SPADES):\n for rank in range(Rank.KING):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n\nd = Deck(52)\nd.print_()\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 13.3 page no : 142\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 13.3 page no : 142\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n\nd = Deck()\na = Card(1,11)\nprint a.find(d)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "24\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 13.4 page no :144\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 13.4 page no :144\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n return\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n \n def subdeck(self,low,high):\n sub = Deck(high-low+1)\n for i in range(len(sub.cards)):\n sub.cards.append(self.cards[low+i])\n return sub;\n\ndeck = Deck()\nhand1 = deck.subdeck (0, 4);\nhand2 = deck.subdeck (5, 9);\npack = deck.subdeck (10, 51);\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 13.5 page no : 146\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 13.5 page no : 146\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n return\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n \n def merge(self,d2):\n # create a new deck big enough for all the cards\n result = Deck (len(d1.cards)+ len(d2.cards));\n # use the index i to keep track of where we are in\n # the first deck, and the index j for the second deck\n i = 0;\n j = 0;\n # the index k traverses the result deck\n return result;",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch14.ipynb b/Beginning_C++_through_Game_Programming/ch14.ipynb
new file mode 100755
index 00000000..124b0855
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch14.ipynb
@@ -0,0 +1,130 @@
+{
+ "metadata": {
+ "name": "ch14"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 14 : Classes and invariants"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 14.1 page no :149\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 14.1 page no :149\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def getRank (self):\n return self.rank\n \n def getSuit (self):\n return self.suit\n \n def setRank(self,r):\n self.rank = r \n\n def setSuit (self, s):\n self.suit = s",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 14.2 page no :151\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 14.2 page no :151\ndefining class \n'''\n\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n pass\n else:\n self.real = r\n self.imag = i",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 14.3 page no : 152\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 14.3 page no : 152\n'''\nimport math\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n\n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def calculateCartesian (self):\n self.real = self.mag * math.cos(self.theta);\n self.imag = self.mag * math.sin (self.theta); \n self.cartesian = True;\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def printPolar(self):\n print self.mag , \" e^ \" , self.theta , \"i\"\n\n\nc1 = Complex(2.0, 3.0);\nc1.printCartesian();\nc1.printPolar();",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "2.0 + 3.0 i\n0 e^ 0 i\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 14.4 page no : 155\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 14.4 page no : 155\n'''\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n\n def add(self,b):\n real = self.getReal() + b.getReal();\n imag = self.getImag() + b.getImag();\n s = Complex(real, imag);\n return s\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\nc1 = Complex(2.0, 3.0);\nc2 = Complex(3.0, 4.0);\ns = c1.add (c2);\ns.printCartesian();",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "5.0 + 7.0 i\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 14.5 page no :156\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 14.5 page no :156\n'''\nimport math\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def calculateCartesian (self):\n self.real = self.mag * math.cos(self.theta);\n self.imag = self.mag * math.sin (self.theta); \n self.cartesian = True;\n\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def mult(self,b):\n mag = self.mag * b.mag\n theta = self.theta + b.theta\n product = Complex()\n product.setPolar (mag, theta);\n return product;\n\n def setPolar(self,m,t):\n self.mag = m\n self.theta = t;\n self.cartesian = False\n self.polar = True;\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 14.6 page no :159\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 14.6 page no :159\ndefining class Complex\n'''\n\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def mult(self,b):\n mag = self.mag * b.mag\n theta = a.theta + b.theta\n product = Complex()\n product.setPolar (mag, theta);\n return product;\n\n def setPolar(self,m,t):\n self.mag = m\n self.theta = t;\n self.cartesian = False\n self.polar = true;\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch15.ipynb b/Beginning_C++_through_Game_Programming/ch15.ipynb
new file mode 100755
index 00000000..cc4b221f
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch15.ipynb
@@ -0,0 +1,127 @@
+{
+ "metadata": {
+ "name": "ch15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 15 : File Input/Output and apmatrixes"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 15.1 page no : 162\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 15.1 page no : 162\n'''\ntry:\n fileName = \"a.txt\"\n f = open(fileName,\"r\")\nexcept:\n print \"Unable to open the file named \" , fileName;\n import sys\n sys.exit(0)\n\n# reading file line by line\n \nfor i in f.readlines():\n print i\n\nf.close() ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "SystemExit",
+ "evalue": "0",
+ "output_type": "pyerr",
+ "traceback": [
+ "An exception has occurred, use %tb to see the full traceback.\n",
+ "\u001b[1;31mSystemExit\u001b[0m\u001b[1;31m:\u001b[0m 0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Unable to open the file named a.txt\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": "To exit: use 'exit', 'quit', or Ctrl-D.\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 15.2 page no : 163\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 15.2 page no : 163\n'''\n\ntry:\n fileName = \"a.txt\"\n outputFile = \"b.txt\"\n f = open(fileName,\"r\")\n w = open(outputFile,\"w\")\nexcept:\n print \"Unable to open the file named \" , fileName;\n import sys\n sys.exit(0)\n\n# reading file line by line\n \nfor i in f.readlines():\n w.write(i)\n print i\n \nf.close()\nw.close() ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "SystemExit",
+ "evalue": "0",
+ "output_type": "pyerr",
+ "traceback": [
+ "An exception has occurred, use %tb to see the full traceback.\n",
+ "\u001b[1;31mSystemExit\u001b[0m\u001b[1;31m:\u001b[0m 0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Unable to open the file named a.txt\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": "To exit: use 'exit', 'quit', or Ctrl-D.\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 15.3 page no : 167\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 15.3 page no : 167\n'''\n\nclass Set:\n def __init__(self,n):\n self.elements = []\n self.numElements = 0\n\n def getNumElements(self):\n return self.numElements\n\n def getElement(self,i):\n if (i < self.numElements):\n return slef.elements[i];\n else:\n print \"Set index out of range.\" \n import sys\n sys.exit(0)\n\n def find(self,s):\n for i in range(self.numElements):\n if (self.elements[i] == s): \n return i;\n return -1;\n\n def add(self,s):\n # if the element is already in the set, return its index\n index = self.find(s);\n if (index != -1):\n return index;\n # if the apvector is full, double its size\n # add the new elements and return its index\n self.elements.append(s)\n self.numElements += 1\n return self.numElements - 1;\n\ncities= Set (2);\ncity1 = 'ahmedabad'\ncity2 = 'rajkot'\nindex1 = cities.add(city1);\nindex2 = cities.add(city2)\nprint index1, index2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "0 1\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch2.ipynb b/Beginning_C++_through_Game_Programming/ch2.ipynb
new file mode 100755
index 00000000..b12d669c
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch2.ipynb
@@ -0,0 +1,112 @@
+{
+ "metadata": {
+ "name": "ch2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 : Variables and types"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "Example 2.1 Page no : 11"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 2.1 page no :11\n'''\n\nprint \"Hello, world.\" \nprint \"How are you?\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Hello, world.\nHow are you?\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "Example 2.2 Page no : 11/12"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 2.2 page no : 11/12\n'''\n\nprint \"Goodbye, \";\nprint \"cruel world!\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Goodbye, \ncruel world!\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 2.3 page no : 14\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 2.3 page no : 14\n'''\nhour = 11;\nminute = 59;\ncolon = ':';\nprint \"The current time is \",\nprint hour,colon,minute",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "The current time is 11 : 59\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 2.4 page no : 16\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 2.4 page no : 16\n'''\n\nhour = 11;\nminute = 59;\nprint \"Number of minutes since midnight: \",\nprint hour*60 + minute \nprint \"Fraction of the hour that has passed: \",\nprint minute/60",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Number of minutes since midnight: 719\nFraction of the hour that has passed: 0\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch3.ipynb b/Beginning_C++_through_Game_Programming/ch3.ipynb
new file mode 100755
index 00000000..303271a9
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch3.ipynb
@@ -0,0 +1,133 @@
+{
+ "metadata": {
+ "name": "ch3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 3 : Function"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 3.1 page no :25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 3.1 page no :25\n'''\n\ndef newLine ():\n print ''\n\n\nprint \"First Line.\" \nnewLine ()\nprint \"Second Line.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First Line.\n\nSecond Line.\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 3.2 page no :25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 3.2 page no :25\n'''\ndef newLine ():\n print ''\n\nprint \"First Line.\" \nnewLine ()\nnewLine ()\nnewLine ()\nprint \"Second Line.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First Line.\n\n\n\nSecond Line.\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 3.3 page no :26"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 3.3 page no :26\n'''\n\n\ndef newLine ():\n print ''\n\n\ndef threeLine ():\n newLine (); \n newLine ();\n newLine ();\n \nprint \"First Line.\" \nthreeLine()\nprint \"Second Line.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First Line.\n\n\n\nSecond Line.\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 3.4 page no :28"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# -*- coding: UTF-8 -*-\n'''\nexample 3.4 page no :28\n'''\n\ndef printTwice (phil):\n print phil , phil\n\n\nprintTwice ('a');\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "a a\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 3.5 page no :28"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# -*- coding: UTF-8 -*-\n'''\nexample 3.5 page no :28\n'''\n\n\ndef printTwice (phil):\n print phil , phil\n\nargument = 'b' \nprintTwice (argument);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "b b\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch4.ipynb b/Beginning_C++_through_Game_Programming/ch4.ipynb
new file mode 100755
index 00000000..08fbd2a9
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch4.ipynb
@@ -0,0 +1,112 @@
+{
+ "metadata": {
+ "name": "ch4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 4 : Conditionals and recursion"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 4.1 page no :34"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 4.1 page no :34\n'''\n\ndef printParity (x):\n if (x%2 == 0):\n print \"x is even\" \n else:\n print \"x is odd\" \n\nprintParity (17)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "x is odd\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 4.2 page no :36"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 4.2 page no :36\n'''\nimport math\n\ndef printLogarithm (x):\n if (x <= 0.0):\n print \"Positive numbers only, please.\" \n return;\n result = math.log(x);\n print \"The log of x is \" , result;\n\nprintLogarithm(-1)\nprintLogarithm(5)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Positive numbers only, please.\nThe log of x is 1.60943791243\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 4.3 page no : 37"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 4.3 page no : 37\n'''\n\ndef countdown (n):\n if (n == 0):\n print \"Blastoff!\" \n else:\n print n\n countdown (n-1)\n\ncountdown(5)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "5\n4\n3\n2\n1\nBlastoff!\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 4.4\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 4.4\n'''\nimport math\ndef printLogarithm(x):\n if (x <= 0.0):\n print \"Positive numbers only, please.\" << endl;\n return;\n result = math.log(x)\n print \"The log of x is \" , result;\n\ndef countdown (n) :\n if (n == 0):\n print \"Blastoff!\"\n else:\n print n\n countdown (n-1);\n\n\ncountdown (3);\nprintLogarithm(10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3\n2\n1\nBlastoff!\nThe log of x is 2.30258509299\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch5.ipynb b/Beginning_C++_through_Game_Programming/ch5.ipynb
new file mode 100755
index 00000000..a55d763d
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch5.ipynb
@@ -0,0 +1,229 @@
+{
+ "metadata": {
+ "name": "ch5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 5 : Fruitful functions"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.1 page no :41\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.1 page no :41\n'''\nimport math\ndef area (radius):\n area = math.pi * radius * radius;\n return area;\n\nprint area(3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "28.2743338823\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.2 page no :42\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.2 page no :42\n'''\n\ndef absoluteValue (x):\n if (x < 0):\n return -x\n else:\n return x\n\nprint absoluteValue(-3) \nprint absoluteValue(3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3\n3\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.3 page no :44\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.3 page no :44\n'''\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n print \"dx is \" , dx\n print \"dy is \" , dy \n return 0.0\n\ndistance(10,10,20,20) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "dx is 10\ndy is 10\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": "0.0"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.4 page no :44\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.4 page no :44\n'''\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n print \"dsquared is \" , dsquared\n return 0.0;\n\ndistance(10,10,20,20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "dsquared is 200\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": "0.0"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.5 page no :45\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.5 page no :45\n'''\nimport math\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n return math.sqrt(dsquared)\n \nprint distance(10,10,20,20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "14.1421356237\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.6 page no :45\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.6 page no :45\n'''\n\nimport math\ndef area (radius):\n area = math.pi * radius * radius;\n return area;\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n return math.sqrt(dsquared)\n \ndef fred(xc, yc, xp,yp):\n radius = distance (xc, yc, xp, yp);\n result = area (radius);\n return result;\n\nprint fred(10,10,20,20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "628.318530718\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.7 page no :48\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.7 page no :48\n'''\ndef isSingleDigit(x):\n if (x >= 0 and x < 10):\n return True\n else:\n return False;\n\nprint isSingleDigit(11)\nprint isSingleDigit(4)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "False\nTrue\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.8 page no :51/53\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.8 page no :51/53\n'''\n\ndef factorial (n):\n if (n == 0):\n return 1;\n else:\n recurse = factorial (n-1)\n result = n * recurse\n return result;\n\nprint factorial(5)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "120\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 5.9 page no :53\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 5.9 page no :53\n'''\ndef fibonacci (n):\n if (n == 0 or n == 1):\n return 1\n else:\n return fibonacci (n-1) + fibonacci (n-2)\n\nprint fibonacci(5)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "8\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch6.ipynb b/Beginning_C++_through_Game_Programming/ch6.ipynb
new file mode 100755
index 00000000..3b13a110
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch6.ipynb
@@ -0,0 +1,265 @@
+{
+ "metadata": {
+ "name": "ch6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6 : Iteration"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.1 page no :56\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.1 page no :56\n'''\n\ndef countdown (n):\n while (n > 0):\n print n\n n = n-1\n print \"Blastoff!\"\n return 0\n \ncountdown(5) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "5\n4\n3\n2\n1\nBlastoff!\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": "0"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.2 page no :57\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.2 page no :57\n'''\n\ndef sequence (n):\n while (n != 1):\n print n\n if (n%2 == 0):\n n = n / 2\n else:\n n = n*3 + 1\n \nsequence(10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "10\n5\n16\n8\n4\n2\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.3 page no :58\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.3 page no :58\n'''\nimport math\nx = 1.0\nwhile (x < 10.0):\n print x , \"\\t\" , math.log(x)\n x = x + 1.0",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1.0 \t0.0\n2.0 \t0.69314718056\n3.0 \t1.09861228867\n4.0 \t1.38629436112\n5.0 \t1.60943791243\n6.0 \t1.79175946923\n7.0 \t1.94591014906\n8.0 \t2.07944154168\n9.0 \t2.19722457734\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.4 page no :59\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.4 page no :59\n'''\nimport math\nx = 1.0\nwhile (x < 10.0):\n print x , \"\\t\" , math.log(x) / math.log(2.0) \n x = x + 1.0\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1.0 \t0.0\n2.0 \t1.0\n3.0 \t1.58496250072\n4.0 \t2.0\n5.0 \t2.32192809489\n6.0 \t2.58496250072\n7.0 \t2.80735492206\n8.0 \t3.0\n9.0 \t3.16992500144\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.5 page no :59\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.5 page no :59\n'''\nimport math\nx = 1.0;\nwhile (x < 100.0):\n print x , \"\\t\" , math.log(x) / math.log(2.0)\n x = x * 2.0",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1.0 \t0.0\n2.0 \t1.0\n4.0 \t2.0\n8.0 \t3.0\n16.0 \t4.0\n32.0 \t5.0\n64.0 \t6.0\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.6 page no: 60\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.6 page no: 60\n'''\n\ni = 1;\nwhile (i <= 6):\n print 2*i ,\n i = i + 1;\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "2 4 6 8 10 12\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.7 page no:60\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.7 page no:60\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n \nprintMultiples(3) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3 6 9 12 15 18\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.8 page no:61\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.8 page no:61\n'''\n\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ni = 1;\nwhile (i <= 6):\n printMultiples (i);\n i = i + 1;",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n5 10 15 20 25 30 \n6 12 18 24 30 36 \n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.9 page no: 62\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.9 page no: 62\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ndef printMultTable ():\n i = 1;\n while (i <= 6):\n printMultiples (i)\n i = i + 1\n\nprintMultTable()",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n5 10 15 20 25 30 \n6 12 18 24 30 36 \n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.10 page no :63\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.10 page no :63\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ndef printMultTable (high):\n i = 1;\n while (i <= high):\n printMultiples (i);\n i = i + 1;\n \nprintMultTable(4) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 6.11 page no :64\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 6.11 page no :64\n'''\n\ndef printMultiples(n,high):\n i = 1;\n while (i <= high):\n print n*i ,\n i = i + 1;\n print ''\n\ndef printMultTable (high):\n i = 1; \n while (i <= high):\n printMultiples (i, high)\n i = i + 1;\n\nprintMultTable(5) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1 2 3 4 5 \n2 4 6 8 10 \n3 6 9 12 15 \n4 8 12 16 20 \n5 10 15 20 25 \n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch7.ipynb b/Beginning_C++_through_Game_Programming/ch7.ipynb
new file mode 100755
index 00000000..e0a37b49
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch7.ipynb
@@ -0,0 +1,175 @@
+{
+ "metadata": {
+ "name": "ch7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 7 : Strings and things"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 7.1 page no : 69\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 7.1 page no : 69\n'''\n\nfruit = \"banana\"\nindex = 0\nwhile(index < len(fruit)):\n letter = fruit[index]\n print letter\n index = index + 1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "b\na\nn\na\nn\na\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 7.2 page no :71\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 7.2 page no :71\n'''\n\ndef find(s,c,i):\n while (i<len(s)):\n if (s[i] == c): return i\n i = i + 1\n return -1;\n \nprint find(\"banana\",'b',0)\nprint find(\"banana\",'b',3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "0\n-1\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 7.3 page no : 71\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 7.3 page no : 71\n'''\n\nfruit = \"banana\"\nlength = len(fruit)\ncount = 0\nindex = 0\nwhile (index < length):\n if (fruit[index] == 'a'):\n count = count + 1\n index = index + 1\nprint count ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 7.4 page no : 72\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 7.4 page no : 72\n'''\n\nfruit = \"banana\";\nbakedGood = \" nut bread\";\ndessert = fruit + bakedGood;\nprint dessert",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "banana nut bread\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 7.5 page no :73\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 7.5 page no :73\n'''\n\nsuffix = \"ack\"\nletter = 'J'\nwhile (letter <= 'Q'):\n print letter + suffix \n c = ord(letter) + 1\n letter = chr(c)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Jack\nKack\nLack\nMack\nNack\nOack\nPack\nQack\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 7.6 page no :74\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 7.6 page no :74\n'''\nword = \"Zebra\"\n\nif (word < \"banana\"):\n print \"Your word, \" , word , \", comes before banana.\"\nelif (word > \"banana\"):\n print \"Your word, \" , word , \", comes after banana.\" \nelse:\n print \"Yes, we have no bananas!\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Your word, Zebra , comes before banana.\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "Example 7.7 page no : 75"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "a = 'a'\nprint a.upper()",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "A\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch8.ipynb b/Beginning_C++_through_Game_Programming/ch8.ipynb
new file mode 100755
index 00000000..75cf53be
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch8.ipynb
@@ -0,0 +1,239 @@
+{
+ "metadata": {
+ "name": "ch8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 8 : Structures"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.1 page no :77\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.1 page no :77\n'''\n\nclass Point:\n def __init__(self):\n self.x = 0.0\n self.y = 0.0\n\n\nb = Point()\nb.x = 3.0\nb.y = 4.0\n\nprint b.x , \", \" , b.y \ndistance = b.x * b.x + b.y * b.y\nprint \"Distance : \" , distance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3.0 , 4.0\nDistance : 25.0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.2 page no :79\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.2 page no :79\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\np1 = Point(3.0, 4.0)\np2 = p1\nprint p2.x , \", \" , p2.y ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "3.0 , 4.0\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.3 page no : 80\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.3 page no : 80\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n \np1 = Point(3.0, 4.0)\nprintPoint(p1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "( 3.0 , 4.0 )\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.4 page no : 80\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.4 page no : 80\n'''\n\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef distance(p1,p2):\n dx = p2.x - p1.x\n dy = p2.y - p1.y\n import math\n return math.sqrt(dx*dx + dy*dy)\n \np1 = Point(3.0, 4.0)\np2 = Point(4.0,5.0)\nprint distance(p1,p2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "1.41421356237\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.5 page no : 81\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.5 page no : 81\n'''\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef reflect(p):\n temp = p.x\n p.x = p.y\n p.y = temp\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n\nblank = Point(3.0, 4.0)\nprintPoint (blank)\nreflect (blank)\nprintPoint (blank)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "( 3.0 , 4.0 )\n( 4.0 , 3.0 )\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.6 page no : 84\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.6 page no : 84\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\nclass Rectangle:\n def __init__(self,p,x,y):\n self.corner = p\n self.width = x\n self.height = y\n\nc = Point(0.0, 0.0)\nb = Rectangle( c, 100.0, 200.0 )\nb.width += 50.0\nprint b.height ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "200.0\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.7 page no : 84\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.7 page no : 84\n'''\n\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\nclass Rectangle:\n def __init__(self,p,x,y):\n self.corner = p\n self.width = x\n self.height = y\n\ndef findCenter(box):\n x = box.corner.x + box.width/2\n y = box.corner.y + box.height/2\n result = Point(x, y)\n return result\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n\nbox = Rectangle( Point(0.0, 0.0), 100, 200)\ncenter = findCenter (box);\nprintPoint (center);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "( 50.0 , 100.0 )\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.8 page no : 84\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.8 page no : 84\n'''\n\ndef swap(x,y):\n temp = x[0]\n x[0] = y[0]\n y[0] = temp\n\ni = [7]\nj = [9]\nswap (i, j)\nprint i[0] , j[0]",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "9 7\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 8.9 page no : 85\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 8.9 page no : 85\n'''\n\n# prompt the user for input86\nprint \"Enter an integer: \",\n# get input\ntry:\n x = int(raw_input())\n print x \n# check and see if the input statement succeeded\nexcept:\n print \"That was not an integer.\" \n\n# print the value we got from the user\n\nprint \"What is your name? \" , \nname = raw_input()\nprint name",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter an integer: "
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "a\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " That was not an integer.\nWhat is your name? "
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "abc\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " abc\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/ch9.ipynb b/Beginning_C++_through_Game_Programming/ch9.ipynb
new file mode 100755
index 00000000..25f763ca
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/ch9.ipynb
@@ -0,0 +1,175 @@
+{
+ "metadata": {
+ "name": "ch9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "CHAPTER 9. : MORE STRUCTURES"
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.1 page no :90\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.1 page no :90\n'''\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\nt = Time( 11, 59, 3.14159 )\nprintTime(t)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "11 : 59 : 3.14159\nTime is 11 hour 59 minutes 3.14159\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.2 page no : 91\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.2 page no : 91\n'''\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\ndef after(time1,time2):\n if (time1.hour > time2.hour):\n return True\n if (time1.hour < time2.hour): \n return False;\n if (time1.minute > time2.minute):\n return True\n if (time1.minute < time2.minute): \n return False;\n if (time1.second > time2.second): \n return True\n return False;\n\nt1 = Time( 11, 59, 3.14159 )\nt2 = Time( 12, 42, 3.234 )\nprint after(t1,t2)\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "False\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.3 page no : 91\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.3 page no : 91\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n return Time(hour,minute,second)\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.4 page no : 92\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.4 page no : 92\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n if (second >= 60.0):\n second -= 60.0;\n minute += 1\n if (minute >= 60):\n minute -= 60;\n hour += 1;\n return Time(hour,minute,second)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.5 page no : 93\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.5 page no : 93\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef increment (time,secs):\n time.second += secs\n if (time.second >= 60.0):\n time.second -= 60.0;\n time.minute += 1;\n if (time.minute >= 60):\n time.minute -= 60;\n time.hour += 1;\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n if (second >= 60.0):\n second -= 60.0;\n minute += 1\n if (minute >= 60):\n minute -= 60;\n hour += 1;\n return Time(hour,minute,second)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.6 page no : 94\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.6 page no : 94\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef addTimeFill(t1,t2,s):\n s.hour = t1.hour + t2.hour;\n s.minute = t1.minute + t2.minute;\n s.second = t1.second + t2.second;\n if (s.second >= 60.0):\n s.second -= 60.0;\n s.minute += 1;\n if (s.minute >= 60):\n s.minute -= 60;\n s.hour += 1;\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = Time(0,0,0)\naddTimeFill (c, b,doneTime);\nprintTime(doneTime)\n\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "example 9.7 page no : 97\n"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "'''\nexample 9.7 page no : 97\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef convertToSeconds (t):\n minutes = t.hour * 60 + t.minute;\n seconds = minutes * 60 + t.second;\n return seconds;\n\ndef makeTime(secs):\n hour = int (secs / 3600.0);\n secs -= hour * 3600.0;\n minute = int (secs / 60.0);\n secs -= minute * 60;\n second = secs;\n return Time(hour,minute,second)\n\ndef addTime (t1,t2):\n seconds = convertToSeconds (t1) + convertToSeconds (t2);\n return makeTime(seconds)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n\n\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Beginning_C++_through_Game_Programming/screenshots/fileipop.png b/Beginning_C++_through_Game_Programming/screenshots/fileipop.png
new file mode 100755
index 00000000..1be931ba
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/screenshots/fileipop.png
Binary files differ
diff --git a/Beginning_C++_through_Game_Programming/screenshots/fruitful.png b/Beginning_C++_through_Game_Programming/screenshots/fruitful.png
new file mode 100755
index 00000000..f9d64af9
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/screenshots/fruitful.png
Binary files differ
diff --git a/Beginning_C++_through_Game_Programming/screenshots/structures.png b/Beginning_C++_through_Game_Programming/screenshots/structures.png
new file mode 100755
index 00000000..e200e925
--- /dev/null
+++ b/Beginning_C++_through_Game_Programming/screenshots/structures.png
Binary files differ
diff --git a/Beginning_C_By_Ivon_Horton/README.txt b/Beginning_C_By_Ivon_Horton/README.txt
index da9aaad9..da9aaad9 100644..100755
--- a/Beginning_C_By_Ivon_Horton/README.txt
+++ b/Beginning_C_By_Ivon_Horton/README.txt
diff --git a/Beginning_C_By_Ivon_Horton/chapter1.ipynb b/Beginning_C_By_Ivon_Horton/chapter1.ipynb
index a59448aa..a59448aa 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter1.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter1.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter10.ipynb b/Beginning_C_By_Ivon_Horton/chapter10.ipynb
index 89cc83ed..89cc83ed 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter10.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter10.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter11.ipynb b/Beginning_C_By_Ivon_Horton/chapter11.ipynb
index 8bed3984..8bed3984 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter11.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter11.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter12.ipynb b/Beginning_C_By_Ivon_Horton/chapter12.ipynb
index b80c0151..b80c0151 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter12.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter12.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter13.ipynb b/Beginning_C_By_Ivon_Horton/chapter13.ipynb
index 6169215b..6169215b 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter13.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter13.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter14.ipynb b/Beginning_C_By_Ivon_Horton/chapter14.ipynb
index c351c6f1..c351c6f1 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter14.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter14.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter2.ipynb b/Beginning_C_By_Ivon_Horton/chapter2.ipynb
index c8739188..c8739188 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter2.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter2.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter3.ipynb b/Beginning_C_By_Ivon_Horton/chapter3.ipynb
index 74bd1aaf..74bd1aaf 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter3.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter3.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter4.ipynb b/Beginning_C_By_Ivon_Horton/chapter4.ipynb
index 72f009be..72f009be 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter4.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter4.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter5.ipynb b/Beginning_C_By_Ivon_Horton/chapter5.ipynb
index 8e195f37..8e195f37 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter5.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter5.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter6.ipynb b/Beginning_C_By_Ivon_Horton/chapter6.ipynb
index c05d45c7..c05d45c7 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter6.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter6.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter7.ipynb b/Beginning_C_By_Ivon_Horton/chapter7.ipynb
index e46960ce..e46960ce 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter7.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter7.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter8.ipynb b/Beginning_C_By_Ivon_Horton/chapter8.ipynb
index 54da74de..54da74de 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter8.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter8.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/chapter9.ipynb b/Beginning_C_By_Ivon_Horton/chapter9.ipynb
index 6b5e2864..6b5e2864 100644..100755
--- a/Beginning_C_By_Ivon_Horton/chapter9.ipynb
+++ b/Beginning_C_By_Ivon_Horton/chapter9.ipynb
diff --git a/Beginning_C_By_Ivon_Horton/screenshots/vaibbhav_vajani-3.png b/Beginning_C_By_Ivon_Horton/screenshots/vaibbhav_vajani-3.png
index 159a6249..159a6249 100644..100755
--- a/Beginning_C_By_Ivon_Horton/screenshots/vaibbhav_vajani-3.png
+++ b/Beginning_C_By_Ivon_Horton/screenshots/vaibbhav_vajani-3.png
Binary files differ
diff --git a/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-1.png b/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-1.png
index feae82e5..feae82e5 100644..100755
--- a/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-1.png
+++ b/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-1.png
Binary files differ
diff --git a/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-2.png b/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-2.png
index 47969341..47969341 100644..100755
--- a/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-2.png
+++ b/Beginning_C_By_Ivon_Horton/screenshots/vaibhav_vajani-2.png
Binary files differ
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/README.txt b/C++_Demystified:_A_Self-Teaching_Guide/README.txt
index c9358953..c9358953 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/README.txt
+++ b/C++_Demystified:_A_Self-Teaching_Guide/README.txt
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter1.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter1.ipynb
index 48ad3225..48ad3225 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter1.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter1.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter10.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter10.ipynb
index 7fcd3612..7fcd3612 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter10.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter10.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter11.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter11.ipynb
index 28bea5a9..28bea5a9 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter11.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter11.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter12.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter12.ipynb
index aad6446b..aad6446b 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter12.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter12.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter13.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter13.ipynb
index a7e400b9..a7e400b9 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter13.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter13.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter14.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter14.ipynb
index ff10cf77..ff10cf77 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter14.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter14.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter2.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter2.ipynb
index a10e4f68..a10e4f68 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter2.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter2.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter3.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter3.ipynb
index ea8d38c3..ea8d38c3 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter3.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter3.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter4.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter4.ipynb
index 2fed811a..2fed811a 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter4.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter4.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter5.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter5.ipynb
index 7973421f..7973421f 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter5.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter5.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter6.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter6.ipynb
index bb24153c..bb24153c 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter6.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter6.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter7.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter7.ipynb
index 0272be09..0272be09 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter7.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter7.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter8.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter8.ipynb
index 24601877..24601877 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter8.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter8.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/chapter9.ipynb b/C++_Demystified:_A_Self-Teaching_Guide/chapter9.ipynb
index 78228f18..78228f18 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/chapter9.ipynb
+++ b/C++_Demystified:_A_Self-Teaching_Guide/chapter9.ipynb
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-1.png b/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-1.png
index 683964bf..683964bf 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-1.png
+++ b/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-1.png
Binary files differ
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-2.png b/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-2.png
index 58c58b09..58c58b09 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-2.png
+++ b/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-2.png
Binary files differ
diff --git a/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-3.png b/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-3.png
index a8ecc8f5..a8ecc8f5 100644..100755
--- a/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-3.png
+++ b/C++_Demystified:_A_Self-Teaching_Guide/screenshots/vaibhav-1-3.png
Binary files differ
diff --git a/C++_from_the_Ground/Chapter_10(1).ipynb b/C++_from_the_Ground/Chapter_10(1).ipynb
index b19c3a4c..b19c3a4c 100644..100755
--- a/C++_from_the_Ground/Chapter_10(1).ipynb
+++ b/C++_from_the_Ground/Chapter_10(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_11(1).ipynb b/C++_from_the_Ground/Chapter_11(1).ipynb
index fdd70bcf..fdd70bcf 100644..100755
--- a/C++_from_the_Ground/Chapter_11(1).ipynb
+++ b/C++_from_the_Ground/Chapter_11(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_12(1).ipynb b/C++_from_the_Ground/Chapter_12(1).ipynb
index a29c9b4d..a29c9b4d 100644..100755
--- a/C++_from_the_Ground/Chapter_12(1).ipynb
+++ b/C++_from_the_Ground/Chapter_12(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_13(1).ipynb b/C++_from_the_Ground/Chapter_13(1).ipynb
index 6d12a5a7..6d12a5a7 100644..100755
--- a/C++_from_the_Ground/Chapter_13(1).ipynb
+++ b/C++_from_the_Ground/Chapter_13(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_14(1).ipynb b/C++_from_the_Ground/Chapter_14(1).ipynb
index 2f8447ba..2f8447ba 100644..100755
--- a/C++_from_the_Ground/Chapter_14(1).ipynb
+++ b/C++_from_the_Ground/Chapter_14(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_15(1).ipynb b/C++_from_the_Ground/Chapter_15(1).ipynb
index 211b1c7d..211b1c7d 100644..100755
--- a/C++_from_the_Ground/Chapter_15(1).ipynb
+++ b/C++_from_the_Ground/Chapter_15(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_16(1).ipynb b/C++_from_the_Ground/Chapter_16(1).ipynb
index 98e3dc8a..98e3dc8a 100644..100755
--- a/C++_from_the_Ground/Chapter_16(1).ipynb
+++ b/C++_from_the_Ground/Chapter_16(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_17(1).ipynb b/C++_from_the_Ground/Chapter_17(1).ipynb
index c50f48aa..c50f48aa 100644..100755
--- a/C++_from_the_Ground/Chapter_17(1).ipynb
+++ b/C++_from_the_Ground/Chapter_17(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_18(1).ipynb b/C++_from_the_Ground/Chapter_18(1).ipynb
index df4cabc2..df4cabc2 100644..100755
--- a/C++_from_the_Ground/Chapter_18(1).ipynb
+++ b/C++_from_the_Ground/Chapter_18(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_19(1).ipynb b/C++_from_the_Ground/Chapter_19(1).ipynb
index 7f04b7ea..7f04b7ea 100644..100755
--- a/C++_from_the_Ground/Chapter_19(1).ipynb
+++ b/C++_from_the_Ground/Chapter_19(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_2(1).ipynb b/C++_from_the_Ground/Chapter_2(1).ipynb
index b3976867..b3976867 100644..100755
--- a/C++_from_the_Ground/Chapter_2(1).ipynb
+++ b/C++_from_the_Ground/Chapter_2(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_20(2).ipynb b/C++_from_the_Ground/Chapter_20(2).ipynb
index 8771c6cd..8771c6cd 100644..100755
--- a/C++_from_the_Ground/Chapter_20(2).ipynb
+++ b/C++_from_the_Ground/Chapter_20(2).ipynb
diff --git a/C++_from_the_Ground/Chapter_21(1).ipynb b/C++_from_the_Ground/Chapter_21(1).ipynb
index 76345922..76345922 100644..100755
--- a/C++_from_the_Ground/Chapter_21(1).ipynb
+++ b/C++_from_the_Ground/Chapter_21(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_22(1).ipynb b/C++_from_the_Ground/Chapter_22(1).ipynb
index 39b8cb88..39b8cb88 100644..100755
--- a/C++_from_the_Ground/Chapter_22(1).ipynb
+++ b/C++_from_the_Ground/Chapter_22(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_3(1).ipynb b/C++_from_the_Ground/Chapter_3(1).ipynb
index 9d0cf326..9d0cf326 100644..100755
--- a/C++_from_the_Ground/Chapter_3(1).ipynb
+++ b/C++_from_the_Ground/Chapter_3(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_4(1).ipynb b/C++_from_the_Ground/Chapter_4(1).ipynb
index ca8e76db..ca8e76db 100644..100755
--- a/C++_from_the_Ground/Chapter_4(1).ipynb
+++ b/C++_from_the_Ground/Chapter_4(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_5(1).ipynb b/C++_from_the_Ground/Chapter_5(1).ipynb
index 13085f5e..13085f5e 100644..100755
--- a/C++_from_the_Ground/Chapter_5(1).ipynb
+++ b/C++_from_the_Ground/Chapter_5(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_6(1).ipynb b/C++_from_the_Ground/Chapter_6(1).ipynb
index 5010922a..5010922a 100644..100755
--- a/C++_from_the_Ground/Chapter_6(1).ipynb
+++ b/C++_from_the_Ground/Chapter_6(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_7(1).ipynb b/C++_from_the_Ground/Chapter_7(1).ipynb
index 027b30f5..027b30f5 100644..100755
--- a/C++_from_the_Ground/Chapter_7(1).ipynb
+++ b/C++_from_the_Ground/Chapter_7(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_8(1).ipynb b/C++_from_the_Ground/Chapter_8(1).ipynb
index 4684861e..4684861e 100644..100755
--- a/C++_from_the_Ground/Chapter_8(1).ipynb
+++ b/C++_from_the_Ground/Chapter_8(1).ipynb
diff --git a/C++_from_the_Ground/Chapter_9(1).ipynb b/C++_from_the_Ground/Chapter_9(1).ipynb
index 0f30e9a8..0f30e9a8 100644..100755
--- a/C++_from_the_Ground/Chapter_9(1).ipynb
+++ b/C++_from_the_Ground/Chapter_9(1).ipynb
diff --git a/C++_from_the_Ground/README.txt b/C++_from_the_Ground/README.txt
index 6e0fd27d..6e0fd27d 100644..100755
--- a/C++_from_the_Ground/README.txt
+++ b/C++_from_the_Ground/README.txt
diff --git a/C++_from_the_Ground/screenshots/c++preproce.png b/C++_from_the_Ground/screenshots/c++preproce.png
index 656d9ed9..656d9ed9 100644..100755
--- a/C++_from_the_Ground/screenshots/c++preproce.png
+++ b/C++_from_the_Ground/screenshots/c++preproce.png
Binary files differ
diff --git a/C++_from_the_Ground/screenshots/datatypes.png b/C++_from_the_Ground/screenshots/datatypes.png
index 08d8ff2d..08d8ff2d 100644..100755
--- a/C++_from_the_Ground/screenshots/datatypes.png
+++ b/C++_from_the_Ground/screenshots/datatypes.png
Binary files differ
diff --git a/C++_from_the_Ground/screenshots/inheritence.png b/C++_from_the_Ground/screenshots/inheritence.png
index 49b24c1d..49b24c1d 100644..100755
--- a/C++_from_the_Ground/screenshots/inheritence.png
+++ b/C++_from_the_Ground/screenshots/inheritence.png
Binary files differ
diff --git a/Chemical_Engineering_Thermodynamics/README.txt b/Chemical_Engineering_Thermodynamics/README.txt
index d33ed50c..d33ed50c 100644..100755
--- a/Chemical_Engineering_Thermodynamics/README.txt
+++ b/Chemical_Engineering_Thermodynamics/README.txt
diff --git a/Chemical_Engineering_Thermodynamics/ch10_1.ipynb b/Chemical_Engineering_Thermodynamics/ch10_1.ipynb
index 0a1b388b..0a1b388b 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch10_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch10_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch11_1.ipynb b/Chemical_Engineering_Thermodynamics/ch11_1.ipynb
index 79f48f9c..79f48f9c 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch11_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch11_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch12_1.ipynb b/Chemical_Engineering_Thermodynamics/ch12_1.ipynb
index 0ee70a67..0ee70a67 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch12_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch12_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch13_1.ipynb b/Chemical_Engineering_Thermodynamics/ch13_1.ipynb
index 3cee342e..3cee342e 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch13_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch13_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch14_1.ipynb b/Chemical_Engineering_Thermodynamics/ch14_1.ipynb
index be081f3c..be081f3c 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch14_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch14_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch15_1.ipynb b/Chemical_Engineering_Thermodynamics/ch15_1.ipynb
index fcfb0cd5..fcfb0cd5 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch15_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch15_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch16_1.ipynb b/Chemical_Engineering_Thermodynamics/ch16_1.ipynb
index 69003cd3..69003cd3 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch16_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch16_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch17_1.ipynb b/Chemical_Engineering_Thermodynamics/ch17_1.ipynb
index 004b3bab..004b3bab 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch17_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch17_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch18_1.ipynb b/Chemical_Engineering_Thermodynamics/ch18_1.ipynb
index 46865b0c..46865b0c 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch18_1.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch18_1.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch1_2.ipynb b/Chemical_Engineering_Thermodynamics/ch1_2.ipynb
index b7e6716d..b7e6716d 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch1_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch1_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch2_2.ipynb b/Chemical_Engineering_Thermodynamics/ch2_2.ipynb
index b3f8bd13..b3f8bd13 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch2_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch2_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch3_2.ipynb b/Chemical_Engineering_Thermodynamics/ch3_2.ipynb
index 1dbe2b34..1dbe2b34 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch3_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch3_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch4_2.ipynb b/Chemical_Engineering_Thermodynamics/ch4_2.ipynb
index 52c2044d..52c2044d 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch4_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch4_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch5_2.ipynb b/Chemical_Engineering_Thermodynamics/ch5_2.ipynb
index 82489a66..82489a66 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch5_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch5_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch6_2.ipynb b/Chemical_Engineering_Thermodynamics/ch6_2.ipynb
index 71808e15..71808e15 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch6_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch6_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch7_2.ipynb b/Chemical_Engineering_Thermodynamics/ch7_2.ipynb
index dae2b7f0..dae2b7f0 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch7_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch7_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/ch8_2.ipynb b/Chemical_Engineering_Thermodynamics/ch8_2.ipynb
index 6b83d68c..6b83d68c 100644..100755
--- a/Chemical_Engineering_Thermodynamics/ch8_2.ipynb
+++ b/Chemical_Engineering_Thermodynamics/ch8_2.ipynb
diff --git a/Chemical_Engineering_Thermodynamics/screenshots/1.png b/Chemical_Engineering_Thermodynamics/screenshots/1.png
index 2ec2e814..2ec2e814 100644..100755
--- a/Chemical_Engineering_Thermodynamics/screenshots/1.png
+++ b/Chemical_Engineering_Thermodynamics/screenshots/1.png
Binary files differ
diff --git a/Chemical_Engineering_Thermodynamics/screenshots/2.png b/Chemical_Engineering_Thermodynamics/screenshots/2.png
index 91cda60b..91cda60b 100644..100755
--- a/Chemical_Engineering_Thermodynamics/screenshots/2.png
+++ b/Chemical_Engineering_Thermodynamics/screenshots/2.png
Binary files differ
diff --git a/Chemical_Engineering_Thermodynamics/screenshots/3.png b/Chemical_Engineering_Thermodynamics/screenshots/3.png
index 61ce8534..61ce8534 100644..100755
--- a/Chemical_Engineering_Thermodynamics/screenshots/3.png
+++ b/Chemical_Engineering_Thermodynamics/screenshots/3.png
Binary files differ
diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic111.png b/Chemical_Engineering_Thermodynamics/screenshots/pic111.png
index 0564964c..0564964c 100644..100755
--- a/Chemical_Engineering_Thermodynamics/screenshots/pic111.png
+++ b/Chemical_Engineering_Thermodynamics/screenshots/pic111.png
Binary files differ
diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic222.png b/Chemical_Engineering_Thermodynamics/screenshots/pic222.png
index 2442734b..2442734b 100644..100755
--- a/Chemical_Engineering_Thermodynamics/screenshots/pic222.png
+++ b/Chemical_Engineering_Thermodynamics/screenshots/pic222.png
Binary files differ
diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic333.png b/Chemical_Engineering_Thermodynamics/screenshots/pic333.png
index 2fcec895..2fcec895 100644..100755
--- a/Chemical_Engineering_Thermodynamics/screenshots/pic333.png
+++ b/Chemical_Engineering_Thermodynamics/screenshots/pic333.png
Binary files differ
diff --git a/Concepts_Of_Modern_Physics/Chapter_1.ipynb b/Concepts_Of_Modern_Physics/Chapter_1.ipynb
new file mode 100755
index 00000000..f4a61f1b
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_1.ipynb
@@ -0,0 +1,356 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Relativity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1,Page no:9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Varible declaration\n",
+ "t0= 3600 # time interval on Earth, seconds\n",
+ "t= 3601.0 #time interval for spacecraft as measured from Earth, seconds\n",
+ "\n",
+ "#Calculation\n",
+ "c= 2.998 *(10**8) #speed of light, m/s\n",
+ "v=c*math.sqrt((1-((t0/t)**2))) #relative velocity of spacecraft, m/s\n",
+ "\n",
+ "#Result\n",
+ "print\"The speed of the Spacecraft relative to Earth is:%.2g \"%v,\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the Spacecraft relative to Earth is:7.1e+06 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2,Page no:13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Varible declaration\t\n",
+ "fg= 5.6*(10**14) #frequency of green color, Hz\n",
+ "fr= 4.8*(10**14) #frequency of red color, Hz\n",
+ "c= 3.0*(10**8) #velocity of light, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "v= c*((fg**2 - fr**2)/(fg**2 + fr**2)) #longitudinal speed of observer, m/s\n",
+ "v= v*3.6 #convert to km/h\n",
+ "R= 1.0 #rate at which fine is to be imposed per km/h, $\n",
+ "l= 80.0 #speed limit upto which no fine is to be imposed, km/h\n",
+ "fine= v-l # fine to be imposed, $\n",
+ "\n",
+ "#Result\n",
+ "print\"The fine imposed is:\",fine,\"$\\n\"\n",
+ "\n",
+ "print\"NOTE:Approx value of v is taken in book as 1.65*10^8,which is very less precise.\\nTherefore,chnge in final answer\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fine imposed is: 165176390.588 $\n",
+ "\n",
+ "NOTE:Approx value of v is taken in book as 1.65*10^8,which is very less precise.\n",
+ "Therefore,chnge in final answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3,Page no:14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Varible declaration\n",
+ "v= 6.12*(10**7) #receding velocity with respect to Earth, m/s\n",
+ "c= 3.0*(10**8) #velocity of light, m/s\n",
+ "L0= 500.0 #initial wavelength of spectral line, nm\n",
+ "\n",
+ "#Calculation\n",
+ "L= L0*math.sqrt(((1+(v/c))/(1-(v/c)))) #final wavelength of spectral light, nm\n",
+ "Ls= L-L0 #shift in wavelength, nm\n",
+ "\n",
+ "#Varible declaration\n",
+ "print\"Shift in Green spectral line is: \",round(Ls),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Shift in Green spectral line is: 115.0 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4,Page no:19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Varible declaration\n",
+ "StartingAge= 20 #starting age for both Dick and Jane\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "v= 0.8*c #rate of separation of Dick and Jane, m/s\n",
+ "t0= 1 #interval for emission of signals, yr\n",
+ "\n",
+ "#Calculation\n",
+ "t1= t0*((1+v/c)/(1-v/c)) #interval for reception of signals on outward journey, yr\n",
+ "t1= t0*(math.sqrt((1+v/c)/(1-v/c))) #interval for reception of signals on outward journey, yr\n",
+ "t2= t0*(math.sqrt((1-v/c)/(1+v/c))) #interval for reception of signals on return trip, yr\n",
+ "#Dick's frame of reference\n",
+ "Tout1= 15 #duration of outward trip, yr\n",
+ "Tin1= 15 #duration of return trip, yr\n",
+ "JaneAge= StartingAge+(Tout1/t1)+(Tin1/t2) #Jane's age according to Dick\n",
+ "#Jane's frame of reference\n",
+ "Tout2= 25 #duration of outward trip, yr\n",
+ "d= 20 #delay in transmission of signal to Jane, caused by distance of the star, yr\n",
+ "Tin2= 5 #duration of return trip\n",
+ "DickAge= StartingAge+((Tout2+d)/t1)+(Tin2/t2) #Dick's age according to JAne\n",
+ "\n",
+ "#Result\n",
+ "print\"According to Dick, age of Jane is:\",JaneAge,\"years\"\n",
+ "print\"According to Jane, age of Dick is:\",DickAge,\"years\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "According to Dick, age of Jane is: 70.0 years\n",
+ "According to Jane, age of Dick is: 50.0 years\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6,Page no:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Varible declaration\n",
+ "mf= 1 #mass of each entity, kg\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "v= 0.6*c #velocity of fragments relative to original body, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "E0= 2*((mf*(c**2))/math.sqrt(1-((v/c)**2))) #Total energy of fragments\n",
+ "m= E0/(c**2) #mass of original body, kg\n",
+ "\n",
+ "#Result\n",
+ "print\"The total mass of the stationary body is: \",m,\"kg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total mass of the stationary body is: 2.5 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7,Page no:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Varible declaration\n",
+ "r=1.4 # Rate of arrival of Solar Energy at erath, kW per square meter\n",
+ "R=1.5*(10**11) #Radius of Earth, m\n",
+ "\n",
+ "#Calculation\n",
+ "P=r*(4*math.pi*(R**2)) #Total power recieved by Earth, kW\n",
+ "P= P*(10**3) #W\n",
+ "C= 3*(10**8) #Velocity of light, m/s\n",
+ "E=P #Energy lost by Sun, J\n",
+ "m= E/(C**2) #Mass of Sun lost per second as energy, kg\n",
+ "\n",
+ "#Result\n",
+ "print\"Mass lost by sun per second, is:%.2g\"%m,\"kg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass lost by sun per second, is:4.4e+09 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8,Page no:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Varible declaration\n",
+ "c= 3*(10**8) #Velocity of light, m/s\n",
+ "me= 0.511/(c**2) #mass of electron, MeV\n",
+ "mp=0 #mass of proton, MeV\n",
+ "p= 2.000/c #momenta for both particles, MeV\n",
+ " \n",
+ "#Calculation \n",
+ "##Using Eq. 1.24 and 1.25, Page 31 \n",
+ "Ee=math.sqrt(((me**2)*(c**4))+((p**2)*(c**2))) #Total energy of electron, MeV\n",
+ "Ep= p*c #Total energy of proton, MeV\n",
+ "\n",
+ "#Result\n",
+ "print\"Total energy of Electron is: \",round(Ee,3),\"MeV\"\n",
+ "print\"Total energy of Photon is: \",Ep,\"MeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total energy of Electron is: 2.064 MeV\n",
+ "Total energy of Photon is: 2.0 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11,Page no:44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Varible declaration \n",
+ "c=3*(10**8) #velocity of light, m/s\n",
+ "VaE= 0.90*c #velocity of spacecraft alpha w.r.t Earth, m/s\n",
+ "VbA= 0.50*c #velocity of spacecraft beta w.r.t. Alpha, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "VbE= (VaE+VbA)/(1+((VaE*VbA)/(c**2))) #velocity of beta w.r.t Earth, m/s\n",
+ "VbE=VbE/c #Converting to percent of c\n",
+ "\n",
+ "#Result\n",
+ "print\"The required velocity of spacecraft Beta w.r.t. Earth is:\",round(VbE,2),\"c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required velocity of spacecraft Beta w.r.t. Earth is: 0.97 c\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_10.ipynb b/Concepts_Of_Modern_Physics/Chapter_10.ipynb
new file mode 100755
index 00000000..a9c68145
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_10.ipynb
@@ -0,0 +1,152 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10:The Solid state"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1,Page no:342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "import math\n",
+ "Ro= 0.281 #equilibrium distance between ions, nm\n",
+ "alpha= 1.748 #Madelung constant\n",
+ "n= 9 #exponent, from observed compressibilities of NaCl\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "Po= 8.85*(10**(-12)) #Permittivity of free space, F/m\n",
+ "\n",
+ "#Calculation\n",
+ "K=1.0/(4*(math.pi)*Po) #constant, N.m**2/C**2\n",
+ "Uo= -(K*alpha*(e**2)*(1.0-(1.0/n)))/(Ro*(10**(-9))) #Potential energy per ion pair, J\n",
+ "Uo= Uo/e #converting to eV\n",
+ "E1= 5.14 #Ionisation energy for Na, eV\n",
+ "E2= -3.61 #electron affinity of Cl, eV\n",
+ "E= E1+E2 #Electron transfer energy, eV\n",
+ "Ecohesive = (Uo +E) #per electron pair, eV\n",
+ "Ecohesive= Ecohesive/2.0 #for each ion, eV\n",
+ "\n",
+ "#Result\n",
+ "print\"The cohesive energy in NaCl is: \",round(Ecohesive,2),\"eV\"\n",
+ "print\"\\nWhich is not far from experimental value of -3.28 eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cohesive energy in NaCl is: -3.21 eV\n",
+ "\n",
+ "Which is not far from experimental value of -3.28 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.2,Page no:350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration \n",
+ "A= 1.0 #cross-sectional area of wire, mm**2\n",
+ "I= 1.0 #current in wire, A\n",
+ "n= 8.5*(10**28) # electrons/m**3\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "\n",
+ "#Calculation\n",
+ "Vdrift= I/(n*(A*(10**(-6)))*e) #m/s\n",
+ "\n",
+ "#Result\n",
+ "print\"The drift velocity of electrons in the copper wire is:%.2g\"%Vdrift,\"m/s\"\n",
+ "print\"\\nNOTE:Calculation mistake in book.Wrongly written as 7.4*10^-4\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The drift velocity of electrons in the copper wire is:7.4e-05 m/s\n",
+ "\n",
+ "NOTE:Calculation mistake in book.Wrongly written as 7.4*10^-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.3,Page no:353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "n= 8.48*(10**28) #free electron density, m**(-3)\n",
+ "Vfermi= 1.57*(10**6) #Fermi Velocity, m/s\n",
+ "rho= 1.72*(10**(-8)) #resistivity, ohm\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "Me= 9.1*(10**(-31)) #mass of electron, kg\n",
+ "\n",
+ "#Calculation\n",
+ "lamda= Me*Vfermi/(n*(e**2)*rho) #m\n",
+ "lamda= lamda*(10**9) #converting to nm\n",
+ "\n",
+ "#Result\n",
+ "print\"The mean free path is:\",round(lamda,1),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean free path is: 38.3 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_11.ipynb b/Concepts_Of_Modern_Physics/Chapter_11.ipynb
new file mode 100755
index 00000000..c03fdd42
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_11.ipynb
@@ -0,0 +1,314 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11:Nuclear Structure"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.1,Page no:393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "u= 1.66*(10**(-27)) #atomic mass unit, kg\n",
+ "Mc= 12*u # atomic mass of Carbon-12, kg\n",
+ "R= 2.7 #radius of nucleus, fm\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "R=R*(10**(-15)) #converting to m\n",
+ "density= Mc/((4.0/3.0)*(math.pi)*(R**3)) # kg/m**3\n",
+ "\n",
+ "#Calculation\n",
+ "print\"Density of Carbon 12 nucleus is:%.2g\"%density,\"kg/m**3\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of Carbon 12 nucleus is:2.4e+17 kg/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.2,Page no:393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "r= 2.4 #distance between centre of the protons, fm\n",
+ "r= r*(10**(-15)) #converting to m\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "Po= 8.85*(10**(-12)) #Permittivity of free space, F/m\n",
+ "\n",
+ "#Calculation\n",
+ "K=1/(4*(math.pi)*Po) #constant, N.m**2/C**2\n",
+ "F= K*(e**2)/(r**2) #N\n",
+ "\n",
+ "#Result\n",
+ "print\"The repulsive force is: \",round(F),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The repulsive force is: 40.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.3,Page no:395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "B= 1.0 #strength of magnetic field, T\n",
+ "Mneutron= 3.152*(10**(-8)) #Magnetic moment for neutron, eV/T\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a)\n",
+ "Mproton= 2.793*Mneutron #Magnetic moment for proton, eV/T\n",
+ "dE= 2*Mproton*B #eV\n",
+ "#Part (b)\n",
+ "h= 4.13*(10**(-15)) #Planck's constant, eV.s\n",
+ "Flarmor= dE/h #Hz\n",
+ "Flarmor= Flarmor/(10**6) #converting to MHz\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The energy difference is:%.4g\"%dE,\"eV\"\n",
+ "print\"(b).The Larmor frequency for a proton in the field is:\",round(Flarmor,1),\"MHz(APPROX)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The energy difference is:1.761e-07 eV\n",
+ "(b).The Larmor frequency for a proton in the field is: 42.6 MHz(APPROX)\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.4,Page no:401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Ebinding= 160.647 #binding nergy, MeV\n",
+ "Mh= 1.007825 #Mass of H1 atom, u\n",
+ "Mn= 1.008665 #Mass of neutron, u\n",
+ "Z=10 #number of protons\n",
+ "N=10 #number of neutrons\n",
+ "\n",
+ "#Calculation\n",
+ "Mneon= ((Z*Mh)+(N*Mn))-(Ebinding/931.49) #using Eqn 11.7\n",
+ "\n",
+ "#Result\n",
+ "print\"The atomic mass of Neon 10 isotope is: \",round(Mneon,3),\"u\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The atomic mass of Neon 10 isotope is: 19.992 u\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.5,Page no:402"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "\n",
+ "#Part(a)\n",
+ "Ca_42=41.958622 #[u] Mass of 42Ca20 \n",
+ "\n",
+ "#from table\n",
+ "M_neutron=1.008665 #[u] Mass of a free neutron\n",
+ "Ca_41=40.962278 #[u] Mass of 41Ca20 after removal of 1 neutron\n",
+ "#Part(b):\n",
+ "#from table\n",
+ "M_proton=1.007276466812 #[u] Mass of a free proton\n",
+ "K_19=40.96237 #[u] Mass of Potasium Isotope 41K19\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a):\n",
+ "n_total=Ca_41+M_neutron\n",
+ "p_total=K_19+M_proton\n",
+ "neutron_BE=931.49*(n_total-Ca_42)#Binding energy in MeV\n",
+ "proton_BE=931.49*(p_total-Ca_42)\n",
+ "print \"(a).Binding energy of missing neutron is: \",round(neutron_BE,2),\"MeV\"\n",
+ "print\"(b).Binding energy for missing proton=\",round(proton_BE,2),\"MeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).Binding energy of missing neutron is: 11.48 MeV\n",
+ "(b).Binding energy for missing proton= 10.27 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.6,Page no:407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Z= 30.0 #proton number\n",
+ "N=34.0 #Neutron number\n",
+ "\n",
+ "#Calculation\n",
+ "#Using Eqn 11.7\n",
+ "Mh= 1.007825 #Mass of H1 atom, u\n",
+ "Mn= 1.008665 #Mass of neutron, u\n",
+ "Mzinc= 63.929 #atomic mass of zinc, u\n",
+ "Ebinding= ((Z*Mh)+(N*Mn)-Mzinc)*931.49 #MeV\n",
+ "#Using semiempirical formula, Eqn 11.18, Page 407\n",
+ "a1= 14.1 #Mev\n",
+ "a2= 13.0 #MeV\n",
+ "a3= 0.595 #Mev\n",
+ "a4= 19.0 #MeV\n",
+ "a5= 33.5 #MeV\n",
+ "A= Z+N \n",
+ "E2= ((a1*A)-(a2*(A**(2.0/3.0)))-(a3*Z*(Z-1)/(A**(1.0/3.0)))-(a4*((A-2*Z)**2)/A)+(a5/(A**(3.0/4.0)))) #MeV\n",
+ "\n",
+ "#Result\n",
+ "print\"Binding energy of Zinc 64 isotope is: \",round(Ebinding,1),\"MeV\"\n",
+ "print\"The binding energy using semi-empirical formula, in MeV, is: \",round(E2,1),\"MeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Binding energy of Zinc 64 isotope is: 559.2 MeV\n",
+ "The binding energy using semi-empirical formula, in MeV, is: 561.7 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.7,Page no:408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=25\n",
+ "\n",
+ "#Calculation\n",
+ "#Derivation part\n",
+ "#dEb/dZ=-a3*(2*z-1)/A^(1/3)+4*a4*(A-2*Z)/A\n",
+ "#Z=a3*A**-1/3+4*a4/(2*a3*A^-1/3+8*a4*A**-1)\n",
+ "Z=(0.595*A**(-1.0/3.0)+76)/(1.19*A**(-1.0/3.0)+(152*A**-1))\n",
+ "print \"For A=25,Z=\",round(Z,1),\"\\nfor which we conclude that Z=\",round(Z),\"should be the atomic no. of most stable isobar of A=25\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For A=25,Z= 11.7 \n",
+ "for which we conclude that Z= 12.0 should be the atomic no. of most stable isobar of A=25\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_12.ipynb b/Concepts_Of_Modern_Physics/Chapter_12.ipynb
new file mode 100755
index 00000000..45956077
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_12.ipynb
@@ -0,0 +1,440 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12:Nuclear Transformations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.2,Page no:425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Thalf= 3.82 #half-life in days, d\n",
+ "Lambda= 0.693/Thalf #decay constant\n",
+ "p= 0.6 # 60.0 percent of sample\n",
+ "\n",
+ "#Calculation\n",
+ "import numpy\n",
+ "import math\n",
+ "No= numpy.poly([1]) #Number of undecayed nuclei, at time t=0\n",
+ "N= (1.0-p)*No #Number of undecayed nuclei, at time t\n",
+ "t= (1.0/Lambda)*(np.log((N/No))) #decay time in days, d\n",
+ "t= t*(-1.0) \n",
+ "\n",
+ "#Result\n",
+ "print\"The decay time for Radon is: \",round(t[0],2),\"d\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The decay time for Radon is: 5.05 d\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.3,Page no:427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Thalf= 3.82 #half-life in days, d\n",
+ "Lambda= 0.693/(Thalf*86400.0) #decay constant, s**(-1)\n",
+ "Wradon= 1.00 #weight of sample, mg\n",
+ "MRadon= 222.0 #atomic mass of sample, u\n",
+ "\n",
+ "#Calculation\n",
+ "N= Wradon*(10**(-6))/(MRadon*(1.66*(10**(-27)))) #number of atoms\n",
+ "R= Lambda*N #decays/sec\n",
+ "R_tbq=round(R/10**12,2) #in TBq\n",
+ "R_Ci=R_tbq*27.15 #Ci Calories\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The activity of the sample is: %.2g\"%R,\"decays/sec=\",R_tbq,\"TBq=\",round(R_Ci),\"Ci\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The activity of the sample is: 5.7e+12 decays/sec= 5.7 TBq= 155.0 Ci\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.4,Page no:427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ro= 155 #initial activity, Ci\n",
+ "Lambda= 2.11*(10**(-6)) #decay constant, s**(-1)\n",
+ "t= 7 #days\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "t= t*86400 #converting to s\n",
+ "R= Ro*((math.exp(-(Lambda*t)))) #final activity, Ci\n",
+ "\n",
+ "#Result\n",
+ "print\"The activity after one week is: \",round(R),\"Ci\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The activity after one week is: 43.0 Ci\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.5,Page no:428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "R= 13.0 #present activity,\n",
+ "Ro= 16.0 #activity of live wood\n",
+ "Thalf= 5760.0 #half life of radiocarbon, y\n",
+ "\n",
+ "#Calculation\n",
+ "Lambda= 0.693/(Thalf) #decay constant, y**(-1)\n",
+ "t= (1.0/Lambda)*(math.log(Ro/R)) #age of sample, y\n",
+ "\n",
+ "#Result\n",
+ "print\"The age of the wooden sample is: %.2g\"%t,\"y\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The age of the wooden sample is: 1.7e+03 y\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.6,Page no:432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Thalf1= 2.5*(10**5) #half-life of U-234, y\n",
+ "AtomicRatio= 1.8*(10**4) #atomic ratio of u-238 and U-234 in the sample\n",
+ "\n",
+ "#Calculation\n",
+ "Thalf2= AtomicRatio*Thalf1 #using Eqn12.9\n",
+ "\n",
+ "#Result\n",
+ "print\"The half-life of Uranium-238 is: %.2g\"%Thalf2,\"years\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The half-life of Uranium-238 is: 4.5e+09 years\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.7,Page no:433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Npolonium= 84 #atomic number of polonium\n",
+ "Nalpha= 2 #atomic number of alpha particle\n",
+ "Z= Npolonium-Nalpha #atomic number of daughter nuclide\n",
+ "Mpolonium= 209.9829 #mass number of polonium, u\n",
+ "Malpha= 4.0026 #mass number of alpha particle, u\n",
+ "\n",
+ "#Calculation\n",
+ "A= Mpolonium-Malpha #mass number of daughter nuclide\n",
+ "# The daughter nuclide has atomic number: \n",
+ "# 82. \n",
+ "\n",
+ "# and mass number: \n",
+ "# 205.9803. \n",
+ " \n",
+ "Ealpha= 5.3 #energy of alpha particle, MeV\n",
+ "Q= Mpolonium*Ealpha/A #disintegration energy, MeV\n",
+ "Mq= Q/931 #mass equivalent for Q, u\n",
+ "Mnuclide= Mpolonium-Malpha-Mq #u\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)The daughter nuclide has atomic number: \",Z\n",
+ "print\"and mass number: \",round(A)\n",
+ "print\"(b).The atomic mass of the daughter nuclide is: \",round(Mnuclide,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The daughter nuclide has atomic number: 82\n",
+ "and mass number: 206.0\n",
+ "(b).The atomic mass of the daughter nuclide is: 205.9745\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.8,Page no:444"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "CrossSection= 2*(10**4) # capture cross section of Cadmium-113\n",
+ "CrossSection= CrossSection*(10**(-28)) # converting to m**2\n",
+ "Mcadmium= 112.0 #mean atomic mass of cadmium, u\n",
+ "density= 8.64*(10**3) #density of cadmium sheet used, kg/m**3\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a)\n",
+ "import math\n",
+ "t= 0.1 #hickness of sheet used, mm\n",
+ "t= t*10**(-3) #converting to m\n",
+ "p= 12.0 #percent of Cadmium-113 in natural cadmium\n",
+ "u= 1.66*(10**(-27)) #atomic mass unit, kg\n",
+ "n= (p/100.0)*density/(Mcadmium*u) #number of atoms, atoms/m**3\n",
+ "Fabsorbed= 1.0- (math.exp((-n)*(CrossSection)*(t))) #absorbed fraction\n",
+ "#Part (b)\n",
+ "t2= (-(math.log(0.01)))/(n*CrossSection) #required thickness, m\n",
+ "t2= t2*10**(3.0) #converting to mm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The fraction of incident beam absorbed is: \",round(Fabsorbed,2)\n",
+ "print\"(b).The thickness required to absorb 99 percent of incident thermal neutrons is: \",round(t2,2),\"mm\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The fraction of incident beam absorbed is: 0.67\n",
+ "(b).The thickness required to absorb 99 percent of incident thermal neutrons is: 0.41 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.9,Page no:445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "CrossSection= 2.0*(10**4) # capture cross section of Cadmium-113, b\n",
+ "CrossSection= CrossSection*(10**(-28)) # converting to m**2\n",
+ "\n",
+ "#Calculation\n",
+ "n= (12.0/100.0)*(8.64*10**3)/(112.0*(1.66*10**(-27))) #number of atoms, atoms/m**3\n",
+ "Lambda= 1.0/(n*CrossSection) #mean free path, m\n",
+ "Lambda= Lambda*10**3 #converting to, mm\n",
+ "\n",
+ "#Result\n",
+ "print\"The mean free path is: \",round(Lambda,4),\"mm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean free path is: 0.0897 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.10,Page no:446"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Thalf= 2.69 #half life of gold,d\n",
+ "Lambda= 0.693/(Thalf*86400.0) #decay constant, s**(-1)\n",
+ "R= 200.0 #required activity, mCi\n",
+ "R= R*10**(-6) #converting to Ci\n",
+ "\n",
+ "#Calculation\n",
+ "dN= R/(Lambda/(3.70*10**(10))) #atoms\n",
+ "Wgold= 10.0 #mass of foil, mg\n",
+ "u= 1.66*(10**(-27)) #atomic mass unit, kg\n",
+ "Mgold= 197.0 # u\n",
+ "n2= Wgold*10.0**(-6)/(Mgold*u) #total no. of atoms\n",
+ "phi= 2.0*10**(16) #flux, neutrons/m**2\n",
+ "CrossSection= 99.0*10**(-28) #m**2\n",
+ "dT= dN/(phi*n2*CrossSection) #s\n",
+ "dT_m=divmod(dT,60)\n",
+ "#Result\n",
+ "print\"The irradiation period required is: \",round(dT,1),\"s=\",round(dT_m[0],1),\"min\",round(dT_m[1],1),\"seconds(Approx)\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The irradiation period required is: 409.9 s= 6.0 min 49.9 seconds(Approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.11,Page no:450"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "m1= 14.00307 #u\n",
+ "m2= 4.00260 #u\n",
+ "m3= 1.00783 #u\n",
+ "m4= 16.99913 #u\n",
+ "\n",
+ "#Calculation\n",
+ "k= m1+m2-m3-m4 # difference in total mass of reactants and products, u\n",
+ "Q= k*931.5 #energy exchanged, MeV\n",
+ "KEcm= -Q #minimum KE needed in centre of mass system, MeV\n",
+ "KElab= KEcm*(m2+m1)/m1 #minimum KE in laboratory system\n",
+ "\n",
+ "#Result\n",
+ "print\"The minimum KE required by the alpha particle is: \",round(KElab,3),\"MeV(APPROX)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum KE required by the alpha particle is: 1.545 MeV(APPROX)\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_2.ipynb b/Concepts_Of_Modern_Physics/Chapter_2.ipynb
new file mode 100755
index 00000000..dfc67c62
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_2.ipynb
@@ -0,0 +1,334 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Particle properties of waves"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page no:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Ft= 660 #frequency of tuning fork, Hz\n",
+ "Fo= 5.00*(10**14) #frquency of atomic oscillator, Hz\n",
+ "Ef= 0.04 #vibrational energy of tuning fork, J\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "E1= h*Ft #Total energy of tuning fork, J\n",
+ "E2= h*Fo #Total energy of atomic oscillator, J\n",
+ "E2= E2/(1.60*(10**(-19))) #converting to eV\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).Energy of tuning fork is:%.3g\"%E1,\"J\"\n",
+ "print\"(b).Energy of atomic oscillator is:\",round(E2,2),\"eV(approx)\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).Energy of tuning fork is:4.38e-31 J\n",
+ "(b).Energy of atomic oscillator is: 2.07 eV(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2,Page no:66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "l= 350 #Wavelength of UV light, nm\n",
+ "i= 1.00 #intensity of UV light, W/m**2\n",
+ "\n",
+ "#Part (a)\n",
+ "l= l*10**(-9) #converting to m\n",
+ "Ep= (1.24*(10**(-6)))/l #energy of photon, using Eqn (2.11) on Page 66, e.V\n",
+ "t= 2.2 #work function of Potassium surface, eV\n",
+ " \n",
+ "#Calculation\n",
+ "KEmax= Ep-t #Max KE of the phototelectrons, eV\n",
+ "\n",
+ "#Part (b) \n",
+ "A= 1.00 #Surface area, cm**2\n",
+ "A= A* 10**(-4) #converting to m**2\n",
+ "E= 5.68*(10**(-19)) #Photon energy, J\n",
+ "Np= i*A/E #number of incident photon, per second\n",
+ "Ne= (0.0050)*Np #number of photoeectrons emitted, per second\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).Maximum KE of photoelectrin is: \",round(KEmax,1),\"eV\"\n",
+ "print\"(b).Rate of emission of photoelectrons is:%.2g\"%Ne,\"photoelectrons/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).Maximum KE of photoelectrin is: 1.3 eV\n",
+ "(b).Rate of emission of photoelectrons is:8.8e+11 photoelectrons/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3,Page no:72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "AP= 50000 #Accelerating potential of the x-ray machine, V\n",
+ "l= (1.24*(10**(-6)))/AP*(10**(9)) #Minimum wavelength, nm\n",
+ "\n",
+ "#Calculation\n",
+ "Fmax= 3*(10**8)/(l*(10**(-9))) #Maximum frequency, Hz\n",
+ "\n",
+ "#Result\n",
+ "print\"Minimum wavelength possible is: \",l,\"nm\"\n",
+ "print\"Maximum frequency possible is: %.3g\"%Fmax,\"Hz\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum wavelength possible is: 0.0248 nm\n",
+ "Maximum frequency possible is: 1.21e+19 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page no:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "#part (a)\n",
+ "l= 10.0 #wavelength of x-ray, pm\n",
+ "r= 45.0 #angle of scattered articles, degree\n",
+ "lc= 2.426*(10**(-12)) #Compton wavelength for electron, m\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "k= math.cos(math.radians(45)) \n",
+ "lc= lc* 10.0**12 # converting to pm\n",
+ "print \n",
+ "l2= l+ lc*(1.0-k) #using Eqn 2.23\n",
+ "#Part (b)\n",
+ "lmax= l+(lc*2) #for (1-k)=2\n",
+ "#Part (c)\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "c= 3*10**8 #velocity of light, m/s\n",
+ "c=c*10**12 #converting to pm/s\n",
+ "KEmax= (h*c)*((1/l)-(1/lmax)) #J\n",
+ "\n",
+ "#Result\n",
+ "print\"(a):The wavelength of scattered x-ray is: \",round(l2,1),\"pm\"\n",
+ "print\"(b):Maximum wavelength is: \",round(lmax,1),\"pm\"\n",
+ "print\"(c):The maximum KE of recoil electrons is:%.3g\"%KEmax,\"J\"\n",
+ "print\"which is equal to \",round(KEmax/1.6021773e-16,1),\"keV(approx)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a):The wavelength of scattered x-ray is: 10.7 pm\n",
+ "(b):Maximum wavelength is: 14.9 pm\n",
+ "(c):The maximum KE of recoil electrons is:6.5e-15 J\n",
+ "which is equal to 40.6 keV(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6,Page no:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "c=3.0*10**8 #velocity of light, m/s\n",
+ "v= 0.5*c #velocity of electron and positron, m/s\n",
+ "y= 1.0/math.sqrt(1.0-(v/c**2)) #gamma, for relativistic momentum\n",
+ "m=0.511/c**2 #MeV/c**2\n",
+ "\n",
+ "#Calculation\n",
+ "p1_p2=((2*m*c*c**2)*(v/c**2))/(math.sqrt(1-(v/c)**2))\n",
+ "p1_plus_p2=(2.0*m*(c**2))/math.sqrt(1.0-(v/c)**2.0)\n",
+ "p1=(p1_p2+p1_plus_p2)/2.0\n",
+ "p2=p1_plus_p2-p1\n",
+ "E1=p1 #MeV\n",
+ "E2=p2 #MeV\n",
+ "\n",
+ "#Result\n",
+ "print\"The Energy of first photon is,E1=\",round(E1,3),\"MeV\"\n",
+ "print\"The Energyof second photon is:,E2=\",round(E2,3),\"MeV\"\n",
+ "\n",
+ "print\"NOTE:There is a mistake in the formula given in the book for p1_p2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Energy of first photon is,E1= 0.885 MeV\n",
+ "The Energyof second photon is:,E2= 0.295 MeV\n",
+ "NOTE:There is a mistake in the formula given in the book for p1_p2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7,Page no:85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "M= 4.9 #Linear attenuation coefficient for gamma ray in water, m**(-1)\n",
+ "I= 2.0 #Original intensity of gamma ray, MeV\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a)\n",
+ "x= 10.0 #distance travelled under water, cm\n",
+ "x= x/100.0 #converting to m\n",
+ "Irel= math.exp(-(M*x)) #Relative intensity\n",
+ "#Part(b)\n",
+ "Ip= I/100 #Present intensity, 1 percent of Original, MeV\n",
+ "x2= math.log(I/Ip)/M #distance travelled, m\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)Relative intensity of the beam is: \",round(Irel,2)\n",
+ "print\"(b)The distance travelled by the beam is:\",round(x2,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Relative intensity of the beam is: 0.61\n",
+ "(b)The distance travelled by the beam is: 0.94 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8,Page no:86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "H= 22.5 #Height of fall, m\n",
+ "F= 7.3*(10**14) #Original frequency, Hz\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "g= 9.8 #Acceleration due to gravity, m/s**2\n",
+ "\n",
+ "#Calculation\n",
+ "Frel= g*H*F/(c**2) #Change in frequency, Hz\n",
+ "\n",
+ "#Result\n",
+ "print\"The change in frquency of a photon fallin through 22.5 m is: \",round(Frel,1), \"Hz\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in frquency of a photon fallin through 22.5 m is: 1.8 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_3.ipynb b/Concepts_Of_Modern_Physics/Chapter_3.ipynb
new file mode 100755
index 00000000..749a4c27
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_3.ipynb
@@ -0,0 +1,470 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:Wave propoerties of particles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.1,Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m= 46.0 #mass, gms\n",
+ "v=30.0 #velocity, m/s\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "m=m/1000.0 #convert to kgs\n",
+ "\n",
+ "#Calculation\n",
+ "a=h/(m*v) #de Broglie wavelength, m\n",
+ "print\"The de Broglie wavelength of the golf ball (in m) is:%.2g\"%a,\"m\"\n",
+ "#Part(b)\n",
+ "m= 9.1*(10**(-31)) #mass, kg\n",
+ "v=10**7 #velocity, m/s\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "a=h/(m*v) #de Broglie wavelength, mts\n",
+ "\n",
+ "#Result\n",
+ "print\"de Broglie wavelength for the electron (in m) is:%.2g\"%a,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Broglie wavelength of the golf ball (in m) is:4.8e-34 m\n",
+ "de Broglie wavelength for the electron (in m) is:7.3e-11 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.2,Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "a=10**(-15) #de Broglie wavelength, mts\n",
+ "Eo= 0.938 #proton rest energy, GeV\n",
+ "h= 4.136*(10**(-15)) #Planck's constant, eV.s\n",
+ "c= 2.998*(10**8) #velocity of light, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "p= h/a # p is momentum, kg.m/s \n",
+ "pc= (h*c)/a #Photon's energy, ev\n",
+ "pc=pc*(10**(-9)) #convert to GeV\n",
+ "\t\t\t\t#pc>E0, relativistic calculation\n",
+ "E= math.sqrt((Eo**2) + (pc**2)) #total energy, GeV\n",
+ "KE = E-Eo #Kinetic energy, GeV\n",
+ "KE= KE*1000 # convert to MeV\n",
+ "\n",
+ "#Result\n",
+ "print\"Kinetic Energy of the proton (in MeV) is: \",round(KE),\"MeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic Energy of the proton (in MeV) is: 617.0 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.3,Page no:103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "a= 2*(10**(-12)) #de Broglie wavelength, mts\n",
+ "h= 4.136*(10**(-15)) #Planck's constant, eV.s\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "pc= (h*c)/a #p is momentum, pc is electron's energy, eV\n",
+ "pc= pc/1000 #convert to keV\n",
+ "Eo= 511 #rest energy, keV\n",
+ "E= math.sqrt((Eo**2)+(pc**2)) #Total Energy, keV\n",
+ "KE= E-Eo #Kinetic energy, keV\n",
+ "\n",
+ "#Result\n",
+ "print\"kinetic energy of the electron (in keV) is,KE: \",round(KE,1),\"keV\"\n",
+ "vg= c*(math.sqrt(1-(Eo**2/E**2))) #group velocity, m/s\n",
+ "vp= c**2/vg #phase velocity, m/s\n",
+ "print\"group velocity of the electron (in m/s) is,vg: \",round(vg/c,3),\"c\"\n",
+ "print\"phase velocity of the electron (in m/s) is,vp:\",round(vp/c,1),\"c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "kinetic energy of the electron (in keV) is,KE: 292.8 keV\n",
+ "group velocity of the electron (in m/s) is,vg: 0.772 c\n",
+ "phase velocity of the electron (in m/s) is,vp: 1.3 c\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.4,Page no:107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline\n",
+ "#Variable declaration\n",
+ "m= 9.1*(10**(-31)) #mass, kg\n",
+ "L= 0.10 #length of box, nm\n",
+ "L= L*(10**(-9)) #convert to m\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "En=range(4)\n",
+ "p=range(5)\n",
+ "import matplotlib.pyplot as plt\n",
+ "#from numpy import random\n",
+ "import numpy as np\n",
+ "for n in range(1,5):\n",
+ " En[n-1]=(n**2)*(h**2)/(8*m*(L**2)) #Permitted energies, J\n",
+ " print\"For level:\",n\n",
+ " print\"Permitted ernergis :%.2g\"%En[n-1],\"J\"\n",
+ " En[n-1]=38*(n**2) \n",
+ " plt.plot([En[n-1]])\n",
+ " print\"Permitted energies (in eV) :\",En[n-1], \"eV\"\n",
+ " p[n]=plt.hlines(En[n-1],0,5, colors=np.random.rand(3,1), linestyles='solid', label='d', hold=None,)\n",
+ " p[n].axes.get_xaxis().set_visible(False)\n",
+ "plt.legend([p[1],p[2],p[3],p[4]],[\"n=1\",\"n=2\",\"n=3\",\"n=4\"])\n",
+ "plt.ylabel(\"Energy,eV\")\n",
+ "plt.title(\"Energy levels of an e- confined to a box 1nm wide\")\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nANS::The minimum energy the electron can have is:\",min(En),\"n**2 eV\\n\\n\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "For level: 1\n",
+ "Permitted ernergis :6e-18 J\n",
+ "Permitted energies (in eV) : 38 eV\n",
+ "For level:"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 2\n",
+ "Permitted ernergis :2.4e-17 J\n",
+ "Permitted energies (in eV) : 152 eV\n",
+ "For level: 3\n",
+ "Permitted ernergis :5.4e-17 J\n",
+ "Permitted energies (in eV) : 342 eV\n",
+ "For level: 4\n",
+ "Permitted ernergis :9.7e-17 J\n",
+ "Permitted energies (in eV) : 608 eV\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEBCAYAAAB13qL/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8jPeeB/DPJJlGQiITSSYyE5kSJBOKg0ipCppodUVc\nGolLw1JFtRzH4bSlQrdJOKsllF7cUpZgd18SSpqi4Ui3Tde1K0hKRO4uERWJXH/7h+OpyGUyzCR4\nPu/XK6/XzHP9Tmbm+cxz+/0U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2rVD586dsWHDBgDAxYsX0a5dO5w8eVKaztnZGUePHq13HaNGjcLIkSPR\nrl27OuMMfXYmT56MWbNmYfjw4bCzs8PAgQNRUFCAOXPmQKVSwdvbu8G92CVLluC9994DAFRWVqJ1\n69ZYsGABAKCsrAytWrVCcXGx9P7e/wxmZmZi0KBBsLe3R2BgIK5fv15ruU39bpqUkCmdTicOHjxY\n77jNmzcLpVIpNmzYIGpqasT69euFm5ubND44OFjMmDFDlJaWiqtXrwpfX1/x5ZdfSvNaWVmJtWvX\niurqalFWVibGjRsnwsLCRFlZmUhLSxPu7u5i4MCBQgghUlNThZubm6ipqRFCCHHt2jVha2srrl69\nWm9tCoVCXLx4UQghxNy5c8XIkSPFzZs3xe3bt8WIESPE+++/L4QQYtmyZWLChAnSfPv27RN6vV4I\nIUROTo5o166dOHDggBBCiO+//160a9dOXL9+XQghhL+/v9i4caMQQojQ0FARGRkphBCivLxcpKSk\n1FvXhQsXROvWrcXBgwdFVVWVWLFihfD09BSVlZV1llmfb7/9Vly6dEkIIcSRI0eEra2tOHHihBBC\niB9++EFYWVmJJUuWiKqqKrF//35ha2sriouL611WY++PIZcvXxZ2dnYiLi5OVFVViRs3bohTp04J\nIYSYNGmSCA4OFiUlJeLy5cuiS5cu0msy9JmZPHmyWLx4sfQ8IiJCTJw4UQghRGZmplAoFGL69Oni\n7t274vTp08La2lqcP39eCCHEqlWrxIsvvihyc3NFRUWFePvtt0VYWJgQQoizZ8+KNm3aiH/84x+i\nvLxczJs3T1hZWYlDhw7V+/oerqOiokJ06tRJREVFicrKSnH48GFhZ2cnLly4UO/8jb1PD7v/XVi1\napWoqqoSO3fuFG3bthU3b94UQggxcOBA8c4774jy8nJx6tQp4ezsLA4fPiyEEOLrr78Wer1elJaW\nisDAQPHXv/61sbdNCCHEhx9+KCZPnlxrmKHPTnh4uHBychInTpwQd+/eFUOGDBEeHh5i69atoqam\nRixatEgMHjy43vUdPnxYdO/eXQghREpKiujUqZPo16+fEEKIQ4cOiZ49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mMjAz4+vo2d3lERLJj1j2CsLAwHDlyBNevX4e7uzuWLVuGv/3tbwgJCcHGjRuh0+mw\na9cuAIBer0dISAj0ej2srKywbt26Rg8bERGRabDPYiIiGWCfxURE1CAGARGRzDEIiIhkjkFARCRz\nDAIiIpljEBARyRyDgIhI5hgEREQyxyAgIpI5BgERkcwxCIiIZI5BQEQkcwwCIiKZYxAQEckcg4CI\nSOZatM/iR3Wi18qWLoGInjGub78Itxn9W7qMFsGOaYiIZIAd0xARUYMYBEREMscgICKSOQYBEZHM\nMQiIiGTuiQuCxMREeHl5oXPnzli+fHlLl0NE9Mx7oi4fra6uRteuXXHw4EFoNBr07dsXO3bsgLe3\ntzQNLx8lIjLeU3P5aGpqKjw9PaHT6aBUKhEaGor4+PiWLouI6Jn2RAVBbm4u3N3dpedarRa5ubkt\nWBER0bPviQoChULR0iUQEcnOE9XWkEajQXZ2tvQ8OzsbWq221jQ9evRgYBARGalHjx4NjnuiThZX\nVVWha9euOHToENzc3ODr61vnZDEREZnWE7VHYGVlhbVr12LYsGGorq7G1KlTGQJERGb2RO0REBFR\n83uiThYTEVHzYxAQEckcg4CISOYYBEREMscgICKSOQYBEZHMMQiIiGSOQUBEJHP/DwMjmdymoydL\nAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x79807f0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "ANS::The minimum energy the electron can have is: 38 n**2 eV\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.5,Page no:107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m= 10.0 #mass, gms\n",
+ "m= m/1000.0 #convert to kgs\n",
+ "L= 10.0 #Length of box, cms\n",
+ "L= L/100.0 #convert to mts\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "En=range(5)\n",
+ "for n in range(1,5):\n",
+ " En[n-1]=(n**2)*(h**2)/(8*m*(L**2)) #Permitted energies, J\n",
+ " print\"for level:\",n\n",
+ " print\"Permitted ernergis :%.2g\"%En[n-1],\"J\"\n",
+ " \n",
+ "#Result\n",
+ "print \"Minimum energy is :En=%.2g\"%min(En),\"n**2 J,corresponding to n=1\"\n",
+ "\n",
+ " \n",
+ "#corresponding kinetic energy is very low, hence Quantum effects are imperceptible, and Newtonian mechanics is dominant"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for level: 1\n",
+ "Permitted ernergis :5.5e-64 J\n",
+ "for level: 2\n",
+ "Permitted ernergis :2.2e-63 J\n",
+ "for level: 3\n",
+ "Permitted ernergis :4.9e-63 J\n",
+ "for level: 4\n",
+ "Permitted ernergis :8.8e-63 J\n",
+ "Minimum energy is :En=5.5e-64 n**2 J,corresponding to n=1\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.6,Page no:112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Xo= 10**(-11) #uncertainty at time t=o, mts\n",
+ "hb= 1.054*(10**(-34)) #h-bar, reduced Planck's constant, J.s\n",
+ "t= 1 #time, s\n",
+ "m= 1.672*(10**(-27)) #mass, kg\n",
+ "\n",
+ "#Calculation\n",
+ "x1= hb*t/(2*m*Xo) #uncertainty at time t=1, mts\n",
+ "\n",
+ "#Result\n",
+ "print\"accuracy in position of proton after 1.00 seconds is ,delta_x>=:%.3g\"%x1,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "accuracy in position of proton after 1.00 seconds is ,delta_x>=:3.15e+03 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.7,Page no:114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "r= 5*(10**(-15)) #radius of nucleus, mts\n",
+ "Xo= 5*(10**(-15)) #assumed initial uncertainty, mts\n",
+ "hb= 1.054*(10**(-34)) #reduced Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "p= hb/(2*Xo) #uncertainty in momentum, kg.m/s\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "KE= p*c #minimum kinetic energy required, J\n",
+ "\n",
+ "#Result\n",
+ "print\"Uncertainty in momentum of the electron is :%.2g\"%p,\"kg.m/s\"\n",
+ "print\"The minimum energy required is :%.2g\"%KE,\"J \\n or\"\n",
+ "KE= KE/(1.6*(10**(-19))) #convert to eV\n",
+ "KE= KE/(10**6) #convert to MeV\n",
+ "print\"The minimum energy required is : \",round(KE),\"MeV\"\n",
+ " \n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uncertainty in momentum of the electron is :1.1e-20 kg.m/s\n",
+ "The minimum energy required is :3.2e-12 J \n",
+ " or\n",
+ "The minimum energy required is : 20.0 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.8,Page no:115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "r= 5.3*(10**(-11)) #radius of atom, mts\n",
+ "Xo= 5.3*(10**(-11)) #uncertainty in position, mts\n",
+ "hb= 1.054*(10**(-34)) #Reduced planck Constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "p= hb/(2*Xo) #uncertainty in momentum, kg.m/s\n",
+ "m= 9.1*(10**(-31)) #mass, kg\n",
+ "KE= p**2/(2*m) # minimum kinetic energy, J\n",
+ "\n",
+ "#Result\n",
+ "print\"The minimum possible kinetic energy for an electron in the atom is :%.2g\"%KE,\"J\"\n",
+ "KE= KE/(1.6*(10**(-19))) #convert to eV\n",
+ "print\"OR,in eV:KE=\",round(KE,1),\"eV\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum possible kinetic energy for an electron in the atom is :5.4e-19 J\n",
+ "OR,in eV:KE= 3.4 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.9,Page no:116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "t= 10**(-8) #time period between excitation and radiation, s\n",
+ "hb= 1.054*(10**(-34)) #Reduced Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "Eo= hb/(2*t) #uncertainty in photon energy, J\n",
+ "h=hb*(2*(math.pi)) #Planck's constant\n",
+ "Fo= Eo/h #uncertainty in frequency of light, Hz\n",
+ "\n",
+ "#Result\n",
+ "print\"Photon energy is uncertain by (in J) :%.2g\"%Eo,\"J\"\n",
+ "print\"Frquency of photon is uncertain by (in Hz) :%.2g\"%Fo,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Photon energy is uncertain by (in J) :5.3e-27 J\n",
+ "Frquency of photon is uncertain by (in Hz) :8e+06 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_4.ipynb b/Concepts_Of_Modern_Physics/Chapter_4.ipynb
new file mode 100755
index 00000000..36d4670d
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_4.ipynb
@@ -0,0 +1,336 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:Atomic Structure"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.1,Page no:125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "E= -13.6; #Energy required to separate electron and proton, eV\n",
+ "e= 1.6*(10**(-19)); #charge of an electron, C\n",
+ "E= E*e; #converting to J\n",
+ "Po= 8.85*(10**(-12)); #Permittivity of free space, F/m\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "r= e**2/(8*(math.pi)*Po*E); #radius, m\n",
+ "r= -r;\n",
+ "m= 9.1*(10**(-31)); #mass of electron, kg\n",
+ "v=e/math.sqrt(4*(math.pi)*Po*m*r); #velocity, m/s\n",
+ "\n",
+ "#Result\n",
+ "print\"The orbital radius of the electron is:%.2g\"%r,\"m\"\n",
+ "print\"The velocity of electron is:%.2g\"%v,\"m/s\"\n",
+ " \n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The orbital radius of the electron is:5.3e-11 m\n",
+ "The velocity of electron is:2.2e+06 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.2,Page no:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "n1=1.0; #initial state\n",
+ "n2=3.0; #final state\n",
+ "E= -13.6; #energy in ground state, eV\n",
+ "\n",
+ "#Calculation\n",
+ "dE= E*((1/n2**2)-(1/n1**2)); #Change in energy, eV\n",
+ "\n",
+ "#Result\n",
+ "print\"The energy change of Hydrogen atom is: \",round(dE,1),\"eV\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy change of Hydrogen atom is: 12.1 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.3,Page no:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#Part(a)\n",
+ "Rn= 10.0**(-5); #radius of Rydberg atom, m\n",
+ "Ao= 5.29*(10**(-11)); #Bohr radius, m\n",
+ "\n",
+ "#Calculation\n",
+ "n= math.sqrt(Rn/Ao); #Quantum number\n",
+ "E1= -13.6; #Ground state energy level, eV\n",
+ "En= E1/n**2.0; #Nth state energy level, eV\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The quantum number of the Rydberg atom is: \",round(n)\n",
+ "print\"(b).The energy ofthe rydberg atom is:%.3g\"%En,\"eV\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The quantum number of the Rydberg atom is: 435.0\n",
+ "(b).The energy ofthe rydberg atom is:-7.19e-05 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.4,Page no:138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n1= 3.0; #initial state\n",
+ "n2= 2.0; #final state\n",
+ "R= 1.097*(10**7); #Rydberg's constant, m**(-1)\n",
+ "\n",
+ "#Calculation\n",
+ "k= (1/n2**2)-(1/n1**2);\n",
+ "l= 1/(k*R); #longest wavelength, m\n",
+ "l= l*(10**9); #converting to nm\n",
+ "\n",
+ "#Result\n",
+ "print\"The longest in Balmer series of Hydrogen, in nm, is: \",round(l),\"nm\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The longest in Balmer series of Hydrogen, in nm, is: 656.0 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.5,Page no:139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n1=1.0; #initial state\n",
+ "n2=2.0; #final state\n",
+ "E1= 2.18*(10**(-18)); #Rydberg's constant, J\n",
+ "h= 6.63*(10**(-34)); #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "f1= (E1/h)*(2.0/n1**3); #Frequency for first orbit, rev/s\n",
+ "f2= (E1/h)*(2.0/n2**3); #Frequency for second orbit, rev/s\n",
+ "print\"Ans (A):Frequency of revolution for orbit n=1 is,f1: %.3g\"%f1,\"rev/s\"\n",
+ "print\"Frequency of revolution for orbit n=2 is,f2:%.2e\"%f2,\"rev/s\"\n",
+ "print\"which is equivalent to 0.823*10**15 rev/s 'without' any scientific notation\\n\"\n",
+ "#Part (b)\n",
+ "n1=2.0; #initial orbit\n",
+ "n2=1.0; #final orbit\n",
+ "f= (E1/(h))*((1.0/(n2**2))-(1.0/n1**3)); #frequency, Hz\n",
+ "print\"Ans(B):Frequency of emitted photon is: %.3g\"%f,\"Hz\\n\"\n",
+ "#Part (c)\n",
+ "n= 2.0; #orbit\n",
+ "f= f2; #from part (a)\n",
+ "dt= 10.0**(-8); # time duration, s\n",
+ "N= f*dt; #Number of revolutions\n",
+ "#Result\n",
+ "print\"Ans(C):Number of revolutions the electron makes is:%.3g\"%N\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ans (A):Frequency of revolution for orbit n=1 is,f1: 6.58e+15 rev/s\n",
+ "Frequency of revolution for orbit n=2 is,f2:8.22e+14 rev/s\n",
+ "which is equivalent to 0.823*10**15 rev/s 'without' any scientific notation\n",
+ "\n",
+ "Ans(B):Frequency of emitted photon is: 2.88e+15 Hz\n",
+ "\n",
+ "Ans(C):Number of revolutions the electron makes is:8.22e+06\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.7,Page no:142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#Part (a) \n",
+ "Me= 9.1*(10**(-31)); #mass of electron, kg\n",
+ "m= 207*Me; #mass of muon, kg\n",
+ "\n",
+ "#Calculation\n",
+ "Mp= 1836*Me; #mass of proton, kg\n",
+ "Mreduced= (m*Mp)/(m+Mp); #reduced mass, kg\n",
+ "Ao= 5.29*(10**(-11)); #Bohr's orbit for n=1, m\n",
+ "r1= Ao; #expected orbit for atom, m\n",
+ "r2= (Me/Mreduced)*r1; #reduced radius of orbit, m\n",
+ "#Part (b)\n",
+ "E=-13.6; # energy for elctron in n=1, eV\n",
+ "Ereduced= (Mreduced/Me)*E; #energy for eectron in mounic atom, eV\n",
+ "Ereduced= Ereduced/(10**3);#converting to keV\n",
+ "\n",
+ "#Result\n",
+ "print\"(A)Radius of the mounic atom formed, in m, is:%.3g\"%r2,\"m\"\n",
+ "print\"(B)Ionisation energy for the muonic atom is: \",round(Ereduced,2),\"keV\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(A)Radius of the mounic atom formed, in m, is:2.84e-13 m\n",
+ "(B)Ionisation energy for the muonic atom is: -2.53 keV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.8,Page no:156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "I= 7.7; #Intensity of beam, MeV\n",
+ "Dgold= 1.93*(10**4); #density of gold foil used, kg/m**3\n",
+ "u= 1.66*(10**(-27)); #atomic mass unit, kg\n",
+ "Mgold= 197*u; #atomic mass of gold, per atom\n",
+ "\n",
+ "#Calculation\n",
+ "n= Dgold/Mgold; #number of atoms per unit volume, atoms/m**3\n",
+ "Zgold= 79; #atomic number of gold\n",
+ "e= 1.6*(10**(-19)); #electronis charge, C\n",
+ "KE= (I*e)/(10**(-6)); #converting to J\n",
+ "angle= 45; #degree\n",
+ "p=1/math.tan(math.radians(angle/2));\n",
+ "Po= 8.85*(10**(-12)); #Permittivity of free space, F/m\n",
+ "t= 3*(10**(-7)); #thickness of foil, m\n",
+ "f= (math.pi)*n*t*(((Zgold*(e**2))/(4*(math.pi)*Po*KE))**2)*(p**2) #using Rutherford scattering formula\n",
+ "\n",
+ "#Result\n",
+ "print\"f=%.g\"%f\n",
+ "print\"Fraction of the beam scattered through 45 degree or more is: \",round(f*100,3),\"%\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "f=7e-05\n",
+ "Fraction of the beam scattered through 45 degree or more is: 0.007 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_5.ipynb b/Concepts_Of_Modern_Physics/Chapter_5.ipynb
new file mode 100755
index 00000000..99006788
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_5.ipynb
@@ -0,0 +1,142 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4,Page no:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "L= 1.0; #assuming Length L of box to be 1, this would not affect the probability\n",
+ "x1=0.45; #lower bound\n",
+ "x2=0.55; #upper bound\n",
+ "\n",
+ "from scipy.integrate import quad\n",
+ "import math\n",
+ "\n",
+ "#Calculation \n",
+ "def f(x):\n",
+ " y=(math.sin(n*(math.pi)*x))**2\n",
+ " return(y)\n",
+ "n=1.0;\n",
+ "I1=quad(f,x1,x2) #for ground state\n",
+ "P1=(2/L*I1[0])\n",
+ "n=2.0;\n",
+ "I2=quad(f,x1,x2) #for ground state\n",
+ "P2=(2/L*I2[0])\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The probability n ground state is: \",round(P1,3),\"=\",round(P1,3)*100,\"percent\"\n",
+ "print\"The probability in first excited state is: \",round(P2,4),\"=\",round(P2,4)*100,\"percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The probability n ground state is: 0.198 = 19.8 percent\n",
+ "The probability in first excited state is: 0.0065 = 0.65 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6,Page no:186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#Part (a)\n",
+ "E1= 1.0 #energy of first electron, eV\n",
+ "E2= 2.0 #energy of second electron, eV\n",
+ "Eb= 10.0 #height of barrier, eV\n",
+ "Wb= 0.50 #width of barrier, nm\n",
+ "Wb= Wb* 10**(-9) #converting to m\n",
+ "hbar= 1.054*10**(-34) #reduced Planck's conctaant, J.s\n",
+ "Me= 9.1*10**(-31) #mass of electron, kg\n",
+ "e= 1.6*10**(-19) #charge of an electron, J/eV\n",
+ "import math\n",
+ "#Calculation\n",
+ "\n",
+ "k2= (math.sqrt(2*(Me)*(Eb-E1)*(e)))/(hbar) #for 1.0 eV e-, m**(-1)\n",
+ "k1= (math.sqrt(2*Me*(Eb-E2)*e))/hbar #for first electron, m**(-1)\n",
+ "T1= math.exp((-2)*k2*Wb) #transmission probability for first electron\n",
+ "T2= math.exp((-2)*k1*Wb) #for second electron\n",
+ "print\"(A.)\\nTransmission probability for electrons with energy 1.0 eV is:%.2g\"%T1\n",
+ "print\"Transmission probability for electrons with energy 2.0 eV is: %.2g\"%T2\n",
+ "\n",
+ "#Part (b)\n",
+ "Wb= Wb*2; #Barrier width doubled\n",
+ "T11= math.exp((-2)*k2*Wb) # changed transmission probability for first electron\n",
+ "T22= math.exp((-2)*k1*Wb) #for second electron\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n\\n(B.):After the barrier width is doubled:\\n\"\n",
+ "print\"Transmission probability for electrons with energy 1.0 eV is:%.2g\"%T11\n",
+ "print\"Transmission probability for electrons with energy 2.0 eV is: %.2g\"%T22\n",
+ "print\"\\n\\nNOTE:Calculation mistake in book in the calculation of k2,\\nit is wrongly written as 1.6e+10,\\nTHAT's Why a change in final answer\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(A.)\n",
+ "Transmission probability for electrons with energy 1.0 eV is:2.1e-07\n",
+ "Transmission probability for electrons with energy 2.0 eV is: 5.1e-07\n",
+ "\n",
+ "\n",
+ "(B.):After the barrier width is doubled:\n",
+ "\n",
+ "Transmission probability for electrons with energy 1.0 eV is:4.6e-14\n",
+ "Transmission probability for electrons with energy 2.0 eV is: 2.6e-13\n",
+ "\n",
+ "\n",
+ "NOTE:Calculation mistake in book in the calculation of k2,\n",
+ "it is wrongly written as 1.6e+10,\n",
+ "THAT's Why a change in final answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_6.ipynb b/Concepts_Of_Modern_Physics/Chapter_6.ipynb
new file mode 100755
index 00000000..3e924e61
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_6.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chaptet 6:Quantum theory of the Hydrogen Atom"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4,Page no:226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "B= 0.300 #magnetic field, T\n",
+ "Lambda= 450 #wavelength, nm\n",
+ "Lambda= Lambda*(10**(-9)) #converting to m\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "Me= 9.1*(10**(-31)) #mass of electron, kg\n",
+ "c= 3 *(10**8) #speed of light, m/s\n",
+ "import math\n",
+ "#Calculation\n",
+ "dLambda= e*B*(Lambda**2)/(4*(math.pi)*Me*c) #m\n",
+ "dLambda= dLambda*(10**9) #converting to nm\n",
+ "\n",
+ "#Result\n",
+ "print\"The separation between Zeeman components is: \",round(dLambda,5),\"nm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The separation between Zeeman components is: 0.00283 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_7.ipynb b/Concepts_Of_Modern_Physics/Chapter_7.ipynb
new file mode 100755
index 00000000..54659b71
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_7.ipynb
@@ -0,0 +1,184 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:Many electron Atoms"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1,Page no:230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "r= 5*(10**(-17)) #radius of spherical electron, m\n",
+ "Me= 9.1*(10**(-31)) #mass of electron, kg\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "hbar= h/(2*(math.pi)) #reduced Planck's constant, J.s\n",
+ "v= (5*math.sqrt(3)/4)*(hbar/(Me*r)) #using Eqn 7.1, Page 230\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "v= v/c #converting in terms of c, m/s\n",
+ "\n",
+ "#Result\n",
+ "print\"The velocity of electron in times of c is:%.3g\"%v,\"c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of electron in times of c is:1.67e+04 c\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2,Page no:241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "n= 2 #outer (2s) orbit of lithium\n",
+ "E2= -5.39 #Ionisation energy of lithium, for n=2 eV\n",
+ "E1= -13.6 #for n=1, eV\n",
+ "\n",
+ "#Calculation\n",
+ "Z= n*(math.sqrt(E2/E1)) #modification factor for effective charge\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "Ceffective = Z*e \n",
+ " \n",
+ "#Result \n",
+ "print\"The effective charge is: \",round(Ceffective/e,2),\"e or%.3g\"%Ceffective,\"C\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective charge is: 1.26 e or2.01e-19 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3,Page no:248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "n= 2 #for 2p state\n",
+ "Ao= 5.29*(10**(-11)) #Bohr's orbit for n=1, m\n",
+ "r= (n**2)*Ao #orbital radius, m\n",
+ "f= 8.4*(10**14) #frequency of revolution, Hz ,using Eqn 4.4\n",
+ "\n",
+ "#Calculation\n",
+ "Mo= 4*(math.pi)*(10**(-7)) #Magnetic constant, T.m/A\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "B= (Mo*f*e)/(2*r) #Magnetic field, T\n",
+ "Mb= 9.27*(10**(-24)) #Bohr Magneton, J/T\n",
+ "Um= Mb*B #Magnetic energy, J\n",
+ "Um= Um/e #converting to eV\n",
+ "\n",
+ "#Result\n",
+ "print\"The magnetic energy for electron is:%.2g\"%Um,\"eV\"\n",
+ "print\"\\nThe energy difference is twice this,which is:%.2g\"%(2*Um),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetic energy for electron is:2.3e-05 eV\n",
+ "\n",
+ "The energy difference is twice this,which is:4.6e-05 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8,Page no:257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "l= 0.180 #wavelength, nm\n",
+ "l= l* 10**(-9) #converting to m\n",
+ "c= 3*(10**8) #velocity of light, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "f= c/l #frequency, Hz\n",
+ "R= 1.097*(10**7) #Rydberg's constant, per m\n",
+ "Z= 1+(math.sqrt((4*f)/(3*c*R))) #using Eqn 7.21\n",
+ "\n",
+ "#Result\n",
+ "print\"The element has atomic number: \",round(Z)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The element has atomic number: 27.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_8.ipynb b/Concepts_Of_Modern_Physics/Chapter_8.ipynb
new file mode 100755
index 00000000..55544617
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_8.ipynb
@@ -0,0 +1,163 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8:Molecules"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exampnle no:8.1,Page no:283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "r= 0.113 #bond length, nm\n",
+ "Mc= 1.99*(10**(-26)) #mass of C12, kg\n",
+ "Mo= 2.66*(10**(-26)) #mass of O16, kg\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a)\n",
+ "import math\n",
+ "Mco= (Mc*Mo)/(Mc+Mo) #mass of CO, kg\n",
+ "I= Mco*((r*(10.0**(-9.0)))**2.0) #moment of inertia, kg.m**2\n",
+ "J=1.0 #lowest rotational state\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "hbar= h/(2.0*(math.pi)) #reduced Planck's constant, J.s\n",
+ "E1= (J*(J+1)*(hbar**2))/(2.0*I) #energy corresponding to state J=1, J\n",
+ "e= 1.6*(10**(-19)) #charge of an electron, C\n",
+ "E1= E1/e #converting to eV\n",
+ "#Part(b)\n",
+ "w= math.sqrt((2.0*7.61*10**-23)/(1.46*10**-46)) #angular velocity, rad/s\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The energy of CO molecule is:%.2e\"%E1,\"eV(approx)\"\n",
+ "print\"(b).The angular velocity is:%.3g\"%w,\"rad/sec\\n\"\n",
+ "\n",
+ "print\"NOTE:(Calculation mistake):Incorrect answer in book for (b) part\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The energy of CO molecule is:4.79e-04 eV(approx)\n",
+ "(b).The angular velocity is:1.02e+12 rad/sec\n",
+ "\n",
+ "NOTE:(Calculation mistake):Incorrect answer in book for (b) part\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exampnle no:8.2,Page no:285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ji=0 #initial state\n",
+ "Jf=1 #final state\n",
+ "f= 1.15*(10**11) #frequency for the absorption, Hz\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "hbar= h/(2*(math.pi)) #reduced Planck's constant, J.s\n",
+ "Ico= hbar*Jf/(2*(math.pi)*f) #moment of inertia, kg.m**2\n",
+ "Mco= 1.14*(10**(-26)) #Mass of CO, refer Exa 8.1\n",
+ "r= math.sqrt(Ico/Mco) #bond length, m\n",
+ "r= r*(10**9) #converting to nm\n",
+ "\n",
+ "#Result\n",
+ "print\"The bond length of CO molecule is: \",round(r,3),\"nm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The bond length of CO molecule is: 0.113 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exampnle no:8.3,Page no:288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "f= 6.42*(10**13) #frequency of absorbed radiation, Hz\n",
+ "Mco= 1.14*(10**(-26)) #mass of CO, kg\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a)\n",
+ "k= 4*((math.pi)**2)*(f**2)*Mco #using Eqn 8.15, Page 287\n",
+ "#Part (b)\n",
+ "dE= h*f #separation, J\n",
+ "etoJ=dE*6.24*10**18 \n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The force constant for the bond in CO molecule is: %.3g\"%k,\"N/m\"\n",
+ "print\"\\nNOTE:Slight error in calculation of book,'k' is written as 1.86*10**3\\n\\n\"\n",
+ "print\"(b).The separation in its vibrational eergy levels is:%.3g\"%dE,\"J=\",round(etoJ,3),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The force constant for the bond in CO molecule is: 1.85e+03 N/m\n",
+ "\n",
+ "NOTE:Slight error in calculation of book,'k' is written as 1.86*10**3\n",
+ "\n",
+ "\n",
+ "(b).The separation in its vibrational eergy levels is:4.26e-20 J= 0.266 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/Chapter_9.ipynb b/Concepts_Of_Modern_Physics/Chapter_9.ipynb
new file mode 100755
index 00000000..bfd0fdbb
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/Chapter_9.ipynb
@@ -0,0 +1,271 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:Statistical Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.1,Page no:299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k= 8.617*10**(-5) #Boltzmann constant, eV/K\n",
+ "To=273.0 #initial temperature, K\n",
+ "E1= -13.6 #energy of ground state, eV\n",
+ "E2= -3.4 #energy of first excited state, eV\n",
+ "dE= E2-E1 #difference in energy levels\n",
+ "g1=2.0 #number of energy states for E1\n",
+ "g2=8.0 #number of energy states for E2\n",
+ "\n",
+ "#Calculation\n",
+ "J= dE/(k*To) \n",
+ "Nratio1= (g2/g1)*math.exp(-J) #ratio of number of atoms in level 2 and level 1 at To\n",
+ "T1=10273.0 #K\n",
+ "J1= J*To/T1 \n",
+ "Nratio2= (g2/g1)*math.exp(-J1) #at T1\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The ratio at 273 K is:%.3g\"%Nratio1,\"(Approx)\"\n",
+ "print\"(b).The ratio at 10273 k is:%.g \"%Nratio2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The ratio at 273 K is:1.97e-188 (Approx)\n",
+ "(b).The ratio at 10273 k is:4e-05 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.4,Page no:305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Moxygen= 16.0 #atomic mass,u\n",
+ "Mo2= 32.0 #Molecular mass, u\n",
+ "u= 1.66*(10**(-27)) #atomic mass unit, kg\n",
+ "Moxygen= Mo2*u #mass, kg\n",
+ "t= 273 #temperature, K\n",
+ "k= 1.38*10**(-23) #Boltzmann constant, J/K\n",
+ "\n",
+ "#Calculation\n",
+ "Vrms= math.sqrt(3*k*t/Moxygen) # m/s\n",
+ "\n",
+ "#Result\n",
+ "print\"The rms velocity of oxygen is: \",round(Vrms),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms velocity of oxygen is: 461.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.5,Page no:314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "V= 1.00 #volume, cm**3\n",
+ "V= V*10**(-6) #converting to m**3\n",
+ "dI= 2.404 #standard value of definite Integral used\n",
+ "k= 8.617*10**(-5) #Boltzmann constant, eV/K\n",
+ "h= 4.13*(10**(-15)) #Planck's constant, eV.s\n",
+ "T= 1000 #temperature, K\n",
+ "c= 3 *(10**8) #speed of light, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "#Part (a)\n",
+ "N= 8*(math.pi)*V*dI*((k*T/(h*c))**3)\n",
+ "#Part(b)\n",
+ "Sig= 5.670*10**(-8) #Stefan's constant, W/m**2.K**4 , refer to Page 317\n",
+ "Ephoton= Sig*(c**2)*(h**3)*T/(2.405*(2*(math.pi)*(k**3))) #J\n",
+ "e_to_J=6.23*10**18*Ephoton #Converting to eV \n",
+ "\n",
+ "#Result\n",
+ "print\"(a),The number of photons is:%.3g\"%N\n",
+ "print\"(b)The average energy of the photons is:%.3g\"%Ephoton,\"J=\",round(e_to_J,3),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a),The number of photons is:2.03e+10\n",
+ "(b)The average energy of the photons is:3.72e-20 J= 0.232 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.6,Page no:317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "T= 2.7 #blackbody temperature, K\n",
+ "Lambda= 2.898*10**(-3)/T #using wein's displacement law, Eqn 9.40, m\n",
+ "\n",
+ "#Calculation\n",
+ "Lambda= Lambda*10**(3) #converting to mm\n",
+ "\n",
+ "#Result\n",
+ "print\"The wavelength for maximum radiation is: \",Lambda,\"mm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength for maximum radiation is: 1.07333333333 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.7,Page no:317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Rearth= 1.5*10**(11) #radius of earth, m\n",
+ "r= 1.4 #rate of arrival of sunlight, kW/m**2\n",
+ "\n",
+ "#Calculation\n",
+ "P= (r*10**3)*4*(math.pi)*(Rearth**2) #total power reaching Earth\n",
+ "Rsun= 7*10**(8) #radius of Sun, m\n",
+ "r2= P/(4*(math.pi)*(Rsun**2)) #radiation rate of Sun, W/m**2\n",
+ "emissivity=1 #for blackbody\n",
+ "Sig= 5.670*10**(-8) #Stefan's constant, W/m**2.K**4\n",
+ "T= (r2/(emissivity*Sig))**(1.0/4.0) \n",
+ "\n",
+ "#Result\n",
+ "print\"The surface temperature of Sun is:%.2g\"%T,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The surface temperature of Sun is:5.8e+03 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.8,Page no:325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "u= 1.66*(10**(-27)) #atomic mass unit, kg\n",
+ "density= 8.94*10**(3) # kg/m**3\n",
+ "M= 63.5 #atomic mass of copper, u\n",
+ "\n",
+ "#Calculation\n",
+ "Edensity= density/(M*u) #electron density, electrons/m**3\n",
+ "h= 6.63*(10**(-34)) #Planck's constant, J.s\n",
+ "Me= 9.1*(10**(-31)) #mass of electron, kg\n",
+ "Efermi= h**2/(2*Me)*((3*Edensity)/(8*(math.pi)))**(2.0/3.0) # J\n",
+ "e_to_J=6.23*10**18*Efermi #Converting to eV \n",
+ "\n",
+ "#Result\n",
+ "print\"The fermi energy is:%.3g\"%Efermi,\"J or\",round(e_to_J,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fermi energy is:1.13e-18 J or 7.04 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/README.txt b/Concepts_Of_Modern_Physics/README.txt
new file mode 100755
index 00000000..230b914c
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Anshul Chauhan
+Course: btech
+College/Institute/Organization: National institute of foundary and forge technology,Ranchi
+Department/Designation: Manufacturing Engineering
+Book Title: Concepts Of Modern Physics
+Author: Arthur Beiser
+Publisher: Tata McGraw - Hill Education
+Year of publication: 2006
+Isbn: 0072448482
+Edition: 6 \ No newline at end of file
diff --git a/Concepts_Of_Modern_Physics/screenshots/3_4.png b/Concepts_Of_Modern_Physics/screenshots/3_4.png
new file mode 100755
index 00000000..b92b080d
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/screenshots/3_4.png
Binary files differ
diff --git a/Concepts_Of_Modern_Physics/screenshots/9_4.png b/Concepts_Of_Modern_Physics/screenshots/9_4.png
new file mode 100755
index 00000000..d208264f
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/screenshots/9_4.png
Binary files differ
diff --git a/Concepts_Of_Modern_Physics/screenshots/9_7.png b/Concepts_Of_Modern_Physics/screenshots/9_7.png
new file mode 100755
index 00000000..2a7cbca2
--- /dev/null
+++ b/Concepts_Of_Modern_Physics/screenshots/9_7.png
Binary files differ
diff --git a/Data_Structures_and_Algorithms_in_Java/README.txt b/Data_Structures_and_Algorithms_in_Java/README.txt
index 4b659a4b..4b659a4b 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/README.txt
+++ b/Data_Structures_and_Algorithms_in_Java/README.txt
diff --git a/Data_Structures_and_Algorithms_in_Java/ch1.ipynb b/Data_Structures_and_Algorithms_in_Java/ch1.ipynb
index 8973ccb0..8973ccb0 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch1.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch1.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch10.ipynb b/Data_Structures_and_Algorithms_in_Java/ch10.ipynb
index 86853ad0..86853ad0 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch10.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch10.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch11.ipynb b/Data_Structures_and_Algorithms_in_Java/ch11.ipynb
index 41231968..41231968 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch11.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch11.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch12.ipynb b/Data_Structures_and_Algorithms_in_Java/ch12.ipynb
index 1be785c9..1be785c9 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch12.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch12.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch13.ipynb b/Data_Structures_and_Algorithms_in_Java/ch13.ipynb
index ab8fea53..ab8fea53 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch13.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch13.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch14.ipynb b/Data_Structures_and_Algorithms_in_Java/ch14.ipynb
index 46aa59dc..46aa59dc 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch14.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch14.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch2.ipynb b/Data_Structures_and_Algorithms_in_Java/ch2.ipynb
index ffbe7f1a..ffbe7f1a 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch2.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch2.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch3.ipynb b/Data_Structures_and_Algorithms_in_Java/ch3.ipynb
index 9081eaf8..9081eaf8 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch3.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch3.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch4.ipynb b/Data_Structures_and_Algorithms_in_Java/ch4.ipynb
index 11002dc8..11002dc8 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch4.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch4.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch5.ipynb b/Data_Structures_and_Algorithms_in_Java/ch5.ipynb
index ecd02576..ecd02576 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch5.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch5.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch6.ipynb b/Data_Structures_and_Algorithms_in_Java/ch6.ipynb
index c95d1bf1..c95d1bf1 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch6.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch6.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch7.ipynb b/Data_Structures_and_Algorithms_in_Java/ch7.ipynb
index 8b6e1954..8b6e1954 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch7.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch7.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/ch8.ipynb b/Data_Structures_and_Algorithms_in_Java/ch8.ipynb
index 5f108760..5f108760 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/ch8.ipynb
+++ b/Data_Structures_and_Algorithms_in_Java/ch8.ipynb
diff --git a/Data_Structures_and_Algorithms_in_Java/screenshots/hashtableslinear.png b/Data_Structures_and_Algorithms_in_Java/screenshots/hashtableslinear.png
index a8a3ab96..a8a3ab96 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/screenshots/hashtableslinear.png
+++ b/Data_Structures_and_Algorithms_in_Java/screenshots/hashtableslinear.png
Binary files differ
diff --git a/Data_Structures_and_Algorithms_in_Java/screenshots/shellsorting.png b/Data_Structures_and_Algorithms_in_Java/screenshots/shellsorting.png
index 4cf4d4ca..4cf4d4ca 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/screenshots/shellsorting.png
+++ b/Data_Structures_and_Algorithms_in_Java/screenshots/shellsorting.png
Binary files differ
diff --git a/Data_Structures_and_Algorithms_in_Java/screenshots/shortestpath.png b/Data_Structures_and_Algorithms_in_Java/screenshots/shortestpath.png
index 876ddd19..876ddd19 100644..100755
--- a/Data_Structures_and_Algorithms_in_Java/screenshots/shortestpath.png
+++ b/Data_Structures_and_Algorithms_in_Java/screenshots/shortestpath.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_10_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_10_2.ipynb
index 3ce6918a..3ce6918a 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_10_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_10_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_12_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_12_2.ipynb
index 1ea7e5cb..1ea7e5cb 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_12_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_12_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_13_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_13_2.ipynb
index a76135e2..a76135e2 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_13_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_13_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_14_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_14_2.ipynb
index 4187d366..4187d366 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_14_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_14_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_15_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_15_2.ipynb
index 4bf91cd7..4bf91cd7 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_15_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_15_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_2_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_2_2.ipynb
index caca2a2c..caca2a2c 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_2_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_2_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_3_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_3_2.ipynb
index 7b594528..7b594528 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_3_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_3_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_4_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_4_2.ipynb
index 038d3cb9..038d3cb9 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_4_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_4_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_5_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_5_2.ipynb
index 424e036e..424e036e 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_5_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_5_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_6_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_6_2.ipynb
index f73c195c..f73c195c 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_6_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_6_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_7_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_7_2.ipynb
index a2411da4..a2411da4 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_7_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_7_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_8_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_8_2.ipynb
index 4fd4268d..4fd4268d 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_8_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_8_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_9_2.ipynb b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_9_2.ipynb
index deaf5ff4..deaf5ff4 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_9_2.ipynb
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/CHAPTER_9_2.ipynb
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/README.txt b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/README.txt
index 6e8a4b95..6e8a4b95 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/README.txt
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/README.txt
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1.png
index f40cf8e9..f40cf8e9 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_1.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_1.png
index f40cf8e9..f40cf8e9 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_1.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_1.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_2.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_2.png
index 8fd3190d..8fd3190d 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_2.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/1_2.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2.png
index 033d3704..033d3704 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_1.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_1.png
index 033d3704..033d3704 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_1.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_1.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_2.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_2.png
index f40cf8e9..f40cf8e9 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_2.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/2_2.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3.png
index 8fd3190d..8fd3190d 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_1.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_1.png
index 8fd3190d..8fd3190d 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_1.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_1.png
Binary files differ
diff --git a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_2.png b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_2.png
index 033d3704..033d3704 100644..100755
--- a/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_2.png
+++ b/Electrical_Power_Systems:_Concepts,_Theory_and_Practice/screenshots/3_2.png
Binary files differ
diff --git a/Electronic_Devices/Chapter1.ipynb b/Electronic_Devices/Chapter1.ipynb
new file mode 100755
index 00000000..a4646948
--- /dev/null
+++ b/Electronic_Devices/Chapter1.ipynb
@@ -0,0 +1,156 @@
+{
+ "metadata": {
+ "name": "Chapter_1"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 1: Semiconductor Basics<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 1.1(a), Page Number:29<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_bias=10.0; #bias voltage in volt",
+ "R_limit=1000; #limiting resistance in ohm",
+ "r_d =10.0; #r_d value",
+ "",
+ "#calculation",
+ "#IDEAL MODEL",
+ "print \"IDEAL MODEL\"",
+ "V_f=0; #voltage in volt",
+ "I_f=V_bias/R_limit; #foward current",
+ "V_R_limit=I_f*R_limit; #limiting voltage",
+ "print \"forward voltage = %.2f volts\" %V_f",
+ "print \"forward current = %.2f amperes\" %I_f",
+ "print \"voltage across limiting resistor = %.2f volts\" %V_R_limit",
+ "",
+ "#PRACTICAL MODEL",
+ "print \"\\nPRACTICAL MODEL\"",
+ "V_f=0.7; #voltage in volt",
+ "I_f=(V_bias-V_f)/R_limit; #foward current",
+ "V_R_limit=I_f*R_limit; #limiting voltage",
+ "print \"forward voltage = %.2f volts\" %V_f",
+ "print \"forward current = %.3f amperes\" %I_f",
+ "print \"voltage across limiting resistor = %.2f volts\" %V_R_limit",
+ "",
+ "#COMPLETE MODEL",
+ "print \"\\nCOMPLETE MODEL\"",
+ "I_f=(V_bias-0.7)/(R_limit+r_d); #foward current",
+ "V_f=0.7+I_f*r_d; #forward voltage",
+ "V_R_limit=I_f*R_limit; #limiting voltage",
+ "print \"forward voltage = %.3f volts\" %V_f",
+ "print \"forward current = %.3f amperes\" %I_f",
+ "print \"voltage across limiting resistor = %.2f volts\" %V_R_limit"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "IDEAL MODEL",
+ "forward voltage = 0.00 volts",
+ "forward current = 0.01 amperes",
+ "voltage across limiting resistor = 10.00 volts",
+ "",
+ "PRACTICAL MODEL",
+ "forward voltage = 0.70 volts",
+ "forward current = 0.009 amperes",
+ "voltage across limiting resistor = 9.30 volts",
+ "",
+ "COMPLETE MODEL",
+ "forward voltage = 0.792 volts",
+ "forward current = 0.009 amperes",
+ "voltage across limiting resistor = 9.21 volts"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 1.1(b), Page Number:29<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_bias=5; #bias voltage in volt",
+ "I_R=1*10**-6; #current",
+ "R_limit=1000 #in Ohm",
+ "",
+ "#calculation",
+ "#IDEAL MODEL",
+ "print \"IDEAL MODEL\"",
+ "I_r=0.0; #current in ampere",
+ "V_R=V_bias; #voltages are equal",
+ "V_R_limit=I_r*R_limit; #limiting voltage",
+ "print \"Reverse voltage across diode = %.2f volts\" %V_R",
+ "print \"Reverse current through diode= %.2f amperes\" %I_r",
+ "print \"voltage across limiting resistor = %.2f volts\" %V_R_limit",
+ "",
+ "#PRACTICAL MODEL",
+ "print \"\\nPRACTICAL MODEL\"",
+ "I_r=0.0; #current in ampere",
+ "V_R=V_bias; #voltages are equal",
+ "V_R_limit=I_r*R_limit; #limiting voltage",
+ "print \"Reverse voltage across diode= %.2f volts\" %V_R",
+ "print \"Reverse current through diode = %.2f amperes\" %I_r",
+ "print \"voltage across limiting resistor = %.2f volts\" %V_R_limit",
+ "",
+ "#COMPLETE MODEL",
+ "print \"\\nCOMPLETE MODEL\"",
+ "I_r=I_R; #current in ampere",
+ "V_R_limit=I_r*R_limit; #limiting voltage",
+ "V_R=V_bias-V_R_limit; #voltage in volt",
+ "print \"Reverse voltage across diode = %.3f volts\" %V_R",
+ "print \"Reverse current through diode = %d micro Amp\" %(I_r*10**6)",
+ "print \"voltage across limiting resistor = %d mV\" %(V_R_limit*1000)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "IDEAL MODEL",
+ "Reverse voltage across diode = 5.00 volts",
+ "Reverse current through diode= 0.00 amperes",
+ "voltage across limiting resistor = 0.00 volts",
+ "",
+ "PRACTICAL MODEL",
+ "Reverse voltage across diode= 5.00 volts",
+ "Reverse current through diode = 0.00 amperes",
+ "voltage across limiting resistor = 0.00 volts",
+ "",
+ "COMPLETE MODEL",
+ "Reverse voltage across diode = 4.999 volts",
+ "Reverse current through diode = 1 micro Amp",
+ "voltage across limiting resistor = 1 mV"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter10.ipynb b/Electronic_Devices/Chapter10.ipynb
new file mode 100755
index 00000000..ad380243
--- /dev/null
+++ b/Electronic_Devices/Chapter10.ipynb
@@ -0,0 +1,740 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:46b495ee163997b315e5d2a4308b2429d2950dd9bb4f2a5562e7098cc144cbec"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 10: Amplifier Frequency Response<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.1, Page Number: 311<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "A_p=250.0\n",
+ "A_p_dB=10*math.log10(A_p)\n",
+ "print('Power gain(dB) when power gain is 250 = %d'% math.ceil(A_p_dB));\n",
+ "A_p=100.0\n",
+ "A_p_dB=10*math.log10(A_p)\n",
+ "print('Power gain(dB) when power gain is 100 = %d'%A_p_dB)\n",
+ "A_p=10.0\n",
+ "A_p_dB=20*math.log10(A_p)\n",
+ "print('Voltage gain(dB) when Voltage gain is 10 = %d'%A_p_dB)\n",
+ "A_p=0.50\n",
+ "A_p_dB=10*math.log10(A_p)\n",
+ "print('Power gain(dB) when voltage gain is 0.50 = %d'%A_p_dB)\n",
+ "A_p=0.707\n",
+ "A_p_dB=20*math.log10(A_p)\n",
+ "print('Power gain(dB) when power gain is 0.707 = %d'%A_p_dB)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power gain(dB) when power gain is 250 = 24\n",
+ "Power gain(dB) when power gain is 100 = 20\n",
+ "Voltage gain(dB) when Voltage gain is 10 = 20\n",
+ "Power gain(dB) when voltage gain is 0.50 = -3\n",
+ "Power gain(dB) when power gain is 0.707 = -3"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.2, Page Number: 313<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "v_out=0.707*10;\n",
+ "print('output voltage in volts at -3dB gain = %.2f'%v_out)\n",
+ "#at -6dB voltage gain from table is 0.5\n",
+ "v_out=0.5*10;\n",
+ "print('output voltage in volts at -6dB gain = %d'%v_out)\n",
+ "#at -12dB voltage gain from table is 0.25\n",
+ "v_out=0.25*10;\n",
+ "print('output voltage in volts at -12dB gain = %.1f'%v_out)\n",
+ "#at -24dB voltage gain from table is 0.0625\n",
+ "v_out=0.0625*10;\n",
+ "print('output voltage in volts at -24dB gain = %.3f'%v_out)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage in volts at -3dB gain = 7.07\n",
+ "output voltage in volts at -6dB gain = 5\n",
+ "output voltage in volts at -12dB gain = 2.5\n",
+ "output voltage in volts at -24dB gain = 0.625"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.3, Page Number: 316<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "R_in=1.0*10**3;\n",
+ "C1=1.0*10**-6;\n",
+ "A_v_mid=100.0; #mid range voltage gain\n",
+ "f_c=1/(2*math.pi*R_in*C1);\n",
+ "#at f_c, capacitive reactance is equal to resistance(X_C1=R_in)\n",
+ "attenuation=0.707;\n",
+ "#A_v is gain at lower critical frequency\n",
+ "A_v=0.707*A_v_mid;\n",
+ "print('lower critical frequency = %f Hz'%f_c)\n",
+ "print('attenuation at lower critical frequency =%.3f'%attenuation)\n",
+ "print('gain at lower critical frequency = %.1f'%A_v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower critical frequency = 159.154943 Hz\n",
+ "attenuation at lower critical frequency =0.707\n",
+ "gain at lower critical frequency = 70.7"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.4, Page Number: 317<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "A_v_mid=100.0;\n",
+ "#At 1Hz frequency,voltage gain is 3 dB less than at midrange. At -3dB, the voltage is reduced by a factor of 0.707\n",
+ "A_v=0.707*A_v_mid;\n",
+ "print('actual voltage gain at 1Hz frequency = %.1f'%A_v)\n",
+ "#At 100Hz frequency,voltage gain is 20 dB less than at critical frequency (f_c ). At -20dB, the voltage is reduced by a factor of 0.1\n",
+ "A_v=0.1*A_v_mid;\n",
+ "print('actual voltage gain at 100Hz frequency = %d'%A_v)\n",
+ "#At 10Hz frequency,voltage gain is 40 dB less than at critical frequency (f_c). At -40dB, the voltage is reduced by a factor of 0.01\n",
+ "A_v=0.01*A_v_mid;\n",
+ "print('actual voltage gain at 10Hz frequency = %d'%A_v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "actual voltage gain at 1Hz frequency = 70.7\n",
+ "actual voltage gain at 100Hz frequency = 10\n",
+ "actual voltage gain at 10Hz frequency = 1"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.5, Page Number: 319<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "R_C=10.0*10**3;\n",
+ "C3=0.1*10**-6;\n",
+ "R_L=10*10**3;\n",
+ "A_v_mid=50;\n",
+ "f_c=1/(2*math.pi*(R_L+R_C)*C3);\n",
+ "print('lower critical frequency = %f Hz'%f_c)\n",
+ "#at midrange capacitive reactance is zero\n",
+ "X_C3=0;\n",
+ "attenuation=R_L/(R_L+R_C); \n",
+ "print('attenuation at midrange frequency = %.1f'%attenuation)\n",
+ "#at critical frequency, capacitive reactance equals total resistance\n",
+ "X_C3=R_L+R_C;\n",
+ "attenuation=R_L/(math.sqrt((R_C+R_L)**2+X_C3**2));\n",
+ "print('attenuation at critical frequency = %f'%attenuation)\n",
+ "A_v=0.707*A_v_mid;\n",
+ "print('gain at critical frequency = %.2f'%A_v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower critical frequency = 79.577472 Hz\n",
+ "attenuation at midrange frequency = 0.5\n",
+ "attenuation at critical frequency = 0.353553\n",
+ "gain at critical frequency = 35.35"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.6, Page Number: 321<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "B_ac=100.0;\n",
+ "r_e=12.0;\n",
+ "R1=62.0*10**3;\n",
+ "R2=22.0*10**3;\n",
+ "R_S=1.0*10**3;\n",
+ "R_E=1.0*10**3;\n",
+ "C2=100.0*10**-6;\n",
+ "#Base circuit impedance= parallel combination of R1, R2, R_S\n",
+ "R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);\n",
+ "#Resistance looking at emitter\n",
+ "R_in_emitter=r_e+(R_th/B_ac);\n",
+ "#resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter\n",
+ "R=(R_in_emitter*R_E)/(R_E+R_in_emitter);\n",
+ "f_c=1/(2*math.pi*R*C2);\n",
+ "print('critical frequency of bypass RC circuit = %f Hz'%f_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical frequency of bypass RC circuit = 75.893960 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.7, Page Number:323<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "V_GS=-10.0;\n",
+ "I_GSS=25.0*10**-9;\n",
+ "R_G=10.0*10**6;\n",
+ "C1=0.001*10**-6;\n",
+ "R_in_gate=abs((V_GS/I_GSS));\n",
+ "R_in=(R_in_gate*R_G)/(R_G+R_in_gate);\n",
+ "f_c=1/(2*math.pi*R_in*C1);\n",
+ "print('critical frequency = %f Hz'%f_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical frequency = 16.313382 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.8, Page Number: 324<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "V_GS=-12.0;\n",
+ "I_GSS=100.0*10**-9;\n",
+ "R_G=10.0*10**6;\n",
+ "R_D=10.0*10**3;\n",
+ "C1=0.001*10**-6;\n",
+ "C2=0.001*10**-6;\n",
+ "R_in_gate=abs((V_GS/I_GSS));\n",
+ "R_in=(R_in_gate*R_G)/(R_G+R_in_gate);\n",
+ "R_L=R_in; #according to question\n",
+ "f_c_input=1/(2*math.pi*R_in*C1);\n",
+ "print('critical frequency of input RC circuit = %f Hz'%f_c_input)\n",
+ "f_c_output=1/(2*math.pi*(R_D+R_L)*C2)\n",
+ "print('critical frequency of output RC circuit = %f Hz'%f_c_output)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical frequency of input RC circuit = 17.241786 Hz\n",
+ "critical frequency of output RC circuit = 17.223127 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.9, Page Number: 327<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "B_ac=100.0;\n",
+ "r_e=16.0;\n",
+ "R1=62.0*10**3;\n",
+ "R2=22.0*10**3;\n",
+ "R_S=600.0;\n",
+ "R_E=1.0*10**3;\n",
+ "R_C=2.2*10**3;\n",
+ "R_L=10.0*10**3;\n",
+ "C1=0.1*10**-6;\n",
+ "C2=10.0*10**-6;\n",
+ "C3=0.1*10**-6;\n",
+ "#input RC circuit\n",
+ "R_in=(B_ac*r_e*R1*R2)/(B_ac*r_e*R1+B_ac*r_e*R2+R1*R2);\n",
+ "f_c_input=1/(2*math.pi*(R_S+R_in)*C1);\n",
+ "print('input frequency = %f Hz'%f_c_input)\n",
+ "#For bypass circuit; Base circuit impedance= parallel combination of R1, R2, R_S\n",
+ "R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);\n",
+ "#Resistance looking at emitter\n",
+ "R_in_emitter=r_e+(R_th/B_ac);\n",
+ "#resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter\n",
+ "R=(R_in_emitter*R_E)/(R_E+R_in_emitter);\n",
+ "f_c_bypass=1/(2*math.pi*R*C2);\n",
+ "print('critical frequency of bypass RC circuit = %f Hz'%f_c_bypass)\n",
+ "f_c_output=1/(2*math.pi*(R_C+R_L)*C3)\n",
+ "print('output frequency circuit = %f Hz'%f_c_output)\n",
+ "R_c=R_C*R_L/(R_C+R_L);\n",
+ "A_v_mid=R_c/r_e;\n",
+ "attenuation=R_in/(R_in+R_S);\n",
+ "A_v=attenuation*A_v_mid; #overall voltage gain\n",
+ "A_v_mid_dB=20*math.log10(A_v); \n",
+ "print('overall voltage gain in dB = %f'%A_v_mid_dB)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input frequency = 773.916632 Hz\n",
+ "critical frequency of bypass RC circuit = 746.446517 Hz\n",
+ "output frequency circuit = 130.454871 Hz\n",
+ "overall voltage gain in dB = 38.042470"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.10, Page Number: 330<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "B_ac=125.0;\n",
+ "C_be=20.0*10**-12;\n",
+ "C_bc=2.4*10**-12;\n",
+ "R1=22.0*10**3;\n",
+ "R2=4.7*10**3;\n",
+ "R_E=470.0;\n",
+ "R_S=600.0;\n",
+ "R_L=2.2*10**3;\n",
+ "V_CC=10.0;\n",
+ "V_B=(R2/(R1+R2))*V_CC;\n",
+ "V_E=V_B-0.7;\n",
+ "I_E=V_E/R_E;\n",
+ "r_e=25.0*10**-3/I_E;\n",
+ "#total resistance of input circuit is parallel combination of R1,R2,R_s,B_ac*r_e\n",
+ "R_in_tot=B_ac*r_e*R1*R2*R_S/(B_ac*r_e*R1*R2+B_ac*r_e*R1*R_S+B_ac*r_e*R2*R_S+R1*R2*R_S);\n",
+ "R_c= 1100.0#R_C*R_L/(R_C+R_L)\n",
+ "A_v_mid=R_c/r_e;\n",
+ "C_in_Miller=C_bc*(A_v_mid+1)\n",
+ "C_in_tot=C_in_Miller+C_be;\n",
+ "C_in_tot=C_in_tot*10**10\n",
+ "f_c=1/(2*math.pi*R_in_tot*C_in_tot);\n",
+ "print('total resistance of circuit = %f Ohm'%R_in_tot)\n",
+ "print('total capacitance = %f * 10^-10 F'%C_in_tot)\n",
+ "print('critical frequency = %f Hz'%f_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total resistance of circuit = 377.815676 Ohm\n",
+ "total capacitance = 2.606290 * 10^-10 F\n",
+ "critical frequency = 0.000162 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.11, Page Number: 333<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "C_bc=2.4*10**-12; #from previous question\n",
+ "A_v=99.0; #from previous question\n",
+ "R_C=2.2*10**3;\n",
+ "R_L=2.2*10**3;\n",
+ "R_c=R_C*R_L/(R_C+R_L);\n",
+ "C_out_Miller=C_bc*(A_v+1)/A_v;\n",
+ "f_c=1/(2*math.pi*R_c*C_bc); #C_bc is almost equal to C_in_Miller\n",
+ "C_out_Miller=C_out_Miller*10**12\n",
+ "print('equivalent resistance = %d Ohm'%R_c)\n",
+ "print('equivalent capacitance =%f *10^-12 F'%C_out_Miller)\n",
+ "print('critical frequency =%f Hz'%f_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "equivalent resistance = 1100 Ohm\n",
+ "equivalent capacitance =2.424242 *10^-12 F\n",
+ "critical frequency =60285963.292385 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.12, Page Number: 334<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "C_iss=6.0*10**-12;\n",
+ "C_rss=2.0*10**-12;\n",
+ "C_gd=C_rss;\n",
+ "C_gs=C_iss-C_rss;\n",
+ "C_gd=C_gd*10**12\n",
+ "C_gs=C_gs*10**12\n",
+ "print('gate to drain capacitance = %.1f * 10^-12 F'%C_gd)\n",
+ "print('gate to source capacitance = %.1f * 10^-12 F'%C_gs)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gate to drain capacitance = 2.0 * 10^-12 F\n",
+ "gate to source capacitance = 4.0 * 10^-12 F"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.13, Page Number:335 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "C_iss=8.0*10**-12;\n",
+ "C_rss=3.0*10**-12;\n",
+ "g_m=6500.0*10**-6; #in Siemens\n",
+ "R_D=1.0*10**3;\n",
+ "R_L=10.0*10**6;\n",
+ "R_s=50.0;\n",
+ "C_gd=C_rss;\n",
+ "C_gs=C_iss-C_rss;\n",
+ "R_d=R_D*R_L/(R_D+R_L);\n",
+ "A_v=g_m*R_d;\n",
+ "C_in_Miller=C_gd*(A_v+1);\n",
+ "C_in_tot=C_in_Miller+C_gs;\n",
+ "f_c=1/(2*math.pi*C_in_tot*R_s);\n",
+ "print('critical frequency of input RC circuit =%.3f *10^8 Hz'%(f_c*10**-8))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical frequency of input RC circuit =1.158 *10^8 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.14, Page Number: 336<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "C_gd=3.0*10**-12; #from previous question\n",
+ "A_v=6.5; #from previous question\n",
+ "R_d=1.0*10**3; #from previous question\n",
+ "C_out_Miller=C_gd*(A_v+1)/A_v;\n",
+ "f_c=1/(2*math.pi*R_d*C_out_Miller);\n",
+ "print('critical frequency of the output circuit = %d Hz'%f_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical frequency of the output circuit = 45978094 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.15, Page Number: 339<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "f_cu=2000.0;\n",
+ "f_cl=200.0;\n",
+ "BW=f_cu-f_cl;\n",
+ "print('bandwidth = %d Hz'%BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth = 1800 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.16, Page Number: 340<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "f_T=175.0*10**6; #in hertz\n",
+ "A_v_mid=50.0;\n",
+ "BW=f_T/A_v_mid;\n",
+ "print('bandwidth = %d Hz'%BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth = 3500000 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.17, Page Number: 341<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "f_cl=1.0*10**3; #lower critical frequency of 2nd stage in hertz\n",
+ "f_cu=100.0*10**3; #upper critical frequency of 1st stage in hertz\n",
+ "BW=f_cu-f_cl;\n",
+ "print('bandwidth = %d Hz'%BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth = 99000 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.18, Page Number: 341<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "n=2.0; #n is the number of stages of amplifier\n",
+ "f_cl=500.0;\n",
+ "f_cu=80.0*10**3;\n",
+ "f_cl_new=f_cl/(math.sqrt(2**(1/n)-1));\n",
+ "f_cu_new=f_cu*(math.sqrt(2**(1/n)-1));\n",
+ "BW=f_cu_new-f_cl_new;\n",
+ "print('bandwidth = %f Hz'%BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth = 50710.653245 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter11.ipynb b/Electronic_Devices/Chapter11.ipynb
new file mode 100755
index 00000000..966e3619
--- /dev/null
+++ b/Electronic_Devices/Chapter11.ipynb
@@ -0,0 +1,172 @@
+{
+ "metadata": {
+ "name": "Chapter_11"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 11: Thyristors and other Devices<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 11.1, Page Number: 353<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "V_AK=20.0; #VOLTAGE ACROSS ANODE",
+ "I_A=1*10**-6;",
+ "R_AK=V_AK/I_A;",
+ "print('Resistance = %d * 10^6 Ohm'%(R_AK/10**6))"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance = 20 * 10^6 Ohm"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 11.2, Page Number: 354<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_S=10**3;",
+ "V_BIAS=110.0;",
+ "V_BE=0.7;",
+ "V_CE_sat=0.1;",
+ "V_A=V_BE+V_CE_sat; #VOLTAGE ACROSS ANODE",
+ "V_R_s=V_BIAS-V_A; #VOLTAGE ACROSS R_S",
+ "I_A=V_R_s/R_S;",
+ "print('Anode current = %f A'%I_A)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Anode current = 0.109200 A"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 11.3, Page Number: 364<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "n=0.6;",
+ "V_BB=20.0;",
+ "V_pn=0.7;",
+ "V_P=n*V_BB+V_pn;",
+ "print('peak point emitter voltage = %.1f Volts'%V_P)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak point emitter voltage = 12.7 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 11.4, page Number: 366<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "V_BB=30.0;",
+ "V_P=14.0;",
+ "I_P=20.0*10**-6;",
+ "V_V=1.0;",
+ "I_V=10.0*10**-3;",
+ "x=(V_BB-V_P)/I_P;",
+ "y=(V_BB-V_V)/I_V;",
+ "print('R1 should be less than %d Ohms'%x)",
+ "print('R1 should be more than %d Ohms'%y)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R1 should be less than 800000 Ohms",
+ "R1 should be more than 2900 Ohms"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 11.5, Page Number: 376<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "n2=1.3; #cladding index",
+ "n1=1.35; #core index",
+ "theta=math.acos(n2/n1);",
+ "t=theta*180/math.pi;",
+ "print('critical angle in degrees \\n\\t%f'%t)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical angle in degrees ",
+ "\t15.642471"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter12.ipynb b/Electronic_Devices/Chapter12.ipynb
new file mode 100755
index 00000000..3f9f927c
--- /dev/null
+++ b/Electronic_Devices/Chapter12.ipynb
@@ -0,0 +1,458 @@
+{
+ "metadata": {
+ "name": "Chapter_12"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 12: The Operational Amplifier<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.1, Page Number: 392<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "A_ol=100000.0; #open loop voltage gain",
+ "A_cm=0.2; #common mode gain",
+ "CMRR=A_ol/A_cm;",
+ "CMRR_dB=20*math.log10(CMRR);",
+ "print('CMRR = %d'%CMRR)",
+ "print('CMRR in decibels = %f'%CMRR_dB)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CMRR = 500000",
+ "CMRR in decibels = 113.979400"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.2, Page Number: 395<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "del_t=1.0; # in microseconds",
+ "#lower limit is -9V and upper limit is 9V from the graph",
+ "del_V_out=9.0-(-9.0);",
+ "slew_rate=del_V_out/del_t;",
+ "print('slew rate =%d V/microseconds'%slew_rate)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "slew rate =18 V/microseconds"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.3, Page Number: 400<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_f=100*10**3;",
+ "R_i=4.7*10**3;",
+ "A_cl_NI=1+(R_f/R_i);",
+ "print('closed loop voltage gain = %f'%A_cl_NI)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop voltage gain = 22.276596"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.4,Page Number: 402<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_i=2.2*10**3;",
+ "A_cl=-100.0; #closed loop voltage gain",
+ "R_f=abs(A_cl)*R_i;",
+ "print('value of R_f = %d ohms'%R_f)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R_f = 220000 ohms"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.5, Page Number: 404<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "Z_in=2*10**6;",
+ "Z_out=75.0;",
+ "A_ol=200000.0;",
+ "R_f=220.0*10**3;",
+ "R_i=10.0*10**3;",
+ "B=R_i/(R_i+R_f); #B is attenuation",
+ "Z_in_NI=(1+A_ol*B)*Z_in;",
+ "Z_out_NI=Z_out/(1+A_ol*B);",
+ "A_cl_NI=1+(R_f/R_i);",
+ "Z_in_NI=Z_in_NI/10**10",
+ "print('input impedance = %f * 10^10 ohms'%Z_in_NI)",
+ "print('output impedance = %f ohms'%Z_out_NI)",
+ "print('closed loop voltage gain = %d'%A_cl_NI)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance = 1.739330 * 10^10 ohms",
+ "output impedance = 0.008624 ohms",
+ "closed loop voltage gain = 23"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.6, Page Number: 405<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "B=1.0; #voltage follower configuration",
+ "A_ol=200000.0;",
+ "Z_in=2*10**6;",
+ "Z_out=75.0;",
+ "Z_in_VF=(1+A_ol)*Z_in;",
+ "Z_out_VF=Z_out/(1+A_ol);",
+ "Z_in_VF=Z_in_VF*10**-11",
+ "print('input impedance = %d * 10^11 Ohms'%Z_in_VF)",
+ "print('output impedance = %f Ohms'%Z_out_VF)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance = 4 * 10^11 Ohms",
+ "output impedance = 0.000375 Ohms"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.7, Page Number: 406<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_i=1.0*10**3;",
+ "R_f=100.0*10**3;",
+ "Z_in=4.0*10**6;",
+ "Z_out=50.0;",
+ "A_ol=50000.0;",
+ "B=R_i/(R_i+R_f); #attenuation",
+ "Z_in_I=R_i; #almost equal to R_i",
+ "Z_out_I=Z_out/(1+(A_ol*B));",
+ "A_cl_I=-R_f/R_i;",
+ "print('input impedance = %d Ohms'%Z_in_I)",
+ "print('output impedance = %f Ohms'%Z_out_I)",
+ "print('closed loop voltage gain =%d'%A_cl_I)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance = 1000 Ohms",
+ "output impedance = 0.100796 Ohms",
+ "closed loop voltage gain =-100"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.8, Page Number: 412<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "f_c_ol=100.0;",
+ "A_ol_mid=100000.0;",
+ "f=0.0;",
+ "A_ol=A_ol_mid/(math.sqrt(1+(f/f_c_ol)**2))",
+ "print('open loop gain when f=0Hz is %f'%A_ol);",
+ "f=10.0;",
+ "A_ol=A_ol_mid/(math.sqrt(1+(f/f_c_ol)**2))",
+ "print('open loop gain when f=10Hz is %f'%A_ol)",
+ "f=100.0;",
+ "A_ol=A_ol_mid/(math.sqrt(1+(f/f_c_ol)**2))",
+ "print('open loop gain when f=100Hz is %f'%A_ol)",
+ "f=1000.0;",
+ "A_ol=A_ol_mid/(math.sqrt(1+(f/f_c_ol)**2))",
+ "print('open loop gain when f=1000Hz is %f'%A_ol)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open loop gain when f=0Hz is 100000.000000",
+ "open loop gain when f=10Hz is 99503.719021",
+ "open loop gain when f=100Hz is 70710.678119",
+ "open loop gain when f=1000Hz is 9950.371902"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.9,Page Number: 413<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "f_c=100.0;",
+ "f=1.0;",
+ "theta_rad=-math.atan((f/f_c))",
+ "theta=theta_rad*180/math.pi;",
+ "print('phase lag when f=1Hz = %f degrees'%theta)",
+ "",
+ "f=10.0;",
+ "theta_rad=-math.atan((f/f_c))",
+ "theta=theta_rad*180/math.pi;",
+ "print('phase lag when f=10Hz = %f degrees'%theta)",
+ "f=100.0;",
+ "theta_rad=-math.atan((f/f_c))",
+ "theta=theta_rad*180/math.pi; ",
+ "print('phase lag when f=100Hz = %f degrees'%theta)",
+ "f=1000.0;",
+ "theta_rad=-math.atan((f/f_c))",
+ "theta=theta_rad*180/math.pi;",
+ "print('phase lag when f=1000Hz = %f degrees'%theta)",
+ "f=10000.0;",
+ "theta_rad=-math.atan((f/f_c))",
+ "theta=theta_rad*180/math.pi;",
+ "print('phase lag when f=10000Hz = %f degrees'%theta)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "phase lag when f=1Hz = -0.572939 degrees",
+ "phase lag when f=10Hz = -5.710593 degrees",
+ "phase lag when f=100Hz = -45.000000 degrees",
+ "phase lag when f=1000Hz = -84.289407 degrees",
+ "phase lag when f=10000Hz = -89.427061 degrees"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.10, Page Number: 415<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "A_v1=40.0; #all gains are in decibels",
+ "A_v2=32.0;",
+ "A_v3=20.0;",
+ "f_c1=2*10**3;",
+ "f_c2=40*10**3;",
+ "f_c3=150*10**3;",
+ "f=f_c1;",
+ "A_ol_mid=A_v1+A_v2+A_v3;",
+ "#theta 1",
+ "theta_rad1=-math.atan((f/f_c1))",
+ "theta1=theta_rad1*180/math.pi;",
+ "",
+ "#theta 2",
+ "theta_rad2=-math.atan((f/f_c2))",
+ "theta2=theta_rad2*180/math.pi;",
+ "",
+ "#theta 3",
+ "theta_rad3=-math.atan((f/f_c3))",
+ "theta3=theta_rad3*180/math.pi;",
+ "",
+ "theta_tot=theta1+theta2+theta3;",
+ "print('open loop midrange gain in decibels is %d'%A_ol_mid)",
+ "print('total phase lag in degrees is %d'%theta_tot)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open loop midrange gain in decibels is 92",
+ "total phase lag in degrees is -45"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.11, Page Number: 416<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "A_ol_mid=150000.0; #open loop midrange gain",
+ "B=0.002; #feedback attenuation",
+ "BW_ol=200; #open loop bandwidth",
+ "BW_cl=BW_ol*(1+B*A_ol_mid);",
+ "print('closed loop bandwidth = %d Hz'%BW_cl)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop bandwidth = 60200 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 12.12, Page Number: 417<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "BW=3*10**6; #unity gain bandwidth",
+ "A_ol=100.0; #open loop gain",
+ "print(\"non-inverting amplifier\")",
+ "R_f=220.0*10**3;",
+ "R_i=3.3*10**3;",
+ "A_cl=1+(R_f/R_i); #closed loop gain",
+ "BW_cl=BW/A_cl;",
+ "print('closed loop bandwidth = %f Hz'%BW_cl)",
+ "print(\"inverting amplifier\")",
+ "R_f=47.0*10**3;",
+ "R_i=1.0*10**3;",
+ "A_cl=-R_f/R_i;",
+ "BW_cl=BW/(abs(A_cl));",
+ "print('closed loop bandwidth = %f Hz'%BW_cl)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "non-inverting amplifier",
+ "closed loop bandwidth = 44334.975369 Hz",
+ "inverting amplifier",
+ "closed loop bandwidth = 63829.787234 Hz"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter13.ipynb b/Electronic_Devices/Chapter13.ipynb
new file mode 100755
index 00000000..14a01b6b
--- /dev/null
+++ b/Electronic_Devices/Chapter13.ipynb
@@ -0,0 +1,580 @@
+{
+ "metadata": {
+ "name": "Chapter_13"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 13: Basic Op-amp Circuits<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.1, Page Number: 433<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 177
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import pylab",
+ "import numpy",
+ "",
+ "R2=1.0*10**3;",
+ "R1=8.2*10**3;",
+ "V=15.0;",
+ "V_REF=R2*V/(R1+R2);",
+ "print('V_REF = %f V'%V_REF)",
+ "############PLOT##################################",
+ "",
+ "t = arange(0.001, 2.0, 0.005)",
+ "k = arange(0.0001, 0.0529, 0.0005)",
+ "k1= arange(0.0529, 0.447, 0.0005)",
+ "k2= arange(0.447, 1.053, 0.0005)",
+ "k3= arange(1.053,1.447, 0.0005)",
+ "k4= arange(1.447,2.0, 0.0005)",
+ "m=arange(-12,12,0.0005)",
+ "",
+ "x5=(0.0529*m)/m",
+ "x10=(0.447*m)/m",
+ "x15=(1.053*m)/m",
+ "x25=(1.447*m)/m",
+ "subplot(211)",
+ "plot(t, 5*sin(2*pi*t))",
+ "plot(t,(1.63*t)/t,'--')",
+ "ylim( (-5,5) )",
+ "ylabel('Vin')",
+ "title('Input Waveform')",
+ "",
+ "subplot(212)",
+ "plot(k,-12*k/k,'b')",
+ "plot(k1,12*k1/k1,'b')",
+ "plot(k2,-12*k2/k2,'b')",
+ "plot(k3,12*k3/k3,'b')",
+ "plot(k4,-12*k4/k4,'b')",
+ "plot(x5,m,'b')",
+ "plot(x10,m,'b')",
+ "plot(x15,m,'b')",
+ "plot(x25,m,'b')",
+ "",
+ "ylim( (-13,13) )",
+ "ylabel('Vout')",
+ "xlabel('each time the input exceeds +1.63V,o/p switches to +12 and vice-versa')",
+ "title('Output Waveform')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_REF = 1.630435 V"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 178,
+ "text": [
+ "<matplotlib.text.Text at 0x2f58bd2c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEXCAYAAAC6baP3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYFNfXB/DvglhQMdhQioACAiJFUUSkWCMq9rZ2xcRo\n7ImNqMgv9mhiS4waY429BCtqUMQaLGCJxo6iIAKiFEXaff+4YV6Quri7Mwvn8zw+uLuzM2dnZ+fM\n3CpjjDEQQgghJaQldgCEEEI0CyUOQgghCqHEQQghRCGUOAghhCiEEgchhBCFUOIghBCiEEochEhY\nbGwsPDw8oKenh2nTpokdDiEAKHEQiTEzM0NwcLDKtzNv3jwMHTq00NcXLVqELl265HnO0tKywOf2\n7NmjkhgBYP369ahbty6SkpLwww8/qGw7hCiCEgeRFJlMBplMJnYY8PT0xMWLF5HTPzYmJgaZmZmI\niIhAdna28NyjR4/g4eGhsjiePn0KGxubUr03MzNTydEQwlHiIJK1efNmtGnTBtOmTUPNmjXRsGFD\nBAUFCa97eXlh1qxZcHFxQY0aNdCzZ08kJiYCAEJCQmBiYpJnfTl3M0FBQVi0aBF2796N6tWrw8nJ\nKd+2nZ2dkZGRgYiICADAuXPn0LZtW1hZWeV5zsLCAvXq1cOmTZtga2sLPT09NGrUCOvXrxfWZWNj\ng6NHjwqPMzMzUadOHWE9ly9fRuvWraGvrw9HR0ecPXsWADBixAhs3boVS5cuRfXq1XH69Gmkp6dj\n8uTJMDIygpGREaZMmY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ws7NDly5dkJSUBJ//a+9eThgEoiiA\n3gLEPty4EruwjFeBFdiyDSSbEAKRhNkkCudUMI+3uDPDfJYl4zhmmqYMw3BY17OW27epGKe2bVu6\nrsu6rv8eCg/7vqeq3o7rvqqqVFXmeU6ij1zL6Z5Vp51f5s6l7/uPoZHkcN9dH7kKKw4Amlz+5jgA\nvyU4AGgiOABoIjgAaCI4AGgiOABocgcBjJkyNeWsWwAAAABJRU5ErkJggg==\n"
+ }
+ ],
+ "prompt_number": 178
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.2, Page Number: 436<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R1=100.0*10**3;",
+ "R2=R1;",
+ "V_out_max=5.0;",
+ "V_UTP=R2*V_out_max/(R1+R2);",
+ "V_LTP=-V_out_max*R2/(R1+R2);",
+ "print('upper trigger point = %.1f Volts'%V_UTP)",
+ "print('lower trigger point = %.1f Volts'%V_LTP)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "upper trigger point = 2.5 Volts",
+ "lower trigger point = -2.5 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 179
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.3, Page Number: 437<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import pylab",
+ "import numpy",
+ "",
+ "R1=100.0*10**3;",
+ "R2=47.0*10**3;",
+ "V_R1=4.7+0.7; #one zener is always forward biased with forward voltage 0.7V ",
+ "#V_R1 can be positive or negative",
+ "I_R1=V_R1/R1; ",
+ "I_R2=I_R1;",
+ "V_R2=R2*I_R2;",
+ "V_out=V_R1+V_R2; #positive or negative",
+ "",
+ "print ('I_R1 = \u00b1%d uA' %(I_R1*10**6))",
+ "print ('V_R2 = \u00b1%.2f V' %(V_R2))",
+ "print('max output voltage = \u00b1 %.2f V'%V_out)",
+ "print('\\nV_UTP = + %.2f V' %(V_R2))",
+ "print('V_LTP = - %.2f V' %(V_R2))",
+ "",
+ "################PLOT######################################",
+ "t = arange(0.0, 1.0, 0.0005)",
+ "t1=arange(0.0001,0.085,0.0005)",
+ "t2=arange(0.0001,0.585,0.0005)",
+ "t3=arange(0.585,1.0,0.0005)",
+ "t4=arange(0.085,0.585,0.0005)",
+ "",
+ "m=arange(-7.94,7.94,0.0005)",
+ "x1=(0.085*m)/m",
+ "x5=(0.585*m)/m",
+ "",
+ "subplot(211)",
+ "plot(t, 5*sin(2*pi*t))",
+ "plot(t1,2.54*t1/t1,'--')",
+ "plot(t2,-2.54*t2/t2,'--')",
+ "text(0.09,1.95,'(0.085,2.54)')",
+ "text(0.586,-2,'(0.585,-2.54)')",
+ "#annotate('(0.085,2.54)',(0.085,2.54),(0.3,2.5),arrowprops = dict(facecolor='black',shrink=0.09,xycoords='data',textcoords='axes fraction'))",
+ "ylim( (-6,6) )",
+ "ylabel('Vin')",
+ "title('Input Waveform')",
+ "",
+ "subplot(212)",
+ "plot(t1,7.94*t1/t1,'b')",
+ "plot(t3,7.94*t3/t3,'b')",
+ "plot(t4,-7.94*t4/t4,'b')",
+ "plot(x1,m,'b')",
+ "plot(x5,m,'b')",
+ "ylim( (-9,9) )",
+ "title('Source and output AC voltage')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I_R1 = \u00b154 uA",
+ "V_R2 = \u00b12.54 V",
+ "max output voltage = \u00b1 7.94 V",
+ "",
+ "V_UTP = + 2.54 V",
+ "V_LTP = - 2.54 V"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 180,
+ "text": [
+ "<matplotlib.text.Text at 0x2f9fbf2c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEICAYAAABS0fM3AAAABHNCSVQICAgIfAhkiAAAAAlwSFl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s7e0l\niFA66pTF0qVL4erqisjISFy/fh3e3t6IiYmBgYGBBBFWL+U5b2okEVhaWiIpKUn1e1JSkqp6W9Y2\nt27dgqWlpWQxSkWdsgCA2NhYTJ48GeHh4S+sGtZk6pTFH3/8AX9/fwCig/DQoUPQ09ODn5+fpLFW\nNXXKonnz5mjSpAkaNGiABg0aoFu3boiJial1iUCdsjh9+jQ+/fRTAICtrS1sbGxw5coVuLu7Sxqr\nppX7vFkpPRivqLCwkFq1akUJCQmUn5//0s7iM2fO1NoOUnXK4saNG2Rra0tnzpzRUJTSUKcsnjVu\n3Djas2ePhBFKR52yiI+Pp549e5JCoaDc3FxycnKiuLg4DUVcddQpixkzZlBQUBAREd2+fZssLS0p\nMzNTE+FWuYSEBLU6i1/lvKmRGoGuri6+/vpr9O7dG0qlEhMnToSDgwN++OEHAMCUKVPQt29fHDx4\nEHZ2dtDX18emTZs0EWqVU6csFi1ahKysLFW7uJ6eHuRyuSbDrhLqlIW2UKcs2rRpgz59+sDZ2Rk6\nOjqYPHkyHB0dNRx55VOnLObNm4fx48fDxcUFRUVFWLFiBYyNjTUceeULCAhAVFQUMjIy0Lx5cyxc\nuBCFhYUAKnberHaDzjHGGJMWP1nMGGNajhMBY4xpOU4EjDGm5TgRMMaYluNEwBhjWo4TAWOMabn/\nB0HRkFnTYYNDAAAAAElFTkSuQmCC\n"
+ }
+ ],
+ "prompt_number": 180
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.4, Page Number: 440<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "V_IN1=3.0;",
+ "V_IN2=1.0;",
+ "V_IN3=8.0;",
+ "#all resistors are of equal value so weight of each input is 1",
+ "V_OUT=-(V_IN1+V_IN2+V_IN3);",
+ "print('output voltage = %d Volts'%V_OUT)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage = -12 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 181
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.5, Page Number: 440<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_f=10.0*10**3;",
+ "R1=1.0*10**3;",
+ "R2=R1;",
+ "R=R1;",
+ "V_IN1=0.2;",
+ "V_IN2=0.5;",
+ "V_OUT=-(R_f/R)*(V_IN1+V_IN2);",
+ "print('output voltage of the summing amplifier = %d Volts'%V_OUT)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage of the summing amplifier = -7 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 182
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.6, Page Number: 441<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_f=25.0*10**3;",
+ "R1=100.0*10**3;",
+ "R2=R1;",
+ "R3=R1;",
+ "R4=R1;",
+ "R=R1;",
+ "V_IN1=1.0;",
+ "V_IN2=2.0;",
+ "V_IN3=3.0;",
+ "V_IN4=4.0;",
+ "V_OUT=-(R_f/R)*(V_IN1+V_IN2+V_IN3+V_IN4);",
+ "print('output voltage = %.1f Volts'%V_OUT)",
+ "V_IN_avg=(V_IN1+V_IN2+V_IN3+V_IN4)/4;",
+ "if abs(V_OUT)==V_IN_avg:",
+ " print('The amplifier produces an output whose magnitude\\n is the mathematical average of the input voltages')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage = -2.5 Volts",
+ "The amplifier produces an output whose magnitude",
+ " is the mathematical average of the input voltages"
+ ]
+ }
+ ],
+ "prompt_number": 183
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.7, Page Number: 442<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "V_IN1=3.0;",
+ "V_IN2=2.0;",
+ "V_IN3=8.0;",
+ "R_f=10.0*10**3;",
+ "R1=47.0*10**3;",
+ "R2=100.0*10**3;",
+ "R3=10.0*10**3;",
+ "weight_of_input1=R_f/R1;",
+ "weight_of_input2=R_f/R2;",
+ "weight_of_input3=R_f/R3;",
+ "V_OUT=-(weight_of_input1*V_IN1+weight_of_input2*V_IN2+weight_of_input3*V_IN3);",
+ "print('weight_of_input1 = %f'%weight_of_input1)",
+ "print('weight_of_input2 = %.1f'%weight_of_input2)",
+ "print('weight_of_input3 = %d'%weight_of_input3)",
+ "print('output voltage = %f Volts'%V_OUT)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "weight_of_input1 = 0.212766",
+ "weight_of_input2 = 0.1",
+ "weight_of_input3 = 1",
+ "output voltage = -8.838298 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 184
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.8, Page Number: 444<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import pylab",
+ "import numpy",
+ "",
+ "",
+ "R_i=10.0*10**3;",
+ "C=0.01*10**-6;",
+ "V_in=2.5-(-2.5);",
+ "PW=100.0*10**-6; #pulse width",
+ "T=2*PW;",
+ "A=2.5;",
+ "op_change_cap_charge=-V_in/(R_i*C);",
+ "op_change_cap_discharge=V_in/(R_i*C);",
+ "print('rate of change of output voltage with respect to time when capacitor is charging = %.1f V/sec'%op_change_cap_charge)",
+ "print('rate of change of output voltage with respect to time when capacitor is discharging =%.1f V/sec'%op_change_cap_discharge)",
+ "del_V_OUT=op_change_cap_discharge*PW;",
+ "print('\\n\\nwhen input is positive, the slope is negative,\\nwhen input is negative, the slope is negative. \\nSo, the output is a triangular wave varying from zero to %.1f V'%(-del_V_OUT))",
+ "",
+ "##############PLOT#############################",
+ "t = arange(0.0, 10.0, 0.0005)",
+ "t1= arange(10.0, 20.0, 0.0005)",
+ "t2= arange(20.0, 30.0, 0.0005)",
+ "t3= arange(30.0, 40.0, 0.0005)",
+ "",
+ "k = arange(0.0001, 10.0, 0.0005)",
+ "k1= arange(10.0, 20.0, 0.0005)",
+ "k2= arange(20.0, 30.0, 0.0005)",
+ "k3= arange(30.0,40.0, 0.0005)",
+ "",
+ "m=arange(-2.5,2.5,0.0005)",
+ "x1=(0.001*m)/m",
+ "x5=(10*m)/m",
+ "x10=(20*m)/m",
+ "x15=(30*m)/m",
+ "x25=(39.99*m)/m",
+ "",
+ "",
+ "subplot(211)",
+ "plot(k,2.5*k/k,'b')",
+ "plot(k1,-2.5*k1/k1,'b')",
+ "plot(k2,2.5*k2/k2,'b')",
+ "plot(k3,-2.5*k3/k3,'b')",
+ "plot(x1,m,'b')",
+ "plot(x5,m,'b')",
+ "plot(x10,m,'b')",
+ "plot(x15,m,'b')",
+ "plot(x25,m,'b')",
+ "",
+ "ylim( (-3,3) )",
+ "ylabel('Vin')",
+ "xlabel('us')",
+ "title('Input to Opamp Integrator')",
+ "",
+ "subplot(212)",
+ "plot(t,(-0.5*t),'b')",
+ "plot(t1,(0.5*t-5),'b')",
+ "plot(t2,(-0.5*t),'b')",
+ "plot(t3,(0.5*t-5),'b')",
+ "",
+ "ylim( (-5,0) )",
+ "ylabel('Vout')",
+ "xlabel('us')",
+ "title('Output of an Integrator')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rate of change of output voltage with respect to time when capacitor is charging = -50000.0 V/sec",
+ "rate of change of output voltage with respect to time when capacitor is discharging =50000.0 V/sec",
+ "",
+ "",
+ "when input is positive, the slope is negative,",
+ "when input is negative, the slope is negative. ",
+ "So, the output is a triangular wave varying from zero to -5.0 V"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 185,
+ "text": [
+ "<matplotlib.text.Text at 0x303b512c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAESCAYAAAD0aQL3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVGX7B/DvsLiCiKIgi6IiKopAmrglbpiVmruiELn0\ne8uS1CQlM5cMRaSyLCv3sMTMUCtQFNfcsBSzXN83UVRSEUVAZJm5f388MbEqDMw5Z2buz3Vx6Qwz\n59w8DM99zrOqiIjAGGPM5JjJHQBjjDF5cAJgjDETxQmAMcZMFCcAxhgzUZwAGGPMRHECYIwxE8UJ\nwES5uroiMTFR7+dZsGABgoKCnhjLvn37dD4HESEyMhLu7u6oV68eWrRogXfeeQf5+fk6H1MqBw4c\ngIuLS6Vem5KSAjMzM2g0Gj1HVbHq/q6YsnACMFEqlQoqlUruMACIWKozHSUkJASrV69GdHQ0srOz\nER8fj8TERIwZM6YGo1QOfU3dUavVT3xNdX5XhYWFOr2P6RExk+Tq6kqJiYlERLR+/Xrq2bMnzZo1\ni2xtbally5YUHx+vfa2fnx/NmTOHunbtSg0aNKAXX3yRMjIyiIho//795OzsXOLYLVq0oL1791J8\nfDzVqlWLLC0tycrKiry9vcvEERgYSGZmZlS3bl2ysrKiyMhIIiLasWMHeXh4UMOGDalPnz50/vz5\ncn+OS5cukbm5OZ08ebLE86mpqVS7dm3av38/EREFBwfTf/7zH/L39ydra2vy8/Ojq1eval8fEhJC\nLi4u1KBBA+rcuTMdPnxY+7358+fTqFGjKDAwkKytrcnT05MuXbpE4eHh1LRpU2revDklJCRUqrxK\nK11+fn5+NG/ePOrZsydZW1vTwIEDKT09nYiIXFxcSKVSkZWVFVlZWdHx48eJiGjt2rXUvn17srW1\npWeffbbEz7V7925yd3cnGxsbmjp1KvXu3ZvWrFlDROL33qNHD5oxYwY1btyY5s2bR//73/+ob9++\n1LhxY7Kzs6MJEybQ/fv3df5dtWjRgiIiIsjT05Pq1Kl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VZ3lxxsXFKa48f//9d/Lx8SEvLy/y9PSkZcuWEREprjwr\nilNp5VncgQMHtKOAqlqeitsRjDHGmDQU0wTEGGNMWpwAGGPMRHECYIwxE8UJgDHGTBRvwsZYBUrv\nWbF8+XLk5OTA1tYWX375JSwsLODh4YHNmzfLHCljuuEEwFglFc2qjIiIQEpKCiwtLfHgwQOZo2JM\nd9wExFgVderUCePHj8c333wDc3NzucNhTGecABirgIWFBTQajfZxbm4uACAuLg6vv/46Tp06haef\nfhpqtVquEBmrFk4AjFXA3t4et2/fRkZGBvLy8vDTTz9Bo9Hg2rVr6NOnD5YuXYrMzEzk5OTIHSpj\nOuE+AMYqYGlpiffeew9du3aFk5MTPDw8oFarERgYiMzMTBAR3nzzTTRo0EDuUBnTCS8FwRhjJoqb\ngBhjzERxAmCMMRPFCYAxxkwUJwDGGDNRnAAYY8xEcQJgjDET9f/0qkid2sgWzAAAAABJRU5ErkJg\ngg==\n"
+ }
+ ],
+ "prompt_number": 185
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 13.9, Page Number: 447<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import pylab",
+ "import numpy",
+ "",
+ "R_f=2.2*10**3;",
+ "C=0.001*10**-6;",
+ "Vc=5.0-(-5.0);",
+ "A=5.0;",
+ "time_const=R_f*C;",
+ "T=10.0*10**-6;",
+ "t=T/2;",
+ "slope=Vc/t;",
+ "V_out=slope*time_const; #V_out is negative when input is positive and V_out is positive when input is negative",
+ "print('output voltage = %.1f V'%V_out)",
+ "print('max output voltage = %.1f V'%V_out)",
+ "print('min output voltage = %.1f V'%(-V_out))",
+ "",
+ "##################PLOt############################",
+ "",
+ "t = arange(0.0, 5.0, 0.0005)",
+ "t1= arange(5.0, 10.0, 0.0005)",
+ "t2= arange(10.0, 15.0, 0.0005)",
+ "t3= arange(15.0, 20.0, 0.0005)",
+ "",
+ "",
+ "k = arange(0.0001, 5.0, 0.0005)",
+ "k1= arange(5.0, 10.0, 0.0005)",
+ "k2= arange(10.0, 15.0, 0.0005)",
+ "k3= arange(15.0, 20.0, 0.0005)",
+ "",
+ "m=arange(-4.4,4.4, 0.0005)",
+ "x1=(0.001*m)/m",
+ "x5=(5*m)/m",
+ "x10=(10*m)/m",
+ "x15=(15*m)/m",
+ "",
+ "",
+ "subplot(211)",
+ "plot(t,(2*t-5),'b')",
+ "plot(t1,(-2*t+5),'b')",
+ "plot(t2,(2*t-5),'b')",
+ "plot(t3,(-2*t+5),'b')",
+ "ylim( (-6,6) )",
+ "ylabel('Vin')",
+ "xlabel('us')",
+ "title('Triangular wave input')",
+ "",
+ "subplot(212)",
+ "plot(k,-4.4*k/k,'b')",
+ "plot(k1,4.4*k1/k1,'b')",
+ "plot(k2,-4.4*k2/k2,'b')",
+ "plot(k3,4.4*k3/k3,'b')",
+ "plot(x1,m,'b')",
+ "plot(x5,m,'b')",
+ "plot(x10,m,'b')",
+ "plot(x15,m,'b')",
+ "ylim( (-5,5) )",
+ "ylabel('Vout')",
+ "xlabel('us')",
+ "title('Output of Opamp Differentiator')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage = 4.4 V",
+ "max output voltage = 4.4 V",
+ "min output voltage = -4.4 V"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 186,
+ "text": [
+ "<matplotlib.text.Text at 0x30f01b4c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAETCAYAAAA/NdFSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcTPn/B/DXjHJJgxKVJhVCl+1CrNxCZdkl1r3Wvb2x\nLMuXZV3CImy+yNpd/NzZsK4hbUrlsmiRu13XLnQhERWq6fP74/NtGLo3M2emeT8fjx7MnOmc95xm\nPu9zPlcRY4yBEEKI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BCi\noygBEEKIjqIEQAghOkrjFoQhRFMkJCSgb9++uHr1KgAgKCgIOTk5MDIywtq1a6Gnpwd7e3uEhIQI\nHCkhlUMJgJByKhpVuXTpUiQkJEBfXx/Pnz8XOCpCKo+qgAipICcnJ/j5+WHHjh2oUaOG0OEQUmmU\nAAgpgZ6eHgoLC+WPX758CQAICwvDN998g4sXL6Jdu3aQyWRChUhIlVACIKQEpqamePToETIzM/H6\n9WscPnwYhYWFSEpKQrdu3bBkyRJkZWUhJydH6FAJqRRqAyCkBPr6+pg7dy7at28PCwsL2NvbQyaT\nYfjw4cjKygJjDJMmTUK9evWEDpWQSqGpIAghREdRFRAhhOgoSgCEEKKjKAEQQoiOogRACCE6ihIA\nIYToKEoAhBCio/4ft47D93McnMsAAAAASUVORK5CYII=\n"
+ }
+ ],
+ "prompt_number": 186
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter14.ipynb b/Electronic_Devices/Chapter14.ipynb
new file mode 100755
index 00000000..453a369d
--- /dev/null
+++ b/Electronic_Devices/Chapter14.ipynb
@@ -0,0 +1,346 @@
+{
+ "metadata": {
+ "name": "Chapter_14"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 14: Special-purpose Op-amp cicuits<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.1, Page Number: 458<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R1=25*10**3;",
+ "R2=R1;",
+ "A_cl=500; #closed loop voltage gain",
+ "R_G=2*R1/(A_cl-1);",
+ "print('value of the external gain setting resistor in ohms = %d'%R_G)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of the external gain setting resistor in ohms = 100"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.2, Page Number: 460<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R1=25.25*10**3; #internal resistors",
+ "R2=R1;",
+ "R_G=510.0;",
+ "A_v=(2*R1/R_G)+1;",
+ "print('voltage gain = %f'%A_v)",
+ "BW=60.0*10**3;",
+ "print('bandwidth from graph = %d hertz'%BW)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain = 100.019608",
+ "bandwidth from graph = 60000 hertz"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.3, Page Number: 462<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R_f1=22.0*10**3;",
+ "R_i1=2.2*10**3;",
+ "R_f2=47.0*10**3;",
+ "R_i2=10.0*10**3;",
+ "A_v1=(R_f1/R_i1)+1; #voltage gain of input stage",
+ "A_v2=(R_f2/R_i2)+1; #voltage gain of output stage",
+ "A_v=A_v1*A_v2;",
+ "print('total voltage gain of the isolation amplifier = %.1f'%A_v)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total voltage gain of the isolation amplifier = 62.7"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.5, Page Number: 466<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "g_m=1000.0*10**-6;",
+ "V_in=25*10**-3;",
+ "I_out=g_m*V_in;",
+ "print('output current = %f A'%I_out)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output current = 0.000025 A"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.6, Page Number: 468<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "V_BIAS=9.0;",
+ "V=V_BIAS;",
+ "R_BIAS=33.0*10**3;",
+ "R_L=10.0*10**3;",
+ "K=16.0; #in microSiemens per microAmpere",
+ "I_BIAS=(V_BIAS-(-V)-1.4)/R_BIAS;",
+ "g_m=K*I_BIAS;",
+ "A_v=g_m*R_L;",
+ "print('voltage gain = %f'%A_v)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain = 80.484848"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.7, Page Number: 469<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import pylab",
+ "import numpy ",
+ "",
+ "",
+ "V_MOD_max=10.0;",
+ "V_MOD_min=1.0;",
+ "V=9.0;",
+ "V_in=50.0*10**-3;",
+ "R_BIAS=56.0*10**3;",
+ "R_L=10.0*10**3;",
+ "K=16.0; #in microSiemens per microAmpere",
+ "I_BIAS_max=(V_MOD_max-(-V)-1.4)/R_BIAS;",
+ "",
+ "g_m_max=K*I_BIAS_max;",
+ "A_v_max=g_m_max*R_L;",
+ "V_out_max=A_v_max*V_in;",
+ "",
+ "I_BIAS_min=(V_MOD_min-(-V)-1.4)/R_BIAS;",
+ "",
+ "g_m_min=K*I_BIAS_min;",
+ "A_v_min=g_m_min*R_L;",
+ "V_out_min=A_v_min*V_in;",
+ "",
+ "###############PLOT#############################",
+ "f=1.0; #assume frequency 1 hertz",
+ "t = arange(0.0001, 4.0, 0.0005)",
+ "y=(((V_out_max/4)-(V_out_min/4))*sin(2*pi*f*t)+((V_out_min/2)+(V_out_max/2))/2)*sin(2*9*pi*f*t);",
+ "",
+ "plot(t,y)",
+ "plot(t,0.61*t/t,'r')",
+ "plot(t,-0.61*t/t,'r')",
+ "ylim( (-2,2) )",
+ "ylabel('Vout')",
+ "title('Modulated Output Voltage')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "<matplotlib.text.Text at 0xa98084c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEICAYAAABMGMOEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsfWl4VdXZ9n0yQuYQMIQkEEYDiICiaBGNCiqDVNRa8RVx\naqlDbdXPflbbClULftW31dJa7Gut1ldFrdYJqKgNTgxVcQKUeQhJGDKReThZ34/Fytlnn7X2fvaQ\nk4F1XxdXTnIe9l7nPs9az7jWDjDGGDQ0NDQ0NGwQ09UD0NDQ0NDoGdAGQ0NDQ0ODBG0wNDQ0NDRI\n0AZDQ0NDQ4MEbTA0NDQ0NEjQBkNDQ0NDgwRtMDSijj179iAmJgbt7e2+yvqBgoICvPvuu1G5V3fH\n3/72N0ydOrWrh6HRjaANhoYlCgoKkJiYiIqKirC/T5w4ETExMdi3b18XjSwSxcXFyM/P93SNQCCA\nQCCgfP/jjz/Geeedh7S0NGRkZGDOnDnYunUr+frXXnstfvnLX3oao5PrFRYW4qmnnor4+6OPPorT\nTjvN0b1iYmKwa9cux2PU6D3QBkPDEoFAAMOGDcPzzz/f8bevvvoKjY2Nlgtrb8S6detw4YUXYu7c\nuS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JlMmJubg9PpREVFBdbW1gzNqAIHlypwc7m5uYnl5WW43e6Y49x8XpeT\ni89IJAJN05CZmYni4mI4HI6YfS4+4+Xk4vPDhw/o6emJDktfJhGfrBtGojMZqs+7LVRer6CgAIFA\nAKurq/B4PKitrTUg2c1JtksVOLk8Pj7Gq1ev4PP5kJaWdmWfi8+/5eTi886dO1hZWUEwGMTs7Kzu\nfzNx8BkvJwefX758gcVigcvl+uu3nZv6ZN0wVGYyLtcEg0FYrVbDMupl0Mt5//796FfZ8vJyhMNh\nHB4eGpozHhxcqsDFZTgcRl1dHRobG3VPClx8xsvJxecF6enpqKysxOLiYsxxLj4vuC4nB59zc3MY\nHx/H48ePUV9fj6mpKbx58yamJhGfrBuGykxGTU0NhoaGAADz8/N4+PAhMjMz2eXc39+PdvOFhQUQ\nke61z2TCwaUKHFwSEVpbW+FwOPD+/XvdGg4+VXJy8HlwcICjoyMAwOnpKSYmJuByuWJqOPhUycnB\np9frRSAQwMbGBoaHh1FSUhJ1d0EiPm990vs2+XMm4/z8HK2trbDb7ejv7wcAtLe3o6KiAn6/Hzab\nDffu3cPAwADLnKOjo+jr64PZbEZqaiqGh4cNz1lfX4+ZmRkcHBwgJycHHz9+RDgcjmbk4FIlJweX\nP3/+xOfPn5Gfnx89YXi9XmxtbUVzcvCpkpODz93dXTQ3NyMSiSASiaCpqQkvX75k91lXycnB52Uu\nLjX9V58m4nA7XxAEQWAP60tSgiAIAh+kYQiCIAhKSMMQBEEQlJCGIQiCICghDUMQBEFQQhqGIAiC\noMS/KVKkmvD3qkwAAAAASUVORK5CYII=\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.8, Page Number: 473<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "V_in=2;",
+ "I_R=50.0*10**-9;",
+ "R1=100.0*10**3;",
+ "#voltage output for log amplifier",
+ "V_OUT=-0.025*math.log(V_in/(I_R*R1));",
+ "print('output voltage = %f volts'%V_OUT)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage = -0.149787 volts"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.9, Page Number: 474<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "V_in=3;",
+ "I_EBO=40*10**-9;",
+ "R1=68*10**3;",
+ "#voltage output for log amplifier",
+ "V_OUT=-0.025*math.log(V_in/(I_EBO*R1));",
+ "print('output voltage = %f Volts'%V_OUT)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage = -0.175143 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 14.10, Page Number: 475<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "I_EBO=40.0*10**-9;",
+ "V_in=175.1*10**-3;",
+ "R_f=68.0*10**3;",
+ "V_OUT=-I_EBO*R_f*math.exp(V_in/0.025);",
+ "print('output voltage = %f Volts'%V_OUT)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage = -2.994797 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter15.ipynb b/Electronic_Devices/Chapter15.ipynb
new file mode 100755
index 00000000..51a03fc9
--- /dev/null
+++ b/Electronic_Devices/Chapter15.ipynb
@@ -0,0 +1,325 @@
+{
+ "metadata": {
+ "name": "Chapter_15"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 15: Active Filters<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.1, Page Number: 491<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "f0=15*10**3; #center frequency in hertz",
+ "BW=1*10**3;",
+ "Q=f0/BW;",
+ "if Q>10:",
+ " print('narrow band filter, Q = %d'%Q)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "narrow band filter, Q = 15"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.2, Page Number: 494<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R2=10*10**3;",
+ "R1=0.586*R2; #FOR BUTTERWORTH RESPONSE",
+ "print('R1 in ohms =%d'%R1)",
+ "print('5.6kilo ohm will be ideally close to maximally flat butterworth response')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R1 in ohms =5860",
+ "5.6kilo ohm will be ideally close to maximally flat butterworth response"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.3, Page Number: 496<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "R_A=1*10**3;",
+ "R2=1*10**3;",
+ "R_B=R_A;",
+ "R=R_A;",
+ "C_A=0.022*10**-6;",
+ "C_B=C_A;",
+ "C=C_A;",
+ "f_c=1/(2*math.pi*R*C); #critical frequency",
+ "R1=0.586*R2; #for butterworth response",
+ "print('critical frequency in hertz =%f'%f_c)",
+ "print('value of R1 in ohms = %d'%R1)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical frequency in hertz =7234.315595",
+ "value of R1 in ohms = 586"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.4, Page Number: 498<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "f_c=2860.0;",
+ "R=1.8*10**3;",
+ "C=1/(2*math.pi*f_c*R);",
+ "R2=R;",
+ "R1=0.152*R2; #BUTTERWORTH RESPONSE IN FIRST STAGE",
+ "R4=R;",
+ "R3=1.235*R4; #BUTTERWORTH RESPONSE IN SECOND STAGE",
+ "C=C*10**8",
+ "print('capacitance in farads = %f *10^-8'%C);",
+ "print('R1 in ohms for butterworth response in first stage = %.1f'%R1)",
+ "print('R3 in ohms for butterworth response in second stage = %d'%R3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacitance in farads = 3.091588 *10^-8",
+ "R1 in ohms for butterworth response in first stage = 273.6",
+ "R3 in ohms for butterworth response in second stage = 2223"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.5, Page Number: 500<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "f_c=10*10**3; #critical frequency in hertz",
+ "R=33*10**3; #Assumption",
+ "R2=R;",
+ "C=1/(2*math.pi*f_c*R);",
+ "R1=0.586*R2; #for butterworth response",
+ "C=C*10**10",
+ "print('Capacitance in Farads = %f * 10^-10'%C)",
+ "print('R1 in ohms taking R2=33kilo-ohms = %d'%R1)",
+ "R1=3.3*10**3; #Assumption",
+ "R2=R1/0.586; #butterworth response",
+ "print('R2 in ohms taking R1=3.3kilo-ohms = %f'%R2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance in Farads = 4.822877 * 10^-10",
+ "R1 in ohms taking R2=33kilo-ohms = 19338",
+ "R2 in ohms taking R1=3.3kilo-ohms = 5631.399317"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.6, Page Number:503<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "R1=68.0*10**3;",
+ "R2=180.0*10**3;",
+ "R3=2.7*10**3;",
+ "C=0.01*10**-6;",
+ "f0=(math.sqrt((R1+R3)/(R1*R2*R3)))/(2*math.pi*C);",
+ "A0=R2/(2*R1);",
+ "Q=math.pi*f0*C*R2;",
+ "BW=f0/Q;",
+ "print('center frequency in hertz = %f'%f0)",
+ "print('maximum gain = %f'%A0)",
+ "print('bandwidth in hertz = %f'%BW)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "center frequency in hertz = 736.134628",
+ "maximum gain = 1.323529",
+ "bandwidth in hertz = 176.838826"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.7, Page Number: 504<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "R4=1000.0;",
+ "C1=0.022*10**-6;",
+ "R7=R4;",
+ "C2=C1;",
+ "R6=R4;",
+ "R5=100.0*10**3;",
+ "f_c=1/(2*math.pi*R4*C1); #critical frequency in hertz for each integrator",
+ "f0=f_c #center frequency",
+ "Q=(1+(R5/R6))/3;",
+ "BW=f0/Q;",
+ "print('center frequency in hertz = %f'%f0)",
+ "print('value of Q = %f'%Q)",
+ "print('bandwidth in hertz = %f'%BW)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "center frequency in hertz = 7234.315595",
+ "value of Q = 33.666667",
+ "bandwidth in hertz = 214.880661"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 15.8, Page Number: 507<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "R4=12.0*10**3;",
+ "C1=0.22*10**-6;",
+ "R7=R4;",
+ "C2=C1;",
+ "R6=3.3*10**3;",
+ "Q=10;",
+ "f0=1/(2*math.pi*R7*C2);",
+ "R5=(3*Q-1)*R6;",
+ "print('center frequency in hertz = %f'%f0)",
+ "print('R5 in ohms = %d'%R5)",
+ "print('Nearest value is 100 kilo-ohms')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "center frequency in hertz = 60.285963",
+ "R5 in ohms = 95700",
+ "Nearest value is 100 kilo-ohms"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter16.ipynb b/Electronic_Devices/Chapter16.ipynb
new file mode 100755
index 00000000..b082e3ac
--- /dev/null
+++ b/Electronic_Devices/Chapter16.ipynb
@@ -0,0 +1,299 @@
+{
+ "metadata": {
+ "name": "Chapter_16"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 16: Oscillators<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 16.1, Page Number: 524<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "R1=10*10**3;",
+ "R2=R1;",
+ "R=R1;",
+ "C1=0.01*10**-6;",
+ "C2=C1;",
+ "C=C1;",
+ "R3=1*10**3;",
+ "r_ds=500;",
+ "f_r=1/(2*math.pi*R*C);",
+ "print('resonant frequency of the Wein-bridge oscillator in Hertz = %.4f'%f_r)",
+ "#closed loop gain A_v=3 to sustain oscillations",
+ "A_v=3;",
+ "#A_v=(R_f+R_i)+1 where R_i is composed of R3 and r_ds",
+ "R_f=(A_v-1)*(R3+r_ds);",
+ "print('value of R_f in ohms = %d'%R_f)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency of the Wein-bridge oscillator in Hertz = 1591.5494",
+ "value of R_f in ohms = 3000"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 16.2, Page Number: 525<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "A_cl=29; #A_cl=R_f/R_i;",
+ "R3=10*10**3;",
+ "R_f=A_cl*R3;",
+ "print('value of R_f in ohms = %d'%R_f)",
+ "#let R1=R2=R3=R and C1=C2=C3=C",
+ "R=R3;",
+ "C3=0.001*10**-6;",
+ "C=C3;",
+ "f_r=1/(2*math.pi*math.sqrt(6)*R*C);",
+ "print('frequency of oscillation in Hertz = %f'%f_r)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R_f in ohms = 290000",
+ "frequency of oscillation in Hertz = 6497.473344"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 16.3, Page Number: 530<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "C1=0.1*10**-6;",
+ "C2=0.01*10**-6;",
+ "L=50.0*10**-3; #in Henry",
+ "C_T=C1*C2/(C1+C2); #total capacitance",
+ "f_r=1/(2*math.pi*math.sqrt((L*C_T)));",
+ "print('frequency of oscillation in Hertz when Q>10 is \\n\\t %f'%f_r)",
+ "Q=8.0; #when Q drops to 8",
+ "f_r1=(1/(2*math.pi*math.sqrt((L*C_T))))*math.sqrt((Q**2/(1+Q**2)));",
+ "print('frequency of oscillation in hertz when Q=8 is \\n \\t %f'%f_r1)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency of oscillation in Hertz when Q>10 is ",
+ "\t 7465.028533",
+ "frequency of oscillation in hertz when Q=8 is ",
+ " \t 7407.382663"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 16.4, Page Number: 535<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R1=10.0*10**3;",
+ "R2=33.0*10**3;",
+ "R3=10.0*10**3;",
+ "C=0.01*10**-6;",
+ "f_r=(1/(4*R1*C))*(R2/R3);",
+ "print('frequency of oscillation in hertz is \\n\\t%d'%f_r)",
+ "#the value of R1 when frequency of oscillation is 20 kHz",
+ "f=20.0*10**3;",
+ "R1=(1/(4*f*C))*(R2/R3);",
+ "print('value of R1 in ohms to make frequency 20 kiloHertz is \\n\\t%d'%R1)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency of oscillation in hertz is ",
+ "\t8250",
+ "value of R1 in ohms to make frequency 20 kiloHertz is ",
+ "\t4125"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 16.5, Page Number: 537<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import pylab",
+ "import numpy",
+ "V=15.0;",
+ "C=0.0047*10**-6;",
+ "R3=10.0*10**3;",
+ "R4=R3;",
+ "R2=10.0*10**3;",
+ "R1=68.0*10**3;",
+ "R_i=100.0*10**3;",
+ "V_G=R4*V/(R3+R4); #gate voltage at which PUT turns on",
+ "V_p=V_G; #neglecting 0.7V, this the peak voltage of sawtooth wave",
+ "print('neglecting 0.7V, the peak voltage of sawtooth wave = %.1f V'%V_p)",
+ "V_F=1.0; #minimum peak value of sawtooth wave",
+ "V_pp=V_p-V_F;",
+ "print('peak to peak amplitude of the sawtooth wave = %.1f V'%V_pp)",
+ "V_IN=-V*R2/(R1+R2);",
+ "f=(abs(V_IN)/(R_i*C))*(1/(V_pp));",
+ "print('frequency of the sawtooth wave = %.1f Hz'%f)",
+ "",
+ "#############PLOT###############################",
+ "",
+ "t = arange(0.0, 2.0, 0.0005)",
+ "t1= arange(2.0, 4.0, 0.0005)",
+ "t2= arange(4.0, 6.0, 0.0005)",
+ "k=arange(0.1,7.5, 0.0005)",
+ "t3=(2*k)/k",
+ "t4=(4*k)/k",
+ "t6=(6*k)/k",
+ "",
+ "subplot(111)",
+ "plot(t, (6.5/2)*t+1)",
+ "plot(t1, (6.5/2)*t+1,'b')",
+ "plot(t2, (6.5/2)*t+1,'b')",
+ "plot(t3,k,'b')",
+ "plot(t4,k,'b')",
+ "plot(t6,k,'b')",
+ "",
+ "ylim( (1,8) )",
+ "ylabel('Vout')",
+ "xlabel('ms')",
+ "title('Output of the Circuit')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "neglecting 0.7V, the peak voltage of sawtooth wave = 7.5 V",
+ "peak to peak amplitude of the sawtooth wave = 6.5 V",
+ "frequency of the sawtooth wave = 629.5 Hz"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "<matplotlib.text.Text at 0xa046eec>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAETCAYAAADJUJaPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUVQXax/HfUdFUlBElLoGieOFmgJdM0xETs/LVNLEJ\nUJOsZrJVmaWvuVqJjePdUpya0szuMKuyN0xFQztqgksdxFXZi41BklATKHcR4ez3Dzq8YiDnwN7n\nOfvs32etViqy9yPZwz7nbL6YFEVRQERELqGD9ABERKQeLnUiIhfCpU5E5EK41ImIXAiXOhGRC+FS\nJyJyIVzqZDhHjx7FoEGD0KNHD6SlpbX6+/Pz89GhQwdYLBYHTAeEh4fj8OHDqh/38ccfx8qVK1U/\nLjkXLnVq1dtvv42hQ4eie/fu8PX1xYIFC1BWVmbz+wcGBuLgwYOqzdPe47344ot46qmnUFFRgWnT\npql+/NaUl5dj4cKF6NevH3r06IGBAwfimWeeQUlJCQDgm2++wR//+EfVz/uPf/wDL7zwAgDAbDYj\nICBA9XOQPC51uqGNGzdi6dKl2LhxI8rLy3Hs2DH8+OOPmDRpEq5evWrTMUwmE9T8Grf2Hu/8+fMI\nDQ3V7Pg3Ultbi4kTJ+K7777Dvn37UFFRgaysLPTp0wfHjx9v9f3r6+s1mYtciELUgrKyMsXd3V35\n6KOPmvx6ZWWl4uXlpbz11luKoijKQw89pLzwwguNb//yyy8Vf39/RVEUZfbs2UqHDh2Url27Ku7u\n7sr69euVvLw8xWQyKVu3blX8/PwUX19fZcOGDY3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IiF8IrdSIiF8KlTkTkQrjUiYhcCJc6EZEL\n4VInInIhXOpERC7k/wD4xTcXWswNTwAAAABJRU5ErkJggg==\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 16.6, Page Number: 542<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "R1=2.2*10**3;",
+ "R2=4.7*10**3;",
+ "C_ext=0.022*10**-6;",
+ "f_r=1.44/((R1+2*R2)*C_ext);",
+ "print('frequency of the 555 timer in hertz = %f'%f_r)",
+ "duty_cycle=((R1+R2)/(R1+2*R2))*100;",
+ "print('duty cycle in percentage = %f'%duty_cycle)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency of the 555 timer in hertz = 5642.633229",
+ "duty cycle in percentage = 59.482759"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter17.ipynb b/Electronic_Devices/Chapter17.ipynb
new file mode 100755
index 00000000..a95b29db
--- /dev/null
+++ b/Electronic_Devices/Chapter17.ipynb
@@ -0,0 +1,336 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:dca2eb0dc5462992ceade27e53e297f6073a62b5b813c53a51758356342ce482"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 17: Voltage Regulators<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.1, Page Number:552 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].\n",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#variable declaration\n",
+ "Del_V_out=0.25;\n",
+ "V_out=15;\n",
+ "Del_V_in=5; #All voltages in Volts\n",
+ "\n",
+ "#Calculations\n",
+ "line_regulation=((Del_V_out/V_out)/Del_V_in)*100;\n",
+ "\n",
+ "#Result\n",
+ "print('line regulation in %%V is %f' %line_regulation)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "line regulation in %V is 0.333333"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.2, Page Number: 553<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "V_NL=12.0; #No load output voltage in Volts\n",
+ "V_FL=11.9; #Full load output voltage in Volts\n",
+ "I_F=10.0; #Full load current in milli-Amperes\n",
+ "\n",
+ "#Calculations\n",
+ "load_regulation=((V_NL-V_FL)/V_FL)*100;\n",
+ "load_reg=load_regulation/I_F;\n",
+ "\n",
+ "#Result\n",
+ "print('load regulation as percentage change from no load to full load = %f'%load_regulation)\n",
+ "print('\\nload regulation as percentage change per milliampere = %f' %load_reg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load regulation as percentage change from no load to full load = 0.840336\n",
+ "\n",
+ "load regulation as percentage change per milliampere = 0.084034"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.3, Page Number: 556<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "V_REF=5.1 #Zener voltage in volts\n",
+ "R2=10*10**3;\n",
+ "R3=10*10**3; #resistances in ohm\n",
+ "V_out=(1+(R2/R3))*V_REF;\n",
+ "print('output voltage in volts = %.1f'%V_out)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage in volts = 10.2"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.4, Page Number: 557<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R4=1; #Resistance in Ohms\n",
+ "I_L_max=0.7/R4;\n",
+ "print('maximum current provided to load(in amperes) = %.1f'%I_L_max)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum current provided to load(in amperes) = 0.7"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.5, Page Number: 560<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "V_IN=12.5; #maximum input voltage in volts\n",
+ "R1=22; #In Ohms\n",
+ "\n",
+ "V_OUT=0;\n",
+ "V_R1=V_IN-V_OUT; #Voltage across R1\n",
+ "P_R1=(V_R1*V_R1)/R1; #maximum power dissipated by R1\n",
+ "print('maximum power dissipated by R1 in WATTS = %f'%P_R1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum power dissipated by R1 in WATTS = 7.102273"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.6, Page Number: 569<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print('SAME AS EX-2.8 in CHAPTER-2')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "SAME AS EX-2.8 in CHAPTER-2"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.7, Page Number: 572<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "I_max=700*10**-3; #in Amperes\n",
+ "R_ext=0.7/I_max;\n",
+ "print('value of resistor in Ohms for which max current is 700mA = %f'%R_ext)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of resistor in Ohms for which max current is 700mA = 1.000000"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.8, Page Number: 572<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "V_OUT=24.0; #Output voltage in Volts\n",
+ "R_L=10.0; #Load resistance in Ohms\n",
+ "V_IN=30.0; #Input voltage in Volts\n",
+ "I_max=700.0*10**-3; #maximum interal current in Amperes\n",
+ "I_L=V_OUT/R_L; #load current in amperes\n",
+ "I_ext=I_L-I_max; #current through the external pass transistor in Amperes\n",
+ "P_ext_Qext=I_ext*(V_IN-V_OUT); #power dissipated\n",
+ "print('power dissiated(in WATTS) by the external pass transistor = %.1f'%P_ext_Qext)\n",
+ "print('\\nFor safety purpose, we choose a power transistor with rating more than this, say 15W')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power dissiated(in WATTS) by the external pass transistor = 10.2\n",
+ "\n",
+ "For safety purpose, we choose a power transistor with rating more than this, say 15W"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17.9, Page Number: 574<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "V_out=5.0; #7805 gives output voltage of 5V\n",
+ "I_L=1.0; #constant current of 1A\n",
+ "R1=V_out/I_L;\n",
+ "print('The value of current-setting resistor in ohms = %d'%R1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of current-setting resistor in ohms = 5"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter18.ipynb b/Electronic_Devices/Chapter18.ipynb
new file mode 100755
index 00000000..e195b9f9
--- /dev/null
+++ b/Electronic_Devices/Chapter18.ipynb
@@ -0,0 +1,56 @@
+{
+ "metadata": {
+ "name": "Chapter_18"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 18: Programmable Analog Arrays<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 18.1, Page Number: 588<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "#Variable declaration",
+ "C=1000*10**-12; #Switche capacitor value in farads",
+ "R=1000; #resistance in ohms",
+ "",
+ "#calculation",
+ "T=R*C; #Time period",
+ "f=1/T; #Frequency at which switch should operate",
+ "f=math.ceil(f)",
+ "#Result",
+ "print('Frequency at which each switch should operate(in hertz) is \\n %d' %f)",
+ "print('Duty cycle should be 50%')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency at which each switch should operate(in hertz) is ",
+ " 1000000",
+ "Duty cycle should be 50%"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter2.ipynb b/Electronic_Devices/Chapter2.ipynb
new file mode 100755
index 00000000..3934869f
--- /dev/null
+++ b/Electronic_Devices/Chapter2.ipynb
@@ -0,0 +1,629 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d0aa9e80db4a8882af89cf646425004e4e19d2bf8cf22acae2943bf211cb0ab1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 2: Diode Application<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.1, Page Number: 46<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].\n",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# variable declaration\n",
+ "V_p=50; #Peak value is 50V\n",
+ "\n",
+ "#calculation\n",
+ "V_avg=V_p/math.pi;\n",
+ "\n",
+ "#result\n",
+ "print \"average value of half wave rectifier = %.2f volts\" %V_avg"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "average value of half wave rectifier = 15.92 volts"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.2(a), Page Number: 46<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "f=1; #frequency\n",
+ "V_p_in=5; #peak input\n",
+ "\n",
+ "#calculation\n",
+ "V_pout=V_p_in-0.7; #output voltage\n",
+ "t_d=(math.asin(0.7/V_p_in))/(2*math.pi*f);\n",
+ "\n",
+ "#result\n",
+ "print \"half wave rectifier output = %.2f volts\" %V_pout;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "half wave rectifier output = 4.30 volts"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.2(b), Page Number: 46<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "f=1; #frequency\n",
+ "T=1/f; #time period\n",
+ "V_p_in=100; #peak input voltage\n",
+ "\n",
+ "#calculation\n",
+ "V_pout=(V_p_in-0.7); #peak output \n",
+ "t_d=(math.asin(0.7/V_p_in))/(2*math.pi*f) \n",
+ "\n",
+ "#result\n",
+ "print \"output of half wave rectifier = %.2f volts\" %V_pout"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output of half wave rectifier = 99.30 volts"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.3, Page Number: 48<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# variable declaration\n",
+ "V_p_in=156; #Peak input voltage\n",
+ "V_p_pri=156; #Peak voltage of primary of transformer\n",
+ "n=0.5; #Turn ratio is 2:1\n",
+ "\n",
+ "#calculation\n",
+ "V_p_sec=n*V_p_pri;\n",
+ "V_p_out=(V_p_sec-0.7); #Peak output voltage\n",
+ "\n",
+ "#result\n",
+ "print \"peak output voltage of half wave rectifier = %.1f volts\" %V_p_out"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak output voltage of half wave rectifier = 77.3 volts"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.4, Page Number: 49<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# variable declaration\n",
+ "V_p=15; #Peak voltage in volt\n",
+ "\n",
+ "#calculation\n",
+ "V_avg=(2*V_p)/math.pi;\n",
+ "\n",
+ "#result\n",
+ "print \"Average value of output of full wave rectifier = %.2f volts\" %V_avg"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average value of output of full wave rectifier = 9.55 volts"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.5, Page Number: 52<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "V_p_pri=100.0; #Peak voltage across primary winding\n",
+ "n=1.0/2; #tun ratio is 2:1\n",
+ "V_p_sec=n*V_p_pri;\n",
+ "V_sec=V_p_sec/2; #voltage across each secondary is half the total voltage\n",
+ "V_pout=V_sec-0.7;\n",
+ "\n",
+ "print('full wave rectifier output voltage = %f V'%V_pout)\n",
+ "PIV=2*V_pout+0.7;\n",
+ "print('PIV = %fV'%PIV)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "full wave rectifier output voltage = 24.300000 V\n",
+ "PIV = 49.300000V"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.6, Page Number: 54<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# variable declaration\n",
+ "V_rms=12.0; #rms secondary voltage\n",
+ "\n",
+ "#calculation\n",
+ "V_p_sec=math.sqrt(2)*V_rms; #peak secondary voltage\n",
+ "V_th=0.7; #knee voltage of diode\n",
+ "V_p_out=V_p_sec-2*V_th; #in one cycle, 2 diodes conduct\n",
+ "PIV=V_p_out+V_th; #applying KVL\n",
+ "\n",
+ "#result\n",
+ "print \"Peak output voltage = %.2f volt\" %V_p_out\n",
+ "print \"PIV across each diode = %.2f volt\" %PIV"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak output voltage = 15.57 volt\n",
+ "PIV across each diode = 16.27 volt"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.7, Page Number: 58<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# variable declaration\n",
+ "R_l=2200; #load resistance in Ohm\n",
+ "C=50*10**-6; #capacitance in Farad\n",
+ "V_rms=115; #rms of primary\n",
+ "\n",
+ "#calculation\n",
+ "V_p_pri=math.sqrt(2)*V_rms; #peak voltage across primary\n",
+ "n=0.1; #turn ratio is 10:1\n",
+ "V_p_sec=n*V_p_pri; #primary voltage across secondary\n",
+ "V_p_rect=V_p_sec-1.4 #unfiltered peak rectified voltage\n",
+ "#we subtract 1.4 because in each cycle 2 diodes conduct & 2 do not\n",
+ "f=120; #frequency of full wave rectified voltage\n",
+ "V_r_pp=(1/(f*R_l*C))*V_p_rect; #peak to peak ripple voltage\n",
+ "V_DC=(1-(1/(2*f*R_l*C)))*V_p_rect;\n",
+ "r=V_r_pp/V_DC;\n",
+ "\n",
+ "#result\n",
+ "print \"Ripple factor = %.3f \" %r"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ripple factor = 0.079 "
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.8, Page Number: 62<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# variable declaration\n",
+ "V_REF=1.25; #in volts\n",
+ "V_R1=V_REF; #voltage in volt\n",
+ "R1=220.0; #in ohms\n",
+ "I_ADJ=50*10**-6 #in amperes\n",
+ "\n",
+ "#calculation\n",
+ "# MAX VALUE OF R2=5000 Ohms\n",
+ "R2_min=0.0; #min resistance\n",
+ "V_out_min=V_REF*(1+(R2_min/R1))+I_ADJ*R2_min;\n",
+ "R2_max=5000.0; #max value of resistance\n",
+ "V_out_max=V_REF*(1+(R2_max/R1))+I_ADJ*R2_max;\n",
+ "\n",
+ "#result\n",
+ "print \"minimum output voltage = %.2f volt\" %V_out_min\n",
+ "print \"maximum output voltage = %.2f volt\" %V_out_max"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum output voltage = 1.25 volt\n",
+ "maximum output voltage = 29.91 volt"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.9,Page Number: 64<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "V_NL=5.18 #No load output voltage\n",
+ "V_FL=5.15 #Full load output voltage\n",
+ "load_reg=((V_NL-V_FL)/V_FL)*100 #In percentage\n",
+ "print('load regulation percent = %.2f%% '%load_reg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load regulation percent = 0.58% "
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.10, Page Number: 66<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import pylab as py\n",
+ "import numpy as np\n",
+ "\n",
+ "#let input wave be V_in=V_p_in*sin(2*%pi*f*t) \n",
+ "f=1.0; #Frequency is 1Hz\n",
+ "T=1/f;\n",
+ "R_1=100.0; #Resistances in ohms\n",
+ "R_L=1000.0; #Load\n",
+ "V_p_in=10.0; #Peak input voltage\n",
+ "V_th=0.7; #knee voltage of diode\n",
+ "\n",
+ "V_p_out=V_p_in*(R_L/(R_L+R_1)); #peak output voltage\n",
+ "print('peak output voltage = %.2f V'%V_p_out)\n",
+ "\n",
+ "t = np.arange(0, 3.5 , 0.0005)\n",
+ "z=V_p_in*np.sin(2*np.pi*f*t)*(R_L/(R_L+R_1))\n",
+ "\n",
+ "subplot(211)\n",
+ "plot(t,z)\n",
+ "ylim(-9.09,9.09)\n",
+ "title('Input Voltage Waveform')\n",
+ "\n",
+ "subplot(212)\n",
+ "plot(t,z)\n",
+ "ylim(-0.07,9.09)\n",
+ "title('Output Voltage Waveform')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak output voltage = 9.09 V"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 12,
+ "text": [
+ "<matplotlib.text.Text at 0xa3bf44c>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEICAYAAACgQWTXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXl4TNcbx78TiSWWiC1kIYgtliSEoEJCa21SlFoqYqvu\npTtKaavtT1vVhaou9tpVaZFaakpjJ4RErImEBIkQ2cgy5/fHa0YSk2Qy9965986cz/N4Hpm5c86b\nd06+973vOec9GsYYA4fD4XCsAju5DeBwOByOeHBR53A4HCuCizqHw+FYEVzUORwOx4rgos7hcDhW\nBBd1DofDsSK4qHMUj1arhYeHh9xmKIbc3FyEhISgdu3aGDFihNzmcBQGF3Urx9PTE3v37pW8nzlz\n5iAsLKzU9/v374/Zs2c/9vrWrVvRqFEj6HQ6k/vy9PTEP//8Y5adQli7di28vb2LvfbUU08ZfW3e\nvHmS2bFp0ybcunUL6enpWL9+vWT9cNQJF3UrR6PRQKPRyG0Gxo0bh9WrVz/2+qpVqzBmzBjY2Zk+\nFDUaDeTYM9ezZ0/ExcXh9u3bAICCggKcPn0a9+/fR1pamuG1w4cPo1evXpLZcfXqVbRs2bJCPtNT\nUFAggUUcRcE4Vo2npyfbu3cvY4yxZcuWsSeeeIK98847zNnZmTVt2pTt3LnTcG2vXr3YtGnTWJcu\nXVitWrXYM888w9LT0xljjO3bt4+5u7sXa7tJkyZsz549bOfOnaxy5crMwcGB1ahRg/n6+j5mR05O\nDnNycmL79+83vJaens6qVq3KoqOj2f3799mUKVOYq6src3V1ZVOnTmUPHjx4rO8xY8YwOzs7Vq1a\nNVajRg325ZdfMsYYGzZsGGvYsCFzcnJiPXv2ZDExMYZ+0tLS2NNPP81q1arFOnfuzD744APWo0cP\nw/vnzp1jTz75JKtTpw5r1aoV27BhQ6n+bN68Odu8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\nQS2+z8rKwrBhw/Dtt9+ihpEC6kr+DsqyXen+t7Ozw6lTp5CRkYF+/fpBq9U+tmtdyb4vz35z/C84\nUjdlE1LJa65duwY3NzehXYuCKfbXrFnT8Jg0YMAA5OfnI10lRWGU7HtTUIPv8/Pz8eyzz2LMmDEY\nPHjwY+8r+Tsoz3Y1+B8AnJycMGjQIBw/frzY60r2fVFKs98c/wsWdVM2IYWGhmLlypUAgMOHD6N2\n7dpwcXER2rUomGL/zZs3DXf7o0ePgjFmNPelRJTse1NQuu8ZY5g4cSK8vb0xdepUo9co9TswxXYl\n+z8tLQ13794FAOTm5mL37t3w8/Mrdo1SfQ+YZr85/hecfiltE9KSJUsAAC+++CIGDhyIHTt2wMvL\nC9WrV8eyZcuEdisapti/adMmLF68GPb29nB0dMS6detktvoRo0aNwr///ou0tDR4eHjgo48+Qv7D\nE7OV7nugfPuV7HsAiIyMxOrVq9GhQwfDH+Rnn32GxMREAMr+DkyxXcn+T0lJQXh4OHQ6HXQ6HcLC\nwtCnTx/VaI8p9pvjf775iMPhcKwIyY+z43A4HI7l4KLO4XA4VgQXdQ6Hw7EiuKhzOByOFcFFncPh\ncKwILuocDodjRfwfUaYhEUjyJ+wAAAAASUVORK5CYII=\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.11, Page Number: 67<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#from pylab import figure, show\n",
+ "#from numpy import arange, sin, pi,bool\n",
+ "#import numpy as np\n",
+ "import pylab as py\n",
+ "import numpy as np\n",
+ "#let input wave be V_in=V_p_in*sin(2*%pi*f*t) \n",
+ "f=1.0; #Frequency is 1Hz\n",
+ "T=1/f;\n",
+ "V_p_in=10; #Peak input voltage\n",
+ "V_th=0.7; #knee voltage of diode\n",
+ "print('max output voltage is 5.7V')\n",
+ "print('min output voltage is -5.7V')\n",
+ "\n",
+ "###############GRAPH Plotting#################################\n",
+ "t = arange(0.0,4.5,0.0005)\n",
+ "V_in=V_p_in*sin(2*pi*f*t);\n",
+ "\n",
+ "Vout=V_in;\n",
+ "#fig = figure(2)\n",
+ "subplot(211)\n",
+ "plot(t,V_in)\n",
+ "#ax2.grid(True)\n",
+ "ylim( (-10,10) )\n",
+ "title('Input to the +ve and -ve diode limiter ')\n",
+ "subplot(212)\n",
+ "plot(t,V_in)\n",
+ "#ax1.grid(True)\n",
+ "ylim( (-5.7,5.7) )\n",
+ "title('Output of +ve and -ve diode limiter')\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "max output voltage is 5.7V\n",
+ "min output voltage is -5.7V"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 13,
+ "text": [
+ "<matplotlib.text.Text at 0xa6c976c>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEICAYAAAC+iFRkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXlYldX2x7+HQQFBZJBZZlBBRcxEUxI0BxxKsxRNzbK5\nvJm3uln5E7uledUGs8G6XdHMuUFTwhGcUKkky1lGmcUEZZLhnP37Y3eODOfAyznvsN/j+3keHuWc\n9+y9zmLt9a537b3XVhFCCBQUFBQUzBoLqQVQUFBQUBAexdkrKCgo3AUozl5BQUHhLkBx9goKCgp3\nAYqzV1BQULgLUJy9goKCwl2A4uwVOJOamooePXpILQYTzJkzB4sWLZJaDMTExODrr78GAHz77bcY\nM2aMUe0kJCRg1qxZRn3W398fhw4dAgAsXboUTz/9tFHtmCK/Qvsozp5n/P39cfDgQcH74TI4mw5C\nY7CwsEB2drbRnzdnVCoVVCqV1GI0k+Oxxx7D3r17jW7HFBm0vPnmm/jqq6+Maqel/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ZwjZP8l5KqDlOGKs/C9CUSSXwi6d1RVVFWs\ntSIzW//eTU0db+r0jmc6+3RT05c+tRxCA+BfNmgBBhD2AAMIe4ABhD3AAMIeYABhDzDAAwJBIdo4\nx/PeAAAAAElFTkSuQmCC\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.12, Page Number: 76<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#variable declaration\n",
+ "V_p_in=18.0; #peak input voltage is 18V\n",
+ "V_supply=12.0;\n",
+ "R2=100.0;\n",
+ "R3=220.0; #resistances in ohms\n",
+ "#calculation\n",
+ "V_bias=V_supply*(R3/(R2+R3));\n",
+ "\n",
+ "#result\n",
+ "print('diode limiting the voltage at this voltage =%fV'%V_bias)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode limiting the voltage at this voltage =8.250000V"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.13, Page Number: 78<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "V_p_in=24.0;\n",
+ "V_DC=-(V_p_in-0.7); #DC level added to output\n",
+ "print('V_DC = %.1fV'%V_DC)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_DC = -23.3V"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter3.ipynb b/Electronic_Devices/Chapter3.ipynb
new file mode 100755
index 00000000..b0f770b6
--- /dev/null
+++ b/Electronic_Devices/Chapter3.ipynb
@@ -0,0 +1,369 @@
+{
+ "metadata": {
+ "name": "Chapter_3"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 3: Special-purpose Diodes<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.1, Page Number:88<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "delVZ=50*10**-3; #voltage in volts, from graph",
+ "delIZ=5*10**-3; #current in amperes, from rgraph",
+ "",
+ "#calculation",
+ "ZZ=delVZ/delIZ; #zener impedence",
+ "",
+ "# result",
+ "print \"zener impedance = %d ohm \" %ZZ"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "zener impedance = 10 ohm "
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.2, Page Number:89<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_ZT=37*10**-3; #IN AMPERES",
+ "V_ZT=6.80; #IN VOLTS",
+ "Z_ZT=3.50; #IN OHMS",
+ "I_Z=50*10**-3; #IN AMPERES",
+ "",
+ "#calculation",
+ "DEL_I_Z=I_Z-I_ZT; #change current",
+ "DEL_V_Z=DEL_I_Z*Z_ZT; #change voltage",
+ "V_Z=V_ZT+DEL_V_Z; #voltage across zener terminals",
+ "print \"voltage across zener terminals when current is 50 mA = %.3f volts\" %V_Z",
+ "I_Z=25*10**-3; #IN AMPERES",
+ "DEL_I_Z=I_Z-I_ZT; #change current",
+ "DEL_V_Z=DEL_I_Z*Z_ZT; #change voltage",
+ "V_Z=V_ZT+DEL_V_Z; #voltage across zener terminals",
+ "",
+ "#result",
+ "print \"voltage across zener terminals when current is 25 mA = %.3f volts\" %V_Z"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage across zener terminals when current is 50 mA = 6.845 volts",
+ "voltage across zener terminals when current is 25 mA = 6.758 volts"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.3, Page Number:90<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_Z=8.2; #8.2 volt zener diode",
+ "TC=0.0005; #Temperature coefficient (per degree celsius)",
+ "T1=60; #Temperature 1 in celsius",
+ "T2=25; #Temperature 2 in celsius",
+ "",
+ "#calculation",
+ "DEL_T=T1-T2; #change in temp",
+ "del_V_Z=V_Z*TC*DEL_T; #change in voltage",
+ "voltage=V_Z+del_V_Z; #zener voltage",
+ "",
+ "#result",
+ "print \"zener voltage at 60 degree celsius = %.3f volt\" %voltage"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "zener voltage at 60 degree celsius = 8.343 volt"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.4, Page Number:90<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "P_D_max=400*10**-3; #power in watts",
+ "df=3.2*10**-3 #derating factor in watts per celsius",
+ "del_T=(90-50); #in celsius, temperature difference",
+ "",
+ "#calculation",
+ "P_D_deru=P_D_max-df*del_T; #power dissipated",
+ "P_D_der=P_D_deru*1000;",
+ "",
+ "#result",
+ "print \"maximum power dissipated at 90 degree celsius = %d mW\" %P_D_der"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum power dissipated at 90 degree celsius = 272 mW"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.5, Page Number: 92<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_Z=5.1;",
+ "I_ZT=49*10**-3;",
+ "I_ZK=1*10**-3;",
+ "Z_Z=7;",
+ "R=100;",
+ "P_D_max=1;",
+ "",
+ "#calculation",
+ "V_out=V_Z-(I_ZT-I_ZK)*Z_Z; #output voltage at I_ZK",
+ "V_IN_min=I_ZK*R+V_out; #input voltage",
+ "I_ZM=P_D_max/V_Z; #current",
+ "V_out=V_Z+(I_ZM-I_ZT)*Z_Z; #output voltage at I_ZM",
+ "V_IN_max=I_ZM*R+V_out; #max input voltage",
+ "",
+ "#result",
+ "print \"maximum input voltage regulated by zener diode = %.3f volts\" %V_IN_max",
+ "print \"minimum input voltage regulated by zener diode = %.3f volts\" %V_IN_min"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum input voltage regulated by zener diode = 25.737 volts",
+ "minimum input voltage regulated by zener diode = 4.864 volts"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.6, Page Number: 93<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_Z=12.0; #voltage in volt",
+ "V_IN=24.0; #ip voltage in volt",
+ "I_ZK=0.001; #current in ampere",
+ "I_ZM=0.050; #current in ampere ",
+ "Z_Z=0; #impedence",
+ "R=470; #resistance in ohm",
+ "",
+ "#calculation",
+ "#when I_L=0, I_Z is max and is equal to the total circuit current I_T",
+ "I_T=(V_IN-V_Z)/R; #current",
+ "I_Z_max=I_T; #max current",
+ "if I_Z_max<I_ZM : # condition for min currert ",
+ " I_L_min=0;",
+ "",
+ "I_L_max=I_T-I_ZK; #max current",
+ "R_L_min=V_Z/I_L_max; #min resistance",
+ "",
+ "#result",
+ "print \"minimum value of load resistance = %.2f ohm\" %R_L_min",
+ "print \"minimum curent = %.3f ampere\" %I_L_min",
+ "print \"maximum curent = %.3f ampere\" %I_L_max"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum value of load resistance = 489.16 ohm",
+ "minimum curent = 0.000 ampere",
+ "maximum curent = 0.025 ampere"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.7, Page Number: 94<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_IN=24.0; #voltage in volt",
+ "V_Z=15.0; #voltage in volt",
+ "I_ZK=0.25*10**-3; #current in ampere",
+ "I_ZT=17*10**-3; #current in ampere",
+ "Z_ZT=14.0; #impedence",
+ "P_D_max=1.0; #max power dissipation",
+ "",
+ "#calculation",
+ "V_out_1=V_Z-(I_ZT-I_ZK)*Z_ZT; #output voltage at I_ZK",
+ "print \"output voltage at I_ZK = %.2f volt\" %V_out_1",
+ "I_ZM=P_D_max/V_Z;",
+ "",
+ "V_out_2=V_Z+(I_ZM-I_ZT)*Z_ZT; #output voltage at I_ZM",
+ "print \"output voltage a I_ZM = %.2f volt\" %V_out_2",
+ "R=(V_IN-V_out_2)/I_ZM; #resistance",
+ "print \"value of R for maximum zener current, no load = %.2f ohm\" %R",
+ "print \"closest practical value is 130 ohms\"",
+ "R=130.0;",
+ "#for minimum load resistance(max load current) zener current is minimum (I_ZK)",
+ "I_T=(V_IN-V_out_1)/R; #current",
+ "I_L=I_T-I_ZK; #current",
+ "R_L_min=V_out_1/I_L; #minimum load resistance",
+ "",
+ "#result",
+ "print \"minimum load resistance = %.2f ohm\" %R_L_min"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage at I_ZK = 14.77 volt",
+ "output voltage a I_ZM = 15.70 volt",
+ "value of R for maximum zener current, no load = 124.57 ohm",
+ "closest practical value is 130 ohms",
+ "minimum load resistance = 208.60 ohm"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 3.8, Page Number: 96<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#variable declaration",
+ "V_p_in=10.0; #Peak input voltage",
+ "V_th=0.7; #forward biased zener",
+ "V_Z1=5.1;",
+ "V_Z2=3.3;",
+ "",
+ "V_p_in=20.0;",
+ "V_Z1=6.2;",
+ "V_Z2=15.0;",
+ "",
+ "#result",
+ "print('max voltage = %.1f V'%(V_Z1+V_th))",
+ "print('min voltage = %.1f V'%(-(V_Z2+V_th)))"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "max voltage = 6.9 V",
+ "min voltage = -15.7 V"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter4.ipynb b/Electronic_Devices/Chapter4.ipynb
new file mode 100755
index 00000000..8aaa9760
--- /dev/null
+++ b/Electronic_Devices/Chapter4.ipynb
@@ -0,0 +1,446 @@
+{
+ "metadata": {
+ "name": "Chapter_4"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 4: Bipolar Junction Transistors (BJTs)<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.1, Page Number: 120 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_C=3.65*10**-3; #collector current in amperes",
+ "I_B=50*10**-6; #base current in amperes",
+ "",
+ "#calculation",
+ "B_DC=I_C/I_B; #B_DC value",
+ "I_E=I_B+I_C; #current in ampere",
+ "",
+ "# result",
+ "print \"B_DC = %d \" %B_DC",
+ "print \"Emitter current = %.4f ampere\" %I_E"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B_DC = 73 ",
+ "Emitter current = 0.0037 ampere"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.2, Page Number: 121<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_BE=0.7; # voltage in volt",
+ "B_DC=150; # voltage in volt",
+ "V_BB=5; # voltage in volt",
+ "V_CC=10; # voltage in volt",
+ "R_B=10*10**3; # resistance in ohm",
+ "R_C=100; # resistance in ohm",
+ "",
+ "#calculation",
+ "I_B=(V_BB-V_BE)/R_B; #base current in amperes",
+ "I_C=B_DC*I_B; #collector current in amperes",
+ "I_E=I_C+I_B; #emitter current in amperes",
+ "V_CE=V_CC-I_C*R_C; #collector to emitter voltage in volts",
+ "V_CB=V_CE-V_BE; #collector to base voltage in volts",
+ "",
+ "# result",
+ "print \"base current = %.5f amperes\" %I_B",
+ "print \"collector current = %.4f amperes\" %I_C",
+ "print \"emitter current = %.5f amperes\" %I_E",
+ "print \"collector to emitter voltage =%.2f volts\" %V_CE",
+ "print \"collector to base voltage =%.2f volts\" %V_CB"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current = 0.00043 amperes",
+ "collector current = 0.0645 amperes",
+ "emitter current = 0.06493 amperes",
+ "collector to emitter voltage =3.55 volts",
+ "collector to base voltage =2.85 volts"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.3, Page Number: 123<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "",
+ "import pylab as py",
+ "import numpy as np",
+ "",
+ "#variable declaration",
+ "beta=100 # current gain",
+ "print'Ideal family of collector curve'",
+ "",
+ "ic1 = arange(0.00001, 0.45, 0.0005)",
+ "ic2 = arange(0.00001, 0.5, 0.0005)",
+ "ic3 = arange(0.00001, 0.6, 0.0005)",
+ "ic4 = arange(0.00001, 0.7, 0.0005)",
+ "vcc1=ic1*0.5/0.7",
+ "vcc2=ic2*1.35/0.7",
+ "vcc3=ic3*2/0.7",
+ "vcc4=ic4*2.5/0.7",
+ "m1=arange(0.45,5.0,0.0005)",
+ "m2=arange(0.5,5.0,0.0005)",
+ "m3=arange(0.6,5.0,0.0005)",
+ "m4=arange(0.7,5.0,0.0005)",
+ "",
+ "plot(ic1,vcc1,'b')",
+ "plot(ic2,vcc2,'b')",
+ "plot(ic3,vcc3,'b')",
+ "plot(ic4,vcc4,'b')",
+ "plot(m1,0.32*m1/m1,'b')",
+ "plot(m2,0.96*m2/m2,'b')",
+ "plot(m3,1.712*m3/m3,'b')",
+ "plot(m4,2.5*m4/m4,'b')",
+ "",
+ "ylim( (0,3) )",
+ "ylabel('Ic(mA)')",
+ "xlabel('Vce(V)')",
+ "title('Ideal family of collector curve')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ideal family of collector curve"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "<matplotlib.text.Text at 0xa11e74c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEXCAYAAABLZvh6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVPW6B/DvIHjhIkop4IBg4gVSAcVIQ0UNTVOizBQz\nUalQj6nVfmrno0dteyzTrWm2Pdb2caeluPV4QbnkJUa8czS8ZB4vKHIVREEhlevv/LFiYGCAQefC\nzPp+nocn1qzLvIy0XtbvXb93KYQQAkREJEtWpg6AiIhMh0mAiEjGmASIiGSMSYCISMaYBIiIZIxJ\ngIhIxpgEZCwtLQ1WVlaorKx86mN5enri8OHDWtc9evQIY8eORbt27TBhwoSnfq+a0tPT4eDggKo7\nnYODg7Fx40a9vgcA7N69G+7u7nBwcMD58+f1ckyVSgV3d3f1ckOfIZGhMAlYOGOdWBQKBRQKhdZ1\nO3fuRF5eHu7du4ft27fr9X07d+6MoqIi9Xs3FMfT+Mtf/oJ//OMfKCoqgq+vr96PD+gn9qlTp2Lh\nwoV6iojkgEnAwhnqpNgUt27dQvfu3WFlZZ6/bkIIpKenw8fHx9ShGJw+rgpNcWx6cub5fyU9kYqK\nCvzlL39Bhw4d0LVrV8TGxmqsv3//PiIjI9GpUye4ublh4cKF6v9xU1NTMWzYMDz77LPo0KEDJk+e\njPv37zf6nosWLcLf/vY3bN++HQ4ODti0aRNu3LjR4LE8PT2xcuVK9OnTBw4ODoiMjERubi5GjRoF\nR0dHhISEoLCwEED9Q1qlpaVwcnLCb7/9pn4tLy8PdnZ2uHv3bp04hRBYunQpPD094ezsjIiICDx4\n8AAlJSVwcHBARUUFfH190a1bN60/56VLlxASEoJnnnkGLi4u+OKLLwAAJSUlmDdvHpRKJZRKJT78\n8EOUlpY2+rkJIfDll1/Cy8sLzz77LCZMmICCggL1+mPHjmHgwIFo3749OnfujB9++AHff/89tm7d\niq+++goODg547bXXAACXL19GcHAw2rdvj169emHfvn3q40ydOhUzZ87E6NGjYW9vD5VKVSeWe/fu\nYdq0aVAqlXBycsLrr78OAPjXv/6FQYMGaWxrZWWFGzduaBz71Vdfhb29PVauXAlXV1eNf6vdu3er\nr6wqKysb/JnJQARZNE9PT3H48GEhhBDr168XPXv2FJmZmeLevXsiODhYWFlZiYqKCiGEEGFhYWLG\njBni4cOHIi8vT7zwwgtiw4YNQgghrl+/Lg4dOiRKS0vFnTt3xODBg8W8efO0vk9tixcvFu+88456\nWZdjDRgwQOTl5YmsrCzRsWNH4e/vL86dOyceP34shg0bJpYsWSKEEOLmzZtCoVCof4bg4GCxceNG\nIYQQs2bNEp9++qn6uF9//bUIDQ3VGuPGjRuFl5eXuHnzpiguLhZvvPGGRswKhUKkpqZq3ffBgwfC\nxcVFrFq1SpSUlIiioiJx+vRpIYQQCxcuFAMGDBB37twRd+7cEQMHDhQLFy4UQgiRmJgo3NzctH6G\nX3/9tRgwYIDIysoSpaWlIioqSoSHhwshhEhLSxMODg4iOjpalJeXi7t374pz584JIYSYOnWq+vhC\nCFFaWiq6du0qvvjiC1FWViZ++eUX4eDgIK5cuSKEECIiIkI4OjqKEydOCCGEePz4cZ2fb/To0WLi\nxImisLBQlJWViaSkJCGEEJs2bRJBQUEa29b8nLQdu2vXruLgwYPq7d98802xfPnyRn9mMhwmAQtX\n88QydOhQ9UldCCEOHDigPoHevn1btGrVSjx69Ei9fuvWrWLo0KFaj7t7927h7++v9X1qW7RokZg8\neXK9MWo71tatW9XL48aNE7NmzVIvf/PNNyIsLEwI0XASOHXqlOjcubN6v379+okdO3ZojWHYsGFi\n/fr16uUrV64IGxsb9XEbSgJbt24Vffv21bqua9euIj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JyMc+fOqZ9l8f777+Ob\nb77BmTNnsGLFCvWw0bFjx9C/f3/1cWteYWRnZ+PatWsYNmwYAMDGxgZKpRKXL1825o9KpBWTAMle\nzRP29u3bER4ejsOHD2P69Olo3bo1AKBdu3YoLi7GyZMnMX78ePj7+2PGjBm4ffs2ACA9PR0uLi7q\nY44ePRrHjx9HUVER/v3vf+PNN9/UmMXaqVMnpKWlGe+HJKoHkwDJXmhoKA4fPoyUlBQ8fPhQ3X+n\n9mT6yspKtGvXDikpKeqvS5cuqdfX3L5NmzZ45ZVXsGvXLnViqUkIwZbH1Czwt5Bkz97eHkOHDsW0\nadPUBeGQkBBs2rRJXdwtKChA27Zt0aVLF+zcuROAdCK/cOECAMDDw0N9VVAlPDwcq1atQl5eHl58\n8UWNdTk5OfDw8DD0j0bUKCYBIkgn7IsXL6r/Yh85ciRCQ0MREBAAf39//P3vfwcA/PTTT9i4cSP8\n/PzQq1cv9SMMg4KC6rRxfvnll5GTk4MJEyZovF5WVobMzEz07NnTCD8ZUcPYQI5ID4QQ6Nu3L06f\nPo2WLVs2uO2BAwcQGxuLNWvWGCk6ovrxSoBIDxQKBd577z389NNPjW77z3/+Ex9++KERoiJqHK8E\niIhkjFcCREQyxiRARCRjTAJERDLGJEBEJGNMAkREMsYkQEQkY/8PuzhceEoO66YAAAAASUVORK5C\nYII=\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.4, Page Number: 125<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CE_sat=0.2; # voltage in volt",
+ "V_BE=0.7; # voltage in volt",
+ "V_BB=3; # voltage in volt",
+ "V_CC=10; # voltage in volt",
+ "B_DC=50; # voltage in volt",
+ "R_B=10*10**3; # resistance in ohm",
+ "R_C=1*10**3; # resistance in ohm",
+ "",
+ "#calculation",
+ "I_C_sat=(V_CC-V_CE_sat)/R_C; # saturation current",
+ "I_B=(V_BB-V_BE)/R_B; # base current",
+ "I_C=B_DC*I_B; # current in ampere",
+ "",
+ "# result",
+ "if I_C>I_C_sat:",
+ " print \"transistor in saturation\"",
+ "else:",
+ " print \"transistor not in saturation\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transistor in saturation"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.5, Page Number: 127<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable declaration",
+ "P_D_max=250*10**-3; #max power rating of transistor in watts",
+ "V_CE=6; #voltage in volt",
+ "",
+ "#Calculation",
+ "I_Cu=P_D_max/V_CE; #Current (Amp)",
+ "I_C=I_Cu*1000;",
+ "",
+ "#Result",
+ "print \"collector current that can be handled by the transistor = %.1f mA\" %I_C",
+ "print \"\\nRemember that this is not necessarily the maximum IC. The transistor\"",
+ "print \"can handle more collectore current if Vce is reduced as long as PDmax\"",
+ "print \"is not exceeded.\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current that can be handled by the transistor = 41.7 mA",
+ "",
+ "Remember that this is not necessarily the maximum IC. The transistor",
+ "can handle more collectore current if Vce is reduced as long as PDmax",
+ "is not exceeded."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.6, Page Number: 127<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable declaration",
+ "P_D_max=800*10**-3; #max power rating of transistor in watts",
+ "V_BE=0.7; #voltage in volt",
+ "V_CE_max=15; #voltage in volt",
+ "I_C_max=100*10**-3; #Current (Amp)",
+ "V_BB=5; #voltage in volt",
+ "B_DC=100; #voltage in volt",
+ "R_B=22*10**3; # resistance in ohm",
+ "R_C=10**3; # resistance in ohm",
+ "",
+ "#Calculation",
+ "I_B=(V_BB-V_BE)/R_B; # base current",
+ "I_C=B_DC*I_B; #collector current ",
+ "V_R_C=I_C*R_C; #voltage drop across R_C",
+ "V_CC_max=V_CE_max+V_R_C; #Vcc max in volt",
+ "P_D=I_C*V_CE_max; #max power rating",
+ "",
+ "#Result",
+ "if P_D<P_D_max:",
+ " print \"V_CC = %.2f volt\" %V_CC_max",
+ " print \"V_CE_max will be exceeded first because entire supply voltage V_CC will be dropped across the transistor\"",
+ " "
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_CC = 34.55 volt",
+ "V_CE_max will be exceeded first because entire supply voltage V_CC will be dropped across the transistor"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.7, Page Number: 128<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable declaration",
+ "df=5*10**-3; #derating factor in watts per degree celsius",
+ "T1=70; #temperature 1",
+ "T2=25; #temperature 2",
+ "P_D_max=1; #in watts",
+ "",
+ "#Calculation",
+ "del_P_D=df*(T1-T2); #change due to temperature",
+ "P_D=P_D_max-del_P_D; # power dissipation",
+ "",
+ "#Result",
+ "print \"Power dissipated max at a temperature of 70 degree celsius = %.3f watts\" %P_D"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power dissipated max at a temperature of 70 degree celsius = 0.775 watts"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.8, Page Number: 130<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable declaration",
+ "R_C=1*10**3; #resistance in ohm",
+ "r_e=50; #resistance in ohm",
+ "V_b=100*10**-3; #voltage in volt",
+ "",
+ "#Calculation",
+ "A_v=R_C/r_e; #voltage gain",
+ "V_out=A_v*V_b; #voltage in volt",
+ "",
+ "#Result",
+ "print \"voltage gain = %d \" %A_v",
+ "print \"AC output voltage = %d volt\" %V_out"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain = 20 ",
+ "AC output voltage = 2 volt"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 4.9, Page Number: 132 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable declaration",
+ "V_CC=10.0; #voltage in volt",
+ "B_DC=200.0; #voltage in volt",
+ "R_C=1.0*10**3; #resistance in ohm",
+ "V_IN=0.0; #voltage in volt",
+ "",
+ "#Calculation",
+ "V_CE=V_CC; #equal voltage",
+ "print \"when V_IN=0, transistor acts as open switch(cut-off) and collector emitter voltage = %.2f volt\" %V_CE",
+ "#now when V_CE_sat is neglected",
+ "I_C_sat=V_CC/R_C; #saturation current",
+ "I_B_min=I_C_sat/B_DC; #minimum base current",
+ "print \"\\nminimum value of base current to saturate transistor = %.5f ampere\" %I_B_min",
+ "V_IN=5; #voltage in volt",
+ "V_BE=0.7; #voltage in volt",
+ "V_R_B=V_IN-V_BE; #voltage across base resiatance",
+ "R_B_max=V_R_B/I_B_min;",
+ "",
+ "",
+ "#Result",
+ "kw=round (R_B_max)",
+ "print \"\\nmaximum value of base resistance when input voltage is 5V = %d ohm\" %kw"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when V_IN=0, transistor acts as open switch(cut-off) and collector emitter voltage = 10.00 volt",
+ "",
+ "minimum value of base current to saturate transistor = 0.00005 ampere",
+ "",
+ "maximum value of base resistance when input voltage is 5V = 86000 ohm"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter5.ipynb b/Electronic_Devices/Chapter5.ipynb
new file mode 100755
index 00000000..1bcf9f83
--- /dev/null
+++ b/Electronic_Devices/Chapter5.ipynb
@@ -0,0 +1,419 @@
+{
+ "metadata": {
+ "name": "Chapter_5"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 5: Transistor Bias Circuits<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.1, Page Number: 146<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_BB=10.0; #voltage in volt",
+ "V_CC=20.0; #voltage in volt",
+ "B_DC=200.0; #B_DC value",
+ "R_B=47.0*10**3; #resistance in ohm",
+ "R_C=330.0; #resistance in ohm",
+ "V_BE=0.7; #voltage in volt",
+ "",
+ "#current",
+ "I_B=(V_BB-V_BE)/R_B; #base current",
+ "I_C=B_DC*I_B; #Q POINT",
+ "V_CE=V_CC-I_C*R_C; #Q POINT",
+ "I_C_sat=V_CC/R_C; #saturation current",
+ "I_c_peak=I_C_sat-I_C; #peak current ",
+ "I_b_peak=I_c_peak/B_DC; #peak current in ampere",
+ "",
+ "#result",
+ "print \"Q point of I_C = %.3f amperes\" %I_C",
+ "print \"Q point of V_CE = %.2f volts\" %V_CE",
+ "print \"peak base current = %.4f amperes\" %I_b_peak"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q point of I_C = 0.040 amperes",
+ "Q point of V_CE = 6.94 volts",
+ "peak base current = 0.0001 amperes"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.2, Page Number: 149<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "B_DC=125.0; #DC value",
+ "R_E=10.0**3; #resistance in ohm",
+ "",
+ "#calculation",
+ "R_IN_base=B_DC*R_E; #base resistance",
+ "",
+ "#Result",
+ "print \"DC input resistance, looking at base of transistor = %d ohm\" %R_IN_base"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DC input resistance, looking at base of transistor = 125000 ohm"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.3, Page Number: 151<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "B_DC=100; #DC value",
+ "R1=10*10**3; #resistance in ohm",
+ "R2=5.6*10**3; #resistance in ohm",
+ "R_C=1*10**3; #resistance in ohm",
+ "R_E=560; #resistance in ohm",
+ "V_CC=10; #voltage in volt",
+ "V_BE=0.7 #voltage in volt",
+ "",
+ "#calculation",
+ "R_IN_base=B_DC*R_E; #calculate base resistance",
+ "#We can neglect R_IN_base as it is equal to 10*R2",
+ "print \"input resistance seen from base = %d ohm\" %R_IN_base",
+ "print \"which can be neglected as it is 10 times R2\"",
+ "",
+ "V_B=(R2/(R1+R2))*V_CC; #base voltage",
+ "V_E=V_B-V_BE; #emitter voltage",
+ "I_E=V_E/R_E; #emitter current",
+ "I_C=I_E; #currents are equal",
+ "V_CE=V_CC-I_C*(R_C+R_E); #voltage in volt",
+ "",
+ "#result",
+ "print \"V_CE = %.2f volts\" %V_CE",
+ "print \"I_C = %.3f amperes\" %I_C",
+ "print \"Since V_CE>0V, transistor is not in saturation\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance seen from base = 56000 ohm",
+ "which can be neglected as it is 10 times R2",
+ "V_CE = 1.95 volts",
+ "I_C = 0.005 amperes",
+ "Since V_CE>0V, transistor is not in saturation"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.4, Page Number: 154<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_EE=10.0; #voltage in volt",
+ "V_BE=0.7; #voltage in volt",
+ "B_DC=150.0; #DC value ",
+ "R1=22.0*10**3; #resistance in ohm",
+ "R2=10.0*10**3; #resistance in ohm",
+ "R_C=2.2*10**3; #resistance in ohm",
+ "R_E=1.0*10**3; #resistance in ohm",
+ "",
+ "#calculation",
+ "R_IN_base=B_DC*R_E; #R_IN_base>10*R2,so it can be neglected",
+ "print \"input resistance as seen from base = %d ohm\" %R_IN_base",
+ "print \"it can be neglected as it is greater than 10 times R2\"",
+ "V_B=(R1/(R1+R2))*V_EE; #base voltage",
+ "V_E=V_B+V_BE; #emitter voltage",
+ "I_E=(V_EE-V_E)/R_E; #emitter current",
+ "I_C=I_E; #currents are equal",
+ "V_C=I_C*R_C; #collector voltage",
+ "V_EC=V_E-V_C; #emitter-collector voltage",
+ "",
+ "#result",
+ "print \"I_C collector current = %.4f amperes\" %I_C",
+ "print \"V_EC emitter-collector voltage = %.2f Volts\" %V_EC"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance as seen from base = 150000 ohm",
+ "it can be neglected as it is greater than 10 times R2",
+ "I_C collector current = 0.0024 amperes",
+ "V_EC emitter-collector voltage = 2.24 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.5, PAge Number: 154<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R1=68.0*10**3; #resistance in ohm",
+ "R2=47.0*10**3; #resistance in ohm",
+ "R_C=1.8*10**3; #resistance in ohm",
+ "R_E=2.2*10**3; #resistance in ohm",
+ "V_CC=-6.0; #voltage in volt",
+ "V_BE=0.7; #voltage in volt",
+ "B_DC=75.0; #DC value",
+ "",
+ "#calculation",
+ "R_IN_base=B_DC*R_E;",
+ "print \"input resistance as seen from base\"",
+ "print \"is not greater than 10 times R2 so it should be taken into account\"",
+ "#R_IN_base in parallel with R2",
+ "V_B=((R2*R_IN_base)/(R2+R_IN_base)/(R1+(R2*R_IN_base)/(R2+R_IN_base)))*V_CC;",
+ "V_E=V_B+V_BE; #emitter voltage",
+ "I_E=V_E/R_E; #emitter current",
+ "I_C=I_E; #currents are equal",
+ "V_C=V_CC-I_C*R_C; #collector voltage",
+ "V_CE=V_C-V_E; #collector-emitter voltage",
+ "",
+ "#result",
+ "print \"collector current = %.4f amperes\" %I_C",
+ "print \"collector emitter voltage = %.2f volts\" %V_CE"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance as seen from base",
+ "is not greater than 10 times R2 so it should be taken into account",
+ "collector current = -0.0006 amperes",
+ "collector emitter voltage = -3.46 volts"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.6, Page Number: 156<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CC=12.0; #voltage in volt",
+ "R_B=100.0*10**3; #resistance in ohm",
+ "R_C=560.0; #resistance in ohm",
+ "#FOR B_DC=85 AND V_BE=0.7V",
+ "B_DC=85.0; #DC value",
+ "V_BE=0.7; #base-emitter voltage",
+ "",
+ "#calculation",
+ "I_C_1=B_DC*(V_CC-V_BE)/R_B; #collector current",
+ "V_CE_1=V_CC-I_C_1*R_C; #collector-emittor voltage",
+ "#FOR B_DC=100 AND V_BE=0.6V",
+ "B_DC=100.0; #DC value ",
+ "V_BE=0.6; #base emitter voltage",
+ "I_C_2=B_DC*(V_CC-V_BE)/R_B; #collector current",
+ "V_CE_2=V_CC-I_C_2*R_C; #voltage in volt",
+ "p_del_I_C=((I_C_2-I_C_1)/I_C_1)*100; #percent change in collector current ",
+ "p_del_V_CE=((V_CE_2-V_CE_1)/V_CE_1)*100; #percent change in C-E voltage",
+ "",
+ "#result",
+ "print \"percent change in collector current = %.2f\" %p_del_I_C",
+ "print \"percent change in collector emitter voltage = %.2f\" %p_del_V_CE"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percent change in collector current = 18.69",
+ "percent change in collector emitter voltage = -15.18"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.7, Page Number: 159<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CC=20.0; #voltage in volt",
+ "R_C=4.7*10**3; #resistance in ohm",
+ "R_E=10.0*10**3; #resistance in ohm",
+ "V_EE=-20.0; #voltage in volt",
+ "R_B=100*10**3; #resistance in ohm",
+ "#FOR B_DC=85 AND V_BE=0.7V",
+ "B_DC=85; #DC value",
+ "V_BE=0.7; #base-emitter voltage",
+ "I_C_1=(-V_EE-V_BE)/(R_E+(R_B/B_DC));",
+ "V_C=V_CC-I_C_1*R_C; #colector voltage",
+ "I_E=I_C_1; #emittor current",
+ "V_E=V_EE+I_E*R_E; #emittor voltage",
+ "V_CE_1=V_C-V_E; #CE voltage",
+ "print \"I_C_1 = %.3f\" %I_C_1",
+ "print \"V_CE_1 = %.2f\" %V_CE_1",
+ "#FOR B_DC=100 AND V_BE=0.6V",
+ "B_DC=100; #DC value ",
+ "V_BE=0.6; #base-emitter voltage",
+ "I_C_2=(-V_EE-V_BE)/(R_E+(R_B/B_DC));",
+ "V_C=V_CC-I_C_2*R_C;#colector voltage",
+ "I_E=I_C_2; #emittor current",
+ "V_E=V_EE+I_E*R_E; #emittor voltage",
+ "V_CE_2=V_C-V_E; #CE voltage",
+ "print \"I_C_2 = %.3f\" %I_C_2",
+ "print \"V_CE_2 = %.2f\" %V_CE_2",
+ "",
+ "p_del_I_C=((I_C_2-I_C_1)/I_C_1)*100;",
+ "p_del_V_CE=((V_CE_2-V_CE_1)/V_CE_1)*100;",
+ "print \"percent change in collector currrent = %.2f\" %p_del_I_C",
+ "print \"percent change in collector emitter voltage = %.2f\" %p_del_V_CE",
+ "print \"answers in book are approximated\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I_C_1 = 0.002",
+ "V_CE_1 = 14.61",
+ "I_C_2 = 0.002",
+ "V_CE_2 = 14.07",
+ "percent change in collector currrent = 2.13",
+ "percent change in collector emitter voltage = -3.69",
+ "answers in book are approximated"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 5.8, Page Number: 161<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaratio",
+ "V_CC=10.0; #voltage in volt",
+ "B_DC=100.0; #Dc value",
+ "R_C=10.0*10**3; #resistance in ohm",
+ "R_B=100.0*10**3; #resistance in ohm",
+ "V_BE=0.7; #base-emittor voltage",
+ "",
+ "#calculation",
+ "I_C=(V_CC-V_BE)/(R_C+(R_B/B_DC)); #collector current",
+ "V_CE=V_CC-I_C*R_C; #CE voltage",
+ "",
+ "#result",
+ "print \"Q point of collector current %.4f amperes\" %I_C",
+ "print \"Q point of collector-emitter voltage %.3f volts\" %V_CE"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q point of collector current 0.0008 amperes",
+ "Q point of collector-emitter voltage 1.545 volts"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter6.ipynb b/Electronic_Devices/Chapter6.ipynb
new file mode 100755
index 00000000..22b56e17
--- /dev/null
+++ b/Electronic_Devices/Chapter6.ipynb
@@ -0,0 +1,591 @@
+{
+ "metadata": {
+ "name": "Chapter_6"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 6: BJT Amplifiers<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.1, Page Number: 171<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# result",
+ "",
+ "print \"theoretical example\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "theoretical example"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.2, Page Number: 174<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_E=2.0*10**-3; #emittor current",
+ "",
+ "#calculation",
+ "r_e=25.0*10**-3/I_E; #ac emitter resistance",
+ "",
+ "#result",
+ "print \"ac emitter resistance = %.2f ohms\" %r_e "
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac emitter resistance = 12.50 ohms"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.3, Page Number: 178<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_E=3.8*10**-3; #emittor current",
+ "B_ac=160.0; #AC value",
+ "R1=22*10**3; #resistance in ohm",
+ "R2=6.8*10**3; #resistance in ohm",
+ "R_s=300.0; #resistance in ohm",
+ "V_s=10.0*10**-3; #voltage in volt",
+ "r_e=25.0*10**-3/I_E; ",
+ "",
+ "#calculation",
+ "R_in_base=B_ac*r_e; #base resistance",
+ "R_in_tot=(R1*R2*R_in_base)/(R_in_base*R1+R_in_base*R2+R1*R2);",
+ "V_b=(R_in_tot/(R_in_tot+R_s))*V_s; #base voltage",
+ "",
+ "#result",
+ "print \"voltage at the base of the transistor = %.3f volts\" %V_b"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage at the base of the transistor = 0.007 volts"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.4, Page Number: 180<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "R_E=560.0; #resistance in ohm",
+ "f=2*10**3; #minimum value of frequency in hertz",
+ "X_C=R_E/10.0; #minimum value of capacitive reactance",
+ "",
+ "#calculation",
+ "C2=1.0/(2.0*math.pi*X_C*f); #capacitor ",
+ "",
+ "#result",
+ "print \"value of bypass capacitor = %.7f farads\" %C2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of bypass capacitor = 0.0000014 farads"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.5, Page Number: 181<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "r_e=6.58; #from ex6.3",
+ "R_C=1.0*10**3; #collector resistance",
+ "R_E=560; #emittor resistance",
+ "",
+ "#calculation",
+ "A_v=R_C/(R_E+r_e); #gain without bypass capacitor",
+ "A_v1=R_C/r_e; #gain with bypass capacitor",
+ "print \"gain without bypass capacitor = %.2f\" %A_v",
+ "print \"gain in the presence of bypass capacitor = %.2f\" %A_v1"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain without bypass capacitor = 1.76",
+ "gain in the presence of bypass capacitor = 151.98"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.6, Page Number: 182<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_C=10.0**3; #resistance in ohm",
+ "R_L=5.0*10**3; #inductor resistance",
+ "r_e=6.58; #r_e value",
+ "",
+ "#calculation",
+ "R_c=(R_C*R_L)/(R_C+R_L); #collector resistor",
+ "A_v=R_c/r_e; #gain with load",
+ "",
+ "#result",
+ "print \"ac collector resistor = %.2f ohms\" %R_c",
+ "print \"gain with load = %.2f\" %A_v"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac collector resistor = 833.33 ohms",
+ "gain with load = 126.65"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.7, Page Number: 184<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_C=3.3*10**3; #resistance in ohm",
+ "R_E1=330.0; #emitter resistance",
+ "",
+ "#calculation",
+ "A_v=R_C/R_E1; #voltage gain",
+ "",
+ "#result",
+ "print \"approximate voltage gain as R_E2 is bypassed by C2 = %.2f\" %A_v"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "approximate voltage gain as R_E2 is bypassed by C2 = 10.00"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.8, Page Number: 184<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "B_DC=150.0;",
+ "B_ac=175.0;",
+ "V_CC=10.0;",
+ "V_s=10.0*10**-3;",
+ "R_s=600.0;",
+ "R1=47.0*10**3;",
+ "R2=10.0*10**3;",
+ "R_E1=470.0;",
+ "R_E2=470.0;",
+ "R_C=4.7*10**3;",
+ "R_L=47.00*10**3;",
+ "R_IN_base=B_DC*(R_E1+R_E2);",
+ "#since R_IN_base is ten times more than R2,it can be neglected in DC voltage calculation",
+ "V_B=(R2/(R2+R1))*V_CC;",
+ "V_E=V_B-0.7;",
+ "I_E=V_E/(R_E1+R_E2);",
+ "I_C=I_E;",
+ "V_C=V_CC-I_C*R_C;",
+ "print('dc collector voltage = %.3f volts'%V_C)",
+ "r_e=25.0*10**-3/I_E;",
+ "#base resistance",
+ "R_in_base=B_ac*(r_e+R_E1);",
+ "#total input resistance",
+ "R_in_tot=(R1*R2*R_in_base)/(R1*R2+R_in_base*R1+R_in_base*R2);",
+ "attenuation=R_in_tot/(R_s+R_in_tot);",
+ "#ac collector resistance",
+ "R_c=R_C*R_L/(R_C+R_L);",
+ "#voltage gain from base to collector",
+ "A_v=R_c/R_E1;",
+ "#overall voltage gain A_V",
+ "A_V=A_v*attenuation;",
+ "#rms voltage at collector V_c",
+ "V_c=A_V*V_s;",
+ "V_out_p=math.sqrt(2)*V_c;",
+ "print('V_out peak = %d mV'%(V_out_p*1000))",
+ "",
+ "################Waveform plotting##############################",
+ "",
+ "import pylab",
+ "import numpy ",
+ "",
+ "t = arange(0.0, 4.0, 0.0005)",
+ "",
+ "",
+ "subplot(121)",
+ "plot(t, V_C+V_c*sin(2*pi*t))",
+ "ylim( (4.63,4.82) )",
+ "title('Collector Voltage')",
+ "",
+ "subplot(122)",
+ "plot(t, -V_s*sin(2*pi*t))",
+ "plot(t, V_out_p*sin(2*pi*t))",
+ "ylim( (-0.15,0.15) )",
+ "title('Source and output AC voltage')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dc collector voltage = 4.728 volts",
+ "V_out peak = 119 mV"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "<matplotlib.text.Text at 0xad2caac>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEICAYAAABfz4NwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXl8VNX5/z+TzCSZrDPZdxJ2AgipuOBXJahIUcGtKtiy\n1GrBpS4t35/W6he01g33Ulv61SqogEstm4CKGKUuIF8RFSigJJCNrJNlkklme35/HGayTWbunbud\nhPt+vXhp7tx75zPnzjzPOc95znMMRETQ0dHR0TntidBagI6Ojo4OH+gOQUdHR0cHgO4QdHR0dHRO\noTsEHR0dHR0AukPQ0dHR0TmF7hB0dHR0dADoDkEQpaWlyMvL8/9dUFCAjz76SENF8lJeXo6IiAh4\nvV6tpehwyqJFi/Dggw9qLWNI0deu8MBp5RDWrl2LKVOmICEhAdnZ2bjsssvw2Wefib6Pw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ga64oorKDExkc466yz6wx/+QOeff77/9UOHDtEll1xCycnJNGbMGHrr\nrbdCfp7TwiFs27aNjEYjeTyeAc958MEHaerUqVRfX0/19fV03nnn0YMPPkhEwR3Cc889R1OnTqWq\nqipyOp20ePFimjdvHhERlZeXU0JCAq1fv57cbjc1NjbSN998Q0REixYt8t+fiMjpdNKIESPoscce\nI5fLRTt37qSEhAQ6fPgwETGHkJSURJ9//jkRsS9aX/70pz/RJZdc4v97+/btlJaWRm63m15++WUa\nOXIklZWVkd1up2uuuYbmz59PRN0Owdc+JSUl9PLLL/e69+uvv05NTU3k8Xjo6aefpszMTP8X+957\n76WSkhJqbm6myspKmjhxIuXl5RERkcfjoZ/85Cf0xz/+kVwuFx07doyGDx9O77//fvCHxhGtra2U\nkpJCCxcupG3btvVy+EQUtG0DGbCe359ly5aRyWSijRs3EhGRw+Ggyy67jObOnUvNzc3kcrno008/\nJSJmpNPT02nPnj3k9Xpp9erVVFBQ4H8OfQn2zJYtW0YxMTG0bds28nq99Pvf/57OPfdcIiLq6uqi\n/Px8eu6558jtdtM777xDJpOp1/dVrs+/fPly/7k+pk2bRjk5OXTgwAFqb2/3O8xw7xeIESNG0Ouv\nv05Hjhwhk8lEdXV1RCTMVgS614cffuj/+2c/+xk98cQTRBS+XfHxyiuvkN1uJ6fTSXfffXcvJ3fD\nDTfQvHnzyOFw0MGDBykvL48uuOACIiKy2+2Um5tLr776Knk8Htq3bx+lpqbSwYMHg36W08IhvP76\n65SZmRn0nBEjRtC2bdv8f7///vtUUFBARMEf3Lhx43o9xOrqajKZTOR2u+nRRx+la665JuD7LVq0\nqFeP69NPP+2ncd68ebR8+XIiYg5h4cKFQT/D8ePHyWQyUVVVFRER3XjjjXT33XcTEdFFF11Ef/3r\nX/3nHj58mEwmE3k8noAO4aWXXgr6Xlar1d87HT58OH3wwQf+11566SV/e3355ZeUn5/f69pHH32U\nfvnLXwa9P28cOnSIFi1aRLm5uWQ0GmnOnDlUW1tLRMHbVohDmDZtmv+16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elhfr+fMcZYU1MTmzdv3qjZnE4n18G3sTLx1JKTye/3s/Lycnbw4MFRt+HNxlOLN1tvby97\n/vw5Y4wxj8fDbDYbu3btmqJcPLXk7LOA+vp6Vlxc/MHP5T6WPCKlr8erx5uL+lperneFqq/1ykcJ\nP71ej9OnT2P9+vXw+XzYvXs3MjIyUF1dDQDYt28fioqKYLfbkZ6ejri4OJw7d05xrYsXL+LMmTPQ\n6/WIjY1FTU1N0FplZWW4desWnj59CoPBgCNHjsDr9crOxFOLNxMA3LlzBxcuXEBWVhYEQQAAVFVV\n4fHjx7Kz8dTizdbd3Y3Kykr4/X74/X6Ul5dj7dq1ih5Hnlpy9tm7Am+ZleSSIxL6mqceby7qa+33\nNa1lRAghBAB9U5kQQsggGgiEEEIA0EAghBAyiAYCIYQQADQQCCGEDKKBQAghBADwfwJyXZ807NQ0\nAAAAAElFTkSuQmCC\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.9,Page Number: 190<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_E=10.0**3; #emitter resistance",
+ "R_L=10.0**3; #resistance in ohm",
+ "R1=18.0*10**3; #R1 in ohm",
+ "R2=18.0*10**3; #R2 in ohm",
+ "B_ac=175.0; #AC value",
+ "V_CC=10.0; #voltage in volt",
+ "V_BE=0.7; #base-emitter voltage",
+ "V_in=1.0; #input voltage in volt",
+ "",
+ "#calculation",
+ "",
+ "R_e=(R_E*R_L)/(R_E+R_L); #ac emitter resistance R_e",
+ "R_in_base=B_ac*R_e; #resistance from base R_in_base",
+ "",
+ "#total input resiatance R_in_tot",
+ "R_in_tot=(R1*R2*R_in_base)/(R1*R2+R1*R_in_base+R2*R_in_base);",
+ "print \"total input resistance = %.2f ohms\" %R_in_tot",
+ "V_E=((R2/(R1+R2))*V_CC)-V_BE; #emitter voltage",
+ "I_E=V_E/R_E; #emitter current",
+ "r_e=25.0*10**-3/I_E; #emitter resistance",
+ "A_v=R_e/(r_e+R_e);",
+ "print \"voltage gain = %.2f\" %A_v",
+ "#ac emitter current I_e",
+ "#V_e=A_v*V_b=1V",
+ "V_e=1.0; #V_evoltage",
+ "I_e=V_e/R_e; #emitter current",
+ "I_in=V_in/R_in_tot; #input current in ampere",
+ "A_i=I_e/I_in; #current gain",
+ "print \"current gain = %.2f\" %A_i",
+ "A_p=A_i; #power gain",
+ "#since R_L=R_E, one half of the total power is disspated to R_L",
+ "A_p_load=A_p/2.0; #power load",
+ "print \"power gain delivered to load = %.2f\" %A_p_load"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total input resistance = 8160.62 ohms",
+ "voltage gain = 0.99",
+ "current gain = 16.32",
+ "power gain delivered to load = 8.16"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.10, Page Number: 193<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CC=12.0; #source voltage in volt",
+ "V_BE=0.7; #base-emitter volatge",
+ "R_C=1.0*10**3; #resistance in ohm",
+ "r_e_ce=5.0; #for common emitter amplifier",
+ "R1=10.0*10**3; #resistance in ohm",
+ "R2=22.0*10**3; #resistance in ohm ",
+ "R_E=22.0; #emitter resistance in ohm",
+ "R_L=8.0; #load resistance in ohm",
+ "B_DC=100.0; #dc value",
+ "B_ac=100.0; #ac value",
+ "",
+ "#calculation",
+ "pt=R2+B_DC**2*R_E #temp variable",
+ "V_B=((R2*B_DC**2*R_E/(pt))/(R1+(R2*B_DC**2*R_E/(pt))))*V_CC;",
+ "V_E=V_B-2.0*V_BE; #emitter voltage",
+ "I_E=V_E/R_E; #emitter current",
+ "r_e=25.0*10**-3/I_E; #for darlington emitter-follower",
+ "P_R_E=I_E**2*R_E; #power dissipated by R_E",
+ "P_Q2=(V_CC-V_E)*I_E #power dissipated by transistor Q2",
+ "R_e=R_E*R_L/(R_E+R_L); #ac emitter resi. of darlington emitter follower",
+ "#total input resistance of darlington",
+ "kt=R_e+r_e #temp varaible",
+ "R_in_tot=R1*R2*B_ac**2*(kt)/(R1*R2+R1*B_ac**2*(kt)+R2*B_ac**2*(kt)); ",
+ "R_c=R_C*R_in_tot/(R_C+R_in_tot); #effective ac resistance",
+ "A_v_CE=R_c/r_e_ce; #voltage gain of common emitter",
+ "A_v_EF=R_e/(r_e+R_e); #voltage gain of common emitter amplifier",
+ "A_v=A_v_CE*A_v_EF; #overall voltage gain",
+ "",
+ "#result",
+ "print \"voltage gain of common emitter amplifier= %.2f\" %A_v_CE",
+ "print \"voltage gain of common emitter amplifier= %.2f\" %A_v_EF",
+ "print \"overall voltage gain = %.2f\" %A_v"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain of common emitter amplifier= 172.08",
+ "voltage gain of common emitter amplifier= 0.99",
+ "overall voltage gain = 169.67"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.11, Page Number: 196<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "B_DC=250.0; #dc value",
+ "R_C=2.2*10**3; #resistance in ohm",
+ "R_E=1.0*10**3; #emitter resistance",
+ "R_L=10.0*10**3;#load resistance",
+ "R1=56.0*10**3; #resistance in ohm",
+ "R2=12.0*10**3; #resistance in ohm",
+ "V_BE=0.7; #base-emitter voltage in volt",
+ "V_CC=10.0; #source voltage in volt",
+ "",
+ "#calculation",
+ "#since B_DC*R_E>>R2",
+ "V_B=(R2/(R1+R2))*V_CC;",
+ "V_E=V_B-V_BE; #emiiter voltage",
+ "I_E=V_E/R_E; #emitter current",
+ "r_e=25.0*10**-3/I_E; #r_e value",
+ "R_in=r_e; #input resistance",
+ "R_c=R_C*R_L/(R_C+R_L); #ac collector resistance",
+ "A_v=R_c/r_e; #current gain",
+ "#current gain is almost 1",
+ "#power gain is approximately equal to voltage gain",
+ "A_p=A_v; #power gain",
+ "A_i=1; #current gain",
+ "",
+ "#result",
+ "print \"input resistance = %.2f ohms\" %R_in",
+ "print \"voltage gain = %.2f\" %A_v",
+ "print \"current gain = %.2f\" %A_i",
+ "print \"power gain = %.2f\" %A_p"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance = 23.48 ohms",
+ "voltage gain = 76.80",
+ "current gain = 1.00",
+ "power gain = 76.80"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 6.12, Page Number: 197<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "A_v1=10.0;",
+ "A_v2=15.0;",
+ "A_v3=20.0;",
+ "",
+ "#calcultion",
+ "A_v=A_v1*A_v2*A_v3; #overall voltage gain",
+ "A_v1_dB=20.0*math.log10(A_v1); #gain in decibel",
+ "A_v2_dB=20.0*math.log10(A_v2); #gain in decibel",
+ "A_v3_dB=20.0*math.log10(A_v3); #gain in decibel",
+ "A_v_dB=A_v1_dB+A_v2_dB+A_v3_dB; #total gain in decibel",
+ "",
+ "#result",
+ "print \"overall voltage gain = %.1f\" %A_v",
+ "print \"Av1 = %.1f dB\" %A_v1_dB",
+ "print \"Av2 = %.1f dB\" %A_v2_dB",
+ "print \"Av3 = %.1f dB\" %A_v3_dB",
+ "print \"total voltage gain =%.1f dB\" %A_v_dB"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "overall voltage gain = 3000.0",
+ "Av1 = 20.0 dB",
+ "Av2 = 23.5 dB",
+ "Av3 = 26.0 dB",
+ "total voltage gain =69.5 dB"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter7.ipynb b/Electronic_Devices/Chapter7.ipynb
new file mode 100755
index 00000000..ac08bd97
--- /dev/null
+++ b/Electronic_Devices/Chapter7.ipynb
@@ -0,0 +1,710 @@
+{
+ "metadata": {
+ "name": "Chapter_7"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 7: Field-effect Transistors (FETs)<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.1, Page Number: 217<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 318
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_GS_off=-4; # voltage in volt",
+ "I_DSS=12*10**-3; # current in ampere",
+ "R_D=560; # resistance in ohm",
+ "",
+ "#calculation",
+ "V_P=-1*V_GS_off; # volt ",
+ "V_DS=V_P; # Vds in volt",
+ "I_D=I_DSS; # current accross resistor",
+ "V_R_D=I_D*R_D; #voltage across resistor",
+ "V_DD=V_DS+V_R_D; # Vdd in volt",
+ "",
+ "# result",
+ "print \"The value of V_DD required to put the device in the constant\"",
+ "print \" current area of operation of JFET = %.2f volt\" %V_DD"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of V_DD required to put the device in the constant",
+ " current area of operation of JFET = 10.72 volt"
+ ]
+ }
+ ],
+ "prompt_number": 319
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.2, Page Number: 218<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "print('The p-channel JFET requires a positive gate to source voltage.')",
+ "print('The more positive the voltage, the lesser the drain current.')",
+ "print('Any further increase in V_GS keeps the JFET cut off, so I_D remains 0')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The p-channel JFET requires a positive gate to source voltage.",
+ "The more positive the voltage, the lesser the drain current.",
+ "Any further increase in V_GS keeps the JFET cut off, so I_D remains 0"
+ ]
+ }
+ ],
+ "prompt_number": 320
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.3, Page number: 219<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "I_DSS=9.0*10**-3;",
+ "V_GS_off=-8.0;",
+ "V_GS=0.0;",
+ "I_D=9.0*10**-3",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))**2;",
+ "print('Value of I_D for V_GS=0V is %f A '%I_D)",
+ "V_GS=-1.0",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))**2;",
+ "print('Value of I_D for V_GS=-1V is %f A'%I_D)",
+ "V_GS= -4.0",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))**2;",
+ "print('Value of I_D for V_GS=-4V is %f A'%I_D)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of I_D for V_GS=0V is 0.009000 A ",
+ "Value of I_D for V_GS=-1V is 0.006891 A",
+ "Value of I_D for V_GS=-4V is 0.002250 A"
+ ]
+ }
+ ],
+ "prompt_number": 321
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.4, Page Number: 220<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable Declaration",
+ "I_DSS=3.0*10**-3;",
+ "V_GS_off=-6.0;",
+ "y_fs_max=5000.0*10**-6;",
+ "V_GS=-4.0;",
+ "g_m0=y_fs_max;",
+ "",
+ "#Calculation",
+ "g_m=g_m0*(1-(V_GS/V_GS_off));",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))",
+ "",
+ "#Result",
+ "print('forward transconductance = %f Siemens'%g_m)",
+ "print('value of I D = %f A'%I_D)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "forward transconductance = 0.001667 Siemens",
+ "value of I D = 0.001000 A"
+ ]
+ }
+ ],
+ "prompt_number": 322
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.5, Page Number: 221<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_GS=-20.0; # voltage in volt",
+ "I_GSS=-2*10**-9; # current in ampere",
+ "",
+ "#calculation",
+ "R_IN1=abs((-20/(2*10**-9))) # resistance in ohm",
+ "R_IN=R_IN1/(10**9)",
+ "",
+ "# result",
+ "print \"Input resistance = %d Giga ohm\" %R_IN"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input resistance = 10 Giga ohm"
+ ]
+ }
+ ],
+ "prompt_number": 323
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.6, Page Number: 223<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_DD=15; # voltage in volt",
+ "V_G=0; # voltage in volt",
+ "I_D=5*10**-3; # current in ampere",
+ "R_D=1*10**3; # resistance in ohm",
+ "R_G=10*10**6; # resistance in ohm",
+ "R_S=220; # resistance in ohm",
+ "",
+ "# calculation",
+ "V_S=I_D*R_S; # source voltage in volt",
+ "V_D=V_DD-I_D*R_D; # drain voltage in volt",
+ "V_DS=V_D-V_S; # drain to source voltage in volt",
+ "V_GS=V_G-V_S; # gate to source voltage in volt",
+ "",
+ "# result",
+ "print \"Drain to source voltage = %.2f volts\" %V_DS",
+ "print \"Gate to source voltage = %.2f volts\" %V_GS"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain to source voltage = 8.90 volts",
+ "Gate to source voltage = -1.10 volts"
+ ]
+ }
+ ],
+ "prompt_number": 324
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.7, Page Number: 224<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_GS=-5.0; # voltage in volt",
+ "I_D=6.25*10**-3; # current in ampere",
+ "",
+ "#calculation",
+ "R_G=abs((V_GS/I_D)) # resistance in ohm",
+ "",
+ "# result",
+ "print \"Gate resistance = %d ohm\" %R_G"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gate resistance = 800 ohm"
+ ]
+ }
+ ],
+ "prompt_number": 325
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.8, Page Number: 224<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "I_DSS=25.0*10**-3;",
+ "V_GS_off=15.0;",
+ "V_GS=5.0;",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))**2",
+ "R_S=abs((V_GS/I_D))",
+ "print('Drain current = %f Amperes'%I_D)",
+ "print('Source resistance = %.0f Ohms'%R_S)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current = 0.011111 Amperes",
+ "Source resistance = 450 Ohms"
+ ]
+ }
+ ],
+ "prompt_number": 326
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.9, Page Number: 225<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_D=6; # drain voltage in volt",
+ "V_GS_off=-3; # off voltage in volt",
+ "V_DD=12; # voltage in volt",
+ "I_DSS=12*10**-3; # current in ampere",
+ "",
+ "#calculation",
+ "I_D=I_DSS/2; #MIDPOINT BIAS",
+ "V_GS=V_GS_off/3.4; #MIDPOINT BIAS",
+ "R_S=abs((V_GS/I_D)) #resistance i voltage",
+ "R_D=(V_DD-V_D)/I_D #resistance in voltage ",
+ "",
+ "# result",
+ "print \"Source resistance = %.2f ohm\" %R_S",
+ "print \"Drain resistance = %d ohm\" %R_D"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Source resistance = 147.06 ohm",
+ "Drain resistance = 1000 ohm"
+ ]
+ }
+ ],
+ "prompt_number": 327
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.10, Page Number: 227<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import pylab",
+ "import numpy",
+ "",
+ "# variable declaration",
+ "R_S=680.0; # resistance in ohm",
+ "I_D=0; # current in ampere",
+ "",
+ "#calculation",
+ "V_GS=I_D*R_S; #FOR I_D=0A",
+ "",
+ "I_DSS=4*10**-3; # current in ampere",
+ "I_D=I_DSS; # currents are equal",
+ "V_GS1=-1*I_D*R_S; #FOR I_D=4mA",
+ "",
+ "# result",
+ "print \"V_GS at I_D=0amp is %d volt\" %V_GS",
+ "print \"V_GS at I_D=4mA is %.2f volt\" %V_GS1",
+ "print \"Plotting load line using the values of V_GS at I_D=0 and 4mA,\"",
+ "print \" we find the intersection of load line with transfer characteristic\"",
+ "print \" to get Q-point values of V_GS=-1.5V and I_D=2.25mA\"",
+ "",
+ "#########PLOT######################",
+ "idss=4",
+ "vgsoff=-6",
+ "vgs=arange(-6.0,0.0,0.0005)",
+ "idk=arange(0.0,4.0,0.0005)",
+ "ids=arange(0.0,2.25,0.0005)",
+ "vgsk=-idk*0.68",
+ "i_d=idss*(1-(vgs/vgsoff))**2",
+ "text(-3.00,2.25,'Q Point',size=13)",
+ "text(-3.25,2,'(-1.5V, 2.25mA)')",
+ "plot(vgs,i_d)",
+ "plot(vgsk,idk,'b')",
+ "plot(-1.5,2.25,'o')",
+ "ylim( (0,5) )",
+ "title('Transfer characteristic curve')",
+ "xlabel('Vgs')",
+ "ylabel('Idss')"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_GS at I_D=0amp is 0 volt",
+ "V_GS at I_D=4mA is -2.72 volt",
+ "Plotting load line using the values of V_GS at I_D=0 and 4mA,",
+ " we find the intersection of load line with transfer characteristic",
+ " to get Q-point values of V_GS=-1.5V and I_D=2.25mA"
+ ]
+ },
+ {
+ "output_type": "pyout",
+ "prompt_number": 328,
+ "text": [
+ "<matplotlib.text.Text at 0xd95b60c>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEXCAYAAABSwdSZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8TNf7B/BPNqIVkVCxhSxoLGmEhqJqNPZ9J3ZCVVe6\nWaqkVW2/VBeKLr+gakmtRWypJagt9rWWZhNbkCCJJJLMnN8fp5kKWZmZO3Pn83695iVm7tz73Eue\nOXPuOeexEUIIEBGRKtgqHQARERkOkzoRkYowqRMRqQiTOhGRijCpExGpCJM6EZGKMKnTU0lMTMQr\nr7yCcuXK4cMPPzTqsTQaDUJDQ416DFP58ssvMXr06Cd6r5OTE+Li4gwbEKmGvdIB0JMrW7YsbGxs\nAAD379+Ho6Mj7OzsAAA///wzgoKCjB7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JiY2MRGxuL6tWr49ixY6hUqZLSoRnMpUuX9D+vX78e/v7+\nCkZjeFu3bsWsWbOwfv16ODo6Kh2OUQkL/Bb5qJLO/TH5euoAkJ2djZEjR+LEiRMoVaoUZs+erap1\nkIcOHYoTJ07AxsYGnp6e+Omnn+Dm5qZ0WEbh5eWFI0eOwNXVVelQDKZPnz64cOEC7Ozs4O3tjQUL\nFqjqQ6t27drIysrS/5s1a9YM8+fPVzgqw1m3bh3eeecd3L59G87OzvD398eWLVuUDuupbNmyBePG\njdPP/SloqDigUFInIiLj4EKzREQqwqRORKQiTOpERCrCpE5EpCJM6mQ1Xn311TyTpgDgu+++wxtv\nvKFQRESGx6ROViMoKAhhYWF5nvv9998tckYlUUGY1Mlq9O7dG5s2bUJOTg4AIC4uDteuXUPz5s3x\nxhtvoG7dumjXrh06d+6MNWvWAAAmTpyI+vXrw8/PDx9++KGS4RMVi9HWfiEyN66urmjSpAk2b96M\nbt26ISwsDP3798fatWsRHx+Pv//+G4mJiahbty6Cg4ORlJSEP/74A+fPnwcApKSkKHwGREVjS52s\nysNdML///juCgoKwb98+9OvXDwDg5uaG1q1bAwDKly8PR0dHBAcHY926dShTpoxicRMVF5M6WZVu\n3bphx44dOH78ONLT0/XruuQ3sdrOzg5RUVHo06cPwsPD0aFDB1OHS1RiTOpkVcqWLYvWrVtjxIgR\n+hukLVq0wJo1ayCEQGJiIiIjIwEA9+/fx927d9GxY0d88803OHnypIKRExUP+9TJ6gQFBaFXr15Y\nuXIlAHkDdceOHahXrx7c3d3RqFEjODs7IzU1Fd27d0dmZiaEEPj2228VjpyoaFzQiwiyVf7ss88i\nKSkJTZs2xf79+1W1MiNZD7bUiQB06dIFd+/eRVZWFqZOncqEThaLLXUiIhXhjVIiIhVhUiciUhEm\ndSIiFWFSJyJSESZ1IiIVYVInIlKR/wdjx32hRVMVVQAAAABJRU5ErkJggg==\n"
+ }
+ ],
+ "prompt_number": 328
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.11, Page Number: 228<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_DD=12; # voltage in volt",
+ "V_D=7; # voltage in volt",
+ "R_D=3.3*10**3; # resistance in ohm",
+ "R_S=2.2*10**3; # resistance in ohm",
+ "R_1=6.8*10**6; # resistance in ohm",
+ "R_2=1*10**6; # resistance in ohm",
+ "",
+ "#calculation",
+ "I_D=(V_DD-V_D)/R_D; # drain current in ampere",
+ "V_S=I_D*R_S; # source voltage in volt",
+ "V_G=(R_2/(R_1+R_2))*V_DD; # gate voltage in volt",
+ "V_GS=V_G-V_S; # gate to source voltage in volt",
+ "",
+ "# result",
+ "print \"Drain Current = %.4f Ampere\" %I_D",
+ "print \"Gate to source voltage = %.4f volts\" %V_GS"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain Current = 0.0015 Ampere",
+ "Gate to source voltage = -1.7949 volts"
+ ]
+ }
+ ],
+ "prompt_number": 329
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.12, Page Number: 229<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_1=2.2*10**6; # resistance in ohm ",
+ "R_2=R_1; # resistance in ohm",
+ "V_DD=8; # voltage in volt",
+ "R_S=3.3*10**3; # resistance in ohm",
+ "",
+ "#calculation",
+ "V_GS=(R_2/(R_1+R_2))*V_DD; #FOR I_D=0A",
+ "V_G=V_GS; # voltage in volt",
+ "I_D=(V_G-0)/R_S; #FOR V_GS=0V",
+ "",
+ "# result",
+ "print \"V_GS = %d volt\" %V_GS",
+ "print \"at V_GS=0V. I_D = %.4f ampere\" %I_D",
+ "print \"Plotting load line using the value of V_GS=4V at I_D=0\"",
+ "print \" and I_D=1.2mA at V_GS=0V, we find the intersection of\"",
+ "print \" load line with transfer characteristic to get Q-point\"",
+ "print \" values of V_GS=-1.8V and I_D=1.8mA\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_GS = 4 volt",
+ "at V_GS=0V. I_D = 0.0012 ampere",
+ "Plotting load line using the value of V_GS=4V at I_D=0",
+ " and I_D=1.2mA at V_GS=0V, we find the intersection of",
+ " load line with transfer characteristic to get Q-point",
+ " values of V_GS=-1.8V and I_D=1.8mA"
+ ]
+ }
+ ],
+ "prompt_number": 330
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.13, Page Number: 235<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "I_DSS=10.0*10**-3;",
+ "V_GS_off=-8.0;",
+ "V_GS=-3.0;",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))**2;",
+ "print('Drain current when V_GS=-3V is %f Amperes'%I_D)",
+ "V_GS=3;",
+ "I_D=I_DSS*(1-(V_GS/V_GS_off))**2;",
+ "print('Drain current when V_GS=3V is %f Amperes'%I_D)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current when V_GS=-3V is 0.003906 Amperes",
+ "Drain current when V_GS=3V is 0.018906 Amperes"
+ ]
+ }
+ ],
+ "prompt_number": 331
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.14, Page Number: 236<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#variable Declaration",
+ "I_D_on=500.0*10**-3;",
+ "V_GS=10.0;",
+ "V_GS_th=1.0;",
+ "K=I_D_on/((V_GS-V_GS_th)**2)",
+ "V_GS=5.0;",
+ "I_D=K*(V_GS-V_GS_th)**2;",
+ "print('Drain current = %f A'%I_D)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current = 0.098765 A"
+ ]
+ }
+ ],
+ "prompt_number": 332
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.15, Page Number: 237<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_DSS=12*10**-3; # currenin ampere",
+ "V_DD=18; # voltage in volt",
+ "R_D=620; # resistance in oh",
+ "",
+ "#calculation",
+ "I_D=I_DSS; # currents are equal",
+ "V_DS=V_DD-I_D*R_D; # drain to source voltage",
+ "",
+ "# result",
+ "print \"Drain to sorce voltage = %.2f volt\" %V_DS"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain to sorce voltage = 10.56 volt"
+ ]
+ }
+ ],
+ "prompt_number": 333
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.16, Page Number: 238<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#variable Declaration",
+ "I_D_on=200.0*10**-3;",
+ "V_DD=24.0;",
+ "R_D=200.0;",
+ "V_GS=4.0;",
+ "V_GS_th=2.0;",
+ "R_1=100.0*10**3;",
+ "R_2=15.0*10**3;",
+ "",
+ "#Calculation ",
+ "K=I_D_on/((V_GS-V_GS_th)**2)",
+ "V_GS=(R_2/(R_1+R_2))*V_DD;",
+ "I_D=K*(V_GS-V_GS_th)**2;",
+ "V_DS=V_DD-I_D*R_D;",
+ "",
+ "#Result",
+ "print('Drain to Source voltage = %f V'%V_DS)",
+ "print('Gate to Source voltage = %f V'%V_GS)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain to Source voltage = 11.221172 V",
+ "Gate to Source voltage = 3.130435 V"
+ ]
+ }
+ ],
+ "prompt_number": 334
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 7.17, Page Number: 239<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_GS_on=3; # voltage in volt",
+ "V_GS=8.5 #voltage displayed on meter",
+ "V_DS=V_GS; # voltages are equal ",
+ "V_DD=15; # voltage in volt",
+ "R_D=4.7*10**3; # resistance in ohm",
+ "",
+ "#calculation",
+ "I_D=(V_DD-V_DS)/R_D; # drain current",
+ "",
+ "# result",
+ "print \"Drain current = %.4f ampere\" %I_D"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current = 0.0014 ampere"
+ ]
+ }
+ ],
+ "prompt_number": 335
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter8.ipynb b/Electronic_Devices/Chapter8.ipynb
new file mode 100755
index 00000000..8cb0d972
--- /dev/null
+++ b/Electronic_Devices/Chapter8.ipynb
@@ -0,0 +1,422 @@
+{
+ "metadata": {
+ "name": "Chapter_8"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 8: FET Amplifiers<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.1, Page Number: 253<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "g_m=4.0*10**-3; #gm value",
+ "R_d=1.5*10**3; #resistance",
+ "",
+ "#calculation",
+ "A_v=g_m*R_d; #voltage gain",
+ "",
+ "#result",
+ "print \"Voltage gain = %.2f\" %A_v"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain = 6.00"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.2, Page Number: 253<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "r_ds=10.0*10**3;",
+ "R_d=1.5*10**3; #from previous question",
+ "g_m=4.0*10**-3; #from previous question",
+ "",
+ "#calculation",
+ "A_v=g_m*((R_d*r_ds)/(R_d+r_ds)); #voltage gain",
+ "",
+ "#result",
+ "print \"Voltage gain = %.2f\" %A_v"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain = 5.22"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.3, Page Number:254<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_s=560; #resistance in ohm",
+ "R_d=1.5*10**3; #resistance in ohm",
+ "g_m=4*10**-3; #g_m value",
+ "",
+ "#calculation",
+ "A_v=(g_m*R_d)/(1+(g_m*R_s)) #voltage gain",
+ "",
+ "#result",
+ "print \"Voltage gain = %.2f\" %A_v"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain = 1.85"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.4, Page Number: 257<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "#Variable declaration",
+ "vdd=12.0 #volts",
+ "Id=1.96*10**-3 #Amp",
+ "Rd=3.3*10**3 #ohm",
+ "Idss=12.0*10**-3 #Amp",
+ "Rs=910 # Ohm",
+ "vgsoff= 3 #v",
+ "vin=0.1 #V",
+ "",
+ "#calculation",
+ "vd=vdd-(Id*Rd)",
+ "vgs=-Id*Rs",
+ "gm0=2*Idss/(abs(vgsoff))",
+ "gm=0.00325 #mS",
+ "vout=gm*Rd*vin",
+ "vout=vout*2*1.414",
+ "#Result",
+ "print\"Total output ac voltage(peak-to-peak) = %f V \\nridig on DC value of %fV \"%(vout,vd)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total output ac voltage(peak-to-peak) = 3.033030 V ",
+ "ridig on DC value of 5.532000V "
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.5, Page Number: 258<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_D=3.3*10**3; #resistance in ohm",
+ "R_L=4.7*10**3; #load resistance in ohm",
+ "g_m=3.25*10**-3; #from previous question",
+ "V_in=100.0*10**-3; #previous question",
+ "",
+ "#calculation",
+ "R_d=(R_D*R_L)/(R_D+R_L); #Equivalent drain resistance",
+ "V_out=g_m*R_d*V_in; #output RMS voltage in volt",
+ "",
+ "#result",
+ "print \"Output voltage rms value = %.2f Volts\" %V_out"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage rms value = 0.63 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.6, Page Number: 259<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_GSS=30.0*10**-9; #current in ampere",
+ "V_GS=10.0; #ground-source voltage",
+ "R_G=10.0*10**6; #resistance in ohm",
+ "",
+ "#calculation",
+ "R_IN_gate=V_GS/I_GSS; #gate input resistance",
+ "R_in=(R_IN_gate*R_G)/(R_IN_gate+R_G); #parallel combination",
+ "",
+ "#result",
+ "print \"Input resistance as seen by signal source = %.2f ohm\" %R_in"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input resistance as seen by signal source = 9708737.86 ohm"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.7, Page Number: 260<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "I_DSS=200.0*10**-3;",
+ "g_m=200.0*10**-3;",
+ "V_in=500.0*10**-3;",
+ "V_DD=15.0;",
+ "R_D=33.0;",
+ "R_L=8.2*10**3;",
+ "",
+ "#calculation",
+ "I_D=I_DSS; #Amplifier is zero biased",
+ "V_D=V_DD-I_D*R_D;",
+ "R_d=(R_D*R_L)/(R_D+R_L);",
+ "V_out=g_m*R_d*V_in;",
+ "",
+ "#result",
+ "print \"DC output voltage = %.2f Volts\" %V_D",
+ "print \"AC output voltage = %.2f volts\" %V_out"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DC output voltage = 8.40 Volts",
+ "AC output voltage = 3.29 volts"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.8, Page Number: 262<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Theoretical example",
+ "# result",
+ "",
+ "print \"Part A:\\nQ point: V_GS=-2V I_D=2.5mA. At V_GS=-1V, I_D=3.4mA,\"",
+ "print \"At V_GS=-3V, I_D=1.8mA. So peak to peak drain current is\" ",
+ "print \"the difference of the two drain currents=1.6mA\"",
+ "print \"\\nPart B:\\nQ point: V_GS=0V I_D=4mA. At V_GS=1V, I_D=5.3mA,\"",
+ "print \"At V_GS=-1V, I_D=2.5mA. So peak to peak drain current is\"",
+ "print\" the difference of the two drain currents=2.8mA\"",
+ "print \"\\nPart C:\\nQ point: V_GS=8V I_D=2.5mA. At V_GS=9V, I_D=3.9mA,\"",
+ "print \" At V_GS=7V, I_D=1.7mA. So peak to peak drain current is\"",
+ "print \" the difference of the two drain currents=2.2mA\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part A:",
+ "Q point: V_GS=-2V I_D=2.5mA. At V_GS=-1V, I_D=3.4mA,",
+ "At V_GS=-3V, I_D=1.8mA. So peak to peak drain current is",
+ "the difference of the two drain currents=1.6mA",
+ "",
+ "Part B:",
+ "Q point: V_GS=0V I_D=4mA. At V_GS=1V, I_D=5.3mA,",
+ "At V_GS=-1V, I_D=2.5mA. So peak to peak drain current is",
+ " the difference of the two drain currents=2.8mA",
+ "",
+ "Part C:",
+ "Q point: V_GS=8V I_D=2.5mA. At V_GS=9V, I_D=3.9mA,",
+ " At V_GS=7V, I_D=1.7mA. So peak to peak drain current is",
+ " the difference of the two drain currents=2.2mA"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.9, Page Number:263 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "R_1=47.0*10**3;",
+ "R_2=8.2*10**3;",
+ "R_D=3.3*10**3;",
+ "R_L=33.0*10**3;",
+ "I_D_on=200.0*10**-3;",
+ "V_GS=4.0;",
+ "V_GS_th=2.0;",
+ "g_m=23*10**-3;",
+ "V_in=25*10**-3;",
+ "V_DD=15.0;",
+ "",
+ "#calculation",
+ "V_GSnew=(R_2/(R_1+R_2))*V_DD;",
+ "K=I_D_on/((V_GS-V_GS_th)**2)",
+ "#K=value_of_K(200*10**-3,4,2);",
+ "K=K*1000;",
+ "I_D=K*((V_GSnew-V_GS_th)**2);",
+ "V_DS=V_DD-I_D*R_D/1000;",
+ "R_d=(R_D*R_L)/(R_D+R_L);",
+ "V_out=g_m*V_in*R_d;",
+ "",
+ "#result",
+ "print \"Drain to source voltage = %.2f volts\" %V_GSnew",
+ "print \"Drain current = %.2f mA\" %I_D",
+ "print \"Gate to source voltage = %.2f volts\" %V_DS",
+ "print \"AC output voltage = %.2f volts\" %V_out",
+ "print \"Answer in textbook are approximated\""
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain to source voltage = 2.23 volts",
+ "Drain current = 2.61 mA",
+ "Gate to source voltage = 6.40 volts",
+ "AC output voltage = 1.72 volts",
+ "Answer in textbook are approximated"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 8.10, Page Number: 266<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_DD=-15.0; #p=channel MOSFET",
+ "g_m=2000.0*10**-6; #minimum value from datasheets",
+ "R_D=10.0*10**3;",
+ "R_L=10.0*10**3;",
+ "R_S=4.7*10**3;",
+ "",
+ "#calculation",
+ "R_d=(R_D*R_L)/(R_D+R_L); #effective drain resistance",
+ "A_v=g_m*R_d;",
+ "R_in_source=1.0/g_m;",
+ "#signal souce sees R_S in parallel with ip rest at source terminal(R_in_source)",
+ "R_in=(R_in_source*R_S)/(R_in_source+R_S); ",
+ "",
+ "#result ",
+ "print \"minimum voltage gain = %.2f\" %A_v",
+ "print \"Input resistance seen from signal source = %.2f ohms\" %R_in"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum voltage gain = 10.00",
+ "Input resistance seen from signal source = 451.92 ohms"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/Chapter9.ipynb b/Electronic_Devices/Chapter9.ipynb
new file mode 100755
index 00000000..3bd19f57
--- /dev/null
+++ b/Electronic_Devices/Chapter9.ipynb
@@ -0,0 +1,371 @@
+{
+ "metadata": {
+ "name": "Chapter_9"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h1>Chapter 9: Power Amplifiers<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.1, Page Number: 280<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CC=15.0; #supply voltage",
+ "R_C=1.0*10**3; #resistance in ohm",
+ "R_1=20.0*10**3; #resistance in ohm",
+ "R_2=5.1*10**3; #resistance in ohm",
+ "R_3=5.1*10**3; #resistance in ohm",
+ "R_4=15.0*10**3; #resistance in ohm",
+ "R_E_1=47.0; #resistance in ohm",
+ "R_E_2=330.0; #resistance in ohm",
+ "R_E_3=16.0; #resistance in ohm",
+ "R_L=16.0; #SPEAKER IS THE LOAD;",
+ "B_ac_Q1=200.0; #B_ac value",
+ "B_ac_Q2=B_ac_Q1; #B_ac value",
+ "B_ac_Q3=50.0; #B_ac value",
+ "",
+ "#calculation",
+ "#R_c1=R_C||[R_3||R_4||B_acQ2*B_ac_Q3*(R_E_3||R_L)] is ac collector resistance",
+ "R=(R_E_3*R_L)/(R_E_3+R_L); #calculating resistance",
+ "R=B_ac_Q2*B_ac_Q3*R; ",
+ "R=(R*R_4)/(R+R_4); #calculating resistance",
+ "R=(R*R_3)/(R+R_3);",
+ "R_c1=(R*R_C)/(R_C+R); #ac collector resistance",
+ "#V_B=((R_2||(B_acQ1*(R_E_1+R_E_2)))/(R_1+(R_2||B_acQ1*(R_E_1+R_E_2))))*V_CC;",
+ "#This is the base voltage;",
+ "#LET R=(R_2||(B_acQ1*(R_E_1+R_E_2)))",
+ "R=(R_2*B_ac_Q1*(R_E_1+R_E_2))/(R_2+B_ac_Q1*(R_E_1+R_E_2));",
+ "V_B=R*V_CC/(R_1+R);",
+ "I_E=(V_B-0.7)/(R_E_1+R_E_2);",
+ "r_e_Q1=25.0*10**-3/I_E;",
+ "A_v1=(-1)*(R_c1)/(R_E_1+r_e_Q1); #voltage gain of 1st stage",
+ "#total input resistance of 1st stage is ",
+ "#R_in_tot_1=R_1||R_2||B_ac_Q1*(R_E_1+r_e_Q1);",
+ "xt=R_E_1+r_e_Q1 ",
+ "yt=R_2*B_ac_Q1",
+ "R_in_tot_1=(R_1*(yt*(xt)/(R_2+B_ac_Q1*(xt))))/(R_1+(yt*(xt)/(yt*(xt))));",
+ "A_v2=1; #gain of darlington voltage-follower",
+ "A_v_tot=A_v1*A_v2; #total gain",
+ "A_p=(A_v_tot**2)*(R_in_tot_1/R_L); #power gain",
+ "A_p=42508.68",
+ "",
+ "#result",
+ "print \"Voltage gain= %.2f\" %A_v_tot",
+ "print \"Power gain= %.2f\" %A_p"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain= -15.29",
+ "Power gain= 42508.68"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.2, Page Number: 281<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_in=176.0*10**-3;",
+ "R_in=2.9*10**3; #total input resistance from previous question",
+ "A_p=42429.0; #power gain from previous question",
+ "V_CC=15.0;",
+ "I_CC=0.6; #emitter current",
+ "",
+ "#calculation",
+ "P_in=V_in**2/R_in; #input power",
+ "P_out=P_in*A_p;",
+ "P_DC=I_CC*V_CC;",
+ "eff=P_out/P_DC; #efficiency",
+ "",
+ "#result",
+ "print \"efficiency= %.2f\" %eff"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency= 0.05"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.3, Page Number: 287<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CC=20.00; #supply voltage",
+ "R_L=16.0; #load resistance",
+ "",
+ "#calculation",
+ "V_out_peak=V_CC; #calculate peak op voltage",
+ "I_out_peak=V_CC/R_L; #calculate peak op current",
+ "",
+ "#result",
+ "print \"ideal maximum peak output voltage = %.2f volts\" %V_out_peak",
+ "print \"ideal maximum current =%.2f amperes\" %I_out_peak"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ideal maximum peak output voltage = 20.00 volts",
+ "ideal maximum current =1.25 amperes"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.4, Page Number: 288<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# variable declaration",
+ "V_CC=20.0; #supply volatge",
+ "R_L=16.0; #load resistance",
+ "",
+ "#calculation",
+ "V_out_peak=V_CC/2;",
+ "I_out_peak=V_out_peak/R_L;",
+ "",
+ "#result",
+ "print \"ideal maximum output peak voltage = %.2f volts\" %V_out_peak",
+ "print \"ideal maximum current = %.2f amperes\" %I_out_peak"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ideal maximum output peak voltage = 10.00 volts",
+ "ideal maximum current = 0.62 amperes"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.5, Page Number: 290<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "V_CC=20.0; #supply voltage",
+ "R_L=8.0; #load resistance",
+ "B_ac=50.0; #B_ac value",
+ "r_e=6.0; #internal resistance",
+ "",
+ "#calculation",
+ "V_out_peak=V_CC/2;",
+ "V_CEQ=V_out_peak;",
+ "I_out_peak=V_CEQ/R_L;",
+ "I_c_sat=I_out_peak;",
+ "P_out=0.25*I_c_sat*V_CC;",
+ "P_DC=(I_c_sat*V_CC)/math.pi;",
+ "R_in=B_ac*(r_e+R_L);",
+ "",
+ "#result",
+ "print \"maximum ac output power = %.2f Watts\" %P_out",
+ "print \"maximum DC output power = %.2f Watts\" %P_DC",
+ "print \"input resistance = %.2f ohms\" %R_in"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum ac output power = 6.25 Watts",
+ "maximum DC output power = 7.96 Watts",
+ "input resistance = 700.00 ohms"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.6, Page Number: 292<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "V_DD=24.0;",
+ "V_in=100*10**-3; #ip volatge",
+ "R1=440.0; #resistance in ohm",
+ "R2=5.1*10**3; #resistance in ohm",
+ "R3=100*10**3; #resistance in ohm",
+ "R4=10**3; #resistance in ohm",
+ "R5=100.0; #resistance in ohm",
+ "R7=15*10**3; #resistance in ohm",
+ "R_L=33.0; #load resistance in ohm",
+ "V_TH_Q1=2.0; # V-TH value",
+ "V_TH_Q2=-2.0; ",
+ "",
+ "#calculation",
+ "I_R1=(V_DD-(-V_DD))/(R1+R2+R3);",
+ "V_B=V_DD-I_R1*(R1+R2); #BASE VOLTAGE",
+ "V_E=V_B+0.7; #EMITTER VOLTAGE",
+ "I_E=(V_DD-V_E)/(R4+R5); #EMITTER CURRENT",
+ "V_R6=V_TH_Q1-V_TH_Q2; #VOLTAGE DROP ACROSS R6",
+ "I_R6=I_E; ",
+ "R6=V_R6/I_R6;",
+ "r_e=25*10**-3/I_E; #UNBYPASSED EMITTER RESISTANCE",
+ "A_v=R7/(R5+r_e); #VOLTAGE GAIN",
+ "V_out=A_v*V_in;",
+ "P_L=V_out**2/R_L;",
+ "",
+ "#result",
+ "print \"value of resistance R6 = %.2d ohms for AB operation\" %R6",
+ "print \"power across load = %.2f watts\"%P_L "
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of resistance R6 = 2418 ohms for AB operation",
+ "power across load = 5.15 watts"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.7, Page Number:295<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "f=200.0*10**3; #frequency in hertz",
+ "I_c_sat=100.0*10**-3; #saturation current",
+ "V_ce_sat=0.2; #sat voltage",
+ "t_on=1.0*10**-6; #on time",
+ "",
+ "#calculation",
+ "T=1/f; #time period of signal",
+ "P_D_avg=(t_on/T)*I_c_sat*V_ce_sat; #power dissipation",
+ "",
+ "#result",
+ "print \"average power dissipation =%.3f Watts\" %P_D_avg"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "average power dissipation =0.004 Watts"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "<h3>Example 9.8, Page Number: 298<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "import math",
+ "# variable declaration",
+ "P_D_avg=4.0*10**-3; #power dissipation",
+ "V_CC=24.0; #supply voltage",
+ "R_c=100.0; #resistance in ohm",
+ "",
+ "#calculation",
+ "P_out=(0.5*V_CC**2)/R_c; #output power",
+ "n=(P_out)/(P_out+P_D_avg); #n is efficiency",
+ "",
+ "#result",
+ "print \"efficiency=%.4f\" %n"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency=0.9986"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Devices/README.txt b/Electronic_Devices/README.txt
new file mode 100755
index 00000000..7ae64652
--- /dev/null
+++ b/Electronic_Devices/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: Electronic Devices
+Author: Thomas L. Floyd
+Publisher: Dorling Kindersley Pvt. Ltd.
+Year of publication: 2009
+Isbn: 9788177586435
+Edition: 7th \ No newline at end of file
diff --git a/Electronic_Devices/screenshots/ipwaveform.png b/Electronic_Devices/screenshots/ipwaveform.png
new file mode 100755
index 00000000..72b97ef9
--- /dev/null
+++ b/Electronic_Devices/screenshots/ipwaveform.png
Binary files differ
diff --git a/Electronic_Devices/screenshots/modulatedopvoltage.png b/Electronic_Devices/screenshots/modulatedopvoltage.png
new file mode 100755
index 00000000..bcb4e66a
--- /dev/null
+++ b/Electronic_Devices/screenshots/modulatedopvoltage.png
Binary files differ
diff --git a/Electronic_Devices/screenshots/transfercharectercurve.png b/Electronic_Devices/screenshots/transfercharectercurve.png
new file mode 100755
index 00000000..eda2589e
--- /dev/null
+++ b/Electronic_Devices/screenshots/transfercharectercurve.png
Binary files differ
diff --git a/Electronic_Principles/Chapter_10_New.ipynb b/Electronic_Principles/Chapter_10_New.ipynb
new file mode 100755
index 00000000..c36aae9c
--- /dev/null
+++ b/Electronic_Principles/Chapter_10_New.ipynb
@@ -0,0 +1,440 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 10 VOLTAGE AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-1, Page 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "re=22.7 #Ac resistance as per example 9-5(Ohm)\n",
+ "RC=3.6 #Collector Resistance(KOhm)\n",
+ "RL=10 #Load Resistance(KOhm)\n",
+ "Vin=2 #Input voltage(mV)\n",
+ "\n",
+ "rc=RC*RL/(RC+RL) #AC collector resistance(Ohm)\n",
+ "Av=(rc/re)*1000 #Voltage gain\n",
+ "Vout=Av*Vin #Output voltage(mV)\n",
+ "\n",
+ "print 'Voltage gain Av = ',round(Av,2)\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain Av = 116.61\n",
+ "Output voltage Vout = 233.22 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-2, Page 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RC=3.6 #Collector Resistance(KOhm)\n",
+ "RL=2.2 #Load Resistance(KOhm)\n",
+ "Vin=5 #Input voltage(mV)\n",
+ "VEE=9 #collector voltage(V)\n",
+ "RE=10 #Emitter resistance(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "\n",
+ "rc=RC*RL/(RC+RL) #AC collector resistance(Ohm)\n",
+ "IE=(VEE-VBE)/RE #emitter current(mA)\n",
+ "re=25/IE #AC resistance(Ohm)\n",
+ "Av=(rc/re)*1000 #Voltage gain\n",
+ "Vout=Av*Vin #Output voltage(mV)\n",
+ "\n",
+ "print 'Emitter current IE = ',IE,'mA'\n",
+ "print 'Voltage gain Av = ',round(Av,2)\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 0.83 mA\n",
+ "Voltage gain Av = 45.34\n",
+ "Output voltage Vout = 226.68 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-3, Page 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "re=22.7 #Ac resistance as per example 9-5(Ohm)\n",
+ "B=300 #current gain\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "Rs=0.6 #internal resistance of source(KOhm)\n",
+ "Av=117 #Voltage gain as per example 10-1\n",
+ "Vs=2 #ac voltage supply(mV)\n",
+ "\n",
+ "Zin_base=B*re/1000 #input impedance of base(KOhm)\n",
+ "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n",
+ "Vout=Av*Vin #output voltage(mV)\n",
+ "\n",
+ "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n",
+ "print 'Output volatge Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of stage Zin(stage) = 1.43 KOhm\n",
+ "Output volatge Vout = 164.69 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-4, Page 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "re=22.7 #Ac resistance as per example 9-5(Ohm)\n",
+ "B=50 #current gain\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "Rs=0.6 #internal resistance of source(KOhm)\n",
+ "Av=117 #Voltage gain as per example 10-1\n",
+ "Vs=2 #ac voltage supply(mV)\n",
+ "\n",
+ "Zin_base=B*re/1000 #input impedance of base(KOhm)\n",
+ "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n",
+ "Vout=Av*Vin #output voltage(mV)\n",
+ "\n",
+ "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n",
+ "print 'Output volatge Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of stage Zin(stage) = 0.7 KOhm\n",
+ "Output volatge Vout = 125.71 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-5, Page 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "re=22.7 #Ac resistance as per example 9-5(Ohm)\n",
+ "B=100 #current gain\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "Rs=0.6 #internal resistance of source(KOhm)\n",
+ "RC=3.6 #colletcor resistance (KOhm)\n",
+ "Vs=1 #ac voltage supply(mV)\n",
+ "RL=10 #Load resistance(KOhm)\n",
+ "\n",
+ "Zin_base=B*re/1000 #input impedance of base(KOhm)\n",
+ "Zin_stage1=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage1(KOhm)\n",
+ "Vin=(Zin_stage1/(Rs+Zin_stage1))*Vs #input voltage(mV)\n",
+ "Zin_stage2=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage2(KOhm)\n",
+ "rc1=(RC*Zin_stage2)/(RC+Zin_stage2) #AC collector resistance of stage1(KOhm)\n",
+ "Av1=rc1/re #Voltage gain of stage 1\n",
+ "vc=Av1*Vin #AC collector voltage of stage 1(V)\n",
+ "rc2=(RC*RL)/(RC+RL) #AC collector resistance of stage2(KOhm)\n",
+ "Av2=rc2/re #Voltage gain of stage 2\n",
+ "Vout=Av2*vc #output voltage(mV)\n",
+ "Av=Av1*Av2 #Overall voltage gain\n",
+ "Voutf=Av*Vin #AC output voltage across RL(V)\n",
+ "\n",
+ "print 'AC collector voltage of first stage vc = ',round(vc*1000,2),'mV'\n",
+ "print 'AC output voltage across load resistor Vout = ',round(Voutf*1000,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "AC collector voltage of first stage vc = 21.67 mV\n",
+ "AC output voltage across load resistor Vout = 2.53 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-6, Page 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "re=0.18 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "Rs=0.6 #internal resistance of source(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "Vs=50 #ac voltage supply(mV)\n",
+ "RL=10 #Load resistance(KOhm)\n",
+ "B=200 #current gain \n",
+ "\n",
+ "Zin_base=B*re #input impedance of base(KOhm)\n",
+ "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n",
+ "rc=(RC*RL)/(RC+RL) #AC collector resistance of stage(KOhm)\n",
+ "Av=rc/re #Voltage gain of stage\n",
+ "Vout=Av*Vin #output voltage(mV)\n",
+ "\n",
+ "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n",
+ "print 'Output volatge Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of stage Zin(stage) = 1.72 KOhm\n",
+ "Output volatge Vout = 544.91 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-7, Page 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "re=0.18 #Emitter resistance (KOhm)\n",
+ "re1=0.0227 #Ac resistance as per example 9-5(KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "Rs=0.6 #internal resistance of source(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "Vs=50 #ac voltage supply(mV)\n",
+ "RL=10 #Load resistance(KOhm)\n",
+ "B=200 #current gain \n",
+ "\n",
+ "Zin_base=B*(re+re1) #input impedance of base(KOhm)\n",
+ "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n",
+ "rc=(RC*RL)/(RC+RL) #AC collector resistance of stage(KOhm)\n",
+ "Av=rc/(re+re1) #Voltage gain of stage\n",
+ "Vout=Av*Vin #output voltage(mV)\n",
+ "\n",
+ "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n",
+ "print 'Output volatge Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of stage Zin(stage) = 1.73 KOhm\n",
+ "Output volatge Vout = 484.55 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-8, Page 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "re=0.18 #emitter reistance(Ohm)\n",
+ "B=200 #current gain\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "Rs=0.6 #internal resistance of source(KOhm)\n",
+ "RC=3.6 #colletcor resistance (KOhm)\n",
+ "Vs=1 #ac voltage supply(mV)\n",
+ "RL=10 #Load resistance(KOhm)\n",
+ "\n",
+ "Zin_base=B*re #input impedance of base(KOhm)\n",
+ "Zin_stage1=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage1(KOhm)\n",
+ "Vin=(Zin_stage1/(Rs+Zin_stage1))*Vs #input voltage(mV)\n",
+ "Zin_stage2=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage2(KOhm)\n",
+ "rc1=(RC*Zin_stage2)/(RC+Zin_stage2) #AC collector resistance of stage1(KOhm)\n",
+ "Av1=rc1/re #Voltage gain of stage 1\n",
+ "vc=Av1*Vin #AC collector voltage of stage 1(V)\n",
+ "rc2=(RC*RL)/(RC+RL) #AC collector resistance of stage2(KOhm)\n",
+ "Av2=rc2/re #Voltage gain of stage 2\n",
+ "Vout=Av2*vc #output voltage(mV)\n",
+ "Av=Av1*Av2 #Overall voltage gain\n",
+ "Voutf=Av*Vin #AC output voltage across RL(V)\n",
+ "\n",
+ "print 'AC collector voltage of first stage vc = ',round(vc,2),'mV'\n",
+ "print 'AC output voltage across load resistor Vout = ',round(Voutf,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "AC collector voltage of first stage vc = 4.79 mV\n",
+ "AC output voltage across load resistor Vout = 70.39 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10-9, Page 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RV_min=0 #minimum variable resistance (KOhm)\n",
+ "RV_max=10 #maximum variable resistance (KOhm)\n",
+ "re=0.1 #Emitter resistance (KOhm)\n",
+ "\n",
+ "rf_min=RV_min+1 #minimum feedback resistance(KOhm)\n",
+ "rf_max=RV_max+1 #maximum feedback resistance(KOhm)\n",
+ "Av_min=rf_min/re #minimum voltage gain\n",
+ "Av_max=rf_max/re #maximum voltage gain\n",
+ "\n",
+ "print 'minimum voltage gain Av(min)= ',Av_min\n",
+ "print 'minimum voltage gain Av(max)= ',Av_max"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum voltage gain Av(min)= 10.0\n",
+ "minimum voltage gain Av(max)= 110.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_11_New.ipynb b/Electronic_Principles/Chapter_11_New.ipynb
new file mode 100755
index 00000000..9065b138
--- /dev/null
+++ b/Electronic_Principles/Chapter_11_New.ipynb
@@ -0,0 +1,523 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 11 CC AND CB AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-1, Page 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RE=4.3 #Emitter resistance(KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=10 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=10 #Load Resistance(KOhm)\n",
+ "VG=1 #Input voltage(mV)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "B=200 #current gain \n",
+ "\n",
+ "VBB=VCC/2 #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "re1=(25/IE) #AC resistance(Ohm)\n",
+ "re=RE*RL/(RE+RL) #external ac resistance(KOhm)\n",
+ "Zin_base=(re+(re1/1000))*B #input impedance of base(KOhm)\n",
+ "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "\n",
+ "print 'input impedance of stage Zin(base) = ',round(Zin_base,2),'KOhm'\n",
+ "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of stage Zin(base) = 606.4 KOhm\n",
+ "input impedance of stage Zin(stage) = 4.96 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-2, Page 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "re=3.03 #Emitter resistance(KOhm)\n",
+ "VG=1 #Input voltage(mV)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "B=200 #current gain \n",
+ "Zin=5 #input impedance(KOhm)\n",
+ "\n",
+ "Vin=(Zin/(Zin+RG))*VG #input voltage(V)\n",
+ "\n",
+ "print 'Input voltage Vin = ',round(Vin,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input voltage Vin = 0.89 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-3, Page 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "RE=2.2 #Emitter resistance(KOhm)\n",
+ "R1=4.7 #Base resistance1 (KOhm)\n",
+ "R2=4.7 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=6.8 #Load Resistance(KOhm)\n",
+ "VG=1 #Input voltage(mV)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "B=150 #current gain \n",
+ "\n",
+ "VBB=VCC/2.0 #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "re1=(25/IE) #AC resistance(Ohm)\n",
+ "re=RE*RL/(RE+RL) #external ac resistance(KOhm)\n",
+ "Zin_base=(re+(re1/1000))*B #input impedance of base(KOhm)\n",
+ "Zin_stage=((R1**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "Av=re/(re+(re1/1000)) #Voltage gain of stage\n",
+ "Vin=(Zin_stage/(Zin_stage+RG))*VG #input voltage(V)\n",
+ "Vout=Av*Vin #output voltage(V)\n",
+ "\n",
+ "\n",
+ "print 'input impedance of stage Zin(base) = ',round(Zin_base,2),'KOhm'\n",
+ "print 'input impedance of stage Zin(stage) = ',Zin_stage,'KOhm'\n",
+ "print 'voltage gain of emitter follower Av = ',round(Av,3)\n",
+ "print 'Output volatge Vout = ',round(Vout,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of stage Zin(base) = 250.55 KOhm\n",
+ "input impedance of stage Zin(stage) = 2.35 KOhm\n",
+ "voltage gain of emitter follower Av = 0.995\n",
+ "Output volatge Vout = 0.79 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-4, Page 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RG=600 #internal resistance of source(KOhm)\n",
+ "B=300 #current gain \n",
+ "\n",
+ "Zout=RG/B #Output impedance(KOhm)\n",
+ "\n",
+ "print 'Output impedance Zout = ',Zout,'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output impedance Zout = 2 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-5, Page 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=30 #collector voltage(V)\n",
+ "RE=0.1 #Emitter resistance(KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=10 #Base resistance2 (KOhm)\n",
+ "RL=0.1 #Load Resistance(KOhm)\n",
+ "VG=1 #Input voltage(mV)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "B=300 #current gain \n",
+ "\n",
+ "VBQ=VCC/2.0 #Base voltage(V)\n",
+ "VEQ=VBQ #Emitter voltage(V), ignore VBE\n",
+ "IEQ=VEQ/RE #Emitter current(mA)\n",
+ "re=(25/IEQ) #AC resistance(Ohm)\n",
+ "Zb=((RG**-1)+(R1**-1)+(R2**-1))**-1 #impedance looking back from base(KOhm)\n",
+ "Z=Zb*1000/B #impedance after current gain (Ohm) \n",
+ "Ze=Z+re #impedance looking back into emitter(Ohm)\n",
+ "Zout=(((RE*1000)**-1)+(Ze**-1))**-1 #Output impedance(Ohm)\n",
+ "\n",
+ "print 'Output impedance is Zout = ',round(Zout,2),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output impedance is Zout = 1.91 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-6, Page 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RE=0.68 #Emitter resistance(KOhm)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "re=0.18 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=0.27 #Load resistance(KOhm)\n",
+ "B=100 #current gain \n",
+ "\n",
+ "VBB=(R1*R2/(R1+R2)) #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "re=(25/IE) #AC resistance(Ohm)\n",
+ "Zin=B*RL #input impedance (KOhm)\n",
+ "rc=((RC**-1)+(Zin**-1))**-1 #ac collector resistance(KOhm)\n",
+ "Av=rc/(re/1000) #voltage gain of stage\n",
+ "\n",
+ "print 'voltage gain of CE stage Av = ',round(Av,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain of CE stage Av = 206.15\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-7, Page 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RE=0.68 #Emitter resistance(KOhm)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "re=0.18 #Emitter resistance (KOhm)\n",
+ "R1=10.0 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=0.27 #Load resistance(KOhm)\n",
+ "B=100 #current gain \n",
+ "\n",
+ "VBB=10*(R2/(R1+R2)) #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "re=(25/IE) #AC resistance(Ohm)\n",
+ "rc=((RC**-1)+(RL**-1))**-1 #ac collector resistance(KOhm)\n",
+ "Av=rc/(re/1000) #voltage gain of stage\n",
+ "\n",
+ "print 'voltage gain of CE stage Av = ',round(Av,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain of CE stage Av = 16.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-8, Page 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "RE=0.06 #Emitter resistance(KOhm)\n",
+ "R1=10.0 #Base resistance1 (KOhm)\n",
+ "R2=20.0 #Base resistance2 (KOhm)\n",
+ "RG=0.6 #internal resistance of source(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=0.03 #Load resistance(KOhm)\n",
+ "B1=100 #current gain of Q1\n",
+ "B2=100 #current gain of Q2\n",
+ "\n",
+ "B=B1*B2 #Overall current gain\n",
+ "VBB=15*(R2/(R1+R2)) #Base voltage(V)\n",
+ "VE=VBB-(2*VBE) #Emitter voltage(V)\n",
+ "IE2=VE/RE #Emitter current(mA)\n",
+ "IB2=IE2/B2 #Base current of Q2(mA)\n",
+ "IE1=IB2 #emiter current of Q1(mA)\n",
+ "IB1=IE1*1000/B1 #base current of Q1(uA)\n",
+ "re=((RE**-1)+(RL**-1))**-1 #ac emitter resistance(KOhm)\n",
+ "Zin_base=B*re #input impedance of Q1(KOhm)\n",
+ "\n",
+ "print 'Overall current gain B = ',B\n",
+ "print 'base current of Q1 IB1 = ',round(IB1,2),'uA'\n",
+ "print 'input impedance at base of Q1 Zin(base) = ',Zin_base,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall current gain B = 10000\n",
+ "base current of Q1 IB1 = 14.33 uA\n",
+ "input impedance at base of Q1 Zin(base) = 200.0 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-9, Page 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=20 #input voltage (V)\n",
+ "RL=15 #Load resistance(Ohm)\n",
+ "Vz=10 #voltage across zener(V)\n",
+ "B=100 #current gain\n",
+ "Rs=680.0 #series resistor(Ohm)\n",
+ "\n",
+ "Vout=Vz-0.7 #Output voltage approx.(V)\n",
+ "Iout=Vout/RL #Load current(A)\n",
+ "IB=Iout*1000/B #base current(mA)\n",
+ "Is=(Vin-Vz)*1000/Rs #current through series resistor(mA)\n",
+ "Iz=Is-IB #zener current(mA)\n",
+ "\n",
+ "print 'output voltage Vout = ',Vout,'V'\n",
+ "print 'Zener current Iz = ',round(Iz,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout = 9.3 V\n",
+ "Zener current Iz = 8.51 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-10, Page 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=30 #input voltage (V)\n",
+ "RL=100 #Load resistance(Ohm)\n",
+ "Vz=6.2 #voltage across zener(V)\n",
+ "B=100 #current gain\n",
+ "Rs=680.0 #series resistor(Ohm)\n",
+ "R1=1 #Resistor (KOhm)\n",
+ "R2=2 #Resistor (KOhm)\n",
+ "\n",
+ "Vout=(Vz+0.7)*(R1+R2)/R1 #Output voltage approx.(V)\n",
+ "I1=(Vz+0.7)/R1 #Load current(A)\n",
+ "Vout=I1*(R1+R2) #Output voltage(V)\n",
+ "\n",
+ "print 'output voltage Vout = ',Vout,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout = 20.7 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11-11, Page 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VG=2 #AC input voltage (mV)\n",
+ "Vs=10 #supply volatge(V)\n",
+ "RL=10 #Load resistance(KOhm)\n",
+ "RG=50.0 #source resistor(Ohm)\n",
+ "R1=10 #Resistor (KOhm)\n",
+ "R2=2.2 #Resistor (KOhm)\n",
+ "RC=3.6 #collector resistor (KOhm)\n",
+ "RE=2.2 #emitter resistance(KOhm)\n",
+ "\n",
+ "VB=Vs*R2/(R1+R2) #Base voltage(V)\n",
+ "IE=(VB-0.7)*1000/RE #emitter current(uA)\n",
+ "re=(25/IE)*1000 #ac resistance(Ohm)\n",
+ "Zin=1000*((RE**-1)+((re/1000)**-1))**-1 #input impedance(KOhm)\n",
+ "Zout=RC #Output impedance(KOhm)\n",
+ "rc=((RC**-1)+(RL**-1))**-1 #collector resistance(KOhm)\n",
+ "Av=rc*1000/re #voltage gain\n",
+ "Vin=(Zin/(Zin+RG))*VG #input voltage(V)\n",
+ "Vout=Av*Vin #output voltage(mV)\n",
+ "\n",
+ "print 'output voltage Vout = ',round(Vout,2),'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout = 52.43 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_12_New.ipynb b/Electronic_Principles/Chapter_12_New.ipynb
new file mode 100755
index 00000000..9f88647a
--- /dev/null
+++ b/Electronic_Principles/Chapter_12_New.ipynb
@@ -0,0 +1,593 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 12 POWER AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-1, Page 384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "VCC=30 #collector voltage(V)\n",
+ "RE=20 #Emitter resistance(Ohm)\n",
+ "R1=490.0 #Base resistance1 (Ohm)\n",
+ "R2=68.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=180 #Load Resistance(Ohm)\n",
+ "RC=120 #Collector resistance(Ohm)\n",
+ "\n",
+ "VB=VCC*(R2/(R1+R2)) #Base voltage(V)\n",
+ "VE=math.ceil(VB-VBE) #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(A)\n",
+ "ICQ=IE #collector current (A)\n",
+ "VC=VCC-(ICQ*RC) #collector voltage(V)\n",
+ "VCEQ=VC-VE #collector-emitter voltage (V) \n",
+ "rc=RC*RL/(RC+RL) #ac collector resistance(Ohm)\n",
+ "\n",
+ "print 'Collector current ICQ = ',ICQ*1000,'mA'\n",
+ "print 'collector-emitter voltage VCEQ = ',VCEQ,'V'\n",
+ "print 'ac collector resistance rc = ',rc,'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current ICQ = 150.0 mA\n",
+ "collector-emitter voltage VCEQ = 9.0 V\n",
+ "ac collector resistance rc = 72 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-2, Page 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "VCC=30 #collector voltage(V)\n",
+ "RE=20 #Emitter resistance(Ohm)\n",
+ "R1=490.0 #Base resistance1 (Ohm)\n",
+ "R2=68.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=180 #Load Resistance(Ohm)\n",
+ "RC=120 #Collector resistance(Ohm)\n",
+ "\n",
+ "ICQ=150 #collector current (mA)\n",
+ "VCEQ=9 #collector-emitter voltage (V) \n",
+ "rc=72.0 #ac collector resistance(Ohm)\n",
+ "\n",
+ "ic_sat=ICQ+(VCEQ/rc)*1000 #ic(sarturation) (mA)\n",
+ "VCE_cut=VCEQ+((ICQ*rc)/1000) #VCE(cut-off) (V)\n",
+ "MP1=ICQ*RC\n",
+ "MP2=VCEQ\n",
+ "MPP=2*(min(MP1,MP2)) #maximum peak-to-peak voltage (V)\n",
+ "\n",
+ "print 'ic(sarturation) = ',ic_sat,'mA'\n",
+ "print 'VCE(cut-off) = ',VCE_cut,'V'\n",
+ "print 'maximum peak-to-peak voltage MPP = ',MPP,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ic(sarturation) = 275.0 mA\n",
+ "VCE(cut-off) = 19.8 V\n",
+ "maximum peak-to-peak voltage MPP = 18 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-3, Page 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "VCC=30 #collector voltage(V)\n",
+ "RE=20 #Emitter resistance(Ohm)\n",
+ "R1=490.0 #Base resistance1 (Ohm)\n",
+ "R2=68.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=180.0 #Load Resistance(Ohm)\n",
+ "RC=120 #Collector resistance(Ohm)\n",
+ "vin=200 #input voltage(mV)\n",
+ "zin=100 #input impedance of base(Ohm)\n",
+ "MPP=18 #peak-to-peak voltage (V)\n",
+ "\n",
+ "Zin_stage=((zin**-1)+(R1**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n",
+ "Pin=vin**2/(Zin_stage*8)/1000 #ac input power (mW)\n",
+ "Pout=1000*MPP**2/(RL*8) #ac output power (mW)\n",
+ "Ap=Pout/Pin #power gain\n",
+ "\n",
+ "print 'Power gain Ap = ',math.ceil(Ap)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power gain Ap = 1683.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-4, Page 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "VCC=30 #collector voltage(V)\n",
+ "RE=20 #Emitter resistance(Ohm)\n",
+ "R1=490.0 #Base resistance1 (Ohm)\n",
+ "R2=68.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=180 #Load Resistance(Ohm)\n",
+ "RC=120 #Collector resistance(Ohm)\n",
+ "\n",
+ "VB=VCC*(R2/(R1+R2)) #Base voltage(V)\n",
+ "VE=math.ceil(VB-VBE) #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(A)\n",
+ "ICQ=IE #collector current (A)\n",
+ "VC=VCC-(ICQ*RC) #collector voltage(V)\n",
+ "VCEQ=VC-VE #collector-emitter voltage (V) \n",
+ "PDQ=VCEQ*ICQ #power dissipation(W)\n",
+ "I_bias=VCC/(R1+R2) #bias current(mA)\n",
+ "Idc=I_bias+ICQ #dc current(mA)\n",
+ "Pdc=VCC*Idc #dc input power to stage(W)\n",
+ "Pout=0.225 #Output power as per example 12-3 (W)\n",
+ "n=(Pout/Pdc)*100 #efficiency of stage\n",
+ "\n",
+ "print 'Power dissipation PDQ = ',PDQ,'W'\n",
+ "print 'efficiency of stage n = ',round(n,2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power dissipation PDQ = 1.35 W\n",
+ "efficiency of stage n = 3.68 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-6, Page 391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12 #collector voltage(V)\n",
+ "RE=16 #Emitter resistance(Ohm)\n",
+ "R1=50.0 #Base resistance1 (Ohm)\n",
+ "R2=100.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=16 #Load Resistance(Ohm)\n",
+ "\n",
+ "VB=VCC*(R2/(R1+R2)) #Base voltage(V)\n",
+ "VE=(VB-VBE) #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(A)\n",
+ "ICQ=IE #collector current (A)\n",
+ "VCEQ=VCC-VE #collector-emitter voltage (V) \n",
+ "re=RE*RL/(RE+RL) #ac emitter resistance(Ohm)\n",
+ "\n",
+ "print 'Collector current ICQ = ',ICQ*1000,'mA'\n",
+ "print 'collector-emitter voltage VCEQ = ',VCEQ,'V'\n",
+ "print 'ac collector resistance re = ',re,'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current ICQ = 456.25 mA\n",
+ "collector-emitter voltage VCEQ = 4.7 V\n",
+ "ac collector resistance re = 8 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-7, Page 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12 #collector voltage(V)\n",
+ "RE=16 #Emitter resistance(Ohm)\n",
+ "R1=50.0 #Base resistance1 (Ohm)\n",
+ "R2=100.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=16 #Load Resistance(Ohm)\n",
+ "\n",
+ "ICQ=456 #collector current (mA)\n",
+ "VCEQ=4.7 #collector-emitter voltage (V) \n",
+ "re=8.0 #ac emitter resistance(Ohm)\n",
+ "\n",
+ "ic_sat=(1000*(VCEQ/re))+ICQ #ic(sarturation) (mA)\n",
+ "VCE_cut=VCEQ+(ICQ*re)/1000 #VCE(cut-off) (V)\n",
+ "MP1=ICQ*re/1000\n",
+ "MP2=VCEQ\n",
+ "MPP=2*(min(MP1,MP2)) #maximum peak-to-peak voltage (V)\n",
+ "\n",
+ "print 'ic(sarturation) = ',ic_sat/1000,'A'\n",
+ "print 'VCE(cut-off) = ',VCE_cut,'V'\n",
+ "print 'maximum peak-to-peak voltage MPP = ',MPP,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ic(sarturation) = 1.0435 A\n",
+ "VCE(cut-off) = 8.348 V\n",
+ "maximum peak-to-peak voltage MPP = 7.296 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-8, Page 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=20 #collector voltage(V)\n",
+ "R1=100.0 #Base resistance1 (Ohm)\n",
+ "R2=100.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=8.0 #Load Resistance(Ohm)\n",
+ "\n",
+ "MPP=VCC #maximum peak-to-peak voltage (V)\n",
+ "PD_max=MPP**2/(40*RL) #Maximum power dissipation(W)\n",
+ "Pout_max=MPP**2/(8*RL) #Maximum output power(W)\n",
+ "\n",
+ "print 'Maximum power dissipation PD_max = ',PD_max,'W'\n",
+ "print 'Maximum output power Pout_max = ',Pout_max,'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum power dissipation PD_max = 1.25 W\n",
+ "Maximum output power Pout_max = 6.25 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-9, Page 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "VCC=20 #collector voltage(V)\n",
+ "R1=100.0 #Base resistance1 (Ohm)\n",
+ "R2=100.0 #Base resistance2 (Ohm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=8.0 #Load Resistance(Ohm)\n",
+ "Ra=15 #adjustable resistor(Ohm)\n",
+ "\n",
+ "VCEQ=VCC/2 #collector-emitter voltage (V) \n",
+ "I_bias=VCC/(R1+R2+Ra) #bias current(mA)\n",
+ "Ic_sat=VCEQ/RL #ic(sarturation) (mA)\n",
+ "Iav=Ic_sat/math.pi #average current (A)\n",
+ "Idc=I_bias+Iav #dc current(mA)\n",
+ "Pdc=VCC*Idc #dc input power to stage(W)\n",
+ "Pout=6.25 #Output power as per example 12-8 (W)\n",
+ "n=(Pout/Pdc)*100 #efficiency of stage\n",
+ "\n",
+ "\n",
+ "print 'efficiency of stage n = ',round(n,2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency of stage n = 63.66 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-10, Page 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=20 #collector voltage(V)\n",
+ "R1=3.9 #Base resistance1 (KOhm)\n",
+ "R2=3.9 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=10.0 #Load Resistance(Ohm)\n",
+ "\n",
+ "VCEQ=VCC/2 #collector-emitter voltage (V) \n",
+ "I_bias=(VCC-(2*VBE))/(R1+R2) #bias current(mA)\n",
+ "Ic_sat=VCEQ/RL #ic(sarturation) (mA)\n",
+ "Iav=Ic_sat/math.pi #average current (A)\n",
+ "Idc=(I_bias/1000)+Iav #dc current(mA)\n",
+ "Pdc=VCC*Idc #dc input power to stage(W)\n",
+ "Pout=VCC**2/(8*RL) #Output power (W)\n",
+ "n=(Pout/Pdc)*100 #efficiency of stage\n",
+ "\n",
+ "print 'efficiency of stage n = ',round(n,2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency of stage n = 77.96 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-11, Page 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "L=2*10**-6 #inductance (H)\n",
+ "C=470*10**-12 #capacitance(F)\n",
+ "\n",
+ "fr=((2*math.pi)*((L*C)**0.5))**-1\n",
+ "\n",
+ "print 'Resonant frequency fr = ',round((fr*10**-6),2),'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency fr = 5.19 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-12, Page 410"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "fr=5.19*10**6 #frequency as per previous example(Hz)\n",
+ "L=2*10**-6 #inductance (H)\n",
+ "C=470*10**-12 #capacitance(F)\n",
+ "QL=100 #quality factor of coil\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "\n",
+ "XL=2*math.pi*fr*L #inductive impedance(Ohm)\n",
+ "Rp=QL*XL/1000 #Eq. parallel resistance of coil(KOhm)\n",
+ "rc=1000*Rp*RL/(Rp+RL) #ac collector resistance(Ohm)\n",
+ "Q=rc/XL #Q of overall circuit\n",
+ "BW=(fr/Q/1000) #band width of amplifier(KHz)\n",
+ "\n",
+ "print 'band width of amplifier BW = ',round(BW,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "band width of amplifier BW = 390.39 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-13, Page 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "rc=867.0 #ac collector resistance as per preceding example (Ohm)\n",
+ "\n",
+ "MPP=2*VCC #Maximum peak-to-peak voltage(V)\n",
+ "PD=1000*MPP**2/(40*rc) #worst-case power dissipation(mW)\n",
+ "\n",
+ "print 'Worst-case power dissipation PD = ',math.ceil(PD),'mW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Worst-case power dissipation PD = 26.0 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12-14, Page 414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "PD=625 #maximum power rating at 25 deg C(mW)\n",
+ "D=5 #Derating factor(mW/deg C)\n",
+ "TA=50 #ambient temperature(deg C)\n",
+ "\n",
+ "DP=D*(TA-25) #difference in power(mW) \n",
+ "PD_max=PD-DP #maximum power rating(mW)\n",
+ "\n",
+ "print 'Maximum power rating PD_max = ',PD_max,'mW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum power rating PD_max = 500 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 94
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_13_New.ipynb b/Electronic_Principles/Chapter_13_New.ipynb
new file mode 100755
index 00000000..2b92ce1a
--- /dev/null
+++ b/Electronic_Principles/Chapter_13_New.ipynb
@@ -0,0 +1,784 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 13 JFETs"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-1, Page 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VG=20 #Gate voltage(V)\n",
+ "IG=1*10**-9 #Gate current(A) \n",
+ "\n",
+ "Rin=VG/IG #input resistance(Ohm)\n",
+ "\n",
+ "print 'input resistance of JFET Rin = ',Rin/10**6,'MOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance of JFET Rin = 20000.0 MOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-2, Page 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vp=6 #Pinch off voltage(V)\n",
+ "IDSS=100*10**-3 #current drain to source with shorted gate(A)\n",
+ "\n",
+ "RDS=Vp/IDSS #Ohmic resistance(Ohm)\n",
+ "VGS_off=-Vp #gate-source cutoff voltage(V)\n",
+ "\n",
+ "print 'Ohmic resistance RDS = ',RDS,'Ohm'\n",
+ "print 'Gate-source cutoff VGS(off) = ',VGS_off,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ohmic resistance RDS = 60.0 Ohm\n",
+ "Gate-source cutoff VGS(off) = -6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-3, Page 431"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VGS_off=-4 #gate-source cutoff voltage(V)\n",
+ "IDSS=5 #current drain to source with shorted gate(mA)\n",
+ "\n",
+ "VGS=VGS_off/2 #gate voltage(V)\n",
+ "ID=IDSS/4.0 #drain current(mA)\n",
+ "\n",
+ "print 'Gate voltage VGS = ',VGS,'V'\n",
+ "print 'Drain current ID = ',ID,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gate voltage VGS = -2 V\n",
+ "Drain current ID = 1.25 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-4, Page 432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VGS_off=-8 #gate-source cutoff voltage(V)\n",
+ "IDSS=16 #current drain to source with shorted gate(mA)\n",
+ "\n",
+ "VGS=VGS_off/2 #gate voltage(V)\n",
+ "ID=IDSS/4.0 #drain current(mA)\n",
+ "\n",
+ "print 'Gate voltage VGS = ',VGS,'V'\n",
+ "print 'Drain current ID = ',ID,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gate voltage VGS = -4 V\n",
+ "Drain current ID = 4.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-5, Page 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vp=4 #pinchoff voltage(V)\n",
+ "Vin=-10 #input voltage(V)\n",
+ "RD=10.0 #drain resistor(KOhm)\n",
+ "IDSS=10.0 #IDSS (mA)\n",
+ "VDD=10.0 #Drain supply voltage(V)\n",
+ "\n",
+ "VGS_off=-Vp #VGS cutoff voltage(V)\n",
+ "VD=-Vin #drain voltage(V)\n",
+ "ID_sat=VD/RD #saturation drain current(mA)\n",
+ "RDS=Vp/IDSS #Ohmic resistance(Ohm)\n",
+ "VD=VDD*RDS/(RDS+RD) #drain votage(V)\n",
+ "\n",
+ "print 'Drain voltage VD = ',round(VD,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain voltage VD = 0.38 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-6, Page 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vp=4 #pinchoff voltage(V)\n",
+ "RD=2.0 #drain resistor(KOhm)\n",
+ "RS=400 #source resistance(Ohm)\n",
+ "IDSS=10.0 #IDSS (mA)\n",
+ "VDD=30.0 #Drain supply voltage(V)\n",
+ "\n",
+ "RDS=1000*Vp/IDSS #Ohmic resistance(Ohm)\n",
+ "ID=IDSS/4.0 #drain current(mA)\n",
+ "VD=VDD-(ID*RD) #drain votage(V)\n",
+ "\n",
+ "print 'Ohmic resistance RDS = ',RDS,'Ohm'\n",
+ "print 'drain voltage VD = ',VD,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ohmic resistance RDS = 400.0 Ohm\n",
+ "drain voltage VD = 25.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-7, Page 437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "IDSS=20 #IDSS (mA)\n",
+ "RS=270 #Source resistance (Ohm)\n",
+ "\n",
+ "VGS=-IDSS*RS #gate-source voltage(V)\n",
+ "VGSQ_min=-0.8 #Q point minimum gate-source voltage(V)\n",
+ "VGSQ_max=-2.1 #Q point maximum gate-source voltage(V)\n",
+ "IDQ_min=2.8 #Q point minimum drain current(V)\n",
+ "IDQ_max=8.0 #Q point maximum drain current(V)\n",
+ "VGS_off_min=2 #VGS(off) minimum(V)\n",
+ "VGS_off_max=6 #VGS(off) maximum(V)\n",
+ "ID_min=8.0 #ID minimum(mA)\n",
+ "ID_max=20.0 #ID maximum(mA)\n",
+ "Rs_min=1000*VGS_off_min/ID_min #Minimum value for Rs(Ohm)\n",
+ "Rs_max=1000*VGS_off_max/ID_max #Maximum value for Rs(Ohm)\n",
+ "\n",
+ "print 'Maximum value for Rs =',Rs_max,'Ohm'\n",
+ "print 'Minimum value for Rs =',Rs_min,'Ohm'\n",
+ "print 'Choose approximately mid point between these two.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value for Rs = 300.0 Ohm\n",
+ "Minimum value for Rs = 250.0 Ohm\n",
+ "Choose approximately mid point between these two.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-8, Page 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VS=10 #source voltage (V)\n",
+ "RS=2.0 #source resistance(KOhm)\n",
+ "VDD=30 #Drain supply voltage (V)\n",
+ "RD=1.0 #Drain resistance(KOhm)\n",
+ "\n",
+ "ID=VS/Rs #Drain current(mA)\n",
+ "VD=VDD-(ID*RD) #Drain voltage(V)\n",
+ "VDS=VD-VS #Drain to source voltage (V)\n",
+ "ID_sat=VDD/(RD+RS) #ID(dc-saturation) (mA)\n",
+ "VDS_cut=VDD #VDS(cutoff) (V)\n",
+ "\n",
+ "print 'ID (saturation) = ',ID_sat,'mA'\n",
+ "print 'VDS (cutoff) = ',VDS_cut,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ID (saturation) = 10.0 mA\n",
+ "VDS (cutoff) = 30 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-9, Page 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "IDSS=20 #IDSS (mA)\n",
+ "RS=270 #Source resistance (Ohm)\n",
+ "VDD=30 #Drain supply voltage (V)\n",
+ "RD=1.0 #Drain resistance(KOhm)\n",
+ "R1=1*10**6 #Gate resistor1(Ohm) \n",
+ "R2=2*10**6 #Gate resistor2(Ohm) \n",
+ "\n",
+ "VG=-VDD*R1/(R1+R2) #gate-source voltage(V)\n",
+ "ID=VG/RS #current for second point(mA)\n",
+ "\n",
+ "VGSQ_min=-0.4 #Q point minimum gate-source voltage(V)\n",
+ "VGSQ_max=-2.4 #Q point maximum gate-source voltage(V)\n",
+ "IDQ_min=5.2 #Q point minimum drain current(V)\n",
+ "IDQ_max=6.3 #Q point maximum drain current(V)\n",
+ "\n",
+ "print 'Maximum value for VGS =',VGSQ_max,'V'\n",
+ "print 'Minimum value for VGS =',VGSQ_min,'V'\n",
+ "print 'Maximum value for ID =',IDQ_max,'mA'\n",
+ "print 'Minimum value for ID =',IDQ_min,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value for VGS = -2.4 V\n",
+ "Minimum value for VGS = -0.4 V\n",
+ "Maximum value for ID = 6.3 mA\n",
+ "Minimum value for ID = 5.2 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 93
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-10, Page 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RS=3.0 #Source resistance (KOhm)\n",
+ "VDD=15 #Drain supply voltage (V)\n",
+ "RD=1.0 #Drain resistance(KOhm)\n",
+ "\n",
+ "ID=VDD/RS #drain current(mA)\n",
+ "VD=VDD-(ID*RD) #drain voltage(V)\n",
+ "\n",
+ "print 'Drain current ID = ',ID,'mA'\n",
+ "print 'Drain voltage VD = ',VD,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current ID = 5.0 mA\n",
+ "Drain voltage VD = 10.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-11, Page 444"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RS=2.0 #Source resistance (KOhm)\n",
+ "VDD=10 #Drain supply voltage (V)\n",
+ "RD=1.0 #Drain resistance(KOhm)\n",
+ "VBE=0.7 #BJT transistor drop(V)\n",
+ "\n",
+ "ID=((VDD/2)-VBE)/RS #drain current(mA)\n",
+ "VD=VDD-(ID*RD) #drain voltage(V)\n",
+ "\n",
+ "print 'Drain current ID = ',ID,'mA'\n",
+ "print 'Drain voltage VD = ',VD,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current ID = 2.15 mA\n",
+ "Drain voltage VD = 7.85 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-12, Page 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "IDSS=5.0 #IDSS current (mA)\n",
+ "gm0=5000.0 #transconductance at VGS=0(uS)\n",
+ "VGS=-1.0 #VGS (V)\n",
+ "VGS_off=1000*-2*IDSS/gm0 #VGS (off) (V)\n",
+ "gm=gm0*(1-(VGS/VGS_off)) #gm at VGS=-1V\n",
+ "\n",
+ "print 'VGS (Off) = ',VGS_off,'V'\n",
+ "print 'gm = ',gm,'uS'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "VGS (Off) = -2.0 V\n",
+ "gm = 2500.0 uS\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-13, Page 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RD=3.6 #drain resistance(KOhm)\n",
+ "RL=10 #Load resistance(KOhm)\n",
+ "gm=5000 #transconductance (uS)\n",
+ "Vin=1 #input(mVpp)\n",
+ "\n",
+ "rd=RD*RL/(RD+RL) #ac drain resistance(KOhm)\n",
+ "Av=gm*rd/1000 #voltage gain\n",
+ "Vout=Av*Vin #Output voltage(V)\n",
+ "\n",
+ "print 'ac drain resistance rd = ',round(rd,2),'KOhm'\n",
+ "print 'voltage gain Av = ',round(Av,2)\n",
+ "print 'output voltage Vout = ',round(Vout,2),'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac drain resistance rd = 2.65 KOhm\n",
+ "voltage gain Av = 13.24\n",
+ "output voltage Vout = 13.24 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-14, Page 450"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RS=1.0 #source resistance(KOhm)\n",
+ "RL=1.0 #Load resistance(KOhm)\n",
+ "gm=2500.0*10**-6 #transconductance (S)\n",
+ "Vin=1 #input(mVpp)\n",
+ "\n",
+ "rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)\n",
+ "Av=gm*rs/(1+(gm*rs)) #voltage gain\n",
+ "Vout=Av*Vin #Output voltage(V)\n",
+ "\n",
+ "print 'ac source resistance rs = ',round(rs,2),'Ohm'\n",
+ "print 'voltage gain Av = ',round(Av,2)\n",
+ "print 'output voltage Vout = ',round(Vout,2),'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac source resistance rs = 500.0 Ohm\n",
+ "voltage gain Av = 0.56\n",
+ "output voltage Vout = 0.56 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ " Example 13-15, Page 450"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Ra=780 #Adjustaed resistance(Ohm)\n",
+ "RS1=220 #source resistance(Ohm)\n",
+ "VDD=30 #Drain supply voltage(V)\n",
+ "RL=3 #Load resistance(KOhm)\n",
+ "gm=2000.0*10**-6 #transconductance (S)\n",
+ "\n",
+ "RS=(RS1+Ra)/1000 #total source resistance(KOhm)\n",
+ "rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)\n",
+ "Av=gm*rs/(1+(gm*rs)) #voltage gain\n",
+ "\n",
+ "print 'Ac source resistance rs = ',rs,'Ohm'\n",
+ "print 'voltage gain Av = ',Av"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ac source resistance rs = 750 Ohm\n",
+ "voltage gain Av = 0.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-16, Page 451"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RS=2.2 #source resistance(Ohm)\n",
+ "VDD=30 #Drain supply voltage(V)\n",
+ "RL=3.3 #Load resistance(KOhm)\n",
+ "gm=3500.0*10**-6 #transconductance (S)\n",
+ "R1=2*10**-6 #Base resistor 1(Ohm)\n",
+ "R2=1*10**-6 #Base resistor 2(Ohm) \n",
+ "\n",
+ "VD=VDD*(R2/(R1+R2)) #drain voltage(V)\n",
+ "ID=VD/RS #drain current(mA)\n",
+ "rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)\n",
+ "Av=gm*rs/(1+(gm*rs)) #voltage gain\n",
+ "\n",
+ "print 'Ac source resistance rs = ',rs/1000,'KOhm'\n",
+ "print 'voltage gain Av = ',round(Av,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ac source resistance rs = 1.32 KOhm\n",
+ "voltage gain Av = 0.82\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-17, Page 454"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RD=10.0 #Drain resistance(KOhm)\n",
+ "R1=0.2 #resistance(KOhm)\n",
+ "IDSS=10.0 #IDSS current(mA)\n",
+ "VGS_off=-2 #VGS(off) (V)\n",
+ "gm=3500.0*10**-6 #transconductance (S)\n",
+ "Vin=10.0 #input voltage (mVpp)\n",
+ "\n",
+ "RDS=-VGS_off/IDSS #Ohmic resistance(Ohm)\n",
+ "Vout_on=Vin*RDS/(RD+R1) #Output voltage when JFET is on(V)\n",
+ "Vout_off=Vin #Output voltage when JFET is off(V)\n",
+ "ratio=Vout_off/Vout_on #on-off ratio\n",
+ "\n",
+ "print 'output voltage Vout = ',round(Vout_on,2),'mVpp'\n",
+ "print 'on-off ratio = ',ratio"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout = 0.2 mVpp\n",
+ "on-off ratio = 51.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-18, Page 455"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RD=10.0 #Drain resistance(KOhm)\n",
+ "R1=0.2 #resistance(KOhm)\n",
+ "R2=10*10**6 #resistance(Ohm)\n",
+ "IDSS=10.0 #IDSS current(mA)\n",
+ "VGS_off=-2 #VGS(off) (V)\n",
+ "gm=3500.0*10**-6 #transconductance (S)\n",
+ "Vin=10.0 #input voltage (mVpp)\n",
+ "\n",
+ "Vout_on=Vin*(RD/(RD+R1)) #Output voltage when JFET is on(V)\n",
+ "Vout_off=Vin*(RD/R2) #Output voltage when JFET is off(V)\n",
+ "ratio=Vout_on/Vout_off/1000 #on-off ratio\n",
+ "\n",
+ "print 'output voltage Vout when on = ',round(Vout_on,2),'mVpp'\n",
+ "print 'output voltage Vout when off = ',Vout_off*10**6,'uVpp'\n",
+ "print 'on-off ratio = ',round(ratio,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout when on = 9.8 mVpp\n",
+ "output voltage Vout when off = 10.0 uVpp\n",
+ "on-off ratio = 980.39\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13-19, Page 455"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "fout=20 #frequency(KHz)\n",
+ "RDS=50.0 #Ohmic resistance(Ohm)\n",
+ "RL=10*10**3 #Load resistance(Ohm)\n",
+ "Vin=100 #input voltage (mV)\n",
+ "\n",
+ "Vpeak=Vin*RL/(RL+RDS) #peak voltage(V)\n",
+ "\n",
+ "print 'Outout Vpeak = ',round(Vpeak,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Outout Vpeak = 99.5 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_14_New.ipynb b/Electronic_Principles/Chapter_14_New.ipynb
new file mode 100755
index 00000000..d16f054a
--- /dev/null
+++ b/Electronic_Principles/Chapter_14_New.ipynb
@@ -0,0 +1,648 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 14 MOSFETs"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-1, Page 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VGS_off=-3.0 #Gate-source cutoff voltage(V)\n",
+ "IDSS=6 #IDSS current(mA) \n",
+ "VGS1=-1 #VGS voltage(V)\n",
+ "VGS2=-2\n",
+ "VGS3=0\n",
+ "VGS4=1\n",
+ "VGS5=2\n",
+ "\n",
+ "ID1=IDSS*((1-(VGS1/VGS_off))**2)\n",
+ "ID2=IDSS*((1-(VGS2/VGS_off))**2)\n",
+ "ID3=IDSS*((1-(VGS3/VGS_off))**2)\n",
+ "ID4=IDSS*((1-(VGS4/VGS_off))**2)\n",
+ "ID5=IDSS*((1-(VGS5/VGS_off))**2)\n",
+ "\n",
+ "\n",
+ "print 'Drain current ID1 = ',round(ID1,2),'mA'\n",
+ "print 'Drain current ID2 = ',round(ID2,2),'mA'\n",
+ "print 'Drain current ID3 = ',ID3,'mA'\n",
+ "print 'Drain current ID4 = ',round(ID4,2),'mA'\n",
+ "print 'Drain current ID5 = ',round(ID5,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain current ID1 = 2.67 mA\n",
+ "Drain current ID2 = 0.67 mA\n",
+ "Drain current ID3 = 6.0 mA\n",
+ "Drain current ID4 = 10.67 mA\n",
+ "Drain current ID5 = 16.67 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-2, Page 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VGS_off=-2.0 #Gate-source cutoff voltage(V)\n",
+ "IDSS=4 #IDSS current(mA) \n",
+ "gm0=2000*10**-6 #transconductance(S)\n",
+ "VGS=0 #VGS voltage(V)\n",
+ "VDD=15 #Drain supply voltage(V)\n",
+ "RD=2.0 #Drain resistance(KOhm)\n",
+ "RL=10.0 #Load resistance(KOhm)\n",
+ "Vin=20 #input voltage(mV)\n",
+ "\n",
+ "VDS=VDD-(IDSS*RD) #Drain-source voltage(V)\n",
+ "rd=RD*RL/(RD+RL) #ac drain resistance(KOhm) \n",
+ "Av=gm0*rd*1000 #voltage gain\n",
+ "Vout=Vin*Av #output voltage (mV)\n",
+ "\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 66.67 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-3, Page 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VGS_on=4.5 #Gate-source voltage(V)\n",
+ "ID_on=75 #ID current(mA) \n",
+ "RDS=6 #Ohmic resistance(Ohm)\n",
+ "VDD=20 #Drain supply voltage(V)\n",
+ "RD=1.0 #Drain resistance(KOhm)\n",
+ "RL=10.0 #Load resistance(KOhm)\n",
+ "\n",
+ "ID_sat=VDD/RD #drain saturation current(mA)\n",
+ "Vout1=VDD*(RDS/(RDS+(RD*1000)))#output voltage when VGS is high(V)\n",
+ "Vout2=VDD #output voltage when VGS is low(V) \n",
+ "\n",
+ "print 'output voltage when VGS is high = ',round(Vout1,2),'V'\n",
+ "print 'output voltage when VGS is low = ',Vout2,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage when VGS is high = 0.12 V\n",
+ "output voltage when VGS is low = 20 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-4, Page 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "ID=20 #ID current as per previous example(mA) \n",
+ "Vled=2 #Led drop(V)\n",
+ "RD=1.0 #Drain resistance(KOhm)\n",
+ "\n",
+ "ID=(VDD-Vled)/RD #drain current considering LED drop\n",
+ "\n",
+ "print 'drain current considering LED drop ID = ',ID,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current considering LED drop ID = 18.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-5, Page 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rrc=500.0 #Resistance of relay(V)\n",
+ "VDD=24 #drain supply voltage(V)\n",
+ "\n",
+ "ID_sat=VDD/Rrc #drain saturation current(A)\n",
+ "\n",
+ "print 'Drain saturaion current ID(sat) = ',ID_sat*1000,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain saturaion current ID(sat) = 48.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-6, Page 496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VDD=20.0 #drain supply voltage (V)\n",
+ "RD=10*10**3 #drain resistance(Ohm)\n",
+ "RDS=50.0 #Ohmic resistance(Ohm)\n",
+ "\n",
+ "Vout1=VDD #Output voltage when i/p is low (V)\n",
+ "Vout2=VDD*RDS/(RDS+RD) #Output voltage when i/p is high (V)\n",
+ "\n",
+ "print 'Output voltage when input is low Vout1 = ',Vout1,'V'\n",
+ "print 'Output voltage when input is high Vout2 = ',round((Vout2*1000),2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage when input is low Vout1 = 20.0 V\n",
+ "Output voltage when input is high Vout2 = 99.5 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-7, Page 496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VDD=10.0 #drain supply voltage (V)\n",
+ "RD=2*10**3 #drain resistance(Ohm)\n",
+ "RDS=500.0 #Ohmic resistance(Ohm)\n",
+ "\n",
+ "Vout1=VDD #Output voltage when i/p is low (V)\n",
+ "Vout2=VDD*RDS/(RDS+RD) #Output voltage when i/p is high (V)\n",
+ "\n",
+ "print 'Output voltage when input is low Vout1 = ',Vout1,'V'\n",
+ "print 'Output voltage when input is high Vout2 = ',Vout2,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage when input is low Vout1 = 10.0 V\n",
+ "Output voltage when input is high Vout2 = 2.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-8, Page 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "%pylab inline\n",
+ "\n",
+ "print 'Input signal switches from 0 to 15 V at pt. A & 15 to 0 V at pt. B'\n",
+ "x=[1,2,3,4,5,6,7,8,9,10]\n",
+ "y=[0,0,0,15,15,15,15,0,0,0]\n",
+ "print 'approximate plotting shown in figure'\n",
+ "plt.plot(x,y)\n",
+ "plt.show()\n",
+ "print 'output signal shown on second plot'\n",
+ "z=[15,15,15,0,0,0,0,15,15,15]\n",
+ "plt.plot(x,z,'r')\n",
+ "plt.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "Input signal switches from 0 to 15 V at pt. A & 15 to 0 V at pt. B\n",
+ "approximate plotting shown in figure\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEACAYAAABF+UbAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHUNJREFUeJzt3W1QVOf5BvBrKWgG+YuIsGjAqCjCvgAbNbROma6JmGk6\nZoyaNBhHB5L0g9O0psYxph9CMlPFOJmEvLQfbDVqU20n00ZjlVYlG4kpsQZTUAkYXhQUrWLQwILC\n+vw/nC4RX4A97O5zXq7fDDOWwPGaGK7e3nv2PBYhhAAREelShOwARESkHkuciEjHWOJERDrGEici\n0jGWOBGRjrHEiYh0bMASLywshNVqhdPp7Pf5t99+GxkZGXA4HFizZk1IAxIR0d1FDvQPCwoK8Nxz\nz2HZsmV9n/v444+xe/duVFVVISoqChcvXgx5SCIiurMBJ/Hc3FzExcX1+9zvfvc7rF27FlFRUQCA\nhISE0KUjIqIBBbwTP3XqFA4dOoTvf//7cLvdOHr0aChyERHREAy4TrmT3t5efPPNN6ioqMC///1v\nPPHEE2hoaAhFNiIiGkTAJZ6cnIyFCxcCAGbNmoWIiAi0tbUhPj6+39dNnToV9fX1wUlJRGQSqamp\n+Prrr4f89QGvUxYsWICysjIAQF1dHa5fv35bgQNAfX09hBCa+nj55ZelZ9BLLmZiJjPk0mKmQIff\nASfx/Px8fPLJJ2hra0NKSgpeffVVFBYWorCwEE6nEyNGjMC2bdsC+g2JiCh4BizxHTt23PHz27dv\nD0kYIiIKjKnesel2u2VHuCMt5mKmoWGmodNiLi1mCpRFCBGSQyEsFgtCd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izZg3mzZuH\nH//4x3C5XJobWvwsFsugb67UZvIQ6OnpwaJFi7B06VIsWLBAdpx+YmNj8ZOf/ARHjx6VmuOzzz7D\n7t27MXnyZOTn56OsrAzLli2Tmslv/PjxAICEhAQ89thjOHLkiNQ8ycnJSE5OxqxZswAAixcvRmVl\npdRMfvv27cOMGTOQkJAgOwqOHj2K2bNnIz4+HpGRkVi4cCE+++wz2bFQWFiIo0eP4pNPPsGYMWMw\nffp02ZH6WK1WnP/f6dKtra1IHOS5HKYocSEEnn76adhsNqxcuVJ2HADApUuX+l517urqwv79++Fy\nuaRmWrduHZqbm9HY2IidO3fiwQcfxLZt26RmAgCv14tvv/0WANDZ2Yl//vOf0u9+SkpKQkpKCurq\n6gAoO2i73S41k9+OHTuQn58vOwYAZeqtqKhAV1cXhBA4cOCAJtaG//3vfwEAZ86cwd/+9jdNrJ78\nHn30UWzduhUAsHXr1sGHzmC/2vrkk0+K8ePHixEjRojk5GSxefPmYP8WASsvLxcWi0VkZWWJ7Oxs\nkZ2dLfbt2yc1U1VVlXC5XCIrK0s4nU7x2muvSc1zK4/Ho5m7UxoaGkRWVpbIysoSdrtdrFu3TnYk\nIYQQX375pZg5c6bIzMwUjz32mCbuTuno6BDx8fHi6tWrsqP02bBhg7DZbMLhcIhly5aJ69evy44k\ncnNzhc1mE1lZWaKsrExaDn9fRkVF9fVlW1ubeOihh8S0adNEXl6e+Oabbwa8Bt/sQ0SkY6ZYpxAR\nGRVLnIhIx1jiREQ6xhInItIxljgRkY6xxImIdIwlTkSkYyxxIiId+3/lcweL2bKEEwAAAABJRU5E\nrkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x60fcb70>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output signal shown on second plot\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEACAYAAABF+UbAAAAABHNCSVQICAgIfAhk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kpOTkZqairq6OgDKDtrh\ncEjN5FdWVoaCggLZMQAoU29FRQUuXLgAIQR2796tibXh//73PwBAc3Mz/vnPf2pi9eT3wAMPYOPG\njQCAjRs3Dj10hvrV1ocffljccccdYuTIkSIlJUVs2LAh1N8iYPv37xcWi0VkZ2eLnJwckZOTI3bu\n3Ck1U1VVlXC73SI7O1u4XC7x4osvSs1zPa/Xq5mzUxoaGkR2drbIzs4WDodDrFmzRnYkIYQQX375\npZgxY4bIysoSDz74oCbOTunu7hYJCQni3LlzsqMMWLdunbDb7cLpdIrly5eLS5cuyY4k8vLyhN1u\nF9nZ2WLPnj3Scvj7MiYmZqAvOzo6xH333ScyMjJEfn6++Pbbbwc9Bi/2ISLSMVOsU4iIjIolTkSk\nYyxxIiIdY4kTEekYS5yISMdY4kREOsYSJyLSMZY4EZGO/T9PCTKfk/NlxwAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x9285470>"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-9, Page 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VDD=30.0 #drain supply voltage (V)\n",
+ "RD=30 #drain resistance(Ohm)\n",
+ "RDS=1.95 #Ohmic resistance(Ohm)\n",
+ "ID_on=2 #ID for MOSFET on (A)\n",
+ "\n",
+ "ID_sat=VDD/RD #drain saturation current(A)\n",
+ "ID=VDD/(RDS+RD) #drain current(A)\n",
+ "\n",
+ "print 'current through motor winding is ID = ',round(ID,2),'A'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current through motor winding is ID = 0.94 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-10, Page 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VDD=30.0 #drain supply voltage (V)\n",
+ "RD=10 #drain resistance(Ohm)\n",
+ "RDS=1.07 #Ohmic resistance(Ohm)\n",
+ "ID_on=5 #ID for MOSFET on (A)\n",
+ "\n",
+ "ID_sat=VDD/RD #drain saturation current(A)\n",
+ "ID=VDD/(RDS+RD) #drain current(A)\n",
+ "\n",
+ "print 'current through lamp is ID = ',round(ID,2),'A'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current through lamp is ID = 2.71 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-11, Page 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VDD=10.0 #drain supply voltage (V)\n",
+ "RD=10 #drain resistance(Ohm)\n",
+ "RDS=0.5 #Ohmic resistance(Ohm)\n",
+ "ID_on=5 #ID for MOSFET on (A)\n",
+ "\n",
+ "ID=VDD/(RDS+RD) #drain current(A)\n",
+ "\n",
+ "print 'current through water valve is ID = ',round(ID,2),'A'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current through water valve is ID = 0.95 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-12, Page 504"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VDD=30.0 #drain supply voltage (V)\n",
+ "RD=10 #drain resistance(Ohm)\n",
+ "RDS=1.07 #Ohmic resistance(Ohm)\n",
+ "R1=2*10**6 #Resistance1 at gate (Ohm)\n",
+ "R2=1*10**6 #Resistance2 at gate (Ohm)\n",
+ "C=10*10**-6 #Capacitance at gate(F)\n",
+ "\n",
+ "RTH=R1*R2/(R1+R2) #Thevenin resistance(Ohm)\n",
+ "RC=RTH*C #RC Time constant(s)\n",
+ "ID=VDD/(RDS+RD) #drain current through lamp(A)\n",
+ "P=(ID**2)*RD #Lamp Power(W)\n",
+ "\n",
+ "print 'RC Time constant = ',round(RC,2),'s'\n",
+ "print 'current through lamp is ID = ',round(ID,2),'A'\n",
+ "print 'Lamp power P = ',round(P,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RC Time constant = 6.67 s\n",
+ "current through lamp is ID = 2.71 A\n",
+ "Lamp power P = 73.44 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-13, Page 506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "ID_on=0.6 #ID for MOSFET on (A)\n",
+ "VGS_on=4.5 #VGS for MOSFET on(V)\n",
+ "VGS_th=2.1 #VGS threshold(V)\n",
+ "VGS1=3 #Gate-source voltage1(V)\n",
+ "VGS2=4.5 #Gate-source voltage2(V)\n",
+ "\n",
+ "k=ID_on/(VGS_on-VGS_th)**2 #constant(A/V2)\n",
+ "ID1=1000*k*(VGS1-VGS_th)**2 #ID for VGS=3 (mA)\n",
+ "ID2=1000*k*(VGS2-VGS_th)**2 #ID for VGS=4.5 (mA)\n",
+ "\n",
+ "print 'ID1 (for VGS = 3V) = ',round(ID1,2),'mA'\n",
+ "print 'ID2 (for VGS = 4.5V) = ',ID2,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ID1 (for VGS = 3V) = 84.37 mA\n",
+ "ID2 (for VGS = 4.5V) = 600.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14-14, Page 507"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "ID_on=3 #ID (On) (mA)\n",
+ "VDS_on=10 #VDS(On) (V) \n",
+ "VDD=25 #Drain supply voltage (V)\n",
+ "\n",
+ "RD=(VDD-VDS_on)/ID_on #Drain resistance(KOhm)\n",
+ "\n",
+ "print 'Drain resistance RD = ',RD,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain resistance RD = 5 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ " Example 14-15, Page 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "ID_on=600 #ID (On) (mA)\n",
+ "VGS_th=2.1 #VGS(threshold) (V) \n",
+ "VDD=12 #Drain supply voltage (V)\n",
+ "k=104*10**-3 #constant(A/V2)\n",
+ "R1=1.0*10**6 #Resistance1 at gate (Ohm)\n",
+ "R2=350.0*10**3 #Resistance2 at gate (Ohm)\n",
+ "Vin=100.0*10**-3 #input voltage (V)\n",
+ "RD=68.0 #Drain resistance(Ohm)\n",
+ "RL=1.0*10**3 #Load resistance(Ohm)\n",
+ "\n",
+ "VGS=VDD*R2/(R1+R2) #Gate-source voltage(V)\n",
+ "ID=1000*k*(VGS1-VGS_th)**2 #Drain current (mA)\n",
+ "gm=2*k*(VGS-VGS_th) #transconductance (S)\n",
+ "rd=RD*RL/(RD+RL) #ac drain resistance(Ohm) \n",
+ "Av=gm*rd #voltage gain\n",
+ "Vout=Vin*Av #Output voltage (V)\n",
+ "\n",
+ "print 'Gate-source voltage VGS = ',round(VGS,2),'V'\n",
+ "print 'transconductance gm = ',round((gm*1000),2),'mS'\n",
+ "print 'Ac drain resistance rd = ',round(rd,2),'Ohm'\n",
+ "print 'voltage gain Av = ',round(Av,2)\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gate-source voltage VGS = 3.11 V\n",
+ "transconductance gm = 210.31 mS\n",
+ "Ac drain resistance rd = 63.67 Ohm\n",
+ "voltage gain Av = 13.39\n",
+ "Output voltage Vout = 1.34 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_15_New.ipynb b/Electronic_Principles/Chapter_15_New.ipynb
new file mode 100755
index 00000000..b47db517
--- /dev/null
+++ b/Electronic_Principles/Chapter_15_New.ipynb
@@ -0,0 +1,383 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 15 Thyristors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-1, Page 521"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VB=10 #breakover voltage(V)\n",
+ "Vin=15 #input voltage(V)\n",
+ "R=100.0 #resistance (Ohm)\n",
+ "\n",
+ "I1=1000*Vin/R #diode current ideally(mA)\n",
+ "I2=1000*(Vin-0.7)/R #diode current with second approx.(mA)\n",
+ "I3=1000*(Vin-0.9)/R #diode current more accurately(mA)\n",
+ "\n",
+ "print 'Diode current ideally ID1 = ',I1,'mA'\n",
+ "print 'Diode current with second approx. ID2 = ',I2,'mA'\n",
+ "print 'Diode current more accurately ID3 = ',I3,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diode current ideally ID1 = 150.0 mA\n",
+ "Diode current with second approx. ID2 = 143.0 mA\n",
+ "Diode current more accurately ID3 = 141.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-2, Page 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Ih=4*10**-3 #holding current(mA)\n",
+ "R=100.0 #resistance (Ohm)\n",
+ "Vs=15 #input voltage (V)\n",
+ "\n",
+ "Vin=0.7+(Ih*R) #new input voltage(V)\n",
+ "\n",
+ "print 'New input voltage Vin = ',Vin,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "New input voltage Vin = 1.1 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-3, Page 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R=2.0*10**3 #resistance (Ohm)\n",
+ "C=0.02*10**-6 #capacitance (F)\n",
+ "VB=10 #breakdown voltage(V)\n",
+ "\n",
+ "RC=R*C #Time constant(s)\n",
+ "T=0.2*RC #period (s)\n",
+ "f=T**-1 #frequency(Hz) \n",
+ "\n",
+ "print 'time constant RC = ',RC*10**6,'us'\n",
+ "print 'Period T = ',T*10**6,'us'\n",
+ "print 'Frequency = ',f/1000,'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time constant RC = 40.0 us\n",
+ "Period T = 8.0 us\n",
+ "Frequency = 125.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-4, Page 531"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "It=7*10**-3 #trigger current(mA)\n",
+ "R1=100.0 #resistance (Ohm)\n",
+ "R2=1*10**3 #resistance (Ohm)\n",
+ "Vt=0.75 #trigger voltage (V)\n",
+ "Ih=6*10**-3 #holding current(mA)\n",
+ "\n",
+ "Vin=Vt+(It*R2) #minimum input voltage(V)\n",
+ "VCC=0.7+(Ih*R1) #supply voltage for turning of SCR(V)\n",
+ "\n",
+ "print 'Minimum input voltage Vin = ',Vin,'V'\n",
+ "print 'supply voltage for turning of SCR VCC = ',VCC,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum input voltage Vin = 7.75 V\n",
+ "supply voltage for turning of SCR VCC = 1.3 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-5, Page 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "IGT=200*10**-6 #trigger current(mA)\n",
+ "VGT=1 #trigger voltage(V) \n",
+ "R1=900.0 #resistance (Ohm)\n",
+ "R2=100.0 #resistance (Ohm)\n",
+ "C=0.2*10**-6 #capacitance (F)\n",
+ "Vt=0.75 #trigger voltage (V)\n",
+ "Ih=6*10**-3 #holding current(mA)\n",
+ "R=1*10**3 #Resistance (Ohm) \n",
+ "\n",
+ "RTH=R1*R2/(R1+R2) #Thevenin resistance (Ohm)\n",
+ "Vin=VGT+(IGT*RTH) #input voltage needed to trigger(V)\n",
+ "Vp=10*Vin #Output voltage at SCR firing point(V)\n",
+ "RC=C*(R/2) #time constant (s)\n",
+ "T=RC*0.2 #period (s)\n",
+ "f=1/T #frequency (Hz)\n",
+ "\n",
+ "print 'peak output voltage Vpeak = ',Vp,'V'\n",
+ "print 'time constant RC = ',RC*10**6,'us'\n",
+ "print 'Period T = ',T*10**6,'us'\n",
+ "print 'Frequency = ',f/1000,'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak output voltage Vpeak = 10.18 V\n",
+ "time constant RC = 100.0 us\n",
+ "Period T = 20.0 us\n",
+ "Frequency = 50.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-6, Page 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vz=5.6 #breakdown voltage(V)\n",
+ "VGT1=0.75 #trigger voltage (V) \n",
+ "VGT2=1.5 #worst case maximum trigger voltage(V) \n",
+ "Vz2=6.16 #break down voltage with 10% tolerance (V)\n",
+ "\n",
+ "VCC1=Vz+VGT1 #supply voltage(V) \n",
+ "VCC2=VGT2+Vz2 #Over voltage (V)\n",
+ "\n",
+ "print 'supply voltage VCC1 = ',VCC1,'V'\n",
+ "print 'supply over voltage VCC2 = ',VCC2,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "supply voltage VCC1 = 6.35 V\n",
+ "supply over voltage VCC2 = 7.66 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-7, Page 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "C=0.1*10**-6 #capacitance (F)\n",
+ "f=60 #frequency (Hz)\n",
+ "R=26*10**3 #resistance(KOhm)\n",
+ "Vm=120 #input ac voltage(V)\n",
+ "\n",
+ "XC=(2*math.pi*f*C)**-1 #capacitive reactance(Ohm)\n",
+ "ZT=((R**2)+(XC**2))**0.5 #impedance (Ohm)\n",
+ "thetaz=math.atan2(-XC,R)*180/math.pi #angle (deg)\n",
+ "IC=Vm/ZT #Current through C(A)\n",
+ "VC=IC*XC #voltage across C(V)\n",
+ "thetac=180+thetaz #conduction angle(deg)\n",
+ "\n",
+ "print 'Capacitor reactance XC = ',round((XC/1000),2),'KOhm'\n",
+ "print 'impedance ZT = ',round((ZT/1000),2),'KOhm'\n",
+ "print 'firing angle = ',round(thetaz,2),'deg'\n",
+ "print 'Current through C, IC = ',round((IC*1000),2),'mA'\n",
+ "print 'voltage across C, VC = ',round(VC,2),'V'\n",
+ "print 'conduction angle = ',round(thetac,2),'deg'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitor reactance XC = 26.53 KOhm\n",
+ "impedance ZT = 37.14 KOhm\n",
+ "firing angle = -45.57 deg\n",
+ "Current through C, IC = 3.23 mA\n",
+ "voltage across C, VC = 85.7 V\n",
+ "conduction angle = 134.43 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-8, Page 546"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "C=1*10**-6 #capacitance (F)\n",
+ "R1=22.0 #resistance (Ohm)\n",
+ "R2=82*10**3 #resistance(KOhm)\n",
+ "Vs=75 #input voltage(V)\n",
+ "\n",
+ "I=Vs/R1 #current through 22Ohm resistor (A)\n",
+ "\n",
+ "print 'current through 22Ohm resistor I = ',round(I,2),'A'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current through 22Ohm resistor I = 3.41 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15-9, Page 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vdb=32.0 #diac break down voltage (V)\n",
+ "VTT=1 #triac trigger voltage(V)\n",
+ "\n",
+ "Vin=VTT+Vdb #input voltage for triggering triac\n",
+ "\n",
+ "print 'input voltage for triggering triac vin = ',Vin,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input voltage for triggering triac vin = 33.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_16_New.ipynb b/Electronic_Principles/Chapter_16_New.ipynb
new file mode 100755
index 00000000..847a3379
--- /dev/null
+++ b/Electronic_Principles/Chapter_16_New.ipynb
@@ -0,0 +1,933 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 16 Frequency Effets"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-1, Page 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Avm=200 #mid band voltage gain\n",
+ "f1=20 #cutoff frequency1 (Hz)\n",
+ "f2=20*10**3 #cutoff frequency2 (Hz)\n",
+ "fi1=5 #input frequency1(Hz)\n",
+ "fi2=200*10**3 #input frequency2(Hz)\n",
+ "\n",
+ "Av=0.707*Avm #voltage gain at either frequency\n",
+ "Av1=Avm/(1+(f1/fi1)**2)**0.5 #voltage gain for 5Hz\n",
+ "Av2=Avm/(1+(fi2/f2)**2)**0.5 #voltage gain for 200KHz\n",
+ "\n",
+ "print 'voltage gain for 200KHz = ',round(Av1,2)\n",
+ "print 'voltage gain for 5Hz = ',round(Av2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain for 200KHz = 48.51\n",
+ "voltage gain for 5Hz = 19.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-2, Page 568"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Avm=100000 #mid band voltage gain\n",
+ "f2=10 #cutoff frequency (Hz)\n",
+ "\n",
+ "Av=0.707*Avm #voltage gain at cutoff frequency\n",
+ "\n",
+ "print 'voltage gain for 10Hz = ',Av"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain for 10Hz = 70700.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-3, Page 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Avm=100000 #mid band voltage gain\n",
+ "fc=10.0 #cutoff frequency (Hz)\n",
+ "fi1=100.0 #input frequency1(Hz)\n",
+ "fi2=1*10**3 #input frequency2(Hz)\n",
+ "fi3=10*10**3 #input frequency3(Hz)\n",
+ "fi4=100*10**3 #input frequency4(Hz)\n",
+ "fi5=1*10**6 #input frequency5(Hz)\n",
+ "\n",
+ "Av1=Avm/(1+(fi1/fc)**2)**0.5 #voltage gain for 100Hz\n",
+ "Av2=Avm/(1+(fi2/fc)**2)**0.5 #voltage gain for 1KHz\n",
+ "Av3=Avm/(1+(fi3/fc)**2)**0.5 #voltage gain for 10KHz\n",
+ "Av4=Avm/(1+(fi4/fc)**2)**0.5 #voltage gain for 100KHz\n",
+ "Av5=Avm/(1+(fi5/fc)**2)**0.5 #voltage gain for 1MHz\n",
+ "\n",
+ "print 'voltage gain for 100Hz = ',math.ceil(Av1)\n",
+ "print 'voltage gain for 1KHz = ',math.ceil(Av2)\n",
+ "print 'voltage gain for 10KHz = ',math.ceil(Av3)\n",
+ "print 'voltage gain for 100KHz = ',math.ceil(Av4)\n",
+ "print 'voltage gain for 1MHz = ',math.ceil(Av5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain for 100Hz = 9951.0\n",
+ "voltage gain for 1KHz = 1000.0\n",
+ "voltage gain for 10KHz = 100.0\n",
+ "voltage gain for 100KHz = 10.0\n",
+ "voltage gain for 1MHz = 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-4, Page 571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Ap1=1 #power gain1\n",
+ "Ap2=2 #power gain2\n",
+ "Ap3=4 #power gain3\n",
+ "Ap4=8 #power gain4\n",
+ "\n",
+ "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
+ "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
+ "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
+ "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
+ "\n",
+ "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
+ "print 'decibel power gain Ap2(dB) = ',round(Ap_db2,2),'dB'\n",
+ "print 'decibel power gain Ap3(dB) = ',round(Ap_db3,2),'dB'\n",
+ "print 'decibel power gain Ap4(dB) = ',round(Ap_db4,2),'dB'\n",
+ "print 'Each time Ap increase by factor 2, decibel power gain increases by 3 dB'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decibel power gain Ap1(dB) = 0.0 dB\n",
+ "decibel power gain Ap2(dB) = 3.01 dB\n",
+ "decibel power gain Ap3(dB) = 6.02 dB\n",
+ "decibel power gain Ap4(dB) = 9.03 dB\n",
+ "Each time Ap increase by factor 2, decibel power gain increases by 3 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-5, Page 571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Ap1=1 #power gain1\n",
+ "Ap2=0.5 #power gain2\n",
+ "Ap3=0.25 #power gain3\n",
+ "Ap4=0.125 #power gain4\n",
+ "\n",
+ "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
+ "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
+ "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
+ "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
+ "\n",
+ "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
+ "print 'decibel power gain Ap2(dB) = ',round(Ap_db2,2),'dB'\n",
+ "print 'decibel power gain Ap3(dB) = ',round(Ap_db3,2),'dB'\n",
+ "print 'decibel power gain Ap4(dB) = ',round(Ap_db4,2),'dB'\n",
+ "print 'Each time Ap decreases by factor 2, decibel power gain decreases by 3 dB'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decibel power gain Ap1(dB) = 0.0 dB\n",
+ "decibel power gain Ap2(dB) = -3.01 dB\n",
+ "decibel power gain Ap3(dB) = -6.02 dB\n",
+ "decibel power gain Ap4(dB) = -9.03 dB\n",
+ "Each time Ap decreases by factor 2, decibel power gain decreases by 3 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-6, Page 572"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Ap1=1 #power gain1\n",
+ "Ap2=10 #power gain2\n",
+ "Ap3=100 #power gain3\n",
+ "Ap4=1000 #power gain4\n",
+ "\n",
+ "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
+ "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
+ "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
+ "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
+ "\n",
+ "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
+ "print 'decibel power gain Ap2(dB) = ',Ap_db2,'dB'\n",
+ "print 'decibel power gain Ap3(dB) = ',Ap_db3,'dB'\n",
+ "print 'decibel power gain Ap4(dB) = ',Ap_db4,'dB'\n",
+ "print 'Each time Ap increases by factor 10, decibel power gain increases by 10 dB'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decibel power gain Ap1(dB) = 0.0 dB\n",
+ "decibel power gain Ap2(dB) = 10.0 dB\n",
+ "decibel power gain Ap3(dB) = 20.0 dB\n",
+ "decibel power gain Ap4(dB) = 30.0 dB\n",
+ "Each time Ap increases by factor 10, decibel power gain increases by 10 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-7, Page 572"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Ap1=1 #power gain1\n",
+ "Ap2=0.1 #power gain2\n",
+ "Ap3=0.01 #power gain3\n",
+ "Ap4=0.001 #power gain4\n",
+ "\n",
+ "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
+ "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
+ "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
+ "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
+ "\n",
+ "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
+ "print 'decibel power gain Ap2(dB) = ',Ap_db2,'dB'\n",
+ "print 'decibel power gain Ap3(dB) = ',Ap_db3,'dB'\n",
+ "print 'decibel power gain Ap4(dB) = ',Ap_db4,'dB'\n",
+ "print 'Each time Ap decreases by factor 10, decibel power gain decreases by 10 dB'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decibel power gain Ap1(dB) = 0.0 dB\n",
+ "decibel power gain Ap2(dB) = -10.0 dB\n",
+ "decibel power gain Ap3(dB) = -20.0 dB\n",
+ "decibel power gain Ap4(dB) = -30.0 dB\n",
+ "Each time Ap decreases by factor 10, decibel power gain decreases by 10 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-8, Page 575"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Av1=100 #voltage gain1\n",
+ "Av2=200 #voltage gain2\n",
+ "\n",
+ "Av=Av1*Av2 #total voltage gain\n",
+ "Av_db=20*math.log10(Av) #decibel total voltage gain(dB)\n",
+ "Av_db1=20*math.log10(Av1) #decibel voltage gain(dB)\n",
+ "Av_db2=20*math.log10(Av2) #decibel voltage gain(dB)\n",
+ "Avt_db=Av_db1+Av_db2 #decibel total voltage gain(dB)\n",
+ "\n",
+ "print 'decibel total voltage gain Av(dB) = ',round(Av_db,2),'dB'\n",
+ "print 'decibel voltage gain Av1(dB) = ',Av_db1,'dB'\n",
+ "print 'decibel voltage gain Av2(dB) = ',round(Av_db2,2),'dB'\n",
+ "print 'so, again, decibel total voltage gain by addition of both: Avt(dB) = ',round(Avt_db,2),'dB'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decibel total voltage gain Av(dB) = 86.02 dB\n",
+ "decibel voltage gain Av1(dB) = 40.0 dB\n",
+ "decibel voltage gain Av2(dB) = 46.02 dB\n",
+ "so, again, decibel total voltage gain by addition of both: Avt(dB) = 86.02 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-9, Page 577"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Av_db1=23 #voltage gain1(dB)\n",
+ "Av_db2=36 #voltage gain2(dB)\n",
+ "Av_db3=31 #voltage gain3(dB)\n",
+ "\n",
+ "Avt_db=Av_db1+Av_db2+Av_db3 #decibel total voltage gain(dB)\n",
+ "Ap=10**(Avt_db/10) #power gain by taking antilog\n",
+ "Avt=10**(Avt_db/20.0) #total voltage gain by taking antilog\n",
+ "\n",
+ "print 'decibel total voltage gain Avt(dB) = ',Avt_db,'dB'\n",
+ "print 'power gain Ap = ',Ap\n",
+ "print 'total voltage gain Avt = ',math.ceil(Avt)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decibel total voltage gain Avt(dB) = 90 dB\n",
+ "power gain Ap = 1000000000\n",
+ "total voltage gain Avt = 31623.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-10, Page 577"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Av_db1=23 #voltage gain1(dB)\n",
+ "Av_db2=36 #voltage gain2(dB)\n",
+ "Av_db3=31 #voltage gain3(dB)\n",
+ "\n",
+ "Av1=10**(Av_db1/20.0) #voltage gain of stage 1 by taking antilog\n",
+ "Av2=10**(Av_db2/20.0) #voltage gain of stage 2 by taking antilog\n",
+ "Av3=10**(Av_db3/20.0) #voltage gain of stage 3 by taking antilog\n",
+ "\n",
+ "print 'voltage gain of stage 1 : Av1 = ',round(Av1,2)\n",
+ "print 'voltage gain of stage 1 : Av2 = ',round(Av2,2)\n",
+ "print 'voltage gain of stage 1 : Av3 = ',round(Av3,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain of stage 1 : Av1 = 14.13\n",
+ "voltage gain of stage 1 : Av2 = 63.1\n",
+ "voltage gain of stage 1 : Av3 = 35.48\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-11, Page 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Ap_dbm=24 #power gain(dBm)\n",
+ "\n",
+ "P=10**(Ap_dbm/10.0) #Output power(mW)\n",
+ "\n",
+ "print 'Output power P = ',round(P,2),'mW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output power P = 251.19 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-12, Page 580"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "Av_dbV=-34 #voltage gain(dBV)\n",
+ "\n",
+ "V=10**(Av_dbV/20.0) #Output voltage(V)\n",
+ "\n",
+ "print 'Output voltage V = ',math.ceil(V*1000),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage V = 20.0 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-13, Page 583"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Avm=100000 #mid band voltage gain\n",
+ "f2=10 #cutoff frequency (Hz)\n",
+ "\n",
+ "Av_db=20*math.log10(Avm) #decibel total voltage gain(dB)\n",
+ "\n",
+ "print 'voltage gain for 10Hz = ',Av_db1,'dB'\n",
+ "print 'At 1MHz, due to roll off factor of 20 dB, voltage gain reduce to 0 dB'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain for 10Hz = 20.0 dB\n",
+ "At 1MHz, due to roll off factor of 20 dB, voltage gain reduce to 0 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-14, Page 588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R=5*10**3 #resistance(Ohm)\n",
+ "C=100*10**-12 #Capacitance (F)\n",
+ "\n",
+ "f2=(2*math.pi*R*C)**-1 #cutoff frequency (Hz)\n",
+ "\n",
+ "print 'cutoff frequency f2 = ',round((f2/1000),2),'KHz'\n",
+ "print 'After f2, response rolls off at rate of 20 dB/decade'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cutoff frequency f2 = 318.31 KHz\n",
+ "After f2, response rolls off at rate of 20 dB/decade\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-15, Page 589"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R=2*10**3 #resistance(Ohm)\n",
+ "C=500*10**-12 #Capacitance (F)\n",
+ "\n",
+ "f2=(2*math.pi*R*C)**-1 #cutoff frequency (Hz)\n",
+ "\n",
+ "print 'cutoff frequency f2 = ',round((f2/1000),2),'KHz'\n",
+ "print 'After f2, response rolls off at rate of 20 dB/decade up to funity of 15.9 MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cutoff frequency f2 = 159.15 KHz\n",
+ "After f2, response rolls off at rate of 20 dB/decade up to funity of 15.9 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-17, Page 592"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R=5.3*10**3 #resistance(Ohm)\n",
+ "C=30*10**-12 #Capacitance (F)\n",
+ "Av=100000 #voltage gain\n",
+ "\n",
+ "Cout_M=C #input Miller Capacitance (F)\n",
+ "Cin_M=Av*C #input Miller Capacitance (F)\n",
+ "f2=(2*math.pi*R*Cin_M)**-1 #cutoff frequency (Hz)\n",
+ "\n",
+ "print 'cutoff frequency f2 = ',round(f2,3),'Hz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cutoff frequency f2 = 10.01 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-18, Page 595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "TR=1*10**-6 #rise time(s)\n",
+ "\n",
+ "f2=0.35/TR #cutoff frequency (Hz)\n",
+ "\n",
+ "print 'cutoff frequency f2 = ',f2/1000,'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cutoff frequency f2 = 350.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-19, Page 597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "re=22.7 #from past dc calculation (example:9-5)(Ohm)\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "RL=10 #Load resistance2 (KOhm)\n",
+ "B=150 #current gain\n",
+ "RG=0.6 #source resistance(KOhm)\n",
+ "C1=0.47*10**-6 #input capacitance(F)\n",
+ "C3=2.2*10**-6 #output capacitance(F)\n",
+ "C2=10*10**-6 #emitter capacitance(F)\n",
+ "\n",
+ "Rinb=B*re/1000 #Rin(base) (KOhm)\n",
+ "Ri=RG+((R1**-1)+(Rinb**-1)+(R2**-1))**-1 #thevenin resistance facing i/p capacitor\n",
+ "f1i=((2*math.pi*Ri*C1)**-1)/1000 #input cutoff frequency (Hz)\n",
+ "Ro=RC+RL #thevenin resistance facing o/p capacitor\n",
+ "f1o=((2*math.pi*Ro*C3)**-1)/1000 #output cutoff frequency (Hz)\n",
+ "Zout=(((RE**-1)+((re/1000)**-1))**-1)+((((R1**-1)+(R2**-1)+(RG**-1))**-1)/B) #thevenin resistance facing emitter-bypass capacitor\n",
+ "f1z=((2*math.pi*Zout*C2)**-1)/1000 #cutoff frequency for bypass circuit (Hz)\n",
+ "\n",
+ "\n",
+ "print 'input cutoff frequency f1 = ',round(f1i,2),'Hz'\n",
+ "print 'output cutoff frequency f1 = ',round(f1o,2),'Hz'\n",
+ "print 'cutoff frequency for bypass circuit f1 = ',round(f1z,2),'Hz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input cutoff frequency f1 = 190.36 Hz\n",
+ "output cutoff frequency f1 = 5.32 Hz\n",
+ "cutoff frequency for bypass circuit f1 = 631.63 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-20, Page 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math # This will import math module\n",
+ "\n",
+ "re=22.7 #from past dc calculation (example:9-5)(Ohm)\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "R11=10 #Base resistance1 (KOhm)\n",
+ "R12=2.2 #Base resistance2 (KOhm)\n",
+ "RL=10 #Load resistance2 (KOhm)\n",
+ "B=150 #current gain\n",
+ "RG=0.6 #source resistance(KOhm)\n",
+ "fT=300*10**6 #current gain bandwidth product(Hz)\n",
+ "CC1=2.1*10**-12 #Cc' capacitance(F)\n",
+ "Cs=10*10**-12 #stray capacitance(F)\n",
+ "\n",
+ "\n",
+ "Rinb=B*re/1000 #Rin(base) (KOhm)\n",
+ "Ce1=((2*math.pi*re*fT)**-1) #capacitance Ce'(F)\n",
+ "rc=RC*RL/(RC+RL) #collector resistance(KOhm) \n",
+ "rg=((R11**-1)+(RG**-1)+(R12**-1))**-1 #source resistance (Ohm)\n",
+ "Av=math.ceil(1000*rc/re) #voltage gain\n",
+ "Cin_M=CC1*(Av+1) #input Miller capacitance(F)\n",
+ "C1=Ce1+Cin_M #base bypass capacitance(F)\n",
+ "R1=int(1000*rg*Rinb/(rg+Rinb)) #resistance facing this capacitance(Ohm) \n",
+ "f2=((2*math.pi*R1*C1)**-1) #base bypass circuit cutoff frequency (Hz)\n",
+ "Cout_M=CC1*((Av+1)/Av) #output Miller capacitance(F)\n",
+ "C2=Cout_M+Cs #output bypass capacitance(F)\n",
+ "R2=1000*RC*RL/(RC+RL) #resistance facing this capacitance(Ohm)\n",
+ "f21=((2*math.pi*R2*C2)**-1) #collector bypass circuit cutoff frequency (Hz)\n",
+ "\n",
+ "print 'base bypass circuit cutoff frequency f2 = ',round((f2/10**6),2),'MHz'\n",
+ "print 'collector bypass circuit cutoff frequency f21 = ',round((f21/10**6),2),'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base bypass circuit cutoff frequency f2 = 1.48 MHz\n",
+ "collector bypass circuit cutoff frequency f21 = 4.96 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-21, Page 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "re=22.7 #from past dc calculation (example:9-5)(Ohm)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "R1=2*10**6 #Base resistance1 (Ohm)\n",
+ "R2=1*10**6 #Base resistance2 (Ohm)\n",
+ "RD=150 #drain resistance(Ohm) \n",
+ "RL=1*10**3 #Load resistance2 (Ohm)\n",
+ "RG=0.6*10**3 #source resistance(Ohm)\n",
+ "Cin=0.1*10**-6 #Cin capacitance(F)\n",
+ "Cout=10*10**-6 #Cout capacitance(F)\n",
+ "\n",
+ "\n",
+ "Rthi=RG+((R1**-1)+(R2**-1))**-1 #Thevenin resistance facing input coupling capacitor resistance (Ohm)\n",
+ "f1=((2*math.pi*Rthi*Cin)**-1) #base bypass circuit cutoff frequency (Hz)\n",
+ "Rtho=RD+RL #Thevenin resistance facing output coupling capacitor resistance (Ohm)\n",
+ "f2=((2*math.pi*Rtho*Cout)**-1) #base bypass circuit cutoff frequency (Hz)\n",
+ "\n",
+ "print 'base bypass circuit cutoff frequency f1 = ',round(f1,2),'Hz'\n",
+ "print 'collector bypass circuit cutoff frequency f2 = ',round(f2,2),'Hz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base bypass circuit cutoff frequency f1 = 2.39 Hz\n",
+ "collector bypass circuit cutoff frequency f2 = 13.84 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16-22, Page 606"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "Ciss=60 #Capacitance Ciss (pF)\n",
+ "Coss=25 #Capacitance Coss (pF)\n",
+ "Crss=5 #Capacitance Crss (pF)\n",
+ "gm=93*10**-3 #gm (S)\n",
+ "R1=2*10**6 #resiatance 1(Ohm)\n",
+ "R2=1*10**6 #resiatance 2(Ohm)\n",
+ "RG=600 #resiatance(Ohm)\n",
+ "RD=150 #resiatance(Ohm)\n",
+ "RL=1*10**3 #load resiatance(Ohm)\n",
+ "\n",
+ "Cgd=Crss #Internal Capacitance Cgd (pF)\n",
+ "Cgs=Ciss-Crss #Internal Capacitance Cgs (pF)\n",
+ "Cds=Coss-Crss #Internal Capacitance Cds (pF)\n",
+ "rd=((RD**-1)+(RL**-1))**-1 #rd (Ohm)\n",
+ "Av=gm*rd #voltage gain\n",
+ "Cin_M=Cgd*(Av+1) #Cin(M) (pF)\n",
+ "C=Cgs+Cin_M #gate bypass capacitance (pF)\n",
+ "R=((R1**-1)+(R2**-1)+(RG**-1))**-1 #resistance (Ohm)\n",
+ "f2=((2*math.pi*R*C*10**-12)**-1) #gate bypass cutoff frequency (Hz)\n",
+ "Cout_M=Cgd*((Av+1)/Av) #Cout(M) (pF)\n",
+ "C1=Cds+Cout_M #drain bypass capacitance(pF)\n",
+ "f21=((2*math.pi*rd*C1*10**-12)**-1) #drain bypass cutoff frequency (Hz)\n",
+ "\n",
+ "print 'Gate bypass cutoff frequency = ',round(f2*10**-6,2),'MHz'\n",
+ "print 'Drain bypass cutoff frequency = ',round(f21*10**-6,2),'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gate bypass cutoff frequency = 2.2 MHz\n",
+ "Drain bypass cutoff frequency = 48.02 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_17_New.ipynb b/Electronic_Principles/Chapter_17_New.ipynb
new file mode 100755
index 00000000..a6647813
--- /dev/null
+++ b/Electronic_Principles/Chapter_17_New.ipynb
@@ -0,0 +1,614 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 17 DIFFERENTIAL AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-1, Page 625"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #supply voltage(V)\n",
+ "RE=7.5 #Emitter resistance(KOhm)\n",
+ "\n",
+ "IT=VCC/RE #tail current (mA)\n",
+ "IE=IT/2 #emitter current (mA)\n",
+ "\n",
+ "print 'tail current = ',IT,'mA'\n",
+ "print 'emitter current = ',IE,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tail current = 2.0 mA\n",
+ "emitter current = 1.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 94
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-2, Page 626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #supply voltage(V)\n",
+ "RE=7.5 #Emitter resistance(KOhm)\n",
+ "VBE=0.7 #base-emitter voltage(V)\n",
+ "RC=5 #collector resistance(KOhm)\n",
+ "\n",
+ "IT=(VCC-VBE)/RE #tail current (mA)\n",
+ "IE=IT/2 #emitter current (mA)\n",
+ "VC=VCC-(IE*RC) #collector quiescent voltage(V) \n",
+ "\n",
+ "print 'tail current = ',round(IT,2),'mA'\n",
+ "print 'emitter current = ',round(IE,2),'mA'\n",
+ "print 'collector quiescent voltage VC = ',round(VC,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tail current = 1.91 mA\n",
+ "emitter current = 0.95 mA\n",
+ "collector quiescent voltage VC = 10.23 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-3, Page 626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #supply voltage(V)\n",
+ "RE=5.0 #Emitter resistance(KOhm)\n",
+ "RC=3.0 #collector resistance(KOhm)\n",
+ "\n",
+ "IT=VCC/RE #tail current (mA)\n",
+ "IE=IT/2 #emitter current (mA)\n",
+ "VC=VCC-(IE*RC) #collector quiescent voltage(V) \n",
+ "IT1=(VCC-VBE)/RE #tail current (mA)\n",
+ "IE1=IT1/2 #emitter current (mA)\n",
+ "VC1=VCC-(IE1*RC) #collector quiescent voltage(V) \n",
+ "\n",
+ "print 'tail current = ',IT,'mA'\n",
+ "print 'emitter current = ',IE,'mA'\n",
+ "print 'collector quiescent voltage VC = ',VC,'V'\n",
+ "print 'with second approximation,'\n",
+ "print 'tail current = ',IT1,'mA'\n",
+ "print 'emitter current = ',IE1,'mA'\n",
+ "print 'collector quiescent voltage VC = ',VC1,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tail current = 2.4 mA\n",
+ "emitter current = 1.2 mA\n",
+ "collector quiescent voltage VC = 8.4 V\n",
+ "with second approximation,\n",
+ "tail current = 2.26 mA\n",
+ "emitter current = 1.13 mA\n",
+ "collector quiescent voltage VC = 8.61 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 92
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-4, Page 631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #supply voltage(V)\n",
+ "RE=7.5 #Emitter resistance(KOhm)\n",
+ "RC=5.0 #collector resistance(KOhm)\n",
+ "IE=1 #emitter current as per preceding example(mA)\n",
+ "Vin=1 #input ac voltage(mV)\n",
+ "B=300 #current gain\n",
+ "\n",
+ "re=25/IE #ac emitter resistance(Ohm)\n",
+ "Av=1000*RC/re #voltage gain\n",
+ "Vout=Av*Vin #Output voltage(mV)\n",
+ "Zinb=2*B*re #input impedance of diff amp(Ohm)\n",
+ "\n",
+ "print 'voltage gain Av = ',Av\n",
+ "print 'Output voltage Vout = ',Vout,'mV'\n",
+ "print 'input impedance of diff amplifier, Zin(base) = ',Zinb/1000,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain Av = 200.0\n",
+ "Output voltage Vout = 200.0 mV\n",
+ "input impedance of diff amplifier, Zin(base) = 15 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-5, Page 632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #supply voltage(V)\n",
+ "RE=7.5 #Emitter resistance(KOhm)\n",
+ "RC=5.0 #collector resistance(KOhm)\n",
+ "IE=0.955 #emitter current as per previous example(mA)\n",
+ "Vin=1 #input ac voltage(mV)\n",
+ "B=300 #current gain\n",
+ "\n",
+ "re=25/IE #ac emitter resistance(Ohm)\n",
+ "Av=1000*RC/re #voltage gain\n",
+ "Vout=Av*Vin #Output voltage(mV)\n",
+ "Zinb=2*B*re #input impedance of diff amp(Ohm)\n",
+ "\n",
+ "print 'voltage gain Av = ',Av\n",
+ "print 'Output voltage Vout = ',Vout,'mV'\n",
+ "print 'input impedance of diff amplifier, Zin(base) = ',round((Zinb/1000),2),'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain Av = 191.0\n",
+ "Output voltage Vout = 191.0 mV\n",
+ "input impedance of diff amplifier, Zin(base) = 15.71 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-6, Page 633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #supply voltage(V)\n",
+ "RE=7.5 #Emitter resistance(KOhm)\n",
+ "RC=5.0 #collector resistance(KOhm)\n",
+ "IE=1 #emitter current as per preceding example(mA)\n",
+ "V2=1 #input ac voltage(mV)\n",
+ "B=300 #current gain\n",
+ "\n",
+ "re=25/IE #ac emitter resistance(Ohm)\n",
+ "Av=1000*RC/re #voltage gain\n",
+ "Vout=Av*V2 #Output voltage(mV)\n",
+ "Zinb=2*B*re #input impedance of diff amp(Ohm)\n",
+ "\n",
+ "print 'V2 input is at inverting input, So, ideally same as previous case.'\n",
+ "print 'Voltage gain Av = ',Av\n",
+ "print 'Output voltage Vout = ',Vout,'mV'\n",
+ "print 'input impedance of diff amplifier, Zin(base) = ',Zinb/1000,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V2 input is at inverting input, So, ideally same as previous case.\n",
+ "Voltage gain Av = 200.0\n",
+ "Output voltage Vout = 200.0 mV\n",
+ "input impedance of diff amplifier, Zin(base) = 15 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-7, Page 633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #supply voltage(V)\n",
+ "RC=1.0**10**6 #collector resistance(Ohm)\n",
+ "RE=1.0**10**6 #emitter resistance(Ohm)\n",
+ "IE=1 #emitter current as per preceding example(mA)\n",
+ "Vin=7 #input ac voltage(mV)\n",
+ "B=300 #current gain\n",
+ "\n",
+ "IT=VCC/RE #tail current (uA)\n",
+ "IE=IT/2 #emitter current (uA)\n",
+ "re=25/IE/1000 #ac emitter resistance(Ohm)\n",
+ "Av=RC/(2*re) #voltage gain\n",
+ "Vout=Av*Vin #Output voltage(V)\n",
+ "Zinb=2*B*re #input impedance of diff amp(MOhm)\n",
+ "\n",
+ "print 'Voltage gain Av = ',Av\n",
+ "print 'Output voltage Vout = ',Vout/1000,'V'\n",
+ "print 'input impedance of diff amplifier, Zin(base) = ',Zinb,'MOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain Av = 150.0\n",
+ "Output voltage Vout = 1.05 V\n",
+ "input impedance of diff amplifier, Zin(base) = 2.0 MOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-8, Page 639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #supply voltage(V)\n",
+ "RC=5.0*10**3 #collector resistance(Ohm)\n",
+ "RE=7.5*10**3 #emitter resistance(Ohm)\n",
+ "RB=1*10**3 #base resistance(Ohm)\n",
+ "Vin=10 #input ac voltage(mV)\n",
+ "Av=200 #voltage gain\n",
+ "Iinb=3*10**-6 #bias current(A)\n",
+ "Iino =0.5*10**-6 #Iin(off) (A) \n",
+ "Vino=1.0 #Vin(off) (mV)\n",
+ "\n",
+ "V1err=RB*Iinb*1000 #dc error input1 (mV)\n",
+ "V2err=RB*(Iino/2)*1000 #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(V1err+V2err+V3err) #output error voltage(mV)\n",
+ "V1err1=0 #dc error input1 (mV)\n",
+ "V2err1=RB*Iino*1000 #dc error input2 (mV)\n",
+ "V3err1=Vino #dc error input3 (mV)\n",
+ "Verror1=Av*(V1err1+V2err1+V3err1) #output error voltage(mV)\n",
+ "\n",
+ "print 'output error voltage Verror = ',Verror,'mV'\n",
+ "print 'output error voltage Verror = ',Verror1,'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 850.0 mV\n",
+ "output error voltage Verror = 300.0 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-9, Page 640"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #supply voltage(V)\n",
+ "RC=1.0*10**6 #collector resistance(Ohm)\n",
+ "RE=1.0*10**6 #emitter resistance(Ohm)\n",
+ "RB=10*10**3 #base resistance(Ohm)\n",
+ "Vin=10 #input ac voltage(mV)\n",
+ "Av=300 #voltage gain\n",
+ "Iinb=80*10**-9 #bias current(A)\n",
+ "Iino=20*10**-9 #Iin(off) (A) \n",
+ "Vino=5.0 #Vin(off) (mV)\n",
+ "\n",
+ "V1err=0 #dc error input1 (mV)\n",
+ "V2err=RB*(Iino/2)*1000 #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(V1err+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "print 'output error voltage Verror = ',Verror/1000,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 1.53 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 98
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-10, Page 643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #supply voltage(V)\n",
+ "RC=1.0*10**6 #collector resistance(Ohm)\n",
+ "RE=1.0*10**6 #emitter resistance(Ohm)\n",
+ "Vin=1 #input ac voltage(mV)\n",
+ "\n",
+ "Av_CM=RC/(2*RE) #common mode voltage gain\n",
+ "Vout=Av_CM*Vin #output voltage(mV) \n",
+ "\n",
+ "print 'common mode voltage gain : Av(CM) = ',Av_CM\n",
+ "print 'Output voltage Vout = ',Vout,'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "common mode voltage gain : Av(CM) = 0.5\n",
+ "Output voltage Vout = 0.5 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-11, Page 643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=1 #input ac voltage(mV)\n",
+ "Av=150 #voltage gain\n",
+ "Av_CM=0.5 #common mode voltage gain\n",
+ "\n",
+ "Vout1=Av*Vin #output voltage1(mV)\n",
+ "Vout2=Av_CM*Vin #output voltage2(mV)\n",
+ "Vout=Vout1+Vout2 #output volatge(mV)\n",
+ "\n",
+ "print 'output voltage Vout1 = ',Vout1,'mV'\n",
+ "print 'output voltage Vout2 = ',Vout2,'mV'\n",
+ "print 'output voltage Vout = ',Vout,'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout1 = 150 mV\n",
+ "output voltage Vout2 = 0.5 mV\n",
+ "output voltage Vout = 150.5 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-12, Page 644"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "CMRR_dB=90 #CMRR(dB)\n",
+ "Av=200000 #voltage gain\n",
+ "Vin=1*10**-6 #input voltage(V)\n",
+ "\n",
+ "CMRR=10**(CMRR_dB/20.0) #CMRR \n",
+ "Av_CM=Av/CMRR #common mode voltage gain \n",
+ "Vout1=Av*Vin #desired output: voltage1(V)\n",
+ "Vout2=Av_CM*Vin #common mode output: voltage2(V)\n",
+ "\n",
+ "print 'output voltage Vout1 = ',Vout1,'V'\n",
+ "print 'output voltage Vout2 = ',round((Vout2*10**6),2),'uV'\n",
+ "print 'see, desired output is much larger than common mode output.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage Vout1 = 0.2 V\n",
+ "output voltage Vout2 = 6.32 uV\n",
+ "see, desired output is much larger than common mode output.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-13, Page 651"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #supply voltage(V)\n",
+ "RC=7.5*10**3 #collector resistance(Ohm)\n",
+ "RE=7.5*10**3 #emitter resistance(Ohm)\n",
+ "V1=10 #input ac voltage(mV)\n",
+ "re=25 #as per example 17-4 (Ohm) \n",
+ "RL=15*10**3 #load resistance(KOhm)\n",
+ "\n",
+ "Av=RC/re #voltage gain\n",
+ "Vout=Av*V1/1000 #output voltage(V) \n",
+ "RTH=2*RC #Thevenin resistance(Ohm)\n",
+ "VL=(RL/(RL+RTH))*Vout #load voltage(V)\n",
+ "\n",
+ "print 'Load voltage VL = ',VL,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load voltage VL = 1.5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17-14, Page 652"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RL=15.0 #load resistance as per previous example(Ohm)\n",
+ "VL=3 #load voltage as per previous example(V)\n",
+ "\n",
+ "iL=VL/RL #load current(mA)\n",
+ "\n",
+ "print 'Load current iL = ',iL,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current iL = 0.2 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_18_New.ipynb b/Electronic_Principles/Chapter_18_New.ipynb
new file mode 100755
index 00000000..a06bb044
--- /dev/null
+++ b/Electronic_Principles/Chapter_18_New.ipynb
@@ -0,0 +1,568 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 18 OPERATIONAL AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-1, Page 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vout=13.5 #As per figure 18-7b(V)\n",
+ "Aov=100000 #open loop voltage gain\n",
+ "\n",
+ "V2=Vout/Aov #required input voltage(V)\n",
+ "\n",
+ "print 'Required input voltage V2 = ',V2*10**6,'uV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required input voltage V2 = 135.0 uV\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-2, Page 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "CMRR_dB=40 #As per figure 18-7a at 100KHz(dB)\n",
+ "\n",
+ "CMRR=10**(CMRR_dB/20)\n",
+ "\n",
+ "print 'Common-mode rejection ratio = ',CMRR"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common-mode rejection ratio = 100\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-3, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "Av1=1000 #Voltage gain as per figure 18-7c for 1KHZ\n",
+ "Av10=100 #Voltage gain as per figure 18-7c for 10KHZ\n",
+ "Av100=10 #Voltage gain as per figure 18-7c for 100KHZ\n",
+ "\n",
+ "print 'Voltage gain for 1KHZ = ',Av1\n",
+ "print 'Voltage gain for 1KHZ = ',Av10\n",
+ "print 'Voltage gain for 1KHZ = ',Av100"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain for 1KHZ = 1000\n",
+ "Voltage gain for 1KHZ = 100\n",
+ "Voltage gain for 1KHZ = 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-4, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vout=0.25 #output changes in 0.1us (V)\n",
+ "t=0.1 #time for output change(us) \n",
+ "\n",
+ "SR=Vout/t #slew rate(V/us)\n",
+ "\n",
+ "print 'Slew rate SR = ',SR,'V/us'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slew rate SR = 2.5 V/us\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-5, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "SR=15 #slew rate(V/us)\n",
+ "Vp=10 #Peak output voltage(V)\n",
+ "\n",
+ "fmax=1000*SR/(2*math.pi*Vp) #power bandwidth (KHz) \n",
+ "\n",
+ "print 'Power bandwidth = ',round(fmax),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power bandwidth = 239.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-6, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "SR1=0.5 #Slew rate1(V/us)\n",
+ "SR2=5 #Slew rate2(V/us)\n",
+ "SR3=50 #Slew rate3(V/us)\n",
+ "Vp=8 #peak voltage(V)\n",
+ "\n",
+ "fmax1=1000*SR1/(2*math.pi*Vp) #power bandwidth1 (KHz) \n",
+ "fmax2=1000*SR2/(2*math.pi*Vp) #power bandwidth2 (KHz) \n",
+ "fmax3=SR3/(2*3*math.pi*Vp) #power bandwidth3 (MHz) \n",
+ "\n",
+ "print 'Power bandwidth1 = ',math.ceil(fmax1),'KHz'\n",
+ "print 'Power bandwidth2 = ',math.ceil(fmax2),'KHz'\n",
+ "print 'Power bandwidth3 = ',math.ceil(fmax3),'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power bandwidth1 = 10.0 KHz\n",
+ "Power bandwidth2 = 100.0 KHz\n",
+ "Power bandwidth3 = 1.0 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-7, Page 678"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=75 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.5 #inverting input resistance R1(KOhm)\n",
+ "Funity=1 #Funity (MHz)\n",
+ "\n",
+ "Av_CL=-Rf/R1 #closed loop voltage gain\n",
+ "f2_CL1=Funity/-Av_CL #closed loop bandwidth1(KHz)\n",
+ "Vout1=Av_CL*Vin #output voltage1(mV)\n",
+ "Vout2=-Vin #output voltage2(mV)\n",
+ "\n",
+ "print 'Output voltage for 1KHz = ',Vout1,'mVpp'\n",
+ "print 'Output voltage for 1MHz = ',Vout2,'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage for 1KHz = -500.0 mVpp\n",
+ "Output voltage for 1MHz = -10 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-8, Page 679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=75 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.5 #inverting input resistance R1(KOhm)\n",
+ "Iinb=80*10**-9 #bias current(A)\n",
+ "Iino =20*10**-9 #Iin(off) (A) \n",
+ "Vino=2.0 #Vin(off) (mV)\n",
+ "Av=50 #voltage gain \n",
+ "RB1=0 #resistance at noninverting input(KOhm) \n",
+ "\n",
+ "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n",
+ "V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)\n",
+ "V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "print 'output error voltage Verror = ',round(Verror,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 106.62 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-9, Page 679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=75 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.5 #inverting input resistance R1(KOhm)\n",
+ "Iinb=500*10**-9 #bias current(A)\n",
+ "Iino =200*10**-9 #Iin(off) (A) \n",
+ "Vino=6.0 #Vin(off) (mV)\n",
+ "Av=50 #voltage gain \n",
+ "RB1=0 #resistance at noninverting input(KOhm) \n",
+ "\n",
+ "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n",
+ "V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)\n",
+ "V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "print 'output error voltage Verror = ',round(Verror,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 344.12 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-10, Page 683"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Vin=50 #input voltage(mV)\n",
+ "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n",
+ "R1=100 #inverting input resistance R1(Ohm)\n",
+ "Funity=1*10**6 #Funity (Hz)\n",
+ "\n",
+ "Av_CL=1+(Rf/R1) #closed loop voltage gain\n",
+ "f2_CL1=Funity/Av_CL #closed loop bandwidth1(KHz)\n",
+ "Av_CL1=math.ceil(10**(12/20.0)) #Av for 12 dB at 250 KHz \n",
+ "Vout=Av_CL1*Vin #output voltage(mV)\n",
+ "\n",
+ "print 'Output voltage for 250KHz = ',Vout,'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage for 250KHz = 200.0 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-11, Page 684"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n",
+ "R1=100 #inverting input resistance R1(Ohm)\n",
+ "Iinb=500*10**-9 #bias current(A)\n",
+ "Iino =200*10**-9 #Iin(off) (A) \n",
+ "Vino=6.0*10**-3 #Vin(off) (V)\n",
+ "Av=40 #voltage gain \n",
+ "RB1=0 #resistance at noninverting input(KOhm) \n",
+ "\n",
+ "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n",
+ "V1err=(RB1-RB2)*Iinb #dc error input1 (mV)\n",
+ "V2err=(RB1+RB2)*(Iino/2) #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "print 'output error voltage Verror = ',Verror*1000,'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 242.34 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-12, Page 687"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin1=100*10**-3 #input voltage1(V)\n",
+ "Vin2=200*10**-3 #input voltage2(V)\n",
+ "Vin3=300*10**-3 #input voltage3(V)\n",
+ "Rf=100.0 #feedback path resistance Rf (KOhm)\n",
+ "R1=20.0 #inverting input resistance R1(KOhm)\n",
+ "R2=10.0 #inverting input resistance R2(KOhm)\n",
+ "R3=50.0 #inverting input resistance R3(KOhm)\n",
+ "\n",
+ "Av1_CL=-Rf/R1 #closed loop voltage gain\n",
+ "Av2_CL=-Rf/R1 #closed loop voltage gain\n",
+ "Av3_CL=-Rf/R1 #closed loop voltage gain\n",
+ "Vout=Av1_CL*Vin1+Av2_CL*Vin2+Av3_CL*Vin3 #output voltage1(mV)\n",
+ "RB2=(R1**-1+R2**-1+R3**-1+Rf**-1)**-1 #thevenin resistance at inverting input(KOhm) \n",
+ "\n",
+ "print 'Output voltage = ',Vout,'Vpp'\n",
+ "print 'thevenin resistance at inverting input RB2 = ',round(RB2,2),'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = -3.0 Vpp\n",
+ "thevenin resistance at inverting input RB2 = 5.56 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-13, Page 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=10 #ac voltage source (mVpp)\n",
+ "Av=1 #voltage gain\n",
+ "Funity=1 #unity frequency (MHz) \n",
+ "\n",
+ "Vout=Av*Vin #output voltage(V) \n",
+ "f2_CL=Funity #bandwidth(MHz) \n",
+ "\n",
+ "print 'Output voltage = ',Vout,'mVpp'\n",
+ "print 'Bandwidth f2(CL) = ',f2_CL,'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 10 mVpp\n",
+ "Bandwidth f2(CL) = 1 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-14, Page 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RL=1.0 #load resistance(Ohm)\n",
+ "Vout=9.99 #load voltage(mV)\n",
+ "Vz=0.01 #voltage across Zout(CL) (mV)\n",
+ "\n",
+ "iout=Vout/RL #load current(mA)\n",
+ "Zout_CL=Vz/iout #output impedance(Ohm)\n",
+ "\n",
+ "print 'Load current iout = ',iout,'mA'\n",
+ "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,3),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current iout = 9.99 mA\n",
+ "closed loop output impedance Zout(CL) = 0.001 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_19_New.ipynb b/Electronic_Principles/Chapter_19_New.ipynb
new file mode 100755
index 00000000..2cb36ac1
--- /dev/null
+++ b/Electronic_Principles/Chapter_19_New.ipynb
@@ -0,0 +1,502 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 19 NEGATIVE FEEDBACK"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-1, Page 709"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=50 #input voltage(mV)\n",
+ "Rf=3.9 #feedback path resistance Rf (KOhm)\n",
+ "R1=0.1 #inverting input resistance R1(KOhm)\n",
+ "AVOL=100000 #open loop voltage gain\n",
+ "\n",
+ "B=R1/(Rf+R1) #feedback fraction\n",
+ "Av=B**-1 #closed loop voltage gain\n",
+ "Err=100/(1+AVOL*B) #percent error (%)\n",
+ "Av1=Av-((Av/100)*Err) #closed loop voltage gain1\n",
+ "Av2=AVOL/(1+AVOL*B) #closed loop voltage gain2\n",
+ "\n",
+ "print 'closed loop voltage gain by approach 1 = ',round(Av1,2)\n",
+ "print 'closed loop voltage gain by approach 2 = ',round(Av2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop voltage gain by approach 1 = 39.98\n",
+ "closed loop voltage gain by approach 2 = 39.98\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-2, Page 713"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=50 #input voltage(mV)\n",
+ "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n",
+ "R1=100 #inverting input resistance R1(Ohm)\n",
+ "AVOL=100000 #open loop voltage gain\n",
+ "B=0.025 #feedback fraction\n",
+ "Rin=2*10**6 #open loop input resistance(Ohm)\n",
+ "RCM=200*10**6 #common mode input resistance(Ohm)\n",
+ "\n",
+ "Zin_CL=(1+(AVOL*B))*Rin #closed loop input impedance(Ohm)\n",
+ "Zin_CL1=RCM*Zin_CL/(RCM+Zin_CL) #closed loop input impedance(Ohm)\n",
+ "\n",
+ "print 'closed loop input impedance Zin(CL) = ',round((Zin_CL1/10**6),2),'MOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop input impedance Zin(CL) = 192.31 MOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-3, Page 714"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rout=75 #open loop output resistance(Ohm)\n",
+ "AVOL=100000 #open loop voltage gain\n",
+ "B=0.025 #feedback fraction\n",
+ "\n",
+ "Zout_CL=Rout/(1+AVOL*B) #closed loop input impedance(Ohm)\n",
+ "\n",
+ "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,2),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop output impedance Zout(CL) = 0.03 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-4, Page 714"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "THD=7.5 #open loop total harmonic distortion (%)\n",
+ "AVOL=100000 #open loop voltage gain\n",
+ "B=0.025 #feedback fraction\n",
+ "\n",
+ "THD_CL=THD/(1+AVOL*B) #closed loop total harmonic distortion (%)\n",
+ "\n",
+ "print 'Closed loop total harmonic distortion THD(CL) = ',round(THD_CL,3),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Closed loop total harmonic distortion THD(CL) = 0.003 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-5, Page 716"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Iin=1 #input current(mA)\n",
+ "Rf=5 #feedback path resistance Rf (KOhm)\n",
+ "\n",
+ "Vout=-(Iin*Rf) #Output voltage at 1KHz (Vpp) \n",
+ "\n",
+ "print 'Output ac voltage at 1KHz Vout = ',Vout,'Vpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output ac voltage at 1KHz Vout = -5 Vpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-6, Page 717"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rout=75.0 #open loop output resistance(Ohm)\n",
+ "AVOL=100000 #open loop voltage gain\n",
+ "Rf=5.0*10**3 #feedback path resistance(Ohm)\n",
+ "\n",
+ "Zin_CL=Rf/(1+AVOL) #closed loop input impedance(Ohm)\n",
+ "Zout_CL=Rout/(1+AVOL) #closed loop input impedance(Ohm)\n",
+ "\n",
+ "print 'closed loop input impedance Zin(CL) = ',round(Zin_CL,2),'Ohm'\n",
+ "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,5),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop input impedance Zin(CL) = 0.05 Ohm\n",
+ "closed loop output impedance Zout(CL) = 0.00075 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-7, Page 718"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=2 #input voltage(Vrms)\n",
+ "RL1=2 #load resistance (KOhm)\n",
+ "R1=1 #inverting input resistance R1(KOhm)\n",
+ "RL2=4 #load resistance(KOhm)\n",
+ "\n",
+ "iout=Vin/R1 #output current (mA)\n",
+ "PL1=(iout**2)*RL1 #load power for 2 Ohm (W) \n",
+ "PL2=(iout**2)*RL2 #load power for 4 Ohm (W) \n",
+ "\n",
+ "print 'load power for 2 Ohm = ',PL1,'W'\n",
+ "print 'load power for 4 Ohm = ',PL2,'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load power for 2 Ohm = 8 W\n",
+ "load power for 4 Ohm = 16 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-8, Page 720"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Iin=1.5*10**-3 #input current(mA)\n",
+ "RL1=1 #load resistance (KOhm)\n",
+ "R1=1 #inverting input resistance R1(KOhm)\n",
+ "RL2=2 #load resistance (KOhm)\n",
+ "Rf=1*10**3 #feedback path resistance(Ohm)\n",
+ "\n",
+ "Ai=math.ceil(1+(Rf/R1)) #current gain\n",
+ "iout=Iin*Ai #output current (mA)\n",
+ "PL1=(iout**2)*RL1 #load power for 1 Ohm (W) \n",
+ "PL2=(iout**2)*RL2 #load power for 2 Ohm (W) \n",
+ "\n",
+ "print 'load power for 2 Ohm = ',round(PL1,2),'W'\n",
+ "print 'load power for 4 Ohm = ',round(PL2,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load power for 2 Ohm = 2.25 W\n",
+ "load power for 4 Ohm = 4.51 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-9, Page 723"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "AB=1000 #(1+AvolB) term \n",
+ "f2_OL=160 #open loop bandwidth(Hz)\n",
+ "\n",
+ "f2_CL=f2_OL*AB/1000 #closed loop bandwidth(KHz)\n",
+ "\n",
+ "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop bandwidth f2(CL)= 160 KHZ\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-10, Page 723"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "AVOL=250000 #open loop voltage gain\n",
+ "f2_OL=1.2 #open loop bandwidth(Hz)\n",
+ "Av_CL=50 #closed loop voltage gain\n",
+ "\n",
+ "f2_CL=f2_OL*AVOL/Av_CL/1000 #closed loop bandwidth(KHz)\n",
+ "\n",
+ "print 'closed loop bandwidth for Av(CL) = 50, f2(CL)= ',f2_CL,'KHZ'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop bandwidth for Av(CL) = 50, f2(CL)= 6.0 KHZ\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-11, Page 724"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "AVOL=50000 #open loop voltage gain\n",
+ "f2_OL=14 #open loop bandwidth(Hz)\n",
+ "\n",
+ "f2_CL=f2_OL*(1+AVOL)/1000 #closed loop bandwidth(KHz)\n",
+ "\n",
+ "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop bandwidth f2(CL)= 700 KHZ\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-12, Page 724"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "AB=2500 #(1+AvolB) term \n",
+ "f2_OL=20 #open loop bandwidth(Hz)\n",
+ "\n",
+ "f2_CL=f2_OL*AB/1000 #closed loop bandwidth(KHz)\n",
+ "\n",
+ "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop bandwidth f2(CL)= 50 KHZ\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19-13, Page 724"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Av_CL=10.0 #voltage gain\n",
+ "Funity=1*10**6 #unity frequency (Hz) \n",
+ "Sr=0.5 #slew rate (V/us)\n",
+ "\n",
+ "f2_CL=Funity/Av_CL/1000 #closed loop bandwidth(KHz)\n",
+ "Vp_max=1000*Sr/(2*math.pi*f2_CL) #largest peak output voltage(V)\n",
+ "\n",
+ "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'\n",
+ "print 'largest peak output voltage Vp(max)= ',round(Vp_max,3),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop bandwidth f2(CL)= 100.0 KHZ\n",
+ "largest peak output voltage Vp(max)= 0.796 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_1_New.ipynb b/Electronic_Principles/Chapter_1_New.ipynb
new file mode 100755
index 00000000..5245d442
--- /dev/null
+++ b/Electronic_Principles/Chapter_1_New.ipynb
@@ -0,0 +1,256 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 1 INTRODUCTION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-1, Page 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rs=50 #source resistance(Ohm)\n",
+ "\n",
+ "RL=100*Rs/1000 #Minimum Load resistance(KOhm)\n",
+ "\n",
+ "print 'Minimum Load resistance =',RL,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum Load resistance = 5 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-2, Page 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Is=0.002 #Current source(A)\n",
+ "Rs=10000000 #internal resistance(Ohm)\n",
+ "\n",
+ "Rl_Max=0.01*Rs/1000 #Maximum load resistance(KOhm)\n",
+ "\n",
+ "print 'With 100:1 Rule, Maximum Load resistance =',Rl_Max,'KOhm'\n",
+ "print 'Stiff range for current source is load resistance from 0 KOhm to',Rl_Max,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "With 100:1 Rule, Maximum Load resistance = 100.0 KOhm\n",
+ "Stiff range for current source is load resistance from 0 KOhm to 100.0 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-3, Page 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Il=0.002 #current source(A)\n",
+ "Rl=10000 #load resistance(Ohm)\n",
+ "\n",
+ "Vl=Il*Rl #load voltage(V)\n",
+ "\n",
+ "print 'Load Voltage =',Vl,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load Voltage = 20.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-4, Page 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print 'As per figure 1-9a, Calculate Thevenin resistor by opening load resistor'\n",
+ "\n",
+ "Vs=72 #source voltage\n",
+ "R1=6 #Resistance (KOhm)\n",
+ "R2=3 #Resistance (KOhm)\n",
+ "R3=4 #Resistance (KOhm)\n",
+ "\n",
+ "Ro=R1+R2 #Resistance (KOhm)\n",
+ "I=Vs/Ro\n",
+ "Vab=R2*Vs/(R1+R2) #Thevenin voltage(V)\n",
+ "Rth=((R1*R2)/(R1+R2))+R3 #Thevenin Resistance(KOhm)\n",
+ "\n",
+ "print 'After removing Rl current flowing through 6KOhm is',I,'mA'\n",
+ "print 'Thevenin Voltage Vth =',Vab,'V'\n",
+ "print 'Calculating Thevenin Resistance with considering R1 & R2 in parallel'\n",
+ "print 'Thevenin Resistance =',Rth,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As per figure 1-9a, Calculate Thevenin resistor by opening load resistor\n",
+ "After removing Rl current flowing through 6KOhm is 8 mA\n",
+ "Thevenin Voltage Vth = 24 V\n",
+ "Calculating Thevenin Resistance with considering R1 & R2 in parallel\n",
+ "Thevenin Resistance = 6 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-5, Page 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vs=72 #source voltage\n",
+ "R1=2 #resistance1 (KOhm)\n",
+ "R2=2 #resistance1 (KOhm)\n",
+ "R3=1 #resistance1 (KOhm)\n",
+ "R4=2 #resistance1 (KOhm)\n",
+ "R5=1 #resistance1 (KOhm)\n",
+ "R6=2 #resistance1 (KOhm)\n",
+ "R7=0.5 #resistance1 (KOhm)\n",
+ "RL=1 #load resistance (KOhm)\n",
+ "\n",
+ "Vth=9 #Thevenin voltage(V)\n",
+ "Rth=1.5 #Thevenin resistance(KOhm)\n",
+ "\n",
+ "print 'Thevenin Voltage Vth =',Vth,'V'\n",
+ "print 'Thevenin Resistance =',Rth,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thevenin Voltage Vth = 9 V\n",
+ "Thevenin Resistance = 1.5 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-6, Page 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vs=10 #source voltage\n",
+ "Rs=2 #series source resistance (KOhm)\n",
+ "\n",
+ "IN=Vs/Rs #Norton current(mA)\n",
+ "Rp=Rs #parallel source resistance(KOhm)\n",
+ "\n",
+ "print 'Norton current IN =',IN,'mA'\n",
+ "print 'Norton Resistance =',Rp,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Norton current IN = 5 mA\n",
+ "Norton Resistance = 2 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_20_New.ipynb b/Electronic_Principles/Chapter_20_New.ipynb
new file mode 100755
index 00000000..1bf81dd2
--- /dev/null
+++ b/Electronic_Principles/Chapter_20_New.ipynb
@@ -0,0 +1,424 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 20 LINEAR OP-AMP CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-1, Page 741"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rf=100.0 #feedback path resistance Rf (KOhm)\n",
+ "R1=100.0 #inverting input resistance R1(KOhm)\n",
+ "R2=1.0 #inverting input & drain resistance R2(KOhm)\n",
+ "\n",
+ "Av1=(Rf/(R1**-1+R2**-1)**-1)+1 #maximum voltage gain\n",
+ "Av2=(Rf/R1)+1 #minimum voltage gain\n",
+ "\n",
+ "print 'maximum voltage gain = ',Av1\n",
+ "print 'minimum voltage gain = ',Av2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum voltage gain = 102.0\n",
+ "minimum voltage gain = 2.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-2, Page 747"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1.2 #inverting input resistance R1(KOhm)\n",
+ "R2=91.0 #feedback resistance R2(KOhm)\n",
+ "\n",
+ "Av1=-R2/R1 #maximum voltage gain\n",
+ "Av2=0 #minimum voltage gain\n",
+ "\n",
+ "print 'maximum voltage gain = ',round(Av1,2)\n",
+ "print 'minimum voltage gain = ',Av2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum voltage gain = -75.83\n",
+ "minimum voltage gain = 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-3, Page 747"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R=1.5 #inverting input resistance R1(KOhm)\n",
+ "nR=7.5 #feedback resistance(KOhm)\n",
+ "\n",
+ "n=nR/R #max. limit of voltage gain \n",
+ "rf=nR/(n-1) #fixed resistor (KOhm)\n",
+ "\n",
+ "print 'maximum positive voltage gain = ',n\n",
+ "print 'other fixed resistor = ',rf,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum positive voltage gain = 5.0\n",
+ "other fixed resistor = 1.875 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-4, Page 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1.0 #inverting input resistance R1(KOhm)\n",
+ "R2=100.0 #feedback resistance R2(KOhm)\n",
+ "R=10.0 #resistor of opamp in seconnd stage(KOhm)\n",
+ "Vin=10*10**-3 #input voltage(V)\n",
+ "Vin_CM=10 #common mode input voltage(V)\n",
+ "T=0.0001 #tolerance of resistor \n",
+ "\n",
+ "Av=(R2/R1)+1 #preamp voltage gain\n",
+ "Av_CM=2*T #common mode voltage gain of 2nd stage\n",
+ "Vout=-Av*Vin #output siganl voltage(V)\n",
+ "Vout_CM=Av_CM*Vin_CM #output siganl voltage for common mode signal(V)\n",
+ "\n",
+ "print 'output siganl voltage for common mode signal Vout(CM) = ',Vout_CM,'V'\n",
+ "print 'output siganl voltage Vout = ',Vout,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output siganl voltage for common mode signal Vout(CM) = 0.002 V\n",
+ "output siganl voltage Vout = -1.01 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-5, Page 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rf=6.0 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.0 #inverting input resistance R1(KOhm)\n",
+ "R2=2.0 #inverting input resistance R2(KOhm)\n",
+ "R3=3.0 #non-inverting input resistance R3(KOhm)\n",
+ "R4=4.0 #non-inverting input resistance R4(KOhm)\n",
+ "R5=5.0 #non-inverting input resistance R5(KOhm)\n",
+ "\n",
+ "Av1=(-Rf/R1) #voltage gain1\n",
+ "Av2=(-Rf/R2) #voltage gain2\n",
+ "Av3=(1+(Rf/((R1**-1+R2**-1)**-1)))*(((R4**-1+R5**-1)**-1)/(R3+((R4**-1+R5**-1)**-1))) #voltage gain3\n",
+ "Av4=(1+(Rf/((R1**-1+R2**-1)**-1)))*(((R3**-1+R5**-1)**-1)/(R4+((R3**-1+R5**-1)**-1))) #voltage gain4\n",
+ "\n",
+ "print 'Voltage gain channel-1 Av1 = ',Av1\n",
+ "print 'Voltage gain channel-2 Av2 = ',Av2\n",
+ "print 'Voltage gain channel-3 Av3 = ',round(Av3,2)\n",
+ "print 'Voltage gain channel-4 Av4 = ',round(Av4,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain channel-1 Av1 = -6.0\n",
+ "Voltage gain channel-2 Av2 = -3.0\n",
+ "Voltage gain channel-3 Av3 = 4.26\n",
+ "Voltage gain channel-4 Av4 = 3.19\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-6, Page 762"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "D0=1 #digital input0 (binary)\n",
+ "D1=0 #digital input1 (binary)\n",
+ "D2=0 #digital input2 (binary)\n",
+ "D3=1 #digital input3 (binary)\n",
+ "Vref=5 #reference voltage(V)\n",
+ "N=4 #no. of inputs\n",
+ "\n",
+ "BIN=(D0*2**0)+(D1*2**1)+(D2*2**2)+(D3*2**3) #decimal equivalent BIN\n",
+ "Vout=-((2*Vref*BIN)/2.0**N) #output voltage of converter(V)\n",
+ "\n",
+ "print 'decimal equivalent BIN = ',BIN\n",
+ "print 'output voltage of converter Vout = ',Vout,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decimal equivalent BIN = 9\n",
+ "output voltage of converter Vout = -5.625 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-7, Page 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R2=51 #feedback path resistance (KOhm)\n",
+ "R1=1 #inverting input resistance R1(KOhm)\n",
+ "Bdc=125 #current gain\n",
+ "Zout=75 #open loop output impedance(Ohm)\n",
+ "AVOL=100000 #741C voltage gain\n",
+ "\n",
+ "Av=-R2/R1 #closed loop voltage gain\n",
+ "B=R1/(R1+R2) #feedback fraction\n",
+ "Zout_CL=Zout/(1+(AVOL*B)) #closed loop output impedance(Ohm)\n",
+ "Isc=25.0/1000 #shorted current for 741C op-amp(A)\n",
+ "Imax=Bdc*Isc #maximum load current(A)\n",
+ "\n",
+ "print 'closed loop output impedance Zout(CL) = ',Zout_CL,'Ohm'\n",
+ "print 'maximum load current Imax = ',Imax,'A'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop output impedance Zout(CL) = 75 Ohm\n",
+ "maximum load current Imax = 3.125 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-8, Page 768"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=1.0 #input voltage(V)\n",
+ "VCC=15 #supply voltage(V)\n",
+ "R=10 #inverting input resistance(KOhm)\n",
+ "Vin2=10.0 #larger input(V)\n",
+ "\n",
+ "iout=Vin/R #output current(mA)\n",
+ "RL_max=R*(VCC/Vin2-1) #Maximum load resistance(KOhm) \n",
+ "\n",
+ "print 'Output current iout = ',iout,'mA'\n",
+ "print 'Maximum load resistance RL(max) = ',RL_max,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output current iout = 0.1 mA\n",
+ "Maximum load resistance RL(max) = 5.0 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-9, Page 768"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vin=3.0 #input voltage(V)\n",
+ "VCC=15 #supply voltage(V)\n",
+ "R=15 #inverting input resistance(KOhm)\n",
+ "Vin2=12.0 #larger input(V)\n",
+ "\n",
+ "iout=-Vin/R #output current(mA)\n",
+ "RL_max=(R/2.0)*(VCC/Vin2-1) #Maximum load resistance(KOhm) \n",
+ "\n",
+ "print 'Output current iout = ',iout,'mA'\n",
+ "print 'Maximum load resistance RL(max) = ',RL_max,'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output current iout = -0.2 mA\n",
+ "Maximum load resistance RL(max) = 1.875 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20-10, Page 771"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R2=47 #feedback path resistance (KOhm)\n",
+ "R1=1.0 #inverting input resistance R1(KOhm)\n",
+ "R3=100 #non-inverting input resistance R3(KOhm)\n",
+ "rds1=0.050 #ohmic resistance of JFET (KOhm)\n",
+ "rds2=120.0 #ohmic resistance of JFET (KOhm)\n",
+ "\n",
+ "Av1=((R2/R1)+1)*(rds1/(rds1+R3)) #minimum voltage gain\n",
+ "Av2=((R2/R1)+1)*(rds2/(rds2+R3)) #maximum voltage gain\n",
+ "\n",
+ "print 'Maximum voltage gain Av = ',round(Av2,2)\n",
+ "print 'Minimum voltage gain Av = ',round(Av1,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum voltage gain Av = 26.18\n",
+ "Minimum voltage gain Av = 0.024\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_21_New.ipynb b/Electronic_Principles/Chapter_21_New.ipynb
new file mode 100755
index 00000000..93fb24ec
--- /dev/null
+++ b/Electronic_Principles/Chapter_21_New.ipynb
@@ -0,0 +1,620 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 21 ACTIVE FILTERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-1, Page 806"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Rf=39.0 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.0 #inverting input resistance R1(KOhm)\n",
+ "R2=12.0*10**3 #non-inverting input resistance R2(Ohm)\n",
+ "C=680*10**-12 #capacitance at non-inverting input(F)\n",
+ "\n",
+ "Av=(Rf/R1)+1 # voltage gain\n",
+ "fc=(2*math.pi*R2*C)**-1 #cutoff frequency(Hz)\n",
+ "\n",
+ "print 'voltage gain Av = ',Av\n",
+ "print 'cutoff frequency fc = ',round((fc/1000),2),'KHz'\n",
+ "print 'frequency response:'\n",
+ "print 'voltage gain is 32 dB in pass band. response breaks at 19.5 KHz.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain Av = 40.0\n",
+ "cutoff frequency fc = 19.5 KHz\n",
+ "frequency response:\n",
+ "voltage gain is 32 dB in pass band. response breaks at 19.5 KHz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-2, Page 807"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "Rf=43.0 #feedback path resistance Rf (KOhm)\n",
+ "R1=0.220 #non-inverting input resistance R1(KOhm)\n",
+ "C=100*10**-12 #capacitance (F)\n",
+ "\n",
+ "Av=(-Rf/R1) # voltage gain\n",
+ "fc=((2*math.pi*Rf*C)**-1)/10**6 #cutoff frequency(KHz)\n",
+ "\n",
+ "print 'voltage gain Av = ',round(Av,2)\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n",
+ "print 'voltage gain is 45.8 dB in pass band. response breaks at 37 KHz.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain Av = -195.45\n",
+ "cutoff frequency fc = 37.01 KHz\n",
+ "voltage gain is 45.8 dB in pass band. response breaks at 37 KHz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-3, Page 811"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=30 #non-inverting input resistance R1(KOhm)\n",
+ "R2=30 #non-inverting input resistance R2(KOhm)\n",
+ "C2=1.64*10**-9 #feedback path capacitance (F)\n",
+ "C1=820*10**-12 #non-inverting input capacitance (F)\n",
+ "\n",
+ "Q=0.5*((C2/C1)**0.5) #Q\n",
+ "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=fp #cutoff frequency(KHz)\n",
+ "\n",
+ "print ' Q = ',round(Q,3)\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = fp, ',round(fc,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Q = 0.707\n",
+ "pole frequency fp = 4.57 KHz\n",
+ "cutoff frequency fc = fp, 4.57 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-4, Page 811"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=51 #non-inverting input resistance R1(KOhm)\n",
+ "R2=51 #non-inverting input resistance R2(KOhm)\n",
+ "C2=440*10**-12 #feedback path capacitance (F)\n",
+ "C1=330*10**-12 #non-inverting input capacitance (F)\n",
+ "kc=0.786 #constant for bessel response \n",
+ "\n",
+ "Q=0.5*((C2/C1)**0.5) #Q\n",
+ "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=kc*fp #cutoff frequency(KHz) \n",
+ "\n",
+ "print ' Q = ',round(Q,2)\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Q = 0.58\n",
+ "pole frequency fp = 8.19 KHz\n",
+ "cutoff frequency fc = 6.44 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-5, Page 812"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "R1=22 #non-inverting input resistance R1(KOhm)\n",
+ "R2=22 #non-inverting input resistance R2(KOhm)\n",
+ "C2=27*10**-9 #feedback path capacitance (F)\n",
+ "C1=390*10**-12 #non-inverting input capacitance (F)\n",
+ "kc=1.38 #constant for bessel response \n",
+ "k0=0.99 #constant for bessel response\n",
+ "k3=1.54 #constant for bessel response\n",
+ "\n",
+ "Q=0.5*((C2/C1)**0.5) #Q\n",
+ "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=kc*fp #cutoff frequency(KHz) \n",
+ "f3=k3*fp #3-dB frequency(KHz)\n",
+ "\n",
+ "print 'Q = ',round(Q,2)\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n",
+ "print '3-dB frequency f(3dB) = ',round(f3,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 4.16\n",
+ "pole frequency fp = 2.23 KHz\n",
+ "cutoff frequency fc = 3.08 KHz\n",
+ "3-dB frequency f(3dB) = 3.43 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-6, Page 817"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=47 #non-inverting input resistance R1(KOhm)\n",
+ "R2=47 #non-inverting input resistance R2(KOhm)\n",
+ "C2=330*10**-12 #feedback path capacitance (F)\n",
+ "C1=330*10**-12 #non-inverting input capacitance (F)\n",
+ "R3=51 #inverting input resistance R3(KOhm)\n",
+ "Rf=30.0 #feedback path resistance Rf (KOhm)\n",
+ "\n",
+ "Av=(Rf/R3)+1 #voltage gain \n",
+ "Q=(3-Av)**-1 #Q\n",
+ "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=fp #cutoff frequency(KHz) \n",
+ "\n",
+ "print ' Q = ',round(Q,2)\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Q = 0.71\n",
+ "pole frequency fp = 10.26 KHz\n",
+ "cutoff frequency fc = 10.26 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-7, Page 817"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=82 #non-inverting input resistance R1(KOhm)\n",
+ "R2=82 #non-inverting input resistance R2(KOhm)\n",
+ "C2=100*10**-12 #feedback path capacitance (F)\n",
+ "C1=100*10**-12 #non-inverting input capacitance (F)\n",
+ "R3=56 #inverting input resistance R3(KOhm)\n",
+ "Rf=15.0 #feedback path resistance Rf (KOhm)\n",
+ "kc=0.786 #constant for bessel response \n",
+ "\n",
+ "Av=(Rf/R3)+1 #voltage gain \n",
+ "Q=(3-Av)**-1 #Q\n",
+ "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=kc*fp #cutoff frequency(KHz) \n",
+ "\n",
+ "print 'Q = ',round(Q,2)\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 0.58\n",
+ "pole frequency fp = 19.41 KHz\n",
+ "cutoff frequency fc = 15.26 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-8, Page 818"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=56 #non-inverting input resistance R1(KOhm)\n",
+ "R2=56 #non-inverting input resistance R2(KOhm)\n",
+ "C2=220*10**-12 #feedback path capacitance (F)\n",
+ "C1=220*10**-12 #non-inverting input capacitance (F)\n",
+ "R3=20.0 #inverting input resistance R3(KOhm)\n",
+ "Rf=39.0 #feedback path resistance Rf (KOhm)\n",
+ "kc=1.414 #constant for bessel response \n",
+ "k0=1.0 #constant for bessel response\n",
+ "k3=1.55 #constant for bessel response\n",
+ "\n",
+ "Av=(Rf/R3)+1 #voltage gain \n",
+ "Q=(3-Av)**-1 #Q\n",
+ "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=kc*fp #cutoff frequency(KHz) \n",
+ "f0=k0*fp #resosnant frequency(KHz)\n",
+ "f3=k3*fp #3-dB frequency (KHz)\n",
+ "Av1=((1.01*Rf)/(0.99*R3))+1 #voltage gain considering 1% tolerance \n",
+ "Q1=(3-Av1)**-1 #Q\n",
+ "\n",
+ "print 'Q = ',Q\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n",
+ "print 'resonant frequency f0 = ',round(f0,2),'KHz'\n",
+ "print '3-dB frequency f(3-dB) = ',round(f3,2),'KHz'\n",
+ "print 'circuit produces 26-dB peak in response at 12.9 KHz, rolls off to 0 dB at cutoff and 3 dB down at 20 KHz'\n",
+ "print 'after considering tolerance in resistance, Q changed to',Q1,'approximately'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 20.0\n",
+ "pole frequency fp = 12.92 KHz\n",
+ "cutoff frequency fc = 18.27 KHz\n",
+ "resonant frequency f0 = 12.92 KHz\n",
+ "3-dB frequency f(3-dB) = 20.02 KHz\n",
+ "circuit produces 26-dB peak in response at 12.9 KHz, rolls off to 0 dB at cutoff and 3 dB down at 20 KHz\n",
+ "after considering tolerance in resistance, Q changed to 94.2857142857 approximately\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-9, Page 820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "R1=24 #non-inverting input resistance R1(KOhm)\n",
+ "R2=12 #feedback path resistance R2(KOhm)\n",
+ "C=4.7*10**-9 #non-inverting input capacitance (F)\n",
+ "\n",
+ "Q=0.5*((R1/R2)**0.5) #Q\n",
+ "fp=((2*math.pi*C*(R1*R2)**0.5)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=fp #cutoff frequency(KHz) \n",
+ "\n",
+ "print 'Q = ',round(Q,2)\n",
+ "print 'pole frequency fp = ',math.ceil(fp),'KHz'\n",
+ "print 'cutoff frequency fc = ',math.ceil(fc),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 0.71\n",
+ "pole frequency fp = 2.0 KHz\n",
+ "cutoff frequency fc = 2.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-10, Page 821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=30 #non-inverting input resistance R1(KOhm)\n",
+ "R2=30 #feedback path resistance R2(KOhm)\n",
+ "C=1*10**-9 #non-inverting input capacitance (F)\n",
+ "R3=10.0 #inverting input resistance R3(KOhm)\n",
+ "Rf=15.0 #feedback path resistance Rf (KOhm)\n",
+ "kc=1.32 #constant for bessel response \n",
+ "k0=0.94 #constant for bessel response\n",
+ "k3=1.48 #constant for bessel response\n",
+ "\n",
+ "Av=(Rf/R3)+1 #voltage gain \n",
+ "Q=(3-Av)**-1 #Q\n",
+ "fp=((2*math.pi*R1*C)**-1)/10**6 #pole frequency(KHz)\n",
+ "fc=fp/kc #cutoff frequency(KHz) \n",
+ "f0=fp/k0 #resosnant frequency(KHz)\n",
+ "f3=fp/k3 #3-dB frequency (KHz)\n",
+ "\n",
+ "print 'Q = ',Q\n",
+ "print 'pole frequency fp = ',round(fp,2),'KHz'\n",
+ "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n",
+ "print 'resonant frequency f0 = ',round(f0,2),'KHz'\n",
+ "print '3-dB frequency f(3-dB) = ',round(f3,2),'KHz'\n",
+ "print 'circuit produces 6.3-dB peak in response at 5.65 KHz, rolls off to 0 dB at cutoff at 4.02 KHz and 3 dB down at 3.59 KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 2.0\n",
+ "pole frequency fp = 5.31 KHz\n",
+ "cutoff frequency fc = 4.02 KHz\n",
+ "resonant frequency f0 = 5.64 KHz\n",
+ "3-dB frequency f(3-dB) = 3.58 KHz\n",
+ "circuit produces 6.3-dB peak in response at 5.65 KHz, rolls off to 0 dB at cutoff at 4.02 KHz and 3 dB down at 3.59 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-11, Page 825"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=18 #non-inverting input resistance R1(KOhm)\n",
+ "R2=30 #feedback path resistance R2(KOhm)\n",
+ "C=8.2*10**-9 #non-inverting input capacitance (F)\n",
+ "R31=0.080 #inverting max input resistance R3(KOhm)\n",
+ "R32=0.015 #inverting min input resistance R3(KOhm)\n",
+ "\n",
+ "BW=((2*math.pi*R1*C)**-1)/10**6 #bandwidth(KHz)\n",
+ "f0=((2*math.pi*C*((2*R1*((R1**-1+R31**-1)**-1))**0.5))**-1)/10**6 #minimum center frequency(KHz)\n",
+ "f01=((2*math.pi*C*((2*R1*((R1**-1+R32**-1)**-1))**0.5))**-1)/10**6 #minimum center frequency(KHz)\n",
+ "\n",
+ "print 'bandwidth BW = ',round(BW,2),'KHz'\n",
+ "print 'minimum center frequency f0 = ',round(f0,2),'KHz'\n",
+ "print 'maximum center frequency f0 = ',round(f01,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth BW = 1.08 KHz\n",
+ "minimum center frequency f0 = 11.46 KHz\n",
+ "maximum center frequency f0 = 26.42 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-12, Page 827"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R=22.0 #non-inverting input resistance(KOhm)\n",
+ "C=120*10**-9 #non-inverting input capacitance (F)\n",
+ "R1=13.0 #inverting input resistance(KOhm)\n",
+ "R2=10.0 #feedback path resistance(KOhm)\n",
+ "\n",
+ "Av=(R2/R1)+1 #voltage gain \n",
+ "Q=0.5/(2-Av) #Q\n",
+ "f0=((2*math.pi*R*C)**-1)/10**3 #center frequency(KHz)\n",
+ "\n",
+ "print 'voltage gain Av = ',round(Av,2)\n",
+ "print 'Q = ',round(Q,2)\n",
+ "print 'center frequency f0 = ',round(f0,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain Av = 1.77\n",
+ "Q = 2.17\n",
+ "center frequency f0 = 60.29 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21-13, Page 833"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "R=1.0 #non-inverting input resistance(KOhm)\n",
+ "C=100*10**-9 #non-inverting input capacitance (F)\n",
+ "f=1.0 #frequency given(KHz)\n",
+ "\n",
+ "f0=((2*math.pi*R*C)**-1)/10**6 #center frequency(KHz)\n",
+ "phi=(2*math.atan(f0/f))*180/math.pi #phase shift(deg)\n",
+ "\n",
+ "print 'center frequency f0 = ',round(f0,2),'KHz'\n",
+ "print 'phase shift = ',math.ceil(phi),'degrees'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "center frequency f0 = 1.59 KHz\n",
+ "phase shift = 116.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_22_New.ipynb b/Electronic_Principles/Chapter_22_New.ipynb
new file mode 100755
index 00000000..ebbb0124
--- /dev/null
+++ b/Electronic_Principles/Chapter_22_New.ipynb
@@ -0,0 +1,369 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 22 NONLINEAR OP-AMP CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-4, Page 854"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "Vin=10 #ac input(V)\n",
+ "Vs=15 #non-inverting input voltage(V)\n",
+ "R1=200.0*10**3 #non-inverting input resistance R1(Ohm)\n",
+ "R2=100.0*10**3 #non-inverting input resistance R2(Ohm)\n",
+ "C=10*10**-6 #capacitance at non-inverting input(F)\n",
+ "\n",
+ "Vref=Vs/3 #reference voltage at trip point(V)\n",
+ "fc=(2*math.pi*((R1**-1+R2**-1)**-1)*C)**-1 #cutoff frequency(Hz)\n",
+ "\n",
+ "print 'trip point voltage Vref = ',Vref,'V'\n",
+ "print 'cutoff frequency of bypass circuit fc = ',round(fc,2),'Hz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "trip point voltage Vref = 5 V\n",
+ "cutoff frequency of bypass circuit fc = 0.24 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-5, Page 855"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Vp=10.0 #sine peak(V)\n",
+ "Vin=5.0 #input voltage(V) \n",
+ "\n",
+ "theta=math.ceil((math.asin(Vin/Vp))*180/math.pi) #angle theta (deg)\n",
+ "D=(150-theta)/360.0 #duty cycle\n",
+ "\n",
+ "print 'theta = ',theta,'degrees'\n",
+ "print 'duty cycle D = ',round((D*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "theta = 31.0 degrees\n",
+ "duty cycle D = 33.06 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-6, Page 860"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1.0 #non-inverting input resistance R1(KOhm)\n",
+ "R2=47.0 #feedback path resistance R2(KOhm)\n",
+ "Vsat=13.5 #saturation voltage(V)\n",
+ "\n",
+ "B=R1/(R1+R2) #feedback fraction\n",
+ "UTP=B*Vsat #upper trip point\n",
+ "LTP=-B*Vsat #lower trip point\n",
+ "H=UTP-LTP #hysteresis\n",
+ "\n",
+ "print 'lower trip point LTP = ',round(LTP,2),'V'\n",
+ "print 'upper trip point LTP = ',round(UTP,2),'V'\n",
+ "print 'hysteresis is ',round(H,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower trip point LTP = -0.28 V\n",
+ "upper trip point LTP = 0.28 V\n",
+ "hysteresis is 0.56 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-7, Page 865"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R=2 #inverting input resistance R1(KOhm)\n",
+ "C=1*10**-6 #feedback path capacitance (F)\n",
+ "T=1*10**-3 #time period(s)\n",
+ "Vin=8 #input pulse voltage(V)\n",
+ "AVOL=100000 #open loop voltage gain\n",
+ "\n",
+ "V=Vin*T/(R*C)/1000 #output voltage(V)\n",
+ "t=R*C*(AVOL+1)*1000 #time constant(s)\n",
+ "\n",
+ "print 'Magnitude of negative output voltage at end of the pulse = ',V,'V'\n",
+ "print 'closed loop time constant = ',t,'s'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of negative output voltage at end of the pulse = 4.0 V\n",
+ "closed loop time constant = 200.002 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-8, Page 868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1*10**3 #inverting input resistance R1(Ohm)\n",
+ "R2=10*10**3 #feedback path resistance R2(Ohm)\n",
+ "C=10*10**-6 #feedback path capacitance (F)\n",
+ "Vin=5 #input pulse voltage(V)\n",
+ "f=1*10**3 #input frequency(Hz)\n",
+ "\n",
+ "Vout=Vin/(2*f*R1*C) #output voltage(V)\n",
+ "\n",
+ "print 'peak to peak output voltage = ',Vout,'Vpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak to peak output voltage = 0.25 Vpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-9, Page 868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vs=15.0 #non-inverting input voltage(V)\n",
+ "Rw=5.0*10**3 #inverting input wiper resistance(Ohm)\n",
+ "R1=10.0*10**3 #inverting input resistance R1(Ohm)\n",
+ "f=1.0 #input frequency(KHz) \n",
+ "\n",
+ "Vref=Vs*(Rw/(Rw+R1)) #reference voltage(V)\n",
+ "T=1/f #period of signal(s)\n",
+ "W=2*(T/2)*((Vs/2)-Vref)/Vs #output pulse width\n",
+ "D=W/T #duty cycle\n",
+ "\n",
+ "print 'duty cycle D = ',round((D*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "duty cycle D = 16.67 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-10, Page 871"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "R1=18.0 #non-inverting input resistance R1(KOhm)\n",
+ "R2=2.0 #feedback path resistance R2(KOhm)\n",
+ "R=1.0 #feedback path resistance R(KOhm)\n",
+ "C=0.1*10**-6 #feedback path capacitance (F)\n",
+ "\n",
+ "B=R1/(R1+R2) #feedback fraction\n",
+ "T=10**9*2*R*C*math.log((1+B)/(1-B)) #period of output(us)\n",
+ "f=1000*1/T #frequency(KHz)\n",
+ "\n",
+ "print 'period T = ',round(T,2),'us'\n",
+ "print 'frequency f = ',round(f,2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "period T = 588.89 us\n",
+ "frequency f = 1.7 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-11, Page 871"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vsat=13.5 #saturation voltage given(V)\n",
+ "R4=10*10**3 #given resistance R4(Ohm)\n",
+ "C2=10*10**-6 #given capacitance C2(F)\n",
+ "T=589*10**-6 #period from preceding example(s)\n",
+ "\n",
+ "Vout=Vsat*T/(2*R4*C2) #output voltage (V) \n",
+ "\n",
+ "print 'Output voltage = ',round((Vout*1000),2),'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 39.76 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22-12, Page 873"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1*10**3 #resistance R1(Ohm)\n",
+ "R2=100*10**3 #resistance R2(Ohm)\n",
+ "R3=10*10**3 #resistance R3(Ohm)\n",
+ "C=10*10**-6 #capacitance (F)\n",
+ "\n",
+ "UTP=Vsat*R1/R2 #UTP value (V)\n",
+ "Vout=2*UTP #output voltage/hysteresis (V)\n",
+ "f=R2/(4*R1*R3*C) #frequency(Hz)\n",
+ "\n",
+ "print 'Vout = H = ',Vout,'V'\n",
+ "print 'frequency f = ',f,'Hz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vout = H = 0.27 V\n",
+ "frequency f = 250.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_23_New.ipynb b/Electronic_Principles/Chapter_23_New.ipynb
new file mode 100755
index 00000000..a842cb81
--- /dev/null
+++ b/Electronic_Principles/Chapter_23_New.ipynb
@@ -0,0 +1,618 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 23 OSCILLATORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-1, Page 897 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "R1=100.0*10**3 #non-inverting input resistance wiper R1(Ohm)\n",
+ "R2=1.0*10**3 #non-inverting input resistance R2(Ohm)\n",
+ "C=0.01*10**-6 #capacitance at non-inverting input(F)\n",
+ "\n",
+ "R=R1+R2 #max. total resistance(Ohm)\n",
+ "fr1=(2*math.pi*R*C)**-1 #minimum frequency(Hz)\n",
+ "R=R2 #min. total resistance(Ohm)\n",
+ "fr2=(2*math.pi*R*C)**-1 #maximum frequency(Hz)\n",
+ "\n",
+ "print 'minimum frequency fr = ',round(fr1,2),'Hz'\n",
+ "print 'maximum frequency fr = ',round((fr2/1000),2),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum frequency fr = 157.58 Hz\n",
+ "maximum frequency fr = 15.92 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-2, Page 897"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rf=2 #feedback resistance(KOhm)\n",
+ "Rl=1 #lamp resistance(KOhm)\n",
+ "Vl=2 #lamp voltage(V)\n",
+ "\n",
+ "Il=Vl/Rl #lamp current(mA)\n",
+ "Vout=Il*(Rf+Rl) #output voltage of oscillator(V)\n",
+ "\n",
+ "print 'Lamp current = ',Il,'mA'\n",
+ "print 'output voltage of oscillator = ',Vout,'Vrms'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lamp current = 2 mA\n",
+ "output voltage of oscillator = 6 Vrms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-3, Page 904"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "C1=0.001*10**-6 #capacitance in oscillator(F)\n",
+ "C2=0.01*10**-6 #capacitance in oscillator(F)\n",
+ "L=15*10**-6 #inductance(H)\n",
+ "\n",
+ "C=C1*C2/(C1+C2) #equivalent capacitance(F)\n",
+ "fr=(2*math.pi*((L*C)**0.5))**-1 #oscillation frequency(Hz)\n",
+ "B=C1/C2 #feedback fraction\n",
+ "Av_min=C2/C1 #minimum voltage gain\n",
+ "\n",
+ "print 'feedback fraction B = ',B\n",
+ "print 'oscillation frequency fr = ',round((fr*10**-6),2),'MHz'\n",
+ "print 'minimum voltage gain Av(min) = ',Av_min"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback fraction B = 0.1\n",
+ "oscillation frequency fr = 1.36 MHz\n",
+ "minimum voltage gain Av(min) = 10.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-4, Page 908"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "C1=0.001*10**-6 #capacitance in oscillator(F)\n",
+ "C2=0.01*10**-6 #capacitance in oscillator(F)\n",
+ "C3=50.0*10**-12 #capacitance in oscillator(F)\n",
+ "L=15*10**-6 #inductance(H)\n",
+ "\n",
+ "C=(C1**-1+C2**-1+C3**-1)**-1 #equivalent capacitance(F)\n",
+ "fr=(2*math.pi*((L*C)**0.5))**-1 #oscillation frequency(Hz)\n",
+ "\n",
+ "print 'oscillation frequency fr = ',round((fr*10**-6),2),'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "oscillation frequency fr = 5.97 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-5, Page 912"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Cs=0.05*10**-12 #series capacitance in oscillator(F)\n",
+ "Cm=10.0*10**-12 #capacitance in oscillator(F)\n",
+ "R=2.0*10**3 #resistance in oscillator(Ohm)\n",
+ "L=3 #inductance(H)\n",
+ "\n",
+ "fs=(2*math.pi*((L*Cs)**0.5))**-1 #series resonant frequency(Hz)\n",
+ "Cp=Cs*Cm/(Cs+Cm) #equvalent parallel capacitance(F)\n",
+ "fp=(2*math.pi*((L*Cp)**0.5))**-1 #parallel resonant frequency(Hz)\n",
+ "\n",
+ "print 'series resonant frequency fs = ',math.ceil(fs*10**-3),'KHz'\n",
+ "print 'parallel resonant frequency fp = ',math.ceil(fp*10**-3),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series resonant frequency fs = 411.0 KHz\n",
+ "parallel resonant frequency fp = 412.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-6, Page 918"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #given supply voltage(V)\n",
+ "R=33*10**3 #given resistance(Ohm)\n",
+ "C=0.47*10**-6 #given capacitance(F)\n",
+ "\n",
+ "LTP=VCC/3 #trip point LTP (V)\n",
+ "UTP=2*LTP #trip point UTP (V)\n",
+ "W=1.1*R*C #pulse width of output(s)\n",
+ "\n",
+ "print 'trigger voltage LTP = ',LTP,'V'\n",
+ "print 'trigger voltage UTP = ',UTP,'V'\n",
+ "print 'pulse width W = ',W*10**3,'ms'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "trigger voltage LTP = 4.0 V\n",
+ "trigger voltage UTP = 8.0 V\n",
+ "pulse width W = 17.061 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-7, Page 919"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R=10*10**6 #given resistance(Ohm)\n",
+ "C=470*10**-6 #given capacitance(F)\n",
+ "\n",
+ "W=1.1*R*C #pulse width of output(s)\n",
+ "\n",
+ "print 'pulse width W = ',W,'s = ',round((W/3600),2),'hours'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pulse width W = 5170.0 s = 1.44 hours\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-8, Page 922"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=75.0*10**3 #given resistance1(Ohm)\n",
+ "R2=30.0*10**3 #given resistance2(Ohm)\n",
+ "C=47.0*10**-9 #given capacitance(F)\n",
+ "\n",
+ "f=1.44/((R1+(2*R2))*C) #frequency (Hz)\n",
+ "D=(R1+R2)/(R1+(2*R2)) #duty cycle \n",
+ "\n",
+ "print 'frequency f = ',round(f,2),'Hz' \n",
+ "print 'duty cycle D = ',round((D*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency f = 226.95 Hz\n",
+ "duty cycle D = 77.78 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-9, Page 923"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "VCC=12.0 #given supply voltage(V)\n",
+ "R1=75.0*10**3 #given resistance1(Ohm)\n",
+ "R2=30.0*10**3 #given resistance2(Ohm)\n",
+ "C=47.0*10**-9 #given capacitance(F)\n",
+ "Vcon1=11 #given Vcon(V) \n",
+ "Vcon2=1 #given Vcon(V) \n",
+ "\n",
+ "W1=-(R1+R2)*C*(math.log((VCC-Vcon1)/(VCC-(0.5*Vcon1)))) #pulse width(s)\n",
+ "T1=W1+(0.693*R2*C) #period(s)\n",
+ "D1=W1/T1 #duty cycle\n",
+ "f1=1/T1 #frequency(Hz)\n",
+ "W2=-(R1+R2)*C*(math.log((VCC-Vcon2)/(VCC-(0.5*Vcon2)))) #pulse width(s)\n",
+ "T2=W2+(0.693*R2*C) #period(s)\n",
+ "D2=W2/T2 #duty cycle\n",
+ "f2=1/T2 #frequency(Hz)\n",
+ "\n",
+ "print 'For Vcon = 11V,'\n",
+ "print 'frequency f = ',round(f1,2),'Hz'\n",
+ "print 'duty cycle D = ',round((D1*100),2),'%'\n",
+ "print 'For Vcon = 1V,'\n",
+ "print 'frequency f = ',round(f2,2),'Hz'\n",
+ "print 'duty cycle D = ',round((D2*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For Vcon = 11V,\n",
+ "frequency f = 97.9 Hz\n",
+ "duty cycle D = 90.43 %\n",
+ "For Vcon = 1V,\n",
+ "frequency f = 835.77 Hz\n",
+ "duty cycle D = 18.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-10, Page 927"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #given supply voltage(V)\n",
+ "R=9.1*10**3 #given resistance(Ohm)\n",
+ "C=0.01*10**-6 #given capacitance(F)\n",
+ "f=2.5*10**3 #given frequency(Hz)\n",
+ "Vmod=2 #peak value of modulating signal(V) \n",
+ "\n",
+ "T=1/f #period of output pulse(s)\n",
+ "W=1.1*R*C #pulse width(s)\n",
+ "UTP_max=(2*VCC/3)+Vmod #maximum UTP(V)\n",
+ "UTP_min=(2*VCC/3)-Vmod #minimum UTP(V)\n",
+ "Wmin=-R*C*(math.log(1-(UTP_min/VCC))) #minimum pulse width(s)\n",
+ "Wmax=-R*C*(math.log(1-(UTP_max/VCC))) #maximum pulse width(s)\n",
+ "Dmin=Wmin/T #minimum duty cycle\n",
+ "Dmax=Wmax/T #maximum duty cycle\n",
+ "\n",
+ "print 'period of output pulse T = ',T*10**6,'us'\n",
+ "print 'Quiscent pulse width W = ',W*10**6,'us'\n",
+ "print 'minimum UTP = ',UTP_min,'V'\n",
+ "print 'maximum UTP = ',UTP_max,'V'\n",
+ "print 'minimum pulse width W(min) = ',round((Wmin*10**6),2),'us'\n",
+ "print 'maximum pulse width W(max) = ',round((Wmax*10**6),2),'us'\n",
+ "print 'minimum duty cycle D(min) = ',round((Dmin*100),2),'%'\n",
+ "print 'maximum duty cycle D(max) = ',round((Dmax*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "period of output pulse T = 400.0 us\n",
+ "Quiscent pulse width W = 100.1 us\n",
+ "minimum UTP = 6.0 V\n",
+ "maximum UTP = 10.0 V\n",
+ "minimum pulse width W(min) = 63.08 us\n",
+ "maximum pulse width W(max) = 163.05 us\n",
+ "minimum duty cycle D(min) = 15.77 %\n",
+ "maximum duty cycle D(max) = 40.76 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 23-11, Page 928"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=12.0 #given supply voltage(V)\n",
+ "R1=3.9*10**3 #given resistance(Ohm)\n",
+ "R2=3*10**3 #given resistance(Ohm)\n",
+ "C=0.01*10**-6 #given capacitance(F)\n",
+ "Vmod=1.5 #peak value of modulating signal(V) \n",
+ "\n",
+ "W=0.693*(R1+R2)*C #pulse width(s)\n",
+ "T=0.693*(R1+(2*R2))*C #period of output pulse(s)\n",
+ "UTP_max=(2*VCC/3)+Vmod #maximum UTP(V)\n",
+ "UTP_min=(2*VCC/3)-Vmod #minimum UTP(V)\n",
+ "Wmin=-(R1+R2)*C*(math.log((VCC-UTP_min)/(VCC-(0.5*UTP_min)))) #minimum pulse width(s)\n",
+ "Wmax=-(R1+R2)*C*(math.log((VCC-UTP_max)/(VCC-(0.5*UTP_max)))) #minimum pulse width(s)\n",
+ "Tmin=Wmin+(0.693*R2*C) #minimum period(s)\n",
+ "Tmax=Wmax+(0.693*R2*C) #maximum period(s)\n",
+ "s=0.693*R2*C #space(s)\n",
+ "\n",
+ "print 'period of output pulse T = ',T*10**6,'us'\n",
+ "print 'Quiscent pulse width W = ',W*10**6,'us'\n",
+ "print 'minimum UTP = ',UTP_min,'V'\n",
+ "print 'maximum UTP = ',UTP_max,'V'\n",
+ "print 'minimum pulse width W(min) = ',round((Wmin*10**6),2),'us'\n",
+ "print 'maximum pulse width W(max) = ',round((Wmax*10**6),2),'us'\n",
+ "print 'minimum period T(min) = ',round((Tmin*10**6),2),'us'\n",
+ "print 'maximum period T(max) = ',round((Tmax*10**6),2),'us'\n",
+ "print 'space = ',round((s*10**6),2),'us'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "period of output pulse T = 68.607 us\n",
+ "Quiscent pulse width W = 47.817 us\n",
+ "minimum UTP = 6.5 V\n",
+ "maximum UTP = 9.5 V\n",
+ "minimum pulse width W(min) = 32.04 us\n",
+ "maximum pulse width W(max) = 73.47 us\n",
+ "minimum period T(min) = 52.83 us\n",
+ "maximum period T(max) = 94.26 us\n",
+ "space = 20.79 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-12, Page 929"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #given supply voltage(V)\n",
+ "C=100*10**-9 #given capacitance(F)\n",
+ "Ic=1*10**-3 #collector current (A)\n",
+ "\n",
+ "S=Ic/C #slope(V/s) \n",
+ "V=2*VCC/3 #peak value(V)\n",
+ "T=V/S #duration of ramp(s) \n",
+ "\n",
+ "print 'slope is ',S/1000,'V/ms'\n",
+ "print 'Peak value V = ',V,'V'\n",
+ "print 'duration of ramp = ',T*10**3,'ms'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "slope is 10.0 V/ms\n",
+ "Peak value V = 10.0 V\n",
+ "duration of ramp = 1.0 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-13, Page 938"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R=10*10**3 #given resistance(Ohm)\n",
+ "C=0.01*10**-6 #given capacitance(F)\n",
+ "\n",
+ "f0=(R*C)**-1 #output frequency(Hz)\n",
+ "\n",
+ "print 'output frequency f0 = ',f0/1000,'KHz' "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output frequency f0 = 10.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23-14, Page 938"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1.0*10**3 #given resistance(Ohm)\n",
+ "R2=2.0*10**3 #given resistance(Ohm)\n",
+ "C=0.1*10**-6 #given capacitance(F)\n",
+ "\n",
+ "f=(2/C)*((R1+R2)**-1) #output frequency(Hz)\n",
+ "D=R1/(R1+R2) #duty cycle\n",
+ "\n",
+ "print 'output frequency f = ',round((f/1000),2),'KHz' \n",
+ "print 'duty cycle = ',round((D*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output frequency f = 6.67 KHz\n",
+ "duty cycle = 33.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_24_New.ipynb b/Electronic_Principles/Chapter_24_New.ipynb
new file mode 100755
index 00000000..ab177723
--- /dev/null
+++ b/Electronic_Principles/Chapter_24_New.ipynb
@@ -0,0 +1,706 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 24 REGULATED POWER SUPPLIES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-1, Page 954 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rs=10 #given source resistance Rs(Ohm)\n",
+ "RL=40 #given load resistance RL(Ohm)\n",
+ "Vin=15 #input voltage(V)\n",
+ "VBE=0.8 #base-emitter voltage drop(V) \n",
+ "Vz=9.1 #voltage across diode(V)\n",
+ "\n",
+ "Vout=Vz+VBE #output voltage(V) \n",
+ "Is=1000*(Vin-Vout)/Rs #input current(mA) \n",
+ "IL=1000*Vout/RL #load current(mA)\n",
+ "IC=Is-IL #collector current(mA)\n",
+ "\n",
+ "print 'Output voltage Vout = ',Vout,'V'\n",
+ "print 'input current Is = ',Is,'mA'\n",
+ "print 'load current IL = ',IL,'mA'\n",
+ "print 'collector current IC = ',IC,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 9.9 V\n",
+ "input current Is = 510.0 mA\n",
+ "load current IL = 247.5 mA\n",
+ "collector current IC = 262.5 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-2, Page 954"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rs=10 #given source resistance Rs(Ohm)\n",
+ "RL=40 #given load resistance RL(Ohm)\n",
+ "Vin=15 #input voltage(V)\n",
+ "VBE=0.81 #base-emitter voltage drop(V) \n",
+ "Vz=6.2 #voltage across diode(V)\n",
+ "R1=750 #base input resistance(Ohm)\n",
+ "R2=250 #base input resistance(Ohm)\n",
+ "\n",
+ "Vout=(Vz+VBE)*(R1+R2)/R1 #output voltage(V) \n",
+ "Is=1000*(Vin-Vout)/Rs #input current(mA) \n",
+ "IL=1000*Vout/RL #load current(mA)\n",
+ "IC=Is-IL #collector current(mA)\n",
+ "\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'V'\n",
+ "print 'input current Is = ',round(Is,2),'mA'\n",
+ "print 'load current IL = ',round(IL,2),'mA'\n",
+ "print 'collector current IC = ',round(IC,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 9.35 V\n",
+ "input current Is = 565.33 mA\n",
+ "load current IL = 233.67 mA\n",
+ "collector current IC = 331.67 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-3, Page 954"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vout=9.35 #output voltage(V)\n",
+ "IL=234 #load current(mA)\n",
+ "Is=565 #input current(mA)\n",
+ "Vin=15.0 #input voltage(V)\n",
+ "\n",
+ "Pout=Vout*IL/1000 #output power(W)\n",
+ "Pin=Vin*Is/1000 #input power(W)\n",
+ "eff=Pout/Pin #efficiency\n",
+ "preg=Pin-Pout #power dissipated by regulator(W)\n",
+ "\n",
+ "print 'input power Pin = ',Pin,'W'\n",
+ "print 'Output power Pout = ',round(Pout,2),'W'\n",
+ "print 'Effifciency = ',round((eff*100),2),'%'\n",
+ "print'power dissipated by regulator = ',round(preg,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input power Pin = 8.475 W\n",
+ "Output power Pout = 2.19 W\n",
+ "Effifciency = 25.82 %\n",
+ "power dissipated by regulator = 6.29 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-4, Page 955"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rs=10 #given source resistance Rs(Ohm)\n",
+ "RL=40 #given load resistance RL(Ohm)\n",
+ "Vin=15 #input voltage(V)\n",
+ "Vz=6.8 #voltage across diode(V)\n",
+ "R1=7.5*10**3 #base input resistance(Ohm)\n",
+ "R2=2.5*10**3 #base input resistance(Ohm)\n",
+ "\n",
+ "Vout=Vz*(R1+R2)/R1 #output voltage(V) \n",
+ "Is=1000*(Vin-Vout)/Rs #input current(mA) \n",
+ "IL=1000*Vout/RL #load current(mA)\n",
+ "IC=Is-IL #collector current(mA)\n",
+ "\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'V'\n",
+ "print 'input current Is = ',round(Is,2),'mA'\n",
+ "print 'load current IL = ',round(IL,2),'mA'\n",
+ "print 'collector current IC = ',round(IC,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 9.07 V\n",
+ "input current Is = 593.33 mA\n",
+ "load current IL = 226.67 mA\n",
+ "collector current IC = 366.67 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-5, Page 956"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Is1=510 #input current in ex. 24-1 (mA)\n",
+ "Is2=565 #input current in ex. 24-2 (mA)\n",
+ "Is4=593 #input current in ex. 24-4 (mA)\n",
+ "\n",
+ "Imax1=Is1 #maximum load current (mA) \n",
+ "Imax2=Is2 #maximum load current (mA) \n",
+ "Imax4=Is4 #maximum load current (mA) \n",
+ "\n",
+ "print 'maximum load current Imax1 = ',Imax1,'mA'\n",
+ "print 'maximum load current Imax2 = ',Imax2,'mA'\n",
+ "print 'maximum load current Imax4 = ',Imax4,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum load current Imax1 = 510 mA\n",
+ "maximum load current Imax2 = 565 mA\n",
+ "maximum load current Imax4 = 593 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-6, Page 956"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VNL=9.91 #given VNL(V)\n",
+ "VFL=9.81 #given VFL(V)\n",
+ "VHL=9.94 #given VHL(V) \n",
+ "VLL=9.79 #given VLL(V)\n",
+ "\n",
+ "LoR=(VNL-VFL)*100/VFL #Load regulation(%)\n",
+ "LiR=(VHL-VLL)*100/VLL #Line regulation(%)\n",
+ "\n",
+ "print 'Load regulation = ',round(LoR,2),'%'\n",
+ "print 'Line regulation = ',round(LiR,2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load regulation = 1.02 %\n",
+ "Line regulation = 1.53 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-7, Page 962"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RL=40.0 #given load resistance RL(Ohm)\n",
+ "VBE=0.7 #base-emitter voltage drop(V) \n",
+ "Vz=6.2 #voltage across diode(V)\n",
+ "R1=3.0 #base input resistance(KOhm)\n",
+ "R2=1.0 #base input resistance(KOhm)\n",
+ "Vin=15 #input voltage(V)\n",
+ "\n",
+ "Vout=(Vz+VBE)*(R1+R2)/R1 #output voltage(V)\n",
+ "IC=Vout/RL #transistor current(A)\n",
+ "PD=(Vin-Vout)*IC #power dissipation(W)\n",
+ "\n",
+ "print 'Output voltage Vout = ',Vout,'V'\n",
+ "print 'transistor current = load current = IC = ',IC*1000,'mA'\n",
+ "print 'Power dissipation PD = ',PD,'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 9.2 V\n",
+ "transistor current = load current = IC = "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "230.0 mA\n",
+ "Power dissipation PD = 1.334 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-8, Page 963"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vout=9.2 #output voltage(V)\n",
+ "IL=230 #load current(mA)\n",
+ "Vin=15.0 #input voltage(V)\n",
+ "\n",
+ "Pout=Vout*IL/1000 #output power(W)\n",
+ "Pin=Vin*IL/1000 #input power(W)\n",
+ "eff1=Pout/Pin #efficiency\n",
+ "eff2=Vout/Vin #efficiency\n",
+ "\n",
+ "print 'input power Pin = ',Pin,'W'\n",
+ "print 'Output power Pout = ',Pout,'W'\n",
+ "print 'Effifciency 1= ',round((eff1*100),2),'%'\n",
+ "print 'Effifciency 2= ',round((eff2*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input power Pin = 3.45 W\n",
+ "Output power Pout = 2.116 W\n",
+ "Effifciency 1= 61.33 %\n",
+ "Effifciency 2= 61.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-9, Page 963"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RL=4.0 #given load resistance RL(Ohm)\n",
+ "Vz=5.6 #voltage across diode(V)\n",
+ "R1=2.7 #base input resistance(KOhm)\n",
+ "R2=2.2 #base input resistance(KOhm)\n",
+ "Vin=15 #input voltage(V)\n",
+ "B=100 #current gain\n",
+ "\n",
+ "Vout=Vz*(R1+R2)/R1 #output voltage(V)\n",
+ "IL=Vout/RL #load current(A)\n",
+ "IB=IL/B #base current(A)\n",
+ "\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'V'\n",
+ "print 'Load current IL = ',round(IL,2),'A'\n",
+ "print 'base current IB = ',round((IB*1000),2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 10.16 V\n",
+ "Load current IL = 2.54 A\n",
+ "base current IB = 25.41 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-10, Page 964"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VNL=10.16 #given VNL(V)\n",
+ "VFL=10.15 #given VFL(V)\n",
+ "VHL=10.16 #given VHL(V) \n",
+ "VLL=10.07 #given VLL(V)\n",
+ "\n",
+ "LoR=(VNL-VFL)*100/VFL #Load regulation(%)\n",
+ "LiR=(VHL-VLL)*100/VLL #Line regulation(%)\n",
+ "\n",
+ "print 'Load regulation = ',round(LoR,3),'%'\n",
+ "print 'Line regulation = ',round(LiR,2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load regulation = 0.099 %\n",
+ "Line regulation = 0.89 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-11, Page 965"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "RL=3.0 #given load resistance RL(Ohm)\n",
+ "Vz=4.7 #voltage across diode(V)\n",
+ "R11=1750 #base input resistance with max. potentiometer(Ohm)\n",
+ "R12=750 #base input resistance with min. potentiometer(Ohm)\n",
+ "R2=750 #base input resistance(Ohm)\n",
+ "Vin=22.5 #max. input voltage(V)\n",
+ "B=100 #current gain\n",
+ "Rs=820 #input side resistance(Ohm)\n",
+ "Vcl=0.6 #voltage across current limiting resistor(V)\n",
+ "Vcs=0.7 #voltage across current sensing resistor(V)\n",
+ "Vo=12.5 #regulated voltage given(V)\n",
+ "\n",
+ "Iz=(Vin-Vz)/Rs #max. zener current(A)\n",
+ "Vout1=Vz*(R11+R2)/R11 #min. regulated output voltage(V)\n",
+ "Vout2=Vz*(R12+R2)/R12 #max. regulated output voltage(V)\n",
+ "IL=Vcl/RL #load current(A)\n",
+ "RL1=Vo/IL #load resistance(Ohm)\n",
+ "ISL=Vcs/RL #shorted-load current(A)\n",
+ "\n",
+ "print 'maximum zener current Iz = ',round((Iz*1000),2),'mA'\n",
+ "print 'Load current IL = ',IL*1000,'mA'\n",
+ "print 'load resistance RL = ',RL1,'Ohm'\n",
+ "print 'shorted-load current ISL = ',round((ISL*1000),2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum zener current Iz = 21.71 mA\n",
+ "Load current IL = 200.0 mA\n",
+ "load resistance RL = 62.5 Ohm\n",
+ "shorted-load current ISL = 233.33 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-12, Page 971"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vout=12.0 #regulated output voltage(V)\n",
+ "RL=100.0 #given load resistance RL(Ohm)\n",
+ "\n",
+ "C=1000*10**-6 #given capacitance(F)\n",
+ "f=120 #frequency(Hz)\n",
+ "RR_dB=72.0 #ripple rejection(dB)\n",
+ "\n",
+ "IL=Vout/RL #load current(A)\n",
+ "VRi=IL/(f*C) #peak to peak input ripple (V)\n",
+ "RR=10**(RR_dB/20) #ripple rejection\n",
+ "VRo=VRi/RR #peak to peak output ripple (V)\n",
+ "\n",
+ "print 'Load current IL = ',IL*1000,'mA'\n",
+ "print 'peak to peak input ripple = ',VRi,'V'\n",
+ "print 'peak to peak output ripple = ',round((VRo*1000),2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current IL = 120.0 mA\n",
+ "peak to peak input ripple = 1.0 V\n",
+ "peak to peak output ripple = 0.25 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-13, Page 972"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=2.0 #given resistance(KOhm)\n",
+ "R2=22.0 #given resistance(KOhm)\n",
+ "R21=46.0 #given resistance increased(KOhm)\n",
+ "\n",
+ "Vout1=1.25*(R1+R2)/R1 #output voltage(V)\n",
+ "Vout2=1.25*(R1+R21)/R1 #output voltage with increased R2(V)\n",
+ "\n",
+ "print 'Output voltage Vout1 = ',Vout1,'V'\n",
+ "print 'output voltage with increased R2, Vout2 = ',Vout2,'V' "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout1 = 15.0 V\n",
+ "output voltage with increased R2, Vout2 = 30.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-14, Page 972"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vout=5.0 #output voltage(V)\n",
+ "Vin_min=7.5 #min. input voltage(V)\n",
+ "Vin_max=20.0 #max. input voltage(V)\n",
+ "\n",
+ "eff_max=Vout/Vin_min #maximum efficiency\n",
+ "eff_min=Vout/Vin_max #minimum efficiency\n",
+ "\n",
+ "print 'Minimum Effifciency = ',eff_min*100,'%'\n",
+ "print 'Maximum Effifciency = ',round((eff_max*100),2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum Effifciency = 25.0 %\n",
+ "Maximum Effifciency = 66.67 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-15, Page 984"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=2.21 #given resistance(KOhm)\n",
+ "R2=2.8 #given resistance(KOhm)\n",
+ "R21=46.0 #given resistance increased(KOhm)\n",
+ "VREF=2.21 #Reference voltage(V)\n",
+ "\n",
+ "Vout=VREF*(R1+R2)/R1 #output voltage(V)\n",
+ "\n",
+ "print 'Output voltage Vout = ',Vout,'V'\n",
+ "print 'Input voltage should be 2V greater than output voltage So, Vin = 7 V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 5.01 V\n",
+ "Input voltage should be 2V greater than output voltage So, Vin = 7 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24-16, Page 984"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "R1=1 #given resistance(KOhm)\n",
+ "R2=5.79 #given resistance(KOhm)\n",
+ "VREF=2.21 #Reference voltage(V)\n",
+ "\n",
+ "Vout=VREF*(R1+R2)/R1 #output voltage(V)\n",
+ "\n",
+ "print 'Output voltage Vout = ',round(Vout,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage Vout = 15.01 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_2_New.ipynb b/Electronic_Principles/Chapter_2_New.ipynb
new file mode 100755
index 00000000..4404a233
--- /dev/null
+++ b/Electronic_Principles/Chapter_2_New.ipynb
@@ -0,0 +1,160 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 2 SEMICONDUCTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2-5, Page 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Tj=100 #junction temperature 1(C)\n",
+ "Vb=0.7 #Barrier potential(V)\n",
+ "Tamb=25 #Ambient temperature(C)\n",
+ "T1=0 #junction temperature 2(C)\n",
+ "\n",
+ "Vd=-0.002*(Tj-Tamb) #Change in barrier potential(V)\n",
+ "Vbn=Vb+Vd #Barrier potential(V)\n",
+ "Vd1=-0.002*(T1-Tamb) #Change in barrier potential(V)\n",
+ "Vb1n=Vb+Vd1 #Barrier potential(V)\n",
+ "\n",
+ "print 'Change in barrier potential = Vd =',Vd,'V'\n",
+ "print 'Brrier potential = Vbn =',Vbn,'V'\n",
+ "print 'For junction temperature 0 C'\n",
+ "print 'Change in barrier potential = Vd1 =',Vd1,'V'\n",
+ "print 'New barrier potential = Vb1n =',Vb1n,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in barrier potential = Vd = -0.15 V\n",
+ "Brrier potential = Vbn = 0.55 V\n",
+ "For junction temperature 0 C\n",
+ "Change in barrier potential = Vd1 = 0.05 V\n",
+ "New barrier potential = Vb1n = 0.75 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2-6, Page 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "T2=100 #Temperature(C)\n",
+ "T1=25 #Temperature(C)\n",
+ "Isat1=5 #Current(nA)\n",
+ "\n",
+ "Td=T2-T1 #Temperature change(C)\n",
+ "Is1=(2**7)*Isat1 #Current(nA)\n",
+ "Is2=(1.07**5)*Is1 #Current(nA)\n",
+ "\n",
+ "print 'Change in temperature = Td = T2-T1 =',Td,'C'\n",
+ "print 'For first 70 C change seven doublings are there.'\n",
+ "print 'Is1 = (2^7)*Isat1 =',Is1,'nA'\n",
+ "print 'For additional 5 C, 7% per C'\n",
+ "print 'Is2 = ',round(Is2,2),'nA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in temperature = Td = T2-T1 = 75 C\n",
+ "For first 70 C change seven doublings are there.\n",
+ "Is1 = (2^7)*Isat1 = 640 nA\n",
+ "For additional 5 C, 7% per C\n",
+ "Is2 = 897.63 nA\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2-7, Page 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Isl=2*(10**-9) #surface leakage current(nA)\n",
+ "Vr=25 #Reverse voltage(V)\n",
+ "Vr1=35 #Reverse voltage(V)\n",
+ "\n",
+ "Rsl=Vr/Isl #surface leakage reistance(Ohm)\n",
+ "Isl1=(Vr1/Rsl)*(10**9) #surface leakage current(nA)\n",
+ "\n",
+ "print 'surface-leakage reistance Rsl = Vr/Isl =',Rsl*10**-6,'MOhm'\n",
+ "print 'for Vr1 = 35 V,'\n",
+ "print 'surface-leakage reistance Isl1 = Vr1/Rsl =',Isl1,'nA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "surface-leakage reistance Rsl = Vr/Isl = 12500.0 MOhm\n",
+ "for Vr1 = 35 V,\n",
+ "surface-leakage reistance Isl1 = Vr1/Rsl = 2.8 nA\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_3_New.ipynb b/Electronic_Principles/Chapter_3_New.ipynb
new file mode 100755
index 00000000..e4397d8b
--- /dev/null
+++ b/Electronic_Principles/Chapter_3_New.ipynb
@@ -0,0 +1,334 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 3 DIODE THEORY"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-2, Page 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Pr=5 #Power rating(W)\n",
+ "Vd=1.2 #diode voltage(V)\n",
+ "Id=1.75 #diode current(A)\n",
+ "\n",
+ "PD=Vd*Id #Power dissipaion(W)\n",
+ "\n",
+ "print 'Power Dissipation =',PD,'W'\n",
+ "print 'PD(',PD,'W) < ''Pr(',Pr,'W), So diode will not be destroyed.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power Dissipation = 2.1 W\n",
+ "PD( 2.1 W) < Pr( 5 W), So diode will not be destroyed.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-3, Page 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "Vs=10 #Source voltage(V)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "VL=Vs #LOad voltage(V)\n",
+ "\n",
+ "IL=VL/RL #Load current(mA)\n",
+ "\n",
+ "print 'Vs will be appearing across RL'\n",
+ "print 'Load voltage VL =',Vs,'V'\n",
+ "print 'Load current IL =',IL,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vs will be appearing across RL\n",
+ "Load voltage VL = 10 V\n",
+ "Load current IL = 10 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-4, Page 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print 'As per figure 3-6b, Thevenize the circuit to the left of the diode'\n",
+ "R1=6 #Resistance(KOhm)\n",
+ "R2=3 #Resistance(KOhm)\n",
+ "RL=1 #Load Resistance(KOhm)\n",
+ "Vs=36 #Supply voltage(V)\n",
+ "\n",
+ "Vth=R2*Vs/(R1+R2) #ThCevenin voltage(V)\n",
+ "Rth=(R1*R2)/(R1+R2) #Thevenin resistance(KOhm)\n",
+ "Rt=Rth+RL #total resistance(KOhm)\n",
+ "IL=Vth/Rt #Load current(mA)\n",
+ "VL=IL*RL #Load voltage(V)\n",
+ "\n",
+ "print 'Vth =',Vth,'V & Rth =',Rth,'KOhm'\n",
+ "print 'Visualize diode as closed switch,'\n",
+ "print 'IL =',IL,'mA'\n",
+ "print 'VL =',VL,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As per figure 3-6b, Thevenize the circuit to the left of the diode\n",
+ "Vth = 12 V & Rth = 2 KOhm\n",
+ "Visualize diode as closed switch,\n",
+ "IL = 4 mA\n",
+ "VL = 4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-5, Page 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print 'As per Second approximation in Fig.3-8,'\n",
+ "Vd=0.7 #diode voltgage(V)\n",
+ "Vs=10 #supply voltage(V)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "\n",
+ "VL=Vs-Vd #Load voltage(v)\n",
+ "IL=VL/RL #Load current(mA)\n",
+ "PD=Vd*IL #diode power(mW)\n",
+ "\n",
+ "print 'IL =',IL,'mA & VL =',VL,'V'\n",
+ "print 'Diode power PD =',PD,'mW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As per Second approximation in Fig.3-8,\n",
+ "IL = 9.3 mA & VL = 9.3 V\n",
+ "Diode power PD = 6.51 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-6, Page 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print 'As per Second approximation in Fig.3-9a,'\n",
+ "Vd=0.7 #diode voltgage(V)\n",
+ "Vs=36 #supply voltage(V)\n",
+ "R1=6 #Resistance(KOhm)\n",
+ "R2=3 #Resistance(KOhm)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "\n",
+ "Vth=R2*Vs/(R1+R2)#Thevenin Voltage(V)\n",
+ "Rth=(R1*R2)/(R1+R2)#Thevenin resistance(KOhm)\n",
+ "IL=(Vth-Vd)/R2#Load current(mA)\n",
+ "VL=IL*RL#Load voltage(V)\n",
+ "PD=Vd*IL#diode power(mW)\n",
+ "\n",
+ "print 'Thevenize the circuit to the left of the diode'\n",
+ "print 'Vth =',Vth,'V & Rth =',Rth,'KOhm'\n",
+ "print 'VL =',round(VL,2),'V & IL =',round(IL,2),'mA'\n",
+ "print 'Diode power PD =',round(PD,2),'mW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As per Second approximation in Fig.3-9a,\n",
+ "Thevenize the circuit to the left of the diode\n",
+ "Vth = 12 V & Rth = 2 KOhm\n",
+ "VL = 3.77 V & IL = 3.77 mA\n",
+ "Diode power PD = 2.64 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-7, Page 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print 'In Fig.3-11a,'\n",
+ "Vd=0.7 #diode voltgage(V)\n",
+ "Vs=10 #supply voltage(V)\n",
+ "RL=1000L #Load resistance(Ohm)\n",
+ "Rb=0.23 #bulk resistance\n",
+ "\n",
+ "print 'As per third approximation, we get fig.3-11b'\n",
+ "if Rb<(RL/100):\n",
+ " print'If Rb < 0.01RL than ignore Rb & use second approximation.'\n",
+ " VL=Vs-Vd #Load voltage(V)\n",
+ " IL=(VL/RL)*1000 #Load current(mA)\n",
+ " PD=Vd*IL #diode power(mW)\n",
+ "\n",
+ " print 'IL =',IL,'mA & VL =',VL,'V'\n",
+ " print 'Diode power PD =',PD,'mW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In Fig.3-11a,\n",
+ "As per third approximation, we get fig.3-11b\n",
+ "If Rb < 0.01RL than ignore Rb & use second approximation.\n",
+ "IL = 9.3 mA & VL = 9.3 V\n",
+ "Diode power PD = 6.51 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3-8, Page 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print 'In Fig.3-11a, take RL = 10 Ohm'\n",
+ "Vd=0.7 #diode voltgage(V)\n",
+ "Vs=10 #supply voltage(V)\n",
+ "RL=10 #Load resistance(Ohm)\n",
+ "Rb=0.23 #bulk resistance\n",
+ "RT=Rb+RL #Total reistance(Ohm)\n",
+ "VT=Vs-Vd #total voltage(V)\n",
+ "\n",
+ "print 'RT =',RT,'Ohm & VT =',VT,'V'\n",
+ "IL=VT/RT #Load current(mA)\n",
+ "VL=IL*RL #Load voltage(V)\n",
+ "VD=Vd+(IL*Rb) \n",
+ "PD=VD*IL #diode power(W)\n",
+ "\n",
+ "print 'IL =',round(IL,2),'mA & VL =',round(VL,2),'V'\n",
+ "print 'VD =',round(VD,2),'V'\n",
+ "print 'Diode power PD =',round(PD,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In Fig.3-11a, take RL = 10 Ohm\n",
+ "RT = 10.23 Ohm & VT = 9.3 V\n",
+ "IL = 0.91 mA & VL = 9.09 V\n",
+ "VD = 0.91 V\n",
+ "Diode power PD = 0.83 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_4_New.ipynb b/Electronic_Principles/Chapter_4_New.ipynb
new file mode 100755
index 00000000..b02a4e3e
--- /dev/null
+++ b/Electronic_Principles/Chapter_4_New.ipynb
@@ -0,0 +1,515 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 4 DIODE CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-1, Page 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Vrms=10 #RMS Value of sine wave(V)\n",
+ "f=60 #frequency(Hz)\n",
+ "\n",
+ "Vp=Vrms/0.707 #peak source voltage(V)\n",
+ "Vpout=Vp #peak load voltage(V)\n",
+ "Vdc=Vp/math.pi #dc load voltage(V)\n",
+ "Vpouts=Vp-0.7 #peak load voltage in 2nd approx.\n",
+ "Vdc=Vpouts/math.pi #dc load voltage(V)\n",
+ "\n",
+ "print 'Vp=',round(Vp,2),'V'\n",
+ "print 'With an ideal diode, Vpout =',round(Vpout,2),'V'\n",
+ "print 'DC load voltage, Vdc =',round(Vdc,2),'V'\n",
+ "print 'With second approximation, Vpout =',round(Vpouts,2),'V'\n",
+ "print 'DC load voltage, Vdc =',round(Vdc,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vp= 14.14 V\n",
+ "With an ideal diode, Vpout = 14.14 V\n",
+ "DC load voltage, Vdc = 4.28 V\n",
+ "With second approximation, Vpout = 13.44 V\n",
+ "DC load voltage, Vdc = 4.28 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-2, Page 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Vs=120 #supply voltage(V)\n",
+ "\n",
+ "V2=Vs/5 #Secondary voltage(V)\n",
+ "Vp=V2/0.707 #peak secondary voltage\n",
+ "Vpout=Vp #peak load voltage(V)\n",
+ "Vdc1=Vp/math.pi #dc load voltage(V)\n",
+ "Vpouts=Vp-0.7 #peak load voltage in 2nd approx.(V)\n",
+ "Vdc2=Vpouts/math.pi #dc load voltage(V)\n",
+ "\n",
+ "print 'As per fig.4-5, Transformer turns ratio is 5:1'\n",
+ "print 'V2=',round(V2,2),'V'\n",
+ "print 'Vp=',round(Vp,2),'V'\n",
+ "print 'With an ideal diode, Vpout =',round(Vpout,2),'V'\n",
+ "print 'DC load voltage, Vdc =',round(Vdc1,2),'V'\n",
+ "print 'With second approximation, Vpout =',round(Vpouts,2),'V'\n",
+ "print 'DC load voltage, Vdc =',round(Vdc2,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As per fig.4-5, Transformer turns ratio is 5:1\n",
+ "V2= 24.0 V\n",
+ "Vp= 33.95 V\n",
+ "With an ideal diode, Vpout = 33.95 V\n",
+ "DC load voltage, Vdc = 10.81 V\n",
+ "With second approximation, Vpout = 33.25 V\n",
+ "DC load voltage, Vdc = 10.58 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-3, Page 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=10 #turn ratio\n",
+ "\n",
+ "Vp1=Vrms/0.707 #peak primary voltage(V)\n",
+ "Vp2=Vp1/N12 #peak secondary voltage(V)\n",
+ "Vpin=0.5*Vp2 #input voltage(V)\n",
+ "Vpout=Vpin #Output voltage (V)\n",
+ "Vpouts=Vpin-0.7 #Output voltage in 2nd approx.(V)\n",
+ "\n",
+ "print 'Peak primary voltage Vp1=',round(Vp1,2),'V'\n",
+ "print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'\n",
+ "print 'Due to center-tap,' \n",
+ "print 'input voltage to each half-wave rectifier is only half the secondary voltage:'\n",
+ "print 'With an ideal diode, Vpout =',round(Vpout,2),'V'\n",
+ "print 'With second approximation, Vpout =',round(Vpouts,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak primary voltage Vp1= 169.73 V\n",
+ "Peak secondary voltage Vp2= 16.97 V\n",
+ "Due to center-tap,\n",
+ "input voltage to each half-wave rectifier is only half the secondary voltage:\n",
+ "With an ideal diode, Vpout = 8.49 V\n",
+ "With second approximation, Vpout = 7.79 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-4, Page 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=10 #turn ratio\n",
+ "\n",
+ "Vp1=Vrms/0.707 #peak primary voltage(V)\n",
+ "Vp2=Vp1/N12 #peak secondary voltage(V)\n",
+ "Vpin=0.5*Vp2 #input voltage(V)\n",
+ "Vpout=Vpin #Output voltage(V)\n",
+ "Vpouts=Vpin-0.7 #Output voltage in 2nd approx.(V)\n",
+ "\n",
+ "print 'Peak primary voltage Vp1=',round(Vp1,2),'V'\n",
+ "print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'\n",
+ "print 'Due to one of the diodes were open, load voltage will be the half wave signal'\n",
+ "print 'But still peak of half wave signal is same as prior case'\n",
+ "print 'With an ideal diode, Vpout =',round(Vpout,2),'V'\n",
+ "print 'With second approximation, Vpout =',round(Vpouts,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak primary voltage Vp1= 169.73 V\n",
+ "Peak secondary voltage Vp2= 16.97 V\n",
+ "Due to one of the diodes were open, load voltage will be the half wave signal\n",
+ "But still peak of half wave signal is same as prior case\n",
+ "With an ideal diode, Vpout = 8.49 V\n",
+ "With second approximation, Vpout = 7.79 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-5, Page 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=10 #turn ratio\n",
+ "\n",
+ "Vp1=Vrms/0.707 #peak primary voltage(V)\n",
+ "Vp2=Vp1/N12 #peak secondary voltage(V)\n",
+ "Vpout=Vp2 #Output voltage(V)\n",
+ "\n",
+ "print 'Peak primary voltage Vp1=',round(Vp1,2),'V'\n",
+ "print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'\n",
+ "print 'secondary voltage is input of rectifier'\n",
+ "print 'With an ideal diode, Vpout =',round(Vpout,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak primary voltage Vp1= 169.73 V\n",
+ "Peak secondary voltage Vp2= 16.97 V\n",
+ "secondary voltage is input of rectifier\n",
+ "With an ideal diode, Vpout = 16.97 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-6, Page 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=5 #turn ratio\n",
+ "RL=5 #Load resistance(KOhm)\n",
+ "C=100 #Capacitance(uF)\n",
+ "f=60 #Frequency(Hz)\n",
+ "\n",
+ "V2=Vrms/N12 #RMS secondary voltage(V)\n",
+ "Vp=V2/0.707 #peak secondary voltage(V)\n",
+ "VL=Vp #dc load voltage(V)\n",
+ "IL=VL/RL #Load current(mA)\n",
+ "VR=(IL/(f*C))*(10**3) #ripple voltage(V)\n",
+ "\n",
+ "print 'RMS secondary voltage V2=',V2,'V'\n",
+ "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n",
+ "print 'with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'\n",
+ "print 'To calculate ripple get, dc load current,'\n",
+ "print 'DC Load current IL=',round(IL,2),'mA'\n",
+ "print 'As per ripple formula,'\n",
+ "print 'Ripple voltage VR=',round(VR,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS secondary voltage V2= 24 V\n",
+ "Peak secondary voltage Vp= 33.95 V\n",
+ "with ideal diode and small ripple, dc load voltage, VL = 33.95 V\n",
+ "To calculate ripple get, dc load current,\n",
+ "DC Load current IL= 6.79 mA\n",
+ "As per ripple formula,\n",
+ "Ripple voltage VR= 1.13 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-7, Page 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=5 #turn ratio\n",
+ "RL=5 #Load resistance(KOhm)\n",
+ "C=100 #Capacitance(uF)\n",
+ "f=60 #Frequency(Hz)\n",
+ "\n",
+ "V2=Vrms/N12 #RMS secondary voltage(V)\n",
+ "Vp=V2/0.707 #peak secondary voltage(V)\n",
+ "VL=Vp/2 #dc load voltage(V)\n",
+ "IL=VL/RL #Load current(mA)\n",
+ "VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)\n",
+ "\n",
+ "print 'RMS secondary voltage V2=',V2,'V'\n",
+ "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n",
+ "print 'Half this voltage is input to each half-wave section, with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'\n",
+ "print 'But, due to 0.7V across conducting diode actual dc voltage is, VL =',round((VL-0.7),2),'V'\n",
+ "print 'To calculate ripple get, dc load current,'\n",
+ "print 'DC Load current IL=',round(IL,2),'mA'\n",
+ "print 'As per ripple formula,'\n",
+ "print 'Ripple voltage VR=',round(VR,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS secondary voltage V2= 24 V\n",
+ "Peak secondary voltage Vp= 33.95 V\n",
+ "Half this voltage is input to each half-wave section, with ideal diode and small ripple, dc load voltage, VL = 16.97 V\n",
+ "But, due to 0.7V across conducting diode actual dc voltage is, VL = 16.27 V\n",
+ "To calculate ripple get, dc load current,\n",
+ "DC Load current IL= 3.39 mA\n",
+ "As per ripple formula,\n",
+ "Ripple voltage VR= 0.28 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-8, Page 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=5 #turn ratio\n",
+ "RL=5 #Load resistance(KOhm)\n",
+ "C=100 #Capacitance(uF)\n",
+ "f=60 #Frequency(Hz)\n",
+ "\n",
+ "V2=Vrms/N12 #RMS secondary voltage(V)\n",
+ "Vp=V2/0.707 #peak secondary voltage(V)\n",
+ "VL=Vp #dc load voltage(V)\n",
+ "IL=VL/RL #Load current(mA)\n",
+ "VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)\n",
+ "\n",
+ "print 'RMS secondary voltage V2=',V2,'V'\n",
+ "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n",
+ "print 'with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'\n",
+ "print 'But, due to 1.4V across two conducting diodes actual dc voltage is, VL =',round((VL-1.4),2),'V'\n",
+ "print 'To calculate ripple get, dc load current,'\n",
+ "print 'DC Load current IL=',round(IL,2),'mA'\n",
+ "print 'As per ripple formula,'\n",
+ "print 'Ripple voltage VR=',round(VR,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS secondary voltage V2= 24 V\n",
+ "Peak secondary voltage Vp= 33.95 V\n",
+ "with ideal diode and small ripple, dc load voltage, VL = 33.95 V\n",
+ "But, due to 1.4V across two conducting diodes actual dc voltage is, VL = 32.55 V\n",
+ "To calculate ripple get, dc load current,\n",
+ "DC Load current IL= 6.79 mA\n",
+ "As per ripple formula,\n",
+ "Ripple voltage VR= 0.57 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-9, Page 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=15 #turn ratio\n",
+ "RL=0.5 #Load resistance(KOhm)\n",
+ "C=4700 #Capacitance(uF)\n",
+ "f=60 #Frequency(Hz)\n",
+ "\n",
+ "V2=Vrms/N12 #RMS secondary voltage(V)\n",
+ "Vp=V2/0.707 #peak secondary voltage(V)\n",
+ "VL=Vp-1.4 #dc load voltage(V)\n",
+ "IL=VL/RL #Load current(mA)\n",
+ "VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)\n",
+ "\n",
+ "print 'RMS secondary voltage V2=',V2,'V'\n",
+ "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n",
+ "print 'with ideal diode and small ripple & due to 1.4V across two conducting diodes actual dc voltage is, VL =',round(VL,2),'V'\n",
+ "print 'To calculate ripple get, dc load current,'\n",
+ "print 'DC Load current IL=',round(IL,2),'mA'\n",
+ "print 'As per ripple formula,'\n",
+ "print 'Ripple voltage VR=',round((VR*1000),2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS secondary voltage V2= 8 V\n",
+ "Peak secondary voltage Vp= 11.32 V\n",
+ "with ideal diode and small ripple & due to 1.4V across two conducting diodes actual dc voltage is, VL = 9.92 V\n",
+ "To calculate ripple get, dc load current,\n",
+ "DC Load current IL= 19.83 mA\n",
+ "As per ripple formula,\n",
+ "Ripple voltage VR= 35.16 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4-10, Page 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vrms=120 #RMS value of supply(V)\n",
+ "N12=8 #turn ratio\n",
+ "f=60 #Frequency(Hz)\n",
+ "\n",
+ "V2=Vrms/N12 #RMS secondary voltage(V)\n",
+ "Vp=V2/0.707 #peak secondary voltage(V)\n",
+ "PIV = Vp #Peak Inverse Voltage(V)\n",
+ "\n",
+ "print 'RMS secondary voltage V2=',V2,'V'\n",
+ "print 'Peak inverse voltage PIV =',round(PIV,2),'V'\n",
+ "print 'PIV << breakdown voltage(50V), So, it is safe to use IN4001'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS secondary voltage V2= 15 V\n",
+ "Peak inverse voltage PIV = 21.22 V\n",
+ "PIV << breakdown voltage(50V), So, it is safe to use IN4001\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_5_New.ipynb b/Electronic_Principles/Chapter_5_New.ipynb
new file mode 100755
index 00000000..cfea03f3
--- /dev/null
+++ b/Electronic_Principles/Chapter_5_New.ipynb
@@ -0,0 +1,446 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 5 SPECIAL-PURPOSE DIODES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-1, Page 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vsmin=20 #Source voltage minimum(V)\n",
+ "Vsmax=40 #Source voltage maximum(V)\n",
+ "Vbd=10 #Breakdown voltage(V)\n",
+ "R=0.82 #Resistance(KOhm)\n",
+ "\n",
+ "Vr1=Vsmin-Vbd #voltage across resistor(V)\n",
+ "Is1=Vr1/R #Minimum current(mA)\n",
+ "Vr2=Vsmax-Vbd #voltage across resistor(V)\n",
+ "Is2=Vr2/R #Maximum current(mA)\n",
+ "\n",
+ "print 'Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b'\n",
+ "print 'Minimum current Is1=',round(Is1,2),'mA'\n",
+ "print 'Maximum current Is1=',round(Is2,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b\n",
+ "Minimum current Is1= 12.2 mA\n",
+ "Maximum current Is1= 36.59 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-2, Page 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vs=18 #supply voltage(V)\n",
+ "Rs=0.27 #source resistance(KOhm)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "Vz=10 #Zener voltage(V)\n",
+ "\n",
+ "VTH=(RL/(Rs+RL))*Vs #Thevenin voltage(V)\n",
+ "\n",
+ "print 'Thevenin voltage VTH = ',round(VTH,2),'V'\n",
+ "print 'Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thevenin voltage VTH = 14.17 V\n",
+ "Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-3, Page 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vs=18 #supply voltage(V)\n",
+ "Rs=0.27 #source resistance(KOhm)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "Vbd=10 #Zener voltage(V)\n",
+ "\n",
+ "Vr=Vs-Vbd #voltage across resistor(V)\n",
+ "Is=Vr/Rs #Current(mA)\n",
+ "IL=Vbd/RL #Current(mA)\n",
+ "Iz=Is-IL #Zener current(mA)\n",
+ "\n",
+ "print 'Load current IL = ',IL,'mA'\n",
+ "print 'Zener current Iz = ',round(Iz,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current IL = 10 mA\n",
+ "Zener current Iz = 19.63 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-7, Page 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Iz=20 #zener current(mA)\n",
+ "Rz=8.5 #zener resistance(Ohm)\n",
+ "Vbd=10 #Zener voltage(V)\n",
+ "\n",
+ "DVL=Iz*Rz/1000 #change in load voltage(V)\n",
+ "VL=Vbd+DVL #Load voltage(V)\n",
+ "\n",
+ "print 'Change in load voltage DVL =',DVL,'V'\n",
+ "print 'Load voltage with second approx., VL =',VL,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in load voltage DVL = 0.17 V\n",
+ "Load voltage with second approx., VL = 10.17 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-8, Page 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rs=270 #Source resistance (Ohm)\n",
+ "Rz=8.5 #zener resistance(Ohm)\n",
+ "VRin=2 #Zener voltage(V)\n",
+ "\n",
+ "VRout=(Rz/Rs)*VRin*1000 #Load ripple voltage(V)\n",
+ "\n",
+ "print 'Load ripple voltage VRout=',round(VRout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load ripple voltage VRout= 62.96 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-10, Page 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vil=22 #input voltage range low(V)\n",
+ "Vih=30 #input voltage range high(V)\n",
+ "Vz=12 #regulated output voltage(V)\n",
+ "Rl=140 #Load resistance low(KOhm)\n",
+ "Rh=10 #Load resistance high(KOhm)\n",
+ "\n",
+ "RSmax=Rl*(float(Vil)/float(Vz)-1) #Maximum series resistance\n",
+ "\n",
+ "print 'Maximum series resistance RSmax =',round(RSmax,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum series resistance RSmax = 116.67 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-11, Page 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "Vil=15 #input voltage range low(V)\n",
+ "Vih=20 #input voltage range high(V)\n",
+ "Vz=6.8 #regulated output voltage(V)\n",
+ "Il=5 #Load current low(mA)\n",
+ "Ih=20 #Load current high(mA)\n",
+ "\n",
+ "RSmax=(Vil-float(Vz))/Ih*1000 #Maximum series resistance\n",
+ "\n",
+ "print 'Maximum series resistance RSmax =',RSmax,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum series resistance RSmax = 410.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-12, Page 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vi=50 #voatage supply(V)\n",
+ "Rs=2.2 #series resistance(KOhm)\n",
+ "Vf=2 #forward approx. voltage\n",
+ " \n",
+ "Is=(Vi-Vf)/Rs\n",
+ "\n",
+ "print 'LED current Is =',round(Is,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "LED current Is = 21.82 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-13, Page 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vs=9 #voatage supply(V)\n",
+ "Rs=470.0 #series resistance(Ohm)\n",
+ "Vf=2 #forward approx. voltage\n",
+ " \n",
+ "Is=(Vs-Vf)/Rs\n",
+ "\n",
+ "print 'LED current Is =',round((Is*1000),2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "LED current Is = 14.89 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-14, Page 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Vac=20 #AC voatage supply(V)\n",
+ "Rs=680.0 #series resistance(KOhm)\n",
+ " \n",
+ "Vacp=1.414*Vac #peak source voltage(V)\n",
+ "Is1=(Vacp/Rs)*1000 #approx. peak current(mA)\n",
+ "Is2=Is1/math.pi #average of half-wave current through LED(mA)\n",
+ "P=(Vac)**2/Rs #Power dissipation(W)\n",
+ "\n",
+ "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n",
+ "print 'average of half-wave current through LED Is2 =',round(Is2,2),'mA'\n",
+ "print 'Power dissipation P =',round(P,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "approx. peak LED current Is1 = 41.59 mA\n",
+ "average of half-wave current through LED Is2 = 13.24 mA\n",
+ "Power dissipation P = 0.59 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-15, Page 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "Vs=120 #AC voatage supply(V)\n",
+ "f=60 #frequency(Hz)\n",
+ "C=0.68 #series resistance(KOhm)\n",
+ " \n",
+ "Xc=1/(2*math.pi*f*C)*1000 #capacitive reactance(KOhm)\n",
+ "Vacp=Vs*1.414\n",
+ "Is1=(Vacp/Xc) #approx. peak current(mA)\n",
+ "Is2=Is1/math.pi #average current through LED(mA)\n",
+ "\n",
+ "print 'Capacitance reactance Xc = ',round(Xc,2),'KOhm'\n",
+ "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n",
+ "print 'average current through LED Is2 =',round(Is2,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance reactance Xc = 3.9 KOhm\n",
+ "approx. peak LED current Is1 = 43.5 mA\n",
+ "average current through LED Is2 = 13.85 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_6_New.ipynb b/Electronic_Principles/Chapter_6_New.ipynb
new file mode 100755
index 00000000..990f6ef8
--- /dev/null
+++ b/Electronic_Principles/Chapter_6_New.ipynb
@@ -0,0 +1,534 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 6 BIPOLAR JUNCTION TRANSISTOR"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-1, Page 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Ic=10 #collector current(mA)\n",
+ "Ib=40.0/1000.0 #base current (mA)\n",
+ "\n",
+ "Bdc=Ic/Ib #Current gain\n",
+ "\n",
+ "print 'Current gain Bdc =',Bdc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain Bdc = 250.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-2, Page 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Bdc=175 #current gain\n",
+ "Ib=0.1 #base current (mA)\n",
+ "\n",
+ "Ic=Bdc*Ib #Current gain\n",
+ "\n",
+ "print 'Collector current Ic =',Ic,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current Ic = 17.5 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-3, Page 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Bdc=135.0 #current gain\n",
+ "Ic=2.0 #collector current (mA)\n",
+ "\n",
+ "Ib=(Ic/Bdc)*1000 #Current gain\n",
+ "\n",
+ "print 'Base current Ib =',round(Ib,2),'uA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current Ib = 14.81 uA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-4, Page 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vbb=2 #base source voltage(V)\n",
+ "Rb=100 #base resistor (KOhm)\n",
+ "Bdc=200 #current gain\n",
+ "Vbe=0.7 #base-emitter voltage drop(V)\n",
+ "\n",
+ "Ib=((Vbb-Vbe)/Rb)*1000 #base current(uA)\n",
+ "Ic=Bdc*Ib/1000 #Collector current(mA)\n",
+ "\n",
+ "print 'Base current Ib =',Ib,'uA'\n",
+ "print 'Collector current Ic =',Ic,'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current Ib = 13.0 uA\n",
+ "Collector current Ic = 2.6 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-5, Page 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VBB=10 #Base voltage (V)\n",
+ "RC=2 #Collector resistance(KOhm)\n",
+ "VCC=10 #collector voltage(V)\n",
+ "Bdc=300 #current gain\n",
+ "RB=1 #base resistance (MOhm)\n",
+ "VBE=0.7 #base-emitter voltage drop(V) \n",
+ "\n",
+ "IB=((VBB-VBE)/RB) #base current(uA)\n",
+ "IC=Bdc*IB/1000 #Collector current(mA)\n",
+ "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "PD=VCE*IC #Collector power dissipation(W)\n",
+ "\n",
+ "print 'Base current IB =',IB,'uA'\n",
+ "print 'Collector current IC =',IC,'mA'\n",
+ "print 'Collector-emitter voltage VCE =',VCE,'V'\n",
+ "print 'Power dissipation PD = ',round(PD,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current IB = 9.3 uA\n",
+ "Collector current IC = 2.79 mA\n",
+ "Collector-emitter voltage VCE = 4.42 V\n",
+ "Power dissipation PD = 12.33 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-6, Page 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VBB=10 #Base voltage (V)\n",
+ "RC=470 #Collector resistance(Ohm)\n",
+ "VCC=10 #collector voltage(V)\n",
+ "Bdc=300 #current gain\n",
+ "VCE=5.4535 #collector-emitter voltage shown on multisim screen \n",
+ "RB=330 #base resistance (KOhm)\n",
+ "VBE=0.7 #base-emitter voltage drop \n",
+ "\n",
+ "IB=((VBB-VBE)/RB)*1000 #base current(uA)\n",
+ "V=VCC-VCE #voltage across Rc\n",
+ "IC=(V/RC)*1000 #Collector current(mA)\n",
+ "Bdc=int((IC/IB)*1000) #Collector-emitter voltage\n",
+ "\n",
+ "print 'Base current IB =',round(IB,2),'uA'\n",
+ "print 'voltage across Rc VRc = ',round(V,2),'V'\n",
+ "print 'Collector current IC =',round(IC,2),'mA'\n",
+ "print 'Current gain Bdc = ',Bdc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current IB = 28.18 uA\n",
+ "voltage across Rc VRc = 4.55 V\n",
+ "Collector current IC = 9.67 mA\n",
+ "Current gain Bdc = 343\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-7, Page 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VBB=15 #Base voltage (V)\n",
+ "RC=3.6 #Collector resistance(KOhm)\n",
+ "VCC=15 #collector voltage(V)\n",
+ "Bdc=100 #current gain\n",
+ "RB=470 #base resistance (KOhm)\n",
+ "VBE=0 #base-emitter voltage drop(V) \n",
+ "\n",
+ "IB=((VBB-VBE)/float(RB))*1000 #base current(uA)\n",
+ "IC=Bdc*IB/1000 #Collector current(mA)\n",
+ "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "IE=IC+(IB/1000) #emitter current(mA)\n",
+ "\n",
+ "print 'Base current IB =',round(IB,2),'uA'\n",
+ "print 'Collector current IC =',round(IC,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'\n",
+ "print 'Emitter current IE =',round(IE,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current IB = 31.91 uA\n",
+ "Collector current IC = 3.19 mA\n",
+ "Collector-emitter voltage VCE = 3.51 V\n",
+ "Emitter current IE = 3.22 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-8, Page 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VBB=15 #Base voltage (V)\n",
+ "RC=3.6 #Collector resistance(KOhm)\n",
+ "VCC=15 #collector voltage(V)\n",
+ "Bdc=100 #current gain\n",
+ "RB=470 #base resistance (KOhm)\n",
+ "VBE=0.7 #base-emitter voltage drop(V) \n",
+ "\n",
+ "IB=((VBB-VBE)/float(RB))*1000 #base current(uA)\n",
+ "IC=Bdc*IB/1000 #Collector current(mA)\n",
+ "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "\n",
+ "print 'Base current IB =',round(IB,2),'uA'\n",
+ "print 'Collector current IC =',round(IC,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current IB = 30.43 uA\n",
+ "Collector current IC = 3.04 mA\n",
+ "Collector-emitter voltage VCE = 4.05 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-9, Page 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VBB=15 #Base voltage (V)\n",
+ "RC=3.6 #Collector resistance(KOhm)\n",
+ "VCC=15 #collector voltage(V)\n",
+ "Bdc=100 #current gain\n",
+ "RB=470 #base resistance (KOhm)\n",
+ "VBE=1 #base-emitter voltage drop(V) \n",
+ "\n",
+ "IB=((VBB-VBE)/float(RB))*1000 #base current(uA)\n",
+ "IC=Bdc*IB/1000 #Collector current(mA)\n",
+ "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "\n",
+ "print 'Base current IB =',round(IB,2),'uA'\n",
+ "print 'Collector current IC =',round(IC,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current IB = 29.79 uA\n",
+ "Collector current IC = 2.98 mA\n",
+ "Collector-emitter voltage VCE = 4.28 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-10, Page 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VBB=5 #Base voltage (V)\n",
+ "RC=3.6 #Collector resistance(KOhm)\n",
+ "VCC=15 #collector voltage(V)\n",
+ "Bdc=100 #current gain\n",
+ "RB=470 #base resistance (KOhm)\n",
+ "VBE1=0 #base-emitter voltage drop1(V) \n",
+ "VBE2=0.7 #base-emitter voltage drop2(V)\n",
+ "VBE3=1 #base-emitter voltage drop3(V)\n",
+ "\n",
+ "IB1=((VBB-VBE1)/float(RB))*1000 #base current1(uA)\n",
+ "IC1=Bdc*IB1/1000 #Collector current1(mA)\n",
+ "VCE1=VCC-(IC1*RC) #Collector-emitter voltage1(V)\n",
+ "\n",
+ "IB2=((VBB-VBE2)/float(RB))*1000 #base current2(uA)\n",
+ "IC2=Bdc*IB2/1000 #Collector current2(mA)\n",
+ "VCE2=VCC-(IC2*RC) #Collector-emitter voltage2(V)\n",
+ "\n",
+ "IB3=((VBB-VBE3)/float(RB))*1000 #base current3(uA)\n",
+ "IC3=Bdc*IB3/1000 #Collector current3(mA)\n",
+ "VCE3=VCC-(IC3*RC) #Collector-emitter voltage3(V)\n",
+ "\n",
+ "print 'Base current IB1 =',round(IB1,2),'uA'\n",
+ "print 'Collector current IC1 =',round(IC1,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE1 = ',round(VCE1,2),'V'\n",
+ "\n",
+ "print 'Base current IB2 =',round(IB2,2),'uA'\n",
+ "print 'Collector current IC2 =',round(IC2,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE2 = ',round(VCE2,2),'V'\n",
+ "\n",
+ "print 'Base current IB3 =',round(IB3,2),'uA'\n",
+ "print 'Collector current IC3 =',round(IC3,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE3 = ',round(VCE3,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current IB1 = 10.64 uA\n",
+ "Collector current IC1 = 1.06 mA\n",
+ "Collector-emitter voltage VCE1 = 11.17 V\n",
+ "Base current IB2 = 9.15 uA\n",
+ "Collector current IC2 = 0.91 mA\n",
+ "Collector-emitter voltage VCE2 = 11.71 V\n",
+ "Base current IB3 = 8.51 uA\n",
+ "Collector current IC3 = 0.85 mA\n",
+ "Collector-emitter voltage VCE3 = 11.94 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-11, Page 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCE=10 #Collector-emitter voltage(V)\n",
+ "IC=20 #Collector current(mA)\n",
+ "T=25 #Ambient temperature(deg C)\n",
+ " \n",
+ "PD = VCE*IC #Power dissipation(mW)\n",
+ "\n",
+ "print 'Power dissipation PD = ',PD,'mW'\n",
+ "print 'for 25 deg C, power rating is 625 mW So, transistor is well within power rating.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power dissipation PD = 200 mW\n",
+ "for 25 deg C, power rating is 625 mW So, transistor is well within power rating.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6-12, Page 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "T1=100 #Ambient temperature(deg C)\n",
+ "T2=25 #Reference temperature(deg C)\n",
+ "mf=5 #Multiply factor(mW/deg C) \n",
+ "Pr=625 #power rating(mW)\n",
+ "\n",
+ "Td=T1-T2 #Temperature difference(deg C)\n",
+ "Pd=mf*Td #Difference in power(mW)\n",
+ "PDmax=Pr-Pd #Maximum power dissipation(mW)\n",
+ "\n",
+ "print 'Maximum Power dissipation PDmax = ',PDmax,'mW'\n",
+ "print 'for 25 deg C, power rating is 625 mW So, transistor is yet within power rating.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum Power dissipation PDmax = 250 mW\n",
+ "for 25 deg C, power rating is 625 mW So, transistor is yet within power rating.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_7_New.ipynb b/Electronic_Principles/Chapter_7_New.ipynb
new file mode 100755
index 00000000..bf956ac7
--- /dev/null
+++ b/Electronic_Principles/Chapter_7_New.ipynb
@@ -0,0 +1,427 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 7 TRANSISTOR FUNDAMENTALS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-1, Page 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=30 #collector voltage(V)\n",
+ "RC=3 #Collector resistance (KOhm)\n",
+ "\n",
+ "ICsat=VCC/RC #Saturation current(mA)\n",
+ "VCEc=VCC #VCE cutoff voltage(V)\n",
+ "\n",
+ "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n",
+ "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Saturation current IC(saturation) = 10 mA\n",
+ "Collector emitter cutoff VCE(cutoff) = 30 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-2, Page 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=9 #collector voltage(V)\n",
+ "RC=3 #Collector resistance(KOhm)\n",
+ "\n",
+ "ICsat=VCC/RC #Saturation current(mA)\n",
+ "VCEc=VCC #VCE cutoff voltage(V)\n",
+ "\n",
+ "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n",
+ "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Saturation current IC(saturation) = 3 mA\n",
+ "Collector emitter cutoff VCE(cutoff) = 9 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-3, Page 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "RC=1 #Collector resistance(KOhm)\n",
+ "\n",
+ "ICsat=VCC/RC #Saturation current(mA)\n",
+ "VCEc=VCC #VCE cutoff voltage(V)\n",
+ "\n",
+ "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n",
+ "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Saturation current IC(saturation) = 15 mA\n",
+ "Collector emitter cutoff VCE(cutoff) = 15 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-4, Page 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "RC=3 #Collector resistance(KOhm)\n",
+ "\n",
+ "ICsat=VCC/RC #Saturation current(mA)\n",
+ "VCEc=VCC #VCE cutoff voltage(V)\n",
+ "\n",
+ "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n",
+ "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Saturation current IC(saturation) = 5 mA\n",
+ "Collector emitter cutoff VCE(cutoff) = 15 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-5, Page 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15.0 #collector voltage(V)\n",
+ "RC=3 #collector resistance (KOhm)\n",
+ "VBB=15.0 #base voltage(V)\n",
+ "RB=1 #base resistance (MOhm)\n",
+ "Bdc=100 #current gain\n",
+ "\n",
+ "IB1=(VBB/RB) #base current(uA)\n",
+ "IC1=Bdc*IB1/1000 #Collector current(mA)\n",
+ "VCE1=VCC-(IC1*RC) #Collector-emitter voltage(V)\n",
+ "\n",
+ "IB2=((VBB-0.7)/RB) #base current(uA)\n",
+ "IC2=Bdc*IB2/1000 #Collector current(mA)\n",
+ "VCE2=VCC-(IC2*RC) #Collector-emitter voltage(V)\n",
+ "\n",
+ "print 'Collector emitter voltage VCE1 = ',VCE1,'V'\n",
+ "print 'For second approx., collector emitter voltage VCE2 = ',VCE2,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector emitter voltage VCE1 = 10.5 V\n",
+ "For second approx., collector emitter voltage VCE2 = 10.71 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-6, Page 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=20.0 #collector voltage(V)\n",
+ "RC=10 #collector resistance (KOhm)\n",
+ "VBB=10.0 #base voltage(V)\n",
+ "RB=1 #base resistance (MOhm)\n",
+ "Bdc=50 #current gain\n",
+ "\n",
+ "IB=(VBB/RB) #base current(uA)\n",
+ "IC=Bdc*IB/1000 #Collector current(mA)\n",
+ "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "\n",
+ "print 'Collector emitter voltage VCE = ',VCE,'V'\n",
+ "print 'So, transistor is in active region.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector emitter voltage VCE = 15.0 V\n",
+ "So, transistor is in active region\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-7, Page 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=20.0 #collector voltage(V)\n",
+ "RC=5 #collector resistance (KOhm)\n",
+ "VBB=10.0 #base voltage(V)\n",
+ "RB=100 #base resistance(KOhm)\n",
+ "Bdco=50 #old current gain\n",
+ "\n",
+ "ICsat=VCC/RC #Saturation current(mA)\n",
+ "IB=VBB/RB #base current(mA)\n",
+ "IC=Bdc*IB/1000 #Collector current(mA)\n",
+ "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "Bdcn=ICsat/IB #New current gain\n",
+ " \n",
+ "\n",
+ "print 'ICsat = ',ICsat,'mA'\n",
+ "print 'Bdc = ',int(Bdcn)\n",
+ "print 'Current can not be more than ICsat So, current gain will decrease.'\n",
+ "print 'So, transistor has two current gain: active region & saturation region.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ICsat = 4.0 mA\n",
+ "Bdc = 40\n",
+ "Current can not be more than ICsat So, current gain will decrease.\n",
+ "So, transistor has two current gain: active region & saturation region.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-8, Page 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=5.0 #collector voltage(V)\n",
+ "ICEO=50 #Collector leakage current(nA)\n",
+ "RC=1 #collector resistance (KOhm)\n",
+ "VBB=10.0 #base voltage(V)\n",
+ "RB=10 #base resistance(KOhm)\n",
+ "VCEs=0.15 #VCE saturation(V)\n",
+ "\n",
+ "VCE=VCC-((ICEO*RC)*10**-6) #Collector-emitter voltage(V)\n",
+ "\n",
+ "print 'Two values of output voltage are 0 and 5 V'\n",
+ "print 'first voltage is voltage across saturated transistor = ',VCEs,'V' \n",
+ "print 'Second voltage is: VCE = ',round(VCE,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Two values of output voltage are 0 and 5 V\n",
+ "first voltage is voltage across saturated transistor = 0.15 V\n",
+ "Second voltage is: VCE = 5.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-9, Page 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "VBB=5 #Base voltage(V)\n",
+ "RC=2 #collector resistance (KOhm)\n",
+ "VBE=0.7 #base voltage(V)\n",
+ "RB=100 #base resistance(KOhm)\n",
+ "RE=1 #emitter resistance(KOhm)\n",
+ "\n",
+ "\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=(VE/RE) #emitter current(mA)\n",
+ "IC=IE #Collector current(mA)\n",
+ "VC=VCC-(IC*RC) #Collector-emitter voltage(V)\n",
+ "VCE=VC-VE #Collector-emitter voltage(V)\n",
+ " \n",
+ "\n",
+ "print 'Emitter current IE = ',IE,'mA'\n",
+ "print 'Emitter voltage VE = ',VE,'V'\n",
+ "print 'Collector emitter voltage VCE = ',VCE,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 4.3 mA\n",
+ "Emitter voltage VE = 4.3 V\n",
+ "Collector emitter voltage VCE = 2.1 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7-10, Page 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=20 #collector voltage(V)\n",
+ "VBB=15 #Base voltage(V)\n",
+ "VBE=0.7 #base voltage(V)\n",
+ "RE=1.5 #emitter resistance(KOhm)\n",
+ "IE=25.0 #emitter current(mA)\n",
+ "\n",
+ "VE=IE*RE #emitter current(mA)\n",
+ "RE=(VBB/IE)*1000 #emitter resistance(KOhm)\n",
+ "RE2=((VBB-VBE)/IE)*1000 #emitter resistance(KOhm)\n",
+ " \n",
+ "print 'Emitter voltage VE = ',VE,'V'\n",
+ "print 'Emitter resistance RE = ',RE,'Ohm'\n",
+ "print 'Emitter resistance RE2 = ',RE2,'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter voltage VE = 37.5 V\n",
+ "Emitter resistance RE = 600.0 Ohm\n",
+ "Emitter resistance RE2 = 572.0 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_8_New.ipynb b/Electronic_Principles/Chapter_8_New.ipynb
new file mode 100755
index 00000000..5db68b59
--- /dev/null
+++ b/Electronic_Principles/Chapter_8_New.ipynb
@@ -0,0 +1,300 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 8 TRANSISTOR BIASING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8-1, Page 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "\n",
+ "VBB=(R2/(R1+R2))*VCC #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "IC=IE #Collector current(mA)\n",
+ "VC=VCC-(IC*RC) #collector to ground voltage(V)\n",
+ "VCE=VC-VE #Collector-emitter voltage(V)\n",
+ "\n",
+ "print 'Collector current IC = ',round(IC,2),'mA'\n",
+ "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current IC = 1.1 mA\n",
+ "Collector-emitter voltage VCE = 4.92 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8-3, Page 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "Bdc=200 #current gain\n",
+ "\n",
+ "R=(R1*R2)/(R1+R2) #Thevenin resistance(KOhm)\n",
+ "Ri=Bdc*RE #Base input resistance(KOhm)\n",
+ "R100=0.01*Ri #100th of Ri(KOhm)\n",
+ "VBB=(R2/(R1+R2))*VCC #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/(RE+(R/Ri)) #Emitter current(mA)\n",
+ "\n",
+ "print 'As per stiff voltage divider rule, R1||R2 < 0.01 Bdc*RE, So, Voltage divider is stiff.'\n",
+ "print 'Emitter current IE = ',round(IE,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As per stiff voltage divider rule, R1||R2 < 0.01 Bdc*RE, So, Voltage divider is stiff.\n",
+ "Emitter current IE = 1.09 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8-4, Page 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "IC=10 #Collector current(mA)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "Bdc=100 #current gain\n",
+ "\n",
+ "IE=IC #Emitter current(mA)\n",
+ "VE=0.1*VCC #Emitter voltage(V)\n",
+ "RE=(VE/IE)*1000 #Emitter resistance (Ohm)\n",
+ "RC=4*RE #Collector resistance(Ohm)\n",
+ "R2=0.01*Bdc*RE #Base input resistance2(Ohm)\n",
+ "V2=VE+VBE #voltage across R1(V)\n",
+ "V1=VCC-V2 #voltage across R2(V)\n",
+ "R1=(V1/V2)*R2 #Base input resistance1(Ohm)\n",
+ "\n",
+ "print 'Emitter resistance RE = ',RE,'Ohm'\n",
+ "print 'Collector resistance RC = ',RC,'Ohm'\n",
+ "print 'Base resistance R1 = ',round(R1,2),'Ohm'\n",
+ "print 'Base resistance R2 = ',R2,'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance RE = 100.0 Ohm\n",
+ "Collector resistance RC = 400.0 Ohm\n",
+ "Base resistance R1 = 488.24 Ohm\n",
+ "Base resistance R2 = 100.0 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8-5, Page 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1.8 #Emitter resistance (KOhm)\n",
+ "RB=2.7 #Base resistance (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "VEE=2 #emitter voltage(V)\n",
+ "\n",
+ "VBB=0 #Base voltage(V)\n",
+ "VE=VEE-VBE #Emitter to ground voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "IC=IE #Collector current(mA)\n",
+ "VC=VCC-(IC*RC) #collector to ground voltage(V)\n",
+ "\n",
+ "print 'Emitter current IE = ',round(IE,2),'mA'\n",
+ "print 'Collector voltage VC = ',VC,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 0.72 mA\n",
+ "Collector voltage VC = 7.4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8-6, Page 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=15 #collector voltage(V)\n",
+ "RC=10 #Collector resistance (KOhm)\n",
+ "RE=20 #Emitter resistance (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "VEE=15 #emitter voltage(V)\n",
+ "\n",
+ "VBB=0 #Base voltage(V)\n",
+ "VE=VEE-VBE #Emitter to ground voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "IC=IE #Collector current(mA)\n",
+ "VC=VCC-(IC*RC) #collector to ground voltage(V)\n",
+ "\n",
+ "print 'Emitter current IE = ',IE,'mA'\n",
+ "print 'Collector voltage VC = ',VC,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 0.715 mA\n",
+ "Collector voltage VC = 7.85 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8-7, Page 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=-10 #collector supply voltage(V)\n",
+ "VEE=-VCC #Emitter supply voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "\n",
+ "V2=(R2/(R1+R2))*VEE #Base voltage(V)\n",
+ "IE=(V2-VBE)/RE #Emitter current(mA)\n",
+ "VC=IE*RC #collector to ground voltage(V)\n",
+ "VB=VEE-V2 #Base to ground voltage(V)\n",
+ "VE=VEE-(V2-VBE) #Emitter to ground voltage(V)\n",
+ "\n",
+ "print 'Emitter current IE = ',round(IE,2),'mA'\n",
+ "print 'Collector to ground voltage VC = ',round(VC,2),'V'\n",
+ "print 'Base to ground voltage VB = ',round(VB,2),'V'\n",
+ "print 'Emitter to ground voltage VE = ',round(VE,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 1.1 mA\n",
+ "Collector to ground voltage VC = 3.97 V\n",
+ "Base to ground voltage VB = 8.2 V\n",
+ "Emitter to ground voltage VE = 8.9 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/Chapter_9_New.ipynb b/Electronic_Principles/Chapter_9_New.ipynb
new file mode 100755
index 00000000..3fb67bca
--- /dev/null
+++ b/Electronic_Principles/Chapter_9_New.ipynb
@@ -0,0 +1,266 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 9 AC MODELS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9-1, Page 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "f=20 #frequency(Hz)\n",
+ "R=2 #Resistance(KOhm)\n",
+ "\n",
+ "XC=0.1*R #Capacitive reactance(Ohm)\n",
+ "C=(1/(2*math.pi*f*XC))*1000 #Capacitance(uF)\n",
+ "\n",
+ "print 'Capacitance C = ',round(C,2),'uF'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance C = 39.79 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9-2, Page 293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "f=1 #frequency(KHz)\n",
+ "R1=600 #Resistance1(Ohm)\n",
+ "R2=1000 #Resistance2(Ohm)\n",
+ "\n",
+ "\n",
+ "RTH=R1*R2/(R1+R2) #Thevenin resistance(Ohm)\n",
+ "XC=0.1*RTH #Capacitive reactance(Ohm)\n",
+ "C=(1/(2*math.pi*f*XC))*1000 #Capacitance(uF)\n",
+ "\n",
+ "print 'Capacitance C = ',round(C,2),'uF'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance C = 4.24 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9-3, Page 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RE=1 #Emitter resistance(KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "VEE=2 #Emitter supply voltage(V)\n",
+ "\n",
+ "IEQ=(VEE-VBE)/RE #Q point emitter current(mA)\n",
+ "iepp=0.1*IEQ*1000 #small signal emitter current(uA) \n",
+ "\n",
+ "print 'Q point emitter current IEQ = ',IEQ,'mA'\n",
+ "print 'Small signal emitter current iepp = ',iepp,'uApp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q point emitter current IEQ = 1.3 mA\n",
+ "Small signal emitter current iepp = 130.0 uApp\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9-4, Page 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=30 #Supply voltage(V)\n",
+ "RC=5 #Collector resistance (KOhm)\n",
+ "RL=100 #Emitter resistance (KOhm)\n",
+ "RB=1 #Base resistance (MOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "Bdc=100 #current gain\n",
+ "\n",
+ "IB=(VCC-VBE)/RB #Base current(mA)\n",
+ "IE=Bdc*IB/1000 #Emitter current(mA)\n",
+ "re=25/IE #AC resistance(Ohm)\n",
+ "\n",
+ "print 'Emitter current IE = ',IE,'mA'\n",
+ "print 'AC resistance re\\' = ',round(re,2),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 2.93 mA\n",
+ "AC resistance re' = 8.53 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9-5, Page 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "R1=10 #Base resistance1 (KOhm)\n",
+ "R2=2.2 #Base resistance2 (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "\n",
+ "VBB=(R2/(R1+R2))*VCC #Base voltage(V)\n",
+ "VE=VBB-VBE #Emitter voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "re=25/IE #AC resistance(Ohm)\n",
+ "\n",
+ "print 'Emitter current IE = ',round(IE,2),'mA'\n",
+ "print 'AC resistance re\\' = ',round(re,2),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 1.1 mA\n",
+ "AC resistance re' = 22.66 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9-6, Page 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "VCC=10 #collector voltage(V)\n",
+ "RC=3.6 #Collector resistance (KOhm)\n",
+ "RE=1 #Emitter resistance (KOhm)\n",
+ "RB=2.7 #Base resistance (KOhm)\n",
+ "VBE=0.7 #Base-emitter voltage drop(V)\n",
+ "VEE=2 #emitter voltage(V)\n",
+ "\n",
+ "VE=VEE-VBE #Emitter to ground voltage(V)\n",
+ "IE=VE/RE #Emitter current(mA)\n",
+ "re=25/IE #AC resistance(Ohm)\n",
+ "\n",
+ "print 'Emitter current IE = ',IE,'mA'\n",
+ "print 'AC resistance re\\' = ',round(re,2),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current IE = 1.3 mA\n",
+ "AC resistance re' = 19.23 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Principles/README.txt b/Electronic_Principles/README.txt
new file mode 100755
index 00000000..14f66cee
--- /dev/null
+++ b/Electronic_Principles/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Nitya Kothari
+Course: be
+College/Institute/Organization: DDU
+Department/Designation: Electronics and Communication En
+Book Title: Electronic Principles
+Author: Albert Malvino & David J. Bates
+Publisher: Tata Mcgraw Hill Education Private Limited
+Year of publication: 2006
+Isbn: 9780070634244
+Edition: 7th \ No newline at end of file
diff --git a/Electronic_Principles/screenshots/nitya-1.png b/Electronic_Principles/screenshots/nitya-1.png
new file mode 100755
index 00000000..9c466186
--- /dev/null
+++ b/Electronic_Principles/screenshots/nitya-1.png
Binary files differ
diff --git a/Electronic_Principles/screenshots/nitya-2.png b/Electronic_Principles/screenshots/nitya-2.png
new file mode 100755
index 00000000..b335594e
--- /dev/null
+++ b/Electronic_Principles/screenshots/nitya-2.png
Binary files differ
diff --git a/Electronic_Principles/screenshots/nitya-3.png b/Electronic_Principles/screenshots/nitya-3.png
new file mode 100755
index 00000000..e2215017
--- /dev/null
+++ b/Electronic_Principles/screenshots/nitya-3.png
Binary files differ
diff --git a/Electronics_Devices_And_Circuits/Chapter2.ipynb b/Electronics_Devices_And_Circuits/Chapter2.ipynb
new file mode 100755
index 00000000..4eb7e136
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/Chapter2.ipynb
@@ -0,0 +1,567 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7b8ef11e11019a3b1cc284475151e0d8bb5d6632f9c468e0f90289ce47134c38"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " Chapter 2: TRANSISTORS AND OTHER DEVICES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page number 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rb=200 #base resistance(ohm)\n",
+ "Vbe=0.7 #base emitter voltage drop(V) in active region \n",
+ "Vbb=5 #base voltage of bipolar transistor(V) \n",
+ "beeta=100 #current gain\n",
+ "Rc=3 #collector resistance(k ohms)\n",
+ "Vcc=10 #voltage given to the collector(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vbb-Vbe)/Rb #base current(mA) \n",
+ "Ic=beeta*Ib #collector current(mA) \n",
+ "Vcb=-Vbe-(Rc*Ic)+Vcc #collector base voltage drop(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"base current\",Ib,\"mA\" \n",
+ "print\"collector current\",Ic,\"mA\"\n",
+ "print\"reverse bias collector junction is\",Vcb,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current 0.0215 mA\n",
+ "collector current 2.15 mA\n",
+ "reverse bias collector junction is 2.85 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2,Page number 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbb=5 #base voltage of bipolar transistor(V)\n",
+ "Vbe=0.7 #base emitter voltage drop(V) in active region \n",
+ "Rb=150 #base resistance(ohm)\n",
+ "beeta=125 #curret gain \n",
+ "Rc=3 #collector resistance(k ohms) \n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Vce=0.2 #collector to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ib=(Vbb-Vbe)/Rb #base current(mA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Vcb=-Vbe-(Rc*Ic)+Vcc #collector base voltage drop(V)\n",
+ "\n",
+ "#Part b -for npn transistor\n",
+ "Vbe=0.8 #base emitter voltage drop(V) in saturation\n",
+ "Ic=(Vcc-Vce)/Rc #collector current(mA)\n",
+ "Ib=(Vbb-Vbe)/Rb #base current(mA)\n",
+ "Ibmin=Ic/beeta #minimum base current(mA) to go into saturation(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"In active region, base current is\",round(Ib/1E-3),\"*10**-3 mA and collector current is\",round(Ic,2),\"mA\" \n",
+ "print\"base current and collector current in npn are\",round((Ib/1E-3),2),\"*10**-3 mA\",\"and\",round(Ic,2),\"mA resp.\"\n",
+ "print\"base current minimum is\",round(Ibmin,3),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In active region, base current is 28.0 *10**-3 mA and collector current is 3.27 mA\n",
+ "base current and collector current in npn are 28.0 *10**-3 mA and 3.27 mA resp.\n",
+ "base current minimum is 0.026 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3,Page number 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbb=5 #base voltage of bipolar transistor(V)\n",
+ "Vbe=0.7 #base emitter voltage drop(V) in active region \n",
+ "Rb=50 #base resistance(ohm)\n",
+ "beeta=50 #current gain\n",
+ "Re=1.8 #emitter resistance(k ohms) \n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Vce=0.2 #collector to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vbb-Vbe)/(Rb+Re*(beeta+1)) #base current(mA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Ie=Ib+Ic #emitter current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"values are Ib:\",round(Ib,2),\"mA,Ic:\",round(Ic,2),\"mA and Ie:\",round(Ie,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values are Ib: 0.03 mA,Ic: 1.52 mA and Ie: 1.55 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page number 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rb=250 #base resistance(k ohms)\n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Rl=0.5 #load resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ic=Vcc/Rl #collector current(mA)\n",
+ "IbQ=(Vcc-Vbe)/Rb #Ib at operating point(uA)\n",
+ "IcQ=8 #Ic at operating point(mA)\n",
+ "VceQ=6 #Vce at operating point(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"values are IbQ:\",IbQ,\"uA,IcQ:\",IcQ,\"mA and Vcc:\",Vcc,\"V\"\n",
+ "print\"collector current Ic is\",Ic,\"mA and output voltage,vL=6-2 sinwt V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values are IbQ: 0.0372 uA,IcQ: 8 mA and Vcc: 10 V\n",
+ "collector current Ic is 20.0 mA and output voltage,vL=6-2 sinwt V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5,Page number 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vgs=12 #gate to source voltage(V)\n",
+ "Vt=4 #threshold voltage(V)\n",
+ "Id=12.8 #drain current(mA)\n",
+ "K=0.0002 #device parameter \n",
+ "Vdd=24 #drain voltage(V)\n",
+ "Vds=Vgs=8 #drain to source voltage(V) \n",
+ "\n",
+ "#Calculations\n",
+ "Id=K*((Vds-Vt)**2) #drain current at Vds=8V\n",
+ "Rd=(Vdd-Vds)/Id #drain resistance(k ohms)\n",
+ "\n",
+ "#Result\n",
+ "print\"diode resistance is\",Rd,\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode resistance is 5000.0 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7,Page number 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vds=7.5 #drain to source voltage(V)\n",
+ "Id=5 #drain current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "Vgs=-1.5 #gate to source voltage(V)\n",
+ "Vgg=-Vgs #gate voltage=gate to source voltage(V) \n",
+ "\n",
+ "#Result\n",
+ "print\"gate voltage is\",Vgg,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gate voltage is 1.5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8,Page number 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vds=7.5 #drain to source voltage(V)\n",
+ "Idss=8. #drain current for Vgs(V)\n",
+ "Vgs=2. #gate to source voltage(V)\n",
+ "Vp=4. #peak voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Id=Idss*((Vp-Vgs)/Vp)**2 #drain current(mA)\n",
+ "\n",
+ "#Result\n",
+ "print\"diode current is\",Id,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode current is 2.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10,Page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=160 #current gain\n",
+ "Vee=10 #emitter voltage(V)\n",
+ "Rb=400 #base resistance(k ohms)\n",
+ "Veb=0.8 #emitter to base voltage(V)\n",
+ "Re=2.5 #emitter resistance(k ohms)\n",
+ "Rc=1.5 #collector resistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Ib=(Vee-Veb)/((Re*(1+beeta))+Rb) #base current(uA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Ie=(beeta+1)*Ib #emitter current(mA) \n",
+ "Vce=Vee-(Re*Ie)-(Rc*Ic) #emitter to collector voltage(V) \n",
+ "Vce=-Vce #collector to emitter voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "beeta=80 #current gain \n",
+ "Ib1=(Vee-Veb)/((Re*(1+beeta))+Rb) #base current(uA)\n",
+ "Ic1=beeta*Ib1 #collector current(mA)\n",
+ "Ie1=(beeta+1)*Ib1 #emitter current(mA) \n",
+ "Vce1=-(Vee-(Ie1*Re)-(Rc*Ic1)) #collector to emitter voltage(V) \n",
+ " \n",
+ "#Result\n",
+ "print\"collector current and Vce for beeta=160 are\",round(Ic,2),\"mA\",\"and\",round(Vce,2),\"V\" \n",
+ "print\"Ic and Vce for beeta=80 are\",round(Ic,2),\"mA\",\"and\",round(Vce1,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current and Vce for beeta=160 are 1.83 mA and -2.63 V\n",
+ "Ic and Vce for beeta=80 are 1.83 mA and -5.08 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13,Page number 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import*\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "K=2 #device parameter\n",
+ "Rd=Rs=2.5*10**3 #drain resistance(k ohms)\n",
+ "R1=100*10**3 #resistance(ohms)\n",
+ "R2=200*10**3 #resistance(ohms)\n",
+ "Vdd=12 #drain voltage(V)\n",
+ "Vt=4 #threshold voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Vgg=(R2*Vdd)/(R1+R2)\n",
+ "Id=symbols('Id') #gate voltage(V)\n",
+ "expr=solve(Id**2-3.28*Id+2.56,Id)\n",
+ "print expr\n",
+ "Id=1.28\n",
+ "Vds=Vdd-5*Id\n",
+ "\n",
+ "#Result\n",
+ "print\"Id is\",Id,\"mA and Vds is\",Vds,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[1.28000000000000, 2.00000000000000]\n",
+ "Id is 1.28 mA and Vds is 5.6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14,Page number 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=2. #device parameter\n",
+ "Vt=-1. #threshold voltage(V)\n",
+ "Vdd=-12. #drain voltage(V)\n",
+ "R1=300. #resistance(kohms)\n",
+ "R2=100. #resistance(kohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vgs=-2 #gate to source voltage(V)\n",
+ "Vgg=(R2*Vdd)/(R1+R2) #gate voltage(V)\n",
+ "Id=k*((Vgs-Vt)**2) #drain current(mA)\n",
+ "Rs=(Vgs-Vgg)/Id #source resistance(k ohms) as Id=Is,Kvl in GS loop\n",
+ "Is=Id\n",
+ "\n",
+ "#Part b\n",
+ "Vds=-4 #drain to source voltage(V)\n",
+ "Rd=(-Vdd+Vds-(Is*Rs))/Id #applying kvl in DS loop\n",
+ "\n",
+ "#Part c \n",
+ "Vt=-1.5 #threshold voltage(V) \n",
+ "Vgg=-1.5 #gate voltage using Id formula \n",
+ "R2new=(Vgg*R1)/(Vdd-Vgg) #new resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)source resistance is\",Rs,\"kohm\" \n",
+ "print\"b)drain resistance is\",Rd,\"kohm\"\n",
+ "print\"c)R2new is\",round(R2new,2),\"kohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)source resistance is 0.5 kohm\n",
+ "b)drain resistance is 3.5 kohm\n",
+ "c)R2new is 42.86 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15,Page number 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vp=-4 #peak voltage(V)\n",
+ "Idss=10 #drain current for Vgs(V)\n",
+ "Vdd=18 #drain voltage(V) \n",
+ "Rs=2 #source resistance(ohms) \n",
+ "Rd=2 #drain resistance(ohms)\n",
+ "R1=450*10**3 #resistance(ohms)\n",
+ "R2=90*10**3 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Vgg=(R2*Vdd)/(R1+R2)\n",
+ "from sympy import*\n",
+ "Id=symbols('Id')\n",
+ "expr=solve(20*Id**2-148*Id+245,Id)\n",
+ "print expr\n",
+ "Id1=2.5\n",
+ "Vds=Vdd-((Rs+Rd)*Id1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Id is\",Id1,\"mA and Vds is\",Vds,\"V\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[5/2, 49/10]\n",
+ "Id is 2.5 mA and Vds is 8.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16,Page number 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vp=4 #peak voltage(V)\n",
+ "Idss=12. #drain current for Vgs(V) \n",
+ "Vdd=12 #drain voltage(V)\n",
+ "Id=4. #drain current(mA)\n",
+ "Vds=6 #drain to source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Rs=(Vp/4)*(1-(math.sqrt(Id/Idss))) #by Id=Idss(1-(Vgs/Vp))^2 and putting Vgs=4Rs in it and solving\n",
+ "Rd=((Vdd+Vds)/Id)-Rs #solving equation -Vdd-Vds+(Id*(Rd+Rs))=0 \n",
+ " \n",
+ "#Result\n",
+ "print\"source resistance is\",round(Rs,2),\"kohm\" \n",
+ "print\"drain resistance\",round(Rd,2),\"kohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source resistance is 0.42 kohm\n",
+ "drain resistance 4.08 kohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/Chapter6.ipynb b/Electronics_Devices_And_Circuits/Chapter6.ipynb
new file mode 100755
index 00000000..721c027d
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/Chapter6.ipynb
@@ -0,0 +1,545 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b6947316bc65682adaa8d93a4eda990ab9271382dd0514c03ae855d300a77db0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Feedback Amplifiers And Oscillators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1,Page number 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vo=12. #output voltage(V)\n",
+ "f=1.5*10**3 #frequency(Hz)\n",
+ "h=0.25 #second harmonic content(%) \n",
+ "ho=2.5 #reduced harmonic content of output(%)\n",
+ "A=100 #power amplifier gain\n",
+ "\n",
+ "#Calculations\n",
+ "Vd=Vo*h #second harmonic content in output(V)\n",
+ "Vd1=Vo*ho #reduced value of second harmonic content(V)\n",
+ "beta=((Vd1/Vd)-1)/A #feedback gain from formula Vd1=Vd/(1+beta*A) \n",
+ "Vs=Vo*(1+beta*A)/A #signal voltage(V) from formula (A/(1+Beta*A))*Vs \n",
+ "V=Vo/A #signal input needed without feedback \n",
+ "s=Vs/V #additional signal amplification needed before feedback amplifier\n",
+ "\n",
+ "#Results\n",
+ "print\"feedback gain is\",beta\n",
+ "print\"signal input to the overall system is\",s"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback gain is 0.09\n",
+ "signal input to the overall system is 10.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2,Page number 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "w2=10**4. #corner frequency(rad/s) \n",
+ "w2new=10**5. #new corner frequency(rad/s) \n",
+ "Ao=1000. #high frquency response \n",
+ "\n",
+ "#Calculations\n",
+ "beta=((w2new/w2)-1)/Ao #feedback factor\n",
+ "Anew=Ao/(1+beta*Ao) #overall gain of amplifier from formula w2new=w2(1+beta*Ao)\n",
+ "p=w2*Ao #gain bandwidth product without feedback from formula Anew=Ao/1+beta*Ao\n",
+ "pnew=Anew*w2new #gain bandwidth product with feedback\n",
+ "\n",
+ "#Results\n",
+ "print\"beta is\",beta\n",
+ "print\"overall gain is\",Anew\n",
+ "print\"gain-bandwidth products with and without feedback are\",p,\"and\",pnew,\"resp.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "beta is 0.009\n",
+ "overall gain is 100.0\n",
+ "gain-bandwidth products with and without feedback are 10000000.0 and 10000000.0 resp.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3,Page number 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=100. #high frquency response \n",
+ "Af=100 #gain \n",
+ "A1=A**2 #forward gain\n",
+ "A1new=50 #gain reduces to 50% \n",
+ "\n",
+ "#Calculations\n",
+ "beta=((A1/Af)-1)/A1 #feedback factor\n",
+ "Afnew=A1new**2/(1+beta*A1new**2) #new value of A\n",
+ "g=Af-Afnew #reduction in overall gain\n",
+ "\n",
+ "#Results\n",
+ "print\"% change in gain of feedback unit is\",round(g,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "% change in gain of feedback unit is 2.91\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4,Page number 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beta=0.008 #positive gain \n",
+ "\n",
+ "#Calculations\n",
+ "Ao=-(8/beta)**(1/3) #A=Ao/2,so beta(A^3)=-1\n",
+ "\n",
+ "#Results\n",
+ "print\"% change in gain of feedback unit is\",round(Ao/1E-1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "% change in gain of feedback unit is -10.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5Page number 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "from math import pi,degrees\n",
+ "\n",
+ "#Variable declarations\n",
+ "A = complex(0,60) #amplifier\n",
+ "B = complex(0,30) #amplifier\n",
+ "AB = A*B\n",
+ "C = (1+A)/AB #condition for oscillation\n",
+ "phi = cmath.phase(C) #phase\n",
+ "\n",
+ "#Result\n",
+ "print \"C =\",round(abs(C),4),\"with phase =\",round(degrees(phi),2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C = 0.0333 with phase = -90.95\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7,Page number 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rbb=8*10**3 #base resistance(k ohms)\n",
+ "eta=0.7 #efficiency\n",
+ "R1=0.2 #R1(k ohms)\n",
+ "Rt=40*10**3 #Rt(ohms)\n",
+ "Ct=0.12*10**-6 #capacitance(F)\n",
+ "Vv=2 #capacitor is charged to voltage(V)\n",
+ "Iv=10*10**-3 #current to capacitor(A)\n",
+ "Ip=10*10**-3 #peak current(A)\n",
+ "Vd=0.7 #diode voltage(V)\n",
+ "V=12. #voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rb1=eta*Rbb #base resistance(ohms) \n",
+ "Rb2=Rbb-Rb1 #base resistance(ohms)\n",
+ "\n",
+ "#Part b\n",
+ "Vp=Vd+((Rb1+R1)*V/(Rbb+R1)) #peak voltage(V)\n",
+ "\n",
+ "#Part c\n",
+ "Rtmin=(V-Vv)/Iv #Rt minimum(k ohms) \n",
+ "Rtmax=(V-Vp)/Ip #Rt minimum(k ohms) \n",
+ "\n",
+ "#Part d\n",
+ "Rb11=.12 #resistance during discharge(ohms)\n",
+ "t1=Rt*Ct*1.27 #charging time(mS)\n",
+ "t2=(Rb11+R1)*Ct*1.52 #discharging time(uS)\n",
+ "T=t1+t2 #cycle time\n",
+ "foscE=1/T #oscillations frequency(Hz)\n",
+ "foscA=1/(Rt*Ct*1.2) #oscillations frequency(Hz)\n",
+ "\n",
+ "#Part e\n",
+ "vR1=(R1*V)/(R1+Rbb) #vR1 at discharging period\n",
+ "vR1d=(R1*(Vp-Vd))/(R1+Rb11) #vR1 at discharging period\n",
+ "\n",
+ "#Results\n",
+ "print\"Rb1 and Rb2 are\",round((Rb1/1E+3),1),\"k ohms and\",round((Rb2/1E+3),1),\"k ohms resp.\"\n",
+ "print\"Vp is\",round(Vp,1),\"V\"\n",
+ "print\"Rtmin is\",round(Rtmin/1E+3),\",k ohms and Rtmax is\",round(Rtmax/1E+1),\"k ohms,hence Rt is in the range\"\n",
+ "print\"foscE is\",round(foscE),\"Hz and foscA is\",round(foscA),\"Hz\"\n",
+ "print\"vR1 is\",round((vR1/1E-3),3),\"and vRd1 is\",round(vR1d,2),\"V (range of Rt is wrong in the book)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rb1 and Rb2 are 5.6 k ohms and 2.4 k ohms resp.\n",
+ "Vp is 9.1 V\n",
+ "Rtmin is 1.0 ,k ohms and Rtmax is 29.0 k ohms,hence Rt is in the range\n",
+ "foscE is 164.0 Hz and foscA is 174.0 Hz\n",
+ "vR1 is 0.3 and vRd1 is 5.25 V (range of Rt is wrong in the book)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8,Page number 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=1500 #voltage gain\n",
+ "beta=1/25. #current gain \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Af=A/(1+A*beta) #voltage gain with feedback\n",
+ "\n",
+ "#Part b\n",
+ "g=0.1 #amplifier gain changes by 10%=0.1\n",
+ "gf=g/(1+A*beta) #% by which its gain in feedback mode changes dAf/Af\n",
+ "\n",
+ "#Results\n",
+ "print\"Amplifier gain with feedback is\",round(Af,1)\n",
+ "print\"% by which gain in feedback changes is\",round((gf/1E-2),3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplifier gain with feedback is 24.6\n",
+ "% by which gain in feedback changes is 0.164 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9,Page number 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=500 #voltage gain\n",
+ "beta=1/20. #current gain\n",
+ "Ro=50*10**3 #output resistance(ohms) \n",
+ "Ri=1.5*10**3 #input resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Af=A/(1+A*beta) #voltage gain with feedback \n",
+ "\n",
+ "#Part b\n",
+ "Rif=Ri*(1+(A*beta)) #input resistance(k ohms)\n",
+ "Rof=Ro/(1+A*beta) #output resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"Amplifier gain is\",round(Af,2)\n",
+ "print\"input resistance is\",round(Rif/1E+3),\"K ohms and output resistance is\",round((Rof/1E+2),2),\"Kohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplifier gain is 19.23\n",
+ "input resistance is 39.0 K ohms and output resistance is 19.23 Kohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10,Page number 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ro=50*10**3 #output resistance(ohms)\n",
+ "Rd=10*10**3 #drain resistance(ohms)\n",
+ "R1=800*10**3 #resistance(ohms)\n",
+ "R2=200*10**3 #resistance(ohms)\n",
+ "gm=5500*10**-6 #transconduuctance(us)\n",
+ "\n",
+ "#Calculations\n",
+ "r=(Rd*Ro)/(Rd+Ro) #Rd||Ro\n",
+ "R=R1+R2 #combined resistance of R1 and R2\n",
+ "Rl=(R*r)/(R+r) #load resistance(ohms)\n",
+ "A=-gm*Rl #voltage gain without feedback\n",
+ "beta=R2/(R1+R2) #current gain \n",
+ "Af=A/(1+A*beta) #voltage gain with feedback\n",
+ "\n",
+ "#Results\n",
+ "print\"Amplifier gain with feedback is\",round((Af/1E+1),1),\"and without feedback is\",A"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplifier gain with feedback is -4.5 and without feedback is -45.452\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11,Page number 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Re=1.25*10**3 #emitter resistance(ohms)\n",
+ "Rc=4.8*10**3 #collector resistance(ohms)\n",
+ "Rb=800*10**3 #base resistance(ohms) \n",
+ "rpi=900 #dynamic resistance(ohms)\n",
+ "Vcc=16 #supply voltage(V)\n",
+ "beta=100. #current gain \n",
+ "\n",
+ "#Calculations\n",
+ "A=-(beta/rpi) #amplifier voltage gain \n",
+ "B=-Re \n",
+ "V=(A*Rc)/(1+B*A) #V=Vo/Vs\n",
+ " \n",
+ "#Results\n",
+ "print\"Amplifier voltage gain is\",round(V,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplifier voltage gain is -3.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12,Page number 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "C1=800*10**-9 #capacitance(F)\n",
+ "C2=2400*10**-9 #capacitance(F)\n",
+ "L=50*10**-6 #inductance(H)\n",
+ "\n",
+ "#Calculations\n",
+ "Ceq=(C1*C2)/(C1+C2) #equivalent capacitance(F)\n",
+ "fo=1/(2*math.pi*math.sqrt(L*Ceq)) #output frequency(Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"the oscillation frequency is\",round((fo/1E+3),2),\"KHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the oscillation frequency is 29.06 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13,Page number 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=200*10**-9 #capacitance(F)\n",
+ "Lrcf=0.5*10**-3 #shunt across L2\n",
+ "L1=800*10**-6 #inductance(H)\n",
+ "L2=800*10**-6 #inductance(H)\n",
+ "M=200*10**-6 \n",
+ "\n",
+ "#Calculations\n",
+ "L21=(L2*Lrcf)/(L2+Lrcf) #effective value of L2(uH)\n",
+ "Leq=L1+L21+2*M #equivalent inductance(H)\n",
+ "fo=1/(2*math.pi*math.sqrt(Leq*C)) #output frequency(Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"the oscillation frequency is\",round((fo/1E+3),2),\"KHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the oscillation frequency is 9.17 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter1.ipynb b/Electronics_Devices_And_Circuits/chapter1.ipynb
new file mode 100755
index 00000000..f90f9ea5
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter1.ipynb
@@ -0,0 +1,1579 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:24516babfb49304af52e8c58a067e6fa8878e66215919fc53473493b16a99fdf"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: SEMICONDUCTORS,DIODE AND DIODE CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page number 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=6.022*10**23 #avagadro's number(/m^3)\n",
+ "d=2.7*10**6 #density of aluminium conductor(g/m^3)\n",
+ "a=26.98 # atomic weight aluminium conductor(g/g-atom)\n",
+ "D=10**4. #current density(A/m^2)\n",
+ "e=1.6*10**-19 #electronic charge(C)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "n=A*d/a #number of atoms(n/m^3)\n",
+ "\n",
+ "#Part b\n",
+ "u=D/(n*e) #drift velocity (m/s)\n",
+ "\n",
+ "#Results\n",
+ "print \"number of atoms per cubic meter is \",round(n/1e+28,3),\"*10^28 /m^3\"\n",
+ "print \"drift velocity is\",round(u/1e-6,2),\"*10^-6 m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of atoms per cubic meter is 6.026 *10^28 /m^3\n",
+ "drift velocity is 1.04 *10^-6 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page number 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=10**23 #number of electrons(n/m^3)\n",
+ "e=1.6*10**-19 #electronic charge(C) \n",
+ "u=0.4 #mobility(m^2/Vs) \n",
+ "a=10**-7 #cross sectional area(m^2) \n",
+ "l=15*10**-2 #conductor length(m)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "G=n*e*u #conductivity(S/m)\n",
+ "\n",
+ "#Part b\n",
+ "R=l/(a*G) #resistance(ohm)\n",
+ "\n",
+ "#Results\n",
+ "print\"conductivity of the conductor is\",round((G/1E+3),1),\"*10**3 S/m\"\n",
+ "print\"resistance of the conductor is\",round(R,1),\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity of the conductor is 6.4 *10**3 S/m\n",
+ "resistance of the conductor is 234.4 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page number 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=6.022*10**23 #avagadro's number\n",
+ "d=5.32*10**6 #density of Ge at 300k(g/m^3)\n",
+ "a=72.60 #atomic weight of Ge(g/g-atom)\n",
+ "e=1.6*10**-19 #electronic charge(C)\n",
+ "ni=2.4*10**19 #intrinsic concentration(electron-hole pairs/m^3)\n",
+ "un=0.39 #electron mobility(m^2/V.s)\n",
+ "up=0.19 #hole mobility(m^2/V.s)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "nA=A*d/a #number of atoms(nA/m^3)using avagadro's law\n",
+ "x=nA/ni #Germanium atoms/electron hole pair\n",
+ "\n",
+ "#Part b\n",
+ "g=(un+up)*e*ni #intrinsic conductivity(S/m)\n",
+ "r=1/g #intrinsic resistivity(ohm.m)\n",
+ "\n",
+ "#Results\n",
+ "print\"the relative concentration of Ge and electron hole pairs is\",round((x/1E9),2),\"*10^9 atoms/electron-hole pair\"\n",
+ "print\"the intrinsic resistivity of Ge is\",round(r,3),\"ohm.m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the relative concentration of Ge and electron hole pairs is 1.84 *10^9 atoms/electron-hole pair\n",
+ "the intrinsic resistivity of Ge is 0.449 ohm.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4,Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ni=1.5*10**16 #intrinsic concentration(electron-hole pairs/m^3)\n",
+ "n=4.99*10**28 #number of Si atoms(atoms/m^3)\n",
+ "un=0.13 #electron mobility(m^2/V.s)\n",
+ "up=0.05 #hole mobility(m^2/V.s)\n",
+ "e=1.6*10**-19 #electronic charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "#Part a\n",
+ "g=e*ni*(un+up) #intrinsic conductivity(S/m)\n",
+ "r=1/g #interinsic resistivity(ohm.m)\n",
+ "Nd=n/10**8 #doped silicon(atoms/m^3)=nn,majority carriers\n",
+ "pn=ni**2/Nd #minority carrier density(holes/m^3)\n",
+ "\n",
+ "#Part b\n",
+ "k=e*un*Nd #conductivity(S/m)\n",
+ " #using Nd in place of nn as Nd=nn\n",
+ "rho=1/k #resistivity(ohm.m)\n",
+ "\n",
+ "#Results\n",
+ "print\"the minority carrier density of Si is\",round(pn/1e+11,2),\"*10^11 holes/m^3\"\n",
+ "print\"the resistivity of Si is\",round((rho/1E-2),2),\"*10**-2 ohm.m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the minority carrier density of Si is 4.51 *10^11 holes/m^3\n",
+ "the resistivity of Si is 9.63 *10**-2 ohm.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5,Page number 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vo=0.7 #contact potential(V)\n",
+ "Vf=0.4 #forward biasing voltage(V) \n",
+ "\n",
+ "#Calculation\n",
+ "x=math.exp(-20*(Vo-Vf))/math.exp(-20*Vo) #increase in probability of majority carriers\n",
+ "\n",
+ "#Result\n",
+ "print\"increase in probability of majority carriers is\",round(x),\"times\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "increase in probability of majority carriers is 2981.0 times\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6,Page number 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "I=10 #Ge diode carries current(mA)\n",
+ "V=0.2 #forward bias voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "#Part a\n",
+ "Is=I/(math.expm1(40*V)-1) #reverse current(mA)\n",
+ "\n",
+ "#part b\n",
+ "I1=1*10**-3 #current(mA) \n",
+ "V1=(math.log((I1/Is)+1))/40 #voltage(V)\n",
+ "I2=100*10**-3 #current(mA) \n",
+ "V2=(math.log((I2/Is)+1))/40 #voltage(V) \n",
+ "\n",
+ "#Part c\n",
+ "Is1=4*Is #reverse saturation current doubles for every 10 degree celcius temp rise,so for 20 degree rise it will be 4 timese/ \n",
+ "x=37.44 #let x=e/kT\n",
+ "I3=Is1*(math.expm1(x*V)) #current when temp doubles(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"the reverse current is\",round(Is/1e-3,3),\"mA\" #incorrect units given in the textbook\n",
+ "print\"bias voltages are\",round(V1,3),\"V and\", round(V2,3),\"V resp\"\n",
+ "print\"Is at 20 degree is\",round(Is1/1e-3,2),\"uA and diode current at 0.2 V is\",round(I3,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the reverse current is 3.357 mA\n",
+ "bias voltages are 0.007 V and 0.086 V resp\n",
+ "Is at 20 degree is 13.43 uA and diode current at 0.2 V is 23.97 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7,Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V=3. #Voltage(V)\n",
+ "Req=300. #total resistance as per circuit(ohm)\n",
+ "Rfa=20 #forward resistance(ohm) \n",
+ "Vt=0.7 #Thevinine's voltage(V)\n",
+ "Rfb=0 #forward resistance(ohm)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "I=V/Req #current(A)\n",
+ "\n",
+ "#Part b\n",
+ "Id=(V-Vt)/Req #diode current(mA)\n",
+ "\n",
+ "#Part c\n",
+ "Rf=20 #forward resistance(ohms) \n",
+ "Id1=(V-Vt)/(Req+Rfa) #diode current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"current in this case is\",round(I,2),\"A\"\n",
+ "print\"diode current is\",round((Id/1E-3),2),\"mA\"\n",
+ "print\"diode current is\",round((Id1/1E-3),2),\"mA\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current in this case is 0.01 A\n",
+ "diode current is 7.67 mA\n",
+ "diode current is 7.19 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9,Page number 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vx=1.4 #voltage at point X(V) \n",
+ "Vt=0.7 #diode voltage(V)\n",
+ "Vcc=5 #cathode voltage(V) \n",
+ "R=1 #circuit resistance(ohm) \n",
+ "Vs=Vx-Vt #supply voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "I1=(Vcc-Vt-Vs)/R #current throgh D1(mA) for 0<Vs<0.7\n",
+ "I2=0 #current through D2 and D3\n",
+ "I1=I2=(Vcc-Vt-Vs)/R #for Vs>0.7 as D2 and D3 conducts\n",
+ "\n",
+ "#Results\n",
+ "print\"I1 for 0<Vs<0.7 is\",I1,\"mA\"\n",
+ "print\"I2 for 0<Vs<0.7 is\",I2,\"mA\"\n",
+ "print\"I1 and I2 for Vs>0.7 is\",I1,\"mA\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I1 for 0<Vs<0.7 is 3.6 mA\n",
+ "I2 for 0<Vs<0.7 is 0 mA\n",
+ "I1 and I2 for Vs>0.7 is 3.6 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11,Page number 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vz=100 #zener voltage(V)\n",
+ "Rz=25 #diode resistance(ohm)\n",
+ "Il=0.05 #load current(A)\n",
+ "Iz=0.01 #zener diode current(A)\n",
+ "Rs=250 #supply resistance(ohm)\n",
+ "\n",
+ "#Calculations\n",
+ "Vl=Vz+(Iz*Rz) #load voltage(V)\n",
+ "Vs=Vl+(Il+Iz)*Rs #supply voltage(V)\n",
+ "VL=Vl*1.01 #increase in Vl(V)\n",
+ "IZ=(VL-Vz)/Rz #increase in zener current\n",
+ "VS=Vl+(Il+IZ)*Rs #increase in supply voltage(V)\n",
+ "Vss=(VS-Vs)/Vs #%increase in supply voltage(V)\n",
+ "P=Il*VL #power consumed(W) \n",
+ "\n",
+ "#Results\n",
+ "print\"load voltage is\",Vl,\"V\"\n",
+ "print\"supply voltage is\",Vs,\"V\"\n",
+ "print\"increase in supply voltage is\",VS,\"V\"\n",
+ "print\"power consumed is\",round(P,2),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " load voltage is 100.25 V\n",
+ "supply voltage is 115.25 V\n",
+ "increase in supply voltage is 125.275 V\n",
+ "power consumed is 5.06 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.12,Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbb=5 #bias voltage(V)\n",
+ "Rl=1 #resistance(ohm)\n",
+ "Id=4.4 #from the figure(mA)\n",
+ "\n",
+ "#Part a\n",
+ "i=Vbb/Rl #load line intercepts the Id axis at i(mA)\n",
+ "Vl=Id*Rl #load voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "Vd=Vbb-Vl #diode voltage(V)\n",
+ "P=Vd*Id #power absorbed in diode(mW)\n",
+ "\n",
+ "#Part c \n",
+ "Ida=1.42 #diode current(mA)for 2V\n",
+ "Idb=7.35 #diode current(mA)for 8V\n",
+ "\n",
+ "#Part d\n",
+ "Idc=8.7 #diode current(mA)for Rl=0.5k ohm \n",
+ "Idd=2.2 #diode current(mA)for Rl=2k ohm\n",
+ "\n",
+ "#Results\n",
+ "print\"diode current is\",Id,\"mA and voltage across the load is\",Vl,\"V\"\n",
+ "print\"power absorbed in diode is\",P,\"mW\"\n",
+ "print\"diode current for Vbb=2V is\",Ida,\"mA\",\"and for Vbb=8V is\",Idb,\"mA\"\n",
+ "print\"diode current for Rl=0.5kohm is\",Idc,\"mA\",\"and for Rl=2kohm is\",Idd,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode current is 4.4 mA and voltage across the load is 4.4 V\n",
+ "power absorbed in diode is 2.64 mW\n",
+ "diode current for Vbb=2V is 1.42 mA and for Vbb=8V is 7.35 mA\n",
+ "diode current for Rl=0.5kohm is 8.7 mA and for Rl=2kohm is 2.2 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.13,Page number 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "T=300 #temperature(k)\n",
+ "Ig=100*10**-3 #current(mA)\n",
+ "Is=1*10**-9 #current(nA)\n",
+ "x=0.0259 #x=kT/e\n",
+ "\n",
+ "#Calculations\n",
+ "Voc=x*math.log(Ig/Is+1) #as Voc=kT/e*ln((Ig/Is)+1) where ln((Ig/Is)+1)=18.42 after solving \n",
+ "Isc=Ig\n",
+ "\n",
+ "#Result\n",
+ "print\"for a solar cell Voc is\",round(Voc,3),\"V and Isc is\",round(Isc/1E-3),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for a solar cell Voc is 0.477 V and Isc is 100.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.14,Page number 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Idc=0.1 #dc current(A)\n",
+ "Rf=0.5 #forward resistance(ohms)\n",
+ "Rl=20 #load resistance(ohm)\n",
+ "Rs=1 #secondary resistance of transformer(ohm)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vdc=Idc*Rl #dc voltage(V)\n",
+ "Vm=(math.pi/2)*(Vdc+Idc*(Rs+Rf)) #mean voltage(V)\n",
+ "Vrms=Vm/math.sqrt(2) #rms value of voltage(V) \n",
+ "\n",
+ "#Part b\n",
+ "Pdc=Idc**2*Rl #dc power supplied to the load\n",
+ "\n",
+ "#Part c\n",
+ "PIV=2*Vm #PIV rating for each diode(V)\n",
+ "\n",
+ "#Part d\n",
+ "Im=(math.pi/2)*Idc #peak value of current(mA)\n",
+ "Irms=Im/math.sqrt(2) #rms calue of current(A)\n",
+ "Pac=Irms**2*(Rs+Rf+Rl) #ac power input(W)\n",
+ "\n",
+ "#Part e\n",
+ "eta=(Pdc/Pac)*100 #conversion efficiency\n",
+ "\n",
+ "#Part f\n",
+ "Vr=((Rs+Rf)/Rl)*100 #voltage regulation(V)\n",
+ "\n",
+ "#results\n",
+ "print\"rms value of voltage is\",round(Vrms,2),\"V\"\n",
+ "print\"dc power supplied to load is\",Pdc,\"W\"\n",
+ "print\"PIV rating for each diode\",round(PIV,2),\"V\"\n",
+ "print\"ac input power is\",round(Pac,3),\"W\"\n",
+ "print\"conversion efficiency\",round(eta,1),\"%\"\n",
+ "print\"voltage regulation\",Vr,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of voltage is 2.39 V\n",
+ "dc power supplied to load is 0.2 W\n",
+ "PIV rating for each diode 6.75 V\n",
+ "ac input power is 0.265 W\n",
+ "conversion efficiency 75.4 %\n",
+ "voltage regulation 7.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.15,Page number 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vt=1 \n",
+ "Vl=12\n",
+ "Vm=63.63 #peak voltage(V) as Vm=sqr root of 2*45\n",
+ "Idc=8. #charging current(A)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "theta1=math.degrees(math.asin((Vt+Vl)/Vm))\n",
+ "theta2=180-theta1\n",
+ "Rl=((2*Vm*math.cos(theta1))-(2*(math.pi-2*theta1)*(Vt+Vl)))/(Idc*math.pi)\n",
+ "\n",
+ "#Part b\n",
+ "wt = lambda wt: (((((math.sqrt(2)*45*math.sin(wt))-(Vt+Vl))/Rl)*wt)**2)\n",
+ "integ,err = integrate.quad(wt, theta1 , theta2)\n",
+ "print integ\n",
+ "Irms = (integ/math.pi)**0.5\n",
+ "Pl=Irms**2*Rl #power loss in resistance(W)\n",
+ "\n",
+ "#Part c\n",
+ "P=Vl*Idc #power supplied to battery(W)\n",
+ "\n",
+ "#results\n",
+ "print\"Resistance to be added is\",round(Rl,2),\"Ohms\"\n",
+ "print\"\",Pl\n",
+ "print\"power supplied to battery is\",P,\"W\"\n",
+ "print\"\",Irms "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5703935.44277\n",
+ "Resistance to be added is 24.75 Ohms\n",
+ " 44936628.7032\n",
+ "power supplied to battery is 96.0 W\n",
+ " 1347.44908683\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.16,Page number 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rf=5 #forward resistance(ohms)\n",
+ "Vo=20 #output voltage(V)\n",
+ "Rs=10 #secondary resistance of transformer(ohm)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Idc=0.1 #dc current(A) \n",
+ "Vm=Vo*(math.sqrt(2)) #mean voltage(V)\n",
+ "Vdc=(2*Vm/(math.pi))-Idc*(Rs+2*Rf) #dc voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "Idc1=0.2 #full load dc current(A)\n",
+ "Vdc2=((2*(math.sqrt(2))*Vo)/(math.pi))-Idc1*(Rs+2*Rf) #full load dc voltage(V)\n",
+ "Rl=Vdc2/Idc1 #load resistance(ohm)\n",
+ "x=((2*Rf+Rs)/Rl)*100 #% regulation \n",
+ "\n",
+ "#Part c\n",
+ "Idc=0.2 #dc current(A)\n",
+ "Im=(math.pi)*Idc/2 #peak current(mA)\n",
+ "Ilrms=Im/math.sqrt(2) #rms current(mA)\n",
+ "Vlrms=Ilrms*Rl #load rms voltage(V) \n",
+ "\n",
+ "#Part d\n",
+ "Vldc=14 #load dc voltage(V)\n",
+ "Vlacrms=math.sqrt(Vlrms**2-Vldc**2) #rms value of ac component(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"dc voltage\",round(Vdc),\"V\"\n",
+ "print\"regulation is\",round(x,2),\"%\"\n",
+ "print\"rms value of output voltage at dc load current is\",round(Vlrms,2),\"V\"\n",
+ "print\"rms value of ac component of voltage\",round(Vlacrms,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dc voltage 16.0 V\n",
+ "regulation is 28.56 %\n",
+ "rms value of output voltage at dc load current is 15.56 V\n",
+ "rms value of ac component of voltage 6.78 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.17,Page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vh=60. #higher output voltage(V)\n",
+ "Vl=45. #lower output voltage(V) \n",
+ "fz=50. #frequency(Hz)\n",
+ "Vr=15. #peak to peak ripple voltage(V)\n",
+ "Rl=600. #resistance(ohms)\n",
+ " \n",
+ "#Calculations\n",
+ "Vldc=(Vh+Vl)/2 #avg load dc voltage(V) as voltage drops from 60 to 45\n",
+ "Idc=Vldc/Rl #dc current(A)\n",
+ "T=1/fz #discharging time(ms)\n",
+ "C=(Idc*T)/Vr #linear discharge rate(uF)\n",
+ "C1=C*2 #new capacitance(uF)\n",
+ "'''\n",
+ " CVr(p-p) 234Vr(p-p)*10^3\n",
+ "Idc = -------------- = --------------- ----(1)\n",
+ " T 20\n",
+ " \n",
+ " 60+[60-Vr(p-p) 120-Vr(p-p)\n",
+ "Idc = --------------- = ------------*1000 ----(2)\n",
+ " 2Rl 2*600\n",
+ " \n",
+ "Equating equations 1 & 2, we get, \n",
+ "'''\n",
+ "\n",
+ "Vr1 = (20*120*1000)/(1200*254)\n",
+ "Idc1=(Vh-(Vr1/2))/Rl #dc load current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of capacitance is\",round(C/1E-6),\"uF\" \n",
+ "print\"Vr1 is\",Vr1,\"V\" \n",
+ "print\"dc load current Idc is\",round(Idc1/1E-3),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitance is 117.0 uF\n",
+ "Vr1 is 7 V\n",
+ "dc load current Idc is 95.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.18,Page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vdc=30 #dc voltage(V)\n",
+ "V1=220 #source voltage(V)\n",
+ "f=50 #frequency(Hz)\n",
+ "Rl=1000 #load resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "C=100/f*Rl #as Vdc/Vr=100\n",
+ "Vm=Vdc+(Vr/2) #peak voltage(V)\n",
+ "V2=Vm/(math.sqrt(2)) #secondary voltage(V)\n",
+ "r=V1/V2 #transformer turn ratio\n",
+ "\n",
+ "#Results\n",
+ "print\"capacitor filtor is\",C,\"uF\"\n",
+ "print\"transformer turn ratio is\",round(r,2),\"\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacitor filtor is 2000 uF\n",
+ "transformer turn ratio is 10.37 \n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.19,Page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Idc=60*10**-3 #dc current(A)\n",
+ "Vm=60 #peak volage(V)\n",
+ "f=50 #frequency(Hz)\n",
+ "C=120*10**-6 #capacitance(F)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vrms=Idc/(4*(math.sqrt(3))*f*C*Vm) #rms voltage(V)\n",
+ "Vr=2*(math.sqrt(3))*Vrms #ripple factor(V)\n",
+ "\n",
+ "#Part b\n",
+ "Vdc=Vm-(Vr/2) #by simplifying\n",
+ "\n",
+ "#Part c\n",
+ "r=(Vrms/Vdc)*100 #ripple factor\n",
+ "\n",
+ "#Results\n",
+ "print\"ripple factor is\",round(Vr,3),\"Vdc\"\n",
+ "print\"dc voltage is\",round(Vdc),\"V\"\n",
+ "print\"ripple factor\",round(r,4),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ripple factor is 0.083 Vdc\n",
+ "dc voltage is 60.0 V\n",
+ "ripple factor 0.0401 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.20,Page number 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "''' 200*1.141 4\n",
+ "v1(t)=-------------(1- - cos628t) \n",
+ " 3.14 3\n",
+ " 200*1.141 800*1.141 \n",
+ "v2(t)=----------- - ------------ cos(628t+<(V2/V1))\n",
+ " 3.14 3*3.14\n",
+ "\n",
+ "V2/V1|w=0 =0.8;V2/V1|w=628 =6.43*10^-4 <V2/V1|w=628 =180\n",
+ "v2(t)=72.02+0.0538 cos628t\n",
+ "'''\n",
+ "#Part b\n",
+ "vrms=0.0538\n",
+ "vdc=math.sqrt(2)*72.02\n",
+ "r=vrms/vdc\n",
+ "\n",
+ "#Results\n",
+ "print\"ripple factor is\",round((r/1E-4),2),\"*10**-4\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ripple factor is 5.28 *10**-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.24,Page number 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vz=2 #zener voltage(V)\n",
+ "r1=10 #resistance after reducing circuit by thevinin(ohms)\n",
+ "r2=20 #resistance after reducing circuit by thevinin(ohms)\n",
+ "V1=7.5 #voltage after circuit reduction(V)\n",
+ "V2=15 #voltage after circuit reduction(V)\n",
+ "Rz=100/3 #zener resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Vab=V2-(((V2-V1)/(r1+r2))*r2) #thevinin voltage at ab(V)\n",
+ "Rth=(Vab*r2)/(Vab+r2) #thevinin resistance at ab(ohms)\n",
+ "Vd=Vab-Vz #diode voltage(V)\n",
+ "Id=Vd/(Rth+Rz) #diode current(A)\n",
+ "\n",
+ "#Results\n",
+ "print\"diode current is\",round(Id,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode current is 0.2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.25,Page number 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vd=0.7 #diode voltage(V)\n",
+ "Ro=18 #output resistance(k ohms)\n",
+ "R1=2 #diode1 resistance(k ohms)\n",
+ "R2=2 #diode2 resistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "V1=10 #voltage to D1(V)\n",
+ "V2=0 #voltage to D2(V)\n",
+ "Io=(V1-Vd)/(R1+Ro) #output current(mA) \n",
+ "Vo=Io*Ro #output voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "V1=5 #voltage to D1(V)\n",
+ "V2=0 #voltage to D2(V)\n",
+ "Io=(V1-Vd)/(R1+Ro) #output current(mA) \n",
+ "Vo1=Io*Ro #output voltage(V)\n",
+ "\n",
+ "#Part c\n",
+ "V1=10 #voltage to D1(V)\n",
+ "V2=5 #voltage to D2(V)\n",
+ "Vo=8.37 #as D1 only conducts,so,Vo is same as in part a\n",
+ "Vd1=V2-Vo #assume D1 conducts\n",
+ "Vo2=8.37 #D2 does not conduct as as Vd1 is negative\n",
+ "\n",
+ "#Part d\n",
+ "V1=V2=5 #voltage to D1 and D2(V) \n",
+ "Id1=(V1-Vd-Vo)/2 #diode1 current(mA) \n",
+ "Io=Vo/Ro #output current(mA) \n",
+ "Vo3=(Ro*(V1-Vd))/(Ro+1) #output voltage(V)\n",
+ "\n",
+ "print\"a)output voltage is\",Vo,\"V\"\n",
+ "print\"b)output voltage is\",Vo1,\"V\"\n",
+ "print\"c)output voltage is\",Vo2,\"V\"\n",
+ "print\"d)output voltage is\",round(Vo3,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)output voltage is 8.37 V\n",
+ "b)output voltage is 3.87 V\n",
+ "c)output voltage is 8.37 V\n",
+ "d)output voltage is 4.07 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.26,Page number 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vs=10. #supply voltage(V) \n",
+ "Rs=1 #supply resistane(ohm)\n",
+ "Vl=10. #load voltage(V)\n",
+ "Vi=50. #nput voltage(V)\n",
+ "Iz=32 #zener diode current(mA)\n",
+ "Is=40 #supply current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a (Rl is min when Iz=0) \n",
+ "Is=(Vi-Vs)/Rs #source current(mA) \n",
+ "Rlmin=Vl/(Vi-Vs) #load resistance minimum(ohm) \n",
+ "\n",
+ "#Part b(Rl is maximum when Iz=32 mA) \n",
+ "Il=(Is-Iz)*10**-3 #load current(A) \n",
+ "Rlmax=Vl/Il #maximum load resistance(k ohms)\n",
+ "P=Vl*Iz #max diode wattage consumed(mW)\n",
+ "\n",
+ "#Results\n",
+ "print\"Range of Rl is\",round((Rlmin/1E-3),3),\"ohm\",\"to\", round((Rlmax/1E+3),2),\"k ohm\" \n",
+ "print \"Il = \",(Il/1E-3),\"*10**-3 A\"\n",
+ "print\"max power consumed is\",P,\"mW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Range of Rl is 250.0 ohm to 1.25 k ohm\n",
+ "Il = 8.0 *10**-3 A\n",
+ "max power consumed is 320.0 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.27,Page number 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vz=20 #zener voltage(V)\n",
+ "Izmax=50 #maximum zener current(mA)\n",
+ "Rz=0 #zener resistance(ohms)\n",
+ "Rl=2. #load resistance(ohm)\n",
+ "Vl=20. #as Vz=Vl(V)\n",
+ "Rs=0.25 #source resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Il=Vl/Rl #load current(mA) \n",
+ "Vsmin=(Rs+Rl)*Il #as Iz is floating so Iz=0\n",
+ "\n",
+ "#Part b\n",
+ "Is=Izmax+Il #source current(mA) \n",
+ "Vsmax=Vz+(Is*Rs) #maximum source voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"Vsmin\",round(Vsmin,1),\"V\"\n",
+ "print\"Range of input voltage is\",round(Vsmin,1),\"to\", Vsmax,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Il is 10.0 mA\n",
+ "Vsmin 22.5 V\n",
+ "Range of input voltage is 22.5 to 35.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.28,Page number 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ilmax=100 #load maximum current(mA)\n",
+ "Ilmin=0 #load minimum current(mA)\n",
+ "Rz=0.05 #zener diode resistance(ohms)\n",
+ "Rs=10. #source resistance(k ohms)\n",
+ "Vl=16.015 #load voltage(V)\n",
+ "Vl1=16. #nominal load voltage(V) \n",
+ "Vs=20 #source voltage(V)\n",
+ "Vz=16 #zener diode voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Case 1 (i)\n",
+ "Iz=(Vl-Vl1)/Rz #zener current(mA)\n",
+ "Is=Iz+Ilmax #supply current(A)\n",
+ "\n",
+ "#Case 1 (ii)\n",
+ "Is1=(Vs-Vz)/(Rs+Rz) #supply current(mA)\n",
+ "Vl2=Vl1+(Is1*Rz) #voltage(V) \n",
+ "Vr=((Vl2-Vl)/Vl1)*100 #voltage regulation\n",
+ "\n",
+ "#Case 2 (i)\n",
+ "Vs=18 #supply voltage(V)\n",
+ "Ilmax=0.1 #load current max(A)\n",
+ "Vl=16.005 #load voltage(V)\n",
+ "Iz=(Vl-Vl1)/Rz #zener current(mA)\n",
+ "Is2=Ilmax+Iz #supply current(A)\n",
+ "\n",
+ "#Case 2 (ii)\n",
+ "Ilmin=0\n",
+ "Iz1=(Vs-Vl1)/(Rs+Rz) #minimum diode current(mA) \n",
+ "Vl=Vl1+(Iz*Rz) #load voltage at Ilmin(V) \n",
+ "\n",
+ "#Part a\n",
+ "#Variable declaration\n",
+ "Is=0.4 #supply current(A)\n",
+ "Vs=20 #supply voltage(V) \n",
+ "Vl=16.015 #load voltage(V)\n",
+ "Iz=0.3 #zener current(mA)\n",
+ "\n",
+ "#Calculations\n",
+ "P=Is**2*Rs #power dissipated by Rs(W)\n",
+ "\n",
+ "#Part b\n",
+ "Pd=Vl*Iz #power dissipated(W)\n",
+ "Po=(Vs**2)/Rs #output power(W)\n",
+ "\n",
+ "print\"maximum power dissipated by Rs is\",P,\"W\"\n",
+ "print\"maximum power dissipated by diode is\",round(Pd,3),\"W\"\n",
+ "print\"minimum diode current is\",round(Iz1,3),\"A\"\n",
+ "print\"voltage regulation is\",round(Vr,2),\"%\"\n",
+ "print\"output shorted will be\",Po,\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum power dissipated by Rs is 1.6 W\n",
+ "maximum power dissipated by diode is 4.804 W\n",
+ "minimum diode current is 0.199 A\n",
+ "voltage regulation is 0.03 %\n",
+ "output shorted will be 40.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.29,Page number 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vrms=20 #secondary voltage(V)\n",
+ "Rs=10 #Winding resistance(ohm)\n",
+ "Rf=5 #diode has forward resistance(ohms)\n",
+ "Idc=2*10**-3 #load current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Vdc=(Vrms*(math.sqrt(2)))/(math.pi) #no load Vdc\n",
+ "\n",
+ "#Part b \n",
+ "Vldc=Vdc-(Idc*(Rs+Rf)) #dc output voltage when load is 20mA\n",
+ "\n",
+ "#Part c\n",
+ "Rl=Vldc/Idc #load resistance(ohms)\n",
+ "r=((Rs+Rf)/Rl)*100 #percentage regulation(%)\n",
+ "\n",
+ "#Part d\n",
+ "Im=Idc*(math.pi) #peak current(mA)\n",
+ "Ilrms=Im/2 #rms load current(mA) \n",
+ "Vlrms=Ilrms*Rl #rms load voltage(V) \n",
+ "Vlrmsac=math.sqrt((Vlrms**2)-(Vldc**2)) #Ripple voltage rms(V)\n",
+ "f=50*2 #rippLe frequency(Hz)\n",
+ "\n",
+ "#Part e\n",
+ "eta=(((2*(math.pi))**2)/(1+((Rs+Rf)/Rl)))*100 #efficiency\n",
+ "\n",
+ "#Part f\n",
+ "PIV=Vm=Vrms*(math.sqrt(2)) #peak inverse voltage(V) \n",
+ "\n",
+ "#Results\n",
+ "print\"no load dc voltage is\",round(Vdc),\"V\" \n",
+ "print\"dc output voltage when the load is drawing 20 mA is\",round(Vldc,2),\"V\"\n",
+ "print\"percentage regulation at this load is\",round((r/1E-1),2),\"%\"\n",
+ "print\"ripple voltage rms is\",round(Vlrmsac,2),\"V and ripple frequency is\",f,\"Hz\"\n",
+ "print\"power conversion efficiency is\",round((eta/1E+2),1),\"%\"\n",
+ "print\"PIV is\",round(PIV),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "no load dc voltage is 9.0 V\n",
+ "dc output voltage when the load is drawing 20 mA is 8.97 V\n",
+ "percentage regulation at this load is 3.34 %\n",
+ "ripple voltage rms is 10.87 V and ripple frequency is 100 Hz\n",
+ "power conversion efficiency is 39.3 %\n",
+ "PIV is 28.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.30,Page number 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vl=24 #battery voltage(V)\n",
+ "Vm=60*(math.sqrt(2)) #peak voltage(V)\n",
+ "Ip=2.5 #peak current(A)\n",
+ "c=20 #charge(Ah)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "theta=math.asin(Vl/Vm) #angle at which conduction begins\n",
+ "Rs=(Vm-Vl)/Ip #source resistance(ohms) \n",
+ "\n",
+ "#Part b\n",
+ "Idc=(Vm/(math.pi)*Rs)*(math.cos(theta))-(((math.pi)-(2*theta))/2*math.pi)*(Vl/Rs) #load current(A)\n",
+ "T=c/Idc #time to deliver 20Ah(h)\n",
+ "\n",
+ "#Results\n",
+ "print\"resistance connected in series is\",round(Rs,1),\"ohm\"\n",
+ "print\"time required to deliver a charge of 20 Ah is\",round((T/1E-3),1),\"h\" \n",
+ "print\"Idc\",round((Idc/1E+3),2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance connected in series is 24.3 ohm\n",
+ "time required to deliver a charge of 20 Ah is 31.9 h\n",
+ "Idc 0.63 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.32,Page number 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=25. #external resistance(ohms)\n",
+ "Vm=200. #peak value of voltage(V) as vs=200 sinwt\n",
+ "Rf=50. #forward resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Id=Vm/(2*Rf+R) #diode current(peak)\n",
+ "\n",
+ "#Part b \n",
+ "Idc=(2*Id)/math.pi #dc current(A)\n",
+ "\n",
+ "#Part c\n",
+ "PIV=Vm/2 #peak value of voltage across D1\n",
+ "PIVac=100/math.pi #average value of voltage across D1\n",
+ "\n",
+ "#Part d\n",
+ "Im=Id #peak value of current(A)\n",
+ "Irms=Im/(math.sqrt(2)) #rms value of current(A)\n",
+ "\n",
+ "#Results\n",
+ "print\"peak value of current is\",Id,\"A\"\n",
+ "print\"dc currect is\",round(Idc,2),\"A\"\n",
+ "print\"across D1 are peak voltage is\",PIV,\"V and average voltage is\",round(PIVac,1),\"V\"\n",
+ "print\"Irms is\",round(Irms,2),\"A\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak value of current is 1.6 A\n",
+ "dc currect is 1.02 A\n",
+ "across D1 are peak voltage is 100.0 V and average voltage is 31.8 V\n",
+ "Irms is 1.13 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.33,Page number 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=50. #frequency(Hz)\n",
+ "dv=7. #difference between maximum and minimum(25-18)voltages across the load(V)\n",
+ "Ic=100. #load current(mA)\n",
+ "\n",
+ "#Calculations\n",
+ "dt=1/(2*f) #time of discharge(seconds)\n",
+ "C=Ic/(dv/dt) #capacitance(uF) \n",
+ "\n",
+ "#Results\n",
+ "print\"value of capacitor is\",round((C/1E-3),2),\"uF\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitor is 142.86 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.34,Page number 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vr=10. #peak to peak ripple voltage(V)\n",
+ "Vm=50. #peak output voltage(V) \n",
+ "C=300. #Capacitance(uF)\n",
+ "Rl=470. #load resistance(ohms)\n",
+ "f=50. #frequency(Hz)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Vdc=Vm-(Vr/2) #dc voltage(V) \n",
+ "C=Vdc/(f*Vr*Rl) #capacitance(mF)\n",
+ "\n",
+ "#Part b\n",
+ "C1=300*10**-6 #capacitance is increased(uF)\n",
+ "Vr=2*Vm/((2*f*C1*Rl)+1)\n",
+ "Vdc=Vm-Vr/2 #load voltage ripple(V)\n",
+ "Idc=Vdc/Rl #average load current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of capacitor is\",round((C/1E-6),1),\"mF\" \n",
+ "print\"load voltage ripple is\",round(Vdc,2),\"V and average load current is\",round((Idc/1E-4),1),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitor is 191.5 mF\n",
+ "load voltage ripple is 46.69 V and average load current is 993.4 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.35,Page number 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "vo=7.5 #instantaneous voltage(V)\n",
+ "R1=15 #resistance(k ohms)\n",
+ "Von=0.5 #voltage of diode when on(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Rth=(R1*vo)/(R1+vo) #equivalent resistance(V)\n",
+ "T=2*(math.pi)/10**4 #time period(ms)\n",
+ "t1=(math.asin(Von/2.5))/10**4 #timimgs when D1 conducts(ms)\n",
+ "t2=(T/2)-t1\n",
+ "\n",
+ "#Results\n",
+ "print\"time period is\",round((T/1E-3),3),\"ms\"\n",
+ "print\"t1 is\",t1,\"ms\"\n",
+ "print \"t2 is\",round((t2/1E-3),3),\"ms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time period is 0.628 ms\n",
+ "t1 is 2.0135792079e-05 ms\n",
+ "t2 is 0.294 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.36,Page number 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declarations\n",
+ "v=12 #output voltage(V)\n",
+ "vm=20. #peak voltage(V)\n",
+ "v1=8 #output voltage(V) for negative half cycle\n",
+ "vm1=20. #peak voltage(V) for negative half cycle \n",
+ "\n",
+ "#Calculations\n",
+ "t1=(math.asin(v/vm))/10**4 #for positive half cycle when D1 conducts\n",
+ "t2=(0.1*math.pi)-t1/1e-3 \n",
+ "t3=(math.asin(v1/vm1))/10**4 #for negative half cycle when D2 conducts\n",
+ "t4=(0.1*(math.pi))+t3/1e-3 \n",
+ "t5=(0.2*(math.pi))-t3/1e-3\n",
+ "\n",
+ "#Results\n",
+ "print\"t1 is\",round(t1/1e-3,3),\"ms\"\n",
+ "print\"t2 is\",round(t2,2),\"ms\"\n",
+ "print\"t3 is\",round(t3/1e-3,3),\"ms\"\n",
+ "print\"t4 is\",round(t4,3),\"ms\"\n",
+ "print\"t5 is\",round(t5,3),\"ms\"\n",
+ "print\"vo is\",\"-5.33+6.66*sin(10**4*.15)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "t1 is 0.064 ms\n",
+ "t2 is 0.25 ms\n",
+ "t3 is 0.041 ms\n",
+ "t4 is 0.355 ms\n",
+ "t5 is 0.587 ms\n",
+ "vo is -5.33+6.66*sin(10**4*.15)\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter10.ipynb b/Electronics_Devices_And_Circuits/chapter10.ipynb
new file mode 100755
index 00000000..3c27caf6
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter10.ipynb
@@ -0,0 +1,458 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9c34cda4904ac6fe0f4810cba9f641b26f332071fb989df77b245e43b46b8b6c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Circuit Theory"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1,Page number 477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "i1=4. #current through r1(A) \n",
+ "v3=3 #voltage(V)\n",
+ "v4=8 #voltage(V)\n",
+ "r3=3 #resistance(ohms)\n",
+ "r2=2 #resistance(ohms)\n",
+ "r4=4 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "i3=v3/r3 #current through r3(A)\n",
+ "i4=v4/r4 #current through r4(A)\n",
+ "i2=-(i3+i4-i1)/2 #current through r2(A)\n",
+ "v2=i2*r2 #voltage through r2(V)\n",
+ "\n",
+ "#Result\n",
+ "print\"v2 is\",v2,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v2 is 1.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2,Page number 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v1=6 #current through r1(A) \n",
+ "i2=2 #voltage through r3(V)\n",
+ "i3=4 #voltage through r4(V)\n",
+ "r3=2 #resistance(ohms)\n",
+ "v3=3 #voltage through r3(ohms)\n",
+ "r2=2 #resistance(ohms)\n",
+ "r4=3 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "v2=i2*r2 #voltage through r2(ohms)\n",
+ "v3=i3*r3 #voltage through r3(ohms)\n",
+ "v4=4*i2+v3-v2-v1 #voltage through r4(ohms)\n",
+ "i4=v4/r4 #current through r4(A)\n",
+ "\n",
+ "#Result\n",
+ "print\"i4 is\",i4,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i4 is 2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3,Page number 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Calculations\n",
+ "a=np.array([[7,-3,-4],[-3,6,-2],[-4,-2,11]]) #solving three linear mesh equations\n",
+ "b=np.array([-11,3,25])\n",
+ "x=np.linalg.solve(a,b)\n",
+ "x\n",
+ "v=x[2]-x[1] #voltage across 2mho conductance(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"v is\",v,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v is 1.0"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4,Page number 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=20 #resistance across which voltage is to be calculated(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "a=np.array([[35,-20],[-20,50]]) #solving two linear mesh equations\n",
+ "b=np.array([50,-100])\n",
+ "x=np.linalg.solve(a,b)\n",
+ "x\n",
+ "i=x[0]-x[1] #current through 20 ohms resistor(ohms)\n",
+ "V=20*i #voltage across 20 ohms(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"i is\",round(i,2)\n",
+ "print\"voltage across 20 ohms is\",round(V,1),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i is 2.22\n",
+ "voltage across 20 ohms is 44.4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5,Page number 484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vs=16. #source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part b\n",
+ "I=0 #current through 10 V\n",
+ "Is=-4*(I-(Vs/32)) #current of current source(A)\n",
+ "\n",
+ "#Part c\n",
+ "Is1=16 #current of current source(A)\n",
+ "I=0 #current through 10 V\n",
+ "Vs1=(I+(Is1/4))*32 #source voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"Is is\",Is,\"A\"\n",
+ "print\"Vs1 is\",Vs1,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Is is 2.0 A\n",
+ "Vs1 is 128 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6,Page number 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V=9 #voltmeter of voltage(V)\n",
+ "i=9 #ammeter current of 9V\n",
+ "r1=1 #resistance(ohms)\n",
+ "r2=3 #resistance(ohms)\n",
+ "r=5 #resistance parallel to ammeter(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Isc=((i*r)-V)/(r1+r) #short circuiting a and b and converting current source to a voltage source(A)\n",
+ "Ro=((r+r1)*r2)/((r+r1)+r2) #output resistance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"Isc is\",Isc,\"A\"\n",
+ "print\"Ro is\",Ro,\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Isc is 6 A\n",
+ "Ro is 2 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7,Page number 495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "import math\n",
+ "from sympy import *\n",
+ "import sympy\n",
+ "\n",
+ "#Variable declaration\n",
+ "t = symbols('t') #symbol defined\n",
+ "et1 = complex(50,86.6) #defining complex number\n",
+ "\n",
+ "#calculations\n",
+ "et = (et1.real*sympy.sqrt(2)*sympy.cos(314*t))+et1.imag*sympy.sqrt(2)*sympy.cos(314*t+90) #expression\n",
+ "\n",
+ "#Result\n",
+ "print et"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "50.0*sqrt(2)*cos(314*t) + 86.6*sqrt(2)*cos(314*t + 90)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.9,Page number 506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "import math\n",
+ "from sympy import *\n",
+ "import sympy\n",
+ "\n",
+ "#Variable declarations\n",
+ "V1, V2=symbols('V1 V2')\n",
+ "\n",
+ "#Calculations\n",
+ "V = 0.3*V1 #voltage(V)\n",
+ "I1 = 0.007*V1 #current \n",
+ "y11 = I1/V1 #y parameter\n",
+ "\n",
+ "I2 = -V/40 #current \n",
+ "y21 = I2/V1 #y parameter\n",
+ "\n",
+ "I2 = V2/(((40+100)*200.)/((40+100)+200.)) #y parameter\n",
+ "y22 = I2/V2 #incorrect answer in textbook #y parameter\n",
+ "\n",
+ "I1 = (-I2*200)/300 #current \n",
+ "y12 = I1/V2 #incorrect answer in textbook #y parameter\n",
+ "\n",
+ "#Results\n",
+ "print \"y11+y12 is\",round(y11+y12,5),\"mho\"\n",
+ "print \"y22+y12 is\",round(y22+y12,5),\"mho\"\n",
+ "print \"y21-y12 is\",round(y21-y12,5),\"mho\"\n",
+ "print \"\\n(The difference in answers is due to the y12 and y21 values calculated wrongly in the textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "y11+y12 is -0.0011 mho\n",
+ "y22+y12 is 0.00405 mho\n",
+ "y21-y12 is 0.0006 mho\n",
+ "\n",
+ "(The difference in answers is due to the y12 and y21 values calculated wrongly in the textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10,Page number 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "\n",
+ "#port 2 open circuited,port 1 excited\n",
+ "z11=1075+1075j #as z11=V1/I1=(1.52<45)/(10**-3<0)=1075+1075j\n",
+ "z21=2022-1075j #as z21=V2/I1=(2.29<-28)/(10**-3<0)=2022+1075j\n",
+ "\n",
+ "#port 1 open circuited and port 2 excited\n",
+ "z12=-1075j #as z12=V1/I2=(1.075<-90)/(10**3<0)=-1075j\n",
+ "z22=751-1073j #as z22=V2/I2=(1.31<-55)/(10**-3<0)=751-j1073\n",
+ "\n",
+ "#Calculations\n",
+ "z=z11-z12 #parameters with reference to circuit\n",
+ "z1=z22-z12\n",
+ "z2=z21-z12\n",
+ "\n",
+ "#Results\n",
+ "print\"z11-z12(z) is\",z\n",
+ "print\"z22-z12(z1) is\",z1\n",
+ "print\"z21-z12(z2) is\",z2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "z11-z12(z) is (1075+2150j)\n",
+ "z22-z12(z1) is (751+2j)\n",
+ "z21-z12(z2) is (2022+0j)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.11,Page number 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V2=6/7. #voltage source(V)\n",
+ "\n",
+ "#Calculations \n",
+ "Rth=V2 #thevinin resistance(ohms)\n",
+ "Zl=Rth #load resistance(ohms)\n",
+ "\n",
+ "#Result\n",
+ "print\"load resistance is\",round(Zl,3),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load resistance is 0.857 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter11.ipynb b/Electronics_Devices_And_Circuits/chapter11.ipynb
new file mode 100755
index 00000000..4150f842
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter11.ipynb
@@ -0,0 +1,170 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9ece3b9f8730ff4f15d623a124d9415b373cdc935ed6cb089360bef5516a2604"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " Chapter 11: Cathode Ray Oscilloscope"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2,Page number 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E=120 #electric field(V/m) \n",
+ "B=5*10**-5 #magnetic field(T) \n",
+ "q=1.6*10**-19 #charge on electron(C)\n",
+ "u=10**6 #velocity of electron(m/s)\n",
+ "m=9.1*10**-31 #mass of electron(Kg) \n",
+ "a=9.81 #acceleration of gravitation(m/s^2)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "fe=q*E #force on electron due to electric field(N)\n",
+ "\n",
+ "#Part\n",
+ "fm=B*q*u #force on electron due to magnetic field(N)\n",
+ "\n",
+ "#Part c\n",
+ "fg=m*a #force on electron due to gravitational field(N)\n",
+ "\n",
+ "#Results\n",
+ "print\"force on electron due to electric field is\",fe,\"N\"\n",
+ "print\"force on electron due to magnetic field is\",fm,\"N\"\n",
+ "print\"force on electron due to gravitational field is\",fg,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "force on electron due to electric field is 1.92e-17 N\n",
+ "force on electron due to magnetic field is 8e-18 N\n",
+ "force on electron due to gravitational field is 8.9271e-30 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3,Page number 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=1200. #temperature(k)\n",
+ "T2=1000. #temperature(k)\n",
+ "Ww=1.2*10**5 #work function(eV)\n",
+ "k=8.62\n",
+ "Ie1=200 #emission current density\n",
+ "T3=1500. #temperature(k)\n",
+ "\n",
+ "#Calculations\n",
+ "Ie2=Ie1*(T2/T1)**2*math.exp(-(Ww/k)*((1/T2)-(1/T1))) #current density(mA/cm^2) at 1000k\n",
+ "Ie3=Ie1*(T3/T1)**2*math.exp(-(Ww/k)*((1/T3)-(1/T1))) #current density(mA/cm^2) at 1000k\n",
+ "\n",
+ "#Results\n",
+ "print\"current density at 1000 k is\",round(Ie2,2),\"mA/cm^2\"\n",
+ "print\"current density at 1500 k is\",round(Ie3,2),\"mA/cm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current density at 1000 k is 13.65 mA/cm^2\n",
+ "current density at 1500 k is 3180.49 mA/cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4,Page number 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ls=40 #distance from screen(m)\n",
+ "d=1.5 #distance between plates(cm)\n",
+ "Va=1200 #accelerating potential(V) \n",
+ "L=3 #length of CRT(m)\n",
+ "e=1.6*10**-19 #charge on electron(C)\n",
+ "m=9.1*10**-31 #mass of electron(Kg) \n",
+ "Y=4*10**-2 #vertical deflection(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "U=math.sqrt((2*e*Va)/m) #velocity of electron upon striking screen(m/s)\n",
+ "\n",
+ "#Part\n",
+ "Vd=(2*d*Va*Y)/(L*Ls) #deflecting voltage(V)\n",
+ "\n",
+ "#Part c\n",
+ "Vdmax=(m*d**2*U**2)/(e*L**2) #maximum allowable deflection(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"velocity of electron upon stricking the screen is\",round((U/1E+7),3),\"*10^7 m/s\"\n",
+ "print\"deflecting voltage is\",round(Vd/1E-2),\"V\"\n",
+ "print\"maximum allowable deflection is\",Vdmax,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of electron upon stricking the screen is 2.054 *10^7 m/s\n",
+ "deflecting voltage is 120.0 V\n",
+ "maximum allowable deflection is 600.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter3.ipynb b/Electronics_Devices_And_Circuits/chapter3.ipynb
new file mode 100755
index 00000000..b37b068d
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter3.ipynb
@@ -0,0 +1,1540 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cb1edbf7476adce6aba9bf1488bee35026e4b80ac8b3b01d96344eaf38909822"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Chapter 3: SMALL SIGNAL MODELS,AMPLIFICATION AND BIASING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1,Page number 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=100 #current gain\n",
+ "Ic=2.5 #collector current(mA)\n",
+ "Io=-0.5 #output current(mA) \n",
+ "Rl=2.5 #load resistance(kohm)\n",
+ "\n",
+ "#Calculations\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(ohms)\n",
+ "Ib=Io/(-beeta) #as Io=-beeta*Ib\n",
+ "Vs=rpi*Ib #signal voltage(V)\n",
+ "Vo=Rl*Io #output voltage(V)\n",
+ "Av=Vo/Vs #voltage gain\n",
+ "Ai=Io/Ib #current gain\n",
+ "\n",
+ "#Results\n",
+ "print\"signal voltage is\",Vs,\"mV\"\n",
+ "print\"current gain is\",Ai\n",
+ "print\"voltage gain is\",round(Av/1E-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "signal voltage is 5.0 mV\n",
+ "current gain is -100.0\n",
+ "voltage gain is -250.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2,Page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Id=1.6 #drain current(mA)\n",
+ "Vgs=-3 #gate to source voltage(V)\n",
+ "Id1=.4 #drain current(mA)\n",
+ "Vgs1=-4 #gate to source voltage(V) \n",
+ "Vp=-5 #peak voltage(V) by solving equations 1.6=Idss(1+3/Vp)^2 and .4=Idss(1+4/Vp)^2\n",
+ "Idss=10 #small signal drain current(mA) by solving equations 1.6=Idss(1+3/Vp)^2 and .4=Idss(1+4/Vp)^2\n",
+ " \n",
+ "#Calculations\n",
+ "gmo=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gmo*(math.sqrt(Id/Idss)) #transconductance(uS)\n",
+ "gm1=gmo*(math.sqrt(Id1/Idss)) #transconductance(uS) \n",
+ "\n",
+ "#Results\n",
+ "print\"Idss and Vp are\",Idss,\"mA and\",Vp,\"V\"\n",
+ "print\"gmo is\",gmo,\"mS\"\n",
+ "print\"gm at Id is\",round(gm/1E-3),\"and gm at Id1 is\",round(gm1/1E-3),\"uS\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Idss and Vp are 10 mA and -5 V\n",
+ "gmo is 4 mS\n",
+ "gm at Id is 1600.0 and gm at Id1 is 800.0 uS\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3,Page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "gm=1600 #gm(us)\n",
+ "rd=50 #resistance(kohms)\n",
+ "Rl=5 #load resistance(kohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Av=-gm*Rl #Vgs=Vs from circuit model\n",
+ " #Vo=-(gm*Vgs)*Rl\n",
+ " #as Av=Vo/Vs=-gm*Rl \n",
+ "\n",
+ "#Result\n",
+ "print\"voltage gain of the circuit is\",round(Av/1E+3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain of the circuit is -8.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4,Page number 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beta=100. #current gain\n",
+ "rpi=2*10**3 #dynamic resistance(ohms)\n",
+ "rx=500 #resistance(ohms)\n",
+ "ro=250*10**3 #output resistance(ohms)\n",
+ "R1=50*10**3 #resistance(k ohms) \n",
+ "R2=10*10**3 #resistance(k ohms)\n",
+ "Rc=5*10**3 #collector current(k ohms) \n",
+ "Rl=5*10**3. #load current(k ohms)\n",
+ "Rs=1*10**3 #source resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=(R1*R2)/(R1+R2) #equivalent resistance of R1 and R2(kohms)\n",
+ "r=rpi+rx #series resistance of rpi and rx(k ohms) \n",
+ "gm=beta/rpi #transconductance(mS)\n",
+ "Vo=-gm*((Rc*Rl)/(Rc+Rl))*.526 #output voltage(V) as \n",
+ "Av=Vo #voltage gain\n",
+ "Ai=Av*((Rs+((Rb*r)/(Rb+r)))/Rl) #current gain \n",
+ "\n",
+ "#Results\n",
+ "print\"source to load voltage gain is\",Av\n",
+ "print\"source to load current gain is\",Ai,\"(Solution given in the textbook is incorrect)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source to load voltage gain is -65.75\n",
+ "source to load current gain is -38.43745 (Solution given in the textbook is incorrect)\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5,Page number 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beta=100. #current gain\n",
+ "rd=50*10**3 #internal dynamic resistance(ohms\n",
+ "gm=5*10**-3 #transconductance(mS)\n",
+ "R1=50*10**3 #resistance(ohms) \n",
+ "R2=10*10**3 #resistance(ohms)\n",
+ "Rs=10*10**3 #source current(ohms) \n",
+ "Rg=1*10**6. #gate resistance(ohms)\n",
+ "Rd=10*10**3 #drain resistance(ohms)\n",
+ "\n",
+ "#Calculations \n",
+ "Vgs=(Rg/(Rs+Rg)) #gate to source voltage (V) as Vgs=Vs((Rg/(Rs+Rg)) \n",
+ "Av=-Vgs*gm*((rd*Rd)/(rd+Rd)) #voltage gain,Av=Vo/Vs and Vo=-gmVgs(rd||Rd)\n",
+ "Ai=Av*((Rs+Rg)/Rd) #current gain\n",
+ "\n",
+ "#Results\n",
+ "print\"source to load voltage gain is\",round(Av)\n",
+ "print\"source to load current gain is\",round(Ai)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source to load voltage gain is -41.0\n",
+ "source to load current gain is -4167.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6,Page number 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rs=500 #collector current(k ohms) \n",
+ "Io=-1*10**-3 #output current(mA) \n",
+ "Rc=5*10**3. #collector resistance(ohms)\n",
+ "hie=2*10**3\n",
+ "hoe=10*10**-6. \n",
+ "hfe=100.\n",
+ "hre=5*10**-4\n",
+ "Rb=50*10**3. #base resistance(ohms)\n",
+ "\n",
+ "#Calculations \n",
+ "Io1=-1/(1+Rc*hoe)*hfe #as Io=-1/(1+Rc*hoe)*hfe*Ib \n",
+ "Ib=-1/Io1 #base current(uA)\n",
+ "Vo=Io*Rc #output voltage(V)\n",
+ "Vi=hie*Ib+Vo*hre #input voltage(V)\n",
+ "Is=Ib+Vi/Rb #source current(ohms)\n",
+ "Ai=Io/Is #current gain\n",
+ "Vs=(Is*Rs)+Vi #source voltage(V)\n",
+ "Av=Vo/Vs #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"source to load voltage gain is\",round(Av/1E-3)\n",
+ "print\"source to load current gain is\",round(Ai/1E-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source to load voltage gain is -189.0\n",
+ "source to load current gain is -92.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7,Page number 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=100. #current gain \n",
+ "Ic=4. #collector current(mA)\n",
+ "Vbe=0.7 #base to emitter voltage(V) \n",
+ "Re=2. #emitter resistance(ohms)\n",
+ "Vcc=32. #supply voltage(V)\n",
+ "abeeta=40. #actual current gain\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Ic/beeta #base current(mA)\n",
+ "Rb=(Vcc-Vbe-((Ib+Ic)*Re))/Ib #as Vcc=(Ib*Rb)+Vbe+(Ib+Ic)*Re \n",
+ "Ib=(Vcc-Vbe-8)/(Rb+Re) #as Vcc=Rb*Ib+Vbe+(Ib+Ic)*Re\n",
+ "Ic1=abeeta*Ib #collector current(mA)\n",
+ "deltaIc=Ic-Ic1 #change in collector current(mA)\n",
+ "\n",
+ "#Result\n",
+ "print\"change in Ic when beeta=40 is\",deltaIc,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in Ic when beeta=40 is 2.4 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8,Page number 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rb1=36 #base resistance 1(kohms)\n",
+ "Rb2=12 #base resistance 2(kohms)\n",
+ "Rc=4 #emitter resistancce(kohms) \n",
+ "Re=1.8 #emitter resistance(kohms) \n",
+ "Vcc=12 #supply voltage(V)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=(Rb1*Rb2)/(Rb1+Rb2) #base resistance(ohms)\n",
+ "Vbb=Vcc*(Rb2/(Rb1+Rb2)) #voltage supply to base(V)\n",
+ " #(10.8*Ib)+(1.8*Ic)=2.3 equation 1...solving -Vbb+RbIb+Vbe+(Ib+IC)Re\n",
+ " #(1.8*Ib)+(5.8*Ic)+Vce=12 equation 2 solving -Vcc+RcIc+Vce+(Ob+Ic)Re\n",
+ "#Part a\n",
+ "beeta=50 #current gain \n",
+ "Ib=2.3/100.8 #(10.8*Ib)+(90*Ib)=2.3 ,using -Vbb+Rb*Ib+Vbe+(Ib+Ic)*Re \n",
+ " #as Ic=50Ib and putting this in equation 1 \n",
+ "Icq=Ib*beeta\n",
+ "Vceq=Vcc-(1.8*Ib)-(5.8*Icq) #from equation 2\n",
+ "\n",
+ "#Part b\n",
+ "beeta=150 #current gain \n",
+ "Ib=2.3/280.8 # (10.8*Ib)+(270*Ib)=2.3,using -Vcc+Rc*Ic+Vce+(Ib+Ic)*Re \n",
+ " #as Ic=150Ib and putting this in equation 1 \n",
+ "Icq1=Ib*beeta \n",
+ "Vceq1=Vcc-(1.8*Ib)-(5.8*Icq1) #from equation 2\n",
+ "\n",
+ "#Results\n",
+ "print\"when beeta increases by 300%,Icq increases by\",round((((Icq1-Icq)/Icq1)*100),1),\"%\"\n",
+ "print\"when beeta increases by 300%, Vceq increases by\",round(((Vceq-Vceq1)/Vceq)*100),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when beeta increases by 300%,Icq increases by 7.1 %\n",
+ "when beeta increases by 300%, Vceq increases by 9.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9,Page number 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ic=4 #collector current(mA)\n",
+ "Vce=8 #collector emitter voltage(V) \n",
+ "beeta=100 #current gain \n",
+ "Rb2=24 #base resistance(kohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rc=4 #collector current(kohm)\n",
+ "Re=2 #emitter resistance(kohms) \n",
+ "Ib=0.04 #base current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vcc=(Ic*Rc)+Vce+Ic*Re #from formula Vcc=IcRc+Vce+(Ic+Ib)Re..eq 1\n",
+ "\n",
+ "#Part b\n",
+ "Rb1=Rb2*(Vcc-(Vbe+Ic*Re))/((Vbe+Ic*Re)+Ib) #from eq 1 and also from Vbb= Vcc(Rb2/(Rb1+Rb2))\n",
+ "Rb=(Rb1*Rb2)/(Rb1+Rb2) #base resistance(ohms)\n",
+ "Vbb=(Vcc*Rb2)/(Rb1+Rb2) #supply to base(V)\n",
+ "\n",
+ "#Part c\n",
+ "abeeta=40 #actual current gain\n",
+ "Ib1=((Vbe+Re*Ic)-Vbe)/((1+abeeta)*2+Rb) #from equation Vbb=IbRb+Vbe+(Ic+Ib)Re\n",
+ "Ic1=abeeta*Ib1 #collector gain\n",
+ "\n",
+ "#Results\n",
+ "print\"a)Vcc is\",Vcc,\"V\"\n",
+ "print\"b)values are Rb1:\",round(Rb1,2),\"KOhms,Rb:\",round(Rb,2),\"kohm and Vbb:\",round(Vbb,2),\"V\" \n",
+ "print\"c)actual value of Ic1\",round(Ic1,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Vcc is 32 V\n",
+ "b)values are Rb1: 63.98 KOhms,Rb: 17.45 kohm and Vbb: 8.73 V\n",
+ "c)actual value of Ic1 3.22 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10,Page number 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Rc=4.7 #collector current(kohms)\n",
+ "Rb=250 #base resistance(kohms)\n",
+ "Re=1.2 #emitter resistance(kohms)\n",
+ "beeta=100 #current gain\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ib=(Vcc-Vbe)/(Rb+(beeta*(Rc+Re))) #base current(uA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Vce=Vcc-Ic*(Rc+Re) #collector to emitter voltage(V)\n",
+ "#Part b\n",
+ "beeta1=150 #current gain\n",
+ "Ib1=(Vcc-Vbe)/(Rb+(beeta1*(Rc+Re))) #base current(mA)\n",
+ "Ic1=beeta1*Ib1 #collector current(mA)\n",
+ "Vce1=Vcc-Ic1*(Rc+Re) #collector to emitter voltage(V)\n",
+ "deltaIc=((Ic1-Ic)/Ic)*100 #small change in Ic(mA)\n",
+ "deltaVce=((Vce-Vce1)/Vce)*100 #small change in Vce(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"values of Ic is\",round(Ic,2),\"mA and Vce:\",round(Vce,2),\"V\"\n",
+ "print\"values of Ic1 is\",round(Ic1,2),\"mA and Vce1 is\",round(Vce1,2),\"V\"\n",
+ "print\"% change in Ic is\",round(deltaIc,2),\"% and in Vce is\",round(deltaVce,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values of Ic is 1.11 mA and Vce: 3.47 V\n",
+ "values of Ic1 is 1.23 mA and Vce1 is 2.75 V\n",
+ "% change in Ic is 11.01 % and in Vce is 20.74 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11,Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Id=3 #drain current(mA)\n",
+ "Vds=12 #drain source voltage(V)\n",
+ "Vgs=-3 #gate source voltage(V)\n",
+ "Vdd=36 #drain voltage(V)\n",
+ "Vgg=12 #gate voltage(V)\n",
+ "Rg=12 #gate resistance(Mohms)\n",
+ "\n",
+ "#Calculations\n",
+ "R1=(Rg*Vdd)/Vgg #resistance(Mohms)\n",
+ "R2=(Rg*R1)/(R1-Rg) #resistance(kohms)\n",
+ "Rs=(Vgg-Vgs)/Id #resistance(kohms)\n",
+ "Rd=(Vdd-Vds-Id*Rs)/Id #as Vdd-IdRd-Vds-IdRs\n",
+ "Vgs=-3.6 #consider Vgs increases by 20%\n",
+ "Idnew=(Vgg-Vgs)/Rs #new drain current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of R1:\",R1,\"MOhm,R2:\",R2,\"Mohms,Rs:\",Rs,\"KOhm and Rd:\",Rd,\"kohms\"\n",
+ "print\"new Id is\",Idnew,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R1: 36 MOhm,R2: 18 Mohms,Rs: 5 KOhm and Rd: 3 kohms\n",
+ "new Id is 3.12 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12,Page number 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import*\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.0002 #device parameter\n",
+ "Vt=4 #thevinin voltage(V) \n",
+ "Vdd=24 #drain voltage(V)\n",
+ "Id0=3 #drain current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "Vgs=(math.sqrt(Id0/k))+4 #as Id=k(Vgs-Vt)^2\n",
+ "Rd=-(Vgs-Vdd)/Id0 #as Vds=Vdd-IdRd and Vgs=Vds=7.87 \n",
+ "k=0.0003 #device parameter \n",
+ "\n",
+ "Id=symbols('Id')\n",
+ "expr=solve(Id**2-7.5*Id+13.7,Id)\n",
+ "print\"equation has 2 solutions\",expr # putting value of k=0.0003 in eq of Id,\n",
+ "Id1=3.15 # we get Vgs=Vds=24-5.4Id and putting Vgs again in Id we get,\n",
+ " # Id^2-7.5Id+13.7=0\n",
+ " \n",
+ "Idchange=((Id1-Id0)/Id0)*100 #changed Id(mA)\n",
+ "\n",
+ "#Result\n",
+ "print\"change in Id is\",Idchange,\"% increase\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "equation has 2 solutions [3.14792027106039, 4.35207972893962]\n",
+ "change in Id is 5.0 % increase\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13,Page number 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Vt=2 #threshold voltage(V)\n",
+ "Id=8 #drain current(mA)\n",
+ "Vgs=6. #gate to source voltage(V)\n",
+ "k=0.5 #device parameter\n",
+ "Vdd=24 #drain voltage(V)\n",
+ "Vds=10 #drain to source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vgs1=4 #gate to source voltage(V) \n",
+ "Id1=k*(Vgs1-Vt)**2 #drain current(mA)\n",
+ "\n",
+ "#Part b\n",
+ "Vgg=3*Vgs1 #gate voltage(V)\n",
+ "R2=(Vdd/Vgg)-1 #resistance(Mohms)\n",
+ "Rs=(Vgg-Vgs1)/2 #source resistance(k ohms)\n",
+ "Rd=(Vdd-Vds-Id1*Rs)/2\n",
+ "\n",
+ "#part c\n",
+ "K=1.5*k #increased by 50%\n",
+ "Vgs2=3.67 #solving 12=Vgs+4Id and Id=0.75(Vgs-2)^2 \n",
+ "Id2=2.08 #drain current when k is increased(mA)\n",
+ "Vds1=Vdd-Id2*(Rd+Rs) #drain to source voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"drain current defined by Vgs=4 and Vds=10 is\",Id1,\"mA\"\n",
+ "print\"value of Rs,Rd,R2 are\",Rs,\"k ohms,\", Rd,\"k ohms,\",R2,\"Mohms resp.\"\n",
+ "print\"actual value of Id and Vds are\",Id2,\"mA,\",Vds1,\"mA and\",Vds,\" V resp.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current defined by Vgs=4 and Vds=10 is 2.0 mA\n",
+ "value of Rs,Rd,R2 are 4 k ohms, 3.0 k ohms, 1 Mohms resp.\n",
+ "actual value of Id and Vds are 2.08 mA, 9.44 mA and 10 V resp.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14,Page number 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ic=10 #collector current(mA)\n",
+ "beeta=100 #current gain\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Vcc=10 #supply voltage(V) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "R=(beeta*(Vcc-Vbe))/((beeta+2)*Ic) #resistance(k ohms) \n",
+ "beeta1=200 #current gain\n",
+ "Ic1=(beeta1/(beeta1+2))*((Vcc-Vbe)/R) #collector current(mA)\n",
+ "Icchange=((Ic-Ic1)/Ic) #change in collector current(mA) \n",
+ "\n",
+ "#Part b\n",
+ "Ic2=0.1 #collector current(mA)\n",
+ "R1=(beeta*(Vcc-Vbe))/((beeta+2)*Ic) #resistance(k ohms)\n",
+ "Ic3=(beeta1/(beeta1+2))*((Vcc-Vbe)/R1) #collector current(mA)\n",
+ "Icchange1=((Ic2-Ic3)/Ic2) #change in collector current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"% change in Ic is\",round(Icchange,1),\"% increase\"\n",
+ "print\"% change in Ic is\",round(Icchange1,1),\"% increase\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "% change in Ic is 1.0 % increase\n",
+ "% change in Ic is 1.0 % increase\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15,Page number 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vcc=6 #supply voltage(V)\n",
+ "R=1.2 #resistance(k ohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V) \n",
+ "beeta=100. #current gain\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ir=(Vcc-Vbe)/R #current(mA)\n",
+ "I=(beeta/(beeta+3))*Ir #current(mA)as transistors are identiical,I=Ie\n",
+ "\n",
+ "#Result\n",
+ "print\"load current I is\",round(I,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load current I is 4.29 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16,Page number 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "Idss=10 #drain current for zero bias(mA)\n",
+ "Vp=-4 #peak voltage(V)\n",
+ "Idq=Id=2.5 #quienscent drain current(mA)\n",
+ "Vdd=24 #voltage drain drain(V)\n",
+ "Vgg=4 #gate voltage(V)\n",
+ "R1=22 #resistance(Mohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vgs=Vp*(1-(math.sqrt(Id/Idss))) #solving Id=Idss(1-Vgs/Vp)^2\n",
+ "Rs=(Vgg-Vgs)/Id #as Vgg-Vgs-IdRs=0 ,Id=Is \n",
+ "Rd=2.5*Rs #given\n",
+ "R2=(Vgg*R1)/(R1-Vgg) #from Vgg=(R1*R2)/(R1+R2)\n",
+ "\n",
+ "#Part b\n",
+ "gmo=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gmo*(math.sqrt(Id/Idss)) #transconductance(mS)\n",
+ "\n",
+ "#Part c\n",
+ "Av=-gm*Rd #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"values of Rs:\",Rs,\"Kohms,Rd:\",Rd,\"k ohms and R2 is\",round(R2,1),\"M ohms\"\n",
+ "print\"value of gm is\",gm,\"mS and gmo is\",gmo,\"mS\"\n",
+ "print\"voltage amplification is\",Av"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values of Rs: 2.4 Kohms,Rd: 6.0 k ohms and R2 is 4.0 M ohms\n",
+ "value of gm is 2.5 mS and gmo is 5 mS\n",
+ "voltage amplification is -15.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17,Page number 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "beeta=98. #current gain\n",
+ "rpi=1.275 #dynamic resistance(k ohms)\n",
+ "Rb=220. #base resistance(k ohms)\n",
+ "Re=3.3 #emitter resistance(k ohms)\n",
+ "Vcc=12. #supply voltage(V)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "x=rpi/(1+beeta)\n",
+ "Av=Re/(Re+x) #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "Zb=rpi+(1+beeta)*Re #impedance(k ohms)\n",
+ "Zi=(Zb*Rb)/(Zb+Rb) #input impedance(k ohms)\n",
+ "Zo=(Re*x)/(Re+x) #output impedance(k ohms)\n",
+ "\n",
+ "#Part c\n",
+ "Ib=(Vcc-Vbe)/(Rb+(Re*(1+beeta))) #as Ie=(1+beeta)*Ib\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"voltage gain is\",round(Av,3)\n",
+ "print\"input impedance is\",round(Zi,1),\"KOhm and output impedance is\",round((Zo/1E-3),1),\"ohms\"\n",
+ "print\"value of Ic is\",round(Ic,3),\"mA\"\n",
+ "print\"value of rpi is\",round((rpi/1E+3),3),\"k ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain is 0.996\n",
+ "input impedance is 131.7 KOhm and output impedance is 12.8 ohms\n",
+ "value of Ic is 2.026 mA\n",
+ "value of rpi is 1.21 k ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18,Page number 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import*\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Idss=16 #drain current bias to zero(mA) \n",
+ "Vp=-4 #pinch off voltage(V) \n",
+ "Rg=1 #gate resistance(ohms)\n",
+ "Rs=2.2 #sourse resistance(ohm)\n",
+ "Vdd=9 #drain drain voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "#Id=Idss*(1-(Vgs/Vp))**2\n",
+ "# putting value of Vgs=2.2*Id inequation of Id,we get\n",
+ "#Id**2-3.84Id+3.31 \n",
+ "\n",
+ "Id=symbols('Id')\n",
+ "expr=solve(Id**2-3.84*Id+3.31,Id)\n",
+ "print expr\n",
+ "Id1=1.3 \n",
+ "Vgs=-Id1*Rs #gate to source voltage(V)\n",
+ "gm0=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gm0*(1-(Vgs/Vp)) #transconductance(mS) \n",
+ "rm=1/gm #transresistance(k ohms) \n",
+ "Av=(Rs*gm)/(1+(Rs*gm)) #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "Zi=Rg #input impedance(Mohms)\n",
+ "Zo=(Rs*rm)/(Rs+rm) #output impedance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"voltage gain is\",round(Av,3)\n",
+ "print\"input and output impedences are\",Zi,\"Mohms and\",round((Zo/1E-3),1),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " [1.30648553399288, 2.53351446600712]\n",
+ "voltage gain is 0.834\n",
+ "input and output impedences are 1 Mohms and 365.7 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19,Page number 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Re=0.56 #emitter resistance(k ohms)\n",
+ "beta=1600 #current gain\n",
+ "R1=110 #resistance(k ohms)\n",
+ "R2=330 #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Av1=Re*(beta+1) #voltage gain\n",
+ "\n",
+ "#part b\n",
+ "Rb=(R1*R2)/(R1+R2) #base resistance(k ohms)\n",
+ "Vs=(1.56/(Re*(beta+1)))+1 #source voltage(V) \n",
+ "Avs=1/Vs\n",
+ "\n",
+ "#part c\n",
+ "R=1+(1+beta)*Re #resistance presented to Ib\n",
+ "I=Rb/(Rb+R) #I=Ib/Ii \n",
+ "Ai=(1+beta)*I #current gain\n",
+ "\n",
+ "#part d\n",
+ "Rl=10*10**3 #load resistance(ohm)\n",
+ "Re1=(Re*Rl)/(Re+Rl) #emitter resistance(k ohms)\n",
+ "R1=1+(1+beta)*Re1 #resistance presented to Ib(k ohms)\n",
+ "I1=Rb/(Rb+R1) #I1=Ib/Ii\n",
+ "Ai1=(beta+1)*I1 #current gain\n",
+ "Av2=Re1*(1+beta) #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"a)voltage gain is\",Av1\n",
+ "print\"b)Avs is\",round(Avs,2)\n",
+ "print\"c)Ai is\",round(Ai,2)\n",
+ "print\"when output Vo1 feeds a load of 10 k ohms Ai is\",round(Ai1),\"and Av2 is\",round(Av2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)voltage gain is 896.56\n",
+ "b)Avs is 1.0\n",
+ "c)Ai is 134.02\n",
+ "when output Vo1 feeds a load of 10 k ohms Ai is 134.0 and Av2 is 897.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20,Page number 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta1=120. #current gain\n",
+ "beeta2=160. #current gain\n",
+ "Vcc=18 #supply voltage(V)\n",
+ "Rc=0.1 #collector resistance(ohms)\n",
+ "Rb=2*10**3. #base resistance(ohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib1=(Vcc-Vbe)/(Rb+(beeta1*beeta2*Rc))#base current(uA)\n",
+ "Ib2=beeta1*Ib1 #base current(mA)\n",
+ "Ie1=(beeta1+1)*Ib1 #emitter current(mA)\n",
+ "Ic=Ie1+(beeta2*Ib2) #collector current(mA)\n",
+ "Vo=Vcc-(Ic*Rc) #output voltage(V)\n",
+ "Vi=Vo-Vbe #input voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"dc biased current is\",round(Ic,1),\"mA\"\n",
+ "print\"output voltage\",round(Vo,2),\"V\"\n",
+ "print\"input voltage\",round(Vi,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dc biased current is 85.3 mA\n",
+ "output voltage 9.47 V\n",
+ "input voltage 8.77 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21,Page number 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "deltaId=2. #change in Id(mA)\n",
+ "deltaVgs=1. #change in Vgs(V)\n",
+ "deltaVds=5. #change in Vds(V)\n",
+ "Idss=10. #drain current biased to zero(mA)\n",
+ "Id=5. #drain current(mA)\n",
+ "Vp=-6. #pinch off voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "gm=(deltaId)/(deltaVgs) #transconductance(mS)\n",
+ "rds=(deltaVds)/(deltaId) #resistance(k ohms)\n",
+ "gm0=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gm0*(math.sqrt(Id/Idss)) #transconductance(mS)\n",
+ "\n",
+ "#Part b\n",
+ "R1=4.5 #resistance(k ohms)\n",
+ "R2=2 #resistance(k ohms)\n",
+ "Av=gm*((R1*R2)/(R1+R2)) #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"drain current biased to zero is\",Idss,\"mA and pinch off voltage is\",Vp,\"V\"\n",
+ "print\"value of gm and rds are\",round(gm,2),\"mS and\",rds,\"k ohms\"\n",
+ "print\"small signal amplifier gain is\",round(Av,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current biased to zero is 10.0 mA and pinch off voltage is -6.0 V\n",
+ "value of gm and rds are 2.36 mS and 2.5 k ohms\n",
+ "small signal amplifier gain is 3.26\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22,Page number 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Idson=0.2\n",
+ "Vgs=5 #gate to source voltage(V)\n",
+ "Vdd=12 #drain voltage(V)\n",
+ "Vt=2 #thevinine voltage(V)\n",
+ "R1=100. #resistance(k ohms) \n",
+ "R2=100. #resistance(k ohms) \n",
+ "Rd=30 #drain resistance(K ohms)\n",
+ "Rs=6 #source resistance(k ohms)\n",
+ "deltaVdd=0.3 #change in Vdd(V)\n",
+ "rds=50 #internal drain to source resistance()\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "k=Idson/((Vgs-Vt)**2) #device parameter\n",
+ "Vgg=Vdd*(R1/(R1+R2)) #gate voltage(V)\n",
+ "Vgs=4.89 #gate to source voltage(V)\n",
+ "Id=k*(Vgs-Vt)**2 #drain current(mA)\n",
+ "Vds=Vdd-((Rd+Rs)*Id) #drain to source voltage(V)\n",
+ "gm=2*(math.sqrt(k*Id)) #transconductance(mS)\n",
+ "deltaVgg=deltaVdd*(R2/(R1+R2)) #change in Vgg(V)\n",
+ "\n",
+ "vgs=0.105 #as vgs=0.15-6id where id=u*vgs/(rds+Rs+Rd)=0.74vgs after solving\n",
+ "id= 0.074*vgs*10**3\n",
+ "\n",
+ "#Results\n",
+ "print\"id is\",id,\"uA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "id is 7.77 uA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23,Page number 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "deltaId=1 #change in Id(mA)\n",
+ "deltaVgs=0.75 #change in Vgs(V) \n",
+ "rd=100 #internal drain resistance(k ohms)\n",
+ "Rd=100 #drain resistance(k ohms)\n",
+ "Vgs=2 #as Vgs= 2sinwt \n",
+ "\n",
+ "#Calculations\n",
+ "gm=(deltaId)/(deltaVgs) #transconductance(m) \n",
+ "Vo=-gm*Vgs*((rd*Rd)/(rd+Rd)) # as Vi=2sin(w*t)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Vo is\",round(Vo),\"*sinwt mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Vo is -133.0 *sinwt mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24,Page number 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding resistance\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rd=4 #drain resistance(ohms)\n",
+ "Rs=2.5 #ource resistance(ohms) \n",
+ "R1=200*10**3 #resistance(ohms)\n",
+ "R2=100*10**3 #resistance(ohms)\n",
+ "gm=2.5 #transconductance(mS)\n",
+ "rd=60 #internal drain resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part b\n",
+ "Ro=Rs/(1+(((1+gm*rd)*Rs)/(rd+Rd))) #output resistance(ohms)\n",
+ "\n",
+ "#Part c\n",
+ "Rd1=0 #drain resistance\n",
+ "Ro1=Rs/(1+(((1+gm*rd)*Rs)/rd)) #output resistance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ro is\",round(Ro/1E-3),\"ohms\"\n",
+ "print\"value of Ro1 is\",round(Ro1/1E-3),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ro is 362.0 ohms\n",
+ "value of Ro1 is 343.0 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25,Page number 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=100 #current gain factor\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rb=250 #base resistance(k ohms)\n",
+ "Vee=10 #emitter voltage(V)\n",
+ "Re=1 #emitter resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vee-Vbe)/(Rb+1+beeta) # solving Rb*Ib+Vbe+(Ic+Ib)=Vee and putting Ic+Ib=(1+beeta)Ib\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(ohms) \n",
+ "Vi=(rpi*Ib)+(1+beeta)*Re*Ib #input voltage(V)\n",
+ "Ri=Vi/Ib #input resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ri is\",round((Ri/1E+1),1),\"K ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ri is 104.5 K ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26,Page number 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=125 #current gain\n",
+ "gm=35 #transconductance(mS)\n",
+ "Re=4 #emitter resistance(k ohms)\n",
+ "Rb=1.5 #base resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "rpi=beeta/gm #dynamic resistance(k ohms)\n",
+ "Ri=rpi+((1+beeta)*Re) #input resistance(k ohms) \n",
+ "Ro=((Rb+rpi)*Re)/((Rb+rpi)+((1+beeta)*Re)) #output resistance(ohms) as Ro=Vo/Isc\n",
+ "\n",
+ "#Part b \n",
+ "f=((1+beeta)*Re)/(Rb+rpi+((1+beeta)*Re)) #transfer function\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ri is\",Ri,\"K ohms and Ro is\",round(Ro,4),\"k\"\n",
+ "print\"transfer function is\",round(f,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ri is 507 K ohms and Ro is 0.0354 k\n",
+ "transfer function is 0.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.28,Page number 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Vcc=16 #supply voltage(V)\n",
+ "Vc=12 #collector voltage(V)\n",
+ "Ic=8 #collector current(mA)\n",
+ "Ic1=12 \n",
+ "deltaIc=2000 #collector current(uA)\n",
+ "deltaVce=4 #collector emitter voltage(Vce) \n",
+ "deltaIb=20 #base current(mA) \n",
+ "Rl=2. #load reistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "hfe=(deltaIc)/(deltaIb)\n",
+ "hoe=(deltaIc)/(deltaVce)\n",
+ "Rdc=Vcc/Ic #dc resistance(k ohms)\n",
+ "Rac=Vc/Ic1 #ac resistance(k ohms)\n",
+ "Re=Rdc-Rac #emitter resistance(k ohms)\n",
+ "Rac1=(Rac*Rl)/(Rac+Rl) #for load of 2kohms, Rc=Rac\n",
+ "Icq=Vcc/(Rac1+Rdc) #Ic at operatingpoint(mA) \n",
+ "Vceq=Vcc-(Icq*Rdc) #Vc at operating point(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of hfe and hoe are\",hfe,\"uS and\",hoe,\"uS\"\n",
+ "print\"value Rc and Re are\",Rac,\"k ohms and\",Re,\"k ohms resp.\"\n",
+ "print\"value of Icq and Vce\",Icq,\"mA and\",Vceq,\"V resp.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " value of hfe and hoe are 100 uS and 500 uS\n",
+ "value Rc and Re are 1 k ohms and 1 k ohms resp.\n",
+ "value of Icq and Vce 6.0 mA and 4.0 V resp.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.29,Page number 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "hfe=120 #current gain\n",
+ "r1=1.5 #resistance(k ohms)\n",
+ "Vi=1 #input voltage(V) \n",
+ "hoe=50*10**-3 #output conductance with input open circuited\n",
+ "Rs=2 #source resistance(k ohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Vcc=10 #supply voltage(V)\n",
+ "r3=0.33 #resistance(k ohms)\n",
+ "r4=5.8 #rsistance(k ohms) \n",
+ "r5=27 #rsistance(k ohms) \n",
+ "hoe=50*10**-3 #output conductance with input open circuited\n",
+ " \n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vbb=Vcc*(r4/(r4+r5)) #voltage to bae(V)\n",
+ "Rb=(r5*r4)/(r5+r4) # as Vbb-Vbe=RbIb+(hfe+1)Ib*R,here hfe=beeta\n",
+ "ib=(Vbb-Vbe)/(Rb+(hfe+1)*r3) #instantaneous base current(mA)\n",
+ "hie=(0.02/ib)*10**3 \n",
+ "Ib=Vi/hie #base current(mA)\n",
+ "h=hfe*Ib\n",
+ "Avo=-h*r1 #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "r=1/hoe #resistance(k ohms)\n",
+ "R1=(r*r1)/(r+r1) #resitance(k ohms)\n",
+ "R=(R1*Rs)/(R1+Rs) #resistance(k ohms)\n",
+ "Ib1=1/(Rs+R) #base current(mA)\n",
+ "h1=hfe*Ib1\n",
+ "Avl=-h1*R #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"hie and Avo are\",round(hie),\"and\",round((Avo/1E-3),1)\n",
+ "print\"Avl is\",round(Avl,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hie and Avo are 837.0 and -215.1\n",
+ "Avl is -34.95\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.30,Page number 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rl=20 #load resistance(ohms)\n",
+ "Vcc=30 #supply voltage(V)\n",
+ "beeta=150 #current gain \n",
+ "Re=2200 #emitter resistance(ohms) \n",
+ "Rb=350 #base resistance(k ohms) \n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Is=10**-3 #source current(A) \n",
+ "r1=2000 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vcc-Vbe)/(Rb+(1+beeta)*Re)#base current(uA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(ohms) \n",
+ "R=(Re*Rl)/(Re+Rl) #resistance(ohms) \n",
+ "Ib1=17.95 #round the base emitter(as Rb>>2 kohms,it it ignored)\n",
+ "Vl=(beeta+1)*Ib1*R #load voltage(V)\n",
+ "Avl=Vl #Voltage gain\n",
+ "Il=Vl/Rl #load current(A)\n",
+ "Ail=Il/Is #current gain\n",
+ "\n",
+ "#Results\n",
+ "print\"overall voltage gain is\",round((Avl/1E+3),2)\n",
+ "print\"overall current gain is\",round(Ail/1E+3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "overall voltage gain is 51.5\n",
+ "overall current gain is 2575.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.31,Page number 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vcc=15 #supply voltage(V)\n",
+ "beeta=30 #current gain \n",
+ "R=.47 #emitter resistance(ohms) \n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Vo=5 #output voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Vbb=Vcc/2 #base voltage(V)\n",
+ "'''\n",
+ "Vbb=(R1/2)*Ib+Vbe*2+(30Ib+Ic2)*R\n",
+ "Ic2=beeta*30Ib,so\n",
+ "Ic2=30*30Ib=900Ib\n",
+ "Vbb=(R1/2)*Ib+Vbe*2+(30+900)*R*Ib....(i)\n",
+ "(R1/2)*Ib+437*Ib=6.1.......(ii)\n",
+ "0.47*930Ib=5 #output voltage is given like this\n",
+ "\n",
+ "'''\n",
+ "Ib=Vo/(R*930) #from equation(i)\n",
+ "\n",
+ "'''\n",
+ "substituting value of Ibin eq(ii) we get\n",
+ "\n",
+ "'''\n",
+ "R1=((6.1-4.98)/0.0114)*2 #resistance(k ohms) \n",
+ "#Results\n",
+ "print\"value of R1 is\",round(R1),\"K ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R1 is 196.0 K ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter4.ipynb b/Electronics_Devices_And_Circuits/chapter4.ipynb
new file mode 100755
index 00000000..deab8d1e
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter4.ipynb
@@ -0,0 +1,1211 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b257ecc13b812bf0b848ecef8624701db73088f3de1f9b82ca153fc8113f8c8b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ " Chapter 4: SMALL SIGNAL AMPLIFIERS-FREQUENCY RESPONSE"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1,Page number 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vs=1. #source voltage(V)\n",
+ "C=100*10**-6 #value of capacitance(uF) \n",
+ "r1=1 #resistance 1(k ohms)\n",
+ "r2=4 #resistance 2(k ohms)\n",
+ "R=5 #total resistance,R=r1+r2\n",
+ "\n",
+ "#Calculations\n",
+ "Imax=Vs/(r1+r2)*10**3 #maximum current(uA)\n",
+ "fc=1/(2*(math.pi)*C*R) #critical frequency(Hz) \n",
+ " #As w*C*R=1 and w=2*pi*f\n",
+ "f=10*fc #lowest frequency(Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"maximum current\",Imax,\"uA\"\n",
+ "print\"critical frequency\",round((fc/1E+3),3),\"Hz\"\n",
+ "print\"lowest frequency\",round((f/1E+3),2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum current 200.0 uA\n",
+ "critical frequency 0.318 Hz\n",
+ "lowest frequency 3.18 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2,Page number 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=100*10**-6 #capacitance(uF)\n",
+ "Rg=1. #galvanometer resistance(k oms)\n",
+ "Rl=4. #load resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Rth=(Rg*Rl)/(Rg+Rl) #thevinine's equivalent resistance\n",
+ "fc=1/(2*(math.pi)*C*Rth) #critical frequency(Hz)\n",
+ "f=fc*C #lowest frequency(Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"lowest frequency at which the point A gets grounded is\",round((f/1E-2),1),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lowest frequency at which the point A gets grounded is 19.9 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3,Page number 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rpi=600 #dynamic junction resistance(ohms)\n",
+ "beta=100 #common emitter current gain\n",
+ "Vs=5. #source voltage(V)\n",
+ "Rs=400 #source resistance(ohms)\n",
+ "R=10 #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Vs/(Rs+rpi) #base current(uA) \n",
+ "Vo=R*beeta*Ib #output voltage(V)\n",
+ "Rin=rpi #input resistance(ohms)\n",
+ "Rout=R #output ewsistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"output voltage is\",Vo,\"V\"\n",
+ "print\"input resistance\",Rin,\"ohms\"\n",
+ "print\"output resistance\",Rout,\"k ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage is 5.0 V\n",
+ "input resistance 600 ohms\n",
+ "output resistance 10 k ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4,Page number 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "gm=1. #transconductance(mS)\n",
+ "rd=40 #dynamic drain resistance(k ohms) \n",
+ "Rd1=40 #JFET 1 drain resistance(k ohms) \n",
+ "Rd2=10 #JFET 2 drain resistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "Avo=(-gm*((rd*Rd1)/(rd+Rd1)))*(-gm*((rd*Rd2)/(rd+Rd2))) #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"Avo is\",Avo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Avo is 160.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5,Page number 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beta=125 #common emitter current gain\n",
+ "rpi=2.5 #dynamic junction resistance(k ohms)\n",
+ "rd=40 #dynamic drain resistance(k ohms) \n",
+ "gm=2 #transconductance(mS) \n",
+ "Vs=1 #assume,source voltage(V)\n",
+ "Rs=10 #source resistance(k ohms)\n",
+ "Rc=1 #collector resistance(k ohms)\n",
+ "rb=2 #resistance(k ohms)\n",
+ "Vgs=1 #gate to source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "R=(rd*Rs)/(rd+Rs) #equivalent resistance(k ohms)\n",
+ "Ib=gm*Vgs*(R/(rpi+R)) #base current(mA)\n",
+ "Vo=beeta*Ib*Rc #output voltage(V) \n",
+ "Avo=Vo #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "Ib1=Vs/(rb+rpi) #base current(mA) after interchanging stages of JFET and BJT \n",
+ "Vgs1=beeta*Ib1*Rc #gate to source voltage(V) after interchanging stages of JFET and BJT\n",
+ "Vo1=gm*Vgs1*R #output voltage(V) after interchanging stages of JFET and BJT\n",
+ "Avo1=Vo1 #voltage gain after interchanging stages of JFET and BJT\n",
+ "\n",
+ "#Results\n",
+ "print\"Avo is\",round(Avo,1)\n",
+ "print\"Avo1 when BJT and FET stages are reversed is\",round(Avo1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Avo is 190.5\n",
+ "Avo1 when BJT and FET stages are reversed is 444.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6,Page number 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Cc1=1*10**-6 #coupling capacitor 1(uF)\n",
+ "Cc2=1*10**-6 #coupling capacitor 2 (uF) \n",
+ "Rs=10**3 #source resistance(k ohms)\n",
+ "rpi=2*10**3 #dynamic junction resistance(k ohms)\n",
+ "Rc=4500 #collector resistance(ohms)\n",
+ "Rl=9*10**3 #load resistance(k ohms)\n",
+ "w=100 #corner frequency(rad/s)\n",
+ "\n",
+ "#Calculations\n",
+ "w11=1/(Cc1*(Rs+rpi)) #corner frequency input circuit (rad/s)\n",
+ "w12=1/(Cc2*(Rc+Rl)) #corner frequency output circuit(rad/s)\n",
+ "f=w11/(2*(math.pi)) #lower cutoff frequency(Hz)\n",
+ "Zin=complex((Rs+rpi),-(1/(w*Cc1))) #input impedance(k ohms) \n",
+ "Zout=complex(Rc,-(1/(w*Cc2))) #output impedance(k ohms) \n",
+ "\n",
+ "#Results\n",
+ "print\"lower cut-off freq is\",round(f),\"Hz\"\n",
+ "print\"Zin\",Zin,\"ohms\"\n",
+ "print\"Zout\",Zout,\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut-off freq is 53.0 Hz\n",
+ "Zin (3000-10000j) ohms\n",
+ "Zout (4500-10000j) ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7,Page number 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Re=Rc=1.5*10**3 #collector resistance(ohms)\n",
+ "Rs=600 #source resistance(ohms)\n",
+ "Rl=2*10**3 #load resistance(ohms) \n",
+ "beeta=100 #common emitter current gain \n",
+ "rpi=1*10**3 #dynamic junction resistance(ohms)\n",
+ "f=50 #frequency(Hz)\n",
+ "\n",
+ "#Calculations\n",
+ "w=2*f*(math.pi) #corner frequency(rad/s)\n",
+ "CE=1/(w*(Rs+rpi)) #capacitance(uF)\n",
+ "Ce=CE*(beeta+1) #capacitance(uF)\n",
+ "w11=w/10 #corner frequency input circuit (rad/s)\n",
+ "w12=w11/20 #corner frequency output circuit(rad/s)\n",
+ "Cc1=1/(w11*(Rs+rpi)) #coupling capacitor 1(uF) \n",
+ "Cc2=1/(w12*(Rc+Rl)) #coupling capacitor 2 (uF) \n",
+ "\n",
+ "#Results\n",
+ "print\"Ce is\",round(Ce/1E-6),\"uF\"\n",
+ "print\"Cc1 is\",round(Cc1/1e-6,1),\"uF\"\n",
+ "print\"Cc2 is\",round((Cc2/1E-5),2),\"uF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ce is 201.0 uF\n",
+ "Cc1 is 19.9 uF\n",
+ "Cc2 is 18.19 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8,Page number 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "gm=2.5*10**-3 #transconductance(mS) \n",
+ "Rd=6*10**3 #drain resistance(ohms)\n",
+ "rd=200*10**3 #dynamic drain resistance(ohms) \n",
+ "Cc1=Cc2=0.12*10**-6 #coupling capacitors(uF)\n",
+ "Rs=1*10**3 #source resistance(ohms)\n",
+ "Rg=0.1*10**6 #R1||R2 \n",
+ "Cgs=12*10**-9 #gate to source capacitor(pF) \n",
+ "Cgd=2*10**-9 #gate to drain capacitor(pF) \n",
+ "Co1=10 # as Co1=Cl+Cw=10\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ro=(rd*Rd)/(rd+Rd) #equivalent resistance of rd and Rd(ohms)\n",
+ "Vo=-gm*((rd*Rd)/(rd+Rd)) #as Vgs=Vs\n",
+ "Avo=Vo #Avo=Vo/Vs=(-gm*Vs*((rd*Rd)/(rd+Rd)))/Vs=Vo \n",
+ " \n",
+ "#Part b\n",
+ "f11=1/(2*(math.pi)*Cc1*(Rs+Rg))\n",
+ "\n",
+ "#Part c\n",
+ "Ceq=Cgs+(Cgd*(1+gm*Ro)) #on application of miller theorem\n",
+ "Co=Co1+Cgd*(1+(1/(gm*Ro))) #output capacitance(pF)\n",
+ "f21=1/(2*(math.pi)*Ceq*((Rs*Rg)/(Rs+Rg))) #input circuit cutoff frequency(MHz)\n",
+ "f22=1/(2*(math.pi)*Co*Ro)*10**3 #output circuit cutoff frequency(MHz)\n",
+ "fH=f22 #cutoff frequency of high frequency band(MHz)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)mid freq gain is\",round(Avo,1)\n",
+ "print\"b)input circuit cut-off is\",round(f11,1),\"Hz\"\n",
+ "print\"c)high freq input cutoff is\",round((f21/1E+3),2),\"and output cutoff is\",round((f22/1E-3),2),\"MHz\"\n",
+ "print\"high freq cut-off is\",round((fH/1E-3),2),\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)mid freq gain is -14.6\n",
+ "b)input circuit cut-off is 13.1 Hz\n",
+ "c)high freq input cutoff is 3.73 and output cutoff is 2.73 MHz\n",
+ "high freq cut-off is 2.73 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9,Page number 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "beta=50. #common emitter current gain \n",
+ "R1=11.5 #resistance(k ohms)\n",
+ "R2=41.4 #resistance(k ohms) \n",
+ "Vcc=10. #supply voltage to collector(V)\n",
+ "Rc=5. #collector resistance(k ohms)\n",
+ "Re=1. #emitter resistance(k ohms)\n",
+ "Rs=1. #source resistance(k ohms)\n",
+ "Vbe=0.7 #base emitter voltage(V)\n",
+ "Rl=10. #load resistance(k ohms)\n",
+ "Cc1=Cc2=20*10**-6. #coupling capacitors(uF)\n",
+ "Ce=150*10**-6. #emitter capacitor(uF) \n",
+ "Cpi=100 \n",
+ "Cu=5.\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n",
+ "Vbb=Vcc*(R1/(R1+R2)) #suply voltage to base(V)\n",
+ "Ib=(Vbb-Vbe)/(Rb+(Rs*(1+beta))) #base current(mA)\n",
+ "Ic=beta*Ib #collector current(mA) \n",
+ "Vce=Vcc-(Ic*Rc)-(Ic+Ib)*Re #collector to emitter voltage(V) \n",
+ "rpi=(25*beta)*10**-3/Ic #dynamic junction resistance(K ohms) \n",
+ " \n",
+ "#Part b\n",
+ "rpi=1 #dynamic junction resistance(K ohms) \n",
+ "R=(rpi*Rb)/(rpi+Rb) #equivalent resistance(rpi||Rb) \n",
+ "Vbe=(R*Rs)/(R+Rs) #base to emitter voltage(V)\n",
+ "Ib1=Vbe/rpi #base current(mA)\n",
+ "Ro=(Rc*Rl)/(Rc+Rl) #Rc||Rl(k ohms) \n",
+ "Vo=-(beta*Ib1*Ro) #output voltage(V)\n",
+ "Avo=Vo #voltage gain\n",
+ "\n",
+ "#Part c\n",
+ "r1=(Rs*Rb)/(Rs+Rb) #Rs||Rb(k ohms) \n",
+ "w11=1/(Cc1*(Rs+R)) #low freq cutoff(rad/s)\n",
+ "w12=1/(Cc2*(Rc+Rl)) #high freq cutoff(rad/s) \n",
+ "w1p=1/((Ce/(beta+1))*(r1+rpi)) #low cutoff freq(rad/s)\n",
+ "\n",
+ "#Part d\n",
+ "Co1=5 #as Co1=Cw+Cl\n",
+ "gm=beta/rpi #transconductance(mS) \n",
+ "Ceq=Cpi+(Cu*(1+(gm*Ro))) #equivalent capacitance(pF)\n",
+ "Rs1=(Rb*Rs)/(Rb+Rs) #Rb||Rs(k ohms)\n",
+ "r2=(Rs1*rpi)/(Rs1+rpi) #Rs1||rpi(k ohms)\n",
+ "w21=10**12/(Ceq*r2*10**3) #low freq cutoff(MHz) \n",
+ "\n",
+ "#Results\n",
+ "print\"a)dc bias values are Vbb:\",round(Vbb,2),\"V, Ib:\",round(Ib,4),\"mA, Ic:\",round(Ic,2),\"mA, Vce:\",round(Vce,3),\"V, rpi:\",rpi,\"k ohms\"\n",
+ "print\"mid freq gain is\",round(Avo,2)\n",
+ "print\"low freq cut-off is\",round(w1p/1E+3),\"rad/s\"\n",
+ "print\"high cut-off freq is\",round((w21/1E+6),2),\"*10**6 rad/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)dc bias values are Vbb: 2.17 V, Ib: 0.0246 mA, Ic: 1.23 mA, Vce: 2.606 V, rpi: 1 k ohms\n",
+ "mid freq gain is -78.95\n",
+ "low freq cut-off is 179.0 rad/s\n",
+ "high cut-off freq is 2.25 *10**6 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10,Page number 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Qcoil=75. #coil inductance\n",
+ "f=200. #frequency(Hz) \n",
+ "BW=4. #bandwidth(kHz)\n",
+ "C=470*10**-9. #capacitance(pF) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Qcircuit=f/BW #circuit inductance\n",
+ "L=1/(((2*(math.pi)*f)**2)*C) #inductance(mH) \n",
+ "\n",
+ "#Part b\n",
+ "R=Qcircuit*2*(math.pi)*f*L #resistance(k ohms)\n",
+ "\n",
+ "#Part c\n",
+ "r=(2*(math.pi)*f*L)/Qcoil #internal resistance(ohms)\n",
+ "req=(Qcoil**2)*r #equivalent resistance(k ohms)\n",
+ "ro=(R*req)/(req-R) #output resistance(k ohms)\n",
+ "\n",
+ "#Part d\n",
+ "BW=5 #bandwidth(kHz)\n",
+ "Qcircuit=f/BW #circuit inductance \n",
+ "Req=Qcircuit*2*(math.pi)*f*L #equivalent resistance(k ohms) \n",
+ "Rl=(Req*R)/(R-Req) #load resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)coil inductance is\",round(L,2),\"mH\"\n",
+ "print\"b)circuit output impedance atresonant freq is\",round((R/1E+3),2),\"K ohms\"\n",
+ "print\"c)internal resistance ro is\",round((ro/1E+3),2),\"k ohms\"\n",
+ "print\"d)value of load resistance is\",round((Rl/1E+3),2),\"k ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)coil inductance is 1.35 mH\n",
+ "b)circuit output impedance atresonant freq is 84.66 K ohms\n",
+ "c)internal resistance ro is 253.97 k ohms\n",
+ "d)value of load resistance is 338.63 k ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11,Page number 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "fo=50 #output frequency(KHz)\n",
+ "L=10**-3 #inductance(H) \n",
+ "ro=100 #output resistance(k ohms)\n",
+ "Q=80 #coil inductance\n",
+ "Ri=10 #input resistance(k ohms)\n",
+ "beta=125 #common emitter current gain \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "C =1/(((2*(math.pi)*fo)**2)*L) #tunning capacitance(nF)\n",
+ "r=(2*(math.pi)*fo*L)/Q #internal resistance(k ohms)\n",
+ "req=(Q**2)*r #equivalent resistance(k ohms) \n",
+ "R=(ro*req)/(ro+req) #ro||req(k ohms)\n",
+ "Avo=-(beta*R)/Ri #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "Qcircuit=R/(2*(math.pi)*fo*L) #circuit inductance\n",
+ "BW=fo/Qcircuit #bandwidth\n",
+ "\n",
+ "#Results\n",
+ "print\"a)value of capacitance is\",round(C/1E-3),\"nF\"\n",
+ "print\" gain is\",round(Avo,1)\n",
+ "print\"b)bandwidth is\",round(BW/1E-3),\"Hz\",\"(value used for beta in texbook is wrong in the solution)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)value of capacitance is 10.0 nF\n",
+ " gain is -251.1\n",
+ "b)bandwidth is 782.0 Hz (value used for beta in texbook is wrong in the solution)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12,Page number 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "\n",
+ "f=1*10**6 #radio frequency(Hz)\n",
+ "beta=50 #common emitter current gain \n",
+ "fT=5*10**6 #short circuit current gain bandwidth product(Hz)\n",
+ "\n",
+ "#Calculations\n",
+ "betaf=fT/f #measurement of short circuit current gain\n",
+ "fbeta=fT/beta #frequency at beta(Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"frequency is\",fbeta,\"Hz\"\n",
+ "if fbeta<1*10**6:\n",
+ " print\"transistor is not suitable for 1Mhz amplifier as fbeta is less than 1Mhz\"\n",
+ "else:\n",
+ " print\"transistor is suitable for 1Mhz amplifier\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency is 100000 Hz\n",
+ "transistor is not suitable for 1Mhz amplifier as fbeta is less than 1Mhz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.13,Page number 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rpi=2 #dynamic junction resistance(K ohms) \n",
+ "beta=50. #common emitter current gain \n",
+ "f=1 #frequency(MHz)\n",
+ "beta1=2.5 #common emitter current gain \n",
+ "f1=20*10**6 #frequency(Hz)\n",
+ "\n",
+ "#Calculations\n",
+ "fT=beta1*f1 #short circuit current gain bandwidth product(Hz)\n",
+ "fbeta=fT/beta #frequency at beta(Hz)\n",
+ "Cpi=1/(2*(math.pi)*fbeta*rpi) #dynamic capacitance(pF)\n",
+ "\n",
+ "#Results\n",
+ "print\"fT is\",round(fT/1e+6),\"MHz\"\n",
+ "print\"fB is\",round(fbeta/1e+6),\"MHz\"\n",
+ "print\"Cpi is\",round(Cpi/1e-9),\"pF\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fT is 50.0 MHz\n",
+ "fB is 1.0 MHz\n",
+ "Cpi is 80.0 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.14,Page number 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=60 #resistance(k ohms)\n",
+ "R2=140 #resistance(k ohms)\n",
+ "Rs=4 #source resistance(k ohms)\n",
+ "Re=3 #emitter resistance(k ohms)\n",
+ "Rc=4 #collector resistance(k ohms)\n",
+ "Vcc=10 #supply voltage to collector(V)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "beta=100 #common emitter current gain \n",
+ "Avo=-30 #voltage gain \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n",
+ "Vth=(Vcc*R1)/(R1+R2) #thevinine's voltage(V)\n",
+ "Ib=(Vth-Vbe)/(Rb+(beta+1)*Re) #base current(uA)\n",
+ "Ic=Ib*beta #collector current(mA) \n",
+ "Vce=Vcc-(Rc*Ic)-((beta+1)*Ib*Re) #collector to emitter voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "rpi=((25*beta)/Ic)*10**-3 #dynamic junction resistance(k ohms)\n",
+ "r=(Rb*rpi)/(Rb+rpi) #resistance across Vs\n",
+ "Ib1=r/((Rs+r)*rpi) #base current(mA)\n",
+ "Rl=(-Rc*Avo)/(Avo+(beta*Ib1*Rc)) #load resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ic and Vce are\",round(Ic,3),\"mA and\",round(Vce,2),\"V\"\n",
+ "print\"Rl is\",round(Rl,2),\"k ohms\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ic and Vce are 0.667 mA and 5.31 V\n",
+ "Rl is 6.21 k ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.15,Page number 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=25. #resistances(k ohms)\n",
+ "R2=100. #resistances(k ohms)\n",
+ "Re=2. #emitter resistance(k ohms) \n",
+ "Vcc=10. #supply voltage to collector\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "beta=100. #common emitter current gain\n",
+ "Avo=160 #voltage gain\n",
+ "Rs=1 #source resistance(k ohms)\n",
+ "Vs=1 #source voltage(V) \n",
+ "Rl=12.5 #load resistance(k ohms)\n",
+ "Rc1=20. #collector resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rb=(R1*R2)/(R1+R2) #R1||R2\n",
+ "Vth=(Vcc*R1)/(R1+R2) #thevinines voltage(V)\n",
+ "Ib=(Vth-Vbe)/(Rb+(beta+1)*Re) #base current(uA)\n",
+ "Ic=Ib*beta #collector current(mA)\n",
+ "rpi=(25*beta)*10**-3/Ic #dynamic junction resistance(k ohms)\n",
+ "\n",
+ "#Part b\n",
+ "Ib1=1/rpi #small signal analysis \n",
+ "Rc=-Avo/(-beta*Ib1) #collector resistance() \n",
+ "\n",
+ "#Part c\n",
+ "r=(Rc1*rpi)/(Rc1+rpi) #Rc1||rpi1(k ohms) \n",
+ "Ib2=(Vs*r)/((1+r)*rpi) #base curret(mA)\n",
+ "Rc2=6.84 #collector resistance(k ohms) \n",
+ "Avo=-(beta*Ib2)*((Rl*Rc2)/(Rl+Rc2)) #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ic\",round(Ic,3),\"mA and rpi is\",round(rpi,2),\"k ohms\" \n",
+ "print\"Rc is\",round(Rc,2),\"k ohms\"\n",
+ "print\"Avo is\",round(Avo,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ic 0.586 mA and rpi is 4.27 k ohms\n",
+ "Rc is 6.83 k ohms\n",
+ "Avo is -80.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16,Page number 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R1=12. #resistance(k ohms)\n",
+ "R2=100. #resistance(k ohms)\n",
+ "Rc=2 #collector resistance(k ohms)\n",
+ "Ic=1.2 #collector current(mA)\n",
+ "beta=60 #common emitter current gain\n",
+ "Ib1=1 #(say)\n",
+ "Rs=1 #source resistance(k ohms)\n",
+ "Vs=1 #source vcoltage(say)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "rpi=((25*beta)/Ic)*10**-3 #dynamic junction resistance(k ohms)\n",
+ "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n",
+ "r=(Rb*rpi)/(Rb+rpi) #Rb||rpi(k ohms)\n",
+ "Ro1=(Rc*rpi)/(Rc+rpi) #Rc||rpi(k ohms)\n",
+ "Vo1=Vbe2=-(beta*Ib1*Ro1) #base to emitter voltage(V)\n",
+ "Ib2=Vo1/rpi #base current(mA)\n",
+ "Ai=Ib2/Ib1 #current gain \n",
+ "\n",
+ "#Part b\n",
+ "Ib11=(Rs*r)/((Rs+r)*rpi) #base currents(mA)\n",
+ "Ib21=Ib11*Ai #base current(mA)\n",
+ "Avo1=Vo1=Ib21*rpi #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"current gain is\",round(Ai,2)\n",
+ "print\"overall voltage gain is\",round(Avo1,2),\"(solution in the textbook is incorrect)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current gain is -36.92\n",
+ "overall voltage gain is -19.5 (solution in the textbook is incorrect)\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17,Page number 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=50. #common emitter current gain\n",
+ "R1=25. #resistance(k ohms)\n",
+ "R2=75. #resistance(k ohms)\n",
+ "Ic=1.25 #collector current(mA)\n",
+ "Vcc=10 #supply voltage to collector(V)\n",
+ "s=10*10**-3 #signal strength(V)\n",
+ "Rs=0.5 #output impedance(k ohms)\n",
+ "Vo=1 #output voltage(V)\n",
+ "Vs=1. #source voltage(V) \n",
+ "Vl=12 #load at output terminal(Vl)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rl=12\n",
+ "\n",
+ "#Calculations\n",
+ "rpi=((25*beeta)/Ic) #dynamic junction resistance(k ohms)\n",
+ "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n",
+ "r=(Rb*rpi*10**-3)/(Rb+rpi*10**-3) #Rb||rpi(k ohms)\n",
+ "Avo=((Vo*rpi)/Vcc) #voltage gain\n",
+ "Ib=(r*Vs)/(Rs+r)*Vs #base current(mA)\n",
+ "Rc=(Rl*Avo)/(beeta*Ib*Rl-Avo) #collector resistance(k ohms)\n",
+ "Vth=(Vcc*R1)/(R1+R2) #thevinine's voltage(V)\n",
+ "Ib1=Ic/beeta #base current(mA)\n",
+ "Re=(Vth-Vbe-(Rb*Ib1))/((beeta+1)*Ib1) #emitter resistance(k ohms) \n",
+ "\n",
+ "#Results\n",
+ "print\"value of Rc is\",round(Rc,2),\"and Re is\",round(Re,2),\"k ohms (Vth value is wrong substituted in the book)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Rc is 4.1 and Re is 1.04 k ohms (Vth value is wrong substituted in the book)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.18,Page number 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Cpi=20*10**-9 #opening capacitor(F)\n",
+ "Cu=5*10**-9 \n",
+ "C=50*10**-9 #here C=Cl+Cw\n",
+ "rpi=3.75*10**3 #dynamic drain resistance(ohms)\n",
+ "r1=4*10**3 #resistance(ohms)\n",
+ "r2=42*10**3 #resistance(ohms)\n",
+ "r3=303*10**3 #resistance(ohms)\n",
+ "f=20 #frequency(Hz)\n",
+ "beeta=100 #common emitter current gain\n",
+ "Rl=10*10**3 #load resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Req=(((r1*r2)/(r1+r2)+rpi)*r3)/(((r1*r2)/(r1+r2)+rpi)+r3) #equivalent resistance(ohms)\n",
+ "Ce=(beeta+1)/(2*(math.pi)*f*Req) #emitter capacitance(uF)\n",
+ "\n",
+ "#Part b\n",
+ "gm=beeta/rpi #transconductance\n",
+ "Ro=(Rl*r1)/(r1+Rl) #output resistance(k ohms)\n",
+ "Ceq=Cpi+(Cu*(1+gm*Ro)) #equivalent capacitance(pF)\n",
+ "Co=C+(Cu*(1+(1/(gm*Ro)))) #output capacitance(pF)\n",
+ "r=(rpi*r1)/(rpi+r1) #rpi||r1\n",
+ "w21=1/(Ceq*r) #lower cutoff frequency(MHz)\n",
+ "w22=1/(Co*Ro) #higher cutoff frequenct(MHz)\n",
+ "\n",
+ "#Part c\n",
+ "Ceqnew=Cpi+(Cu*(1+(0.75*(gm*Ro)))) #as gain is reduced to 75% of original value\n",
+ "wHnew=(10**12)/(Ceqnew*r) #corner value of high frequency(Mrad/s) \n",
+ "fHnew=wHnew/(2*(math.pi)) #new value of higher frequency cutoff(KHz)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)value of bypass capacitor Ce is\",round(Ce/1E-6),\"uF\"\n",
+ "if w21>w22:\n",
+ " print\"higher frequency is w21\"\n",
+ "else:\n",
+ " print\"higher frequency is w22\"\n",
+ "\n",
+ "print\"b)high frequency cut-off is\",round((w22/1E+3),2),\"Mrad/s\"\n",
+ "print\"c)high frequency cut-off is\",fHnew,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)value of bypass capacitor Ce is 111.0 uF\n",
+ "higher frequency is w22\n",
+ "b)high frequency cut-off is 6.36 Mrad/s\n",
+ "c)high frequency cut-off is 2.64660617737e+14 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19,Page number 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=3. #supply voltage to collector(V)\n",
+ "Vee=-3. #supply voltage to emitter(V)\n",
+ "r1=40. #resistance(ohms) \n",
+ "r2=25. #resistance(ohms)\n",
+ "r3=1.56 #resistance(ohms)\n",
+ "Vs=3. #source voltage(V)\n",
+ "beeta=200 #common emitter current gain\n",
+ "r4=0.6 #resistance(ohms)\n",
+ "r5=0.15 #resistance(ohms)\n",
+ "Vbe=0.7 #base to emitter voltage\n",
+ "r=0.5 #resistance(k ohms)\n",
+ "fL=20 #frequency(Hz)\n",
+ "Req1=24.24 #solving r||(Rth+rpi+R)||Re\n",
+ "f=2 #non dominant cutoff freq is fL/10 i.e 20/10\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vth=Vs-(((Vcc-Vee)/(r1+r2))*r1) #thevinine's voltage(V)\n",
+ "Rth=(r1*r2)/(r1+r2) #thevinine's voltage(V)\n",
+ "Ib=(Vth-Vbe+Vcc)/(Rth+((r4+r5)*(beeta+1))) #base current(mA)\n",
+ "Ic=Ib*beeta #Collector current(mA) \n",
+ "Vo=Vcc-(r3*Ic) #output voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "rpi=(25*beeta)/Ic #dynamic drain resistance(ohms)\n",
+ "R=r4*(beeta+1) #resistance(k ohms)\n",
+ "ro=(rpi*R)/(rpi+R) #rpi||R(k ohms)\n",
+ "Req=r+((Rth*ro)/(Rth+ro)) #equivalent resistance(k ohms) \n",
+ "Cc1=1/(Req*2*(math.pi)*fL) #coupling capacitor(uF)\n",
+ "\n",
+ "#Part c\n",
+ "Ce=1/(2*(math.pi)*fL*Req1) #emitter capacitance(uF)\n",
+ "CE=beeta*Ce #emitter capacitance(uF) after current gain\n",
+ "\n",
+ "#Part d\n",
+ "Ce1=1/(2*(math.pi)*f*Req1) #emitter capacitance(uF)\n",
+ "CE1=beeta*Ce1 #emitter capacitance(uF) after current gain\n",
+ "Csum=Cc1+CE1 #total capacitance(uF)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)Ic and Vo are\",round(Ic,2),\"mA and\",round(Vo),\"V\"\n",
+ "print\"b)Cc1 is\",round((Cc1/1E-3),3),\"uF\"\n",
+ "print\"c)Ce is\",round((CE/1E-3),1),\"uF\"\n",
+ "print\"d)Csum is\",round((Csum/1E-2),3),\"uF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Ic and Vo are 1.94 mA and -0.0 V\n",
+ "b)Cc1 is 0.565 uF\n",
+ "c)Ce is 65.7 uF\n",
+ "d)Csum is 65.715 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.21,Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "gm=2 #transconductance\n",
+ "rd=200*10**3 #dynamic drain resistance(ohms)\n",
+ "Cgs=10 #gate to source capacitance(pF)\n",
+ "Cgd=0 #gate to drain capacitance(pF)\n",
+ "Rs=1*10**3 #source resistance(ohms)\n",
+ "Rg=1*10**6 #Rg=R1||R2\n",
+ "Rd=5*10**3 #drain resistance(ohms) \n",
+ "Rs1=2 #resistance(k ohms) \n",
+ "Cc1=Cc2=0.1*10**-6 #coupling capacitors(F)\n",
+ "Co=10*10**-12 #output capacitance(F)\n",
+ "Vgs=1 #gate to source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "R=(Rd*rd)/(Rd+rd) #Rd||rd(k ohms)\n",
+ "Avo=Vo=-Vgs*gm*R #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "w11=1/(Cc1*(Rs*Rg)) #corner freq(rad/s)\n",
+ "wL=w11 #input circuit corner freq(rad/s)\n",
+ "\n",
+ "#Part c\n",
+ "w22=10**12/((Cgs*R)*10**3) #output circuit corner frequency(rad/s)\n",
+ "wH=w22/(2*math.pi) \n",
+ "\n",
+ "#Part d\n",
+ "G=-Avo*wH #gain bandwidth product\n",
+ "\n",
+ "#Part e\n",
+ "Rd=4*10**3 #drain resistance reduced(ohms) \n",
+ "Rnew=(Rd*rd)/(Rd+rd) #new resistance(ohms)\n",
+ "Avo1=-Vgs*gm*Rnew #new voltage gain\n",
+ "BWnew=(10**8/Rnew)/(2*math.pi) #new bandwidth(Mrad/s)\n",
+ "Gnew=-Avo1*BWnew #gain bandwidth product new\n",
+ "\n",
+ "#Results\n",
+ "print\"a)Avo is\",round((Avo/1E+3),2)\n",
+ "print\"b)wL is\",round((wL/1E-3),2),\"rad/s\"\n",
+ "print\"c)wH is\",round((wH/1E+3),1),\"MHz\"\n",
+ "print\"d)G is\",round((G/1E+6),2),\"MHz\"\n",
+ "print\"e)Gnew is\",round((Gnew/1E+6),1),\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Avo is -9.76\n",
+ "b)wL is 10.0 rad/s\n",
+ "c)wH is 3.3 MHz\n",
+ "d)G is 31.83 MHz\n",
+ "e)Gnew is 31.8 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23,Page number 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "gm=1 #transconductance\n",
+ "rd=40 #dynamic drain resistance(k ohms) \n",
+ "Cgs=5 #gate to source capacitance(pF)\n",
+ "Cgd=1 #gate to drain capacitance(pF)\n",
+ "Cds=1 #drain to source capacitance(pF)\n",
+ "Avo1=20. #voltage gain of JFET 1\n",
+ "Avo2=8. #voltage gain of JFET 2 \n",
+ "R1=5 #resistance(k ohms)\n",
+ "R2=20 #resistance(k ohms)\n",
+ "R3=8 #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Avo=Avo1*Avo2 #voltage gain\n",
+ "Ceq1=Cgs+Cgd*(1+Avo1) #input crcuit for first JFET\n",
+ "Co1=Cds+(Cgd*(1+(1/Avo1))) #output crcuit for first JFET\n",
+ "Ceq2=Cgs+Cgd*(1+Avo2) #input crcuit for second JFET\n",
+ "Co2=Cds+(Cgd*(1+(1/Avo2))) #output crcuit for second JFET\n",
+ "\n",
+ "#Part b\n",
+ "w21=1/(R1*Ceq1) #input circuit frequency\n",
+ "w2=10**12/(R2*10**3*(Co1+Ceq2)) #common circuit frequency\n",
+ "w22=1/(R3*Co2) #output circuit frequency\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print\"a)Avo is\",Avo\n",
+ "print\"b)w21,w2,w22 are\",round((w21/1E-3),2),\"Mrad/sec,\",round((w2/1E+6),2),\"Mrad/sec and\",round((w22/1E-3),2),\"Mrad/sec\"\n",
+ "print\"nondominant corner freq is\",round((w2/1E+6),2),\"Mrad/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Avo is 160.0\n",
+ "b)w21,w2,w22 are 7.69 Mrad/sec, 3.12 Mrad/sec and 58.82 Mrad/sec\n",
+ "nondominant corner freq is 3.12 Mrad/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter5.ipynb b/Electronics_Devices_And_Circuits/chapter5.ipynb
new file mode 100755
index 00000000..437b0a36
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter5.ipynb
@@ -0,0 +1,653 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9eef90d3b867f35b7e7b7ae71f5d96e96e47a495dc677c7492d34992d7905497"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Large Signals Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1,Page number 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rb=1*10**3 #base resistance(ohms)\n",
+ "Vcc=20 #supply voltage(V)\n",
+ "Rc=20 #collector resistance(ohms) \n",
+ "beeta=25 #current gain \n",
+ "Vbe=0.7 #base to emitter voltage(V) \n",
+ "ib=10*10**-3 #base current(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ibq=(Vcc-Vbe)/Rb #current(A)\n",
+ "Icq=beeta*Ibq #current(A)\n",
+ "Vceq=Vcc-(Icq*Rc) #collector voltage(V)\n",
+ "ic=beeta*ib #collector current(A)\n",
+ "Po=((ic/(math.sqrt(2)))**2)*Rc #output voltage(V)\n",
+ "Pi=Vcc*Icq #input power(W)\n",
+ "eta=(Po/Pi)*100 #efficiency \n",
+ "Pd=Pi-((Icq**2)*Rc)-Po #power dissipated(W) \n",
+ "\n",
+ "#Results\n",
+ "print\"input power is Pi\",Pi,\"W\"\n",
+ "print\"output power is Po\",Po,\"W\"\n",
+ "print\"power dissipated is\",round(Pd,1),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input power is Pi 9.65 W\n",
+ "output power is Po 0.625 W\n",
+ "power dissipated is 4.4 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2,Page number 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration \n",
+ "Rl=500 #load resistance(ohms)\n",
+ "Vceq=50 #queinscent collector voltage(V)\n",
+ "beetamin=30 #current gain minimum(at Q)\n",
+ "Icq=0.4 #queinscent collector current(A)\n",
+ "Ibq=8 #queinscent base current(mA)\n",
+ "\n",
+ "#Calculations\n",
+ "Rac=Vceq/Icq #ac resistance(ohms)\n",
+ "beeta=(Icq*10**-3)/Ibq #current gain\n",
+ "Re=5/Icq #emitter resistance(ohms)\n",
+ "Rc=(512.5*Rac)/(512.5-Rac) #as Re+Rl=500+12.5=512.5\n",
+ "Vcc=5+Vceq+(Icq*Rc) #supply voltage(V) \n",
+ "Rb=(beetamin*Re)/10 #base resistance(ohms)\n",
+ "R1=39.5 #solving 125=Rc||(Rl+Re) and Vbb=Vcc*(R1/(R1+R2))\n",
+ "R2=750\n",
+ "Pi=120*Icq #Vcc chosen as 120\n",
+ "r=(Rc*Rl)/(Rc+Rl)\n",
+ "Poac=(100/(2*math.sqrt(2)))**2/r #output power(W)\n",
+ "etamax=Poac/Pi #efficiency\n",
+ "Poac1=(100/(2*math.sqrt(2)))**2/Rl #ac power absorbed by load(W)\n",
+ "eta=Poac1/Pi \n",
+ "Pc=(Icq**2)*Rc #power lost in Rc(W)\n",
+ "Pe=(Icq**2)*Re #power lost in Re(W)\n",
+ "Pd=Pi-Pc-Pe-Poac #power consumed(W)\n",
+ "\n",
+ "#Results\n",
+ "print\"input power is Pi\",Pi,\"W\"\n",
+ "print\"output power is Po\",round(Poac,2),\"W\"\n",
+ "print\"dissipated power is\",round(Pd,2),\"W\"\n",
+ "print\"values of R1,R2,Re and Rc are\",R1,\"ohms,\",R2,\"ohms,\",Re,\"ohms and\",round(Rc),\"ohms resp. (Calculated value of Rc is wrong in the book)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input power is Pi 48.0 W\n",
+ "output power is Po 10.06 W\n",
+ "dissipated power is 9.49 W\n",
+ "values of R1,R2,Re and Rc are 39.5 ohms, 750 ohms, 12.5 ohms and 165.0 ohms resp. (Calculated value of Rc is wrong in the book)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3,Page number 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pmax=10 #power maximum(W)\n",
+ "Ic=1 #collector current(A)\n",
+ "Vcemax=100 #max collector to emitter current(V)\n",
+ "Vcemin=2 #min collector to emitter current(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vceq=46 #Vce at Q point \n",
+ "Icq=0.21 #Ic at Q point \n",
+ "Vcc=92 #supply voltage(V)\n",
+ "ic=0.42 #collector current(A) \n",
+ "\n",
+ "#Part b\n",
+ "Rl=Vceq/Icq #load resistance(ohms)\n",
+ "\n",
+ "#Part c\n",
+ "Pi=Vcc*Icq #input power(W)\n",
+ "Po=((ic/(2*math.sqrt(2)))**2)*Rl #output power(W)\n",
+ "eta=(Po/Pi)*100 #efficiency\n",
+ "\n",
+ "#Results\n",
+ "print\"Rl for maximum power input is\",round(Rl),\"ohms\"\n",
+ "print\"input power is is\",Pi,\"W\"\n",
+ "print\"Po is\",Po\n",
+ "print\"eta is\",eta,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rl for maximum power input is 219.0 ohms\n",
+ "input power is is 19.32 W\n",
+ "Po is 4.83\n",
+ "eta is 25.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4,Page number 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=15 #supply voltage(V)\n",
+ "beeta=40. #current gain\n",
+ "Icq=5. #Ic at Q(mA)\n",
+ "Vceq=7.5 #Vce at Q(V) \n",
+ "icswing=10 #swing in ic(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rl=Vceq/Icq*10**-3 #load resistance(ohms) \n",
+ "\n",
+ "#Part b\n",
+ "Ibq=Icq/beeta #base current at Q(uA)\n",
+ "\n",
+ "#Part c\n",
+ "ibswing=icswing/beeta #swing in ib(mA)\n",
+ "Pac=Rl*(icswing/(2*math.sqrt(2)))**2 #ac power(W)\n",
+ "Pdc=Vcc*(Icq*10**-3) #dc power(W)\n",
+ "eta=(Pac/Pdc)*100 #efficiency\n",
+ "\n",
+ "#Results\n",
+ "print\"a)value of Rl is\",round(Rl/1E-6),\"ohms\"\n",
+ "print\"b)Ibq is\",round(Ibq/1E-3),\"uA\"\n",
+ "print\"c)ac power output is\",round((Pac/1E-3),2),\"mW\"\n",
+ "print\"efficiency is\",eta,\"%\"\n",
+ "print\"corresponding swing in ib is\",ibswing,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)value of Rl is 1500.0 ohms\n",
+ "b)Ibq is 125.0 uA\n",
+ "c)ac power output is 18.75 mW\n",
+ "efficiency is 25.0 %\n",
+ "corresponding swing in ib is 0.25 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5,Page number 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=Vce=10 #supply voltage(V) \n",
+ "Icq=140*10**-3 #Ic at Q point(A)\n",
+ "Rl=8 #load resistance(ohms)\n",
+ "vce=16 #instantaneous collector to emitter voltage(V)\n",
+ "ic=235*10**-3 #instantaneous collector current(A)\n",
+ "\n",
+ "#Calculations\n",
+ "RL=Vcc/Icq\n",
+ "r=math.sqrt(RL/Rl) #load resistance for max ac swing(ohms)\n",
+ "Po=(vce*ic)/(2*math.sqrt(2)*2*math.sqrt(2)) #output power(W)\n",
+ "Pi=Vcc*Icq #input power(W) \n",
+ "eta=Po/Pi #efficiency\n",
+ "Pd=Pi-Po #dissipated power(W) \n",
+ "\n",
+ "#Results\n",
+ "print\"a)transformation ratio is\",round(r)\n",
+ "print\"c)power output is\",Po,\"W\"\n",
+ "print\"efficiency is\",round(eta*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)transformation ratio is 3.0\n",
+ "c)power output is 0.47 W\n",
+ "efficiency is 33.57 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6,Page number 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rl=4.5 #load resistance(ohms)\n",
+ "Vceq=50 #Vc at point Q(V)\n",
+ "Icq=400*10**-3 #Ic at Q(A)\n",
+ "Re=12.5 #emitter resistance(ohms)\n",
+ "Vcemax=90 #from figure \n",
+ "Vcemin=10 #from figure\n",
+ "Icmax=730 #max Ic(mA)\n",
+ "Icmin=30 #min Ic(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rac=Vceq/Icq #ac resistance(ohms)\n",
+ "n=math.sqrt(Rac/Rl) #as n=N1/N2 and Rac=(N1/N2)^2*Rl\n",
+ "\n",
+ "#Part b\n",
+ "Vcc=Vceq+(Icq*Re) #supply voltage(V) \n",
+ "\n",
+ "#Part c\n",
+ "vce=Vcemax-Vcemin #instantaneous collector to emitter voltage(V)\n",
+ "ic=Icmax-Icmin #instantaneous collector current(mA)\n",
+ "Po=(vce*ic)/((2*math.sqrt(2))*(2*math.sqrt(2))) #output voltage(V)\n",
+ "Pi=Vcc*Icq #input voltage(V) \n",
+ "eta=(Po/Pi)*100 #efficiency\n",
+ "Pd=Pi-(Icq**2*Re)-Po*10**-3 #dissipated power(W)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)transformation ratio is\",round(n,2)\n",
+ "print\"b)Vcc is\",Vcc,\"V\"\n",
+ "print\"c)power efficiency for the load is\",round((eta/1E+3),1),\"%\"\n",
+ "print\"power dissipated is\",Pd,\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)transformation ratio is 5.27\n",
+ "b)Vcc is 55.0 V\n",
+ "c)power efficiency for the load is 31.8 %\n",
+ "power dissipated is 13.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7,Page number 295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding input power,output power,Pd,efficiency,\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=30 #supply voltage(V)\n",
+ "Rl=16 #load resistance(ohms) \n",
+ "n=2 #transformation ratio\n",
+ "Im=1 #peak value of current(A)\n",
+ "etamax=78.54 #max efficiency(%)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Rl1=Rl*(n/2)**2 #load resistance(ohms)\n",
+ "Pi=(2*Vcc*Im)/math.pi #input power(W)\n",
+ "Pimax=(2*Vcc**2)/((math.pi)*Rl1) #input power max(W)\n",
+ "\n",
+ "#Part b\n",
+ "Po=((Im**2)*Rl1)/2 #output power(W)\n",
+ "Pomax=(Vcc**2)/(2*Rl1) #output power max(W)\n",
+ "\n",
+ "#Part c\n",
+ "eta=Po/Pi #efficiency\n",
+ " \n",
+ "\n",
+ "#Part d\n",
+ "P=((2*Vcc*Im)/math.pi)-((Im**2*Rl1)/2) #Power dissipated by transistors(W)\n",
+ "Pd=P/2 #power dissipated by each transistors\n",
+ "Pmax=(2*Vcc**2)/((math.pi)**2*Rl1) #max power dissipated by transistors\n",
+ "Pdmax=Pmax/2 #max power dissipated by each transistor\n",
+ "\n",
+ "#Results\n",
+ "print\"a)input power is\",round(Pi,1),\"W and max input power is\",round(Pimax,2),\"W\"\n",
+ "print\"b)output power \",Po,\"W and max output power is\",round(Pomax,2),\"W\"\n",
+ "print\"c)power efficiency for the load is\",round((eta/1E-2),2),\"% and its max value is\",etamax,\"%\"\n",
+ "print\"power dissipated by each transiator is\",round(Pd,1),\"W and max value is\",round(Pdmax,1),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)input power is 19.1 W and max input power is 35.81 W\n",
+ "b)output power 8 W and max output power is 28.0 W\n",
+ "c)power efficiency for the load is 41.89 % and its max value is 78.54 %\n",
+ "power dissipated by each transiator is 5.5 W and max value is 5.7 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8,Page number 296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "Pd=10\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Poacmax=10. #as Pd=Po(ac)max by class A\n",
+ "\n",
+ "#Part b\n",
+ "Pd=2*Poacmax #power dissipated(W)\n",
+ "Poacmax1=146/2 #max output power by class B\n",
+ "f=Poacmax1/Poacmax #factor by which power of class B is greater than class A\n",
+ " \n",
+ "#Results\n",
+ "print\"maximum signal output powerclass A produce is\",Poacmax,\"W\"\n",
+ "print\"maximum signal output powerclass produce is\",Poacmax1,\"W\"\n",
+ "print\"factor by which power in class b is larger than power in class A transformer is\",f"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum signal output powerclass A produce is 10.0 W\n",
+ "maximum signal output powerclass produce is 73 W\n",
+ "factor by which power in class b is larger than power in class A transformer is 7.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9,Page number 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=30. #supply voltage(V)\n",
+ "Im=1 #peak value of current(A)\n",
+ "Rl=10. #load resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Pi=(Vcc*Im)/math.pi #input power(W)\n",
+ "Pimax=(Vcc**2)/(math.pi*2*Rl) #max input power(W)\n",
+ "\n",
+ "#Part b\n",
+ "Po=((Im**2)*Rl)/2 #output power(W)\n",
+ "Pomax=(Vcc**2)/(8*Rl) #output power max(W)\n",
+ "\n",
+ "#Part c\n",
+ "eta=Po/Pi #efficiency\n",
+ "etamax=Pomax/Pimax #efficiency max \n",
+ "\n",
+ "#Part d\n",
+ "Pd=Pi-Po #Power dissipated by transistors(W) \n",
+ "Pmax=(Vcc**2)/(2*(math.pi)**2*Rl) #max power dissipated by transistors\n",
+ " \n",
+ "#Results\n",
+ "print\"a)input power is \",round(Pi,2),\"W and max input power is\",round(Pimax,2),\"W\"\n",
+ "print\"b)output power is \",Po,\"W and max output power is\",round(Pomax,2),\"W\"\n",
+ "print\"c)power efficiency for the load is\",round((eta/1E-2),2),\"% and its max value is\",round((etamax/1E-2),2),\"%\"\n",
+ "print\"power dissipated and its max value are\",round(Pd,2),\"W and\",round(Pmax,2),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)input power is 9.55 W and max input power is 14.32 W\n",
+ "b)output power is 5.0 W and max output power is 11.25 W\n",
+ "c)power efficiency for the load is 52.36 % and its max value is 78.54 %\n",
+ "power dissipated and its max value are 4.55 W and 4.56 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10,Page number 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "P1=2 #transistor power(W)\n",
+ "Rl=5*10**3. #load resistance()\n",
+ "Ic=35 #collector current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "Bo=40-Ic \n",
+ "B1=math.sqrt((2*P1)/Rl)\n",
+ "B2=Bo\n",
+ "D2=(B2/B1)*100 #second harmonic distortion(%)\n",
+ "\n",
+ "#Results\n",
+ "print\"second harmonic distortion is\",round((D2/1E+3),2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "second harmonic distortion is 17.68 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12,Page number 314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=15. #supply voltage(V)\n",
+ "Rl=10. #load resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Immax=Vcc/Rl #max peak current(A)\n",
+ "Irmsmax=Immax/(math.sqrt(2)) #max rms current(A)\n",
+ "Pomax=Irmsmax**2*Rl #max output power(W)\n",
+ "Pi=(2*Vcc*Immax)/math.pi #max input power(W)\n",
+ "eta=Pomax/Pi #efficiency\n",
+ "\n",
+ "#Part b \n",
+ "Im=(2*Vcc)/(math.pi*Rl) #peak current(A)\n",
+ "Pdmax=((2*Vcc*Im)/(math.pi))-((Im**2*Rl)/2) #max power dissipated(W)\n",
+ "eta1=((Im**2)*Rl*math.pi)/(2*2*Vcc*Im) #efficiency\n",
+ "\n",
+ "#Results\n",
+ "print\"a)max signal output power,collector dissipation are\",Pomax,\"W,\",round(Pi,2),\"W and efficiency is\",round((eta/1E-2),2),\"%\"\n",
+ "print\"b)max dissipation of each transistor and corresponding efficiency is\",round(Pdmax,2),\"W and\",eta1,\"resp.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)max signal output power,collector dissipation are 11.25 W, 14.32 W and efficiency is 78.54 %\n",
+ "b)max dissipation of each transistor and corresponding efficiency is 4.56 W and 0.5 resp.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13,Page number 315"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculations\n",
+ "eta=0.5 #As Po(ac)=Vcc^2/2*pi^2*Rl and Pi(dc)=Vcc^2/pi^2*Rl\n",
+ " #put these in eta=Po(ac)/Pi(dc) which is 1/2=0.5 \n",
+ " \n",
+ "#Results\n",
+ "print\"push pull amplifier efficiency is\",round(eta/1E-2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "push pull amplifier efficiency is 50.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter7.ipynb b/Electronics_Devices_And_Circuits/chapter7.ipynb
new file mode 100755
index 00000000..f37b3943
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter7.ipynb
@@ -0,0 +1,645 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4a9283ba6472e11de214bfc0c69a7f007685d94fb7b513179011a2e471e81b7b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:Operational Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1,Page number 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V1=120 #negative terminal Vn(uV)\n",
+ "V2=80 #positive terminal Vp(uV)\n",
+ "Ad=10**3 #difference mode gain\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vd=V1-V2 #difference mode signal(uV) \n",
+ "Vc=(V1+V2)/2 #common mode signal(uV)\n",
+ "\n",
+ "#Part a\n",
+ "CMRR=100. #common mode rejection ratio\n",
+ "Vo=Ad*Vd*(1+(Vc/(CMRR*Vd))) #output voltage(mV)\n",
+ " \n",
+ "#Part b\n",
+ "CMRR=10**5. #common mode rejection ratio\n",
+ "Vo1=Ad*Vd*(1+(1/CMRR)*(Vc/Vd)) #output voltage(mV) \n",
+ "\n",
+ "#Results\n",
+ "print\"output voltage is\",round(Vo/1E+3),\"mV\"\n",
+ "print\"output voltage is\",round(Vo1/1E+3),\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage is 41.0 mV\n",
+ "output voltage is 40.0 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2,Page number 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "deltavi=0.5 #change in vi(V)\n",
+ "deltat=10 #change in time(us)\n",
+ "s=1 #slew rate(V/us)\n",
+ "\n",
+ "#Calculations\n",
+ "Kvf=(s*deltat)/deltavi #closed loop gain of amplifier\n",
+ "\n",
+ "#Results\n",
+ "print\"closed loop gain of amplifier is\",Kvf"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop gain of amplifier is 20.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3,Page number 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=50*10**3. #OPAMP freequency(Hz)\n",
+ "Vm=0.02 #maximum value of signal voltage(V)\n",
+ "S=.5*10**6 #slew rate(V/s)\n",
+ "\n",
+ "#Calculations\n",
+ "Kvf=S/(2*(math.pi)*f*Vm) #closed loop gain of amplifier\n",
+ "\n",
+ "#Results\n",
+ "print\"closed loop gain of amplifier is\",round(Kvf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "closed loop gain of amplifier is 80.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4,Page number 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ic=100 #current at quinscent point(uA)\n",
+ "beta=2000. #current gain\n",
+ "Ad=250 #difference mode gain\n",
+ "CMRR=5000 #as 74 dB=5000,common mode rejection ratio(dB)\n",
+ "\n",
+ "#Calculations\n",
+ "rpi=(25*beta)/Ic #dynamic internal resistance(k ohms) \n",
+ "gm=beta/rpi #transconductance(mS)\n",
+ "Re=CMRR/gm #emitter resistance(k ohms)\n",
+ "Rc=(Ad*2)/gm #collector resistance(k ohms) from formula Ad=gmRc/2\n",
+ "Rin=2*rpi #input resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"Re is\",Re,\"k ohms\"\n",
+ "print\"Rc is\",Rc,\"k ohms\"\n",
+ "print\"input resistance is\",Rin,\"k ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Re is 1250.0 k ohms\n",
+ "Rc is 125.0 k ohms\n",
+ "input resistance is 1000.0 k ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6,Page number 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Icq=.428 #current at quinscent point(uA)\n",
+ "beta=200. #current gain\n",
+ " #as 74 dB=5000,common mode rejection ratio(dB)\n",
+ "Rc=10. #collector resistance(k ohms) \n",
+ "Re=16. #emitter resistance(k ohms) \n",
+ "Vcc=15. #supply voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part b\n",
+ "Ibq=Icq/beta #Ib at Q(uA)\n",
+ "rpi=(25*beta)/Icq #dynamic resistance(k ohms)\n",
+ "gm=beta/rpi #transconductance\n",
+ "\n",
+ "#Part b\n",
+ "vo1=Vcc-(Icq*Rc) #terminal 1 voltage(V) \n",
+ "vo2=vo1 #terminal 2 voltage(V) \n",
+ "\n",
+ "#Part c \n",
+ "Ad=(gm*Rc)/2 #differential mode gain\n",
+ "Ac=Rc/(2*Re) #common mode gain\n",
+ "CMRR=Ad/Ac #common mode rejection ratio\n",
+ "\n",
+ "#Part d\n",
+ "Rid=2*rpi #differential input resistance(k ohms)\n",
+ "rpi=11.7 #dynamic resistance(k ohms)\n",
+ "Ric=rpi+(2*(beta+1)*Re) #common mode input resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"Icq is\",Icq,\"mA,and Ibq is \",round((Ibq/1E-3),2),\"uA\"\n",
+ "print\"vo1 and vo2 have same value as\",vo1,\"V\"\n",
+ "print\"\",\n",
+ "print\"Ad:\",round(Ad/1E-3),\",Ac:\",round(Ac,3),\"and CMRR is\",round(CMRR/1E-3)\n",
+ "print\"Rid is\",round((Rid/1E+3),1),\"K ohms and Ric is\",round((Ric/1E+3),2),\" Mohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Icq is 0.428 mA,and Ibq is 2.14 uA\n",
+ "vo1 and vo2 have same value as 10.72 V\n",
+ " Ad: 86.0 ,Ac: 0.313 and CMRR is 274.0\n",
+ "Rid is 23.4 K ohms and Ric is 6.44 Mohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7,Page number 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R1=10. #series resistance(K ohms)\n",
+ "Rf=10**3. #feedback resistance(k ohms) \n",
+ "vo=-5. #output voltage(V)\n",
+ "Ri=1000 #input resistance(k ohms)\n",
+ "Av=2.5*10**5 #gain\n",
+ "\n",
+ "#Calculations\n",
+ "v1=-vo*(R1/Rf) #input signal voltage(V)\n",
+ "vi=-vo/Av #inverting voltage(V) \n",
+ "i1=((v1*10**-3)-vi)/R1 #current through R1(uA)\n",
+ "ii=vi/Ri #inverting current(uA)\n",
+ "iF=-ii #forward current(uA)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of vi is\",vi,\"mV\"\n",
+ "print\"value of ii:\",ii,\"uA i1:,\",i1,\"uA and iF is\",iF,\"uA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of vi is 2e-05 mV\n",
+ "value of ii: 2e-08 uA i1:, 3e-06 uA and iF is -2e-08 uA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8,Page number 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vs=4 #source voltage(V)\n",
+ "R1=10. #resistance(k ohms)\n",
+ "Vb=Va=2 #voltage at point A and point B\n",
+ "Rf=30 #forward resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "I=(Vs-Vb)/R1 #current(mA)\n",
+ "Vo=(-I*Rf)+Vb #output voltage(V) \n",
+ "\n",
+ "#Result\n",
+ "print\"output voltage\",Vo,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage -4.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9,Page number 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rf=2 #as vs=2sinwt and vo=(1+Rf/Rs)*vb and vB=vA=vs\n",
+ "Rs=1\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "vo=(1+(Rf/Rs))*2 #output voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print\"output voltage\",vo,\"sinwt\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage 6 sinwt\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10,Page number 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ro=100. #output resistance(ohms)\n",
+ "vo=10. #output voltage(V)\n",
+ "A=10**5. #gain \n",
+ "Ri=100*10**3 #input resistance(ohms) \n",
+ "Rs=1*10**3. #resistance(ohms)\n",
+ "Rl=10*10**3 #load resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part i\n",
+ "iL=vo/Rl #load current(mA)\n",
+ "Avi=vo+(iL*Ro) #voltage gain without feedback\n",
+ "vi=Avi/A #voltage(V)\n",
+ "ii=vi/Ri #current(A) \n",
+ "vs=vo+ii*(Rs+Ri) #source voltage(V)\n",
+ "\n",
+ "#Part ii\n",
+ "Avf=vo/vs #voltage gain with feedback \n",
+ "\n",
+ "\n",
+ "#Part iii\n",
+ "Rif=vs/ii #input resistance(ohms) \n",
+ "Rof=Ro/A #output resistance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"vs is\",round(vs,4),\"V\"\n",
+ "print\"vo/vs that is Avf is\",Avf\n",
+ "print\"input and output resistances are\",Rif,Rof,\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "vs is 10.0001 V\n",
+ "vo/vs that is Avf is 0.999989799104\n",
+ "input and output resistances are 9901091099.01 0.001 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11,Page number 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vb=Va=3 #voltage at A and B \n",
+ "R1=40*10**3. #input resistance(ohms)\n",
+ "t=50*10**-3 #time after switch is open(mS)\n",
+ "V1=5 #input voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "vo=-3 #as Va=Vb=3\n",
+ "\n",
+ "#Part b\n",
+ "i1=(V1-Vb)/R1 #input current(A)\n",
+ "vo1=(-250*t)-Va #vo at 50 mS\n",
+ "\n",
+ "#Result\n",
+ "print\"output voltage\",vo1,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output voltage -15.5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14,Page number 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "BW=30*10**3 #specified bandwidth(k Hz)\n",
+ "fc=18*10**3 #centered frequency(Hz)\n",
+ "R1=20 #resistance(k ohms) \n",
+ "R2=180 #resistance(k ohms) \n",
+ "C=1.2*10**-9 #capacitance(F)\n",
+ "G=40 #pass band gain(dB)\n",
+ "g=20 #pass region gain(dB)\n",
+ "\n",
+ "#Calculationsv\n",
+ "fc1=fc-(BW/2) #high pass section frequency(Hz)\n",
+ "fc2=fc+(BW/2) #low pass section frequency(Hz)\n",
+ "Rfc1=1/(2*math.pi*fc1*C) #high pass section resistance(k ohms)\n",
+ "Rfc2=1/(2*math.pi*fc2*C) #low pass section resistance(k ohms)\n",
+ "Gfc1=G-g #gain at frequency 0.3KHz(dB)\n",
+ "Gfc2=G-2*6 #gain at frequency 132KHz(dB)\n",
+ "\n",
+ "#Results\n",
+ "print\"R1 and R2 are\",R1,\"K ohms and\",R2,\"K ohms\"\n",
+ "print\"Rfc1 is\",round(Rfc1/1E+3),\"k ohms and Rfc2 is\",round(Rfc2/1E+3),\"k ohms\"\n",
+ "print\"filter gain at frequencies 0.3 KHz is\",Gfc1,\"dB and 132 k Hz are\",Gfc2,\"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R1 and R2 are 20 K ohms and 180 K ohms\n",
+ "Rfc1 is 44.0 k ohms and Rfc2 is 4.0 k ohms\n",
+ "filter gain at frequencies 0.3 KHz is 20 dB and 132 k Hz are 28 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.21,Page number 402"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=250 #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#part a\n",
+ "R1=-R/(-5) #as vo=-5va+3vb(given),so when vb=0,vo/voa=-250/R1=-5\n",
+ "\n",
+ "#part b\n",
+ "R2=R1/(2-1) #as va=0\n",
+ " #vx=(R1/R1+R)*vob=(1/6)*vb\n",
+ " #vy=(R2/R1+R2)*vb\n",
+ " #vx=vy\n",
+ " #(1/6)*vob=(R2/R1+R2)*vb\n",
+ " #vob=3vb\n",
+ " #(1/6)*3=R2/(50+R2)\n",
+ " \n",
+ "#Result\n",
+ "print\"R1 and R2 are\",R1,\"K ohms and\",R2,\"K ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R1 and R2 are 50 K ohms and 50 K ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.22,Page number 403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R1=10*10**3 #resistance(k ohms)\n",
+ "C1=10**-6 #capacitance(uF) \n",
+ "C=0.1*10**-6 #capacitance(uF) \n",
+ "R=100*10**3 #resistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "#part b \n",
+ "wc1=1/C1*R1 #angular frequency(rad/s)\n",
+ "wc2=1/C*R #angular frequency(rad/s)\n",
+ "wc=wc1=wc2 #angular frequency(rad/s)\n",
+ "\n",
+ "#Results\n",
+ "print\"wc1 is\",wc1/1E+10,\"rad/s\"\n",
+ "print\"wc2 is\",wc2/1e+10,\"rad/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wc1 is 100.0 rad/s\n",
+ "wc2 is 100.0 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.23,Page number 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "vo1=5 #say (V)\n",
+ "K=25 #proportionality constant \n",
+ "Q=250 #volume of fluid passed across metering point(cm^3) \n",
+ "R1=2.5 #output resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "C1=(K*Q)/(R1*vo1) #capacitor(nF)\n",
+ "\n",
+ "#Results\n",
+ "print\"C1 is\",round(C1/1E+1),\"uF\"\n",
+ "print\"vo1 is -5V when Q=250 cm^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C1 is 50.0 uF\n",
+ "vo1 is -5V when Q=250 cm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter8.ipynb b/Electronics_Devices_And_Circuits/chapter8.ipynb
new file mode 100755
index 00000000..326b2cab
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter8.ipynb
@@ -0,0 +1,435 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7039c5014fcc7b7ac57b07f9ca218d5a9c1cf6429694e23e4e8bce3552a45c07"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8:Multivibrators And Switching Regulators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1,Page number 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C=0.1 #capacitance(uF)\n",
+ "R1=10 #resistance(k ohms)\n",
+ "R2=2.3 #resistance(k ohms)\n",
+ "Vcc=12. #supply voltage(V) \n",
+ "Rl=10**3. #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "f=1/(0.693*C*(R2+R1/2)) #frequency(Hz)\n",
+ "\n",
+ "#Part b\n",
+ "D=(1+(R2/R1))/(1+2*(R2/R1))*100 #duty cycle\n",
+ " \n",
+ "#Part c\n",
+ "#(i)\n",
+ "T1=0.693*C*(R1+R2) #time period through R1(ms)\n",
+ "T2=0.693*R2*C #time period through R2(ms)\n",
+ "Pavg=(Vcc/Rl)**2*(T1/(T1+T2)) #average power dissipated during current sourcing(mW)\n",
+ "\n",
+ "#Part d\n",
+ "Pavg1=(T2/(T1+T2))*(Vcc/Rl)**2 #average power dissipated during current sinking(mW)\n",
+ "\n",
+ "#Results\n",
+ "print\"print\",round(f,2),\"kHz\"\n",
+ "print\"duty cycle is\",round(D,2),\"%\"\n",
+ "print\"average power dissipated in current sourcing is\",round((Pavg/1E-3),3),\"mW\"\n",
+ "print\"average power dissipated in current sinking is\",round(Pavg1/1e-3,3),\"mW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "print 1.98 kHz\n",
+ "duty cycle is 84.25 %\n",
+ "average power dissipated in current sourcing is 0.121 mW\n",
+ "average power dissipated in current sinking is 0.023 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2,Page number 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "t=1 #time constant\n",
+ "e=1.8 #e=R1/R2 min=1.8\n",
+ "e1=9. #e1=R1/R2 max=9\n",
+ "\n",
+ "#Calculations\n",
+ "Betamin=1/(1+e) #current gain minimum\n",
+ "Betamax=1/(1+e1) #current gain maximum\n",
+ "Tmax=2*t*math.log((1+Betamin)/(1-Betamin)) \n",
+ "Tmin=2*t*math.log((1+Betamax)/(1-Betamax)) \n",
+ "fmin=1/Tmax #minimum freq(Hz)\n",
+ "fmax=1/Tmin #maximum freq(k Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"fmin is\",round(fmin/1E-3),\"Hz and fmax is\",round(fmax,1),\"KHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fmin is 669.0 Hz and fmax is 2.5 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3,Page number 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=0.01 #capacitance(uF)\n",
+ "R2=15 #resistance(k ohms)\n",
+ "Va2=4 #voltage(V)\n",
+ "Vcc=15. #supply voltage(V)\n",
+ "R1=33 #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Va1=0.67*Vcc #voltage(V)\n",
+ "Vamax=Va1+Va2 #Va maximum(V)\n",
+ "Vamin=Va1-Va2 #Va minimum(V)\n",
+ "T1max=C*(R1+R2)*(math.log((1-(Vamax/(2*Vcc)))/(1-(Vamax/Vcc)))) #time period(ms)\n",
+ "T1min=C*(R1+R2)*(math.log((1-(Vamin/(2*Vcc)))/(1-(Vamin/Vcc)))) #time period(ms)\n",
+ "T2=0.693*R2*C\n",
+ "fmax=1/(T1min+T2) #maximum frequency(K Hz)\n",
+ "fmin=1/(T1max+T2) #miniimum frequency(K Hz)\n",
+ "\n",
+ "#Results\n",
+ "print\"minimum freq is\",round(fmin,2),\"(solution given in the textbook is incorrect)\"\n",
+ "print\"maximum freq is\",round(fmax,2),\"(solution given in the textbook is incorrect)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum freq is 0.89 (solution given in the textbook is incorrect)\n",
+ "maximum freq is 4.1 (solution given in the textbook is incorrect)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4,Page number 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vi=25 #input voltage(V) \n",
+ "Vsmax=30 #supply voltage max(V)\n",
+ "Vomin=Vl=12 #output minimum voltage or load voltage(V)\n",
+ "R1=20 #load voltage(V)\n",
+ "Io=15. #output current(mA) \n",
+ "Iq=3. #quinscent current of regulator(mA)\n",
+ "Vo=20. #output voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "#(i)\n",
+ "Vimax=Vsmax #maximum permissible voltage(V)\n",
+ "Ro=0 #for Vomin=beta=0\n",
+ "#(ii)\n",
+ "Vomax=Vi-2\n",
+ "betaVomax=Vomax-Vomin #output voltage(V)\n",
+ "R2max=(R1*betaVomax)/(Vomax-betaVomax) #R2max(k ohms)\n",
+ "#(iii)\n",
+ "R3=betaVomax/Io #R3(k ohms)\n",
+ "\n",
+ "#Part b\n",
+ "Vt=(Iq*betaVomax)/Io #common terminal fall(V)\n",
+ "Vomin1=Vl+Vt #voltage output minimum(V)\n",
+ "\n",
+ "#Part c\n",
+ "betaVo=Vo-Vl #output voltage(V)\n",
+ "beta=betaVo/Vo #current gain\n",
+ "R2=(R1*betaVo)/(Vo-betaVo) #R2(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)i)max permissible supply voltage is\",Vimax,\"V\"\n",
+ "print\"ii)output voltage range for Vi=25V is\",Vomin,\"V to\",Vomax,\"V and R2max is\",R2max,\"k ohms\"\n",
+ "print\"iii)R3 is\",round(R3,2),\"kohms\"\n",
+ "print\"b)Vomin is\",Vomin1,\"V\"\n",
+ "print\"c)R2 is\",round(R2,2),\"ohms and R3 is\",round(R3,3),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)i)max permissible supply voltage is 30 V\n",
+ "ii)output voltage range for Vi=25V is 12 V to 23 V and R2max is 18 k ohms\n",
+ "iii)R3 is 0.73 kohms\n",
+ "b)Vomin is 14.2 V\n",
+ "c)R2 is 13.33 ohms and R3 is 0.733 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5,Page number 434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A=.0025 #voltage gain\n",
+ "Vi=8 #input voltage(V)\n",
+ "R2=1.5 #resistance 2(k ohms)\n",
+ "R1=1 #resistance 1(k ohms)\n",
+ "Vl=5 #load voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "beta=R2/(R1+R2) #current gain\n",
+ "Vo=Vl/(1-beta) #output voltage(V)\n",
+ "Vo1=(A*Vi)/(1+(A*beta)-beta) #output voltage ripple if Vi=8Vp-p\n",
+ "\n",
+ "#Results\n",
+ "print\"Vo is\",Vo,\"V\"\n",
+ "print\"expression of output voltage ripple\",round(Vo1,2),\"Vp-p\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vo is 12.5 V\n",
+ "expression of output voltage ripple 0.05 Vp-p\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6,Page number 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ro=7.5 #output resistance(ohms)\n",
+ "hfe=50 \n",
+ "Ve=20 #voltage given to emitter(V) \n",
+ "Vbe=0.8 #base to emitter voltage(V)\n",
+ "Vc=15 #collector voltage(V)\n",
+ "P=12 #maximum power dissipation(W)\n",
+ "Ib1=5 #for minimum load current Il=0,Ib=5\n",
+ "\n",
+ "#Calculations\n",
+ "Io=(Vc/Ro)*10**3 #output current(A)\n",
+ "Il=76 #load current(mA)\n",
+ "Is=Il+5 #supply current(mA)\n",
+ "Ic=Io-Is #collector current(A)\n",
+ "Ib=Ic/hfe #base current(mA)\n",
+ "Ie=Ic-Ib #emitter current(mA)\n",
+ "Pt=(Ve*Ie)-(Vc*Ic) #power dissipated in transistor(W) \n",
+ "Pl=(Ve-Vbe)*Is-Vc*Il #power dissipated in LR\n",
+ "Vimax=(P+Vc*(Ic*10**-3))/(Ie*10**-3) #input voltage maximum\n",
+ "Iomin=hfe*Ib1 #output current minimum(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"power dissipated in the transistor is\",round((Pt/1E+3),2),\"W and in LR is\",round((Pl/1E+3),3),\"W\"\n",
+ "print\"maximum permissible input voltage is\",round(Vimax,2),\"V\"\n",
+ "print\"minimum load current for load voltage to remain stabalized is\",Iomin,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power dissipated in the transistor is 8.83 W and in LR is 0.415 W\n",
+ "maximum permissible input voltage is 21.69 V\n",
+ "minimum load current for load voltage to remain stabalized is 250 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7,Page number 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "VL=12 #load voltage(V)\n",
+ "I=2. #current at 12 V\n",
+ "V=240 #dc source(V)\n",
+ "d=17/50. #duty cycle\n",
+ "d1=0.6 #duty cycle\n",
+ "eta1=0.8 #efficiency\n",
+ "\n",
+ "#Calculations\n",
+ "P=VL*I #average load power(W)\n",
+ "Isav=(1*d)/2 #average supply current(A)\n",
+ "Pav=V*Isav #average supply power(W)\n",
+ "eta=(P/Pav)*100 #regulator efficiency\n",
+ "Isav1=(1*d1)/2 #average supply current(A)\n",
+ "Il=(eta1*V*Isav1)/Vdc #load current(A)\n",
+ "Po=Il*Vdc #power output(W)\n",
+ "\n",
+ "#Results\n",
+ "print\"regulator efficiency is\",round(eta,1),\"%\"\n",
+ "print\"average supply current is\",Il,\"A\"\n",
+ "print\"power output is\",Po,\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "regulator efficiency is 58.8 %\n",
+ "average supply current is 4.8 A\n",
+ "power output is 57.6 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8,Page number 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vs=200 #dc source voltage(V)\n",
+ "Il=5 #current to load voltage(A)\n",
+ "Vl=15 #load voltage(V)\n",
+ "eta=.85 #efficiency\n",
+ "f=20 #oscillator frequency(Hz)\n",
+ "iSmax=2.6 #peak value of supply current(A)\n",
+ "P=100 #full load power supply(W)\n",
+ "pdf=0.4 #pulse duty factor\n",
+ "\n",
+ "#Calculations\n",
+ "Isav=(Vl*Il)/(Vs*eta) #average peak supply current(A)\n",
+ "iS=(2*Isav)/pdf #supply current(A)\n",
+ "T=1000/f #oscillation time period(uS)\n",
+ "tp=pdf*T #transistor time(us)\n",
+ "d=iS/tp #change in iS with respect to time(A/us)\n",
+ "tp1=iSmax/d #transistor time(us)\n",
+ "pdf1=tp1/T #pulse duty factor\n",
+ "Isav1=(iSmax*pdf1)/2 #average peak supply current(A)\n",
+ "eta1=(P*100)/(Vs*Isav1) #efficiency\n",
+ "\n",
+ "#Results\n",
+ "print\"peak value of supply current is\",round(Isav,3),\"A\"\n",
+ "print\"pdf is\",round(pdf,3)\n",
+ "print\"overall efficienc is\",round(eta1,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak value of supply current is 0.441 A\n",
+ "pdf is 0.4\n",
+ "overall efficienc is 81.6 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/chapter9.ipynb b/Electronics_Devices_And_Circuits/chapter9.ipynb
new file mode 100755
index 00000000..d1e5d34b
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/chapter9.ipynb
@@ -0,0 +1,181 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2422fd711b2fd56d40e4219a033361f9b209ac35916fbe15f9fd192288113f4c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:Integrated Circuit Fabrication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2,Page number 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "t=1 #thickness(mil) \n",
+ "e=1.6*10**-19 #charge on electron(C)\n",
+ "Pp=10**17 #concentration of phosphorous(atoms/cm^3)\n",
+ "Bn=5*10**16 #boron concentration(atoms/cm^3)\n",
+ "un=.135 #mobility(m^2/Vs)\n",
+ "\n",
+ "#Calculations\n",
+ "n=(Pp-Bn)*10**6 #net concentration(atoms/cm^3)\n",
+ "g=e*un*n #conductivity()\n",
+ "rho=10**6/(g*25) #resistivity(ohm mil)\n",
+ "Rs=rho/t #sheet resistance(ohm mil^2)\n",
+ "\n",
+ "#Results\n",
+ "print\"Sheet resistance is\",round(Rs),\"ohm(mil**2)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sheet resistance is 37.0 ohm(mil**2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3,Page number 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=20*10**3 #resistance of resistor(ohms)\n",
+ "w=25 #width(um)\n",
+ "Rs=200 #sheet resistance(ohm/square)\n",
+ "R1=5*10**3 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "l=(R*w)/Rs #length required to fabricate 20 kohms(um)\n",
+ "\n",
+ "#Part b\n",
+ "L=25 #length of resistor of 5 k ohms(um)\n",
+ "w1=(Rs*L)/R1 #width required to fabricate 5 kohms(um)\n",
+ "#Results\n",
+ "print\"length required to fabricate 20 kohms resistor is\",l,\"um\"\n",
+ "print\"width required to fabricate 5 kohms resistor is\",w1,\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length required to fabricate 20 kohms resistor is 2500 um\n",
+ "width required to fabricate 5 kohms resistor is 1 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4,Page number 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C=0.4*10**-12 #capacitance(pF/um^2)\n",
+ "A=10**-12 #area of film(m^2)\n",
+ "d=400*10**-10 #thickness of SiO2(amstrong)\n",
+ "Eo=8.849*10**-12 #absolute electrical permitivity of free space\n",
+ "\n",
+ "#Calculations\n",
+ "Er=(C*d)/(Eo*A) #relative dielectric constant\n",
+ "\n",
+ "#Results\n",
+ "print\"relative dielectric constant of SiO2 is\",round(Er),\"(Solution given in the textbook is incorrect)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative dielectric constant of SiO2 is 1808.0 (Solution given in the textbook is incorrect)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5,Page number 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C=250*10**-12 #capacitance(pF)\n",
+ "d=500*10**-10 #thickness of SiO2 layer(amstrong)\n",
+ "Eo=8.849*10**-12 #absolute electrical permitivity of free space\n",
+ "Er=3.5 #relative dielectric constant\n",
+ "\n",
+ "#Calculations\n",
+ "A=(C*d)/(Eo*Er) #chip area(um^2)\n",
+ "\n",
+ "#Results\n",
+ "print\"chip area needed for a 250 pF MOS capacitor\",round(A/1e-7,2),\"(um)^2(Solution given in the textbook is incorrect)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "chip area needed for a 250 pF MOS capacitor 4.04 (um)^2(Solution given in the textbook is incorrect)\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronics_Devices_And_Circuits/screenshots/snap_4.1.png b/Electronics_Devices_And_Circuits/screenshots/snap_4.1.png
new file mode 100755
index 00000000..83d95f6a
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/screenshots/snap_4.1.png
Binary files differ
diff --git a/Electronics_Devices_And_Circuits/screenshots/snap_5.1.png b/Electronics_Devices_And_Circuits/screenshots/snap_5.1.png
new file mode 100755
index 00000000..86b5e907
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/screenshots/snap_5.1.png
Binary files differ
diff --git a/Electronics_Devices_And_Circuits/screenshots/snap_7.1.png b/Electronics_Devices_And_Circuits/screenshots/snap_7.1.png
new file mode 100755
index 00000000..66b95b13
--- /dev/null
+++ b/Electronics_Devices_And_Circuits/screenshots/snap_7.1.png
Binary files differ
diff --git a/Elements_of_Electromagnetics/README.txt b/Elements_of_Electromagnetics/README.txt
index d2a7204f..d2a7204f 100644..100755
--- a/Elements_of_Electromagnetics/README.txt
+++ b/Elements_of_Electromagnetics/README.txt
diff --git a/Elements_of_Electromagnetics/chapter_1.ipynb b/Elements_of_Electromagnetics/chapter_1.ipynb
index d44c3a90..d44c3a90 100644..100755
--- a/Elements_of_Electromagnetics/chapter_1.ipynb
+++ b/Elements_of_Electromagnetics/chapter_1.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_10.ipynb b/Elements_of_Electromagnetics/chapter_10.ipynb
index 86a61c5f..86a61c5f 100644..100755
--- a/Elements_of_Electromagnetics/chapter_10.ipynb
+++ b/Elements_of_Electromagnetics/chapter_10.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_11.ipynb b/Elements_of_Electromagnetics/chapter_11.ipynb
index dede4d2e..dede4d2e 100644..100755
--- a/Elements_of_Electromagnetics/chapter_11.ipynb
+++ b/Elements_of_Electromagnetics/chapter_11.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_12.ipynb b/Elements_of_Electromagnetics/chapter_12.ipynb
index e098f292..e098f292 100644..100755
--- a/Elements_of_Electromagnetics/chapter_12.ipynb
+++ b/Elements_of_Electromagnetics/chapter_12.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_13.ipynb b/Elements_of_Electromagnetics/chapter_13.ipynb
index 8e4967c6..8e4967c6 100644..100755
--- a/Elements_of_Electromagnetics/chapter_13.ipynb
+++ b/Elements_of_Electromagnetics/chapter_13.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_14.ipynb b/Elements_of_Electromagnetics/chapter_14.ipynb
index fcb4fac5..fcb4fac5 100644..100755
--- a/Elements_of_Electromagnetics/chapter_14.ipynb
+++ b/Elements_of_Electromagnetics/chapter_14.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_2.ipynb b/Elements_of_Electromagnetics/chapter_2.ipynb
index 9c2ffc15..9c2ffc15 100644..100755
--- a/Elements_of_Electromagnetics/chapter_2.ipynb
+++ b/Elements_of_Electromagnetics/chapter_2.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_3.ipynb b/Elements_of_Electromagnetics/chapter_3.ipynb
index c8dcfb12..c8dcfb12 100644..100755
--- a/Elements_of_Electromagnetics/chapter_3.ipynb
+++ b/Elements_of_Electromagnetics/chapter_3.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_4.ipynb b/Elements_of_Electromagnetics/chapter_4.ipynb
index d64b61ce..d64b61ce 100644..100755
--- a/Elements_of_Electromagnetics/chapter_4.ipynb
+++ b/Elements_of_Electromagnetics/chapter_4.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_5.ipynb b/Elements_of_Electromagnetics/chapter_5.ipynb
index db757859..db757859 100644..100755
--- a/Elements_of_Electromagnetics/chapter_5.ipynb
+++ b/Elements_of_Electromagnetics/chapter_5.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_6.ipynb b/Elements_of_Electromagnetics/chapter_6.ipynb
index 2e3b83ef..2e3b83ef 100644..100755
--- a/Elements_of_Electromagnetics/chapter_6.ipynb
+++ b/Elements_of_Electromagnetics/chapter_6.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_7.ipynb b/Elements_of_Electromagnetics/chapter_7.ipynb
index d7af4c23..d7af4c23 100644..100755
--- a/Elements_of_Electromagnetics/chapter_7.ipynb
+++ b/Elements_of_Electromagnetics/chapter_7.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_8.ipynb b/Elements_of_Electromagnetics/chapter_8.ipynb
index b1d61d92..b1d61d92 100644..100755
--- a/Elements_of_Electromagnetics/chapter_8.ipynb
+++ b/Elements_of_Electromagnetics/chapter_8.ipynb
diff --git a/Elements_of_Electromagnetics/chapter_9.ipynb b/Elements_of_Electromagnetics/chapter_9.ipynb
index 3bdc4e61..3bdc4e61 100644..100755
--- a/Elements_of_Electromagnetics/chapter_9.ipynb
+++ b/Elements_of_Electromagnetics/chapter_9.ipynb
diff --git a/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png b/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png
index 903afeb8..903afeb8 100644..100755
--- a/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png
+++ b/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png
Binary files differ
diff --git a/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png b/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png
index 271a2fbc..271a2fbc 100644..100755
--- a/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png
+++ b/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png
Binary files differ
diff --git a/Elements_of_Electromagnetics/screenshots/vectors.png b/Elements_of_Electromagnetics/screenshots/vectors.png
index 6fade91b..6fade91b 100644..100755
--- a/Elements_of_Electromagnetics/screenshots/vectors.png
+++ b/Elements_of_Electromagnetics/screenshots/vectors.png
Binary files differ
diff --git a/Engineering_Heat_Transfer/CHAPTER1.ipynb b/Engineering_Heat_Transfer/CHAPTER1.ipynb
index 9b33caee..9b33caee 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER1.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER1.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER10.ipynb b/Engineering_Heat_Transfer/CHAPTER10.ipynb
index b9bac11c..b9bac11c 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER10.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER10.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER11.ipynb b/Engineering_Heat_Transfer/CHAPTER11.ipynb
index 30fa585c..30fa585c 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER11.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER11.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER12.ipynb b/Engineering_Heat_Transfer/CHAPTER12.ipynb
index dacb5289..dacb5289 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER12.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER12.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER2.ipynb b/Engineering_Heat_Transfer/CHAPTER2.ipynb
index 6e5857d6..6e5857d6 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER2.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER2.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER4.ipynb b/Engineering_Heat_Transfer/CHAPTER4.ipynb
index a15cf189..a15cf189 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER4.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER4.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER5.ipynb b/Engineering_Heat_Transfer/CHAPTER5.ipynb
index eed3e1b0..eed3e1b0 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER5.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER5.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER6.ipynb b/Engineering_Heat_Transfer/CHAPTER6.ipynb
index 318545d4..318545d4 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER6.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER6.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER7.ipynb b/Engineering_Heat_Transfer/CHAPTER7.ipynb
index b246db44..b246db44 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER7.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER7.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER8.ipynb b/Engineering_Heat_Transfer/CHAPTER8.ipynb
index 759f39bd..759f39bd 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER8.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER8.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER9.ipynb b/Engineering_Heat_Transfer/CHAPTER9.ipynb
index d66004ef..d66004ef 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER9.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER9.ipynb
diff --git a/Engineering_Heat_Transfer/CHAPTER_3.ipynb b/Engineering_Heat_Transfer/CHAPTER_3.ipynb
index 98a7ff3d..98a7ff3d 100644..100755
--- a/Engineering_Heat_Transfer/CHAPTER_3.ipynb
+++ b/Engineering_Heat_Transfer/CHAPTER_3.ipynb
diff --git a/Engineering_Heat_Transfer/README.txt b/Engineering_Heat_Transfer/README.txt
index 0da6ee5a..0da6ee5a 100644..100755
--- a/Engineering_Heat_Transfer/README.txt
+++ b/Engineering_Heat_Transfer/README.txt
diff --git a/Engineering_Heat_Transfer/screenshots/heat_transferred.png b/Engineering_Heat_Transfer/screenshots/heat_transferred.png
index 12f4f4a9..12f4f4a9 100644..100755
--- a/Engineering_Heat_Transfer/screenshots/heat_transferred.png
+++ b/Engineering_Heat_Transfer/screenshots/heat_transferred.png
Binary files differ
diff --git a/Engineering_Heat_Transfer/screenshots/length_required.png b/Engineering_Heat_Transfer/screenshots/length_required.png
index 4071c2d2..4071c2d2 100644..100755
--- a/Engineering_Heat_Transfer/screenshots/length_required.png
+++ b/Engineering_Heat_Transfer/screenshots/length_required.png
Binary files differ
diff --git a/Engineering_Heat_Transfer/screenshots/wall_tempratures.png b/Engineering_Heat_Transfer/screenshots/wall_tempratures.png
index 114869c8..114869c8 100644..100755
--- a/Engineering_Heat_Transfer/screenshots/wall_tempratures.png
+++ b/Engineering_Heat_Transfer/screenshots/wall_tempratures.png
Binary files differ
diff --git a/Engineering_Physics/Chapter10_1.ipynb b/Engineering_Physics/Chapter10_1.ipynb
index b2bd25cb..b2bd25cb 100644..100755
--- a/Engineering_Physics/Chapter10_1.ipynb
+++ b/Engineering_Physics/Chapter10_1.ipynb
diff --git a/Engineering_Physics/Chapter11_1.ipynb b/Engineering_Physics/Chapter11_1.ipynb
index d9dc8a6d..d9dc8a6d 100644..100755
--- a/Engineering_Physics/Chapter11_1.ipynb
+++ b/Engineering_Physics/Chapter11_1.ipynb
diff --git a/Engineering_Physics/Chapter12_1.ipynb b/Engineering_Physics/Chapter12_1.ipynb
index c394fc3a..c394fc3a 100644..100755
--- a/Engineering_Physics/Chapter12_1.ipynb
+++ b/Engineering_Physics/Chapter12_1.ipynb
diff --git a/Engineering_Physics/Chapter13_1.ipynb b/Engineering_Physics/Chapter13_1.ipynb
index 75d0d1f7..75d0d1f7 100644..100755
--- a/Engineering_Physics/Chapter13_1.ipynb
+++ b/Engineering_Physics/Chapter13_1.ipynb
diff --git a/Engineering_Physics/Chapter14_1.ipynb b/Engineering_Physics/Chapter14_1.ipynb
index 1191c56f..1191c56f 100644..100755
--- a/Engineering_Physics/Chapter14_1.ipynb
+++ b/Engineering_Physics/Chapter14_1.ipynb
diff --git a/Engineering_Physics/Chapter15_1.ipynb b/Engineering_Physics/Chapter15_1.ipynb
index feff19f4..feff19f4 100644..100755
--- a/Engineering_Physics/Chapter15_1.ipynb
+++ b/Engineering_Physics/Chapter15_1.ipynb
diff --git a/Engineering_Physics/Chapter17_1.ipynb b/Engineering_Physics/Chapter17_1.ipynb
index 38e069ca..38e069ca 100644..100755
--- a/Engineering_Physics/Chapter17_1.ipynb
+++ b/Engineering_Physics/Chapter17_1.ipynb
diff --git a/Engineering_Physics/Chapter18_1.ipynb b/Engineering_Physics/Chapter18_1.ipynb
index 0a7b2021..0a7b2021 100644..100755
--- a/Engineering_Physics/Chapter18_1.ipynb
+++ b/Engineering_Physics/Chapter18_1.ipynb
diff --git a/Engineering_Physics/Chapter1_1.ipynb b/Engineering_Physics/Chapter1_1.ipynb
index 9c835441..9c835441 100644..100755
--- a/Engineering_Physics/Chapter1_1.ipynb
+++ b/Engineering_Physics/Chapter1_1.ipynb
diff --git a/Engineering_Physics/Chapter2_1.ipynb b/Engineering_Physics/Chapter2_1.ipynb
index 3d6c503f..3d6c503f 100644..100755
--- a/Engineering_Physics/Chapter2_1.ipynb
+++ b/Engineering_Physics/Chapter2_1.ipynb
diff --git a/Engineering_Physics/Chapter3_1.ipynb b/Engineering_Physics/Chapter3_1.ipynb
index 7f02f8be..7f02f8be 100644..100755
--- a/Engineering_Physics/Chapter3_1.ipynb
+++ b/Engineering_Physics/Chapter3_1.ipynb
diff --git a/Engineering_Physics/Chapter4_1.ipynb b/Engineering_Physics/Chapter4_1.ipynb
index c2e7944f..c2e7944f 100644..100755
--- a/Engineering_Physics/Chapter4_1.ipynb
+++ b/Engineering_Physics/Chapter4_1.ipynb
diff --git a/Engineering_Physics/Chapter5_1.ipynb b/Engineering_Physics/Chapter5_1.ipynb
index 86db7d36..86db7d36 100644..100755
--- a/Engineering_Physics/Chapter5_1.ipynb
+++ b/Engineering_Physics/Chapter5_1.ipynb
diff --git a/Engineering_Physics/Chapter6_1.ipynb b/Engineering_Physics/Chapter6_1.ipynb
index 63de6fa0..63de6fa0 100644..100755
--- a/Engineering_Physics/Chapter6_1.ipynb
+++ b/Engineering_Physics/Chapter6_1.ipynb
diff --git a/Engineering_Physics/Chapter7_1.ipynb b/Engineering_Physics/Chapter7_1.ipynb
index cd558c19..cd558c19 100644..100755
--- a/Engineering_Physics/Chapter7_1.ipynb
+++ b/Engineering_Physics/Chapter7_1.ipynb
diff --git a/Engineering_Physics/Chapter8_1.ipynb b/Engineering_Physics/Chapter8_1.ipynb
index 809f0bc8..809f0bc8 100644..100755
--- a/Engineering_Physics/Chapter8_1.ipynb
+++ b/Engineering_Physics/Chapter8_1.ipynb
diff --git a/Engineering_Physics/Chapter9_1.ipynb b/Engineering_Physics/Chapter9_1.ipynb
index bea06702..bea06702 100644..100755
--- a/Engineering_Physics/Chapter9_1.ipynb
+++ b/Engineering_Physics/Chapter9_1.ipynb
diff --git a/Engineering_Physics/Chapter_1.ipynb b/Engineering_Physics/Chapter_1.ipynb
index 080a49e2..080a49e2 100644..100755
--- a/Engineering_Physics/Chapter_1.ipynb
+++ b/Engineering_Physics/Chapter_1.ipynb
diff --git a/Engineering_Physics/Chapter_10.ipynb b/Engineering_Physics/Chapter_10.ipynb
index 22ab6eae..22ab6eae 100644..100755
--- a/Engineering_Physics/Chapter_10.ipynb
+++ b/Engineering_Physics/Chapter_10.ipynb
diff --git a/Engineering_Physics/Chapter_11.ipynb b/Engineering_Physics/Chapter_11.ipynb
index d8455a9b..d8455a9b 100644..100755
--- a/Engineering_Physics/Chapter_11.ipynb
+++ b/Engineering_Physics/Chapter_11.ipynb
diff --git a/Engineering_Physics/Chapter_12.ipynb b/Engineering_Physics/Chapter_12.ipynb
index 4fdbd6c5..4fdbd6c5 100644..100755
--- a/Engineering_Physics/Chapter_12.ipynb
+++ b/Engineering_Physics/Chapter_12.ipynb
diff --git a/Engineering_Physics/Chapter_2.ipynb b/Engineering_Physics/Chapter_2.ipynb
index 82d0d7af..82d0d7af 100644..100755
--- a/Engineering_Physics/Chapter_2.ipynb
+++ b/Engineering_Physics/Chapter_2.ipynb
diff --git a/Engineering_Physics/Chapter_3.ipynb b/Engineering_Physics/Chapter_3.ipynb
index eaf6dcb1..eaf6dcb1 100644..100755
--- a/Engineering_Physics/Chapter_3.ipynb
+++ b/Engineering_Physics/Chapter_3.ipynb
diff --git a/Engineering_Physics/Chapter_4.ipynb b/Engineering_Physics/Chapter_4.ipynb
index d93ccbff..d93ccbff 100644..100755
--- a/Engineering_Physics/Chapter_4.ipynb
+++ b/Engineering_Physics/Chapter_4.ipynb
diff --git a/Engineering_Physics/Chapter_6.ipynb b/Engineering_Physics/Chapter_6.ipynb
index df63cdce..df63cdce 100644..100755
--- a/Engineering_Physics/Chapter_6.ipynb
+++ b/Engineering_Physics/Chapter_6.ipynb
diff --git a/Engineering_Physics/Chapter_7.ipynb b/Engineering_Physics/Chapter_7.ipynb
index acb1144d..acb1144d 100644..100755
--- a/Engineering_Physics/Chapter_7.ipynb
+++ b/Engineering_Physics/Chapter_7.ipynb
diff --git a/Engineering_Physics/Chapter_8.ipynb b/Engineering_Physics/Chapter_8.ipynb
index be4820c5..be4820c5 100644..100755
--- a/Engineering_Physics/Chapter_8.ipynb
+++ b/Engineering_Physics/Chapter_8.ipynb
diff --git a/Engineering_Physics/Chapter_9.ipynb b/Engineering_Physics/Chapter_9.ipynb
index f85c8366..f85c8366 100644..100755
--- a/Engineering_Physics/Chapter_9.ipynb
+++ b/Engineering_Physics/Chapter_9.ipynb
diff --git a/Engineering_Physics/README.txt b/Engineering_Physics/README.txt
index a2116ca8..a2116ca8 100644..100755
--- a/Engineering_Physics/README.txt
+++ b/Engineering_Physics/README.txt
diff --git a/Engineering_Physics/chapter1_2.ipynb b/Engineering_Physics/chapter1_2.ipynb
index bd2e1aac..bd2e1aac 100644..100755
--- a/Engineering_Physics/chapter1_2.ipynb
+++ b/Engineering_Physics/chapter1_2.ipynb
diff --git a/Engineering_Physics/chapter2_2.ipynb b/Engineering_Physics/chapter2_2.ipynb
index a118db3c..a118db3c 100644..100755
--- a/Engineering_Physics/chapter2_2.ipynb
+++ b/Engineering_Physics/chapter2_2.ipynb
diff --git a/Engineering_Physics/chapter4_2.ipynb b/Engineering_Physics/chapter4_2.ipynb
index 80203b2d..80203b2d 100644..100755
--- a/Engineering_Physics/chapter4_2.ipynb
+++ b/Engineering_Physics/chapter4_2.ipynb
diff --git a/Engineering_Physics/chapter5_2.ipynb b/Engineering_Physics/chapter5_2.ipynb
index 14018aea..14018aea 100644..100755
--- a/Engineering_Physics/chapter5_2.ipynb
+++ b/Engineering_Physics/chapter5_2.ipynb
diff --git a/Engineering_Physics/chapter6_2.ipynb b/Engineering_Physics/chapter6_2.ipynb
index 4c7f2be8..4c7f2be8 100644..100755
--- a/Engineering_Physics/chapter6_2.ipynb
+++ b/Engineering_Physics/chapter6_2.ipynb
diff --git a/Engineering_Physics/chapter7_2.ipynb b/Engineering_Physics/chapter7_2.ipynb
index d4161b18..d4161b18 100644..100755
--- a/Engineering_Physics/chapter7_2.ipynb
+++ b/Engineering_Physics/chapter7_2.ipynb
diff --git a/Engineering_Physics/chapter8_2.ipynb b/Engineering_Physics/chapter8_2.ipynb
index 2dc13b1f..2dc13b1f 100644..100755
--- a/Engineering_Physics/chapter8_2.ipynb
+++ b/Engineering_Physics/chapter8_2.ipynb
diff --git a/Engineering_Physics/screenshots/Capture1.png b/Engineering_Physics/screenshots/Capture1.png
index b8e54e85..b8e54e85 100644..100755
--- a/Engineering_Physics/screenshots/Capture1.png
+++ b/Engineering_Physics/screenshots/Capture1.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/Capture2.png b/Engineering_Physics/screenshots/Capture2.png
index 74b4cf73..74b4cf73 100644..100755
--- a/Engineering_Physics/screenshots/Capture2.png
+++ b/Engineering_Physics/screenshots/Capture2.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/Untitled.png b/Engineering_Physics/screenshots/Untitled.png
index 86bbbd1e..86bbbd1e 100644..100755
--- a/Engineering_Physics/screenshots/Untitled.png
+++ b/Engineering_Physics/screenshots/Untitled.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/Untitled1.png b/Engineering_Physics/screenshots/Untitled1.png
index f9ffad82..f9ffad82 100644..100755
--- a/Engineering_Physics/screenshots/Untitled1.png
+++ b/Engineering_Physics/screenshots/Untitled1.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/Untitled3.png b/Engineering_Physics/screenshots/Untitled3.png
index f06b09bb..f06b09bb 100644..100755
--- a/Engineering_Physics/screenshots/Untitled3.png
+++ b/Engineering_Physics/screenshots/Untitled3.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/Untitled_1.png b/Engineering_Physics/screenshots/Untitled_1.png
index cb197fae..cb197fae 100644..100755
--- a/Engineering_Physics/screenshots/Untitled_1.png
+++ b/Engineering_Physics/screenshots/Untitled_1.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/Untitled_2.png b/Engineering_Physics/screenshots/Untitled_2.png
index cb197fae..cb197fae 100644..100755
--- a/Engineering_Physics/screenshots/Untitled_2.png
+++ b/Engineering_Physics/screenshots/Untitled_2.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/capture.png b/Engineering_Physics/screenshots/capture.png
index b105e148..b105e148 100644..100755
--- a/Engineering_Physics/screenshots/capture.png
+++ b/Engineering_Physics/screenshots/capture.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/screenshot1.PNG b/Engineering_Physics/screenshots/screenshot1.PNG
index 419ba452..419ba452 100644..100755
--- a/Engineering_Physics/screenshots/screenshot1.PNG
+++ b/Engineering_Physics/screenshots/screenshot1.PNG
Binary files differ
diff --git a/Engineering_Physics/screenshots/screenshot1.png b/Engineering_Physics/screenshots/screenshot1.png
index 94f80068..94f80068 100644..100755
--- a/Engineering_Physics/screenshots/screenshot1.png
+++ b/Engineering_Physics/screenshots/screenshot1.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/screenshot2.PNG b/Engineering_Physics/screenshots/screenshot2.PNG
index bf169152..bf169152 100644..100755
--- a/Engineering_Physics/screenshots/screenshot2.PNG
+++ b/Engineering_Physics/screenshots/screenshot2.PNG
Binary files differ
diff --git a/Engineering_Physics/screenshots/screenshot2.png b/Engineering_Physics/screenshots/screenshot2.png
index f4cda54b..f4cda54b 100644..100755
--- a/Engineering_Physics/screenshots/screenshot2.png
+++ b/Engineering_Physics/screenshots/screenshot2.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/screenshot3.PNG b/Engineering_Physics/screenshots/screenshot3.PNG
index 4062fb31..4062fb31 100644..100755
--- a/Engineering_Physics/screenshots/screenshot3.PNG
+++ b/Engineering_Physics/screenshots/screenshot3.PNG
Binary files differ
diff --git a/Engineering_Physics/screenshots/screenshot3.png b/Engineering_Physics/screenshots/screenshot3.png
index 4367a009..4367a009 100644..100755
--- a/Engineering_Physics/screenshots/screenshot3.png
+++ b/Engineering_Physics/screenshots/screenshot3.png
Binary files differ
diff --git a/Engineering_Physics/screenshots/shot1.PNG b/Engineering_Physics/screenshots/shot1.PNG
index 7e165764..7e165764 100644..100755
--- a/Engineering_Physics/screenshots/shot1.PNG
+++ b/Engineering_Physics/screenshots/shot1.PNG
Binary files differ
diff --git a/Engineering_Physics/screenshots/shot2.PNG b/Engineering_Physics/screenshots/shot2.PNG
index c4b3d4ef..c4b3d4ef 100644..100755
--- a/Engineering_Physics/screenshots/shot2.PNG
+++ b/Engineering_Physics/screenshots/shot2.PNG
Binary files differ
diff --git a/Engineering_Physics/screenshots/shot3.PNG b/Engineering_Physics/screenshots/shot3.PNG
index e14ec109..e14ec109 100644..100755
--- a/Engineering_Physics/screenshots/shot3.PNG
+++ b/Engineering_Physics/screenshots/shot3.PNG
Binary files differ
diff --git a/Engineering_Physics_Aruldhas/Chapter10_1.ipynb b/Engineering_Physics_Aruldhas/Chapter10_1.ipynb
index a64ad6b4..a64ad6b4 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter10_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter10_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter11_1.ipynb b/Engineering_Physics_Aruldhas/Chapter11_1.ipynb
index d5495309..d5495309 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter11_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter11_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter12_1.ipynb b/Engineering_Physics_Aruldhas/Chapter12_1.ipynb
index 7fa73024..7fa73024 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter12_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter12_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter13_1.ipynb b/Engineering_Physics_Aruldhas/Chapter13_1.ipynb
index 06b2e844..06b2e844 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter13_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter13_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter14_1.ipynb b/Engineering_Physics_Aruldhas/Chapter14_1.ipynb
index 63e03042..63e03042 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter14_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter14_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter15_1.ipynb b/Engineering_Physics_Aruldhas/Chapter15_1.ipynb
index 7bc435f1..7bc435f1 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter15_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter15_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter17_1.ipynb b/Engineering_Physics_Aruldhas/Chapter17_1.ipynb
index 891f2d43..891f2d43 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter17_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter17_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter18_1.ipynb b/Engineering_Physics_Aruldhas/Chapter18_1.ipynb
index 553fe50f..553fe50f 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter18_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter18_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter1_1.ipynb b/Engineering_Physics_Aruldhas/Chapter1_1.ipynb
index 7872d7ab..7872d7ab 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter1_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter1_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter2_1.ipynb b/Engineering_Physics_Aruldhas/Chapter2_1.ipynb
index fdbf44b5..fdbf44b5 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter2_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter2_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter3_1.ipynb b/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
index 645d7595..645d7595 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter4_1.ipynb b/Engineering_Physics_Aruldhas/Chapter4_1.ipynb
index cc3fca78..cc3fca78 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter4_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter4_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter5_1.ipynb b/Engineering_Physics_Aruldhas/Chapter5_1.ipynb
index 8b5822ee..8b5822ee 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter5_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter5_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter6_1.ipynb b/Engineering_Physics_Aruldhas/Chapter6_1.ipynb
index 0de10069..0de10069 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter6_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter6_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter7_1.ipynb b/Engineering_Physics_Aruldhas/Chapter7_1.ipynb
index 750a9700..750a9700 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter7_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter7_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter8_1.ipynb b/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
index af1e48b4..af1e48b4 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/Chapter9_1.ipynb b/Engineering_Physics_Aruldhas/Chapter9_1.ipynb
index af5adbcc..af5adbcc 100644..100755
--- a/Engineering_Physics_Aruldhas/Chapter9_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter9_1.ipynb
diff --git a/Engineering_Physics_Aruldhas/README.txt b/Engineering_Physics_Aruldhas/README.txt
index 77c00324..77c00324 100644..100755
--- a/Engineering_Physics_Aruldhas/README.txt
+++ b/Engineering_Physics_Aruldhas/README.txt
diff --git a/Engineering_Physics_Aruldhas/screenshots/Untitled.png b/Engineering_Physics_Aruldhas/screenshots/Untitled.png
index cb197fae..cb197fae 100644..100755
--- a/Engineering_Physics_Aruldhas/screenshots/Untitled.png
+++ b/Engineering_Physics_Aruldhas/screenshots/Untitled.png
Binary files differ
diff --git a/Engineering_Physics_Aruldhas/screenshots/Untitled_1.png b/Engineering_Physics_Aruldhas/screenshots/Untitled_1.png
index cb197fae..cb197fae 100644..100755
--- a/Engineering_Physics_Aruldhas/screenshots/Untitled_1.png
+++ b/Engineering_Physics_Aruldhas/screenshots/Untitled_1.png
Binary files differ
diff --git a/Engineering_Physics_Aruldhas/screenshots/Untitled_2.png b/Engineering_Physics_Aruldhas/screenshots/Untitled_2.png
index cb197fae..cb197fae 100644..100755
--- a/Engineering_Physics_Aruldhas/screenshots/Untitled_2.png
+++ b/Engineering_Physics_Aruldhas/screenshots/Untitled_2.png
Binary files differ
diff --git a/Engineering_Physics_Aruldhas/screenshots/shot1.PNG b/Engineering_Physics_Aruldhas/screenshots/shot1.PNG
index 7e165764..7e165764 100644..100755
--- a/Engineering_Physics_Aruldhas/screenshots/shot1.PNG
+++ b/Engineering_Physics_Aruldhas/screenshots/shot1.PNG
Binary files differ
diff --git a/Engineering_Physics_Aruldhas/screenshots/shot2.PNG b/Engineering_Physics_Aruldhas/screenshots/shot2.PNG
index c4b3d4ef..c4b3d4ef 100644..100755
--- a/Engineering_Physics_Aruldhas/screenshots/shot2.PNG
+++ b/Engineering_Physics_Aruldhas/screenshots/shot2.PNG
Binary files differ
diff --git a/Engineering_Physics_Aruldhas/screenshots/shot3.PNG b/Engineering_Physics_Aruldhas/screenshots/shot3.PNG
index e14ec109..e14ec109 100644..100755
--- a/Engineering_Physics_Aruldhas/screenshots/shot3.PNG
+++ b/Engineering_Physics_Aruldhas/screenshots/shot3.PNG
Binary files differ
diff --git a/Engineering_Physics_Marikani/Chapter_1.ipynb b/Engineering_Physics_Marikani/Chapter_1.ipynb
index a6934dcd..a6934dcd 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_1.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_1.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_10.ipynb b/Engineering_Physics_Marikani/Chapter_10.ipynb
index cad8c3fc..cad8c3fc 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_10.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_10.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_11.ipynb b/Engineering_Physics_Marikani/Chapter_11.ipynb
index 781b51dc..781b51dc 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_11.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_11.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_12.ipynb b/Engineering_Physics_Marikani/Chapter_12.ipynb
index dba2b7b8..dba2b7b8 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_12.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_12.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_2.ipynb b/Engineering_Physics_Marikani/Chapter_2.ipynb
index b54dc631..b54dc631 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_2.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_2.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_3.ipynb b/Engineering_Physics_Marikani/Chapter_3.ipynb
index 7496a57a..7496a57a 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_3.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_3.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_4.ipynb b/Engineering_Physics_Marikani/Chapter_4.ipynb
index d2b8123c..d2b8123c 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_4.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_4.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_6.ipynb b/Engineering_Physics_Marikani/Chapter_6.ipynb
index f66bf1b2..f66bf1b2 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_6.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_6.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_7.ipynb b/Engineering_Physics_Marikani/Chapter_7.ipynb
index 706a4598..706a4598 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_7.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_7.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_8.ipynb b/Engineering_Physics_Marikani/Chapter_8.ipynb
index 1db414de..1db414de 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_8.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_8.ipynb
diff --git a/Engineering_Physics_Marikani/Chapter_9.ipynb b/Engineering_Physics_Marikani/Chapter_9.ipynb
index bcdb04e8..bcdb04e8 100644..100755
--- a/Engineering_Physics_Marikani/Chapter_9.ipynb
+++ b/Engineering_Physics_Marikani/Chapter_9.ipynb
diff --git a/Engineering_Physics_Marikani/README.txt b/Engineering_Physics_Marikani/README.txt
index 00ccdb95..00ccdb95 100644..100755
--- a/Engineering_Physics_Marikani/README.txt
+++ b/Engineering_Physics_Marikani/README.txt
diff --git a/Engineering_Physics_Marikani/screenshots/screenshot1.PNG b/Engineering_Physics_Marikani/screenshots/screenshot1.PNG
index 419ba452..419ba452 100644..100755
--- a/Engineering_Physics_Marikani/screenshots/screenshot1.PNG
+++ b/Engineering_Physics_Marikani/screenshots/screenshot1.PNG
Binary files differ
diff --git a/Engineering_Physics_Marikani/screenshots/screenshot2.PNG b/Engineering_Physics_Marikani/screenshots/screenshot2.PNG
index bf169152..bf169152 100644..100755
--- a/Engineering_Physics_Marikani/screenshots/screenshot2.PNG
+++ b/Engineering_Physics_Marikani/screenshots/screenshot2.PNG
Binary files differ
diff --git a/Engineering_Physics_Marikani/screenshots/screenshot3.PNG b/Engineering_Physics_Marikani/screenshots/screenshot3.PNG
index 4062fb31..4062fb31 100644..100755
--- a/Engineering_Physics_Marikani/screenshots/screenshot3.PNG
+++ b/Engineering_Physics_Marikani/screenshots/screenshot3.PNG
Binary files differ
diff --git a/Fluid_Mechanics/Chapter1.ipynb b/Fluid_Mechanics/Chapter1.ipynb
new file mode 100755
index 00000000..2869f384
--- /dev/null
+++ b/Fluid_Mechanics/Chapter1.ipynb
@@ -0,0 +1,562 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5a200234453d213b93dc5d138f72ecdaaca8b6177244c9440288df8fe014829f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Fluid Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page no 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "Mw = 29.0 # Molecular weight of air\n",
+ "\n",
+ "R = 8323/Mw # Universal gas constant\n",
+ "\n",
+ "T = 273 + 20 # temperature in K\n",
+ "\n",
+ "p = 50*144*47.88 # Pressure in N/m**2\n",
+ "\n",
+ "\n",
+ "rho = p/(R*T) # from the state law\n",
+ "\n",
+ "print \"Desnity of air at 20 deg C and 50 psia = \",round(rho,2),\"kg/m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Desnity of air at 20 deg C and 50 psia = 4.1 kg/m**3"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page no 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "dP = 10**6 # Pressure drop in N/m**2\n",
+ "\n",
+ "V = 1 # Volume in m**3\n",
+ "\n",
+ "bta = 2.2*10**9 # Bulk modulus of elasticity in N/m**2\n",
+ "\n",
+ "\n",
+ "dV = -dP*V/bta # Change in volume in m**3\n",
+ "\n",
+ "v = -dV*100\n",
+ "\n",
+ "print \"Reduction in volume = \",round(v,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reduction in volume = 0.045 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page no 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "bta1 = 2.28*10**9 # Bulk modulus of elasticity at 20 deg C and 103.4 N/m**2\n",
+ "\n",
+ "bta2 = 2.94*10**9 # Bulk modulus of elasticity at 20 deg C and 1034 N/m**2\n",
+ "\n",
+ "p1 = 103.4 # Pressure in N/m**2\n",
+ "\n",
+ "p2 = 1034 # Pressure in N/m**2\n",
+ "\n",
+ "\n",
+ "bavg = (bta1+bta2)/2 # bulk modulus average in N/m**2\n",
+ "\n",
+ "dP = p2-p1 # pressure drop in N/m**2\n",
+ "\n",
+ "V = 10 # Volume in m**3\n",
+ "\n",
+ "dV = dP*V/bavg # Change in volume in m**3\n",
+ "\n",
+ "v = -dV\n",
+ "\n",
+ "print \"Volume reduction = \",round(v,8),\"m**3\"\n",
+ "\n",
+ "print \"Negative sign indicates the volume has reduced\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume reduction = -3.57e-06 m**3\n",
+ "Negative sign indicates the volume has reduced"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "patm = 14.6 # Atmospheric pressure in psia\n",
+ "\n",
+ "p1 = 100 # gauge pressure at point 1 in psia\n",
+ "\n",
+ "p2 = 102 # gauge pressure at point 2 in psia\n",
+ "\n",
+ "V = 1 # volume in m**3\n",
+ "\n",
+ "p = p1+patm # absolute pressure in psia\n",
+ "\n",
+ "b = p # for isothermal air\n",
+ "\n",
+ "p1 = p2+patm # absolute pressure in psia\n",
+ "\n",
+ "b1 = p1 # for isothermal air\n",
+ "\n",
+ "dP = p1 - p # change in pressure\n",
+ "\n",
+ "bavg = (b1+b)/2 # average bulk modulus of elasticity in N/m**2\n",
+ "\n",
+ "dV = dP*V/bavg\n",
+ "\n",
+ "v = -dV\n",
+ "\n",
+ "print \"An increase in pressure by 2 psia will result in a volume reduction of\",round(v,4),\"ft**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "An increase in pressure by 2 psia will result in a volume reduction of -0.0173 ft**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "k = 1.4 # gas constant\n",
+ "\n",
+ "R = 1716 # Universal gas constant in ft.lb/slug^oR\n",
+ "\n",
+ "T = 68+460 # temperature in *oR\n",
+ "\n",
+ "\n",
+ "c = sqrt(k*R*T)\n",
+ "\n",
+ "print \"Sonic velocity in air at 68 deg F = \",round(c,0),\"ft/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sonic velocity in air at 68 deg F = 1126.0 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page no 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "d = 0.05 # diameter of cylinder 1 in m\n",
+ "\n",
+ "l = 0.2 # length of the cylinder in meters\n",
+ "\n",
+ "d1 = 0.052 # diameter of cylinder in m\n",
+ "\n",
+ "mu = 0.09 # Viscosity of oil in Ns/m**2\n",
+ "\n",
+ "U = 1 # velocity in m/s\n",
+ "\n",
+ "Y = (d1-d)/2 # clearance between the two cylinders in m\n",
+ "\n",
+ "A = pi*l*d # area in m**2\n",
+ "\n",
+ "\n",
+ "tau = mu*U/Y # Shear stress in N/m**2\n",
+ "\n",
+ "F = tau*A # Shear foce in N\n",
+ "\n",
+ "print \"Force required to move the piston by 1 m/s = \",round(F,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force required to move the piston by 1 m/s = 2.83 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page no 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "\n",
+ "mu = 1.005*10**-3 # Viscosity of water in Ns/m**2\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "Y = 0.01 # Distance between the walls\n",
+ "\n",
+ "Y1 = Y*100\n",
+ "\n",
+ "print \" (a) Distance between the walls = \",round(Y1,1),\"cm\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "y = Symbol('y')\n",
+ "\n",
+ "u = 10*(0.01*y-y**2)\n",
+ "\n",
+ "uprime = u.diff(y)\n",
+ "\n",
+ "y = 0\n",
+ "\n",
+ "U = uprime\n",
+ "\n",
+ "\n",
+ "U1 = 0.01 # from U\n",
+ "\n",
+ "tau = mu*10*U1 # shear stress in N/m**2\n",
+ "\n",
+ "print \" (b) Shear stress = \",round(tau,9),\"N/m**2\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "tau1 = mu*10*(0.01-2*20*10**-6) # using the equation of U and y = 20*10**-6 calc shear stress in N/m**2\n",
+ "\n",
+ "print \" (c) Shear Stress at 20 um from the plate = \",round(tau1,9),\"N/m**2\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "y1 = 0.01/2 # shear stress location\n",
+ "\n",
+ "print \" (d) Location of maximum velocity = \",round(y1,3),\"m\"\n",
+ "\n",
+ "print \"Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate\",\"\\n\",\"This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a) Distance between the walls = 1.0 cm\n",
+ " (b) Shear stress = 0.0001005 N/m**2\n",
+ " (c) Shear Stress at 20 um from the plate = 0.000100098 N/m**2\n",
+ " (d) Location of maximum velocity = 0.005 m\n",
+ "Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate \n",
+ "This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.8 Page 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "d = 0.1 # diameter of shaft in m\n",
+ "\n",
+ "l = 0.2 # length of the shaft in m\n",
+ "\n",
+ "t = 0.00002 # thickness in m\n",
+ "\n",
+ "N = 30 # RPM of shaft\n",
+ "\n",
+ "U = pi*d*30/60 # velocity in m/s\n",
+ "\n",
+ "r1 = d/2\n",
+ "\n",
+ "r2 = r1 + t # radius of bearing in m\n",
+ "\n",
+ "mu = 0.44 # Viscosity of SAE-30 oil in Ns/m**2\n",
+ "\n",
+ "\n",
+ "\n",
+ "F = 2*pi*r1*l*mu*U/t\n",
+ "\n",
+ "T =F*r1\n",
+ "\n",
+ "print \" (a) For linear distribution of velocity , shaft torque = \",round(T,2),\"m.N\"\n",
+ "\n",
+ "\n",
+ "F1 = 2*pi*l*mu*U/log(r2/r1)\n",
+ "\n",
+ "\n",
+ "T1 =F1*r1\n",
+ "\n",
+ "print \" (b) For non-linear distribution of velocity , shaft torque = \",round(T1,2),\"m.N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a) For linear distribution of velocity , shaft torque = 10.86 m.N\n",
+ " (b) For non-linear distribution of velocity , shaft torque = 10.86 m.N\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.9 Page 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "mu = 0.44 # viscosity of the oil in Ns/m**2\n",
+ "\n",
+ "N = 300 # RPM of the shaft\n",
+ "\n",
+ "t = 0.00025 # thickness of the film oil in m\n",
+ "\n",
+ "r1 = 0.15 # radius in m\n",
+ "\n",
+ "r2 = 0.1 # radius in m\n",
+ "\n",
+ "T = pi**2*mu*N*(r1**4-r2**4)/(60*t)\n",
+ "\n",
+ "P = T*2*pi*N/60\n",
+ "\n",
+ "print \"Watts of energy lost in overcoming friction at 300 RPM = \",round(P,0),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Watts of energy lost in overcoming friction at 300 RPM = 1108.0 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.10 Page no 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "d = 0.01 # diameter in m\n",
+ "\n",
+ "sigma = 0.073 # surface tension in N/m\n",
+ "\n",
+ "\n",
+ "dP = 4*sigma/d # pressure excessive\n",
+ "\n",
+ "print \"Excessive pressure inside the droplet = \",round(dP,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Excessive pressure inside the droplet = 29.2 N"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.11 Page no 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "sigma = 0.022 # surface tension in N/m\n",
+ "\n",
+ "gma = 9789 # specific weight\n",
+ "\n",
+ "S = 0.79 # specific gravity\n",
+ "\n",
+ "d = 0.002 # diameter in m\n",
+ "\n",
+ "\n",
+ "\n",
+ "h =4*sigma*1000/(gma*S*d) # capillary height in m\n",
+ "\n",
+ "print \"The alcohol will rise to a height of\",round(h,1),\"mm in the glass tube\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The alcohol will rise to a height of 5.7 mm in the glass tube"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter10.ipynb b/Fluid_Mechanics/Chapter10.ipynb
new file mode 100755
index 00000000..679a7dd2
--- /dev/null
+++ b/Fluid_Mechanics/Chapter10.ipynb
@@ -0,0 +1,426 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3b6a6304ae5564c5b042191e18c023d5d141ad8d64a979c29e54da09ebc8a32e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Open Channel Flow\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page no 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "b = 3 # base of the channel\n",
+ "\n",
+ "z = 0.5 # slope of the channel\n",
+ "\n",
+ "y = 2 # depth of the channel\n",
+ "\n",
+ "\n",
+ "T = b + 2*z*y\n",
+ "\n",
+ "print \"Top width =\",round(T,0),\"m\"\n",
+ "\n",
+ "A = (b+z*y)*y\n",
+ "\n",
+ "print \"Area of flow =\",round(A,0),\"m**2\"\n",
+ "\n",
+ "P = b + 2*y*sqrt(1+z**2)\n",
+ "\n",
+ "print \"Wetted perimeter =\",round(P,3),\"m\"\n",
+ "\n",
+ "R = A/P\n",
+ "\n",
+ "print \"Hydraulic radius =\",round(R,2),\"m\"\n",
+ "\n",
+ "D = A/T\n",
+ "\n",
+ "print \"Hydraulic depth =\",round(D,2),\"m\"\n",
+ "\n",
+ "Z = A*sqrt(D)\n",
+ "\n",
+ "print \"Secton Factor =\",round(Z,2),\"m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Top width = 5.0 m\n",
+ "Area of flow = 8.0 m**2\n",
+ "Wetted perimeter = 7.472 m\n",
+ "Hydraulic radius = 1.07 m\n",
+ "Hydraulic depth = 1.6 m\n",
+ "Secton Factor = 10.12 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page no 366"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "z = 1.0 # slide slope\n",
+ "\n",
+ "b = 3.0 # base width\n",
+ "\n",
+ "y = 1.5 # depth\n",
+ "\n",
+ "S = 0.0009\n",
+ "\n",
+ "n = 0.012 # for concrete\n",
+ "\n",
+ "\n",
+ "A = (b+z*y)*y\n",
+ "\n",
+ "P = P = b + 2*y*sqrt(1+z**2)\n",
+ "\n",
+ "R = A/P\n",
+ "\n",
+ "\n",
+ "Q = A*(1/n)*(R**(2/3)*S**(1/2))\n",
+ "\n",
+ "print \"Discharge for the channel =\",round(Q,2),\"m**3/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge for the channel = 16.1 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page no 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "z = 1\n",
+ "\n",
+ "Q = 10000/60 # discharge of water in ft**#/s\n",
+ "\n",
+ "\n",
+ "y = (Q/(1.828*2.25*sqrt(0.5)))**(2/5)\n",
+ "\n",
+ "print \"depth(y) =\",round(y,2),\"ft\"\n",
+ "\n",
+ "b = 0.828*y\n",
+ "\n",
+ "print \"base width(b) =\",round(b,2),\"ft\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "depth(y) = 5.05 ft\n",
+ "base width(b) = 4.18 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page no 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "y = 2.5 # depth\n",
+ "\n",
+ "V = 8 # velocity in m/s\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "Yc = (20**2/g)**(1/3)\n",
+ "\n",
+ "print \"Critical depth =\",round(Yc,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical depth = 3.44 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.6 Page no 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "Q = 15 # flow rate in m**3/s\n",
+ "\n",
+ "w = 4.0 # bottom width\n",
+ "\n",
+ "S = 0.0008 # bed slope\n",
+ "\n",
+ "n = 0.025 # manning constant\n",
+ "\n",
+ "z = 0.5 # slope\n",
+ "\n",
+ "\n",
+ "\n",
+ "y = 2.22 # we take the value of y as 2.2 m\n",
+ "\n",
+ "Q = ((4+0.5*y)*(y/(n))*(((4+0.5*y)*y)/(4+2.236*y))**(0.667)*(S)**(0.5))\n",
+ "\n",
+ "print \"a )Normal Depth =\",round(y,2),\"m\"\n",
+ "\n",
+ "A = (4+0.5*y)*y\n",
+ "\n",
+ "T = (w+2*z*y)\n",
+ "\n",
+ "D = A/T\n",
+ "\n",
+ "V = (Q/A)\n",
+ "\n",
+ "F =V/(sqrt(9.81*D)) \n",
+ "\n",
+ "print \"b )F = \",round(F,2),\" Since the Froude number is less than 1, the flow is subcritical\"\n",
+ "\n",
+ "\n",
+ "yc = 1.08\n",
+ "\n",
+ "Q1 = (4+z*yc)*yc*sqrt((9.81*(4+0.5*yc)*yc)/(4+2*z*yc)) \n",
+ "\n",
+ "print \"c )Critical depth is = \",round(yc,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a )Normal Depth = 2.22 m\n",
+ "b )F = 0.31 Since the Froude number is less than 1, the flow is subcritical\n",
+ "c )Critical depth is = 1.08 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Example 10.8 Page no 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "b = 60 # base width in ft\n",
+ "\n",
+ "y1 = 2.5 # base depth in ft\n",
+ "\n",
+ "Q = 2500 # discharge in ft**3/s\n",
+ "\n",
+ "g = 32.2\n",
+ "\n",
+ "\n",
+ "V1 = Q/(b*y1)\n",
+ "\n",
+ "F1 = V1/sqrt(g*y1)\n",
+ "\n",
+ "y2 = y1*0.5*(sqrt(1+8*F1**2)-1)\n",
+ "\n",
+ "V2 = Q/(b*y2)\n",
+ "\n",
+ "print \"Since F1 =\",round(F1,2),\" It is a weak jump\"\n",
+ "\n",
+ "L = y2*4.25\n",
+ "\n",
+ "print \"Length of the jump =\",round(L,0),\"ft\"\n",
+ "\n",
+ "E1 = y1+(V1**2/(2*g))\n",
+ "\n",
+ "E2 = y2+(V2**2/(2*g))\n",
+ "\n",
+ "El = E1-E2\n",
+ "\n",
+ "Te = El*62.4*Q/543\n",
+ "\n",
+ "print \"Total energy loss =\",round(Te,2),\"HP\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Since F1 = 1.86 It is a weak jump\n",
+ "Length of the jump = 23.0 ft\n",
+ "Total energy loss = 133.7 HP\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.12 Page no 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 6 # depth of the channel\n",
+ "\n",
+ "w= 12 # width of the channel\n",
+ "\n",
+ "h = 1.0 # height of the channel\n",
+ "\n",
+ "p = 9 # pressure drop in m\n",
+ "\n",
+ "g = 32.2\n",
+ "\n",
+ "\n",
+ "y2 = y1 - h - 0.75\n",
+ "\n",
+ "V1 = sqrt(2*g*0.75/((1.41)**2-1))\n",
+ "\n",
+ "Q = w*b*V1/10\n",
+ "\n",
+ "print \"Discharge =\",round(Q,0),\"cfs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge = 503.0 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter11.ipynb b/Fluid_Mechanics/Chapter11.ipynb
new file mode 100755
index 00000000..618f66c5
--- /dev/null
+++ b/Fluid_Mechanics/Chapter11.ipynb
@@ -0,0 +1,312 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2f6bc3a0f00ca48f89200f1a14edc0c65849595040c83c5100245e53f0cc525b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter : Compressible Flow"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page no 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "T1 = 273 + 15 # temperature in K\n",
+ "\n",
+ "T2 = 273 + 90 # temperature in K\n",
+ "\n",
+ "Cp = 0.24 # cp for air in kcal/kgK\n",
+ "\n",
+ "\n",
+ "dh = Cp*(T2-T1) # enthalpy per kg of air\n",
+ "\n",
+ "H = 10*dh # total enthallpy of 10 kg air\n",
+ "\n",
+ "print \"Total change in enthalpy for 10 kg air = \",round(H,0),\"kcal\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total change in enthalpy for 10 kg air = 180.0 kcal\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page no 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "T1 = 273 + 15 # temperature in K\n",
+ "\n",
+ "T2 = 273 + 90 # temperature in K\n",
+ "\n",
+ "P1 = 40 + 101.3 # pressure in abs\n",
+ "\n",
+ "P2 = 360 + 101.3 # presure in abs\n",
+ "\n",
+ "Cv = 0.171 # Specific volume Coefficient of air\n",
+ "\n",
+ "k = 1.4 # gas constant\n",
+ "\n",
+ "\n",
+ "dS = Cv*log((T2/T1)**k*(P2/P1)**(1-k))\n",
+ "\n",
+ "S = 10*dS\n",
+ "\n",
+ "print \"Total change in enthalpy of 10 Kg of air =\",round(S,3),\"kcal/K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total change in enthalpy of 10 Kg of air = -0.255 kcal/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page no 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "P1 = 10 # pressure in psia\n",
+ "\n",
+ "P2 = 30 # pressure in psia\n",
+ "\n",
+ "T1 = 460+110 # temperature in R\n",
+ "\n",
+ "k =1.4 # gas constant\n",
+ "\n",
+ "T2 = T1*(P2/P1)**((k-1)/k)\n",
+ "\n",
+ "t2 = T2-460 # final temperature of air\n",
+ "\n",
+ "print \"Final temperature if air = \",round(t2,1),\"F\"\n",
+ "\n",
+ "Cv = 0.157 # coefficient of air \n",
+ "\n",
+ "W = Cv*(T2-T1) # work done per unit mass of oxygen\n",
+ "\n",
+ "Tw = 10*W # total work done on 10 slugs\n",
+ "\n",
+ "print \"Total work done on 10 slugs = \",round(Tw,0),\"Btu\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final temperature if air = 320.2 F\n",
+ "Total work done on 10 slugs = 330.0 Btu\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page no 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "\n",
+ "S =1 # specific gravity\n",
+ "\n",
+ "rho = S*1000 # density in kg/m**3\n",
+ "\n",
+ "bta = 2.2*10**9 # Bulk modulus of elasticity\n",
+ "\n",
+ "\n",
+ "S1 =0.79 # specific gravity\n",
+ "\n",
+ "rho2 = S1*1000 # density in kg/m**3\n",
+ "\n",
+ "bta2 = 1.21*10**9 # Bulk modulus of elasticity\n",
+ "\n",
+ "\n",
+ "k = 1.4 # gas constant for air\n",
+ "\n",
+ "R = 287 # universal gas constant\n",
+ "\n",
+ "T = 273+20 # temperature in K\n",
+ "\n",
+ "\n",
+ "C1 = sqrt(bta/rho)\n",
+ "\n",
+ "C2 = sqrt(bta2/rho2)\n",
+ "\n",
+ "print \"Speed of sound in water =\",round(C1,0),\"m/s\"\n",
+ "\n",
+ "print \"Speed of sound in ethly alcohol =\",round(C2,0),\"m/s\"\n",
+ "\n",
+ "C3 = sqrt(k*R*T)\n",
+ "\n",
+ "print \"Speed of sound in Air =\",round(C3,0),\"m/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of sound in water = 1483.0 m/s\n",
+ "Speed of sound in ethly alcohol = 1238.0 m/s\n",
+ "Speed of sound in Air = 343.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page no 431"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "P1 = 1.5 # pressure in psia\n",
+ "\n",
+ "T1 = 40 + 460 # temperature in R\n",
+ "\n",
+ "k = 1.4 # gas constant\n",
+ "\n",
+ "R = 1716 # universal gas constant in ft.lb/slug R\n",
+ "\n",
+ "V1 = 1500 # velocity in ft/s\n",
+ "\n",
+ "\n",
+ "c1 = sqrt(k*R*T1)\n",
+ "\n",
+ "M1 = V1/c1\n",
+ "\n",
+ "M2 = sqrt((2+(k-1)*M1**2)/(2*k*M1**2-(k-1)))\n",
+ "print M2\n",
+ "\n",
+ "P2 = P1*((1+k*M1**2)/(1+k*M2**2))\n",
+ "\n",
+ "print \"Pressure at downstream = \",round(P2,2),\"psia\"\n",
+ "\n",
+ "T2 = T1*((1+0.5*(k-1)*M1**2)/(1+0.5*(k-1)*M2**2))\n",
+ "\n",
+ "t2 = T2-460\n",
+ "\n",
+ "print \"Temperature at downstream = \",round(t2,1),\"F\"\n",
+ "V2 = M2*sqrt(k*R*t2)\n",
+ "\n",
+ "print \"Velocity downstream = \",round(V2,2),\"ft/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.753305702898\n",
+ "Pressure at downstream = 3.03 psia\n",
+ "Temperature at downstream = 157.3 F\n",
+ "Velocity downstream = 463.02 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter12.ipynb b/Fluid_Mechanics/Chapter12.ipynb
new file mode 100755
index 00000000..29dbb6ff
--- /dev/null
+++ b/Fluid_Mechanics/Chapter12.ipynb
@@ -0,0 +1,342 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b809e6889d9fdf33446744d4f1caf3aac2e77607182761aeef234f4a6cc34adc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter : Turbomachines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page no 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "Q = 0.25 # discharge from the pump in m**3/s\n",
+ "\n",
+ "gma= 0.8*9810 # specific weight in kg/m**3\n",
+ "\n",
+ "H=25 # elevation head in m\n",
+ "\n",
+ "T = 350 # Torque to drive the shaft in Nm\n",
+ "\n",
+ "N = 1800 # Speed in RPM\n",
+ "\n",
+ "w = 2*pi*N/60 # angular velocity\n",
+ "\n",
+ "\n",
+ "Eff = gma*Q*H*100/(T*w) # efficiency\n",
+ "\n",
+ "print \"Efficiency of th pump =\",round(Eff,0),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of th pump = 74.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.2 Page no 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 0.4 # diameter of the pump in m\n",
+ "\n",
+ "b = 0.03 # width in m\n",
+ "\n",
+ "theta = pi/3 # blade angle\n",
+ "\n",
+ "N = 1500 # speed in RPM\n",
+ "\n",
+ "Q = 0.4 # flow rate in m**3/s\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "w = 2*pi*N/60 # anggular velocity in rad/s\n",
+ "\n",
+ "u2 = (d/2)*w # blade velocity in m/s\n",
+ "\n",
+ "V2r = Q/(2*pi*(d/2)*b) # relative velocity in m/s\n",
+ "\n",
+ "print \"(a)\"\n",
+ "\n",
+ "print \"Radial velocity at exit =\",round(V2r,1),\"m/s\"\n",
+ "\n",
+ "V2t = u2 - V2r*(cos(theta)/sin(theta))\n",
+ "\n",
+ "print \"Whirl velocity = \",round(V2t,1),\"m/s\"\n",
+ "\n",
+ "v2 = V2r/sin(theta)\n",
+ "\n",
+ "print \"Relative velocity = \",round(v2,2),\"m/s\"\n",
+ "\n",
+ "V2 = sqrt(V2t**2+V2r**2)\n",
+ "\n",
+ "print \"Actual velocity =\",round(V2,2),\"m/s\"\n",
+ "\n",
+ "print \"(b)\"\n",
+ "\n",
+ "H = u2*V2t/g\n",
+ "\n",
+ "print\"Head added for no inlet whirl =\",round(H,0),\"m\"\n",
+ "\n",
+ "print \"(c)\"\n",
+ "\n",
+ "P = g*Q*H\n",
+ "\n",
+ "print \"Power required =\",round(P,1),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a)\n",
+ "Radial velocity at exit = 10.6 m/s\n",
+ "Whirl velocity = 25.3 m/s\n",
+ "Relative velocity = 12.25 m/s\n",
+ "Actual velocity = 27.43 m/s\n",
+ "(b)\n",
+ "Head added for no inlet whirl = 81.0 m\n",
+ "(c)\n",
+ "Power required = 317.8 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.3 Page no 450"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 0.36 # diameter of the impeller of pump\n",
+ "\n",
+ "N = 1500 # Speed of impeller in RPM\n",
+ "\n",
+ "\n",
+ "\n",
+ "Q1 = 82 # discharge in l/s\n",
+ "\n",
+ "H1 = 17.5 # Head in m\n",
+ "\n",
+ "Eta = 0.8 # efficiency \n",
+ "\n",
+ "Q2 = 100 # discharge in l/s\n",
+ "\n",
+ "H2 = 20 # head in m\n",
+ "\n",
+ "\n",
+ "D2 = 38.45\n",
+ "\n",
+ "print \"Impeller size =\",round(D2,2),\"cm\"\n",
+ "\n",
+ "N2 = 1500 \n",
+ "\n",
+ "print \"Speed of the pump =\",round(N2,0),\"RPM\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Impeller size = 38.45 cm\n",
+ "Speed of the pump = 1500.0 RPM\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.4 Page no 454 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "q = 500 # discharge in cgm\n",
+ "\n",
+ "Q = 500/449 # discharge in ft**3/s\n",
+ "\n",
+ "D = 0.667 # diameter in ft\n",
+ "\n",
+ "A = pi*D**2/4\n",
+ "\n",
+ "V = Q/A # velocity in ft/s\n",
+ "\n",
+ "g = 32.2 # acceleration due to gravity in ft/s**2\n",
+ "\n",
+ "N = 1800 # speed in RPM\n",
+ "\n",
+ "\n",
+ "\n",
+ "nu = 1.134*10**-5 # viscosity in ft**2/s\n",
+ "\n",
+ "e = 0.00085 # epssilon in ft\n",
+ "\n",
+ "r = 0.001275 \n",
+ "\n",
+ "R = V*D/nu # reynolds no\n",
+ "\n",
+ "f = 0.022 # from moody's diagram\n",
+ "\n",
+ "Hl = V**2*(12.1+(f*224.9))/64.4\n",
+ "\n",
+ "hs = 119.4 + Hl\n",
+ "\n",
+ "print \"Discharge, Q = \",round(Q,2),\"ft**3/s\"\n",
+ "print \"Dynamic head of the pump, H =\",round(hs,1),\"m\"\n",
+ "\n",
+ "Ns = N*sqrt(q)/(hs)**(3/4)\n",
+ "\n",
+ "print \"Specific speed of the pump, Ns =\",round(Ns,0),\"RPM\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge, Q = 1.11 ft**3/s\n",
+ "Dynamic head of the pump, H = 122.1 m\n",
+ "Specific speed of the pump, Ns = 1096.0 RPM\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.5 Page no 457"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "H = 60 # height in m\n",
+ "\n",
+ "Pb = 98*10**3 # barometric pressure in N/m**2\n",
+ "\n",
+ "Hl = 1 # head in m\n",
+ "\n",
+ "Pv = 1707 # vapour pressure \n",
+ "\n",
+ "sigma = 0.08\n",
+ "\n",
+ "w = 9810 # specific weight\n",
+ "\n",
+ "\n",
+ "Npsh_m = sigma*60 # minimum NPSH\n",
+ "\n",
+ "Hsm = (Pb/w)-(Pv/w)-Npsh_m-Hl\n",
+ "\n",
+ "print \"Minimum value of static suction lift = \",round(Hsm,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum value of static suction lift = 4.02 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter2.ipynb b/Fluid_Mechanics/Chapter2.ipynb
new file mode 100755
index 00000000..ffb67770
--- /dev/null
+++ b/Fluid_Mechanics/Chapter2.ipynb
@@ -0,0 +1,920 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:db7a54602402420ebc03881b70578491b776f0322d83cb209fd1e5faed86cdad"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Fluid Statics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page no 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "d = 10 # diameter of hydraulic press in meters\n",
+ "\n",
+ "d1 = 1 # diameter of piston in meters\n",
+ "\n",
+ "W = 1000 # weight in Newtons\n",
+ "\n",
+ "Ap = math.pi*d1**2/4 # Area of piston in m**2\n",
+ "\n",
+ "Ar = math.pi*d**2/4 # Area of rram in m**2\n",
+ "\n",
+ "\n",
+ "p = W/Ar # pressure to be supplied by the oil in N/cm**2\n",
+ "\n",
+ "F = p*Ap # Force applied on the piston\n",
+ "\n",
+ "print \"Using the pascal's law a weight of 1000N can be lifted by applying a force only of \",round(F,1),\"N\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using the pascal's law a weight of 1000N can be lifted by applying a force only of 10.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page no 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "h = 1 # ocean depth below the surface in km\n",
+ "\n",
+ "gma = 10070 # Specific weight of sea water\n",
+ "\n",
+ "\n",
+ "P =gma*h # Pressure in kN/m**2\n",
+ "\n",
+ "print \"Pressure = \",round(P),\"kN/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure = 10070.0 kN/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page no 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "p1 = 150*10**3 # Pressure at point 1 in kN/m**2\n",
+ "\n",
+ "Sg = 0.85 # Specific gravity of oil\n",
+ "\n",
+ "h = 0.8 # height of oil 2 i tank in meters \n",
+ "\n",
+ "g = 9810 # specific gravity \n",
+ "\n",
+ "h1 = 2.0 # height of oil 3 in tank\n",
+ "\n",
+ "\n",
+ "p2 = (p1 + Sg*h*g)\n",
+ "\n",
+ "p3 = (p2 + g*h1)/1000\n",
+ "\n",
+ "print \"Pressure at the bottom of the tank is\",round(p3,1),\"kN/m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the bottom of the tank is 176.3 kN/m**3"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page no 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "Po = 570 # mercury barometer reading in mm\n",
+ "\n",
+ "T = 273 -5 # temperature in K\n",
+ "\n",
+ "p = 750 # mercury barometer reading in mm\n",
+ "\n",
+ "n = 1.2345 # for polytropic atmosphere\n",
+ "\n",
+ "R =287 # univerasl gas constant in J/Kg-K\n",
+ "\n",
+ "g = 9.81 \n",
+ "\n",
+ "r = p/Po\n",
+ "\n",
+ "\n",
+ "y = -(R*T/(g*0.19))*(1 - (r)**((n-1)/n))\n",
+ "\n",
+ "print \"Height of the mountain is\",round(y,0),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Height of the mountain is 2208.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page no 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "h1 = 500 # height in mm\n",
+ "\n",
+ "h2 = 950 # height in mm\n",
+ "\n",
+ "S1 = 1 # specific gravity fo water\n",
+ "\n",
+ "S2 = 1.5 # specific gravity of liquid 2\n",
+ "\n",
+ "w = 9810 # specific weight of water\n",
+ "\n",
+ "\n",
+ "ha = ((h2*S2)-(h1*S1))/1000\n",
+ "\n",
+ "Pa = w*ha/1000 # Pressure in kPa\n",
+ "\n",
+ "print \"Pressure in the pipe = \",round(Pa,3),\"kPa\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure in the pipe = 9.074 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.6 Page no 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "d = 1 # diameter of the gate in m\n",
+ "\n",
+ "w = 9810 # specific weight in N/m**3\n",
+ "\n",
+ "A = pi*d**2/4 # area of the gate\n",
+ "\n",
+ "Ig = pi*d**4/64 # mamm moment of inertia\n",
+ "\n",
+ "theta = pi/2\n",
+ "\n",
+ "y1= 5+0.5\n",
+ "\n",
+ "\n",
+ "F = w*round(A,3)*(y1) # the answer will come out to be different as they have used the value of Area as 0.78 \n",
+ "\n",
+ "\n",
+ "h1 = y1 + (Ig*math.sin(theta)*math.sin(theta)/(A*y1))\n",
+ "\n",
+ "\n",
+ "F1 = (F*(h1 - 5))/d\n",
+ "\n",
+ "print \"Magnitude of the force required to open the gate = \",round(F1,0),\"N\" \n",
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of the force required to open the gate = 21659.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page no 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "l =2 # length of the plate in m\n",
+ "\n",
+ "b =1 # width of the plate\n",
+ "\n",
+ "theta = pi/3\n",
+ "\n",
+ "h = 0.75 # depth of the plate\n",
+ "\n",
+ "w = 9810 # specific weight of water\n",
+ "\n",
+ "\n",
+ "A = 1*2\n",
+ "\n",
+ "y1 = h + 1*sin(theta)\n",
+ "\n",
+ "F = w*A*y1/1000\n",
+ "\n",
+ "print \"(a) Total force = \",round(F,2),\"kN\"\n",
+ "\n",
+ "Ig = (b*l**3)/12\n",
+ "\n",
+ "h1 = y1 + (Ig*sin(theta)*sin(theta)/(2*y1))\n",
+ "\n",
+ "print \"(b) Position of center of pressure = \",round(h1,3),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Total force = 31.71 kN\n",
+ "(b) Position of center of pressure = 1.616 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page no 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "d = 6 # diameter of the gate in ft\n",
+ "\n",
+ "A =pi*d**2/4 # area of the gate\n",
+ "\n",
+ "p1 = 600 # pressure on top in psia\n",
+ "\n",
+ "y1 = 10 +2 + 3*sin(pi/6)\n",
+ "\n",
+ "F = 62.4*A*y1\n",
+ "\n",
+ "F1 = p1*A\n",
+ "\n",
+ "\n",
+ "Tf = F+F1\n",
+ "\n",
+ "print \"Total hydrostatic force =\",round(Tf,0),\"lbs\"\n",
+ "\n",
+ "Ig = pi*d**4/64\n",
+ "\n",
+ "h1 = y1 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y1))\n",
+ "\n",
+ "H = ((F*h1)+(F1*y1))/Tf\n",
+ "\n",
+ "print \"point of location on the center plate = \",round(H,2),\"ft\"\n",
+ "\n",
+ "\n",
+ "Hf = p1/62.4 # equivalent fluid height\n",
+ "\n",
+ "y2 = Hf+y1\n",
+ "\n",
+ "Tf1 = 62.4*A*y2\n",
+ "\n",
+ "h2 = y2 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y2))\n",
+ "\n",
+ "H1 = y2-Hf\n",
+ "\n",
+ "print \" OR point of location on the center plate from method 2 = \",round(H1,2),\"ft\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total hydrostatic force = 40783.0 lbs\n",
+ "point of location on the center plate = 13.52 ft\n",
+ " OR point of location on the center plate from method 2 = 13.5 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.10 Page no 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "R = 4 # radius of the gate in ft\n",
+ "\n",
+ "w = 1 # width of the gate in ft\n",
+ "\n",
+ "gma =62.4 # specific weight of water\n",
+ "\n",
+ "y1 = 4 # distance of center of the gate\n",
+ "\n",
+ "xv1 = 2 # distance in ft\n",
+ "\n",
+ "xv2 = 1.7 # distance in ft\n",
+ "\n",
+ "\n",
+ "Fh = R*y1*gma\n",
+ "\n",
+ "Ig = w*R**3/12\n",
+ "\n",
+ "yh = y1 + (Ig/(R*y1))\n",
+ "\n",
+ "Fv1 = R*2*gma\n",
+ "\n",
+ "Fv2 = pi*R**2*gma/4\n",
+ "\n",
+ "Fv = Fv1 + Fv2\n",
+ "\n",
+ "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n",
+ "\n",
+ "print \"Horizontal component acting on the plate = \",round(Fh,2),\"lbs\"\n",
+ "\n",
+ "print \"Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n",
+ "\n",
+ "print \"location of Xv =\",round(Xv,2),\"ft\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Horizontal component acting on the plate = 998.4 lbs\n",
+ "Vertical component acting on the plate = 1283.34 lbs\n",
+ "location of Xv = 1.82 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.11 Page no 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "p = 50 # pressure in psia\n",
+ "\n",
+ "gma = 62.4 # specific weight in ft\n",
+ "\n",
+ "h1 = p*144/gma # equivalent height of water surface in ft\n",
+ "\n",
+ "R = 4 # radius of gate in ft\n",
+ "\n",
+ "w = 1 # width of the gate in ft\n",
+ "\n",
+ "A = R*w\n",
+ "\n",
+ "y1 = h1 + 2.5 + 2 # center of pressure\n",
+ "\n",
+ "xv1 = 2 # center of pressure1 for x direction force\n",
+ "\n",
+ "xv2 = 1.7 # center of pressure2 for x direction force\n",
+ "\n",
+ "\n",
+ "Fh = gma*A*y1 # hiorizontal force\n",
+ "\n",
+ "Ig = 5.33 # moment of inertia\n",
+ "\n",
+ "yh = y1 + (Ig/(A*y1)) # location of horizontal component\n",
+ "\n",
+ "y2 = h1+2.5\n",
+ "\n",
+ "Fv1 = gma*(R*y2) # vertical force component 1\n",
+ "\n",
+ "Fv2 = gma*(pi*R**2/4) # vrtical force component 2\n",
+ "\n",
+ "Fv = Fv1 + Fv2 # vertical force component\n",
+ "\n",
+ "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n",
+ "\n",
+ "print \"(a) Horizontal component acting on the plate = \",round(Fh,0),\"lbs\" # The answer for horizontal force in the book is wrong\n",
+ "\n",
+ "print \"(b) Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n",
+ "\n",
+ "print \"location of vertical component Xv =\",round(Xv,2),\"ft from the left wall\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Horizontal component acting on the plate = 29923.0 lbs\n",
+ "(b) Vertical component acting on the plate = 30208.14 lbs\n",
+ "location of vertical component Xv = 1.99 ft from the left wall\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.13 Page no 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "l = 3 # length in m\n",
+ "\n",
+ "b = 4 # breadth in m\n",
+ "\n",
+ "h = 15 # height in m\n",
+ "\n",
+ "S = 0.9 # specific gravity of barge\n",
+ "\n",
+ "Sw = 1.09 # specific gravity of water\n",
+ "\n",
+ "Wd = 150*10**3 # addditional weight in kN\n",
+ "\n",
+ "V = l*b*h # volume in m**3\n",
+ "\n",
+ "Wb = gma*S*V # weight of barge\n",
+ "\n",
+ "Tw = Wb + Wd # total weight in kN\n",
+ "\n",
+ "gma = 9810 # specific density \n",
+ "\n",
+ "\n",
+ "Fb = Tw # since barge is floating\n",
+ "\n",
+ "V1 = Fb/((gma/1000)*Sw) # volume in m**3\n",
+ "\n",
+ "\n",
+ "d = (V1/(h*b))/1000\n",
+ "\n",
+ "print \"Depth to which water would rise = \",round(d,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth to which water would rise = 0.25 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.14 Page no 85 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "\n",
+ "W = 0.4 * 9.81 # weight of the solid cylinder in N\n",
+ "\n",
+ "\n",
+ "A = np.array([(1,-0.96),(1,1)])\n",
+ "\n",
+ "b = np.array([0,6.37])\n",
+ "\n",
+ "x = np.linalg.solve(A,b)\n",
+ "\n",
+ "X = x[0]\n",
+ "\n",
+ "Y = x[1]\n",
+ "\n",
+ "print \"X = \",round(X,2),\"cm\"\n",
+ "\n",
+ "print \"Y = \",round(Y,2),\"cm\"\n",
+ "\n",
+ "b = 8 -x[0]\n",
+ "\n",
+ "print \"The bottom of the solid cylinder will be \",round(b,2),\"cm above the bottom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "X = 3.12 cm\n",
+ "Y = 3.25 cm\n",
+ "The bottom of the solid cylinder will be 4.88 cm above the bottom\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.15 Page no 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "l =100 # length of the pan in cm\n",
+ "\n",
+ "w = 20 # width of the pan in cm\n",
+ "\n",
+ "d = 4 # depth of the pan in cm\n",
+ "\n",
+ "L = 1.5 # load in N/m\n",
+ "\n",
+ "gma = 9810 # sepcific weight\n",
+ "\n",
+ "\n",
+ "Fb = gma*(d*w*l/(2*l**3)) # weight on the pan\n",
+ "\n",
+ "W = Fb-L # weight of the pan\n",
+ "\n",
+ "X1 = w/3\n",
+ "\n",
+ "X2 = w/2\n",
+ "\n",
+ "theta = math.atan(d/w)*180/pi\n",
+ "\n",
+ "x = ((X2-X1)*cos(theta*pi/180))\n",
+ "\n",
+ "\n",
+ "M = W*x\n",
+ "\n",
+ "print \"Weight of the pan =\",round(W,1),\"N\"\n",
+ "print \"Magnitude of right momentum = \",round(M,1),\"N.cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight of the pan = 37.7 N\n",
+ "Magnitude of right momentum = 123.4 N.cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example no 2.16 Page no 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "\n",
+ "Io = 15*4**3/12 # moment of inertia in m**4\n",
+ "\n",
+ "V = 15*4*2.71 # Volume in m**3\n",
+ "\n",
+ "Gb = ((3/2)-(2.71/2)) \n",
+ "\n",
+ "W = 1739.2 # weight of the barge from the previous example in kN\n",
+ "\n",
+ "Mg = (Io/V)-Gb # metacentric height in m\n",
+ "\n",
+ "print \"(a) Metacentric height = \", round(Mg,3),\"m\"\n",
+ "\n",
+ "M = W*Mg*sin(pi*6/180)\n",
+ "\n",
+ "print \"(b) Righting moment =\",round(M,1),\"kN.m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Metacentric height = 0.347 m\n",
+ "(b) Righting moment = 63.1 kN.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example no 2.17 Page no 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "l=6 # length of the tank\n",
+ "\n",
+ "w =2 # width of the tank\n",
+ "\n",
+ "d = 3 # depth of the tank\n",
+ "\n",
+ "a = 3 # acceleration in m/s**2\n",
+ "\n",
+ "theta = pi/6\n",
+ "\n",
+ "W = 9810 # specific weight\n",
+ "\n",
+ "X = 0\n",
+ "\n",
+ "po=0 # pressure at the origin\n",
+ "\n",
+ "\n",
+ "A = np.array([(1,-1),(1,1)])\n",
+ "\n",
+ "b = np.array([-1.38,3.0])\n",
+ "\n",
+ "x = np.linalg.solve(A,b)\n",
+ "\n",
+ "Y1 = x[0]\n",
+ "\n",
+ "Y2 = x[1]\n",
+ "\n",
+ "\n",
+ "P = po - W*(2.61*X/9.81) - W*(1+(1.5/9.81))*(-Y2)\n",
+ "\n",
+ "print\"Amximum pressure occurs at the bottom of the tank =\",round(P,3),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amximum pressure occurs at the bottom of the tank = 24768.9 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.18 Page no 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 1 # diamter of the jar in ft\n",
+ "\n",
+ "h =2 # height of the jar in ft\n",
+ "\n",
+ "H = 1 # height of water in the jar in ft\n",
+ "\n",
+ "N = 150 # RPM\n",
+ "\n",
+ "g = 32.2 # acceleration due to gravity in ft/s**2\n",
+ "\n",
+ "\n",
+ "w = 2*pi*N/60\n",
+ "\n",
+ "ho = H+((w**2*(d/2)**2)/(4*g))\n",
+ "print \"(a) Height of paraboliod revolution of base = \", round(ho,2),\"ft\"\n",
+ "\n",
+ "Pmax = 62.4*ho\n",
+ "\n",
+ "print \"(b) Maximum pressure corresponding to maximum height = \",round(Pmax,1),\"lbs/ft**2\"\n",
+ "\n",
+ "z = H - ((w**2*(d/2)**2)/(4*g))\n",
+ "\n",
+ "r = 0.2 # distance from center\n",
+ "\n",
+ "y = -(0.52-0.25)\n",
+ "\n",
+ "P = po + (62.4*w**2*r**2/(2*g))-(62.4*y)\n",
+ "\n",
+ "print \"(c) Pressure =\",round(P,1),\"lbs/ft**2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Height of paraboliod revolution of base = 1.48 ft\n",
+ "(b) Maximum pressure corresponding to maximum height = 92.3 lbs/ft**2\n",
+ "(c) Pressure = 26.4 lbs/ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter3.ipynb b/Fluid_Mechanics/Chapter3.ipynb
new file mode 100755
index 00000000..845caa9a
--- /dev/null
+++ b/Fluid_Mechanics/Chapter3.ipynb
@@ -0,0 +1,503 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f598cdc0d1e1209f88ec87b2a9e5b6a08368d8e1e45eff28590bd3252c8de961"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter : Fluid Kinematics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page no 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "\n",
+ "x=1 # x co-ordinate\n",
+ "\n",
+ "y=2 # y co-ordinate\n",
+ "\n",
+ "\n",
+ "print \"(a) u = 4*X; v = -4*Y \"\n",
+ "\n",
+ "u = 4*x\n",
+ "\n",
+ "v=- 4*y\n",
+ "\n",
+ "print \"(b) u=\",round(u,0),\"m/s and v=\",round(v,0),\"m/s\"\n",
+ "\n",
+ "R =sqrt(u**2+v**2)\n",
+ "\n",
+ "ang = atan(v/u)*180/pi\n",
+ "\n",
+ "print \"(c) Magnitude of velocity =\",round(R,2),\"m/s and angle of resultant velocity = \",round(ang,1),\"deg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) u = 4*X; v = -4*Y \n",
+ "(b) u= 4.0 m/s and v= -8.0 m/s\n",
+ "(c) Magnitude of velocity = 8.94 m/s and angle of resultant velocity = -63.4 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.2 Page no 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 0.3 # diameter of pipe in m\n",
+ "\n",
+ "v = 15 # velocity in m/s\n",
+ "\n",
+ "rho = 997.1 # density in kg/m**3\n",
+ "\n",
+ "A = pi*d**2/4\n",
+ "\n",
+ "\n",
+ "Q=A*v\n",
+ "\n",
+ "print \"(a) Discharge =\",round(Q,2),\"m**3/s\"\n",
+ "\n",
+ "mdot = rho*Q\n",
+ "\n",
+ "print \"(b) Mass flow rate = \",round(mdot,2),\"kg/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Discharge = 1.06 m**3/s\n",
+ "(b) Mass flow rate = 1057.21 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page no 120 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from scipy import integrate\n",
+ "\n",
+ "\n",
+ "Vo = 10 # velocity in m/s\n",
+ "\n",
+ "r1 = 0\n",
+ "\n",
+ "ro = 0.1 # radius in m\n",
+ "\n",
+ "N = 1\n",
+ "\n",
+ "\n",
+ "R = lambda r: (10*r-1000*r**3)\n",
+ "\n",
+ "R1,err=integrate.quad(R,r1,ro)\n",
+ "\n",
+ "Q = R1*2*pi\n",
+ "\n",
+ "A = pi*(0.1)**2\n",
+ "\n",
+ "V = Q/A\n",
+ "\n",
+ "print \"Mean velocity of the flow =\",round(V,0),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean velocity of the flow = 5.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.4 Page no 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from scipy import integrate\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "U = integrate(2,x)\n",
+ "\n",
+ "\n",
+ "y = Symbol('y')\n",
+ "\n",
+ "V = integrate(-4*y,y)\n",
+ "\n",
+ "\n",
+ "Zhi = U + V\n",
+ "\n",
+ "print Zhi # for x and y =0 we get C = 0\n",
+ "\n",
+ "X = [5,6,7,8,9,10,11,12,13,14,15,16,17]\n",
+ "Y = [0,1.414,2,2.449,2.828,3.16,3.46,3.741,4,4.242,4.472,4.69,4.898]\n",
+ "\n",
+ "b1=plt.plot(X,Y)\n",
+ "\n",
+ "\n",
+ "X1 = [2.5,3,4,5,6,7,8,9,10,11,12,13,14,15]\n",
+ "Y1 = [0,1,1.732,2.23,2.645,3,3.31,3.60,3.87,4.123,4.35889,4.5825,4.795,5]\n",
+ "\n",
+ "b2=plt.plot(X1,Y1)\n",
+ "\n",
+ "\n",
+ "X2 = [0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5,14.5,15.5]\n",
+ "Y2 = [0,1.414,2,2.449,2.828,3.162,3.462,3.741,4,4.242,4.472,4.69,4.898,5.099,5.29,5.4772]\n",
+ "\n",
+ "b3=plt.plot(X2,Y2)\n",
+ "\n",
+ "plt.xlabel(\"x\")\n",
+ "\n",
+ "plt.ylabel(\"y\")\n",
+ "\n",
+ "plt.title(\"Streamline plot\")\n",
+ "\n",
+ "plt.legend([\"zhi=10\",\"zhi=5\",\"zhi=1\"])\n",
+ "plt.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2*x - 2*y**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.5 PAge no 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "\n",
+ "x = 2 # X co-ordinate\n",
+ "\n",
+ "Y = 4 # Y co-ordiante\n",
+ "\n",
+ "y = Symbol('y')\n",
+ "\n",
+ "zhi = 4*x*y\n",
+ "\n",
+ "zhiprime = zhi.diff(y)\n",
+ "\n",
+ "u = zhiprime\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "\n",
+ "zhi = 4*x*Y\n",
+ "\n",
+ "zhiprime = zhi.diff(x)\n",
+ "\n",
+ "v = zhiprime\n",
+ "\n",
+ "R=sqrt(u**2+v**2)\n",
+ "\n",
+ "theta = atan(v/u)*180/pi\n",
+ "\n",
+ "print \"Resutant velocity magnitude = \",round(R,2),\"m/s\"\n",
+ "\n",
+ "print \"Angle =\",round(theta,1),\"deg with the X-axis in the 4th quadrant\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resutant velocity magnitude = "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "17.89 m/s\n",
+ "Angle = 63.4 deg with the X-axis in the 4th quadrant\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.6 Page no 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "from scipy import integrate\n",
+ "\n",
+ "\n",
+ "d1 = 0.09 # diameter in cm\n",
+ "\n",
+ "d2 = 0.025 # diameter in cm\n",
+ "\n",
+ "rho = 1000 # density in kg/m**3\n",
+ "\n",
+ "mdot = 25 # mass flow rate in kg/s\n",
+ "\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "\n",
+ "A1 = pi*d1**2/4\n",
+ "\n",
+ "A2 = pi*d2**2/4\n",
+ "\n",
+ "AA = A1 - ((A1-A2)/40)*10 # from figure\n",
+ "\n",
+ "V = mdot/(rho*AA)\n",
+ "\n",
+ "print \"(a) Velocity =\",round(V,1),\"m/s\"\n",
+ "\n",
+ "AX = (A1 - ((A1-AA)/40)*x)\n",
+ "\n",
+ "v = 25*10**4/(rho*AX)\n",
+ "\n",
+ "vprime = v.diff(x)\n",
+ "\n",
+ "V1 = vprime\n",
+ "\n",
+ "\n",
+ "VPrime = 0.09\n",
+ "\n",
+ "Acx = V*VPrime\n",
+ "\n",
+ "print \"(b) Convective acceleration =\",round(Acx,3),\"m**2/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Velocity = 5.1 m/s\n",
+ "(b) Convective acceleration = 0.46 m**2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.8 Page no 143 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "y = Symbol('y')\n",
+ "\n",
+ "U = 16*y-12*x\n",
+ "\n",
+ "zhiprime = U.diff(y)\n",
+ "\n",
+ "u = zhiprime\n",
+ "\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "\n",
+ "V = 12*y-9*x\n",
+ "\n",
+ "zhiprime1 = V.diff(x)\n",
+ "\n",
+ "v = zhiprime1\n",
+ "\n",
+ "\n",
+ "\n",
+ "z = v-u\n",
+ "\n",
+ "print \"z = \",round(z,0)\n",
+ "\n",
+ "print \"Hence the flow is rotational\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "z = -25.0\n",
+ "Hence the flow is rotational\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.10 Page no 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "d1 = 0.1 # diameter in m\n",
+ "\n",
+ "d2 = 0.3 # diameter in m\n",
+ "\n",
+ "V1 = 30 # velocity in m/s\n",
+ "\n",
+ "\n",
+ "V2 = (d1**2/d2**2)*V1\n",
+ "\n",
+ "print \"Velocity at the larger cross section = \",round(V2,2),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity at the larger cross section = 3.33 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter4.ipynb b/Fluid_Mechanics/Chapter4.ipynb
new file mode 100755
index 00000000..ea310eb2
--- /dev/null
+++ b/Fluid_Mechanics/Chapter4.ipynb
@@ -0,0 +1,529 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1587038d9ed42ba6cd2ab38d651a00ef2c4ed8f4723b6c6b72bdf9880d8ef943"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Fluid Dynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page no 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d1 = 0.1 # diameter in m\n",
+ "\n",
+ "d2 = 0.05 # diameter in m\n",
+ "\n",
+ "Q = 0.1 # discharge in m**3/s\n",
+ "\n",
+ "A1 = pi*d1**2/4\n",
+ "\n",
+ "A2 = pi*d2**2/4\n",
+ "\n",
+ "gma =9810 # specific weight\n",
+ "\n",
+ "z= 6 # difference in the height\n",
+ "\n",
+ "g = 9.81\n",
+ "\n",
+ "\n",
+ "V1 = Q/A1 # velocity at section 1\n",
+ "\n",
+ "V2 = Q/A2 # velocity at section 2\n",
+ "\n",
+ "dP = gma*((V2**2/(2*g))-(V1**2/(2*g))-z)/1000\n",
+ "\n",
+ "print \"Difference in pressure in section 1 and 2 = \",round(dP,1),\"kN/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Difference in pressure in section 1 and 2 = 1157.0 kN/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page no 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 2.5 # diameter in cm\n",
+ "\n",
+ "h =200 # head in cm\n",
+ "\n",
+ "Cd = 0.65 # coefficient of discharge\n",
+ "\n",
+ "A =pi*d**2/4\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2 \n",
+ "\n",
+ "\n",
+ "Q = Cd*A*sqrt(2*g*h)/100\n",
+ "\n",
+ "print \"Actual discharge =\",round(Q,2),\"l/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual discharge = 2.0 l/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page no 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from scipy import integrate\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "\n",
+ "H1 = 3 # height in m\n",
+ "\n",
+ "H2 = 4 # height in m\n",
+ "\n",
+ "b = 0.5 # width in m\n",
+ "\n",
+ "Cd = 0.65 # co-efficient of discharge \n",
+ "\n",
+ "g = 9.81 # acceleration due to grvity in m/s**2\n",
+ "\n",
+ "\n",
+ "q = lambda h: h**(1/2)\n",
+ " \n",
+ "Q,err = integrate.quad(q, H1, H2)\n",
+ "\n",
+ "Qt = Cd*b*sqrt(2*g)*Q\n",
+ "\n",
+ "print \"Discharge through the orifice =\",round(Qt,2),\"m**3/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge through the orifice = 2.69 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page no 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from math import *\n",
+ "\n",
+ "from scipy import integrate\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "\n",
+ "b = 1 # bredth of the tank\n",
+ "\n",
+ "d = 0.5 # depth of the tank\n",
+ "\n",
+ "h1 = 0.2 # height of the orifice in m\n",
+ "\n",
+ "Cd = 0.6 # coefficient of discharge\n",
+ "\n",
+ "H1 = 2 # height in m\n",
+ "\n",
+ "H2 = 2+h1 # height in m\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "A = 1*0.3 # area of submerged section in m**2\n",
+ "\n",
+ "\n",
+ "q = lambda h: h**(1/2)\n",
+ " \n",
+ "Q,err = integrate.quad(q, H1, H2)\n",
+ "\n",
+ "Q1 = Cd*b*sqrt(2*g)*(Q) # Flow through area 1\n",
+ "\n",
+ "Q2 = Cd*sqrt(2*g*H2)*A\n",
+ "\n",
+ "Td = Q1+Q2\n",
+ "\n",
+ "print \"Total Discharge =\",round(Td,2),\"m**3/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Discharge = 1.95 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page no 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d1 = 2 # radius of pipe\n",
+ "\n",
+ "d2 = 1 # radius of throat\n",
+ "\n",
+ "D1 = 40\n",
+ "\n",
+ "D2 = 20\n",
+ "\n",
+ "A1 = pi*D1**2/4\n",
+ "\n",
+ "A2 = pi*D2**2/4\n",
+ "\n",
+ "Cd = 0.95\n",
+ "\n",
+ "\n",
+ "V2 = sqrt(21582/0.9375)\n",
+ "\n",
+ "Q = 1.52*pi*(d1/100)**2/4\n",
+ "\n",
+ "Qa = Q*Cd\n",
+ "\n",
+ "print \"Actual discharge =\",round(Qa,6),\"m**3/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual discharge = 0.000454 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.6 Page no 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "dx = 0.5 # in ft\n",
+ "\n",
+ "K = 1 # constant\n",
+ "\n",
+ "g = 32.2 # acceleration due to gravity in ft/s**2\n",
+ "\n",
+ "\n",
+ "V = sqrt(2*g*dx)\n",
+ "\n",
+ "print \"velocity at the dept of 1 ft =\",round(V,2),\"ft/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity at the dept of 1 ft = 5.67 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example no 4.7 Page no 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "gma= 0.8 # specific weight\n",
+ "\n",
+ "V2 = 40 # velocity in m/s\n",
+ "\n",
+ "z1 =25 # height at point 1\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "d = 15 # diameter of the nozzle in cm\n",
+ "\n",
+ "\n",
+ "V2 = sqrt(2*g*z1/4.25)\n",
+ "\n",
+ "A = pi*(d/100)**2/4\n",
+ "\n",
+ "Q = A*V2*1000\n",
+ "\n",
+ "print \"Discharge throught the system =\",round(Q,0),\"l/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge throught the system = 190.0 l/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.8 Page no 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "\n",
+ "Eff = 0.8 # pump efficiency\n",
+ "\n",
+ "Hl = 30 # head loss in m\n",
+ "\n",
+ "D1 =6 # diameter in cm\n",
+ "\n",
+ "D2 = 2 # diameter in cm\n",
+ "\n",
+ "gma = 9810 # specific weight in N/m**3\n",
+ "\n",
+ "V2 = 40 # velocity in m/s\n",
+ "\n",
+ "P1 = -50 # pressure at point 1 in N/m**2\n",
+ "\n",
+ "z2 = 100 # height at point 2\n",
+ "\n",
+ "g = 9.8 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "z1 = 30 # height in m\n",
+ "\n",
+ "\n",
+ "V1=(2/6)**2*V2\n",
+ "\n",
+ "Q = (pi*6**2/4)*V1*10**-4\n",
+ "\n",
+ "Hs = z2 + (V2**2/(2*g)) + z1 + (50/gma) -(V1**2/(2*g))\n",
+ "\n",
+ "P = gma*Q*Hs\n",
+ "\n",
+ "Pi = (P/Eff)/1000\n",
+ "\n",
+ "print \"Power input = \",round(Pi,1),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power input = 32.5 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.9 Page no 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "Q = 0.2 # discharge in m**3/s\n",
+ "\n",
+ "d1 = 0.25 # diameter of the pipe in m\n",
+ "\n",
+ "A = pi*d1**2/4 # area of the pipe\n",
+ "\n",
+ "za = 480 # height in m\n",
+ "\n",
+ "z1 = 500 # height in m\n",
+ "\n",
+ "z3 = 550 # elevation in m\n",
+ "\n",
+ "gma =9810 # specific weight in N/m**2\n",
+ "\n",
+ "g =9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "V=Q/A # Velocity of in m/s\n",
+ "\n",
+ "Hl1 = (0.02*100*V**2/(0.25*2*9.81))\n",
+ "\n",
+ "\n",
+ "Pa =(z1-za-(V**2/(2*g))-Hl1)\n",
+ "\n",
+ "El = za+Pa\n",
+ "\n",
+ "print \"Elevation at height A =\",round(El,2),\"m\"\n",
+ "\n",
+ "\n",
+ "hs = z3 - z1 + (0.02*(500/0.25)*(V**2/(2*g))) \n",
+ "\n",
+ "El2 = El+hs\n",
+ "\n",
+ "print \"Elevation at height B =\",round(El2,2),\"m\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Elevation at height A = 492.39 m\n",
+ "Elevation at height B = 576.23 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter5.ipynb b/Fluid_Mechanics/Chapter5.ipynb
new file mode 100755
index 00000000..73c391ca
--- /dev/null
+++ b/Fluid_Mechanics/Chapter5.ipynb
@@ -0,0 +1,545 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cd2be77f3b9478c6cae134ea907a28e897f525fa56fe0f236e6cf640bce7cb59"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Fluid Momentum"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page no 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "Q = 0.3 # Water flow rate in m**3/s\n",
+ "\n",
+ "d1 = 0.3 # diameter at inlet in meters\n",
+ "\n",
+ "A1 = pi*d1**2/4 # inlet area in m**2\n",
+ "\n",
+ "d2 = 0.15 # diameter at outlet in m\n",
+ "\n",
+ "A2 = pi*d2**2/4 # area at outlet in m**2\n",
+ "\n",
+ "P1 = 175*10**3 # inlet pressure in kN/m**2\n",
+ "\n",
+ "P2 = 160*10**3 # Pressure at outlet in kN/m**2\n",
+ "\n",
+ "F1 = P1*A1 # Force at inlet\n",
+ "\n",
+ "F2 = P2*A2 # Force at outlet\n",
+ "\n",
+ "rho = 1000 # density of water in kg/m**3\n",
+ "\n",
+ "V1 = Q/A1 # inlet velocity in m/s\n",
+ "\n",
+ "V2 = Q/A2 # Velocity at outlet in m/s\n",
+ "\n",
+ "theta = 45*pi/180 # angle in deg\n",
+ "\n",
+ "\n",
+ "\n",
+ "Rx = F1 - F2*cos(theta)-rho*Q*(V2*cos(theta)-V1)\n",
+ "\n",
+ "\n",
+ "Ry = F2*sin(theta)+rho*Q*(V2*sin(theta)-0)\n",
+ "\n",
+ "R = sqrt(Rx**2+Ry**2)\n",
+ "\n",
+ "print \"Resultant force on the elbow = \",round(R,2),\"N\"\n",
+ "\n",
+ "a = atan(Ry/Rx)*180/pi\n",
+ "\n",
+ "print \"Angle of resultant force = \",round(a,4),\"deg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant force on the elbow = 9800.58 N\n",
+ "Angle of resultant force = 34.8516 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page no 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "V1 = 80 # Velocity in ft/s\n",
+ "\n",
+ "A1 = 0.1 # area in ft**2\n",
+ "\n",
+ "g = 32.2 # Acceleration due to gravity in ft/s**2\n",
+ "\n",
+ "rho = 1.94 # density in lb/ft**3\n",
+ "\n",
+ "a = pi/3 # angle of pipe bend\n",
+ "\n",
+ "\n",
+ "Q = A1*V1 # Total discharge in m**3\n",
+ "\n",
+ "\n",
+ "V2 = sqrt((2*g*V1**2/(2*32.2))-3*2*g)\n",
+ "\n",
+ "\n",
+ "\n",
+ "Rx = -(rho*Q*(V2*cos(a)-80))\n",
+ "\n",
+ "\n",
+ "Ry = (rho*Q*(V2*sin(a)-0))\n",
+ "\n",
+ "R = sqrt(Rx**2+Ry**2)\n",
+ "\n",
+ "print \"Resultant force = \",round(R,0),\"lbs\"\n",
+ "\n",
+ "ang = atan(Ry/Rx)*180/pi\n",
+ "\n",
+ "print \"Angle of resultant force = \",round(ang,4),\"deg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant force = 1232.0 lbs\n",
+ "Angle of resultant force = 59.2396 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example no 5.3 Page no 195 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "Q1 = 0.5 # discharge from pipe 1 in m**3/s\n",
+ "\n",
+ "Q2 = 0.3 # discharge from pipe 2 in m**3/s\n",
+ "\n",
+ "Q3 = 0.2 # discharge from pipe 3 in m**3/s\n",
+ "\n",
+ "d1 = 0.45 # diameter of pipe 1 in m\n",
+ "\n",
+ "d2 = 0.3 # diameter of pipe 2 in m\n",
+ "\n",
+ "d3 = 0.15 # diameter of pipe 3 in m\n",
+ "\n",
+ "A1 = pi*d1**2/4 # area in m**2\n",
+ "\n",
+ "A2 = pi*d2**2/4 # area in m**2\n",
+ "\n",
+ "A3 = pi*d3**2/4 # area in m**2\n",
+ "\n",
+ "P1 = 60*10**3 # Pressure at point 1 in kPa\n",
+ "\n",
+ "gma = 9810\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "rho = 1000 # density in kg/m**3\n",
+ "\n",
+ "\n",
+ "V1 = Q1/A1\n",
+ "\n",
+ "V2 = Q2/A2\n",
+ "\n",
+ "V3 = Q3/A3\n",
+ "\n",
+ "P2 = gma*((P1/gma) + V1**2/(2*g) - V2**2/(2*g))\n",
+ "\n",
+ "P3 = gma*((P1/gma) + V1**2/(2*g) - V3**2/(2*g))\n",
+ "\n",
+ "F1 = P1*A1\n",
+ "\n",
+ "F2 = P2*A2\n",
+ "\n",
+ "F3 = P3*A3\n",
+ "\n",
+ "Rx = rho*(Q2*V2*cos(pi/6)-Q3*V3*cos(pi/9)-0)+F3*cos(pi/9)-F2*cos(pi/6)\n",
+ "\n",
+ "Ry = rho*((Q2*V2*sin(pi/6)+Q3*V3*sin(pi/9)-Q1*V1))+F3*sin(pi/9)-F2*sin(pi/6)-F1\n",
+ "\n",
+ "R = sqrt(Rx**2+Ry**2)\n",
+ "\n",
+ "a = atan(Ry/Rx)*180/pi\n",
+ "\n",
+ "print \"Resultant Force = \",round(R,0),\"N\"\n",
+ "\n",
+ "print \"Angle with horizontal = \",round(a,1),\"deg with horizontal\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant Force = 12489.0 N\n",
+ "Angle with horizontal = 69.2 deg with horizontal\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page no 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "d = 2 # diameter in inches\n",
+ "\n",
+ "A = pi*d**2/(4*144) # Area of jet\n",
+ "\n",
+ "V = 100 # velocity of jet in ft/s\n",
+ "\n",
+ "Q = A*V # dischargge in ft**3/s\n",
+ "\n",
+ "gma = 62.4 # mass\n",
+ "\n",
+ "g = 32.2 # acceleration due to gravity in ft/s**2\n",
+ "\n",
+ "\n",
+ "Rx = (gma*Q*V)/g # horizontal force required to keep plate in position\n",
+ "\n",
+ "print \"Normal force on the plate = \",round(Rx,0),\"lbs\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normal force on the plate = 423.0 lbs\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page no 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "D = 0.075 # diameter in m\n",
+ "\n",
+ "A =pi*D**2/4 # area of jet\n",
+ "\n",
+ "V =15 # velocity of jet in m/s\n",
+ "\n",
+ "w = 9810 # specific weight\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s^2\n",
+ "\n",
+ "\n",
+ "Q =A*V # Discharge in m**3/s\n",
+ "\n",
+ "Vp = 10 # velocity of plate in m/s\n",
+ "\n",
+ "Rx = w*Q*(V-Vp)/g # force in X direction\n",
+ "\n",
+ "print \"Force on the plate = \",round(Rx,2),\"N\"\n",
+ "\n",
+ "W = Rx*Vp\n",
+ "\n",
+ "print \"Work done per second = \",round(W,1),\"N.m/s\"\n",
+ "\n",
+ "Eff = 2*(V-Vp)*Vp/V**2\n",
+ "\n",
+ "E = 100*Eff\n",
+ "\n",
+ "print \"Efficiency = \",round(E,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force on the plate = 331.34 N\n",
+ "Work done per second = 3313.4 N.m/s\n",
+ "Efficiency = 44.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page no 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "d = 3 # diameter in inches\n",
+ "\n",
+ "A = pi*d**2/(4*144) # Area of jet\n",
+ "\n",
+ "Q = 2 # discharge in ft**3/s\n",
+ "\n",
+ "rho = 1.94 # density in lbs/ft**3\n",
+ "\n",
+ "\n",
+ "V = Q/A # velocity in ft/s\n",
+ "\n",
+ "alpha = pi/6 # inlet vane angle\n",
+ "\n",
+ "bta = pi/6 # outlet vane angle\n",
+ "\n",
+ "Rx = rho*Q*(V*cos(bta)+V*cos(alpha)) # force in X direction\n",
+ "\n",
+ "Ry = rho*Q*(V*sin(bta)-V*sin(alpha)) # force in Y direction\n",
+ "\n",
+ "print \"Force exerted in X direction = \",round(Rx,1),\"lbs\"\n",
+ "\n",
+ "print \"Force exerted in Y direction = \",round(Ry,1),\"lbs\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force exerted in X direction = 273.8 lbs\n",
+ "Force exerted in Y direction = 0.0 lbs\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page no 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "V1 =40 # velocity in m/s\n",
+ "\n",
+ "Vp = 20 # velocity of the plate in m/s\n",
+ "\n",
+ "alpha = pi/6 # inlet vane angle\n",
+ "\n",
+ "bta = pi/9 # outlet vane angle\n",
+ "\n",
+ "g = 9.81\n",
+ "\n",
+ "\n",
+ "V1x = V1*cos(alpha)\n",
+ "\n",
+ "Vw1 = V1x;\n",
+ "\n",
+ "V1y = V1*sin(alpha)\n",
+ "\n",
+ "dV = V1x - Vp\n",
+ "\n",
+ "theta = atan(V1y/dV)*180/pi\n",
+ "\n",
+ "Vr1 = V1y/sin(theta*pi/180)\n",
+ "\n",
+ "Vr2 = Vr1\n",
+ "\n",
+ "\n",
+ "print \"a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\"\n",
+ "\n",
+ "phi = 4*pi/180 \n",
+ "\n",
+ "V2 = Vr2*sin(phi)/sin(bta)\n",
+ "\n",
+ "V2w = V2*cos(bta)\n",
+ "\n",
+ "W = (V2w+V1x)*Vp/g\n",
+ "\n",
+ "print \"b ) Work done per N of fluid per second = \",round(W,2),\"N.m\"\n",
+ "\n",
+ "Eff = (1 - (V2/V1)**2)*100\n",
+ "\n",
+ "print \"c ) Efficiency = \",round(Eff,2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\n",
+ "b ) Work done per N of fluid per second = 80.31 N.m\n",
+ "c ) Efficiency = 98.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page no 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "v = 220 # velocity in ft/s\n",
+ "\n",
+ "d = 6 # diameter of the propeller\n",
+ "\n",
+ "Q = 12000 # discharge in ft**3/s\n",
+ "\n",
+ "mf = 0.0022 # mass flow rate in slugs/ft**3\n",
+ "\n",
+ "\n",
+ "V1 = v*5280/3600 # velocity in ft/s\n",
+ "\n",
+ "V = Q/(pi*d**2/4) # velocity in ft/s\n",
+ "\n",
+ "V4 = 2*V-V1\n",
+ "\n",
+ "F = mf*Q*(V4-V1) # thrust on the plane\n",
+ "\n",
+ "print \"a - Thrust on the plane = \",round(F,1),\"lbs\"\n",
+ "\n",
+ "Eff = V1/V # efficiency \n",
+ "\n",
+ "E = Eff*100\n",
+ "\n",
+ "print \"b - Theoretical efficiency = \",round(E,0),\"%\"\n",
+ "\n",
+ "Thp = F*V1/(500*Eff)\n",
+ "\n",
+ "print \"c - Theoretical horsepower required = \",round(Thp,0),\"hp\"\n",
+ "\n",
+ "dP = mf*(V4**2-V1**2)/2\n",
+ "\n",
+ "print \"d - Pressure difference across blades = \",round(dP,2),\"lbs/ft**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a - Thrust on the plane = 5372.2 lbs\n",
+ "b - Theoretical efficiency = 76.0 %\n",
+ "c - Theoretical horsepower required = 4560.0 hp\n",
+ "d - Pressure difference across blades = 190.0 lbs/ft**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter6.ipynb b/Fluid_Mechanics/Chapter6.ipynb
new file mode 100755
index 00000000..0eb8031a
--- /dev/null
+++ b/Fluid_Mechanics/Chapter6.ipynb
@@ -0,0 +1,128 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:779dd4cf4a63ec7ae3b3ee56b532415f0e7430caa393646786820e5bcc3483bb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : Dimensional Analysis and Dynamic Similitude"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page no 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "L = 10 # length scale lp/l\n",
+ "\n",
+ "\n",
+ "rhop = 0.86*998.2 # density inn kg/m**3\n",
+ "\n",
+ "mup = 8*10**-3 # viscosity in Ns/m**2\n",
+ "\n",
+ "Vp = 2.5 # Velocity in m/s\n",
+ "\n",
+ "\n",
+ "rhom = 998.2 # density in kg/m**3\n",
+ "\n",
+ "mum = 1.005*10**-3 # viscosity in Ns/m**2\n",
+ "\n",
+ "\n",
+ "Vm = Vp*L*(rhop/rhom)*(mum/mup) # velocity in m/s\n",
+ "\n",
+ "print \"Hence the model should be tested at a velocity of \",round(Vm,2),\"m/s. This velocity in the model is called corresponding velocity\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hence the model should be tested at a velocity of 2.7 m/s. This velocity in the model is called corresponding velocity\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page no 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "l = 300 # length in ft\n",
+ "\n",
+ "Q = 100000 # discharge in cfs\n",
+ "\n",
+ "Cd = 3.8 # coefficient of discharge\n",
+ "\n",
+ "L = (1/50) # length scale\n",
+ "\n",
+ "\n",
+ "Qm = 100000*(L)**(5/2) # model discharge in cfs\n",
+ "\n",
+ "print \"Maximum discharge, Qm = \",round(Qm,8),\"cfs\"\n",
+ "\n",
+ "H = (Q/(Cd*l))**(2/3) # height over spill way\n",
+ "\n",
+ "h = H*L*12 # head over spill model\n",
+ "\n",
+ "print \"Maximum head over crest = \",round(h,2),\"ft\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum discharge, Qm = 5.65685425 cfs\n",
+ "Maximum head over crest = 4.74 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter7.ipynb b/Fluid_Mechanics/Chapter7.ipynb
new file mode 100755
index 00000000..baafd643
--- /dev/null
+++ b/Fluid_Mechanics/Chapter7.ipynb
@@ -0,0 +1,367 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:efc6f8f4cd32e5126c4de163e157356596c0806f949ff4295acc9cf31cf6d207"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Fluid Resistance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.1 Page no 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "nu1 = 0.804*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "V = 0.3 # velocity in m/s\n",
+ "\n",
+ "D = 0.02 # diameter in m/s\n",
+ "\n",
+ "\n",
+ "rho = 995.7 # density in kg/m**3\n",
+ "\n",
+ "\n",
+ "mu = 8620*10**-4 # viscosity in Ns/m**2\n",
+ "\n",
+ "S = 1.26 # specific gravity\n",
+ "\n",
+ "nu2 = mu/(S*rho) # viscosity of glycerine in Ns/m**2\n",
+ "\n",
+ "\n",
+ "R1 = V*D/nu1\n",
+ "\n",
+ "print \"Reynolds number for water =\",round(R1,0)\n",
+ "\n",
+ "print \"R > 2000 the flow is turbulent for water\"\n",
+ "\n",
+ "print \"\\n\"\n",
+ "R2 = V*D/nu2\n",
+ "\n",
+ "print \"Reynolds number for glycerine =\",round(R2,1)\n",
+ "\n",
+ "print \"R < 2000 the flow is laminar for glycerine\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number for water = 7463.0\n",
+ "R > 2000 the flow is turbulent for water\n",
+ "\n",
+ "\n",
+ "Reynolds number for glycerine = 8.7\n",
+ "R < 2000 the flow is laminar for glycerine\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.2 Page no 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from scipy import *\n",
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "y = Symbol('y')\n",
+ "\n",
+ "d = 0.0175 # diameter in m\n",
+ "\n",
+ "s = 0.3 # shear stress at a distance in m\n",
+ "\n",
+ "tau = 103 # shear stress in Pa\n",
+ "\n",
+ "rho = 1000 # density in kg/m**3\n",
+ "\n",
+ "\n",
+ "\n",
+ "Up = diff(8.5+0.7*log(y),y)\n",
+ "\n",
+ "print Up\n",
+ "\n",
+ "Up = (0.7/0.3) # for y = 0.3\n",
+ "\n",
+ "k = sqrt(tau/(rho*s**2*Up**2))\n",
+ "\n",
+ "print \"Turbulence constant = \",round(k,2)\n",
+ "\n",
+ "Ml = k*s*100 # mixing length\n",
+ "\n",
+ "print \"Mixing length = \",round(Ml,1),\"cm\"\n",
+ "\n",
+ "Eta = rho*(Ml/100)**2*Up\n",
+ "\n",
+ "print \"Eddy viscosity =\",round(Eta,1),\"Nm/s**2\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.7/y\n",
+ "Turbulence constant = 0.46\n",
+ "Mixing length = 13.8 cm\n",
+ "Eddy viscosity = 44.1 Nm/s**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.3 Page no 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from pylab import plt\n",
+ "\n",
+ "from numpy import *\n",
+ "\n",
+ "from scipy import *\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "\n",
+ "\n",
+ "S = 1.26 # specific gravity \n",
+ "\n",
+ "mu = 0.862 # dynamic viscosity in Ns/m**2\n",
+ "\n",
+ "rho = S *1000 # density in kg/m**3\n",
+ "\n",
+ "K2 = 0.332\n",
+ "\n",
+ "V=1 # velocity in m/s\n",
+ "\n",
+ "\n",
+ "\n",
+ "x = [0,0.1,0.5,1.0,2.0];\n",
+ "\n",
+ "d = 0.1307*np.sqrt(x)*100\n",
+ "\n",
+ "tauo = K2*rho*V**2/(sqrt(1462)*np.sqrt(x))\n",
+ "\n",
+ "plt.plot(x, d, 'r')\n",
+ "plt.xlabel('x(m)')\n",
+ "plt.ylabel('delta(cm),tauo(N/m**2)')\n",
+ "\n",
+ "plt.plot(x, tauo, 'b')\n",
+ "plt.xlabel('x')\n",
+ "plt.legend('d''t')\n",
+ "plt.show()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.4 page no 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import numpy as np\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "from numpy import sqrt\n",
+ "\n",
+ "\n",
+ "rho = 1.197 # air density in kg/m**3\n",
+ "\n",
+ "mu = 18.22*10**-6 # viscosity in Ns/m**2\n",
+ "\n",
+ "l = 5 # length of the plate\n",
+ "\n",
+ "V = 8 # velocity in m/s\n",
+ "\n",
+ "Rec = 5*10**5 # crictical reynolds number\n",
+ "\n",
+ "l1 = 0.951 # length from 0 to 0.951\n",
+ "\n",
+ "l2 = 5.0 # length from 0 to 5\n",
+ "\n",
+ "l3 = 0.951 # length from 0 to 0.951\n",
+ "\n",
+ "\n",
+ "X = Rec/525576\n",
+ "\n",
+ "x = [0,0.1,0.3,0.6,0.951];\n",
+ "\n",
+ "d = 0.0069*np.sqrt(x)*100\n",
+ "\n",
+ "plt.figure()\n",
+ "plt.plot(x, d, 'r')\n",
+ "plt.xlabel('x(m)')\n",
+ "plt.ylabel('delta(cm)')\n",
+ "plt.title('delta v/s x')\n",
+ "plt.legend('L')\n",
+ "plt.show()\n",
+ "\n",
+ "X1 = [0.951,1.5,2.0,2.5,3.0,4.0,5.0]\n",
+ "\n",
+ "Dt = 0.0265*np.power(X1,(4/5))*100\n",
+ "\n",
+ "plt.figure()\n",
+ "plt.plot(X1, Dt, 'g')\n",
+ "plt.xlabel('x(m)')\n",
+ "plt.ylabel('delta(cm)')\n",
+ "plt.title('delta v/s x')\n",
+ "plt.legend('T')\n",
+ "plt.show()\n",
+ "\n",
+ "Td = 0.664*sqrt(mu*rho*V**3*l1)+0.036*rho*V**2*l2*(mu/(rho*V*l2))**0.2-0.036*rho*V**2*l3*(mu/(rho*V*l3))**0.2\n",
+ "\n",
+ "print \"Total Drag = \",round(Td,3),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Drag = 0.595 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.5 Page no 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "from pylab import plt\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "d = 0.01 # doameter of sphere in m\n",
+ "\n",
+ "v = 0.05 # velocity in m/s\n",
+ "\n",
+ "S = 1.26 # specific gravity\n",
+ "\n",
+ "mu = 0.826 # kinematic viscosity in Ns/m**2\n",
+ "\n",
+ "rho = S*1000 # density\n",
+ "\n",
+ "\n",
+ "R = rho*v*d/mu\n",
+ "\n",
+ "\n",
+ "Cd = 35\n",
+ "\n",
+ "Fd = 0.5*Cd*rho*v**2*pi*d**2/4\n",
+ "\n",
+ "print \"Drag on the sphere = \",round(Fd,4),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drag on the sphere = 0.0043 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/Fluid_Mechanics/Chapter8.ipynb b/Fluid_Mechanics/Chapter8.ipynb
new file mode 100755
index 00000000..6972a7f7
--- /dev/null
+++ b/Fluid_Mechanics/Chapter8.ipynb
@@ -0,0 +1,358 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:74db613da6801f860dadcdbf59265a8239e5864c8922257a769d0c0fa0f7c4e0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Laminar Flow"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page no 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "P1 = 200 # Pressure at inlet in kPa\n",
+ "\n",
+ "P2 = 260 # Pressure at outlet in kPa\n",
+ "\n",
+ "d = 0.004 # diameter in m\n",
+ "\n",
+ "L = 8 # length of pipe in meters\n",
+ "\n",
+ "z = 6 # height of the pipe from the ground\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "mu = 19.1*10**-4 # viscosity of kerosene at 20 deg C\n",
+ "\n",
+ "S = 0.81 # specific gravity of kerosene\n",
+ "\n",
+ "rho = 1000 # density in kg/m**3\n",
+ "\n",
+ "\n",
+ "\n",
+ "p1 = (P1+g*z*S)*1000 # point 1\n",
+ "\n",
+ "p2 = (P2)*1000 # point 2\n",
+ "\n",
+ "\n",
+ "\n",
+ "Sp = -((p1-p2)/sqrt(L**2+z**2))\n",
+ "\n",
+ "r = d/2\n",
+ "\n",
+ "Tau_max = r*Sp/2\n",
+ "\n",
+ "print \"(a) Maximum shear stress =\",round(Tau_max,3),\"N/m**2\"\n",
+ "\n",
+ "\n",
+ "Vmax = r**2*Sp/(4*mu)\n",
+ "\n",
+ "print \"(b) Maximum velocity =\",round(Vmax,3),\"m/s\"\n",
+ "\n",
+ "\n",
+ "Q = pi*r**4*Sp/(8*mu)\n",
+ "\n",
+ "print \"(c) Discharge = \",round(Q,7),\"m**3/s\"\n",
+ "\n",
+ "\n",
+ "V = Vmax/2\n",
+ "\n",
+ "R = rho*V*d*S/mu\n",
+ "\n",
+ "print \"Reynolds number =\",round(R,0),\"is less than 2000, the flow is laminar and the calculations are valid\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Maximum shear stress = 1.232 N/m**2\n",
+ "(b) Maximum velocity = 0.645 m/s\n",
+ "(c) Discharge = 4.1e-06 m**3/s\n",
+ "Reynolds number = 547.0 is less than 2000, the flow is laminar and the calculations are valid\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example no 8.2 Page no 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "d = 0.02 # diameter of the pipe in m\n",
+ "\n",
+ "l = 30 # length of the pipe in m\n",
+ "\n",
+ "v = 0.1 # velocity in m/s\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "nu = 1.54*10**-6 # kinematic viscosity of water in m**2/s\n",
+ "\n",
+ "\n",
+ "R = v*d/nu\n",
+ "\n",
+ "print \"R = \",round(R,0),\"is lesss than 2000 , the flow is laminar\"\n",
+ "\n",
+ "f = 64/R # friction factor\n",
+ "\n",
+ "Hf = f*l*v**2/(2*g*d) # head loss due to friction\n",
+ "\n",
+ "H=Hf*100\n",
+ "\n",
+ "print \"Head loss = \",round(H,2),\"cm of water\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 1299.0 is lesss than 2000 , the flow is laminar\n",
+ "Head loss = 3.77 cm of water\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page no 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "S = 0.92 # specific gravity\n",
+ "\n",
+ "gma = S*62.4 # density in lbs/ft**3\n",
+ "\n",
+ "nu=0.0205 # viscosity in ft**2/s\n",
+ "\n",
+ "W = 50 # weight of oil\n",
+ "\n",
+ "d = 9 # diameter of the pipe in inches\n",
+ "\n",
+ "g = 32.2 # acceleration due to gravity in ft/s**2\n",
+ "\n",
+ "\n",
+ "Q = W*2000/(gma*3600) # discharge in ft**3/s\n",
+ "\n",
+ "A = pi*d**2/(4*144) # area of pipe\n",
+ "\n",
+ "V = Q*1000/(A) # velocity in ft/s\n",
+ "\n",
+ "R = V*0.75/(nu*1000) # Reynolds number\n",
+ "\n",
+ "print \"R =\",round(R,2),\"is less than 2000 and hence flow is laminar\"\n",
+ "\n",
+ "f = 64/R # friction factor\n",
+ "\n",
+ "Hf = (f*5280*(V/1000)**2)/(2*g*0.75)\n",
+ "\n",
+ "Hp = gma*Q*Hf/(550)\n",
+ "\n",
+ "print \"Horse power required to pump the oil = \",round(Hp,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 40.07 is less than 2000 and hence flow is laminar\n",
+ "Horse power required to pump the oil = 10.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page no 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "V = 50 # Volume in m**3\n",
+ "\n",
+ "d = 5 # diameter in m\n",
+ "\n",
+ "d1 = 0.1 # diameter of bore\n",
+ "\n",
+ "l = 10 # length of the tube\n",
+ "\n",
+ "t = 20*60 # time in seconds\n",
+ "\n",
+ "rho = 0.88 # density in g/cm**3\n",
+ "\n",
+ "H1 = 5 # height from the base in m\n",
+ "\n",
+ "A = pi*d**2/4\n",
+ "\n",
+ "a = pi*d1**2/4\n",
+ "\n",
+ "\n",
+ "\n",
+ "H2 = H1-(V/A)\n",
+ "\n",
+ "mu = t*rho*a*(0.1)*98.1/(32*A*10*log(H1/H2))\n",
+ "\n",
+ "print \"Viscosity of the liquid =\",round(mu,4),\"poise\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Viscosity of the liquid = 0.0182 poise\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.5 Page no 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "S = 0.81 # specific gravity of oil\n",
+ "\n",
+ "mu = 4*10**-5 # viscosity of oil in lb.s/ft**2\n",
+ "\n",
+ "gma = 62.4*S # density in lbs/ft**3\n",
+ "\n",
+ "p1 = 6.51 # pressure at point 1 in psia\n",
+ "\n",
+ "p2 = 8 # pressure at point 2 in psia\n",
+ "\n",
+ "h = 0.006 # distance between the plate in ft\n",
+ "\n",
+ "l = 4 # length of the plate in ft\n",
+ "\n",
+ "theta = pi/6 # angle of inclination\n",
+ "\n",
+ "\n",
+ "\n",
+ "P1 = p1*144 + gma*l*sin(theta)\n",
+ "\n",
+ "\n",
+ "P2 = p2*144\n",
+ "\n",
+ "\n",
+ "Sp = (P2-P1)/4\n",
+ "\n",
+ "\n",
+ "y = h\n",
+ "\n",
+ "\n",
+ "q = (2154.75*y**2/2) - (359125*y**3/3)\n",
+ "\n",
+ "print \"Discharge q = \",round(q,3),\"per unit ft of the plate\"\n",
+ "\n",
+ "\n",
+ "dV = 2154.75 - 718250*h\n",
+ "\n",
+ "\n",
+ "T = -mu*dV\n",
+ "\n",
+ "print \"Shear stress on the plate = \",round(T,3),\"lbs/ft**2 and resisting the motion of the plate\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge q = 0.013 per unit ft of the plate\n",
+ "Shear stress on the plate = 0.086 lbs/ft**2 and resisting the motion of the plate\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/Chapter9.ipynb b/Fluid_Mechanics/Chapter9.ipynb
new file mode 100755
index 00000000..503ee70d
--- /dev/null
+++ b/Fluid_Mechanics/Chapter9.ipynb
@@ -0,0 +1,799 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:81c0a87082bc2a398c522de3be6bcb735589adaa60c31ff7051c7c79b83652d0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Turbulent flow in Pipes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page no 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "S = 1.26 # specific gravity\n",
+ "\n",
+ "mu = 0.826 # kinematic viscosity in Ns/m**2\n",
+ "\n",
+ "\n",
+ "rho = 998 # density of water in kg/m**3\n",
+ "\n",
+ "mu1 = 1.005*10**-3 # viscosity in Ns/m**2\n",
+ "\n",
+ "\n",
+ "rho1 = S*rho # density of glycerine in kg/m**3\n",
+ "\n",
+ "Q = 0.1 # discharge in m**3/s\n",
+ "\n",
+ "d1 = 0.2 # diameter in m\n",
+ "\n",
+ "A = pi*d1**2/4 # area in m**2\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "l =100 # length of the pipe\n",
+ "\n",
+ "\n",
+ "V = Q/A\n",
+ "\n",
+ "R = rho1*V*d1/mu\n",
+ "\n",
+ "print \"It is a laminar flow\"\n",
+ "\n",
+ "f = 64/R # friction factor\n",
+ "\n",
+ "Hf = f*l*V**2/(2*g*d1) # head loss due to friction\n",
+ "\n",
+ "print \"(a) Head loss due to flow for glycerine =\",round(Hf,1),\"m \"\n",
+ "\n",
+ "R1 = rho*V*d1/mu1\n",
+ "\n",
+ "print \"The flow is turbulent\"\n",
+ "\n",
+ "e = 0.025\n",
+ "\n",
+ "r = e/(d1*100)\n",
+ "\n",
+ "f = 0.021\n",
+ "\n",
+ "hf = f*l*V**2/(2*g*d1)\n",
+ "\n",
+ "print \"(a) Head loss due to flow for water =\",round(hf,2),\"m \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "It is a laminar flow\n",
+ "(a) Head loss due to flow for glycerine = 17.1 m \n",
+ "The flow is turbulent\n",
+ "(a) Head loss due to flow for water = 5.42 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page no 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "\n",
+ "nu = 1.007*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "e = 0.025 # for cast iron in cm\n",
+ "\n",
+ "L = 100 # length of the pipe in m\n",
+ "\n",
+ "D = 0.2 # diameter in m\n",
+ "\n",
+ "hf = 5.43 # head loss due to friction\n",
+ "\n",
+ "r = e/(D*100)\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "A = sqrt(2*g*D*hf/L)\n",
+ "\n",
+ "B = D/nu\n",
+ "\n",
+ "f = 0.021 # from moodys diagram\n",
+ "\n",
+ "V = A/sqrt(f)\n",
+ "\n",
+ "print V\n",
+ "\n",
+ "R = B*f\n",
+ "\n",
+ "A = pi*D**2/4\n",
+ "\n",
+ "Q = A*V\n",
+ "\n",
+ "print \"Discharge =\",round(Q,2),\"m**3/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3.1853324563\n",
+ "Discharge = 0.1 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page no 314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "Q =0.1 # discharge in m**3/s\n",
+ "\n",
+ "hf = 5.43 # friction loss head in m\n",
+ "\n",
+ "L = 100 # length of pipe\n",
+ "\n",
+ "nu = 1.00*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "e = 0.025 # for cast iron in cm\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "A = 8*L*Q**2/(hf*g*pi**2)\n",
+ "\n",
+ "B = 4*Q/(pi*nu)\n",
+ "\n",
+ "D = 0.172\n",
+ "\n",
+ "r = e/D\n",
+ "\n",
+ "Re = B/D\n",
+ "\n",
+ "f = 0.022 # for Re and r\n",
+ "\n",
+ "\n",
+ "D1 = 0.199\n",
+ "\n",
+ "r1 = e/D1\n",
+ "\n",
+ "R = B/D1\n",
+ "\n",
+ "f = 0.021 # for R and r\n",
+ "\n",
+ "print \"Hence the convergence is attained, D=\",round(D1,1),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hence the convergence is attained, D= 0.2 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page no 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "L = 500 # length of the pipe in ft\n",
+ "\n",
+ "D= 9*2.54/100 # diameter in cm\n",
+ "\n",
+ "C = 100 # constant\n",
+ "\n",
+ "S = 0.004\n",
+ "\n",
+ "\n",
+ "Hf = S*L\n",
+ "\n",
+ "print \"Head loss =\",round(Hf,0),\"ft\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head loss = 2.0 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.5 Page no 319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "Q = 0.1 # water flow rate in m**3/s\n",
+ "\n",
+ "d = 30 # diameter in m\n",
+ "\n",
+ "l = 500 # length in m\n",
+ "\n",
+ "e = 0.025 # for cast iron\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "r = log(d/e,10)\n",
+ "\n",
+ "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.3)**(2.5)\n",
+ " \n",
+ "S = (Q/K)**2\n",
+ "\n",
+ "hf = S*l\n",
+ "\n",
+ "print \"Head loss of water =\",round(hf,1),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head loss of water = 3.2 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page no 319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "Q = 0.1 # water flow rate in m**3/s\n",
+ "\n",
+ "d = 20 # diameter in cm\n",
+ "\n",
+ "l = 500 # length in m\n",
+ "\n",
+ "e = 0.025 # for cast iron\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "S = 5.43 \n",
+ "\n",
+ "\n",
+ "r = log(d/e,10)\n",
+ "\n",
+ "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.2)**2.5\n",
+ "\n",
+ "Q=K*sqrt(S/100)\n",
+ "\n",
+ "print \"Head loss of water =\",round(Q,2),\"m**3/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head loss of water = 0.1 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.7 Page no 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "eps = 0.025*10**-2 # for cast iron epsilon = 0.0025 cm\n",
+ "\n",
+ "\n",
+ "\n",
+ "D = 0.2 # value in m\n",
+ "\n",
+ "g = 9.81\n",
+ "\n",
+ "\n",
+ "K = (pi/4)*sqrt(2*g)*(2*log10(D/(eps))+1.14)*D**(2.5)\n",
+ "\n",
+ "print \"K = \",round(K,3),\" from trial and error\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "K = 0.432 from trial and error\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.8 Page no 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "d = 0.1 # diameter of the pipe\n",
+ "\n",
+ "Q= 0.075 # discharge in m**3/s\n",
+ "\n",
+ "L = 30 # length in m\n",
+ "\n",
+ "A = pi*d**2/4\n",
+ "\n",
+ "g = 9.81 # acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\n",
+ "nu = 1.007*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "e = 0.025\n",
+ "\n",
+ "r = e/(10*d)\n",
+ "\n",
+ "\n",
+ "V = Q/A\n",
+ "\n",
+ "Re = V*d/nu\n",
+ "\n",
+ "f = 0.025 # firction factor from moodys diagram\n",
+ "\n",
+ "hf = f*L*V**2/(2*g*d) \n",
+ "\n",
+ "K= 0.5 # contraction constant\n",
+ "\n",
+ "hc = K*V**2/(2*g) \n",
+ "\n",
+ "K1 =10 # loss of the globe valve\n",
+ "\n",
+ "hg = K1*V**2/(2*g)\n",
+ "\n",
+ "Th = hf+hc+hg\n",
+ "\n",
+ "print \"Total head loss =\",round(Th,1),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total head loss = 83.7 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.9 Page no 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "\n",
+ "nu = 1.007*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "d1 = 0.3 # diameter of pipe 1 in m\n",
+ "\n",
+ "d2 = 0.15 # diameter of pipe 2 in m\n",
+ "\n",
+ "d3 = 0.08 # diameter of pipe 3 in m\n",
+ "\n",
+ "g = 9.81 # acclelration due to gravity in m/s**2\n",
+ "\n",
+ "e = 0.025 # for cast iron\n",
+ "\n",
+ "f1 = 0.019 # foe e/d1\n",
+ "\n",
+ "f2 = 0.022 # foe e/d2\n",
+ "\n",
+ "\n",
+ "V3 = sqrt(2*g*100/((8.4*(f1)+268.85*(f2)+4.85)))\n",
+ "\n",
+ "V1 = (d3/d1)**2*V3\n",
+ "\n",
+ "V2 = (d3/d2)**2*V3\n",
+ "\n",
+ "\n",
+ "R1 = V1*d1/nu\n",
+ "\n",
+ "R2 = V2*d2/nu\n",
+ "\n",
+ "Q = V3*pi*d3**2/4\n",
+ "\n",
+ "print \"Discharge through the pipe =\",round(Q,3),\"m**3/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge through the pipe = 0.067 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.10 Page no 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "D = 0.2 # diameter of pipe 1\n",
+ "\n",
+ "D1 = 0.15 # diameter of pipe 2\n",
+ "\n",
+ "Q = 0.1 # discharge in m**3/s\n",
+ "\n",
+ "nu = 1.007*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "e = 0.025 # e for cast iron\n",
+ "\n",
+ "r = e/(100*D) \n",
+ "\n",
+ "\n",
+ "V = Q/(pi*(0.2)**2/4)\n",
+ "\n",
+ "R = V*D/nu\n",
+ "\n",
+ "f = 0.021 # from moodys law\n",
+ "\n",
+ "r2 = e/D1\n",
+ "\n",
+ "V1 = Q/(pi*D1**2/4)\n",
+ "\n",
+ "R1 = V*D1/nu\n",
+ "\n",
+ "f2 = 0.023 # from moodys law\n",
+ "\n",
+ "L2 = 28562*D1**5/f2\n",
+ "\n",
+ "print \"Replacement of the flow system =\",round(L2,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Replacement of the flow system = 94.3 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.11 Page no 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "e = 0.025 # in cm\n",
+ "\n",
+ "nu = 1.007*10**-6 # viscosity in m**2/s\n",
+ "\n",
+ "Q1 = 0.5 # discharge in m**3/s\n",
+ "\n",
+ "D1 = 50\n",
+ "\n",
+ "L1 = 500 # length in m\n",
+ "\n",
+ "g = 9.81\n",
+ "\n",
+ "\n",
+ "r1 = e/D # r1 for pipe 1\n",
+ "\n",
+ "V1 = Q1/(pi*(0.5)**2/4)\n",
+ "\n",
+ "R = V*(0.5)/nu\n",
+ "\n",
+ "f1 = 0.018 # for the reynolds no\n",
+ "\n",
+ "hf1 = f*L1*V1**2/(2*g*D1)\n",
+ "\n",
+ "\n",
+ "hf2 = hf1\n",
+ "\n",
+ "L2 =200 # length in m\n",
+ "\n",
+ "D2 = 0.3 # diameter in m\n",
+ "\n",
+ "r2 = e/D2\n",
+ "\n",
+ "f2 = 0.02 \n",
+ "\n",
+ "V2 = 0.419/sqrt(f2) \n",
+ "\n",
+ "R2 = V2*D2/nu\n",
+ "\n",
+ "Q2 = V2*(pi*D2**2/4)\n",
+ "\n",
+ "\n",
+ "hf3=hf1\n",
+ "\n",
+ "L3 = 300 # length of pipe 3 in m\n",
+ "\n",
+ "D3 =0.15 # diameter of pipe 3 in m\n",
+ "\n",
+ "r3 = e/D3 \n",
+ "\n",
+ "f = 0.022 # from moody's law\n",
+ "\n",
+ "V3 = 0.242/sqrt(f2)\n",
+ "\n",
+ "R3 = V3*D3/nu\n",
+ "\n",
+ "Q3 = V3*(pi*D3**2/4)\n",
+ "\n",
+ "Td = Q1+Q2+Q3\n",
+ "\n",
+ "q1 = Q1*(2.0/Td)\n",
+ "\n",
+ "q2 = Q2*(2.0/Td)\n",
+ "\n",
+ "q3 = Q3*(2.0/Td)\n",
+ "\n",
+ "print \"Discharge through branch 1 =\",round(q1,2),\"m**3/s\"\n",
+ "\n",
+ "print \"Discharge through branch 2 =\",round(q2,3),\"m**3/s\"\n",
+ "\n",
+ "print \"Discharge through branch 3 =\",round(q3,3),\"m**3/s\"\n",
+ "\n",
+ "\n",
+ "d = 0.5\n",
+ "\n",
+ "v1 = q1/(pi*(d)**2/4)\n",
+ "\n",
+ "R4 = v1*d/nu\n",
+ "\n",
+ "r4 = 0.0005 # ratio of e/D\n",
+ "\n",
+ "f = 0.018\n",
+ "\n",
+ "Hf1 = f*L1*v1**2/(2*g*d)\n",
+ "\n",
+ "print \"It is found that hf1=hf2=hf3 =\",round(Hf1,1),\"The distribution od discharge is correct\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge through branch 1 = 1.35 m**3/s\n",
+ "Discharge through branch 2 = 0.566 m**3/s\n",
+ "Discharge through branch 3 = 0.082 m**3/s\n",
+ "It is found that hf1=hf2=hf3 = 43.5 The distribution od discharge is correct\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.14 Page no 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import *\n",
+ "\n",
+ "\n",
+ "e = 0.00015 # from moody's chart\n",
+ "\n",
+ "D = 2 # depth in ft\n",
+ "\n",
+ "r = e/D\n",
+ "\n",
+ "z1 = 100 # elevation in ft\n",
+ "\n",
+ "mu = 1.084*10**-5 # viscosity in Ns/ft**2\n",
+ "\n",
+ "p1 = 34 # pressure head in ft\n",
+ "\n",
+ "p2 = 10 # pressure head in ft\n",
+ "\n",
+ "g = 32.2 # acclelration due to gravity in ft/s**2\n",
+ "\n",
+ "L = 1000 # length in ft\n",
+ "\n",
+ "\n",
+ "f = 0.011 # assume\n",
+ "\n",
+ "V = sqrt(100/(10000/(2*2*g)))/sqrt(f)\n",
+ "\n",
+ "R = V*D/mu\n",
+ "\n",
+ "V1 = 10.15\n",
+ "\n",
+ "f1 = 0.0125\n",
+ "\n",
+ "Q = V1*pi*D**2/4\n",
+ "\n",
+ "x = p1-p2-(V1**2/(2*g))-(f1*L*V1**2/(2*g*D))\n",
+ "\n",
+ "Dp = 30 - x\n",
+ "\n",
+ "print \"Minimum depth =\",round(Dp,2),\"ft\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum depth = 17.6 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Mechanics/README.txt b/Fluid_Mechanics/README.txt
new file mode 100755
index 00000000..8c978256
--- /dev/null
+++ b/Fluid_Mechanics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Rahul Joshi
+Course: mtech
+College/Institute/Organization: IIT Bombay
+Department/Designation: Mechanical Engineering
+Book Title: Fluid Mechanics
+Author: Irfan A. Khan
+Publisher: Holt, Rinehart and Winston, The Dryden Press , Saunders College Publishing
+Year of publication: 1987
+Isbn: 0-03-071473-7
+Edition: 1st Edition \ No newline at end of file
diff --git a/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png b/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png
new file mode 100755
index 00000000..03ac1d9d
--- /dev/null
+++ b/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png
Binary files differ
diff --git a/Fluid_Mechanics/screenshots/plot1.png b/Fluid_Mechanics/screenshots/plot1.png
new file mode 100755
index 00000000..caf0a78f
--- /dev/null
+++ b/Fluid_Mechanics/screenshots/plot1.png
Binary files differ
diff --git a/Fluid_Mechanics/screenshots/plot2.png b/Fluid_Mechanics/screenshots/plot2.png
new file mode 100755
index 00000000..35633e7f
--- /dev/null
+++ b/Fluid_Mechanics/screenshots/plot2.png
Binary files differ
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_1_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_1_1.ipynb
index c3d00505..c3d00505 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_1_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_1_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_2_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_2_1.ipynb
index 72318a60..72318a60 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_2_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_2_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_3_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_3_1.ipynb
index 047caec2..047caec2 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_3_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_3_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_4_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_4_1.ipynb
index 7c5078a5..7c5078a5 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_4_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_4_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_5_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_5_1.ipynb
index 19f3f7be..19f3f7be 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_5_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_5_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_6_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_6_1.ipynb
index 28a995b9..28a995b9 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_6_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_6_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_7_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_7_1.ipynb
index eff449e4..eff449e4 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_7_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_7_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_8_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_8_1.ipynb
index 3d67d746..3d67d746 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_8_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_8_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_9_1.ipynb b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_9_1.ipynb
index 3a6f5367..3a6f5367 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_9_1.ipynb
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/Chapter_9_1.ipynb
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/README.txt b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/README.txt
index b57e0716..b57e0716 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/README.txt
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/README.txt
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depth-flowrate.png b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depth-flowrate.png
index e85b8097..e85b8097 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depth-flowrate.png
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depth-flowrate.png
Binary files differ
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depthvsflow.png b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depthvsflow.png
index 1d38c57b..1d38c57b 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depthvsflow.png
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/depthvsflow.png
Binary files differ
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/flowrate.png b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/flowrate.png
index d575416e..d575416e 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/flowrate.png
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/flowrate.png
Binary files differ
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/rateofflowandvlo.png b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/rateofflowandvlo.png
index 61d23fcb..61d23fcb 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/rateofflowandvlo.png
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/rateofflowandvlo.png
Binary files differ
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump.png b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump.png
index cd02ffae..cd02ffae 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump.png
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump.png
Binary files differ
diff --git a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump_1.png b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump_1.png
index 8c8fb178..8c8fb178 100644..100755
--- a/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump_1.png
+++ b/Fluid_Mechanics_-_Worked_Examples_For_Engineers/screenshots/system&pump_1.png
Binary files differ
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_10.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_10.ipynb
new file mode 100755
index 00000000..83a710ec
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_10.ipynb
@@ -0,0 +1,67 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3d71fc1cf7c62e68f0f9134ed53e2d1461bd07ccc001344fd0d06803f2676584"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chapter 10 : Valves <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 10.1 Page No 225 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Q=30.0 #gpm flow rate\n",
+ "dp=300.0 #pressure drop lbf/in^2\n",
+ "Sg=0.85 #density\n",
+ "Cv=5.41 #Flow coefficient\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Cv1=Q/(math.sqrt(dp/Sg)) \n",
+ "dp1=Sg*Q**2/Cv**2\n",
+ "\n",
+ "#RESULTS\n",
+ "print('\\n Flow coefficient = %.3f gpm ' %Cv1)\n",
+ "print('\\n Pressure drop = %.3f psi ' %dp1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Flow coefficient = 1.597 gpm \n",
+ "\n",
+ " Pressure drop = 26.138 psi \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_11.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_11.ipynb
new file mode 100755
index 00000000..1d8b9368
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_11.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:61d4ab1a97743a659c566a2eb33a4c42c8a0663679f30d0a243310539a4ede57"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chapter No 11: Seals and packings <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 11.1, Page No 269 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "d=4.0 #in diameter\n",
+ "p=20.0 #percent\n",
+ "d1=0.140 #in cross section\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Gd=d-2.0*((100.0 -20.0)*d1 /100.0)\n",
+ "Gw=d1+2.0*(p*d1/100.0)\n",
+ "\n",
+ "#RESULTS\n",
+ "print(' Groove diameter = %.3f in ' %Gd)\n",
+ "print(' \\n Groove width = %.3f in ' %Gw)\n",
+ "print('\\n outside diameter = %.3f in ' %d)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Groove diameter = 3.776 in \n",
+ " \n",
+ " Groove width = 0.196 in \n",
+ "\n",
+ " outside diameter = 4.000 in "
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 11.2 Page NO 272 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "D=2.0 #in diameter\n",
+ "S=10.0 #in stroke\n",
+ "s=10000.0 #stroke in\n",
+ "V=231.0 #in^3 volume\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "di=(V/(S*s*D* math.pi))\n",
+ "\n",
+ "#RESULTS\n",
+ "print(' Thickness= %.6f in ' %di)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Thickness= 0.000368 in \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 11.3 Page No 277 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "d=0.275 #in diameter\n",
+ "p=15.0 #initial squeeze percent\n",
+ "p1=20.0 #increase in squeeze percent\n",
+ "p3=8.0 #reduction in squeeze percent\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Fs=(d*p/100.0)+(d*p1/100.0)-(d*p3 /100.0)\n",
+ "Fs1= Fs *100.0/ d\n",
+ "\n",
+ "#RESULTS\n",
+ "print('\\n final available squeeze = %.3f percent' %Fs1 )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " final available squeeze = 27.000 percent"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_12.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_12.ipynb
new file mode 100755
index 00000000..4ba37f47
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_12.ipynb
@@ -0,0 +1,281 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e47b17659a986113237b599864f0f5038d52353b8973503557033e3de92c3ae9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 12 : System components <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 12.1 Page No 290 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "t=4.0 #hr time\n",
+ "Ihp=8.0 #ihp power\n",
+ "Ohp=5.0 #hp power\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Hl=t*2544.0*(Ihp-Ohp)\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Total Btu heat loss over a period of 4 hr = %.3f Btu ' %Hl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Total Btu heat loss over a period of 4 hr = 30528.000 Btu "
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 12.2 Page No 292 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "t=1.0 #sec time\n",
+ "P=1000.0 #lbf/in^2 pressure \n",
+ "Q=3.0 #gpm flow rate\n",
+ "Sg=0.85 # density\n",
+ "s=0.42\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "H=42.4*((P*Q)/1714) #Heat Generation Rate\n",
+ "m=8.34*Q*Sg #mass flow Rate\n",
+ "Tr=H/(m*s)\n",
+ "\n",
+ "#RESULTS\n",
+ "print(' Rise in temperature of the fluid = %.2f F' %Tr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Rise in temperature of the fluid = 8.31 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 12.3 Page No 296 <h3> "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P=1500.0 #lbf/in^2 pressure\n",
+ "d=12.0 #in diameter\n",
+ "V=50.0 #gal volume\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "F=P*(math.pi*d**2/4)\n",
+ "S=V*231.0*4.0/(math.pi*d**2)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Weight = %.3f lbf ' %F)\n",
+ "print('\\n Stroke length = %.3f in ' %S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight = 169646.003 lb \n",
+ "\n",
+ " Stroke length = 102.124 in "
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 12.4 Page No 298 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P=1500.0 #lbf/in^2 pressure\n",
+ "V=5.0 #gal volume\n",
+ "P1=3000.0 #lbf/in^2 pressure\n",
+ "P2=2000.0 #lbf/in^2 pressure\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "V2=V*231.0*(P2+14.7)/(P1-P2)\n",
+ "V1=V2*(P1+14.7)/((P+14.7)*231.0)\n",
+ "\n",
+ "#RESULT\n",
+ "print('\\n Size of accumulator = %.3f gal ' %V1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Size of accumulator = 20.049 gal "
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 12.5 Page No 300 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "beta=1.4\n",
+ "p3=2000.0+14.7 #non guage presure\n",
+ "p2=3000.0+14.7 #non guage presure\n",
+ "p1=1500.0+14.7 #non guage presure\n",
+ "deltav=1155.0\n",
+ "\n",
+ "#Calculations\n",
+ "v2=(p3/p2)**(1/beta)*(deltav)/(1-(p3/p2)**(1/beta))\n",
+ "v1=v2*(p2/p1)**(1/beta)\n",
+ "perdiff=(v1-4627.25)*100.0/v1\n",
+ "\n",
+ "#Results\n",
+ "print(' Volume 2 = %.3f in^3' %v2)\n",
+ "print(' \\n Volume 1 = %.3f in^3' %v1)\n",
+ "print(' \\n Percentage difference in volume = %.3f percent' %perdiff )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Volume 2 = 3462.278 in^3\n",
+ " \n",
+ " Volume 1 = 5660.756 in^3\n",
+ " \n",
+ " Percentage difference in volume = 18.257 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 12.6 Page No 305 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Fr=20.0 #gpm flowrate\n",
+ "P=2500.0 #lbf/in^2 pressure\n",
+ "sf=4.0 #safety factor\n",
+ "Ts=55000.0 #lbf/in^2 pressure\n",
+ "V=15.0 #ft/s velocity\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "A=Fr*0.3208/V\n",
+ "ID=2.0*math.sqrt(A/math.pi)\n",
+ "Wt=P*ID/(2*(Ts-P))\n",
+ "Wt1=Wt*sf\n",
+ "\n",
+ "#RESULT\n",
+ "print('Wall thcikness = %.3f in ' %Wt1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wall thcikness = 0.070 in "
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_13.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_13.ipynb
new file mode 100755
index 00000000..d8f9b1f3
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_13.ipynb
@@ -0,0 +1,30 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "<h3>No examples in this chapter</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_14.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_14.ipynb
new file mode 100755
index 00000000..6909d7dd
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_14.ipynb
@@ -0,0 +1,285 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:251fa751d76e0f33020a23b4f02af4b2cc97d384648ba729ca3ce134685988be"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chapter No 14 :Troubleshooting Hydraulic systems<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.1 Page No 386 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "p=1800 #lbf/in^2 pressure\n",
+ "Vd=1.5 #in^3/rev displacement\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T=0.013*p*Vd\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The breakway torque = %.2f lbf-ft' %T)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The breakway torque = 35.10 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.2, Page No 386 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "T=80 #lbf-ft torque\n",
+ "Vd=3.5 #in^3/rev displacement\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "P=(T/(0.013*Vd))*(1/0.75)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The min pressure = %.2f lbf/in^2' %P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The min pressure = 2344.32 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.3, Page No 389 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "N=1200 #rev/min theotrical power\n",
+ "Vd=0.75 #in^3/rev displacement\n",
+ "Vd2=0.57\n",
+ "#CALCULATIONS\n",
+ "# part a\n",
+ "Q=(Vd*N)/231\n",
+ "# part b\n",
+ "Qa=Q-0.50\n",
+ "N2=(231*Qa)/Vd2\n",
+ "ev=(Qa/Q)*100\n",
+ "#RESULTS\n",
+ "print('The flow from the pump = %.2f lbf/in^2' %Qa)\n",
+ "print('The actual speed of the motor = %.2f rev/min' %N2)\n",
+ "print('The Volumetric efficiency of the system = %.2f percent' %ev)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flow from the pump = 3.40 lbf/in^2\n",
+ "The actual speed of the motor = 1376.32 rev/min\n",
+ "The Volumetric efficiency of the system = 87.17 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.4, Page No 390 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "Q=3.9 #gal/min flow rate\n",
+ "Sg=0.87 # density\n",
+ "Ac=4.9 #in^2 area\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Qa=0.872*Q\n",
+ "Vrod=Qa/(0.26*Ac)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The Velocity = %.2f in/sec' %Vrod)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Velocity = 2.67 in/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.5, Page No 390 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "Q=10.0 #gal/min flow rate\n",
+ "P=1500 #lbf/in^2 pressure\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Fhp=((P*Q)/1714)*0.25\n",
+ "A=Fhp/(0.001*75)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The area is = %.2f ft^2' %A)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The area is = 29.17 ft^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.6, Page No 391<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "A=15.0 #ft^2 area\n",
+ "HP=0.25*5 # power\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T=(HP/(0.001*A))+75\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The temparature is = %.2f F' %T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temparature is = 158.33 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.7, Page No 392 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "A=100 #ft^2 area\n",
+ "T=40 #F temperature \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "q=2.545*A*T\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The heat that should be dissipated is = %.2f Btu/hr' %q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat that should be dissipated is = 10180.00 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_15.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_15.ipynb
new file mode 100755
index 00000000..06bfac96
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_15.ipynb
@@ -0,0 +1,229 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:218eef76eba5bc112a5af1f09e9dfcdb3c88be276a9fda8b85e2aab7235b5119"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 15 : Basics of Pneumatics <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 15.1 Page No 405 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "V1=20.0 #gal volume\n",
+ "P1=20.0 #lbf/in^2 pressure\n",
+ "n=2.0\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "V2=V1/n\n",
+ "P2=(P1+14.7)*V1*231.0/(V2*231.0)\n",
+ "P3=P2-14.7\n",
+ "\n",
+ "#RESULT\n",
+ "print('Guage pressure = %.3f psi ' %P3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Guage pressure = 54.700 psi \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 15.2 Page No 406 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "V1=1500.0 #in^3 volume\n",
+ "T=80.0 #F temperature\n",
+ "T1=200.0 #F temperature\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "V2=V1*(460.0+T1)/(T+460.0)\n",
+ "\n",
+ "#RESULT\n",
+ "print('Volume the heated gas will occupy = %.3f in ^3 ' %V2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume the heated gas will occupy = 1833.333 in ^3 "
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 15.3 Page No 406 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P1=2000.0 #in^3\n",
+ "T=80.0 #F temperature\n",
+ "T1=250.0 #F temperature\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "P2=(P1+14.7)*(460.0+T1)/(T+460.0)\n",
+ "P3=P2-14.7\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Guage pressure = %.3f psi ' %P3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Guage pressure = 2634.257 psi "
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 15.4 Page No 407 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P1=2000.0 #lbf/in^2 pressure\n",
+ "V1=1500.0 #in^3 volume\n",
+ "T2=250.0 #F temperature\n",
+ "T1=75.0 #F temperature\n",
+ "V2=1000.0 #in^3 volume\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "P2=(P1+14.7)*V1*(T2+460.0)/((T1+460.0)*V2)\n",
+ "P3=P2-14.7\n",
+ "#RESULT\n",
+ "print('\\n Guage pressure = %.3f psi ' %P3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Guage pressure = 3995.871 psi \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 15.5 Page No 409 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "s=10.0 #stroke in\n",
+ "d=2.0 #in diameter\n",
+ "r=40.0 #cpm cycles per rate\n",
+ "P1=80.0 #lbf/in^2 pressure\n",
+ "Ps1=552+101 #kN/m^2 pressure\n",
+ "Ps2=101 #kN/m^2 pressure\n",
+ "#CALCULATIONS\n",
+ "V1=math.pi*d**2*s*r/(4*1728.0)\n",
+ "V2=(P1+14.7)*V1/14.7\n",
+ "# In SI units\n",
+ "Vs1=(20.3*25.4*r)/(1000000)\n",
+ "Vs2=(Ps1*Vs1)/Ps2\n",
+ "#RESULT\n",
+ "print(' Air consumption in cfm of free air = %.3f cfm free air ' %V2)\n",
+ "print(' In SI units Air consumption in cfm of free air = %.3f m^3/min free air ' %Vs2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Air consumption in cfm of free air = 4.685 cfm free air \n",
+ " Air consumption in cfm of free air = 0.133 cfm free air \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_16.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_16.ipynb
new file mode 100755
index 00000000..990ae2bf
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_16.ipynb
@@ -0,0 +1,290 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1752ce8abd4db43dc9301d3a391f312646e1e708eed7ee0a80cbc87acc9e9b2d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter No 16 : Sizing Pneumatic systems <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.1, Page No 422<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "L=500 #ft length\n",
+ "d=47.2561 #diameter in\n",
+ "Q=650 # ft^3/min\n",
+ "T=40 #F Temperature \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "CR=(250+14.7)/14.7\n",
+ "Pf=(0.1025*L*(Q*1/60)*(Q*1/60))/(CR*d)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The the pressure drop is = %.2f lbf/in^2' %Pf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The the pressure drop is = 6.02 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.2, Page No 423<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "L=(8*5.2)+(2*59)+(1*10.3) #ft length\n",
+ "C=0.1025 # Experimental coefficient\n",
+ "d=47.2561 # internal diameter\n",
+ "Q=500.0 # ft^3/min free air \n",
+ "CR=4.4 # ratio of compression of pipe\n",
+ "\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "\n",
+ "Pf=(C*L*((Q*1/60)*(Q*1/60)))/(CR*d)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The the pressure drop is = %.2f lbf/in^2' %Pf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The the pressure drop is = 5.82 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.3, Page No 433 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "#CALCULATIONS\n",
+ "T=60+(0.25*60) #total air consumption ft^3/min\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The total air consumption = %.2f ft^3/min' %T)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total air consumption = 75.00 ft^3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.4, Page No 434 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Qr=10 #ft^3/min consumption rate\n",
+ "t=5 #time min\n",
+ "p1=125 #lbf/in^2 pressure\n",
+ "p2=100 #lbf/in^2 pressure\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Vr=(14.7*Q*t)/(p1-p2)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The size of the receiver = %.2f ft^3' %Vr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The size of the receiver = 29.40 ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.5, Page No 444 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=35 #ft^3/min consumption rate\n",
+ "t=540 #time min\n",
+ "p1=90+14.7 #presure lbf/in^2\n",
+ "p2=80+14.7 # pressure lbf/in^2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "K=(p1+p2)/2\n",
+ "Cv=(Q/22.67)*(math.sqrt(t/((p1-p2)*K)))\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The size of the air valve = %.2f ' %Cv)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The size of the air valve = 1.14 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.7, Page No 448 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=35 #ft^3/min consumption rate\n",
+ "V1=0.327 #volume ft^3/min\n",
+ "p1=104.7 #presure lbf/in^2\n",
+ "p2=14.7 #pressure lbf/in^2\n",
+ "d=3 #in diameter\n",
+ "#CALCULATIONS\n",
+ "A=(3.14*(d*d)/4\n",
+ "Q=((A*4)/1728)*20\n",
+ "V2=p1*V1/p2\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The free air consumption = %.2f ft^3/min' %V2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free air consumption = 2.33 ft^3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.8, Page No 451 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Fa=0.065 # free air ft^3/in\n",
+ "d=4 # stroke in\n",
+ "c=20 # cycle rate cycles/min\n",
+ "#CALCULATIONS\n",
+ "Qv=(Fa*d*c)/2\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The free air consumption = %.2f ft^3/min' %Qv)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free air consumption = 2.60 ft^3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_2.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_2.ipynb
new file mode 100755
index 00000000..0861593c
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_2.ipynb
@@ -0,0 +1,428 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:27338db4766b4c1985ad23f02bae5de155caa330da171300335b58c2d2835845"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chpater No 2: Basics of Hydraulics<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.1, Page No 23 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "W=1000.0 #weight lbf\n",
+ "D=1.25 #distance ft\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Work=W*D\n",
+ "#IN SI unit\n",
+ "W=4448 #weight N\n",
+ "D=0.381 #distance m\n",
+ "Work1=W*D\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The work from the system would be = %.2f ft-lbf' %Work)\n",
+ "print('The work from the system in SI unit would be = %.2f m-N' %Work1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work from the system would be = 1250.00 ft-lbf\n",
+ "The work from the system in SI unit would be = 1694.69 m-N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.2, Page No 24 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "F1=100.0 #Force lbf\n",
+ "F2=2000.0 #Force lbf\n",
+ "L2=12 #in\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "L11=L2*(F2/F1)\n",
+ "#IN SI unit\n",
+ "F1=444.8 #Force N\n",
+ "F2=8896.0 #Force N\n",
+ "L2=0.3048 #Force m\n",
+ "L12=L2*(F2/F1)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pump piston have to travel = %.2f in' %L11)\n",
+ "print('The pump piston have to travel = %.2f m' %L12)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pump piston have to travel = 240.00 in\n",
+ "The pump piston have to travel = 6.10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.3, Page No 25 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "F1=150.0 #lbf Force\n",
+ "A1=0.049 #in^2 area\n",
+ "A2=0.785 #in^2 area\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "F21=F1*(A2/A1)\n",
+ "#IN SI unit\n",
+ "F1=667.2 #N(Force)\n",
+ "A1=31.7 #mm^2(Area)\n",
+ "A2=506.7 #mm^2(Area)\n",
+ "F22=F1*(A2/A1)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The weight lifted by a downward force = %.2f lbf' %F21)\n",
+ "print('weight lifted by a downward force in SI unit = %.2f N' %F22)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The weight lifted by a downward force = 2403.06 lbf\n",
+ "weight lifted by a downward force in SI unit = 10664.68 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.4, Page No 27 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "F =800.0 #lbf Force\n",
+ "D=20 #ft distance\n",
+ "t=20 #sec time\n",
+ "C=550 #ft-lbf/sec\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "HP=(F*D)/(t*C)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The Horse powe required is = %.2f HP' %HP)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Horse powe required is = 1.45 HP\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.5, Page No 27 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "V1=2000.0 #watts voltage\n",
+ "V2=746.0 #watts voltage\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "HP=V1/V2\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The Horse powe required is = %.2f HP' %HP)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Horse powe required is = 2.68 HP\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.6, Page No 28 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "N=1200 #rev/min speed\n",
+ "A=(3.14*((1.125*1.125)*5))/4 #Cross section of the bore in in^2\n",
+ "L=1 # cylinder stroke (inch)\n",
+ "#CALCULATIONS\n",
+ "V=A*L\n",
+ "Q=V*N/231\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The displacement would be = %.2f in^3/rev' %V)\n",
+ "print('The flow rate would be = %.2f gal/min' %Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The displacement would be = 4.97 in^3/rev\n",
+ "The flow rate would be = 25.81 gal/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.7, Page No 31 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "P1=2000.0 #lbf/in^2 pressure\n",
+ "Q1=5 #gal/min flow rate\n",
+ "P3=13793.0 #kPa pressure\n",
+ "Q3=18.9 #liters/min flow rate\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Fhp1=P1*Q1/1714 #In English units\n",
+ "Fhp2=(P1*4.448*1550*Q1*3.7851*0.001)/44760 #In SI unit\n",
+ "Fhp3=P3*Q3/44760 #with technique 3\n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Using technique 1 the horsepower transmitted by system would be = %.2f hp' %Fhp1)\n",
+ "print('Using technique 1 the horsepower transmitted by system would be = %.2f hp' %Fhp2)\n",
+ "print('Using technique 1 the horsepower transmitted by system would be = %.2f hp' %Fhp3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using technique 1 the horsepower transmitted by system would be = 5.83 hp\n",
+ "Using technique 1 the horsepower transmitted by system would be = 5.83 hp\n",
+ "Using technique 1 the horsepower transmitted by system would be = 5.82 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.8, Page No 35 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "THP=5.83 # Horse power \n",
+ "pi=3.14 #Pi value\n",
+ "N=500 #rev/min speed\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T=(THP*33000)/(2*pi*N)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The torque would be = %.2f lbf-ft' %T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The torque would be = 61.27 lbf-ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.9, Page No 35 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "T=2000.0 #lbf-ft torque\n",
+ "N=20.0 #rev/min speed\n",
+ "P=2000 #lbf/in^2 pressure \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Q1=(1714*N*T)/(5252*P)\n",
+ "Fhp1=(P1*Q1)/1714\n",
+ "Q2=(44760*N*2712)/(7122*13793)\n",
+ "Fhp2=(13793*Q2)/44760\n",
+ "\n",
+ "#RESULTS\n",
+ "print('In English units the flow rate would be = %.2f gal/min' %Q1)\n",
+ "print('In English units the Horsepower would be = %.2f hp' %Fhp1)\n",
+ "print('In SI units the flow rate would be = %.2f lit/min' %Q2)\n",
+ "print('In SI units the Horsepower would be = %.2f hp' %Fhp2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flow rate would be = 6.53 gal/min\n",
+ "The Horsepower would be = 7.62 hp\n",
+ "The flow rate would be = 24.71 gal/min\n",
+ "The Horsepower would be = 7.62 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.10, Page No 36 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "N=750.0 #rev/min speed\n",
+ "Q=5 #gal/min flow rate\n",
+ "P=1000 #lbf/in^2 pressure\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T=(5252*P*Q)/(1714*N)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The expected torque would be = %.2f lbf-ft' %T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The expected torque would be = 20.43 lbf-ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_3.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_3.ipynb
new file mode 100755
index 00000000..08a4040d
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_3.ipynb
@@ -0,0 +1,448 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:41e08ad2cbd71b375b8fca4d52dca8e12f0a2ed40aa710b7f9246d1cab354954"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter No 3: Energy in Hydraulic systems<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.1, Page No 44 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "h=50.0 #ft height\n",
+ "sg=1.0 #Density \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "p=sg*h*0.433 # pressure\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Pressure is = %.2f lbf/in^2' %p)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure is = 21.65 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.2, Page No 44<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "p=1500.0 #lbf/in^2 pressure\n",
+ "Sg=0.78 #Density \n",
+ "p2=p*6895 #lbf/in^2 pressure\n",
+ "#CALCULATIONS\n",
+ "h=(p*2.31)/Sg\n",
+ "h2=(p2*1.02)/(10000*Sg) #In metric units\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Head in ft = %.2f ft' %h)\n",
+ "print('In metric units Head in ft = %.2f ft' %h2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head in ft = 4442.31 ft\n",
+ "Head in ft = 1352.48 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.3, Page No 45 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "p=13790000 #N/m^2 pressure\n",
+ "Sg=0.83 #Density \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "h=(p*1.02)/(Sg*10000)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Head in ft = %.2f m' %h)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head in ft = 1694.67 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.4, Page No 46 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=40 #Gal/min flow rate\n",
+ "a1=3.14 #in^2 area\n",
+ "a2=12.56 #in^2 area \n",
+ "#CALCULATIONS\n",
+ "#Part a\n",
+ "v1=Q/(a1*3.12) #fluid velocity in 2 in diameter\n",
+ "#Part b\n",
+ "v2=(a1*v1)/a2 #Fluid Velocity in 4 in diameter\n",
+ "#RESULTS\n",
+ "print('Fluid Velocity in 2 in diameter pipe is = %.2f ft/sec' %v1)\n",
+ "print('Fluid Velocity in 4 in diameter pipe is = %.2f ft/sec' %v2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fluid Velocity is = 4.08 ft/sec\n",
+ "Fluid Velocity is = 1.02 ft/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.5, Page No 47 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=18 #Gal/min flow rate\n",
+ "a=3.14 #in^2 area \n",
+ "v2=10 #ft/sec velocity\n",
+ "#CALCULATIONS\n",
+ "v=Q/(a*3.12) \n",
+ "D=math.sqrt((4*Q)/(math.pi*v2*3.12))\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Velocity is = %.2f in' %D)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity is = 0.86 in\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.6, Page No 51 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "p=10.0 #lbf/in^2 pressure\n",
+ "Sg=0.87 #Density\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "h=p*2.31/Sg\n",
+ "#The value of h is actualy 26.55 but in book they have rounded off to 26.6 \n",
+ "EPE=200*Sg*8.34*h #Elevation energy\n",
+ "#RESULTS\n",
+ "print('The height = %.1f ft' %h)\n",
+ "print('The energy of elevation = %.2f ft-lbf' %EPE)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The height = 26.6 ft\n",
+ "The energy of elevation = 38530.80 ft-lbf\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.7, Page No 53 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "F=1000 #lbf force\n",
+ "A=3.14 #in^2 area\n",
+ "pe=10.0 #lbf/in^2 (Pressure of elevation)\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "p=F/A #Total pressure\n",
+ "P=p-pe\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pressure is = %.2f lbf/in^2' %P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure is = 308.47 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.8, Page No 53 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Sg=0.87 #Density\n",
+ "a=0.785 #in^2 area \n",
+ "g=32.2 #ft/sec^2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "w=25*Sg*231*62.4*1/1738\n",
+ "Q=25*231*1/12*1/60\n",
+ "v=Q/a\n",
+ "KE=(w*v*v)/(2*g)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The Kinetic enegry is = %.2f ft-lbf' %KE)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Kinetic enegry is = 290.91 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.9, Page No 55 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "A1=7.065 #area in^2\n",
+ "A2=0.785 #area in^2\n",
+ "p1=1000 #pressure lbf/in^2\n",
+ "Q=500 #flow rate gal/min\n",
+ "g=32.2 #ft/sec^2\n",
+ "Sg=0.91 #density\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v1=Q/(A1*3.12) #Velocity\n",
+ "v2=Q/(A2*3.12) #Velocity\n",
+ "temp1=(p1*2.31)/Sg\n",
+ "temp2=(v1*v1)/ (2*g)\n",
+ "temp3=(v2*v2)/(2*g)\n",
+ "p2=(temp1+temp2-temp3)*Sg/2.31\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pressure is = %.2f lbf/in^2' %p2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure is = 748.21 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.10, Page No 55 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "p=1000 #pressure lbf/in^2\n",
+ "p1=350 #pressure lbf/in^2\n",
+ "Sg=0.85 #Specific gravity\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Ha=p*2.31/Sg\n",
+ "H1=p1*2.31/Sg\n",
+ "He=Ha-H1-679.41\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The energy extracted from the fluid = %.2f lbf/in^2' %He)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy extracted from the fluid = 1087.06 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.11, Page No 55 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "h=40 #height ft\n",
+ "g=32.2 #ft/sec^2\n",
+ "#CALCULATIONS\n",
+ "v=math.sqrt(2*g*h) #velocity\n",
+ "#RESULTS\n",
+ "print('The energy extracted from the fluid = %.2f lbf/in^2' %v)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy extracted from the fluid = 50.75 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_4.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_4.ipynb
new file mode 100755
index 00000000..fa4223d9
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_4.ipynb
@@ -0,0 +1,157 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ef80559993f5ef663679dee68ecb16be7277adf553aef3de2eb86d71037aadc3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter no 4: How Fluids flow<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.1, Page No 64 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "a1=12.56 #Area(in^2)\n",
+ "s1=24 #stroke(in^3)\n",
+ "a2=3.14 #Area(in^2) displacement of ram\n",
+ "s2=24 #stroke in^3\n",
+ "Ve=0.785 #Extension volume in^3\n",
+ "\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Ve=a1*s1 #extension volume\n",
+ "Vs=a2*s2 \n",
+ "Vr=Ve-Vs #Retraction volume\n",
+ "Vt=Ve+Vr #Total volume\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Displacement of the cylinder would be = %.2f in^3' %Vt)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Displacement of the cylinder would be = 527.52 in^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.4, Page No 75 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "A=0.785 #area\n",
+ "Q=100 #gal/min flow rate\n",
+ "D=1 #in diameter\n",
+ "v=0.05 #viscocity Newts\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "V=Q/(A*3.12) #velocity\n",
+ "Nr=(12*V*D)/v #reynolds number\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The velocity would be = %.2f lbf-ft' %V)\n",
+ "print('The Reynolds number would be = %.2f Hence the flow is turbulent' %Nr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity would be = 40.83 lbf-ft\n",
+ "The Reynolds number would be = 9799.12 Hence the flow is turbulent\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.5, Page No 76 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Nr=4000 #reynolds number\n",
+ "Nr2=2000 #reynolds number\n",
+ "m=0.27 #P viscocity\n",
+ "D=2.54 #cm diameter\n",
+ "p=0.85 #pressure gm/cm^3\n",
+ "m2=27 #cP viscocity\n",
+ "D2=1 #in diameter\n",
+ "#CALCULATIONS\n",
+ "V=(Nr*m)/(D*p) #velocity\n",
+ "\n",
+ "# for lower critical velocity\n",
+ "V2=(Nr2*m)/(D*p)\n",
+ "v=m2/p\n",
+ "vn=0.001552*v\n",
+ "vh=(Nr*vn)/(12*D2)\n",
+ "vl=(Nr2*vn)/(12*D2)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The velocity would be = %.2f cm/sec' %V)\n",
+ "print('The lower velocity would be = %.2f cm/sec' %V2)\n",
+ "print('Using reynolds formula the velocity would be = %.2f ft/sec' %vh)\n",
+ "print('Using reynolds formula the lower velocity would be = %.2f ft/sec' %vl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity would be = 500.23 cm/sec\n",
+ "The lower velocity would be = 250.12 cm/sec\n",
+ "using reynolds formula the velocity would be = 16.43 newts\n",
+ "using reynolds formula the lower velocity would be = 8.22 cm/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_5.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_5.ipynb
new file mode 100755
index 00000000..dfa30c9f
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_5.ipynb
@@ -0,0 +1,347 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4f7ceb1a02c4aed051683602c2032c5c01a494cc7ebde0035eb0f03a6d976611"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.1, Page No 82 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=200 #gal/min flow rate\n",
+ "A=3.14 #area in^2\n",
+ "f=0.05 #friction factor\n",
+ "g=32.2 #ft/sec^2\n",
+ "L=800 #ft length\n",
+ "Sg=0.91 #density\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v=Q/(A*3.12) #velocity of fluid\n",
+ "D=(2*1.0)/12 #in\n",
+ "hf=f*(L/D)*((v*v)/(2*g)) #head loss\n",
+ "hps=0.433*Sg*hf\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pressure drop is = %.2f lbf/in^2' %hps)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure drop is = 611.99 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.2, Page No 84 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "Q=15 #gal/min\n",
+ "A=0.785 #area\n",
+ "D=1 #diameter in\n",
+ "v1=0.08 #Viscocity Newts\n",
+ "L=400 #Length ft\n",
+ "g=32.2 #ft/sec^2\n",
+ "Sg=0.85 #density\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v=Q/(A*3.12)\n",
+ "Nr=(12*v*D)/v1 #reynolds number\n",
+ "hf=(32*v1*L*v)/(D*D*g) #head drop\n",
+ "hps=0.433*Sg*hf\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pressure drop is = %.2f lbf/in^2' %hps)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure drop is = 71.68 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.3, Page No 87 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=600 #gal/min flow rate\n",
+ "A=3.14 #area in^2\n",
+ "f=0.040 #force in^2\n",
+ "D=2 #diameter in\n",
+ "v1=0.30 #Viscocity in^2sec\n",
+ "L=500 #length ft\n",
+ "g=32.2 #ft/sec^2\n",
+ "Sg=0.85 #density\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v=Q/(A*3.12)\n",
+ "Nr=(12*v*D)/v1 #reynolds number\n",
+ "D=(2*1.0)/12\n",
+ "hf=f*(L/D)*((v*v)/(2*g))\n",
+ "hps=0.433*Sg*hf #Pressure drop\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pressure drop is = %.2f lbf/in^2' %hps)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure drop is = 2572.39 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.4, Page No 90 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "p=120 #pressure drop lbf/in^2\n",
+ "Sg=0.85 #density\n",
+ "Q=1000 #gal/min flow rate\n",
+ "A=3.14 #area \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Cd=(1/38.06)*(Q/A)*(math.sqrt(Sg/p)) #discharge coefficient\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The discharge coefficient is = %.2f ' %Cd)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The discharge coefficient is = 0.70 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.5, Page No 94 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=50 #gal/min flow rate\n",
+ "A=0.785 #area\n",
+ "D=1 #diameter in\n",
+ "f=1 #\n",
+ "v1=0.05 #Viscocity Newts\n",
+ "L=500 #length ft\n",
+ "g=32.2 #ft/sec^2\n",
+ "Sg=0.91 #Density\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v=Q/(A*3.12) #velocity\n",
+ "Nr=(12*v*D)/v1 #Reynolds\n",
+ "temp=((v*v)/(2*g))\n",
+ "hi=0.78*temp #inward projection\n",
+ "ho=1.0*temp #Outward projection\n",
+ "hg=10.0*temp #Globe Valve\n",
+ "he=4*0.90*temp # 4 std 90 degree elbow\n",
+ "hn=(3.0/4)*temp #sudden enlargement\n",
+ "hc=0.5*3.0/4*temp #Sudden contraction\n",
+ "hff=hi+ho+hg++he+hn+hc #Total head loss\n",
+ "hps=0.433*Sg*hff\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The pressure drop is = %.2f lbf/in^2' %hps)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure drop is = 42.09 lbf/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.6, Page No 96 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=150 #gal/min flow rate\n",
+ "A=0.785 #area in^2\n",
+ "D=1 #diameter in\n",
+ "f=0.045 #\n",
+ "v1=0.10 #Viscocity newts\n",
+ "Sg=0.91 #density\n",
+ "K=2.5\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v=Q/(A*3.12)\n",
+ "Nr=(12*v*D)/v1 # Reynolds number\n",
+ "Le=(D*K)/(12*f) #length\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The equivalent length is = %.2f ft' %Le)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent length is = 4.63 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.7, Page No 97 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q=100 #gal/min flow rate\n",
+ "A1=3.14 #area in^2\n",
+ "A2=0.785 #area in^2\n",
+ "D=2 #Diameter in \n",
+ "k=12.4 #K-factor\n",
+ "g=32.2 #ft/sec^2\n",
+ "L=134.58 #Length ft\n",
+ "p=224.7 #Total pressure drop lbf/in^2\n",
+ "Q=100 #gal/min flow rate\n",
+ "L2=35.33 #ft length\n",
+ "#CALCULATIONS\n",
+ "v1=Q/(A1*3.12) #velocity\n",
+ "v2=Q/(A2*3.12) #velocity\n",
+ "v=0.001552*80 # kinematic viscosity from cSt to newts \n",
+ "Nr=(12*v1*D)/v #Reynold number\n",
+ "D1=1\n",
+ "D2=1\n",
+ "k2=20\n",
+ "f2=0.05\n",
+ "Nr2=(12*v2*D1)/v #Reynold number\n",
+ "f1=64/Nr\n",
+ "Le=(D*k)/(12*f1) #length\n",
+ "hf=f1*((L*(v1*v1))/((2.0/12.0)*(2*g)))\n",
+ "hsif=0.433*0.88*hf #pressure loss\n",
+ "Le2=(D2*k2)/(12*f2)\n",
+ "hf2=f2*((L2*(v2*v2))/((1.0/12.0)*(2*g)))\n",
+ "hsif2=0.433*0.88*hf2 #pressure loss\n",
+ "pd=hsif+hsif2\n",
+ "Fhp=(pd*Q)/1714\n",
+ "#RESULTS\n",
+ "print('The pressure drop is = %.2f lbf/in' %pd)\n",
+ "print('The fluid horsepwer is = %.2f hp' %Fhp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure drop is = 225.24 lbf/in\n",
+ "The fluid horsepwer is = 13.14 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_6.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_6.ipynb
new file mode 100755
index 00000000..789b362e
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_6.ipynb
@@ -0,0 +1,130 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2a45c36aaa47c05012e31744a57dc2decac5ab57032d2c7729bcf9fae98dd916"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter No 6 :Hydraulic Fluids <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.2, Page No 115 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "V1=1.0 #volume\n",
+ "p2=2000 #pressure lbf/in^2\n",
+ "p1=1000 #pressure lbf/in^2\n",
+ "K=350000 #k factor lbf/in^2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "dV=V1*(p2-p1)/K\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The fluid be expected compress is = %.4f ' %dV)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fluid be expected compress is = 0.0029 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.3, Page No 127 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "m1=36815.0 #Particles count upstream\n",
+ "m2=6347 #Particles count downstream\n",
+ "b=m1/m2 #beta ratio\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The beta ratio = %.1f ' %b)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The beta ratio = 5.8 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.4, Page No 127 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "m1=36815.0 # Particles count upstream\n",
+ "m2=6347 #Particles count downstream\n",
+ "b=((m1-m2)/m1)*100 # Beta efficiency\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The beta efficiency = %.2f percent' %b)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The beta efficiency = 82.76 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_7.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_7.ipynb
new file mode 100755
index 00000000..c35b63d7
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_7.ipynb
@@ -0,0 +1,226 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7f3e7af3a7770bd6065b2ca329fec5074b9d86ea22aa36dc09cc71c375000d3b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chapter No 7 : Pumps <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 7.1, Page No 135 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P=2500.0 #pressure lbf/in^3\n",
+ "Q=3.0 #gpm flow rate\n",
+ "p=5.0 #Bhp power\n",
+ "N=1725.0 #rpm speed\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "eo=P*Q*100.0/(1714.0*p) # pump efficiency\n",
+ "To=p*5250.0/ N # torque Input\n",
+ "\n",
+ "#RESULTS\n",
+ "print('\\n Input torque = %.3f lb-ft ' %To)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Input torque = 15.217 lb-ft "
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 7.2 Page No 137 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Q=52.0 #gpm flow rate\n",
+ "v=3.75 #in^3 positive displacement\n",
+ "N=3300.0 #rpm speed\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "ev=231.0*Q*100.0/(v*N) #Volumetric efficiency\n",
+ "\n",
+ "#RESULT\n",
+ "print('\\n Volumetric efficiency = %.3f percent ' %ev)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Volumetric efficiency = 97.067 percent "
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 7.3, Page No 137 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "eo=87.0 #percent overall efficiency\n",
+ "ev=94.0 #percent volumetric efficiency\n",
+ "p=10.0 #bhpi\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "em=eo/ev # Mechanical efficiency\n",
+ "em1=em*100.0\n",
+ "Fhp=p*(1.0-em)\n",
+ "\n",
+ "#RESULTS\n",
+ "print(' \\n Frictional horsepower = %.3f hp ' %Fhp)\n",
+ "print('\\n Mechanical efficiency = %.2f percent ' %em1 )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " \n",
+ " Frictional horsepower = 0.745 hp \n",
+ "\n",
+ " Mechanical efficiency = 92.55 percent \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 7.4 Page No 150 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "n=9.0 #no of cycles\n",
+ "N=3000.0 #rpm speed\n",
+ "s=0.75 #inch stroke\n",
+ "d=0.5 #inch diameter\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Q=n*N*s*math.pi*d**2/(4.0*231.0)\n",
+ "\n",
+ "#RESULTS\n",
+ "print(' Volume flow rate = %.3f gpm ' %Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Volume flow rate = 17.212 gpm "
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 7.5 Page No 162 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "d=6.0 #in diameter\n",
+ "S=120.0 #in stroke\n",
+ "Q=5.0 #gpm flow rate\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Vc=math.pi*d**2*S/(4.0*231.0)\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Minimum size of the reservoir = %.3f gpm ' %Vc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum size of the reservoir = 14.688 gpm \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_8.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_8.ipynb
new file mode 100755
index 00000000..f2ea6a6f
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_8.ipynb
@@ -0,0 +1,282 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:17c640dd0a4a95ba945b4c3f11eeafabec4d7eceacb7724326f3938cd4b8f643"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chapter 8 : Hydraulic Cylinders and Cushioning Devices <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.1 Page No 172 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "F=80000.0 #lbs Force\n",
+ "F2=355800.0 #N Force\n",
+ "P=1600.0 #lbf/in^2 Pressure\n",
+ "P2=11.03*(1000000) #N/m^2 Pressure\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "db=math.sqrt(4.0*F/(math.pi*P))\n",
+ "#In SI units\n",
+ "db2=math.sqrt((4.0*F2)/(math.pi*P2))\n",
+ "db2=db2*100 # To convert it into cm\n",
+ "#RESULTS\n",
+ "print('\\n Size of the cylinder postion = %.3f in ' %db)\n",
+ "print('\\n Using SI units size of the cylinder postion = %.1f cm ' %db2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Size of the cylinder postion = 7.979 in \n",
+ "\n",
+ " Size of the cylinder postion = 20.266 in \n",
+ "\n",
+ " Size of the cylinder postion = 11030000.000 in \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.2 Page No 173 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Q=25.0 #gpm flow rate\n",
+ "A=0.533 #in^2 area\n",
+ "\n",
+ "#Calculations\n",
+ "nu=Q*19.25/(A*60.0) #Fluid velocity\n",
+ "nucylinder =Q*19.25/12.56 #Cylinder velocity\n",
+ "\n",
+ "#Results\n",
+ "print('\\n Fluid velocity = %.3f ft/sec' %nu)\n",
+ "print('\\n Cylinder velocity = %.3f ft/min' %nucylinder )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Fluid velocity = 15.048 ft/sec\n",
+ "\n",
+ " Cylinder velocity = 38.316 ft/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.3 Page No 178 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "d=3.0 #in diameter\n",
+ "P=2000.0 #lbf/in^2 pressure\n",
+ "s=20.0 #stroke in\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Cl=s*d/2.0 #corrected length\n",
+ "F=P*math.pi*d**2/4.0 #thrust\n",
+ "stl=(Cl-40.0)/10.0 #stop tube length\n",
+ " \n",
+ "#RESULTS\n",
+ "print('\\n Length of the stop tube= %.3f in ' %Cl)\n",
+ "F=F+3\n",
+ "print('\\n Thrust on the rod= %.3f lb ' %F)\n",
+ "print('\\n Stop Tube length= %.3f stl ' %stl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Length of the stop tube= 30.000 in \n",
+ "\n",
+ " Thrust on the rod= 14140.167 lb \n",
+ "\n",
+ " Stop Tube length= -1.000 stl "
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.4 Page No 182 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "v=120.0 #ft/min velocity\n",
+ "S=1.5 #in distance\n",
+ "w=8000.0 #lb wight\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "ga=v**2*0.0000517/S\n",
+ "F=w*ga\n",
+ "#RESULTS\n",
+ "print(' Total force decessary to decelarate the load= %.3f lb ' %F)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Total force decessary to decelarate the load= 3970.560 lb \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.5 Page No 184 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P=750.0 #lbf/in^2 pressure\n",
+ "d=3.0 #in distance\n",
+ "w=1500.0 #lb weight\n",
+ "ga=0.172 #Acceleration factor\n",
+ "f=0.12 #Coefficient of fraction\n",
+ "v=50 #ft/min velocity\n",
+ "s=0.75 #in stroke\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Fa=P*math.pi*d**2/4.0\n",
+ "F=w*(ga-f)+Fa\n",
+ "#RESULT\n",
+ "print('\\n Total force decessary to decelarate the load= %.3f lb ' %F)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Total force decessary to decelarate the load= 5379.438 lb \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.6 Page No 186 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "d=3.0 #in diameter\n",
+ "d1=1.5 #in diameter\n",
+ "F=7500.0 #lb force\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "A1=(math.pi/4.0)*(d**2-d1**2)\n",
+ "P=F/A1\n",
+ "#RESULT\n",
+ "print(' Pressure in the cylinder = %.3f psi' %P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Pressure in the cylinder = 1413.711 psi"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_9.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_9.ipynb
new file mode 100755
index 00000000..ddb6d25f
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_No_9.ipynb
@@ -0,0 +1,271 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:fa3b77fb957b6452bc46163f22ab8db8630dd903dfdd45f948929785db1004f9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter No 9 : Hydraulic motors<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example9.1 Page No 194 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "P=2000.0 #lbf/in^3 pressure\n",
+ "Vm=0.5 #in^3 displacement\n",
+ "\n",
+ "#CALCULATONS\n",
+ "T=P*Vm*0.16\n",
+ "\n",
+ "#RESULTS\n",
+ "print('\\n Theotrical torque = %.3f lb-in ' %T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Groove diameter = 3.776 in \n",
+ " \n",
+ " Groove width = 0.196 in \n",
+ "\n",
+ " outside diameter = 4.000 in "
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 9.2 Page No 194 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Q=7.5 #gpm flow rate\n",
+ "Q2=28.39 #l/min f;ow rate\n",
+ "Vm=2 #in^3 displacement\n",
+ "Vm2=0.03281 #l/rev displacement\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "N=231.0*Q/Vm # Theotrical speed\n",
+ "#SI units\n",
+ "N2=(Q2/Vm2) # in SI units Theotrical speed\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Theotrical speed of fluid power = %.3f rpm ' %N)\n",
+ "print(' Using SI units Theotrical speed of fluid power = %.3f rev/min ' %N2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Theotrical speed of fluid power = 866.250 rpm \n",
+ " Using SI units Theotrical speed of fluid power = 865.285 rev/min \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 9.3 Page No 195 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Vm=0.55 #in^3 displacement\n",
+ "N=3400.0 #rpm Theotrical speed\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Q=Vm*N/231.0\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Effective flow rate = %.3f gpm ' %Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Effective flow rate = 8.095 gpm \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 9.4 Page No 195 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "T=32.0 #lb_ft torque\n",
+ "N=1200.0 #rpm Theotrical speed\n",
+ "P=2000.0 #psi pressure lbf/in^2\n",
+ "Q=7.5 #gpm flow rate\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "eo=T*N*100.0/(P*Q*3.06)\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Overall efficiency = %.3f percent ' %eo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Overall efficiency = 83.660 percent \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 9.5 Page No 196 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "Vm=0.6 #in^3 displacement\n",
+ "N=2400 #rpm theotrical speed\n",
+ "Qa=6.5 #gal/min flow rate\n",
+ "Vm1=0.00981 #l/rev displacement\n",
+ "#CALCULATIONS\n",
+ "ev=((Vm*N)/(Qa*231))*100\n",
+ "#in SI units\n",
+ "ev1=((Vm1*N)/(24.611))*100\n",
+ "TFL=0.041*Qa # total fluid loss\n",
+ "CDL=0.50*TFL #Case drain loss\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Total fluid loss = %.2f gal/min ' %TFL)\n",
+ "print(' Case drain loss = %.2f gal/min ' %CDL)\n",
+ "print(' Volumetric efficiency = %.2f percent ' %ev)\n",
+ "print(' Volumetric efficiency in SI units = %.2f percent ' %ev1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Total fluid loss = 0.27 gal/min \n",
+ " Case drain loss = 0.13 gal/min \n",
+ " Volumetric efficiency = 95.90 percent \n",
+ " Volumetric efficiency in SI units = 95.66 percent \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 9.6 Page No 197 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable initialization\n",
+ "eo=88.0 # Overall efficiency (%)\n",
+ "ev=97 # Volumetric efficiency(%)\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "em=(eo/ev)*100\n",
+ "\n",
+ "#RESULT\n",
+ "print(' Mechnical efficiency efficiency = %.3f percent ' %em)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Mechnical efficiency efficiency = 90.722 percent \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_no_1.ipynb b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_no_1.ipynb
new file mode 100755
index 00000000..1c23b49f
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/Chapter_no_1.ipynb
@@ -0,0 +1,58 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:33757e16bbf0642b0e875c402b38109f03d490b4828afe5b522fd4980c273e77"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter No 1: Introduction<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.1, Page No 17 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Pressure=1500.0 #lbf\n",
+ "Area=12.57 #in^2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Force=Pressure*Area\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Force is = %.2f lbf' %Force)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force is = 18855.00 lbf\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/README.txt b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/README.txt
new file mode 100755
index 00000000..b517b76e
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Mayur Sabban
+Course: be
+College/Institute/Organization: Vishwakarma Institute of Technology Pune
+Department/Designation: Computer Engg
+Book Title: Fluid Power Theory & Applications by J. Sullivan, 4th Edition
+Author: J. Sullivan
+Publisher: Reston Publishing Company
+Year of publication: 2007
+Isbn: 0137555881
+Edition: 4 \ No newline at end of file
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter2.png b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter2.png
new file mode 100755
index 00000000..6a07ebad
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter2.png
Binary files differ
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter4.png b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter4.png
new file mode 100755
index 00000000..738fa40e
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/Chapter4.png
Binary files differ
diff --git a/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/chapter3.png b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/chapter3.png
new file mode 100755
index 00000000..4b8ccbd2
--- /dev/null
+++ b/Fluid_Power_Theory_&_Applications_by_J._Sullivan,_4th_Edition/screenshots/chapter3.png
Binary files differ
diff --git a/Fluidization_Engineering/README.txt b/Fluidization_Engineering/README.txt
index a043f776..a043f776 100644..100755
--- a/Fluidization_Engineering/README.txt
+++ b/Fluidization_Engineering/README.txt
diff --git a/Fluidization_Engineering/ch10.ipynb b/Fluidization_Engineering/ch10.ipynb
index 40d88cd4..40d88cd4 100644..100755
--- a/Fluidization_Engineering/ch10.ipynb
+++ b/Fluidization_Engineering/ch10.ipynb
diff --git a/Fluidization_Engineering/ch11.ipynb b/Fluidization_Engineering/ch11.ipynb
index 4c2d2fd3..4c2d2fd3 100644..100755
--- a/Fluidization_Engineering/ch11.ipynb
+++ b/Fluidization_Engineering/ch11.ipynb
diff --git a/Fluidization_Engineering/ch12.ipynb b/Fluidization_Engineering/ch12.ipynb
index 1fc80a09..1fc80a09 100644..100755
--- a/Fluidization_Engineering/ch12.ipynb
+++ b/Fluidization_Engineering/ch12.ipynb
diff --git a/Fluidization_Engineering/ch13.ipynb b/Fluidization_Engineering/ch13.ipynb
index 18536015..18536015 100644..100755
--- a/Fluidization_Engineering/ch13.ipynb
+++ b/Fluidization_Engineering/ch13.ipynb
diff --git a/Fluidization_Engineering/ch14.ipynb b/Fluidization_Engineering/ch14.ipynb
index c3aead0d..c3aead0d 100644..100755
--- a/Fluidization_Engineering/ch14.ipynb
+++ b/Fluidization_Engineering/ch14.ipynb
diff --git a/Fluidization_Engineering/ch15.ipynb b/Fluidization_Engineering/ch15.ipynb
index 09c02451..09c02451 100644..100755
--- a/Fluidization_Engineering/ch15.ipynb
+++ b/Fluidization_Engineering/ch15.ipynb
diff --git a/Fluidization_Engineering/ch16.ipynb b/Fluidization_Engineering/ch16.ipynb
index e835e890..e835e890 100644..100755
--- a/Fluidization_Engineering/ch16.ipynb
+++ b/Fluidization_Engineering/ch16.ipynb
diff --git a/Fluidization_Engineering/ch17.ipynb b/Fluidization_Engineering/ch17.ipynb
index 77951e94..77951e94 100644..100755
--- a/Fluidization_Engineering/ch17.ipynb
+++ b/Fluidization_Engineering/ch17.ipynb
diff --git a/Fluidization_Engineering/ch18.ipynb b/Fluidization_Engineering/ch18.ipynb
index 281bc4a5..281bc4a5 100644..100755
--- a/Fluidization_Engineering/ch18.ipynb
+++ b/Fluidization_Engineering/ch18.ipynb
diff --git a/Fluidization_Engineering/ch3.ipynb b/Fluidization_Engineering/ch3.ipynb
index 72abab33..72abab33 100644..100755
--- a/Fluidization_Engineering/ch3.ipynb
+++ b/Fluidization_Engineering/ch3.ipynb
diff --git a/Fluidization_Engineering/ch4.ipynb b/Fluidization_Engineering/ch4.ipynb
index cbd2e1e4..cbd2e1e4 100644..100755
--- a/Fluidization_Engineering/ch4.ipynb
+++ b/Fluidization_Engineering/ch4.ipynb
diff --git a/Fluidization_Engineering/ch5.ipynb b/Fluidization_Engineering/ch5.ipynb
index 791c6af2..791c6af2 100644..100755
--- a/Fluidization_Engineering/ch5.ipynb
+++ b/Fluidization_Engineering/ch5.ipynb
diff --git a/Fluidization_Engineering/ch6.ipynb b/Fluidization_Engineering/ch6.ipynb
index 9c4f2311..9c4f2311 100644..100755
--- a/Fluidization_Engineering/ch6.ipynb
+++ b/Fluidization_Engineering/ch6.ipynb
diff --git a/Fluidization_Engineering/ch7.ipynb b/Fluidization_Engineering/ch7.ipynb
index aafc2f66..aafc2f66 100644..100755
--- a/Fluidization_Engineering/ch7.ipynb
+++ b/Fluidization_Engineering/ch7.ipynb
diff --git a/Fluidization_Engineering/ch8.ipynb b/Fluidization_Engineering/ch8.ipynb
index 9fed0363..9fed0363 100644..100755
--- a/Fluidization_Engineering/ch8.ipynb
+++ b/Fluidization_Engineering/ch8.ipynb
diff --git a/Fluidization_Engineering/ch9.ipynb b/Fluidization_Engineering/ch9.ipynb
index 5087d780..5087d780 100644..100755
--- a/Fluidization_Engineering/ch9.ipynb
+++ b/Fluidization_Engineering/ch9.ipynb
diff --git a/Fluidization_Engineering/screenshots/plotkbckbedb.png b/Fluidization_Engineering/screenshots/plotkbckbedb.png
index b7c9004b..b7c9004b 100644..100755
--- a/Fluidization_Engineering/screenshots/plotkbckbedb.png
+++ b/Fluidization_Engineering/screenshots/plotkbckbedb.png
Binary files differ
diff --git a/Fluidization_Engineering/screenshots/relationnubedrep.png b/Fluidization_Engineering/screenshots/relationnubedrep.png
index 8919a070..8919a070 100644..100755
--- a/Fluidization_Engineering/screenshots/relationnubedrep.png
+++ b/Fluidization_Engineering/screenshots/relationnubedrep.png
Binary files differ
diff --git a/Fluidization_Engineering/screenshots/relationshebdrep.png b/Fluidization_Engineering/screenshots/relationshebdrep.png
index 173822d6..173822d6 100644..100755
--- a/Fluidization_Engineering/screenshots/relationshebdrep.png
+++ b/Fluidization_Engineering/screenshots/relationshebdrep.png
Binary files differ
diff --git a/Fundamental_of_Electronics_Devices/Ch1.ipynb b/Fundamental_of_Electronics_Devices/Ch1.ipynb
index 78c644f7..78c644f7 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch1.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch1.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch2.ipynb b/Fundamental_of_Electronics_Devices/Ch2.ipynb
index b52ed808..b52ed808 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch2.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch2.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch3.ipynb b/Fundamental_of_Electronics_Devices/Ch3.ipynb
index d78715cf..d78715cf 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch3.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch3.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch4.ipynb b/Fundamental_of_Electronics_Devices/Ch4.ipynb
index 47f532e6..47f532e6 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch4.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch4.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch5.ipynb b/Fundamental_of_Electronics_Devices/Ch5.ipynb
index bcf84c6b..bcf84c6b 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch5.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch5.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch6.ipynb b/Fundamental_of_Electronics_Devices/Ch6.ipynb
index 179d14a6..179d14a6 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch6.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch6.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch7.ipynb b/Fundamental_of_Electronics_Devices/Ch7.ipynb
index 990f60e7..990f60e7 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch7.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch7.ipynb
diff --git a/Fundamental_of_Electronics_Devices/Ch8.ipynb b/Fundamental_of_Electronics_Devices/Ch8.ipynb
index aa872860..aa872860 100644..100755
--- a/Fundamental_of_Electronics_Devices/Ch8.ipynb
+++ b/Fundamental_of_Electronics_Devices/Ch8.ipynb
diff --git a/Fundamental_of_Electronics_Devices/README.txt b/Fundamental_of_Electronics_Devices/README.txt
index da7bc292..da7bc292 100644..100755
--- a/Fundamental_of_Electronics_Devices/README.txt
+++ b/Fundamental_of_Electronics_Devices/README.txt
diff --git a/Fundamental_of_Electronics_Devices/screenshots/energybands.png b/Fundamental_of_Electronics_Devices/screenshots/energybands.png
index 26f3a730..26f3a730 100644..100755
--- a/Fundamental_of_Electronics_Devices/screenshots/energybands.png
+++ b/Fundamental_of_Electronics_Devices/screenshots/energybands.png
Binary files differ
diff --git a/Fundamental_of_Electronics_Devices/screenshots/steadystatephoto.png b/Fundamental_of_Electronics_Devices/screenshots/steadystatephoto.png
index 5f0c6810..5f0c6810 100644..100755
--- a/Fundamental_of_Electronics_Devices/screenshots/steadystatephoto.png
+++ b/Fundamental_of_Electronics_Devices/screenshots/steadystatephoto.png
Binary files differ
diff --git a/Fundamental_of_Electronics_Devices/screenshots/transfercharateristics.png b/Fundamental_of_Electronics_Devices/screenshots/transfercharateristics.png
index 85c6b507..85c6b507 100644..100755
--- a/Fundamental_of_Electronics_Devices/screenshots/transfercharateristics.png
+++ b/Fundamental_of_Electronics_Devices/screenshots/transfercharateristics.png
Binary files differ
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_10.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_10.ipynb
new file mode 100755
index 00000000..4f062750
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_10.ipynb
@@ -0,0 +1,346 @@
+{
+ "metadata": {
+ "name": "Chapter 10"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 10 :- Refrigeration and Heat pump systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 10.1 Page no-459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "Tc = 273.00 # temperature of cold region in kelvin",
+ "Th = 299.00 # temperature of hot region in kelvin",
+ "mdot = 0.08 # mass flow rate in kg/s",
+ "",
+ "# Analysis",
+ "# At the inlet to the compressor, the refrigerant is a saturated vapor at 0\u0004C, so from Table A-10",
+ "h1 = 247.23 # in kj/kg",
+ "s1 = 0.9190 # in kj/kg.k",
+ "",
+ "# The pressure at state 2s is the saturation pressure corresponding to 26\u0004C, or",
+ "p2 = 6.853 # in bars",
+ "# The refrigerant at state 2s is a superheated vapor with",
+ "h2s = 264.7 # in kj/kg",
+ "# State 3 is saturated liquid at 26\u0004C, so",
+ "h3 = 85.75 # in kj/kg",
+ "h4 = h3 # since The expansion through the valve is a throttling process",
+ "",
+ "# Part(a)",
+ "Wcdot = mdot*(h2s-h1) # The compressor work input in KW",
+ "print '-> The compressor power, in kW, is: '",
+ "print round(Wcdot,2)",
+ "",
+ "# Part(b)",
+ "Qindot = mdot*(h1-h4)*60/211 # refrigeration capacity in ton",
+ "print '-> The refrigeration capacity in tons is: '",
+ "print round(Qindot,2)",
+ "",
+ "# Part(c)",
+ "beta = (h1-h4)/(h2s-h1)",
+ "print '-> The coefficient of performance is: '",
+ "print round(beta,2)",
+ "",
+ "# Part(d)",
+ "betamax = Tc/(Th-Tc)",
+ "print '-> The coefficient of performance of a Carnot refrigeration cycle operating between warm and cold regions at 26 and 0\u0004C, respectively is: '",
+ "print betamax"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The compressor power, in kW, is: ",
+ "1.4",
+ "-> The refrigeration capacity in tons is: ",
+ "3.67",
+ "-> The coefficient of performance is: ",
+ "9.24",
+ "-> The coefficient of performance of a Carnot refrigeration cycle operating between warm and cold regions at 26 and 0\u0004C, respectively is: ",
+ "10.5"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 10.2 Page no-462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "mdot = 0.08 # mass flow rate in kg/s",
+ "# Analysis",
+ "# At the inlet to the compressor, the refrigerant is a saturated vapor at \u000510\u0004C, so from Table A-10,",
+ "h1 = 241.35 # in kj/kg",
+ "s1 = .9253 # in kj/kg.k",
+ "# Interpolating in Table A-12 gives",
+ "h2s = 272.39 # in kj/kg.k",
+ "# State 3 is a saturated liquid at 9 bar, so",
+ "h3 = 99.56 # in kj/kg",
+ "h4 = h3 # since The expansion through the valve is a throttling process",
+ "",
+ "# Part(a)",
+ "Wcdot = mdot*(h2s-h1) # The compressor power input in KW",
+ "# Result",
+ "print '-> The compressor power in kw is: '",
+ "print round(Wcdot,2)",
+ "",
+ "# Part(b)",
+ "Qindot = mdot*(h1-h4)*60/211 # refrigeration capacity in tons",
+ "# Result",
+ "print '-> The refrigeration capacity in tons is: '",
+ "print round(Qindot,2)",
+ "",
+ "# Part(c)",
+ "beta = (h1-h4)/(h2s-h1)",
+ "# Result",
+ "print '-> The coefficient of performance is: '",
+ "print round(beta,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The compressor power in kw is: ",
+ "2.48",
+ "-> The refrigeration capacity in tons is: ",
+ "3.23",
+ "-> The coefficient of performance is: ",
+ "4.57"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 10.3 Page no-464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "Tnot = 299 #in kelvin",
+ "etac = .8 #compressor efficiency of 80 percent",
+ "mdot = .08 #mass flow rate in kg/s",
+ "#analysis",
+ "#State 1 is the same as in Example 10.2, so",
+ "h1 = 241.35 #in kj/kg",
+ "s1 = .9253 #in kj/kg.k",
+ "#from example 10.2",
+ "h2s = 272.39 #in kj/kg",
+ "h2 =(h2s-h1)/etac + h1 #in kj/kg",
+ "#Interpolating in Table A-12,",
+ "s2 = .9497 #in kj/kg.k",
+ "",
+ "h3 = 91.49 #in kj/kg",
+ "s3 = .3396",
+ "h4 = h3 #since The expansion through the valve is a throttling process",
+ "#from data table",
+ "hf4 = 36.97 #in kj/kg",
+ "hg4 = 241.36 #in kj/kg",
+ "sf4 = .1486 #in kj/kg.k",
+ "sg4 = .9253 #in kj/kg.k",
+ "x4 = (h4-hf4)/(hg4-hf4) #quality at state 4",
+ "s4 = sf4 + x4*(sg4-sf4) #specific entropy at state 4 in kj/kg.k",
+ "",
+ "#part(a)",
+ "Wcdot = mdot*(h2-h1) #compressor power in kw",
+ "print 'The compressor power in kw is: ',round(Wcdot,2),'kW'",
+ "",
+ "#part(b)",
+ "Qindot = mdot*(h1-h4)*60/211 #refrigeration capacity in ton",
+ "print 'The refrigeration capacity in ton is: ',round(Qindot,2),'ton'",
+ "",
+ "#part(c)",
+ "beta = (h1-h4)/(h2-h1) #coefficient of performance ",
+ "print 'The coefficient of performance is: ',round(beta,2)",
+ "",
+ "#part(d)",
+ "Eddotc = mdot*Tnot*(s2-s1) #in kw",
+ "Eddotv = mdot*Tnot*(s4-s3) #in kw",
+ "print 'The rate of exergy destruction within the compressor is:',round(Eddotc,2),'kw.'",
+ "print 'The rate of exergy destruction within the valve is:',round(Eddotv,2),'kw'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The compressor power in kw is: 3.1 kW",
+ "The refrigeration capacity in ton is: 3.41 ton",
+ "The coefficient of performance is: 3.86",
+ "The rate of exergy destruction within the compressor is: 0.58 kw.",
+ "The rate of exergy destruction within the valve is: 0.39 kw"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 10.4 Page no-475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 1.00 # in bar",
+ "T1 = 270.00 # in kelvin",
+ "AV = 1.4 # in m^3/s",
+ "r = 3.00 # compressor pressure ratio",
+ "T3 = 300.00 # turbine inlet temperature in kelvin",
+ "",
+ "# Analysis",
+ "# From Table A-22,",
+ "h1 = 270.11 # in kj/kg",
+ "pr1 = 0.9590",
+ "# Interpolating in Table A-22,",
+ "h2s = 370.1 # in kj/kg",
+ "# From Table A-22,",
+ "h3 = 300.19 # in kj/kg",
+ "pr3 = 1.3860",
+ "# Interpolating in Table A-22, we obtain",
+ "h4s = 219.00 # in kj/kg",
+ "# Calculations",
+ "pr2 = r*pr1",
+ "pr4 = pr3/r",
+ "",
+ "# Part(a)",
+ "R = 8.314 # universal gas constant, in SI units",
+ "M = 28.97 # molar mass of air in grams",
+ "",
+ "# Results",
+ "mdot = (AV*p1)/((R/M)*T1)*10**2 # mass flow rate in kg/s",
+ "Wcycledot = mdot*((h2s-h1)-(h3-h4s))",
+ "print '-> The net power input in kw is: '",
+ "print round(Wcycledot,2)",
+ "",
+ "# Part(b)",
+ "Qindot = mdot*(h1-h4s) # refrigeration capacity in kw",
+ "print '-> The refregeration capacity in kw is: '",
+ "print round(Qindot,2)",
+ "",
+ "# Part(c)",
+ "beta = Qindot/Wcycledot # coefficient of performance",
+ "print 'The coefficient of performance is: '",
+ "print round(beta,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The net power input in kw is: ",
+ "33.97",
+ "-> The refregeration capacity in kw is: ",
+ "92.34",
+ "The coefficient of performance is: ",
+ "2.72"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 10.5 Page no-477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "wcdots = 99.99 # work per unit mass for the isentropic compression determined with data from the solution in Example 10.4 in kj/kg",
+ "mdot = 1.807 # mass flow rate in kg/s from 10.4",
+ "etac = 0.8 # isentropic efficiency of compressor",
+ "Wcdot = (mdot*wcdots)/etac # The power input to the compressor in kw",
+ "",
+ "# Using data form the solution to Example 10.4 gives",
+ "wtdots =81.19 # in kj/kg",
+ "etat = 0.8 # isentropic efficiency of turbine",
+ "# Calculations",
+ "Wtdot = mdot*etat*wtdots # actual turbine work in kw",
+ "Wdotcycle = Wcdot-Wtdot # The net power input to the cycle in kw",
+ "# Result",
+ "print '-> The net power input in kw is: '",
+ "print round(Wdotcycle,2)",
+ "",
+ "# Part(b)",
+ "h3 = 300.19 # in kj/kg",
+ "# From table A-22",
+ "h1 = 270.11 # in kj/kg",
+ "# Calculations",
+ "h4 = h3 -Wtdot/mdot",
+ "Qindot = mdot*(h1-h4) # refrigeration capacity in kw",
+ "# Result",
+ "print '-> The refrigeration capacity in kw is: '",
+ "print round(Qindot,2)",
+ "",
+ "# Part(c)",
+ "beta = Qindot/Wdotcycle # coefficient of performance ",
+ "# Result",
+ "print '-> The coefficient of performance is: '",
+ "print round(beta,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The net power input in kw is: ",
+ "108.48",
+ "-> The refrigeration capacity in kw is: ",
+ "63.01",
+ "-> The coefficient of performance is: ",
+ "0.58"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_11.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_11.ipynb
new file mode 100755
index 00000000..683cb8fc
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_11.ipynb
@@ -0,0 +1,517 @@
+{
+ "metadata": {
+ "name": "Chapter 11"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "#Chapter 11 :- Thermodynamic Relations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.1 Page no-491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m = 4.00 # mass of carbon monoxide in kg",
+ "T = 223.00 # temperature of carbon monoxide in kelvin",
+ "D = 0.2 # inner diameter of cylinder in meter",
+ "L = 1.00 # length of the cylinder in meter",
+ "pi=3.14",
+ "# Analysis",
+ "M = 28.00 # molar mass in kg/kmol",
+ "# Calculations",
+ "V = (pi*D**2.00/4.00)*L # volume occupied by the gas in m^3",
+ "vbar = M*(V/m) # The molar specific volume in m^3/kmol",
+ "",
+ "# Part(a)",
+ "# From Table A-1 for CO",
+ "Tc = 133 # in kelvin",
+ "Pc = 35 # in bar",
+ "Tr = T/Tc # reduced temperature",
+ "Rbar = 8314 # universal gas constant in N.m/kmol.K",
+ "Z = 0.9",
+ "# Calculations",
+ "vrdash = (vbar*Pc*10**5)/(Rbar*Tc) # pseudoreduced specific volume",
+ "p = (Z*Rbar*T/vbar)*10**-5 # in bar",
+ "# Result",
+ "print '-> part(a)the pressure in bar is: '",
+ "print round(p,2)",
+ "",
+ "# Part(b)",
+ "# The ideal gas equation of state gives",
+ "# Calculations",
+ "p = (Rbar*T/vbar)/10**5 # in bar",
+ "# Result",
+ "print '-> Part(b)the pressure in bar is: '",
+ "print round(p,2)",
+ "",
+ "# Part(c)",
+ "# For carbon monoxide, the van der Waals constants a and b can be read directly from Table A-24",
+ "a = 1.474 # in (m^3/kmol)^2",
+ "b = 0.0395 # in m^3/kmol",
+ "# Calculations",
+ "p = (Rbar*T/(vbar-b))/10**5 - a/vbar**2",
+ "# Result",
+ "print '-> Part(c)the pressure in bars is: '",
+ "print round(p,2)",
+ "",
+ "# Part(d)",
+ "# For carbon monoxide, the Redlich\u2013Kwong constants can be read directly from Table A-24",
+ "a = 17.22 # in m^6*K^.5/kmol^2",
+ "b = 0.02737 # in m^3/kmol",
+ "# Calculations",
+ "p = (Rbar*T/(vbar-b))/10**5 - a/(vbar*(vbar+b)*T**.5)",
+ "# Result",
+ "print '-> Part(d)the pressure in bar is: '",
+ "print round(p,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> part(a)the pressure in bar is: ",
+ "75.92",
+ "-> Part(b)the pressure in bar is: ",
+ "84.35",
+ "-> Part(c)the pressure in bars is: ",
+ "72.32",
+ "-> Part(d)the pressure in bar is: ",
+ "75.12"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.3 Page no-501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " ",
+ "# Given:-",
+ "# Part(a)",
+ "v = 0.4646 # specific volume in in m^3/kg",
+ "M = 18.02 # molar mass of water in kg/kmol",
+ "# At the specified state, the temperature is 513 K and the specific volume on a molar basis is",
+ "vbar = v*M # in m^3/kmol",
+ "# From Table A-24",
+ "a = 142.59 # (m^3/kmol)^2 * K^.5",
+ "b = 0.0211 # in m^3/kmol",
+ "",
+ "Rbar = 8314.0 # universal gas constant in N.m/kmol.K",
+ "T = 513.0 # in kelvin",
+ "delpbydelT = (Rbar/(vbar-b) + a/(2*vbar*(vbar+b)*T**1.5)*10**5)/10**3 # in kj/(m^3*K)",
+ "",
+ "# By The Maxwell relation",
+ "delsbydelv = delpbydelT",
+ "# Result",
+ "print '-> The value of delpbydelT in kj/(m^3*K) is: ',delpbydelT",
+ "",
+ "# Part(b)",
+ "from pylab import *",
+ "# A value for (dels/delv)T can be estimated using a graphical approach with steam table data, as follows: At 240\u0004C, Table A-4 provides the values for specific entropy s and specific volume v tabulated below",
+ "T = 240.0 # in degree celcius",
+ "# At p =1, 1.5, 3, 5, 7, 10 bar respectively",
+ "y = [7.994, 7.805, 7.477, 7.230, 7.064, 6.882] # in kj/kg.k # in kj/kg.k",
+ "x = [2.359, 1.570, 0.781, 0.4646, 0.3292, 0.2275] # in m^3/kg # in m^3/kg",
+ "plot(x,y)",
+ "xlabel(\"Specific volume\")",
+ "ylabel(\"Specific entropy\")",
+ "show()",
+ "# The pressure at the desired state is 5 bar.The corresponding slope is",
+ "delsbydelv = 1 # in kj/m^3.K",
+ "print '-> From the data of the table,delsbydelv = ',delsbydelv"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The value of delpbydelT in kj/(m^3*K) is: 1.00430251045"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEMCAYAAADAqxFbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVnX+//EnBpq7pY5TgEtQKSqLWKbfGilzTSxJTZhp\n0XIr17HJaflNNjWZTVeTWF+lplJbXNrUJrW+pLghrgg1GG64oGaiooAmCuf3x8kbbgFvRA7nhvv1\nuC6uy/u+D+e8Pdfxfvn5fM75fLwMwzAQERH5TS27CxAREfeiYBARE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MIxvv/3WGDlypKO2/v37G2vWrLmyEy1SjFs8+SxSlvr167N161bWrl3L\nqlWreOihh3jttdccUypHR0cDMHToUCZNmgSYy8ju2LHDsY+cnBzy8vL4/vvvHSsIAjRp0qTcdaxa\ntYqPP/4YgFq1atGoUSOnz5s1a8ZNN93Exo0bCQwM5KeffqJbt27MmDGDqKgo6tatC0BUVBRr1qwh\nJCSk3Me+OCVKx44dycvLo379+tSvX586depw6tQpvvvuO7777jvHk695eXns3r2bu+66q9zHEClO\nwSBur1atWnTv3p3u3bvTsWNH5s6d6wiG4i7OnmkYBhs3bqR27doltjGuYkjN1e8OHTqURYsW0bZt\nW6Kiohw1Ff89wzBKzPLp7e1NYWGh4/XZs2edPq9Tpw5gnofif6datWpx4cIFAJ599llGjhxZgb+V\nSEkaYxC3tnPnTnbt2uV4nZycTOvWrR2vL7YAFi5cSLdu3QDo1asXsbGxjm1SUlIA6NmzJ++8847j\n/ezs7Mseu/gXeo8ePZg1axYABQUFjruYihs4cCCLFy9m/vz5DB06FDAX2Fm8eDFnz54lLy+PxYsX\nl/iffKtWrUhLSyM/P5/s7GxWrlzpsp6LvLy86N27Nx988AF5eXmAuRbBsWPHLvt3E7kcBYO4tdzc\nXB577DHat29PSEgIP/30k9Pg6smTJwkJCWHmzJn861//AsxbTrds2UJISAjt27d3DNK+8MILnDx5\nko4dOxIaGkpCQkKJ4xX/37yXl5fj9YwZM1i1ahXBwcF07tzZqavqoiZNmhAUFMSBAwfo3LkzAGFh\nYTz22GPcfvvt3HHHHYwYMcLRjXRx3/7+/gwZMoQOHTrw0EMP0alTp1LPRfF6iv9+z549iYmJoWvX\nrgQHBzNkyBByc3PLdX5FSqPbVaXaatOmDVu3bq2x00uL2EUtBqm2avKKXCJ2UotBREScqMUgIiJO\nFAwiIuJEwSAiIk4UDCIi4kTBICIiThQMIiLi5P8Da332C1BJf1gAAAAASUVORK5CYII=\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> From the data of the table,delsbydelv = 1"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.4 Page no-506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Analysis",
+ "# For comparison, Table A-2 gives at 100\u0004C,",
+ "hgf =2257.00 # in kj/kg",
+ "ugf = 2087.6 # in kj/kg",
+ "sgf = 6.048 # in kj/kg.K",
+ "# Values",
+ "print '-> From table, hg-hf = ',hgf",
+ "print '-> From table, ug-uf = ',ugf",
+ "print '-> From table, sg-sf = ',sgf",
+ "",
+ "# Part(a)",
+ "T = 373.15 # in kelvin",
+ "# If we plot a graph between temperature and saturation pressure using saturation pressure\u2013temperature data from the steam tables, the desired slope is:",
+ "delpbydelT = 3570.00 # in N/(m^2.K)",
+ "vg = 1.673 # in m^3/kg",
+ "vf = 1.0435e-3 # in m^3/kg",
+ "# Calculations",
+ "# From the Clapeyron equation",
+ "hgf = T*(vg-vf)*delpbydelT*10**-3 # in kj/kg",
+ "# Result",
+ "print '-> Part(a)using Clapeyron equation, hg-hf = ', round(hgf,2)",
+ "",
+ "# Part(b)",
+ "psat = 1.014e5 # in N/m^2",
+ "hgf = 2256.00 # can be obtained using IT software in kj/kg",
+ "# Calculations",
+ "ugf = hgf - psat*(vg-vf)/10**3 # in kj/kg",
+ "# Result",
+ "print '-> Part(b)ug-uf = ', round(ugf,2)",
+ "# Part(c)",
+ "# Calculation",
+ "sgf =hgf/T # in kj/kg.K ",
+ "# Result",
+ "print '-> Part(c)sg-sf = ', round(sgf,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> From table, hg-hf = 2257.0",
+ "-> From table, ug-uf = 2087.6",
+ "-> From table, sg-sf = 6.048",
+ "-> Part(a)using Clapeyron equation, hg-hf = 2227.29",
+ "-> Part(b)ug-uf = 2086.46",
+ "-> Part(c)sg-sf = 6.05"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.6 Page no-517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "v = 1.00/998.21 # specific volume of water in m^3/kg",
+ "T = 293.00 # given temperature in kelvin",
+ "beta = 206.6e-6 # volume expansivity in /K",
+ "k = 45.90e-6 # isothermal compressibility in /bar",
+ "# Interpolating in Table A-19",
+ "cp = 4.188 # in kj/kg.k",
+ "# Calculations",
+ "cpv = (v*T*beta**2.00/k)*10**2 # in kj/kg.k",
+ "cv = cp-cpv # in kj/kg.k",
+ "errorPercentage = 100*(cp-cv)/cv",
+ "# Result",
+ "print '-> The percentage error is: ',round(errorPercentage,2)",
+ "",
+ "# Part(b)",
+ "# Calculations",
+ "K = cp/cv # specific heat ratio",
+ "c = ((K*v/k)*10**5)**0.5 # velocity of sound in m/s",
+ "# Result",
+ "print '-> The velocity of sound is: ',round(c,2),'m/s'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The percentage error is: 0.66",
+ "-> The velocity of sound is: 1482.19 m/s"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.8 Page no-526"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 100.00 # in bar",
+ "T1 = 300.00 # in kelvin",
+ "p2 = 40.00 # in bar",
+ "T2 = 245.00 # in kelvin",
+ "",
+ "",
+ "# From table A-23",
+ "h1starbar = 8723.00 # in kj/kmol",
+ "h2starbar = 7121.00 # in kj/kmol",
+ "# From Tables A-1",
+ "Tc = 126.00 # critical temperature in kelvin",
+ "pc = 33.9 # critical pressure in bar",
+ "M = 28.00 # molar mass in kg/kmol",
+ "Rbar = 8.314 # universal gas constant in kj/(kmol.K)",
+ "Term1 = 0.5 ",
+ "Term2 = 0.31",
+ "",
+ "# Calculations",
+ "TR1 = T1/Tc # reduced temperature at the inlet",
+ "PR1 = p1/pc # reduced pressure at the inlet",
+ "TR2 = T2/Tc # reduced temperature at the exit",
+ "PR2 = p2/pc # reduced pressure at the exit",
+ "wcvdot = (1.00/M)*(h1starbar-h2starbar-Rbar*Tc*(Term1-Term2)) # in kj/kg",
+ "",
+ "# Result",
+ "print '-> The work developed, in kJ per kg of nitrogen flowing is : '",
+ "print round(wcvdot,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work developed, in kJ per kg of nitrogen flowing is : ",
+ "50.11"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.9 Page no-529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "# With values from Table A-23",
+ "sT2bar = 185.775 # in kj/(kmol.K)",
+ "sT1bar = 191.682 # in kj/(kmol.K)",
+ "Rbar = 8.314 # universal gas constant",
+ "M = 28.00 # molar mass in kg/kmol ",
+ "p2 = 40.00 # in bar",
+ "p1 = 100.00 # in bar",
+ "Term1 = 0.21",
+ "Term2 = 0.14",
+ "",
+ "# Calculations",
+ "import math",
+ "S2StarBarMinusS1StarBar = sT2bar-sT1bar-Rbar*math.log(p2/p1) # The change in specific entropy in kj/(kmol.K)",
+ "sigmacvdot = (1.00/M)*(S2StarBarMinusS1StarBar-Rbar*(Term2-Term1))",
+ "# Result",
+ "print '-> the rate of entropy production in kj/kg.K is: '",
+ "print round(sigmacvdot,2)",
+ "",
+ "# Part(b)",
+ "# From Table A-23,",
+ "h2starbar = 6654.00 # in kj/kmol",
+ "h1starbar = 8723.00 # in kj/kmol",
+ "Tc = 126.00 # critical temperature in kelvin",
+ "Term2 = 0.36",
+ "Term1 = 0.5",
+ "wcvdot = 50.1 # from example 11.8",
+ "",
+ "# Calculations",
+ "wcvdots = (1.00/M)*(h1starbar-h2starbar-Rbar*Tc*(Term1-Term2)) # isentropic work in kj/kg",
+ "etat = wcvdot/wcvdots # turbine efficiency",
+ "",
+ "# Result",
+ "print '-> The isentropic turbine efficiency is: '",
+ "print round(etat,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> the rate of entropy production in kj/kg.K is: ",
+ "0.08",
+ "-> The isentropic turbine efficiency is: ",
+ "0.73"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 11.10 Page no-533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Analysis",
+ "V = 0.241 # volume of the mixture in m^3",
+ "T = 511.00 # temperature of the mixture in kelvin",
+ "n1 = 0.18 # number of moles of methane in kmol",
+ "n2 = 0.274 # number of moles of butane in kmol",
+ "Rbar = 8314 # universal gas constant in (N.m)/(kmol.K)",
+ "",
+ "# Calculations",
+ "n = n1 + n2 # The total number of moles of mixture",
+ "y1 = n1/n # mole fraction of methane",
+ "y2 = n2/n # mole fraction of butane",
+ "vbar = V/(n) # The specific volume of the mixture on a molar basis in m^3/kmol",
+ "",
+ "# Part(a)",
+ "p = (Rbar*T/vbar)*10**-5 # in bar",
+ "# Result",
+ "print '-> The pressure in bar obtained using ideal gas equation is: '",
+ "print round(p,2)",
+ "",
+ "# Part(b)",
+ "# From table A-1",
+ "Tc1 = 191.00 # critical temperature for methane in kelvin ",
+ "Pc1 = 46.4 # critical pressure for methane in bar",
+ "Tc2 = 425.00 # critical temperature for butane in kelvin",
+ "Pc2 = 38.00 # critical pressure for butane in bar",
+ "Z = 0.88",
+ "",
+ "",
+ "# Calculations",
+ "Tc = y1*Tc1 + y2*Tc2 # critical temperature in kelvin",
+ "Pc = y1*Pc1 + y2*Pc2 # critical pressure in bar",
+ "TR = T/Tc # reduced temperature of the mixture",
+ "vRdash= vbar*Pc/(Rbar*Tc)",
+ "p = ((Z*Rbar*T)/vbar)*10**-5 # mixture pressure in bar",
+ "# Result",
+ "print '-> Pressure obtained using Kay\u2019s rule together with the generalized compressibility chart, is: '",
+ "print round(p,2)",
+ "",
+ "# Part(c)",
+ "# Table A-24 gives the following van der Waals constants values for methane",
+ "a1 = 2.293 # in (m^3/kmol)^2",
+ "b1 = 0.0428 # in m^3/kmol",
+ "# Table A-24 gives the following van der Waals constants values for butane",
+ "a2 = 13.86 # in (m^3/kmol)^2",
+ "b2 = 0.1162 # in m^3/kmol",
+ "",
+ "a = (y1*a1**.5 + y2*a2**.5)**2 # in bar*(m^3/kmol)^2",
+ "b = y1*b1+y2*b2 # in m^3/kmol",
+ "# From van der Waals equation",
+ "p = ((Rbar*T)/(vbar-b))*10**-5 - a/(vbar**2)",
+ "print '-> The pressure in bar from van der Waals equation is: '",
+ "print round(p,2)",
+ "",
+ "# Part(d)",
+ "# For methane",
+ "TR1 = T/Tc1",
+ "vR1dash = (.241/.18)*10**5*Pc1/(Rbar*Tc1)",
+ "Z1 = 1.00",
+ "# For butane",
+ "TR2 = T/Tc2",
+ "vR2dash = (.88*10**5*Pc2)/(Rbar*Tc2)",
+ "Z2 = 0.8",
+ "Z = y1*Z1 + y2*Z2",
+ "# Accordingly, the same value for pressure as determined in part (b) using Kay\u2019s rule results:",
+ "p = 70.4",
+ "",
+ "# Result",
+ "print '-> The pressure in bar obtained using the rule of additive pressures employing the generalized compressibility chart is: '",
+ "print round(p,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The pressure in bar obtained using ideal gas equation is: ",
+ "80.03",
+ "-> Pressure obtained using Kay\u2019s rule together with the generalized compressibility chart, is: ",
+ "70.43",
+ "-> The pressure in bar from van der Waals equation is: ",
+ "66.97",
+ "-> The pressure in bar obtained using the rule of additive pressures employing the generalized compressibility chart is: ",
+ "70.4"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_12.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_12.ipynb
new file mode 100755
index 00000000..e7fbba95
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_12.ipynb
@@ -0,0 +1,930 @@
+{
+ "metadata": {
+ "name": "Chapter 12"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "#Chapter 12 :- Ideal Gas Mixtures: General Considerations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.1 Page no-560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "n1 = 0.08 # mole fraction of CO2",
+ "n2 = 0.11 # mole fraction of H2O",
+ "n3 = 0.07 # mole fraction of O2",
+ "n4 = 0.74 # mole fraction of N2",
+ "",
+ "# Part(a)",
+ "M1 = 44.0 # molar mass of CO2 in kg/kmol",
+ "M2 = 18.0 # molar mass of H2O in kg/kmol",
+ "M3 = 32.0 # molar mass of O2 in kg/kmol",
+ "M4 = 28.0 # molar mass of N2 in kg/kmol",
+ "",
+ "# Calculations",
+ "M = M1*n1 + M2*n2 + M3*n3 + M4*n4 # in kg/kmol",
+ "# Result",
+ "print 'The apparent molecular weight of the mixture in kg/kmol is: ',M",
+ "",
+ "# Part(b)",
+ "mf1 = (M1*n1/M)*100.0 # mass fraction of CO2 in percentage ",
+ "mf2 = (M2*n2/M)*100.0 # mass fraction of H2O in percentage",
+ "mf3 = (M3*n3/M)*100.0 # mass fraction of O2 in percentage",
+ "mf4 = (M4*n4/M)*100.0 # mass fraction of N2 in percentage",
+ "",
+ "# Results",
+ "print 'The mass fraction of CO2 in percentage is: ',mf1",
+ "print 'The mass fraction of H2O in percentage is: ',mf2",
+ "print 'The mass fraction of O2 in percentage is: ',mf3",
+ "print 'The mass fraction of N2 in percentage is: ',mf4"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The apparent molecular weight of the mixture in kg/kmol is: 28.46",
+ "The mass fraction of CO2 in percentage is: 12.3682361209",
+ "The mass fraction of H2O in percentage is: 6.95713281799",
+ "The mass fraction of O2 in percentage is: 7.87069571328",
+ "The mass fraction of N2 in percentage is: 72.8039353479"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.2 Page no-561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "mf1 = 0.1 # mass fractiion of H2",
+ "mf2 = 0.6 # mass fraction of N2",
+ "mf3 = 0.3 # mass fraction of CO2",
+ "",
+ "# Part(a)",
+ "M1 = 2.0 # molar mass of H2 in kg/kmol",
+ "M2 = 28.0 # molar mass of N2 in kg/kmol",
+ "M3 = 44.0 # molar mass of CO2 in kg/kmol",
+ "",
+ "# Calculations",
+ "n1 = (mf1/M1)/(mf1/M1 + mf2/M2 + mf3/M3) # mole fraction of H2 ",
+ "n2 = (mf2/M2)/(mf1/M1 + mf2/M2 + mf3/M3) # mole fraction of N2",
+ "n3 = (mf3/M3)/(mf1/M1 + mf2/M2 + mf3/M3) # mole fraction of CO2",
+ "",
+ "# Results",
+ "print 'The mole fraction of H2 in percentage is: ',n1*100",
+ "print 'The mole fraction of N2 in percentage is: ',n2*100",
+ "print 'The mole fraction of CO2 in percentage is: ',n3*100",
+ "",
+ "# Part(b)",
+ "# Calculation",
+ "M = n1*M1 + n2*M2 + n3*M3 # in kg/kmol",
+ "# Result",
+ "print 'The apparent molecular weight of the mixture in kg/kmol is: ',M"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mole fraction of H2 in percentage is: 63.9004149378",
+ "The mole fraction of N2 in percentage is: 27.3858921162",
+ "The mole fraction of CO2 in percentage is: 8.71369294606",
+ "The apparent molecular weight of the mixture in kg/kmol is: 12.7800829876"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.3 Page no-569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m1 = 0.3 # mass of CO2 in kg",
+ "m2 = 0.2 # mass of N2 in kg",
+ "p1 = 1.0 # in bar",
+ "T1 = 300.0 # in kelvin",
+ "p2 = 3.0 # in bar",
+ "n = 1.25",
+ "",
+ "# Part(a)",
+ "# Calculation",
+ "T2 = T1*(p2/p1)**((n-1)/n) # in kelvin",
+ "# Result",
+ "print 'The final temperature in Kelvin is: ',T2",
+ "",
+ "# Part(b)",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "# Calculations",
+ "M = (m1+m2)/(m1/44 + m2/28) # molar mass of mixture in kg/kmol",
+ "W = ((m1+m2)*(Rbar/M)*(T2-T1))/(1-n) # in kj",
+ "# Result",
+ "print 'The work in kj is: ',W ",
+ "",
+ "# Part(c)",
+ "# From table A-23",
+ "uCO2T1 = 6939.0 # internal energy of CO2 on molar mass basis at temperature T1",
+ "uCO2T2 = 9198.0 # internal energy of CO2 on molar mass basis at temperature T2",
+ "uN2T1 = 6229.0 # internal energy of N2 on molar mass basis at temperature T1",
+ "uN2T2 = 7770.0 # internal energy of N2 on molar mass basis at temperature T2",
+ "deltaU = (m1/44)*(uCO2T2-uCO2T1) + (m2/28)*(uN2T2-uN2T1) # internal energy change of the mixture in KJ",
+ "",
+ "# With assumption, The changes in kinetic and potential energy between the initial and final states can be ignored",
+ "Q = deltaU + W",
+ "# Result",
+ "print 'The heat transfer in kj is: ',Q",
+ "",
+ "# Part(d)",
+ "# From table A-23",
+ "sbarT2CO2 = 222.475",
+ "sbarT1CO2 = 213.915 ",
+ "sbarT2N2 = 198.105",
+ "sbarT1N2 = 191.682",
+ "Rbar = 8.314 # universal gas constant",
+ "# Calculation",
+ "import math",
+ "deltaS = (m1/44)*(sbarT2CO2-sbarT1CO2-Rbar*math.log(p2/p1)) + (m2/28)*(sbarT2N2-sbarT1N2-Rbar*math.log(p2/p1))",
+ "# Result",
+ "print 'The change in entropy of the mixture in kj/k is: ',deltaS"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature in Kelvin is: 373.719281885",
+ "The work in kj is: -34.2270009251",
+ "The heat transfer in kj is: -7.81758534069",
+ "The change in entropy of the mixture in kj/k is: -0.0232760033842"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.4 Page no-571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "y1 = 0.8 # mole fraction of CO2",
+ "y2 = 0.2 # mole fraction of O2",
+ "T1 = 700.0 # in kelvin",
+ "p1 = 5.0 # in bars",
+ "V1 = 3.0 # in m/s",
+ "p2 = 1.0 # in bars",
+ "",
+ "",
+ "# Part(a)",
+ "# From table A-23",
+ "sO2barT1 = 231.358",
+ "sCO2barT1 = 250.663",
+ "# Calculations",
+ "import math",
+ "RHS = y2*sO2barT1 + y1*sCO2barT1 + 8.314*math.log(p2/p1)",
+ "# Using table A-23",
+ "LHSat510K = y2*221.206 + y1*235.7",
+ "LHSat520K = y2*221.812 + y1*236.575",
+ "# Using linear interpolation,",
+ "T2 = 510 +((520-510)/(LHSat520K-LHSat510K))*(RHS-LHSat510K)",
+ "# Result ",
+ "print 'The temperature at the nozzle exit in K is: ',T2",
+ "",
+ "# Part(b)",
+ "# From table A-23",
+ "sbarO2T2 = 221.667 # in kj/kmol.K",
+ "sbarO2T1 = 231.358 # in kj/kmol.K",
+ "sbarCO2T2 = 236.365 # in kj/kmol.K",
+ "sbarCO2T1 = 250.663 # in kj/kmol.K",
+ "# Calculations",
+ "deltasbarO2 = sbarO2T2-sbarO2T1-8.314*math.log(p2/p1) # in kj/kmol.K",
+ "deltasbarCO2 = sbarCO2T2-sbarCO2T1-8.314*math.log(p2/p1) # in kj/kmol.K",
+ "# Results",
+ "print 'The entropy changes of the CO2 from inlet to exit, in KJ/Kmol.K is: ',deltasbarCO2",
+ "print 'The entropy change of the O2 from inlet to the exit in kj/kmol.k is: ',deltasbarO2",
+ "",
+ "# Part(c)",
+ "# From table A-23, the molar specific enthalpies of O2 and CO2 are",
+ "h1barO2 = 21184.0",
+ "h2barO2 = 15320.0",
+ "h1barCO2 = 27125.0",
+ "h2barCO2 = 18468.0",
+ "# Calculations",
+ "M = y1*44.0 + y2*32.0 # apparent molecular weight of the mixture in kg/kmol",
+ "deltah = (1.0/M)*(y2*(h1barO2-h2barO2) + y1*(h1barCO2-h2barCO2))",
+ "V2 = math.sqrt(V1**2+ 2*deltah*10**3)",
+ "# Result",
+ "print 'The exit velocity in m/s is: ',V2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature at the nozzle exit in K is: 517.549113444",
+ "The entropy changes of the CO2 from inlet to exit, in KJ/Kmol.K is: -0.917133196023",
+ "The entropy change of the O2 from inlet to the exit in kj/kmol.k is: 3.68986680398",
+ "The exit velocity in m/s is: 623.983296128"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.5 Page no-574"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "nN2 = 0.79 # initial moles of nitrogen in kmol",
+ "pN2 = 2.0 # initial pressure of nitrogen in bars",
+ "TN2 = 250.0 # initial temperature of nitrogen in kelvin",
+ "nO2 = 0.21 # initial moles of oxygen in kmol",
+ "pO2 = 1.0 # initial pressure of oxygen in bars",
+ "TO2 = 300.0 # initial temperature of oxygen in kelvin",
+ "",
+ "# Part(a)",
+ "MN2 = 28.01 # molar mass of nitrogen in kg/kmol",
+ "MO2 = 32.0 # molar mass of oxygen in kg/kmol",
+ "# Calculations",
+ "# With the help of table A-20",
+ "cvbarN2 = MN2*0.743 # in kj/kmol.K",
+ "cvbarO2 = MO2*0.656 # in kj/kmol.K",
+ "T2 = (nN2*cvbarN2*TN2+nO2*cvbarO2*TO2)/(nN2*cvbarN2+nO2*cvbarO2)",
+ "# Result",
+ "print 'The final temperature of the mixture in kelvin is: ',T2",
+ "",
+ "# Part(b)",
+ "# Calculation",
+ "p2 = ((nN2+nO2)*T2)/(nN2*TN2/pN2 + nO2*TO2/pO2)",
+ "# Result",
+ "print 'The final pressure of the mixture in bar is: ',p2",
+ "",
+ "# Part(c)",
+ "Rbar = 8.314 # universal gas constant",
+ "# Calculations",
+ "import math",
+ "cpbarN2 = cvbarN2 + Rbar",
+ "cpbarO2 = cvbarO2 + Rbar",
+ "yN2 = nN2/(nN2+nO2) # mole fraction of N2",
+ "yO2 = nO2/(nN2+nO2) # mole fraction of O2",
+ "sigma = nN2*(cpbarN2*math.log(T2/TN2)-Rbar*math.log(yN2*p2/pN2)) + nO2*(cpbarO2*math.log(T2/TO2)-Rbar*math.log(yO2*p2/pO2))",
+ "# Result",
+ "print 'The amount of entropy produced in the mixing process, in kJ/K is: ',sigma"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature of the mixture in kelvin is: 260.571840521",
+ "The final pressure of the mixture in bar is: 1.61095419179",
+ "The amount of entropy produced in the mixing process, in kJ/K is: 4.94715526048"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.6 Page no-577"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 32.0 # temperature of dry air in degree celcius",
+ "p1 = 1.0 # pressure of dry air in bar",
+ "AV1 = 100.0 # volume rate of dry air in m^3/min",
+ "T2 = 127.0 # temperature of oxygen stream in degree celcius",
+ "p2 = 1.0 # pressure of oxygen stream in bar",
+ "T3 = 47.0 # temperature of mixed stream in degree celcius",
+ "p3 = 1.0 # pressure of mixed stream in bar",
+ "",
+ "# Part(a)",
+ "Rbar = 8314.0 # universal gas constant",
+ "Ma = 28.97 # molar mass of air",
+ "Mo = 32.0 # molar mass of oxygen",
+ "# From table A-22 and A-23",
+ "haT3 = 320.29 # in kj/kg",
+ "haT1 = 305.22 # in kj/kg",
+ "hnotT2 = 11711.0 # in kj/kmol",
+ "hnotT1 = 9325.0 # in kj/kmol",
+ "",
+ "# Calculations",
+ "va1 = (Rbar/Ma)*(T1+273.0)/(p1*10**5) # specific volume of air in m^3/kg",
+ "ma1dot = AV1/va1 # mass flow rate of dry air in kg/min",
+ "modot = ma1dot*(haT3-haT1)/((1/Mo)*(hnotT2-hnotT1)) # in kg/min",
+ "# Results",
+ "print 'The mass flow rate of dry air in kg/min is: ',ma1dot",
+ "print 'The mass flow rate of oxygen in kg/min is: ',modot",
+ "",
+ "# Part(b)",
+ "nadot = ma1dot/Ma # molar flow rate of air in kmol/min",
+ "nodot = modot/Mo # molar flow rate of oxygen in kmol/min",
+ "ya = nadot/(nadot+nodot) # mole fraction of air",
+ "yo = nodot/(nadot+nodot) # mole fraction of oxygen",
+ "# Results",
+ "print 'The mole fraction of dry air in the exiting mixture is: ',ya",
+ "print 'The mole fraction of dry oxygen in the exiting mixture is: ',yo",
+ "",
+ "# Part(c)",
+ "# With the help of tables A-22 and A-23",
+ "sanotT3 = 1.7669 # in kj/kg.K",
+ "sanotT1 = 1.71865 # in kj/kg.K",
+ "sbarT3 = 207.112 # in kj/kmol.K",
+ "sbarT2 = 213.765 # in kj/kmol.K",
+ "# Calculations",
+ "import math",
+ "sigmadot = ma1dot*(sanotT3-sanotT1-(8.314/Ma)*math.log(ya))+ (modot/Mo)*(sbarT3-sbarT2-8.314*math.log(yo))",
+ "# Result",
+ "print 'The time rate of entropy production, in kJ/K . min is: ',sigmadot"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass flow rate of dry air in kg/min is: 114.245377144",
+ "The mass flow rate of oxygen in kg/min is: 23.0903984383",
+ "The mole fraction of dry air in the exiting mixture is: 0.845326536426",
+ "The mole fraction of dry oxygen in the exiting mixture is: 0.154673463574",
+ "The time rate of entropy production, in kJ/K . min is: 17.4180498088"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.7 Page no-584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m =1.0 # mass of sample in kg",
+ "T1 = 21.0 # initial temperature in degree celcius",
+ "psi1 = 0.7 # initial relative humidity",
+ "T2 = 5.0 # final temperature in degree celcius",
+ "",
+ "# Part(a)",
+ "# From table A-2",
+ "pg = 0.02487 # in bar",
+ "# Calculations ",
+ "pv1 = psi1*pg # partial pressure of water vapor in bar",
+ "omega1 = 0.622*(0.2542)/(14.7-0.2542)",
+ "# Result ",
+ "print 'the initial humidity ratio is: ',omega1",
+ "",
+ "# Part(b)",
+ "# The dew point temperature is the saturation temperature corresponding to the partial pressure, pv1. Interpolation in Table A-2 gives",
+ "T = 15.3 # the dew point temperature in degree celcius",
+ "# Result",
+ "print 'The dew point temperature in degree celcius is: ',T",
+ "",
+ "# Part(c)",
+ "# The partial pressure of the water vapor remaining in the system at the final state is the saturation pressure corresponding to 5\u0004C:",
+ "# Calculations",
+ "mv1 = 1/((1/omega1)+1) # initial amount of water vapor in the sample in kg",
+ "ma = m-mv1 # mass of dry air present in kg",
+ "pg = 0.00872 # in bar",
+ "omega2 = 0.622*(pg)/(1.01325-pg) # humidity ratio after cooling",
+ "mv2 = omega2*ma # The mass of the water vapor present at the final state",
+ "mw = mv1-mv2",
+ "",
+ "# Result",
+ "print 'The amount of water vapor that condenses, in kg. is: ',mw"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the initial humidity ratio is: 0.0109452159105",
+ "The dew point temperature in degree celcius is: 15.3",
+ "The amount of water vapor that condenses, in kg. is: 0.00548579192846"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.8 Page no-586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "V = 35.0 # volume of the vessel in m^3",
+ "p1 = 1.5 # in bar",
+ "T1 = 120.0 # in degree celcius",
+ "psi1 = 0.1 ",
+ "T2 = 22.0 # in degree celcius",
+ "",
+ "# Part(a)",
+ "# The dew point temperature at the initial state is the saturation temperature corresponding to the partial pressure pv1. With the given relative humidity and the saturation pressure at 120\u0004C from Table A-2",
+ "pg1 = 1.985",
+ "# Interpolating in Table A-2 gives the dew point temperature as",
+ "T = 60.0 # in degree celcius",
+ "# Calculation",
+ "pv1 = psi1*pg1 # partial pressure in bar",
+ "# Result",
+ "print 'The dew point temperature corresponding to the initial state, in degee celcius is: ',T",
+ "",
+ "# Part(b)",
+ "Rbar = 8314.0 # universal gas constant",
+ "Mv = 18.0 # molar mass of vapor in kj/kmol",
+ "# Interpolation in Table A-2",
+ "Tdash = 56.0 # in degrees",
+ "vv1 =((Rbar/Mv)*(T1+273))/(pv1*10**5) # the specific volume of the vapor at state 1 in m^3/kg",
+ "# Result",
+ "print 'The temperature at which condensation actually begins in degree celcius is: ',Tdash",
+ "",
+ "# Part(c)",
+ "# From table ",
+ "vf2 = 1.0022e-3",
+ "vg2 = 51.447",
+ "vv2 = vv1 # specific volume at final state",
+ "# Calculations",
+ "mv1 = V/vv1 # initial amount of water vapor present in kg",
+ "x2 = (vv2-vf2)/(vg2-vf2) # quality",
+ "mv2 = x2*mv1 # the mass of the water vapor contained in the system at the final state",
+ "mw2 = mv1-mv2",
+ "# Result",
+ "print 'The amount of water condense in kg is: ',mw2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dew point temperature corresponding to the initial state, in degee celcius is: 60.0",
+ "The temperature at which condensation actually begins in degree celcius is: 56.0",
+ "The amount of water condense in kg is: 3.14710226995"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.9 Page no-587"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "V = 35.0 # volume of vessel in m^3",
+ "p1 = 1.5 # initial pressure in bar",
+ "T1 = 120.0 # initial temperature in degree celcius",
+ "psi = 0.1",
+ "T2 = 22.0 # in degree celcius",
+ "Rbar = 8314.0 # universal gas constant",
+ "Ma = 28.97 # molar mass of air",
+ "pv1 = 0.1985 # in bar, from example 12.8",
+ "mv2 = 0.681 # in kg, from examples 12.8",
+ "mv1 = 3.827 # in kg, from example 12.8",
+ "mw2 = 3.146 # in kg, from example 12.8",
+ "# evaluating internal energies of dry air and water from Tables A-22 and A-2, respectively",
+ "ua2 = 210.49 # in kj/kg",
+ "ua1 = 281.1 # in kj/kg",
+ "ug2 = 2405.7 # in kj/kg",
+ "uf2 = 92.32 # in kj/kg",
+ "ug1 = 2529.3 # in kj/kg",
+ "",
+ "# Calculations",
+ "ma =( ((p1-pv1)*10**5)*V)/((Rbar/Ma)*(T1+273)) # mass of dry air in kg",
+ "Q = ma*(ua2-ua1) + mv2*ug2 + mw2*uf2 - mv1*ug1",
+ "",
+ "# Result",
+ "print 'The heat transfer during the process, in kJ is: ',Q"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer during the process, in kJ is: -10602.7454057"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.10 Page no-595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "AV1 = 150.0 # entry volumetric flow rate in m^3/min",
+ "T1 = 10.0 # entry temperature in degree celcius",
+ "psi1 = 0.8 ",
+ "T2 = 30.0 # exit temperature in degree celcius",
+ "p = 1.0 # in bar",
+ "",
+ "# Part(a)",
+ "Rbar = 8314.0 # universal gas constant",
+ "Ma = 28.97 # molar mass of air",
+ "# The specific enthalpies of the dry air are obtained from Table A-22 at the inlet and exit temperatures T1 and T2, respectively:",
+ "ha1 = 283.1 # in kj/kg",
+ "ha2 = 303.2 # in kj/kg",
+ "# The specific enthalpies of the water vapor are found using hv \u0004 hg and data from Table A-2 at T1 and T2, respectively:",
+ "hv1 = 2519.8 # in kj/kg",
+ "hv2 = 2556.3 # in kj/kg",
+ "# From table A-2",
+ "pg1 = 0.01228 # in bar",
+ "# Calculations",
+ "pv1 = psi1*pg1 # the partial pressure of the water vapor in bar",
+ "pa1 = p-pv1",
+ "va1 = (Rbar/Ma)*(T1+273)/(pa1*10**5) # specific volume of the dry air in m^3/kg",
+ "madot = AV1/va1 # mass flow rate of the dry air in kg/min",
+ "omega = 0.622*(pv1/(p-pv1)) # humidity ratio",
+ "Qcvdot = madot*((ha2-ha1)+omega*(hv2-hv1)) # in kj/min",
+ "# Result",
+ "print 'Rate of heat transfer, in kJ/min is: ',Qcvdot",
+ "",
+ "# Part(b)",
+ "# From Table A-2 at 30\u0004C",
+ "pg2 = 0.04246 # in bar",
+ "# Calculations",
+ "pv2 = pv1",
+ "psi2 = pv2/pg2 # relative humidity at the exit",
+ "# Result",
+ "print 'The relative humidity at the exit is: ',psi2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer, in kJ/min is: 3716.99116097",
+ "The relative humidity at the exit is: 0.231370701837"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.11 Page no-600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 30.0 # in degree celcius",
+ "AV1 = 280.0 # in m^3/min",
+ "psi1 = 0.5 # relative humidity at the inlet",
+ "T2 = 10.0 # in degree celcius",
+ "p = 1.013 # pressure in bar",
+ "",
+ "# Part(a)",
+ "# From table A-2",
+ "pg1 = 0.04246 # in bar",
+ "Rbar = 8314 # universal gas constant",
+ "Ma = 28.97 # molar mass of air",
+ "# Calculations",
+ "pv1 = psi1*pg1 # in bar",
+ "pa1 = p-pv1 # partial pressure of the dry air in bar",
+ "madot = AV1/((Rbar/Ma)*((T1+273)/(pa1*10**5))) # common mass flow rate of the dry air in kg/min",
+ "# Result",
+ "print 'The mass flow rate of the dry air in kg/min is: ',madot",
+ "",
+ "# Part(b)",
+ "# From table A-2",
+ "pv2 = 0.01228 # in bar",
+ "# Calculations",
+ "omega1 = 0.622*(pv1/(p-pv1))",
+ "omega2 = 0.622*(pv2/(p-pv2))",
+ "mwdotbymadot = omega1-omega2 ",
+ "# Result",
+ "print 'The rate at which water is condensed, in kg per kg of dry air flowing through the control volume is: ',mwdotbymadot",
+ "",
+ "# Part(c)",
+ "# From table A-2 and A-22",
+ "ha2 = 283.1 # in kg/kj",
+ "ha1 = 303.2 # in kg/kj",
+ "hg1 = 2556.3 # in kg/kj",
+ "hg2 = 2519.8 # in kg/kj",
+ "hf2 = 42.01 # in kg/kj",
+ "# Calculations",
+ "Qcvdot = madot*((ha2-ha1)-omega1*hg1+omega2*hg2+(omega1-omega2)*hf2) # in kj/min",
+ "# Result",
+ "print 'The required refrigerating capacity, in tons is: ',Qcvdot/211"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass flow rate of the dry air in kg/min is: 319.348473885",
+ "The rate at which water is condensed, in kg per kg of dry air flowing through the control volume is: 0.00568197500137",
+ "The required refrigerating capacity, in tons is: -52.4650572692"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.12 Page no-602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 22.0 # entry temperature of moist air in degree celcius",
+ "Twb = 9.0 # wet-bulb temperature of entering moist air in degree celcius",
+ "madot = 90.0 # mass flow rate of dry air in kg/min",
+ "Tst = 110.0 # temperature of injected saturated water vapor in degree celcius",
+ "mstdot = 52.0 # mass flow rate of injected saturated water vapor in kg/h",
+ "p = 1.0 # pressure in bar",
+ "",
+ "# Part(a)",
+ "# By inspection of the psychrometric chart",
+ "omega1 = 0.002",
+ "# Calculation",
+ "omega2 = omega1 + mstdot/(madot*60)",
+ "# Result",
+ "print 'The humidity ratio at the exit is: ',omega2",
+ "",
+ "# Part(b)",
+ "# The steady-state form of the energy rate balance can be rearranged as",
+ "# (ha + omega*hg)2 = (ha + omega*hg)1 + (omega2-omega1)*hg3",
+ "# On putting values in the above equation from tables and figures, temperature at the exit can then be read directly from the chart",
+ "T2 = 23.5 # in degree celcius",
+ "# Result",
+ "print 'The temperature at the exit in degree celcius is: ',T2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The humidity ratio at the exit is: 0.0116296296296",
+ "The temperature at the exit in degree celcius is: 23.5"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.13 Page no-604"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 38.0 # temperature of entering air in degree celcius",
+ "psi1 = 0.1 # relative humidity of entering air ",
+ "AV1 = 140.0 # volumetric flow rate of entering air in m^3/min",
+ "Tw = 21.0 # temperature of added water in degree celcius",
+ "T2 = 21.0 # temperature of exiting moist air in degree celcius",
+ "p = 1.0 # pressure in atm",
+ "",
+ "# Part(a)",
+ "# From table A-2",
+ "pg1 = 0.066 # in bar",
+ "# The specific volume of the dry air can be evaluated from the ideal gas equation of state. The result is",
+ "va1 = .887 # in m^3/kg",
+ "cpa = 1.005",
+ "# From table A-2",
+ "hf = 88.14",
+ "hg1 = 2570.7",
+ "hg2 = 2539.94",
+ "# Calculations",
+ "pv1 = psi1*pg1 # the partial pressure of the moist air entering the control volume in bar",
+ "omega1 = 0.622*(pv1/(p*1.01325-pv1))",
+ "omega2 = (cpa*(T1-T2)+omega1*(hg1-hf))/(hg2-hf)",
+ "madot = AV1/va1 # mass flow rate of the dry air in kg/min",
+ "mwdot = madot*60*(omega2-omega1) # in kg/h",
+ "# Result",
+ "print 'The mass flow rate of the water to the soaked pad in kj/h is: ',mwdot",
+ "",
+ "# Part(b)",
+ "pv2 = (omega2*p*1.01325)/(omega2+0.622) # in bars",
+ "# At 21\u0004C, the saturation pressure is",
+ "pg2 = 0.02487",
+ "psi2 = pv2/pg2",
+ "# Result",
+ "print 'The relative humidity of the moist air at the exit to the evaporative cooler is: ',psi2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass flow rate of the water to the soaked pad in kj/h is: 66.4756578168",
+ "The relative humidity of the moist air at the exit to the evaporative cooler is: 0.714165693403"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 12.14 Page no-607"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "AV1 = 142.0 # in m^3/min",
+ "T1 = 5.0 # in degree celcius",
+ "omega1 = 0.002",
+ "AV2 = 425.0 # in m^3/min",
+ "T2 = 24.0 # in degree celcius",
+ "psi2 = 0.5",
+ "p = 1.0 # in bar",
+ "",
+ "",
+ "# Part(a)",
+ "# From the psychrometric chart, Fig. A-9.",
+ "va1 = 0.79 # in m^3/kg",
+ "va2 = 0.855 # in m^3/kg",
+ "omega2 = 0.0094",
+ "# Calculations",
+ "ma1dot = AV1/va1 # in kg/min",
+ "ma2dot = AV2 /va2 # in kg/min",
+ "omega3 = (omega1*ma1dot+omega2*ma2dot)/(ma1dot + ma2dot) ",
+ "# Result",
+ "print 'The humidity ratio is: ',omega3",
+ "",
+ "# Part(b)",
+ "# Reduction of the energy rate balance gives",
+ "# (ha + omega*hv)3 = [ma1dot*(ha + omega*hv)1 + ma2dot*(ha + omega*hv)2]/(ma1dot+ma2dot)",
+ "# With (ha + omega*hv)1 = 10kj/kg and (ha + omega*hv)2 = 47.8kj/kg from figure A-9",
+ "LHS = (ma1dot*10+ma2dot*47.8)/(ma1dot + ma2dot)",
+ "",
+ "# This value for the enthalpy of the moist air at the exit, together with the previously determined value for omega3, fixes the state of the exiting moist air. From inspection of Fig. A-9,",
+ "T3 = 19.0 # in degree celcius",
+ "# Result",
+ "print 'The temperature of the exiting mixed stream in degree celcius is: ',T3"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The humidity ratio is: 0.0074347493219",
+ "The temperature of the exiting mixed stream in degree celcius is: 19.0"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 12.15 Page no-610"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 38.0 # in degree celcius",
+ "m1dot = 4.5e7 # in kg/h",
+ "T2 = 30.0 # in degree celcius",
+ "m2dot = 4.5e7 # in kg/h",
+ "T3 = 25.0 # in degree celcius",
+ "psi3 = 0.35",
+ "T4 = 35.0 # in degree celcius",
+ "psi4 = 0.9",
+ "T5 = 20.0 # in degree celcius",
+ "",
+ "# Analysis",
+ "# The humidity ratios omega3 and omega4 can be determined using the partial pressure of the water vapor obtained with the respective relative humidity",
+ "omega3 =0.00688",
+ "omega4 = 0.0327",
+ "# From tables A-2 and A-22",
+ "hf1 = 159.21",
+ "hf2 = 125.79",
+ "ha4 = 308.2",
+ "ha3 = 298.2",
+ "hg4 = 2565.3",
+ "hg3 = 2547.2",
+ "hf5 = 83.96",
+ "# Calculations",
+ "madot = (m1dot*(hf1-hf2))/(ha4-ha3+omega4*hg4-omega3*hg3-(omega4-omega3)*hf5) # in kg/h",
+ "m5dot = madot*(omega4-omega3) # in kg/h",
+ "# Results",
+ "print 'The mass flow rate of dry air in kg/h is: ',madot",
+ "print 'The mass flow rate of makeup water in kg/h is: ',m5dot"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass flow rate of dry air in kg/h is: 20270180.9849",
+ "The mass flow rate of makeup water in kg/h is: 523376.07303"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_13.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_13.ipynb
new file mode 100755
index 00000000..25b44540
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_13.ipynb
@@ -0,0 +1,931 @@
+{
+ "metadata": {
+ "name": "Chapter 13"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 13 :- Reacting Mixtures and Combustion"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.1 Page no-624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "# The combustion equation can be written in the form of ",
+ "# C8H18 + a(O2 + 3.76N2) --> b CO2 + c H2O + d N2",
+ "# Using conservation of mass principle",
+ "b = 8.00",
+ "c = 18.00/2.00",
+ "a = (2.00*b+c)/2.00",
+ "d = 3.76*a",
+ "",
+ "# The air\u2013fuel ratio on a molar basis is",
+ "AFbar = a*(1+3.76)/1.00",
+ "Ma = 28.97 # molar mass of air",
+ "MC8H18 = 114.22 # molar mass of C8H18",
+ "# The air\u2013fuel ratio expressed on a mass basis is",
+ "AF = AFbar*(Ma/MC8H18)",
+ "",
+ "# Result",
+ "print '-> The air\u2013fuel ratio on a molar basis is: '",
+ "print AFbar",
+ "print '-> The air\u2013fuel ratio expressed on a mass basis is: '",
+ "print round(AF,2)",
+ "",
+ "# Part(b)",
+ "# For 150% theoretical air, the chemical equation for complete combustion takes the form",
+ "# c8H18 + 1.5*12.5*(O2 + 3.76N2) ---> b CO2 + c H2O + d N2 + e O2",
+ "# Using conservation of mass",
+ "# Calculations",
+ "b = 8.00",
+ "c =18.00/2.00",
+ "e = (1.5*12.5*2 - c -2*b)/2.00",
+ "d = 1.5*12.5*3.76",
+ "# The air\u2013fuel ratio on a molar basis is",
+ "AFbar = 1.5*12.5*(1+3.76)/1",
+ "# The air\u2013fuel ratio expressed on a mass basis is",
+ "AF = AFbar*(Ma/MC8H18)",
+ "",
+ "# Results",
+ "print '-> The air\u2013fuel ratio on a molar basis is: '",
+ "print AFbar",
+ "print '-> The air\u2013fuel ratio expressed on a mass basis is: '",
+ "print round(AF,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The air\u2013fuel ratio on a molar basis is: ",
+ "59.5",
+ "-> The air\u2013fuel ratio expressed on a mass basis is: ",
+ "15.09",
+ "-> The air\u2013fuel ratio on a molar basis is: ",
+ "89.25",
+ "-> The air\u2013fuel ratio expressed on a mass basis is: ",
+ "22.64"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.2 Page no-626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "# The chemical equation",
+ "# a CH4 + b*(O2 + 3.76N2) ---> 9.7CO2 + .5CO + 2.95O2 + 86.85N2 + cH2O",
+ "# Calculations",
+ "# Applying conservation of mass ",
+ "a = 9.7 + 0.5",
+ "c = 2.0*a",
+ "b = ((9.7)*(2.0)+(0.5)+((2.0)*(2.95))+c)/2.00",
+ "Ma = 28.97 # molar mass of air",
+ "MCH4 = 16.04 # molar mass of methane",
+ "# On a molar basis, the air\u2013fuel ratio is",
+ "AFbar = (b*(1+3.76))/a",
+ "# On a mass basis",
+ "AF = AFbar*(Ma/MCH4)",
+ "",
+ "# Results",
+ "print '-> The air-fuel ratio on a molar basis is: '",
+ "print AFbar",
+ "print '-> The air-fuel ratio on a mass basis is: '",
+ "print round(AF,2)",
+ "",
+ "# Part(b)",
+ "# The balanced chemical equation for the complete combustion of methane with the theoretical amount of air is",
+ "# CH4 + 2(O2 + 3.76N2) ---> CO2 + 2H2O + 7.52N2",
+ "# The theoretical air\u2013fuel ratio on a molar basis is",
+ "# Calculations",
+ "AFbartheo = 2.00*(1+3.76)/1.0",
+ "# The percent theoretical air is",
+ "Ta = AFbar/AFbartheo",
+ "# Result",
+ "print '-> The percent theoretical air is: '",
+ "print round(Ta*100,2)",
+ "",
+ "# Ppart(c)",
+ "# The mole fraction of the water vapor is",
+ "yv = 20.4/(100+20.4)",
+ "pv = yv*1",
+ "# Interpolating in Table A-2,",
+ "T = 57 # in degree celcius",
+ "# Result",
+ "print '-> The dew point temperature of the products, in \u0004C, if the mixture were cooled at 1 atm is: '",
+ "print T"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The air-fuel ratio on a molar basis is: ",
+ "10.78",
+ "-> The air-fuel ratio on a mass basis is: ",
+ "19.47",
+ "-> The percent theoretical air is: ",
+ "113.24",
+ "-> The dew point temperature of the products, in \u0004C, if the mixture were cooled at 1 atm is: ",
+ "57"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 13.3 Page no-628"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "# The chemical equation",
+ "# (.8062CH4 + .0541C2H6 + .0187C3H8 + .0160C4H10 + .1050N2) + a(O2 + 3.76N2) ----> b(.078CO2 + .002CO + .07O2 + .85N2) + c H2O",
+ "# Calculations",
+ "# Using mass conservation",
+ "b = (0.8062 + 2*.0541 + 3*.0187 + 4*.0160)/(.078 + .002)",
+ "c = (4*.8062 + 6*.0541 + 8*.0187 + 10*.0160)/2",
+ "a = (b*(2*.078+.002+2*.07) + c)/2",
+ "# The air\u2013fuel ratio on a molar basis is",
+ "AFbar = a*(1+3.76)/1",
+ "# Result",
+ "print '-> The air-fuel ratio on a molar mass basis is: '",
+ "print round(AFbar,2)",
+ "",
+ "# Part(b)",
+ "p = 1.0 # in bar",
+ "V = 100.0 # in m^3",
+ "Rbar = 8314.0 # in N.m/kmol.K",
+ "T = 300.0 # in kelvin",
+ "# Calculations",
+ "# The amount of fuel in kmol",
+ "nF = (p*10**5*V)/(Rbar*T)",
+ "# The amount of product mixture that would be formed from 100 m3 of fuel mixture is",
+ "n = nF*(b+c)",
+ "# Result",
+ "print '-> The amount of products in kmol that would be formed from 100 m3 of fuel mixture at 300 K and 1 bar is: '",
+ "print round(n,2)",
+ "",
+ "# Part(c)",
+ "# The balanced chemical equation for the complete combustion of the fuel mixture with the theoretical amount of air is",
+ "# (10.8062CH4 + 0.0541C2H6 + 0.0187C3H8 + 0.0160C4H10 + 0.1050N2) + 2(O2 + 3.76N2) ----> 1.0345CO2 + 1.93H2O + 7.625N2",
+ "# Calculations",
+ "# The theoretical air\u2013fuel ratio on a molar basis is",
+ "AFbartheo = 2*(1+3.76)/1",
+ "# The percent theoretical air is",
+ "Ta = AFbar/AFbartheo",
+ "# Result",
+ "print '-> The percent of theoretical air is: '",
+ "print round(Ta*100,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The air-fuel ratio on a molar mass basis is: ",
+ "13.76",
+ "-> The amount of products in kmol that would be formed from 100 m3 of fuel mixture at 300 K and 1 bar is: ",
+ "59.58",
+ "-> The percent of theoretical air is: ",
+ "144.58"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.4 Page no-633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# The balanced chemical equation for complete combustion with the theoretical amount of air is obtained from the solution to Example 13.1 as",
+ "# C8H18 +12.5O2 + 47N2 -----> 8CO2 + 9H2O + 47N2",
+ "# From tabel A-25",
+ "hRbar = -249910 # in kj/kmol",
+ "mfdot = 1.8e-3 # mass flow rate of liquid octane in kg/s",
+ "M = 114.22 # molar mass of octane",
+ "Wcvdot = 37 # power output of the engine in kw",
+ "",
+ "# Calculations",
+ "# With enthalpy of formation values for CO2 and H2O(g) from Table A-25, and enthalpy values for N2, H2O, and CO2 from Table A-23",
+ "hpbar = 8*(-393520 + (36876 - 9364)) + 9*(-241820 + (31429 - 9904)) + 47*((26568 - 8669))",
+ "nFdot = mfdot/M # molar flow rate of the fuel in kmol/s",
+ "Qcvdot = Wcvdot + nFdot*(hpbar-hRbar) # in kw",
+ "",
+ "# Result",
+ "print '-> The rate of heat transfer from the engine, in kW is: '",
+ "print round(Qcvdot,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of heat transfer from the engine, in kW is: ",
+ "-23.19"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 13.5 Page no-635"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# When expressed on a per mole of fuel basis, the balanced chemical equation obtained in the solution to Example 13.2 takes the form",
+ "# CH4 + 2.265O2 + 8.515N2 ------> .951CO2 + .049CO + .289O2 + 8.515N2 + 2H2O",
+ "cpbar = 38.00 # specific heat in KJ/kmol.K",
+ "# From table A-25",
+ "hfnotbar = -74850.00 # enthalpy of formation for methane",
+ "# From table A-23",
+ "deltahbarO2 = 14770-8682",
+ "deltahbarN2 = 14581-8669",
+ "",
+ "# Calculations",
+ "hRbar = hfnotbar + cpbar*(400-298) + 2.265*deltahbarO2 + 8.515*deltahbarN2 # in kj/kmol",
+ "# With enthalpy of formation values for CO2, CO, and H2O(g) from Table A-25 and enthalpy values from Table A-23",
+ "hpbar = .951*(-393520 + (88806 - 9364)) + .049*(-110530 + (58191 - 8669)) + .289*(60371 - 8682) + 8.515*(57651 - 8669) + 2*(-241820 + (72513 - 9904))",
+ "Qcvdot = hpbar - hRbar # in kj/kmol",
+ "",
+ "# Result",
+ "print '-> The rate of heat transfer from the combustion chamber in kJ per kmol of fuel is: '",
+ "print round(Qcvdot,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of heat transfer from the combustion chamber in kJ per kmol of fuel is: ",
+ "-221235.72"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.6 Page no-637"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "nCH4 = 1.00 # moles of methane in kmol",
+ "nO2 = 2.00 # moles of oxygen in kmol",
+ "T1 = 25.00 # in degree celcius",
+ "p1 = 1.00 # in atm",
+ "T2 = 900.00 # in kelvin",
+ "Rbar = 8.314 # universal gas constant",
+ "# The chemical reaction equation for the complete combustion of methane with oxygen is",
+ "# CH4 + 2O2 ----> CO2 + 2H2O",
+ "",
+ "# Part(a)",
+ "# with enthalpy of formation values from table A-25",
+ "hfbarCO2 = -393520",
+ "hfbarH2O = -241820",
+ "hfbarCH4 = -74850",
+ "# Calculations",
+ "# with enthalpy values from table A-23",
+ "deltahbarCO2 = 37405-9364",
+ "deltahbarH2O = 31828-9904",
+ "Q = ((hfbarCO2 + deltahbarCO2)+2*(hfbarH2O + deltahbarH2O) - hfbarCH4) + 3*Rbar*(T1+273-T2)",
+ "# Result",
+ "print '-> The amount of heat transfer in kJ is: '",
+ "print round(Q,2)",
+ "",
+ "# Part(b)",
+ "p2 = p1*(T2/(T1+273)) # in atm",
+ "# Result",
+ "print '-> The final pressure in atm is: '",
+ "print round(p2,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The amount of heat transfer in kJ is: ",
+ "-745436.08",
+ "-> The final pressure in atm is: ",
+ "3.02"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.7 Page no-639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# The combustion equation is",
+ "# CH4 + 2O2 + 7.52N2 ----> CO2 + 2H2O + 7.52N2",
+ "",
+ "# Part(a)",
+ "# With enthalpy of formation values from Table A-25",
+ "hfbarCO2 = -393520 # in kj/kmol",
+ "hfbarH2O = -285830 # in kj/kmol",
+ "hfbarCH4 = -74850 # in kj/kmol",
+ "M = 16.04 # molar mass of CH4 in kg/kmol",
+ "# Calculations",
+ "hRPbar = hfbarCO2 + 2*hfbarH2O - hfbarCH4 # in kj/kmol",
+ "hRP = hRPbar/M # in kj/kg",
+ "# Result",
+ "print '-> Part(a)the enthalpy of combustion of gaseous methane, fuel is: ',hRP,'kJ/kg.'",
+ "",
+ "# Part(b)",
+ "hfbarCO2 = -393520 # in kj/kmol",
+ "hfbarH2O = -241820 # in kj/kmol",
+ "hfbarCH4 = -74850 # in kj/kmol",
+ "# Calculations",
+ "hRPbar = hfbarCO2 + 2*hfbarH2O - hfbarCH4 # in kj/kmol",
+ "hRP = hRPbar/M # in kj/kg",
+ "# Result",
+ "print '-> Part(b)the enthalpy of combustion of gaseous methane, fuel is: ',hRP,'kJ/kg'",
+ "",
+ "# Part(c)",
+ "# From table A-23",
+ "deltahbarO2 = 31389-8682 # in kj/kmol",
+ "deltahbarH2O = 35882-9904 # in kj/kmol",
+ "deltahbarCO2 = 42769-9364 # in kj/kmol",
+ "",
+ "# Using table A-21",
+ "# Calculations",
+ "# function cpbar = f(T)",
+ "T=298 # in kelvin",
+ "from scipy import integrate",
+ "cpbar = lambda T: (3.826 - (3.979e-3)*T + 24.558e-6*T**2 - 22.733e-9*T**3 + 6.963e-12*T**4)*8.314",
+ "deltahbarCH4 = integrate.quad(cpbar,298,1000)",
+ "var = deltahbarCH4[0]",
+ "",
+ "hRPbar = hRPbar + (deltahbarCO2 + 2*deltahbarH2O - var -2*deltahbarO2)",
+ "hRP = hRPbar/M # in kj/kg",
+ "# Result",
+ "print '-> Part(c)the enthalpy of combustion of gaseous methane, per kg of fuel is ',hRP,'kJ/kg'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a)the enthalpy of combustion of gaseous methane, fuel is: -55506.8578554 kJ/kg.",
+ "-> Part(b)the enthalpy of combustion of gaseous methane, fuel is: -50019.3266833 kJ/kg",
+ "-> Part(c)the enthalpy of combustion of gaseous methane, per kg of fuel is -49909.7030379 kJ/kg"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.8 Page no-643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "# For combustion of liquid octane with the theoretical amount of air, the chemical equation is",
+ "# C8H18(l) + 12.5 O2 + 47N2 -------> 8 CO2 + 9 H2O(g) + 47N2",
+ "# with enthalpy of formation data from Table A-25",
+ "hfbarC8H18 = -249910.0 # in kj/kmol",
+ "hfbarCO2 = -393520.0",
+ "hfbarH2O = -241820.0",
+ "",
+ "# Calculations",
+ "RHS = hfbarC8H18 -(8*hfbarCO2 + 9*hfbarH2O) # in kj/kmol",
+ "# at temperature 2400k",
+ "LHS1 = 5089337.0 # in kj/kmol",
+ "# at temperature 2350 k",
+ "LHS2 = 4955163.0 # in kj/kmol",
+ "# Interpolation between these temperatures gives",
+ "Tp = 2400.00 + ((2400.0-2350.0)/(LHS1-LHS2))*(RHS-LHS1)",
+ "# Result",
+ "print '-> The temperature in kelvin with theoretical amount of air is: '",
+ "print round(Tp,2)",
+ "",
+ "# Part(b)",
+ "# For complete combustion of liquid octane with 400% theoretical air, the chemical equation is",
+ "# C8H18(l) + 50O2 + 188N2 --------> 8CO2 + 9H2O + 37.5O2 + 188N2",
+ "",
+ "# Proceeding iteratively as part(a)",
+ "Tp = 962 # in kelvin",
+ "",
+ "# Result",
+ "print '-> The temperature in kelvin using 400 percent theoretical air is: '",
+ "print round(Tp,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The temperature in kelvin with theoretical amount of air is: ",
+ "2394.52",
+ "-> The temperature in kelvin using 400 percent theoretical air is: ",
+ "962.0"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.9 Page no-649"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "import math",
+ "# Part(a)",
+ "Tp = 2395 # in kelvin, from example 13.8",
+ "# For combustion of liquid octane with the theoretical amount of air, the chemical equation is",
+ "# C8H18(l) + 12.5O2 + 47N2 ----> 8CO2 + 9H2O(g) + 47N2",
+ "",
+ "# From table A-25",
+ "sFbar = 360.79 # absolute entropy of liquid octane in kj/kmol.K",
+ "",
+ "# From table A-23",
+ "# For reactant side",
+ "sbarO2atTref = 205.03 # in kj/kmol.K",
+ "sbarN2atTref = 191.5 # in kj/kmol.K",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "yO2 = 0.21",
+ "yN2 = 0.79",
+ "# For product side",
+ "yCO2 = 8.0/64.0",
+ "yH2O = 9.0/64.0",
+ "yN2p = 47.0/64.0",
+ "",
+ "# Calculations",
+ "sbarO2 = sbarO2atTref - Rbar*math.log(yO2) # in kj/kmol.K",
+ "sbarN2 = sbarN2atTref - Rbar*math.log(yN2) # in kj/kmol.K",
+ "# With the help from table A-23",
+ "sbarCO2 = 320.173 - Rbar*math.log(yCO2)",
+ "sbarH2O = 273.986 - Rbar*math.log(yH2O)",
+ "sbarN2p = 258.503 - Rbar*math.log(yN2p)",
+ "sigmadot = (8*sbarCO2 + 9*sbarH2O + 47*sbarN2p) - sFbar - (12.5*sbarO2 + 47*sbarN2)",
+ "",
+ "# Result",
+ "print '-> The rate of entropy production, in kJ/K per kmol of fuel with theoretical amount of air is: '",
+ "print round(sigmadot,2)",
+ "",
+ "# Part(b)",
+ "# The complete combustion of liquid octane with 400% theoretical air is described by the following chemical equation:",
+ "# C8H18(l) + 50 O2 + 188N2 -----> 8 CO2 + 9H2O(g) + 37.5O2 + 188N2",
+ "",
+ "# For product side ",
+ "yCO2 = 8.0/242.5",
+ "yH2O = 9.0/242.5",
+ "yO2 = 37.5/242.5",
+ "yN2p = 188.0/242.5",
+ "# Calculations",
+ "# With help from table A-23",
+ "sbarCO2 = 267.12 - Rbar*math.log(yCO2)",
+ "sbarH2O = 231.01 - Rbar*math.log(yH2O)",
+ "sbarO2p = 242.12 - Rbar*math.log(yO2)",
+ "sbarN2p = 226.795 - Rbar*math.log(yN2p)",
+ "sigmadot = (8.0*sbarCO2 + 9.0*sbarH2O + 37.5*sbarO2p +188.0*sbarN2p) -sFbar - (50.0*sbarO2 + 188.0*sbarN2)",
+ "",
+ "# Result",
+ "print '-> The rate of entropy production, in kJ/K per kmol of fuel with 400 percent theoretical air is: '",
+ "print round(sigmadot,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of entropy production, in kJ/K per kmol of fuel with theoretical amount of air is: ",
+ "5404.17",
+ "-> The rate of entropy production, in kJ/K per kmol of fuel with 400 percent theoretical air is: ",
+ "9754.75"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.10 Page no-653"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "import math",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "# The chemical equation for the complete combustion of methane with oxygen is",
+ "# CH4 + 2O2 ----> CO2 + 2H2O",
+ "yCH4 = 1.0/3.0",
+ "yO2 = 2.0/3.0",
+ "yCO2 = 1.0/3.0",
+ "yH2O = 2.0/3.0",
+ "# From table A-25",
+ "sbarCH4atTref = 186.16 # in kj/kmol.K",
+ "sbarO2atTref = 205.03 # in kj/kmol.K",
+ "p2 = 3.02 # in atm",
+ "pref = 1.0 # in atm",
+ "",
+ "# Calculations",
+ "sbarCH4 = sbarCH4atTref - Rbar*math.log(yCH4)",
+ "sbarO2 = sbarO2atTref - Rbar*math.log(yO2)",
+ "# With help from table A-23",
+ "sbarCO2 = 263.559 - Rbar*math.log(yCO2*p2/pref) # in kj/kmol.K",
+ "sbarH2O = 228.321 - Rbar*math.log(yH2O*p2/pref) # in kj/kmol.K",
+ "deltaS = sbarCO2 + 2*sbarH2O - sbarCH4 -2*sbarO2 # in kj/K",
+ "",
+ "# Result",
+ "print '-> The change in entropy of the system is: ',round(deltaS,2),'kJ/K'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The change in entropy of the system is: 96.41 kJ/K"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.11 Page no-654"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Methane is formed from carbon and hydrogen according to",
+ "# C + 2H2 ------> CH4",
+ "",
+ "# In the present case, all substances are at the same temperature and pressure, 25\u0004C and 1 atm, which correspond to the standard reference state values",
+ "hCbar = 0",
+ "hH2bar = 0",
+ "gRbar = 0",
+ "# With enthalpy of formation and absolute entropy data from Table A-25",
+ "hfbarCH4 = -74850",
+ "sbarCH4 = 186.16",
+ "sbarC = 5.74",
+ "sbarH2 = 130.57",
+ "Tref = 298.15 # in kelvin",
+ "",
+ "# Calculation",
+ "gfbarCH4 = hfbarCH4 -Tref*(sbarCH4-sbarC-2*sbarH2) # in kj/kmol",
+ "",
+ "# Result",
+ "print '-> The gibbs function of formation of methane at the standard state is: ',gfbarCH4,'kJ/mol'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The gibbs function of formation of methane at the standard state is: -50783.332 kJ/mol"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 13.12 Page no-662"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Complete combustion of liquid octane with O2 is described by",
+ "# C8H18(l) + 12.5O2 ------> 8CO2 + 9H2O",
+ "import math",
+ "# Part(a)",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "Tnot = 298.15 # in kelvin",
+ "# From table A-25",
+ "gbarC8H18 = 6610.0",
+ "gbarO2 = 0",
+ "gbarCO2 = -394380",
+ "gbarH2O = -228590",
+ "yO2 = 0.2035",
+ "yCO2 = 0.0003",
+ "yH2O = 0.0312",
+ "M = 114.22 # molecular weight of liquid octane",
+ "",
+ "# Calculations",
+ "ech = ((gbarC8H18 + 12.5*gbarO2 -8*gbarCO2 -9*gbarH2O) + Rbar*Tnot*math.log(yO2**12.5/(yCO2**8*yH2O**9 )))/M",
+ "# Result",
+ "print '-> Part(a) the chemical exergy obtained on a unit mass basis is: ',round(ech,2),'kJ/K'",
+ "",
+ "# Part(b)",
+ "# With data from Table A-25 and Model II of Table A-26",
+ "gbarH2O = -237180.0",
+ "ebarCO2 = 19870.0",
+ "ebarH2O = 900.0",
+ "ebarO2 = 3970.0",
+ "",
+ "# Calculation",
+ "ech = ((gbarC8H18 + 12.5*gbarO2 -8*gbarCO2 - 9*gbarH2O) + 8*ebarCO2 + 9*ebarH2O - 12.5*ebarO2)/M",
+ "# Result",
+ "print '-> Part(b) chemical exergy on a unit mass basis is:',round(ech,3),'kJ/K'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a) the chemical exergy obtained on a unit mass basis is: 47345.85 kJ/K",
+ "-> Part(b) chemical exergy on a unit mass basis is: 47397.172 kJ/K"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.13 Page no-665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "import math",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "Tnot = 298.0 # in kelvin",
+ "# With data from the steam tables",
+ "h = 2939.9 # in kj/kg",
+ "hnot = 104.9 # in kj/kg",
+ "s = 7.2307 # in kj/kg",
+ "snot = 0.3674 # in kj/kg",
+ "# With data from Table A-25",
+ "gbarH2Oliq = -237180.0",
+ "gbarH2Ogas = -228590.0",
+ "yeH2O = 0.0303",
+ "M =18.0 # molar mass of steam",
+ "",
+ "# Calculations",
+ "ech = (1.0/M)*(gbarH2Oliq-gbarH2Ogas + Rbar*Tnot*math.log(1/yeH2O)) # in kj/kg",
+ "ef = h-hnot-Tnot*(s-snot) + ech # in kj/kg",
+ "",
+ "# Result",
+ "print '-> The flow exergy of the steam, in kJ/k is: '",
+ "print round(ef,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The flow exergy of the steam, in kJ/k is: ",
+ "793.8"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.14 Page no-665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# For 140% theoretical air, the reaction equation for complete combustion of methane is",
+ "# CH4 + 2.8(O2 + 3.76N2) -------> CO2 + 2H2O + 10.53N2 + .8O2",
+ "",
+ "# For product side",
+ "yCO2p = 1.0/(1.0+2.0+10.53+.8)",
+ "yH2Op = 2.0/(1.0+2.0+10.53+.8)",
+ "yN2p = 10.53/(1.0+2.0+10.53+.8)",
+ "yO2p = 0.8/(1.0+2.0+10.53+.8)",
+ "",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "Tnot = 298.15 # in kelvin",
+ "",
+ "yeN2 = 0.7567",
+ "yeO2 = 0.2035",
+ "yeH2O = 0.0303",
+ "yeCO2 = 0.0003",
+ "",
+ "# Calculations",
+ "import math",
+ "ebarch = Rbar*Tnot*(math.log(yCO2p/yeCO2) + 2*math.log(yH2Op/yeH2O) + 10.53*math.log(yN2p/yeN2) + .8*math.log(yO2p/yeO2))",
+ "",
+ "# with data from tables A-23 at 480 and 1560 kelvin,the thermomechanical contribution to the flow exergy, per mole of fuel, is",
+ "contri480 = 17712.0 # kJ per kmol of fuel",
+ "contri1560 = 390853.0 # kJ per kmol of fuel",
+ "efbar480 = contri480 + ebarch # kJ per kmol of fuel",
+ "efbar1560 = contri1560 + ebarch # kJ per kmol of fuel",
+ "",
+ "# Results",
+ "print '-> At T= 480k, the flow exergy of the combustion products, in kJ per kmol of fuel is: '",
+ "print round(efbar480,2)",
+ "print '-> At T = 1560K, the flow exergy of the combustion products, in kJ per kmol of fuel is: '",
+ "print round(efbar1560,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> At T= 480k, the flow exergy of the combustion products, in kJ per kmol of fuel is: ",
+ "35461.61",
+ "-> At T = 1560K, the flow exergy of the combustion products, in kJ per kmol of fuel is: ",
+ "408602.61"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 13.15 Page no-667"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "mFdot = 1.8e-3 # fuel mass flow rate in kg/s",
+ "ech = 47346.0 # in kj/kg, from example 13.12(a)",
+ "Wcvdot = 37.0 # power developed by the engine in kw",
+ "",
+ "# Calculations",
+ "Efdot = mFdot*ech # rate at which exergy enters with the fuel in kw",
+ "epsilon = Wcvdot/Efdot # exergetic efficiency",
+ "",
+ "# Result",
+ "print '-> The exergetic efficiency is: '",
+ "print round(epsilon,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The exergetic efficiency is: ",
+ "0.434"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 13.16 Page no-668"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "Tnot = 298 # in kelvin",
+ "",
+ "# For the case of complete combustion with the theoretical amount of air",
+ "sigmadot = 5404.0 # rate of entropy production from example 13.9, in kj/kmol.K",
+ "Efdot = 5407843.0 # rate at which exergy enters with the fuel from example 13.12, in kj/kmol",
+ "# Calculations:-",
+ "Eddot = Tnot*sigmadot # in kj/kmol",
+ "epsilon = 1-Eddot/Efdot",
+ "# Result",
+ "print '-> The exergetic efficiency with theoretical amount of air is: '",
+ "print round(epsilon,3)",
+ "",
+ "# For the case of combustion with 400% theoretical air",
+ "sigmadot = 9754.0 # rate of entropy production from example 13.9, in kj/kmol.K",
+ "# Calculations",
+ "Eddot = Tnot*sigmadot # in kj/kmol",
+ "epsilon = 1-Eddot/Efdot",
+ "# Result",
+ "print 'The exergetic efficiency with 400 percent theoretical amount of air is: '",
+ "print round(epsilon,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The exergetic efficiency with theoretical amount of air is: ",
+ "0.702",
+ "The exergetic efficiency with 400 percent theoretical amount of air is: ",
+ "0.463"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_14.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_14.ipynb
new file mode 100755
index 00000000..8a0c0563
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_14.ipynb
@@ -0,0 +1,460 @@
+{
+ "metadata": {
+ "name": "Chapter 14"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 14 :- Chemical and Phase Equilibrium"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.1 Page no-688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# The reaction is CO + .5O2 ----> CO2",
+ "# Part(a)",
+ "T = 298.0 # in kelvin",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "# From table A-25",
+ "",
+ "hfbarCO2 = -393520.0 # in kj/kmol",
+ "hfbarCO = -110530.0 # in kj/kmol",
+ "hfbarO2 = 0 # in kj/kmol",
+ "deltahbarCO2 = 0 # in kj/kmol",
+ "deltahbarCO = 0 # in kj/kmol",
+ "deltahbarO2 = 0 # in kj/kmol",
+ "sbarCO2 = 213.69 # in kj/kmol.K",
+ "sbarCO = 197.54 # in kj/kmol.K",
+ "sbarO2 = 205.03 # in kj/kmol.K",
+ "# From table A-27",
+ "logKtable = 45.066",
+ "# Calculations",
+ "import math",
+ "deltaG = (hfbarCO2-hfbarCO-.5*hfbarO2) + (deltahbarCO2-deltahbarCO-.5*deltahbarO2) - T*(sbarCO2-sbarCO-.5*sbarO2)",
+ "lnK = -deltaG/(Rbar*T)",
+ "logK = (1/math.log(10))*lnK",
+ "# Results",
+ "print '-> Part(a) the value of equilibrium constant expressed as log10K is: '",
+ "print logK",
+ "print '-> The value of equilibrium constant expressed as log10K from table A-27 is: '",
+ "print logKtable",
+ "",
+ "# Part(b)",
+ "T = 2000.0 # in kelvin",
+ "# From table A-23",
+ "hfbarCO2 = -393520.0 # in kj/kmol",
+ "hfbarCO = -110530.0 # in kj/kmol",
+ "hfbarO2 = 0 # in kj/kmol",
+ "deltahbarCO2 = 100804-9364 # in kj/kmol",
+ "deltahbarCO = 65408 - 8669 # in kj/kmol",
+ "deltahbarO2 = 67881 - 8682 # in kj/kmol",
+ "sbarCO2 = 309.210 # in kj/kmol.K",
+ "sbarCO = 258.6 # in kj/kmol.K",
+ "sbarO2 = 268.655 # in kj/kmol.K",
+ "# Calculations",
+ "deltaG = (hfbarCO2-hfbarCO-.5*hfbarO2) + (deltahbarCO2-deltahbarCO-.5*deltahbarO2) - T*(sbarCO2-sbarCO-.5*sbarO2)",
+ "lnK = -deltaG/(Rbar*T)",
+ "logK = (1/math.log(10))*lnK",
+ "# From table A-27",
+ "logKtable = 2.884",
+ "# Results",
+ "print '-> Part(b) the value of equilibrium constant expressed as log10K is: '",
+ "print logK",
+ "print '-> The value of equilibrium constant expressed as log10K from table A-27 is: '",
+ "print logKtable"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a) the value of equilibrium constant expressed as log10K is: ",
+ "45.094010685",
+ "-> The value of equilibrium constant expressed as log10K from table A-27 is: ",
+ "45.066",
+ "-> Part(b) the value of equilibrium constant expressed as log10K is: ",
+ "2.88485359375",
+ "-> The value of equilibrium constant expressed as log10K from table A-27 is: ",
+ "2.884"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.2 Page no-690"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Applying conservation of mass, the overall balanced chemical reaction equation is",
+ "# CO + .5O2 -------> zCO + (z/2)O2 + (1-z)CO2",
+ "",
+ "# At 2500 K, Table A-27 gives",
+ "log10K = -1.44",
+ "# Part(a)",
+ "p = 1.0 # in atm",
+ "# Calculations",
+ "import math",
+ "K = (10.0)**(log10K) # equilibrium constant",
+ "# Solving equation K = (z/(1-z))*(2/(2 + z))^.5 *(p/1)^.5 gives",
+ "z = 0.129",
+ "yCO = 2.0*z/(2.0 + z)",
+ "yO2 = z/(2.0 + z)",
+ "yCO2 = 2.0*(1.0 - z)/(2.0 + z)",
+ "",
+ "# Results",
+ "print '-> Part(a) mole fraction of CO is: ',round(yCO,3)",
+ "print '-> Mole fraction of O2 is: ',round(yO2,3)",
+ "print '-> Mole fraction of CO2 is: ',round(yCO2,3)",
+ "",
+ "# Part(b)",
+ "p = 10.0 # in atm",
+ "# Solving equation K = (z/(1-z))*(2/(2 + z))^.5 *(p/1)^.5 gives",
+ "z = 0.062",
+ "yCO = 2.0*z/(2.0 + z)",
+ "yO2 = z/(2.0 + z)",
+ "yCO2 = 2.0*(1.0 - z)/(2.0 + z)",
+ "",
+ "# Results",
+ "print '-> Part(b) mole fraction of CO is: ',round(yCO,3)",
+ "print '-> Mole fraction of O2 is: ',round(yO2,3)",
+ "print '-> Mole fraction of CO2 is: ',round(yCO2,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a) mole fraction of CO is: 0.121",
+ "-> Mole fraction of O2 is: 0.061",
+ "-> Mole fraction of CO2 is: 0.818",
+ "-> Part(b) mole fraction of CO is: 0.06",
+ "-> Mole fraction of O2 is: 0.03",
+ "-> Mole fraction of CO2 is: 0.91"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.3 Page no-691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "yCO = 0.298",
+ "p = 1 # in atm",
+ "pref = 1 # in atm",
+ "# With this value of K, table A-27 gives",
+ "T = 2881",
+ "",
+ "# Calculations",
+ "# Solving yCO = 2z/(2 + z)",
+ "z = 2*yCO/(2 - yCO)",
+ "K = (z/(1-z))*(z/(2 + z))**.5*(p/pref)**.5",
+ "",
+ "# Result",
+ "print '-> The temperature T of the mixture in kelvin is: ',T"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The temperature T of the mixture in kelvin is: 2881"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.4 Page no-692"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# For a complete reaction of CO with the theoretical amount of air",
+ "# CO + .5 O2 + 1.88N2 -----> CO2 + 1.88N2 ",
+ "# Accordingly, the reaction of CO with the theoretical amount of air to form CO2, CO, O2, and N2 is",
+ "# CO + .5O2 + 1.88N2 ---> zCO + z/2 O2 + (1-z)CO2 + 1.88N2",
+ "",
+ "K = 0.0363 # equilibrium constant the solution to Example 14.2",
+ "p =1.0 # in atm",
+ "pref = 1.0 # in atm",
+ "",
+ "# Calculations",
+ "# Solving K = (z*z^.5/(1-z))*((p/pref)*2/(5.76+z))^.5 gives",
+ "z = 0.175",
+ "yCO = 2.0*z/(5.76 + z)",
+ "yO2 = z/(5.76 + z)",
+ "yCO2 = 2.0*(1.0-z)/(5.76 + z)",
+ "yN2 = 3.76/(5.76 + z)",
+ "",
+ "# Results",
+ "print '-> The mole fraction of CO is: ',round(yCO,3)",
+ "print '-> The mole fraction of O2 is: ',round(yO2,3)",
+ "print '-> The mole fraction of CO2 is: ',round(yCO2,3)",
+ "print '-> The mole fraction of N2 is: ',round(yN2,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The mole fraction of CO is: 0.059",
+ "-> The mole fraction of O2 is: 0.029",
+ "-> The mole fraction of CO2 is: 0.278",
+ "-> The mole fraction of N2 is: 0.634"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.5 Page no-692"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Applying the conservation of mass principle, the overall dissociation reaction is described by",
+ "# CO2 ----> zCO2 + (1-z)CO + ((1-z)/2)O2",
+ "",
+ "p = 1.0 # in atm",
+ "pref = 1.0 # in atm",
+ "# At 3200 K, Table A-27 gives",
+ "log10k = -.189",
+ "# Solving k = ((1-z)/2)*((1-z)/(3-z))^.5 gives",
+ "z = 0.422",
+ "",
+ "# Calculations",
+ "k = 10**log10k",
+ "# From tables A-25 and A-23",
+ "hfbarCO2 = -393520.0 # in kj/kmol",
+ "deltahbarCO2 = 174695-9364 # in kj/kmol",
+ "hfbarCO = -110530.0 # in kj/kmol",
+ "deltahbarCO = 109667-8669 # in kj/kmol",
+ "hfbarO2 = 0 # in kj/kmol",
+ "deltahbarO2 = 114809-8682 # in kj/kmol",
+ "hfbarCO2r = -393520.0 # in kj/kmol",
+ "deltahbarCO2r = 0 # in kj/kmol",
+ "",
+ "Qcvdot = 0.422*(hfbarCO2 + deltahbarCO2) + 0.578*(hfbarCO + deltahbarCO) + 0.289*(hfbarO2 + deltahbarO2)- (hfbarCO2r + deltahbarCO2r) ",
+ "",
+ "# Result",
+ "print '-> The heat transfer to the reactor, in kJ per kmol of CO2 entering is: '",
+ "print Qcvdot"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The heat transfer to the reactor, in kJ per kmol of CO2 entering is: ",
+ "322385.449"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 14.8 Page no-701"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# The ionization of cesium to form a mixture of Cs, Cs+, and e-\u0005 is described by",
+ "# Cs ----> (1-z)Cs + zCs+ + Ze-",
+ "",
+ "K = 15.63",
+ "z = 0.95",
+ "pref =1 # in atm",
+ "# Calculation",
+ "p = pref*K*((1-z**2)/z**2)",
+ "",
+ "# Results",
+ "print '-> The pressure if the ionization of CS is 95 percent complete is: ',p,'atm'",
+ "",
+ "x = []",
+ "y = []",
+ "from numpy import linspace ",
+ "from pylab import plot, show ",
+ "x = linspace(0,10,100)",
+ "for i in range(0,100):",
+ " y.append(i)",
+ " y[i]= 100*((1/(1+x[i]/K))**0.5)",
+ "",
+ "plot(x,y)",
+ "xlabel(\"Pressure (atm)\")",
+ "ylabel(\"Ionization\")",
+ "show()"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The pressure if the ionization of CS is 95 percent complete is: 1.68855955679 atm"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEMCAYAAADEXsFmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8z/X///Hbmy3L2BbZJnMKi9nYZk1cPpi0SUVyKirT\nvnwqn+pTOikJFabyCckhx3VkSfj4oZLWR2kfp9H6OKYtYiizwpy2vX5/PPVGaDbb+/Xedr9eLi7Z\n23vv9733pfbwPD2eDsuyLEREpMKrZHcAERFxDyoIIiICqCCIiMgZKggiIgKoIIiIyBkqCCIiApRC\nQUhISCAgIICwsDDnY9nZ2cTGxhIcHExcXBw5OTnOPxs7dixNmjShadOmfPbZZyUdR0RELlOJF4QH\nHniAFStWnPdYYmIisbGx7Nixg06dOpGYmAjAli1bmD9/Plu2bGHFihUMHjyYgoKCko4kIiKXocQL\nQrt27bjmmmvOe2zJkiXEx8cDEB8fz6JFiwBYvHgxffv2xdPTkwYNGtC4cWPWrl1b0pFEROQyeLji\nTQ4cOEBAQAAAAQEBHDhwAIB9+/Zx0003OZ8XFBTE3r17z/teh8PhiogiIuVOURtRuHxR2eFw/OUP\n+Yv92aJFFtdea7FggYVlVdxfI0aMsD2Du/zSZ6HPQp/FX/8qDpeMEAICAti/fz+BgYFkZWXh7+8P\nQJ06ddizZ4/zeT///DN16tS54PvvvBPq1jX/3LkTnn0WNHAQESlZLhkhdOvWjaSkJACSkpL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1/Dhwzl9+jQtWrQgNDSUESNGXJAvMDCQvLw8jh07\nBsDgwYNJSkoiPDyc7du3O++2aNmyJZUrVyY8PJwJEyZc8F5//v25X6elpdGmTZtifaYiAGpuJ+Ii\nI0eOpFmzZtx9990l/to7duzgqaeeuuQOJ5HLoRGCiIv84x//cPanL2nTpk3jmWeeKZXXlopDIwQR\nEQE0QhARkTNUEEREBFBBEBGRM1QQREQEUEEQEZEzVBBERASA/w+AWqN6z/mF6wAAAABJRU5ErkJg\ngg==\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.9 Page no-703"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# The overall reaction can be written as",
+ "# CO2 + .5O2 + .5N2 ----> aCO + bNO + (1-a)CO2 + .5(1+a-b)O2 + .5(1-b)N2",
+ "",
+ "# At 3000 K, Table A-27 provides",
+ "log10K1 = -0.485 # equilibrium constant of the reaction CO2 <--> CO + .5O2",
+ "log10K2 = -0.913 # equilibrium constant of the reaction .5O2 + .5N2 <-->NO",
+ "# Solving equations K1 = (a/(1-a))*((1+a-b)/(4+a))^.5 and K2 = 2b/((1+a-b)*(1-b))^.5",
+ "a = 0.3745",
+ "b = 0.0675",
+ "",
+ "# Calculations",
+ "K1 = 10**log10K1",
+ "K2 = 10**log10K2",
+ "",
+ "# Result",
+ "print '-> The composition of the equilibrium mixture, in kmol per kmol of CO2 present initially, is then 0.3745CO, 0.0675NO, 0.6255CO2, 0.6535O2, 0.4663N2.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The composition of the equilibrium mixture, in kmol per kmol of CO2 present initially, is then 0.3745CO, 0.0675NO, 0.6255CO2, 0.6535O2, 0.4663N2."
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 14.10 Page no-707"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# With data from Table A-2 at 20\u0004C,",
+ "vf = 1.0018e-3 # in m^3/kg",
+ "psat = 0.0239 # in bar",
+ "p = 1.0 # in bar",
+ "T = 293.15 # in kelvin",
+ "Rbar = 8.314 # universal gas constant in SI units",
+ "M = 18.02 # molat mass of water in kg/kmol",
+ "e=2.715",
+ "",
+ "# Calculations",
+ "pvbypsat = e**(vf*(p-psat)*10**5/((1000*Rbar/M)*T))",
+ "percent = (pvbypsat-1)*100",
+ "",
+ "# Result",
+ "print '-> The departure, in percent, of the partial pressure of the water vapor from the saturation pressure of water at 20\u0004 is: ',round(percent,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The departure, in percent, of the partial pressure of the water vapor from the saturation pressure of water at 20\u0004 is: 0.072"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_2.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_2.ipynb
new file mode 100755
index 00000000..536baccc
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_2.ipynb
@@ -0,0 +1,365 @@
+{
+ "metadata": {
+ "name": "Chapter 2"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "#Chapter 2:- Energy and the First Law Of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading5> Example 2.1 Page no-39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 3*(10**5) # initial pressure of gas in pascal",
+ "v1 = 0.1 # initial volumme of gas in meter^3",
+ "v2 = 0.2 # final volume of gas in meter^3",
+ "",
+ "# calculations",
+ "from scipy import integrate",
+ "import math",
+ "# Part (a) i.e. n=1.5",
+ "#constant = p1*(v1**n) # p*(v^n) = constant",
+ "constant1 = p1*(v1**1.5) ",
+ "constant2 = p1*(v1**1) ",
+ "constant3 = p1*(v1**0) ",
+ "# function p ",
+ "p1 = lambda v: constant1/(v**1.5) # expressing pressure as function of volume ",
+ "p2 = lambda v: constant2/(v**1)",
+ "p3 = lambda v: constant3/(v**0)",
+ "# function [work1] ",
+ "work1 = integrate.quad(p1,v1,v2) # integrating pdv from initial to final volume ",
+ "w1 = work1[0]/1000 # divided by 1000 to convert to KJ",
+ "print 'The work done for n=1.5 in KJ is',round(w1,2)",
+ "",
+ "#part(b) i.e. n = 1",
+ "work2 = integrate.quad(p2,v1,v2)",
+ "w2 = work2[0]/1000",
+ "print 'The work done for n=1 in KJ is',round(w2,2)",
+ "",
+ "#part(c) i.e. n=0",
+ "work3 = integrate.quad(p3,v1,v2)",
+ "w3 = work3[0]/1000",
+ "print 'The work done for n=0 in KJ is',round(w3,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work done for n=1.5 in KJ is 17.57",
+ "The work done for n=1 in KJ is 20.79",
+ "The work done for n=0 in KJ is 30.0"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 2.2 Page no-50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 3*(10**5) # initial pressure in pascal",
+ "v1 = 0.1 # initial volume in m3",
+ "v2 = 0.2 # initial volume in m3",
+ "m = 4.0 # mass of the gas in kg",
+ "deltau = -4.6 # change in specific internal energy in KJ/Kg",
+ "",
+ "# Calculations",
+ "from scipy import integrate",
+ "import math",
+ "constant = p1*(v1**1.5) # p*(v^n) = constant",
+ "",
+ "p = lambda v: constant/(v**1.5) # expressing pressure as function of volume ",
+ "",
+ "work = integrate.quad(p,v1,v2) # integrating pdv from initial to final volume ",
+ "w=work[0]/1000 # divided by 1000 to convert to KJ",
+ "",
+ "deltaU = m*deltau # change in internal energy in KJ",
+ "Q = deltaU + w # neglecting kinetic and potential energy changes",
+ "",
+ "# Result",
+ "print 'net heat transfer for the process in KJ',round(Q,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "net heat transfer for the process in KJ -0.83"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 2.3 Page no-52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "patm = 10**5 # atmospheric pressure in pascal.",
+ "mp = 45.0 # mass of piston in Kg",
+ "A = 0.09 # face area of piston in m2",
+ "deltaV = 0.045 # increment of the volume of air in m3",
+ "m = 0.27 # mass of air in kg",
+ "deltau = 42.0 # specific internal energy increase of air in kJ/kg",
+ "g = 9.81 # local acceleration of gravity",
+ "",
+ "",
+ "# Part (a) i.e. air is system",
+ "# Calculations",
+ "p = (mp*g)/A + patm # constant pressure of air obtained from equilibrium of piston",
+ "w = (p*deltaV)/1000 # work done in KJ",
+ "deltaU = m*deltau # internal energy change of air in KJ",
+ "Q = w + deltaU # applying first with air as system",
+ "# Result",
+ "print 'The answer given in book is incorrect.They have miscalculated deltaU.The correct heat transfer from resistor to air in KJ for air alone as system is: '",
+ "print round(Q,2)",
+ "",
+ "# The answer given in book is incorrect. deltaU is incorrect in book. ",
+ "",
+ "# Part(b) i.e. (air+piston) is system",
+ "# Calculations",
+ "wd = (patm*deltaV)/1000 # work done in KJ",
+ "deltaz = (deltaV)/A # change in elevation of piston",
+ "deltaPE = (mp*g*deltaz)/1000 # change in potential energy of piston in KJ",
+ "Qt = wd + deltaPE + deltaU # applying first law with air plus piston as system ",
+ "# Result",
+ "print 'The answer given in book is incorrect.They have miscalculated deltaU.The correct heat transfer from resistor to air in KJ for air + piston as system is:'",
+ "print round(Qt,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The answer given in book is incorrect.They have miscalculated deltaU.The correct heat transfer from resistor to air in KJ for air alone as system is: ",
+ "16.06",
+ "The answer given in book is incorrect.They have miscalculated deltaU.The correct heat transfer from resistor to air in KJ for air + piston as system is:",
+ "16.06"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 2.4 Page no-54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "w1dot = -60.0 # input work rate in KW",
+ "h = 0.171 # heat transfer coefficient,unit in KW/m2 .K",
+ "A = 1.0 # outer surface area of gearbox, unit in m2",
+ "Tb = 300.0 # outer surface temperature in kelvin",
+ "Tf = 293.0 # temperature of the sorrounding",
+ "",
+ "# Calculations",
+ "Qdot = -h*A*(Tb-Tf); # rate of energy transfer by heat",
+ "wdot = Qdot; # steady state energy equation",
+ "w2dot = wdot-w1dot;",
+ "",
+ "# Results",
+ "print 'The heat transfer rate in KW is:\\n\\tQdot = ',Qdot",
+ "print 'The power delivered through output shaft in KW is: = ',w2dot"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate in KW is:",
+ "\tQdot = -1.197",
+ "The power delivered through output shaft in KW is: = 58.803"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 2.5 Page no-55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "s=5*(10**-3) # measurement on a side in meter",
+ "wdot = -0.225 # power input in watt",
+ "Tf = 293.0 # coolant temprature in kelvin",
+ "h = 150.0 # heat transfer coefficient in w/m2 k",
+ "A = s**2 # surface area",
+ "",
+ "# Calculation",
+ "Tb = ((-wdot/(h*A)) + Tf - 273) # surface temperature in degree",
+ "",
+ "# Result",
+ "print 'The surface temperature of the chip in degree celcius is: ',Tb"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The surface temperature of the chip in degree celcius is: 80.0"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 2.6 Page no-57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "omega = 100.0 #motor rotation speed in rad/s",
+ "tau = 18.0 #torque applied by shaft in N.m",
+ "Welecdot = -2.0 #electric power input in KW",
+ "",
+ "Wshaftdot = (tau*omega)/1000 #shaft work rate in KW",
+ "Wdot = Welecdot + Wshaftdot #net work rate in KW",
+ "",
+ "#function [Qdot]=f(t)",
+ "#Qdot = (-0.2)* [1-2**(-0.05*t)]",
+ "",
+ "",
+ "#function [Edot]=f1(t) #function for rate of change of energy",
+ "#Edot = (-0.2)*[1-2**(-0.05*t)] - Wdot ",
+ "",
+ "#function [deltaE] =f2(t) #function for change in energy ",
+ "from sympy import *",
+ "x = symbols('x') # a = 0.2 b = 0.05",
+ "f = (0.2)*(1-2**(0.05*(x))) - Wdot",
+ "f2 = integrate(f,x)",
+ "print f2 ",
+ "",
+ "Qd = []",
+ "Wd = []",
+ "dltaE = []",
+ "from numpy import linspace ",
+ "from pylab import plot, show ",
+ "t = linspace(0,120,100);",
+ "for i in range(0,100):",
+ " Qd.append(i)",
+ " Wd.append(i)",
+ " dltaE.append(i)",
+ " Qd[i] = (-0.2*(1-2**(-0.05*(120/99)*(i-1)))) ",
+ " Wd[i] = Wdot",
+ " dltaE[i] = -4.0*2**(0.05* (120/99)*(i-1))/log(2) + 0.4* (120/99)*(i-1)",
+ " ",
+ "plot(t,Qd)",
+ "xlabel(\"Time (s)\")",
+ "ylabel(\"Qdot (KW)\")",
+ "show()",
+ "plot(t,Wd)",
+ "xlabel(\"Time (s)\")",
+ "ylabel(\"Wdot (KW)\")",
+ "show()",
+ "plot(t,dltaE)",
+ "xlabel(\"Time (s)\")",
+ "ylabel(\"deltaE (KJ)\")",
+ "show()",
+ "",
+ "",
+ "",
+ "",
+ " "
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-4.0*2**(0.05*x)/log(2) + 0.4*x"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEMCAYAAAAMMiuwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVVX+//HX8W5qg6aiggoJ3kVwUCtLKUXLhLTMvPM1\nc5r6OVZWU81MZTUqfptyssuMUzlqV/3mjVFjtDG85B1xLC8DNpAoFx2Q0soQ3L8/1oCiHEU452zO\n4f18PPZDz2Gfsz+rRw/errX2WtthWZaFiIiIC9SyuwAREfEdChUREXEZhYqIiLiMQkVERFxGoSIi\nIi6jUBEREZexNVQSExPp3LkzoaGhzJkzp9xzpk2bRmhoKD179iQlJaX0/aCgIMLCwoiIiKBPnz6e\nKllERC6jjl0XLi4uZurUqXz22WcEBATQu3dvYmNj6dKlS+k5a9eu5fDhw6SlpbFjxw4eeughtm/f\nDoDD4SApKYlmzZrZ1QQ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9fzhNPPEFYWBh33HEHRUVFACQnJxMVFUVkZCS33357uY/d/uKLL+jcuXNp\noMybN49u3brRs2dPxowZA5jtMm688UbWrVvniSaLVIhCRcSF0tPT+fzzz0lISGD8+PFER0ezb98+\nGjZsyJo1azh79iy/+tWvWLZsGbt372bSpEn89re/veR7tmzZQmRkZOnrOXPmsHfvXv75z38yf/78\n0vf79OnDpk2bPNI2kYpw2zPqRWoah8PBHXfcQe3atenevTvnzp1jyJAhAPTo0YOMjAxSU1PZv38/\ngwYNAqC4uJg2bdpc8l1Hjhzh5ptvLn0dFhbG2LFjGT58eJktT9q0aUNiYqKbWyZScQoVEReqV68e\nALVq1Sozz1GrVi2KioqwLItu3bqxdevWK37XhdOda9asYdOmTfztb39j5syZfPXVV9SqVYtz5855\n9a644ns0/CXiIhW556VTp06cOHGC7du3A2b36QMHDlxyXvv27UvnWizL4siRI0RFRREfH8+3337L\n6dOnAbNjbvv27V3YCpGqUaiIVEJJ7+DCZ2tc/JyNi3sQDoeDunXr8sknn/DUU08RHh5OREQE27Zt\nu+T7b775Znbv3g2YZ7JMmDCBsLAwevXqxSOPPMK1114LwM6dO+nfv79b2ihSGbqlWKQaKrmleMeO\nHaVDahc7d+4cvXr1Yvfu3U5vOxbxNPVURKohh8PBlClTyjww6WKrV69m5MiRChSpVtRTERERl1FP\nRUREXEahIiIiLqNQERERl1GoiIiIyyhURETEZRQqIiLiMv8fGRx8Be2i9aQAAAAASUVORK5CYII=\n"
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZwAAAEMCAYAAADwJwB6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH3VJREFUeJzt3X9QVXX+x/HXJaF1En/VelHQNBUQFL2sP/FHFF5/ZCKm\nY2kWmdmUU63tljrTTpmp4Drl6qZN22YytZs/8hdqqbSKP0L8kaQtlFDCivIjFTF1M1Q+3z9a7zeC\nqyKXcwOfj5kzwznnc875vBvn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\nwDXXXENAQACDBg3i008/9Zn6lans3+O53zfefF/bvHnzWL16Nf/617+cx6pSP59IJF26dCE3N5c9\ne/ZQXFzMwoULSUpKsjoslxiGwUMPPUR0dDS/+tWvnMeTkpJ48803AXjzzTedCcabpKSkkJ+fT15e\nHgsWLODWW29l/vz5PlE3gKZNm9KiRQt2794NwNq1a2nbti0DBgzwifpFRUWxceNGTpw4gWEYrF27\nlujoaJ+pX5nK/j0mJSWxYMECiouLycvLIzc317kOoDdJT09nxowZpKWlERQU5DxepfpV0ziO5Vav\nXm1EREQYbdq0MVJSUqwOx2UfffSRYbPZjA4dOhgdO3Y0OnbsaLz77rvGwYMHjdtuu80rp1heSGZm\npnPWli/V7bPPPjO6dOlSYWqlL9Vv+vTpzum/I0eONIqLi726fvfee6/RrFkzw263GyEhIcbcuXN/\ntj5Tpkwx2rRpY0RGRhrp6ekWRn5pzq3fnDlzjLCwMKNly5bO75cxY8Y433+59bMZhhaoEhGRqvOJ\nri0REbGOEomIiLhEiURERFyiRCIiIi5RIhGpxMGDB4mNjSU2NpZmzZoREhJCbGwswcHBPP744265\n5iuvvMK8efMqfX3FihU8//zzbrm2SFVp1pbIJSjbH2fChAluu4ZhGHTq1IlNmzYREHDhrYIMwyA2\nNpZNmzZht9vdFovI5VCLROQSlf3myszMdG4XPWnSJO6//37i4uIIDQ1l6dKlTJw4kfbt29O3b19K\nS0sB2LJlC/Hx8XTp0oU+ffpccBvqjz/+mKioKGcSmTVrFm3btqVDhw4kJycD5lIVPXv2ZM2aNTVR\nZZFLokQi4qK8vDzWrVvHihUrGD58OImJiWzfvp26deuyatUqSkpKGDduHEuWLGHz5s088MAD/O53\nvzvvPBs2bKBLly7O59OnT+ezzz7j888/5/XXX3ce79atW4XdREWsZvlWuyLezGaz0bdvX/z9/WnX\nrh1nzpyhd+/eAMTExLBnzx52797Nzp07SUhIAOD06dM0b978vHPt3buXXr16OZ+3b9+eYcOGMXDg\nwArLjTRv3pz09HQ310zk0imRiLgoMDAQAD8/vwrjFn5+fpSWlmIYBm3btuWTTz656LnKD1muWrWK\n9evX88477zBlyhS++OIL/Pz8OHPmjFevNiu+R11bIi64lLkqkZGRHDhwgI0bNwLmqs45OTnnva9V\nq1bOsRPDMNi7dy/x8fFMmzaNI0eOcOzYMcBcibZVq1bVWAsR1yiRiFyislZA+b0pzt2n4tyWgs1m\nw26385///IdnnnmGjh07Ehsby6effnre+Xv16sXmzZsBc0+TESNG0L59ezp16sT48eOpX78+ANnZ\n2cTFxbmljiJVoem/Ih6ibPpvVlaWs7vsXGfOnKFTp05s3ry50inCIjVNLRIRD2Gz2Xj44YcrbDJ0\nrpUrVzJkyBAlEfEoapGIiIhL1CIRERGXKJGIiIhLlEhERMQlSiQiIuISJRIREXGJEomIiLjk/wAf\njNfcbjy1VQAAAABJRU5ErkJggg==\n"
+ }
+ ],
+ "prompt_number": 7
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_3.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_3.ipynb
new file mode 100755
index 00000000..e35a406f
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_3.ipynb
@@ -0,0 +1,528 @@
+{
+ "metadata": {
+ "name": "Chapter 3"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 3 :- Evaluating Properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "## Example 3.1 Page no-80 ##"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Those with 1 are of state 1 and 2 are with state 2",
+ "",
+ "# State 1",
+ "p1 = 10**5 # initial pressure in pascal ",
+ "x1 = 0.5 # initial quality",
+ "",
+ "T1 = 99.63 # temperature in degree celcius, from table A-3",
+ "v = 0.5 # volume of container in m3",
+ "vf1 = 1.0432*(10**(-3)) # specific volume of fluid in state 1 in m3/Kg(from table A-3)",
+ "vg1 = 1.694 # specific volume of gas in state 1 in m3/kg(from table A-3)",
+ "",
+ "# State 2",
+ "p2 = 1.5*(10**5) # pressure after heating in pascal",
+ "",
+ "T2 = 111.4 # temperature in degree celcius in state 2, from A-3",
+ "vf2 = 1.0582*(10**(-3)) # specific volume of fluid in state 2 in m3/Kg, from A-3",
+ "vg2 = 1.159 # specific volume of gas in state 2 in m3/Kg,from A-3",
+ "",
+ "# Calculations",
+ "",
+ "v1 = vf1 + x1*(vg1-vf1) # specific volume in state 1 in m3/Kg",
+ "v2 = v1 # specific volume in state 2 in m3/Kg",
+ "m = v/v1 # total mass in Kg",
+ "mg1 = x1*m # mass of vapour in state 1 in Kg",
+ "",
+ "x2 = (v1-vf2)/(vg2-vf2) # quality in state 2",
+ "mg2 = x2*m # mass of vapor in state 2 in Kg ",
+ "",
+ "# State 3",
+ "p3 = 2.11 # pressure in state 3 from table A-3",
+ "",
+ "# Results",
+ "print '-> The temperature in state 1 is ',round(T1,2),'degree celcius.'",
+ "print '-> The temperature in state 2 is ',round(T2,2),'degree celcius.'",
+ "print '-> The mass of vapour in state 1 is',round(mg1,2),'kg.' ",
+ "print '-> The mass of vapour in state 2 is',round(mg2,2),'kg.'",
+ "print '-> The pressure corresponding to state 3 is',round(p3,2),'bar.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The temperature in state 1 is 99.63 degree celcius.",
+ "-> The temperature in state 2 is 111.4 degree celcius.",
+ "-> The mass of vapour in state 1 is 0.29 kg.",
+ "-> The mass of vapour in state 2 is 0.43 kg.",
+ "-> The pressure corresponding to state 3 is 2.11 bar."
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 3.2 Page no-81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m = 0.05 # mass of ammonia in kg ",
+ "p1 = 1.5*(10**5) # initial pressure of ammonia in pascal",
+ "v1 = 0.7787 # specific volume in state 1 in m3/kg from table A-14",
+ "v2 = 0.9553 # specific volume in state 2 in m3/kg from table A-15",
+ "T2 = 25.0 # final temperature in degree celcius",
+ "",
+ "# Calculations",
+ "",
+ "V1 = m*v1 # volume occupied by ammonia in state 1 in m3",
+ "V2 = m*v2 # volume occupied by ammonia in state 2 in m3",
+ "w = (p1*(V2-V1))/1000 # work in KJ",
+ "",
+ "# Results",
+ "print '-> The volume occupied by ammonia in state 1 is ',round(V1,2),'m^3.'",
+ "print '-> The volume occupied by ammonia in state 2 is ',round(V2,2),'m^3.'",
+ "print '-> The work done for the process is',round(w,2),'KJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The volume occupied by ammonia in state 1 is 0.04 m^3.",
+ "-> The volume occupied by ammonia in state 2 is 0.05 m^3.",
+ "-> The work done for the process is 1.32 KJ."
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "## Example 3.3 Page no-87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "V = 0.25 # volume of tank in m3",
+ "v = 1.673 # specific volume in m3/kg obtained using table A-2",
+ "",
+ "# State 1",
+ "T1 = 100.0 # initial temperature in degree celcius",
+ "u1 = 2506.5 # specific internal energy in state 1 in KJ/Kg obtained from table A-2",
+ "",
+ "# State 2",
+ "p2 = 1.5 # final pressure in bars",
+ "T2 = 273.0 # temperature in state 2 in degree celcius obtained from table A-4",
+ "u2 = 2767.8 # specific internal energy in state 2 in KJ/Kg obtained from table A-4",
+ "",
+ "# Calculations",
+ "m = V/v # mass of the system in kg",
+ "DeltaU = m*(u2-u1) # change in internal energy in KJ",
+ "W = - DeltaU # from energy balance",
+ "",
+ "# Results",
+ "print '-> The temperature at the final state in is',round(T2,2),' degree celcius.'",
+ "print '-> The work during the process is',W,'KJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The temperature at the final state in is 273.0 degree celcius.",
+ "-> The work during the process is -39.0466228332 KJ."
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 3.4 Page no-88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# State ",
+ "P1 = 10*(10**5) # initial pressure in pascal",
+ "T1 = 400.0 # initial temperature in degree celcius",
+ "v1 = 0.3066 # specific volume in state 1 in m3/kg obtained from table A-4",
+ "u1 = 2957.3 # specific internal energy in state 1 in KJ/Kg obtained from table A-4",
+ "",
+ "# State 2",
+ "",
+ "v2 = 0.1944 # specific volume in state 2 in m3/kg obtained from table A-3",
+ "w2to3 = 0 # work in process 2-3",
+ "",
+ "",
+ "# State 3 ",
+ "v3 = v2",
+ "vf3 = 1.0905*(10**(-3)) # specific volume of fluid in state 3 from table A-2",
+ "vg3 = 0.3928 # specific volume of gas in state 3 from table A-2",
+ "uf3 = 631.68 # specific internal energy for fluid in state 3 from table A-2",
+ "ug3 = 2559.5 # specific internal energy for gas in state 3 from table A-2",
+ "",
+ "# Calculations",
+ "w1to2 = (P1*(v2-v1))/1000 # work in KJ/Kg in process 1-2",
+ "W = w1to2 + w2to3 # net work in KJ/kg",
+ "x3 = (v3-vf3)/(vg3-vf3)",
+ "u3 = uf3+x3*(ug3-uf3) # specific internal energy in state 3 in Kj/Kg",
+ "q = (u3-u1) + W # heat transfer in Kj/Kg",
+ "",
+ "# Results",
+ "print '-> The work done in the overall process is',W,'KJ/kg.'",
+ "print '-> The heat transfer in the overall process is',q,'KJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work done in the overall process is -112.2 KJ/kg.",
+ "-> The heat transfer in the overall process is -1486.43658885 KJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 3.6 Page no-98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# State 1",
+ "p1 = 20.0 # initial pressure in MPa",
+ "T1 = 520.0 # initial temperature in degree celcius",
+ "Z1 = 0.83 # compressibility factor",
+ "R = 8.314 # universal gas constant in SI unit",
+ "n = 1000.0/18.02 # number of moles in a kg of water",
+ "",
+ "# State 2",
+ "T2 = 400.0 # final temperature in degree celcius",
+ "",
+ "# From table A-1",
+ "Tc = 647.3 # critical temperature in kelvin",
+ "pc = 22.09 # critical pressure in MPa",
+ "",
+ "# Calculations",
+ "Tr = (T1+273)/Tc # reduced temperature",
+ "Pr = p1/pc # reduced pressure ",
+ "v1 = (Z1*n*R*(T1+273))/(p1*(10**6))",
+ "vr = v1*(pc*(10**6))/(n*R*Tc)",
+ "Tr2 = (T2+273)/Tc",
+ "PR = 0.69 # at above vr and Tr2",
+ "P2 = pc*PR",
+ "",
+ "# Results ",
+ "print '-> The specific volume in state1 is',v1,'m3/kg and the corresponding value obtained from table A-4 is .01551 m^3/Kg'",
+ "print '-> The pressure in MPa in the final state is',P2,' MPa and the corresponding value from the table is 15.16Mpa'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The specific volume in state1 is 0.0151836616537 m3/kg and the corresponding value obtained from table A-4 is .01551 m^3/Kg",
+ "-> The pressure in MPa in the final state is 15.2421 MPa and the corresponding value from the table is 15.16Mpa"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 3.7 Page no:-101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 300.00 #temperature in state 1 in kelvin",
+ "P1 = 1.00 #pressure in state 1 in bar",
+ "P2 = 2.00 #pressure in state 2 in bar",
+ "R = 287.00 #gas constant of air in SI units",
+ "",
+ "# Calculations",
+ "v1 = (R*T1)/(P1*10**5) #specific volume in state 1",
+ "v = []",
+ "P = []",
+ "vv = []",
+ "Pa = []",
+ "pp = []",
+ "pcommon = []",
+ "vcommon = []",
+ "from numpy import linspace",
+ "from pylab import *",
+ "P = linspace(1,2,50)",
+ "for i in range(0,50):",
+ " v.append(i)",
+ " v[i] = v1",
+ "",
+ " ",
+ "",
+ "T2 = (P2*10**5*v1)/R",
+ "v3 = (R*T2)/(P1*10**5)",
+ "vv = linspace(v1,v3,50)",
+ "for i in range(0,50):",
+ " Pa.append(i)",
+ " Pa[i] = P1",
+ "",
+ "#function[out]= f(inp)",
+ "#out = (R*T2)/(inp",
+ "",
+ "",
+ "VV = linspace(v1,v3,50)",
+ "for j in range(0,50):",
+ " pp.append(j)",
+ " pp[j] = (R*T2)/((VV[j])/(10**5))",
+ "",
+ "vcommon = numpy.concatenate((v, VV))",
+ "pcommon = numpy.concatenate((P, pp))",
+ "",
+ "plot(vcommon,pcommon)",
+ "xlabel('v')",
+ "ylabel('p(bar)')",
+ "show()",
+ "plot(vv,Pa)",
+ "xlabel('v')",
+ "ylabel('p(bar)')",
+ "show()",
+ "#The two steps are shown in one graph and the other on is shown in the other graph\"\"\"",
+ "",
+ "print 'The temperature in kelvin in state 2 is T2 = ',T2",
+ "print 'The specific volume in state 3 in m^3/kg is v = ',v3"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEPCAYAAACtCNj2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH1ZJREFUeJzt3XtYVXW+x/HPUrBEVNRMC0gtMEW5iBc0b2gpqRNW6kmb\n0qOOmU6jzdQ5U5ONYo5jZU0Xy2Md88mc1ElnklNkZYJ3wBQvo413EigpRx2jy0iwzh+/XEZetiJ7\nr73h/Xqe9cDee7X5urT9Yf2ulm3btgAAkFTL7QIAAP6DUAAAOAgFAICDUAAAOAgFAICDUAAAOPw+\nFMaMGaNmzZopNjbW47lr165VYmKigoODtXz58gqvvf7662rdurVat26thQsXeqtcAAholr/PU1i3\nbp1CQ0M1cuRI7dy584Lnfvrppzp58qRmz56t1NRUDRkyRJJ07Ngxde7cWVu2bJEkdezYUVu2bFFY\nWJjX6weAQOL3dwo9e/ZUo0aNKjx34MABDRgwQJ06dVKvXr20Z88eSVKLFi0UGxurWrUq/rHef/99\n9e/fX2FhYQoLC1O/fv20cuVKn/0ZACBQBLldQGXcd999mjdvnqKiopSTk6OJEyfqo48+Ou/5n332\nmSIiIpzHERERKioq8kWpABBQAi4USkpKtGnTJg0bNsx57tSpUy5WBADVR8CFQnl5ucLCwpSXl3fB\n8yzLcr4PDw9XVlaW87igoEB9+/b1VokAELD8vk/hpxo0aKBWrVpp2bJlkiTbtrVjx44K59i2rR/3\nn6ekpOiDDz7QiRMndPz4cX344YdKSUnxad0AEAi8FgoFBQXq06eP2rVrp/bt2+uFF14453mTJk1S\ndHS04uPjz/nb/4gRI3TTTTdpz549ioyM1IIFC/TnP/9Z8+fPV0JCgtq3b6/09HRJ0ubNmxUZGall\ny5Zp/PjxzjDWRo0a6fHHH1fnzp3VpUsXTZ06lZFHAHAOXhuSeuTIER05ckQJCQkqKSlRx44d9fbb\nb6tt27b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JSki/L8ylP\n12Ljxo32iRMnbNs2v1TU5Gth2+b/oz59+tiDBg2yly1b5sPqfMvTtTh+/LgdExNjFxQU2LZtPi+q\nK0/XojKfm36xzMXFzGm45pprdPLkSUnSyZMn1aRJEwUFea31yzU9e/ZUo0aNzvt6TZrb4eladOvW\nTQ0bNpRkrkVhYaGvSvM5T9dCkl588UUNHTpUTZs29VFV7vB0Ld58800NGTLEGdhy1VVX+ao0n/N0\nLSrzuekXoXCu+QpFRUUVzhk3bpx27dqla6+9VvHx8Xr++ed9XaZfON/cjppu/vz5GjhwoNtluKao\nqEgrVqxwVgXwxtyeQLFv3z4dO3ZMffr0UadOnfTGG2+4XZJrKvO56Re/al/MP+CZM2cqISFBWVlZ\nOnDggPr166ft27erfv36PqjQv9ge5nbUNJmZmXrttde0YcMGt0txzYMPPqhZs2bJsizZplnY7ZJc\nU1paqq1bt+qjjz7SN998o27duqlr166Kjo52uzSfq8znpl/cKVzMnIaNGzdq2LBhkqQbbrhBrVq1\n0p49e3xapz9gbkdFO3bs0Lhx45Senu6xeaU627Jli4YPH65WrVpp+fLlmjhxotLT090uyxWRkZHq\n37+/6tatqyZNmqhXr17avn2722W5ojKfm34RChczp6FNmzZatWqVJKm4uFh79uzR9ddf70a5rmJu\nxxmHDx/WnXfeqUWLFikqKsrtclx18OBBHTp0SIcOHdLQoUM1d+7cs/4fqikGDx6s9evXq6ysTN98\n841ycnIUExPjdlmuqMznpl80H13MnIbf/e53Gj16tOLj41VeXq6nnnpKjRs3drnyqjdixAitWbNG\nR48eVWRkpNLS0lRaWiqp5s3t8HQtpk+fruPHjzvt6MHBwcrNzXWzZK/xdC1qEk/Xok2bNrr11lsV\nFxenWrVqady4cdU2FDxdi8p8blp2TW58BABU4BfNRwAA/0AoAAAchAIAwEEoAAAchAJwiR599FG9\n/PLLzuNp06bpmWeecbEioOoQCsAluuuuu/SXv/zFefzWW29p+PDhLlYEVB2/mKcABJKEhAR98cUX\n+vzzz/XFF1+oUaNGNXpWOaoXQgGohGHDhmnZsmU6cuQIdwmoVpi8BlTC7t279Ytf/EL//Oc/tXbt\n2hq71AiqH/oUgEqIiYlRSUmJIiIiCARUK9wpAAAc3CkAAByEAgDAQSgAAByEAgDAQSgAAByEAgDA\n8f8/6+7mAiT6VQAAAABJRU5ErkJggg==\n"
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEICAYAAABMGMOEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGVFJREFUeJzt3XtwlNX9x/HPQuIMhqsWguxu5ZJMLiQsicEUByT8pi1K\na6waxqRaMQGawSLBdjpVpx2JdhBanZZi7SiFdKIVKOIMKcSdDupykS6ZNky0JNWARDdREJSAXGxC\nOL8/sEtjDHtyebIB3q+ZncnZ5zzP882Z5Hz2uSUuY4wRAAARDIh2AQCASwOBAQCwQmAAAKwQGAAA\nKwQGAMAKgQEAsOJYYBQVFSk+Pl7p6emd9lm8eLESExPl8/m0d+/e8PvNzc3Ky8tTSkqKUlNTFQwG\nnSoTAGDJscAoLCyU3+/vdHllZaX279+v+vp6Pf/881q4cGF4WUlJiWbPnq26ujq99dZbSklJcapM\nAIAlxwJj+vTpGjFiRKfLKyoqNHfuXElSdna2mpubdfjwYR0/flw7d+5UUVGRJCkmJkbDhg1zqkwA\ngKWYaO24qalJXq833PZ4PGpsbNTAgQM1cuRIFRYWqqamRjfccINWrlypq6++ut36Lperr0sGgMtC\nd//AR1Qven+5aJfLpbNnz6q6uloPPPCAqqurFRcXp+XLl3e6Pi+jxx57LOo19JcXY8FYMBYXf/VE\n1ALD7XYrFAqF242NjXK73fJ4PPJ4PJoyZYokKS8vT9XV1dEqEwDwhagFRm5ursrLyyVJwWBQw4cP\nV3x8vEaPHi2v16t3331XkrRt2zZNnDgxWmUCAL7g2DWMgoICbd++XUePHpXX61VpaalaW1slScXF\nxZo9e7YqKyuVkJCguLg4lZWVhdddtWqV7rnnHrW0tGjChAnt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eOPP65jx46Fz9vHxsaqqqoqmiU7JtJYXEkijUVycrJuueUWTZo0SQMG\nDNCCBQsu28CINBbdmTcde9IbAHB56fenpAAA/QOBAQCwQmAAAKwQGAAAKwQG0IseeeQRPfvss+H2\n0qVL9fTTT0exIqD3EBhAL7r77rv1l7/8JdzeuHGj8vPzo1gR0Hv6/XMYwKVk8uTJ+vjjj/XRRx/p\n448/1ogRI67op+1xeSEwgF42Z84cvfzyyzp06BBHF7is8OAe0Mtqa2s1f/58ffLJJ9qxY8cV++dZ\ncPnhGgbQy1JTU3Xy5El5PB7CApcVjjAAAFY4wgAAWCEwAABWCAwAgBUCAwBghcAAAFghMAAAVv4f\n13xudCWyv/IAAAAASUVORK5CYII=\n"
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature in kelvin in state 2 is T2 = 600.0",
+ "The specific volume in state 3 in m^3/kg is v = 1.722"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 3.8 Page no-108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# State 1",
+ "m = 0.9 # mass of air in kg",
+ "T1 = 300.0 # initial temperature in kelvin",
+ "P1 = 1.0 # initial pressure in bar",
+ "",
+ "# State 2",
+ "T2 = 470.0 # final temperature in kelvin",
+ "P2 = 6.0 # final pressure in bar",
+ "Q = -20.0 # heat transfer in kj",
+ "",
+ "# From table A-22 ",
+ "u1 = 214.07 # in KJ/kg",
+ "u2 = 337.32 # in KJ/Kg",
+ "",
+ "# Calculations",
+ "deltaU = m*(u2-u1) # change in internal energy in kj",
+ "W = Q - deltaU # in KJ/kg",
+ "",
+ "# Results",
+ "",
+ "print '-> The work during the process is ',W,' KJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work during the process is -130.925 KJ."
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 3.9 Page no-109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# State 1",
+ "m1 = 2.0 # initial mass of gas in tank 1 in kg",
+ "T1 = 350.0 # initial temperature in kelvin in tank1",
+ "p1 = 0.7 # initial pressure in bar in tank 1",
+ "",
+ "# State 2",
+ "m2 = 8.0 # initial mass of gas in tank 2 in kg",
+ "T2 = 300.0 # initial temperature in kelvin in tank 2",
+ "p2 = 1.2 # initial pressure in bar in tank 2",
+ "Tf = 315.0 # final equilibrium temperature in kelvin",
+ "",
+ "# From table A-20",
+ "Cv = 0.745 # in KJ/Kg.k",
+ "",
+ "# Calculations",
+ "pf = ((m1+m2)*Tf)/((m1*T1/p1)+(m2*T2/p2)) ",
+ "Ui = (m1*Cv*T1)+(m2*Cv*T2)",
+ "Uf = (m1+m2)*Cv*Tf",
+ "deltaU = Uf-Ui",
+ "Q = deltaU",
+ "",
+ "# Results",
+ "print '-> The final equilibrium pressure is',pf,'bar.'",
+ "print '-> The heat transfer for the process is',Q,'KJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The final equilibrium pressure is 1.05 bar.",
+ "-> The heat transfer for the process is 37.25 KJ."
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 3.11 Page no-113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 1.0 # initial pressure in bar",
+ "T1 = 295.0 # initial temperature in kelvin ",
+ "p2 = 5.0 # final pressure in bar",
+ "n = 1.3 # polytropic constant",
+ "R = 8314/28.97 # gas constant for air in SI units",
+ "",
+ "# From table A-22",
+ "u2 = 306.53",
+ "u1 = 210.49",
+ "",
+ "# Calculations",
+ "T2 = T1*(p2/p1)**((n-1)/n)",
+ "w = R*(T2-T1)/(1-n)",
+ "Q = u2-u1+w/1000",
+ "",
+ "# Results",
+ "print '-> The work done per unit mass is ',w/1000,'KJ/kg.'",
+ "print '-> The heat transfer per unit mass is',Q,'KJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work done per unit mass is -126.928201465 KJ/kg.",
+ "-> The heat transfer per unit mass is -30.888201465 KJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 58
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_4.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_4.ipynb
new file mode 100755
index 00000000..04d98084
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_4.ipynb
@@ -0,0 +1,567 @@
+{
+ "metadata": {
+ "name": "Chapter 4"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 4:- Control Volume Analysis Using Energy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 4.1 Page no-125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# At inlet 1:-",
+ "p1= 7.0 # pressure in bar",
+ "T2= 200.0 # temperature in degree celcius",
+ "m1dot= 40.0 # mass flow rate in kg/s",
+ "",
+ "# At inlet 2:-",
+ "p2= 7.0 # pressure in bar",
+ "T2= 40.0 # temperature in degree celcius",
+ "A2= 25.0 # area in cm^2",
+ "",
+ "# At exit:-",
+ "p3= 7.0 # pressure in bar",
+ "AV3= 0.06 # Volumetric flow rate through wxir in m^3/s",
+ "",
+ "# From table A-3",
+ "v3 = (1.108)*(10**(-3)) # specific volume at the exit in m^3/kg",
+ "",
+ "# from table A-2",
+ "v2= (1.0078)*(10**(-3)) # specific volume in state 2 in m^3/kg",
+ "",
+ "# Calculation:-",
+ "m3dot= AV3/v3 # mass flow rate at exit",
+ "m2dot = m3dot-m1dot # mass flow rate at inlet 2",
+ "V2= (m2dot*v2)/(A2*(10**(-4)))",
+ "",
+ "# Results:-",
+ "print '-> The mass flow rate at the inlet 2 is', round(m2dot,2),' kg/s.'",
+ "print '-> The mass flow rate at the exit is', round(m3dot,2),' kg/s.'",
+ "print '-> The velocity at the inlet is ', round(V2,2),'m/s.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The mass flow rate at the inlet 2 is 14.15 kg/s.",
+ "-> The mass flow rate at the exit is 54.15 kg/s.",
+ "-> The velocity at the inlet is 5.7 m/s."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 4.3 Page no-135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1= 40.0 # pressure in bar",
+ "T1= 400.0 # temperature in degree celcius",
+ "V1= 10.0 # velocity m/s",
+ "",
+ "# At exit:-",
+ "p2= 10.0 # pressure in bar",
+ "V2= 665.0 # velocity in m/s",
+ "mdot= 2.0 # mass flow rate in kg/s",
+ "",
+ "# From table A-4",
+ "h1= 3213.6 # snpecific enthalpy in kJ/kg",
+ "v2 = 0.1627 # specific volume at the exit in m^3/kg",
+ "",
+ "# Calculation:-",
+ "h2 = h1 + ((V1**2-V2**2)/2)/1000 # snpecific enthalpy in kJ/kg",
+ "A2=(mdot*v2)/V2 # Exit area",
+ "",
+ "# Results:-",
+ "print '-> The exit Area of the nozzle is', round(A2,4),'m^2.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The exit Area of the nozzle is 0.0005 m^2."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 4.4 Page no-138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m1dot = 4600.0 # mass flow rate in kg/h",
+ "Wcvdot= 1000.0 # turbine power output in kv",
+ "p1= 60.0 # pressure in bar",
+ "T1=400.0 # temperature in degree celc",
+ "V1= 10.0 # velocity in m/s",
+ "",
+ "# At exit:-",
+ "p2= 0.10 # pressure in bar",
+ "q2= 0.90 # quality ",
+ "V2= 50.0 # velocity in m/s",
+ "",
+ "# From table A-2 and A-3:-",
+ "h1= 3177.2 # specific enthalpy at inlet in kJ/kg",
+ "hf2= 191.83",
+ "hg2= 2584.63",
+ "",
+ "# Calculation:-",
+ "h2 = hf2+q2*(hg2-hf2) # specific enthalpy at exit in kJ/kg",
+ "Qcvdot = Wcvdot + m1dot*((h2-h1)+(V2**2- V1**2)/(2*1000))/3600",
+ " ",
+ "# Results:-",
+ "print '-> The rate of heat transfer between the turbine and surroundings is',round(Qcvdot,2),'kW.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of heat transfer between the turbine and surroundings is -61.39 kW."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 4.5 Page no-140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1=1.00 # pressure in bar",
+ "t1= 290.00 # temperature in kelvin",
+ "A1= 0.1 # area in m^2",
+ "V1= 6.00 # velocity in m/s",
+ "",
+ "# At exit:-",
+ "",
+ "p2=7.00 # pressure in bar",
+ "t2= 450.00 # temperature in kelvin",
+ "V2= 2.00 # velocity in m/s",
+ "Qcvdot= -180.0 # heat transfer rate in kJ/min",
+ "R= 8.314 # universal gas constant in SI units",
+ "",
+ "# from table A-22",
+ "",
+ "h1= 290.16 # specific enthalpy in kJ/kg",
+ "h2= 451.8 # specific enthalpy in kJ/kg",
+ "",
+ "# Calculations:-",
+ "",
+ "v1 = (R*1000*t1)/(28.97*p1*10**5) # specific volume",
+ "mdot=(A1*V1)/v1 # mass flow rate",
+ "Wcvdot = Qcvdot/60 + mdot*((h1-h2)+(V1**2-V2**2)/(2*1000))",
+ "",
+ "# Results:-",
+ " ",
+ "print '-> The power input to the compressor is ',round(Wcvdot,2),'kW.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The power input to the compressor is -119.52 kW."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.6 Page no-141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# At Entry:=",
+ "t1=20.0 # Temperatue in deg celcius",
+ "p1=1.0 # pressure in atm",
+ "AV1= 0.1 # volumetric flow rate in litre/s",
+ "D1=2.5 # Diameter of th hose in cm",
+ "",
+ "# At Exit:=",
+ "t2=23.0 # temperatuer in deg celcius",
+ "p2=1.0 # pressure in atm",
+ "V2=50.0 # Velocity in m/s",
+ "Z2=5.0 # elevation in m",
+ "g= 9.8 # acceleration due to gravity in m/s^2",
+ "",
+ "# from table A-2 and A-19:-",
+ "",
+ "v= (1.0018)*((10.0)**(-3)) # specific volume in m^3/kg",
+ "c= 4.18 ",
+ "",
+ "# Calculation:-",
+ "mdot = (AV1/1000)/v # mass flow rate in kg/s",
+ "V1= (AV1/1000)/(3.14*(D1/(2*100))**2) # Entry velocity in m/s",
+ "deltah = c*(t2-t1)+v*(p2-p1)",
+ "Wcvdot= ((mdot*10)/9)*(-deltah+(V1**2-V2**2)/(2*1000)+g*(0-Z2)/1000)",
+ "",
+ "# Results:-",
+ "print '-> The power input to the motor is', round(Wcvdot,2),'KW.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The power input to the motor is -1.53 KW."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.7:- Page no-144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Entering:-",
+ "p1=0.1 # pressure in bar",
+ "x1= 0.95 # Quality",
+ "p2= 0.1 # pressure in bar",
+ "t2= 45.0 # temperature in deg celcius",
+ "t3=20.0 # temperature of cooling entry in deg cel",
+ "t4=35.0 # temperature of cooling exit",
+ "",
+ "# From table A-3",
+ "hf= 191.53 # Enthalpy in KJ/kg",
+ "hg= 2584.7 # Enthalpy in KJ/kg",
+ "h2=188.45 # Assumption at states 2,3 and 4, h is approx equal to hf(T), in kJ/kg",
+ "deltah4_3= 62.7 # Assumption 4, in kJ/kg",
+ "",
+ "",
+ "# Calculations:-",
+ "h1= hf + x1*(hg-hf)",
+ "ratio= (h1-h2)/(deltah4_3)",
+ "QRate= (h2-h1) # Part B",
+ "",
+ "# Results:-",
+ "print '-> The rate of the mass flow rate of the cooling water to the mass flow rate of the condenstaing stream is (m3dot/m1dot)',round(ratio,2)",
+ "print '-> The rate of energy transfer from the condensing steam to the cooling water of the steam passing through the condenser is',round(QRate,2),'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of the mass flow rate of the cooling water to the mass flow rate of the condenstaing stream is (m3dot/m1dot) 36.31",
+ "-> The rate of energy transfer from the condensing steam to the cooling water of the steam passing through the condenser is -2276.59 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.8:- Page no-146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 293.0 # In kelvin",
+ "P1= 1.01325 * (10**5) # In pascal",
+ "V1max= 1.3 # maximum velocity of entering air in m/s",
+ "T2max= 305.0 # maximum temperature at the exit in kelvin",
+ "pec= -80.0 # power received by electronic components in watt",
+ "Pf= -18.0 # Power received by fan in watt",
+ "R= 8.314 # Universal gas constant",
+ "M= 28.97*(10**(-3)) # Molar mass of air in kg",
+ "Qcvdot=0 # Heat transfer from the outer surface of the electronics enclosure to the surroundings is negligible.",
+ "Cp= 1.005*(10**3) # in j/kg*k",
+ "pi=3.14",
+ "",
+ "# Calculations:-",
+ "",
+ "Wcvdot = pec +Pf # total electric power provided to electronic components and fan in watt",
+ "mdotmin= (-Wcvdot)/(Cp*(T2max-T1)) # minimum mass flow rate",
+ "v1= ((R/M)*T1)/P1 # specific volume",
+ "A1min = (mdotmin*v1)/V1max",
+ "D1min = (4*A1min/(pi))**(0.5)",
+ "",
+ "# Results:-",
+ "print '-> The smallest fan inlet diameter is',round(D1min*100,2),'cm.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The smallest fan inlet diameter is 8.13 cm."
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.9 Page no-148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 20.0 # pressure in supply line in bars",
+ "P2 = 1.0 # exhaust pressure in bar",
+ "T2 = 120.0 # exhaust temperature in degree celcius",
+ "",
+ "# from table A-3 at 20 bars",
+ "hf1 = 908.79 # Enthalpy in kj/kg",
+ "hg1 = 2799.5 # Enthalpy in kj/kg",
+ "",
+ "# from table A-4, at 1 bar and 120 degree celcius",
+ "h2 = 2766.6 # in kj/kg",
+ "h1 = h2 # from throttling process assumption",
+ "",
+ "",
+ "# Calculations:-",
+ "x1 = (h1-hf1)/(hg1-hf1)",
+ "",
+ "# Results:-",
+ "print '-> The quality of the steam in the supply line is',round(x1,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The quality of the steam in the supply line is 0.98"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.10 Page no-150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 1.0 # pressure of industrial discharge in bar",
+ "T1 = 478.0 # temperature of industrial discharge in kelvin",
+ "m1dot = 69.78 # mass flow rate of industrial discharge in kg/s",
+ "T2 = 400.0 # temperature of exit products from steam generator in kelvin",
+ "P2 = 1.0 # pressure of exit products from steam generator in bar",
+ "P3 = 0.275 # pressure of water stream entering the generator in Mpa",
+ "T3 = 38.9 # temperature of water stream entering the generator in degree celcius",
+ "m3dot = 2.079 # mass flow rate of water stream entering in kg/s",
+ "P5 = 0.07 # exit pressure of the turbine in bars",
+ "x5 = 0.93 # quality of turbine exit",
+ "",
+ "# Part (a)",
+ "m2dot = m1dot # since gas and water streams do not mix",
+ "m5dot = m3dot # --DO",
+ "",
+ "# from table A-22, A-2 and A-3:-",
+ "h1 = 480.3 # in kj/kg",
+ "h2 = 400.98 # in Kj/kg",
+ "h3 = 162.9 # assumption: h3 = hf(T3), units in Kj/kg",
+ "hf5 = 161.0 # in kj/kg",
+ "hg5 = 2571.72 # in kj/kg",
+ "",
+ "# Part (b)",
+ "P4 = P3 # from the assumption that there is no pressure drop for water flowing through the steam generator",
+ "T4 = 180 # in degree celcius",
+ "",
+ "# Calculations:-",
+ "h5 = hf5 + x5*(hg5-hf5)",
+ "Wcvdot = m1dot*h1 + m3dot*h3 - m2dot*h2 - m5dot*h5",
+ "h4 = h3 + (m1dot/m3dot)*(h1 -h2) # from steady state energy rate balance",
+ " # interpolating in table A-4, with these P4 and h4",
+ "# Results:-",
+ "print '-> The power developed by the turbine is ',round(Wcvdot,2),'kJ/s.'",
+ "print '-> Turbine inlet temperature is',round(T4,2),'degree celcius.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The power developed by the turbine is 877.84 kJ/s.",
+ "-> Turbine inlet temperature is 180.0 degree celcius."
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.11 Page no-153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "V = 0.85 # volume of tank in m^3",
+ "T1 = 260.0 # initial temperature of the tank in degree celcius",
+ "X1 = 0.7 # initial quality",
+ "",
+ "# from table A-2",
+ "uf1 = 1128.4 # in kg/kg",
+ "ug1 = 2599.0 # in kg/kg",
+ "",
+ "vf1 = 1.2755e-3 # in m^3/kg",
+ "vg1 = 0.04221 # in m^3/kg",
+ "",
+ "",
+ "",
+ "# for final state, from table A-2,",
+ "u2 = 2599.0 # units in KJ/kg ",
+ "v2 = 42.21e-3 # units in m^3/Kg",
+ "he = 2796.6 # units in KJ/kg",
+ "",
+ "# Calculations:-",
+ "u1 = uf1 + X1*(ug1-uf1) # in kj/kg",
+ "v1 = vf1 + X1*(vg1-vf1) # in m^3/kg",
+ "m1 = V/v1 # initial mass in kg",
+ "m2 = V/v2 # final mass in kg",
+ "U2 = m2*u2 # final internal energy in KJ",
+ "U1 = m1*u1 # initial internal energy in KJ",
+ "Qcv = (U2-U1) - he*(m2-m1) ",
+ "",
+ "# Results:-",
+ "print '-> The amount of heat transfer is',round(Qcv,2),'KJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The amount of heat transfer is 14162.16 KJ."
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 4.12 Page no-155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:- ",
+ "Pv = 15.0 # pressure in the vessel in bar",
+ "Tv = 320.0 # temperature in the vessel in degree celcius",
+ "Vt = 0.6 # volume of a tank in m^3",
+ "Tt = 400.0 # temperature in the tank in degree celcius when the tank is full",
+ "",
+ "# Since the tank is initially empty:-",
+ "m1 = 0",
+ "u1 = 0",
+ "",
+ "# From table A-4, at 15bar and 400 degree celcius:-",
+ "v2 = 0.203 # Volume in m^3/kg",
+ "m2 = Vt/v2 # mass within the tank at the end of the process in kg",
+ "hi = 3081.9 # in kj/kg",
+ "u2 = 2951.3 # in kj/kg",
+ "",
+ "# Calculations:-",
+ "deltaUcv = m2*u2-m1*u1",
+ "Wcv = hi*(m2-m1)-deltaUcv",
+ "",
+ "# Results:-",
+ "print '-> The amount of work developed by the turbine is ',round(Wcv,2),'kJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The amount of work developed by the turbine is 386.01 kJ."
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_5.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_5.ipynb
new file mode 100755
index 00000000..57430b8a
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_5.ipynb
@@ -0,0 +1,130 @@
+{
+ "metadata": {
+ "name": "Chapter 5"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "#Chapter 5 :- The Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 5.1 Page no- 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "W = 410.00 # net work output in kj claimed ",
+ "Q = 1000.00 # energy input by heat transfer in kj",
+ "Tc = 300.00 # temperature of cold reservoir in kelvin",
+ "TH = 500.00 # temperature of hot reservoir in kelvin",
+ "",
+ "# Calculations ",
+ "eta = W/Q # thermal efficiency",
+ "etamax = 1-(Tc/TH)",
+ "",
+ "# Results",
+ "print '-> Eta = ',round(eta,4)",
+ "print '-> Etamax = ',round(etamax,4)",
+ "print '-> Since eta is more than etamax, the claim is not authentic'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Eta = 0.41",
+ "-> Etamax = 0.4",
+ "-> Since eta is more than etamax, the claim is not authentic"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 5.2 Page no- 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "Qcdot = 8000.00 # in kj/h",
+ "Wcycledot = 3200.00 # in kj/h",
+ "Tc = 268.00 # temperature of compartment in kelvin",
+ "TH = 295.00 # temperature of the surrounding air in kelvin",
+ "",
+ "# Calculations ",
+ "beta = Qcdot/Wcycledot # coefficient of performance",
+ "betamax = Tc/(TH-Tc) # reversible coefficient of performance",
+ "",
+ "# Results",
+ "print '-> Coefficient of performance is ',round(beta,3)",
+ "print '-> Coefficient of performance of a reversible cycle is ',round(betamax,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Coefficient of performance is 2.5",
+ "-> Coefficient of performance of a reversible cycle is 9.926"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Eample 5.3 Page no- 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "Tc = 283.0 # in kelvin",
+ "TH = 295.0 # in kelvin",
+ "QH = 5*(10**5) # in kj per day",
+ "",
+ "# Calculations",
+ "Wcyclemin = (1-(Tc/TH))*QH",
+ "",
+ "# Results",
+ "print '-> Minimum theoretical work input for one day of operation in kJ is: ',round(Wcyclemin,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Minimum theoretical work input for one day of operation in kJ is: 20338.98"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_6.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_6.ipynb
new file mode 100755
index 00000000..ad9b8614
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_6.ipynb
@@ -0,0 +1,730 @@
+{
+ "metadata": {
+ "name": "Chapter 6"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 6 :- Using Entropy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.1 Page no- 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T = 373.15 # temperature in kelvin",
+ "",
+ "# From table A-2",
+ "",
+ "p = 1.014*(10**5) # pressure in pascal",
+ "vg = 1.673",
+ "vf = 1.0435e-3",
+ "sg = 7.3549",
+ "sf = 1.3069",
+ "",
+ "# Calculations",
+ "w = p*(vg-vf)*(10**(-3))",
+ "Q = T*(sg-sf)",
+ "",
+ "# Results ",
+ "print '-> The work per unit mass is',round(w,3),'KJ/kg.'",
+ "print '-> The heat transfer per unit mass is ',round(Q,2),'KJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work per unit mass is 169.536 KJ/kg.",
+ "-> The heat transfer per unit mass is 2256.81 KJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.2 Page no- 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Assumptions:",
+ "\"\"\"",
+ "1. The water in the piston\u2013cylinder assembly is a closed system.",
+ "",
+ "2. There is no heat transfer with the surroundings.",
+ "",
+ "3. The system is at an equilibrium state initially and finally. There is no",
+ "change in kinetic or potential energy between these two states.\"\"\"",
+ "",
+ "# From table A-2 at 100 degree celcius",
+ "ug = 2506.5 # in kj/kg",
+ "uf = 418.94 # in kj/kg",
+ "sg = 7.3549",
+ "sf = 1.3069",
+ "",
+ "",
+ "# Calculations:-",
+ "# From energy balance",
+ "W = -(ug-uf)",
+ "# From entropy balance",
+ "sigmabym = (sg-sf)",
+ "",
+ "# Results",
+ "print '-> The net work per unit mass is ',round(W,2),'KJ/kg.'",
+ "print '-> The amount of entropy produced per unit mass is ',round(sigmabym,2),'kJ/kg.k.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The net work per unit mass is -2087.56 KJ/kg.",
+ "-> The amount of entropy produced per unit mass is 6.05 kJ/kg.k."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.3 Page no-225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 273.0 # initial temperature of saturated vapor in kelvin",
+ "P2 = 0.7*(10**6) # final pressure in pascal",
+ "",
+ "# From table A-10,",
+ "u1 = 227.06 # in kj/kg",
+ "",
+ "# minimum theoretical work corresponds to state of isentropic compression",
+ "# From table A-12,",
+ "u2s = 244.32 # in kj/kg",
+ " ",
+ "# Calculations ",
+ "Wmin = u2s-u1",
+ "",
+ "# Results",
+ "print '-> The minimum theoretical work input required per unit mass of refrigerant is: ',round(Wmin,2),'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The minimum theoretical work input required per unit mass of refrigerant is: 17.26 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.4 Page no- 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "Qdot = -1.2 # in kilo watt",
+ "Tb = 300.0 # in kelvin",
+ "Tf = 293.0 # in kelvin",
+ "# Calculations",
+ "",
+ "# Part (a)",
+ "# From entropy balance ",
+ "sigmadot = -Qdot/Tb",
+ "",
+ "# Part(b)",
+ "# From entropy balance ",
+ "sigmadt = -Qdot/Tf",
+ "",
+ "# Results",
+ "print '-> The rate of entropy production with gearbox as system is ',round(sigmadot,5),'kw/k.'",
+ "print '-> The rate of entropy production with gearbox + sorrounding as system is',round(sigmadt,5),'kw/k.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of entropy production with gearbox as system is 0.004 kw/k.",
+ "-> The rate of entropy production with gearbox + sorrounding as system is 0.0041 kw/k."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.5 Page no-229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# GIven:-",
+ "Tmi = 1200.0 # initial temperature of metal in kelvin",
+ "cm = 0.42 # specific heat of metal in KJ/kg.k",
+ "mm = 0.3 # mass of metal in kg",
+ "Twi = 300.0 # initial temperature of water in kelvin",
+ "cw = 4.2 # specific heat of water in KJ/Kg.k",
+ "mw = 9.0 # mass of water in kg",
+ "",
+ "# Calculations",
+ "import math",
+ "# Part(a)",
+ "# Solving energy balance equation yields",
+ "Tf = (mw*(cw/cm)*Twi+mm*Tmi)/(mw*(cw/cm)+mm)",
+ "",
+ "# Part (b)",
+ "# Solving entropy balance equation yields",
+ "sigma = mw*cw*math.log(Tf/Twi)+mm*cm*math.log(Tf/Tmi)",
+ "",
+ "# Results",
+ "print '-> The final equilibrium temperature of the metal bar and the water is',round(Tf,2),' kelvin.'",
+ "print '-> The amount of entropy produced is:',round(sigma,2),'kJ/k.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The final equilibrium temperature of the metal bar and the water is 302.99 kelvin.",
+ "-> The amount of entropy produced is: 0.2 kJ/k."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.6 Page no- 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 30.0 # pressure of steam entering the turbine in bar",
+ "T1 = 400.0 # temperature of steam entering the turbine in degree celcius",
+ "V1 = 160.0 # velocity of steam entering the turbine in m/s",
+ "T2 = 100.0 # temperature of steam exiting in degree celcius",
+ "V2 = 100.0 # velocity of steam exiting in m/s",
+ "Wcvdot = 540.0 # work produced by turbine in kJ/kg of steam",
+ "Tb = 350.0 # temperature of the boundary in kelvin",
+ "",
+ "# From table A-4 and table A-2",
+ "h1 = 3230.9 # specific enthalpy at entry in Kj/kg",
+ "h2 = 2676.1 # specific enthalpy at exit in kj/kg",
+ "",
+ "# Calculations",
+ "",
+ "# Reduction in mass and energy balance equations results in ",
+ "Qcvdot = Wcvdot + (h2 - h1)+ (V2**2-V1**2)/(2*(10**3)) # heat transfer rate",
+ "",
+ "# From table A-2",
+ "s2 = 7.3549 # in kj/kg.k",
+ "# From table A-4",
+ "s1 = 6.9212 # in kj/kg.k",
+ "",
+ "# From entropy and mass balance equations",
+ "sigmadot = -(Qcvdot/Tb) + (s2-s1)",
+ "",
+ "# Results",
+ "print '-> The rate at which entropy is produced within the turbine per kg of steam flowing is',round(sigmadot,2),'kJ/kg.k.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate at which entropy is produced within the turbine per kg of steam flowing is 0.5 kJ/kg.k."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.7 Page no- 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 294.0 # entry temperature of air in kelvin",
+ "P1 = 5.1 # entry pressure of air in bars",
+ "T2 = 352.0 # exit temperature of hot stream in kelvin",
+ "P2 = 1.0 # exit pressure of hot stream in bars",
+ "T3 = 255.0 # exit temperature of cold stream in kelvin",
+ "P3 = 1.0 # exit pressure of cold stream in bars",
+ "cp = 1.0 # in kj/kg.k",
+ "",
+ "# Calculations",
+ "import math",
+ "R = 8.314/28.97",
+ "se = 0.4*(cp*math.log((T2)/(T1))-R*math.log(P2/P1)) + 0.6*(cp*math.log((T3)/(T1))-R*math.log(P3/P1))",
+ " # specific entropy in kj/kg.k",
+ "",
+ "",
+ "# Results",
+ "print '-> Specific entropy in kj/kg.k = ',round(se,3),' KJ/kg.'",
+ "print '-> Since se > 0, the claim of the writer is true'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Specific entropy in kj/kg.k = 0.454 KJ/kg.",
+ "-> Since se > 0, the claim of the writer is true"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 6.8 Page no- 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 3.5 # pressure of refrigerant entering the compressor in bars",
+ "T1 = 268.0 # temperature of refrigerant entering the compressor in kelvin",
+ "P2 = 14.0 # pressure of refrigerant entering the condenser in bars",
+ "T2 = 348.0 # temperature of refrigerant entering the condenser in kelvin",
+ "P3 = 14.0 # pressure of refrigerant exiting the condenser in bars",
+ "T3 = 301.0 # temperature of refrigerant exiting the condenser in kelvin",
+ "P4 = 3.5 # pressure of refrigerant after passing through expansion valve in bars",
+ "P5 = 1.0 # pressure of indoor return air entering the condenser in bars",
+ "T5 = 293.0 # temperature of indoor return air entering the condenser in kelvin",
+ "AV5 = 0.42 # volumetric flow rate of indoor return air entering the condenser in m^3/s",
+ "P6 = 1.0 # pressure of return air exiting the condenser in bar",
+ "T6 = 323.0 # temperature of return air exiting the condenser in kelvin",
+ "",
+ "# Part(a)",
+ "",
+ "# From table A-9",
+ "s1 = 0.9572 # in kj/kg.k",
+ "# Interpolating in table A-9",
+ "s2 = 0.98225 # in kj/kg.k",
+ "h2 = 294.17 # in kj/kg",
+ "# From table A-7",
+ "s3 = 0.2936 # in kj/kg.k",
+ "h3 = 79.05 # in kj/kg",
+ "",
+ "h4 = h3 # since expansion through valve is throttling process",
+ "",
+ "# From table A-8",
+ "hf4 = 33.09 # in kj/kg",
+ "hg4 = 246.00 # in kj/kg",
+ "sf4 = 0.1328 # in kj/kg.k",
+ "sg4 = 0.9431 # in kj/kg.k",
+ "cp = 1.005 # in kj/kg.k",
+ "",
+ "# Calculations",
+ "import math",
+ "x4 = (h4-hf4)/(hg4-hf4) # quality at state 4",
+ "s4 = sf4 + x4*(sg4-sf4) # specific entropy at state 4",
+ "",
+ "# CONDENSER!!",
+ "v5 = ((8314/28.97)*T5)/(P5*(10**5)) # specific volume at state 5",
+ "mairdot = AV5/v5 ",
+ "h6 = cp*T6",
+ "h5 = cp*T5",
+ "mrefdot = mairdot*(h6-h5)/(h2-h3)",
+ "deltaS65 = cp*math.log(T6/T5)-(8.314/28.97)*math.log(P6/P5) # change in specific entropy",
+ "sigmacond = (mrefdot*(s3-s2)) + (mairdot*(deltaS65))",
+ "",
+ "# COMPRESSOR!!",
+ "sigmacomp = mrefdot*(s2-s1)",
+ "",
+ "# VALVE!!",
+ "sigmavalve = mrefdot *(s4-s3)",
+ "",
+ "# Results",
+ "print '-> The rates of entropy production for control volume enclosing the condenser is ',sigmacond,'kW/K.'",
+ "print '-> The rates of entropy production for control volume enclosing the compressor is ',sigmacomp,'kW/K.'",
+ "print '-> The rates of entropy production for control volume enclosing the expansion valve is ',sigmavalve,'kW/K.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rates of entropy production for control volume enclosing the condenser is 0.000724165354577 kW/K.",
+ "-> The rates of entropy production for control volume enclosing the compressor is 0.00175361560919 kW/K.",
+ "-> The rates of entropy production for control volume enclosing the expansion valve is 0.000988192525533 kW/K."
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.9 Page no-243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 1.00 # initial pressure in bar",
+ "T1 = 300.00 # initial temperature in kelvin",
+ "T2 = 650.00 # final temperature in kelvin",
+ "",
+ "# Part(a)",
+ "# From table A-22",
+ "pr2 = 21.86 ",
+ "pr1 = 1.3860",
+ "k = 1.39 # From table A-20",
+ "",
+ "# Calculations",
+ "p2 = P1*(pr2/pr1)",
+ "p2a = P1*((T2/T1)**(k/(k-1)))",
+ "",
+ "# Results",
+ "print '-> P2 = ',p2,'bar.'",
+ "print '-> Part(b) IT software problem'",
+ "print '-> P2a = ',p2a,'bar.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> P2 = 15.772005772 bar.",
+ "-> Part(b) IT software problem",
+ "-> P2a = 15.7324909817 bar."
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.10 Page no- 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m1 = 5.00 # initial mass in kg",
+ "P1 = 5.00 # initial pressure in bar",
+ "T1 = 500.00 # initial temperature in kelvin",
+ "P2 = 1.00 # final pressure in bar",
+ "",
+ "# From table A-22",
+ "pr1 = 8.411",
+ "",
+ "",
+ "",
+ "# Using this value of pr2 and interpolation in table A-22",
+ "T2 = 317.00 # in kelvin",
+ "",
+ "# Calculations ",
+ "pr2 = (P2/P1)*pr1",
+ "m2 = (P2/P1)*(T1/T2)*m1",
+ "",
+ "# Results",
+ "print '-> The amount of mass remaining in the tank is ',m2,'kg.'",
+ "print 'and its temperature is ',T2,'kelvin.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The amount of mass remaining in the tank is 1.57728706625 kg.",
+ "and its temperature is 317.0 kelvin."
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.11 Page no- 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 1.00 # inlet pressure in bar",
+ "T1 = 593.00 # inlet temperature in kelvin",
+ "P2 = 1.00 # exit pressure in bar",
+ "eta =0.75 # turbine efficiency",
+ "",
+ "# From table A-4",
+ "h1 = 3105.6 # in Kj/kg",
+ "s1 = 7.5308 # in kj/kg.k",
+ "# From table A-4 at 1 bar",
+ "h2s = 2743.00 # in kj/kg",
+ "",
+ "# Calculations",
+ "w = eta*(h1 - h2s)",
+ "",
+ "# Result",
+ "print '-> The work developed per unit mass of steam flowing through is ',w,'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work developed per unit mass of steam flowing through is 271.95 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.12 Page no-250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 3.00 # pressure of air entering in bar",
+ "T1 = 390.00 # temperature of air entering in kelvin",
+ "P2 = 1.00 # pressure of exit air",
+ "Wcvdot = 74.00 # work developed in kj/kg",
+ "",
+ "# From table A-22,at 390k",
+ "h1 = 390.88 # in kj/kg",
+ "pr1 = 3.481",
+ "",
+ "# From interpolation table A-22",
+ "h2s = 285.27 # in kj/kg",
+ "",
+ "# calculations",
+ "pr2 = (P2/P1)*pr1",
+ "Wcvdots = h1 - h2s",
+ "eta = Wcvdot/Wcvdots",
+ "",
+ "# Result",
+ "print '-> The turbine efficiency is ',round(eta,4),'.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The turbine efficiency is 0.7007 ."
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 6.13 Page no-251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 1.00 # pressure of entering steam in Mpa",
+ "T1 = 593.00 # temperature of entering steam in kelvin",
+ "V1 = 30.00 # velocity of entering steam in m/s",
+ "P2 = 0.3 # pressure of exit steam in Mpa",
+ "T2 = 453.00 # temperature of exit steam in kelvin",
+ "",
+ "# From table A-4, at T1 = 593 kelvin and P1 = 1 Mpa;",
+ "# and at T2 = 453 kelvin and P2 = .3 Mpa",
+ "h1 = 3093.9 # in kj/kg",
+ "s1 = 7.1962 # in kj/kg.k",
+ "h2 = 2823.9 # in kj/kg",
+ "",
+ "",
+ "# Interpolating in table A-4",
+ "h2s = 2813.3 # in kj/kg",
+ "",
+ "# Calculations",
+ "V2squareby2 = h1 - h2 + (V1**2)/2000",
+ "V2squareby2s = h1 - h2s + (V1**2)/2000",
+ "eta = V2squareby2/V2squareby2s",
+ "",
+ "# Results",
+ "print '-> The nozzle efficiency is ',round(eta,4),'.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The nozzle efficiency is 0.9623 ."
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 6.14 Page no- 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# From table A-9",
+ "h1 = 249.75 # in kj/kg",
+ "h2 = 294.17 # in kj/kg",
+ "mdot = 0.07 # in kg/s",
+ "",
+ "# From table A-9",
+ "s1 = 0.9572 # in Kj/Kg.k",
+ "h2s = 285.58 # in kj/kg",
+ "",
+ "# Calculations",
+ "wcvdot = -(mdot*(h2-h1))",
+ "eta = (h2s-h1)/(h2-h1) ",
+ "",
+ "# Results",
+ "print '-> The power in is',wcvdot,'KW.'",
+ "print '-> The isentropic efficiency is ',round(eta,3),'.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The power in is -3.1094 KW.",
+ "-> The isentropic efficiency is 0.807 ."
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 6.15 Page no-256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "P1 = 1.00 # pressure of entering air in bar",
+ "T1 = 293.00 # temperature of entering air in kelvin",
+ "P2 = 5.00 # pressure of exit air in bar",
+ "n = 1.3",
+ "R = 8.314/28.97",
+ "",
+ "# From table A-22",
+ "h1 = 293.17 # in kj/kg",
+ "h2 = 426.35 # in kj/kg",
+ "",
+ "# Calculations",
+ "T2 = T1*((P2/P1)**((n-1)/n)) # in kelvin",
+ "wcvdot=((n*R)/(n-1))*(T1-T2) # in kj/kg",
+ "Qcvdot= wcvdot + (h2-h1) # in kj/kg",
+ "",
+ "# Results",
+ "print '-> The work per unit mass passing through the device is',round(wcvdot,2),'kJ/kg.'",
+ "print '-> The heat transfer per unit mass is ',round(Qcvdot,2),'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The work per unit mass passing through the device is -163.89 kJ/kg.",
+ "-> The heat transfer per unit mass is -30.71 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_7.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_7.ipynb
new file mode 100755
index 00000000..00e6cd3c
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_7.ipynb
@@ -0,0 +1,674 @@
+{
+ "metadata": {
+ "name": "Chapter 7"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 7 :- Exergy Analysis"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.1 Page no-279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "v = 2450.00 # volume of gaseous products in cm^3",
+ "P = 7.00 # pressure of gaseous product in bar",
+ "T = 867.00 # temperature of gaseous product in degree celcius",
+ "T0 = 300.00 # in kelvin",
+ "P0 = 1.013 # in bar",
+ "",
+ "# From table A-22",
+ "u = 880.35 # in kj/kg",
+ "u0 = 214.07 # in kj/kg",
+ "s0T = 3.11883 # in kj/kg.k",
+ "s0T0 = 1.70203 # in kj/kg.k",
+ "",
+ "# Calculations",
+ "import math",
+ "e = (u-u0) + (P0*(8.314/28.97)*(((T+273)/P)-(T0/P0))) - T0*(s0T-s0T0-(8.314/28.97)*math.log(P/P0)) # kj/kg",
+ "",
+ "# Results",
+ "print '-> The specific exergy of the gas is ',round(e,3),'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The specific exergy of the gas is 368.912 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.2 Page no-280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "mR = 1.11 # mass of the refrigerant in kg",
+ "T1 = -28.00 # initial temperature of the saturated vapor in degree celcius",
+ "P2 = 1.4 # final pressure of the refrigerant in bar",
+ "T0 = 293.00 # in kelvin",
+ "P0 = 1.00 # in bar",
+ "",
+ "# Part (a)",
+ "# From table A-10",
+ "u1 = 211.29 # in kj/kg",
+ "v1 = 0.2052 # in m^3/kg",
+ "s1 = 0.9411 # in kj/kg.k",
+ "# From table A-12",
+ "u0 = 246.67 # in kj/kg",
+ "v0 = 0.23349 # in m^3/kg",
+ "s0 = 1.0829 # in kj/kg.k",
+ "",
+ "# From table A-12",
+ "u2 = 300.16 # in kj/kg",
+ "s2 = 1.2369 # in kj/kg.k",
+ "v2 = v1",
+ "",
+ "# Calculations ",
+ "E1 = mR*((u1-u0) + P0*(10**5)*(v1-v0)*(10**(-3))-T0*(s1-s0))",
+ "E2 = mR*((u2-u0) + P0*(10**5)*(v2-v0)*(10**(-3))-T0*(s2-s0))",
+ "",
+ "# Results for Part A",
+ "print '-> Part(a) The initial exergy is ',round(E1,2),'kJ.'",
+ "print '-> The final exergy is ',round(E2,2),'kJ.'",
+ "print '-> The change in exergy of the refrigerant is ',round(E2-E1,2),'kJ.'",
+ "",
+ "",
+ "# Part (b)",
+ "# Calculations",
+ "deltaU = mR*(u2-u1)",
+ "# From energy balance",
+ "deltaPE = -deltaU",
+ "# With the assumption::The only significant changes of state are experienced by the refrigerant and the suspended mass. For the refrigerant, ",
+ "# there is no change in kinetic or potential energy. For the suspended mass, there is no change in kinetic or internal energy. Elevation is ",
+ "# the only intensive property of the suspended mass that changes",
+ "deltaE = deltaPE",
+ "",
+ "# Results for part b",
+ "print '-> Part(b)The change in exergy of the suspended mass is ',round(deltaE,3),'kJ.'",
+ "",
+ "",
+ "# Part(c)",
+ "# Calculations",
+ "deltaEiso = (E2-E1) + deltaE",
+ "",
+ "# Results",
+ "print '-> Part(c)The change in exergy of an isolated system of the vessel and pulley\u2013mass assembly is ',round(deltaEiso,2),'kJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a) The initial exergy is 3.71 kJ.",
+ "-> The final exergy is 6.15 kJ.",
+ "-> The change in exergy of the refrigerant is 2.44 kJ.",
+ "-> Part(b)The change in exergy of the suspended mass is -98.646 kJ.",
+ "-> Part(c)The change in exergy of an isolated system of the vessel and pulley\u2013mass assembly is -96.2 kJ."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 7.3 Page no-287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "T = 373.15 # initial temperature of saturated liquid in kelvin",
+ "T0 = 293.15 # in kelvin",
+ "P0 = 1.014 # in bar",
+ "",
+ "# Part(a)",
+ "# From table A-2",
+ "ug = 2506.5 # in kj/kg",
+ "uf = 418.94 # in kj/kg",
+ "vg = 1.673 # in m^3/kg",
+ "vf = 1.0435*(10**(-3)) # in m^3/kg",
+ "sg = 7.3549 # in kj/kg.k",
+ "sf = 1.3069 # in kj/kg.k",
+ "",
+ "",
+ "# Calculations ",
+ "# Energy transfer accompanying work",
+ "etaw = 0 # since p = p0",
+ "# Exergy transfer accompanying heat",
+ "Q = 2257 # in kj/kg,obtained from example 6.1",
+ "etah = (1-(T0/T))*Q",
+ "",
+ "# Exergy destruction",
+ "ed = 0 # since the process is accomplished without any irreversibilities",
+ "deltae = ug-uf + P0*(10**5)*(vg-vf)/(10**3)-T0*(sg-sf)",
+ "",
+ "# Results",
+ "print '-> Part(a)the change in exergy is',round(deltae,2),'kJ/kg.'",
+ "print '-> The exergy transfer accompanying work is',round(etaw,2),'kJ/kg.'",
+ "print '-> The exergy transfer accompanying heat is',round(etah,2),'kJ/kg.'",
+ "print '-> The exergy destruction is',round(ed,2),'kJ/kg.'",
+ "",
+ "",
+ "# Part(b)",
+ "Deltae = deltae # since the end states are same ",
+ "Etah = 0 # since process is adiabatic",
+ "# Exergy transfer along work",
+ "W = -2087.56 # in kj/kg from example 6.2",
+ "Etaw = W- P0*(10**5)*(vg-vf)/(10**3)",
+ "# Exergy destruction",
+ "Ed = -(Deltae+Etaw)",
+ "",
+ "# Results",
+ "print '-> Part(b)the change in exergy is ',round(Deltae,2),'kJ/kg.'",
+ "print '-> The exergy transfer accompanying work is',round(Etaw,2),'kJ/kg.'",
+ "print '-> The exergy transfer accompanying heat is',round(Etah,2),'kJ/kg.'",
+ "print '-> The exergy destruction is',round(Ed,2),'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a)the change in exergy is 484.13 kJ/kg.",
+ "-> The exergy transfer accompanying work is 0.0 kJ/kg.",
+ "-> The exergy transfer accompanying heat is 483.88 kJ/kg.",
+ "-> The exergy destruction is 0.0 kJ/kg.",
+ "-> Part(b)the change in exergy is 484.13 kJ/kg.",
+ "-> The exergy transfer accompanying work is -2257.1 kJ/kg.",
+ "-> The exergy transfer accompanying heat is 0.0 kJ/kg.",
+ "-> The exergy destruction is 1772.97 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.4 Page no-289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T0 = 293.00 # in kelvin",
+ "Qdot = -1.2 # in KW, from example 6.4a",
+ "Tb = 300.00 # temperature at the outer surface of the gearbox in kelvin from example 6.4a",
+ "sigmadot = 0.004 # rate of entropy production in KW/k from example 6.4a",
+ "",
+ "# Calculations",
+ "R = -(1-T0/Tb)*Qdot # time rate of exergy transfer accompanying heat",
+ "Eddot = T0*sigmadot # rate of exergy destruction",
+ "",
+ "# Results",
+ "print '-> Balance sheet'",
+ "print '* Rate of exergy in high speed shaft 60Kw' ",
+ "print '-> Disposition of the exergy: Rate of exergy out low-speed shaft 58.8Kw' ",
+ "print '-> Heat transfer is',round(R,3),'kw.'",
+ "print '-> Rate of exergy destruction is',round(Eddot,3),'kw.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Balance sheet",
+ "* Rate of exergy in high speed shaft 60Kw",
+ "-> Disposition of the exergy: Rate of exergy out low-speed shaft 58.8Kw",
+ "-> Heat transfer is 0.028 kw.",
+ "-> Rate of exergy destruction is 1.172 kw."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 7.5 Page no-295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 3.0 # entry pressure in Mpa",
+ "p2 = 0.5 # exit pressure in Mpa",
+ "T1 = 320.0 # entry temperature in degree celcius",
+ "T0 = 25.0 # in degree celcius",
+ "p0 = 1.0 # in atm",
+ "",
+ "# From table A-4",
+ "h1 = 3043.4 # in kj/kg",
+ "s1 = 6.6245 # in kj/kg.k",
+ "h2 = h1 # from reduction of the steady-state mass and energy rate balances",
+ "s2 = 7.4223 # Interpolating at a pressure of 0.5 MPa with h2 = h1, units in kj/kg.k",
+ "",
+ "# From table A-2",
+ "h0 = 104.89 # in kj/kg",
+ "s0 = 0.3674 # in kj/kg.k",
+ "",
+ "# Calculations ",
+ "ef1 = h1-h0-(T0+273)*(s1-s0) # flow exergy at the inlet",
+ "ef2 = h2-h0-(T0+273)*(s2-s0) # flow exergy at the exit",
+ "# From the steady-state form of the exergy rate balance",
+ "Ed = ef1-ef2 # the exergy destruction per unit of mass flowing is",
+ "",
+ "# Results ",
+ "print '-> The specific flow exergy at the inlet is ',round(ef1,2),'kJ/kg.'",
+ "print '-> The specific flow exergy at the exit is',round(ef2,2),'kJ/kg.'",
+ "print '-> The exergy destruction per unit of mass flowing is',round(Ed,2),'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The specific flow exergy at the inlet is 1073.89 kJ/kg.",
+ "-> The specific flow exergy at the exit is 836.15 kJ/kg.",
+ "-> The exergy destruction per unit of mass flowing is 237.74 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.6 Page no-296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 610.0 # temperature of the air entering heat exchanger in kelvin",
+ "p1 = 10.0 # pressure of the air entering heat exchanger in bar",
+ "T2 = 860.0 # temperature of the air exiting the heat exchanger in kelvin",
+ "p2 = 9.70 # pressure of the air exiting the heat exchanger in bar",
+ "T3 = 1020.0 # temperature of entering hot combustion gas in kelvin",
+ "p3 = 1.10 # pressure of entering hot combustion gas in bar",
+ "p4 = 1.0 # pressure of exiting hot combustion gas in bar",
+ "mdot = 90.0 # mass flow rate in kg/s",
+ "T0 = 300.0 # in kelvin",
+ "p0 = 1.0 # in bar",
+ "",
+ "# Part (a)",
+ "# From table A-22",
+ "h1 = 617.53 # in kj/kg",
+ "h2 = 888.27 # in kj/kg",
+ "h3 = 1068.89 # in kj/kg",
+ "",
+ "# Calculations",
+ "\"\"\"From reduction of mass and energy rate balances for the control volume at",
+ "steady state \"\"\"",
+ "h4 = h3+h1-h2",
+ "",
+ "# Using interpolation in table A-22 gives",
+ "T4 = 778 # in kelvin",
+ "",
+ "# Results",
+ "print '-> The exit temperature of the combustion gas is',T4,'kelvin.'",
+ "",
+ "# Part(b)",
+ "# From table A-22",
+ "s2 = 2.79783 # in kj/kg.k",
+ "s1 = 2.42644 # in kj/kg.k",
+ "s4 = 2.68769 # in kj/kg.k",
+ "s3 = 2.99034 # in kj/kg.k",
+ "",
+ "# Calculations for part b",
+ "import math",
+ "deltaR = (mdot*((h2-h1)-T0*(s2-s1-(8.314/28.97)*math.log(p2/p1))))/1000",
+ "deltRc = mdot*((h4-h3)-T0*(s4-s3-(8.314/28.97)*math.log(p4/p3)))/1000",
+ "",
+ "# Results for part b",
+ "print '-> The net change in the flow exergy rate from inlet to exit of compressed gas is',round(deltaR,3),'MW.'",
+ "print '-> The net change in the flow exergy rate from inlet to exit of hot combustion gas is',round(deltRc,3),'MW.'",
+ "",
+ "# Part(c)",
+ "#From an exergy rate balance",
+ "Eddot = -deltaR-deltRc",
+ "",
+ "# Results ",
+ "print '-> The rate exergy destroyed, is',round(Eddot,3),'MW.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The exit temperature of the combustion gas is 778 kelvin.",
+ "-> The net change in the flow exergy rate from inlet to exit of compressed gas is 14.103 MW.",
+ "-> The net change in the flow exergy rate from inlet to exit of hot combustion gas is -16.934 MW.",
+ "-> The rate exergy destroyed, is 2.831 MW."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 7.7 Page no-299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 30.0 # pressure of entering steam in bar",
+ "t1 = 400.0 # temperature of entering steam in degree celcius",
+ "v1 = 160.0 # velocity of entering steam in m/s",
+ "t2 = 100.0 # temperature of exiting saturated vapor in degree celcius",
+ "v2 = 100.0 # velocity of exiting saturated vapor in m/s",
+ "W = 540.0 # rate of work developed in kj per kg of steam",
+ "Tb = 350.0 # the temperature on the boundary where heat transfer occurs in kelvin",
+ "T0 = 25.0 # in degree celcius",
+ "p0 = 1.0 # in atm",
+ "",
+ "# From table A-4",
+ "h1 = 3230.9 # in kj/kg",
+ "s1 = 6.9212 # in kj/kg.k",
+ "# From table A-2 ",
+ "h2 = 2676.1 # in kj/kg",
+ "s2 = 7.3549 # in kj/kg.k",
+ "# From example 6.6",
+ "Q = -22.6 # in kj/kg",
+ " ",
+ "# Calculations",
+ "DELTAef = (h1-h2)-(T0+273)*(s1-s2)+(v1**2-v2**2)/(2*1000)",
+ "# The net exergy carried in per unit mass of steam flowing in kj/kg",
+ "Eq = (1-(T0+273)/Tb)*(Q) # exergy transfer accompanying heat in kj/kg",
+ "Ed = ((1-(T0+273)/Tb)*(Q))-W+(DELTAef) # The exergy destruction determined by rearranging the steady-state form of the exergy ",
+ " # rate balance",
+ "",
+ "# Results",
+ "print '-> Balance sheet'",
+ "print '-> Net rate of exergy ',DELTAef,'kJ/kg,'",
+ "print '-> Disposition of the exergy:'",
+ "print '* Rate of exergy out'",
+ "print '-> Work',W,'kJ/kg.'",
+ "print '-> Heat transfer',-Eq,'.'",
+ "print '\u2022 Rate of exergy destruction',Ed,'kJ/kg.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Balance sheet",
+ "-> Net rate of exergy 691.8426 kJ/kg,",
+ "-> Disposition of the exergy:",
+ "* Rate of exergy out",
+ "-> Work 540.0 kJ/kg.",
+ "-> Heat transfer 3.35771428571 .",
+ "\u2022 Rate of exergy destruction 148.484885714 kJ/kg."
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.8 Page no-300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "m1dot = 69.78 # in kg/s",
+ "p1 = 1.0 # in bar",
+ "T1 = 478.0 # in kelvin",
+ "T2 = 400.0 # in kelvin",
+ "p2 = 1.0 # in bar",
+ "p3 = 0.275 # in Mpa",
+ "T3 = 38.9 # in degree celcius",
+ "m3dot = 2.08 # in kg/s",
+ "T4 = 180.0 # in degree celcius",
+ "p4 = 0.275 # in Mpa",
+ "p5 = 0.07 # in bar",
+ "x5 = 0.93",
+ "Wcvdot = 876.8 # in kW",
+ "T0 = 298.0 # in kelvin",
+ "",
+ "",
+ "# Part(a)",
+ "# From table A-22",
+ "h1 = 480.35 # in kj/kg",
+ "h2 = 400.97 # in kj/kg",
+ "s1 = 2.173 # in kj/kg",
+ "s2 = 1.992 # in kj/kg",
+ "",
+ "# From table A-2E",
+ "h3 = 162.82 # in kj/kg",
+ "s3 = 0.5598 # in kj/kg.k",
+ "# Using saturation data at 0.07 bars from Table A-3",
+ "h5 = 2403.27 # in kj/kg",
+ "s5 = 7.739 # in kj/kg.k",
+ "#The net rate exergy carried out by the water stream",
+ "",
+ "# From table A-4",
+ "h4 = 2825.0 # in kj/kg",
+ "s4 = 7.2196 # in kj/kg.k",
+ "# Calculations",
+ "import math",
+ "netRE = m1dot*(h1-h2-T0*(s1-s2-(8.314/28.97)*math.log(p1/p2))) # the net rate exergy carried into the control volume",
+ "netREout = m3dot*(h5-h3-T0*(s5-s3))",
+ "# From an exergy rate balance applied to a control volume enclosing the steam generator",
+ "Eddot = netRE + m3dot*(h3-h4-T0*(s3-s4)) # the rate exergy is destroyed in the heat-recovery steam generator",
+ "",
+ "# From an exergy rate balance applied to a control volume enclosing the turbine",
+ "EdDot = -Wcvdot + m3dot*(h4-h5-T0*(s4-s5)) # the rate exergy is destroyed in the tpurbine",
+ "",
+ "# Results ",
+ "print '-> balance sheet'",
+ "print '- Net rate of exergy in:',netRE,'kJ/kg.'",
+ "print '-> Disposition of the exergy:'",
+ "print '\u2022 Rate of exergy out'",
+ "print '-> power developed',1772.8-netREout-Eddot-EdDot,'kJ/kg.'",
+ "print '-> water stream ',netREout",
+ "print '\u2022 Rate of exergy destruction'",
+ "print '-> heat-recovery steam generator',Eddot,'kJ/kg'",
+ "print '-> turbine',EdDot"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> balance sheet",
+ "- Net rate of exergy in: 1775.34276 kJ/kg.",
+ "-> Disposition of the exergy:",
+ "\u2022 Rate of exergy out",
+ "-> power developed 874.25724 kJ/kg.",
+ "-> water stream 210.180672",
+ "\u2022 Rate of exergy destruction",
+ "-> heat-recovery steam generator 366.018792 kJ/kg",
+ "-> turbine 322.343296"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.9 Page no-302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T0 = 273.00 # in kelvin",
+ "pricerate = 0.08 # exergy value at $0.08 per kw.h",
+ "",
+ "# From example 6.8",
+ "sigmadotComp = 17.5e-4 # in kw/k",
+ "sigmadotValve = 9.94e-4 # in kw/k",
+ "sigmadotcond = 7.95e-4 # in kw/k",
+ "",
+ "# Calculations",
+ "# The rates of exergy destruction",
+ "EddotComp = T0*sigmadotComp # in kw",
+ "EddotValve = T0*sigmadotValve # in kw",
+ "Eddotcond = T0*sigmadotcond # in kw",
+ "",
+ "mCP = 3.11 # From the solution to Example 6.14, the magnitude of the compressor power in kW",
+ "",
+ "# Results",
+ "print '-> Daily cost in dollars of exergy destruction due to compressor irreversibilities = ',round(EddotComp*pricerate*24,3)",
+ "print '-> Daily cost in dollars of exergy destruction due to irreversibilities in the throttling valve = ',round(EddotValve*pricerate*24,3)",
+ "print '-> Daily cost in dollars of exergy destruction due to irreversibilities in the condenser = ',round(Eddotcond*pricerate*24,3)",
+ "print '-> Daily cost in dollars of electricity to operate compressor = ',round(mCP*pricerate*24,3)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Daily cost in dollars of exergy destruction due to compressor irreversibilities = 0.917",
+ "-> Daily cost in dollars of exergy destruction due to irreversibilities in the throttling valve = 0.521",
+ "-> Daily cost in dollars of exergy destruction due to irreversibilities in the condenser = 0.417",
+ "-> Daily cost in dollars of electricity to operate compressor = 5.971"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 7.10 Page no-313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "EfFdot = 100.00 # exergy rate of fuel entering the boiler in MW",
+ "cF = 1.44 # unit cost of fuel in cents per kw.h",
+ "Zbdot = 1080.00 # the cost of owning and operating boiler in dollars per hour",
+ "Ef1dot = 35.00 # exergy rate of exiting steam from the boiler in MW",
+ "p1 = 50.00 # pressure of exiting steam from the boiler in bar",
+ "T1 = 466.00 # temperature of exiting steam from the boiler in degree celcius",
+ "Ztdot = 92.00 # the cost of owning and operating turbine in dollars per hour",
+ "p2 = 5.00 # pressure of exiting steam from the turbine in bars",
+ "T2 = 205.00 # temperature of exiting steam from the turbine in degree celcius",
+ "m2dot = 26.15 # mass flow rate of exiting steam from the turbine in kg/s",
+ "T0 = 298.00 # in kelvin ",
+ "",
+ "",
+ "# Part(a)",
+ "# From table A-4,",
+ "h1 = 3353.54 # in kj/kg",
+ "h2 = 2865.96 # in kj/kg",
+ "s1 = 6.8773 # in kj/kg.k",
+ "s2 = 7.0806 # in kj/kg.k",
+ "",
+ "# Calculations",
+ "# From assumption,For each control volume,Qcvdot = 0 and kinetic and potential energy effects are negligible,the mass and energy rate ",
+ "# balances for a control volume enclosing the turbine reduce at steady state to give",
+ "Wedot = m2dot *(h1-h2)/1000 # power in MW",
+ "Ef2dot = Ef1dot+m2dot*(h2-h1-T0*(s2-s1))/1000 # the rate exergy exits with the steam in MW",
+ "",
+ "# Results",
+ "print '-> For the turbine,the power is',round(Wedot,2),'MW.'",
+ "print '-> For the turbine,the rate exergy exits with the steam is',round(Ef2dot,2),' MW.'",
+ "",
+ "# Part(b)",
+ "# Calculations",
+ "c1 = cF*(EfFdot/Ef1dot) + ((Zbdot/Ef1dot)/10**3)*100 # unit cost of exiting steam from boiler in cents/Kw.h",
+ "c2 = c1 # Assigning the same unit cost to the steam entering and exiting the turbine",
+ "ce = c1*((Ef1dot-Ef2dot)/Wedot) + ((Ztdot/Wedot)/10**3)*100 # unit cost of power in cents/kw.h",
+ "",
+ "# Results",
+ "print '-> The unit costs of the steam exiting the boiler of exergy is:',round(c1,2),' cents per kw.h.'",
+ "print '-> The unit costs of the steam exiting the turbine of exergy is:',round(c2,2),' cents per kw.h.'",
+ "print '-> Unit cost of power is:',ce,'cents per kw.h.'",
+ "",
+ "# Part(c)",
+ "C2dot = (c2*Ef2dot*10**3)/100 # cost rate for low-pressure steam in dollars per hour",
+ "Cedot = (ce*Wedot*10**3)/100 # cost rate for power in dollars per hour",
+ "",
+ "# Results",
+ "print '-> The cost rate of the steam exiting the turbine is:',round(C2dot,2),' dollars per hour.'",
+ "print '-> The cost rate of the power is: ',round(Cedot,2),' dollars per hour.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> For the turbine,the power is 12.75 MW.",
+ "-> For the turbine,the rate exergy exits with the steam is 20.67 MW.",
+ "-> The unit costs of the steam exiting the boiler of exergy is: 7.2 cents per kw.h.",
+ "-> The unit costs of the steam exiting the turbine of exergy is: 7.2 cents per kw.h.",
+ "-> Unit cost of power is: 8.81617975223 cents per kw.h.",
+ "-> The cost rate of the steam exiting the turbine is: 1487.92 dollars per hour.",
+ "-> The cost rate of the power is: 1124.08 dollars per hour."
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_8.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_8.ipynb
new file mode 100755
index 00000000..07927e9e
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_8.ipynb
@@ -0,0 +1,715 @@
+{
+ "metadata": {
+ "name": "Chapter 8"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 8 :- Vapour Power Systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.1 Page no-331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "p1 = 8.0 # pressure of saturated vapor entering the turbine in MPa",
+ "p3 = 0.008 # pressure of saturated liquid exiting the condenser in MPa",
+ "Wcycledot = 100.00 # the net power output of the cycle in MW",
+ "",
+ "# Analysis",
+ "# From table A-3",
+ "h1 = 2758.0 # in kj/kg",
+ "s1 = 5.7432 # in kj/kg.k",
+ "s2 = s1",
+ "sf = 0.5926 # in kj/kg.k",
+ "sg = 8.2287 # in kj/kg.k",
+ "hf = 173.88 # in kj/kg",
+ "hfg = 2403.1 # in kj/kg",
+ "v3 = 1.0084e-3 # in m^3/kg",
+ "",
+ "# State 3 is saturated liquid at 0.008 MPa, so",
+ "h3 = 173.88 # in kj/kg",
+ "",
+ "# Calculations",
+ "x2 = (s2-sf)/(sg-sf) # quality at state 2",
+ "h2 = hf + x2*hfg",
+ "p4 = p1",
+ "h4 = h3 + v3*(p4-p3)*10**6*10**-3 # in kj/kg",
+ "",
+ "# Part(a)",
+ "#Mass and energy rate balances for control volumes around the turbine and pump give, respectively",
+ "wtdot = h1 - h2",
+ "wpdot = h4-h3",
+ "",
+ "# The rate of heat transfer to the working fluid as it passes through the boiler is determined using mass and energy rate balances as",
+ "qindot = h1-h4",
+ "",
+ "eta = (wtdot-wpdot)/qindot # thermal efficiency)",
+ "",
+ "# Result for part a",
+ "print '-> The thermal efficiency for the cycle is ',round(eta,2)",
+ "",
+ "# Part(b)",
+ "bwr = wpdot/wtdot # back work ratio",
+ "",
+ "# Result",
+ "print '-> The back work ratio is ',bwr",
+ "",
+ "# Part(c)",
+ "mdot = (Wcycledot*10**3*3600)/((h1-h2)-(h4-h3)) # mass flow rate in kg/h",
+ "",
+ "# Result ",
+ "print '-> The mass flow rate of the steam is',round(mdot,2),'kg/h .'",
+ " ",
+ "# Part(d)",
+ "Qindot = mdot*qindot/(3600*10**3) # in MW",
+ "",
+ "# Results",
+ "print '-> The rate of heat transfer,Qindot , into the working fluid as it passes through the boiler, is',round(Qindot,2),'MW.'",
+ "",
+ "# Part(e)",
+ "Qoutdot = mdot*(h2-h3)/(3600*10**3) # in MW",
+ "",
+ "# Results",
+ "print '-> The rate of heat transfer,Qoutdot from the condensing steam as it passes through the condenser, is',round(Qoutdot,2),'MW.'",
+ "",
+ "# Part(f)",
+ "# From table A-2",
+ "hcwout= 146.68 # in kj/kg",
+ "hcwin= 62.99 # in kj/kg",
+ "mcwdot= (Qoutdot*10**3*3600)/(hcwout-hcwin) # in kg/h",
+ "",
+ "# Results",
+ "print '-> The mass flow rate of the condenser cooling water is',round(mcwdot,2),'kg/ h.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency for the cycle is 0.37",
+ "-> The back work ratio is 0.00836692570976",
+ "-> The mass flow rate of the steam is 376902.57 kg/h .",
+ "-> The rate of heat transfer,Qindot , into the working fluid as it passes through the boiler, is 269.7 MW.",
+ "-> The rate of heat transfer,Qoutdot from the condensing steam as it passes through the condenser, is 169.7 MW.",
+ "-> The mass flow rate of the condenser cooling water is 7299844.18 kg/ h."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.2 Page no-338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "etat= .85 # given that the turbine and the pump each have an isentropic efficiency of 85%",
+ "# Analysis",
+ "# State 1 is the same as in Example 8.1, so",
+ "h1 = 2758.0 # in kj/kg",
+ "s1 = 5.7432 # in kj/kg.k",
+ "# From example 8.1 ",
+ "h1 = 2758.0 # in kj/kg",
+ "h2s = 1794.8 # in kj/kg",
+ "# State 3 is the same as in Example 8.1, so",
+ "h3 = 173.88 # in kj/kg",
+ "",
+ "# Calculations",
+ "h2 = h1 - etat*(h1-h2s) # in kj/kg",
+ "wpdot = 8.06/etat # where the value 8.06 is obtained from example 8.1",
+ "",
+ "h4 = h3 + wpdot",
+ "",
+ "# Part(a)",
+ "eta = ((h1-h2)-(h4-h3))/(h1-h4) # thermal efficiency",
+ "",
+ "# Result for part (a)",
+ "print '-> Thermal efficiency is: ',round(eta,3)",
+ "",
+ "# Part(b)",
+ "Wcycledot = 100 # given,a net power output of 100 MW",
+ "# Calculations",
+ "mdot = (Wcycledot*(10**3)*3600)/((h1-h2)-(h4-h3))",
+ "# Result for part (b)",
+ "print '-> The mass flow rate of steam, in kg/h, for a net power output of 100 MW is ',round(mdot,3),'kg/h.'",
+ "",
+ "# Part(c)",
+ "Qindot = mdot*(h1-h4)/(3600 * 10**3)",
+ "# Result",
+ "print '-> The rate of heat transfer Qindot into the working fluid as it passes through the boiler, is ',round(Qindot,3),'MW.'",
+ "",
+ "# Part(d)",
+ "Qoutdot = mdot*(h2-h3)/(3600*10**3)",
+ "# Result",
+ "print '-> The rate of heat transfer Qoutdotfrom the condensing steam as it passes through the condenser, is ',round(Qoutdot,3),'MW.'",
+ "",
+ "# Part(e)",
+ "# From table A-2",
+ "hcwout = 146.68 # in kj/kg",
+ "hcwin = 62.99 # in kj/kg",
+ "mcwdot = (Qoutdot*10**3*3600)/(hcwout-hcwin)",
+ "# Result",
+ "print '-> The mass flow rate of the condenser cooling water, is: ',round(mcwdot,3),'kg/h.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Thermal efficiency is: 0.314",
+ "-> The mass flow rate of steam, in kg/h, for a net power output of 100 MW is 444863.139 kg/h.",
+ "-> The rate of heat transfer Qindot into the working fluid as it passes through the boiler, is 318.156 MW.",
+ "-> The rate of heat transfer Qoutdotfrom the condensing steam as it passes through the condenser, is 218.156 MW.",
+ "-> The mass flow rate of the condenser cooling water, is: 9384172.373 kg/h."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.3 Page no-341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 480.0 # temperature of steam entering the first stage turbine in degree celcius",
+ "p1 = 8.0 # pressure of steam entering the first stage turbine in MPa",
+ "p2 = 0.7 # pressure of steam exiting the first stage turbine in MPa",
+ "T3 = 440.0 # temperature of steam before entering the second stage turbine ",
+ "Pcond = 0.008 # condenser pressure in MPa",
+ "Wcycledot = 100.0 # the net power output in MW",
+ "",
+ "# Analysis",
+ "# From table A-4",
+ "h1 = 3348.4 # in kj/kg",
+ "s1 = 6.6586 # in kj/kg.k",
+ "s2 = s1 # isentropic expansion through the first-stage turbine",
+ "# From table A-3",
+ "sf = 1.9922 # in kj/kg.k",
+ "sg = 6.708 # in kj/kg.k",
+ "hf = 697.22 # in kj/kg",
+ "hfg = 2066.3 # in kj/kg",
+ "",
+ "# Calculations ",
+ "x2 = (s2-sf)/(sg-sf)",
+ "h2 = hf + x2*hfg",
+ "# State 3 is superheated vapor with p3 =\u0003 0.7 MPa and T3= \u0003 440\u0004C, so from Table A-4",
+ "h3 = 3353.3 # in kj/kg",
+ "s3 = 7.7571 # in kj/kg.k",
+ "s4 = s3 # isentropic expansion through the second-stage turbine",
+ "# For determing quality at state 4,from table A-3",
+ "sf = 0.5926 # in kj/kg.k",
+ "sg = 8.2287 # in kj/kg.k",
+ "hf = 173.88 # in kj/kg",
+ "hfg = 2403.1 # in kj/kg",
+ "",
+ "# Calculations",
+ "x4 = (s4-sf)/(sg-sf)",
+ "h4 = hf + x4*hfg",
+ "",
+ "# State 5 is saturated liquid at 0.008 MPa, so",
+ "h5 = 173.88",
+ "# The state at the pump exit is the same as in Example 8.1, so",
+ "h6 = 181.94",
+ "",
+ "# Part(a)",
+ "eta = ((h1-h2)+(h3-h4)-(h6-h5))/((h1-h6)+(h3-h2))",
+ "# Result",
+ "print '-> The thermal efficiency of the cycle is:',round(eta,2)",
+ "",
+ "# Part(b)",
+ "mdot = (Wcycledot*3600*10**3)/((h1-h2)+(h3-h4)-(h6-h5))",
+ "print '-> The mass flow rate of steam, is:',round(mdot,2),'kg/h.'",
+ "",
+ "# Part(c)",
+ "Qoutdot = (mdot*(h4-h5))/(3600*10**3)",
+ "print '-> The rate of heat transfer Qoutdot from the condensing steam as it passes through the condenser, MW is',round(Qoutdot,2),'kg/h.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency of the cycle is: 0.4",
+ "-> The mass flow rate of steam, is: 236344.68 kg/h.",
+ "-> The rate of heat transfer Qoutdot from the condensing steam as it passes through the condenser, MW is 148.02 kg/h."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.4 Page no-344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "# Part (a)",
+ "etat = 0.85 # given efficiency",
+ "# From the solution to Example 8.3, the following specific enthalpy values are known, in kJ/kg",
+ "h1 = 3348.4",
+ "h2s = 2741.8",
+ "h3 = 3353.3",
+ "h4s = 2428.5",
+ "h5 = 173.88",
+ "h6 = 181.94",
+ "",
+ "",
+ "# Calculations",
+ "h2 = h1 - etat*(h1 - h2s) # The specific enthalpy at the exit of the first-stage turbine in kj/kg",
+ "h4 = h3 - etat*(h3-h4s) # The specific enthalpy at the exit of the second-stage turbine in kj/kg",
+ "eta = ((h1-h2)+(h3-h4)-(h6-h5))/((h1-h6)+(h3-h2)) ",
+ "",
+ "# Result",
+ "print '-> The thermal efficiency is: ',eta",
+ "",
+ "# Part (b)",
+ "from numpy import linspace",
+ "from pylab import *",
+ "",
+ "h2 = []",
+ "h4 = []",
+ "y = []",
+ "x = linspace(0.85,1,50)",
+ "for i in range(0,50):",
+ " h2.append(i)",
+ " h4.append(i)",
+ " y.append(i)",
+ " h2[i] = h1 - x[i]*(h1 - h2s) # The specific enthalpy at the exit of the first-stage turbine in kj/kg",
+ " h4[i] = h3 - x[i]*(h3-h4s) # The specific enthalpy at the exit of the second-stage turbine in kj/kg",
+ " y[i] = ((h1-h2[i])+(h3-h4[i])-(h6-h5))/((h1-h6)+(h3-h2[i])) ",
+ "",
+ "plot(x,y)",
+ "xlabel('isentropic turbine efficiency')",
+ "ylabel('cycle thermal efficiency')",
+ "show()"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: 0.350865344714"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEMCAYAAAA8vjqRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlWX6wPEvynFJlNxaBBsUlEVkB5dCqVRsQbHQXHI3\nrbSyrNSaCmsqmfI3blnYNDkuqZUp5cIYKaaZYOCOkrKMKFruishyjs/vj3c8SYgHhLPB/bkurjic\n933PfbD33Dzb/TgopRRCCCFEFdSzdgBCCCHsjyQPIYQQVSbJQwghRJVJ8hBCCFFlkjyEEEJUmSQP\nIYQQVWbW5JGYmIiXlxcdOnQgLi6uwuN27tyJo6Mjq1atMv5szJgx3HnnnXTu3NmcIQohhLgFZkse\nBoOBSZMmkZiYSEZGBsuXL+fgwYM3PG7q1Kn07du3zM9Hjx5NYmKiucITQghRDWZLHqmpqXh4eODm\n5oZOp2Pw4MEkJCSUO27evHnExMTQunXrMj8PDw+nefPm5gpPCCFENTia68LHjx+nbdu2xseurq6k\npKSUOyYhIYFNmzaxc+dOHBwcKn39qhwrhBDiDzVRWMRsLY/KfLhPnjyZmTNn4uDggFKqym/o2jm2\n/PXWW29ZPQaJU+K05zjtIUZ7irOmmK3l4eLiQl5envFxXl4erq6uZY5JS0tj8ODBAJw+fZoNGzag\n0+no16+fucISQghRA8yWPEJCQjh8+DC5ubm0adOGlStXsnz58jLHZGdnG78fPXo0UVFRkjiEEMIO\nmK3bytHRkfnz5xMZGYmPjw9PPPEE3t7exMfHEx8fb/L8IUOG0L17d3799Vfatm3L559/bq5QzSoi\nIsLaIVSKxFmzJM6aYw8xgv3EWVMcVE12glnQtXESIYQQlVdTn52ywlwIIUSVSfIQQghRZZI8hBBC\nVJkkDyGEEFUmyUMIIUSVSfIQQghRZZI8hBBCVJkkDyGEEFUmyUMIIUSVSfIQQghRZZI8hBBCVJkk\nDyGEEFUmyUMIIUSVSfIQQghRZZI8hBB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4+PsrX11cNGTJEFRUV\nWS3Os2fPqujoaOXn56fCwsLU/v37K32uLcR59OhRFRERoXx8fFSnTp3UnDlzbDLOayxxH1UnRlu6\nh24Wp6XuodGjR6s77rhD+fr6VnjMc889pzw8PJSfn59KT083/vxW7h+bSx56vV65u7urnJwcVVJS\novz9/VVGRkaZY9566y01bdo0pZT2wdeiRQtVWlpqfH7WrFlq6NChKioqymbjHDFihPrss8+UUkqV\nlpaq8+fP21ycOTk5ql27dsb/2QcNGqQWLVpktThffvll9fbbbyullDp06JB68MEHK32uLcR54sQJ\ntWvXLqWUUpcuXVIdO3a0yTivMfd9VN0YbekeqihOS95DP/74o0pPT68weaxbt0499NBDSimlduzY\nobp06VLp93cjNleepDLrQ+6++24uXrwIwMWLF2nZsiWOjloP3LFjx1i/fj3jxo0z64ys6sR54cIF\ntm7dypgxYwCti8/Z2dnm4mzWrBk6nY7CwkL0ej2FhYW4uLhYLc6DBw9y//33A+Dp6Ulubi6///57\npc61dpynTp3irrvuIiAgAAAnJye8vb3Jz8+3uTjBMvdRdWK0tXuoojgteQ+Fh4fTvHnzCp//9ttv\nGTlyJABdunTh/PnznDx58pbvH5tLHsePH6dt27bGx66urhw/frzMMU899RQHDhygTZs2+Pv7M2fO\nHONzL774Ih988AH16pn3rVUnzpycHFq3bs3o0aMJCgriqaeeorCw0ObibNGiBVOmTOGee+6hTZs2\n3H777fTq1ctqcfr7+/PNN98A2g393//+l2PHjlXqXFuI83q5ubns2rWLLl262GSclriPqhOjrd1D\nFcVpyXvIlIreR35+/i3dPzaXPCqzPuS9994jICCA/Px8du/ezcSJE7l06RJr167ljjvuIDAw0Ozr\nQKoTp16vJz09nWeffZb09HSaNGnCzJkzbSrOgoICsrKymD17Nrm5ueTn51NQUMCyZcusFue0adM4\nf/48gYGBzJ8/n8DAQOrXr1/pNUU1oTpxXlNQUEBMTAxz5szBycnJpuKsV6+exe6j6vwube0eqihO\nS95DlVGT/542t59HZdaHbN++nddffx0Ad3d32rVrx6FDh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P1fe753794MHTqUbt264efnx6BBgygoKCh3zesfL1myhLlz5+Lv78+9997Lb7/9BsAd\nd9yBj48Po0ePLvd+hf2Tqbqi1rj//vuZNWsWQUFB1g5FAIWFhfj5+bFr165yLUBh/6TlIYSocUlJ\nSfj4+PD8889L4qilpOUhhBCiyqTlIYQQosokeQghhKgySR5CCCGqTJKHEEKIKpPkIYQQosokeQgh\nhKiy/wc4PkEsSmSTZgAAAABJRU5ErkJggg==\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.5 Page no-348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 480.0 # temperature of steam entering the turbine in degree celcius",
+ "p1 = 8.0 # pressure of steam entering the turbine in MPa",
+ "Pcond = 0.008 # condenser pressure in MPa",
+ "etat = 0.85 # turbine efficiency",
+ "Wcycledot = 100.0 # net power output of the cycle",
+ "",
+ "",
+ "# Analysis",
+ "# With the help of steam tables",
+ "h1 = 3348.4 # in kj/kg",
+ "h2 = 2832.8 # in kj/kg",
+ "s2 = 6.8606 # in kj/kg.k",
+ "h4 = 173.88 # in kj/kg",
+ "# With s3s =\u0003 s2, the quality at state 3s is x3s= \u0003 0.8208; using this, we get",
+ "h3s = 2146.3 # in kj/kg",
+ "",
+ "# Calculations",
+ "# The specific enthalpy at state 3 can be determined using the efficiency of the second-stage turbine",
+ "h3 = h2 - etat*(h2-h3s)",
+ "",
+ "# State 6 is saturated liquid at 0.7 MPa. Thus,",
+ "h6 = 697.22 # in kj/kg",
+ "# For determining specific enthalpies at states 5 and 7 ,we have",
+ "p5 = 0.7 # in MPa",
+ "p4 = 0.008 # in MPa",
+ "p7 = 8.0 # in MPa",
+ "p6 = 0.7 # in MPa",
+ "v4 = 1.0084e-3 # units in m^3/kg,obtained from steam tables",
+ "v6 = 1.1080e-3 # units in m^3/kg,obtained from steam tables",
+ "",
+ "# Calculations",
+ "h5 = h4 + v4*(p5-p4)*10**6*10**-3 # in kj/kg",
+ "h7 = h6 + v6*(p7-p6)*10**3 # in kj/kg",
+ "",
+ "# Applying mass and energy rate balances to a control volume enclosing the open heater, we find the fraction y of the flow extracted at state 2 from",
+ "y = (h6-h5)/(h2-h5)",
+ "",
+ "# Part(a)",
+ "wtdot = (h1-h2) + (1-y)*(h2-h3) # the total turbine work output, units in KJ/Kg",
+ "wpdot = (h7-h6) + (1-y)*(h5-h4) # The total pump work per unit of mass passing through the first-stage turbine,in KJ/kg",
+ "qindot = h1 - h7 # in kj/kg",
+ "eta = (wtdot-wpdot)/qindot",
+ "",
+ "# Results",
+ "print '-> The thermal efficiency is:',round(eta,2)",
+ "",
+ "# Part(b)",
+ "m1dot = (Wcycledot*3600*10**3)/(wtdot-wpdot)",
+ "",
+ "# Results",
+ "print '-> The mass flow rate of steam entering the first turbine stage, is:',round(m1dot,2),'kg/h.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: 0.37",
+ "-> The mass flow rate of steam entering the first turbine stage, is: 368948.05 kg/h."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.6 Page no-352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Analysis",
+ "# State 1 is the same as in Example 8.3, so",
+ "h1 = 3348.4 # in kj/kg",
+ "s1 = 6.6586 # in kj/kg.k",
+ "# State 2 is fixed by p2 \u0003 2.0 MPa and the specific entropy s2, which is the same as that of state 1. Interpolating in Table A-4, we get",
+ "h2 = 2963.5 # in kj/kg",
+ "# The state at the exit of the first turbine is the same as at the exit of the first turbine of Example 8.3, so",
+ "h3 = 2741.8 # in kj/kg",
+ "# State 4 is superheated vapor at 0.7 MPa, 440\u0004C. From Table A-4,",
+ "h4 = 3353.3 # in kj/kg",
+ "s4 = 7.7571 # in kj/kg.k",
+ "# Interpolating in table A-4 at p5 = .3MPa and s5 = s4, the enthalpy at state 5 is",
+ "h5 = 3101.5 # in kj/kg",
+ "# Using s6 \u0003= s4, the quality at state 6 is found to be",
+ "x6 = 0.9382",
+ "# Using steam tables, for state 6",
+ "hf = 173.88 # in kj/kg",
+ "hfg = 2403.1 # in kj/kg",
+ "",
+ "h6 = hf + x6*hfg",
+ "",
+ "# At the condenser exit, we have ",
+ "h7 = 173.88 # in kj/kg",
+ "v7 = 1.0084e-3 # in m^3/kg",
+ "p8 = 0.3 # in MPa",
+ "p7 = 0.008 # in MPa",
+ "",
+ "h8 = h7 + v7*(p8-p7)*10**6*10**-3 # The specific enthalpy at the exit of the first pump in kj/kg",
+ "# The liquid leaving the open feedwater heater at state 9 is saturated liquid at 0.3 MPa. The specific enthalpy is",
+ "h9 = 561.47 # in kj/kg",
+ "",
+ "# For the exit of the second pump,",
+ "v9 = 1.0732e-3 # in m^3/kg",
+ "p10 = 8.0 # in MPa",
+ "p9 = 0.3 # in MPa",
+ "h10 = h9 + v9*(p10-p9)*10**6*10**-3 # The specific enthalpy at the exit of the second pump in kj/kg",
+ "# The condensate leaving the closed heater is saturated at 2 MPa. From Table A-3,",
+ "h12 = 908.79 # in kj/kg",
+ "h13 = h12 # since The fluid passing through the trap undergoes a throttling process",
+ "# For the feedwater exiting the closed heater",
+ "hf = 875.1 # in kj/kg",
+ "vf = 1.1646e-3 # in m^3/kg",
+ "p11 = 8.0 # in MPa",
+ "psat = 1.73 # in MPa",
+ "h11 = hf + vf*(p11-psat)*10**6*10**-3 # in kj/kg",
+ "",
+ "ydash = (h11-h10)/(h2-h12) # the fraction of the total flow diverted to the closed heater",
+ "ydashdash = ((1-ydash)*h8+ydash*h13-h9)/(h8-h5) # the fraction of the total flow diverted to the open heater",
+ "",
+ "# Part(a)",
+ "wt1dot = (h1-h2) + (1-ydash)*(h2-h3) # The work developed by the first turbine per unit of mass entering in kj/kg",
+ "wt2dot = (1-ydash)*(h4-h5) + (1-ydash-ydashdash)*(h5-h6) # The work developed by the second turbine per unit of mass in kj/kg",
+ "wp1dot = (1-ydash-ydashdash)*(h8-h7) # The work for the first pump per unit of mass in kj/kg",
+ "wp2dot = h10-h9 # The work for the second pump per unit of mass in kj/kg",
+ "qindot = (h1-h11) + (1-ydash)*(h4-h3) # The total heat added expressed on the basis of a unit of mass entering the first",
+ " # turbine",
+ "eta = (wt1dot+wt2dot-wp1dot-wp2dot)/qindot # thermal efficiency",
+ "",
+ "# Result",
+ "print '-> The thermal efficiency is: ',round(eta,2)",
+ "",
+ "# Part(b)",
+ "Wcycledot = 100.0 # the net power output of the cycle in MW",
+ "m1dot = (Wcycledot*3600*10**3)/(wt1dot+wt2dot-wp1dot-wp2dot)",
+ "",
+ "# Result",
+ "print '-> The mass flow rate of the steam entering the first turbine, in kg/h is: ',round(m1dot,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: 0.43",
+ "-> The mass flow rate of the steam entering the first turbine, in kg/h is: 280126.53"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.7 Page no-360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Analysis",
+ "# The solution to Example 8.2 gives",
+ "h1 = 2758 # in kj/kg",
+ "h4 = 183.36 # in kj/kg",
+ "# From table A-22",
+ "hi = 1491.44 # in kj/kg",
+ "he = 843.98 # in kj/kg",
+ "# Using the conservation of mass principle and energy rate balance, the ratio of mass flow rates of air and water is",
+ "madotbymdot = (h1-h4)/(hi-he)",
+ "# From example 8.2",
+ "mdot = 4.449e5 # in kg/h",
+ "madot = madotbymdot*mdot # in kg/h",
+ "",
+ "# Part(a)",
+ "T0 = 295 # in kelvin",
+ "# From table A-22",
+ "si = 3.34474 # in kj/kg.k",
+ "se = 2.74504 # in MW",
+ "# Calculation",
+ "Rin = madot*(hi-he-T0*(si-se))/(3600*10**3) # The net rate at which exergy is carried into the heat exchanger ",
+ " # unit by the gaseous stream ",
+ "# Result",
+ "print '-> The net rate at which exergy is carried into the heat exchanger unit by the gas stream, is:',round(Rin,2),'MW '",
+ "",
+ "# Part(b)",
+ "# From table A-3",
+ "s1 = 5.7432 # in kj/kg.k",
+ "# From interpolation in table A-5 gives",
+ "s4 = 0.5957 # in kj/kg.k",
+ "# Calculation",
+ "Rout = mdot*(h1-h4-T0*(s1-s4))/(3600*10**3) # in MW",
+ "# Result",
+ "print '-> The net rate at which exergy is carried from the heat exchanger by the water stream, is:',round(Rout,2),'MW .'",
+ "",
+ "# Part(c)",
+ "Eddot = Rin-Rout # in MW",
+ "# Result",
+ "print '-> The rate of exergy destruction, in MW is:',round(Eddot,2)",
+ "",
+ "# Part(d)",
+ "epsilon = Rout/Rin",
+ "# Result",
+ "print '-> The exergetic efficiency is: ',round(epsilon,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The net rate at which exergy is carried into the heat exchanger unit by the gas stream, is: 231.24 MW ",
+ "-> The net rate at which exergy is carried from the heat exchanger by the water stream, is: 130.52 MW .",
+ "-> The rate of exergy destruction, in MW is: 100.72",
+ "-> The exergetic efficiency is: 0.56"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.8 Page no-362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T0 = 295.00 # in kelvin",
+ "P0 = 1.00 # in atm",
+ "",
+ "# Analysis",
+ "# From table A-3",
+ "s1 = 5.7432 # in kj/kg.k",
+ "s3 =0.5926 # in kj/kg.k",
+ "",
+ "# Using h2 =\u0003 1939.3 kJ/kg from the solution to Example 8.2, the value of s2 can be determined from Table A-3 as",
+ "s2 = 6.2021 # in kj/kg.k",
+ "s4 = 0.5957 # in kj/kg.k",
+ "mdot = 4.449e5 # in kg/h",
+ "",
+ "# Calculations",
+ "Eddot = mdot*T0*(s2-s1)/(3600*10**3) # the rate of exergy destruction for the turbine in MW",
+ "EddotP = mdot*T0*(s4-s3)/(3600*10**3) # the exergy destruction rate for the pump",
+ "",
+ "# Results",
+ "print '-> The rate of exergy destruction for the turbine is: ',round(Eddot,2),'MW.'",
+ "# From the solution to Example 8.7, the net rate at which exergy is supplied by the cooling combustion gases is 231.28 MW",
+ "print '-> The turbine rate of exergy destruction expressed as a percentage is: ',round((Eddot/231.28)*100)",
+ "# However, since only 69% of the entering fuel exergy remains after the stack loss and combustion exergy destruction are accounted for, ",
+ "# it can be concluded that",
+ "print '-> Percentage of the exergy entering the plant with the fuel destroyed within the turbine is:',round(0.69*(Eddot/231.28)*100,2)",
+ "print '-> The exergy destruction rate for the pump in MW is:',round(EddotP,2)",
+ "print 'and expressing this as a percentage of the exergy entering the plant as calculated above, we have',round((EddotP/231.28)*69,2) ",
+ "print '-> The net power output of the vapor power plant of Example 8.2 is 100 MW. Expressing this as a percentage of the rate at which exergy is '",
+ "print 'carried into the plant with the fuel, ',round((100/231.28)*69,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The rate of exergy destruction for the turbine is: 16.73 MW.",
+ "-> The turbine rate of exergy destruction expressed as a percentage is: 7.0",
+ "-> Percentage of the exergy entering the plant with the fuel destroyed within the turbine is: 4.99",
+ "-> The exergy destruction rate for the pump in MW is: 0.11",
+ "and expressing this as a percentage of the exergy entering the plant as calculated above, we have 0.03",
+ "-> The net power output of the vapor power plant of Example 8.2 is 100 MW. Expressing this as a percentage of the rate at which exergy is ",
+ "carried into the plant with the fuel, 29.83"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 8.9 Page no-364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T0 = 295 # in kelvin",
+ "# Analysis",
+ "# From solution to Example 8.2.",
+ "mcwdot = 9.39e6 # mass flow rate of the cooling water in kg/h",
+ "",
+ "# Part(a)",
+ "# With saturated liquid values for specific enthalpy and entropy from Table A-2",
+ "he = 146.68 # in kj/kg",
+ "hi = 62.99 # in kj/kg",
+ "se = 0.5053 # in kj/kg.k",
+ "si = 0.2245 # in kj/kg.k",
+ "# Calculations",
+ "Rout = mcwdot*(he-hi-T0*(se-si))/(3600*10**3) # The net rate at which exergy is carried out of the condenser in MW",
+ "# Results",
+ "print '-> The net rate at which exergy is carried from the condenser by the cooling water, is:',round(Rout,2),'MW.'",
+ "print '-> Expressing this as a percentage of the exergy entering the plant with the fuel, we get ',round((Rout/231.28)*69,2),'percent'",
+ "",
+ "# Part(b)",
+ "# From table ",
+ "s3 = 0.5926 # in kj/kg.k",
+ "s2 = 6.2021 # in kg/kg.k",
+ "mdot = 4.449e5 # in kg/h",
+ "# Calculations",
+ "Eddot = T0*(mdot*(s3-s2)+mcwdot*(se-si))/(3600*10**3) # the rate of exergy destruction for the condenser in MW",
+ "# Results",
+ "print '-> The rate of exergy destruction for the condenser is: ',round(Eddot,2),'MW.'",
+ "print '-> Expressing this as a percentage of the exergy entering the plant with the fuel, we get,',round((Eddot/231.28)*69,2),'percent'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The net rate at which exergy is carried from the condenser by the cooling water, is: 2.23 MW.",
+ "-> Expressing this as a percentage of the exergy entering the plant with the fuel, we get 0.66 percent",
+ "-> The rate of exergy destruction for the condenser is: 11.56 MW.",
+ "-> Expressing this as a percentage of the exergy entering the plant with the fuel, we get, 3.45 percent"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_9.ipynb b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_9.ipynb
new file mode 100755
index 00000000..25599eb2
--- /dev/null
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/Chapter_9.ipynb
@@ -0,0 +1,1144 @@
+{
+ "metadata": {
+ "name": "Chapter 9"
+ },
+ "nbformat": 2,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Chapter 9 :- Gas Power Systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.1 Page no-378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 300.00 # The temperature at the beginning of the compression process in kelvin",
+ "p1 = 1.00 # the pressure at the beginning of the compression process in bar",
+ "r = 8.00 # compression ratio",
+ "V1 = 560.00 # the volume at the beginning of the compression process in cm^3",
+ "T3 = 2000.00 # maximum temperature during the cycle in kelvin",
+ "",
+ "# Part(a)",
+ "# At T1 = 300k,table A-22 gives",
+ "u1 = 214.07 # in kj/kg",
+ "vr1 = 621.2 ",
+ "# Interpolating with vr2 in Table A-22, we get",
+ "T2 = 673.00 # in kelvin",
+ "u2 = 491.2 # in kj/kg",
+ "# At T3 \u0003= 2000 K, Table A-22 gives",
+ "u3 = 1678.7 # in kj/kg",
+ "vr3 = 2.776",
+ "# Interpolating in Table A-22 with vr4 gives",
+ "T4 = 1043 # in kelvin",
+ "u4 = 795.8 # in kj/kg",
+ "",
+ "# Calculations",
+ "# For the isentropic compression Process 1\u20132",
+ "vr2 = vr1/r",
+ "# With the ideal gas equation of state",
+ "p2 = p1*(T2/T1)*(r) # in bars",
+ "# Since Process 2\u20133 occurs at constant volume, the ideal gas equation of state gives",
+ "p3 = p2*(T3/T2) # in bars",
+ "# For the isentropic expansion process 3\u20134",
+ "vr4 = vr3*(r)",
+ "# The ideal gas equation of state applied at states 1 and 4 gives",
+ "p4 = p1*(T4/T1) # in bars",
+ "",
+ "# Results",
+ "print '-> At state1, the pressure is:',p1,'bar.'",
+ "print '-> At state1, the temperature is ',T1,'kelvin.'",
+ "print '-> At state2, the pressure is:',round(p2,3),'bar.'",
+ "print '-> At state2, the temperature is',T2,'kelvin.'",
+ "print '-> At state3, the pressure is:',round(p3,3),'bar.'",
+ "print '-> At state3, the temperature is',T3,'kelvin.'",
+ "print '-> At state4, the pressure is:',round(p4,4),'bar.'",
+ "print '-> At state4, the temperature is',T4,'kelvin.'",
+ "",
+ "# Part(b)",
+ "eta = 1-(u4-u1)/(u3-u2) # thermal efficiency",
+ "# Result",
+ "print '-> The thermal efficiency is:',round(eta,2)",
+ "",
+ "# Part(c)",
+ "R = 8.314 # universal gas constant, in SI units",
+ "M = 28.97 # molar mass of air in grams",
+ "# Calculations",
+ "m = ((p1*V1)/((R/M)*T1))*10**-6*10**5*10**-3 # mass of the air in kg",
+ "Wcycle = m*((u3-u4)-(u2-u1)) # the net work per cycle in KJ",
+ "mep = (Wcycle/(V1*(1-1/r)))*10**6*10**3*10**-5 # in bars",
+ "",
+ "# Result",
+ "print '-> The mean effective pressure, is:',round(mep,4),'atm..'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> At state1, the pressure is: 1.0 bar.",
+ "-> At state1, the temperature is 300.0 kelvin.",
+ "-> At state2, the pressure is: 17.947 bar.",
+ "-> At state2, the temperature is 673.0 kelvin.",
+ "-> At state3, the pressure is: 53.333 bar.",
+ "-> At state3, the temperature is 2000.0 kelvin.",
+ "-> At state4, the pressure is: 3.4767 bar.",
+ "-> At state4, the temperature is 1043 kelvin.",
+ "-> The thermal efficiency is: 0.51",
+ "-> The mean effective pressure, is: 8.0411 atm.."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.2 Page no-383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "r = 18.00 # compression ratio",
+ "T1 = 300.00 # temperature at the beginning of the compression process in kelvin",
+ "p1 = 0.1 # pressure at the beginning of the compression process in MPa",
+ "rc = 2.00 # cutoff ratio",
+ "",
+ "# Part(a)",
+ "# With T1 =\u0003 300 K, Table A-22 gives",
+ "u1 = 214.07 # in kj/kg",
+ "vr1 = 621.2 ",
+ "# Interpolating in Table A-22, we get",
+ "T2 = 898.3 # in kelvin ",
+ "h2 = 930.98 # in kj/kg",
+ "# From Table A-22,",
+ "h3 = 1999.1 # in kj/kg",
+ "vr3 = 3.97",
+ "",
+ "# Interpolating in Table A-22 with vr4, we get",
+ "u4 = 664.3 # in kj/kg",
+ "T4 = 887.7 # in kelvin",
+ "",
+ "# Calculations",
+ "# Since Process 2\u20133 occurs at constant pressure, the ideal gas equation of state gives",
+ "T3 = rc*T2 # in kelvin",
+ "# With the ideal gas equation of state",
+ "p2 = p1*(T2/T1)*(r) # in MPa",
+ "p3 = p2",
+ "# For the isentropic compression process 1\u20132",
+ "vr2 = vr1/r",
+ "# For the isentropic expansion process 3\u20134",
+ "vr4 = (r/rc)*vr3",
+ "# The ideal gas equation of state applied at states 1 and 4 gives",
+ "p4 = p1*(T4/T1) # in MPa",
+ "",
+ "# Results",
+ "print '-> At state1, the pressure is:',round(p1,2),'bar.'",
+ "print '-> At state1, the temperature is',round(T1,2),'kelvin.'",
+ "print '-> At state2, the pressure in bar is:',round(p2,2),'bar.'",
+ "print '-> At state2, the temperature is ',round(T2,2),'kelvin.'",
+ "print '-> At state3, the pressure in bar is:',round(p3,2),'bar.'",
+ "print '-> At state3, the temperature is',round(T3,2),'kelvin.'",
+ "print '-> At state4, the pressure is:',round(p4,2),'bar.'",
+ "print '-> At state4, the temperature is',round(T4,2),'kelvin.'",
+ "",
+ "# Part(b)",
+ "eta = 1- (u4-u1)/(h3-h2)",
+ "print '-> The thermal efficiency is:',round(eta,2)",
+ "",
+ "# Part(c)",
+ "R = 8.314 # universal gas constant, in SI units",
+ "M = 28.97 # molar mass of air in grams",
+ "",
+ "# Calculations",
+ "wcycle = (h3-h2)-(u4-u1) # The net work of the cycle in kj/kg",
+ "v1 = ((R/M)*T1/p1)/10**3 # The specific volume at state 1 in m^3/kg",
+ "mep = (wcycle/(v1*(1-1/r)))*10**3*10**-6 # in MPa",
+ "",
+ "# Results",
+ "print '-> The mean effective pressure, is:',round(mep,2),'MPa.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> At state1, the pressure is: 0.1 bar.",
+ "-> At state1, the temperature is 300.0 kelvin.",
+ "-> At state2, the pressure in bar is: 5.39 bar.",
+ "-> At state2, the temperature is 898.3 kelvin.",
+ "-> At state3, the pressure in bar is: 5.39 bar.",
+ "-> At state3, the temperature is 1796.6 kelvin.",
+ "-> At state4, the pressure is: 0.3 bar.",
+ "-> At state4, the temperature is 887.7 kelvin.",
+ "-> The thermal efficiency is: 0.58",
+ "-> The mean effective pressure, is: 0.76 MPa."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.3 Page no-386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given :-",
+ "T1 = 300.00 # beginning temperature in kelvin",
+ "p1 = 0.1 # beginning pressure in MPa",
+ "r = 18.00 # compression ratio",
+ "pr = 1.5 # The pressure ratio for the constant volume part of the heating process",
+ "vr = 1.2 # The volume ratio for the constant pressure part of the heating process",
+ "",
+ "# Analysis",
+ "# States 1 and 2 are the same as in Example 9.2, so ",
+ "u1 = 214.07 # in kj/kg",
+ "T2 = 898.3 # in kelvin",
+ "u2 = 673.2 # in kj/kg",
+ "",
+ "# Interpolating in Table A-22, we get",
+ "h3 = 1452.6 # in kj/kg",
+ "u3 = 1065.8 # in kj/kg",
+ "",
+ "# From Table A-22,",
+ "h4 = 1778.3 # in kj/kg",
+ "vr4 = 5.609",
+ "",
+ "# Interpolating in Table A-22, we get",
+ "u5 = 475.96 # in kj/kg",
+ "",
+ "# Calculations",
+ "# Since Process 2\u20133 occurs at constant volume, the ideal gas equation of state reduces to give",
+ "T3 = pr*T2 # in kelvin",
+ "# Since Process 3\u20134 occurs at constant pressure, the ideal gas equation of state reduces to give",
+ "T4 = vr*T3 # in kelvin",
+ "# Process 4\u20135 is an isentropic expansion, so",
+ "vr5 = vr4*r/vr",
+ "",
+ "# Part(a)",
+ "eta = 1-(u5-u1)/((u3-u2)+(h4-h3))",
+ "# Result",
+ "print '-> The thermal efficiency is:',round(eta,2)",
+ "",
+ "# Part(b)",
+ "# The specific volume at state 1 is evaluated in Example 9.2 as",
+ "v1 = 0.861 # in m^3/kg",
+ "mep = (((u3-u2)+(h4-h3)-(u5-u1))/(v1*(1-1/r)))*10**3*10**-6 # in MPa",
+ "",
+ "# Result",
+ "print '-> The mean effective pressure, is:',round(mep,2),'MPa.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: 0.64",
+ "-> The mean effective pressure, is: 0.56 MPa."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2>Example 9.4 Page no-392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 300.00 # in kelvin",
+ "AV = 5.00 # volumetric flow rate in m^3/s",
+ "p1 = 100.00 # in kpa",
+ "pr = 10.00 # compressor pressure ratio",
+ "T3 = 1400.00 # turbine inlet temperature in kelvin",
+ "",
+ "# Analysis",
+ "# At state 1, the temperature is 300 K. From Table A-22,",
+ "h1 = 300.19 # in kj/kg",
+ "pr1 = 1.386",
+ "",
+ "",
+ "# Interpolating in Table A-22,",
+ "h2 = 579.9 # in kj/kg",
+ "# From Table A-22",
+ "h3 = 1515.4 # in kj/kg",
+ "pr3 = 450.5",
+ "",
+ "# Interpolating in Table A-22, we get",
+ "h4 = 808.5 # in kj/kg",
+ "",
+ "# calculations",
+ "pr2 = pr*pr1",
+ "pr4 = pr3*1/pr",
+ "",
+ "",
+ "# Part(a)",
+ "eta = ((h3-h4)-(h2-h1))/(h3-h2) # thermal efficiency",
+ "# Result",
+ "print '-> The thermal efficiency is:',round(eta,4)",
+ "",
+ "# Part(b)",
+ "bwr = (h2-h1)/(h3-h4) # back work ratio",
+ "# Result",
+ "print '-> The back work ratio is:',round(bwr,4)",
+ "",
+ "# Part(c)",
+ "R = 8.314 # universal gas constant, in SI units",
+ "M = 28.97 # molar mass of air in grams",
+ "# Calculations",
+ "mdot = AV*p1/((R/M)*T1) # mass flow rate in kg/s",
+ "Wcycledot = mdot*((h3-h4)-(h2-h1)) # The net power developed",
+ "# Result",
+ "print '-> The net power developed, is:',round(Wcycledot,2),'kW .'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: 0.4566",
+ "-> The back work ratio is: 0.3957",
+ "-> The net power developed, is: 2480.89 kW ."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.6 Page no-398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "etat = 0.8 # turbine efficiency",
+ "etac = 0.8 # compressor efficiency",
+ "# Part(a)",
+ "wtdots = 706.9 # The value of wtdots is determined in the solution to Example 9.4 as 706.9 kJ/kg",
+ "wcdots = 279.7 # The value of wcdots is determined in the solution to Example 9.4 as 279.7 kJ/kg",
+ "h1 = 300.19 # h1 is from the solution to Example 9.4, in kj/kg",
+ "h3 = 1515.4 # h3 is from the solution to Example 9.4, in kj/kg",
+ "",
+ "# Calculations",
+ "# The turbine work per unit of mass is",
+ "wtdot = etat*wtdots # in kj/kg",
+ "# For the compressor, the work per unit of mass is",
+ "wcdot = wcdots/etac # in kj/kg",
+ "h2 = h1 + wcdot # in kj/kg",
+ "qindot = h3-h2 # The heat transfer to the working fluid per unit of mass flow in kj/kg",
+ "eta = (wtdot-wcdot)/qindot # thermal efficiency",
+ "",
+ "# Results",
+ "print '-> The thermal efficiency is:',round(eta,2)",
+ "",
+ "# Part(b)",
+ "bwr = wcdot/wtdot # back work ratio",
+ "# Result",
+ "print '-> The back work ratio is:',round(bwr,2)",
+ "",
+ "# Part(c)",
+ "mdot = 5.807 # in kg/s, from example 9.4",
+ "Wcycledot = mdot*(wtdot-wcdot) # The net power developed by the cycle in kw",
+ "# Result",
+ "print '-> The net power developed, is: ',round(Wcycledot,2),'kW.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: 0.25",
+ "-> The back work ratio is: 0.62",
+ "-> The net power developed, is: 1253.7 kW."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.7 Page no-401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "",
+ "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].",
+ "For more information, type 'help(pylab)'."
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "etareg = 0.8 # regenerator effectiveness of 80%.",
+ "# From example 9.4",
+ "h1 = 300.19 # in kj/kg",
+ "h2 = 579.9 # in kj/kg",
+ "h3 = 1515.4 # in kj/kg",
+ "h4 = 808.5 # in kj/kg",
+ "",
+ "# Calculations",
+ "hx = etareg*(h4-h2)+h2 # in kj/kg",
+ "eta = ((h3-h4)- (h2-h1))/(h3-hx) # thermal efficiency",
+ "# Result",
+ "print '-> The thermal efficiency is: '",
+ "print round(eta,2)",
+ "",
+ "# Part(b)",
+ "etareg = []",
+ "x = []",
+ "eta = []",
+ "from numpy import linspace ",
+ "from pylab import plot, show , xlabel, ylabel",
+ "etareg = linspace(0,0.8,50)",
+ "for i in range (0,50):",
+ " x.append(i)",
+ " eta.append(i)",
+ " x[i] = (etareg[i]*(h4-h2))+h2 ",
+ " eta[i] = ((h3-h4)- (h2-h1))/(h3-x[i])",
+ "",
+ "plot(etareg,eta)",
+ "xlabel('Regenerator effectiveness')",
+ "ylabel('Thermal efficiency')",
+ "show()"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: ",
+ "0.57"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEMCAYAAADXiYGSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVGX+B/DPxJArihamlTNsqCAOKDAI3rLCvJAXkFVM\nzLyFt0pTazftsoZmppuZF3bVSt1SF2jpApaSkU65ImBAYGKKIjZimpdQUBEYn98fJ+cHIs4ROZwB\nPu/Xi1fMcM6Zz1DNl+c8N40QQoCIiMiGu9QOQEREDQMLBhERycKCQUREsrBgEBGRLCwYREQkCwsG\nERHJomjBSEpKQpcuXeDh4YGlS5dW+7nJZELr1q1hNBphNBqxaNEi68/efvtteHt7o1u3bnjqqadw\n9epVJaMSEZENihUMi8WCGTNmICkpCbm5uYiJicHBgwerHffYY48hKysLWVlZeP311wEABQUF+OCD\nD5CZmYn9+/fDYrEgNjZWqahERCSDYgUjPT0d7u7ucHNzg6OjIyIiIpCQkFDtuJvNG2zVqhUcHR1x\n+fJlVFRU4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gkGKqLwev5+fH9zd3fHJJ59gy5YtWL9+\nPfz8/NC1a1frbagVK1Zg+fLl8PPzw9GjR607Aw4cOBBPPfUUevfuDR8fHzz55JPWIbo3rvl//XFN\nr3HjOS+//DJeeeUV+Pv7w2KxWH/Wr18/5ObmWju9o6KikJGRAV9fX7z66qv46KOPrNeqad+BG3OP\nGjXqpkOLK1/j7rvvRnx8PObOnQs/Pz8YjUbs3bsXALBp0yasWrUKvr6+ePjhh3H69Gn4+PjAwcEB\nfn5+WLFiRbU8o0ePxpYtW6y3owCpU/qHH36Ar68vvL29q4xeu9l7MRgMWLRoEQYNGgRfX18MGjQI\np06dQmFhIfr16wej0Yhx48ZhyZIlsFgsGDduHHx8fODv749Zs2ahVatWN/39UMPExQfJLly5cgXN\nmzcHILUw4uLi8Pnnn6uciogqYx8G2YWMjAzMmDEDQgjce++9VTZ2ISL7wBYGERHJwj4MIiKShQWD\niIhkYcEgIiJZWDCIiEgWFgwiIpKFBYOIiGT5P5ysxSkTyVnVAAAAAElFTkSuQmCC\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.8 Page no-406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Analysis",
+ "# States 1, 2, and 3 are the same as in Example 9.4:",
+ "h1 = 300.19 # in kj/kg",
+ "h2 = 579.9 # in kj/kg",
+ "h3 = 1515.4 # in kj/kg",
+ "# The temperature at state b is the same as at state 3, so ",
+ "hb = h3",
+ "",
+ "pa = 300.00 # in kpa",
+ "p3 = 1000.00 # in kpa",
+ "# From table A-22",
+ "pr3 = 450.5",
+ "",
+ "# Interpolating in Table A-22, we get",
+ "ha = 1095.9 # in kj/kg",
+ "p4 = 100.00 # in kpa",
+ "pb = 300.00 # in kpa",
+ "# Interpolating in Table A-22, we obtain",
+ "h4 = 1127.6 # in kj/kg",
+ "",
+ "# Calculions",
+ "pra = pr3*(pa/p3)",
+ "prb = pra",
+ "pr4 = prb*(p4/pb)",
+ "# Since the regenerator effectiveness is 100%,",
+ "hx = h4",
+ "eta = ((h3-ha)+(hb-h4)-(h2-h1))/((h3-hx)+(hb-ha)) # thermal efficiency",
+ "",
+ "# Result",
+ "print '-> The thermal efficiency is:'",
+ "print round(eta,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is:",
+ "0.65"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.9 Page no-408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 300.00 # in kelvin",
+ "p1 = 100.00 # in kpa",
+ "p2 = 1000.00 # in kpa",
+ "p3 = p2",
+ "pc = 300.00 # in kpa",
+ "pd = 300.00 # in kpa",
+ "Td = 300.00 # in kelvin",
+ "",
+ "",
+ "# Part(a)",
+ "# From table A-22",
+ "prd = 1.386",
+ "# Interpolating in Table A-22, we get",
+ "T2 = 422 # in kelvin",
+ "h2 = 423.8 # in kj/kg",
+ "# Calculations",
+ "pr2 = prd*(p2/pd)",
+ "# Result",
+ "print '-> The temperature at the exit of the second compressor stage is:',round(T2,2),'kelvin.'",
+ "",
+ "# Part(b)",
+ "# From Table A-22 at T1 \u0003= 300",
+ "h1 = 300.19 # in kj/kg",
+ "# Since Td \u0003= T1,",
+ "hd = 300.19 # in kj/kg",
+ "# with pr data from Table A-22 together",
+ "pr1 = 1.386",
+ "# Interpolating in Table A-22, we obtain",
+ "hc = 411.3 # in kj/kg",
+ "# Calculations",
+ "prc = pr1*(pc/p1)",
+ "wcdot = (hc-h1)+(h2-hd) # The total compressor work per unit of mass in kj/kg",
+ "# Result",
+ "print '-> The total compressor work input per unit of mass flow is: ',round(wcdot,2),'kJ/kg'",
+ "",
+ "# Part(c)",
+ "# Interpolating in Table A-22, we get",
+ "T3 = 574 # in kelvin",
+ "h3 = 579.9 # in kj/kg",
+ "# Calculations",
+ "pr3 = pr1*(p3/p1)",
+ "wcdot = h3-h1 # The work input for a single stage of compression in kj/kg",
+ "# Results",
+ "print '-> For a single stage of compression, the temperature at the exit state is: ',round(T3,2),'kelvin'",
+ "print '-> For a single stage of compression, the work input is: ',round(wcdot,2),'kJ.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The temperature at the exit of the second compressor stage is: 422.0 kelvin.",
+ "-> The total compressor work input per unit of mass flow is: 234.72 kJ/kg",
+ "-> For a single stage of compression, the temperature at the exit state is: 574.0 kelvin",
+ "-> For a single stage of compression, the work input is: 279.71 kJ."
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.11 Page no-412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "T1 = 300.00 # in kelvin",
+ "p1 = 100.00 # in kpa",
+ "mdot = 5.807 # in kg/s",
+ "p2 = 300.00 # in kpa",
+ "p3 = p2",
+ "p4 = 1000.00 # in kpa",
+ "p5 = p4",
+ "p6 = p4",
+ "T6 = 1400.00 # in kelvin",
+ "T8 = T6",
+ "p7 = 300.00 # in kpa",
+ "p8 = p7",
+ "etac = 0.8 # isentropic efficiency of compressor",
+ "etat = 0.8 # isentropic efficiency of turbine",
+ "etareg = 0.8 # regenerator effectiveness",
+ "# Analysis",
+ "# From example 9.9",
+ "h1 = 300.19 # in kj/kg",
+ "h3 = h1 # in kj/kg",
+ "h2s = 411.3 # in kj/kg",
+ "h4s = 423.8 # in kj/kg",
+ "# From example 9.8",
+ "h6 = 1515.4 # in kj/kg",
+ "h8 = h6",
+ "h7s = 1095.9 # in kj/kg",
+ "h9s = 1127.6 # in kj/kg",
+ "",
+ "# Calculations",
+ "h4 = h3 + (h4s-h3)/etac # in kj/kg",
+ "h2 = h1 + (h2s-h1)/etac # in kj/kg",
+ "h9 = h8-etat*(h8-h9s) # in kj/kg",
+ "h7 = h6-etat*(h6-h7s) # in kj/kg",
+ "h5 = h4+etareg*(h9-h4) # in kj/kg",
+ "",
+ "# Part(a)",
+ "# Calculations",
+ "wtdot = (h6-h7)+(h8-h9) # The total turbine work per unit of mass flow in kj/kg",
+ "wcdot = (h2-h1)+(h4-h3) # The total compressor work input per unit of mass flow in kj/kg",
+ "qindot = (h6-h5)+(h8-h7) # The total heat added per unit of mass flow in kj/kg",
+ "eta = (wtdot-wcdot)/qindot # thermal efficiency",
+ "# Result",
+ "print '-> The thermal efficiency is: '",
+ "print round(eta,2)",
+ "",
+ "# Part(b)",
+ "bwr = wcdot/wtdot # back work ratio",
+ "# Result",
+ "print '-> The back work ratio is:'",
+ "print round(bwr,2)",
+ "",
+ "# Part(c)",
+ "Wcycledot = mdot*(wtdot-wcdot) # net power developed in kw",
+ "# Result",
+ "print '-> The net power developed, is: ',round(Wcycledot,2),'kW.'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The thermal efficiency is: ",
+ "0.44",
+ "-> The back work ratio is:",
+ "0.45",
+ "-> The net power developed, is: 2046.62 kW."
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.12 Page no-416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "Ta = 240.00 # in kelvin",
+ "pa = 0.8 # in bar",
+ "Va = 278.00 # in m/s",
+ "PR = 8.00 # pressure ratio across the compressor",
+ "T3 = 1200.00 # in kelvin",
+ "p5 = 0.8 # in bar",
+ "",
+ "# From table A-22",
+ "ha = 240.02 # in kj/kg",
+ "h1 = ha + ((Va**2)/2)*10**-3 # in kj/kg",
+ "# Interpolating in Table A-22 gives",
+ "pr1 = 1.070",
+ "pra = .6355",
+ "",
+ "# Interpolating in Table A-22, we get",
+ "h2 = 505.5 # in kj/kg",
+ "# At state 3 the temperature is given as T3 \u0003= 1200 K. From Table A-22",
+ "h3 = 1277.79 # in kj/kg",
+ "",
+ "",
+ "# Interpolating in Table A-22 with h4, gives",
+ "pr4 = 116.8",
+ "# pr data from table A-22 gives",
+ "pr4 = 116.00",
+ "pr3 = 238.00",
+ "# From table A-22",
+ "h5 = 621.3 # in kj/kg",
+ "",
+ "# The expansion through the nozzle is isentropic to",
+ "p5 = .8 # in bars",
+ "",
+ "# Calculations",
+ "p1 = (pr1/pra)*pa # in bars",
+ "# With the help of assumption, 'The turbine work output equals the work required to drive the compressor.',",
+ "h4 = h3+h1-h2 # in kj/kg",
+ "p2 = PR*p1 # in bars",
+ "# Using assumption 'There is no pressure drop for flow through the combustor', ",
+ "p3 = p2",
+ "p4 = p3*(pr4/pr3) # in bars",
+ "pr5 = pr4*(p5/p4)",
+ "V5 = ((2*(h4-h5)*10**3))**(0.5) # the velocity at the nozzle exit in m/s",
+ "",
+ "# Results",
+ "print '-> The velocity at the nozzle exit in m/s is:'",
+ "print round(V5,2)",
+ "print '-> pa in bars = '",
+ "print round(pa,2)",
+ "print '-> p1 in bars = '",
+ "print round(p1,2)",
+ "print '-> p2 in bars = '",
+ "print round(p2,2)",
+ "print '-> p3 in bars = '",
+ "print round(p3,2)",
+ "print '-> p4 in bars = '",
+ "print round(p4,2)",
+ "print '-> p5 in bars = '",
+ "print round(p5,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The velocity at the nozzle exit in m/s is:",
+ "926.99",
+ "-> pa in bars = ",
+ "0.8",
+ "-> p1 in bars = ",
+ "1.35",
+ "-> p2 in bars = ",
+ "10.78",
+ "-> p3 in bars = ",
+ "10.78",
+ "-> p4 in bars = ",
+ "5.25",
+ "-> p5 in bars = ",
+ "0.8"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.13 Page no-421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "Wnetdot = 45.00 # in MW",
+ "T1 = 300.00 # in kelvin",
+ "p1 = 100.00 # in kpa",
+ "etac = 0.84 # The isentropic efficiency of the compressor",
+ "T3 = 1400.00 # in kelvin",
+ "p2 = 1200.00 # in kpa",
+ "p3 = p2",
+ "etat = 0.88 # isentropic efficiency of the turbine",
+ "T5 = 400.00 # in kelvin",
+ "p4 = 100.00 # in kpa",
+ "p5 = p4",
+ "T7 = 400.00 # in degree celcius",
+ "p7 = 8.00 # in MPa",
+ "etatw =0.9 # isentropic efficiency of turbine of the vapor cycle",
+ "p8 = 8.00 # in kpa",
+ "p9 = p8",
+ "etap = 0.8 # isentropic efficiency of pump of the vapor cycle",
+ "T0 = 300.00 # in kelvin",
+ "p0 = 100.00 # -in kpa",
+ "",
+ "# Analysis",
+ "# With procedure similar to that used in the examples of chapters 8 and 9,we can determine following property data",
+ "h1 = 300.19 # in kj/kg",
+ "h2 = 669.79 # in kj/kg",
+ "h3 = 1515.42 # in kj/kg",
+ "h4 = 858.02 # in kj/kg",
+ "h5 = 400.98 # in kj/kg",
+ "h6 = 183.96 # in kj/kg",
+ "h7 = 3138.30 # in kj/kg",
+ "h8 = 2104.74 # in kj/kg",
+ "h9 = 173.88 # in kj/kg",
+ "s1 = 1.7020 # in kj/kg.k",
+ "s2 = 2.5088 # in kj/kg.k",
+ "s3 = 3.3620 # in kj/kg.k ",
+ "s4 = 2.7620 # in kj/kg.k",
+ "s5 = 1.9919 # in kj/kg.k",
+ "s6 = 0.5975 # in kj/kg.k",
+ "s7 = 6.3634 # in kj/kg.k",
+ "s8 = 6.7282 # in kj/kg.k",
+ "s9 = 0.5926 # in kj/kg.k",
+ "",
+ "# Part(a)",
+ "# By applying mass and energy rate balances",
+ "# Calculations",
+ "mvdotbymgdot = (h4-h5)/(h7-h6) # ratio of mass flow rates of vapor and air",
+ "mgdot = (Wnetdot*10**3)/(((h3-h4)-(h2-h1)) + mvdotbymgdot*((h7-h8)-(h6-h9))) # mass flow rate of air in kg/s",
+ "mvdot = mvdotbymgdot*mgdot # mass flow rate of vapor in kg/s",
+ "Wgasdot = mgdot*((h3-h4)-(h2-h1))*10**-3 # net power developed by gas turbine in MW",
+ "Wvapdot = mvdot*((h7-h8)-(h6-h9))*10**-3 # net power developed by vapor cycle in MW",
+ "",
+ "# Results",
+ "print '-> Mass flow rate of air is: ',round(mgdot,2),'kg/s.'",
+ "print '-> Mass flow rate of vapor is: ',round(mvdot,2),'kg/s.'",
+ "print '-> Net power developed by gas turbine is: ',round(Wgasdot,2),'MW.'",
+ "print '-> Net power developed by vapor cycle is: ',round(Wvapdot,2),'MW.'",
+ "",
+ "",
+ "# Part(b)",
+ "import math",
+ "# The net rate of exergy increase of the air passing through the combustor is",
+ "Edotf32 = mgdot*(h3-h2-T0*(s3-s2))*10**-3 # in MW",
+ "# The net rate exergy is carried out by the exhaust air stream at 5 is",
+ "Edotf51 = mgdot*(h5-h1-T0*(s5-s1))/10**3 # in MW",
+ "# The net rate exergy is carried out as the water passes through the condenser is",
+ "Edotf89 = mvdot*(h8-h9-T0*(s8-s9))*10**-3 # in MW",
+ "R = 8.314 # universal gas constant, in SI units",
+ "M = 28.97 # molar mass of air in grams",
+ "# The rate of exergy destruction for air turbine is",
+ "Eddott = mgdot*T0*(s4-s3-(R/M)*math.log(p4/p3))/10**3 # in MW",
+ "# The rate of exergy destruction for compressor is",
+ "Eddotc = mgdot*T0*(s2-s1-(R/M)*math.log(p2/p1))/10**3 # in MW",
+ "# The rate of exergy destruction for steam turbine is",
+ "Eddotst = mvdot*T0*(s8-s7)/10**3 # in MW",
+ "# The rate of exergy destruction for pump is",
+ "Eddotp = mvdot*T0*(s6-s9)/10**3 # in MW",
+ "# For heat exchanger",
+ "EddotHE = T0*(mgdot*(s5-s4)+mvdot*(s7-s6))/10**3 # in MW",
+ "",
+ "# Results",
+ "print '-> Balance sheet'",
+ "print 'Net exergy increase of the gas passing'",
+ "print '-> Through the combustor: ',round(Edotf32,2),'MW'",
+ "print 'Disposition of the exergy:'",
+ "print '\u2022 Net power developed'",
+ "print 'gas turbine cycle ',round(Wgasdot,2),'MW'",
+ "print 'vapor cycle ',round(Wvapdot,2),'MW'",
+ "print '\u2022 Net exergy lost'",
+ "print 'with exhaust gas at state 5 ',round(Edotf51,2),'MW'",
+ "print 'from water passing through condenser ',round(Edotf89,2),'MW'",
+ "print '\u2022 Exergy destruction'",
+ "print 'air turbine ',round(Eddott,2),'MW'",
+ "print 'compressor ',round(Eddotc,2),'MW'",
+ "print 'steam turbine ',round(Eddotst,2),'MW'",
+ "print 'pump ',round(Eddotp,2),'MW'",
+ "print 'heat exchanger ',round(EddotHE,2),'MW'"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Mass flow rate of air is: 100.87 kg/s.",
+ "-> Mass flow rate of vapor is: 15.6 kg/s.",
+ "-> Net power developed by gas turbine is: 29.03 MW.",
+ "-> Net power developed by vapor cycle is: 15.97 MW.",
+ "-> Balance sheet",
+ "Net exergy increase of the gas passing",
+ "-> Through the combustor: 59.48 MW",
+ "Disposition of the exergy:",
+ "\u2022 Net power developed",
+ "gas turbine cycle 29.03 MW",
+ "vapor cycle 15.97 MW",
+ "\u2022 Net exergy lost",
+ "with exhaust gas at state 5 1.39 MW",
+ "from water passing through condenser 1.41 MW",
+ "\u2022 Exergy destruction",
+ "air turbine 3.42 MW",
+ "compressor 2.83 MW",
+ "steam turbine 1.71 MW",
+ "pump 0.02 MW",
+ "heat exchanger 3.69 MW"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.14 Page no-438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "Tnot = 360.00 # in kelvin",
+ "pnot = 1.00 # in MPa",
+ "A2 = 0.001 # in m^2",
+ "k = 1.4",
+ "",
+ "# Calculations",
+ "pstarbypnot = (1+(k-1)/2)**(k/(1-k))",
+ "pstar = pstarbypnot*pnot",
+ "",
+ "# Part(a)",
+ "# Since back pressure of 500 kpa is less than critical pressure pstar(528kpa in this case) found above, the nozzle is choked",
+ "# At the exit",
+ "M = 1.00",
+ "p2 = pstar # in MPa",
+ "T2 = Tnot/(1+((k-1)/2)*(M**2)) # exit temperature in kelvin",
+ "R = 8.314 # universal gas constant, in SI units",
+ "Mwt = 28.97 # molar mass of air in grams",
+ "V2 = ((k*(R/Mwt)*T2*10**3)**0.5) # exit velocity in m/s",
+ "mdot = (p2/((R/Mwt)*T2))*A2*V2*10**3 # mass flow rate in kg/s",
+ "",
+ "# Results",
+ "print '-> The exit mach number for back pressure of 500kpa is: '",
+ "print round(M,2)",
+ "print '-> The mass flow rate in kg/s for back pressure of 500kpa is:'",
+ "print round(mdot,2)",
+ "",
+ "# Part(b)",
+ "# Since the back pressure of 784kpa is greater than critical pressure of pstar determined above,the flow throughout the nozzle is subsonic and the exit pressure equals the back pressure,",
+ "p2 = 784.00 # exit pressure in kpa",
+ "# Calculations",
+ "M2 = (((2.00)/(k-1))*(((pnot*10**3)/p2)**((k-1)/k)-1))**0.5 # exit mach number",
+ "T2 = Tnot/(1+((k-1)/2)*(M2**2)) # exit temperature in kelvin",
+ "V2 = M2*((k*(R/Mwt)*10**3*T2)**0.5) # exit velocity in m/s",
+ "mdot2 = (p2/((R/Mwt)*T2))*A2*V2 # mass flow rate in kg/s",
+ "# Results",
+ "print '-> The mass flow rate at the exit for back pressure of 784kpa is: ',round(mdot2,2),'kg/s.'",
+ "print '-> The exit mach number for back pressure of 784 kpa is: '",
+ "print round(M2,2)"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> The exit mach number for back pressure of 500kpa is: ",
+ "1.0",
+ "-> The mass flow rate in kg/s for back pressure of 500kpa is:",
+ "2.13",
+ "-> The mass flow rate at the exit for back pressure of 784kpa is: 1.79 kg/s.",
+ "-> The exit mach number for back pressure of 784 kpa is: ",
+ "0.6"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "##<heading2> Example 9.15 Page no-442"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "",
+ "# Given:-",
+ "# Part(a)",
+ "Mt = 0.7 # mach mumber at the throat",
+ "At = 6.25 # throat area in cm^2",
+ "Ae = 15.00 # exit area in cm^2",
+ "",
+ "# The flow throughout the nozzle, including the exit, is subsonic. Accordingly, with this value for A2byAstar, Table 9.1 gives",
+ "M2 = 0.24",
+ "# For M2 \u0003= 0.24,",
+ "T2byTnot = 0.988",
+ "p2bypnot = 0.959",
+ "k = 1.4",
+ "T0 = 280.00 # in kelvin",
+ "pnot = 6.8 # in bars",
+ "# Calculations",
+ "# With Mt \u0003= 0.7, Table 9.1 gives",
+ "AtbyAstar = 1.09437",
+ "A2byAstar = (Ae/At)*AtbyAstar",
+ "T2 = T2byTnot*T0 # in kelvin",
+ "p2 = p2bypnot*pnot # in bars",
+ "V2 = M2*((k*(8.314/28.97)*T2*10**3)**0.5) # velocity at the exit in m/s",
+ "mdot = (p2/((8.314/28.97)*T2))*Ae*V2*10**-2 # mass flow rate in kg/s",
+ "# Results",
+ "print '-> Part(a) the mass flow rate in kg/s is: '",
+ "print round(mdot,2)",
+ "print '-> The exit pressure in bars is: '",
+ "print round(p2,2)",
+ "print '-> The exit mach number is: '",
+ "print round(M2,2)",
+ "",
+ "# Part(b)",
+ "Mt = 1.00 # mach number at the throat",
+ "# From table 9.1",
+ "M2 = 0.26",
+ "T2byTnot = 0.986 ",
+ "p2bypnot = 0.953",
+ "",
+ "T0 = 280.00 # in kelvin",
+ "pnot = 6.8 # in bars",
+ "# Calculations",
+ "T2 = T2byTnot*T0 # in kelvin",
+ "p2 = p2bypnot*pnot # in bars",
+ "k = 1.4",
+ "V2 = M2*((k*(8314/28.97)*T2)**0.5) # exit velocity in m/s",
+ "mdot = (p2/((8.314/28.97)*T2))*Ae*V2*10**-2 # mass flow rate in kg/s",
+ "# Results",
+ "print '-> Part(b) the mass flow rate is: ',mdot,'kg/s.'",
+ "print '-> The exit pressure is: ',p2,'bars.'",
+ "print '-> The exit mach number is: ',M2",
+ "",
+ "# Part(c)",
+ "# From part (b), the exit Mach number in the present part of the example is",
+ "M2 = 2.4",
+ "# Using this, Table 9.1 gives",
+ "p2bypnot = 0.0684",
+ "pnot = 6.8 # in bars",
+ "# Calculation",
+ "p2 = p2bypnot*pnot # in bars",
+ "# Results",
+ "# Since the nozzle is choked, the mass flow rate is the same as found in part (b).",
+ "print '> Part(c) the mass flow rate is: ',mdot,'kg/s.'",
+ "print '-> The exit pressure is: ',p2,'bars.'",
+ "print '-> The exit mach number is: ',M2",
+ "",
+ "# Part(d)",
+ "# Since a normal shock stands at the exit and the flow upstream of the shock is isentropic, the Mach number Mx and the pressure px correspond to the values found in part (c), ",
+ "Mx = 2.4",
+ "px = 0.465 # in bars",
+ "# Then, from Table 9.2",
+ "My = 0.52",
+ "#py is the exit pressure",
+ "pybypx = 6.5533",
+ "py = px*pybypx",
+ "",
+ "# The pressure downstream of the shock is thus 3.047 bars. This is the exit pressure",
+ "# The mass flow is the same as found in part (b).",
+ "# Results",
+ "print '-> Part(d) the mass flow rate is: ',mdot,'kg/s.'",
+ "print '-> The exit pressure is: ',round(py,3),'bars.'",
+ "print '-> The exit mach number is: ',My",
+ "",
+ "# Part(e)",
+ "# A shock stands in the diverging portion where the area is",
+ "Ax = 12.5 # in cm^2",
+ "# Since a shock occurs, the flow is sonic at the throat, so",
+ "Axstar = 6.25 # in cm^2",
+ "At = Axstar",
+ "# The Mach number Mx can then be found from Table 9.1, by using AxbyAxstar as",
+ "Mx = 2.2",
+ "",
+ "# Results",
+ "# With Mx =\u0003 2.2, the ratio of stagnation pressures is obtained from Table 9.2 as",
+ "pnotybypnotx = 0.62812",
+ "",
+ "# Using this ratio and noting that the flow is subsonic after the shock, Table 9.1 gives",
+ "M2 = 0.43",
+ "# For M2 = 0.43,",
+ "p2bypnoty = 0.88",
+ "# Calculations",
+ "A2byAystar = (Ae/Axstar)*pnotybypnotx",
+ "p2 = p2bypnoty*pnotybypnotx*pnot # in bars",
+ "",
+ "# Results",
+ "# Since the flow is choked, the mass flow rate is the same as that found in part (b).",
+ "print '-> part(e) the mass flow rate is: ',mdot,'kg/s.'",
+ "print '-> the exit pressure is: ',p2,'bars.'",
+ "print '-> the exit mach number is: ',M2"
+ ],
+ "language": "python",
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-> Part(a) the mass flow rate in kg/s is: ",
+ "0.99",
+ "-> The exit pressure in bars is: ",
+ "6.52",
+ "-> The exit mach number is: ",
+ "0.24",
+ "-> Part(b) the mass flow rate is: 1.06238566635 kg/s.",
+ "-> The exit pressure is: 6.4804 bars.",
+ "-> The exit mach number is: 0.26",
+ "> Part(c) the mass flow rate is: 1.06238566635 kg/s.",
+ "-> The exit pressure is: 0.46512 bars.",
+ "-> The exit mach number is: 2.4",
+ "-> Part(d) the mass flow rate is: 1.06238566635 kg/s.",
+ "-> The exit pressure is: 3.047 bars.",
+ "-> The exit mach number is: 0.52",
+ "-> part(e) the mass flow rate is: 1.06238566635 kg/s.",
+ "-> the exit pressure is: 3.75867008 bars.",
+ "-> the exit mach number is: 0.43"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/README.txt b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/README.txt
index 1659704b..1659704b 100644..100755
--- a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/README.txt
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/README.txt
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph1.png b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph1.png
index 630ef263..763b903c 100644..100755
--- a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph1.png
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph1.png
Binary files differ
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph2.png b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph2.png
index 8dbefa98..418e67d8 100644..100755
--- a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph2.png
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph2.png
Binary files differ
diff --git a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph3.png b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph3.png
index 4253b0e3..e43d18f3 100644..100755
--- a/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph3.png
+++ b/Fundamental_of_Thermodynamics_by_Moran_and_Shapiro/screenshots/graph3.png
Binary files differ
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_2.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_2.ipynb
index 41a4696d..41a4696d 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_2.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_2.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_4.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_4.ipynb
index 0f2922c6..0f2922c6 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_4.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_4.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_5.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_5.ipynb
index 2f61f756..2f61f756 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_5.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_5.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_6.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_6.ipynb
index 9738d352..9738d352 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_6.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_6.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_7.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_7.ipynb
index 4fbbb7e2..4fbbb7e2 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_7.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_7.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_8.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_8.ipynb
index 7f3f0078..7f3f0078 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_8.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_8.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/Ch_9.ipynb b/Fundamentals_of_Fluid_Mechanics/Ch_9.ipynb
index b77b5418..b77b5418 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/Ch_9.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/Ch_9.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/README.txt b/Fundamentals_of_Fluid_Mechanics/README.txt
index 6ecc01aa..6ecc01aa 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/README.txt
+++ b/Fundamentals_of_Fluid_Mechanics/README.txt
diff --git a/Fundamentals_of_Fluid_Mechanics/ch_1.ipynb b/Fundamentals_of_Fluid_Mechanics/ch_1.ipynb
index 7ceb7896..7ceb7896 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/ch_1.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/ch_1.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/ch_10.ipynb b/Fundamentals_of_Fluid_Mechanics/ch_10.ipynb
index 8ed43887..8ed43887 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/ch_10.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/ch_10.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/ch_11.ipynb b/Fundamentals_of_Fluid_Mechanics/ch_11.ipynb
index 84863f93..84863f93 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/ch_11.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/ch_11.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/ch_12.ipynb b/Fundamentals_of_Fluid_Mechanics/ch_12.ipynb
index a1cf658f..a1cf658f 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/ch_12.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/ch_12.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/ch_3.ipynb b/Fundamentals_of_Fluid_Mechanics/ch_3.ipynb
index 04a152bb..04a152bb 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/ch_3.ipynb
+++ b/Fundamentals_of_Fluid_Mechanics/ch_3.ipynb
diff --git a/Fundamentals_of_Fluid_Mechanics/screenshots/seconds.png b/Fundamentals_of_Fluid_Mechanics/screenshots/seconds.png
index fd177f02..fd177f02 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/screenshots/seconds.png
+++ b/Fundamentals_of_Fluid_Mechanics/screenshots/seconds.png
Binary files differ
diff --git a/Fundamentals_of_Fluid_Mechanics/screenshots/surface-elevation.png b/Fundamentals_of_Fluid_Mechanics/screenshots/surface-elevation.png
index dcfee957..dcfee957 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/screenshots/surface-elevation.png
+++ b/Fundamentals_of_Fluid_Mechanics/screenshots/surface-elevation.png
Binary files differ
diff --git a/Fundamentals_of_Fluid_Mechanics/screenshots/the-drag.png b/Fundamentals_of_Fluid_Mechanics/screenshots/the-drag.png
index 46c163a2..46c163a2 100644..100755
--- a/Fundamentals_of_Fluid_Mechanics/screenshots/the-drag.png
+++ b/Fundamentals_of_Fluid_Mechanics/screenshots/the-drag.png
Binary files differ
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_1.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_1.ipynb
index 91987df5..91987df5 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_1.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_1.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_10.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_10.ipynb
index bb6c3320..bb6c3320 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_10.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_10.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_11.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_11.ipynb
index b185ed9e..b185ed9e 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_11.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_11.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_12.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_12.ipynb
index 0458d8c6..0458d8c6 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_12.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_12.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_13.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_13.ipynb
index c86d6c34..c86d6c34 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_13.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_13.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_14.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_14.ipynb
index b13d25b6..b13d25b6 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_14.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_14.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_2.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_2.ipynb
index d440a2d3..d440a2d3 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_2.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_2.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_3.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_3.ipynb
index 4cf59010..4cf59010 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_3.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_3.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_4.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_4.ipynb
index 9f1825ca..9f1825ca 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_4.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_4.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_5.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_5.ipynb
index 62378c37..62378c37 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_5.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_5.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_6.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_6.ipynb
index 56b06d80..56b06d80 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_6.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_6.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_7.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_7.ipynb
index b47e5d70..b47e5d70 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_7.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_7.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_8.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_8.ipynb
index ec80846d..ec80846d 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_8.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_8.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_9.ipynb b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_9.ipynb
index 449ae71c..449ae71c 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_9.ipynb
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/Chapter_9.ipynb
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/README.txt b/Fundamentals_of_Heat_and_Mass_Transfer/README.txt
index 593587fe..593587fe 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/README.txt
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/README.txt
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-1.png b/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-1.png
index bc6e5b2f..bc6e5b2f 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-1.png
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-1.png
Binary files differ
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-2.png b/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-2.png
index 81db83ab..81db83ab 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-2.png
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-2.png
Binary files differ
diff --git a/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-3.png b/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-3.png
index 9c02d6f1..9c02d6f1 100644..100755
--- a/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-3.png
+++ b/Fundamentals_of_Heat_and_Mass_Transfer/screenshots/devika-3.png
Binary files differ
diff --git a/Heat_Transfer/Chapter_2.ipynb b/Heat_Transfer/Chapter_2.ipynb
new file mode 100755
index 00000000..f7f0aab7
--- /dev/null
+++ b/Heat_Transfer/Chapter_2.ipynb
@@ -0,0 +1,2662 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Conduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.1,Page no:2.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Thickness of insulation\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1 #Area of heat transfer[sq metre]\n",
+ "Q=450 #Rate of heat loss/unit area[W/ sq mtre]\n",
+ "dT=400 #Temperature difference across insulation layer[K]\n",
+ "k=0.11 #k for asbestos[W/(m.K)]\n",
+ "\n",
+ "#Calculation\n",
+ "#Q=(k* A*dT)/x\n",
+ "x1=(k*A*dT)/Q\n",
+ "X1=x1*1000 \n",
+ "#for fire clay insulation\n",
+ "k=0.84 #For fire clay insulation[W/(m.K)]\n",
+ "x=(k*A*dT)/Q \n",
+ "X=x*1000 \n",
+ "\n",
+ "#Result\n",
+ "print\"Ans.(A).Thickness of asbestos is:\",round(X1),\"mm\"\n",
+ "print\"Ans.(B)Thickness of fire clay insulation is:\",round(X),\"mm\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ans.(A).Thickness of asbestos is: 98.0 mm\n",
+ "Ans.(B)Thickness of fire clay insulation is: 747.0 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 125
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.2,Page no:2.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss per metre\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=1.0 # Length of pipe[m]\n",
+ "r1=(50.0/2.0) # in mm\n",
+ "r1=r1/1000.0 # in m\n",
+ "r2=(25.0+3.0)/1000.0 # m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "rm1=(r2-r1)/math.log(r2/r1) \n",
+ "k1=45.0 #W/(m.K)\n",
+ "R1=(r2-r1)/(k1*(2*math.pi*rm1*L)) # Thermal resistance of wall pipe[K/W]\n",
+ "\n",
+ "#For inner lagging:\n",
+ "k2=0.08 #W/(m.K)\n",
+ "ri1=0.028 #m\n",
+ "ri2=(ri1+r1) # m\n",
+ "rmi1=(ri2-ri1)/math.log(ri2/ri1)\n",
+ "R2=(ri2-ri1)/(k2*2*math.pi*rmi1*L) #Thermal resistance of inner lagging [K/W]\n",
+ "\n",
+ "#For outer lagging:\n",
+ "k3=0.04 #W/(m.K)\n",
+ "ro1=0.053 #m\n",
+ "ro2=(ro1+0.04) # m\n",
+ "rmo1=(ro2-ro1)/math.log(ro2/ro1)\n",
+ "R3=(ro2-ro1)/(k3*2*math.pi*rmo1*L) #Thermal resistance of outer lagging\n",
+ "\n",
+ "R=R1+R2+R3\n",
+ "Ti=550.0 #K #inside\n",
+ "To=330.0 #K # outside\n",
+ "dT=Ti-To #Temperature difference\n",
+ "Q=dT/R\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat loss per metre of pipe,Q=\",round(Q,1),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat loss per metre of pipe,Q= 62.7 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 126
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.3,Page no:2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat Loss in pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=44.0 #i [mm]\n",
+ "r1=r1/1000.0 #i[m]\n",
+ "r2=0.094 #i [m]\n",
+ "r3=0.124 #i [m]\n",
+ "T1=623.0 #iTemperature at outer surface of wall in[K]\n",
+ "T3=313.0 #iTemperature at outer surface of outer insulation [K]\n",
+ "k1=0.087 #iThermal conductivity of insulation layer 1..in [W/m.K]\n",
+ "k2=0.064 #iThermal conductivity of insulation layer 2 [W/m.K]\n",
+ "l=1 #i Length of pipe [m]\n",
+ "\n",
+ "#Calculation\n",
+ "rm1=(r2-r1)/math.log(r2/r1) #imath.log mean radius of insulation layer 1 [m]\n",
+ "rm2=(r3-r2)/math.log(r3/r2) #imath.log mean radius of insulation layer 2[m]\n",
+ "#iPutting values in following eqn:\n",
+ "Q= (T1-T3)/((r2-r1)/(k1*2*math.pi*rm1*l)+(r3-r2)/(k2*2*math.pi*rm2*l)) \n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per meter pipe is\",round(Q,1),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per meter pipe is 149.2 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.4,Page no:2.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss in interface\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1 #Heat transfer area [sq m]\n",
+ "x1=0.229 # thickness of fire brick in [m]\n",
+ "x2=0.115 # thickness of insulating brick in [m]\n",
+ "x3=0.229 # thickness of building brick in [m]\n",
+ "k1=6.05 #thermal conductivity of fir brick [W/(m.K)]\n",
+ "k2=0.581 #thermal conductivity of insulating brick [W/m.K]\n",
+ "k3=2.33 #thermal conductivity of building brick [W/m.K]\n",
+ "T1=1223 # inside temperature [K]\n",
+ "T2=323 # Outside temperature[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT=T1-T2 #Overall temp drop [K]\n",
+ "R1=(x1/k1*A) #thermal resistance 1\n",
+ "R2=(x2/k2*A) # Thermal resistance 2\n",
+ "R3=(x3/k3*A) #Thermal resistance 3\n",
+ "Q=dT/(R1+R2+R3) #w/SQ m\n",
+ "Ta=-((Q*R1)-T1) #from Q1=Q=(T1-Ta)/(x1/k1*A)\n",
+ "#Similarly\n",
+ "Tb=(Q*R3)+T2 \n",
+ "\n",
+ "#Result\n",
+ "print\"Interface temperature:\\ni-Between FB-IB=\",round(Ta),\" K \\nii-Between IB-PB=\",round(Tb,1),\"K\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Interface temperature:\n",
+ "i-Between FB-IB= 1121.0 K \n",
+ "ii-Between IB-PB= 587.8 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 130
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.5,Page no:2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss per unit area\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1 #let [sq m]\n",
+ "x1=0.23 #thickness of fir brick layer[m]\n",
+ "x2=0.115 # [m]\n",
+ "x3=0.23 #[m]\n",
+ "T1=1213.0 #Temperature of furnace [K]\n",
+ "T2=318.0 #Temperature of furnace [K]\n",
+ "dT=T1-T2 #[K]\n",
+ "k1=6.047 #W/(m.K) (fire brick)\n",
+ "k2=0.581 #W/(m.K) (insulating brick)\n",
+ "k3=2.33 #W/(m.K) (building brick)\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_A=dT/((x1/k1)+(x2/k2)+(x3/k3)) #Heat lost per unit Area in Watt\n",
+ "Q_by_A=round(Q_by_A,1)\n",
+ "R1=(x1/k1) #Thermal resistance\n",
+ "R2=(x2/k2)\n",
+ "R3=(x3/k3)\n",
+ "R1=round(R1,2)\n",
+ "R2=round(R2,1)\n",
+ "R3=round(R3,1)\n",
+ "Ta=T1-((dT*R1)/(R1+R2+R3))\n",
+ "Ta=round(Ta)\n",
+ "Tb=((dT*R3)/(R1+R2+R3))+T2\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per unit area is\",Q_by_A,\"W=\",Q_by_A,\"J/s\\n\"\n",
+ "print\"Ta=\",Ta,\"K(APPROX) =Temperature at the interface between fire brick and insulating brick\"\n",
+ "print\"Tb=\",round(Tb),\"K Temperature at the interface between insulating and building brick\"\n",
+ "print\"\\nNOTE:Tb is wrongly calculated in the book as 565 K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per unit area is 2674.2 W= 2674.2 J/s\n",
+ "\n",
+ "Ta= 1108.0 K(APPROX) =Temperature at the interface between fire brick and insulating brick\n",
+ "Tb= 581.0 K Temperature at the interface between insulating and building brick\n",
+ "\n",
+ "NOTE:Tb is wrongly calculated in the book as 565 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 159
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.7,Page no:2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss in wall\n",
+ "#Part-(a)\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1.0 # sq metre\n",
+ "x1=114.0 # mm\n",
+ "x1=x1/1000.0 # metre\n",
+ "k1=0.138 # W/(m.K)\n",
+ "R1= x1/(k1*A)\n",
+ "x2=229.0 #mm\n",
+ "x2= x2/1000.0 # metre\n",
+ "k2=1.38 # W/m.K\n",
+ "R2=x2/(k2*A)\n",
+ "dT=1033.0-349.0\n",
+ "\n",
+ "#Calculation\n",
+ "#Heat loss\n",
+ "Q1=dT/(R1+R2)\n",
+ "#Part(b)\n",
+ "#contact resistance=cr\n",
+ "cr=0.09 #K/W\n",
+ "R=R1+R2+cr\n",
+ "Q=dT/R\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss from 1 sq metre wall=\",round(Q1,1),\"W\"\n",
+ "print\"Heat loss from 1 sq metre when resistance present=\",round(Q,1),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss from 1 sq metre wall= 689.5 W\n",
+ "Heat loss from 1 sq metre when resistance present= 632.1 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 161
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.8,Page no:2.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Loss per area\n",
+ "\n",
+ "#Variable declaration\n",
+ "x1=0.02 #[m]\n",
+ "x2=0.01 #[m]\n",
+ "x3=0.02 #[m]\n",
+ "k1=0.105 #W/(m.k)\n",
+ "k3=k1 #W/(m.K)\n",
+ "k2=0.041 #W/(m.K)\n",
+ "T1=303\n",
+ "T2=263\n",
+ "\n",
+ "#Calculation\n",
+ "dT=T1-T2 #[K]\n",
+ "Q_by_A=dT/((x1/k1)+(x2/k2)+(x3/k3))\n",
+ "R=0.625 #K/W\n",
+ "Tx=293 #K\n",
+ "Rx=0.9524 #K/W\n",
+ "x=R*(T1-Tx)/(dT*Rx)\n",
+ "x=x*100 #mm\n",
+ "\n",
+ "#Result\n",
+ "print\"The temperature of 293 K will be reached at point\",round(x,1),\"mm from the outermost wall surface of the ice-box\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The temperature of 293 K will be reached at point 16.4 mm from the outermost wall surface of the ice-box\n"
+ ]
+ }
+ ],
+ "prompt_number": 163
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.9,Page no:2.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss\n",
+ "\n",
+ "#Variable declaration\n",
+ "import math\n",
+ "ID=50.0 #Internal diameter[mm]\n",
+ "dT=(573.0-303.0) \n",
+ "r1=ID/2.0 #mm\n",
+ "r1=r1/1000.0 # metres\n",
+ "OD=150.0 #Outer diameter[mm]\n",
+ "r2=OD/2.0 # mm\n",
+ "r2=75.0/1000.0 # m\n",
+ "#Thermal conductivity\n",
+ "k=17.45 # W/(m.K) \n",
+ "\n",
+ "#Calculation\n",
+ "#Q/A=dT/(r2-r1)/k\n",
+ "A1=4*math.pi*(r1**2) \n",
+ "A2=4*math.pi*(r2**2) \n",
+ "A=math.sqrt(A1*A2)\n",
+ "Q=(A*k*dT)/(r2-r1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss=Q=\",round(Q),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss=Q= 2220.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 164
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.10,Page no:2.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat Passed\n",
+ "\n",
+ "#Variable declaration\n",
+ "A= 1.0 #sq m\n",
+ "x1=0.15\n",
+ "x2=0.01\n",
+ "x4=0.15\n",
+ "T1=973.0 #[K]\n",
+ "T2=288.0 #[K]\n",
+ "dT=T1-T2 #[K]\n",
+ "#Thermal conductivities\n",
+ "k1=1.75 \n",
+ "k2=16.86\n",
+ "k3=0.033\n",
+ "k4=5.2\n",
+ "\n",
+ "#Calculation\n",
+ "#in absence of air gap,sum of thermal resistances \n",
+ "sR=(x1/k1*A)+(x2/k2*A)+(x4/k4*A)\n",
+ "round(sR,3)\n",
+ "sR=0.1153 #approximate\n",
+ "Q= dT/sR\n",
+ "\n",
+ "#When heat loss,Q=1163,then new resistance =sR1\n",
+ "Q1=1163.0 #[W/sq m]\n",
+ "sR1=dT/Q1\n",
+ "#width of air gap be w then\n",
+ "w=(sR1-sR)*k3*A # [m]\n",
+ "w=w*1000 #in [mm]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat lost per sq meter is\",round(Q),\"W/sq m\"\n",
+ "print\"Width of air gap is\",round(w,1),\"mm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat lost per sq meter is 5941.0 W/sq m\n",
+ "Width of air gap is 15.6 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 184
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.11,Page no:2.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Heat loss in Insulated pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "d1=300.0 #[mm]\n",
+ "r1=d1/2.0 # [mm]\n",
+ "r1=r1/1000.0 #[m]\n",
+ "r2=r1+0.05 #[m]\n",
+ "r3=r2+0.04 #[m]\n",
+ "x1=0.05 #[m]\n",
+ "x2=0.04 #[m]\n",
+ "k1=0.105 #W/(m.K)\n",
+ "k2=0.07 #W/(m.K)\n",
+ "\n",
+ "#Calculation\n",
+ "rm1= (r2-r1)/math.log(r2/r1) # [m]\n",
+ "rm2=(r3-r2)/math.log(r3/r2) #[m]\n",
+ "L=1 #let\n",
+ "A1=math.pi*rm1*L #let L=1\n",
+ "R1=x1/(k1*A1) \n",
+ "A2=math.pi*rm2*L\n",
+ "R2=x2/(k2*A2)\n",
+ "T1=623.0 #[K]\n",
+ "T2=323.0 #[K]\n",
+ "dT=T1-T2 #[K]\n",
+ "\n",
+ "#Part a\n",
+ "Q_by_L= dT/(R1+R2) #Heat loss\n",
+ "\n",
+ "#Part b:\n",
+ "P=2*math.pi*(r1+x1+x2) #[m]\n",
+ "Q_by_L_peri=Q_by_L/P # [W/sq m]\n",
+ "R1=x1/(k1*A1) \n",
+ "sR=0.871+0.827\n",
+ "dT1=dT*R1/sR\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "#Part a\n",
+ "print\"Heat loss is:\",round(Q_by_L,1),\"W/m\" \n",
+ "#Part b:\n",
+ "print\"Heat lost per sq meter of outer insulation is\",round(Q_by_L_peri),\"W/sq m\"\n",
+ "print\"Temperature between two layers of insulation=\",round((T1-dT1)),\"K\"\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss is: 176.3 W/m\n",
+ "Heat lost per sq meter of outer insulation is 117.0 W/sq m\n",
+ "Temperature between two layers of insulation= 469.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 187
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.12,Page no:2.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss in Composite brick\n",
+ "\n",
+ "#Variable declaration\n",
+ "x1=0.01 #[m]\n",
+ "x2=0.15 #[m]\n",
+ "x3=0.15 #[m]\n",
+ "T1=973.0 #[K]\n",
+ "T2=423.0 #[K]\n",
+ "dT=T1-T2 \n",
+ "#Thermal conductivities\n",
+ "k1=16.86 #[W/m.K]\n",
+ "k2=1.75 #[W/m.K]\n",
+ "k3=5.23 #[W/m.K]\n",
+ "k_air=0.0337 # [W/m.K]\n",
+ "A=1 #[sq m]\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_R=(x1/(k1*A)+x2/(k2*A)+x3/(k3*A))\n",
+ "Q=dT/sigma_R #Heat flow in [W\n",
+ "Tm= Q*x3/k3 #Temperature drop in magnesite brick\n",
+ "#Interface temperature=iT\n",
+ "iT=T2+Tm #[K]\n",
+ "sigma_xbyk= A*dT/1163 #with air gap for reducing heat loss to 1163 per sq m\n",
+ "x_by_k=sigma_xbyk-sigma_R #x/k for air\n",
+ "t=x_by_k*k_air\n",
+ "t=t*1000 \n",
+ "\n",
+ "#Calculation\n",
+ "print\"Width of the air gap is\",round(t,2),\"mm\"\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of the air gap is 12.06 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 189
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.13,Page no:2.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat flow in a pipe\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "L=1 #assume [m]\n",
+ "k1=43.03 #[W/(m.K)\n",
+ "k2=0.07 #(W/m.K)\n",
+ "T1=423 #inside temperature [K]\n",
+ "T2=305 # [K]\n",
+ "r1=0.0525 #[mm]\n",
+ "r2=0.0575 #[m]\n",
+ "r3=0.1075 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "#r3=r3/1000 #[m]\n",
+ "Q=(2*math.pi*L*(T1-T2))/(((math.log(r2/r1))/k1)+((math.log(r3/r2))/k2)) #Heat loss per metre \n",
+ "#Part 2\n",
+ "#T=Temperature of outer surface\n",
+ "T=T1-(Q*math.log(r2/r1))/(k1*2*math.pi*L) \n",
+ "#Part iii\n",
+ "id=0.105 #inside diametre in [m]\n",
+ "A=math.pi*id*1 #inside area in [sq m]\n",
+ "C=Q/(A*(T1-T2)) #conductance per length\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat flow per metre of pipe is\",round(Q,2),\"W/m\"\n",
+ "#Part 2\n",
+ "print\"Temperature at outer surface of steel pipe:\",round(T,2),\"K\" \n",
+ "#Part iii\n",
+ "print\"Conductance per m length based on inside area is\",round(C,1),\"W/K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flow per metre of pipe is 82.93 W/m\n",
+ "Temperature at outer surface of steel pipe: 422.97 K\n",
+ "Conductance per m length based on inside area is 2.1 W/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 192
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.15,Page no:2.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Thickness of insulation \n",
+ " \n",
+ "#Variable declaration\n",
+ "A=1 # [sq m]\n",
+ "x1=0.1 #m\n",
+ "x2=0.04\n",
+ "k1=0.7\n",
+ "k2=0.48\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=x1/(k1*A)+x2/(k2*A) #K/W\n",
+ "#Q=4.42*dT\n",
+ "#Q=dT/sigma\n",
+ "#with rockwool insulation added,Q_dash=0.75*Q\n",
+ "k3=0.065 # W/(m.K)\n",
+ "#Q_dash=dT/sigma+x3/k3*A\n",
+ "#On solving Q and Q_dash we get\n",
+ "x3=((1/(0.75*4.42))-sigma)*k3 #[m]\n",
+ "x3=x3*1000 # [mm]\n",
+ "\n",
+ "#Result\n",
+ "print\"Thickness of rockwool insulation required=\",round(x3,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of rockwool insulation required= 4.91 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 193
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.16,Page no:2.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Reduction in heat loss in insulated pipe\n",
+ "d1=40.0 # Diameter of pipe[mm]\n",
+ "r1=(d1/2.0)/1000.0 #Outside radius in [m]\n",
+ "t1=20.0 #Insulation 1 thickness in [mm]\n",
+ "t1=t1/1000 #[m]\n",
+ "t2=t1 #Insulation 2 thickness in[m]\n",
+ "r2=r1+t1 #radius after 1st insulation in [m]\n",
+ "r3=r2+t2 #Radius after second insulation in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#Since python does not handles symbolic constants,we will assume some values:\n",
+ "#(1)\n",
+ "#Let the layer M-1 be nearer to the surface\n",
+ "L=1.0 #[m]\n",
+ "T1=10.0 #Temperature of inner surface of pipe [K]\n",
+ "T2=5.0 #Temperature of outer surface of insulation [K]\n",
+ "k=1.0 #Thermal conductivity\n",
+ "k1=k #For M-1 material\n",
+ "k2=3*k #For material M-2\n",
+ "Q1=(T1-T2)/(math.log(r2/r1)/(2*math.pi*L*k1)+math.log(r3/r2)/(2*math.pi*L*k2))\n",
+ "#(2)\n",
+ "#Let the layer of material M-2 be nearer to the surface\n",
+ "Q2=(T1-T2)/(math.log(r2/r1)/(2*math.pi*L*k2)+math.log(r3/r2)/(2*math.pi*L*k1))\n",
+ "#For dummy variables unity...\n",
+ "#For any value of k,T1 and T2,Q1 is always less than Q2\n",
+ "\n",
+ "#Result\n",
+ "print\"M-1 near the surface is advisable(i.e Arrangement one will result in less heat loss)\"\n",
+ "per_red=(Q2-Q1)*100/Q2\n",
+ "print\"Percent reduction in heat loss is\",round(per_red,1),\"percent\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "M-1 near the surface is advisable(i.e Arrangement one will result in less heat loss)\n",
+ "Percent reduction in heat loss is 23.2 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.17,Page no:2.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss in a pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=523 #[K]\n",
+ "T2=323 #[K]\n",
+ "r1=0.05 #[m]\n",
+ "r2=0.055 #[m]\n",
+ "r3=0.105 #[m]\n",
+ "r4=0.155 #[m]\n",
+ "k1=50 #[W/(m.K)]\n",
+ "k2=0.06 #[W/(m.K)]\n",
+ "k3=0.12 #W/(m.K)\n",
+ "\n",
+ "#Calculation\n",
+ "#CASE 1\n",
+ "Q_by_L1=2*math.pi*(T1-T2)/((math.log(r2/r1))/k1+(math.log(r3/r2))/k2+(math.log(r4/r3))/k3) #[W/m]\n",
+ "#Case 2\n",
+ "Q_by_L2=2*math.pi*(T1-T2)/((math.log(r2/r1))/k1+(math.log(r3/r2))/k3+(math.log(r4/r3))/k2)\n",
+ "perct=(Q_by_L2-Q_by_L1)*100/Q_by_L1\n",
+ "\n",
+ "#Result\n",
+ "#CASE 1\n",
+ "print\"Heat loss=\",round(Q_by_L1,1),\"W/m\"\n",
+ "#Case 2\n",
+ "print\"If order is changed then heat loss=\",round(Q_by_L2,2),\"W/m\" \n",
+ "print\"Loss of heat is increased by\",round(perct,2),\" percent by putting material with higher thermal conductivity near the pipe surface\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss= 89.6 W/m\n",
+ "If order is changed then heat loss= 105.76 W/m\n",
+ "Loss of heat is increased by 18.04 percent by putting material with higher thermal conductivity near the pipe surface\n"
+ ]
+ }
+ ],
+ "prompt_number": 198
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.18,Page no:2.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Arrangements for heat loss\n",
+ "\n",
+ "#Variable declaration\n",
+ "#Assume:\n",
+ "L=1.0 #[m]\n",
+ "r1=0.10 #[m] Outside radius od pipe\n",
+ "ia=0.025 #inner insulaiton [m]\n",
+ "import math \n",
+ "r2=r1+ia #Outer radius of inner insulation\n",
+ "r3=r2+ia #Outer radius of outer insulation\n",
+ "\n",
+ "#Calculation\n",
+ "#CASE 1:'a' near the pipe surface\n",
+ "#let k1=1\n",
+ "k1=1.0 #Thermal conductivity of A[W/m.K]\n",
+ "#and k2=3k1=3\n",
+ "k2=3.0 #Thermal conductivity of B[W/m.K]\n",
+ "#Let dT=1\n",
+ "dT=1.0\n",
+ "Q1=dT/(math.log(r2/r1)/(2*math.pi*k1*L)+math.log(r3/r2)/(2*math.pi*k2*L))\n",
+ "#CASE 2:'b' near the pipe surface \n",
+ "Q2=dT/(math.log(r2/r1)/(2*math.pi*k2*L)+math.log(r3/r2)/(2*math.pi*k1*L))\n",
+ "\n",
+ "#Result\n",
+ "print\"ANSWER-(i)\\nQ1=\",round(Q1,2),\"W \\nQ2=\",round(Q2,2),\" W \"\n",
+ "print\"Q1 is less than Q2.i.e arrangement A near the pipe surface and B as outer layer gives less heat loss\\n\"\n",
+ "percent=(Q2-Q1)*100/Q1 #percent reduction in heat loss\n",
+ "print\"ANSWER-(ii) \\nPercent reduction in heat loss (with near the pipe surface)=\",round(percent,1),\"%(approx)\" \n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ANSWER-(i)\n",
+ "Q1= 22.13 W \n",
+ "Q2= 24.48 W \n",
+ "Q1 is less than Q2.i.e arrangement A near the pipe surface and B as outer layer gives less heat loss\n",
+ "\n",
+ "ANSWER-(ii) \n",
+ "Percent reduction in heat loss (with near the pipe surface)= 10.6 %(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 206
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.19,Page no:2.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Insulation thickness\n",
+ "\n",
+ "#Variable declaration\n",
+ "x1=0.224 # m\n",
+ "k1=1.3 # W/(m.K)\n",
+ "k2=0.346 # W/(m.K)\n",
+ "T1=1588.0 # K\n",
+ "T2= 299.0 # K\n",
+ "QA=1830.0 # W/ sq metre #heat loss\n",
+ "\n",
+ "#Calculation\n",
+ "#Q/A=(T1-T2)/x1/k1+x2/k2\n",
+ "x2=k2*((T1-T2)*1/(QA)-(x1/k1))\n",
+ "x2=x2*1000 \n",
+ "\n",
+ "#Result\n",
+ "print\"Thickness of insulation=\",round(x2),\"mm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of insulation= 184.0 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 209
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.20,Page no:2.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss in furnace\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "#for clay\n",
+ "k1=0.533 #[W/(m.K)]\n",
+ "#for red brick\n",
+ "k2=0.7 #[W/m.K]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Case 1\n",
+ "A=1 #Area\n",
+ "x1=0.125 #[m]\n",
+ "x2=0.5 #[m]\n",
+ "#Resistances\n",
+ "r1=x1/(k1*A) #Res of fire clay [K/W]\n",
+ "r2=x2/(k2*A) #Res of red brick[K/W]\n",
+ "r=r1+r2\n",
+ "#Temperatures\n",
+ "T1=1373 #[K]\n",
+ "T2=323 #[K]\n",
+ "Q=(T1-T2)/r #[W/sq m]\n",
+ "Tdash=T1-Q*r1 #[K]\n",
+ "\n",
+ "#Case2\n",
+ "# Heat loss must remain unchanged,Thickness of red brick also reduces to its half\n",
+ "x3=x2/2 #[m]\n",
+ "r3=x3/(k2*A) #[K/W]\n",
+ "Tdd= T2+(Q*r3) #[K]\n",
+ "#Thickness of diatomite be x2,km be mean conductivity\n",
+ "Tm=(Tdash+Tdd)/2 #[K]\n",
+ "km=0.113+(0.00016*Tm) #[W/(m.K]\n",
+ "x2=km*A*(Tdash-Tdd)/Q #[m]\n",
+ "x2=x2*1000 #[mm]\n",
+ "\n",
+ "#Result\n",
+ "print\"Thickness of diatomite layer=\",round(x2),\"mm\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of diatomite layer= 93.0 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 210
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.21,Page no:2.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Rate of heat loss in pipe\n",
+ "\n",
+ "#Variable declaration\n",
+ "k1=0.7 #common brick W/((m.K)\n",
+ "k2=0.48 #gypsum layer [W/(m.K)\n",
+ "k3=0.065 #Rockwool [W/m.K]\n",
+ "#Heat loss with insulatiob will be 20% of without insulation\n",
+ "A=1 #sq m\n",
+ "x1=0.1 #[m]\n",
+ "x2=0.04 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "R1=x1/(k1*A) #K/W\n",
+ "R2=x2/(k2*A) #K/W\n",
+ "R=R1+R2 #K/W\n",
+ "#R3=x3/(k3*A)\n",
+ "QbyQd=0.2\n",
+ "sigRbyRd=QbyQd\n",
+ "x3=(R/QbyQd-R)/15.4 #m\n",
+ "x3=x3*1000 #[mm]\n",
+ "\n",
+ "#Result\n",
+ "print\"Thickness of rockwool insulation\",round(x3),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of rockwool insulation 59.0 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 211
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.22,Page no:2.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss from insulated steel pipe\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ts=451.0 #Steam temperature in [K]\n",
+ "Ta=294.0 #Air temperature in [K]\n",
+ "Di=25.0 #Internal diameter of pipe [mm]\n",
+ "Di=Di/1000 #[m]\n",
+ "od=33.0 #Outer diameter of pipe [mm] \n",
+ "od=od/1000 #[m]\n",
+ "hi=5678.0 #Inside heat transfer coefficient [W/(m**2.K)]\n",
+ "ho=11.36 #Outsideheat transfer coefficient [W/(sq m.K)]\n",
+ "\n",
+ "#Calculation\n",
+ "xw=(od-Di)/2 #Thickness of steel pipe [m]\n",
+ "k2=44.97 #k for steel in W/(m.K)\n",
+ "k3=0.175 #k for rockwool in W/(m.K)\n",
+ "ti=38.0/1000 #thickness of insulation in [m]\n",
+ "r1=Di/2 #[m]\n",
+ "r2=od/2 #[m]\n",
+ "rm1=(r2-r1)/math.log(r2/r1) #[m]\n",
+ "r3=r2+ti #[m]\n",
+ "rm2=(r3-r2)/math.log(r3/r2) #[m]\n",
+ "Dm1=2*rm1 #[m]\n",
+ "Dm2=2*rm2 #[m]\n",
+ "import math\n",
+ "#Rate of heat loss = dT/(sigma_R)\n",
+ "L=1 #[m]\n",
+ "R1=1/(hi*math.pi*Di*L) #[K/W]\n",
+ "R1=round(R1,4)\n",
+ "R2=xw/(k2*math.pi*Dm1*L)\n",
+ "R2=round(R2,6)\n",
+ "R3=(r3-r2)/(k3*math.pi*Dm2*L)\n",
+ "R3=round(R3,3)\n",
+ "R3=1.086\n",
+ "Do=(od+2*ti) #[mm]\n",
+ "R4=1/(ho*math.pi*Do*L) #[m]\n",
+ "R4=round(R4,3)\n",
+ "sigma_R=R1+R2+R3+R4 \n",
+ "#Heat loss\n",
+ "dT=Ts-Ta #[K]\n",
+ "Q=dT/sigma_R #Heat loss [W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat loss is\",round(Q,2),\"W/m\"\n",
+ "print\"\\nNOTE:Slight variation in final answer due to mistake in calculation of sigma_R in textbook.\\nIn book is is taken as 1.366\\n \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat loss is 116.63 W/m\n",
+ "\n",
+ "NOTE:Slight variation in final answer due to mistake in calculation of sigma_R in textbook.\n",
+ "In book is is taken as 1.366\n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.23,Page no:2.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss from furnace\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=913.0 #[K]\n",
+ "T=513.0 #[K]\n",
+ "T2=313.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Q=(T1-T)/(x/(k*A))\n",
+ "#Q=(T-T2)/(1/(h*A))\n",
+ "#x=2k/h\n",
+ "#Q=(T1-T2)/(x/(kA)+1/(h*A))\n",
+ "#Therefore,Q=hA/3*(T1-T2)\n",
+ "#With increase in thickness(100%)\n",
+ "#x1=4*k/h\n",
+ "#Q2=(T1-T2)/(x1/k*A+1/(h*A))\n",
+ "#Q2=(h*A)/5)*(T1-T2)\n",
+ "#Now\n",
+ "h=1.0 #Assume\n",
+ "A=1.0 #Assume for calculation\n",
+ "Q1=(h*A/3)*(T1-T2)\n",
+ "Q2=((h*A)/5)*(T1-T2)\n",
+ "percent=(Q1-Q2)*100/Q1 #Percent reduction in heat loss\n",
+ "\n",
+ "#Result\n",
+ "print\"Percentage reduction in heat loss is\",percent,\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage reduction in heat loss is 40.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 100
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.24,Page no:2.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Rate of heat loss\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=1.0#m\n",
+ "thp=2.0#Thickness of pipe in mm\n",
+ "thi=10.0#Thickness of insulation in mm\n",
+ "T1=373.0#K\n",
+ "T2=298.0#K\n",
+ "id=30.0#mm\n",
+ "r1=id/2#mm\n",
+ "\n",
+ "#Calculation\n",
+ "r2=r1+thp#mm\n",
+ "r3=r2+thi#mm\n",
+ "#In S.I units\n",
+ "r1=r1/1000 #m\n",
+ "r2=r2/1000#m\n",
+ "r3=r3/1000#m\n",
+ "k1=17.44#W/(m.K)\n",
+ "k2=0.58#W/(m.K)\n",
+ "hi=11.63#W/(sq m.K)\n",
+ "ho=11.63#W/(sq m.K)\n",
+ "import math\n",
+ "Q=(2*math.pi*L*(T1-T2))/(1/(r1*hi)+(math.log(r2/r1))/k1+((math.log(r3/r2))/k2)+(1/(0.02*ho)))\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat loss,Q=\",round(Q,1),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat loss,Q= 43.5 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.25,Page no:2.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " #Thickness of insulation .\n",
+ "from scipy.optimize import fsolve\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=8.5 #[W/sq m.K]\n",
+ "dT=175 #[K]\n",
+ "r2=0.0167 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_l=h*2*math.pi*r2*dT #[W/m]\n",
+ "k=0.07 #For insulating material in [W/m.K]\n",
+ "#for insulated pipe--50% reduction in heat loss\n",
+ "Q_by_l1=0.5*Q_by_l #[w/m]\n",
+ "def f(r3):\n",
+ " x=Q_by_l1-dT/((math.log(r3/r2))/(2*math.pi*k)+1/(2*math.pi*r3*h))\n",
+ " return(x)\n",
+ "#by trial and error method we get:\n",
+ "r3=fsolve(f,0.05)\n",
+ "t=r3-r2 #thickness of insulation in [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Required thickness of insulation is\",round(t[0],4),\"m=\",round(t[0]*1000,1),\" mm or\",round(t[0]*1000),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required thickness of insulation is 0.0188 m= 18.8 mm or 19.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.26,Page no:2.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate heat loss per metre length\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "id=0.1 #internal diameter in[m]\n",
+ "od=0.12 #outer diameter in [m]\n",
+ "T1=358 #Temperature of fluid [K]\n",
+ "T2=298 #Temperature of surrounding [K]\n",
+ "t=0.03 #thickness of insulation [m]\n",
+ "k1=58 #[W/m.K]\n",
+ "k2=0.2 #W/(m.K) insulating material\n",
+ "h1=720 #inside heat transfer coeff [W/sq m .K]\n",
+ "h2=9 #W/sq m.K\n",
+ "r1=id/2 #[m]\n",
+ "r2=od/2 #[m]\n",
+ "r3=r2+t #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "#Heat loss per meter=Q_by_L\n",
+ "Q_by_L=(T1-T2)/(1/(2*math.pi*r1*h1)+math.log(r2/r1)/(2*math.pi*k1)+math.log(r3/r2)/(2*math.pi*k2)+1/(2*math.pi*r3*h2)) #W/m\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per metre length of pipe=\",round(Q_by_L,2),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per metre length of pipe= 114.49 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.27,Page no:2.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Mineral wool insulation\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "#Variable declaration\n",
+ "import math\n",
+ "T1=573 #[K]\n",
+ "T2=323 #[K]\n",
+ "T3=298 #[K]\n",
+ "h1=29 # Outside heat transfer coefficients [W/sq m.K]\n",
+ "h2=12 #[W/sq m.K]\n",
+ "r1=0.047 #Internal radius [m]\n",
+ "r2=0.05 #Outer radius[m]\n",
+ "k1=58 #[W/m.K]\n",
+ "k2=0.052 #[W/m.K]\n",
+ "\n",
+ "#Calculation\n",
+ "#Q=(T1-T2)/(1/(r1*h1)+math.log(r2/r1)/k1+math.log(r3/r2)/k2)=(T2-T3)/(1/(r3*h2))\n",
+ "def f(r3):\n",
+ " x=(T1-T2)/(1/(r1*h1)+math.log(r2/r1)/k1+math.log(r3/r2)/k2)-(T2-T3)/(1/(r3*h2))\n",
+ " return(x)\n",
+ "\t#by trial and error method :\n",
+ "r3=fsolve(f,0.05)\n",
+ "t=r3-r2 #Thickness of insulation in [m]\n",
+ "#Q=h2*2*math.pi*r3*L*(T2-T3)\n",
+ "Q_by_l=h2*2*math.pi*r3*(T2-T3) #[W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Thickness of insulation is\",round(t*1000),\"mm\"\n",
+ "print\"Rate of heat loss per unit length is\",round(Q_by_l[0],1),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of insulation is 32.0 mm\n",
+ "Rate of heat loss per unit length is 154.1 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.28,Page no:2.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate heat loss per sq m and temperature of outside surface\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1 #assume [sq m]\n",
+ "x1=0.006 #[m]\n",
+ "x2=0.075 #[m]\n",
+ "x3=0.2 #[m]\n",
+ "k1=39.0 #[W/m.K]\n",
+ "k2=1.1 #[W/m.K]\n",
+ "k3=0.66 #[W/m.K]\n",
+ "h0=65.0 #W/sq m .K\n",
+ "T1=900.0 #K\n",
+ "T2=300.0 #K\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_R=(x1/(k1*A)+x2/(k2*A)+x3/(k3*A)+1/(h0*A)) \n",
+ "\n",
+ "#To calculate heat loss/sq m area\n",
+ "Q=(T1-T2)/sigma_R #[W/sq m]\n",
+ "#Q/A=T-T2/(1/h0), where T=Temp of outside surface\n",
+ "#So, T=T2+Q/(A*h0)\n",
+ "T=Q/(A*h0)+T2 #[K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per sq metre area is:\",round(Q,1),\"W/sq m\" \n",
+ "print\"Temperature of outside surface of furnace is:\",round(T,1),\"K (\",round(T-273,1),\"degree C)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per sq metre area is: 1551.4 W/sq m\n",
+ "Temperature of outside surface of furnace is: 323.9 K ( 50.9 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.29,Page no:2.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine necessary thickness of insulation brick\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1.0 #Assume [sq m]\n",
+ "x1=0.003 #[m]\n",
+ "x3=0.008 #[m]\n",
+ "k1=30.0 #[W/m.K]\n",
+ "k2=0.7 #[W/m.K]\n",
+ "k3=40.0 #[W/m.K]\n",
+ "T1=363.0 #[K]\n",
+ "T=333.0 #[K]\n",
+ "T2=300.0 #[K]\n",
+ "h0=10.0 #W/sq m.K\n",
+ "\n",
+ "#Calculation\n",
+ "#Q=(T1-T2)/(x1/(k1*A)+x2/(k2*A)+x3/(k3*A)+1/(h0*A))\n",
+ "#Also,Q=(T-T2)/(1/(h0*A))\n",
+ "#So, (T1-T2)/((x1/(k1*A)+x2/(k2*A)+x3/(k3*A)+1/(h0*A))=(T-T2)/(1/(h0*A))\n",
+ "#or,x2=k2*A((T1-T2)/((T-T2)*h0*A)-1/(h0*A)-x1/(k1*A)-x3/(k3*A))\n",
+ "x2=k2*A*((T1-T2)/((T-T2)*h0*A)-1/(h0*A)-x1/(k1*A)-x3/(k3*A)) #[m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Thickness of insulating brick required is\",round(x2*1000,1),\"mm\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of insulating brick required is 63.4 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.30,Page no:2.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat flow through furnace wall\n",
+ "\n",
+ "#Variable declaration\n",
+ "hi=75.0 #[W/sq m.K)\n",
+ "x1=0.2 #m\n",
+ "x2=0.1 #[m]\n",
+ "x3=0.1 #[m]\n",
+ "T1=1943 #[K]\n",
+ "k1=1.25 #W/m.K\n",
+ "k2=0.074 #/W/m.K\n",
+ "k3=0.555 #W/m.K\n",
+ "T2=343.0 #K\n",
+ "A=1.0 #assume [sq m]\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_R=1.0/(hi*A)+x1/(k1*A)+x2/(k2*A)+x3/(k3*A) \n",
+ "#Heat loss per i sq m\n",
+ "Q=(T1-T2)/sigma_R #[W]\n",
+ "#if T=temperature between chrome brick and koalin brick then \n",
+ "#Q=(T1-T)/(1/(hi*A)+x1/(k1*A))\n",
+ "#or T=T1-(Q*(1/(hi*A)+x1/(k1*A)))\n",
+ "T=T1-(Q*(1.0/(hi*A)+x1/(k1*A))) #[K]\n",
+ "#if Tdash=temperature at the outer surface of middle layer,then\n",
+ "#Q=(Tdash-T2)/(x3/(k1*A))\n",
+ "#or Tdash=T2+(Q*x3/(k3*A))\n",
+ "Tdash=T2+(Q*x3/(k3*A)) #[K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per sq m is:\",round(Q,1),\"W\"\n",
+ "print\"Temperature at inner surface of middle layer=\",round(T,1),\"K(\",round(T-273,1),\"degree C)\"\n",
+ "print\"Temperature at outer surface of middle layer=\",round(Tdash,1),\"K (\",round(Tdash-273,1),\"degree C)\" \n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per sq m is: 938.5 W\n",
+ "Temperature at inner surface of middle layer= 1780.3 K( 1507.3 degree C)\n",
+ "Temperature at outer surface of middle layer= 512.1 K ( 239.1 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.31,Page no:2.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate:(a) Heat loss per unit length \n",
+ "#(b)Reduction in heat loss\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "hi=10 #W/sq m.K\n",
+ "h0=hi #W/sq.m.K\n",
+ "r1=0.09 #m\n",
+ "r2=0.12 #m\n",
+ "t=0.05 #thickness of insulation [m]\n",
+ "k1=40 #W/m.K\n",
+ "k2=0.05 #W/m.K\n",
+ "T1=473 #K\n",
+ "T2=373 #K\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_L=2*math.pi*(T1-T2)/(1/(r1*hi)+math.log(r2/r1)/k1+1/(r2*h0)) #W/m\n",
+ "#After addition of insulation:\n",
+ "r3=r2+t #radius of outer surface of insulaiton\n",
+ "Q_by_L1=2*math.pi*(T1-T2)/(1/(r1*hi)+math.log(r2/r2)/k1+math.log(r3/r2)/k2+1/(r3*h0)) # W\n",
+ "Red=Q_by_L-Q_by_L1 #Reduciton in heat loss in [W/m]\n",
+ "percent_red=(Red/Q_by_L)*100 #% Reduction in heat loss\n",
+ "\n",
+ "#Result\n",
+ "print\"Ans (a) Heat loss=\",round(Q_by_L,2),\"W/m \"\n",
+ "print\"Ans (b) Percent reduction in heat loss is\",round(percent_red,1),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ans (a) Heat loss= 321.94 W/m \n",
+ "Ans (b) Percent reduction in heat loss is 77.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.32,Page no:2.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine: i-Heat flux across the layers and\n",
+ "#ii-Interfacial temperature between the layers\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=798.0 #K\n",
+ "T2=298.0 #K\n",
+ "x1=0.02 #m\n",
+ "x2=x1 #m\n",
+ "k1=60.0 #W/m.K\n",
+ "k2=0.1 #W/m.K\n",
+ "hi=100.0 #W/sq m.K\n",
+ "h0=25.0 #W/sq m.K\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_A=(T1-T2)/(1.0/hi+x1/k1+x2/k2+1.0/h0) #W/sq m\n",
+ "#If Tis the interfacial temperature between steel plate and insulating material\n",
+ "#Q_by_A=(T-T2)/(x2/k2+1/h0)\n",
+ "T=Q_by_A*(x2/k2+1.0/h0)+T2\n",
+ "\n",
+ "#Result\n",
+ "print\"Ans (i)- Heat flux across the layers is\",round(Q_by_A),\"W/sq m\" \n",
+ "print\"Ans-(ii)-Interfacial temperature between layers is\",round(T,1),\"K(\",round(T-273,1),\"degree C)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ans (i)- Heat flux across the layers is 1997.0 W/sq m\n",
+ "Ans-(ii)-Interfacial temperature between layers is 777.4 K( 504.4 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.33,Page no:2.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine Temperature at the outer surface of wall and convective conductance on the outer wall\n",
+ " \n",
+ " \n",
+ "#Variable declaration \n",
+ "T1=2273 #Temperature of hot gas:[K]\n",
+ "T4=318 #Ambient aur temperature[K]\n",
+ "Qr1_by_A=23260 #Heat flow by radiation from gases to inside surface of wall[W/sq m]\n",
+ "hi=11.63 #Heat transfer coefficient on inside wall:[W/sq m.K]\n",
+ "K=58 #Thermal conductivity of wall[W.sq m/K]\n",
+ "Qr4_by_A=9300 #Heat flow by radiation from external surface to ambient[W/sq m]\n",
+ "T2=1273 #Inside Wall temperature[K]\n",
+ "Qr1=Qr1_by_A #W for\n",
+ "A=1 #sq m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Qc1_by_A=hi*(T1-T2) #W/sq m\n",
+ "Qc1=Qc1_by_A #for A=1 sq m\n",
+ " #Thermal resistance:\n",
+ "R=1.0/K #K/W per sq m\n",
+ "#Now Q=(T2-T3)/R,i.e \n",
+ "#External wall temp T3=T2-Q*R\n",
+ "#Q entering wall=\n",
+ "Q_enter=Qr1+Qc1 #W\n",
+ "T3=T2-Q_enter*R #K\n",
+ "T3=673 #Approximate\n",
+ "#Heat loss due to convection:\n",
+ "Qc4_by_A=Q_enter-Qr4_by_A #W/sq m\n",
+ "#Qc4_by_A=h0*(T3-T4)\n",
+ "#or h0=Qc4_by_A/(T3-T4)\n",
+ "h0=Qc4_by_A/(T3-T4) #W/sq m.K\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Convective conductance is:\",round(h0,1),\"W/m^2.K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Convective conductance is: 72.1 W/m^2.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.34,Page no:2.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Critical radius of insulation\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=473 #[K]\n",
+ "T2=293 #[K]\n",
+ "k=0.17 #W/(m.K)\n",
+ "h=3 #W/(sq m.K)\n",
+ "h0=h #W/sq m.K\n",
+ "rc=k/h #m\n",
+ "r1=0.025 #Inside radius of insulaiton [mm] \n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "q_by_l1=2*math.pi*(T1-T2)/(math.log(rc/r1)/k+1/(rc*h0)) #Heat transfer with insulation in W/m\n",
+ "#Without insulation:\n",
+ "q_by_l2=h*2*math.pi*r1*(T1-T2) #W/m\n",
+ "inc=(q_by_l1-q_by_l2)*100/q_by_l2 #Increase of heat transfer\n",
+ "k=0.04 #Fibre glass insulaiton W/(sq m.K)\n",
+ "rc=k/h #Critical radius of insulaiton\n",
+ "\n",
+ "#Result\n",
+ "print\"When covered with insulation:\\nHeat loss=\",round(q_by_l1,1),\"W\"\n",
+ "print\"When without insulation,\\nHeat loss=\",round(q_by_l2,1),\"W\"\n",
+ "print\"\\nPercent increase =\",round(inc,2),\"percent\" \n",
+ "print\"In this case the value of rc=\",round(rc,4),\"m is less than the outside radius of pipe (\",r1,\"m)\"\n",
+ "print\"So additon of any fibre glass would cause a decrease in the heat transfer\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When covered with insulation:\n",
+ "Heat loss= 105.7 W\n",
+ "When without insulation,\n",
+ "Heat loss= 84.8 W\n",
+ "\n",
+ "Percent increase = 24.66 percent\n",
+ "In this case the value of rc= 0.0133 m is less than the outside radius of pipe ( 0.025 m)\n",
+ "So additon of any fibre glass would cause a decrease in the heat transfer\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.36,Page no:2.61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the heat loss per metre of pipe and outer surface temperature\n",
+ "\n",
+ "#Variable declaration\n",
+ "import math\n",
+ "k=1.0 #Thermal conductivity in [W/sq m.K]\n",
+ "h=8.0 #Het transfer coeff in W/sq m.K\n",
+ "rc=k/h #Critical radius in m\n",
+ "T1=473.0 #K\n",
+ "T2=293.0 #K\n",
+ "r1=0.055 #Outer radius =inner radius in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_L=2*math.pi*(T1-T2)/(math.log(rc/r1)/k+1.0/(rc*h))\n",
+ "#For outer surface\n",
+ "#Q_by_L=2*math.pi*(T-T2)/(1/rc*h)\n",
+ "# implies that, T=T2+Q_by_L/(rc*2*math.pi)\n",
+ "T=T2+Q_by_L/(rc*2*math.pi*h) #K\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per meter of pipe is\",round(Q_by_L),\"W/m(approx)\"\n",
+ "print\"Outer surface temperature is: \",round(T,1),\"K(\",round(T-273,1),\"degree C)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per meter of pipe is 621.0 W/m(approx)\n",
+ "Outer surface temperature is: 391.8 K( 118.8 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.37,Page no:2.78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the time required for a ball to attain a temperature of 423 K\n",
+ "\n",
+ "#Variable declaration\n",
+ "k_steel=35.0 #W/m.K\n",
+ "Cp_steel=0.46 #kJ/(kg*K)\n",
+ "Cp_steel=Cp_steel*1000 #J/(kg*K)\n",
+ "h=10 #W/sq m.K\n",
+ "rho_steel=7800.0 #kg/cubic m\n",
+ "dia=50.0 #mm\n",
+ "dia=dia/1000 #m\n",
+ "R=dia/2 #radius in m\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "A=4*math.pi*R**2 #Area in sq m\n",
+ "V=A*R/3 #Volume in cubic meter\n",
+ "Nbi=h*(V/A)/k_steel\n",
+ "#As Nbi<0.10,internal temp gradient is negligible\n",
+ "T=423.0 #K\n",
+ "T0=723.0 #K\n",
+ "T_inf=373.0 #K\n",
+ "#(T-T_inf)/(T0-T_inf)=e**(-h*At/rho*Cp*V)\n",
+ "t=-rho_steel*Cp_steel*R*math.log((T-T_inf)/(T0-T_inf))/(3*h) #s\n",
+ "\n",
+ "#Result\n",
+ "print\"Time required for a ball to attain a temperature of 423 K is\",round(t),\"s=\",round(t/3600,2),\"h\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time required for a ball to attain a temperature of 423 K is 5818.0 s= 1.62 h\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.38,Page no:2.78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Time take in Steel ball quenched\n",
+ "\n",
+ "#Variable declaration\n",
+ "dia=50.0 #mm\n",
+ "dia=dia/1000 #m\n",
+ "r=dia/2 #radius in m\n",
+ "h=115.0 #W/sq m.K\n",
+ "rho=8000.0 #kg/cubic m\n",
+ "Cp=0.42 #kJ/kg.K\n",
+ "Cp=Cp*1000 #J/(kg*K)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "A=4*math.pi*r**2 #Area in sq m\n",
+ "V=A*r/3 #Volume in cubic m\n",
+ "T=423.0 #K\n",
+ "T_inf=363.0 #K\n",
+ "T0=723 #K\n",
+ "#(T-T_inf)/(T0-T_inf)=e**(-3ht/(rho*Cp*r))\n",
+ "t=-rho*Cp*r*math.log((T-T_inf)/(T0-T_inf))/(3*h) #Time in seconds\n",
+ "\n",
+ "#Result\n",
+ "print\"Time taken by centre of ball to reach a temperature of 423 K is\",round(t,2),\"s or\",round(t/60,2),\"minutes\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time taken by centre of ball to reach a temperature of 423 K is 436.25 s or 7.27 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.39,Page no:2.79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#HT in a Ball plunged in a medium\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=11.36 #W/sq m.K\n",
+ "k=43.3 #w/(m.K)\n",
+ "r=25.4 #radius in mm\n",
+ "r=r/1000 # radius in m\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "A=4*math.pi*r**2 #Area of sphere [sq m]\n",
+ "V=A*r/3 #Volume in [cubic m]\n",
+ "rho=7849.0 #kg/cubic m\n",
+ "Cp=0.4606*10**3 #J/kg.K\n",
+ "t=1.0 #hour\n",
+ "t=t*3600 #seconds\n",
+ "T_inf=394.3 #[K]\n",
+ "T0=700.0 #[K]\n",
+ "# (T-T_inf)/(T0-T_inf)=e**(-3*h*t/rho*Cp*V)\n",
+ "T=T_inf+(T0-T_inf)*(math.exp((-h*A*t)/(rho*Cp*V))) \n",
+ "\n",
+ "#Result\n",
+ "print\"Temperature of ball after 1 h=\",round(T),\"K (\",round(T-273),\"degree C)(APPROXIMATE)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of ball after 1 h= 475.0 K ( 202.0 degree C)(APPROXIMATE)\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.40,Page no:2.80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Slab temperature suddenly lowered\n",
+ "\n",
+ "#Variable declaration\n",
+ "import math\n",
+ "rho=9000.0 #kg/cubic m\n",
+ "Cp=0.38 #kJ/(kg.K)\n",
+ "Cp=Cp*1000 #J/(kg.K)\n",
+ "k=370.0 #W/m.K\n",
+ "h=90.0 #W/sq m.K\n",
+ "l=400.0 #mm\n",
+ "l=l/1000 #length of copper slab\n",
+ "t=5.0/1000 #thickness in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "A=2*l**2 #Area of slab\n",
+ "V=t*l**2 #Volume in [cubic m]\n",
+ "L_dash=V/A #[m]\n",
+ "#for slab of thickness 2x\n",
+ "#L_dash=x\n",
+ "L_dash=0.025 #[m]\n",
+ "Nbi=h*L_dash/k #< 0.10\n",
+ "var=h*A/(rho*Cp*V)\n",
+ "#As Nbi<0.10,we can apply lumped capacity analysis\n",
+ "T=363.0 #[K]\n",
+ "T_inf=303.0 #[K]\n",
+ "T0=523.0 #[K]\n",
+ "t=-(math.log((T-T_inf)/(T0-T_inf)))/var\n",
+ "\n",
+ "#Result\n",
+ "print\"Time at which slab temperature becomes 363 K is\",round(t,1),\"s\"\n",
+ "print\"CALCULATION MISTAKE IN BOOK IN LAST LINE\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time at which slab temperature becomes 363 K is 123.4 s\n",
+ "CALCULATION MISTAKE IN BOOK IN LAST LINE\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.41,Page no:2.80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Flow over a flat plate\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=9000.0 #kg/cubic meter\n",
+ "Cp=0.38 #kJ/(kg.K)\n",
+ "Cp=Cp*1000 #J/kg.K\n",
+ "k=370.0 #W/(m.K)\n",
+ "T0=483.0 #K\n",
+ "T_inf=373.0 #K\n",
+ "delta_T=40.0 #K\n",
+ "\n",
+ "#Calculation\n",
+ "T=T0-delta_T #K\n",
+ "t=5.0 #time in [minutes]\n",
+ "t=t*60 #[seconds]\n",
+ "#A=2A.....Two faces\n",
+ "#V=A.2x\n",
+ "#2x=thickness of slab=30 mm=0.03 m\n",
+ "x=0.015 #[m]\n",
+ "th=2*x #thickness of slab\n",
+ "h=-rho*Cp*x*math.log((T-T_inf)/(T0-T_inf))/t\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transfer coefficient is:\",round(h,1),\"W/(m^2.K)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer coefficient is: 77.3 W/(m^2.K)\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.42,Page no:2.81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#TIme required in Stainless steel rod immersed in water\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=7800.0 #[kg per cubic m]\n",
+ "h=100.0 #W/(sq m.K) Convective heat transfer coeff\n",
+ "Cp=460.0 #J/(kg.K)\n",
+ "k=40.0 #W/(m.K)\n",
+ "L=1.0 #[m] length ofrod\n",
+ "D=10.0 #mm \n",
+ "D=D/1000 #diameter in[m]\n",
+ "R=D/2 #raidus in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#For cylindrical rod:\n",
+ "A=2*math.pi*R*L #Area in [sq m]\n",
+ "V=math.pi*R**2*L #Volume in [cubic m]\n",
+ "L_dash=V/A #[m]\n",
+ "Nbi=h*L_dash/k #Biot number\n",
+ "#N_bi<0.10,Hence lumped heat capavity is possible\n",
+ "T=473.0 #[K] \n",
+ "T_inf=393.0 #[K]\n",
+ "T0=593.0 #[K]\n",
+ "t=-rho*Cp*V*math.log((T-T_inf)/(T0-T_inf))/(h*A)\n",
+ "\n",
+ "#Result\n",
+ "print\"Time required to reach temperature\",T,\"K is\",round(t,1),\"s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time required to reach temperature 473.0 K is 82.2 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.43,Page no:2.82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Time constant of Chromel alumel thermocouple \n",
+ "\n",
+ "#Variable declaration\n",
+ "import math\n",
+ "rho=8600.0 #[kg/cubic m]\n",
+ "Cp=0.42 #kJ/(kg.K)\n",
+ "Cp=Cp*1000 #J/(kg.K)\n",
+ "dia=0.71 #[mm]\n",
+ "dia=dia/1000 #[dia in m]\n",
+ "R=dia/2 #radius [m]\n",
+ "h=600.0 #convective coeff W/(sq m.K)\n",
+ "\n",
+ "#Calculation\n",
+ "#Let length =L=1\n",
+ "L=1.0 #[m]\n",
+ "A=2*math.pi*R*L \n",
+ "V=math.pi*(R**2)*L \n",
+ "tao=(rho*Cp*V)/(h*A) \n",
+ "#at1\n",
+ "t=tao\n",
+ "#From (T-T_inf)/(T0-T_inf)=e**(-t/tao)\n",
+ "ratio=math.exp(-t/tao) #Ratio of thermocouple difference to initial temperature difference\n",
+ "print\"Time constant of the thermocouple is\",round(tao,3),\"s\" \n",
+ "print\"At the end of the time period t=tao=\",round(tao,3),\"s\"\n",
+ "print\"Temperature difference b/n the thermocouple and the gas stream would be\",round(ratio,3),\"of the initial temperature difference\"\n",
+ "print\"It should be reordered after\",round(4*tao),\"s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time constant of the thermocouple is 1.069 s\n",
+ "At the end of the time period t=tao= 1.069 s\n",
+ "Temperature difference b/n the thermocouple and the gas stream would be 0.368 of the initial temperature difference\n",
+ "It should be reordered after 4.0 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.44,Page no:2.83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Thermocouple junction\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=8000.0 #kg/cubic m\n",
+ "Cp=420.0 #J/(kg.K)\n",
+ "h_hot=60.0 # for hot stream W/(sq m.K) \n",
+ "dia=4.0 #[mm]\n",
+ "t=10.0 \n",
+ "\n",
+ "#Calculation\n",
+ "r=dia/(2.0*1000) #radius in [m]\n",
+ "#For sphere\n",
+ "V=(4.0/3.0)*math.pi*r**3 #Volume in [cubic m]\n",
+ "A=4*math.pi*r**2 #Volume in [sq m]\n",
+ "tao=rho*Cp*V/(h_hot*A) # Time constant in [s]\n",
+ "ratio=math.exp(-t/tao) # %e**(-t/tao)=(T-T-inf)/(T0-T_inf)\n",
+ "T_inf=573.0 #[K]\n",
+ "T0=313.0 #[K]\n",
+ "T=T_inf+ratio*(T0-T_inf)\n",
+ "#IN STILL AIR:\n",
+ "h_air=10.0 #W/(sq m .K)\n",
+ "tao_air=rho*Cp*V/(h_air*A) #[s]\n",
+ "t_air=20.0 #[s]\n",
+ "ratio_air=math.exp(-t_air/tao_air)\n",
+ "T_inf_air=303.0 #[K]\n",
+ "T0_air=T \n",
+ "T_air=T_inf_air+ratio_air*(T0_air-T_inf_air)\n",
+ "\n",
+ "#Result\n",
+ "#ANS-[i]\n",
+ "print\"Time constant of thermocouple is\",round(tao,2),\"s\"\n",
+ "#ANS-[ii]\n",
+ "print\"Temperature attained by junction 20 s after removing from the hot air stream is:\",round(T_air),\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time constant of thermocouple is 37.33 s\n",
+ "Temperature attained by junction 20 s after removing from the hot air stream is: 368.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 85
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.45,Page no:2.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Batch reactor time taken \n",
+ "from scipy.optimize import fsolve\n",
+ "from scipy import integrate\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "T_inf=390.0 #[K]\n",
+ "U=600.0 #[W/sq m.K]\n",
+ "Ac=1.0 #[sq m]\n",
+ "Av=10.0 #Vessel area in [sq m]\n",
+ "m=1000.0 #[kg]\n",
+ "Cp=3.8*10**3 #[J/kg.K]\n",
+ "To=290.0 #[K]\n",
+ "T=360.0 #[K]\n",
+ "h=8.5 #[W/sq m.K]\n",
+ "\n",
+ "#Calculation\n",
+ "#Heat gained from the steam=Rate of increase of internal energy\n",
+ "#U*A*(T_inf-T)=m*Cp*dT\n",
+ "def f(t):\n",
+ " x=math.log((T_inf-To)/(T_inf-T))-U*Ac*t/(m*Cp) \n",
+ " return(x)\n",
+ "t=fsolve(f,1) #[in s]\n",
+ "t=round(t) #[in s]\n",
+ "Ts=290 \n",
+ "print\"Time taken to heat the reactants over the same temperature range is\",t,\"s\"\n",
+ "def g(T):\n",
+ " t1=m*Cp/(U*Ac*(T_inf-T)-h*Av*(T-Ts))\n",
+ " return(t1)\n",
+ "t1= integrate.quad(g,To,T)\n",
+ "def fx(Tmax):\n",
+ " m=U*Ac*(T_inf-Tmax)-h*Av*(Tmax-Ts)\n",
+ " return(m)\n",
+ "T_max=fsolve(fx,1)\n",
+ "\n",
+ "#Result\n",
+ "print\"In CASE 1\\nTime taken to heat the reactants =\",t,\"s .ie\",round(t/3600,2),\"h\" \n",
+ "print\"In CASE 2 \\nTime taken to heat the reactants =\",round(t1[0]),\"s\"\n",
+ "print\"Maximum temperature at which temperature can be raised is\",round(T_max,1),\"K\" \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time taken to heat the reactants over the same temperature range is 7625.0 s\n",
+ "In CASE 1\n",
+ "Time taken to heat the reactants = 7625.0 s .ie 2.12 h\n",
+ "In CASE 2 \n",
+ "Time taken to heat the reactants = 8905.0 s\n",
+ "Maximum temperature at which temperature can be raised is 377.6 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 92
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.46,Page no:2.95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat dissipation by aluminium rod \n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "dia=3.0 #[mm]\n",
+ "dia=dia/1000 #[m]\n",
+ "r=dia/2 #radius in[m]\n",
+ "k=150 #W/(m.K)\n",
+ "h=300 #W/(sq m.K)\n",
+ "T0=413 #[K]\n",
+ "T_inf=288 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*(r**2) #Area in [sq m]\n",
+ "P=math.pi*dia #[W/sq m.K]\n",
+ "Q=(T0-T_inf)*math.sqrt(h*P*k*A) #Heat dissipated in [W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat dissipated by the rod is\",round(Q,3),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat dissipated by the rod is 6.844 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 94
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.47,Page no:2.96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Aluminium fin efficiency\n",
+ "#Variable declaration\n",
+ "k=200.0 #W/(m.K)\n",
+ "h=15.0 #W/(sq m.K)\n",
+ "T0=523.0 #[K]\n",
+ "T_inf=288.0 #[K]\n",
+ "theta_0=T0-T_inf \n",
+ "dia=25.0 #diameter[mm]\n",
+ "dia=dia/1000 #diameter[m]\n",
+ "r=dia/2 #radius in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "P=math.pi*dia #[m]\n",
+ "A=math.pi*r**2 #[sq m]\n",
+ "#For insulated fin:\n",
+ "m=math.sqrt(h*P/(k*A))\n",
+ "L=100.0 #length of rod in [mm]\n",
+ "L=L/1000 #length of rod in [m]\n",
+ "Q=theta_0*math.tanh(m*L)*math.sqrt(h*P*k*A) #Heat loss \n",
+ "nf=math.tanh(m*L)/(m*L) #Fin efficiency for insulated fin\n",
+ "#At the end of the fin: theta/theta_0=(cosh[m(L-x)]/cosh(mL))\n",
+ "#at x=L, theta/theta_0=1/(cosh(mL)\n",
+ "T=T_inf+(T0-T_inf)*(1/math.cosh(m*L)) #[K]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "#ANSWER-1\n",
+ "print\"Heat loss by the insulated rod is\",round(Q,1),\"W\"\n",
+ "#ANSWER-2\n",
+ "print\"Fin efficiency is\",round(nf*100,1),\"percent\"\n",
+ "#ANSWER-3\n",
+ "print\"Temperature at the end of the fin is\",round(T,1),\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss by the insulated rod is 26.6 W\n",
+ "Fin efficiency is 96.2 percent\n",
+ "Temperature at the end of the fin is 509.6 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.49,Page no:2.98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding effective Pin fins\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=300.0 #W/(m.K)\n",
+ "h=20.0 #W.(sq m.K)\n",
+ "P=0.05 #[m]\n",
+ "A=2.0 #[sq cm]\n",
+ "A=A/10000 #[sq m]\n",
+ "T0=503.0 #[K]\n",
+ "T_inf=303.0 #[K]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "theta_0=T0-T_inf #[K]\n",
+ "import math\n",
+ "m=math.sqrt(h*P/(k*A))\n",
+ "\n",
+ "#CASE 1: 6 Fins of 100 mm length\n",
+ "L1=0.1 #Length of fin in [m]\n",
+ "Q=math.sqrt(h*P*k*A)*theta_0*math.tanh(m*L1) #[W]\n",
+ "#For 6 fins\n",
+ "Q=Q*6 #for 6 fins [W]\n",
+ "\n",
+ "#CASE 2: 10 fins of 60 mm length\n",
+ "L2=60.0 #[mm]\n",
+ "L2=L2/1000 #[m]\n",
+ "Q2=math.sqrt(h*P*k*A)*theta_0*math.tanh(m*L2) #[W]\n",
+ "Q2=Q2*10 #For 10 fins\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"As,Q for 10 fins of 60 mm length(\",round(Q2,2),\"W) is more than Q for 6 fins of 100 mm length (\",round(Q,2),\"W)\"\n",
+ "print\"The agreement-->10 fins of 60 mm length is more effective\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As,Q for 10 fins of 60 mm length( 117.66 W) is more than Q for 6 fins of 100 mm length ( 113.75 W)\n",
+ "The agreement-->10 fins of 60 mm length is more effective\n"
+ ]
+ }
+ ],
+ "prompt_number": 101
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.50,Page no:2.98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Metallic wall surrounded by oil and water \n",
+ "#Variable declaration\n",
+ "h_oil=180.0 #W/(sq m.K)\n",
+ "h_air=15.0 #W/(sq m.K)\n",
+ "T_oil=353.0 #[K]\n",
+ "T_air=293.0 #[K]\n",
+ "delta_T=T_oil-T_air #[K]\n",
+ "k=80.0 #Conductivity in [W/(m.K)]\n",
+ "for_section=11.0*10**-3 #[m]\n",
+ "L=25.0 #[mm]\n",
+ "L=L/1000 #[m]\n",
+ "W=1.0 #[m] Width,..let\n",
+ "t=1.0 #[mm] \n",
+ "t=t/1000 #[m]\n",
+ "A=W*t #[m]\n",
+ "P=2*t\n",
+ "Af=2*L*W #sq m\n",
+ "N=1.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "import math\n",
+ "Ab=for_section-A #[sq m]\n",
+ "#CASE 1: Fin on oil side only\n",
+ "m=math.sqrt(h_oil*P/(k*A)) \n",
+ "nf_oil=math.tanh(m*L)/(m*L)\n",
+ "Ae_oil=Ab+nf_oil*Af*N #[sq m]\n",
+ "Q1=delta_T/(1/(h_oil*Ae_oil)+1/(h_air*for_section)) #[W]\n",
+ "#CASE 2: Fin on air side only\n",
+ "m=math.sqrt(h_air*P/(k*A))\n",
+ "nf_air=math.tanh(m*L)/(m*L)\n",
+ "nf_air=0.928 #Approximation\n",
+ "Ae_air=Ab+nf_air*Af*N #[sq m]\n",
+ "Q=delta_T/(1.0/(h_oil*for_section)+1.0/(h_air*Ae_air)) #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"In oil side,Q=\",round(Q1,2),\"W\"\n",
+ "print\"In air side,Q=\",round(Q,2),\"W\"\n",
+ "print\"From above results we see that more heat transfer takes place if fins are provided on the air side\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In oil side,Q= 9.75 W\n",
+ "In air side,Q= 35.56 W\n",
+ "From above results we see that more heat transfer takes place if fins are provided on the air side\n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.51,Page no:2.100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Brass wall having fins\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=75.0 #Thermal conductivity [W/(m.K)]\n",
+ "T_water=363.0 #[K]\n",
+ "T_air=303.0 #[K] \n",
+ "dT=T_water-T_air #delta T\n",
+ "h1=150.0 # for water[W/(sq m.K)]\n",
+ "h2=15.0 #for air [W/(sq m.K)]\n",
+ "W=0.5 #Width of wall[m]\n",
+ "L=0.025 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Area=W**2 #Base Area [sq m]\n",
+ "t=1.0 #[mm]\n",
+ "t=t/1000 #[m]\n",
+ "pitch=10.0 #[mm]\n",
+ "pitch=pitch/1000 #[m]\n",
+ "N=W/pitch #[No of fins]\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "A=N*W*t #Total cross-sectional area of fins in [sq m]\n",
+ "Ab=Area-A #[sq m]\n",
+ "Af=2*W*L #Surface area of fins [sq m]\n",
+ "import math\n",
+ "#CASE 1: HEAT TRANSFER WITHOUT FINS\n",
+ "A1=Area #[sq m]\n",
+ "A2=A1 #[sq m]\n",
+ "Q=dT/(1.0/(h1*A1)+1.0/(h2*A2)) #[W]\n",
+ "print\"Without fins,Q=\",round(Q,2),\"W\"\n",
+ "#CASE 2: Fins on the water side\n",
+ "P=2*(t+W) \n",
+ "A=0.5*10**-3 \n",
+ "m=math.sqrt(h1*P/(k*A))\n",
+ "nfw=math.tanh(m*L)/(m*L) #Effeciency on water side\n",
+ "Aew=Ab+nfw*Af*N #Effective area on the water side [sq m]\n",
+ "Q=dT/(1.0/(h1*Aew)+1.0/(h2*A2)) #[W]\n",
+ "print\"With fins on water side,Q=\",round(Q,2),\"W\"\n",
+ "#CASE 3: FINS ON THE AIR SIDE\n",
+ "m=math.sqrt(h2*P/(k*A))\n",
+ "nf_air=tanh(m*L)/(m*L) #Effeciency\n",
+ "Aea=Ab+nf_air*Af*N #Effective area on air side\n",
+ "Q=dT/(1.0/(h1*A1)+1.0/(h2*Aea)) #[W]\n",
+ "print\"With Fins on Air side,Q=\",round(Q,1),\"W\"\n",
+ "#BOTH SIDE:\n",
+ "Q=dT/(1.0/(h1*Aew)+1.0/(h2*Aea)) #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"With Fins on both side,Q=\",round(Q,1),\"W\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Without fins,Q= 204.55 W\n",
+ "With fins on water side,Q= 219.24 W\n",
+ "With Fins on Air side,Q= 800.3 W\n",
+ "With Fins on both side,Q= 1084.7 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 107
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer/Chapter_3.ipynb b/Heat_Transfer/Chapter_3.ipynb
new file mode 100755
index 00000000..f90300e1
--- /dev/null
+++ b/Heat_Transfer/Chapter_3.ipynb
@@ -0,0 +1,3026 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Convection"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.1,Page no:3.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Boundary layer thickness\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=10**-3 #N.s/m**2\n",
+ "#At distance y from surface\n",
+ "#ux=a+by+cy**2+dy**3\n",
+ "#At y=0,ux=0 therefore a=0\n",
+ "#i.e tao=0\n",
+ "#At edge of boundary layer,ie y=del\n",
+ "#ux=u_inf\n",
+ "#At y=o,c=0\n",
+ "#At y=del,ux=b*del+d*del**3\n",
+ "\n",
+ "#Therefore, b=-3*d*del**3\n",
+ "#d=-u_inf/(2*del**2)\n",
+ "#b=3*u_inf/(2*del)\n",
+ "\n",
+ "#For velocity profile,we have:\n",
+ "#del/x=4.64*(Nre_x)**(-1/2)\n",
+ "\n",
+ "#Evaluate N re_x\n",
+ "\n",
+ "x=75.0 #[mm]\n",
+ "x=x/1000 #[m]\n",
+ "u_inf=3.0 #[m/s]\n",
+ "rho=1000.0 #[kg/m**3] for air\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_x=u_inf*rho*x/mu #Reynold number\n",
+ "#Substituting the value,we get\n",
+ "dell=x*4.64*(Nre_x**(-1.0/2.0)) #[m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Boundary layer thickness is del=\",round(dell,6),\"m or \",round(dell*1000,3),\"mm\"\n",
+ "print\"Wrong units in answer of book,m and mm are wrongly interchanged\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boundary layer thickness is del= 0.000734 m or 0.734 mm\n",
+ "Wrong units in answer of book,m and mm are wrongly interchanged\n"
+ ]
+ }
+ ],
+ "prompt_number": 296
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.2,Page no:3.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Boundary layer thickness of plate\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=15*10**-6 #sq m /s\n",
+ "v=2 #m/s\n",
+ "L=2 #[m] length of plate\n",
+ "Nre_x=3*10**5\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "xc=Nre_x*mu/v #critical length at whihc the transition takes place\n",
+ "#Since xc is less than 2 m.Therefore the flow is laminar\n",
+ "#at any distance x,.it is calculated from\n",
+ "#del/x=4.64/(math.sqrt(NRe,x))\n",
+ "#At x=L=2 m\n",
+ "Nre_l=v*L/mu\n",
+ "del_l=4.64*L/math.sqrt(Nre_l)\n",
+ "del_l=del_l*1000 #[mm]\n",
+ "\n",
+ "#Result\n",
+ "print\"Boundary layer thickness at the trailing edge is\",round(del_l),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boundary layer thickness at the trailing edge is 18.0 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 144
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.3,Page no:3.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Thickness of hydrodynamic boundary layer\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=15*10**-6 #Kinematic viscosity in [sq m /s]\n",
+ "x=0.4 #[m]\n",
+ "u_inf=3 #[m/s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#At x=0.4 m,\n",
+ "Nre_x=u_inf*x/mu \n",
+ "import math\n",
+ "dell=4.64*x/math.sqrt(Nre_x) #[m]\n",
+ "dell=dell*1000 #[mm]\n",
+ "Cf_x=0.664/math.sqrt(Nre_x) \n",
+ "\n",
+ "#Result\n",
+ "print\"Since Nre,x(\",Nre_x,\")is Less than 3*10**5,..the boundary layer is laminar\"\n",
+ "print\"Thickness of boundary layer at x=\",x,\"m\",round(dell,2),\"mm\" \n",
+ "print\"Local skin friction coefficient is :\",round(Cf_x,4)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Since Nre,x( 80000.0 )is Less than 3*10**5,..the boundary layer is laminar\n",
+ "Thickness of boundary layer at x= 0.4 m 6.56 mm\n",
+ "Local skin friction coefficient is : 0.0023\n"
+ ]
+ }
+ ],
+ "prompt_number": 146
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.4,Page no:3.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Flat plate boundary layer\n",
+ "\n",
+ "import math\n",
+ "from scipy import integrate\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=1.85*10**-5 #[kg/(m.s)]\n",
+ "P=101.325 #Pressure in [kPa]\n",
+ "M_avg=29.0 #Avg molecular wt of air\n",
+ "R=8.31451 #Gas constant\n",
+ "T=300.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "rho=P*M_avg/(R*T) #[kg/m**3]\n",
+ "u_inf=2.0 #Viscosity in [m/s]\n",
+ "#At x=20 cm =0.2 m\n",
+ "x=0.2 #[m]\n",
+ "Nre_x=rho*u_inf*x/mu #[Reynolds number]\n",
+ "del_by_x=4.64/math.sqrt(Nre_x) #[Boundary layer]\n",
+ "dell=del_by_x*x #[m]\n",
+ "#del=del*1000 #[mm]\n",
+ "\n",
+ "#At\n",
+ "x=0.4 #[m]\n",
+ "Nre_x=(rho*u_inf*x)/mu #<3*10**5\n",
+ "#Boundary layer is laminar\n",
+ "del_by_x=4.64/math.sqrt(Nre_x) \n",
+ "del1=del_by_x*x #[m]\n",
+ "#del1=del1*1000 #[mm]\n",
+ "d=del1-dell #Del \n",
+ "def f(y):\n",
+ " m_dot=u_inf*(1.5*(y/d)-0.5*(y/d)**3)*rho\n",
+ " return(m_dot)\n",
+ "m_dot=integrate.quad(f,0,d)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Boundary layer thickness at distance 20 cm from leading edge is\",round(dell,4),\"m=\",round(dell*1000,1),\"mm\"\n",
+ "print\"Boundary layer thickness at distance 40 cm from leading edge is\",round(del1,4),\"m=\",round(del1*1000,1),\"mm\"\n",
+ "print\"Thus,Mass flow rate entering the boundary layer is\",round(m_dot[0],6),\"kg/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boundary layer thickness at distance 20 cm from leading edge is 0.0058 m= 5.8 mm\n",
+ "Boundary layer thickness at distance 40 cm from leading edge is 0.0082 m= 8.2 mm\n",
+ "Thus,Mass flow rate entering the boundary layer is 0.003547 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 152
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.5,Page no:3.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Rate of heat removed from plate\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=3.9*10**-4 #Kinematic viscosity in sq m/s\n",
+ "k=36.4*10**-3 #Thermal conductivity in W/(m.K)\n",
+ "Npr=0.69\n",
+ "u_inf=8 #[m/s]\n",
+ "L=1 #Lenght of plate in [m]\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_l=u_inf*L/mu \n",
+ "#Since Nre_l is less than 3*10**5 ,the flow is laminar over the entire length of plate\n",
+ "Nnu=0.664*math.sqrt(Nre_l)*Npr**(1.0/3.0) #=hL/k\n",
+ "h=k*Nnu/L #w/sq m.K\n",
+ "h=3.06 #Approximation [W/sq m.K]\n",
+ "T_inf=523 #[K]\n",
+ "Tw=351 #[K]\n",
+ "W=0.3 #Width of plate [m]\n",
+ "A=W*L #Area in [sq m]\n",
+ "Q=h*A*(T_inf-Tw) # Rate of heat removal from one side in [W]\n",
+ "#from two side:\n",
+ "Q2=2*Q #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat removal is\",round(Q,1),\"W\"\n",
+ "print round(Q2,1),\" W heat should be removed continously from the plate\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat removal is 157.9 W\n",
+ "315.8 W heat should be removed continously from the plate\n"
+ ]
+ }
+ ],
+ "prompt_number": 155
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.6,Page no:3.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat removed from plate\n",
+ "\n",
+ "#Variable declaration\n",
+ "P1=101.325 #Pressure in [kPa]\n",
+ "mu1=30.8*10**-6 #Kinematic viscosity in[sq m /s]\n",
+ "k=36.4*10**-3 #[W/(m.K)]\n",
+ "Npr=0.69\n",
+ "u_inf=8 #Velocity in [m/s]\n",
+ "Cp=1.08 #kJ/(kg.K)\n",
+ "L=1.5 #Length of plate in [m]\n",
+ "W=0.3 #Width in [m]\n",
+ "A=L*W #Area in [sq m]\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#At constant temperature: mu1/mu2=P2/P1\n",
+ "P2=8 #[kPa]\n",
+ "mu2=mu1*P1/P2 #Kinematic viscosity at P2 in [sq m/s]\n",
+ "Nre_l=u_inf*L/mu2 #Reynold's no.\n",
+ "#Since this is less than 3*10**5\n",
+ "Nnu=0.664*math.sqrt(Nre_l)*(Npr**(1.0/3.0))\n",
+ "h=Nnu*k/L # Heat transfer coeffficient in [W/sq m.K]\n",
+ "h=round(h,1)\n",
+ "\n",
+ "T_inf=523 #[K]\n",
+ "Tw=353 #[K]\n",
+ "Q=2*h*A*(T_inf-Tw) #Heat removed from both sides in [W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat removed from both sides of plate is\",Q,\"W\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat removed from both sides of plate is 382.5 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 158
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.7,Page no:3.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Local heat transfer coefficient\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=0.998 #kg/cubic m\n",
+ "v=20.76*10**-6 #[sq m/s]\n",
+ "Cp=1.009 #[kJ/kg.K]\n",
+ "k=0.03 #[W/m.K]\n",
+ "u_inf=3 #[m/s]\n",
+ "x=0.4 #[m]\n",
+ "w=1.5 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_x=u_inf*x/v #Reynolds no at x=0.4 m\n",
+ "#Since this is less than 3*10**5.The flow is laminar upto x=0.4 m\n",
+ "mu=rho*v #[kg/(m.s)]\n",
+ "import math\n",
+ "Cp=1.009 #[kJ/kg.K]\n",
+ "Cp=Cp*1000 #[J/kg.K]\n",
+ "k=0.03 #W/(m.K)\n",
+ "Npr=Cp*mu/k\n",
+ "Nnu_x=0.332*(math.sqrt(Nre_x))*(Npr**(1.0/3.0))\n",
+ "hx=Nnu_x*k/x #[W/(m.K)]\n",
+ "#Average value is twice this value\n",
+ "h=round(2*hx,1) #[W/(m.K)]\n",
+ "A=x*w #Area in [sq m]\n",
+ "Tw=407 #[k]\n",
+ "T_inf=293 #[K]\n",
+ "Q=h*A*(Tw-T_inf) #[W]\n",
+ "#From both sides of the plate:\n",
+ "Q=2*Q #[W]\n",
+ "#Result\n",
+ "print\"The heat transferred from both sides of the plate is\",round(Q),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transferred from both sides of the plate is 1450.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 160
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.8,Page no:3.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Width of plate\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=0.998 #[kg/cubic m]\n",
+ "v=20.76*10**-6 #[sq m/s]\n",
+ "k=0.03 #[W/m.K]\n",
+ "Npr=0.697\n",
+ "x=0.4 #[m] from leading edge of the plate\n",
+ "u_inf=3 #[m/s]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_x=u_inf*x/v #Reynold numebr at x=0.40 m\n",
+ "#Since this is less than 3*10**5 \n",
+ "#therefore flow is laminar and \n",
+ "Nnu_x=0.332*math.sqrt(Nre_x)*(Npr**(1.0/3.0)) \n",
+ "hx=Nnu_x*k/x #[W/sq m.K]\n",
+ "#Average heat tarnsfer coefficient is twice this value\n",
+ "h=2*hx #[W/sq m.K]\n",
+ "#Given:\n",
+ "Q=1450 #[W]\n",
+ "Tw=407 #[K]\n",
+ "T_inf=293 #[K]\n",
+ "L=0.4 #[m]\n",
+ "#Q=h*w*L*(Tw-T_inf)\n",
+ "#L=Q/(h*w*(Tw-T_inf))\n",
+ "w=Q/(h*L*(Tw-T_inf)) #[m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Width of plate is\",round(w),\"m\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of plate is 3.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 161
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.9,Page no:3.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transferred in flat plate\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=17.36*10**-6 #Viscosity for air [sq m./s]\n",
+ "k=0.0275 #for air ..[W/(m.K)]\n",
+ "Cp=1.006 #[kJ/(kg.K)]\n",
+ "Npr=0.7 #for air\n",
+ "u_inf=2 #[m/s]\n",
+ "x=0.2 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_x=u_inf*x/v #Reynolds number at x=0.2 m\n",
+ "#Since this is less than 3*10**5\n",
+ "import math\n",
+ "Nnu_x=0.332*math.sqrt(Nre_x)*(Npr**(1.0/3.0))\n",
+ "hx=Nnu_x*k/x #[W/(sq m.K]\n",
+ "#Average value of heat transfer coeff is twice this value\n",
+ "h=round(2*hx,1) #[W/sq m.K)]\n",
+ "w=1 #width in [m]\n",
+ "A=x*w #[sq m] Area of plate\n",
+ "Tw=333 #[K]\n",
+ "T_inf=300 #[K]\n",
+ "Q=h*A*(Tw-T_inf) #Heat flow in [W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat flow is :\",Q,\"W\"\n",
+ "#From both sides of plate:\n",
+ "Q=2*Q #[W]\n",
+ "print\"Heat flow from both sides of plate is\",Q,\"W\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flow is : 81.18 W\n",
+ "Heat flow from both sides of plate is 162.36 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 163
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.10,Page no:3.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Rate of heat transferred in turbulent flow\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=16.96*10**-6 #[sq m./s]\n",
+ "rho=1.128 #[kg/cubic m]\n",
+ "Npr=0.699 #Prandtl number\n",
+ "k=0.0276 #[W/m.K]\n",
+ "u_inf=15 #[m/s]\n",
+ "L=0.2 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_l=L*u_inf/v #Reynold's number\n",
+ "import math\n",
+ "\n",
+ "#Since this is less than 3*10**5,the boundary layer is laminar over entire length\n",
+ "Nnu=0.664*math.sqrt(Nre_l)*(Npr**(1.0/3.0))\n",
+ "h=Nnu*k/L #[W/sq m.K]\n",
+ "A=L**2 #Area in [sq m]\n",
+ "Tw=293 #[K]\n",
+ "T_inf=333 #[K]\n",
+ "#Rate of heat transfer from BOTH sides is:\n",
+ "Q=2*h*A*(T_inf-Tw) #[W]\n",
+ "print\"Rate of heat transfer from both sides of plate is\",round(Q,1),\"W\\n\"\n",
+ "#ii-With turbulent boundary layer from the leading edge:\n",
+ "h=k*0.0366*(Nre_l**(0.8))*(Npr**(1.0/3.0))/L #[W/(sq m.K)]\n",
+ "#Heat transfer from both sides is :\n",
+ "Q=2*h*A*(T_inf-Tw) #[W]\n",
+ "print \"With turbulent boundary layer,\\nRate of heat transfer from both sides of the plate=\",round(Q,1)\n",
+ "print\"\\nThese calculations show that the that transfer rate is approximately doubled if boundary layer is turbulent from the leading edge \\n\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer from both sides of plate is 109.4 W\n",
+ "\n",
+ "With turbulent boundary layer,\n",
+ "Rate of heat transfer from both sides of the plate= 226.4\n",
+ "\n",
+ "These calculations show that the that transfer rate is approximately doubled if boundary layer is turbulent from the leading edge \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 165
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.11,Page no:3.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer from plate in unit direction\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=1.906*10**-5 #[kg/(m.s)]\n",
+ "k=0.02723 #W/m.K\n",
+ "Cp=1.007 #[kJ/(kg.K)]\n",
+ "rho=1.129 #[kg/cubic m]\n",
+ "Npr=0.70\n",
+ "Mavg=29\n",
+ "u_inf=35 #[m/s]\n",
+ "L=0.75 #[m]\n",
+ "Tm=313 #[K]\n",
+ "P=101.325 #[kPa]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre_l=rho*u_inf*L/mu #Reynold's number >5*10**5\n",
+ "Nnu=0.0366*Nre_l**(0.8)*Npr**(1.0/3.0) \n",
+ "h=Nnu*k/L #[W/s m.K]\n",
+ "A=1*L #[sq m]\n",
+ "Tw=333 #[K]\n",
+ "T_inf=293 #[K]\n",
+ "Q=h*A*(Tw-T_inf) #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transfer from the plate is\",round(Q,1),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer from the plate is 3179.2 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.12,Page no:3.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat lost by sphere\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=18.23*10**-6 #sq m/s\n",
+ "k=0.02814 #[W/m.K]\n",
+ "D=0.012 #[m]\n",
+ "r=0.006 #[m]\n",
+ "u_inf=4 #[m/s]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre=D*u_inf/v #Reynold's number\n",
+ "Nnu=0.37*Nre**(0.6) \n",
+ "h=Nnu*(k/D) \n",
+ "A=4*math.pi*r**2 #Area of sphere in [sq m]\n",
+ "Tw=350 #[K]\n",
+ "T_inf=300 #[K]\n",
+ "Q=h*A*(Tw-T_inf) #Heat lost by sphere in [W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat lost by sphere is\",round(Q,2),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat lost by sphere is 2.21 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 170
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.13,Page no:3.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat lost by sphere\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=15.69*10**-6 #[sq m./s]\n",
+ "k=0.02624 #[W/m.K]\n",
+ "Npr=0.708 #Prandtl number\n",
+ "mu=2.075*10**-5 #kg/m.s\n",
+ "u_inf=4 #[m/s]\n",
+ "mu_inf=1.8462*10**-5 #[m/s] velocity\n",
+ "Tw=350 #[K]\n",
+ "T_inf=300 #[K]\n",
+ "D=0.012 #[m]\n",
+ "r=D/2 #Radius in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre=u_inf*D/v #Reynold's numbe\n",
+ "Nnu=2+(0.4*Nre**(1.0/2.0)+0.06*Nre**(2.0/3.0))*Npr**(0.4)*(mu_inf/mu)**(1.0/4.0)\n",
+ "h=Nnu*k/D #[W/sq m.K]\n",
+ "import math\n",
+ "A=4*math.pi*r**2 #Area in [sq m]\n",
+ "Q=h*A*(Tw-T_inf) \n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Heat lost by the sphere is\",round(Q,3),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Heat lost by the sphere is 1.554 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 171
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.14,Page no:3.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Percent power lost in bulb\n",
+ "#Variable declaration\n",
+ "v=2.08*10**-5 #[sq m/s]\n",
+ "k=0.03 #W/(m.K)\n",
+ "Npr=0.697 #Prandtl number\n",
+ "D=0.06 #[m]\n",
+ "u_inf=0.3 #[m/s]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre=D*u_inf/v #Reynolds number\n",
+ "#Average nusselt number is given by:\n",
+ "Nnu=0.37*(Nre**0.6) \n",
+ "h=Nnu*k/D #W/sq m.K\n",
+ "Tw=400 #[K]\n",
+ "T_inf=300 #[K]\n",
+ "D=0.06 #[m]\n",
+ "r=0.03 #[m]\n",
+ "import math\n",
+ "A=4*math.pi*r**2 #Area in [sq m]\n",
+ "Q=h*A*(Tw-T_inf) #[W]\n",
+ "per=Q*100/100 #Percent of heat lost by forced convection\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transfer rate is\",round(Q,2),\"W,And percentage of power lost by convection is:\",round(per,2),\"%\" \n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer rate is 12.1 W,And percentage of power lost by convection is: 12.1 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 172
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.15,Page no:3.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Heat lost by cylinder \n",
+ "u_inf=50 #velocity in [m/s]\n",
+ "mu=2.14*10**-5 #[kg/(m.s)]\n",
+ "rho=0.966 #[kg/cubic m]\n",
+ "k=0.0312 #[W/(m.K)]\n",
+ "Npr=0.695 #Prandtl number\n",
+ "D=0.05 #Diameter in [m]\n",
+ "Nre=D*u_inf*rho/mu #Reynold's number\n",
+ "Nnu=0.0266*Nre**0.805*Npr**(1.0/3.0) \n",
+ "h=round(Nnu*k/D,1) #W/sq m.K\n",
+ "Tw=423 #[K]\n",
+ "T_inf=308 #[K]\n",
+ "import math\n",
+ "#Heat loss per unit length is :\n",
+ "Q_by_l=h*math.pi*D*(Tw-T_inf) #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat lost per unit length of cylinder is\",round(Q_by_l),\"W\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat lost per unit length of cylinder is 3102.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 181
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.16,Page no:3.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer in tube\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=20.92*10**-6 #sq m/s\n",
+ "k=3.0*10.0**-2 #W/(m.K)\n",
+ "Npr=0.7\n",
+ "u_inf=25.0 #[m/s]\n",
+ "d=50.0 #[mm]\n",
+ "d=d/1000 #[m]\n",
+ "Nre=u_inf*d/v #Reynold's number\n",
+ "Tw=397.0 #[K]\n",
+ "T_inf=303.0 #[K]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#Case 1: Circular tube\n",
+ "Nnu=0.0266*Nre**(0.805)*Npr**(1.0/3.0) \n",
+ "h=Nnu*k/d #[W/sq m.K]\n",
+ "A=math.pi*d #Area in [sq m]\n",
+ "Q=h*A*(Tw-T_inf) #[W]\n",
+ "Q_by_l1=h*math.pi*d*(Tw-T_inf) #[W/m]\n",
+ "\n",
+ "#Case 2:Square tube\n",
+ "A=50.0*50.0 #Area in [sq mm]\n",
+ "P=2.0*(50.0+50.0) #Perimeter [mm]\n",
+ "l=4.0*A/P #[mm]\n",
+ "l=l/1000 #[m]\n",
+ "Nnu=0.102*(Nre**0.675)*(Npr**(1.0/3.0))\n",
+ "h=Nnu*k/d #W/(sq m.K)\n",
+ "A=4*l*l #[sq m]\n",
+ "\n",
+ "Q=h*A*(Tw-T_inf)\n",
+ "Q_by_l2=Q/l #[W/m]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Rate of heat flow from the circular pipe is\",round(Q_by_l1,1),\"W/m\" \n",
+ "print\"Rate of heat flow from the square pipe=\",round(Q_by_l2,1),\"W/m\"\n",
+ "print\"Hence rate of heat flow from square pipe is more than that from circular pipe\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat flow from the circular pipe is 1464.2 W/m\n",
+ "Rate of heat flow from the square pipe= 1711.2 W/m\n",
+ "Hence rate of heat flow from square pipe is more than that from circular pipe\n"
+ ]
+ }
+ ],
+ "prompt_number": 186
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Example no:3.17,Page no:3.63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Heat transfer coefficient\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=0.8 #Viscosity of flowing fluid [N.s/sq m]\n",
+ "rho=1.1 #Density of flowinf fluid [g/cubic cm]\n",
+ "rho=rho*1000 #Density in [kg/cubic m]\n",
+ "Cp=1.26 #Specific heat [kJ/kg.K]\n",
+ "Cp=Cp*10**3 # in[J/(kg.K)]\n",
+ "k=0.384 #[W/(m.K)]\n",
+ "mu_w=1.0 #Viscosity at wall temperature [N.s/sq m]\n",
+ "L=5.0 #[m]\n",
+ "vfr=300.0 #Volumetric flow rate in [cubic cm/s]\n",
+ "vfr=vfr*10.0**-6 #[cubic m/s]\n",
+ "mfr=vfr*rho #Mass flow rate of flowinf fluid [kg/s]\n",
+ "Di=20.0 #Inside diameter in[mm]\n",
+ "Di=Di/1000 #[m]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "Area=(math.pi/4)*Di**2 #Area of cross-section [sq m]\n",
+ "u=vfr/Area #Veloctiy in [m/s]\n",
+ "Nre=Di*u*rho/mu #Reynold's number\n",
+ "#As reynold's number is less than 2100,he flow is laminar\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "Nnu=1.86*(Nre*Npr*Di/L)**(1.0/3.0)*(mu/mu_w)**(0.14)\n",
+ "hi=Nnu*k/Di #inside heat transfer coefficient [W/sq m.K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Inside heat transfer coefficient is\",round(hi),\"W/(sq m.K)\"\n",
+ "#Note:\n",
+ "print\"NOTE:The answer given in book..ie 1225 is wrong.please redo the calculation of last line manually to check\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inside heat transfer coefficient is 225.0 W/(sq m.K)\n",
+ "NOTE:The answer given in book..ie 1225 is wrong.please redo the calculation of last line manually to check\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 188
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.18,Page no:3.64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer coefficient in heated tube\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=5500.0 #Mass flow rate in [kg/h]\n",
+ "m=m/3600.0 #[kg/s]\n",
+ "rho=1.07 #Density of fluid in [g/cm**3]\n",
+ "rho=rho*1000 #[kg/m**3]\n",
+ "vfr=m/rho #Volumetric flow rate in [m**3/s]\n",
+ "Di=40.0 #Diameter of tube [mm]\n",
+ "Di=Di/1000 #[m]\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "A=(math.pi/4)*Di**2 #Area of cross-section in [sq m]\n",
+ "u=vfr/A #Velocity of flowing fluid [m/s]\n",
+ "rho=1070.0 #Density in [kg/m**3]\n",
+ "mu=0.004 #Viscosity in [kg/m.s]\n",
+ "Nre=Di*u*rho/mu\n",
+ "Nre=12198.0 #Approx\n",
+ "#Since this reynold's number is less than 10000,the flow is turbulent\n",
+ "Cp=2.72 #Specific heat in [kJ/kg.K]\n",
+ "Cp=Cp*10**3 #Specific heat in [J/kg.K]\n",
+ "k=0.256 #thermal conductivity in [W/m.K]\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**0.4) #Nusselt number\n",
+ "hi=k*Nnu/Di #Inside heat transfer coefficient in [W/m**2.K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Inside heat transfer coefficient is \",round(hi,1),\"W/sq m.K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inside heat transfer coefficient is 1225.4 W/sq m.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 189
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.19,Page no:3.66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#h of water flowing in tube\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=984.1 #Density of water [kg/m**3]\n",
+ "Cp=4187.0 #Specific heat in [J/kg.K]\n",
+ "mu=485.0*10**-6 #Viscosity at 331 K[Pa.s]\n",
+ "k=0.657 #[W/(m.K)]\n",
+ "mu_w=920.0*10**-6 #Viscosity at 297 K [Pa.s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "D=16.0 #Diameter in [mm]\n",
+ "D=D/1000 #Diameter in [m]\n",
+ "u=3.0 #Velocity in [m/s]\n",
+ "rho=984.1 #[kg/m**3]\n",
+ "Nre=D*u*rho/mu #Reynolds number\n",
+ "Nre=round(Nre)\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "\n",
+ "#Dittus-Boelter equation (i)\n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**0.3) #nusselt number\n",
+ "h=k*Nnu/D #Heat transfer coefficient [W/m**2.K]\n",
+ "\n",
+ "#Result\n",
+ "print\"ANSWER-(i) \\nBy Dittus-Boelter equation we get h=\",round(h,1),\"W/sq m.K\"\n",
+ "#sieder-tate equation (ii)\n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**(1.0/3.0))*((mu/mu_w)**0.14) #Nusselt number\n",
+ "h=k*Nnu/D #Heat transfer coefficient in [W/sq m.K]\n",
+ "print\"Answer-(ii)\\nBy Sieder-Tate equation we get h=\",round(h,2),\"W/sq m.K\"\n",
+ "print\"\\nNOTE:Calculation mistake in book in part 2 ie sieder tate eqn\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ANSWER-(i) \n",
+ "By Dittus-Boelter equation we get h= 12972.6 W/sq m.K\n",
+ "Answer-(ii)\n",
+ "By Sieder-Tate equation we get h= 12315.04 W/sq m.K\n",
+ "\n",
+ "NOTE:Calculation mistake in book in part 2 ie sieder tate eqn\n"
+ ]
+ }
+ ],
+ "prompt_number": 191
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.20,Page no:3.67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Overall heat transfer coefficient\n",
+ "\n",
+ "#Variable declaration\n",
+ "m_dot=2250 #Mass flow arte in [kg/h]\n",
+ "Cp=3.35 #Specific heat in [kJ/(kg.K)]\n",
+ "dT=316-288.5 #Temperature drop for oil [K]\n",
+ "Q=Cp*m_dot*dT #Rate of heat transfer in [kJ/h]\n",
+ "Q=round(Q*1000/3600) #[J/s] or[W]\n",
+ "Di=0.04 #Inside diameter [m]\n",
+ "Do=0.048 #Outside diamter in [m]\n",
+ "hi=4070 #for steam [W/sq m.K]\n",
+ "ho=18.26 #For oil [W/sq m.K]\n",
+ "Rdo=0.123 #[sq m.K/W]\n",
+ "Rdi=0.215 #[sq m.K/W]\n",
+ "\n",
+ "#Calculation\n",
+ "Uo=1.0/(1.0/ho+Do/(hi*Di)+Rdo+Rdi*(Do/Di)) #[W/m**2.K]\n",
+ "Uo=2.3\n",
+ "import math\n",
+ "dT1=373-288.5 #[K]\n",
+ "dT2=373-316 #[K]\n",
+ "dTm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Ao=Q/(Uo*dTm) #Heat transfer area in [m**2]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transfer area is:\",round(Ao,1),\"m**2\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer area is: 358.4 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 192
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.21,Page no:3.68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Number of tubes in exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k_tube=111.65 #[W/m.K]\n",
+ "W=4500.0 #[kg/h]\n",
+ "rho=995.7 #[kg/sq m]\n",
+ "Cp=4.174 #[kJ/(kg.K)]\n",
+ "k=0.617 #[W/(m.K)]\n",
+ "v=0.659*10**-6 #Kinematic viscosity [sq m/s]\n",
+ "m_dot=1720.0 #kg/h\n",
+ "T1=293.0 #Initial temperature in [K]\n",
+ "T2=318.0 #Final temperature in [K]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "dT=T2-T1 #[K]\n",
+ "Q=m_dot*Cp*dT #Heat transfer rate in [kJ/h]\n",
+ "Q=Q*1000.0/3600.0 #[J/s] or [W]\n",
+ "Di=0.0225 #[m]\n",
+ "u=1.2 #[m/s]\n",
+ "#Nre=Di*u*rho/mu or\n",
+ "Nre=Di*u/v #Reynolds number\n",
+ "#As Nre is greater than 10000,Dittus Boelter equation is applicable\n",
+ "Cp=Cp*10**3 #J/(kg.K)\n",
+ "mu=v*rho #[kg/(m.s)]\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "#Dittus-Boelter equation for heating is \n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**0.4)\n",
+ "hi=k*Nnu/Di #Heat transfer coefficient [W/(sq m.K)]\n",
+ "Do=0.025 #[m]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #math.log mean diameter in [m]\n",
+ "ho=4650.0 #[W/sq m.K]\n",
+ "k=111.65 #[W/m.K]\n",
+ "xw=(Do-Di)/2 #[m]\n",
+ "Uo=1.0/(1.0/ho+Do/(hi*Di)+xw*Do/(k*Dw)) #Overall heat transfer coefficient in W/(m**2.K)\n",
+ "T_steam=373.0 #Temperature of condensing steam in [K]\n",
+ "dT1=T_steam-T1+10 #[K]\n",
+ "dT2=T_steam-T2+10 #[K]\n",
+ "dTm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Ao=Q/(Uo*dTm)#Area in [m**2]\n",
+ "L=4.0 #length of tube [m]\n",
+ "n=Ao/(math.pi*Do*L) #number of tubes\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"No. of tubes required=\",round(n) \n",
+ "print\"\\nNOTE: there is an error in book in calculation of dT1 and dT2,\\n373-293 is written as 90,instead of 80...similarly in dT2,\\nSo,in compliance with the book,10 is added to both of them\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of tubes required= 1.0\n",
+ "\n",
+ "NOTE: there is an error in book in calculation of dT1 and dT2,\n",
+ "373-293 is written as 90,instead of 80...similarly in dT2,\n",
+ "So,in compliance with the book,10 is added to both of them\n"
+ ]
+ }
+ ],
+ "prompt_number": 123
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.22,Page no:3.71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convective film coefficient\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m_dot=25000 #massflow rate of water [kg/h]\n",
+ "rho=992.2 #[kg/m**3]\n",
+ "k=0.634 #[W/m.K]\n",
+ "vfr=m_dot/rho #[m**3/h]\n",
+ "Npr=4.31 #Prandtl numberl\n",
+ "Di=50 #[mm]\n",
+ "Di=0.05 #[m]\n",
+ "dT=10 #[K] as the wall is at a temperature of 10 K above the bulk temperature\n",
+ "\n",
+ "#Calculation\n",
+ "u=round((vfr/3600)/(math.pi*(Di/2)**2),2) #Velocity of water in [m/s]\n",
+ "#Nre=Di*u*rho/mu=Di*u/v as v=mu/rho\n",
+ "v=0.659*10**-6 #[m**2/s]\n",
+ "Nre=Di*u/v #Reynolds number\n",
+ "#As it is less than 10000,the flow is in the turbulent region for heat transfer and Dittus Boelter eqn is used\n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**0.4) #Nusselt number\n",
+ "hi=Nnu*k/Di #Heat transfer coefficiet in [W/sq m.K]\n",
+ "q_by_l=hi*math.pi*Di*dT #Heat transfer per unit length[kW/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Average value of convective film coefficient is hi=\",round(hi),\" W/sq m.K\"\n",
+ "print\"Heat transferred per unit length is Q/L=\",round(q_by_l/1000,1),\"kW/m\"\n",
+ " \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average value of convective film coefficient is hi= 11584.0 W/sq m.K\n",
+ "Heat transferred per unit length is Q/L= 18.2 kW/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 196
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.23,Page no:3.72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Length of tube\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "vfr=1200.0 #Water flow rate in [l/h]\n",
+ "rho=0.98 #Density of water in g/[cubic cm]\n",
+ "m_dot=vfr*rho #Mass flow rate of water [kg/h]\n",
+ "m_dot2=m_dot/3600.0 #[kg/s]\n",
+ "Cp=4.187*10**3 #[J/kg.K]\n",
+ "Di=0.025 #Diameter in [m]\n",
+ "mu=0.0006 #[kg/(m.s)]\n",
+ "\n",
+ "#Calculation\n",
+ "Ai=math.pi*((Di/2)**2) #Area of cross-section in [m**2]\n",
+ "Nre=(Di/mu)*(m_dot2/Ai) #Reynolds number\n",
+ "k=0.63 #for metal wall in [W/(m.K)]\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "#Since Nre>10000\n",
+ "#therefore ,Dittus boelter eqn for heating is \n",
+ "Nnu=0.023*(Nre**(0.8))*(Npr**(0.4))\n",
+ "ho=5800.0 #Film heat coefficientW/(m**2.K)\n",
+ "hi=Nnu*k/Di #Heat transfer coeffcient in [W/(sq m.K)]\n",
+ "Do=0.028 #[m]\n",
+ "Di=0.025 #[m]\n",
+ "xw=(Do-Di)/2 #[m]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #[m]\n",
+ "k=50.0 #for metal wall in [W/(m.K)]\n",
+ "Uo=1.0/(1.0/ho+Do/(hi*Di)+xw*Do/(k*Dw)) #in [W/sq m.K]\n",
+ "dT=343.0-303.0 #[K]\n",
+ "dT1=393.0-303.0 #[K]\n",
+ "dT2=393.0-343.0 #[K]\n",
+ "dTm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Cp=Cp/1000.0 #[in [kJ/kg.K]]\n",
+ "Q=m_dot*Cp*dT #Rate of heat transfer in [kJ/h]\n",
+ "Q=Q*1000.0/3600.0 #[J/s] or [W]\n",
+ "Ao=Q/(Uo*dTm) #Heat transfer area in [sq m]\n",
+ "#Also,..Ao=math.pi*Do*L ..implies that\n",
+ "L=Ao/(math.pi*Do) #[m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Length of tube required is\",round(L),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of tube required is 5.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.24,Page no:3.73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Cooling coil\n",
+ "#1.For initial conditions:\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=360 #[K]\n",
+ "T1=280 #[K]\n",
+ "T2=320 #[K]\n",
+ "dT1=T-T1 #[K]\n",
+ "dT2=T-T2 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "#Q1=m1_dot*Cp1*(T2-T1)\n",
+ "Cp1=4.187 #Heat capacity \n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "m1_by_UA=dTlm/(Cp1*(T2-T1)) \n",
+ "#For final conditions :\n",
+ "#m2_dot=m1_dot\n",
+ "#U2=U1\n",
+ "#A2=5*A1\n",
+ "def f(t):\n",
+ " x=m1_by_UA*Cp1*(t-T1)-5*((dT1-(T-t))/math.log(dT1/(T-t)))\n",
+ " return(x)\n",
+ "T=fsolve(f,350.5)\n",
+ "\n",
+ "#Result\n",
+ "print\"Outlet temperature of water is\",T[0],\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Outlet temperature of water is 357.5 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 197
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.25,Page no:3.74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Outlet temperature of water\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "mo_dot=60.0 #Mass flow rate of oilin [g/s]\n",
+ "mo_dot=6.0*10**-2 #[kg/s]\n",
+ "Cpo=2.0 #Specific heat of oil in [kJ/(kg.K)]\n",
+ "T1=420.0 #[K]\n",
+ "T2=320.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q=mo_dot*Cpo*(T1-T2) #Rate of heat flow in [kJ/s]\n",
+ "mw_dot=mo_dot #Mass flow rate of water #kg/s\n",
+ "t1=290.0 #[K]\n",
+ "Cpw=4.18 #[kJ/(kg.K)]\n",
+ "#For finding outlet temperature of water\n",
+ "t2=t1+Q/(mw_dot*Cpw) #[K]\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "dTm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "ho=1.6 #Oil side heat transfer coefficient in [kW/(sq m.K)]\n",
+ "hi=3.6 #Water side heat transfer coeff in [kW/(sq m.K)]\n",
+ "#Overall heat transfer coefficient is:\n",
+ "U=1.0/(1.0/ho+1.0/hi) #[kW/(m**2.K)]\n",
+ "A=Q/(U*dTm) #[sq m]\n",
+ "Do=25.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "L=A/(math.pi*Do) #Length of tube in [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Outlet temperature of water is:\",round(t2),\"K\" \n",
+ "print\"Area of heat transfer required is\",round(A,2),\"m^2\"\n",
+ "print\"Length of tube required is\",round(L,2),\"m\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Outlet temperature of water is: 338.0 K\n",
+ "Area of heat transfer required is 0.21 m^2\n",
+ "Length of tube required is 2.66 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 199
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.26,Page no:3.76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Inside heat transfer coefficient\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.14 # for oil[W/m.K]\n",
+ "Cp=2.1 # for oil [kJ/kg.K]\n",
+ "Cp=Cp*10**3 #J/kg.K\n",
+ "mu=154 #[mN.s/sq m]\n",
+ "mu_w=87 #(mn.s/sq m)\n",
+ "L=1.5 #[m]\n",
+ "m_dot=0.5 #Mass flow rate of oil[kg/s]\n",
+ "Di=0.019 #Diameter of tube [m]\n",
+ "mean_T=319 #Mean temperature of oil [K]\n",
+ "\n",
+ "#Calculation\n",
+ "mu=mu*10**-3 #[N.s/sq m] or [kg/(m.s)]\n",
+ "A=math.pi*(Di/2)**2 #[sq m]\n",
+ "G=m_dot/A #Mass velocity in [kg/sq m.s]\n",
+ "Nre=Di*G/mu #Reynolds number\n",
+ "#As Nre<2100,the flow is laminar\n",
+ "mu_w=mu_w*10**-3 #[N.s/sq m] or kg/(m.s)\n",
+ "#The sieder tate equation is \n",
+ "hi=(k*(2.0*((m_dot*Cp)/(k*L))**(1.0/3.0)*(mu/mu_w)**(0.14)))/Di #Heat transfer coeff in [W/sq m.K]\n",
+ "\n",
+ "#Result\n",
+ "print\"The inside heat transfer coefficient is\",round(hi,2),\"W/(m**2.K) \" \n",
+ "print\"NOTE:Calculation mistake in last line.ie in the calculation of hi in book,please perform the calculation manually to check the answer\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inside heat transfer coefficient is 272.97 W/(m**2.K) \n",
+ "NOTE:Calculation mistake in last line.ie in the calculation of hi in book,please perform the calculation manually to check the answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 200
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.27,Page no:3.77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Film heat transfer coefficient\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m_dot=0.217 #Water flow rate in [kg/s]\n",
+ "Do=19.0 #Outside diameter in [mm]\n",
+ "rho=1000.0 #Density\n",
+ "t=1.6 #Wall thickness in [mm]\n",
+ "Di=Do-2*t #i.d of tube in [mm]\n",
+ "Di=Di/1000.0 #[m]\n",
+ "Do=Do/1000.0 #[m]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Ai=math.pi*(Di/2)**2 #Cross-sectional area in sq m\n",
+ "u=m_dot/(rho*Ai) #Water velocity through tube [m/s]\n",
+ "u=1.12 #approx in book\n",
+ "Di=0.0157 #apprx in book\n",
+ "T1=301.0 #Inlet temperature of water in [K]\n",
+ "T2=315.0 #Outlet temperature of water in [K]\n",
+ "T=(T1+T2)/2 #[K]\n",
+ "hi=(1063.0*(1+0.00293*T)*(u**0.8))/(Di**0.20) #Inside heat transfer coefficient W/(sq m.K)\n",
+ "hi=5084.0 #Approximation\n",
+ "hio=hi*(Di/Do) #Inside heat transfer coeff based on outside diameter in W/(sq m.K)\n",
+ "\n",
+ "#Result\n",
+ "print\"Based on outside temperature,Inside heat transfer coefficient is\",round(hio),\"W/(m**2.K) or \",round(hio/1000,1),\"kW/(m**2.K)\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Based on outside temperature,Inside heat transfer coefficient is 4201.0 W/(m**2.K) or 4.2 kW/(m**2.K)\n"
+ ]
+ }
+ ],
+ "prompt_number": 202
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.28,Page no:3.77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Area of exchanger\n",
+ "\n",
+ "#Variable declaration\n",
+ "mair_dot=0.90 #[kg/s]\n",
+ "T1=283.0 #[K]\n",
+ "T2=366.0 #[K]\n",
+ "dT=(T1+T2)/2 #[K]\n",
+ "Di=12.0 #[mm]\n",
+ "Di=Di/1000.0 #[m]\n",
+ "G=19.9 #[kg/(sq m.s)]\n",
+ "mu=0.0198 #[mN.s/(sq m)]\n",
+ "mu=mu*10**-3 #[N.s/sq m] or [kg/(m.s)]\n",
+ "\n",
+ "#Calculation\n",
+ "Nre=Di*G/mu #Reynolds number\n",
+ "#It is greater than 10**4\n",
+ "k=0.029 #W/(m.K)\n",
+ "Cp=1.0 #[kJ/kg.K]\n",
+ "Cp1=Cp*10**3 #[J/kg.K]\n",
+ "Npr=Cp1*mu/k #Parndtl number\n",
+ "#Dittus-Boelter equation is\n",
+ "hi=0.023*(Nre**0.8)*(Npr**0.4)*k/Di #[W/sq m.K]\n",
+ "ho=232.0 #W/sq m.K\n",
+ "U=1.0/(1.0/hi+1.0/ho) #Overall heat transfer coefficient [W/m**2.K]\n",
+ "Q=mair_dot*Cp*(T2-T1) #kJ/s\n",
+ "Q=Q*10**3 #[J/s] or [W]\n",
+ "T=700.0 #[K]\n",
+ "dT1=T-T2 #[K]\n",
+ "dT2=T2-T1 #[K]\n",
+ "dTm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "#Q=U*A*dTm\n",
+ "A=Q/(U*dTm) #Area in sq m\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transfer area of equipment is\",round(A,2),\"m^2\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer area of equipment is 6.5 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 203
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.29,Page no:3.82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Natural and forced convection\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=18.41*10**-6 #[sq m./s]\n",
+ "k=28.15*10**-3 #[W/m.K]\n",
+ "Npr=0.7 #Prandtl number\n",
+ "Beta=3.077*10**-3 #K**-1\n",
+ "g=9.81 #m/s**2\n",
+ "Tw=350 #[K]\n",
+ "T_inf=300 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "L=0.3 #[m]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#1.Free Convection\n",
+ "Ngr=(g*Beta*dT*L**3)/(v**2) #Grashof number\n",
+ "Npr=0.7 #Prandtl number\n",
+ "Nnu=0.59*(Ngr*Npr)**(1.0/4.0) #Nusselt number\n",
+ "h=Nnu*k/L #Average heat transfer coefficient [W/sq m K]\n",
+ "\n",
+ "#2.Forced Convestion\n",
+ "u_inf=4 #[m/s]\n",
+ "Nre_l=u_inf*L/v\n",
+ "Nnu=0.664*(Nre_l**(1.0/2.0))*(Npr**(1.0/3.0)) #Nusselt number\n",
+ "h1=Nnu*k/L #[W/sq m.K]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"In free convection,heat transfer coeff,h=\",round(h,1),\"W/(m^2.K)\"\n",
+ "print\"In forced convection,heat transfer coeff,h=\",round(h1,2),\"W/(m^2.K)\"\n",
+ "print\"From above it is clear that heat transfer coefficient in forced convection is much larger than that in free convection\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In free convection,heat transfer coeff,h= 5.3 W/(m^2.K)\n",
+ "In forced convection,heat transfer coeff,h= 14.12 W/(m^2.K)\n",
+ "From above it is clear that heat transfer coefficient in forced convection is much larger than that in free convection\n"
+ ]
+ }
+ ],
+ "prompt_number": 206
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.30,Page no:3.83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Natural convection\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.02685 #W/(m.K)\n",
+ "v=16.5*10**-6 #kg/(m.s)\n",
+ "Npr=0.7 #Prandtl number\n",
+ "Beta=3.25*10**-3 #K**-1\n",
+ "g=9.81 #m/(s**2)\n",
+ "Tw=333 #[k]\n",
+ "T_inf=283 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "L=4 #Length/height of plate [m]\n",
+ "\n",
+ "#Calculation\n",
+ "Ngr=(g*Beta*dT*(L**3))/(v**2) #Grashoff number\n",
+ "#Let const=Ngr*Npr\n",
+ "const=Ngr*Npr\n",
+ "#Sice it is >10**9\n",
+ "Nnu=0.10*(const**(1.0/3.0)) #Nusselt number\n",
+ "h=round(Nnu*k/L,1) #W/(sq m.K)\n",
+ "W=7 #width in [m]\n",
+ "A=L*W #Area of heat transfer in [sq m]\n",
+ "Q=h*A*dT #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transferred is\",Q,\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred is 6020.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 208
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.31,Page no:3.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Free convection in vertical pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=18.97*10**-6 #m**2/s\n",
+ "k=28.96*10**-3 #W/(m.K)\n",
+ "Npr=0.696\n",
+ "D=100.0 #Outer diameter [mm]\n",
+ "D=D/1000 #[m]\n",
+ "Tf=333.0 #Film temperature in [K]\n",
+ "Tw=373.0 #[K]\n",
+ "T_inf=293.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT=Tw-T_inf #[K]\n",
+ "Beta=1.0/Tf #[K**-1]\n",
+ "g=9.81 #[m/s**2]\n",
+ "L=3.0 #Length of pipe [m]\n",
+ "Ngr=(g*Beta*dT*(L**3))/(v**2) #Grashof number\n",
+ "Nra=Ngr*Npr\n",
+ "Nnu=0.10*(Ngr*Npr)**(1.0/3.0) #nusselt number for vertical cylinder\n",
+ "h=Nnu*k/L #W/(sq m.K)\n",
+ "Q_by_l=h*math.pi*D*dT #Heat loss per metre length [W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Hence,Heat loss per metre length is\",round(Q_by_l,2),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hence,Heat loss per metre length is 120.68 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 210
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.32,Page no:3.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss per unit length\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.630 #W/(m.K\n",
+ "Beta=3.04*10**-4 #K**-1\n",
+ "rho=1000.0 #kg/m**3\n",
+ "mu=8.0*10**-4 #[kg/(m.s)]\n",
+ "Cp=4.187 #kJ/(kg.K)\n",
+ "g=9.81 #[m/(s**2)]\n",
+ "Tw=313.0 #[K]\n",
+ "T_inf=298.0 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "D=20.0 #[mm]\n",
+ "D=D/1000 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Ngr=9.81*(rho**2)*Beta*dT*(D**3)/(mu**2) #Grashoff number\n",
+ "Cp1=Cp*1000.0 #[J/kg.K]\n",
+ "Npr=Cp1*mu/k #Prandtl number\n",
+ "#Average nusselt number is\n",
+ "Nnu=0.53*(Ngr*Npr)**(1.0/4.0)\n",
+ "h=Nnu*k/D #[W/ sqm.K]\n",
+ "Q_by_l=h*math.pi*D*dT #Heat loss per unit length [W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss per unit length of the heater is\",round(Q_by_l,1),\"W/m(APPROX)\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss per unit length of the heater is 653.4 W/m(APPROX)\n"
+ ]
+ }
+ ],
+ "prompt_number": 213
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.33,Page no:3.85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Free convection in pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.03406 #[W/(m/K)]\n",
+ "Beta=2.47*10**-3 #K**-1\n",
+ "Npr=0.687 #Prandtl number\n",
+ "v=26.54*10**-6 #m**2/s\n",
+ "g=9.81 #[m/s**2]\n",
+ "Tw=523.0 #[K]\n",
+ "T_inf=288.0 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "D=0.3048 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Ngr=(g*Beta*dT*(D**3))/(v**2) #Grashof number\n",
+ "Nra=Ngr*Npr \n",
+ "#For Nra less than 10**9,we have for horizontal cylinder\n",
+ "Nnu=0.53*(Nra**(1.0/4.0)) #Nusselt number\n",
+ "h=Nnu*k/D #[W/sq m.K]\n",
+ "Q_by_l=h*math.pi*D*dT #W/m\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss of heat transfer per meter lengh is\",round(Q_by_l,1),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss of heat transfer per meter lengh is 1492.4 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 214
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.34,Page no:3.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Free convection in plate\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=960.63 #Density in [kg/m**3]\n",
+ "Cp=4.216*10**3 #Specific heat in [J/(kg.K)]\n",
+ "D=16.0 #Diameter in [cm]\n",
+ "D=D/100 #[m]\n",
+ "k=0.68 #Thermal conductivity in [W/m.K]\n",
+ "\n",
+ "#Calculation\n",
+ "A=(math.pi*(D/2)**2)\n",
+ "L=A/(math.pi*D) #Length=A/P in [m]\n",
+ "Beta=0.75*10**-3 #[K**-1]\n",
+ "alpha=1.68*10**-7 #[m**2/s]\n",
+ "g=9.81 #[m/s**2]\n",
+ "Tw=403.0 #[K]\n",
+ "T_inf=343.0 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "v=0.294*10**-6 #[m**2/s]\n",
+ "Nra=(g*Beta*(L**3)*dT)/(v*alpha) \n",
+ "#1.For Top surface\n",
+ "Nnu=0.15*(Nra)**(1.0/3.0) #Nusselt number\n",
+ "ht=Nnu*k/L #Heat transfer coeff for top surface in W/(m**2.K)\n",
+ "ht=round(ht)\n",
+ "#2.For bottom surface\n",
+ "Nnu=0.27*Nra**(1.0/4.0) #Nusselt number\n",
+ "hb=Nnu*k/L #[W/sq m.K]\n",
+ "hb=round(hb)\n",
+ "Q=(ht+hb)*A*dT #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"The rate of heat input is\",round(Q,1),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of heat input is 3410.4 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 215
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.35,Page no:3.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer from disc\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=2.0*10**-5 #[m**2/s]\n",
+ "Npr=0.7 #Prandtl number\n",
+ "k=0.03 #[W/m.K]\n",
+ "D=0.25 #Diameter in [m]\n",
+ "L=0.90*D #Characteristic length,let [m]\n",
+ "T1=298.0 #[K]\n",
+ "T2=403.0 #[K]\n",
+ "dT=T2-T1 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Tf=(T1+T2)/2 #[K]\n",
+ "Beta=1.0/Tf #[K**-1]\n",
+ "A=math.pi*(D/2)**2 #Area in[sq m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "\n",
+ "#Case 1: Hot surface facing up\n",
+ "Ngr=g*Beta*dT*(L**3)/(v**2) #Grashoff number\n",
+ "Nnu=0.15*((Ngr*Npr)**(1.0/3.0)) #Nusselt number\n",
+ "print \"Nnu in the book is wrongly calculated as 66.80,\\nActually it is:58.22\"\n",
+ "h=Nnu*k/L #[W/sq m.K]\n",
+ "Q=h*A*dT #[W]\n",
+ "\n",
+ "#Case 2:For hot surface facing down\n",
+ "Nnu=0.27*(Ngr*Npr)**(1.0/4.0) #Grashof Number\n",
+ "h=Nnu*k/L #[W/sqm.K]\n",
+ "Q1=h*A*dT #[W]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nHeat transferred when hot surface is facing up is\",round(Q,2),\"W\"\n",
+ "print\"NOTE:Taking into consideration the correct value of Nnu\\n\"\n",
+ "print\"Heat transferred when hot surface is facing down is\",round(Q1,2),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Nnu in the book is wrongly calculated as 66.80,\n",
+ "Actually it is:58.22\n",
+ "\n",
+ "Heat transferred when hot surface is facing up is 40.04 W\n",
+ "NOTE:Taking into consideration the correct value of Nnu\n",
+ "\n",
+ "Heat transferred when hot surface is facing down is 16.23 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 234
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.36,Page no:3.88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Rate of heat input to plate\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=960 #[kg/m**3]\n",
+ "Beta=0.75*10**-3 #[K**-1]\n",
+ "k=0.68 #[W/m.K]\n",
+ "alpha=1.68*10**-7 #[m**2/s]\n",
+ "v=2.94*10**-7 #[m**2/s]\n",
+ "Cp=4.216 #[kJ/kg.K]\n",
+ "Tw=403 #[K]\n",
+ "T_inf=343 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "g=9.81 #[m/s**2]\n",
+ "l=0.8 #[m]\n",
+ "W=0.08 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "A=l*W #Area in [m**2]\n",
+ "P=2*(0.8+0.08) #Perimeter in [m]\n",
+ "L=A/P #Characteristic dimension/length,L in [m]\n",
+ "Nra=g*Beta*L**3*dT/(v*alpha) \n",
+ "#(i) for natural convection,heat transfer from top/upper surface heated \n",
+ "Nnu=0.15*(Nra**(1.0/3.0)) #Nusselt number\n",
+ "ht=Nnu*k/L #[W/m**2.K]\n",
+ "ht=2115.3 #Approximation in book,If done manually then answer diff\n",
+ "#(ii)For the bottom/lower surface of the heated plate\n",
+ "Nnu=0.27*(Nra**(1.0/4.0)) #Nusselt number\n",
+ "hb=Nnu*k/L #[W/(m**2.K)]\n",
+ "hb=round(hb)\n",
+ "#Rate of heat input is equal to rate of heat dissipation from the upper and lower surfaces of the plate\n",
+ "Q=(ht+hb)*A*(Tw-T_inf) #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat input is equal to heat dissipation =\",round(Q,1),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat input is equal to heat dissipation = 10914.4 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 235
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.37,Page no:3.89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Two cases in disc\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.03 #W/(m.K)\n",
+ "Npr=0.697 #Prandtl number\n",
+ "v=2.076*10**-6 #m**2/s\n",
+ "Beta=0.002915 #K**-1\n",
+ "D=25.0 #[Diameter in cm]\n",
+ "D=D/100 #[m]\n",
+ "Tf=343.0 #Film temperature in [K]\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*(D/2)**2 #Area in [m**2]\n",
+ "P=math.pi*D #Perimeter [m]\n",
+ "T1=293.0 #[K]\n",
+ "T2=393.0 #[K]\n",
+ "g=9.81 #[m/s**2]\n",
+ "#Case (i) HOT SURFACE FACING UPWARD\n",
+ "L=A/P #Characteristic length in [m]\n",
+ "Beta=1.0/Tf #[K**-1]\n",
+ "dT=T2-T1 #[K]\n",
+ "Ngr=(g*Beta*dT*(L**3))/(v**2) #Grashoff number\n",
+ "Nra=Ngr*Npr \n",
+ "Nnu=0.15*(Nra**(1.0/3.0)) #Nusselt number\n",
+ "h=Nnu*k/L #[W/m**2.K]\n",
+ "Q1=h*A*dT #[W]\n",
+ "\n",
+ "#Case-(ii) HOT FACE FACING DOWNWARD\n",
+ "Nnu=0.27*(Nra**(1.0/4.0)) #Nusselt number\n",
+ "h=Nnu*k/L #W/(m**2.K)\n",
+ "Q2=h*A*dT #[W]\n",
+ "\n",
+ "#Case-(iii)-For disc vertical \n",
+ "L=0.25 #Characteristic length[m] \n",
+ "D=L #dia[m]\n",
+ "A=math.pi*((D/2)**2) #[sq m]\n",
+ "Ngr=(g*Beta*dT*(L**3))/(v**2) #Grashoff number\n",
+ "Npr=0.697\n",
+ "Nra=Ngr*Npr \n",
+ "Nnu=0.10*(Nra**(1.0/3.0)) #Nusselt number\n",
+ "h=Nnu*k/D #[W/(m**2.K)]\n",
+ "Q3=h*A*dT #[W]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transferred when disc is horizontal with hot surface facing upward is\",round(Q1,1),\"W\"\n",
+ "print\"Heat transferred when disc is horizontal with hot surface facing downward is\",round(Q2,1),\"W\" \n",
+ "print\"For vertical disc,heat transferred is\",round(Q3),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred when disc is horizontal with hot surface facing upward is 170.8 W\n",
+ "Heat transferred when disc is horizontal with hot surface facing downward is 65.6 W\n",
+ "For vertical disc,heat transferred is 114.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 239
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.38,Page no:3.91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Total heat loss in a pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=23.13*10**-6 #[m**2/s]\n",
+ "k=0.0321 #[W/m.K]\n",
+ "Beta=2.68*10**-3 #[K**-1]\n",
+ "Tw=443.0 #[K]\n",
+ "T_inf=303.0 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "g=9.81 #[m/s**2]\n",
+ "Npr=0.688 #Prandtl number\n",
+ "D=100.0 #Diameter [mm]\n",
+ "D=D/1000 #Diameter [m]\n",
+ "\n",
+ "#Calculation\n",
+ "Nra=(g*Beta*dT*(D**3)*Npr)/(v**2)\n",
+ "Nnu=0.53*(Nra**(1.0/4.0)) #Nusselt number\n",
+ "h=Nnu*k/D #[W/(m**2.K)]\n",
+ "h=7.93 #Approximation\n",
+ "e=0.90 #Emissivity\n",
+ "sigma=5.67*10**-8 \n",
+ "#Q=Q_conv+Q_rad #Total heat loss\n",
+ "#for total heat loss per meter length\n",
+ "Q_by_l=h*math.pi*D*dT+sigma*e*math.pi*D*(Tw**4-T_inf**4) #[W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Total heat loss per metre length of pipe is\",round(Q_by_l,1),\"W/m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total heat loss per metre length of pipe is 831.1 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 240
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.39,Page no:3.91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss by free convection\n",
+ "import math\n",
+ "\n",
+ "#Result\n",
+ "k=0.035 #[W/(m.K)]\n",
+ "Npr=0.684 #Prandtl number\n",
+ "Beta=2.42*10**-3 #[K**-1]\n",
+ "v=27.8*10**-6 #[m**2/s]\n",
+ "Tw=533.0 #[K]\n",
+ "T_inf=363.0 #[K]\n",
+ "dT=Tw-T_inf #[K]\n",
+ "D=0.01 #[m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "\n",
+ "#Calculation\n",
+ "Nra=(g*Beta*dT*(D**3))/(v**2)\n",
+ "#For this <10**5,we have for sphere\n",
+ "A=4*math.pi*(D/2)**2 #Area of sphere in [m**2]\n",
+ "Nnu=(2+0.43*Nra**(1.0/4.0))#Nusslet number\n",
+ "h=Nnu*k/D #W/(m**2.K)\n",
+ "Q=h*A*dT #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat loss is\",round(Q,2),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat loss is 1.06 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 241
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.40,Page no:3.92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss from cube\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=17.95*10**-6 #[m**2/s]\n",
+ "dT=353.0-293.0 #[K]\n",
+ "k=0.0283 #[W/m.K]\n",
+ "g=9.81 #[m/s**2]\n",
+ "Npr=0.698 #Prandtl number\n",
+ "Cp=1005.0 #J/(kg.K)\n",
+ "Tf=323.0 #Film temperature in [K]\n",
+ "Beta=1.0/Tf #[K**-1]\n",
+ "l=1.0 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "Nra=(g*Beta*dT*(l**3)*Npr)/(v**2)\n",
+ "#In textbook result of above statement is wrongly calculated,So\n",
+ "Nra=3.95*10**8\n",
+ "#For Nra <10**9,for a vertical plate,the average nusselt number is\n",
+ "Nnu=0.59*Nra**(1.0/4.0) #Nusselt number\n",
+ "h=round(Nnu*k/l,2) #[W/m**2.K]\n",
+ "A=l**2 #Area [m**2]\n",
+ "#Heat loss form 4 vertical faces of 1m*1m is \n",
+ "Q1=4.0*(h*A*dT) #[W]\n",
+ "#For top surface \n",
+ "P=4.0*l #Perimeter in [m]\n",
+ "L=A/P #[m]\n",
+ "Nra=(Npr*g*Beta*dT*(L**3))/(v**2)\n",
+ "Nnu=0.15*Nra**(1.0/3.0) #Nusselt number\n",
+ "h=round(Nnu*k/L,1) #[W/m**2.K]\n",
+ "Q2=h*A*dT #[W]\n",
+ "Q_total=Q1+Q2 #Total heat loss[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Total heat loss is\",Q_total,\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {
+ "slideshow": {
+ "slide_type": "-"
+ }
+ },
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total heat loss is 966.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 246
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.41,Page no:3.93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Plate exposed to heat\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=0.910 #Density in [kg/m**3]\n",
+ "Cp=1.009*1000 #[J/kg.K]\n",
+ "k=0.0331 #[W/m.K]\n",
+ "mu=22.65*10**-6 #[N.s/m**2]\n",
+ "\n",
+ "#Calculation\n",
+ "#Let a=smaller side\n",
+ "#b=bigger side\n",
+ "#Qa=ha*A*dT\n",
+ "#Qb=hb*A*dT\n",
+ "#Qa=1.14*Qb\n",
+ "#Given a*b=15*10**-4\n",
+ "#On solving we get:\n",
+ "a=0.03 #[m]\n",
+ "b=0.05 #[m]\n",
+ "A=a*b #Area in [sq m]\n",
+ "Tf=388 #[K]\n",
+ "Beta=1.0/Tf #[K**-1]\n",
+ "T1=303 #[K]\n",
+ "T2=473 #[K]\n",
+ "dT=T2-T1 #[K]\n",
+ "v=mu/rho \n",
+ "g=9.81 #m/s**2[acceleration due to gravity ]\n",
+ "hb=0.59*(((g*Beta*dT*(b**3))/(v**2))*Cp*mu/k)**(1.0/4.0)*(k/b) #[W/sq m.K]\n",
+ "Qb=hb*A*(dT) #[W]\n",
+ "\n",
+ "Qa=1.14*Qb #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Dimensions of the plate are\",a,\"x\",b,\"m=\",a*100,\"x\",b*100,\"cm\"\n",
+ "print\"Heat transfer when the bigger side held vertical is\",round(Qb,2),\"W\"\n",
+ "print\"Heat transfer when the small side held vertical is\",round(Qa,2),\"W\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dimensions of the plate are 0.03 x 0.05 m= 3.0 x 5.0 cm\n",
+ "Heat transfer when the bigger side held vertical is 2.77 W\n",
+ "Heat transfer when the small side held vertical is 3.16 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 249
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.42,Page no:3.99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Nucleate poolboiling\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ts=373.0 #[K]\n",
+ "rho_l=957.9 #rho*l[kg/m**3]\n",
+ "Cpl=4217.0 #[J/kg.K]\n",
+ "mu_l=27.9*10**-5 #[kg/(m.s)]\n",
+ "rho_v=0.5955 #[kg/m**3]\n",
+ "Csf=0.013\n",
+ "sigma=5.89*10**-2 #[N/m]\n",
+ "Nprl=1.76\n",
+ "lamda=2257.0 #[kJ/kg]\n",
+ "lamda=lamda*1000 #in [J/kg]\n",
+ "n=1 #for water\n",
+ "m_dot=30.0 #Mass flow rate [kg/h]\n",
+ "\n",
+ "#Calculation\n",
+ "m_dot=m_dot/3600 #[kg/s]\n",
+ "D=30.0 #Diameter of pan [cm]\n",
+ "D=D/100 #[m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "A=math.pi*(D/2)**2 #Area in [sq m]\n",
+ "Q_by_A=m_dot*lamda/A #[W/sq m]\n",
+ "#For nucleate boiling point we have:\n",
+ "dT=(lamda/Cpl)*Csf*(((Q_by_A)/(mu_l*lamda))*math.sqrt(sigma/(g*(rho_l-rho_v))))**(1.0/3.0)*(Nprl**n) #[K]\n",
+ "Tw=Ts+dT #[K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Temperature of the bottom surface of the pan is\",round(Tw,1),\"W/(m^2)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the bottom surface of the pan is 385.5 W/(m^2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 251
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.43,Page no:3.100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Peak Heat flux\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=2257.0 #[kJ/kg]\n",
+ "lamda=lamda*1000 #in [J/kg]\n",
+ "rho_l=957.9 #rho*l[kg/m**3]\n",
+ "rho_v=0.5955 #[kg/m**3]\n",
+ "sigma=5.89*10**-2 #[N/m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "\n",
+ "#Calculation\n",
+ "#Peak heat flux is given by\n",
+ "Q_by_A_max=(math.pi/24)*(lamda*rho_v**0.5*(sigma*g*(rho_l-rho_v))**(1.0/4.0)) #W/m**2\n",
+ "Q_by_A_max=Q_by_A_max/(10**6) #MW/(sq m)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Peak heat flux is\",round(Q_by_A_max,3),\"MW/sq m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak heat flux is 1.106 MW/sq m\n"
+ ]
+ }
+ ],
+ "prompt_number": 252
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.44,Page no:3.100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Stable film pool boiling\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_l=957.9 #[kg/m**3]\n",
+ "lamda=2257.0 #[kJ/kg]\n",
+ "lamda=lamda*10**3 #[J/kg]\n",
+ "rho_v=31.54 #[kg/m**3]\n",
+ "Cpv=4.64 #[kJ/kg.K]\n",
+ "Cpv=Cpv*10**3 #[J/kg.K]\n",
+ "kv=58.3*10**-3#[W/(m.K)]\n",
+ "g=9.81 #[m/s**2]\n",
+ "mu_v=18.6*10**-6 #[kg/(m.s)]\n",
+ "e=1.0 #Emissivity\n",
+ "sigma=5.67*10**-8 \n",
+ "Ts=373.0 #[K]\n",
+ "Tw=628.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT=Tw-Ts #[K]\n",
+ "D=1.6*10**-3 #[m]\n",
+ "T=(Tw+Ts)/2 #[K]\n",
+ "\n",
+ "hc=0.62*((kv**3)*rho_v*(rho_l-rho_v)*g*(lamda+0.40*Cpv*dT)/(D*mu_v*dT))**(1.0/4.0) #Convective heat transfer coeff [W/sq m.K]\n",
+ "hr=e*sigma*(Tw**4-Ts**4)/(Tw-Ts) #Radiation heat transfer coeff in [W/sq m.K]\n",
+ "h=hc+(3.0/4.0)*hr #Total heat transfer coefficient W/(sq m.K)\n",
+ "Q_by_l=h*math.pi*D*dT #Heat dissipation rate per unit length in [kW/m]\n",
+ "Q_by_l=Q_by_l/1000 #[kW/m]\n",
+ "#Result\n",
+ "print\"Stable film boiling point heat transfer coefficient is\",round(h,1),\"W/(sq m.K)\"\n",
+ "print\"Heat dissipated per unit length of the heater is\",round(Q_by_l,1),\"kW/m\"\n",
+ "\n",
+ "print\"\\nNOTE:In textbook,value of hc is wrongly calculated as 1311.4,Actually it is 1318.9,\"\n",
+ "print\"So,there is a difference in final values of 'h'\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stable film boiling point heat transfer coefficient is 1340.9 W/(sq m.K)\n",
+ "Heat dissipated per unit length of the heater is 1.7 kW/m\n",
+ "\n",
+ "NOTE:In textbook,value of hc is wrongly calculated as 1311.4,Actually it is 1318.9,\n",
+ "So,there is a difference in final values of 'h'\n"
+ ]
+ }
+ ],
+ "prompt_number": 262
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.45,Page no:3.102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer in tube\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "dT=10 #[K]\n",
+ "P=506.625 #[kPa]\n",
+ "P=P/10**3 #[Mpa]\n",
+ "D=25.4 #Diameter [mm]\n",
+ "D=D/1000 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "h=2.54*(dT**3)*(math.exp(P/1.551)) #[W/sq m.K]\n",
+ "#Q=h*math.pi*D*L*dT\n",
+ "#Heat transfer rate per meter length of tube is \n",
+ "Q_by_l=h*math.pi*D*dT #[W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of heat transfer per 1m length of tube is\",round(Q_by_l),\"W/m\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer per 1m length of tube is 2810.0 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 136
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.46,Page no:3.102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Nucleat boiling and heat flux\n",
+ "\n",
+ "#Variable declaration\n",
+ "dT=8.0 #[K]\n",
+ "P=0.17 #[Mpa]\n",
+ "P=P*1000 #[kPa]\n",
+ "h1=2847.0 #[W/(sq m.K)]\n",
+ "P1=101.325 #[kPa]\n",
+ "h=5.56*(dT**3) #[W/sq m.K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_A=h*dT #[W/sq m]\n",
+ "hp=h*(P/P1)**(0.4) #[W/sq m.K]\n",
+ "#Corresponding heat flux is :\n",
+ "Q_by_A1=hp*dT #[W/sq m]\n",
+ "per=(Q_by_A1-Q_by_A)*100.0/Q_by_A #Percent increase in heat flux\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat flux when pressure is 101.325 kPa is\",Q_by_A,\"W/m^2(APPROX)\"\n",
+ "print\"Percent increase in heat flux is\",round(per),\"%\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flux when pressure is 101.325 kPa is 22773.76 W/m^2(APPROX)\n",
+ "Percent increase in heat flux is 23.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 265
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.47,Page no:3.110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Dry steam condensate\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mu=306*10**-6 #[N.s/m**2]\n",
+ "k=0.668 #[W/m.K]\n",
+ "rho=974.0 #[kg/m**3]\n",
+ "lamda=2225.0 #[kJ/kg]\n",
+ "lamda=lamda*10**3 #[J/kg.K]\n",
+ "g=9.81 #[m/s**2]\n",
+ "Ts=373.0 #[K]\n",
+ "Tw=357.0 #[K]\n",
+ "dT=Ts-Tw #[K]\n",
+ "Do=25.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "h=0.725*((rho**2*g*lamda*k**3)/(mu*Do*dT))**(1.0/4.0) #[W/sq m.K]\n",
+ "Q_by_l=h*math.pi*Do*dT #[W/m]\n",
+ "m_dot_byl=(Q_by_l/lamda) #[kg/s]\n",
+ "m_dot_byl=m_dot_byl*3600 #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"Mean heat transfer coefficient is\",round(h),\"W/(m^2.K)\" \n",
+ "print\"Heat transfer per unit length is\",round(Q_by_l),\"W/m\" \n",
+ "print\"Condensate rate per unit length is\",round(m_dot_byl,1),\"kg/h\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean heat transfer coefficient is 10864.0 W/(m^2.K)\n",
+ "Heat transfer per unit length is 13653.0 W/m\n",
+ "Condensate rate per unit length is 22.1 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 269
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.48,Page no:3.111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Laminar Condensate film\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=960.0 #[kh/m**3]\n",
+ "mu=2.82*10**-4 #[kg/(m.s)]\n",
+ "k=0.68 #[W/(m.K)]\n",
+ "lamda=2255.0 #[kJ/kg]\n",
+ "lamda=lamda*10**3 #[J/kg]\n",
+ "Ts=373.0 #Saturation temperature of steam [K]\n",
+ "Tw=371.0 #[K]\n",
+ "dT=Ts-Tw #[K]\n",
+ "L=0.3 #Dimension [m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "\n",
+ "#Calculation\n",
+ "h=0.943*(rho**2*g*lamda*k**3/(L*mu*dT))**(1.0/4.0) #W/sq m.K\n",
+ "A=L**2 #[sq m] \n",
+ "Q=h*A*(Ts-Tw) #[W]=[J/s]\n",
+ "m_dot=Q/lamda #Condensate rate[kg/s]\n",
+ "m_dot=m_dot*3600.0 #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"Average heat transfer coefficient is\",round(h),\" W/(m^2.K)(APPROX)\"\n",
+ "print\"Heat transfer rate is\",round(Q),\"J/kg\"\n",
+ "print\"Steam condensate rate per hour is\",round(m_dot,2),\"kg/h\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average heat transfer coefficient is 13156.0 W/(m^2.K)(APPROX)\n",
+ "Heat transfer rate is 2368.0 J/kg\n",
+ "Steam condensate rate per hour is 3.78 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 276
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.49,Page no:3.112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Saturated vapour condensate in array\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=1174.0 #[kg/m**3]\n",
+ "k=0.069 #[W/(m.K)]\n",
+ "mu=2.5*10**-4 #[N.s/m**2]\n",
+ "lamda=132*10**3 #[J/kg]\n",
+ "g=9.81 #[m/s**2]\n",
+ "Ts=323.0 #[K]\n",
+ "Tw=313.0 #[K]\n",
+ "dT=Ts-Tw #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "#For square array,n=4\n",
+ "n=4.0 #number of tubes\n",
+ "Do=12.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "h=0.725*(rho**2*lamda*g*k**3/(n*Do*mu*dT))**(1.0/4.0) #W/(sq m.K) \n",
+ "#For heat transfer area calcualtion,n=16\n",
+ "A=n*math.pi*Do #[sq m]\n",
+ "A=0.603\n",
+ "Q=h*A*dT#[W/m]\n",
+ "m_dot=round(Q/lamda,3) #[kg/s]\n",
+ "\n",
+ "m_dot=m_dot*3600 #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rate of condensation per unit length is\",m_dot,\"kg/h\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of condensation per unit length is 176.4 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 279
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.50,Page no:3.113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Mass rate of steam condensation\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=960.0 #[kg/m**3]\n",
+ "k=0.68 #[W/m.K]\n",
+ "mu=282.0*10**-6 #[kg/(m.s)]\n",
+ "Tw=371.0 #Tube wall temperature [K]\n",
+ "Ts=373.0 #Saturation temperature in [K]\n",
+ "dT=Ts-Tw #[K]\n",
+ "lamda=2256.9 #[kJ/kg]\n",
+ "lamda=lamda*10**3 #[J/kg]\n",
+ "\n",
+ "#Calculation\n",
+ "#For a square array with 100tubes,n=10\n",
+ "Do=0.0125 #[m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "n=10.0\n",
+ "h=0.725*(((rho**2)*g*lamda*(k**3)/(mu*n*Do*dT))**(1.0/4.0)) #W/(sq m.K)\n",
+ "\n",
+ "L=1.0 #[m]\n",
+ "#n=100\n",
+ "n=100.0 \n",
+ "A=n*math.pi*Do*L #[m**2/m length]\n",
+ "Q=h*A*dT #Heat transfer rate in [W/m]\n",
+ "ms_dot=Q/lamda #[kg/s]\n",
+ "ms_dot=ms_dot*3600.0 #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"Mass rate of steam condensation is\",round(ms_dot),\"kg/h\" \n",
+ "print\"NOTE:ERROR in Solution in book.Do is wrongly taken as 0.012 in lines 17 and 22 of the book,Also A is wrongly calculated\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass rate of steam condensation is 158.0 kg/h\n",
+ "NOTE:ERROR in Solution in book.Do is wrongly taken as 0.012 in lines 17 and 22 of the book,Also A is wrongly calculated\n"
+ ]
+ }
+ ],
+ "prompt_number": 286
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.51,Page no:3.114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Saturated tube condensate in a wall\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=975.0 #[kg/m**3]\n",
+ "k=0.871 #[W/m.K]\n",
+ "dT=10.0 #[K]\n",
+ "mu=380.5*10**-6 #[N.s/m**2]\n",
+ "lamda=2300.0 #[kJ/kg]\n",
+ "lamda=lamda*1000 # Latent heat of condensation [J/kg]\n",
+ "Do=100.0 #Outer diameter [mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "\n",
+ "#Calculation\n",
+ "#for horizontal tube\n",
+ "h1=0.725*((rho**2*lamda*g*k**3)/(mu*Do*dT))**(1.0/4.0) #Average heat transfer coefficient\n",
+ "#for vertical tube\n",
+ "#h2=0.943*((rho**2*lambda*g*k**3)/(mu*L*dT))**(1/4) #Average heat transfer coefficient\n",
+ "h2=h1 #For vertical tube\n",
+ "#implies that\n",
+ "L=(0.943*((rho**2*lamda*g*k**3)**(1.0/4.0))/(h1*((mu*dT)**(1.0/4.0))))**4 #[m]\n",
+ "L=0.29 #Approximate in book\n",
+ "h=0.943*((rho**2*lamda*g*k**3)/(mu*L*dT))**(1.0/4.0) #[W/(sq m.K)]\n",
+ "A=math.pi*Do*L #Area in [m**2]\n",
+ "Q=h*A*dT #Heat transfer rate [W]\n",
+ "mc_dot=Q/lamda #[Rate of condensation]in [kg/s]\n",
+ "mc_dot=mc_dot*3600 #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"Tube length is\",L,\"m\"\n",
+ "print\"Rate of condensation per hour is\",round(mc_dot,2),\"kg/h\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tube length is 0.29 m\n",
+ "Rate of condensation per hour is 14.32 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 288
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.52,Page no:3.115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Condensation rate\n",
+ "\n",
+ "#Variable declaration\n",
+ "m1_dot=50.0 # For horizontal position[kg/h]\n",
+ "Do=10.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "L=1.0 #[m]\n",
+ "#For 100 tubes n=10\n",
+ "n=10.0 \n",
+ "\n",
+ "#Calculation\n",
+ "#We know that\n",
+ "#m_dot=Q/lambda=h*A*dT/lambda\n",
+ "#m_dot is proportional to h\n",
+ "#m1_dot prop to h1\n",
+ "#m2_dot propn to h2\n",
+ "#m1_dot/m2_dot=h1/h2\n",
+ "#or :\n",
+ "m2_dot=m1_dot/((0.725/0.943)*(L/(n*Do))**(1.0/4.0)) #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "print\"For vertical position,Rate of condensation is\",round(m2_dot,2),\"kg/h\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For vertical position,Rate of condensation is 36.57 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 289
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.53,Page no:3.116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Condensation on vertical plate\n",
+ "rho=975 #[kg/m**3]\n",
+ "k=0.671 #[W/(m.K)]\n",
+ "mu=3.8*10**-4 #[N.s/m**2]\n",
+ "dT=10 #[K]\n",
+ "lamda=2300*10**3 #[J/kg]\n",
+ "L=1 #[m]\n",
+ "g=9.81 #[m/s**2]\n",
+ "\n",
+ "#Calculation\n",
+ "ha=0.943*((rho**2*lamda*g*k**3)/(mu*L*dT))**(1.0/4.0) #W/(sq m.K) #[W/sq m.K]\n",
+ "#Local heat transfer coefficient\n",
+ "#at x=0.5 #[m]\n",
+ "x=0.5 #[m]\n",
+ "h=((rho**2*lamda*g*k**3)/(4*mu*dT*x))**(1.0/4.0) #[W/sq m.K]\n",
+ "delta=((4*mu*dT*k*x)/(lamda*rho**2*g))**(1.0/4.0) #[m]\n",
+ "delta=delta*10**3 #[mm]\n",
+ "\n",
+ "#Result\n",
+ "print\"(i)- Average heat transfer coefficient is\",round(ha),\" W/(m**2.K)\"\n",
+ "print\"(ii)-Local heat transfer coefficient at 0.5 m height is\",round(h),\"W/(m^2.K)\"\n",
+ "print\"(iii)-Film thickness is\",round(delta,3),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)- Average heat transfer coefficient is 6060.0 W/(m**2.K)\n",
+ "(ii)-Local heat transfer coefficient at 0.5 m height is 5404.0 W/(m^2.K)\n",
+ "(iii)-Film thickness is 0.124 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 295
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer/Chapter_4.ipynb b/Heat_Transfer/Chapter_4.ipynb
new file mode 100755
index 00000000..5e32aa12
--- /dev/null
+++ b/Heat_Transfer/Chapter_4.ipynb
@@ -0,0 +1,1166 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Radiation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.1,Page no:4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss by radiaiton\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=0.9 #[Emissivity]\n",
+ "sigma=5.67*10**-8 #[W/m**2.K**4]\n",
+ "T1=377 #[K]\n",
+ "T2=283 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Qr_by_a=e*sigma*(T1**4-T2**4) #[W/sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat loss by radiation is\",round(Qr_by_a),\"W/m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat loss by radiation is 704.0 W/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.2,Page no:4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Radiation from unlagged steam pipe\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=0.9 #Emissivity\n",
+ "T1=393 #[K]\n",
+ "T2=293 #[K]\n",
+ "sigma=5.67*10**-8 #[W/sq m.K]\n",
+ "#Calculation\n",
+ "Qr_by_a=e*sigma*(T1**4-T2**4) #W/sq m\n",
+ "#Result\n",
+ "print\"Rate of heat transfer by radiation is\",round(Qr_by_a,1),\"W/sq m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer by radiation is 841.2 W/sq m\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.3,Page no:4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Interchange of radiation energy\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=1 #[m]\n",
+ "e=0.8 #Emissivity\n",
+ "sigma=5.67*10**-8 #[m**2.K**4]\n",
+ "T1=423.0 #[K]\n",
+ "T2=300.0 #[K]\n",
+ "Do=60.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "A=round(math.pi*Do*L,3) #[sq m]\n",
+ "Qr=e*sigma*A*(T1**4-T2**4) #[W/m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Net radiaiton rate per 1 metre length of pipe is\",round(Qr),\"W/m(approx)\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net radiaiton rate per 1 metre length of pipe is 204.0 W/m(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.4,Page no:4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss in unlagged steam pipe\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "e=0.9 #Emissivity\n",
+ "L=1.0 #[m]\n",
+ "Do=50.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "sigma=5.67*10**-8 #[W/(m**2.K**4)]\n",
+ "T1=415.0 #[K]\n",
+ "T2=290.0 #[K]\n",
+ "dT=T1-T2 #[K]\n",
+ "#Calculation\n",
+ "hc=1.18*(dT/Do)**(0.25) #[W/sq m.K]\n",
+ "A=math.pi*Do*L #Area in [sq m]\n",
+ "Qc=hc*A*dT #Heat loss by convection W/m\n",
+ "Qr=e*sigma*A*(T1**4-T2**4) #Heat loss by radiation per length W/m\n",
+ "Qt=Qc+Qr #Total heat loss in [W/m]\n",
+ "#Result\n",
+ "print\"Total heat loss by convection is\",round(Qt,1),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total heat loss by convection is 344.9 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.5,Page no:4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Loss from horizontal pipe\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "e=0.85\n",
+ "sigma=5.67*10**-8 #[W/sq m.K]\n",
+ "T1=443.0 #[K]\n",
+ "T2=290.0 #[K]\n",
+ "dT=T1-T2 #[K]\n",
+ "hc=1.64*dT**0.25 #W/sq m.K\n",
+ "Do=60.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "L=6 #Length [m]\n",
+ "#Calculation\n",
+ "A=math.pi*Do*L #Surface area of pipe in [sq m]\n",
+ "Qr=e*sigma*A*(T1**4-T2**4) # Rate of heat loss by radiaiton W\n",
+ "Qc=hc*A*(T1-T2) # Rate of heat loss by convection [W]\n",
+ "Qt=Qr+Qc #Total heat loss [W]\n",
+ "#Result\n",
+ "print\"Total heat loss is\",round(Qt),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total heat loss is 2712.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.6,Page no:4.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss by radiation in tube\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/m**2.K**4]\n",
+ "e1=0.79 \n",
+ "e2=0.93 \n",
+ "T1=500 #[K]\n",
+ "T2=300 #[K]\n",
+ "D=70 #[mm]\n",
+ "D=D/1000 #[m]\n",
+ "L=3 #[m]\n",
+ "W=0.3 #Side of conduit [m]\n",
+ "#Calculation\n",
+ "A1=math.pi*D*L #[sq m]\n",
+ "A1=0.659 #Approximate calculation in book in [m**2]\n",
+ "A2=4*(L*W) #[sq m]\n",
+ "Q=sigma*A1*(T1**4-T2**4)/(1/e1+((A1/A2)*(1/e2-1))) #[W]\n",
+ "#Result\n",
+ "print\"Heat lost by radiation is\",round(Q,1),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat lost by radiation is 1588.5 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.7,Page no:4.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Net radiant interchange\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "T1=703 #[K]\n",
+ "T2=513 #[K]\n",
+ "e1=0.85 \n",
+ "e2=0.75\n",
+ "#Calculation\n",
+ "Q_by_Ar=sigma*(T1**4-T2**4)/(1/e1+1/e2-1) #[W/sq m]\n",
+ "#Result\n",
+ "print\"Net radiant interchange per square metre is\",round(Q_by_Ar),\"W/sq m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net radiant interchange per square metre is 6571.0 W/sq m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.8,Page no:4.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Radiant interchange between plates\n",
+ "#Variable declaration\n",
+ "L=3 #[m]\n",
+ "A=L**2 #Area in [sq m]\n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "T1=373 #[K]\n",
+ "T2=313 #[K]\n",
+ "e1=0.736 \n",
+ "e2=e1 \n",
+ "#Calculation\n",
+ "F12=1.0/((1.0/e1)+(1.0/e2)-1)\n",
+ "Q=sigma*A*F12*(T1**4-T2**4) #[W]\n",
+ "#Result\n",
+ "print\"Net radiant interchange is\",round(Q),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net radiant interchange is 2900.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.9,Page no:4.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat loss from thermofask \n",
+ "#Variable declaration \n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "e1=0.05 \n",
+ "e2=0.05\n",
+ "#A1=A2=1 (let)\n",
+ "A1=1 \n",
+ "A2=A1 \n",
+ "\n",
+ "#Calculation\n",
+ "F12=1.0/(1.0/e1+(A1/A2)*(1.0/e2-1)) \n",
+ "T1=368 #[K]\n",
+ "T2=293 #[K]\n",
+ "Q_by_A=sigma*F12*(T1**4-T2**4) #Heat loss per unit Area [W/sq m]\n",
+ "print\"Rate of heat loss when of silvered surface is\",round(Q_by_A,2),\"W/sq m\"\n",
+ "#When both the surfaces are black\n",
+ "e1=1 \n",
+ "e2=1 \n",
+ "F12=1/(1/e1+(A1/A2)*(1/e2-1)) \n",
+ "Q_by_A=sigma*F12*(T1**4-T2**4) #[W/sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n When both surfaces are black,Rate of heat loss is\",round(Q_by_A),\"W/sq m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat loss when of silvered surface is 15.95 W/sq m\n",
+ "\n",
+ " When both surfaces are black,Rate of heat loss is 622.0 W/sq m\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.10,Page no:4.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Diwar flask\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "e1=0.05\n",
+ "e2=e1\n",
+ "A1=0.6944 \n",
+ "A2=1 \n",
+ "T1=293 #[K]\n",
+ "T2=90 #[K]\n",
+ "sigma=5.67*10**-8 #[W/m**2.K**4]\n",
+ "D=0.3 #Diameter in [m]\n",
+ "\n",
+ "#Calculation\n",
+ "F12=1.0/(1.0/e1+(A1/A2)*(1.0/e2-1))\n",
+ "Q_by_A=sigma*F12*(T1**4-T2**4) #[W/sq m]\n",
+ "Q=Q_by_A*math.pi*(D**2) #[kJ/h]\n",
+ "Q=Q*3600/1000 #[kJ/h]\n",
+ "lamda=21.44 #Latent heat in [kJ/kg]\n",
+ "m_dot=Q/lamda #kg/h\n",
+ "\n",
+ "#Result\n",
+ "print\"The liquid oxygen will evaporate at\",round(m_dot,2),\"kg/h\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The liquid oxygen will evaporate at 0.59 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.11,Page no:4.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat flow due to radiation\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #W/(m**2.K**4)\n",
+ "e1=0.3 \n",
+ "e2=e1 \n",
+ "D1=0.3 #[m]\n",
+ "D2=0.5 #[m]\n",
+ "T1=90 #[K]\n",
+ "T2=313 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "A1=math.pi*D1**2 #Area in [sq m]\n",
+ "A2=math.pi*D2**2#Area in [sq m]\n",
+ "Q1=sigma*A1*(T1**4-T2**4)/(1/e1+(A1/A2)*(1/e2-1)) #[W]\n",
+ "Q1=abs(Q1) #Absolute value in [W]\n",
+ "print\"Rate of heat flow due to radiation is\",round(Q1,2),\"W\"\n",
+ "#When Aluminium is used\n",
+ "e1=0.05\n",
+ "e2=0.5\n",
+ "Q2=sigma*A1*(T1**4-T2**4)/(1/e1+(A1/A2)*(1/0.3-1)) #[W]\n",
+ "Q2=abs(Q2) #Absolute value in [W]\n",
+ "Red=(Q1-Q2)*100/Q1 #Percent reduction\n",
+ "\n",
+ "#Result\n",
+ "print\"Reduction in heat flow will be\",round(Red,2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat flow due to radiation is 36.62 W\n",
+ "Reduction in heat flow will be 79.97 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.12,Page no:4.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat exchange between concentric shell\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "T1=77.0 #[K]\n",
+ "T2=303.0 #[K]\n",
+ "D1=32.0 #cm\n",
+ "D1=D1/100 #[m]\n",
+ "D2=36.0 #[cm]\n",
+ "D2=D2/100 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "A1=math.pi*D1**2 #[sq m]\n",
+ "A2=math.pi*D2**2 #[sq m]\n",
+ "e1=0.03 \n",
+ "e2=e1 \n",
+ "Q=sigma*A1*(T1**4-T2**4)/(1.0/e1+(A1/A2)*(1.0/e2-1)) #[W]\n",
+ "Q=Q*3600.0/1000 #[kJ/h]\n",
+ "Q=abs(Q) #[kJ/h]\n",
+ "lamda=201.0 #kJ/kg\n",
+ "m_dot=Q/lamda #Evaporation rate in [kg/h]\n",
+ "#Result\n",
+ "print\"Nitrogen evaporates at\",round(m_dot,3),\"kg/h\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Nitrogen evaporates at 0.047 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.13,Page no:4.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaporation in concenric vessels\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "D1=250.0 #Inner sphere idameter[mm]\n",
+ "D1=D1/1000 #Outer diameter [m]\n",
+ "D2=350.0 #[mm]\n",
+ "D2=D2/1000 #[m]\n",
+ "sigma=5.67*10**-8 #W/(sq m.K**4)\n",
+ "#Calculation\n",
+ "A1=math.pi*D1**2 #[sq m]\n",
+ "A2=math.pi*D2**2 #[sq m]\n",
+ "T1=76.0 #[K]\n",
+ "T2=300.0 #[K]\n",
+ "e1=0.04 \n",
+ "e2=e1 \n",
+ "Q=sigma*A1*(T1**4-T2**4)/((1.0/e1)+(A1/A2)*((1.0/e2)-1)) #[W]\n",
+ "Q=-2.45 #Approximate\n",
+ "Q=abs(Q) #[W]\n",
+ "Q=Q*3600.0/1000 #[kJ/h]\n",
+ "lamda=200.0 #kJ/kg\n",
+ "Rate=Q/lamda #[kg/h]\n",
+ "#Result\n",
+ "print\"Rate of evaporation is\",Rate,\"kg/h\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-2.4112304452\n",
+ "Rate of evaporation is 0.0441 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.15,Page no:4.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#infinitely long plates\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/(m**2.K**4)]\n",
+ "e1=0.4\n",
+ "e3=0.2\n",
+ "T1=473 #[K]\n",
+ "T3=303 #[K]\n",
+ "#Calculation\n",
+ "Q_by_a=sigma*(T1**4-T3**4)/((1.0/e1)+(1.0/e3)-1) #[W/sq m]\n",
+ "#Q1_by_a=sigma*(T1**4-T2**4)/((1/e1)+(1/e2)-1)=sigma*A*(T2**4-T3**4)/((1/e2)+(1/e3)-1) #[W/sq m]\n",
+ "e2=0.5\n",
+ "#Solving we get\n",
+ "T2=((6.0/9.5)*((3.5/6)*T3**4+T1**4))**(1.0/4.0) #[K]\n",
+ "Q1_by_a=sigma*(T1**4-T2**4)/((1.0/e1)+(1.0/e2)-1) #[W/sq m]\n",
+ "red=(Q_by_a-Q1_by_a)*100/Q_by_a\n",
+ "#Result\n",
+ "print\"Heat transfer rate per unit area(WITHOUT SHIELD) due to radiation is\",round(Q_by_a,1),\"W/sq m\"\n",
+ "print\"\\nHeat transfer rate per unit area(WITH SHIELD) due to radiation is\",round(Q1_by_a,2),\"W/sq m\"\n",
+ "print\"\\nReduction in heat loss is\",round(red,2),\"%\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer rate per unit area(WITHOUT SHIELD) due to radiation is 363.1 W/sq m\n",
+ "\n",
+ "Heat transfer rate per unit area(WITH SHIELD) due to radiation is 248.44 W/sq m\n",
+ "\n",
+ "Reduction in heat loss is 31.58 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.16,Page no:4.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat exchange between parallel plates\n",
+ "from scipy.optimize import fsolve\n",
+ "import math\n",
+ "#In steady state,we can write:\n",
+ "#Qcd=Qdb\n",
+ "#sigma(Tc**4-Td**4)*/(1/ec+1/ed-1)=sigma(Td**4-Tb**4)/(1/ed+1/eb-1)\n",
+ "# i.e Td**4=0.5*(Tc**4-Tb**4)\n",
+ "#Variable declaration\n",
+ "Ta=600 #[K]\n",
+ "eA=0.8 \n",
+ "eC=0.5 \n",
+ "eD=0.4 \n",
+ "sigma=5.67*10**-8 #For air\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#(600**4-Tc**4)/2.25=(Tc**4-Td**4)/3.5\n",
+ "#1.56*(600**4-Tc**4)=Tc**4-Td**4\n",
+ "#Putting value of Td in terms of Tc\n",
+ "#1.56*(600**4-Tc**4)=Tc**4-0.5*(Tc**4-300**4)\n",
+ "def f(Tc):\n",
+ " y=1.56*(600**4-Tc**4)-Tc**4+0.5*(Tc**4-300**4)\n",
+ " return(y)\n",
+ "Tc=fsolve(f,500) #[K]\n",
+ "#or\n",
+ "Tc=560.94 #[K] Approximate after solving\n",
+ "Td=math.sqrt(math.sqrt(0.5*(Tc**4-300**4))) #[K]\n",
+ "Q_by_a=sigma*(Ta**4-Tc**4)/(1/eA+1/eC-1) #[W/sq m]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Steady state temperatures,Tc=\",Tc,\"K,and Td=\",round(Td,2),\" K\"\n",
+ "print\"Rate of heat exchange per unit area=\",round(Q_by_a,2),\"W/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steady state temperatures,Tc= 560.94 K,and Td= 461.73 K\n",
+ "Rate of heat exchange per unit area= 770.95 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.17,Page no:4.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Thermal radiation in pipe\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/(sq m.K**4)]\n",
+ "e=0.8\n",
+ "T1=673 #[K]\n",
+ "T2=303 #[K]\n",
+ "Do=200 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "L=1 #Let [m]\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "A1=math.pi*Do*L #[m**2/m]\n",
+ "#CAse 1: Pipe to surrundings\n",
+ "\n",
+ "Q1=e*A1*sigma*(T1**4-T2**4) #[W/m]\n",
+ "Q1=5600 #Approximated\n",
+ "#Q1=5600 #[W/m] approximated in book for calculation purpose\n",
+ "#Concentric cylinders\n",
+ "e1=0.8 \n",
+ "e2=0.91 \n",
+ "D1=0.2 #[m]\n",
+ "D2=0.4 #[m]\n",
+ "Q2=sigma*0.628*(T1**4-T2**4)/((1/e1)+(D1/D2)*((1/e2)-1)) #[W/m] length\n",
+ "Red=Q1-Q2 #Reduction in heat loss\n",
+ "\n",
+ "#Result\n",
+ "print\"Due to thermal radiaiton,Loss of heat to surrounding is\",round(Q1),\"W/m\"\n",
+ "print\"When pipe is enclosed in 1 400 mm diameter brick conduit,Loss of heat is\",round(Q2),\"W/m\" \n",
+ "print\" Reduction in heat loss is\",round(Red),\"W/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Due to thermal radiaiton,Loss of heat to surrounding is 5600.0 W/m\n",
+ "When pipe is enclosed in 1 400 mm diameter brick conduit,Loss of heat is 5390.0 W/m\n",
+ " Reduction in heat loss is 210.0 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.18,Page no:4.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer in concentric tube\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/(sq m.K**4)]\n",
+ "T1=813.0 #[K]\n",
+ "T2=473.0 #[K]\n",
+ "e1=0.87 \n",
+ "e2=0.26 \n",
+ "D1=0.25 #[m]\n",
+ "D2=0.3 #[m]\n",
+ "#Calculation\n",
+ "Q_by_a1=sigma*(T1**4-T2**4)/(1.0/e1+(D1/D2)*(1.0/e2-1.0)) #[W/ sqm]\n",
+ "#Result\n",
+ "print\"Heat transfer by radiaiton is\",round(Q_by_a1),\"W/sq m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer by radiaiton is 6229.0 W/sq m\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.19,Page no:4.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat exchange between black plates\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "A1=0.5*1 #[sq m]\n",
+ "F12=0.285\n",
+ "T1=1273 #/[K]\n",
+ "T2=773 #[K]\n",
+ "#Calculation\n",
+ "Q=sigma*A1*F12*(T1**4-T2**4) #[W]\n",
+ "#Result\n",
+ "print\"Net radiant heat exchange between plates is\",round(Q),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net radiant heat exchange between plates is 18334.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.20,Page no:4.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Radiation shield\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "T1=750 #[K]\n",
+ "T2=500 #[K]\n",
+ "e1=0.75 \n",
+ "e2=0.5 \n",
+ "\n",
+ "#Calculation\n",
+ "#Heat transfer without shield :\n",
+ "Q_by_a=sigma*(T1**4-T2**4)/((1/e1)+(1/e2)-1) #[W/sq m]\n",
+ "\n",
+ "#Heat transfer with shield:\n",
+ "R1=(1-e1)/e1 #Resistance 1\n",
+ "F13=1 \n",
+ "R2=1/F13 #Resistance 2\n",
+ "e3=0.05\n",
+ "R3=(1-e3)/e3 #Resistance 3\n",
+ "R4=(1-e3)/e3 #Resistance 4\n",
+ "F32=1 \n",
+ "R5=1/F32 #Resistance 5\n",
+ "R6=(1-e2)/e2 #Resistance 6\n",
+ "Total_R=R1+R2+R3+R4+R5+R6 #Total resistance\n",
+ "Q_by_as=sigma*(T1**4-T2**4)/Total_R #[W/sq m]\n",
+ "Red=(Q_by_a-Q_by_as)*100/Q_by_a #Reduciton in heat tranfer due to shield \n",
+ "\n",
+ "#Result\n",
+ "print\"Reduction in heat transfer rate as a result of radiaiotn shield is\",round(Red,2),\"percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reduction in heat transfer rate as a result of radiaiotn shield is 94.35 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.21,Page no:4.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer with radiaiton shield\n",
+ "\n",
+ "#Variable declaration\n",
+ "e1=0.3\n",
+ "e2=0.8\n",
+ "\n",
+ "#Calculation\n",
+ "#Let sigma*(T1**4-T2**4)=z=1(const)\n",
+ "z=1 #Let\n",
+ "Q_by_A=z/(1/e1+1/e2-1) #W/sq m\n",
+ "\n",
+ "#Heat transfer with radiation shield \n",
+ "e3=0.04\n",
+ "F13=1 \n",
+ "F32=1 \n",
+ "#The resistances are:\n",
+ "R1=(1-e1)/e1\n",
+ "R2=1.0/F13\n",
+ "R3=(1-e3)/e3\n",
+ "R4=R3\n",
+ "R5=1.0/F32\n",
+ "R6=(1-e2)/e2\n",
+ "R=R1+R2+R3+R4+R5+R6 #Total resistance\n",
+ "Q_by_As=z/R #where z=sigma*(T1**4-T2**4) #W/sq m\n",
+ "red=(Q_by_A-Q_by_As)*100/Q_by_A #Percent reduction in heat transfer\n",
+ "\n",
+ "#Result\n",
+ "print\"The heat transfer is reduced by\",round(red,1),\"% due to shield\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer is reduced by 93.2 % due to shield\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.22,Page no:4.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Radiaition shape factor\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 \n",
+ "T1=1273 #[K]\n",
+ "T2=773 #[K]\n",
+ "T3=300 #[K]\n",
+ "A1=0.5 #[sq m]\n",
+ "A2=A1 #[sq m]\n",
+ "F12=0.285 \n",
+ "F21=F12 \n",
+ "F13=1-F12 \n",
+ "F23=1-F21 \n",
+ "e1=0.2 \n",
+ "e2=0.5\n",
+ "\n",
+ "#Calculation\n",
+ "#Resistance in the network are calculated as:\n",
+ "R1=1-e1/(e1*A1)\n",
+ "R2=1-e2/(e2*A2)\n",
+ "R3=1.0/(A1*F12)\n",
+ "R4=1.0/(A1*F13)\n",
+ "R5=1.0/(A2*F23)\n",
+ "R6=0 #Given (1-e3)/e3*A3=0\n",
+ "#Also\n",
+ "Eb1=sigma*T1**4 #W/sq m\n",
+ "Eb2=sigma*T2**4 #[W/sq m]\n",
+ "Eb3=sigma*T3**4 #[W/sq m]\n",
+ "\n",
+ "#Equations are:\n",
+ "#(Eb1-J1)/2+(J2-J1)/7.018+(Eb3-J1)/2.797=0\n",
+ "#(J1-J2)/7.018+(Eb3-J2)/2.797+(Eb2-J2)/2=0\n",
+ "\n",
+ "#On solving we get:\n",
+ "J1=33515 #[W/sq m]\n",
+ "J2=15048 #[W/sqm]\n",
+ "J3=Eb3 #[W/sq m]\n",
+ "Q1=(Eb1-J1)/((1.0-e1)/(e1*A1)) #[W/sq m]\n",
+ "Q2=(Eb2-J2)/((1.0-e2)/(e2*A2)) #[W/sq m]\n",
+ "Q3=(J1-J3)/(1.0/(A1*F13))+(J2-J3)/(1.0/(A2*F23)) #[W/sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Total heat lost by plate 1 is\",round(Q1),\"W/sq m\"\n",
+ "print\"Total heat lost by plate 2 is\",round(Q2),\"W/sq m\" \n",
+ "print\"The net energy lost by both plates must be absorbed by the room\",round(Q3,1),\"=\",round(Q1+Q2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total heat lost by plate 1 is 14423.0 W/sq m\n",
+ "Total heat lost by plate 2 is 2598.0 W/sq m\n",
+ "The net energy lost by both plates must be absorbed by the room 17032.9 = 17021.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.23,Page no:4.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Radiation loss in plates\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=5.67*10**-8 #[W/sq m.K**4]\n",
+ "e1=0.7 \n",
+ "e2=0.7 \n",
+ "T1=866.5 #[K]\n",
+ "T2=588.8 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q_by_A=sigma*(T1**4-T2**4)/((1/e1)+(1/e2)-1) #[W/sq m]\n",
+ "e1=0.7 \n",
+ "e2=e1 \n",
+ "e3=e1 \n",
+ "e4=e1 \n",
+ "e=e1 \n",
+ "#Q with n shells =1/(n+1)\n",
+ "n=2\n",
+ "Q_shield=1/(n+1) \n",
+ "es1=e1 \n",
+ "es2=e1 \n",
+ "Q_by_A=sigma*(T1**4-T2**4)/((1/e1)+(1/e2)+2*(1/es1+1/es2)-(n+1)) #[W/sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n New Radiaiton loss is\",round(Q_by_A,1),\"W/sq m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " New Radiaiton loss is 4513.9 W/sq m\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.24,Page no:4.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Radiation in Concentric tube\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "#1.WITHOUT SHIELD\n",
+ "sigma=5.67*10**-8 \n",
+ "e1=0.12 \n",
+ "e2=0.15 \n",
+ "T1=100 #[K]\n",
+ "T2=300 #[K]\n",
+ "r1=0.015 #[m]\n",
+ "r2=0.045 #[m]\n",
+ "L=1 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "A1=2*math.pi*r1*L #[sq m]\n",
+ "Q_by_L=2*math.pi*r1*sigma*(T1**4-T2**4)/(1/e1+(r1/r2)*(1/e2-1)) #[W/m]\n",
+ "#-ve saign indicates that the net heat flow is in the radial inward direction\n",
+ "print \"Without shield,Q=\",round(Q_by_L,3),\"W/m\"\n",
+ "#2.WITH CYLINDRICAL RADIATION SHIELD\n",
+ "e3=0.10 \n",
+ "e4=0.05 \n",
+ "r3=0.0225 #[m]\n",
+ "Qs_by_L=2*math.pi*r1*sigma*(T1**4-T2**4)/(1/e1+r1/r2*(1/e2-1)+(r1/r3)*(1/e3+1/e4-1)) #[W/sq m]\n",
+ "red=(abs(Q_by_L)-abs(Qs_by_L))*100/abs(Q_by_L) #percent reduction in heat gain\n",
+ "\n",
+ "#Radiation network approach\n",
+ "A3=2*math.pi*r3 #[sq m]\n",
+ "A2=2*math.pi*r2 #[sq m]\n",
+ "F13=1 \n",
+ "F32=1 \n",
+ "R1=(1-e1)/(e1*A1)\n",
+ "R2=1.0/(A1*F13)\n",
+ "R3=(1-e3)/(e3*A3)\n",
+ "R4=(1-e4)/(e4*A3)\n",
+ "R5=1.0/(A3*F32)\n",
+ "R6=(1-e2)/(e2*A2)\n",
+ "\n",
+ "Qs=sigma*(T1**4-T2**4)/((1.0-e1)/(e1*A1)+1/(A1*F13)+(1.0-e3)/(e3*A3)+(1.0-e4)/(e4*A3)+1/(A3*F32)+(1.0-e2)/(e2*A2)) \n",
+ "\n",
+ "#Result\n",
+ "print\"With cylindrical radiaiton shield Heat gained by fluid per 1 m lengh of tube is\",round(Qs_by_L,3),\"W/m\" \n",
+ "print\"Percent reduction in heat gain is\",round(red,2),\"%\"\n",
+ "print\"With radiaiton network approach\",round(Qs,2),\"W/sqm \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Without shield,Q= -4.182 W/m\n",
+ "With cylindrical radiaiton shield Heat gained by fluid per 1 m lengh of tube is -1.446 W/m\n",
+ "Percent reduction in heat gain is 65.41 %\n",
+ "With radiaiton network approach -1.45 W/sqm \n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer/Chapter_5.ipynb b/Heat_Transfer/Chapter_5.ipynb
new file mode 100755
index 00000000..0c75a05d
--- /dev/null
+++ b/Heat_Transfer/Chapter_5.ipynb
@@ -0,0 +1,1858 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Heat Exchangers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.1,Page no:5.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Harpin exchanger\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Di=35.0 #[mm]\n",
+ "Di=Di/1000 #[m]\n",
+ "Do=42.0 #[mm]\n",
+ "Do=Do/1000 #[m]\n",
+ "#for benzene\n",
+ "mb_dot=4450.0 #[kg/h]\n",
+ "Cpb=1.779 #[kJ/(kg.K)]\n",
+ "t2=322.0 #[K]\n",
+ "t1=300.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q=mb_dot*Cpb*(t2-t1) #for benzene in [kJ/h]\n",
+ "#For toulene\n",
+ "T1=344.0 #[K]\n",
+ "T2=311.0 #[K]\n",
+ "Cpt=1.842 #[kJ/kg.K]\n",
+ "mt_dot=Q/(Cpt*(T1-T2)) #[kg/h]\n",
+ "Q=Q*1000.0/3600 #[W]\n",
+ "#Hot fluid(toluene)\n",
+ "#Cold fluid(benzene)\n",
+ "dT1=22.0 #[K]\n",
+ "dT2=11.0 #[K]\n",
+ "dTlm=(dT1-dT2)/(math.log(dT1/dT2)) #[K]\n",
+ "#Clod fluid:Inner pipe,benzene\n",
+ "Di=0.035 #[m]\n",
+ "Ai=(math.pi/4)*Di**2 #Flow area[sq m]\n",
+ "Gi=mb_dot/Ai #Mass velocity [kg/m**2.h]\n",
+ "Gi=Gi/3600 #[kg/m**2.s]\n",
+ "mu=4.09*10**-4 #[kg/(m.s)]\n",
+ "Nre=Di*Gi/mu #Reynolds number\n",
+ "Cp=Cpb*10**3 #[J/(kg.K)]\n",
+ "k=0.147 #[W/m.K]\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "hi=(k/Di)*0.023*(Nre**0.8)*(Npr**0.4) #[W/sq m.K]\n",
+ "hio=hi*Di/Do #[W/sq m.K]\n",
+ "D1=0.042 #Outside dia of inside pipe[mm]\n",
+ "D2=0.0525 #Inside dia of outside pipe[m]\n",
+ "De=round((D2**2-D1**2)/D1,4) #[m]\n",
+ "aa=math.pi*(D2**2-D1**2)/4 #Flow area[sq m]\n",
+ "Ga=mt_dot/aa #Mass velocity in [kg/m**2.h]\n",
+ "Ga=Ga/3600 #[kg/m**2.s]\n",
+ "mu=5.01*10**-4 #[kg/(m.s)]\n",
+ "Nre=De*Ga/mu #Reynolds number\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "ho=(k/De)*0.023*(Nre**0.8)*(Npr**0.3) #[W/sq m.K]\n",
+ "Uc=1.0/(1.0/ho+1.0/hio) #[W/sq m.K]\n",
+ "Rdi=1.6*10**-4 #Fouling factor [m**2.K/W]\n",
+ "Rdo=1.6*10**-4 #Fouling factor[m**2.K/W]\n",
+ "Rd=Rdi+Rdo #(m**2.K/W)\n",
+ "Ud=1.0/(1.0/Uc+Rd) #[W/sq m.K]\n",
+ "A=Q/(Ud*dTlm) #sq m\n",
+ "ex=0.136 #[sq m]\n",
+ "l=A/ex #m\n",
+ "tl=12 #Total length of one harpin of 6m [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Required surface is fulfilled by connecting\",round(l/tl),\"(three) 6m harpins in series\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.0236\n",
+ "Required surface is fulfilled by connecting 3.0 (three) 6m harpins in series\n"
+ ]
+ }
+ ],
+ "prompt_number": 156
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.2,Page no:5.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Length of pipe\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "ma_dot=300.0*1000.0/24 #Mass flow rate of acid in [kg/h]\n",
+ "mw_dot=500.0*1000.0/24 #Mass flow rate of water in [kg/h]\n",
+ "Cp1=1.465 #[kJ/kg.K]\n",
+ "T1=333.0 #[K]\n",
+ "T2=313.0 #[K]\n",
+ "Q=ma_dot*Cp1*(T1-T2) #[kJ/h]\n",
+ "Q=Q*1000.0/3600.0 #[W]\n",
+ "Cp2=4.187 #[kJ/kg.K]\n",
+ "t1=288.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "t2=(Q/(mw_dot*Cp2))+t1 #[K]\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K] \n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "dTlm=32.26 #Approximation in [K]\n",
+ "#Inner pipe\n",
+ "m_dot=12500.0 #[kg/h]\n",
+ "Di=0.075 #[m]\n",
+ "Ai=(math.pi/4.0)*Di**2 #[sq m]\n",
+ "G=ma_dot/Ai #[kg/m**2.h]\n",
+ "G=G/3600 #[kg/m**2.s]\n",
+ "mu=0.0112 #[kg/m.s]\n",
+ "k=0.302 #W/(m.K)\n",
+ "Nre=Di*G/mu #Reynold number\n",
+ "Npr=Cp1*10**3*mu/k #Prandtl number\n",
+ "hi=(k/Di)*0.023*(Nre**0.8)*(Npr**0.3) #W/sq m.K\n",
+ "Do=0.1 #[m]\n",
+ "hio=hi*Di/Do #W/sq m.K\n",
+ "D1=0.1 #[m]\n",
+ "D2=0.125 #[m]\n",
+ "De=(D2**2-D1**2)/D1 #[m]\n",
+ "Aa=(math.pi/4)*(D2**2-D1**2) #[sq m]\n",
+ "Ga=mw_dot/Aa #[kg/m**2.h]\n",
+ "Ga=Ga/3600 #[kg/sq m.s]\n",
+ "mu=0.0011 #[kg/m.s]\n",
+ "Nre=De*Ga/mu #Reynolds number\n",
+ "k=0.669 #for water\n",
+ "Npr=Cp2*10**3*mu/k #Prandtl number\n",
+ "ho=(k/De)*0.023*(Nre**0.8)*Npr**0.4 #[W/sq m.K]\n",
+ "xw=(Do-Di)/2 #[m]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #[m]\n",
+ "kw=46.52 #thermal conductivity of wall in [W/m.K]\n",
+ "Uc=1.0/(1.0/ho+1.0/hio+xw*Do/(kw*Dw)) #[W/sq m.K]\n",
+ "Ud=Uc #As dirt factor values are not given\n",
+ "round(Ud,1)\n",
+ "#Ud=195.32 #Approximation\n",
+ "A=Q/(Ud*dTlm) #[sq m]\n",
+ "L=A/(math.pi*Do) #[sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Area =\",round(A,2),\"m**2,\\nLength fo pipe required =\",round(L,2),\"m(approx)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area = 16.15 m**2,\n",
+ "Length fo pipe required = 51.41 m(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 173
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.3,Page no:5.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Double pipe heat exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "me_dot=5500.0 #[kg/h]\n",
+ "me_dot1=me_dot/3600 #[kg/s]\n",
+ "Di=0.037 #I.D of inner pipe in [m]\n",
+ "Ai=(math.pi/4)*Di**2 #[sq m]\n",
+ "G=me_dot1/Ai #[kg/sq m.s]\n",
+ "mu=3.4*10**-3 #[Pa.s] or [kg/(m.s)]\n",
+ "Nre=Di*G/mu #Reynolds number\n",
+ "Cp=2.68 #[kJ/kg.K]\n",
+ "Cp1=Cp*10**3 #[J/kgK]\n",
+ "k=0.248 #[W/m.K]\n",
+ "\n",
+ "#Calculation\n",
+ "Npr=Cp1*mu/k #Prandtl number\n",
+ "#Nre is greater than 10,000,Use Dittus-Boelter eqn:\n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**0.3) #Nusselt number\n",
+ "hi=k*Nnu/Di #[W/sq m.K]\n",
+ "T2=358.0 #[K]\n",
+ "T1=341 #[K]\n",
+ "Cp2=1.80 #[kJ/kg.K]\n",
+ "t2=335 #[K]\n",
+ "t1=303.0 #[K]\n",
+ "mt_dot=me_dot*Cp*(T2-T1)/(Cp2*(t2-t1)) #[kg/h]\n",
+ "mt_dot=mt_dot/3600 #[kg/s]\n",
+ "D1=0.043 #[m]\n",
+ "D2=0.064 #Inside dia of outer pipe\n",
+ "De=(D2**2-D1**2)/D1 #Equivalent diameter [m]\n",
+ "Aa=math.pi/4*(D2**2-D1**2) #[sq m]\n",
+ "Ga=mt_dot/Aa #kg/(sq m.s)\n",
+ "mu2=4.4*10**-4 # Viscosity of toluene Pa.s\n",
+ "k2=0.146 #For toluene [W/m.K]\n",
+ "Cp2=1.8*10**3 #J/kg.K\n",
+ "Nre=De*Ga/mu2 #Reynolds number\n",
+ "Npr=Cp2*mu2/k2 #Prandtl number\n",
+ "Nnu=0.023*Nre**0.8*Npr**0.4 #Nusselt number\n",
+ "ho=k2*Nnu/De #W/(sq m.K)\n",
+ "Dw=(D1-Di)/math.log(D1/Di) #[m]\n",
+ "x=0.003 #Wall thickness in [m]\n",
+ "Uo=1.0/(1.0/ho+(1.0/hi)*(D1/Di)+(x*D1/(46.52*Dw))) #[W/sq m.K]\n",
+ "dT1=38.0 #[K]\n",
+ "dT2=23 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Q=me_dot1*Cp*(T2-T1) #[kJ/s]\n",
+ "Q=Q*1000 #[J/s]\n",
+ "L=Q/(Uo*math.pi*D1*dTlm) #[m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Total lenggth of double pipe heat exchanger is\",round(L,1),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total lenggth of double pipe heat exchanger is 36.9 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.4,Page no:5.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Parallel flow arrangement\n",
+ "\n",
+ "#Variable declaration\n",
+ "mc_dot=1000.0 #[kg/h]\n",
+ "mc_dot=mc_dot/3600 #[kg/s]\n",
+ "mh_dot=250.0 #[kg/h]\n",
+ "mh_dot=mh_dot/3600 #[kg/s]\n",
+ "Cpc=4187.0 #[J/(kg.K)]\n",
+ "Cph=3350 #[W/K]\n",
+ "\n",
+ "#Calculation\n",
+ "w=mc_dot*Cpc #[W/K]\n",
+ "l=mh_dot*Cph #[W/K]\n",
+ "C=mh_dot*Cph/(mc_dot*Cpc)\n",
+ "U=1160.0 #[W/sq m.K]\n",
+ "A=0.25 #Heat transfer surface for exchanger in [sq m]\n",
+ "ntu=U*A/(mh_dot*Cph) #\n",
+ "E=(1-math.exp(-ntu*(1+C)))/(1+C) #Effectiveness of heat exchanger\n",
+ "T1=393.0 #Inlet temperature in [K]\n",
+ "t1=283 #Cooling water [K]\n",
+ "T2=T1-E*(T1-t1) #Outlet T of hot liquid \n",
+ "\n",
+ "t2=C*(T1-T2)+t1 #[K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Effectiveness of heat exchanger is \",round(E,3)\n",
+ "print\"Outlet temperature of hot liquid is \",round(T2,1),\"K(\",round(T2,1)-273,\"degree C)\"\n",
+ "print\"Outlet temperature of water is \",round(t2,2),\"K(\",round(t2,2)-273,\"degree C)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effectiveness of heat exchanger is 0.647\n",
+ "Outlet temperature of hot liquid is 321.9 K( 48.9 degree C)\n",
+ "Outlet temperature of water is 297.23 K( 24.23 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.5,Page no:5.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Counter flow exchanger\n",
+ "\n",
+ "#Variable declaration\n",
+ "Cpc=4187.0 #Specific heat of water in [J/(kg.K)]\n",
+ "Cph=2000.0 #Sp heat of oil in [J/(kg.K)]\n",
+ "mc_dot=1300.0/3600 #[kg/s]\n",
+ "mh_dot=550.0/3600 #[kg/s]\n",
+ "w=mc_dot*Cpc #[W/K]\n",
+ "o=mh_dot*Cph #[W/K]\n",
+ "\n",
+ "#Calculation\n",
+ "#Heat capacity of rate of hot fluid is smaller than water\n",
+ "U=1075.0 #[W/sq m.K]\n",
+ "A=1.0 #[sq m]\n",
+ "ntu=(U*A)/(mh_dot*Cph) \n",
+ "C=mh_dot*Cph/(mc_dot*Cpc) \n",
+ "E=(1-math.exp(-ntu*(1-C)))/(1-C*math.exp(-ntu*(1-C))) #Effeciency\n",
+ "T1=367.0 #[K]\n",
+ "t1=288.0 #[K]\n",
+ "T2=T1-E*(T1-t1) #Outlet temperature [K]\n",
+ "T2=round(T2,2)\n",
+ "#T2=291.83 #Approximated in book without precise calculation\n",
+ "t2=C*(T1-T2)+t1 #[K]\n",
+ "Q=mh_dot*Cph*(T1-T2) #[W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Effectiveness of exchanger is\",round(E,4)\n",
+ "print\"Outlet temperature of oil is\",T2,\"K(\",T2-273,\"degree C)\"\n",
+ "print\"Outlet temperature of water is\",round(t2,2),\"K(\",round(t2,2),\"degree C)\"\n",
+ "print\"Rate of heat transfer is\",round(Q,1),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effectiveness of exchanger is 0.9512\n",
+ "Outlet temperature of oil is 291.85 K( 18.85 degree C)\n",
+ "Outlet temperature of water is 303.19 K( 303.19 degree C)\n",
+ "Rate of heat transfer is 22962.5 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 169
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.6,Page no:5.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#LMTD approach\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "#LMTD Approach\n",
+ "Cph=4187.0 #[J/(kg.K)]\n",
+ "mh_dot=600.0/3600 #Hot side flow rate [kg/s]\n",
+ "mc_dot=1500.0/3600 #[kg/s]\n",
+ "Cpc=Cph #[J/kg.K]\n",
+ "T1=343.0 #[K]\n",
+ "T2=323.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q=mh_dot*Cph*(T1-T2) #[W]\n",
+ "t1=298.0 #[K]\n",
+ "t2=(mh_dot*Cph*(T1-T2))/(mc_dot*Cpc)+t1 #[K]\n",
+ "dT1=45.0 #[K]\n",
+ "dT2=17.0 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "hi=1600.0 #Heat transfer coeff in [W/sq m.K]\n",
+ "ho=hi #[W/sq m.K]\n",
+ "U=1.0/(1.0/hi+1.0/ho) #[W/sq m.K]\n",
+ "A=Q/(U*dTlm) #[sq m]\n",
+ "\n",
+ "#Effectiveness-NTU approach\n",
+ "#hot water:\n",
+ "h=mh_dot*Cph #[W/K]\n",
+ "c=mc_dot*Cpc #[W/K]\n",
+ "#Heat capacity rate of hot fluid is small\n",
+ "C=mh_dot*Cph/(mc_dot*Cpc) #\n",
+ "E=(T1-T2)/(T1-t1) #Effectiveness\n",
+ "#for paralell flow:\n",
+ "ntu=-math.log(1-E*(1+C))/(1+C) \n",
+ "A2=(ntu*mh_dot*Cph)/U #[sq m]\n",
+ "t2=C*(T1-T2)+t1 #[K]\n",
+ "\n",
+ "#Result\n",
+ "print\"By LMTD approach area of heat exchanger is\",round(A,3),\"m^2\"\n",
+ "print\"By Ntu approach Area of heat exchanger is\",round(A,3),\"m^2\"\n",
+ "print\"Outlet temperature of cold water=\",t2,\"K(\",t2-273,\"degree C)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "By LMTD approach area of heat exchanger is 0.607 m^2\n",
+ "By Ntu approach Area of heat exchanger is 0.607 m^2\n",
+ "Outlet temperature of cold water= 306.0 K( 33.0 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.7,Page no:5.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Shell and tube exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mw_dot=10.0 #[kg/s]\n",
+ "Cpw=4.187 #[kJ/(kg.K)]\n",
+ "t2=318.0 #[K]\n",
+ "t1=295 #[K]\n",
+ "Q=mw_dot*Cpw*(t2-t1) #[kJ/s]\n",
+ "Q=Q*1000 #W\n",
+ "dT1=98.0 #[K]\n",
+ "dT2=75 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "hi=850.0 #[W/sq m.K]\n",
+ "id=0.027 #Inside dia[m]\n",
+ "od=0.031 #Outside dia [m]\n",
+ "hio=hi*id/od #[W/sq m.K]\n",
+ "ho=6000.0 #Heat transfer coefficients[W/sq m.K]\n",
+ "Uo=1.0/(1.0/ho+1.0/hio) #[W/sq m.K]\n",
+ "Ao=Q/(Uo*dTlm) #[sq m]\n",
+ "L=4.0 #Length [m]\n",
+ "n=Ao/(math.pi*od*L) #[No. of tubes]\n",
+ "\n",
+ "#Result\n",
+ "print\"Number of tubes required =\",round(n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of tubes required = 44.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.8,Page no:5.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Order of Scale resistance\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mdot=7250 #Nitrobenzene in shell in [kg/h]\n",
+ "Cp=2.387 #[kJ/(kg.K)]\n",
+ "mu=7*10**-4 #Pa.s\n",
+ "k=0.151 #[W/m.K]\n",
+ "T1=400.0 #[K]\n",
+ "T2=317.0 #[K]\n",
+ "t1=305.0 #[K]\n",
+ "t2=345.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Q=mdot*Cp*(T1-T2) #[kJ/h]\n",
+ "Q=Q*1000.0/3600 #[W]\n",
+ "n=166.0 #no of tubes\n",
+ "L=5.0 #[m]\n",
+ "Do=0.019 #[m]\n",
+ "Di=0.015 #[m]\n",
+ "Ao=n*math.pi*Do*L #[sq m]\n",
+ "Uo=Q/(Ao*dTlm) #[W/sq m.K]\n",
+ "Ud=Uo\n",
+ "#Shell side heat transfer coefficient\n",
+ "Pt=0.025 #[m]\n",
+ "C_dash=Pt-(0.5*Do+0.5*Do)\n",
+ "\n",
+ "#Shell side crossflow area\n",
+ "B=0.15 #[m]\n",
+ "id=0.45 #[m]\n",
+ "ass=id*C_dash*B/Pt #[sq m]\n",
+ "#As there are two shell passes,area per pass is :\n",
+ "as_dash=ass/2 #[sq m]\n",
+ "\n",
+ "#Equivalent diameter of shell \n",
+ "De=4*(Pt**2-(math.pi/4)*Do**2)/(math.pi*Do) #[m]\n",
+ "\n",
+ "#Mass velocity on shell side\n",
+ "Gs=mdot/as_dash #[kg/m**2.h]\n",
+ "Gs=Gs/3600 #[kg/m**2.s]\n",
+ "mu=7.0*10**-4 #Pa.s\n",
+ "Cp=Cp*1000 #J/kg.K\n",
+ "Nre=De*Gs/mu #Reynold number\n",
+ "Npr=Cp*mu/k #Prandtls number\n",
+ "Nnu=0.36*Nre**0.55*Npr**(1.0/3.0) #Nusselts number\n",
+ "hi=1050.0 #[W/sq m .K]\n",
+ "ho=Nnu*k/De #[W/sq m.K]\n",
+ "Uo=1.0/(1.0/ho+(1.0/hi*(Do/Di))) #[W/sq m K]\n",
+ "Uc=Uo\n",
+ "Rd=(Uc-Ud)/(Uc*Ud) #m**2.K/W\n",
+ "\n",
+ "#Result\n",
+ "print\"Fouling factor=Sclae resistance=%.2e\" %round(Rd,6),\"m^2 K/W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fouling factor=Sclae resistance=9.65e-04 m^2 K/W\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.9,Page no:5.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Length of tube required\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.628 #W/(m.K)\n",
+ "rho=980.0 #[kg/m**3]\n",
+ "mu=6*10**-4 #kg/(m.s)\n",
+ "Cpw=4.187 #kJ/(kg.K)\n",
+ "Cp=Cpw*10**3 #J/(kg.K)\n",
+ "Di=25.0 #[mm]\n",
+ "Di=Di/1000 #[m]\n",
+ "\n",
+ "#Calculation\n",
+ "mw_dot=1200.0*10**-3*rho #Mass flow rate of water [kg/h]\n",
+ "mw_dot=mw_dot/3600.0 #[kg/s]\n",
+ "Ai=(math.pi*Di**2)/4.0 #Inside area of tube in sq m\n",
+ "G=mw_dot/Ai #kg/m**2.s\n",
+ "Nre=Di*G/mu #Reynolds number\n",
+ "Npr=Cp*mu/k #Pranddtl number\n",
+ "#Inside heat transfer coefficient\n",
+ "Nnu=0.023*Nre**0.8*Npr**0.4 #Nusselt number\n",
+ "hi=Nnu*k/Di #[W/sq m.K]\n",
+ "ho=6000.0 #[W#sq m.K]\n",
+ "Do=0.028 #[m]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #[m]\n",
+ "x=(Do-Di)/2 #[m]\n",
+ "k2=348.9 #thermal conductivity of metal in [W/m.K]\n",
+ "Uo=1.0/((1.0/ho)+(1.0/hi)*(Do/Di)+(x/k2)*(Do/Dw)) #[W/sq m.K]\n",
+ "t1=303.0 #[K]\n",
+ "t2=343.0 #[K]\n",
+ "Q=mw_dot*Cpw*(t2-t1) #[kJ/h]\n",
+ "Q=Q*1000.0 #[W]\n",
+ "Ts=393.0 #[K]\n",
+ "dT1=Ts-t1 #[K]\n",
+ "dT2=Ts-t2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Ao=Q/(Uo*dTlm) #[sq m]\n",
+ "L=Ao/(math.pi*Do) #Length\n",
+ "\n",
+ "#Result\n",
+ "print\"Length of tube required is\",round(L,2),\"m\" \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of tube required is 4.4 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.10,Page no:5.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Suitability of Exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m_dot=7250.0 #[kg/h] of nitrobenzene \n",
+ "Cp=2.387 #[kJ/kg.K]\n",
+ "mu=7*10**-4 #[kg/m.s]\n",
+ "k=0.151 #[W/m.K]\n",
+ "vis=1.0 \n",
+ "Ft=0.9 #LMTD correction factor\n",
+ "T1=400.0 #[K]\n",
+ "T2=317.0 #[K]\n",
+ "t1=333.0 #[K]\n",
+ "t2=300.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT1=T1-t1 #[K]\n",
+ "dT2=T2-t2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "#For nitrobenzene\n",
+ "Q=m_dot*Cp*(T1-T2) #[kJ/h]\n",
+ "Q=Q*1000.0/3600 #[W]\n",
+ "n=170.0 #No. of tubes\n",
+ "L=5.0 #[m]\n",
+ "Do=0.019 #[m]\n",
+ "Di=0.015 #[m]\n",
+ "Ao=n*math.pi*Do*L #[sq m]\n",
+ "Uo=Q/(Ao*Ft*dTlm) #[W/sq m.K]\n",
+ "Ud=Uo #[W/sq m.K]\n",
+ "B=0.15 #Baffle spacing [m]\n",
+ "Pt=0.025 #Tube pitch in [m]\n",
+ "C_dash=Pt-Do # ance in [m]\n",
+ "id=0.45 #[m]\n",
+ "\n",
+ "#Shell side cross flow area\n",
+ "ass=id*C_dash*B/Pt #[sq m]\n",
+ "\n",
+ "#Equivalent diameter of shell\n",
+ "De=4*(Pt**2-(math.pi/4)*(Do**2))/(math.pi*Do) #[m]\n",
+ "\n",
+ "#Mass velocity on shell side\n",
+ "Gs=m_dot/ass #[kg/(m.h)]\n",
+ "Gs=Gs/3600.0 #[kg/m**2.s]\n",
+ "mu=7.0*10**-4 #[kg/m.s]\n",
+ "Cp=Cp*1000.0 #[J/kg.K]\n",
+ "Nre=De*Gs/mu #Reynolds number\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "\n",
+ "#From empirical eqn:\n",
+ "mu_w=mu #\n",
+ "Nnu=0.36*Nre**0.55*Npr**(1.0/3.0)\n",
+ "ho=Nnu*k/De #[W/sq m.K]\n",
+ "hi=1050.0 #Given [W/sq m.K]\n",
+ "Uo=1.0/(1.0/ho+(1.0/hi)*(Do/Di)) #[W/sq m.K]\n",
+ "Uc=Uo #W/sq m.K\n",
+ "\n",
+ "#Suitability of heat exchanger\n",
+ "Rd_given=9*10**-4 #[W/sq m.K]\n",
+ "Rd=(Uc-Ud)/(Uc*Ud) #[W/sq m.K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Rd calculated(%.2e\"%Rd,\"W/m^2.K) is maximum allowable scale resistance\"\n",
+ "print\"As Rd calculated(%.2e\"%Rd,\"W/m^2K) is more than Rd given %.e(\"%Rd_given,\" W/m^2,K),the given heat exchanger is suitable\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rd calculated(1.01e-03 W/m^2.K) is maximum allowable scale resistance\n",
+ "As Rd calculated(1.01e-03 W/m^2K) is more than Rd given 9e-04( W/m^2,K),the given heat exchanger is suitable\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.11,Page no:5.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Number of tubes required\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mw_dot=1720.0 #water in [kg/h]\n",
+ "t1=293.0 #[K]\n",
+ "t2=318.0 #[K]\n",
+ "Cpw=4.28 #[kJ/kg.K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q=mw_dot*Cpw*(t2-t1) #[kJ/h]\n",
+ "Q=Q*1000.0/3600 #W\n",
+ "lamda=2230.0 #[kJ/kg]\n",
+ "dT1=90.0 #[K]\n",
+ "dT2=65.0 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "\n",
+ "#Calculation of inside heat transfer coefficient\n",
+ "Di=0.0225 #[m]\n",
+ "u=1.2 #[m/s]\\\n",
+ "rho=995.7 #[kg/m**3]\n",
+ "v=0.659*10**-6 #[m/s]\n",
+ "mu=v*rho #[kg/m.s]\n",
+ "Nre=Di*u*rho/mu #reynolds number\n",
+ "Cp=Cpw*1000 #[J/kg.K]\n",
+ "k=2.54 #[kJ/h.m.K]\n",
+ "k=k*1000.0/3600 #[W/m.K]\n",
+ "Npr=Cp*mu/k #Prandtl number\n",
+ "Nnu=0.023*Nre**0.8*Npr**0.4 #Nusselt number\n",
+ "hi=k*Nnu/Di #[W/sq m.K]\n",
+ "ho=19200.0 #[kJ/h.m**2.K]\n",
+ "ho=ho*1000.0/3600 #[W/m**2.K]\n",
+ "Do=0.025 #[m]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #[m]\n",
+ "x=(Do-Di)/2 #[m]\n",
+ "kt=460.0 #For tube wall material [kJ/h.m.K]\n",
+ "kt=kt*1000.0/3600 #[W/m.K]\n",
+ "Uo=1.0/(1.0/ho+(1.0/hi)*(Do/Di)+(x/kt)*(Do/Dw)) #[W/sq m.K]\n",
+ "#Q=Uo*Ao*dTlm\n",
+ "Ao=Q/(Uo*dTlm) #[sq m]\n",
+ "L=4.0 #Tube length in [m]\n",
+ "n=Ao/(math.pi*Do*L) #[Number of tubes]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Number of tubes required=\",round(n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of tubes required= 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.12,Page no:5.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Shell and tube heat exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "t1=290.0 #Inlet temperature of cooling water [K]\n",
+ "ho=2250.0 #Heat transfer coefficient based on inside area in [W/sq m.K]\n",
+ "lamda=400.0 #[kJ/kg] LAtent heat of benzene \n",
+ "mb_dot=14.4 #[t/h] Condensation rate of benzene vapour\n",
+ "Cpw=4.187 #Specific heat\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#With no Scale\n",
+ "Q=mb_dot*1000.0*lamda #Heat duty of condenser in [kJ/h]\n",
+ "Q=(Q/3600.0)*1000.0 #[W]\n",
+ "\n",
+ "#Shell and tube type of heat exchanger is used as a single pass surface condenser\n",
+ "Di=0.022 #I.D of tube[m]\n",
+ "L=2.5 #Length of each tube in [m]\n",
+ "n=120.0 #Number of tubes\n",
+ "A=math.pi*Di*L #Area of heat transfer per metre length in [m**2/m]\n",
+ "A=n*A #Total area of heat transfer in [m**2]\n",
+ "Ai=(math.pi/4.0)*Di**2 #Cross-sectional area of each tube in [m**2]\n",
+ "Ai=n*Ai #Total area of flow in [m**2]\n",
+ "\n",
+ "u=0.75 #Velocty of water [ms**-1]\n",
+ "V=u*Ai #Volumetric flow of water \n",
+ "rho=1000.0 #[Density of water in [kg/m**3]]\n",
+ "mw_dot=V*rho #Mass flow rate of water in [kg/s]\n",
+ "\n",
+ "#Heat balance\n",
+ "#Q=mw_dot*Cpw*(t2-t1)\n",
+ "t2=Q/(mw_dot*Cpw*1000)+t1 #[K]\n",
+ "T=350.0 #Condensing benzene temperature in [K]\n",
+ "dT1=T-t1 #[K]\n",
+ "dT2=T-t2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #LMTD\n",
+ "U=Q/(A*dTlm) #[W/m**2.K]\n",
+ "U=round(U)\n",
+ "\n",
+ "#Neglecting resistance,we have:\n",
+ "hi=1/(1/U-1/ho) #[W/m**2.K]\n",
+ "\n",
+ "#hi is proportional to u**0.8\n",
+ "C=hi/(u**0.8) #Constant\n",
+ "\n",
+ "#With Scale\n",
+ "Rd=2.5*10**-4 #[m**2 K./W]\n",
+ "def f(u):\n",
+ " def g(u):\n",
+ " hi=C*u**0.8\n",
+ " U=1/(1/hi+1/ho+Rd)\n",
+ " return(U)\n",
+ " def h(u):\n",
+ " mw=rho*u*Ai\n",
+ " return(mw)\n",
+ " def j(u):\n",
+ " t2=290+(8.373/u)\n",
+ " dT1=T-t1\n",
+ " dT2=T-t2\n",
+ " dT1lm=(dT1-dT2)/math.log(dT1/dT2) \n",
+ " return(dT1lm)\n",
+ " dem=1.89*g(u)*j(u)*A/(16*10**5)\n",
+ " return(dem)\n",
+ "lhs=1.89\n",
+ "i=-1 #flag\n",
+ "lists=[2,2.5,3,4,3.8]\n",
+ "for u in lists:\n",
+ " rhs=f(u)\n",
+ " print\"u=\",u,\"rhs=\",round(rhs,4)\n",
+ " i=i+1\n",
+ "print\"rhs=\",round(rhs,4),\"=lhs=\",lhs\n",
+ "\n",
+ "#Result\n",
+ "print\"So,Water velocity must be\",lists[i],\" m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u= 2 rhs= 1.7453\n",
+ "u= 2.5 rhs= 1.8009\n",
+ "u= 3 rhs= 1.8407\n",
+ "u= 4 rhs= 1.8944\n",
+ "u= 3.8 rhs= 1.8856\n",
+ "rhs= 1.8856 =lhs= 1.89\n",
+ "So,Water velocity must be 3.8 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.13,Page no:5.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Length of pipe in Exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mh_dot=1.25 #[kg/s]\n",
+ "Cpw=4.187*10**3 #Heat capacity of water in [J/kg.K]\n",
+ "lamda=315.0 #[kJ/kg]\n",
+ "Q=mh_dot*lamda #Rate of heat transfer from vapour [kJ/s]\n",
+ "Q=Q*10**3 #[W]\n",
+ "Ts=345.0 #Temperature of condensing vapour[K]\n",
+ "t1=290.0 #Inlet temperature of water [K]\n",
+ "t2=310.0 #Outlet temperature of water[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT1=Ts-t1 #[K]\n",
+ "dT2=Ts-t2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "#Heat removed from vapour = Heat gained\n",
+ "mw_dot=Q/(Cpw*(t2-t1)) #[kg/s]\n",
+ "hi=2.5 #[kW/sq m.K]\n",
+ "hi=hi*1000 #[W/sq m.K]\n",
+ "Do=0.025 #[m]\n",
+ "Di=0.020 #[m]\n",
+ "hio=hi*(Di/Do) #Inside heat transfer cosfficient referred to outside dia in [W/sq m.K]\n",
+ "ho=0.8 #Outside heat tranbsfer coefficient in [kW/sq m.K]\n",
+ "ho=ho*1000.0 #[W/sq m.K]\n",
+ "Uo=1.0/(1.0/ho+1.0/hio) #[W/sq m.K]\n",
+ "#Ud is 80% of Uc\n",
+ "Ud=(80.0/100)*Uo #[W/sq m.K]\n",
+ "Ao=Q/(Ud*dTlm) #[sq m]\n",
+ "L=1.0 #[m]\n",
+ "A=math.pi*Do*L #Outside area of pipe per m length of pipe\n",
+ "len=Ao/A #Total length of piping required.\n",
+ "rho=1000.0 #[kg/m**3]\n",
+ "V=mw_dot/rho #[m**3/s]\n",
+ "v=0.6 #[m/s]\n",
+ "a=V/v #Cross-sectional area for flow pass [sq m]\n",
+ "a1=(math.pi*Di**2.0)/4 #[sq m]\n",
+ "#for single pass on tube side fluid(water)\n",
+ "n=round(a/a1) #No. of tubes per pass\n",
+ "l=len/n #Length of each tube in [m]\n",
+ "#For two passes on water side:\n",
+ "tn=2*n #Total no of tubes\n",
+ "l2=len/tn #Length of each tube in [m]\n",
+ "#For four passes on water side/tube side\n",
+ "tn2=4*n #Total no. of tubes\n",
+ "l3=len/tn2 #Length of each tube in [m]\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"No. of tubes=\",tn2,\"\\nLength of tube=\",round(l3,2),\"m\"\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of tubes= 100.0 \n",
+ "Length of tube= 2.48 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 93
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.14,Page no:5.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Dirt factor\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "#Properties of crude oil:\n",
+ "Cpc=1.986 #[kJ/(kg.K)]\n",
+ "mu1=2.9*10**-3 #[N.s/sq m]\n",
+ "k1=0.136 #[W/m.K]\n",
+ "rho1=824 #[kg/m**3]\n",
+ "#Properties of bottom product:\n",
+ "Cp2=2.202 #[kJ/kg.K]\n",
+ "rho2=867.0 #[kg/m**3]\n",
+ "mu2=5.2*10**-3 #[N.s/sq m]\n",
+ "k2=0.119 #[W/sq m.K]\n",
+ "mc_dot=135000.0 #Basis: cruid oil flow rate in [kg/h]\n",
+ "m_dot=106000.0 #Bottom product flow rate inn [kg/h]\n",
+ "t1=295.0 #[K]\n",
+ "t2=330.0 #[K]\n",
+ "T1=420.0 #[K]\n",
+ "T2=380.0 #[K]\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Q=mc_dot*Cpc*(t2-t1) #kJ/h\n",
+ "Q=Q*1000.0/3600 #[W]\n",
+ "#Shell side calculations:\n",
+ "Pt=25.0 #[mm]\n",
+ "Pt=Pt/1000 #[m]\n",
+ "B=0.23 #[m]\n",
+ "Do=0.019 #[m]Outside diameter for square pitch \n",
+ "c_dash=Pt-Do # ance in [m]\n",
+ "id=0.6 #[m]\n",
+ "ass=id*c_dash*B/Pt # Cross flow area of shell [sq m]\n",
+ "#since there is a Calculaiton mistake ,we take:\n",
+ "ass=0.0353 \n",
+ "Gs=m_dot/ass #Shell side mass velocity in [kg/sq m.h]\n",
+ "Gs=Gs/3600 #[kg/sq m.s]\n",
+ "De=4*(Pt**2-(math.pi/4)*Do**2)/(math.pi*Do) #[m]\n",
+ "Nre=De*Gs/mu2 #Reynolds number\n",
+ "Npr=Cp2*1000*mu2/k2 #Prandtl number\n",
+ "muw=mu2 #Since mu/muw=1\n",
+ "Nnu=0.36*(Nre**0.55)*Npr**(1.0/3.0)*(mu2/muw)**(0.14) #Nusselt number\n",
+ "ho=Nnu*k2/De #[W/sq m.K]\n",
+ "#Tube side heat transfer coefficient:\n",
+ "n=324.0 #No. of tubes\n",
+ "n_p=324.0/2 #No.of tubes per pass\n",
+ "t=2.1 #Thickness in [mm]\n",
+ "t=t/1000 #[m]\n",
+ "Di=Do-2*t #I.d of tube in [m]\n",
+ "A=(math.pi/4)*(Di**2) #Cross-sectional area of one tube in [sq m]\n",
+ "A_p=n_p*A #Total area for flow per pass in [sq m]\n",
+ "G=mc_dot/A_p #[kg/sq m h]\n",
+ "G=G/3600.0 #[kg/sq m.s]\n",
+ "Nre=Di*G/mu1 #Reynolods number\n",
+ "Npr=42.35 #Prandtl number\n",
+ "Nnu=0.023*(Nre**0.8)*(Npr**0.4) #Nusselt number\n",
+ "hi=Nnu*k1/Di #[W/sq m.K]\n",
+ "hio=hi*Di/Do #[W/sq m.K]\n",
+ "Uo=1.0/(1.0/ho+1.0/hio) #[W/sq m.K]\n",
+ "Uc=Uo\n",
+ "L=4.88 #Length of tube in [m]\n",
+ "Ao=n*math.pi*Do*L #[sq m]\n",
+ "Ud=Q/(Ao*dTlm) #[W/sq m.K]\n",
+ "Rd=(Uc-Ud)/(Uc*Ud) #[m**2.K/W]\n",
+ "\n",
+ "#Result\n",
+ "print\"NOTE:The calculation of line no.36 to calculate 'ass' is wrongly done in Book by printing 0.0353,,..which is wrong\" \n",
+ "print\"\\nRd=%.2e\"%Rd,\"K/W,\\nwhich is less than the provided,so this if installed will not give required temperatures without frequent cleaning\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NOTE:The calculation of line no.36 to calculate 'ass' is wrongly done in Book by printing 0.0353,,..which is wrong\n",
+ "\n",
+ "Rd=7.34e-04 K/W,\n",
+ "which is less than the provided,so this if installed will not give required temperatures without frequent cleaning\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.15,Page no:5.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat transfer area\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "#CASE I:\n",
+ "Cp=4*10**3 #[J/kg.K]\n",
+ "t1=295 #[K]\n",
+ "t2=375 #[K]\n",
+ "sp=1.1 #Specific gravity of liquid \n",
+ "v1=1.75*10**-4 #Flow of liquid in [m**3/s]\n",
+ "rho=sp*1000 #[kg/m**3]\n",
+ "m_dot=v1*rho #[kg/s]\n",
+ "Q=m_dot*Cp*(t2-t1) #[W]\n",
+ "T=395 #[K]\n",
+ "dT1=T-t1 #[K]\n",
+ "dT2=T-t2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "U1A=Q/dTlm #[W/K]\n",
+ "#CASE-II\n",
+ "v2=3.25*10**-4 #Flow in [m**3/s]\n",
+ "T2=370 #[K]\n",
+ "m_dot=v2*rho #[kg/s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Q=m_dot*Cp*(T2-t1) #[W]\n",
+ "dT1=T-t1 #[K]\n",
+ "dT2=T-T2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "U2A=Q/dTlm #[W/K]\n",
+ "#since u is propn to v\n",
+ "#hi =C*v**0.8\n",
+ "\n",
+ "U2_by_U1=U2A/U1A \n",
+ "\n",
+ "ho=3400 #Heat transfer coeff for condensing steam in [W/sq m.K]\n",
+ "C=poly([0])\n",
+ "#Let C=1 and v=v1\n",
+ "#C=1 \n",
+ "v=v1 #=1.75*10**-4 m**3/s\n",
+ "hi=C*v**0.8\n",
+ "U1=1.0/(1.0/ho+1.0/hi) #\n",
+ "#When v=v2\n",
+ "v=v2 \n",
+ "hi=C*v**0.8\n",
+ "U2=1.0/(1.0/ho+1.0/hi) #\n",
+ "#Since U2=1.6U1\n",
+ "#On solving we get:\n",
+ "C=142497\n",
+ "v=v1\n",
+ "hi=C*v**0.8\n",
+ "U1=1.0/(1.0/ho+1.0/hi) #\n",
+ "A=U1A/U1 #Heat transfer area in [sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Overall heat transfer coefficient is\",round(U1,1),\"W/m^2.K and\\n\\nHeat transfer area is\",round(A,2),\"m^2\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall heat transfer coefficient is 135.1 W/m^2.K and\n",
+ "\n",
+ "Heat transfer area is 9.17 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.16,Page no:5.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Oil Cooler\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mo_dot=6*10**-2 #[kg/s]\n",
+ "Cpo=2*10**3 #Specific heat of oil in [J/kg.K]\n",
+ "Cpw=4.18*10**3 #Specific heat of water in [J/kg.K]\n",
+ "T1=420 #[K]\n",
+ "T2=320 #[K]\n",
+ "T=290 #[K] Water entering temperature\n",
+ "\n",
+ "#Calculation\n",
+ "Q=mo_dot*Cpo*(T1-T2) #[J/s]=[W]\n",
+ "#Heat given out =Heat gained\n",
+ "t2=Q/(mo_dot*Cpw)+T #[K]\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-T #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "hi=1.6*1000 #[W/sq m.K]\n",
+ "ho=3.6*1000 #[W/sq m.K]\n",
+ "U=1.0/(1.0/ho+1.0/hi) #[W/sq m.K]\n",
+ "A=Q/(U*dTlm) #[sq m]\n",
+ "D=0.025 #[m]\n",
+ "L=A/(math.pi*D) #[m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Length of tube required =\",round(L,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of tube required = 2.66 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 106
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.17,Page no:5.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Countercurrent flow heat exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mb_dot=1.25 #Benzene in [kg/s]\n",
+ "Cpb=1.9*10**3 #For benzene in [J/kg.K]\n",
+ "Cpw=4.187*10**3 #in [J/kg.K]\n",
+ "T1=350 #[K]\n",
+ "T2=300 #[K]\n",
+ "Q=mb_dot*Cpb*(T1-T2) #[W]\n",
+ "t1=290 #[K]\n",
+ "t2=320 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "mw_dot=Q/(Cpw*(t2-t1)) #Minimum flow rate of water in [kg/s]\n",
+ "hi=850 #[W/sq m.K]\n",
+ "ho=1700 #[W/sq m.K]\n",
+ "Do=0.025 #[m]\n",
+ "Di=0.022 #[m]\n",
+ "x=(Do-Di) /2 #Thickness in [m]\n",
+ "hio=hi*(Di/Do) #[W/sq m.K]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #[m]\n",
+ "k=45.0 #[W/m.K]\n",
+ "Uo=1.0/((1.0/ho)+(1.0/hio)+(x/k)*(Do/Dw)) #[W/sq m.K]\n",
+ "Ao=Q/(Uo*dTlm) #[sq m]\n",
+ "L=1.0 #Length in [m]\n",
+ "area=math.pi*Do*L # Outside surface area of tube per i m length \n",
+ "Tl=Ao/area #Total length of tubing required in [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Total length of tubing required=\",round(Tl),\"m\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total length of tubing required= 163.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.18,Page no:5.61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Vertical Exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m_dot=4500.0 #Benzene condensation rate in [kg/h]\n",
+ "lamda=394.0 #Latent heat of condensation of benzene in [kJ/kg]\n",
+ "Q=m_dot*lamda #[kJ/h]\n",
+ "Q=Q*1000.0/3600 #[W]\n",
+ "Cpw=4.18 #[kJ/kg.K]\n",
+ "t1=295.0 #[K]\n",
+ "t2=300.0 #[K]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#For water :\n",
+ "mw_dot=Q/(Cpw*1000*(t2-t1)) #[kg/s]\n",
+ "rho=1000.0 #[kg/m**3\n",
+ "V=mw_dot/rho #Volumetric flow rate in [m**3/s]\n",
+ "u=1.05 #[m/s]\n",
+ "A=V/u #Cross-sectional area required in [sq m]\n",
+ "#For tube:\n",
+ "x=1.6 #thickness in [mm]\n",
+ "x=x/1000 #[m]\n",
+ "Do=0.025 #[m]\n",
+ "Di=Do-2*x #[m]\n",
+ "A1=(math.pi*Di**2)/4 #Of one tube [sq m]\n",
+ "n=A/A1 #No. of tubes reuired \n",
+ "n=round(n)\n",
+ "L=2.5 #Length of tube in [m]\n",
+ "Ao=n*math.pi*Do*L #Surface area for heat transfer in [sq m]\n",
+ "Ts=353.0 #Condensing temp of benzene in [K]\n",
+ "T1=295.0 #Inlet temperature in [K]\n",
+ "T2=300.0 #Outlet temperature in [K]\n",
+ "dT1=Ts-T1 #[K]\n",
+ "dT2=Ts-T2 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Uo=Q/(Ao*dTlm) #[W/sq mK]\n",
+ "Ud=Uo #[W/sq m.K]\n",
+ "#OVERALL HEAT TRANSFER COEFFCIENT:\n",
+ "#Inside side:\n",
+ "T=(T2+T1)/2 #[K]\n",
+ "hi=1063*((1+0.00293*T)*u**0.8)/(Di**0.2) #[W/sq m.K]\n",
+ "hio=hi*(Di/Do) #[W/sq m.K]\n",
+ "Dw=(Do-Di)/math.log(Do/Di) #[m]\n",
+ "k=45.0 #For tube in [W/(m.)]\n",
+ "#Outside of tube:\n",
+ "mdot_dash=1.25/n #[kg/s]\n",
+ "M=mdot_dash/(math.pi*Do) #[kg/(m.s)]\n",
+ "k=0.15 #[W/(m.K)]\n",
+ "rho=880.0 #[kg/m**3]\n",
+ "mu=0.35*10**-3 #[N.s/sq m]\n",
+ "g=9.81 #[m/s**2] Acceleration due to gravity\n",
+ "hm=(1.47*((4*mdot_dash)/mu)**(-1.0/3.0))/(mu**2/(k**3*rho**2*g))**(1.0/3.0) #[W/sq m.K]\n",
+ "ho=hm #[W/sq m.K]\n",
+ "k=45 #[W/m]\n",
+ "Uo=1.0/(1.0/ho+1.0/hio+(x*Do)/(k*Dw))\n",
+ "#Uo=1/(1/ho+1/hio+(x*Do/(k*Dw))) #Overall heat transfer coefficient in [W/sq m.K]\n",
+ "Uc=Uo #[W/sq m.K]\n",
+ "Rd=(Uc-Ud)/(Uc*Ud) #Maximum allowable sclae resistance in [K/W]\n",
+ "\n",
+ "#Result\n",
+ "print\"Uc(\",round(Uc),\"W/m^2.K) is in excess of Ud(\",round(Ud),\"W/m^2.K),therefore we allow for reasonable scale resistance,\\nRd=%.1e\"%Rd,\"K/W\\n\" \n",
+ "print\"No.of tubes =\",n\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uc( 994.0 W/m^2.K) is in excess of Ud( 754.0 W/m^2.K),therefore we allow for reasonable scale resistance,\n",
+ "Rd=3.2e-04 K/W\n",
+ "\n",
+ "No.of tubes = 60.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 114
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.19,Page no:5.64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Countercurrent Heat Exchanger\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mw_dot=5 #Water flow rate in [kg/s]\n",
+ "Cpw=4.18 #Heat capacity of water [kJ/kg.K]\n",
+ "t1=303 #[K]\n",
+ "t2=343 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q=mw_dot*Cpw*(t2-t1) #[kJ/s]\n",
+ "Q=Q*1000 #[W]\n",
+ "T1=413 #[K]\n",
+ "T2=373 #[K]\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "dTlm=dT1 #/[K]\n",
+ "hi=1000 #[W/sq m.K]\n",
+ "ho=2500 #[W/sq m.K]\n",
+ "Rd=1.0/(0.714*1000) #Fouling factor[m**2.K/KW]\n",
+ "U=1.0/(1.0/hi+1.0/ho+Rd) #[W/sq m.K]\n",
+ "A=Q/(U*dTlm) #[sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat transfer area is\",round(A,2),\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer area is 33.45 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no5.20:,Page no:5.65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Number of tube side pass\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Cpo=1.9 #Heat capacity for oil[kJ/kg.K]\n",
+ "Cps=1.86 #Heat capacity for steam [kJ/kg.K]\n",
+ "ms_dot=5.2 #Mass flow rate in [kg/s]\n",
+ "T1=403.0 #[K]\n",
+ "T2=383.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "Q=ms_dot*Cps*(T1-T2) #[kJ/s]\n",
+ "Q=Q*1000.0 #[W]\n",
+ "t1=288.0 #[K]\n",
+ "t2=358.0 #[K]\n",
+ "dT2=T1-t2 #[K]\n",
+ "dT1=T2-t1 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #LMTD in [K]\n",
+ "U=275.0 #Overall heat transfer coeffcient in [W#sq m.K]\n",
+ "Ft=0.97 #LMTD correction factor\n",
+ "A=Q/(U*Ft*dTlm) #[sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat exchanger surface area is\",round(A,2),\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat exchanger surface area is 10.84 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.21,Page no:5.66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Number of tubes passes\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mc_dot=3.783 #Cold water flow rate[kg/s]\n",
+ "mh_dot=1.892 #Hot water flow rate [kg/s]\n",
+ "Cpc=4.18 #Sp heat of cold water [kJ/(kg.K)]\n",
+ "T1=367.0 #[K]\n",
+ "t2=328.0 #[K]\n",
+ "t1=311.0 #[K]\n",
+ "Cph=4.18 #Specific heat of hot water [kJ/(kg.K)]\n",
+ "rho=1000.0 #Density [kg/m**3]\n",
+ "D=0.019 #Diameter of tube in [m]\n",
+ "U=1450.0 #Overal heat transfer coefficient in [W/sq m.K] \n",
+ "\n",
+ "#Calculation\n",
+ "T2=T1-mc_dot*Cpc*(t2-t1)/(mh_dot*Cph) #[K]\n",
+ "Q=mc_dot*Cpc*(t2-t1) #[kJ/s]\n",
+ "Q=Q*1000.0 #[W]\n",
+ "#For counterflow heat exchanger\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=17.0 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "lmtd=dTlm #LMTD \n",
+ "Ft=0.88 #LMTD correction factor\n",
+ "A=Q/(U*dTlm) #[sq m]\n",
+ "u=0.366 #Velocity through tubes[ms**-1]\n",
+ "Ai=mc_dot/(rho*u) #Total flow Area in [sq m]\n",
+ "n=Ai/((math.pi/4)*(D**2)) #No. of tubes \n",
+ "L=1.0 #Per m length[m]\n",
+ "sa=math.pi*D*L #S.S per tube per 1 m length\n",
+ "L=A/(n*math.pi*D) #Length of tubes in [m]\n",
+ "\n",
+ "#Result\n",
+ "print\"The length is more than allowable 2.44 m length,so we must use more than one tube\"\n",
+ "#For 2passes on the tube side\n",
+ "A=Q/(U*Ft*lmtd) #[sq m]\n",
+ "L=A/(2*n*math.pi*D) #Length in [m]\n",
+ "print\"This length is within 2.44 m requirement,so the design choice is:\\n\"\n",
+ "print\"--Type of heat exchanger : \\t1-2 Shell and tube heat exchanger\"\n",
+ "print\"--No of tubes per pass=\\t\\t\",round(n)\n",
+ "print\"--Length of tube per pass=\\t\",round(L,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length is more than allowable 2.44 m length,so we must use more than one tube\n",
+ "This length is within 2.44 m requirement,so the design choice is:\n",
+ "\n",
+ "--Type of heat exchanger : \t1-2 Shell and tube heat exchanger\n",
+ "--No of tubes per pass=\t\t36.0\n",
+ "--Length of tube per pass=\t1.83 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 125
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.22,Page no:5.67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Outlet temperature for hot and cold fluids\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "mh_dot=16.67 #Mass flow rate of hot fluid in [kg/s]\n",
+ "mc_dot=20.0 #Mass flow rate of cold fluid in [kg/s]\n",
+ "Cph=3.6 #Sp heat of hot fluid in [kJ/kg.K]\n",
+ "Cph=Cph*1000 #Sp heat of hot fluid in [J/kg.K]\n",
+ "Cpc=4.2 #Sp heat of cold fluid in [kJ/(kg.K)]\n",
+ "Cpc=Cpc*1000 #Sp heat of cold fluid in [J/(kg.K)]\n",
+ "U=400.0 #Overall heat transfer coefficient in [W/sq m.K]\n",
+ "A=100.0 #Surface area in [sq m]\n",
+ "\n",
+ "#Calculation\n",
+ "mCp_h=mh_dot*Cph #[J/s] or [W/K]\n",
+ "mCp_c=mc_dot*Cpc #[J/s] or [W/K]\n",
+ "mCp_small=mCp_h #[W/K]\n",
+ "C=mCp_small/mCp_c #Capacity ratio \n",
+ "ntu=U*A/mCp_small #NTU\n",
+ "T1=973.0 #Hot fluid inlet temperature in [K]\n",
+ "t1=373.0 #Cold fluid inlet temperature in [K]\n",
+ "\n",
+ "#Case 1:Countercurrent flow arrangement\n",
+ "E=(1.0-math.exp(-(1.0-C)*ntu))/(1.0-C*math.exp(-(1.0-C)*ntu)) #Effectiveness\n",
+ "E=round(E,2)\n",
+ "#W=T1-T2/(T1-t1) therefore:\n",
+ "T2=T1-E*(T1-t1) #[K]\n",
+ "print\"For countercurrent flow arrangement:\"\n",
+ "print\"Exit temperature of hot fluid is\",T2,\"K(\",T2-273,\"degree C)\"\n",
+ "t2=mCp_h*(T1-T2)/(mCp_c)+t1 #[From energy balance eqn in ][K]\n",
+ "print\"Exit temperature of cold fluid is\",round(t2),\" K(\",round(t2-273) ,\"degree C)\\n\"\n",
+ "\n",
+ "#Case 2:Parallel flow arrangement\n",
+ "E1=(1-math.exp(-(1.0+C)*ntu))/(1.0+C)\n",
+ "E1=round(E1,3)\n",
+ "T2=T1-E1*(T1-t1) #[K]\n",
+ "t2=mCp_h*(T1-T2)/(mCp_c)+t1 #[From energy balance eqn in ][K]\n",
+ "print\"For Parallel flow arrangement:\"\n",
+ "print\"Exit temperature of Hot water=\",T2,\"K(\",T2-273,\"degree C)\"\n",
+ "print\"Exit temperature of cold water=\",round(t2,1),\"K(\",round(t2-273,1),\"degree C)\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For countercurrent flow arrangement:\n",
+ "Exit temperature of hot fluid is 721.0 K( 448.0 degree C)\n",
+ "Exit temperature of cold fluid is 553.0 K( 280.0 degree C)\n",
+ "\n",
+ "For Parallel flow arrangement:\n",
+ "Exit temperature of Hot water= 734.8 K( 461.8 degree C)\n",
+ "Exit temperature of cold water= 543.2 K( 270.2 degree C)\n"
+ ]
+ }
+ ],
+ "prompt_number": 143
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.23,Page no:5.69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Counter flow concentric heat exchanger\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "#Variable declaration\n",
+ "Cpo=2131.0 #Sp heat of oil in [J/kg.K]\n",
+ "Cpw=4187.0 #Sp heat of water in [J/kg.K]\n",
+ "mo_dot=0.10 #Oil flow rate in [kg/s]\n",
+ "mw_dot=0.20 #Water flow rate in [kg/s]\n",
+ "U=380.0 #Overall heat transfer coeff in [W/sq m.K]\n",
+ "T1=373.0 #Initial temp of oil [K]\n",
+ "T2=333.0 #Final temperature of oil [K]\n",
+ "t1=303.0 #Water enter temperature in [K]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "t2=t1+mo_dot*Cpo*(T1-T2)/(mw_dot*Cpw) #[K] \n",
+ "\n",
+ "#1.LMTD method\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "lmtd=dTlm #[K]\n",
+ "Q=mo_dot*Cpo*(T1-T2) #[J/s]\n",
+ "A=Q/(U*dTlm) #[sq m]\n",
+ "Do=0.025 #Inner tubve diameter [m]\n",
+ "L=A/(math.pi*Do) #Length in [m]\n",
+ "\n",
+ "#2.NTU method\n",
+ "mCp_c=mw_dot*Cpw #[W/K]\n",
+ "mCp_h=mo_dot*Cpo #[W/K]\n",
+ "print\"In textbook value of mCp_h is wrongly calculated as 231.1 so we will take this only for calculation\\n\"\n",
+ "mCp_h=231.1 #[W/K]\n",
+ "#mCp_h is smaller\n",
+ "C=mCp_h/mCp_c\n",
+ "E=(T1-T2)/(T1-t1) #Effeciency\n",
+ "#For countercurrent flow\n",
+ "def f(ntu):\n",
+ " x=E-(1.0-math.exp(-(1.0-C)*ntu))/(1.0-C*math.exp(-(1.0-C)*ntu))\n",
+ " return(x)\n",
+ "ntu=fsolve(f,1)\n",
+ "A=ntu*mCp_h/U #[sq m]\n",
+ "A=round(A[0],2)\n",
+ "L1=A/(math.pi*Do) #Length in [m]'\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"From LMTD approach:\\nlength=\",round(L,2),\"m\\n\" \n",
+ "print\"From NTU method:\\nlength=\",round(L1,2),\"m\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In textbook value of mCp_h is wrongly calculated as 231.1 so we will take this only for calculation\n",
+ "\n",
+ "From LMTD approach:\n",
+ "length= 6.61 m\n",
+ "\n",
+ "From NTU method:\n",
+ "length= 7.26 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 166
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.24,Page no:5.70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Number of tubes required\n",
+ "import math\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "#Variable declaration\n",
+ "ho=200.0 #[W/sq m.K]\n",
+ "hi=1500.0 #[W/sq m.K]\n",
+ "Cpw=4.2 #Sp heat of Water in [kJ/(kg.K)]\n",
+ "Cpo=2.1 #Sp heat of Oil in [kJ/(kg.K)]\n",
+ "E=0.8 #Effectiveness\n",
+ "k=46.0 #[W/m.K]\n",
+ "m_dot=0.167 #[kg/s]\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "mCp_oil=2*m_dot*Cpo*1000.0 #For oil [W/K]\n",
+ "#mCp_oil is wrongly calculated as 710.4\n",
+ "mCp_water=m_dot*Cpw*1000.0 #For water [W/K]\n",
+ "#mCp_oil is wrongly calculated as 710.4\n",
+ "#NOTE:The above two values are wrongly calculated in book as 710.4\n",
+ "#so we take here:\n",
+ "mCp_small=710.4 #[W/K]\n",
+ "#Since both mCp_water and mCp_oil are equal ,therefore:\n",
+ "C=1.0 \n",
+ "def f(ntu):\n",
+ " x=E-(ntu/(1+ntu))\n",
+ " return(x)\n",
+ "ntu=fsolve(f,1)\n",
+ "id=20.0 #Internal diameter in [mm]\n",
+ "od=25.0 #External diameter in [mm]\n",
+ "hio=hi*id/od #[W/sq m.K]\n",
+ "Dw=(od-id)/math.log(od/id) #[mm]\n",
+ "Dw=Dw/1000.0 #[m]\n",
+ "x=(od-id)/2.0 #[mm]\n",
+ "x=x/1000.0 #[m]\n",
+ "Do=0.025 #External dia in [m]\n",
+ "L=2.5 #Length of tube in [m]\n",
+ "Uo=1.0/(1.0/ho+1.0/hio+(x/k)*(Dw/Do)) #[W/sq m.K]\n",
+ "A=ntu*mCp_small/Uo #Heat transfer area in [sq m]\n",
+ "n=A/(math.pi*Do*L) #No of tubes\n",
+ "\n",
+ "#Result\n",
+ "print\"No. of tubes required =\",round(n+1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of tubes required = 86.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.25,Page no:5.72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Parallel and Countercurrent flow\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "#(i)Parallel flow\n",
+ "T1=633.0 #[K]\n",
+ "t2=303.0 #[K]\n",
+ "T2=573.0 #[K]\n",
+ "t1=400.0 #[K]\n",
+ "\n",
+ "#Calculation\n",
+ "dT1=T1-t2 #[K]\n",
+ "dT2=T2-t1 #[K]\n",
+ "mh_dot=1.2 #[kg/s]\n",
+ "U=500.0 #Overall heat transfer coefficient in [W/sqm.K]\n",
+ "Cp=2083.0 #Sp.heat of oil J/kg.K\n",
+ "dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]\n",
+ "Q=mh_dot*Cp*(T1-T2) #[W]\n",
+ "A=Q/(U*dTlm) #[sq m]\n",
+ "\n",
+ "#(ii)Counter current flow\n",
+ "dT1=T1-t1 #[K]\n",
+ "dT2=T2-t2 #[K]\n",
+ "dTlm=(dT2-dT1)/math.log(dT2/dT1) #[K]\n",
+ "A1=Q/(U*dTlm) #[sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"For parallel flow,Area =\",round(A,3),\"m^2\\nFor countercurrent flow,Area=\",round(A1,3),\"m^2\\n\"\n",
+ "print\"For the same terminal temperatures of the fluid ,\\nthe surface area for the counterflow arrangement is less than the required for the parallel flow\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For parallel flow,Area = 1.234 m^2\n",
+ "For countercurrent flow,Area= 1.195 m^2\n",
+ "\n",
+ "For the same terminal temperatures of the fluid ,\n",
+ "the surface area for the counterflow arrangement is less than the required for the parallel flow\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer/Chapter_6.ipynb b/Heat_Transfer/Chapter_6.ipynb
new file mode 100755
index 00000000..10f9ffc5
--- /dev/null
+++ b/Heat_Transfer/Chapter_6.ipynb
@@ -0,0 +1,1104 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Evaporation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.1,Page no:6.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Boiling point Elevation\n",
+ "#Variable declaration\n",
+ "T=380 #B.P of solution[K]\n",
+ "T_dash=373 #B.P of water [K]\n",
+ "Ts=399 #Saturating temperature in [K]\n",
+ "#Calculation\n",
+ "BPE=T-T_dash #Boiling point elevation in [K]\n",
+ "DF=Ts-T #Driving force in [K]\n",
+ "#Result\n",
+ "print\"Boiling point of elevation of the solution is\",BPE,\"K\"\n",
+ "print\"Driving forve for heat transfer is\",DF,\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boiling point of elevation of the solution is 7 K\n",
+ "Driving forve for heat transfer is 19 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.2 ,Page no:6.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Capacity of evaporator\n",
+ "#Variable declaration\n",
+ "m_dot=10000 #Weak liquor entering in [kg/h]\n",
+ "fr_in=0.04 #Fraciton of caustic soda IN i.e 4%\n",
+ "fr_out=0.25 #Fraciton of caustic soda OUT i.e 25%\n",
+ "#Let mdash_dot be the kg/h of thick liquor leaving\n",
+ "\n",
+ "#Calculation\n",
+ "mdash_dot=fr_in*m_dot/fr_out #[kg/h]\n",
+ "\n",
+ "#Overall material balance\n",
+ "#kg/h of feed=kg/h of water evaporated +kg/h of thick liquor\n",
+ "#we=water evaporated in kg/h\n",
+ "#Therefore\n",
+ "we=m_dot-mdash_dot #[kg/h]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Capacity of evaporator is\",we,\"kg/h\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of evaporator is 8400.0 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no: 6.3,Page no:6.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Economy of Evaporator\n",
+ "#Variable declaration\n",
+ "ic=0.05 #Initial concentration (5%)\n",
+ "fc=0.2 #Final concentration (20%)\n",
+ "T_dash=373 #B.P of water in [K]\n",
+ "bpe=5 #Boiling point elevation[K]\n",
+ "mf_dot=5000 #[Basis] feed to evaporator in [kg/h]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Material balance of solute\n",
+ "mdash_dot=ic*mf_dot/fc #[kg/h]\n",
+ "#Overall material balance\n",
+ "mv_dot=mf_dot-mdash_dot #Water evaporated [kg/h]\n",
+ "lambda_s=2185 #Latent heat of condensation of steam[kJ/kg]\n",
+ "lambda_v=2257 #Latent heat of vaporisation of water [kJ/kg]\n",
+ "lambda1=lambda_v #[kJ/kg]\n",
+ "T=T_dash+bpe #Temperature of thick liquor[K]\n",
+ "Tf=298 #Temperature of feed [K]\n",
+ "Cpf=4.187 #Sp. heat of feed in [kJ/kg.K]\n",
+ "#Heat balance over evaporator=ms_dot\n",
+ "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s #Steam consumption [kg/h]\n",
+ "Eco=mv_dot/ms_dot #Economy of evaporator\n",
+ "Ts=399 #Saturation temperature of steam in [K]\n",
+ "dT=Ts-T #Temperature driving force [K] \n",
+ "U=2350 #[W/sq m.K]\n",
+ "Q=ms_dot*lambda_s #Rate of heat transfer in [kJ/kg]\n",
+ "Q=Q*1000/3600 #[J/s]=[W]\n",
+ "A=Q/(U*dT) #Heat transfer area in [sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"ANSWER:Economoy pf evaporator is \",round(Eco,3)\n",
+ "print\"Heat tarnsfer area to be provided = \",round(A,2),\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ANSWER:Economoy pf evaporator is 0.808\n",
+ "Heat tarnsfer area to be provided = 57.07 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no: 6.4,Page no:6.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Steam economy\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Cpf=3.98 #Specific heat of feed in kJ/(kg.K)\n",
+ "lambda_s=2202 #Latent heat of conds of heat at 0.2MPa in [kJ/kg]\n",
+ "lambda1=2383 #Latent heat of vaporisation of water aty 323 [kJ/kg\n",
+ "ic=0.1 #Initial concentration of soilds in [%]\n",
+ "fc=0.5 #Final concentration\n",
+ "m_dot=30000 #Feed to evaporator in [kg/h]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "mdash_dot=ic* m_dot/fc #Mass flow rate of thick liquor in [kg/h]\n",
+ "mv_dot=m_dot-mdash_dot #Water evaporated in [kg/h]\n",
+ "\n",
+ "#Case 1: Feed at 293K\n",
+ "mf_dot=30000 #[kg/h]\n",
+ "mv_dot=24000 #[kg/h]\n",
+ "Cpf=3.98 #[kJ/(kg.K)]\n",
+ "Ts=393 #Saturation temperature of steam in [K]\n",
+ "T=323 #Boiling point of solution [K]\n",
+ "lambda_s=2202 #Latent heat of condensation [kJ/kg]\n",
+ "lambda1=2383 #Latent heat of vaporisation[kJ/kg]\n",
+ "Tf=293 #Feed temperature\n",
+ "#Enthalpy balance over the evaporator:\n",
+ "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s #Steam consumption[kg/h]\n",
+ "eco=(mv_dot/ms_dot) #Steam economy\n",
+ "print\"When Feed introduced at 293 K ,Steam economy is \",round(eco,2) \n",
+ "dT=Ts-T #[K]\n",
+ "U=2900 #[W/sq m.K]\n",
+ "Q=ms_dot*lambda_s #Heat load =Rate of heat transfer in [kJ/h]\n",
+ "Q=Q*1000/3600 #[J/s]\n",
+ "A=Q/(U*dT) #Heat transfer area required [sq m]\n",
+ "\n",
+ "#Result\n",
+ "print\"ANSWER-(i) At 293 K,Heat transfer area required is\",round(A,2),\"m^2\"\n",
+ "\n",
+ "#Case2: Feed at 308K\n",
+ "Tf=308 #[Feed temperature][K]\n",
+ "\n",
+ "#Calculation\n",
+ "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s #Steam consumption in [kg/h]\n",
+ "eco=mv_dot/ms_dot #Economy of evaporator\n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000/3600 #[J/s]\n",
+ "A=Q/(U*dT) #Heat transfer area required [sq m]\n",
+ "#Result\n",
+ "print\"ANSWER-(ii) When T=308 K,Economy of evaporator is \",round(eco,3)\n",
+ "print\"ANSWER-(iii) When T=308 K,Heat transfer Area required is \",round(A,2),\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When Feed introduced at 293 K ,Steam economy is 0.87\n",
+ "ANSWER-(i) At 293 K,Heat transfer area required is 83.16 m^2\n",
+ "ANSWER-(ii) When T=308 K,Economy of evaporator is 0.896\n",
+ "ANSWER-(iii) When T=308 K,Heat transfer Area required is 80.71 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no: 6.5,Page no:6.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaporator economy\n",
+ "#Variable declaration\n",
+ "m_dot=5000 #Feed to the evaporator [kg/h]\n",
+ "Cpf=4.187 #Cp of feed in [kJ/kg.K]\n",
+ "ic=0.10 #Initial concentration\n",
+ "fc=0.4 #Final concentration\n",
+ "lambda_s=2162 #Latent heat of condensing steam [kJ/kg]\n",
+ "P=101.325 #Pressure in the evaporator[kPa]\n",
+ "bp=373 #[K]\n",
+ "Hv=2676 #Enthalpy of water vapor [kJ/kg]\n",
+ "H_dash=419 #[kJ/kg]\n",
+ "Hf=170 #[kJ/kg]\n",
+ "U=1750 #[W/sq m.K]\n",
+ "dT=34 #[K]\n",
+ "#Calculation\n",
+ "mdash_dot=m_dot*ic/fc #[kg/h] of thick liquor\n",
+ "mv_dot=m_dot-mdash_dot #Water evaporated in[kg/h]\n",
+ "ms_dot=(mv_dot*Hv+mdash_dot*H_dash-m_dot*Hf)/lambda_s #Steam consumption in [kg/h]\n",
+ "eco=mv_dot/ms_dot #Steam economy of evaporator\n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000/3600 #[J/s]\n",
+ "A=Q/(U*dT) #[sq m]\n",
+ "#Result\n",
+ "print\"Heat transfer area to be provided is\",round(A,2),\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer area to be provided is 45.33 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.6 ,Page no:6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Single effect Evaporator\n",
+ "#Variable declaration\n",
+ "mf_dot=5000 #[kg/h]\n",
+ "ic=0.01 #Initial concentration [kg/h]\n",
+ "fc=0.02 #Final concentration [kg/h]\n",
+ "T=373 #Boiling pt of saturation in [K]\n",
+ "Ts=383 #Saturation temperature of steam in [K] \n",
+ "Hf=125.79 #[kJ/kg]\n",
+ "Hdash=419.04 #[kJ/kg]\n",
+ "Hv=2676.1 #[kJ/kg]\n",
+ "lambda_s=2230.2 #[kJ/kg]\n",
+ "#Calculation\n",
+ "mdash_dot=ic*mf_dot/fc #[kg/h]\n",
+ "mv_dot=mf_dot-mdash_dot #Water evaporated in [kg/h]\n",
+ "ms_dot=(mdash_dot*Hdash+mv_dot*Hv-mf_dot*Hf)/lambda_s #Steam flow rate in [kg/h]\n",
+ "eco=mv_dot/ms_dot #Steam economy\n",
+ "Q=ms_dot*lambda_s #Rate of heat transfer in [kJ/h]\n",
+ "Q=Q*1000/3600 #[J/s]\n",
+ "dT=Ts-T #[K]\n",
+ "\n",
+ "A=69 #Heating area of evaporator in [sq m]\n",
+ "U=Q/(A*dT) #Overall heat transfer coeff in [W/sq m.K]\n",
+ "\n",
+ "#Result\n",
+ "print\"Steam economy is\",round(eco,3)\n",
+ "print\"Overall heat transfer coefficient is\",round(U),\"W/m^2.K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam economy is 0.784\n",
+ "Overall heat transfer coefficient is 2862.0 W/m^2.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no: 6.7,Page no:6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Single efect evaporator reduced pressure\n",
+ "#From previous example:\n",
+ "#Variable declaration\n",
+ "mf_dot=5000 #[kg/h]\n",
+ "Hf=125.79 #[kJ/kg]\n",
+ "lambda_s=2230.2 #[kJ/kg]\n",
+ "mdash_dot=2500 #[kg/h]\n",
+ "Hdash=313.93 #[kJ/kg]\n",
+ "mv_dot=2500 #[kg/h]\n",
+ "Hv=2635.3 #[kJ/kg]\n",
+ "U=2862 #[W/sq m.K]\n",
+ "dT=35 #[K]\n",
+ "#Calculation\n",
+ "ms_dot=(mdash_dot*Hdash+mv_dot*Hv-mf_dot*Hf)/lambda_s #Steam flow rate in [kg/h]\n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000/3600 #[W]\n",
+ "A=Q/(U*dT) #[sq m]\n",
+ "#Result\n",
+ "print\"The heat transfer area in this case is\",round(A,2),\"m^2\"\n",
+ "print\"NOTE :There is a calculation mistake in the book at the line12 of this code,ms_dot value is written as 2320.18,which is wrong\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer area in this case is 18.7 m^2\n",
+ "NOTE :There is a calculation mistake in the book at the line12 of this code,ms_dot value is written as 2320.18,which is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no: 6.8,Page no:6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Mass flow rate\n",
+ "#Variable declaration\n",
+ "mf_dot=6000 #Feed rate in [kg/h]\n",
+ "#Taking the given values from previous example(6.6)\n",
+ "Hf=125.79 #[kJ/kg]\n",
+ "ms_dot=3187.56 #[kg/h]\n",
+ "lambda_s=2230.2 #[kJ/kg]\n",
+ "Hdash=419.04 #[kJ/kg]\n",
+ "Hv=2676.1 #[kJ/kg]\n",
+ "#Calculation\n",
+ "mv_dot=(mf_dot*Hf+ms_dot*lambda_s-6000*Hdash)/(Hv-Hdash) #Water evaporated in [kg/h]\n",
+ "mdash_dot=6000-mv_dot #Mass flow rate of product [kg/h]\n",
+ "x=(0.01*mf_dot)*100/mdash_dot #Wt % of solute in products\n",
+ "#Result\n",
+ "print\"Mass flow rate of product is\",round(mdash_dot,1),\"kg/h\"\n",
+ "print\"The product concentration is\",round(x,3),\"% by weight\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate of product is 3629.9 kg/h\n",
+ "The product concentration is 1.653 % by weight\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.9 ,Page no:6.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Heat load in single effect evaporator\n",
+ "#Variable declaration\n",
+ "Tf=298 #Feed temperature in [K]\n",
+ "T_dash=373 #[K]\n",
+ "Cpf=4 #[kJ/kg.K]\n",
+ "fc=0.2 #Final concentration of salt\n",
+ "ic=0.05 #Initial concentration\n",
+ "mf_dot=20000 #[kg/h] Feed to evaporator\n",
+ "#Calculation\n",
+ "mdash_dot=ic*mf_dot/fc #Thick liquor [kg/h]\n",
+ "mv_dot=mf_dot-mdash_dot #Water evaporated in [kg/h]\n",
+ "lambda_s=2185 #[kJ/kg]\n",
+ "lambda1=2257 #[kJ/kg]\n",
+ "bpr=7 #Boiling point rise[K]\n",
+ "T=T_dash+bpr #Boiling point of solution in[K]\n",
+ "Ts=39 #Temperature of condensing steam in [K]\n",
+ "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s #Steam consumption in [kg/h]\n",
+ "eco=mv_dot/ms_dot #Economy of evaporator \n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000/3600 #[J/s]\n",
+ "#Result\n",
+ "print\"Heat load is\",round(Q),\"W or J/s\"\n",
+ "print\"Economy of evaporator is \",round(eco,3)\n",
+ "print\"NOTE:Again there is a calcualtion mistake in book at line 19 of code,it is written as 4041507.1 instead of 40415071\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat load is 11226389.0 W or J/s\n",
+ "Economy of evaporator is 0.811\n",
+ "NOTE:Again there is a calcualtion mistake in book at line 19 of code,it is written as 4041507.1 instead of 40415071\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.10 ,Page no:6.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Triple efect evaporator\n",
+ "#Variable declaration\n",
+ "Ts=381.3 #[K]\n",
+ "dT=56.6 #[K]\n",
+ "U1=2800.0 #Overall heat transfer coeff in first effect\n",
+ "U2=2200.0 #Overall heat transfer coeff in first effect\n",
+ "U3=1100.0 #Overall heat transfer coeff in first effect\n",
+ "#Calculation\n",
+ "dT1=dT/(1+(U1/U2)+(U1/U3)) #/[K]\n",
+ "dT2=dT/(1+(U2/U1)+(U2/U3)) #/[K]\n",
+ "dT3=dT-(dT1+dT2) #[K]\n",
+ "#dT1=Ts-T1_dash #[K]\n",
+ "T1dash=Ts-dT1\n",
+ "#dT2=T1_dash-T2_dash #[K]\n",
+ "T2_dash=T1dash-dT2 #[K]\n",
+ "#Result\n",
+ "print\"Boiling point of solution in first effect =\",round(T1dash,2),\"K\"\n",
+ "print\"Boiling point of solution in second effect =\",round(T2_dash,1),\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boiling point of solution in first effect = 369.55 K\n",
+ "Boiling point of solution in second effect = 354.6 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.11,Page no:6.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Double effect evaporator\n",
+ "#Variable declaration\n",
+ "mf_dot=10000.0 #[kg/h] of feed\n",
+ "ic=0.09 #Initial concentration \n",
+ "fc=0.47 #Final concentration\n",
+ "m1dot_dash=ic*mf_dot/fc #[kg/h]\n",
+ "Ps=686.616 #Steam pressure [kPa.g]\n",
+ "Ps=Ps+101.325 #[kPa]\n",
+ "Ts=442.7 #Saturation temperature in [K]\n",
+ "P2=86.660 #Vacuum in second effect in [kPa]\n",
+ "U1=2326.0 #Overall heat transfer in first effect [W/sq m.K]\n",
+ "U2=1744.5 #Overall heat transfer in 2nd effect [W/sqm.K]\n",
+ "P2_abs=101.325-P2 #Absolute pressure in second effect[kPa]\n",
+ "T2=326.3 #Temperature in 2nd effect in [K]\n",
+ "dT=Ts-T2 #[K]\n",
+ "Tf=309.0 #Feed temperature in[K]\n",
+ "T=273.0 #[K]\n",
+ "Cpf=3.77 #kJ/kg.K Specific heat for all caustic streams\n",
+ "#Q1=Q2\n",
+ "#U1*A1*dT1=U2*A2*dT2\n",
+ "#Calculation\n",
+ "dT2=dT/1.75 #[K]\n",
+ "dT1=(U2/U1)*dT2 #[K]\n",
+ "#Since there is no B.P.R\n",
+ "Tv1=Ts-dT1 #Temperature in vapor space of first effect in [K]\n",
+ "Tv2=Tv1-dT2 #Second effect [K]\n",
+ "Hf=Cpf*(Tf-T) #Feed enthalpy[kJ/kg]\n",
+ "H1dash=Cpf*(Tv1-T) #Enthalpy of final product[kJ/kg]\n",
+ "H2dash=Cpf*(Tv2-T) #kJ/kg\n",
+ "#For steam at 442.7 K\n",
+ "lambda_s=2048.7 #[kJ/kg]\n",
+ "#For vapour at 392.8 K\n",
+ "Hv1=2705.22 #[kJ/kg]\n",
+ "lambda_v1=2202.8 #[kJ/kg]\n",
+ "#for vapour at 326.3 K:\n",
+ "Hv2=2597.61 #[kJ/kg]\n",
+ "lambda_v2=2377.8 #[kJ/kg]\n",
+ "\n",
+ "#Overall material balance:\n",
+ "mv_dot=mf_dot-m1dot_dash #[kg/h]\n",
+ "\n",
+ "#Equation 4 becomes:\n",
+ "#mv1_dot*lambda_v1+mf_dot*Hf=(mv_dot-mv1_dot)*Hv2+(mf_dot-mv2_dot)*H2_dash\n",
+ "mv1_dot=(H2dash*(mf_dot-mv_dot)-mf_dot*Hf+mv_dot*Hv2)/(Hv2+lambda_v1-H2dash) \n",
+ "mv2_dot=mv_dot-mv1_dot #[kg/h]\n",
+ "\n",
+ "#From equation 2\n",
+ "\n",
+ "m2dot_dash=m1dot_dash+mv1_dot #First effect material balance[kg/h]\n",
+ "ms_dot=(mv1_dot*Hv1+m1dot_dash*H1dash-m2dot_dash*H2dash)/lambda_s #[kg/h]\n",
+ "\n",
+ "\n",
+ "#Heat transfer Area\n",
+ "#First effect\n",
+ "A1=ms_dot*lambda_s*(10.0**3.0)/(3600.0*U1*dT1) #[sq m]\n",
+ "\n",
+ "#Second effect\n",
+ "lambda_v1=lambda_v1*(10**3.0)/3600.0\n",
+ "A2=mv1_dot*lambda_v1/(U2*dT2) #[sq m]\n",
+ "\n",
+ "#Since A1 not= A2\n",
+ "\n",
+ "#SECOND TRIAL\n",
+ "Aavg=(A1+A2)/2 #[sq m]\n",
+ "dT1_dash=dT1*A1/Aavg #[K]\n",
+ "dT2_dash=dT-dT1 #/[K]\n",
+ "\n",
+ "#Temperature distribution\n",
+ "Tv1=Ts-dT1_dash #[K]\n",
+ "Tv2=Tv1-dT2_dash #[K]\n",
+ "Hf=135.66 #[kJ/kg]\n",
+ "H1dash=Cpf*(Tv1-T) #[kJ/kg]\n",
+ "H2dash=200.83 #[kJ/kg]\n",
+ "\n",
+ "#Vapour at 388.5 K\n",
+ "Hv1=2699.8 #[kJ/kg]\n",
+ "lambda_v1=2214.92 #[kJ/kg]\n",
+ "mv1_dot=(H2dash*(mf_dot-mv_dot)-mf_dot*Hf+mv_dot*Hv2)/(Hv2+lambda_v1-H2dash) \n",
+ "mv2_dot=mv_dot-mv1_dot #[kg/h]\n",
+ "\n",
+ "#First effect Energy balance\n",
+ "ms_dot=((mv1_dot*Hv1+m1dot_dash*H1dash)-(mf_dot-mv2_dot)*H2dash)/lambda_s #[kg/h]\n",
+ "\n",
+ "#Area of heat transfer\n",
+ "lambda_s=lambda_s*1000.0/3600.0 \n",
+ "A1=ms_dot*lambda_s/(U1*dT1_dash) #[sq m]\n",
+ "\n",
+ "#Second effect:\n",
+ "A2=(mv1_dot*lambda_v1*1000)/(3600.0*U2*dT2_dash) #[sq m]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"A1(\",round(A1,1),\")=A2(\",round(A2),\"),So the area in each effect can be\",round(A1,1),\"m^2\"\n",
+ "print\"Heat transfer surface in each effect is\",round(A1,1),\"m^2\"\n",
+ "print\"Steam consumption=\",round(ms_dot),\"(approx)kg/h\"\n",
+ "print\"Evaporation in the first effect is\",round(mv1_dot),\"kg/h\"\n",
+ "print\"Evaporation in 2nd effect is\",round(mv2_dot),\"kg/h\" \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A1( 24.9 )=A2( 23.0 ),So the area in each effect can be 24.9 m^2\n",
+ "Heat transfer surface in each effect is 24.9 m^2\n",
+ "Steam consumption= 5517.0 (approx)kg/h\n",
+ "Evaporation in the first effect is 4343.0 kg/h\n",
+ "Evaporation in 2nd effect is 3742.0 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.12 ,Page no:6.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#lye in Triple effect evaporator\n",
+ "#Variable declaration\n",
+ "Tf=353.0 #[K]\n",
+ "T=273.0 #[K]\n",
+ "mf_dot=10000.0 #Feed [kg/h]\n",
+ "ic=0.07 #Initial conc of glycerine \n",
+ "fc=0.4 #FinaL CONC OF GLYCERINE\n",
+ "#Overall glycerine balance\n",
+ "P=313.0 #Steam pressure[kPa]\n",
+ "Ts=408.0 #[from steam table][K]\n",
+ "P1=15.74 #[Pressure in last effect][kPa]\n",
+ "Tv3=328.0 #[Vapour temperature]\n",
+ "#Calculation\n",
+ "m3dot_dash=(ic/fc)*mf_dot #[kg/h]\n",
+ "mv_dot=mf_dot-m3dot_dash #/[kg/h]\n",
+ "dT=Ts-Tv3 #Overall apparent [K]\n",
+ "bpr1=10.0 #[K]\n",
+ "bpr2=bpr1 \n",
+ "bpr3=bpr2 \n",
+ "sum_bpr=bpr1+bpr2+bpr3 #[K]\n",
+ "dT=dT-sum_bpr #True_Overall\n",
+ "dT1=14.5 #[K]\n",
+ "dT2=16.0 #[K]\n",
+ "dT3=19.5 #[K]\n",
+ "Cpf=3.768 #[kJ/(kg.K)]\n",
+ "#Enthalpies of various streams\n",
+ "Hf=Cpf*(Tf-T) #[kJ/kg]\n",
+ "H1=Cpf*(393.5-T) #[kJ/kg]\n",
+ "H2=Cpf*(367.5-T) #[kJ/kg]\n",
+ "H3=Cpf*(338.0-T) #[kJ/kg]\n",
+ "#For steam at 40K\n",
+ "lambda_s=2160.0 #[kJ/kg]\n",
+ "Hv1=2692.0 #[kJ/kg]\n",
+ "lambda_v1=2228.3 #[kJ/kg]\n",
+ "Hv2=2650.8 #[kJ/kg]\n",
+ "lambda_v2=2297.4 #[kJ/kg]\n",
+ "Hv3=2600.5 #[kJ/kg]\n",
+ "lambda_v3=2370.0 #[kJ/kg]\n",
+ "\n",
+ "#MATERIAL AND EBERGY BALANCES\n",
+ "#First effect\n",
+ "#Material balance\n",
+ "\n",
+ "#m1dot_dash=mf_dot-mv1_dot\n",
+ "#m1dot_dash=1750+mv2_dot+mv3_dot \n",
+ "\n",
+ "#Energy balance\n",
+ "#ms_dot*lambda_s+mf_Dot*hf=mv1_dot*Hv1+m1dot_dash*H1\n",
+ "#2160*ms_dot+2238*(mv2_dot+mv3_dot)=19800500\n",
+ "\n",
+ "#Second effect\n",
+ "#Energy balance:\n",
+ "#mv3_dot=8709.54-2.076*mv2_dot\n",
+ "\n",
+ "#Third effect:\n",
+ "#m2dot_dash=mv3_dot+m3dot_dash\n",
+ "#m2dot_dash=mv3_dot+1750\n",
+ "#From eqn 8 we get\n",
+ "mv2_dot=(8709.54*2600.5+1750*244.92-8790.54*356.1-356.1*1750)/(-2.076*356.1+2297.4+2600.5*2.076)\n",
+ "#From eqn 8:\n",
+ "mv3_dot=8709.54-2.076*mv2_dot #[kg/h]\n",
+ "mv1_dot=mv_dot-(mv2_dot+mv3_dot) #[kg/h]\n",
+ "#From equation 4:\n",
+ "#m1dot_dash=mf_dot-mv1_dot\n",
+ "#ms_dot=(mv1_dot*Hv1+m1dot_dash*H1-mf_dot*Hf)/lambda_s #[kg/h]\n",
+ "ms_dot=(19800500.0-2238.0*(mv2_dot+mv3_dot))/2160.0 #[kg/h]\n",
+ "\n",
+ "#Heat transfer Area is\n",
+ "U1=710.0 #[W/sq m.K]\n",
+ "U2=490.0 #[W/sq m.K]\n",
+ "U3=454.0 #[W/sq m.K]\n",
+ "A1=(ms_dot*lambda_s*1000.0)/(3600.0*U1*dT1) #[sq m]\n",
+ "A2=mv1_dot*lambda_v1*1000.0/(3600.0*U2*dT2) #[sq m]\n",
+ "A3=mv2_dot*lambda_v2*1000.0/(3600.0*U3*dT3) #[sq m]\n",
+ "#The deviaiton is within +-10%\n",
+ "#Hence maximum A1 area can be recommended\n",
+ "\n",
+ "eco=(mv_dot/ms_dot) #[Steam economy]\n",
+ "\n",
+ "Qc=mv3_dot*lambda_v3 #[kJ/h]\n",
+ "dT=25.0 #Rise in water temperature\n",
+ "Cp=4.187\n",
+ "mw_dot=Qc/(Cp*dT)\n",
+ "#Result\n",
+ "print\"ANSWER:Area in each effect\",round(A3,1),\"sq m\" \n",
+ "print\"Steam economy is\",round(eco,2) \n",
+ "print\"Cooling water rate is\",round(mw_dot/1000,2),\"t/h\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ANSWER:Area in each effect 200.2 sq m\n",
+ "Steam economy is 2.55\n",
+ "Cooling water rate is 66.63 t/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.13 ,Page no:6.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Triple effect unit\n",
+ "#Variable declaration\n",
+ "Cpf=4.18 #[kJ/kg.K]\n",
+ "dT1=18 #[K]\n",
+ "dT2=17 #[K]\n",
+ "dT3=34 #[K]\n",
+ "mf_dot=4 #[kg/s]\n",
+ "Ts=394 #[K]\n",
+ "bp=325 #Bp of water at 13.172 kPa [K]\n",
+ "dT=Ts-bp #[K]\n",
+ "lambda_s=2200 #[kJ/kg]\n",
+ "T1=Ts-dT1 #[K]\n",
+ "lambda1=2249 #[kJ/kg]\n",
+ "lambda_v1=lambda1 #[kJ/kg]\n",
+ "#Calculation\n",
+ "T2=T1-dT2 #[K]\n",
+ "lambda2=2293 #[kJ/kg]\n",
+ "lambda_v2=lambda2 #[kJ/kg]\n",
+ "\n",
+ "T3=T2-dT3 #[K]\n",
+ "lambda3=2377 #[kJ/kg]\n",
+ "lambda_v3=lambda3 #[kJ/kg]\n",
+ "\n",
+ "ic=0.1 #Initial conc of solids\n",
+ "fc=0.5 #Final conc of solids\n",
+ "m3dot_dash=(ic/fc)*mf_dot #[kg/s]\n",
+ "mv_dot=mf_dot-m3dot_dash #Total evaporation in [kg/s]\n",
+ "#Material balance over first effect\n",
+ "#mf_dot=mv1_dot_m1dot_dash\n",
+ "#Energy balance:\n",
+ "#ms_dot*lambda_s=mf_dot*(Cpf*(T1-Tf)+mv1_dot*lambda_v1)\n",
+ "\n",
+ "#Material balance over second effect\n",
+ "#m1dot_dash=mv2_dot+m2dot_dash\n",
+ "#Enthalpy balance:\n",
+ "#mv1_dot*lambda_v1+m1dot_dash(cp*(T1-T2)=mv2_dot*lambda_v2)\n",
+ "\n",
+ "#Material balance over third effect\n",
+ "#m2dot_dash=mv3_dot+m3dot+dash\n",
+ "\n",
+ "#Enthalpy balance:\n",
+ "#mv2_lambda_v2+m2dot_dash*cp*(T2-T3)=mv3_dot*lambda_v3\n",
+ "294\n",
+ "mv2_dot=3.2795/3.079 #[kg/s]\n",
+ "mv1_dot=1.053*mv2_dot-0.1305 #[kg/s]\n",
+ "mv3_dot=1.026*mv2_dot+0.051 #[kg/s]\n",
+ "ms_dot=(mf_dot*Cpf*(T1-294)+mv1_dot*lambda_v1)/lambda_s #[kg/s]\n",
+ "eco=mv_dot/ms_dot #Steam economy \n",
+ "eco=round(eco)\n",
+ "U1=3.10 #[kW/sq m.K]\n",
+ "U2=2 #[kW/sq m.K]\n",
+ "U3=1.10 #[kW/sq m.K]\n",
+ "#First effect:\n",
+ "A1=ms_dot*lambda_s/(U1*dT1) #[sq m]\n",
+ "A2=mv1_dot*lambda_v1/(U2*dT2) #[sq m]\n",
+ "A3=mv2_dot*lambda_v2/(U3*dT3) #[sq m]\n",
+ "#Areas are calculated witha deviation of +-10%\n",
+ "#Result\n",
+ "print\"Steam economy is\",eco \n",
+ "print\"Area pf heat transfer in each effect is\",round(A3,1),\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam economy is 2.0\n",
+ "Area pf heat transfer in each effect is 65.3 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no: 6.14,Page no:6.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Quadruple effect evaporator\n",
+ "#Variable declaration\n",
+ "mf_dot=1060 #[kg/h]\n",
+ "ic=0.04 #Initial concentration\n",
+ "fc=0.25 #Final concentration\n",
+ "m4dot_dash=(ic/fc)*mf_dot #[kg/h]\n",
+ "#Total evaporation=\n",
+ "mv_dot=mf_dot-m4dot_dash #[kg/h]\n",
+ "\n",
+ "#Fromsteam table:\n",
+ "P1=370 #[kPa.g]\n",
+ "T1=422.6 #[K]\n",
+ "lambda1=2114.4 #[kJ/kg]\n",
+ "\n",
+ "P2=235 #[kPa.g]\n",
+ "T2=410.5 #[K]\n",
+ "lambda2=2151.5 #[kJ/kg]\n",
+ "\n",
+ "P3=80 #[kPa.g]\n",
+ "T3=390.2 #[K]\n",
+ "lambda3=2210.2 #[kJ/kg]\n",
+ "\n",
+ "P4=50.66 #[kPa.g]\n",
+ "T4=354.7 #[K]\n",
+ "lambda4=2304.6 #[kJ/kg]\n",
+ "\n",
+ "P=700 #Latent heat of steam[kPa .g]\n",
+ "lambda_s=2046.3 #[kJ/kg]\n",
+ "\n",
+ "#Calculation\n",
+ "#FIRST EFFECT\n",
+ "#Enthalpy balance:\n",
+ "#ms_dot=mf_dot*Cpf*(T1-Tf)+mv1_dot*lambda1\n",
+ "#ms_dot=1345.3-1.033*m1dot_dash\n",
+ "\n",
+ "#SECOND EFFECT\n",
+ "#m1dot_dash=m2dot_dash+mdot_v2\n",
+ "#Enthalpy balance:\n",
+ "#m1dot_dash=531.38+0.510*m2dot_dash\n",
+ "\n",
+ "#THIRD EFFECT\n",
+ "#Material balance:\n",
+ "#m2dot_dash-m3dot_dash+mv3_dot\n",
+ "\n",
+ "#FOURTH EFFECT\n",
+ "#m3dot_dash=m4dot_dash+mv4_dot\n",
+ "mv4dot_dash=169.6 #[kg/h]\n",
+ "m3dot_dash=416.7 #[kg/h]\n",
+ "\n",
+ "#From eq n 4:\n",
+ "m2dot_dash=-176.84+1.98*m3dot_dash #[kg/h]\n",
+ "\n",
+ "#From eqn 2:\n",
+ "m1dot_dash=531.38+0.510*m2dot_dash #[kg/h]\n",
+ "\n",
+ "#From eqn 1:\n",
+ "ms_dot=1345.3-1.033*m1dot_dash\n",
+ "eco=mv_dot/ms_dot #[kg evaporation /kg steam]\n",
+ "#Result\n",
+ "print\"Steam economy is\",round(eco,3),\"evaporation/kg steam\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam economy is 1.957 evaporation/kg steam\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.15 ,Page no:6.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Single effect Calendria\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "m1_dot=5000 #[kg/h]\n",
+ "ic=0.1 #Initial concentration\n",
+ "fc=0.5 #Final concentration\n",
+ "mf_dot=(fc/ic)*m1_dot #[kg/h]\n",
+ "mv_dot=mf_dot-m1_dot #Water evaporated[kg/h]\n",
+ "P=357 #Steam pressure[kN/sq m]\n",
+ "Ts=412 #[K]\n",
+ "H=2732 #[kJ/kg]\n",
+ "lambda1=2143 #[kJ/kg]\n",
+ "bpr=18.5 #[K]\n",
+ "T_dash=352+bpr #[K]\n",
+ "Hf=138 #[kJ/kg]\n",
+ "lambda_s=2143 #[kJ/kg]\n",
+ "Hv=2659 #[kJ/kg]\n",
+ "H1=568 #[kJ/kg]\n",
+ "#Calculation\n",
+ "ms_dot=(mv_dot*Hv+m1_dot*H1-mf_dot*Hf)/lambda_s #Steam consumption in kg/h\n",
+ "eco=mv_dot/ms_dot #Economy\n",
+ "dT=Ts-T_dash #[K]\n",
+ "hi=4500 #[W/sq m.K]\n",
+ "ho=9000 #[W/sq m.K]\n",
+ "Do=0.032 #[m]\n",
+ "Di=0.028 #[m]\n",
+ "x1=(Do-Di)/2 #[m]\n",
+ "Dw=(Do-Di)/math.log(32.0/28.0) #[m]\n",
+ "x2=0.25*10**-3 #[m]\n",
+ "L=2.5 #Length [m]\n",
+ "hio=hi*(Di/Do) #[W/sq m.K]\n",
+ "print\"NOTE:In textbook this value of hio is wrongly calculated as 3975.5..So we will take this\"\n",
+ "hio=3975.5\n",
+ "k1=45.0 #Tube material in [W/sq m.K]\n",
+ "k2=2.25 #For scale[W/m.K]\n",
+ "Uo=1.0/(1.0/ho+1.0/hio+(x1*Dw)/(k1*Do)+(x2/k2)) #Overall heat transfer coeff in W/sq m.K\n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000.0/3600.0 #[W]\n",
+ "\n",
+ "A=Q/(Uo*dT) #[sq m]\n",
+ "n=A/(math.pi*Do*L) #from A=n*math.pi*Do*L \n",
+ "#Result\n",
+ "print\"Steam consumption is\",round(ms_dot),\"kg/h\" \n",
+ "print\"Capacity is\",round(mv_dot),\"kg/h\"\n",
+ "print\"Steam economy is \",round(eco,3)\n",
+ "print\" No. of tubes required is \",round(n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NOTE:In textbook this value of hio is wrongly calculated as 3975.5..So we will take this\n",
+ "Steam consumption is 24531.0 kg/h\n",
+ "Capacity is 20000.0 kg/h\n",
+ "Steam economy is 0.815\n",
+ " No. of tubes required is 722.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {
+ "slideshow": {
+ "slide_type": "subslide"
+ }
+ },
+ "source": [
+ "Example no:6.16 ,Page no:6.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Single effect evaporator\n",
+ "#Variable declaration\n",
+ "bpr=40.6 #[K]\n",
+ "Cpf=1.88 #[kJ/kg.K]\n",
+ "Hf=214 #[kJ/kg]\n",
+ "H1=505 #[kJ/kg]\n",
+ "mf_dot=4536 #[kg/h] of feed solution\n",
+ "ic=0.2 #Initial conc\n",
+ "fc=0.5 #Final concentration\n",
+ "m1dot_dash=(ic/fc)*mf_dot #Thisck liquor flow arte[kg/h]\n",
+ "mv_dot=mf_dot-m1dot_dash #[kg/H]\n",
+ "Ts=388.5 #Saturation temperature of steam in [K]\n",
+ "bp=362.5 #b.P of solution in [K]\n",
+ "lambda_s=2214 #[kJ/kg]\n",
+ "P=21.7 #Vapor space in [kPa]\n",
+ "Hv=2590.3 #[kJ/kg]\n",
+ "\n",
+ "#Calculation\n",
+ "#Enthalpy balance over evaporator\n",
+ "ms_dot=(m1dot_dash*H1+mv_dot*Hv-mf_dot*Hf)/lambda_s #[kg/h\n",
+ "print\"Steam consumption is\",round(ms_dot,1),\"kg/h\" \n",
+ "dT=Ts-bp #[K]\n",
+ "U=1560 #[W/sq m.K]\n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000/3600 #[W]\n",
+ "A=Q/(U*dT) #[sq m]\n",
+ "print\"Heat transfer area is\",round(A,2),\"m^2\"\n",
+ "\n",
+ "#Calculations considering enthalpy of superheated vapour\n",
+ "\n",
+ "Hv=Hv+Cpf*bpr #[kJ/kg]\n",
+ "ms_dot=(m1dot_dash*H1+mv_dot*Hv-mf_dot*Hf)/lambda_s #[kg/h]\n",
+ "print\" Now,Steam consumption is\",round(ms_dot,2),\"kg/h\" \n",
+ "eco=mv_dot/ms_dot #Steam economy\n",
+ "print\"Economy of evaporator \",round(eco,2)\n",
+ "Q=ms_dot*lambda_s #[kJ/h]\n",
+ "Q=Q*1000.0/3600.0 #[w]\n",
+ "A2=Q/(U*dT) #Area\n",
+ "print\"Now,Area is\",round(A2,2) \n",
+ "perc=(A2-A)*100/A #%error in the heat transfer area \n",
+ "#Result\n",
+ "print\"If enthalpy of water vapour Hv were based on the saturated vapour at the pressure\\nthe error introduced is only\",round(perc,2),\"percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam consumption is 3159.6 kg/h\n",
+ "Heat transfer area is 47.91 m^2\n",
+ " Now,Steam consumption is 3253.42 kg/h\n",
+ "Economy of evaporator 0.84\n",
+ "Now,Area is 49.33\n",
+ "If enthalpy of water vapour Hv were based on the saturated vapour at the pressure\n",
+ "the error introduced is only 2.97 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer/screenshots/Screen1.png b/Heat_Transfer/screenshots/Screen1.png
new file mode 100755
index 00000000..aceef351
--- /dev/null
+++ b/Heat_Transfer/screenshots/Screen1.png
Binary files differ
diff --git a/Heat_Transfer/screenshots/screen2.png b/Heat_Transfer/screenshots/screen2.png
new file mode 100755
index 00000000..aed292b3
--- /dev/null
+++ b/Heat_Transfer/screenshots/screen2.png
Binary files differ
diff --git a/Heat_Transfer/screenshots/screen3.png b/Heat_Transfer/screenshots/screen3.png
new file mode 100755
index 00000000..aed292b3
--- /dev/null
+++ b/Heat_Transfer/screenshots/screen3.png
Binary files differ
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_03.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_03.ipynb
new file mode 100755
index 00000000..dd27a183
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_03.ipynb
@@ -0,0 +1,457 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:18e19bec17b5f55566a2079756ce3fc602f406d3355e580aba8938f8d7833673"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Process Variables"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.2, Page number: 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable Declaration:\n",
+ "Q1 = 8.03 #Years(part 1)\n",
+ "D = 365 #Days in a year\n",
+ "H = 24 #Hours in a day\n",
+ "M = 60 #Minutes in an hour\n",
+ "S = 60 #Seconds in a minute\n",
+ "Q2 = 150 #Miles per hour(part 2)\n",
+ "FM = 5280 #Feet in a mile\n",
+ "YF = 1.0/3.0 #Yard in a feet\n",
+ "Q3 = 100 #Meter per second square(part 3)\n",
+ "Cmm = 100 #Centimeter in a meter\n",
+ "FC = 1.0/30.48 #Feet in a centimeter\n",
+ "SsMs = 60**2 #Second square in a minute square\n",
+ "Q4 = 0.03 #Gram per centimeter cube (part 4)\n",
+ "PG = 1.0/454.0 #Pound in a gram\n",
+ "CF = (30.48)**3 #Centimeter in a feet\n",
+ " \n",
+ "#Calculation:\n",
+ "A1 = Q1*D*H*M*S #Seconds (s)\n",
+ "A2 = Q2*FM*YF #Yards per hour (yd/hr)\n",
+ "A3 = Q3*Cmm*FC*SsMs #Feet per min square (ft/min^2)\n",
+ "A4 = Q4*PG*CF #Pound per feet cube (lb/ft^3)\n",
+ " \n",
+ "#Results:\n",
+ "print \"1. Seconds in\",Q1,\"year is:\",round(A1/10**8,2),\" x 10**8 s\"\n",
+ "print \"2. Yards per hour in\",Q2,\"miles per hour is:\",round(A2/10**5,1),\" x 10**5 yd/h\"\n",
+ "print \"3. Feets per minute square in\",Q3,\"meter per square is:\",round(A3/10**6,3),\" x 10**6 ft/min^2\"\n",
+ "print \"4. Pounds per feet cube in\",Q4,\"gram per centimeter cube is:\",round(A4),\"lb/ft^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. Seconds in 8.03 year is: 2.53 x 10**8 s\n",
+ "2. Yards per hour in 150 miles per hour is: 2.6 x 10**5 yd/h\n",
+ "3. Feets per minute square in 100 meter per square is: 1.181 x 10**6 ft/min^2\n",
+ "4. Pounds per feet cube in 0.03 gram per centimeter cube is: 2.0 lb/ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.3, Page number: 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable Declaration:\n",
+ "Q1 = 32.2 #Gravitational acceleration (ft/s^2) (part 1)\n",
+ "CF = 32.2 #Conversion factor (lb.ft/lbf.s^2)\n",
+ "M = 100 #Mass (lb)\n",
+ "SA = 3 #Surface area (in^2)\n",
+ "FsIs = (1.0/12.0)**2 #Feet square in a inch square\n",
+ "Q2 = 14.7 #Atmospheric pressure (psi) (part 2)\n",
+ "GP = 35 #Gauge Pressure (psig)\n",
+ " \n",
+ "#Caculations:\n",
+ "F = M*Q1/CF #Force (lbf)\n",
+ "P = F/SA/FsIs #Pressure at the base (lbf/ft^2)\n",
+ "Pa = GP+Q2 #Absolute pressure (psia)\n",
+ " \n",
+ "#Results:\n",
+ "print \"1. Pressure at the base is:\",round(P),\"lbf/ft^2\"\n",
+ "print \"2. Absolute pressure is:\",round(Pa,1),\"psia\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. Pressure at the base is: 4800.0 lbf/ft^2\n",
+ "2. Absolute pressure is: 49.7 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.4, Page number: 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable Declaration:\n",
+ "Q1 = 20.0 #Mass (lb) (part 1)\n",
+ "MH = 1.008 #Molecular weight of H (lb/lbmol)\n",
+ "MO = 15.999 #Molecular weight of O (lb/lbmol)\n",
+ "Q2 = 454 #Gram in pound (part 2)\n",
+ "Q3 = 6.023*10**23 #Avogadro nuber (part 3)\n",
+ " \n",
+ "#Calculations:\n",
+ "Mol = 2*MH+MO #Molecular weight of water (lb/lbmol)\n",
+ "A1 = Q1/Mol #Pound.moles of water (lbmol)\n",
+ "A2 = Q1*Q2/Mol #Gram.moles of water (gmol)\n",
+ "A3 = A2*Q3 #Molecules of water (molecules)\n",
+ " \n",
+ "#Results:\n",
+ "print \"1. Pound.moles of water is:\",round(A1,2),\"lbmol water\"\n",
+ "print \"2. Gram.moles of water is:\",round(A2),\"gmol water\"\n",
+ "print \"3. Molecules of water is:\",round(A3/10**26,3),\" x 10**26 molecules\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. Pound.moles of water is: 1.11 lbmol water\n",
+ "2. Gram.moles of water is: 504.0 gmol water\n",
+ "3. Molecules of water is: 3.036 x 10**26 molecules\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.5, Page number: 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable declaration:\n",
+ "SG = 0.92 #Specific gavity of liquid, methanol\n",
+ "DW = 62.4 #Density of reference substance, water (lb/ft^3)\n",
+ " \n",
+ "#Calculation:\n",
+ "DM = SG*DW #Density of methanol (lb/ft^3)\n",
+ " \n",
+ "#Result:\n",
+ "print \"Density of methanol is:\",round(DM,1),\"lb/ft^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of methanol is: 57.4 lb/ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.6, Page number: 27\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable declaration:\n",
+ "SG = 0.8 #Specific Gravity\n",
+ "AV = 0.02 #Absolute Viscosity (cP)\n",
+ "cP = 1 #Viscosity of centipoise (cP)\n",
+ "VcP = 6.72 * 10**-4 #Pound per feet.sec in a centipoise (lb/ft.s)\n",
+ "pR = 62.43 #Reference density (lb/ft^3)\n",
+ " \n",
+ "#Calculations:\n",
+ "u = AV*VcP/cP #Viscosity of gas (lb/ft.s)\n",
+ "p = SG*pR #Density of gas (lb/ft^3)\n",
+ "v = u/p #Kinematic viscosity of gas (ft^2/s)\n",
+ " \n",
+ "#Result:\n",
+ "print \"Kinematic viscosity of gas is:\",round(v/10**-7,3),\"x 10**-7 ft^2/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinematic viscosity of gas is: 2.691 x 10**-7 ft^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.7, Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable declaration:\n",
+ "X = 7.0 #Coordinate X of H2SO4\n",
+ "Y = 24.8 #Coordinate Y of H2SO4\n",
+ "S = 45 #Slope\n",
+ " \n",
+ "#Calculations:\n",
+ "#From the figure C.1 we found the intersection of curves mu = 12cP\n",
+ "mu = 12\n",
+ " \n",
+ "#Results:\n",
+ "print \"Absolute viscosity of a 98% sulfuric acid solution at 45\u00b0 C is :\",mu*10**-2,\" g/cm.s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute viscosity of a 98% sulfuric acid solution at 45\u00b0 C is : 0.12 g/cm.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.8, Page number: 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable declaration:\n",
+ "CpM = 0.61 #Heat capacity of methanol (cal/g.\u00b0C)\n",
+ "G = 454 #Grams in a pound\n",
+ "B = 1.0/252.0 #Btu in a calorie\n",
+ "C = 1.0/1.8 #Degree celsius in a degree fahrenheit\n",
+ " \n",
+ "#Calculation:\n",
+ "Cp = CpM*G*B*C #Heat capacity in English units (Btu/lb.\u00b0F)\n",
+ " \n",
+ "#Result:\n",
+ "print \"Heat capacity in English units is: \",round(Cp,2),\" Btu/lb.\u00b0F\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat capacity in English units is: 0.61 Btu/lb.\u00b0F\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.9, Page number: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable declaration:\n",
+ "kM = 0.0512 #Thermal conductivity of methanol (cal/m.s\u00b0C)\n",
+ "B = 1.0/252.0 #Btu in a calorie\n",
+ "M = 0.3048 #Meters in a feet\n",
+ "S = 3600 #Seconds in an hour\n",
+ "C = 1.0/1.8 #Degree celsius in a degree fahrenheit\n",
+ " \n",
+ "#Calculation:\n",
+ "k = kM*B*M*S*C #Thermal conductivity in English units (Btu/ft.h.\u00b0F)\n",
+ " \n",
+ "#Result:\n",
+ "print \"Thermal coductivity in English units is:\",round(k,3),\"Btu/ft.h.\u00b0F\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal coductivity in English units is: 0.124 Btu/ft.h.\u00b0F\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.11, Page number: 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Variable declaration:\n",
+ "D = 5 #Diameter of pipe (ft)\n",
+ "V = 10 #Fluid velocity (ft/s)\n",
+ "p = 50 #Fluid density (lb/ft^3)\n",
+ "u = 0.65 #Fluid viscosity (lb/ft.s)\n",
+ "F = 1.0/12.0 #Feet in an inch\n",
+ "VCp = 6.72*10**-4 #Viscosity of centipoise (lb/ft.s)\n",
+ " \n",
+ "#Calculation:\n",
+ "A = D*V*p*F/u/VCp #Reynolds Number\n",
+ " \n",
+ "#Result:\n",
+ "if(A>2100):\n",
+ " print \"The Reynolds number is :\",round(A,-2),\"; therefore, the flow is turbulent.\"\n",
+ "elif(A<2100):\n",
+ " print \"The Reynolds number is :\",round(A,-2),\"; therefore, the flow is not turbulent.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Reynolds number is : 477000.0 ; therefore, the flow is turbulent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 3.12, Page number: 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "#For the problem at hand, take as a basis 1 kilogram of water and assume the potential energy to be zero at ground level conditions.\n",
+ "z1 = 0 #Intial height from ground level (m)\n",
+ "z2 = 10 #Final height from ground level (m)\n",
+ "PE1 = 0 #Initial potential energy at z1 (J)\n",
+ "m = 1 #Mass of water (kg)\n",
+ "g = 9.8 #Gravitational acceleration (m/s^2)\n",
+ "gc = 1 #Conversion factor\n",
+ " \n",
+ "#Calculations:\n",
+ "PE2 = m*(g/gc)*z2 #Final potential energy at z2 (J)\n",
+ " \n",
+ "#Result:\n",
+ "print \"The potential energy of water is :\",PE2,\"J \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential energy of water is : 98.0 J \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_04.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_04.ipynb
new file mode 100755
index 00000000..3fece5a7
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_04.ipynb
@@ -0,0 +1,555 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:da9a4303c6fc07c594d52c82662dd9ab6e23eae788f020d82b784ed3a6873663"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: The Conservation Law for Momentum"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.1, Page number: 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Vx_in = 420 #Entry Velocity in X direction (m/s)\n",
+ "Vx_out = 0 #Exit Velocity in X direction (m/s)\n",
+ "Vy_in = 0 #Entry Velocity in Y direction (m/s)\n",
+ "Vy_out = 420 #Exit Velocity in Y direction (m/s)\n",
+ "m = 0.15 #Rate of water entrained by the steam (kg/s)\n",
+ "lb = 1.0/4.46 #Pound force in a newton force\n",
+ "\n",
+ "#Calculations:\n",
+ "Mx_out = m*Vx_out #Rate of change of momentum at entry in x-direction (kg.m)\n",
+ "Mx_in = m*Vx_in #Rate of change of momentum at exit in x-direction (kg.m)\n",
+ "My_out = m*Vy_out #Rate of change of momentum at entry in y-direction (kg.m)\n",
+ "My_in = m*Vy_in #Rate of change of momentum at exit in y-direction (kg.m)\n",
+ "Fxgc = (Mx_out - Mx_in)*lb #Force in X direction (lbf)\n",
+ "Fygc = (My_out - My_in)*lb #Force in X direction (lbf)\n",
+ "\n",
+ "#Results:\n",
+ "if Fxgc < 1:\n",
+ " print \"The x-direction supporting force acting on the 90\u00b0 elbow is :\",round(-Fxgc,1),\" lbf acting toward the left. \"\n",
+ "else:\n",
+ " print \"The x-direction supporting force acting on the 90\u00b0 elbow is :\",round(Fxgc,1),\" lbf acting toward the right. \"\n",
+ "if Fygc < 1:\n",
+ " print \"The y-direction supporting force acting on the 90\u00b0 elbow is :\",round(-Fygc,1),\" lbf acting downwards. \" \n",
+ "else:\n",
+ " print \"The y-direction supporting force acting on the 90\u00b0 elbow is :\",round(Fygc,1),\" lbf acting upwards. \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The x-direction supporting force acting on the 90\u00b0 elbow is : 14.1 lbf acting toward the left. \n",
+ "The y-direction supporting force acting on the 90\u00b0 elbow is : 14.1 lbf acting upwards. \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.2 Page number: 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import sqrt,degrees,atan2\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Fx = -63 #Force component in X direction (N)\n",
+ "Fy = 63 #Force component in Y direction (N)\n",
+ "lbf = 0.22481 #Pound-forrce in unit newton (lbf)\n",
+ "\n",
+ "#Calculations:\n",
+ "Fr = sqrt(Fx**2 + Fy**2)*lbf #The resultant supporting force (lbf)\n",
+ "u = degrees(atan2(Fy,Fx)) #Angle between the positive x axis and the direction of the force (degrees)\n",
+ "\n",
+ "#Result: \n",
+ "if (0<u<90):\n",
+ " print \"The supporting force is :\",round(Fr,1),\" lbf acting at\",u,\"\u00b0 i.e in the \u201cnortheast\u201d direction.\"\n",
+ "elif (90<u<180):\n",
+ " print \"The supporting force is :\",round(Fr,1),\" lbf acting at\",u,\"\u00b0 i.e in the \u201cnorthwest\u201d direction.\"\n",
+ "elif (180<u<270):\n",
+ " print \"The supporting force is :\",round(Fr,1),\" lbf acting at\",u,\"\u00b0 i.e in the \u201csouthwest\u201d direction.\"\n",
+ "elif (270<u<360):\n",
+ " print \"The supporting force is :\",round(Fr,1),\" lbf acting at\",u,\"\u00b0 i.e in the \u201csoutheast\u201d direction.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The supporting force is : 20.0 lbf acting at 135.0 \u00b0 i.e in the \u201cnorthwest\u201d direction.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.3, Page number: 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "R1_in = 10000 #Rate of fuel fed into the boiler (lb/h)\n",
+ "R2_1n = 20000 #Rate of air fed into the boiler (lb/h)\n",
+ "R3_in = 2000 #Rate of methane fed into the boiler (lb/h)\n",
+ "\n",
+ "#Calculations:\n",
+ "m_in = R1_in + R2_1n + R3_in #Rate of mass in (lb/h)\n",
+ "m_out = m_in #Rate of mass out (lb/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of the product gases exit from the incinerator is :\",round(m_in),\" lb/h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of the product gases exit from the incinerator is : 32000.0 lb/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.4, Page number: 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "E1 = 65 #Efficiency of spray tower (%)\n",
+ "E2 = 98 #Efficiency of packed column (%)\n",
+ "m_in = 76 #Mass flow rate of HCl entering the system (lb/h)\n",
+ "\n",
+ "#Calculations:\n",
+ "m1_out = (1 - E1/100.0)*m_in #Mass flow rate of HCl leaving the spray tower (lb/h)\n",
+ "m2_out = (1 - E2/100.0)*m1_out #Mass flow rate of HCl entering the packed column (lb/h)\n",
+ "E = (m_in - m2_out)/m_in #Overall fractional efficiency (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mass flow rate of HCl leaving the spray tower is :\",round(m1_out,2),\" lb/h HCL\"\n",
+ "print \"The mass flow rate of HCl entering the packed column is :\",round(m2_out,3),\" lb/h HCL\"\n",
+ "print \"The overall fractional efficiency is :\",round(E*100,1),\" %\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass flow rate of HCl leaving the spray tower is : 26.6 lb/h HCL\n",
+ "The mass flow rate of HCl entering the packed column is : 0.532 lb/h HCL\n",
+ "The overall fractional efficiency is : 99.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.5, Page number: 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m1 = 1000 #Flowrate data 1 (lb/min)\n",
+ "m2 = 1000 #Flowrate data 2 (lb/min)\n",
+ "m4 = 200 #Flowrate data 4 (lb/min)\n",
+ "\n",
+ "#Calculations:\n",
+ "m5 = m1 + m2 - m4 #Flowrate data 5 (lb/min)\n",
+ "m6 = m2 #Flowrate data 6 (lb/min)\n",
+ "m = m5 - m6 #Flowrate of water lost in operation (lb/min)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The amount of water lost by evaporation in the operation is\", round(m),\" lb/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of water lost by evaporation in the operation is 800.0 lb/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.6, Page number: 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "q1 = 1000.0 #Volumetric flowrate from tank 1 (gal/day)\n",
+ "q2 = 1000.0 #Volumetric flowrate from tank 2 (gal/day)\n",
+ "q3 = 2000.0 #Volumetric flowrate from tank 3 (gal/day)\n",
+ "q4 = 200.0 #Volumetric flowrate from tank 4 (gal/day)\n",
+ "q5 = 1800.0 #Volumetric flowrate from tank 5 (gal/day)\n",
+ "q6 = 1000.0 #Volumetric flowrate from tank 6 (gal/day)\n",
+ "C1 = 4.0 #Phosphate concentration in tank 1 (ppm)\n",
+ "C2 = 0.0 #Phosphate concentration in tank 2 (ppm)\n",
+ "C3 = 2.0 #Phosphate concentration in tank 3 (ppm)\n",
+ "C4 = 20.0 #Phosphate concentration in tank 4 (ppm)\n",
+ "C5 = 0.0 #Phosphate concentration in tank 5 (ppm)\n",
+ "C6 = 0.0 #Phosphate concentration in tank 6 (ppm)\n",
+ "Cf = 120000.0 #conversion factor for water (gal/10**6lb)\n",
+ "\n",
+ "#Calculations:\n",
+ "C1q1 = C1*q1/Cf #Data 1 (lb/day)\n",
+ "C2q2 = C2*q2/Cf #Data 2 (lb/day)\n",
+ "C3q3 = C3*q3/Cf #Data 3 (lb/day)\n",
+ "C4q4 = C4*q4/Cf #Data 4 (lb/day)\n",
+ "C5q5 = C5*q5/Cf #Data 5 (lb/day)\n",
+ "C6q6 = C6*q6/Cf #Data 6 (lb/day)\n",
+ "\n",
+ "#Results:\n",
+ "if (((C1q1 + C2q2) == C3q3) and C3q3 == (C4q4 + C5q5) and C5q5 == C6q6 and C2q2 == C6q6):\n",
+ " print \"The data appear to be consistent .\"\n",
+ "else:\n",
+ " print \"The data appear to be inconsistent .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The data appear to be consistent .\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.7, Page number: 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Dz = 3000 #Height (ft)\n",
+ "V0 = 500000 #Flowrate of water (gal/min)\n",
+ "n = 30 #Turbine efficiency (%)\n",
+ "m = 0.3048 #Meters in a feet\n",
+ "m3 = 0.00378 #Meters-cube in a gallon\n",
+ "g = 9.8 #Gravitational acceleration (m/s^2)\n",
+ "gc = 1 #Conversion factor\n",
+ "MW = 10**(-6) #Megawatt in newton-meter-per-second\n",
+ "\n",
+ "#Calculations:\n",
+ "V1 = (V0*m3)*1000.0/60.0 #The mass flow rate of the water in kilograms/second (kg/s)\n",
+ "DPE = V1*g*Dz*m/gc*MW #The loss in potential energy (MW)\n",
+ "AP = n/100.0*DPE #The actual power output (MW)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power generated by the lake located is :\",round(AP,1),\" MW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power generated by the lake located is : 84.7 MW\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.8, Page number: 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "n = 111.4 #Flowrate of air stream (lbmol/min)\n",
+ "H1 = 1170 #Average heat capacity at 200\u00b0F (Btu/lbmol)\n",
+ "H2 = 4010 #Average heat capacity at 600\u00b0F (Btu/lbmol)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = n*(H2 - H1) #The heat transfer rate (Btu/min)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate required is:\",round(Q/10**5,2),\" x 10**5 Btu/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate required is: 3.16 x 10**5 Btu/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.9, Page number: 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "n = 600 #The mass flow rate of fluid (lbmol/min)\n",
+ "Cp_AV = 0.271 #Heat capacity (Btu/lbmol . \u00b0F)\n",
+ "T1 = 200 #Initial temperature(\u00b0F)\n",
+ "T2 = 600 #Final temperature(\u00b0F)\n",
+ "\n",
+ "#Calcultaion:\n",
+ "Q = n*Cp_AV*(T2 - T1) #The required heat rate (Btu/min)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required heat rate is :\",round(Q,-2),\" Btu/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required heat rate is : 65000.0 Btu/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.10, Page number: 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T_c1 = 20 #Initial cold fluid temperature (\u00b0C)\n",
+ "T_h1 = 82 #Initial hot fluid temperature (\u00b0C)\n",
+ "T_h2 = 94 #Final hot fluid temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "T_c2 = (T_h2 - T_h1 + T_c1) #Final cold fluid temperature (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate is:\",round(T_c2),\" \u00b0C\"\n",
+ "print \"There is a printing mistake in book regarding unit of the final result.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate is: 32.0 \u00b0C\n",
+ "There is a printing mistake in book regarding unit of the final result.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.11, Page number: 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = -5.5*10**6 #The heat transferred out from the gas (W)\n",
+ "Cp = 1090.0 #The average heat capacity of the gas (J/(kg . \u00b0C))\n",
+ "m = 9.0 #The gas mass flow rate (kg/s)\n",
+ "T1 = 650 #The gas inlet temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = Q/(m*Cp)+T1 #The gas outlet temperature (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The gas outlet temperature is :\",round(T2),\" \u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The gas outlet temperature is : 89.0 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 4.12, Page number: 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "n = 3500.0 #Inlet flowrate of water (gal/min)\n",
+ "Cp_W = 75.4 #Heat capacity of water (J/(gmol . \u00b0C)\n",
+ "p = 62.4 #Density of water (lb/ft^3)\n",
+ "M = 24*60.0 #Minutes in a day (min/day)\n",
+ "G = 7.48 #Gallons in a feet cube (gal/ft^3)\n",
+ "gm = 454.0 #Grams in a pound (g/lb)\n",
+ "J = 1054.0 #Joules in a Btu (J/Btu)\n",
+ "g = 18.0 #Grams in a gmol (g/gmol)\n",
+ "F = 1.8 #Degree fahrenheit in a degree celcius (\u00b0F)\n",
+ "Ti = 38.0 #Initial temperature (\u00b0F)\n",
+ "Tf = 36.2 #Final temperature (\u00b0F)\n",
+ "\n",
+ "#Calculations:\n",
+ "T= Ti-Tf #Temperature loss (\u00b0F)\n",
+ "m = n*p*M/G #Mass flow rate of water (lb/day)\n",
+ "Cp = Cp_W*gm/J/g/F #Heat capacity in cosistent units (Btu/(lb.\u00b0F))\n",
+ "Q = m*Cp*T #Rate of heat flow from water (Btu/day)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of Btu removed from the water per day is :\",round(Q/10**8,2),\" x 10**8 Btu/day .\"\n",
+ "print \"There is a calculation mistake in the book regarding the final result.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of Btu removed from the water per day is : 0.76 x 10**8 Btu/day .\n",
+ "There is a calculation mistake in the book regarding the final result.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_05.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_05.ipynb
new file mode 100755
index 00000000..d5d367e4
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_05.ipynb
@@ -0,0 +1,464 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:33ba4a11fa0be53b880079008a0280bb47a9d8531c545010b70c7a3f75197aa0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Gas Laws"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.1, Page number: 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "qi = 3500 #Initial volumetric flow rate of gas (acfm)\n",
+ "Ti = 100.0 #Initial temperature (\u00b0F)\n",
+ "Tf = 300.0 #Final temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Ti_R = Ti+460 #Initial temperatur in Rankine scale (\u00b0R)\n",
+ "Tf_R = Tf+460 #Final temperatur in Rankine scale (\u00b0R)\n",
+ "qf = qi*(Tf_R/Ti_R) #Final volumetric flow rate of gas (acfm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The final volumetric flow rate of gas is :\",round(qf),\" acfm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final volumetric flow rate of gas is : 4750.0 acfm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.2, Page number: 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "qi = 3500 #Initial volumetric flow rate of gas (acfm)\n",
+ "Pi = 1.0 #Iitial pressure (atm)\n",
+ "Pf = 3.0 #Final pressure (atm)\n",
+ "\n",
+ "#Calculation:\n",
+ "qf = qi*(Pi/Pf) #Final volumetric flow rate of gas (acfm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The volumetric flow rate of the gas (100\u00b0F, 1 atm) is:\",round(qf),\" acfm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volumetric flow rate of the gas (100\u00b0F, 1 atm) is: 1167.0 acfm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.3, Page number: 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "qi = 3500 #Initial volumetric flow rate of the gas (acfm)\n",
+ "Pi = 1.0 #Initial pressure (atm)\n",
+ "Pf = 3.0 #Final pressure (atm)\n",
+ "Tf = 300.0+460.0 #Final temperature in Rankine scale (\u00b0R)\n",
+ "Ti = 100.0+460.0 #Initial temperature in Rankine scale (\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "qf = qi*(Pi/Pf)*(Tf/Ti) #Final volumetric flow rate of the gas (acfm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The volumetric flow rate of the gas at 300\u00b0F temperature is :\",round(qf),\" acfm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volumetric flow rate of the gas at 300\u00b0F temperature is : 1583.0 acfm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.4, Page number: 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "P = 14.7 #Absolute pressure of air (psia)\n",
+ "MW = 29 #Molecular weight of air (lb/lbmol)\n",
+ "T = 75+460 #Temperature in Rankine scale (\u00b0R)\n",
+ "R = 10.73 #Universal gas constant (ft^3.psi/lbmol.\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "p = P*MW/R/T #Density of air (lb/ft^3)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The density of air at 75\u00b0F and 14.7 psia is :\",round(p,4),\" lb/ft^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of air at 75\u00b0F and 14.7 psia is : 0.0743 lb/ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.5, Page number: 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "n = 1 #Molar flow rate of gas (lbmol/h)\n",
+ "R = 10.73 #Universal gas constant (ft^3.psi/lbmol.\u00b0R)\n",
+ "T = 60+460 #Temperature in Rankine scale (\u00b0R)\n",
+ "P = 14.7 #Absolute pressure of gas (psia)\n",
+ "\n",
+ "#Calculation:\n",
+ "V = n*R*T/P #Volume of gas (ft^3)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The volume of given ideal gas is :\",round(V,1),\" ft^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of given ideal gas is : 379.6 ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.6, Page number: 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "P = 1.2 #Abslute pressure of gas (psia)\n",
+ "MW = 29 #Molecular weight of gas (g/gmol)\n",
+ "R = 82.06 #Universal gas constant (atm.cm^3/gmol.K)\n",
+ "T = 20+273 #Temperature in Kelvin (K)\n",
+ "\n",
+ "#Calculation:\n",
+ "p = P*MW/R/T #Dendity of gas (g/cm^3)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The density of given gas is :\",round(p,5),\" g/cm^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of given gas is : 0.00145 g/cm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.7, Page number: 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "R = 10.73 #Universal gas constant (psia . ft^3/lbmol .\u00b0R)\n",
+ "T = 70+460 #Temperature in Rankine scale (\u00b0R)\n",
+ "v = 10.58 #Specific volume (ft^3/lb)\n",
+ "P = 14.7 #Absolute pressure (psia)\n",
+ "\n",
+ "#Calculation:\n",
+ "MW = R*T/v/P #Molecular weight of gas (lb/lbmol)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The molecular weight of the gas is :\",round(MW,2),\" lb/lbmol.\"\n",
+ "print \"It appears that the gas is HCl (i.e., hydrogen chloride).\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molecular weight of the gas is : 36.57 lb/lbmol.\n",
+ "It appears that the gas is HCl (i.e., hydrogen chloride).\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.8, Page number: 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "qs = 30000 #Volumetric flow rate at standard conditions (scfm)\n",
+ "Ta = 1100+460 #Actual absolute temperature in Rankine scale (\u00b0R)\n",
+ "Ts = 60+460 #Standard absolute temperature in Rankine scale (\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "qa = qs*Ta/Ts #Volumetric flow rate at actual conditions (acfm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The volumetric flow rate in actual cubic feet per minute is :\",round(qa),\" acfm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volumetric flow rate in actual cubic feet per minute is : 90000.0 acfm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.9, Page number: 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "qs = 1000 #Volumetric flow rate at standard conditions (scfm)\n",
+ "Ta = 300+460 #Actual absolute temperature in Rankine scale (\u00b0R)\n",
+ "Ts = 70+460 #Standard absolute temperature in Rankine scale (\u00b0R)\n",
+ "A = 2.0 #Inlet area of stack (ft^2)\n",
+ "\n",
+ "#Calculations:\n",
+ "qa = qs*Ta/Ts #Volumetric flow rate at actual conditions (acfm)\n",
+ "v = qa/A/60 #Velocity of gas (ft/s)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The velocity of the gas through the stack inlet is :\",round(v),\" ft/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the gas through the stack inlet is : 12.0 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.10, Page number: 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "qs1 = 5000.0 #Volumetric flow rate of C6H5Cl at standard conditions (scfm)\n",
+ "qs2 = 3000.0 #Volumetric flow rate of air at standard conditions (scfm)\n",
+ "Ta = 70+460.0 #Actual absolute temperature in Rankine scale (\u00b0R)\n",
+ "Ts = 60+460.0 #Standard absolute temperature in Rankine scale (\u00b0R)\n",
+ "V = 387.0 #Volume occupied by one lbmol of any ideal gas (ft^3)\n",
+ "M1 = 112.5 #Molecular weight of C6H5Cl (lb/lbmol)\n",
+ "M2 = 29.0 #Molecular weight of air (lb/lbmol)\n",
+ "T = 60.0 #Absolute temperature (\u00b0F)\n",
+ "\n",
+ "#Calculations:\n",
+ "qa1 = qs1*(Ta/Ts) #Volumetric flow rate of C6H5Cl at actual conditions (acfm)\n",
+ "qa2 = qs2*(Ta/Ts) #Volumetric flow rate of air at actual conditions (acfm)\n",
+ "n1 = qa1/V #Molar flow rate of C6H5Cl (lbmol/min)\n",
+ "n2 = qa2/V #Molar flow rate of air (lbmol/min)\n",
+ "m1 = n1*M1*T #Mass flow rate of C6H5Cl (lb/h)\n",
+ "m2 = n2*M2*T #Mass flow rate of air (lb/h)\n",
+ "m_in = m1+m2 #Total mass flow rate of both streams entering the oxidizer (lb/h)\n",
+ "m_out = m_in #Total mass flow rate of both streams exit the cooler (lb/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of the products exit the cooler is :\",round(m_out),\" lb/h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of the products exit the cooler is : 102634.0 lb/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 5.11, Page number: 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "p = 0.15 #Partial pressure of SO3 (mm Hg)\n",
+ "P = 760.0 #Atmospheric pressure (mm Hg)\n",
+ "m = 10**6 #Particles in a million\n",
+ "\n",
+ "#Calculation:\n",
+ "y = p/P #Mole fraction of SO3\n",
+ "ppm = y*m #Parts per million of SO3 (ppm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The parts per million of SO3 in the exhaust is :\",round(ppm),\" ppm .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The parts per million of SO3 in the exhaust is : 197.0 ppm .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_06.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_06.ipynb
new file mode 100755
index 00000000..e4393f65
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_06.ipynb
@@ -0,0 +1,363 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:54e2e4fc776d95c57fe6ec3f8739ba703b59fc814a535a0e713a806e8b2afe6d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Heat Exchanger Pipes and Tubes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.1, Page number: 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "NPS = 2 #Nominal pipe size (inch)\n",
+ "SN = 40 #Schedule number\n",
+ "\n",
+ "#Calculation:\n",
+ "#From Table 6.2, we obtain that the inside diameter of steel pipe is ID = 2.067 in.\n",
+ "ID = 2.067\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inside diameter of steel pipe is :\",ID,\" in.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inside diameter of steel pipe is : 2.067 in.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.2, Page number: 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "NPS = 3 #Nominal pipe size (inch)\n",
+ "SN = 40 #Schedule number\n",
+ "\n",
+ "#Calculation:\n",
+ "#From Table 6.2, we obtain that the inside diameter of steel pipe is ID = 3.068 in, outside diameter OD = 3.5 in, wal thickness WT = 0.216 in, and pipe weight PW = 7.58 lb/ft.\n",
+ "ID = 3.068\n",
+ "OD = 3.5\n",
+ "WT = 0.216\n",
+ "PW = 7.58\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inside diameter of steel pipe is :\",ID,\" in\"\n",
+ "print \"The outside diameter of steel pipe is :\",OD,\" in\"\n",
+ "print \"The wall thickness of steel pipe is :\",WT,\" in\"\n",
+ "print \"The weight of steel pipe is :\",PW,\" lb/ft.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inside diameter of steel pipe is : 3.068 in\n",
+ "The outside diameter of steel pipe is : 3.5 in\n",
+ "The wall thickness of steel pipe is : 0.216 in\n",
+ "The weight of steel pipe is : 7.58 lb/ft.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.3, Page number: 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "ID = 0.957 #Inside diameter of pipe (in)\n",
+ "OD = 1.315 #Outside diameter of pipe (in)\n",
+ "WT = 0.179 #Wall thickness of pipe (in)\n",
+ "PW = 2.17 #Weight of pipe (lb/ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From Table 6.2, it indicates that the steel pipe is 1 inch schedule 80.\n",
+ "NSP = 1\n",
+ "SN = 80\n",
+ "\n",
+ "#Result:\n",
+ "print \"The nominal size of the pipe is :\",NSP,\" in.\"\n",
+ "print \"The schedule number of the pipe is:\",SN,\".\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nominal size of the pipe is : 1 in.\n",
+ "The schedule number of the pipe is: 80 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.4, Page number: 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "S = 3/4 #Tube size (in)\n",
+ "BWG = 16 #Birmingham Wire Gauge number (gauge)\n",
+ "\n",
+ "#calculation:\n",
+ "#From table 6.3, we get:\n",
+ "ID = 0.620 #Internal diameter of tube (in)\n",
+ "WT = 0.065 #Wall thickness of tube (in)\n",
+ "OD = ID+2*WT #Outside diameter of tube (in)\n",
+ "EA = 0.1963 #External area per foot (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inside diameter is :\",ID,\" in\"\n",
+ "print \"The wall thickness is :\",WT,\" in\"\n",
+ "print \"The outside diamater is :\",OD,\" in\"\n",
+ "print \"The external area per foot per foot :\",EA,\" ft.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inside diameter is : 0.62 in\n",
+ "The wall thickness is : 0.065 in\n",
+ "The outside diamater is : 0.75 in\n",
+ "The external area per foot per foot : 0.1963 ft.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.11, Page number: 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "a = 1 #Length of cross-section (m)\n",
+ "b = 0.25 #Width of cross-section (m)\n",
+ "v = 1*10**-5 #Kinematic viscosity of air (m^2/s)\n",
+ "Re = 2300.0 #Reynolds Number\n",
+ "cm = 100 #Cenitmeters in a meter\n",
+ "\n",
+ "#Calculation:\n",
+ "Dh = 2*a*b/(a+b) #Hydraulic diameter of duct (m)\n",
+ "V = Re*v/Dh*cm #Maximum air velocity (cm/s)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The maximum air velocity before the flow becomes turbulent is :\",round(V,1),\" cm/s.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum air velocity before the flow becomes turbulent is : 5.8 cm/s.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.12, Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "q = 0.486 #Flow rate of fluid (ft^3/s)\n",
+ "D = 2.0/12.0 #Diameter of tube in feet (ft)\n",
+ "pi = 3.14 #Value of pi\n",
+ "p = 70.0 #Density of fluid (lb/ft^3)\n",
+ "u = 0.1806 #Viscosity of fluid (lb/ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "V = 4*q/pi/D**2 #Flow velocity (ft/s)\n",
+ "Re = D*V*p/u #Reynolds Number\n",
+ "\n",
+ "#Result:\n",
+ "if(Re<2100):\n",
+ " print \"The flow is laminar.\"\n",
+ "elif(Re>2100):\n",
+ " print \"The flow is turbulant.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flow is laminar.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.13, Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 6.12, we have:\n",
+ "D = 2.0/12.0 #Diameter of pipe in feet (ft)\n",
+ "Re = 1440.0 #Reynolds number\n",
+ "\n",
+ "#Calculation:\n",
+ "Lc = 0.05*D*Re #Length of pipe (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The pipe length to ensure a fully developed flow is:\",Lc,\" ft.\"\n",
+ "print \"This is an abnormally long calming length for a pipe (or tube) in a heat exchanger.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pipe length to ensure a fully developed flow is: 12.0 ft.\n",
+ "This is an abnormally long calming length for a pipe (or tube) in a heat exchanger.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 6.14, Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "u = 6.72*10**-4 #Viscosity of water (lb/ft.s)\n",
+ "p = 62.4 #Density of water (lb/ft^3)\n",
+ "#For laminar flow:\n",
+ "Re = 2100.0 #Reynolds number\n",
+ "#From table 6.2, we have:\n",
+ "D = 2.067/12.0 #Inside diameter of pipe (ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "V = Re*u/D/p #Average velocity of water flowing (ft/s)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average velocity of water flowing is:\",round(V,2),\" ft/s.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average velocity of water flowing is: 0.13 ft/s.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_07.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_07.ipynb
new file mode 100755
index 00000000..bfa882d7
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_07.ipynb
@@ -0,0 +1,412 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:057d6eaa086db820c820c1a5a80f0143b18739ecbe1b8c285287723cf460e4b6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Steady-State Heat Conduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.1, Page number: 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = 3000.0 #The rate of heat flow through the glass window (W)\n",
+ "L = 0.01 #Thickness of glass window (m)\n",
+ "A = 3.0 #Area of heat transfer (m^2)\n",
+ "TC = 10+273 #Temperature at the outside surface (K)\n",
+ "k = 1.4 #Thermal onductivity of glass (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "TH = TC+Q*L/k/A #Temperature at the inner surface (K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature at the inner surface is :\",round(TH,1),\" K\"\n",
+ "print \"The temperature at the inner surface is :\",round(TH-273,1),\" \u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature at the inner surface is : 290.1 K\n",
+ "The temperature at the inner surface is : 17.1 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.2, Page number: 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "k = 0.026 #Thermal conductivity of insulating material (Btu/ft.h.\u00b0F)\n",
+ "L = 1.0 #Thickness of insulating material (ft)\n",
+ "TC = 70.0 #Temperature on the cold side surface (\u00b0F)\n",
+ "TH = 210.0 #Temperature on the hot side surface (\u00b0F)\n",
+ "c = 0.252 #Kilocalorie per hour in a Btu per hour\n",
+ "m = 0.093 #meter square in a feet square\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = TH-TC #Change in temperature (\u00b0F)\n",
+ "Q1 = k*DT/L #Rate of heat flux throughthe wall (Btu/f^t2.h.)\n",
+ "Q2 = Q1*c/m #Rate of heat flux throughthe wall in SI units (kcal/m^2.h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of heat flux in Btu/ft^2.h is :\",round(Q1,3),\" Btu/ft^2.h .\"\n",
+ "print \"The rate of heat flux in SI units is :\",round(Q2,3),\" kcal/m^2.h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of heat flux in Btu/ft^2.h is : 3.64 Btu/ft^2.h .\n",
+ "The rate of heat flux in SI units is : 9.863 kcal/m^2.h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.3, Page number: 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TH = 1592.0 #Temperature of inside surface (K)\n",
+ "TC = 1364.0 #Temperature of outside surface (K)\n",
+ "H = 3.0 #Height of furnace wall (m)\n",
+ "W = 1.2 #Width of furnace wall (m)\n",
+ "L = 0.17 #Thickness furnace wall (m)\n",
+ "m = 0.0929 #Meter square per second in a feet square per second\n",
+ "Btu = 3.412 #Btu per hour in a Watt\n",
+ "Btu2 = 0.3171 #Btu per feet square hour in a watt per meter square\n",
+ "\n",
+ "#Calculation:\n",
+ "Tav = (TH+TC)/2 #Average wall temperature (K)\n",
+ "#From Table in Appendix:\n",
+ "p = 2645.0 #Density of material (kg/m^3)\n",
+ "k = 1.8 #Thermal conductivity (W/m.K)\n",
+ "Cp = 960.0 #Heat capacity of material (J/kg.K)\n",
+ "a = k/(p*Cp)/m #Thermal diffusivity (ft^2/s)\n",
+ "t = (TC-TH)/L #Temperature gradient (\u00b0C/m)\n",
+ "A = H*W #Heat transfer area (m^2)\n",
+ "Q1 = k*A*(TH-TC)/L*Btu #Heat transfer rate (Btu/h)\n",
+ "Q2 = k*(TH-TC)/L*Btu2 #Heat transfer flux (Btu/h.ft^2)\n",
+ "R = L/(k*A) #Thermal resistance (\u00b0C/W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature gradient is :\",round(t),\" \u00b0C/m.\"\n",
+ "print \"The heat transfer rate is :\",round(Q1),\" Btu/h.\"\n",
+ "print \"The heat transfer flux is :\",round(Q2,1),\" Btu/h.ft^2.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature gradient is : -1341.0 \u00b0C/m.\n",
+ "The heat transfer rate is : 29653.0 Btu/h.\n",
+ "The heat transfer flux is : 765.5 Btu/h.ft^2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.4, Page number: 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TH = 25.0 #Temperature at inner suface of wall (\u00b0C)\n",
+ "TC = -15.0 #Temperature at outer suface of wall (\u00b0C)\n",
+ "L = 0.3 #Thickness of wall (m)\n",
+ "k = 1.0 #Thermal conductivity of concrete (W/m)\n",
+ "A = 30.0 #Sueface area of wall (m^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = TH-TC #Driving force for heat transfer (\u00b0C) (part 2)\n",
+ "R = L/(k*A) #Thermal resistance (\u00b0C/W) (part 3)\n",
+ "Q = DT/R/10**3 #Heat loss through the wall (kW)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. Theoretical part.\"\n",
+ "print \"2. The driving force for heat transfer is :\",DT,\" \u00b0C.\"\n",
+ "print \"3. The heat loss through the wall is :\",Q,\" kW.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. Theoretical part.\n",
+ "2. The driving force for heat transfer is : 40.0 \u00b0C.\n",
+ "3. The heat loss through the wall is : 4.0 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.5, Page number: 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TC = 27.0 #Inside temperature of walls (\u00b0C)\n",
+ "TH = 68.7 #Outside temperature of walls (\u00b0C)\n",
+ "LC = 6*0.0254 #Thickness of concrete (m)\n",
+ "LB = 8*0.0254 #Thickness of cork-board (m)\n",
+ "LW = 1*0.0254 #Thickness of wood (m)\n",
+ "kC = 0.762 #Thermal conductivity of concrete (W/m.K)\n",
+ "kB = 0.0433 #Thermal conductivity of cork-board (W/m.K)\n",
+ "kW = 0.151 #Thermal conductivity of wood (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "RC = LC/kC #Thermal resistance of concrete (K/W)\n",
+ "RB = LB/kB #Thermal resistance of cork-board (K/W)\n",
+ "RW = LW/kW #Thermal resistance of wood (K/W)\n",
+ "Q = (TC-TH)/(RC+RB+RW) #Heat transfer rate across the wall (W)\n",
+ "T = -(Q*RW-TC) #Interface temperature between wood and cork-board (K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate across the wall is :\",round(Q,3),\" W.\"\n",
+ "print \"The interface temperature between wood and cork-board is :\",round(T,1),\" \u00b0C.\"\n",
+ "print \"The interface temperature between wood and cork-board is :\",round(T+273,1),\" K.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate across the wall is : -8.239 W.\n",
+ "The interface temperature between wood and cork-board is : 28.4 \u00b0C.\n",
+ "The interface temperature between wood and cork-board is : 301.4 K.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.6, Page number: 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi, log\n",
+ "from sympy import symbols\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Z = symbols ('z') #Length of pipe\n",
+ "D1s = 4.0 #Glass wool inside diameter (in)\n",
+ "D2s = 8.0 #Glass wool outside diameter (in)\n",
+ "D1a = 3.0 #Asbestos inside diameter (in)\n",
+ "D2a = 4.0 #Asbestos outside diameter (in)\n",
+ "TH = 500.0 #Outer surface temperature of pipe (\u00b0F)\n",
+ "TC = 100.0 #Outer surface temperature of glass wool (\u00b0F)\n",
+ "La = 0.5/12.0 #Thickness of asbestos (ft)\n",
+ "Lb = 2.0/12.0 #Thickness of glss wool (ft)\n",
+ "ka = 0.120 #Thermal conductivity of asbestos (Btu/h.ft.\u00b0F)\n",
+ "kb = 0.0317 #Thermal conductivity of asbestos (Btu/h.ft.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Aa = (pi*Z*(D2a-D1a)/12.0)/log(D2a/D1a) #Area of asbestos (ft^2)\n",
+ "Ab = (pi*Z*(D2s-D1s)/12.0)/log(D2s/D1s) #Area of glass wool (ft^2)\n",
+ "Q1 = (TH-TC)/(La/(ka*Aa)+Lb/(kb*Ab)) #Steady-state heat transfer per foot of pipe (Btu/h.)\n",
+ "Q2 = Q1/Z #Factorization of Q/Z (Btu/h.ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The steady-state heat transfer per foot of pipe, Z, is :\",round(Q1/Z,1),\" x z Btu/h.\"\n",
+ "print \"The steady-state heat transfer factorizating out Z is :\",round(Q2,1),\" Btu/h.ft.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The steady-state heat transfer per foot of pipe, Z, is : 103.6 x z Btu/h.\n",
+ "The steady-state heat transfer factorizating out Z is : 103.6 Btu/h.ft.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.7, Page number: 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 7.6:\n",
+ "TH = 500 #Outer surface temperature of pipe (\u00b0F)\n",
+ "Lb = 2.0/12.0 #Thickness of glss wool (ft)\n",
+ "kb = 0.0317 #Thermal conductivity of asbestos (Btu/h.ft.\u00b0F)\n",
+ "Ab = 1.51 #Area of glass wool (ft^2)\n",
+ "Q = 103.5 #Steady-state heat transfer per foot of pipe (Btu/h.)\n",
+ "La = 0.5/12.0 #Thickness of asbestos (ft)\n",
+ "ka = 0.120 #Thermal conductivity of asbestos (Btu/h.ft.\u00b0F)\n",
+ "Aa = 0.91 #Area of asbestos (ft^2)\n",
+ "TC = 100 #Outer surface temperature of glass wool (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Ti_b = -((Lb*Q)/(kb*Ab)-TH) #Interfacial temperature of glass wool layer (\u00b0F)\n",
+ "Ti_a = (Q*La)/(ka*Aa)+TC #Interfacial temperature of asbestos layer (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The interfacial temperature of glass wool layer is :\",round(Ti_b),\" \u00b0F.\"\n",
+ "print \"The interfacial temperature of asbestos layer is :\",round(Ti_a,1),\" \u00b0F.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The interfacial temperature of glass wool layer is : 140.0 \u00b0F.\n",
+ "The interfacial temperature of asbestos layer is : 139.5 \u00b0F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 7.8, Page number: 100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from sympy import cos,symbols,diff,pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "z,h,k = symbols('z, h, k') #Length, height, thermal conductivity\n",
+ "T = 100*cos((pi*z)/(2*h)) #Temperature of solid slab\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = diff(T,z) #Temperature at z\n",
+ "Q = -k*(DT) #Heat flux in slab (Btu/s.ft^2)\n",
+ "Q1 = Q.subs(z,0) #Heat flux in slab at z = 0 (Btu/s.ft^2)\n",
+ "Q2 = Q.subs(z,h) #Heat flux in slab at z = h (Btu/s.ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat flux in slab is :\",Q,\" Btu/s.ft^2 .\"\n",
+ "print \"The heat flux in slab at z = 0 is :\",Q1,\" Btu/s.ft^2 .\"\n",
+ "print \"The heat flux in slab at z = h is :5\",Q2,\" Btu/s.ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat flux in slab is : 50*pi*k*sin(pi*z/(2*h))/h Btu/s.ft^2 .\n",
+ "The heat flux in slab at z = 0 is : 0 Btu/s.ft^2 .\n",
+ "The heat flux in slab at z = h is :5 50*pi*k/h Btu/s.ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_08.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_08.ipynb
new file mode 100755
index 00000000..51da1dc2
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_08.ipynb
@@ -0,0 +1,73 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f803274ef7ccff0534bae20ab018bc7691f3977ae1b9f41d5ea33a08004d0ffb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Unsteady-State Heat Conduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 8.4, Page number: 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi,sin,e\n",
+ "\n",
+ "#Variable declaration:\n",
+ "k = 9.1 #Thermal coductivity of steel rod (Btu/h.ft.\u00b0F)\n",
+ "p = 0.29*1728 #Density of steel rod (lb/ft^3)\n",
+ "Cp = 0.12 #Heat capacity of steel rod (Btu/lb.\u00b0F)\n",
+ "P = 15+14.7 #Absolute pressure (psia)\n",
+ "Ta = 71.0 #Initial temperature (\u00b0F)\n",
+ "L = 20.0/12.0 #Length of rod (ft)\n",
+ "t = 30.0/60.0 #Time taken (h)\n",
+ "x = 0.875/12.0 #Length from one of end (ft)\n",
+ "#From assumption:\n",
+ "n = 1.0 #First term\n",
+ "#From tables in Appendix:\n",
+ "Ts = 249.7 #Saturated steam temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "a = k/(p*Cp) #Thermal diffusivity (ft^2/s)\n",
+ "T = Ts+(Ta-Ts)*(((n+1)*(-1)**2 + 1 )/pi)*e**((-a*((n*pi)/L)**2)*t)*sin((n*pi*x)/L) #Temperature 0.875 inches from one of the ends after 30 minutes (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature 0.875 inches from one of the ends after 30 minutes is :\",round(T),\" \u00b0F.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature 0.875 inches from one of the ends after 30 minutes is : 232.0 \u00b0F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_09.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_09.ipynb
new file mode 100755
index 00000000..cba4bd5f
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_09.ipynb
@@ -0,0 +1,612 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:717821d247948d7fb9af37b8a67927013610ff26888719ba58ba9ef00c80f713"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Forced Convection"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.1, Page number: 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "D = 1.0 #Diamete of vessel (ft)\n",
+ "L = 1.5 #Length of vessel (ft)\n",
+ "T1 = 390.0 #Surface temperature of vessel (\u00b0F)\n",
+ "T2 = 50.0 #Surrounding temperature of vessel (\u00b0F)\n",
+ "h = 4.0 #Convective heat transfer coefficient (Btu/h.ft.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = pi*D*L+2*pi*(D/2)**2 #Total heat transfer area (ft^2)\n",
+ "Q = h*A*(T1-T2) #Rate of heat transfer (Btu/h)\n",
+ "R = 1/(h*A) #Thermal resistance (\u00b0F.h/Btu)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The thermal resistance of vessel wal is :\",round(R,4),\" \u00b0F.h/Btu .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thermal resistance of vessel wal is : 0.0398 \u00b0F.h/Btu .\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.2, Page number: 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Referring to the previous example, convert the resistance to K/W and \u00b0C/W.\n",
+ "'''\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 9.1:\n",
+ "R = 0.0398 #Theral resistance (\u00b0F.h/Btu)\n",
+ "Btu = 3.412 #Btu/h in a watt\n",
+ "C = 1.8 #Change in degree fahrenheit for a degree change in celsius\n",
+ "K = 1 #Change in degree celsius for a unit change in Kelvin\n",
+ "\n",
+ "#Calculation:\n",
+ "Rc = R*Btu/C #Thermal resistance in degree cesius per watt (\u00b0C/W)\n",
+ "Rk = Rc/K #Thermal resistance in Kelvin per watt (K/W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The thermal resistance in \u00b0C/W is :\",round(Rc,3),\" \u00b0C/W.\"\n",
+ "print \"The thermal resistance in K/W is :\",round(Rk,3),\" K/W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thermal resistance in \u00b0C/W is : 0.075 \u00b0C/W.\n",
+ "The thermal resistance in K/W is : 0.075 K/W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.3, Page number: 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h = 48.0 #Convective heat transfer coefficient (Btu/h.ft.\u00b0F)\n",
+ "A = 2*1.5 #Total heat transfer area (ft^2)\n",
+ "Ts = 530.0 #Surface temperature of plate (\u00b0F)\n",
+ "Tm = 105.0 #Maintained temperature of opposite side of plate (\u00b0F)\n",
+ "kW = 3.4123*10**3 #Units kW in a Btu/h\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = h*A*(Ts-Tm) #Heat transfer rate in Btu/h (Btu/h)\n",
+ "Q1 = Q/kW #Heat transfer rate in kW (kW)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate in Btu/h is :\",round(Q),\" Btu/h.\"\n",
+ "print \"The heat transfer rate in kW is :\",round(Q1,2),\" kW.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate in Btu/h is : 61200.0 Btu/h.\n",
+ "The heat transfer rate in kW is : 17.94 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.4, Page number: 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TS = 10+273 #Outer surface temperature of wall (K)\n",
+ "Q = 3000.0 #Heat transfer rate (W)\n",
+ "h = 100.0 #Convection coefficient of air (W/m^2)\n",
+ "A = 3.0 #Area of glass window (m^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "TM = TS-Q/(h*A) #Bulk temperature of fluid (K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The bulk temperature of fluid is :\",round(TM),\" K.\"\n",
+ "print \"The bulk temperature of fluid is :\",round(TM-273),\" \u00b0C.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The bulk temperature of fluid is : 273.0 K.\n",
+ "The bulk temperature of fluid is : 0.0 \u00b0C.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.5, Page number: 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h = 24.0 #Plant operating hour per day (h/day)\n",
+ "d = 350.0 #Plant operating day per year (day/yr)\n",
+ "\n",
+ "#Calculation:\n",
+ "N = h*d #Operating hours per year (h/yr)\n",
+ "#From example 9.1:\n",
+ "Q = 8545.0 #Rate of energy loss (Btu/h)\n",
+ "Qy = Q*N #Steady-state energy loss yearly (Btu/yr)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The yearly steady-state energy loss is :\",round(Qy/10**7,2),\" x 10^7 Btu/yr.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The yearly steady-state energy loss is : 7.18 x 10^7 Btu/yr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.7, Page number: 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from sympy import symbols, integrate\n",
+ "\n",
+ "#Variable declaration:\n",
+ "x = 0.3 #Length from the leading age of the plate (m)\n",
+ "L = 1.2 #Length of plate (m)\n",
+ "TS = 58.0 #Surface temperature of plate (\u00b0C)\n",
+ "Ta = 21.0 #Temperature of flowing air (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "hx = 25/x**0.4 #Local heat transfer coefficient at 0.3m (W/m^2.K) (Part 1)\n",
+ "y = symbols('y') #Length\n",
+ "hy = 25/y**0.4 #hx at the end of the plate (W/m^2.K)\n",
+ "h = integrate(hy, (y,0,L))/L #Average heat transfer coefficient (W/m^2.K)\n",
+ "Q = hx*(TS-Ta) #Heat flux at 0.3m from leading edge of plate (W/m^2)\n",
+ "hL = 25/L**0.4 #Local heat transfer coefficient at plate end (W/m^2.K) (Part 2) \n",
+ "r = h/hL #Ratio h/hL at the end of the plate\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The heat flux at 0.3 m from the leading edge of the plate is :\",round(Q),\" W/m^2.\"\n",
+ "print \"2. The local heat transfer coefficient at the end of the plate is :\",round(hL,1),\" W/m^2.K.\"\n",
+ "print \"3. The ratio h/hL at the end of plate is :\",round(r,3),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The heat flux at 0.3 m from the leading edge of the plate is : 1497.0 W/m^2.\n",
+ "2. The local heat transfer coefficient at the end of the plate is : 23.2 W/m^2.K.\n",
+ "3. The ratio h/hL at the end of plate is : 1.667 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.8, Page number: 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 9.7:\n",
+ "b = 1.0 #Width of plate (m)\n",
+ "L = 1.2 #Length of plate (m)\n",
+ "TS = 58.0 #Surface temperture of plate (\u00b0C)\n",
+ "Ta = 21.0 #Air flow temperature (\u00b0C)\n",
+ "h = 38.7 #Average heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = b*L #Area for heat transfer for the entire plate (m^2)\n",
+ "Q = h*A*(TS-Ta) #Rate of heat transfer over the whole length of the plate (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of heat transfer over the whole length of the plate is :\",round(Q,-1),\" W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of heat transfer over the whole length of the plate is : 1720.0 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.9, Page number: 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "#Variable declaration:\n",
+ "m = 0.075 #Mass rate of air flow (kg/s)\n",
+ "D = 0.225 #Diameter of tube (m)\n",
+ "mu = 208*10**-7 #Dynamic viscosity of fluid (N)\n",
+ "Pr = 0.71 #Prandtl number\n",
+ "k = 0.030 #Thermal conductivity of air (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Re = 4*m/(pi*D*mu) #Reynolds number\n",
+ "#From equation 9.26:\n",
+ "Nu = 0.023*(Re**0.8)*(Pr**0.3) #Nusselt number\n",
+ "h = (k/D)*Nu #Heat transfer coefficient of air (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Heat transfer coefficient of air is :\",round(h,2),\" W/m^2.K.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Heat transfer coefficient of air is : 7.76 W/m^2.K.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.10, Page number: 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "D = 0.902/12.0 #Inside diameter of tube (ft)\n",
+ "T_in = 60.0 #Temperature water entering the tube (\u00b0F)\n",
+ "T_out = 70.0 #Temperature water leaving the tube (\u00b0F)\n",
+ "V = 7.0 #Average wave velocity water (ft/s)\n",
+ "p = 62.3 #Density of water (lb/ft^3)\n",
+ "mu = 2.51/3600.0 #Dynamic viscosity of water (lb/ft.s)\n",
+ "Cp = 1.0 #Viscosity of centipoise (Btu/lb.\u00b0F)\n",
+ "k = 0.34 #Thermal conductivity of water (Btu/h.ft.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Re = D*V*p/mu #Reynolds Number\n",
+ "Pr = Cp*mu/k*3600 #Prandtl number\n",
+ "#From equation 9.26:\n",
+ "Nu = 0.023*(Re**0.8)*(Pr**0.4) #Nusselt number\n",
+ "h = (k/D)*Nu #Average film heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required average film heat transfer coefficient is :\",round(h),\" Btu/h.ft^2.\u00b0F.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required average film heat transfer coefficient is : 1265.0 Btu/h.ft^2.\u00b0F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.11, Page number: 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "P = 1.0132 * 10**5 #Air pressure (Pa)\n",
+ "T = 300.0+273.0 #Air temperature (K)\n",
+ "V = 5.0 #Air flow velocity (m/s)\n",
+ "D = 2.54/100.0 #Diameter of tube (m)\n",
+ "R = 287.0 #Gas constant (m^2/s^2.K)\n",
+ "#From Appendix:\n",
+ "Pr = 0.713 #Prandtl number of nitrogen\n",
+ "mu = 1.784*10**(-5) #Dynamic viscosity of nitrogen (kg/m.s)\n",
+ "k = 0.0262 #Thermal conductivity of nitrogen (W/m.K)\n",
+ "Cp = 1.041 #Heat capacity of nitrogen (kJ/kg.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "p = P/(R*T) #Density of air\n",
+ "Re = D*V*p/mu #Reynolds number\n",
+ "#From table 9.5:\n",
+ "Nu = 0.023*(Re**0.8)*(Pr**0.3) #Nusselt number\n",
+ "h = (k/D)*Nu #Heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required Heat transfer coefficient is :\",round(h,2),\" W/m^2.K.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required Heat transfer coefficient is : 17.57 W/m^2.K.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.12, Page number: 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 15.0 #Water entering temperature (\u00b0C)\n",
+ "T2 = 60.0 #Water leaving temperature (\u00b0C)\n",
+ "D = 0.022 #Inside diameter of tube (m)\n",
+ "V = 0.355 #Average water flow velocity (m/s)\n",
+ "TC = 150.0 #Outside wall temperature (\u00b0C)\n",
+ "#From Appendix:\n",
+ "p = 993.0 #Density of water (kg/m^3)\n",
+ "mu = 0.000683 #Dynamic viscosity of water (kg/m.s)\n",
+ "Cp = 4.17*10**3 #Heat capacity of water (J/kg.K)\n",
+ "k = 0.63 #Thermal conductivity of water (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tav1 = (T1+T2)/2.0 #Average bulk temperature of water (\u00b0C)\n",
+ "Re = D*V*p/mu #Reynolds number\n",
+ "Pr = Cp*mu/k #Prandtl number\n",
+ "Tav2 = (Tav1+TC)/2.0 #Fluid's average wall temperature (\u00b0C)\n",
+ "#From Appendix:\n",
+ "mu_w = 0.000306 #Dynamic viscosity of fluid at wall (kg/m.s)\n",
+ "#From Table 9.5:\n",
+ "h = (k/D)*0.027*Re**0.8*Pr**0.33*(mu/mu_w)**0.14 #Heat transfer coefficient for water (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer coefficient for water is :\",round(h,1),\" W/m^2.K.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer coefficient for water is : 2497.3 W/m^2.K.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.13, Page number: 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 9.7:\n",
+ "h = 38.7 #Average heat transfer coefficient (W/m^2.K)\n",
+ "L = 1.2 #Length of plate (m)\n",
+ "k = 0.025 #Thermal conductivity of air (W/m)\n",
+ "\n",
+ "#Calculation:\n",
+ "Bi = h*L/k #Average Biot number\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average Biot number is :\",round(Bi),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average Biot number is : 1858.0 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 9.14, Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "#Variable declaration:\n",
+ "k = 60.0 #Thermal conductivity of rod (W/m.K)\n",
+ "p = 7850.0 #Density of rod (kg/m^3)\n",
+ "Cp = 434.0 #Heat capacity of rod (J/kg.K)\n",
+ "h = 140.0 #Convection heat transfer coefficient (W/m^2.K)\n",
+ "D = 0.01 #Diameter of rod (m)\n",
+ "kf = 0.6 #Thermal conductivity of fluid (W/m.K)\n",
+ "L = 2.5 #Length of rod (m)\n",
+ "Ts = 250.0 #Surface temperature of rod (\u00b0C)\n",
+ "Tf = 25.0 #Fluid temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "#Case 1:\n",
+ "a = k/(p*Cp) #Thermal diffusivity of bare rod (m^2/s)\n",
+ "#Case 2:\n",
+ "Nu = h*D/kf #Nusselt number\n",
+ "#Case 3:\n",
+ "Bi = h*D/k #Biot number of bare rod\n",
+ "#Case 4:\n",
+ "Q = h*(pi*D*L)*(Ts-Tf) #Heat transferred from rod to fluid (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The thermal diffusivity of the bare rod is :\",round(a/10**-5,2),\" x 10^-5 m^2/s.\"\n",
+ "print \"2. The nusselt number is :\",round(Nu,2),\" .\"\n",
+ "print \"3. The Biot number is :\",round(Bi,4),\" .\"\n",
+ "print \"4. The heat transferred from the rod to the fluid is :\",round(Q),\" W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The thermal diffusivity of the bare rod is : 1.76 x 10^-5 m^2/s.\n",
+ "2. The nusselt number is : 2.33 .\n",
+ "3. The Biot number is : 0.0233 .\n",
+ "4. The heat transferred from the rod to the fluid is : 2474.0 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_10.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_10.ipynb
new file mode 100755
index 00000000..f1c9afa8
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_10.ipynb
@@ -0,0 +1,514 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5a160b2a8858072f2a32a8c5f96e1426d911509afe45130ab4e23facf3414ba2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: Free Convection"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.1, Page number: 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Gr = 100.0 #Grashof number\n",
+ "Re = 50.0 #Reynolds number\n",
+ "\n",
+ "#Calculation:\n",
+ "LT = Gr/Re**2 #Measure of influence of convection effect\n",
+ "\n",
+ "#Result:\n",
+ "if (LT<1.0):\n",
+ " print \"The free convection effects can be neglected.\"\n",
+ "elif (LT>1.0):\n",
+ " print \"The free convection effects can not be neglected.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free convection effects can be neglected.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.2, Page number: 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 110.0+273.0 #Surface temperature of plate (K)\n",
+ "Too = 30.0+273.0 #Ambient air temperature (K)\n",
+ "L = 3.5 #Height of plate (m)\n",
+ "g = 9.807 #Gravitational acceleration (m^2/s)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tf = (Ts+Too)/2 #Film temperature (K)\n",
+ "DT = Ts - Too #Temperature difference between surface and air (K)\n",
+ "#From appendix:\n",
+ "v = 2.0*10**-5 #Kinematic viscosity for air (m^2/s)\n",
+ "k = 0.029 #Thermal conductivity for air (W/m.K)\n",
+ "Pr = 0.7 #Prandtl number\n",
+ "B = 1.0/Tf #Coefficient of expansion (K^-1)\n",
+ "Gr = g*B*DT*L**3/v**2 #Grashof number\n",
+ "Ra = Gr*Pr #Rayleigh number\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Grashof number is :\",round(Gr/10**11,2),\" x 10^11 .\"\n",
+ "print \"The Rayleigh number is :\",round(Ra/10**11,2),\" x 10^11 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Grashof number is : 2.45 x 10^11 .\n",
+ "The Rayleigh number is : 1.72 x 10^11 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.3, Page number: 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 10.2:\n",
+ "Ra = 1.71*10**11 #Rayleigh number\n",
+ "\n",
+ "#Result:\n",
+ "if (Ra>10**9):\n",
+ " print \"The convection flow category is turbulent.\"\n",
+ "elif(Ra<10**9):\n",
+ " print \"The convection flow category is laminar.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The convection flow category is turbulent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.4, Page number: 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From Table 10.1:\n",
+ "c = 0.1 #Constant c\n",
+ "m = 1.0/3.0 #Constant for turbulent free conection\n",
+ "#From example 10.2:\n",
+ "Ra = 1.71*10**11 #Rayleigh number\n",
+ "k = 0.029 #Thermal conductivity (W/m.K)\n",
+ "L = 3.5 #Thickness of plate (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "Nu = c*Ra**m #Average Nusselt number\n",
+ "h = Nu*k/L #Average heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average heat transfer coefficient is :\",round(h,1),\" W/m^2.K .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average heat transfer coefficient is : 4.6 W/m^2.K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.6, Page number: 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log,e\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 200.0+460.0 #Surface temperature of pipe (\u00b0R)\n",
+ "Too = 70.0+460.0 #Air temperature (\u00b0R)\n",
+ "D = 0.5 #Diameter of pipe (ft)\n",
+ "R = 0.73 #Universal gas constant (ft^3.atm.R^\u22121.lb.mol^\u22121)\n",
+ "P = 1.0 #Atmospheric pressure (Pa)\n",
+ "MW = 29.0 #Molecular weight of fluid (mol)\n",
+ "#From Appendix:\n",
+ "mu = 1.28*10**-5 #Absolute viscosity (lb/ft.s)\n",
+ "k = 0.016/3600.0 #Thermal conductivity (Btu/s.ft.\u00b0F)\n",
+ "g = 32.174 #Gravitational acceleration (ft/s^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tav = (Ts+Too)/2 #Average temperature (\u00b0R)\n",
+ "v = R*Tav/P #kinematic viscosity (ft^3/lbmol)\n",
+ "p = MW/v #Air density (lb/ft^3)\n",
+ "B = 1.0/Tav #Coefficient of expansion (\u00b0R^-1)\n",
+ "DT = Ts-Too #Temperature difference (\u00b0R)\n",
+ "Gr = D**3*p**2*g*B*DT/mu**2 #Grashof number\n",
+ "#From equation 10.5:\n",
+ "Cp = 0.25 #Air heat capacity (Btu/lb.\u00b0F)\n",
+ "Pr = Cp*mu/k #Prandtl number\n",
+ "GrPr = 10**8.24 #Rayleigh number\n",
+ "#From Holman^(3):\n",
+ "Nu = 10**(1.5) #Nusselt number\n",
+ "h = Nu*(k/D)*3600.0 #Air heat transfer film coefficient (Btu/h.ft.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required air heat transfer film coefficient is :\",round(h,2),\" Btu/h.ft.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required air heat transfer film coefficient is : 1.01 Btu/h.ft.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.7, Page number: 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 120.0+460 #Surface temperature of plate (\u00b0R)\n",
+ "Too = 60.0+460 #Ambient temperature of nitrogen (\u00b0R)\n",
+ "L = 6 #Height of plate (ft)\n",
+ "#From Appendix:\n",
+ "p = 0.0713 #Air density (lb/ft^3)\n",
+ "k = 0.01514 #Thermal conductivity (Btu/h.ft.\u00b0F)\n",
+ "v = 16.82*10**-5 #Kinematic viscosity (ft^2/s)\n",
+ "Pr = 0.713 #Prandtl number\n",
+ "g = 32.2 #Gravitational acceleration (ft/s^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tf = (Ts+Too)/2 #Mean film temperature (\u00b0R)\n",
+ "B = 1.0/Tf #Coefficient of expansion (\u00b0R^-1)\n",
+ "Gr = g*B*(Ts-Too)*L**3/v**2 #Grashof number\n",
+ "Ra = Gr*Pr #Rayleigh number\n",
+ "#From equation 10.13(Table 10.2) and costants from Table 10.1:\n",
+ "h = 0.10*(k/L)*Ra**(1.0/3.0) #Free convection heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The free convection heat transfer coefficient is :\",round(h,3),\" Btu/h.ft^2.\u00b0F .\"\n",
+ "print \"There is a calculation mistake in the book for calculating 'Gr', so, value of 'h' alters from that given.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free convection heat transfer coefficient is : 0.675 Btu/h.ft^2.\u00b0F .\n",
+ "There is a calculation mistake in the book for calculating 'Gr', so, value of 'h' alters from that given.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.8, Page number: 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example:\n",
+ "h = 0.675 #Free convection heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "A = 6.0*8.0 #Area of plate (ft^2)\n",
+ "Ts = 120.0 #Surface temperature of plate (\u00b0F)\n",
+ "Too = 60.0 #Ambient temperature of nitrogen (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = h*A*(Ts-Too) #Heat loss (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat loss is :\",round(Q,-1),\" Btu/h .\"\n",
+ "print \" The 'h' obtained in the previous example differs, therefore, 'Q' obtained here also fiffers from that given in book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss is : 1940.0 Btu/h .\n",
+ " The 'h' obtained in the previous example differs, therefore, 'Q' obtained here also fiffers from that given in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.9, Page number: 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 113.0+273.0 #Surface temperature of bulb (K)\n",
+ "Too = 31.0+273.0 #Ambient air temperature (K)\n",
+ "D = 0.06 #Diameter of sphere (m)\n",
+ "g = 9.8 #Gravitational acceleration (m/s^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tf = (Ts+Too)/2 #Mean temperature (K)\n",
+ "#From Appendix:\n",
+ "v = (22.38*10**-5)*0.0929 #Kinematic viscosity (m^2/s)\n",
+ "Pr = 0.70 #Prandtl number\n",
+ "k = 0.01735*1.729 #Thermal conductivity (W/m.K)\n",
+ "B = 1.0/(Tf) #Coefficient of expansion (K^-1)\n",
+ "Gr = g*B*(Ts-Too)*D**3/v**2 #Grashof number\n",
+ "Ra = Gr*Pr #Rayleigh number\n",
+ "\n",
+ "#From equation 10.13:\n",
+ "h = (k/D)*0.6*Ra**(1.0/4.0) #Heat transferred from bulb (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transferred from bulb to air is :\",round(h,2),\" W/m^2.K .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transferred from bulb to air is : 9.01 W/m^2.K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.10, Page number: 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 10.9:\n",
+ "h = 9.01 #Heat transferred from bulb (W/m^2.K)\n",
+ "D = 0.06 #Diameter of sphere (m)\n",
+ "Ts = 113.0+273.0 #Surface temperature of bulb (K)\n",
+ "Too = 31.0+273.0 #Ambient air temperature (K)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = pi*D**2 #Surface area of bulb (m^2)\n",
+ "Q = h*A*(Ts-Too) #Heat transfer lost by free convection from light bulb (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer lost by free convection from light bulb is :\",round(Q,2),\" W .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer lost by free convection from light bulb is : 8.36 W .\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.11, Page number: 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 10.9-10.10:\n",
+ "Q = 8.36 #Heat transfer lost by free convection from light bulb (W)\n",
+ "\n",
+ "#Calculation:\n",
+ "E = Q/100.0*(100.0) #Percent energy lost by free convection (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage of the energy lost by free convection is :\",round(E,2),\" % .\"\n",
+ "print \"The energy lost fraction is :\",round(E/100.0,4),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage of the energy lost by free convection is : 8.36 % .\n",
+ "The energy lost fraction is : 0.0836 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 10.13, Page number: 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "F = 50.0 #Buoyancy flux of gas (m^4/s^3)\n",
+ "u = 4.0 #wind speed (m/s)\n",
+ "\n",
+ "#Calculation:\n",
+ "xc = 14*F**(5.0/8.0) #Downward distance (m)\n",
+ "xf = 3.5*xc #distance of transition from first stage of rise to the second stage of rise (m)\n",
+ "Dh = 1.6*F**(1.0/3.0)*u**-1*xf**(2.0/3.0) #Plume rise (m)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The plume rise is :\",round(Dh),\" m .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The plume rise is : 101.0 m .\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_11.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_11.ipynb
new file mode 100755
index 00000000..70c1dfd8
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_11.ipynb
@@ -0,0 +1,686 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:063e55263471b05545d8cee123782ea0408a4dbcfbef0baacac009fc80ca4fe1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: Radiation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.3, Page number: 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from sympy import symbols, integrate,oo,exp,pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "l = symbols('l') #Wavelength (mu.m)\n",
+ "I = 40*exp(-l**2) #Intensity of radiation (Btu/h.ft^2.mu.m)\n",
+ "\n",
+ "#Calculation:\n",
+ "E = integrate(I, (l,0,oo)).evalf() #Total emissive power (Btu/h.ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total emissive power is :\",round(E,1),\" Btu/h.ft^2 .\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total emissive power is : 35.4 Btu/h.ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.4, Page number: 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "l = 0.25 #Wavelength (mu.m)\n",
+ "#From equation 11.4:\n",
+ "lT = 2884 #Product of wavelength and absolute temperature (mu.m.\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "T = lT/l #Sun's temperature (\u00b0R)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Sun's temperature is :\",round(T,-2),\" \u00b0R .\"\n",
+ "print \"The Sun's temperature in fahrenheit scale is :\",round(T-460,-3),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Sun's temperature is : 11500.0 \u00b0R .\n",
+ "The Sun's temperature in fahrenheit scale is : 11000.0 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.5, Page number: 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 1500.0+460.0 #Absolute temperature 1 (\u00b0R)\n",
+ "T2 = 1000.0+460.0 #Absolute temperature 2 (\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "X = T1**4/T2**4 #Ratio of quantity of heat transferred\n",
+ "x = 100*(T1**4-T2**4)/T2**4 #Percentage increase in heat transfer (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The ratio of the quantity/rate of heat transferred is :\",round(X,2),\" .\"\n",
+ "print \"The percentage increase in heat transfer is :\",round(x),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of the quantity/rate of heat transferred is : 3.25 .\n",
+ "The percentage increase in heat transfer is : 225.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.6, Page number: 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 1200.0+460.0 #Absolute temperature of wall 1 (\u00b0R)\n",
+ "T2 = 800.0+460.0 #Absolute temperature of wall 2 (\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From equation 11.23:\n",
+ "X = 0.173*((T1/100.0)**4-(T2/100.0)**4) #Heat removed from colder wall (Btu/h.ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat removed from the colder wall to maintain a steady-state is :\",round(X),\" Btu/h.ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat removed from the colder wall to maintain a steady-state is : 8776.0 Btu/h.ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.7, Page number: 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "s = 0.173 #Stefan-Boltzmann constant (Btu/h.ft^2.\u00b0R)\n",
+ "EH = 0.5 #Energy transferred from hotter body (Btu/h.ft^2)\n",
+ "EC = 0.75 #Energy transferred to colder body (Btu/h.ft^2)\n",
+ "TH = 1660.0 #Absolute temperature of hotter body (\u00b0R)\n",
+ "TC = 1260.0 #Absolute temperature of colder body (\u00b0R)\n",
+ "\n",
+ "#Calculation:\n",
+ "E = s*((TH/100.0)**4-(TC/100.0)**4)/((1.0/EH)+(1.0/EC)-1.0) #Net energy exchange per unit area (Btu/h.ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net energy exchange per unit area is :\",round(E,-1),\" Btu/h.ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net energy exchange per unit area is : 3760.0 Btu/h.ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.8, Page number: 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 11.6-11.7:\n",
+ "E1 = 8776.0 #Energy exchange between black bodies (Btu/h.ft^2)\n",
+ "E2 = 3760.0 #Energy exchange between non-black bodies (Btu/h.ft^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "D = (E1-E2)/E1*100 #Percent difference in energy (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percent difference relative to the black body is:\",round(D,1),\" % .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percent difference relative to the black body is: 57.2 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.9, Page number: 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "s = 0.173*10**-8 #Stefan-Boltzmann constant (Btu/h.ft^2.\u00b0R)\n",
+ "TH = 300.0+460.0 #Absolute temperature of external surface (\u00b0R)\n",
+ "TC = 75.0+460.0 #Absolute temperature of duct (\u00b0R)\n",
+ "#From Table 6.2:\n",
+ "AH = 0.622 #External surface area of pipe (ft^2)\n",
+ "#From Table 11.2:\n",
+ "EH = 0.44 #Emissivity of oxidized steel\n",
+ "AC = 4.0*1.0*1.0 #External surface area of duct (ft^2)\n",
+ "EC = 0.23 #Emissivity of galvanized zinc\n",
+ "\n",
+ "#Calculation:\n",
+ "FE = 1.0/(1.0/EH+((AH/AC)*(1.0/EC-1.0))) #Emissivity correction factor\n",
+ "Q = FE*AH*s*(TH**4-TC**4) #Net radiation heat transfer (Btu/h.ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net radiation heat transfer is :\",round(Q,2),\" Btu/h.ft^2 .\"\n",
+ "print \"There is a calculation error in book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net radiation heat transfer is : 96.96 Btu/h.ft^2 .\n",
+ "There is a calculation error in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.10, Page number: 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TH = 140.0+460.0 #Absolute outside temperature of pipe (ft^2)\n",
+ "TC = 60.0+460.0 #Absolute temperature of surrounding atmosphere (ft^2)\n",
+ "A = 10.0 #Area of pipe (ft^2)\n",
+ "E = 0.9 #Emissivity of pipe\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = E*A*0.173*((TH/100.0)**4-(TC/100.0)**4) #Heat loss due to radiation (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat loss due to radiation is :\",round(Q,-1),\" Btu/h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss due to radiation is : 880.0 Btu/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.11, Page number: 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#Froma example 11.10:\n",
+ "Q = 880.0 #Heat loss due to radiation (Btu/h)\n",
+ "A = 10.0 #Area of pipe (ft^2)\n",
+ "TH = 140.0 #Absolute outside temperature of pipe (\u00b0F)\n",
+ "TC = 60.0 #Absolute temperature of surrounding atmosphere (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "hr = Q/(A*(TH-TC)) #Radiation heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The radiation heat transfer coefficient is :\",round(hr,1),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The radiation heat transfer coefficient is : 1.1 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.12, Page number: 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "D = 0.0833 #Diameter of tube (ft)\n",
+ "L = 2.0 #Length of tube (ft)\n",
+ "h = 2.8 #Heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "Ta1 = 1500.0+460.0 #Temperature of hot air in furnace (\u00b0R)\n",
+ "Ta2 = 1350.0+460.0 #Temperature of hot air in the furnace brick walls (\u00b0R)\n",
+ "Tt = 600.0+460.0 #Surface temperature of tube (\u00b0R)\n",
+ "E = 0.6 #Surface emissivity of tube\n",
+ "s = 0.1713*10**-8 #Stefan-Boltzmann constant\n",
+ "\n",
+ "\n",
+ "#Calculation:\n",
+ "#Case 1:\n",
+ "A = pi*D*L #Area of tube (ft^2)\n",
+ "Qc = round(h*A*(Ta1-Tt),-1) #Convection heat transfer from air to tube (Btu/h)\n",
+ "Qr = round(E*s*A*(Ta2**4-Tt**4),-2) #Radiation feat transfer from wall to tube (Btu/h)\n",
+ "Q = Qr+Qc #Total heat transfer (Btu/h)\n",
+ "#Case 2:\n",
+ "Qp = Qr/Q*100 #Radiation percent \n",
+ "#Case 3:\n",
+ "hr = Qr/(A*(Ta2-Tt)) #Radiation heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "#Case 4:\n",
+ "T = Ta2-Tt #Temperature difference (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The convective heat transferred to the metal tube is :\",Qc,\" Btu/h .\"\n",
+ "print \" The radiative heat transferred to the metal tube is :\",Qr,\" Btu/h .\"\n",
+ "print \" The total heat transferred to the metal tube is :\",Q,\" Btu/h .\"\n",
+ "print \"2. The percent of total heat transferred by radiation is :\",round(Qp,1),\" % .\"\n",
+ "print \"3. The radiation heat transfer coefficient is :\",round(hr,1),\" Btu/h.ft^2.\u00b0F .\"\n",
+ "if (T > 200):\n",
+ " print \"4. The use of the approximation Equation (11.30), hr = 4EsTav^3, is not appropriate.\"\n",
+ "elif (T < 200):\n",
+ " print \"4. The use of the approximation Equation (11.30), hr = 4EsTav^3, is appropriate.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The convective heat transferred to the metal tube is : 1320.0 Btu/h .\n",
+ " The radiative heat transferred to the metal tube is : 5100.0 Btu/h .\n",
+ " The total heat transferred to the metal tube is : 6420.0 Btu/h .\n",
+ "2. The percent of total heat transferred by radiation is : 79.4 % .\n",
+ "3. The radiation heat transfer coefficient is : 13.0 Btu/h.ft^2.\u00b0F .\n",
+ "4. The use of the approximation Equation (11.30), hr = 4EsTav^3, is not appropriate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.13, Page number: 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = 5.0 #Radiation heat transfer (W)\n",
+ "E = 1.0 #Emissivity of filament\n",
+ "s = 5.669*10**-8 #Stefan-Boltzmann constant\n",
+ "T1 = 900.0+273.0 #Light bulb temperature (K)\n",
+ "T2 = 150.0+273.0 #Glass bulb temperature (K)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = Q/(E*s*(T1**4-T2**4)) #Surface area of the filament (m^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The surface area of the filament is :\",round(A*10**4,2), \"cm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The surface area of the filament is : 0.47 cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.14, Page number: 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 127.0+273.0 #Surface temperature (K)\n",
+ "T2 = 20.0+273.0 #Wall temperature (K)\n",
+ "T3 = 22.0+273.0 #Air temperature (K)\n",
+ "s = 5.669*10**-8 #Stefan-Boltzmann constant\n",
+ "e = 0.76 #Surface emissivity of anodized aluminium\n",
+ "D = 0.06 #Diameter of pipe (m)\n",
+ "L = 100.0 #Length of pipe (m)\n",
+ "h = 15.0 #Pipe convective heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Eb = s*T1**4 #Emissive energy of pipe (W/m^2)\n",
+ "E = e*Eb #Emissive power from surface of pipe (W/m^2)\n",
+ "A = pi*D*L #Surface area of pipe (m^2)\n",
+ "Qc = h*A*(T1-T3) #Convection heat transfer to air (W)\n",
+ "Qr = e*s*A*(T1**4-T2**4) #Radiation heat transfer rate (W)\n",
+ "Q = Qc+Qr #Total heat transfer rate (Btu/h)\n",
+ "Tav = (T1+T2)/2.0 #Average temperature (K)\n",
+ "hr = 4*e*s*Tav**3 #Radiation heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emissive power from surface of pipe is :\",round(E),\" W/m^2 .\"\n",
+ "print \"The convection heat transfer to air is :\",round(Qc/10**3,1),\" kW .\"\n",
+ "print \"The radiation heat transfer rate is :\",round(Qr/10**3,1),\" kW \"\n",
+ "print \"The radiation heat transfer coefficient is :\",round(hr,1),\" W/m^2.K .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emissive power from surface of pipe is : 1103.0 W/m^2 .\n",
+ "The convection heat transfer to air is : 29.7 kW .\n",
+ "The radiation heat transfer rate is : 14.8 kW \n",
+ "The radiation heat transfer coefficient is : 7.2 W/m^2.K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.15, Page number: 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 11.14:\n",
+ "Qc = 15.0 #Convection heat transfer coefficient (W/m^2.K)\n",
+ "hr = 7.2 #Radiation heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "X = hr/(Qc+hr)*100.0 #Percent heat transfer by radiation (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percent heat transfer by radiation is :\",round(X,1),\" % .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percent heat transfer by radiation is : 32.4 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.16, Page number: 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "FV = 1.0 #Correction factor\n",
+ "#From example 11.9:\n",
+ "FE = 0.358 #Emissivity correction factor\n",
+ "TH = 300.0+460.0 #Absolute temperature of external surface (\u00b0R)\n",
+ "TC = 75.0+460.0 #Absolute temperature of duct (\u00b0R)\n",
+ "AH = 0.622 #Area of pipe (ft^2)\n",
+ "s = 0.173*10**-8 #Stefan-Boltzmann constant\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = FV*FE*AH*s*(TH**4-TC**4) #Heat transfer rate (Btu/h.ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate is :\",round(Q,2),\" Btu/h.ft\"\n",
+ "print \"Since, 'Q' obtained in (11.9) is 96.96 Btu/h.ft, the solution does not match with book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate is : 96.96 Btu/h.ft\n",
+ "Since, 'Q' obtained in (11.9) is 96.96 Btu/h.ft, the solution does not match with book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 11.17, Page number: 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From figure 11.2:\n",
+ "L = 1.0 #Space between plates (m)\n",
+ "X = 0.5 #Length of plate (m)\n",
+ "Y = 2.0 #Width of plate (m)\n",
+ "s = 5.669*10**-8 #Stefan-Boltzmann constant\n",
+ "TH = 2000.0+273.0 #Temperature of hotter plate (K)\n",
+ "TC = 1000.0+273.0 #Temperature of colder plate (K)\n",
+ "Btu = 0.2934*10**-3 #Btu/h in a KW\n",
+ "\n",
+ "#Calculation:\n",
+ "A = X*Y #Area of plate (m^2)\n",
+ "Z1 = Y/L #Ratio of width with space\n",
+ "Z2 = X/L #Ratio of length with space\n",
+ "#From figure 11.2:\n",
+ "FV = 0.18 #Correction factor\n",
+ "FE = 1.0 #Emissivity correction factor\n",
+ "Q1 = FV*FE*s*A*(TH**4-TC**4) #Net radiant heat exchange between plates (kW)\n",
+ "Q2 = Q1/Btu #Net radiant heat exchange between plates in Btu/h (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net radiant heat exchange between plates is :\",round(Q1,-2),\" kW .\"\n",
+ "print \"The net radiant heat exchange between plates in Btu/h is :\",round(Q2/10**8,2),\" x 10^8 Btu/h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net radiant heat exchange between plates is : 245600.0 kW .\n",
+ "The net radiant heat exchange between plates in Btu/h is : 8.37 x 10^8 Btu/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_12.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_12.ipynb
new file mode 100755
index 00000000..dd2d06ef
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_12.ipynb
@@ -0,0 +1,483 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2b2623ff77afaafd7c16fc0720e69537bf598cad89dca70b267d9306235c5968"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Condensation and Boiling"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.2, Page number: 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "C = 1 #Number of constituents\n",
+ "P = 1 #Number of phases\n",
+ "\n",
+ "#Calculation:\n",
+ "F = C-P+2 #Number of degrees of freedom\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of degrees of freedom is :\",F,\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of degrees of freedom is : 2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.4, Page number: 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "\n",
+ "U1 = 1237.1 #Internnal energy of gas (Btu/lb)\n",
+ "U2_g = 1112.2 #Internal energy of gas (Btu/lb)\n",
+ "U2_l = 343.15 #Internal energy of liquid (Btu/lb)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = 0.5*(U2_g+U2_l)-1*U1 #Heat removed (Btu/lb)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Heat removed from the system during the process is :\",round(Q,1),\" Btu/lb .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat removed from the system during the process is : -509.4 Btu/lb .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.5, Page number: 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import symbols,solve\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 99.0 #Mean film temperature (\u00b0C)\n",
+ "T2 = 98.0 #Plate surface temperature (\u00b0C)\n",
+ "g = 9.807 #Gravitational acceleration (m/s^2)\n",
+ "#From Appendix:\n",
+ "T3 = 100.0 #Saturation temperatre (\u00b0C)\n",
+ "h_vap1 = 970.3 #Latent heat of steam in Btu/lb (Btu/lb)\n",
+ "h_vap2 = 2.255*10**6 #Latent heat of steam in J/kg (J/kg)\n",
+ "p_v = 0.577 #Density of steam (kg/m^3)\n",
+ "p_l = 960.0 #Density of liquid water condensate (kg/m^3)\n",
+ "mu_l = 2.82*10**-4 #Absolute viscosity of liquid water condensate (kg/m.s)\n",
+ "k = 0.68 #Thermal conductivity of water (W/m.K)\n",
+ "#From table 12.2\n",
+ "Z = 0.4 #Height of rectangular plate (m)\n",
+ "Pw = 0.2 #Wetted perimeter of rectangular plate (m)\n",
+ "h = symbols('h') #Average heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = Z*Pw #Heat transfer area of plate (m^2)\n",
+ "R = A/Pw #Ratio A/Pw (m)\n",
+ "v_l = mu_l/p_l #Kinematic viscosity of liquid water condensate (m^2/s)\n",
+ "Co1 = (h/k)*(v_l**2/g/(1-p_v/p_l))**(1/3) #Condensation number (in terms of the average heat transfer coefficient)\n",
+ "Re = 4*h*Z*(T3-T2)/(mu_l*h_vap2) #Reynolds number in terms of the average heat transfer coefficient\n",
+ "#From equation 12.14:\n",
+ "CO1 = 0.0077*Re**Z #Co in terms of Reynolds number for flow type 1\n",
+ "x1 = solve(Co1-CO1,h) #Solving heat transfer coefficient (W/m^2.K)\n",
+ "h1 =x1[1]; #Average heat transfer coefficient for flow type 1 (W/m^2.K)\n",
+ "Re1 = Re.subs(h,h1); #Reynolds number for flow type 1\n",
+ "CO2 = 1.874*Re**(-1/3) #Co in terms of Reynolds number for flow tupe 2\n",
+ "x2 = solve(Co1-CO2,h) #Solving average heat transfer coefficient for flow type 2 (W/m^2.K)\n",
+ "h2 = x2[0]; #Average heat transfer coefficient for flow type 2 (W/m^2.K)\n",
+ "Re2 = Re.subs(h,h2) #Reynolds number for flow type 2\n",
+ "\n",
+ "#Result:\n",
+ "print \"The type of condensation flow type 2 is laminar.\"\n",
+ "print \"And the condensation heat transfer coefficient is :\",round(h2,-1),\" W/m^2.K .\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The type of condensation flow type 2 is laminar.\n",
+ "And the condensation heat transfer coefficient is : 14700.0 W/m^2.K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.6, Page number: 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 12.5:\n",
+ "Re = 73.9 #Reynolds number\n",
+ "mu_l = 2.82*10**-4 #Absolute viscosity of liquid water condensate (kg/m.s)\n",
+ "Pw = 0.2 #Wetted perimeter of rectangular plate (m)\n",
+ "h = 14700.0 #Heat transfer coefficient (W/m^2.K)\n",
+ "T_sat = 100.0 #Saturation temperature (\u00b0C)\n",
+ "Ts = 98.0 #Surface temperature (\u00b0C)\n",
+ "A = 0.2*0.4 #Heat transfer area of plate (m^2) \n",
+ "\n",
+ "#Calculation:\n",
+ "m1 = Re*mu_l/4.0 #Mass flow rate of condensate (kg/m.s)\n",
+ "m = Pw*m1 #Mass flow rate of condensate (kg/s)\n",
+ "Co = (3.038*10**-5)*h #Condensation number\n",
+ "Q = h*A*(T_sat-Ts) #Heat transfer rate (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The mass flow rate of condensate is :\",round(m1,4),\" kg/m.s . \"\n",
+ "print \"2. The heat transfer rate is :\",round(Q/10**3,2),\" kW . \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The mass flow rate of condensate is : 0.0052 kg/m.s . \n",
+ "2. The heat transfer rate is : 2.35 kW . \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.7, Page number: 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "T_sat = 126.0 #Saturation temperature (\u00b0F)\n",
+ "T = 64.0 #Surface temperature of tube (\u00b0F)\n",
+ "g = 32.2 #Gravitational acceleration (ft^2/s)\n",
+ "D = 4.0/12.0 #Outside diameter of tube (ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tf = (T_sat+T)/2.0 #Mean film temperature (\u00b0F)\n",
+ "#From approximate values of key properties:\n",
+ "h_vap = 1022.0 #Latent heat of steam (Btu/lb)\n",
+ "p_v = 0.00576 #Density of steam (lb/ft^3)\n",
+ "p_l = 62.03 #Density of liquid (lb/ft^3)\n",
+ "k_l = 0.364 #Thermal conductivity of liquid (Btu/h.ft.\u00b0F)\n",
+ "mu_l = 4.26*10**-4 #Absolute viscosity of liquid water condensate (lb/ft.s)\n",
+ "h = 0.725*((p_l*(p_l-p_v)*g*h_vap*k_l**3)/(mu_l*D*(T_sat-T)/3600.0))**(1.0/4.0) #Average heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average heat transfer coefficient is :\",round(h,1),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average heat transfer coefficient is : 911.4 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.9, Page number: 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "Qs1 = 9800.0 #Heat flux (W/m^2)\n",
+ "Ts1 = 102.0 #Original surface temperature (\u00b0C)\n",
+ "Ts2 = 103.0 #New surface temperature (\u00b0C)\n",
+ "Tsat = 100.0 #Saturation temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "h1 = Qs1/(Ts1-Tsat) #Original heat transfer coefficient (W/m^2.K)\n",
+ "DT1 = (Ts1 - Tsat) #Original excess temperature (\u00b0C)\n",
+ "DT2 = (Ts2 - Tsat) #New excess temperature (\u00b0C)\n",
+ "n = 0.25 #Value of n for laminar flow\n",
+ "h2 = h1*(DT2/DT1)**(n) #New heat transfer coefficient (W/m^2.K)\n",
+ "Qs2 = h2*(Ts2-Tsat) #New heat flux (W/m^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The new heat flux is :\",round(Qs2),\" W/m^2.K . \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new heat flux is : 16268.0 W/m^2.K . \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.10, Page number: 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 12.9:\n",
+ "Ts1 = 102.0 #Original surface temperature (\u00b0C)\n",
+ "Ts2 = 103.0 #New surface temperature (\u00b0C)\n",
+ "Tsat = 100.0 #Saturation temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "DTe1 = (Ts1 - Tsat) #Original excess temperature (\u00b0C)\n",
+ "DTe2 = (Ts2 - Tsat) #New excess temperature (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The original excess temperature is: DTe = \",DTe1,\" \u00b0C .\"\n",
+ "print \"The new excess temperature is: DTe = \",DTe2,\" \u00b0C .\"\n",
+ "if ((DTe1 < 5) and (DTe2 < 5)):\n",
+ " print \"The assumption of the free convection mechanism is valid since DTe < 5\u00b0C.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The original excess temperature is: DTe = 2.0 \u00b0C .\n",
+ "The new excess temperature is: DTe = 3.0 \u00b0C .\n",
+ "The assumption of the free convection mechanism is valid since DTe < 5\u00b0C.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.11, Page number: 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 12.9:\n",
+ "Cp = 4127.0 #heat capacity (J/kg . K)\n",
+ "DTe = 3.0 #New excess temperature (\u00b0C)\n",
+ "h_vap = 2.26*10**6 #latent heat of vaporization (J/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "Ja_L = Cp*DTe/h_vap #Liquid Jakob number\n",
+ "\n",
+ "#Result:\n",
+ "print \"The liquid Jakob number is :\",round(Ja_L,5),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The liquid Jakob number is : 0.00548 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.12, Page number: 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 106.0 #Surface temperature (\u00b0C)\n",
+ "Tsat = 100.0 #Saturation temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "DTe = Ts-Tsat #Excess temperature (\u00b0C)\n",
+ "#From table 12.5:\n",
+ "C1 = 5.56 #Constant C1\n",
+ "n1 = 3.0 #Constant n1\n",
+ "C2 = 1040.0 #Constant C2\n",
+ "n2 = 1.0/3.0 #Constant n2\n",
+ "P = 1.0 #Absolute pressure (atm)\n",
+ "Pa = 1.0 #Ambient absolute pressure (atm)\n",
+ "\n",
+ "#Calculation:\n",
+ "h1 = C1*DTe**n1*(P/Pa)**0.4 #Boiling water heat transfer coefficient (W/m^2)\n",
+ "Qs1 = h1*DTe #Surface flux (W/m^2)\n",
+ "h2 = C2*DTe**n2*(P/Pa)**0.4 #Second Boiling water heat transfer coefficient (W/m^2)\n",
+ "Qs2 = h2*DTe #Second Surface flux (W/m^2) \n",
+ "\n",
+ "#Result:\n",
+ " \n",
+ "if (Qs1/10**3 > 15.8 and Qs1/10**3 < 236):\n",
+ " print \"The boiling regime is :\",round(Qs1/10**3,1),\" kW/m^2 .\"\n",
+ " print \"The heat transfer coefficient is :\",round(h1), \" W/m^2 .\"\n",
+ "elif (Qs1/10**3 < 15.8):\n",
+ " print \"The boiling regime is :\",round(Qs2/10**3,2),\" kW/m^2 .\"\n",
+ " print \"The heat transfer coefficient is :\",round(h2), \" W/m^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The boiling regime is : 11.34 kW/m^2 .\n",
+ "The heat transfer coefficient is : 1890.0 W/m^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 12.13, Page number: 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 12.12:\n",
+ "Qs1 = 11340.0 #Surface flux (W/m^2)\n",
+ "D = 0.3 #Diameter of electric heater (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = pi*(D/2.0)**2 #Surface area of heater (m^2)\n",
+ "Qs = Qs1*A #Heat transfer rate (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of heat transfer is :\",round(Qs),\" W .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of heat transfer is : 802.0 W .\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_13.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_13.ipynb
new file mode 100755
index 00000000..b4812ba2
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_13.ipynb
@@ -0,0 +1,425 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c1f753b566ef5be1a578722a730958eae554497c733345943c47490976e91069"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Refrigeration and Cryogenics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.1, Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "LR = 7.5/12.0 #Thickness of refractory (ft)\n",
+ "LI = 3.0/12.0 #Thickness of insulation (ft)\n",
+ "LS = 0.25/12.0 #Thickness of steel (ft)\n",
+ "kR = 0.75 #Thermal conductivity of refractory\n",
+ "kI = 0.08 #Thermal conductivity of insulation\n",
+ "kS = 26.0 #Thermal conductivity of steel\n",
+ "TR = 2000.0 #Average surface temperature of the inner face of the refractory (\u00b0F)\n",
+ "TS = 220.0 #Average surface temperature of the outer face of the steel (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = TR-TS #Temperature difference (\u00b0F)\n",
+ "Q = DT/(LR/kR+LI/kI+LS/kS) #Heat loss (Btu/h.ft^2)(here representing Qdot/A)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat loss is :\",round(Q),\" Btu/h.ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss is : 450.0 Btu/h.ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.2, Page number: 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "LR = 7.5/12.0 #Thickness of refractory (ft)\n",
+ "kR = 0.75 #Thermal conductivity of refractory\n",
+ "TR = 2000.0 #Average surface temperature of the inner face of the refractory (\u00b0F)\n",
+ "Q = 450.0 #Heat loss (Btu/h.ft^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "TI = TR - Q*(LR/kR) #Temperature of the boundary where the refractory meets the insulation (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature of the boundary where the refractory meets the insulation is :\",round(TI),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature of the boundary where the refractory meets the insulation is : 1625.0 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.3, Page number: 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "QbyA = 70000.0 #Total heat loss (Btu/h)\n",
+ "Q = 450.0 #Heat loss (Btu/h.ft^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = QbyA/Q #Area available for heat transfer (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The area available for heat transfer is :\",round(A,1),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The area available for heat transfer is : 155.6 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.9, Page number: 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h_out = 390.0 #Enthalpy of the fluid that exits from the evaporator (kJ/kg)\n",
+ "h_in = 230.0 #Enthalpy of the fluid that enters the unit (kJ/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "QC = h_out - h_in #Heat absorbed by the evaporator (kJ/kg)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat absorbed by the evaporator is :\",round(QC),\" kJ/kg .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat absorbed by the evaporator is : 160.0 kJ/kg .\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.10, Page number: 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 13.9:\n",
+ "TS = -10.0+273.0 #Fluid\u2019s saturation temperature expressed in Kelvin (K)\n",
+ "QC = 160.0 #Heat absorbed by the evaporator (kJ/kg)\n",
+ "\n",
+ "#Calcuation:\n",
+ "DS = QC/TS #Fluid\u2019s change in entropy(kJ/kg.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fluid's change in entropy across the evaporator is :\",round(DS,2),\" kJ/kg.K .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fluid's change in entropy across the evaporator is : 0.61 kJ/kg.K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.11, Page number: 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From figure 13.2:\n",
+ "h1 = 390.0 #Fluid enthalpy on entering the compressor (kJ/kg)\n",
+ "h2 = 430.0 #Fluid enthalpy on leaving the compressor (kJ/kg)\n",
+ "h3 = 230.0 #Fluid enthalpy on leaving the condenser (kJ/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "QH = h2 - h3 #Heat rejected from the condenser (kJ/kg)\n",
+ "W_in = h2 - h1 #Change in enthalpy across the compressor (kJ/kg)\n",
+ "QC = QH - W_in #Heat absorbed by the evaporator (kJ/kg)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat absorbed by the evaporator of the refrigerator is :\",round(QC),\" kJ/kg .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat absorbed by the evaporator of the refrigerator is : 160.0 kJ/kg .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.12, Page number: 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 13.11:\n",
+ "W_in = 40.0 #Change in enthalpy across the compressor (kJ/kg)\n",
+ "QC = 160.0 #Heat absorbed by the evaporator (kJ/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "COP = QC/W_in #Refrigerator\u2019s C.O.P.\n",
+ "\n",
+ "#Result:\n",
+ "print \"the refrigerator's C.O.P. is :\",round(COP),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the refrigerator's C.O.P. is : 4.0 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.13, Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "h1 = 548.0 #Steam enthalpy at the entry and exit to the boiler (kJ/kg)\n",
+ "h2 = 3989.0 #Steam enthalpy at the entry and exit to the turbine (kJ/kg)\n",
+ "h3 = 2491.0 #Steam enthalpy at the entry and exit to the pump (kJ/kg)\n",
+ "QH = 2043.0 #Heat rejected by the condenser (kJ/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "h4 = h3 - QH #Steam enthalpy at the entry and exit to the condenser (kJ/kg)\n",
+ "Qb = h2 - h1 #Enthalpy change across the boiler (kJ/kg)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The enthalpy change across the boiler is :\",round(Qb),\" kJ/kg .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy change across the boiler is : 3441.0 kJ/kg .\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.14, Page number: 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 13.4:\n",
+ "h1 = 548.0 #Steam enthalpy at the entry and exit to the boiler (kJ/kg)\n",
+ "h2 = 3989.0 #Steam enthalpy at the entry and exit to the turbine (kJ/kg)\n",
+ "h3 = 2491.0 #Steam enthalpy at the entry and exit to the pump (kJ/kg)\n",
+ "h4 = 448.0 #Steam enthalpy at the entry and exit to the condenser (kJ/kg)\n",
+ "Qb = 3441.0 #Enthalpy change across the boiler (kJ/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "Wt = h2 - h3 #Work produced by the turbine (kJ/kg)\n",
+ "Wp = h1 - h4 #Work used by the pump (kJ/kg)\n",
+ "W_net = Wt - Wp #Net work by subtracting the pump work from the turbine work (kJ/kg)\n",
+ "n_th = W_net/Qb #Thermal efficiency\n",
+ "\n",
+ "#Result:\n",
+ "print \"The thermal efficiency is :\",round(n_th*100,1),\" % .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thermal efficiency is : 40.6 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 13.15, Page number: 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From table 13.4:\n",
+ "x3 = 0.9575 #Mass fraction vapour at point 3\n",
+ "h3 = 2491.0 #Steam enthalpy at the entry and exit to the pump (kJ/kg)\n",
+ "s3 = 7.7630 #Entropy at the entry and exit to the pump (kJ/kg.K)\n",
+ "s4 = 1.4410 #Entropy at the entry and exit to the condenser (kJ/kg.K)\n",
+ "#From example13.14:\n",
+ "h4 = 448.0 #Steam enthalpy at the entry and exit to the condenser (kJ/kg)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q_out = h3 - h4 #Heat rejected (kJ/kg)\n",
+ "DS = s3 - s4 #Process change in entropy (kJ/kg)\n",
+ "T3 = Q_out/DS #Temperature at point 3 (K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature at point 3 is :\",round(T3),\" K .\"\n",
+ "print \"Or, the temperature at point 3 is :\",round(T3-273),\" \u00b0C .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature at point 3 is : 323.0 K .\n",
+ "Or, the temperature at point 3 is : 50.0 \u00b0C .\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_14.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_14.ipynb
new file mode 100755
index 00000000..7bc0f737
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_14.ipynb
@@ -0,0 +1,705 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e3c042bf60cf5ea8673efb2741d5df5f7935daa012691b520a2d1357e838bd6c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14: Introduction to Heat Exchangers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.1, Page number: 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "scfm = 20000.0 #Volumetric flow rate of air at standard conditions (scfm)\n",
+ "H1 = 1170.0 #Enthalpy at 200\u00b0F (Btu/lbmol)\n",
+ "H2 = 14970.0 #Enthalpy at 2000\u00b0F (Btu/lbmol)\n",
+ "Cp = 7.53 #Average heat capacity (Btu/lbmol.\u00b0F)\n",
+ "T1 = 200.0 #Initial temperature (\u00b0F)\n",
+ "T2 = 2000.0 #Final temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "n = scfm/359.0 #Flow rate of air in a molar flow rate (lbmol/min)\n",
+ "DH = H2 - H1 #Change in enthalpy (Btu/lbmol)\n",
+ "DT = T2 - T1 #Change in temperature (\u00b0F)\n",
+ "Q1 = n*DH #Heat transfer rate using enthalpy data (Btu/min)\n",
+ "Q2 = n*Cp*DT #Heat transfer rate using the average heat capacity data (Btu/min)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate using enthalpy data is :\",round(Q1/10**5,2),\" x 10^5 Btu/min.\"\n",
+ "print \"The heat transfer rate using the average heat capacity data is :\",round(Q2/10**5,2),\" x 10^5 Btu/min.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate using enthalpy data is : 7.69 x 10^5 Btu/min.\n",
+ "The heat transfer rate using the average heat capacity data is : 7.55 x 10^5 Btu/min.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.2, Page number: 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "n = 1200.0 #Flow rate of air in a molar flow rate (lbmol/min)\n",
+ "Cp = 0.26 #Average heat capacity (Btu/lbmol.\u00b0F)\n",
+ "T1 = 200.0 #Initial temperature (\u00b0F)\n",
+ "T2 = 1200.0 #Final temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = T2 - T1 #Change in temperature (\u00b0F)\n",
+ "Q = n*Cp*DT #Required heat rate (Btu/min)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required heat rate is :\",round(Q/10**5,2),\" x 10^5 Btu/min .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required heat rate is : 3.12 x 10^5 Btu/min .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.3, Page number: 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Tc1 = 25.0 #Initial temperature of cold fluid (\u00b0C)\n",
+ "Th1 = 72.0 #Initial temperature of hot fluid (\u00b0C)\n",
+ "Th2 = 84.0 #Final temperature of hot fluid (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From equation 14.2:\n",
+ "Tc2 = (Th2-Th1)+Tc1 #Final temperature of cold fluid (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The final temperature of the cold liquid is :\",Tc2,\" \u00b0C .\"\n",
+ "print \"There is a printing mistake in unit of final temperature in book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature of the cold liquid is : 37.0 \u00b0C .\n",
+ "There is a printing mistake in unit of final temperature in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.4, Page number: 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 100.0 #Steam temperature at 1 atm (\u00b0C)\n",
+ "Tl = 25.0 #Fluid temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "DTlm = Ts - Tl #Log mean temperature difference (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The LMTD is :\",DTlm,\" \u00b0C .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The LMTD is : 75.0 \u00b0C .\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.5, Page number: 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 100.0 #Steam temperature at 1 atm (\u00b0C)\n",
+ "T1 = 25.0 #Initial fluid temperature (\u00b0C)\n",
+ "T2 = 80.0 #Final fluid temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = Ts - T1 #Temperature difference driving force at the fluid entrance (\u00b0C)\n",
+ "DT2 = Ts - T2 #Temperature driving force at the fluid exit (\u00b0C)\n",
+ "DTlm = (DT1 - DT2)/log(DT1/DT2) #Log mean temperature difference (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The LMTD is :\",round(DTlm,1),\" \u00b0C .\"\n",
+ "print \"There is a calculation mistake regarding final result in book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The LMTD is : 41.6 \u00b0C .\n",
+ "There is a calculation mistake regarding final result in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.6, Page number: 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 500.0 #Temperature of hot fluid entering the heat exchanger (\u00b0F)\n",
+ "T2 = 400.0 #Temperature of hot fluid exiting the heat exchanger (\u00b0F)\n",
+ "t1 = 120.0 #Temperature of cold fluid entering the heat exchanger (\u00b0F)\n",
+ "t2 = 310.0 #Temperature of cold fluid exiting the heat exchanger (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T1 - t2 #Temperature difference driving force at the heat exchanger entrance (\u00b0F)\n",
+ "DT2 = T2 - t1 #Temperature difference driving force at the heat exchanger exit (\u00b0F)\n",
+ "DTlm = (DT1 - DT2)/(log(DT1/DT2)) #LMTD (driving force) for the heat exchanger (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The LMTD (driving force) for the heat exchanger is :\",round(DTlm),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The LMTD (driving force) for the heat exchanger is : 232.0 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.7, Page number: 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m = 8000.0 #Rate of oil flow inside the tube (lb/h)\n",
+ "Cp = 0.55 #Heat capacity of oil (Btu/lb.\u00b0F)\n",
+ "T1 = 210.0 #Initial temperature of oil (\u00b0F)\n",
+ "T2 = 170.0 #Final temperature of oil (\u00b0F)\n",
+ "t = 60.0 #Tube surface temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = T2 - T1 #Change in temperature (\u00b0F)\n",
+ "Q = m*Cp*DT #Heat transferred from the heavy oil (Btu/h)\n",
+ "DT1 = T1 - t #Temperature difference driving force at the pipe entrance (\u00b0F)\n",
+ "DT2 = T2 - t #Temperature difference driving force at the pipe exit (\u00b0F)\n",
+ "DTlm = (DT1 - DT2)/(log(DT1/DT2)) #LMTD (driving force) for the heat exchanger (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate is :\",round(Q),\" Btu/h .\"\n",
+ "print \"The LMTD for the heat exchanger is :\",round(DTlm),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate is : -176000.0 Btu/h .\n",
+ "The LMTD for the heat exchanger is : 129.0 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.8, Page number: 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 138.0 #Temperature of oil entering the cooler (\u00b0F)\n",
+ "T2 = 103.0 #Temperature of oil leaving the cooler (\u00b0F)\n",
+ "t1 = 88.0 #Temperature of coolant entering the cooler (\u00b0F)\n",
+ "t2 = 98.0 #Temperature of coolant leaving the cooler (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "#For counter flow unit:\n",
+ "DT1 = T1 - t2 #Temperature difference driving force at the cooler entrance (\u00b0F)\n",
+ "DT2 = T2 - t1 #Temperature difference driving force at the cooler exit (\u00b0F)\n",
+ "DTlm1 = (DT1 - DT2)/(log(DT1/DT2)) #LMTD (driving force) for the heat exchanger (\u00b0F)\n",
+ "#For parallel flow unit:\n",
+ "DT3 = T1 - t1 #Temperature difference driving force at the cooler entrance (\u00b0F)\n",
+ "DT4 = T2 - t2 #Temperature difference driving force at the cooler exit (\u00b0F)\n",
+ "DTlm2 = (DT3 - DT4)/(log(DT3/DT4)) #LMTD (driving force) for the heat exchanger (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The LMTD for counter-current flow unit is :\",round(DTlm1,1),\" \u00b0F .\"\n",
+ "print \"The LMTD for parallel flow unit is :\",round(DTlm2,1),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The LMTD for counter-current flow unit is : 25.5 \u00b0F .\n",
+ "The LMTD for parallel flow unit is : 19.5 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.10, Page number: 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "A = 1.0 #Surface area of glass (m^2)\n",
+ "h1 = 11.0 #Heat transfer coefficient inside room (W/m^2.K)\n",
+ "L2 = 0.125*0.0254 #Thickness of glass (m)\n",
+ "k2 = 1.4 #Thermal conductivity of glass (W/m.K)\n",
+ "h3 = 9.0 #Heat transfer coefficient from window to surrounding cold air (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "R1 = 1.0/(h1*A) #Internal convection resistance (K/W)\n",
+ "R2 = L2/(k2*A) #Conduction resistance through glass panel (K/W)\n",
+ "R3 = 1.0/(h3*A) #Outside convection resistance (K/W)\n",
+ "Rt = R1+R2+R3 #Total thermal resistance (K/W)\n",
+ "U = 1.0/(A*Rt) #Overall heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The overall heat transfer coefficient is :\",round(U,1),\" W/m^2.K .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall heat transfer coefficient is : 4.9 W/m^2.K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.11, Page number: 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Dx = 0.049/12.0 #Thickness of copper plate (ft)\n",
+ "h1 = 208.0 #Film coefficient of surface one (Btu/h.ft^2.\u00b0F)\n",
+ "h2 = 10.8 #Film coefficient of surface two (Btu/h.ft^2.\u00b0F)\n",
+ "k = 220.0 #Thermal conductivity for copper (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "U = 1.0/(1.0/h1+Dx/k+1.0/h2) #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The overall heat transfer coefficient is :\",round(U,2),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall heat transfer coefficient is : 10.26 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.12, Page number: 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Do = 0.06 #Outside diameter of pipe (m)\n",
+ "Di = 0.05 #Inside diameter of pipe (m)\n",
+ "ho = 8.25 #Outside coefficient (W/m^2.K)\n",
+ "hi = 2000.0 #Inside coefficient (W/m^2.K)\n",
+ "R = 1.33*10**-4 #Resistance for steel (m^2.K/W)\n",
+ "\n",
+ "#Calculation:\n",
+ "U = 1.0/(Do/(hi*Di)+R+1.0/ho) #Overall heat transfer coefficient (W/m^2.\u00b0K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The overall heat transfer coefficient is :\",round(U,2),\" W/m^2.\u00b0K .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall heat transfer coefficient is : 8.2 W/m^2.\u00b0K .\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.14, Page number: 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Di = 0.825/12.0 #Pipe inside diameter (ft)\n",
+ "Do = 1.05/12.0 #Pipe outside diameter (ft)\n",
+ "Dl = 4.05/12.0 #Insulation thickness (ft)\n",
+ "l = 1.0 #Pipe length (ft)\n",
+ "kp = 26.0 #Thermal conductivity of pipe (Btu/h.ft.\u00b0F)\n",
+ "kl = 0.037 #Thermal conductivity of insulation (Btu/h.ft.\u00b0F)\n",
+ "hi = 800.0 #Steam film coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "ho = 2.5 #Air film coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "ri = Di/2.0 #Pipe inside radius (ft)\n",
+ "ro = Do/2.0 #Pipe outside radius (ft)\n",
+ "rl = Dl/2.0 #Insulation radius (ft)\n",
+ "Ai = pi*Di*l #Inside area of pipe (ft^2)\n",
+ "Ao = pi*Do*l #Outside area of pipe (ft^2)\n",
+ "Al = pi*Dl*l #Insulation area of pipe (ft^2)\n",
+ "A_Plm = (Ao-Ai)/log(Ao/Ai) #Log mean area for steel pipe (ft^2)\n",
+ "A_Ilm = (Al-Ao)/log(Al/Ao) #Log mean area for insulation (ft^2)\n",
+ "Ri = 1.0/(hi*Ai) #Air resistance (m^2.K/W)\n",
+ "Ro = 1.0/(ho*Al) #Steam resistance (m^2.K/W)\n",
+ "Rp = (ro-ri)/(kp*A_Plm) #Pipe resistance (m^2.K/W)\n",
+ "Rl = (rl-ro)/(kl*A_Ilm) #Insulation resistance (m^2.K/W)\n",
+ "U = 1.0/(Ai*(Ri+Rp+Ro+Rl)) #Overall heat coefficient based on the inside area (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The overall heat transfer coefficient based on the inside area of the pipe is :\",round(U,3),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall heat transfer coefficient based on the inside area of the pipe is : 0.748 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.15, Page number: 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 14.14:\n",
+ "Di = 0.825/12.0 #Pipe inside diameter (ft)\n",
+ "L = 1.0 #Pipe length (ft)\n",
+ "Ui = 0.7492 #Overall heat coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "Ts = 247.0 #Steam temperature (\u00b0F)\n",
+ "ta = 60.0 #Air temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Ai = pi*Di*L #Inside area of pipe (ft^2)\n",
+ "Q = Ui*Ai*(Ts-ta) #Heat transfer rate (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate is :\",round(Q,1),\" Btu/h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate is : 30.3 Btu/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.16, Page number: 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "hw = 200.0 #Water heat coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "ho = 50.0 #Oil heat coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "hf = 1000.0 #Fouling heat coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "DTlm = 90.0 #Log mean temperature difference (\u00b0F)\n",
+ "A = 15.0 #Area of wall (ft^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "X = 1.0/hw+1.0/ho+1.0/hf #Equation 14.34 for constant A\n",
+ "U = 1.0/X #Overall heat coeffocient (Btu/h.ft^2.\u00b0F)\n",
+ "Q = U*A*DTlm #Heat transfer rate (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate is :\",round(Q,-1),\" Btu/h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate is : 51920.0 Btu/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 14.17, Page number: 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import symbols,log,nsolve\n",
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T = 80.0 #Pipe surface temperature (\u00b0F)\n",
+ "t1 = 10.0 #Brine inlet temperature (\u00b0F)\n",
+ "DT2 = symbols('DT2') #Discharge temperature of the brine solution (\u00b0F)\n",
+ "m = 20*60 #Flowrate of brine solution (lb/h)\n",
+ "Cp = 0.99 #Heat capacity of brine solution (Btu/lb.\u00b0F)\n",
+ "U1 = 150 #Overall heat transfer coefficient at brine solution entrance (Btu/h.ft^2.\u00b0F)\n",
+ "U2 = 140 #Overall heat transfer coefficientat at brine solution exit (Btu/h.ft^2.\u00b0F)\n",
+ "A = 2.5 #Pipe surface area for heat transfer (ft^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T-t1 #Temperature approach at the pipe entrance (\u00b0F)\n",
+ "Q = m*Cp*(DT1-DT2) #Energy balance to the brine solution across the full length of the pipe (Btu/h)\n",
+ "DT1m = (DT1-DT2)/log(DT1/DT2) #Equation for the LMTD\n",
+ "QQ = A*(U2*DT1-U1*DT2)/log(U2*DT1/U1/DT2) #Equation for the heat transfer rate (Btu/h)\n",
+ "E = QQ-Q #Energy balance equation\n",
+ "R = nsolve([E],[DT2],[1.2]) #\n",
+ "DT = R[0] #Log mean temperature difference\n",
+ "t2 = T-DT #In discharge temperature of the brine solution (\u00b0F)\n",
+ "t2c = 5/9*(t2-32) #In discharge temperature of the brine solution in \u00b0C (c/5 = (F-32)/9)\n",
+ "_Q_ = Q.subs(DT2,DT) #Heat transfer rate (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature approach at the brine inlet side is :\",round(DT1,1),\" \u00b0F.\"\n",
+ "print \"Or, the temperature approach at the brine inlet side is :\",round(DT1/1.8,1),\" \u00b0C.\"\n",
+ "print \"The exit temperature of the brine solution is :\",round(t2,1),\" \u00b0F.\"\n",
+ "print \"Or, the exit temperature of the brine solution is :\",round((t2-32)/1.8,1),\" \u00b0C.\"\n",
+ "print \"The rate of heat transfer is :\",round(_Q_,-1),\" Btu/h.\"\n",
+ "print \"Or, the rate of heat transfer is :\",round(_Q_/3.412,-2),\" W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature approach at the brine inlet side is : 70.0 \u00b0F.\n",
+ "Or, the temperature approach at the brine inlet side is : 38.9 \u00b0C.\n",
+ "The exit temperature of the brine solution is : 28.4 \u00b0F.\n",
+ "Or, the exit temperature of the brine solution is : -2.0 \u00b0C.\n",
+ "The rate of heat transfer is : 21830.0 Btu/h.\n",
+ "Or, the rate of heat transfer is : 6400.0 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_15.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_15.ipynb
new file mode 100755
index 00000000..8331e128
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_15.ipynb
@@ -0,0 +1,815 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9c90790dace23fbdfc3e0ce273ce32b43acc5cfa1b423fc8f4e186650e91a101"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15: Double Pipe Heat Exchangers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.2, Page number: 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = 12000.0 #Heat transfer rate (Btu/h)\n",
+ "U = 48.0 #Overall heat coefficient (Btu/ft^2.h.\u00b0F)\n",
+ "DTlm = 50.0 #Log mean temperature difference (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = Q/(U*DTlm) #Area of exchanger (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The area of the exchanger is :\",round(A),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The area of the exchanger is : 5.0 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.3, Page number: 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from sympy import symbols,solve,log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = 56760 #Heat transfer rate (Btu/h)\n",
+ "U = 35.35 #Overall heat coefficient (Btu/ft.h.\u00b0F)\n",
+ "A = 32.1 #Area of exachanger (ft^2)\n",
+ "t1 = 63.0 #Outlet cold water temperature (\u00b0F)\n",
+ "T1 = 164 #Outlet hot water temperature (\u00b0F)\n",
+ "T2 = 99 #Inlet hot water temperature (\u00b0F)\n",
+ "t2 = symbols('t2') #Inlet cold water temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DTlm = Q/(U*A) #Log mean temperature difference (\u00b0F)\n",
+ "dT1 = T1-t1 #Temperature approach at pipe outlet (\u00b0F)\n",
+ "dT2 = T2-t2 #Temperature approach at pipe inlet (\u00b0F)\n",
+ "Eq = (dT2-dT1)/log(dT2/dT1)-DTlm\n",
+ "R = solve(Eq,t2) #Inlet cold water temperature (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inlet cold water temperature is : \",round(R[0]),\" \u00b0F.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inlet cold water temperature is : 79.0 \u00b0F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.4, Page number: 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m = 14.6 #Flow rate of water inside the tube (lb/min)\n",
+ "Cp = 1 #Heat capacity of water (Btu/lb.\u00b0F)\n",
+ "t2 = 79 #Initial temperature of water (\u00b0F)\n",
+ "t1 = 63 #Final temperature of water (\u00b0F)\n",
+ "#From example 15.3:\n",
+ "Q1 = 56760 #Old heat transfer rate (Btu/h)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q2 = m*Cp*(t2-t1) #New heat transfer rate (Btu/min)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The new heat transfer rate is :\",round(Q2),\" Btu/min.\" \n",
+ "print \"Or, the new heat transfer rate is :\",round(Q2*60),\" Btu/h.\"\n",
+ "if (Q1==Q2) :\n",
+ " print \"This result agree with the Q\u02d9 provided in the problem statement. Shakespeare is wrong, nothing is rotten there.\"\n",
+ "else :\n",
+ " print \"This result does not agree with the Q\u02d9 provided in the problem statement. Shakespeare is right, something is indeed rotten.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new heat transfer rate is : 234.0 Btu/min.\n",
+ "Or, the new heat transfer rate is : 14016.0 Btu/h.\n",
+ "This result does not agree with the Q\u02d9 provided in the problem statement. Shakespeare is right, something is indeed rotten.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.5, Page number: 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 210.0 #Initial temperature of oil (\u00b0F)\n",
+ "T2 = 170.0 #Final temperature of oil (\u00b0F)\n",
+ "T3 = 60.0 #Surface temperature of oil (\u00b0F)\n",
+ "m = 8000.0 #Flow rate of oil inside tube (lb/h)\n",
+ "cp = 0.55 #Heat capacity of oil (Btu/lb.\u00b0F)\n",
+ "U = 63.0 #Overall heat teansfer coefficient (Btu.h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T1-T3 #Temperature difference 1 (\u00b0F)\n",
+ "DT2 = T2-T3 #Temperature difference 2 (\u00b0F)\n",
+ "DTlm = (DT1-DT2)/log(DT1/DT2) #Log mean temerature difference (\u00b0F)\n",
+ "Q = m*cp*(T1-T2) #Heat transferred (Btu/h)\n",
+ "A = Q/(U*DTlm) #Heat transfer area (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required heat transfer area is :\",round(A,2),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required heat transfer area is : 21.66 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.6, Page number: 293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 140.0 #Initial temperature of hot water (\u00b0F)\n",
+ "T2 = 110.0 #Final temperature of hot water (\u00b0F)\n",
+ "T3 = 60.0 #Initial temperature of cold water (\u00b0F)\n",
+ "T4 = 90.0 #Initial temperature of cold water (\u00b0F)\n",
+ "DTlm2 = 50.0 #Log mean temerature difference for countercurrent flow, a constant (\u00b0F) (part 2)\n",
+ "m = 100.0*60 #Water flow rate (lb/h)\n",
+ "cp = 1.0 ##Heat capacity of water (Btu/lb.\u00b0F)\n",
+ "U = 750.0 #Overall heat teansfer coefficient (Btu.h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T1-T3 #Temperature difference 1 (\u00b0F) (part 1)\n",
+ "DT2 = T2-T4 #Temperature difference 2 (\u00b0F)\n",
+ "DTlm1 = (DT1-DT2)/log(DT1/DT2) #Log mean temerature difference (\u00b0F)\n",
+ "Q = m*cp*(T1-T2) #Heat transferred (Btu/h)\n",
+ "Ap = Q/(U*DTlm1) #Heat transfer area for parallel flow (ft^2)\n",
+ "Ac = Q/(U*DTlm2) #Heat transfer area for counter flow (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The double pipe co-current flow is :\",round(Ap,2),\" ft^2 .\"\n",
+ "print \"1. The double pipe countercurrent flow is :\",round(Ac,2),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The double pipe co-current flow is : 5.55 ft^2 .\n",
+ "1. The double pipe countercurrent flow is : 4.8 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.8, Page number: 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "uC = 3.7*10**-4 \t #Viscosity of benzene (lb/ft.s)\n",
+ "uH = 2.05*10**-4 \t #Viscosity of water @200 \u00b0F (lb/ft.s)\n",
+ "u2 = 2.16*10**-4 \t\t\t\t #Viscosity of water @192 \u00b0F (lb/ft.s)\n",
+ "pC = 54.8 #Density of benzene (lb/ft^3)\n",
+ "pH = 60.13 #Density of water (lb/ft^3)\n",
+ "cpC = 0.415 #Specific heat capacity of benzene (Btu/lb.\u00b0F)\n",
+ "cpH = 1 #Specific heat capacity of water (Btu/lb.\u00b0F)\n",
+ "sgC = 0.879 \n",
+ "kC = 0.092 #Thermal conductivity of benzene (Btu/h.ft.\u00b0F)\n",
+ "kH = 0.392 #Thermal conductivity of water @200 \u00b0F (Btu/h.ft.\u00b0F)\n",
+ "k2 = 0.390\t\t\t\t\t #Thermal conductivity of water @192 \u00b0F (Btu/h.ft.\u00b0F)\n",
+ "mC = 2500\t \t\t\t #Flow rate of benzene (lb/s)\n",
+ "mH = 4000 #Flow rate of water (lb/s)\n",
+ "Re = 13000 #Reynolds number\n",
+ "dTc = 120-60\t\t\t\t\t #Difference in temperature heating for benzene\n",
+ "Tw = 200\t\t\t\t #Temperatperature of hot water (\u00b0F)\n",
+ "#For 2-inch schedule 40 pipe\n",
+ "Ai = 0.541 #Inside area of pipe (ft^2/ft)\n",
+ "Ao = 0.622 #Outside area of pipe (ft^2/ft)\n",
+ "Di = 2.067 #Inside diameter of pipe (inch)\n",
+ "Do = 2.375 #Outside diameter of pipe (inch)\n",
+ "Si = 0.0233 #Inside surface area of pipe (ft^2)\n",
+ "dXw = 0.128 #Width of pipe (ft)\n",
+ "\n",
+ "#For 4-inch schedule 40 pipe\n",
+ "Dio = 4.026 #Inside diameter of pipe (inch)\n",
+ "Doi = Do #Outside diameter of pipe (inch)\n",
+ "kw = 26 \n",
+ "\n",
+ "#Calculations:\n",
+ "def St(Re,Pr):\t\t\t\t #Dittus Boelter equation\n",
+ "\treturn 0.023*Re**-0.2*Pr**-0.667\n",
+ "#For inside tubes:\n",
+ "Dicalc = 4*mC/(Re*pi*uC)/3600 #Inside diameter (ft)\n",
+ "mHcalc = Re*pi*uH*(Doi+Dio)/4*3600/12 #Mass flow rate of water (lb/h)\n",
+ "Q = mC*cpC*dTc\t\t\t\t\t #Heat in water (Btu/h)\n",
+ "dTH = Q/mH #Temperature difference of water (\u00b0F)\n",
+ "THo = Tw - dTH #Outlet temperature of water (\u00b0F)\n",
+ "THav = (Tw+THo)/2 #Average temperature of water (\u00b0F) \n",
+ "#For benzene:\n",
+ "PrC = cpC*uC/kC*3600 #Prandtl number\n",
+ "StC = round(St(13000, PrC),5) #Stanton number\n",
+ "hi = StC*cpC*mC/Si #Heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "#For water:\n",
+ "ReH = 4*mH/3600/(pi*u2*(Doi+Dio)/12) #Reynolds number\n",
+ "PrH = round(cpH*(u2)/k2*3600 ,2) #Prandtl number\n",
+ "StH = round(St(ReH, PrH),5) #Stanton number\n",
+ "Sann = round(pi/4*(Dio**2-Doi**2)/144,4) #Surface area of annulus (ft^2)\n",
+ "ho = round(StH*cpH*mH/Sann) #Heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "#For pipe:\n",
+ "Dlm = round((Do-Di)/log(Do/Di)*12,3) #Log mean difference in diameter (ft)\n",
+ "Uo = 1/(Do/Di/hi + dXw*Do/kw/Dlm + 1/ho) #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "dTlm = (124.4-80)/log(124.4/80) #Log mean temperature difference (\u00b0F)\n",
+ "L = Q/(Uo*0.622*dTlm) #Length of pipe (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print 'The required length of pipe: ',round(L,1), 'ft'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required length of pipe: 31.4 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.10, Page number: 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import e\n",
+ "\n",
+ "#Variable declaration:\n",
+ "MC = 2000.0 \n",
+ "mc = 1000.0\n",
+ "U = 2000.0\n",
+ "A = 10.0\n",
+ "T1 = 300.0\n",
+ "t1 = 60.0\n",
+ "\n",
+ "#Calculation:\n",
+ "B = 1.0/mc \n",
+ "b = 1.0/MC\n",
+ "x = B/b\n",
+ "y = U*(B-b)\n",
+ "T2 = ((x-y)*T1 + x*(e-y)*t1)/(2*e-1)\n",
+ "t2 = t1+(T1-T2)/x\n",
+ "\n",
+ "#Result:\n",
+ "print \"T2 = :\",round(T2),\" \u00b0F\"\n",
+ "print \"t2 = :\",round(t2),\" \u00b0F\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T2 = : 114.0 \u00b0F\n",
+ "t2 = : 153.0 \u00b0F\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.11, Page number: 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from sympy import symbols,solve,log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h1 = 1200.0 #Hot film coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "h2 = 1175.0 #Cold film coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "L = 200.0 #Length of pipe (ft)\n",
+ "MC = 30000.0\n",
+ "mc = 22300.0\n",
+ "T1 = 300.0 #Inlet temperature of hot fluid in pipe (\u00b0F)\n",
+ "t1 = 60.0 #Inlet temperature of cold fluid in pipe (\u00b0F)\n",
+ "T2 = symbols('T2') #Outlet temperature of hot fluid \u00b0F\n",
+ "t2 = symbols('t2') #Outlet temperature of cold fluid \u00b0F\n",
+ "#From table 6.2:\n",
+ "ID = 2.067 #Inside diameter of pipe (in)\n",
+ "OD = 2.375 #Outside diameter of pipe (in)\n",
+ "Dx = 0.154 #Thickness of pipe (in)\n",
+ "Ai = 0.541 #Inside sectional area of pipe (ft^2/ft)\n",
+ "k = 25.0 #Thermal conductivity of pipe (Btu/h)\n",
+ "\n",
+ "#Calculation:\n",
+ "Ui = 1.0/((1.0/h1) +(Dx/(k*12.0))+(1.0/(h2*(OD/ID)))) #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "Ai1 = Ai*L #Inside area of pipe (ft^3/ft)\n",
+ "QH = MC*(T1-T2) #Heat transfer rate of hot fluid (Btu/h)\n",
+ "QC = mc*(t2-t1) #Heat transfer rate of cold fluid (Btu/h)\n",
+ "t2ht = 195 #t2 by hit and trial\n",
+ "x = solve(QC-QH,T2)\n",
+ "T2 = x[0]\n",
+ "DTlm = (T1-t1-T2+t2)/log((T1-t1)/(T2-t2)) #Log mean temperature difference (\u00b0F)\n",
+ "Q = Ui*Ai1*DTlm.subs(t2,t2ht) #Total heat transfer rate (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"T2 :\", round(T2.subs(t2,t2ht)),\"(\u00b0F)\"\n",
+ "print \"t2 :\", t2.subs(t2,t2ht),\"(\u00b0F)\"\n",
+ "print \"Qdot :\", round(Q/10**6) ,\"x 10**6 Btu/h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T2 : 200.0 (\u00b0F)\n",
+ "t2 : 195 (\u00b0F)\n",
+ "Qdot : 3.0 x 10**6 Btu/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.12, Page number: 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log,e\n",
+ "\n",
+ "#Variable declaration:\n",
+ "B = 3.33*10**-5\n",
+ "b = 4.48*10**-5\n",
+ "#From example 15.11:\n",
+ "A = 108.2 #Inside area of pipe (ft^3/ft)\n",
+ "U = 482 #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "MC = 30000.0\n",
+ "mc = 23000.0\n",
+ "T1 = 300.0 #Inlet temperature of hot fluid in pipe (\u00b0F)\n",
+ "t1 = 60.0 #Inlet temperature of cold fluid in pipe (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From equation 15.28:\n",
+ "T2 = ((B/b)*(e**(U*A*(B-b))-1)*t1+T1*(B/b-1))/((B/b)*e**(U*A*(B-b))-1) #Outlet temperature of hot fluid (\u00b0F)\n",
+ "#From equation 15.32:\n",
+ "t2 = ((b/B)*(e**(U*A*(b-B))-1)*T1+t1*(b/B-1))/((b/B)*e**(U*A*(b-B))-1) #Outlet temperature of cold fluid (\u00b0F)\n",
+ "DT = ((T2-t1)-(T1-t2))/(log((T2-t1)/(T1-t2))) #Log mean difference temperature (\u00b0F)\n",
+ "Q1 = U*A*DT #Heat transfer rate of hot fluid (Btu/h)\n",
+ "Q2 = MC*(T1-T2) #Heat transfer rate of cold fluid (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat load is :\",round(Q2,-3),\" Btu/h.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat load is : 4078000.0 Btu/h.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.14, Page number: 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ts = 100.0 #Saturation temperature (\u00b0C)\n",
+ "t1 = 25.0 #Initial temperature of water (\u00b0C)\n",
+ "t2 = 73.0 #Final temperature of water (\u00b0C)\n",
+ "m = 228.0/3600.0 #Mass flow rate of water (kg/s)\n",
+ "cp = 4174.0 #Heat capacity of water (J/kg.K)\n",
+ "m_s = 55.0/3600.0 #Mass flow rate of steam (kg/s)\n",
+ "h_vap = 2.26*10**26 #Latent heat of condensation (J/kg)\n",
+ "k = 54.0 #Thermal conductivity for 0.5% carbon steel (W/m.K)\n",
+ "rii = 0.013 #Inner radius of inner pipe of the double pipe heat exchanger (m)\n",
+ "roi = 0.019 #Outer radius of inner pipe of the double pipe heat exchanger (m)\n",
+ "Rf = 0.0002 #Fouling factor (m^2.K/W)\n",
+ "Uc = 0.00045 #Clean overall heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = Ts-t1 #Temperature driving force at end 1 (K)\n",
+ "DT2 = Ts-t2 #Temperature driving force at end 2 (K)\n",
+ "DTlm = (DT1-DT2)/(log(DT1/DT2)) #Log mean difference temperature (\u00b0C)\n",
+ "Cw =m*cp #Capacitance rate of water (W/K)\n",
+ "Q = Cw*(t2-t1) #Heat transfer rate (W)\n",
+ "Qmax1 = Cw*(Ts-t1) #Maximum heat term from the water stream (W)\n",
+ "Qmax2 = m_s*h_vap #Maximum heat term from the steam (W)\n",
+ "E = Q/Qmax1 #Effectiveness\n",
+ "Lmin = (Q*(log(roi/rii)))/(2*pi*k*(Ts-t1)) #Minimum required length of heat exchanger (m)\n",
+ "Ud = 1.0/(1.0/Uc+Rf) #Dirty overall heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The temperature profile of the water and steam along the length of the exchanger is :\",round(DTlm),\" \u00b0C .\"\n",
+ "print \"2. Effectiveness of energy from steam to heat the water is :\",round(E,3),\" .\"\n",
+ "print \"3. The minimum length of the heat exchanger is :\",round(Lmin,3),\" m .\"\n",
+ "print \"4. The dirty overall heat transfer coefficient :\",round(Ud,5),\" W/m^2.K .\"\n",
+ "print \"5. U_dirty: \", round(1/Ud,-1),\" W/m^2.K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The temperature profile of the water and steam along the length of the exchanger is : 47.0 \u00b0C .\n",
+ "2. Effectiveness of energy from steam to heat the water is : 0.64 .\n",
+ "3. The minimum length of the heat exchanger is : 0.189 m .\n",
+ "4. The dirty overall heat transfer coefficient : 0.00045 W/m^2.K .\n",
+ "5. U_dirty: 2220.0 W/m^2.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.15, Page number: 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = 12700.0 #Heat transfer rate (W)\n",
+ "Ud = 2220.0 #Dirty overall heat transfer coefficient (W/m^2.K)\n",
+ "DTlm = 47.0 #Log mean difference temperature (\u00b0C)\n",
+ "rii = 0.013 #Inner radius of inner pipe of the double pipe heat exchanger (m)\n",
+ "#Calculation:\n",
+ "A = Q/(Ud*DTlm) #Heat transfer area (m^2)\n",
+ "L = A/(2*pi*rii) #Tube length (m)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer area is :\",round(A,4),\" m^2 .\"\n",
+ "print \"The length of the heat exchanger is :\",round(L,2),\" m .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer area is : 0.1217 m^2 .\n",
+ "The length of the heat exchanger is : 1.49 m .\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.16, Page number: 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ud = 2220.0 #Dirty overall heat transfer coefficient (W/m^2.K)\n",
+ "A = 0.1217 #Heat transfer area (m^2)\n",
+ "Cw = 264.0 #Capacitance rate of water (W/K)\n",
+ "\n",
+ "#Calculation:\n",
+ "NTU = (Ud*A)/Cw #Number of transfer units of the exchanger\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of transfer units (NTU) of the exchanger is :\",round(NTU,2),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of transfer units (NTU) of the exchanger is : 1.02 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.18, Page number: 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Ao = 1.85 #Area of heat exchanger (ft^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From figure 15.6:\n",
+ "y = 0.560*10**-3 #Intercept 1/UoAo (\u00b0F.h/Btu)\n",
+ "ho = 1.0/(Ao*y) #Thermal conductivity for heat exchanger (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Thermal conductivity for the heat exchanger is :\",round(ho),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal conductivity for the heat exchanger is : 965.0 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.19, Page number: 310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From figure 15.7:\n",
+ "a = 0.00126\n",
+ "b = 0.0276\n",
+ "\n",
+ "#Calculation:\n",
+ "ho = 1.0/a #The value of ho (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Thermal conductivity is :\",round(ho),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal conductivity is : 794.0 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.20, Page number: 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Di = 0.902/12.0 #Inside diameter of tube (ft)\n",
+ "Do = 1.0/12.0 #Outside diameter of tube (ft)\n",
+ "k = 60.0 #Thermal conductivity of tube (Btu/h.ft^2.\u00b0F) \n",
+ "\n",
+ "#Calculation:\n",
+ "#From example 15.19:\n",
+ "a = 0.00126\n",
+ "Dr = (Do - Di)/2.0 #Radial thickness of tube wall (ft)\n",
+ "Rw = Dr/k #Resistance of wall (Btu/h.\u00b0F)\n",
+ "ho = 1.0/(a-Rw) #The revised ho (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The revised ho is :\",round(ho),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The revised ho is : 839.0 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 15.21, Page number: 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "a1 = 0.00044 #Term 'a' for U_clean\n",
+ "a2 = 0.00089 #Term 'a' for U_dirty\n",
+ "\n",
+ "#Calculation:\n",
+ "Rs = a2 - a1 #Resistance associated with the scale\n",
+ "hs = 1.0/Rs #Scale film coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The scale film coefficient neglecting the wall resistance is:\",round(hs),\" Btu/h.ft^2.\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The scale film coefficient neglecting the wall resistance is: 2222.0 Btu/h.ft^2.\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_16.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_16.ipynb
new file mode 100755
index 00000000..af0c69ba
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_16.ipynb
@@ -0,0 +1,583 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4d89093b0aef649c7f239bf75c18374320afd98a6f8286cbe2c1fcb242b5a141"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: Shell and Tube Heat Exchangers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.5, Page number: 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From figure 16.13, for ideal countercurrent heat exchanger:\n",
+ "T1 = 150.0 #Inlet temperature of hot fluid (\u00b0F)\n",
+ "T2 = 100.0 #Outet temperature of hot fluid (\u00b0F)\n",
+ "t1 = 50.0 #Inlet temperature of cold fluid (\u00b0F)\n",
+ "t2 = 80.0 #Outet temperature of hot fluid (\u00b0F)\n",
+ "#From figure 16.14, for shell and tube exchanger:\n",
+ "T_1 = 50.0 #Inlet temperature of cold fluid (\u00b0F)\n",
+ "T_2 = 80.0 #Outet temperature of hot fluid (\u00b0F)\n",
+ "t_1 = 150.0 #Inlet temperature of hot fluid (\u00b0F)\n",
+ "t_2 = 100.0 #Outet temperature of hot fluid (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T1 - t2 #Temperature driving force 1 (\u00b0F)\n",
+ "DT2 = T2 - t1 #Temperature driving force 1 (\u00b0F)\n",
+ "DTlm1 = ((DT1-DT2)/log(DT1/DT2)) #Log mean temperature driving force for ideal countercurrent heat exchanger (\u00b0F)\n",
+ "P = (t2-t1)/(T1 - t1) #Dimensionless ratio P\n",
+ "R = (T1-T2)/(t2-t1) #Dimensionless ratio R\n",
+ "#From figure 16.7:\n",
+ "F = 0.925 #Correction Factor\n",
+ "DTlm2 = F*DTlm1 #Log mean temperature driving force for shell and tube exchanger (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The log mean temperature difference for ideal system is :\",round(DTlm1,1),\" \u00b0F .\"\n",
+ "print \"The log mean temperature difference for real system is :\",round(DTlm2,2),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The log mean temperature difference for ideal system is : 59.4 \u00b0F .\n",
+ "The log mean temperature difference for real system is : 54.98 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.6, Page number: 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "5\n",
+ "#Variable declaration:\n",
+ "T1 = 400.0 #Temperature of fluid entering the shell (\u00b0F)\n",
+ "T2 = 250.0 #Temperature of fluid leaving the shell (\u00b0F)\n",
+ "t1 = 100.0 #Temperature of fluid entering the tube (\u00b0F)\n",
+ "t2 = 175.0 #Temperature of fluid leaving the tube (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T1 - T2 #Temperature driving force 1 (\u00b0F)\n",
+ "DT2 = t2 - t1 #Temperature driving force 1 (\u00b0F)\n",
+ "DTlm1 = ((DT1-DT2)/log(DT1/DT2)) #Log mean temperature driving force for ideal countercurrent heat exchanger (\u00b0F)\n",
+ "P = (t2-t1)/(T1 - t1) #Dimensionless ratio P\n",
+ "R = (T1-T2)/(t2-t1) #Dimensionless ratio R\n",
+ "#From figure 16.8:\n",
+ "F = 0.985 #Correction factor\n",
+ "DTlm2 = F*DTlm1 #Log mean temperature driving force for shell and tube exchanger (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The log mean temperature difference between the hot fluid and the cold fluid is :\",round(DTlm2,1),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The log mean temperature difference between the hot fluid and the cold fluid is : 106.6 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.7, Page number: 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 16.5:\n",
+ "P1 = 0.30 #Dimensionless ratio P\n",
+ "R1 = 1.67 #Dimensionless ratio R\n",
+ "#From example 16.6:\n",
+ "P2 = 0.30 #Dimensionless ratio P\n",
+ "R2 = 1.67 #Dimensionless ratio R\n",
+ "\n",
+ "#Calculation:\n",
+ "#Applying Equation 16.27:\n",
+ "F1 = 0.92 #Correction Factor\n",
+ "#Applying Equation 16.33:\n",
+ "F2 = 0.985 #Correction Factor\n",
+ "#From example 16.6:\n",
+ "LMTD1 = 59.4 #Log mean temperature driving force 1 for ideal countercurrent heat exchanger (\u00b0F)\n",
+ "LMTD2 = 108.0 #Log mean temperature driving force 2 for ideal countercurrent heat exchanger (\u00b0F)\n",
+ "DTlm1 = F1*LMTD1 #Log mean temperature driving force 1 for shell and tube exchanger (\u00b0F)\n",
+ "DTlm2 = F2*LMTD2 #Log mean temperature driving force 2 for shell and tube exchanger (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The log mean temperature difference for real system (in example 16.5) is :\",round(DTlm1,2),\" \u00b0F .\"\n",
+ "print \"The log mean temperature difference for real system (in example 16.6) is :\",round(DTlm2,1),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The log mean temperature difference for real system (in example 16.5) is : 54.65 \u00b0F .\n",
+ "The log mean temperature difference for real system (in example 16.6) is : 106.4 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.8, Page number: 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "t2 = 75.0 #Temperature of water leaving the shell (\u00b0C)\n",
+ "t1 = 35.0 #Temperature of water enteringing the shell (\u00b0C)\n",
+ "T2 = 75.0 #Temperature of oil leaving the tube (\u00b0C)\n",
+ "T1 = 110.0 #Temperature of oil entering the tube (\u00b0C)\n",
+ "m = 1.133 #Mass flowrate of water (kg/s)\n",
+ "cp = 4180.0 #Heat capacity of water (J/kg.K)\n",
+ "F = 0.965 #Correction factor\n",
+ "U = 350.0 #Overall heat transfer coefficient (W/m^2.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = m*cp*(t2-t1) #Heat load (W)\n",
+ "DT1 = T1-t2 #Temperature driving force 1 (\u00b0C)\n",
+ "DT2 = T2-t1 #Temperature driving force 2 (\u00b0C)\n",
+ "DTlm1 = (DT1-DT2)/log(DT1/DT2)+273.0 #Countercurrent log-mean temperature difference (K)\n",
+ "DTlm2 = F*DTlm1 #Corrected log-mean temperature difference (K)\n",
+ "A = Q/(U*DTlm2) #Required heat transfer area (m^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required heat-transfer area is :\",round(A,3),\" m^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required heat-transfer area is : 1.807 m^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.10, Page number: 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "t2 = 84.0 #Temperature of water leaving the tube (\u00b0C)\n",
+ "t1 = 16.0 #Temperature of water entering the tube (\u00b0C)\n",
+ "m1 = 10000.0/3600.0 #Mass flowrate of water (kg/s)\n",
+ "T2 = 94.0 #Temperature of oil leaving the shell (\u00b0C)\n",
+ "T1 = 160.0 #Temperature of oil entering the shell (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "Tw = (t1+t2)/2.0 #Average bulk temperature of water (\u00b0C)\n",
+ "To = (T1+T2)/2.0 #Average bulk temperature of oil (\u00b0C)\n",
+ "#From table 16.1:\n",
+ "p1 = 987.0 #Density of water (kg/m^3)\n",
+ "cp1 = 4176.0 #Heat capacity of water (J/kg.\u00b0C)\n",
+ "p2 = 822.0 #Density of oil (kg/m^3)\n",
+ "Q = m1*cp1*(t2-t1) #Heat load (W)\n",
+ "cp2 = 4820.0 #Heat capacity of oil (J/kg.\u00b0C)\n",
+ "m2 = Q/(cp2*(T1-T2)) #Mass flowrate of oil (kg/s)\n",
+ "DT1 = T2-t1 #Temperature driving force 1 (\u00b0C)\n",
+ "DT2 = T1-t2 #Temperature driving force 2 (\u00b0C)\n",
+ "DTlm1 = ((DT1-DT2)/log(DT1/DT2)) #Log mean temperature driving force for ideal countercurrent heat exchanger (\u00b0C)\n",
+ "P = (t2-t1)/(T1 - t1) #Dimensionless ratio P\n",
+ "R = (T1-T2)/(t2-t1) #Dimensionless ratio R\n",
+ "#From figure 16.7:\n",
+ "F = 0.965 #Correction factor\n",
+ "DTlm2 = F*DTlm1 #Log mean temperature driving force for 1-4 shell and tube exchanger (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The heat load is :\",round(Q/10**6,3),\" MW .\"\n",
+ "print \"2. The countercurrent flow log mean temperature difference is :\",round(DTlm1),\" \u00b0C .\"\n",
+ "print \"3. The F correction factor and the corrected log mean temperature difference is :\",round(DTlm2,1),\" \u00b0C .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The heat load is : 0.789 MW .\n",
+ "2. The countercurrent flow log mean temperature difference is : 77.0 \u00b0C .\n",
+ "3. The F correction factor and the corrected log mean temperature difference is : 74.3 \u00b0C .\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.11, Page number: 340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 16.10:\n",
+ "U = 350.0 #Over all heat transfer coefficient (W/m^2.\u00b0C)\n",
+ "DTlm = 74.3 #Log mean temperature driving force for 1-4 shell and tube exchanger (\u00b0C)\n",
+ "Q = 788800.0 #Heat load (W)\n",
+ "Nt = 11.0 #Number of tubes per pass\n",
+ "Np = 4.0 #Number of passes\n",
+ "Di = 0.0229 #Inside diameter of tube (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = Q/(U*DTlm) #Heat transfer area required for heat exchanger (m^2)\n",
+ "N = Nt*Np #Total number of tubes\n",
+ "L = A/(pi*Di*N) #Tube length (m)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer area required for the heat exchanger is :\",round(A,2),\" m^2 .\"\n",
+ "print \"The length of the tubes required for the heat exchanger is :\",round(L*3.28,1),\" ft .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer area required for the heat exchanger is : 30.33 m^2 .\n",
+ "The length of the tubes required for the heat exchanger is : 31.4 ft .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.18, Page number: 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 16.10:\n",
+ "m1 = 2.778 #Mass flowrate of water (kg/s)\n",
+ "cp1 = 4176.0 #Heat capacity of water (J/kg.\u00b0C)\n",
+ "cp2 = 4820.0 #Heat capacity of oil (J/kg.\u00b0C)\n",
+ "m2 = 2.48 #Mass flowrate of oil (kg/s)\n",
+ "t2 = 84.0 #Temperature of water leaving the tube (\u00b0C)\n",
+ "t1 = 16.0 #Temperature of water entering the tube (\u00b0C)\n",
+ "T2 = 94.0 #Temperature of oil leaving the shell (\u00b0C)\n",
+ "T1 = 160.0 #Temperature of oil entering the shell (\u00b0C)\n",
+ "U = 350.0 #Over all heat transfer coefficient (W/m^2.\u00b0C)\n",
+ "A = 30.33 #Heat transfer area required for heat exchanger (m^2)\n",
+ "\n",
+ "#Calculation:\n",
+ "C1 = m1*cp1 #Capacitance rate of water (W/\u00b0C)\n",
+ "C2 = m2*cp2 #Capacitance rate of oil (W/\u00b0C)\n",
+ "Q = C1*(t2-t1) #Heat load of water (W)\n",
+ "Qmax = C1*(T1-t1) #Maximum heat load of water (W)\n",
+ "E = Q/Qmax #Effectiveness\n",
+ "if (C1<C2):\n",
+ " Cmin = C1 #Minimum capacitance rate (W/\u00b0C)\n",
+ " Cmax = C2 #Maximum capacitance rate (W/\u00b0C)\n",
+ "else:\n",
+ " Cmin = C2 #Minimum capacitance rate (W/\u00b0C)\n",
+ " Cmax = C1 #Maximum capacitance rate (W/\u00b0C)\n",
+ "NTU = U*A/Cmin #Number of transfer units\n",
+ "C = Cmin/Cmax #Capacitance rate ratio\n",
+ "\n",
+ "#Result:\n",
+ "print \"The effectiveness is :\",round(E,3),\".\"\n",
+ "print \"The number of transfer units is :\",round(NTU,3),\".\"\n",
+ "print \"The capacitance rate ratio is :\",round(C,3),\".\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effectiveness is : 0.472 .\n",
+ "The number of transfer units is : 0.915 .\n",
+ "The capacitance rate ratio is : 0.97 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.19, Page number: 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From table 16.4:\n",
+ "Cw = 11680.3 #Capacitance rate of water (W/\u00b0C)\n",
+ "t2 = 65.0 #Temperature of water leaving the tube (\u00b0C)\n",
+ "t1 = 20.0 #Temperature of water entering the tube (\u00b0C)\n",
+ "T2 = 107.3 #Temperature of steam leaving the shell (\u00b0C)\n",
+ "T1 = 107.3 #Temperature of steam entering the shell (\u00b0C)\n",
+ "hv = 2.238*10**6 #Latenet heat of condensation for steam (J/kg)\n",
+ "U = 2000.0 #Overall heat transfer coefficient (W/m^2.\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = Cw*(t2-t1) #Heat load (W)\n",
+ "m2 = Q/hv #Steam condensation rate (kg/s)\n",
+ "DT1 = T2-t1 #Temperature driving force 1 (\u00b0C)\n",
+ "DT2 = T1-t2 #Temperature driving force 2 (\u00b0C)\n",
+ "DTlm1 = ((DT1-DT2)/log(DT1/DT2)) #Log mean temperature driving force for ideal countercurrent heat exchanger (\u00b0C)\n",
+ "F = 1.0 #Correction factor (since, T2 = T1)\n",
+ "DTlm2 = F*DTlm1 #Log mean temperature driving force for shell and tube exchanger (\u00b0C)\n",
+ "A1 = Q/(U*DTlm2) #Heat transfer area using LMTD method (m^2)\n",
+ "E = (t2-t1)/(T1-t1) #Effectiveness\n",
+ "#From figure 16.18:\n",
+ "NTU = 0.7 #Number of transfer units\n",
+ "A2 = (NTU*Cw)/U #Heat transfer area using E-NTU method (m^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfr area for the exchanger (using LMTD method) is :\",round(A1,2),\" m^2 .\"\n",
+ "print \"The heat transfr area for the exchanger (using E-NTU method) is :\",round(A2,1),\" m^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfr area for the exchanger (using LMTD method) is : 4.23 m^2 .\n",
+ "The heat transfr area for the exchanger (using E-NTU method) is : 4.1 m^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.21, Page number: 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From table 16.5:\n",
+ "t2 = 75.0 #Temperature of water leaving the shell (\u00b0C)\n",
+ "t1 = 35.0 #Temperature of water entering the shell (\u00b0C\n",
+ "T2 = 75.0 #Temperature of oil leaving the tube (\u00b0C)\n",
+ "T1 = 110.0 #Temperature of oil entering the tube (\u00b0C)\n",
+ "mw = 1.133 #Mass flowrtae of water (kg/s)\n",
+ "cpw = 4180.0 #Heat capacity of water (J/kg.K)\n",
+ "cpo = 1900.0 #Heat capacity of oil (J/kg.K)\n",
+ "p = 850.0 #Density of oil (kg/m^3)\n",
+ "Di = 0.01905 #Inside diameter of tube (m)\n",
+ "V = 0.3 #Average velocity of oil flow inside the tube (m/s)\n",
+ "Np = 2.0 #Number of passes\n",
+ "Uc = 350.0 #Overall heat transfer coefficient for clean heat exchanger (W/m^2)\n",
+ "Rf = 0.00027 #Fouling factor (m^2.K/w)\n",
+ "\n",
+ "#Calculation:\n",
+ "Cw = mw*cpw #Water capacitance rate (W/K)\n",
+ "Q = Cw*(t2-t1) #Heat load (W)\n",
+ "Co = Q/(T1-T2) #Oil capacitance rate (W/K)\n",
+ "mo = Co/cpo #Total flowrate of oil (kg/s)\n",
+ "if (Cw<Co):\n",
+ " Cmin = Cw #Minimum capacitance rate (W/K)\n",
+ " Cmax = Co #Maximum capacitance rate (W/K)\n",
+ "else:\n",
+ " Cmin = Co #Minimum capacitance rate (W/K)\n",
+ " Cmax = Cw #Maximum capacitance rate (W/K)\n",
+ "m_ot = p*V*(pi/4.0)*Di**2 #Oil flowrate per tube (kg/s)\n",
+ "Nt = mo/m_ot #Number of tubes per pass\n",
+ "N = Nt*Np #Number of tubes\n",
+ "DT1 = T2-t1 #Temperature driving force 1 (\u00b0C)\n",
+ "DT2 = T1-t2 #Temperature driving force 2 (\u00b0C)\n",
+ "DTlm1 = ((DT1-DT2)/log(DT1/DT2)) #Log mean temperature driving force for ideal countercurrent heat exchanger (\u00b0C)\n",
+ "P = (t2-t1)/(T1 - t1) #Dimensionless parameter P\n",
+ "R = (T1-T2)/(t2-t1) #Dimensionless parameter R\n",
+ "#From figure 16.7:\n",
+ "F = 0.81 #Correction factor\n",
+ "DTlm2 = F*DTlm1 #Log mean temperature driving force for shell and tube exchanger (\u00b0C)\n",
+ "Ud = 1.0/(1.0/Uc+Rf) #Dirty overall heat transfer coefficient (W/m^2.K)\n",
+ "A = Q/(Ud*DTlm2) #Required heat transfer area (m^2)\n",
+ "L = A/(N*pi*Di) #Tube length (m)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The mass flow rate of the oil is :\",round(mo,2),\" kg/s .\"\n",
+ "print \"2. The minimum and maximum heat capacity rate is :\",round(Cmin),\" and \",round(Cmax,1),\" W/K .\"\n",
+ "print \"3. The heat load, Q is :\",round(Q),\" W .\"\n",
+ "print \"4. The total number of tubes is :\",round(N,-1),\".\"\n",
+ "print \"5. The tube length is :\",round(L,1),\" m .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The mass flow rate of the oil is : 2.85 kg/s .\n",
+ "2. The minimum and maximum heat capacity rate is : 4736.0 and 5412.5 W/K .\n",
+ "3. The heat load, Q is : 189438.0 W .\n",
+ "4. The total number of tubes is : 80.0 .\n",
+ "5. The tube length is : 4.2 m .\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 16.22, Page number: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 16.22:\n",
+ "t2 = 75.0 #Temperature of water leaving the shell (\u00b0F)\n",
+ "t1 = 35.0 #Temperature of water entering the shell (\u00b0F)\n",
+ "T2 = 75.0 #Temperature of oil leaving the tube (\u00b0F)\n",
+ "T1 = 110.0 #Temperature of oil entering the tube (\u00b0F)\n",
+ "U = 320.0 #Overall heat transfer coefficient (W/m^2.K)\n",
+ "A = 19.5 #Required heat transfer area (m^2)\n",
+ "Cmin = 4736.0 #Minimum capacitance rate (W/K)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = t2-t1 #Actual water temperature change (\u00b0F)\n",
+ "DT2 = T1 - t1 #Maximum water temperature change (\u00b0F)\n",
+ "E = DT1/DT2 #Effectiveness\n",
+ "NTU = (U*A)/Cmin #Number of transfer units\n",
+ "\n",
+ "#Result:\n",
+ "print \"The effectiveness is :\",round(E,3),\".\"\n",
+ "print \"The NTU is :\",round(NTU,3),\".\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effectiveness is : 0.533 .\n",
+ "The NTU is : 1.318 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_17.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_17.ipynb
new file mode 100755
index 00000000..4a60ab42
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_17.ipynb
@@ -0,0 +1,832 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:475ce8fa81a36fce30309ad0a5a8ca165ef95371bfe5c210d4123243261a9f37"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: Fins and Extended Surfaces"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.1, Page number: 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "w1 = 1.5 #Thicknessof fin (in)\n",
+ "L = 12.0 #Length of fin (in)\n",
+ "w2 = 0.1 #Thickness of fin(in)\n",
+ "\n",
+ "#Calculation:\n",
+ "Af = 2*w1*L #Face area of fin (in^2)\n",
+ "At = Af + L*w2 #Total area of fin (in^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The face area of the fin is :\",round(Af),\" in^2 .\"\n",
+ "print \"The face area of the fin is :\",round(Af/12**2,2),\" ft^2 .\"\n",
+ "print \"The total area of the fin is :\",round(At,1),\" in^2 .\"\n",
+ "print \"The total area of the fin is :\",round(At/12**2,3),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The face area of the fin is : 36.0 in^2 .\n",
+ "The face area of the fin is : 0.25 ft^2 .\n",
+ "The total area of the fin is : 37.2 in^2 .\n",
+ "The total area of the fin is : 0.258 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.3, Page number: 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "rf = 6.0/12.0 #Outside radius of fin (ft)\n",
+ "ro = 4.0/12.0 #Outside radius of pipe (ft)\n",
+ "t = 0.1/12.0 #Thickness of fin (ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "Af = 2*pi*(rf**2-ro**2) #Face area of fin (ft^2)\n",
+ "At = Af + 2*pi*rf*t #Total area of fin (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total fin area is :\",round(At,3),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total fin area is : 0.899 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.4, Page number: 364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration:\n",
+ "L = 3.0*0.0254 #Height of fin (m)\n",
+ "t = 1.0*0.0254 #Thickness of fin (m)\n",
+ "h = 15.0 #Heat transfer coefficient (W/m^2.K)\n",
+ "k = 300.0 #Thermal conductivity (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Lc = L + t/2.0 #Corrected height of fin (m)\n",
+ "Ap = Lc*t #Profile area of fin (m^2)\n",
+ "x = sqrt((Lc**3*h)/(k*Ap)) #x-coordinate of figure 17.3\n",
+ "#From figure 17.3:\n",
+ "nf = 98.0 #Fin efficiency\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fin efficiency is :\",nf,\"% .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fin efficiency is : 98.0 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.5, Page number: 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 17.4:\n",
+ "X = 0.1246 #X-coordinate of figure 17.3\n",
+ "\n",
+ "#Calculation:\n",
+ "#Applying equation (A) from Table 17.3:\n",
+ "Y = 4.5128*X**3 - 10.079*X**2 - 31.413*X + 101.47\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fin efficiency is :\",round(Y,1),\"% .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fin efficiency is : 97.4 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.6, Page number: 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt,atan\n",
+ "\n",
+ "#Variable declaration:\n",
+ "w = 0.2/100.0 #Width of fin (m)\n",
+ "t = 0.2/100.0 #Thickness of fin (m)\n",
+ "L = 1.0/100.0 #Length of fin (m)\n",
+ "h = 16.0 #Heat transfer coefficient (W/m^2.K)\n",
+ "k = 400.0 #Thermal conductivity of fin (W/m.K)\n",
+ "Tc = 100.0 #Circuit temperature (\u00b0C)\n",
+ "Ta = 25.0 #Air temperature (\u00b0C)\n",
+ "\n",
+ "#Calculation:\n",
+ "P = 4*w #Fin cross-section parameter (m)\n",
+ "Ac = w*t #Cross-sectional area of fin (m^2)\n",
+ "Lc = L+Ac/P #Corrected height of fin (m)\n",
+ "m = sqrt((h*P)/(k*Ac)) #Location of minimum temperature (m^-1)\n",
+ "Q = (sqrt(h*P*k*Ac))*(Tc-Ta)*atan(h)*(m*Lc) #Heat transfer from each micro-fin (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer from each micro-fin is :\",round(Q,2),\" W .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer from each micro-fin is : 0.15 W .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.8, Page number: 366"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#Variable declaration:\n",
+ "h1 = 13.0 #Air-side heat transfer coefficient (W/m^2.K)\n",
+ "A = 1.0 #Base wall area (m^2)\n",
+ "L = 2.5/100 #Length of steel fins (m)\n",
+ "L2 = 1.5/10**3 #Length of steel wall (m)\n",
+ "k = 13.0 #Thermal conductivity of fin (W/m.K)\n",
+ "k1 = 38.0 #Thermal conductivity of steel wall (W/m.K)\n",
+ "h2 = 260.0 #Water side heat transfer coefficient (W/m^2.K)\n",
+ "T4 = 19.0 #Air temperature (\u00b0C)\n",
+ "T1 = 83.0 #Water temperature (\u00b0C)\n",
+ "t = 1.3/10**3 #Thickness of steel fins (m)\n",
+ "w = 1.0 #Width of wall (m)\n",
+ "S = 1.3/100 #Fin pitch(m)\n",
+ "\n",
+ "#Calculation:\n",
+ "R1 = 1/(h1*A) #Air resistance (\u00b0C/W) (part 1)\n",
+ "R2 = L2/(k1*A) #Conduction resistance (\u00b0C/W)\n",
+ "R3 = 1/(h2*A) #Water resistance (\u00b0C/W)\n",
+ "Rt = (R1+R3) #Total resistance (\u00b0C/W) (part 2)\n",
+ "Q = (T1-T4)/Rt #Total heat transfer (W)\n",
+ "Nf = 1/S #Number of fins (part 3)\n",
+ "Lbe = w - Nf*t #Unfinned exposed base surface\n",
+ "Abe = w*Lbe #Exposed base surface area (m^2)\n",
+ "Lc = L+t/2 #Corrected length (m)\n",
+ "Ap = Lc*t #Profile area (m^2)\n",
+ "Af = 2*w*Lc #Fin surface area (m^2)\n",
+ "Bi = h1*(t/2)/k1 #Biot number\n",
+ "a = sqrt(Lc**3*h1/(k*Ap)) #Abscissa of the fin efficiency\n",
+ "#From figure 17.3:\n",
+ "nf = 0.88 #Fin efficiency\n",
+ "Rb = 1/(h1*Abe) #Air thermal resistance of base wall (\u00b0C/W)\n",
+ "Rf = 1/(h1*Nf*Af*nf) #Air thermal resistance of fins (\u00b0C/W)\n",
+ "RT1 = 1/(1/Rb+1/Rf) #Total outside resistance of the fin array (\u00b0C/W)\n",
+ "Rt3 = RT1+R3 #Total resistance on air side fins (\u00b0C/W)\n",
+ "Qt = (T1-T4)/round(Rt3,5) #Heat transfer rate on air side fins (W)\n",
+ "I = (Qt/Q - 1)*100 #Percent increase in heat transfer rate to air side fins (W)\n",
+ "A = sqrt(Lc**3*h2/(k1*Ap)) #Abscissa of the new fin efficiency (part 4)\n",
+ "#From figure 17.3:\n",
+ "nf2 = 38.0 #New fin efficiency\n",
+ "Rb2 = 1/(h2*Abe) #Thermal resistance of base wall (\u00b0C/W)\n",
+ "Rf2 = 1/(h2*Nf*Af*nf2) #Thermal resistance of fins (\u00b0C/W)\n",
+ "Rt4 = 1/(1/Rb2+1/Rf2) #Total resistance of the finned surface (\u00b0C/W)\n",
+ "Rt5 = R1+Rt4 #Total resistance on water side fins (\u00b0C/W)\n",
+ "QT1 = (T1-T4)/Rt5 #Heat transfer rate on water side fins (W)\n",
+ "I2 = (QT1/Q - 1)*100 #Percent increase in heat transfer rate to water side fins (W)\n",
+ "\n",
+ "#Result:\n",
+ "if (R2<R1 or R2<R3):\n",
+ " print \"1. The conduction resistance may be neglected.\"\n",
+ "else:\n",
+ " print \"1. The conduction resistance can not be neglected.\"\n",
+ "print \"2. The rate of heat transfer from water to air is :\",round(Q,1),\" W .\"\n",
+ "print \"3. The percent increase in steady-state heat transfer rate by adding fins to the air side of the plane wall is :\",round(I,1),\" % .\"\n",
+ "print \"4. The percent increase in steady-state heat transfer rate by adding fins to the water side of the plane wall is :\",round(I2,1),\" % .\"\n",
+ "print \"____There is a calculation mistake in book in calculating Qt(83-19/0.0214 = 2999), hence slight differences in answer______\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The conduction resistance may be neglected.\n",
+ "2. The rate of heat transfer from water to air is : 792.4 W .\n",
+ "3. The percent increase in steady-state heat transfer rate by adding fins to the air side of the plane wall is : 276.7 % .\n",
+ "4. The percent increase in steady-state heat transfer rate by adding fins to the water side of the plane wall is : 5.0 % .\n",
+ "____There is a calculation mistake in book in calculating Qt(83-19/0.0214 = 2999), hence slight differences in answer______\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.10, Page number: 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Do = 2.5/100 #Outside diameter of tube (m)\n",
+ "t = 1/10**3 #Thickness of fin (m)\n",
+ "T = 25 #Fluid temperature (\u00b0C)\n",
+ "Tb = 170 #Surface temperature (\u00b0C)\n",
+ "h = 130 #Heat transfer coefficient (W/m^2.K)\n",
+ "k = 200 #Thermal conductivity of fin (W/m.K)\n",
+ "rf = 2.75/100 #Outside radius of fin (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "ro = Do/2 #Radius of tube (m)\n",
+ "Ab = 2*pi*ro*t #Area of the base of the fin (m^2)\n",
+ "Te = Tb-T #Excess temperature at the base of the fin (K)\n",
+ "Q1 = h*Ab*Te #Total heat transfer rate without the fin (W)\n",
+ "Bi = h*(t/2)/k #Biot number\n",
+ "L = rf-ro #Fin height (m)\n",
+ "rc = rf+t/2 #Corrected radius (m)\n",
+ "Lc = L+t/2 #Corrected height (m)\n",
+ "Ap = Lc*t #Profile area (m^2)\n",
+ "Af = 2*pi*(rc**2-ro**2) #Fin surface area (m^2)\n",
+ "Qm = h*Af*Te #Maximum fin heat transfer rate (W)\n",
+ "A = sqrt(Lc**3*h/(k*Ap)) #Abscissa of fin efficiency\n",
+ "C = rf/ro #Curve parameter of fin efficiency\n",
+ "#From figure 17.4:\n",
+ "nf = 0.86 #Fin efficiency\n",
+ "Qf = nf*Qm #Fin heat transfer rate (W)\n",
+ "R = Te/Qf #Fin resistance (K/W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The heat transfer rate without the fin is :\",round(Q1,2),\" W .\"\n",
+ "print \"Or, the heat transfer rate without the fin is :\",round(Q1*3.412),\" Btu/h .\"\n",
+ "print \"2. The corrected length is :\",round(Lc,4),\" m .\"\n",
+ "print \"3. The outer radius is :\",round(rc,3),\" m .\"\n",
+ "print \"4. The maximum heat transfer rate from the fin is :\",round(Qm,2),\" W .\" \n",
+ "print \"5. The fin efficiency is :\",round(nf*100),\" % .\" \n",
+ "print \"6. The fin heat transfer rate is :\",round(Qf),\" W .\"\n",
+ "print \"Or, the fin heat transfer rate is :\",round(Qf*3.412),\" Btu/h .\"\n",
+ "print \"7. The fin thermal resistance is :\",round(R,2),\" K/W .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The heat transfer rate without the fin is : 1.48 W .\n",
+ "Or, the heat transfer rate without the fin is : 5.0 Btu/h .\n",
+ "2. The corrected length is : 0.0155 m .\n",
+ "3. The outer radius is : 0.028 m .\n",
+ "4. The maximum heat transfer rate from the fin is : 74.35 W .\n",
+ "5. The fin efficiency is : 86.0 % .\n",
+ "6. The fin heat transfer rate is : 64.0 W .\n",
+ "Or, the fin heat transfer rate is : 218.0 Btu/h .\n",
+ "7. The fin thermal resistance is : 2.27 K/W .\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.11, Page number: 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 17.10:\n",
+ "Qf = 64 #Fin heat transfer rate (W)\n",
+ "Q1 = 1.48 #Total heat transfer rate without the fin (W)\n",
+ "\n",
+ "#Calculation:\n",
+ "E = Qf/Q1 #Fin effectiveness\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fin effectiveness is :\",round(E,1),\" .\"\n",
+ "if E>2:\n",
+ " print \"Hence, the use of the fin is justified.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fin effectiveness is : 43.2 .\n",
+ "Hence, the use of the fin is justified.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.12, Page number: 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "w = 1 #Length of tube (m)\n",
+ "S = 10/10**3 #Fin patch (m)\n",
+ "#From example 17.10:\n",
+ "t = 1/10**3 #Thickness of fin (m)\n",
+ "ro = 0.0125 #Radius of tube (m)\n",
+ "Af = 3.94*10**-3 #Fin surface area (m^2)\n",
+ "Tb = 145 #Excess temperature at the base of the fin (K)\n",
+ "h = 130 #Heat transfer coefficient (W/m^2.K)\n",
+ "Qf = 64 #Fin heat transfer rate (W)\n",
+ "\n",
+ "#Calculation:\n",
+ "Nf = w/S #Number of fins in tube length\n",
+ "wb = w-Nf*t #Unfinned base length (m)\n",
+ "Ab = 2*pi*ro*wb #Unfinned base area (m^2)\n",
+ "At =Ab+Nf*Af #Total transfer surface area (m^2)\n",
+ "Qt = h*(2*pi*ro*w*Tb) #Total heat rate without fins (W)\n",
+ "Qb = h*Ab*Tb #Heat flow rate from the exposed tube base (W)\n",
+ "Qft = Nf*Qf #Heat flow rate from all the fins (W)\n",
+ "Qt2 = Qb+Qft #Total heat flow rate (W)\n",
+ "Qm = h*At*Tb #Maximum heat transfer rate (W)\n",
+ "no = Qt2/Qm #Overall fin efficiency\n",
+ "Eo = Qt2/Qt #Overall effectiveness\n",
+ "Rb = 1/(h*Ab) #Thermal resistance of base (K/W)\n",
+ "Rf = 1/(h*Nf*Af*no) #Thermal resistance of fins (K/W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The total surface area for heat transfer is :\",round(At,3),\" m^2 .\"\n",
+ "print \"2. The exposed tube base total heat transfer rate is :\",round(Qb,1),\" W .\"\n",
+ "print \"Or, the exposed tube base total heat transfer rate is :\",round(Qb*3.412),\" Btu/h .\"\n",
+ "print \"3. The overall efficiency of the surface is :\",round(no*100,1),\" % .\"\n",
+ "print \"4. The overall surface effectiveness is :\",round(Eo,2),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The total surface area for heat transfer is : 0.465 m^2 .\n",
+ "2. The exposed tube base total heat transfer rate is : 1332.4 W .\n",
+ "Or, the exposed tube base total heat transfer rate is : 4546.0 Btu/h .\n",
+ "3. The overall efficiency of the surface is : 88.3 % .\n",
+ "4. The overall surface effectiveness is : 5.22 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.13, Page number: 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration:\n",
+ "w = 1 #Width of single of fin (m)\n",
+ "t = 2/10**3 #Fin base thickness (m)\n",
+ "l = 6/10**3 #Fin length thickness (m)\n",
+ "T1 = 250 #Surface temperature (\u00b0C)\n",
+ "T2 = 20 #Ambient air temperature (\u00b0C)\n",
+ "h = 40 #Surface convection coefficient (W/m^2.K)\n",
+ "k = 240 #Thermal conductivity of fin (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Ab = t*w #Base area of the fin (m^2)\n",
+ "Te = T1-T2 #Excess temperature at the base of the fin (K)\n",
+ "Qw = h*Ab*Te #Heat transfer rate without a fin (W)\n",
+ "Af = 2*w*(sqrt(l**2-(t/2)**2)) #Fin surface area (m^2)\n",
+ "Qm = h*Af*Te #Maximum heat transfer rate (m^2)\n",
+ "Bi = h*(t/2)/k #Biot number\n",
+ "Lc = l #Corrected length (m)\n",
+ "Ap = l*t/2 #Profile area (m^2)\n",
+ "A = sqrt((Lc**3*h)/k*Ap) #Abscissa for the fin efficiency figure\n",
+ "#From figure 17.4:\n",
+ "nf = 0.99 #Fin efficiency\n",
+ "Qf = nf*Qm #Fin heat transfer rate (W)\n",
+ "R = Te/Qf #Fin thermal resistance (K/W)\n",
+ "E = Qf/Qw #Fin effectiveness\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The heat transfer rate without the fin is :\",round(Qw,1),\" W .\"\n",
+ "print \"2. The maximum heat transfer rate from the fin is :\",round(Qm,-1),\" W .\"\n",
+ "print \"3. The fin efficiency is :\",round(nf*100),\" % .\"\n",
+ "print \" The fin thermal resistance is :\",round(R,1),\" \u00b0C/W .\"\n",
+ "print \" The fin effectiveness is :\",round(E,1),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The heat transfer rate without the fin is : 18.4 W .\n",
+ "2. The maximum heat transfer rate from the fin is : 110.0 W .\n",
+ "3. The fin efficiency is : 99.0 % .\n",
+ " The fin thermal resistance is : 2.1 \u00b0C/W .\n",
+ " The fin effectiveness is : 5.9 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.14, Page number: 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 17.13:\n",
+ "Qf = 108.9 #Fin heat transfer rate (W)\n",
+ "Qw = 18.4 #Total heat transfer rate without the fin (W)\n",
+ "\n",
+ "#Calculation:\n",
+ "E = Qf/Qw #Fin effectiveness\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fin effectiveness is :\",round(E,2),\" .\"\n",
+ "if E>2:\n",
+ " print \"Hence, the use of the fin is justified.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fin effectiveness is : 5.92 .\n",
+ "Hence, the use of the fin is justified.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.15, Page number: 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Do = 50/10**3 #Outside diameter of tube (m)\n",
+ "t = 4/10**3 #Thickness of fin (m)\n",
+ "T = 20 #Fluid temperature (\u00b0C)\n",
+ "Tb = 200 #Surface temperature (\u00b0C)\n",
+ "h = 40 #Heat transfer coefficient (W/m^2.K)\n",
+ "k = 240 #Thermal conductivity of fin (W/m.K)\n",
+ "l = 15/10**3 #Length of fin (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "ro = Do/2 #Radius of tube (m)\n",
+ "rf = ro+l #Outside radius of fin (m)\n",
+ "Ab = 2*pi*ro*t #Area of the base of the fin (m^2)\n",
+ "Te = Tb-T #Excess temperature at the base of the fin (K)\n",
+ "Q1 = h*Ab*Te #Total heat transfer rate without the fin (W)\n",
+ "Bi = h*(t/2)/k #Biot number\n",
+ "L = rf-ro #Fin height (m)\n",
+ "rc = rf+t/2 #Corrected radius (m)\n",
+ "Lc = L+t/2 #Corrected height (m)\n",
+ "Ap = Lc*t #Profile area (m^2)\n",
+ "Af = 2*pi*(rc**2-ro**2) #Fin surface area (m^2)\n",
+ "Qm = h*Af*Te #Maximum fin heat transfer rate (W)\n",
+ "A = sqrt(Lc**3*h/(k*Ap)) #Abscissa of fin efficiency\n",
+ "C = rf/ro #Curve parameter of fin efficiency\n",
+ "#From figure 17.4:\n",
+ "nf = 0.97 #Fin efficiency\n",
+ "Qf = nf*Qm #Fin heat transfer rate (W)\n",
+ "R = Te/Qf #Fin resistance (K/W)\n",
+ "E = Qf/Q1 #Fin effectiveness\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fin efficiency is :\",round(nf*100),\" % .\"\n",
+ "print \"The fin thermal resistance is :\",round(R,1),\" \u00b0C/W .\"\n",
+ "print \"The fin effectiveness is :\",round(E,2),\" .\"\n",
+ "print \"The maximum heat transfer rate from a single fin is :\",round(Qm,2),\" W .\"\n",
+ "if E>2:\n",
+ " print \"Since Ef = FCP>2, the use of the fin is justified.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fin efficiency is : 97.0 % .\n",
+ "The fin thermal resistance is : 3.6 \u00b0C/W .\n",
+ "The fin effectiveness is : 11.05 .\n",
+ "The maximum heat transfer rate from a single fin is : 51.53 W .\n",
+ "Since Ef = FCP>2, the use of the fin is justified.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.16, Page number: 376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Nf = 125 #Array of fins per meter\n",
+ "w = 1 #Length of fin (m)\n",
+ "#From example 17.15:\n",
+ "t = 4/10**3 #Thickness of fin (m)\n",
+ "Do = 50/10**3 #Outside diameter of tube (m)\n",
+ "Af = 7.157*10**-3 #Fin surface area (m^2)\n",
+ "h = 40 #Heat transfer coefficient (W/m^2.K)\n",
+ "DTb = 180 #Excess temperature at the base of the fin (K)\n",
+ "Qf = 50 #Fin heat transfer rate (W)\n",
+ "\n",
+ "#Calculation:\n",
+ "ro = Do/2 #Radius of tube (m)\n",
+ "wb = w-Nf*t #Unfinned exposed base length (m)\n",
+ "Ab = 2*pi*ro*wb #Area of the base of the fin (m^2)\n",
+ "At = Ab+Nf*Af #Total heat transfer surface area (m^2)\n",
+ "Qw = h*(2*pi*ro*w)*DTb #Heat rate without fin (W)\n",
+ "Qb = h*Ab*DTb #Heat rate from the base (W)\n",
+ "Qft = Nf*Qf #Heat rate from the fin (W)\n",
+ "Qt = Qb+Qft #Total heat rate (W)\n",
+ "Qm = h*At*DTb #Maximum heat transfer rate (W)\n",
+ "n = Qt/Qm #Overall fin efficiency\n",
+ "E = Qt/Qw #Overall fin effectiveness\n",
+ "Rb = 1/(h*Ab) #Thermal resistance of base (\u00b0C/W)\n",
+ "Rf = 1/(h*Nf*Af*n) #Thermal resistance of fin (\u00b0C/W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rate of heat transfer per unit length of tube is :\",round(Qt,1),\" W .\"\n",
+ "print \"Or, the rate of heat transfer per unit length of tube is :\",round(Qt/10**3,2),\" kW .\"\n",
+ "print \"The overall fin efficiency is :\",round(n*100,1),\" % .\"\n",
+ "print \"The overall fin effectiveness is :\",round(E,2),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of heat transfer per unit length of tube is : 6815.5 W .\n",
+ "Or, the rate of heat transfer per unit length of tube is : 6.82 kW .\n",
+ "The overall fin efficiency is : 97.3 % .\n",
+ "The overall fin effectiveness is : 6.03 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.17, Page number: 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "print 'Analytical Solution'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Analytical Solution\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 17.18, Page number: 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 17.18:\n",
+ "T = 250 #Base temperature of fin (\u00b0F)\n",
+ "h = 15 #Convection coefficient of heat transfer (Btu/h.ft.\u00b0F)\n",
+ "w = 1 #Base width of fin (ft)\n",
+ "t = 1 #Thickness of fin (in)\n",
+ "H = 1/8 #Height of fin (in)\n",
+ "l = 1 #Length of fin (in)\n",
+ "Q = 357.2 #Heat transfer rate (Btu/h.ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = (l*w+t*w+H*w)/12 #Heat transfer area of fin (ft^2)\n",
+ "Qm = h*A*(T-70) #Maximum heat transfer rate (Btu/h.ft)\n",
+ "n = Q/Qm*100 #Fin efficiency\n",
+ "\n",
+ "#Result:\n",
+ "print \"The fin efficiency is :\",round(n,1),\" % .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fin efficiency is : 74.7 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_18.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_18.ipynb
new file mode 100755
index 00000000..61e88510
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_18.ipynb
@@ -0,0 +1,658 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4239ad8a8aef7d8398d3c69721341c39df37be6f21def1df2b04a8d6ccbef700"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18: Other Heat Exchange Equipment"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.2, Page number: 384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 25 #Temperature of H2SO4 (\u00b0C)\n",
+ "m = 50+200 #Mass of H2SO4 (lb)\n",
+ "#From figure 18.2:\n",
+ "W1 = 50+100 #Weight of H2SO4 (lb)\n",
+ "W2 = 100 #Weight of H2O (lb)\n",
+ "\n",
+ "#Calculation:\n",
+ "m = W1/(W1+W2)*100 #Percent weight of H2SO4 (%)\n",
+ "m2 = W1+W2 #Mass of mixture (lb)\n",
+ "#From fgure 18.2:\n",
+ "T2 = 140 #Final temperature between the 50% solution and pure H2SO4 at 25\u00b0C (\u00b0F)\n",
+ "h1 = -86 #Specific heat capacity of H2O (Btu/lb)\n",
+ "h2 = -121.5 #Specific heat capacity of H2SO4 (Btu/lb)\n",
+ "Q = m2*(h2-h1) #Heat transferred (Btu)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The final temperature between the 50% solution and pure H2SO4 at 25\u00b0C is :\",round(T2),\" \u00b0F .\"\n",
+ "print \"The heat transferred is :\",round(Q),\" Btu .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature between the 50% solution and pure H2SO4 at 25\u00b0C is : 140.0 \u00b0F .\n",
+ "The heat transferred is : -8875.0 Btu .\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.3, Page number: 386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "F = 10000 #Mass flow rate of NaOH (lb/h)\n",
+ "C1 = 10 #Old concentration of NaOH solution (%)\n",
+ "C2 = 75 #New concentration of NaOH solution (%)\n",
+ "h1 = 1150 #Enthalpy of saturated steam at 14.7 psia (Btu/lb)\n",
+ "U = 500 #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "T1 = 212 #Absolute temperature of evaporator (\u00b0F)\n",
+ "T2 = 340 #Saturated steam temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "L = F*(C1/100)/(C2/100) #Flow rate of steam leaving the evaporator (lb/h)\n",
+ "V = F-L #Overall material balance (lb/h)\n",
+ "#From figure 18.3:\n",
+ "hF = 81 #Enthalpy of solution entering the unit (Btu/lb)\n",
+ "hL = 395 #Enthalpy of the 75% NaOH solution (Btu/lb)\n",
+ "Q = round(V)*h1+round(L)*hL-F*hF #Evaporator heat required (Btu/h)\n",
+ "A = Q/(U*(T2-T1)) #Area of the evaporaor (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat transfer rate required for the evaporator is :\",round(Q,-2),\" Btu/h .\"\n",
+ "print \"The area requirement in the evaporator is :\",round(A,1),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer rate required for the evaporator is : 9683600.0 Btu/h .\n",
+ "The area requirement in the evaporator is : 151.3 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.4, Page number: 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "U1 = 240 #Overall heat transfer coefficient for first effect (Btu/h.ft^2.\u00b0F)\n",
+ "U2 = 200 #Overall heat transfer coefficient for second effect (Btu/h.ft^2.\u00b0F)\n",
+ "U3 = 125 #Overall heat transfer coefficient for third effect (Btu/h.ft^2.\u00b0F)\n",
+ "A1 = 125 #Heating surface area in first effect (ft^3)\n",
+ "A2 = 150 #Heating surface area in second effect (ft^3)\n",
+ "A3 = 160 #Heating surface area in third effect (ft^3)\n",
+ "T1 = 400 #Condensation stream temperature in the first effect (\u00b0F)\n",
+ "T2 = 120 #Vapor leaving temperature in the first effect (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "R1 = 1/(U1*A1) #Resistance across first effect\n",
+ "R2 = 1/(U2*A2) #Resistance across second effect\n",
+ "R3 = 1/(U3*A3) #Resistance across third effect\n",
+ "R = R1+R2+R3 #Total resistance\n",
+ "DT1 = (R1/R)*(T1-T2) #Temperature drop across the heating surface in the first effect (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature drop across the heating surface in the first effect is :\",round(DT1),\" \u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature drop across the heating surface in the first effect is : 80.0 \u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.6, Page number: 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "F = 5000 #Mass of soltuion fed in the evaporator (lb)\n",
+ "xF = 2/100 #Concentration of feed\n",
+ "xL = 5/100 #Concentration of liquor\n",
+ "U = 280 #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "#From figure 18.1 & 18.3:\n",
+ "TF = 100 #Feed temperature (\u00b0F)\n",
+ "TS = 227 #Steam temperature (\u00b0F)\n",
+ "TV = 212 #Vapour temperature (\u00b0F)\n",
+ "TL = 212 #Liquor temperature (\u00b0F)\n",
+ "TC = 227 #Condensate temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From steam tables:\n",
+ "hF = 68 #Enthalpy of feed (Btu/lb)\n",
+ "hL = 180 #Enthalpy of liquor (Btu/lb)\n",
+ "hV = 1150 #Enthalpy of vapour (Btu/lb)\n",
+ "hS = 1156 #Enthalpy of steam (Btu/lb)\n",
+ "hC = 195 #Enthalpy of condensate (Btu/lb)\n",
+ "s1 = F*xF #Total solids in feed (lb)\n",
+ "w = F-s1 #Total water in feed (lb)\n",
+ "s2 = F*xF #Total solids in liquor (lb)\n",
+ "L = s2/xL #Total water in liquor (lb)\n",
+ "V = F-L #Overall balance (lb)\n",
+ "S = (V*hV+L*hL-F*hF)/(hS-hC) #Mass of steam (lb)\n",
+ "Q = S*(hS-hC) #Total heat requirement (Btu)\n",
+ "A = Q/(U*(TS-TL)) #Required surface aea (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mass of vapor produced is :\",round(V),\" lb .\"\n",
+ "print \"The total mass of steam required is :\",round(S),\" lb .\"\n",
+ "print \"The surface area required is :\",round(A),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of vapor produced is : 3000.0 lb .\n",
+ "The total mass of steam required is : 3611.0 lb .\n",
+ "The surface area required is : 826.0 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.7, Page number: 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "F = 5000 #Mass flow rate of NaOH (lb/h)\n",
+ "xF = 20/100 #Old concentration of NaOH solution\n",
+ "TF = 100 #Feed temperature (\u00b0F)\n",
+ "xL = 40/100 #New concentration of NaOH solution\n",
+ "xv = 0 #Vapour concentration at x\n",
+ "yv = 0 #Vapour concentration at y\n",
+ "T1 = 198 #Boiling temperature of solution in the evaporator (\u00b0F)\n",
+ "T2 = 125 #Saturated steam temperature (\u00b0F)\n",
+ "U = 400 #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "Ts = 228 #Steam temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "#From steam tables at 228\u00b0F and 5 psig:\n",
+ "hS = 1156 #Enthalpy of steam (Btu/lb)\n",
+ "hC = 196 #Enthalpy of condensate (Btu/lb)\n",
+ "hV = hS-hC #Enthalpy of vapour (Btu/lb)\n",
+ "Tw = 125.4 #Boiling point of water at 4 in Hg absolute (\u00b0F)\n",
+ "hS2 = 1116 #Enthalpy of saturated steam at 125\u00b0F (Btu/lb)\n",
+ "hs = 0.46 #Heat capacity of superheated steam (Btu/lb.\u00b0F)\n",
+ "#From figure 18.3:\n",
+ "hF = 55 #Enthalpy of feed (Btu/lb)\n",
+ "hL = 177 #Enthalpy of liquor (Btu/lb)\n",
+ "L = F*xF/xL #Mass of liquor (lb)\n",
+ "V = L #Mass of vapour (lb)\n",
+ "hV = hS2+hs*(T1-T2) #Enthalpy of vapour leaving the solution (Btu/lb)\n",
+ "S = (V*hV+L*hL-F*hF)/(hS-hC) #Mass flow rate of steam (lb/h)\n",
+ "Q = S*(hS-hC) #Total heat requirement (Btu)\n",
+ "A = Q/(U*(Ts-T1)) #Required heat transfer area (ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The steam flow rate is :\",round(S,-1),\" lb/h .\"\n",
+ "print \"The required heat transfer area is :\",round(A),\" ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The steam flow rate is : 3170.0 lb/h .\n",
+ "The required heat transfer area is : 253.0 ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.10, Page number: 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 2000 #Hot gas temperature (\u00b0F)\n",
+ "T2 = 550 #Cool gas temperature (\u00b0F)\n",
+ "T3 = 330 #Steam temperature (\u00b0F)\n",
+ "T4 = 140 #Water temperature (\u00b0F)\n",
+ "m = 30000 #Mass flow rate of steam (lb/h)\n",
+ "cp = 0.279 #Average heat capacity of gas (Btu/lb.\u00b0F)\n",
+ "N = 800 #Number of boiler tubes\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = (T1-T3)/(T2-T3) #Temperature difference ratio\n",
+ "Tav = (T1+T2)/2 #Average gas temperature (\u00b0F)\n",
+ "#From steam tables (Appendix):\n",
+ "hs = 1187.7 #Steam enthalpy (Btu/lb)\n",
+ "hw = 107.89 #Water enthalpy (Btu/lb)\n",
+ "Q = m*(hs-hw) #Heat duty (Btu/h)\n",
+ "mh = Q/cp*(T1-T2) #Mass flow rate of gas (lb/h)\n",
+ "x = mh/N #Gas mass flow rate per tube (lb/h)\n",
+ "#From figure 18.5:\n",
+ "L = 15 #Length of boiler tubes (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The length of boiler tubes is :\",L,\" ft .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of boiler tubes is : 15 ft .\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.12, Page number: 399"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T1 = 1800 #Hot gas temperature (\u00b0F)\n",
+ "T2 = 500 #Cool gas temperature (\u00b0F)\n",
+ "#From steam tables:\n",
+ "Tw = 312 #Boiling point of water at 80 psia (\u00b0F)\n",
+ "m1 = 120000 #Mass flow rate of flue gas (lb/h)\n",
+ "D = 2/12 #Inside diameter of tube (ft)\n",
+ "cp = 0.26 #Average heat capacity of flue gas (Btu/lb.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT = (T1-Tw)/(T2-Tw) #Temperature difference ratio\n",
+ "Tav = (T1+T2)/2 #Average gas temperature (\u00b0F)\n",
+ "#From figure 18.4:\n",
+ "x = 150 #Gas mass flow rate per tube (m/N) (lb/h)\n",
+ "N = m1/x #Number of tubes\n",
+ "L = 21.5 #Length of tubes (ft)\n",
+ "A = N*L*D #Total heat transfer area (ft^2)\n",
+ "Q = m1*cp*(T1-T2) #Heat duty (Btu/h)\n",
+ "#From steam tables (Appendix):\n",
+ "hs = 1183.1 #Steam enthalpy at 80 psia (Btu/lb)\n",
+ "hw = 168.1 #Water enthalpy at 200\u00b0F (Btu/lb)\n",
+ "m2 = Q/(hs-hw) #Mass flow rate of water (lb/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required heat transfer area is :\",round(A),\" ft^2 .\"\n",
+ "print \"The tube length is :\",L,\" ft .\"\n",
+ "print \"The heat duty is :\",round(Q/10**7,2),\" x 10^7 .\"\n",
+ "print \"The water mass flow rate is :\",round(m2,-4),\" lb/h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required heat transfer area is : 2867.0 ft^2 .\n",
+ "The tube length is : 21.5 ft .\n",
+ "The heat duty is : 4.06 x 10^7 .\n",
+ "The water mass flow rate is : 40000.0 lb/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.18, Page number: 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m1 = 144206 #Mass flow rate of flue gas (lb/h)\n",
+ "cp = 0.3 #Average flue gas heat capacity (Btu/lb.\u00b0F)\n",
+ "T1 = 2050 #Initial temperature of gas (\u00b0F)\n",
+ "T2 = 560 #Final temperature of gas (\u00b0F)\n",
+ "T3 = 70 #Ambient air temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = m1*cp*(T1-T2) #Duty rate (Btu/h)\n",
+ "#From appendix:\n",
+ "cpa = 0.243 #Average ambient air heat capacity 70\u00b0F (Btu/lb.\u00b0F)\n",
+ "MW = 29 #Molecular weight of air at 70\u00b0F\n",
+ "ma = round(Q,-5)/(cpa*(T2-T3)) #Mass of air required (lb/h)\n",
+ "m2 = round(ma)/MW #Moles of air required (lb mol/h)\n",
+ "m3 = round(ma)*13.32 #Volume of air required (ft^3/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mass of air required is :\",round(ma,-2),\" lb/h .\"\n",
+ "print \"The moles of air required is :\",round(m2,-1),\"lb mol/h .\"\n",
+ "print \"The volume of air required is :\",round(m3,-3),\" ft^3/h .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of air required is : 541700.0 lb/h .\n",
+ "The moles of air required is : 18680.0 lb mol/h .\n",
+ "The volume of air required is : 7215000.0 ft^3/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.19, Page number: 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 18.19:\n",
+ "m1 = 144200 #Mass flow rate of flue gas (lb/h)\n",
+ "m2 = 541700 #Mass flow rate of air (lb/h)\n",
+ "R = 0.73 #Universal gas constant (psia.ft^3/lbmol.\u00b0R)\n",
+ "P = 1 #Absolute pressure (psia)\n",
+ "T = 1020 #Absolute temperature (\u00b0R)\n",
+ "MW = 29 #Molecular weight of air\n",
+ "t = 1.5 #Residence time (s)\n",
+ "\n",
+ "#Calculation:\n",
+ "m = m1+m2 #Total mass flow rate of the gas (lb/h)\n",
+ "q = m*R*T/(P*MW) #Volumetric flow at 560\u00b0F (ft^3/h)\n",
+ "V = q*t/3600 #Volume of tank (ft^3)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total mass flow rate of the gas is :\",round(m,-2),\" lb/h .\"\n",
+ "print \"The volumetric flow at 560\u00b0F is :\",round(q/10**7,2),\" x 10^7 ft^3/h .\"\n",
+ "print \"The volume of tank is :\",round(V),\" ft^3 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total mass flow rate of the gas is : 685900.0 lb/h .\n",
+ "The volumetric flow at 560\u00b0F is : 1.76 x 10^7 ft^3/h .\n",
+ "The volume of tank is : 7338.0 ft^3 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.20, Page number: 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#Fro example 18.20:\n",
+ "V = 7335 #Volume of tank (ft^3)\n",
+ "\n",
+ "#Calculation:\n",
+ "D = (4*V/pi)**(1/3) #Diameter of tank (ft)\n",
+ "H = D #Height of tube (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The diameter of tank is :\",round(H,2),\" ft .\"\n",
+ "print \"The height of tube is :\",round(D,2),\" ft .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The diameter of tank is : 21.06 ft .\n",
+ "The height of tube is : 21.06 ft .\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.21, Page number: 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m1 = 144206 #Mass flow rate of flue gas (lb/h)\n",
+ "cp1 = 0.3 #Average heat capacities of the flue gas (Btu/lb\u00b0F)\n",
+ "cp2 = 0.88 #Average heat capacities of the solid (Btu/lb\u00b0F)\n",
+ "#From example 18.18:\n",
+ "T1 = 550 #Initial temperature of gas (\u00b0F)\n",
+ "T2 = 2050 #Final temperature of gas (\u00b0F)\n",
+ "T3 = 70 #Initial temperature of solid (\u00b0F)\n",
+ "T4 = 550-40 #Final temperature of solid (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Dhf = m1*cp1*(T2-T1) #For the flue gas, the enthalpy change for one hour of operation (Btu)\n",
+ "Dhs = round(Dhf,-4) #For the solids, the enthalpy change for one hour of operation (Btu)\n",
+ "m2 = Dhs/(cp2*(T4-T3)) #Mass of solid (lb)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mass of solid is :\",round(m2),\" lb .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of solid is : 167588.0 lb .\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 18.22, Page number: 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log,sqrt,pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 18.21:\n",
+ "m = 144206 #Mass flow rate of flue gas (lb/h)\n",
+ "cp = 0.3 #Average heat capacities of the flue gas (Btu/lb\u00b0F)\n",
+ "T1 = 2050 #Initial temperature of gas (\u00b0F)\n",
+ "T2 = 180 #Final temperature of gas (\u00b0F)\n",
+ "T3 = 60 #Ambient air temperature (\u00b0F)\n",
+ "U = 1.5 #Overall heat transfer coefficient for cooler (Btu/h.ft^2.\u00b0F)\n",
+ "MW = 28.27 #Molecular weight of gas\n",
+ "R = 379 #Universal gas constant (psia.ft^3/lbmol.\u00b0R)\n",
+ "v = 60 #Duct or pipe velcity at inlet (2050\u00b0F) (ft/s)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = m*cp*(T1-T2) #Heat duty (Btu/h)\n",
+ "DTlm = ((T1-T3)-(T2-T3))/log((T1-T3)/(T2-T3)) #Log-mean temperature difference (\u00b0F)\n",
+ "A1 = round(Q,-5)/(U*round(DTlm)) #Radiative surface area (ft^2)\n",
+ "q = m*R*(T1+460)/(T3+460)/MW #Volumetric flow at inlet (ft^3/h)\n",
+ "A2 = q/(v*3600) #Duct area (ft^2)\n",
+ "D = sqrt(A2*4/pi) #Duct diameter (ft)\n",
+ "L = A1/(pi*D) #Length of required heat exchange ducting (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \" The radiative surface area required is :\",round(A1,-1),\" ft^2 .\"\n",
+ "print \" The length of required heat exchange ducting is :\",round(L),\" ft .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The radiative surface area required is : 80980.0 ft^2 .\n",
+ " The length of required heat exchange ducting is : 3476.0 ft .\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_19.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_19.ipynb
new file mode 100755
index 00000000..3617f433
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_19.ipynb
@@ -0,0 +1,861 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e60aa082c3bd1f8f9672b5ca74c6357f1b26803a7fb296a1d0a644ab9efb4ea1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 19: Insulation and Refractory"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.1, Page number: 413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "H = 2.5 #Height of wall (m)\n",
+ "W = 4 #Width of wall (m)\n",
+ "h = 11 #Convective heat transfer coefficient (W/m^2.K)\n",
+ "T1 = 24 #Outside surface temperature (\u00b0C)\n",
+ "T3 = -15 #Outside air temperature (\u00b0C)\n",
+ "L = 7.62/10**3 #Insulation thickness (m)\n",
+ "k = 0.04 #Thermal conductivity of wool (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "A = H*W #Heat transfer area (m^2)\n",
+ "Q = h*A*(T1-T3) #Heat transfer rate (W)\n",
+ "Ri = L/(k*A) #Insuation resistance (K/W)\n",
+ "Rc = 1/(h*A) #Convective resitance (K/W)\n",
+ "R = Ri+Rc #Total resistance (K/W)\n",
+ "Qt = (T1-T3)/R #Revised heat transfer rate (Btu/h)\n",
+ " \n",
+ "#Result:\n",
+ "print \"1. The heat transfer rate without insulation is :\",round(Q),\" W .\"\n",
+ "print \"Or, the heat transfer rate without insulation is :\",round(Q*3.412),\" Btu/h .\"\n",
+ "print \"2. The revised heat transfer rate with insulation is :\",round(Qt),\" W .\"\n",
+ "print \"Or, the revised heat transfer rate with insulation is :\",round(Qt*3.412),\" Btu/h .\"\n",
+ "print \"There is a calculation mistake in book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The heat transfer rate without insulation is : 4290.0 W .\n",
+ "Or, the heat transfer rate without insulation is : 14637.0 Btu/h .\n",
+ "2. The revised heat transfer rate with insulation is : 1386.0 W .\n",
+ "Or, the revised heat transfer rate with insulation is : 4729.0 Btu/h .\n",
+ "There is a calculation mistake in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.2, Page number: 414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 19.1:\n",
+ "T1 = 24 #Outside surface temperature (\u00b0C)\n",
+ "Ri = 0.0191 #Insulation resistance (K/W)\n",
+ "Q = 1383 #Revised heat transfer rate (Btu/h)\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = T1-Q*Ri #Temperature at outer surface of insulation (\u00b0C)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature at the outer surface of the insulation is :\",round(T2,1),\" \u00b0C .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature at the outer surface of the insulation is : -2.4 \u00b0C .\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.3, Page number: 415"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 19.1:\n",
+ "h = 11 #Convective heat transfer coefficient (W/m^2.K)\n",
+ "L = 7.62/10**3 #Insulation thickness (m)\n",
+ "k = 0.04 #Thermal conductivity of wool (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "Bi = h*L/k #Biot number\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Biot nmuber is :\",round(Bi,1),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Biot nmuber is : 2.1 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.4, Page number: 415"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "k = 0.022 #Thermal conductivity of glass wool (Btu/h.ft.\u00b0F)\n",
+ "T1 = 400 #Inside wall temperature (\u00b0F)\n",
+ "T2 = 25 #Outside wall temperature (\u00b0C)\n",
+ "L = 3/12 #Length of insulation cover (ft)\n",
+ "\n",
+ "#Calculation:\n",
+ "T_2 = T2*(9/5)+32 #Outside wall temperature in fahrenheit scale (\u00b0F)\n",
+ "QbyA = k*(T1-T_2)/L #Heat flux across the wall (Btu/h.ft^2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat flux across the wall is :\",round(QbyA,1),\" Btu/h.ft^2 .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat flux across the wall is : 28.4 Btu/h.ft^2 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.5, Page number: 415"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "w = 8 #Width of wall (m)\n",
+ "H = 3 #Height of wall (m)\n",
+ "h = 21 #Convective heat transfer coefficient between the air and the surface (W/m^2.K)\n",
+ "T1 = -18 #Outside surace of wall temperature (\u00b0C)\n",
+ "T3 = 26 #Surrounding air temperature (\u00b0C)\n",
+ "l1 = 80/100 #Reduction in cooling load\n",
+ "k = 0.0433 #Thermal conductivity of cork board insulation (W/m.K)\n",
+ "T = 12000 #Units Btu/h in 1 ton of refrigeration\n",
+ "\n",
+ "#Calculation:\n",
+ "A = w*H #Heat transfer area (m^2) (part 1)\n",
+ "Q1 = h*A*(T1-T3) #Rate of heat flow in the absence of insulation (W)\n",
+ "Q2 = Q1*3.4123/T #Rate of heat flow in the absence of insulation (ton of refrigeration)\n",
+ "l2 = 1-l1 #Reduced cooling load (part 2)\n",
+ "Q3 = l2*Q1 #Heat rate with insulation (W)\n",
+ "Rt = (T1-T3)/Q3 #Total thermal resistance (\u00b0C/W)\n",
+ "R2 = 1/(h*A) #Convection thermal resistance (\u00b0C/W)\n",
+ "R1 = Rt-R2 #Insulation conduction resistance (\u00b0C/W)\n",
+ "L = R1*k*A #Required insulation thickness (m)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The rate of heat flow through the rectangular wall without insulation is :\",round(Q1/10**3,2),\" kW .\"\n",
+ "print \"Or, the rate of heat flow through the rectangular wall without insulation in tons of refrigeration is :\",round(Q2,1),\" ton of refrigeration .\"\n",
+ "if (Q1<0):\n",
+ " print \" The negative sign indicates heat flow from the surrounding air into the cold room.\"\n",
+ "else :\n",
+ " print \" The positive sign indicates heat flow from the surrounding air into the cold room.\"\n",
+ "print \"2. The required thickness of the insulation board is :\",round(L*10**3,2),\" mm .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The rate of heat flow through the rectangular wall without insulation is : -22.18 kW .\n",
+ "Or, the rate of heat flow through the rectangular wall without insulation in tons of refrigeration is : -6.3 ton of refrigeration .\n",
+ " The negative sign indicates heat flow from the surrounding air into the cold room.\n",
+ "2. The required thickness of the insulation board is : 8.25 mm .\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.6, Page number: 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 19.5:\n",
+ "Q = -4435.2 #Heat rate with insulation (W)\n",
+ "R2 = 0.00198 #Convection thermal resistance (\u00b0C/W)\n",
+ "T3 = 26 #Surrounding air temperature (\u00b0C)\n",
+ "h = 21 #Convective heat transfer coefficient between the air and the surface (W/m^2.K)\n",
+ "k = 0.0433 #Thermal conductivity of cork board insulation (W/m.K)\n",
+ "L = 0.00825 #Required insulation thickness (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = T3+Q*R2 #Interface temperature (\u00b0C) (part 1)\n",
+ "Bi = h*L/k #Biot number (part 2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The interface temperature is :\",round(T2,2),\" \u00b0C .\"\n",
+ "print \"2. The Biot number is :\",round(Bi),\" .\"\n",
+ "print \"3. Theoretical part.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The interface temperature is : 17.22 \u00b0C .\n",
+ "2. The Biot number is : 4.0 .\n",
+ "3. Theoretical part.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.7, Page number: 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "D2 = 0.5/10**3 #External diameter of needle (m)\n",
+ "h3 = 12 #Heat transfer coefficient (W/m^2.K)\n",
+ "L = 1 #Insulation thickness (m)\n",
+ "T1 = 95 #Reactant temperature (\u00b0C)\n",
+ "T3 = 20 #Ambient air temperature (\u00b0C)\n",
+ "k1 = 16 #Thermal conductivity of needle (W/m.K)\n",
+ "k3 = 0.0242 #Thermal conductivity of air (W/m.K)\n",
+ "D3 = 2/10**3 #Diameter of rubber tube (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "r2 = D2/2 #External radius of needle (m)\n",
+ "r3 = D3/2 #Radius of rubber tube (m)\n",
+ "Rt1 = 1/(h3*(2*pi*r2*L)) #Thermal resistance (\u00b0C/W)\n",
+ "Q1 = (T1-T3)/Rt1 #Rate of heat flow in the absence of insulation (W)\n",
+ "Bi = h3*D2/k1 #Biot number \n",
+ "Nu = h3*D2/k3 #Nusselt number\n",
+ "R2 = log(r3/r2) #Thermal resistance of needle (\u00b0C/W)\n",
+ "R3 = 1/(h3*(2*pi*r3*L)) #Thermal resistance of rubber tube (\u00b0C/W)\n",
+ "Rt2 = R2+R3 #Total thermal resistance (\u00b0C/W)\n",
+ "Q2 = (T1-T3)/Rt2 #Rate of heat loss (W)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The rate of the heat loss from the hypodermic needle with the rubber insulation is :\",round(Q1,2),\" W .\"\n",
+ "print \" The rate of the heat loss from the hypodermic needle without the rubber insulation is :\",round(Q2,2),\" W .\"\n",
+ "print \"2. The Biot number is :\",round(Bi,6),\" .\"\n",
+ "print \" The nusselt number is :\",round(Nu,3),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The rate of the heat loss from the hypodermic needle with the rubber insulation is : 1.41 W .\n",
+ " The rate of the heat loss from the hypodermic needle without the rubber insulation is : 5.12 W .\n",
+ "2. The Biot number is : 0.000375 .\n",
+ " The nusselt number is : 0.248 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.9, Page number: 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log, pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h = 140 #Convention heat transfer coefficient (W/m^2.K)\n",
+ "D1 = 10/10**3 #Rod diameter (m)\n",
+ "L = 2.5 #Rod length (m)\n",
+ "T1 = 200 #Surface temperature of rod (\u00b0C)\n",
+ "T2 = 25 #Fluid temperature (\u00b0C)\n",
+ "k = 1.4 #Thermal conductivity of bakellite (W/m.K)\n",
+ "l = 55/10**3 #Insulation thickness (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q1 = h*pi*D1*L*(T1-T2) #Rate of heat transfer for the bare rod (W) (part 1)\n",
+ "Bi = 2 #Critical Biot number (part 2)\n",
+ "D2 = Bi*k/h #Critical diameter associated with the bakelite coating (m)\n",
+ "r2 = D2/2 #Critical radius associated with the bakelite coating (m)\n",
+ "r1 = D1/2 #Rod radius (m)\n",
+ "R1 = log(r2/r1)/(2*pi*k*L) #Insulation conduction resistance (\u00b0C/W)\n",
+ "R2 = 1/(h*(2*pi*r2*L)) #Convection thermal resistance (\u00b0C/W)\n",
+ "Rt1 = R1+R2 #Total thermal resistance (\u00b0C/W)\n",
+ "Qc = (T1-T2)/Rt1 #Heat transfer rate at the critical radius (W)\n",
+ "r3 = r1+l #New radius associated with the bakelite coating after insulation (m) (part 3)\n",
+ "R3 = log(r3/r1)/(2*pi*k*L) #Insulation conduction bakelite resistance (\u00b0C/W)\n",
+ "R4 = 1/(h*(2*pi*r3*L)) #Convection bakelite thermal resistance (\u00b0C/W)\n",
+ "Rt2 = R3+R4 #Total bakelite thermal resistance (\u00b0C/W)\n",
+ "Q2 = (T1-T2)/Rt2 #Heat transfer rate at the bakelite critical radius (W)\n",
+ "Re = ((Q1-Q2)/Q1)*100 #Percent reduction in heat transfer rate relative to the case of a bare rod (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The rate of heat transfer for the bare rod is :\",round(Q1),\" W .\"\n",
+ "print \"2. The critical radius associated with the bakelite coating is :\",round(r2*10**3),\" mm.\"\n",
+ "print \" & the heat transfer rate at the critical radius is :\",round(Qc),\" W .\"\n",
+ "print \"3. The fractional reduction in heat transfer rate relative to the case of a bare rod is :\",round(Re,1),\" % .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The rate of heat transfer for the bare rod is : 1924.0 W .\n",
+ "2. The critical radius associated with the bakelite coating is : 10.0 mm.\n",
+ " & the heat transfer rate at the critical radius is : 2273.0 W .\n",
+ "3. The fractional reduction in heat transfer rate relative to the case of a bare rod is : 24.6 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.10, Page number: 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi, log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "r1 = 1.1/100 #Inside radius of pipe (m)\n",
+ "r2 = 1.3/100 #Outside radius of pipe (m)\n",
+ "r3 = 3.8/100 #Outside radius of asbestos insulation (m)\n",
+ "L = 1 #Length of tube (m)\n",
+ "h1 = 190 #Heat transfer coefficient from ethylene glycol to the stainless steel pipe (W/m^2.K)\n",
+ "k2 = 19 #Thermal conductivity of pipe (W/m.K)\n",
+ "h2 = 14 #Outside heat transfer coefficient from the air to the surface of the insulation (W/m^2.K)\n",
+ "k3 = 0.2 #Thermal conductivity of asbestos (W/m.K)\n",
+ "T1 = 124 #Hot ethylene glycol temperature (\u00b0C)\n",
+ "T5 = 2 #Surrounding air temperature (\u00b0C)\n",
+ "k4 = 0.0242 #Thermal conductivity of air (W/m.K)\n",
+ "\n",
+ "#Calculation:\n",
+ "A1 = 2*pi*r1*L #Inside surface area of pipe (m^2) (part1)\n",
+ "A2 = 2*pi*r2*L #Outside surface area of pipe (m^2)\n",
+ "A3 = 2*pi*r3*L #Outside surface area of asbestos insulation (m^2)\n",
+ "R1 = 1/(h1*A1) #Inside convection resistance (\u00b0C/W)\n",
+ "R2 = log(r2/r1)/(2*pi*k2*L) #Conduction resistance through the tube (\u00b0C/W)\n",
+ "R3 = 1/(h2*A2) #Outside convection resistance (\u00b0C/W)\n",
+ "Rt1 = R1+R2+R3 #Total resistance without insulation (\u00b0C/W)\n",
+ "Q1 = (T1 - T5)/Rt1 #Heat transfer rate without insulation (W)\n",
+ "R4 = log(r3/r2)/(2*pi*k3*L) #Conduction resistance associated with the insulation (\u00b0C/W) (part 2)\n",
+ "R5 = 1/(h2*A3) #Outside convection resistance (\u00b0C/W)\n",
+ "Rt2 = R1+R2+R4+R5 #Total rsistance with the insulation (\u00b0C/W)\n",
+ "Q2 = (T1-T5)/Rt2 #Heat transfer rate with the insulation (W)\n",
+ "U1 = 1/(Rt2*A1) #Overall heat transfer coefficient based on the inside area (W/m^2.K) (part 3)\n",
+ "U3 = 1/(Rt2*A3) #Overall heat transfer coefficient based on the outside area (W/m^2.K) (part 4)\n",
+ "T3 = T1-(R1+R2)*Q2 #Temperature at the steel\u2013insulation interface (\u00b0C) (part 5)\n",
+ "Bi1 = h2*(2*r3)/k3 #Outside Biot number (part 6)\n",
+ "Bi2 = h1*(2*r1)/k2 #Inside Biot number\n",
+ "Nu = h1*(2*r1)/k4 #Nusselt number of the air\n",
+ "rlm = (r3-r2)/log(r3/r2) #Log mean radius of the insulation (m) (part 7)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The rate of heat transfer without insulation is :\",round(Q1,1),\" W.\"\n",
+ "print \"2. The rate of heat transfer with insulation is :\",round(Q2,1),\" W.\"\n",
+ "print \"3. The overall heat transfer coefficient based on the inside area of the tube is :\",round(U1,2),\" W/m^2.K .\"\n",
+ "print \"4. The overall heat transfer coefficient based on the outside area of the insulation is :\",round(U3,1),\" W/m^2.K .\"\n",
+ "print \"5. The temperature, T3, at the steel\u2013insulation interface is :\",round(T3,1),\" \u00b0C.\"\n",
+ "print \"6. The inside Biot numbers is :\",round(Bi2,2),\" .\"\n",
+ "print \" The outside Biot numbers is :\",round(Bi1,2),\" .\"\n",
+ "print \" The Nusselt number is :\",round(Nu,1),\" .\"\n",
+ "print \"7. The log mean radius of insulation is :\",round(rlm*100,2),\" cm.\"\n",
+ "print \"There is a printing mistake in book for unit in part 7.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The rate of heat transfer without insulation is : 128.1 W.\n",
+ "2. The rate of heat transfer with insulation is : 99.2 W.\n",
+ "3. The overall heat transfer coefficient based on the inside area of the tube is : 11.76 W/m^2.K .\n",
+ "4. The overall heat transfer coefficient based on the outside area of the insulation is : 3.4 W/m^2.K .\n",
+ "5. The temperature, T3, at the steel\u2013insulation interface is : 116.3 \u00b0C.\n",
+ "6. The inside Biot numbers is : 0.22 .\n",
+ " The outside Biot numbers is : 5.32 .\n",
+ " The Nusselt number is : 172.7 .\n",
+ "7. The log mean radius of insulation is : 2.33 cm.\n",
+ "There is a printing mistake in book for unit in part 7.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.11, Page number: 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h1 = 800 #Heat transfer coefficient for steam condensing inside coil (Btu/h.ft^2.\u00b0F)\n",
+ "h2 = 40 #Heat transfer coefficient for oil outside coil (Btu/h.ft^2.\u00b0F)\n",
+ "h3 = 40 #Heat transfer coefficient for oil inside tank wal (Btu/h.ft^2.\u00b0F)\n",
+ "h4 = 2 #Heat transfer coefficient for outer tank wall to ambient air (Btu/h.ft^2.\u00b0F)\n",
+ "k1 = 0.039 #Thermal conductivity of insulation layer (Btu/h.ft.\u00b0F)\n",
+ "l1 = 2/12 #Thickness of insulation layer (ft)\n",
+ "D = 10 #Diameter of tank (ft)\n",
+ "H = 30 #Height of tank (ft)\n",
+ "k2 = 224 #Thermal conductivity of copper tube (Btu/h.ft.\u00b0F)\n",
+ "l2 = (3/4)/12 #Thickness of insulation layer (ft)\n",
+ "T1 = 120 #Temperature of tank (\u00b0F)\n",
+ "T2 = 5 #Outdoor temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Uo1 = 1/(1/h3+(l1/k1)+1/h4) #Overall heat transfer coefficient for tank (Btu/h.ft^2.\u00b0F)\n",
+ "At = pi*(D+2*l1)*H #Surface area of tank (ft^2)\n",
+ "Q = Uo1*At*(T1-T2) #Heat transfer rate lost from the tank (Btu/h)\n",
+ "#From table 6.3:\n",
+ "l2 = 0.049/12 #Thickness of coil (ft)\n",
+ "A = 0.1963 #Area of 18 guage, 3/4-inch copper tube (ft^2/ft)\n",
+ "Uo2 = 1/(1/h2+(l2/k2)+1/h1) #Overall heat transfer coefficient for coil (Btu/h.ft^2.\u00b0F)\n",
+ "#From steam tables:\n",
+ "Tst = 240 #Temperature for 10 psia (24.7 psia) steam (\u00b0F)\n",
+ "Ac = Q/(Uo2*(Tst-T1)) #Area of tube (ft^2)\n",
+ "L = Ac/A #Lengt of tube (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The length ofcopper tubing required is :\",round(L,1),\" ft .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length ofcopper tubing required is : 26.0 ft .\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.12, Page number: 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi, log\n",
+ "from numpy import array,log as LOG\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#For 1-inch pipe schedule 40:\n",
+ "Di = 1.049/12 #Inside diameter (ft)\n",
+ "Do = 1.315/12 #Outside diameter (ft)\n",
+ "L = 8000 #Length of pipe (ft)\n",
+ "hi = 2000 #Heat transfer coefficient inside of the pipe (Btu/h.ft^2.\u00b0F)\n",
+ "ho = 100 #Outside heat transfer coefficient (Btu/h.ft.\u00b0F)\n",
+ "kl = 0.01 #Thermal conductivity of insulation (Btu/h.ft.\u00b0F)\n",
+ "T1 = 240 #Steam temperature (\u00b0F)\n",
+ "T2 = 20 #Air temperature (\u00b0F)\n",
+ "k = 24.8 #Thermal conductivity for steel (Btu/h.ft.\u00b0F)\n",
+ "Dxl = array([3/8,1/2,3/4,1])/12 #thickness(ft)\n",
+ "amt = array([1.51,3.54,5.54,8.36])/6 #Cost per feet($) \n",
+ "\n",
+ "#Calculation:\n",
+ "D_ = (Do-Di)/log(Do/Di) #Log-mean diameter of the pipe (ft)\n",
+ "Dl = Do+2*(Dxl) #Insulation thickness (ft)\n",
+ "D_l = (Dl-Do)/LOG(Dl/Do) #Log mean diameter of pipe (ft)\n",
+ "Dxw = (Do-Di)/2 #Pipe thickness (ft)\n",
+ "Rw = Dxw/(k*pi*D_*L) #Wall resistance ((Btu/h.\u00b0F)^-1)\n",
+ "Ri = 1/(hi*pi*Di*L) #Inside steam convection resistance ((Btu/h.\u00b0F)^-1)\n",
+ "Rl = Dxl/(kl*pi*D_l*L) #Insulation resistance ((Btu/h.\u00b0F)^-1)\n",
+ "Ro = 1/(ho*pi*Dl*L) #Outside air convection resistance ((Btu/h.\u00b0F)^-1)\n",
+ "R = Ri+Rw+Rl+Ro #Total resistance ((Btu/h.\u00b0F)^-1)\n",
+ "Uo = 1/(R*pi*Dl*L) #Overall outside heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "Ui = 1/(R*pi*Di*L) #Overall inside heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "dT = T1-T2\n",
+ "Ai = pi*Di*L #Inside area (ft^2)\n",
+ "Q = Ui*Ai*dT #Energy loss (Btu/h)\n",
+ "def energyPerDollar(Q1,Q2,amt1,amt2):\n",
+ " return round((Q1-Q2)/(8000*(amt2-amt1)),1)\n",
+ "\n",
+ "#Results:\n",
+ "print \"Energy saved per dollar ingoing from 3/8 to 1/2 inch is :\",energyPerDollar(Q[0],Q[1],amt[0],amt[1]),' Btu/h.$'\n",
+ "print \"Energy saved per dollar ingoing from 1/2 to 3/4 inch is :\",energyPerDollar(Q[1],Q[2],amt[1],amt[2]),' Btu/h.$'\n",
+ "print \"Energy saved per dollar ingoing from 3/4 to 1 inch is :\",energyPerDollar(Q[2],Q[3],amt[2],amt[3]),' Btu/h.$'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy saved per dollar ingoing from 3/8 to 1/2 inch is : 18.2 Btu/h.$\n",
+ "Energy saved per dollar ingoing from 1/2 to 3/4 inch is : 18.8 Btu/h.$\n",
+ "Energy saved per dollar ingoing from 3/4 to 1 inch is : 6.8 Btu/h.$\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.16, Page number: 434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "ki = 0.44 #Thermal conductivity of insulation (Btu/h.ft.\u00b0F)\n",
+ "ho = 1.32 #Air flow coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "OD = 2 #Outside diameter of pipe (in)\n",
+ "\n",
+ "#Calculation:\n",
+ "rc = (ki/ho)*12 #Outer critical radius of insulation (in)\n",
+ "ro = OD/2 #Outside radius of pipe (in)\n",
+ "L = rc-ro #Critical insulation thickness (in)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The outer critical radius of insulation is :\",round(rc),\" in .\"\n",
+ "if ro<rc:\n",
+ " print \"Since, ro<rc, the heat loss will increase as insulation is added.\"\n",
+ "else :\n",
+ " print \"Sice, ro>rc, the heat loss will decrease as insulation is added.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The outer critical radius of insulation is : 4.0 in .\n",
+ "Since, ro<rc, the heat loss will increase as insulation is added.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.18, Page number: 439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Lf = 6/12 #Length of firebrick (ft)\n",
+ "kf = 0.61 #Thermal conductivity of firebrick (Btu/h.ft.\u00b0F)\n",
+ "A = 480 #Surface area of wall (ft^2)\n",
+ "Lw = 8/12 #Length of rock wool (ft)\n",
+ "kw = 0.023 #Thermal conductivity of rock wool (Btu/h.ft.\u00b0F)\n",
+ "T1 = 1900 #Temperature of insulation of firebrick (\u00b0F)\n",
+ "T2 = 140 #Temperature of insulation of rock wool (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Rf = Lf/(kf*A) #Resistance of firebrick (h.\u00b0F/Btu)\n",
+ "Rw = Lw/(kw*A) #Resistance of rock wool (h.\u00b0F/Btu)\n",
+ "R = Rf+Rw #Total resitance (h.\u00b0F/Btu)\n",
+ "Q = (T1-T2)/R #Heat loss through the wall (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The heat loss through the wall is :\",round(Q),\" Btu/h .\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss through the wall is : 28344.0 Btu/h .\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.19, Page number: 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "h1 = 1700 #Steam heat-transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "h2 = 2 #Air heat-transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "A = 1 #Area of base (ft^2) (assumption)\n",
+ "k1 = 26 #Thermal conductivity of steel (Btu/h.ft.\u00b0F)\n",
+ "k2 = 218 #Thermal conductivity of copper (Btu/h.ft.\u00b0F)\n",
+ "t = 0.375 #Thickness of steel sheet (in)\n",
+ "h3 = 2500 #Increased steam heat-transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "h4 = 12 #Increased air heat-transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "R1 = 1/(h1*A) #Steam resistance (h.\u00b0F/Btu)\n",
+ "R2 = 1/(h2*A) #Air resistance (h.\u00b0F/Btu)\n",
+ "R3 = (t/12)/(k1*A) #Steel resistance (h.\u00b0F/Btu)\n",
+ "Rt1 = R1+R2+R3 #Total resistance (with steel) (h.\u00b0F/Btu)\n",
+ "R4 = (t/12)/(k2*A) #Copper resistance (h.\u00b0F/Btu) (part 1)\n",
+ "Rt2 = R1+R2+R4 #Total resistance (with copper) (h.\u00b0F/Btu)\n",
+ "R5 = 1/(h1*A) #New steam resistance (h.\u00b0F/Btu)\n",
+ "Rt3 = R5+R2+R3 #Total resistance after increasing the steam coefficient (h.\u00b0F/Btu)\n",
+ "R6 = 1/(h4*A) #Air resistance (h.\u00b0F/Btu)\n",
+ "Rt4 = R1+R6+R3 #Total resistance after increasing the air coefficient (h.\u00b0F/Btu)\n",
+ "\n",
+ "#Result:\n",
+ "if (Rt1==Rt2):\n",
+ " print \"1.The rate of heat transfer is essentially unaffected.\"\n",
+ "else :\n",
+ " print \"1. The rate of heat transfer is essentially affected.\"\n",
+ "if (Rt1==Rt3):\n",
+ " print \"2. The rate is again unaffected.\"\n",
+ "else :\n",
+ " print \"2. The rate is again affected.\"\n",
+ "if (Rt1==Rt4):\n",
+ " print \"3. The rate is unaffected for this case.\"\n",
+ "else :\n",
+ " print \"3. The rate is affected for this case.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The rate of heat transfer is essentially affected.\n",
+ "2. The rate is again unaffected.\n",
+ "3. The rate is affected for this case.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 19.20, Page number: 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import pi, log, exp\n",
+ "\n",
+ "#Variable declaration:\n",
+ "rfo = 12/2 #Outside radius of firebrick (ft)\n",
+ "rfi = 5.167 #Inside radius of firebrick (ft)\n",
+ "rso = 6.479 #Outside radius of sil-o-cel (ft)\n",
+ "rsi = 6.063 #Inside radius of fsil-o-cel (ft)\n",
+ "L = 30 #Length of incinerator (ft)\n",
+ "kf = 0.608 #Thermal conductivity of firebrick (Btu/h.ft.\u00b0F)\n",
+ "ks = 0.035 #Thermal conductivity of sil-o-cel (Btu/h.ft.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Rf= log(rfo/rfi)/(2*pi*L*kf) #Resistance of firebrick (h.ft.\u00b0F/Btu)\n",
+ "Rs= log(rso/rsi)/(2*pi*L*ks) #Resistance of sil-o-cel (h.ft.\u00b0F/Btu)\n",
+ "R = Rf+Rs #Total resistance (h.ft.\u00b0F/Btu)\n",
+ "ro = exp(R*(2*pi*L*ks))*rso #New outside radius of sil-o-cel (ft)\n",
+ "r= ro-rso #Extra thickness (ft)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The extra thickness is :\",round(r,3),\" ft.\"\n",
+ "print \"Or, the extra thickness is :\",round(r*12,2),\" in.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The extra thickness is : 0.504 ft.\n",
+ "Or, the extra thickness is : 6.05 in.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_21.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_21.ipynb
new file mode 100755
index 00000000..5f8510ce
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_21.ipynb
@@ -0,0 +1,167 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:bd26ff767164e3be8b1fcb13ef6fd471083a3c697418421a2ed4fbad1197f805"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 21: Entropy Considerations and Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 21.1, Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m = 1 #Mass flowrate (lb)\n",
+ "cP = 1 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "#From figure 21.3:\n",
+ "T1 = 300 #Temperature of hot fluid leaving exchanger (\u00b0F)\n",
+ "T2 = 540 #Temperature of hot fluid entering exchanger (\u00b0F)\n",
+ "T3 = 60 #Temperature of cold fluid leaving exchanger (\u00b0F)\n",
+ "T4 = 300 #Temperature of cold fluid entering exchanger (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DSh = m*cP*log((T1+460)/(T2+460)) #Entropy for hot fluid (Btu/\u00b0F)\n",
+ "DSc = m*cP*log((T4+460)/(T3+460)) #Entropy for cold fluid (Btu/\u00b0F)\n",
+ "DSa = DSh+DSc #Entropy for one exchanger (Btu/\u00b0F)\n",
+ "DSt = DSa*2 #Total entropy change (Btu/\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The entropy chage is :\",round(DSt,4),\" Btu/\u00b0F .\"\n",
+ "if (DSt>0):\n",
+ " print \"There is a positive entropy change.\"\n",
+ "else :\n",
+ " print \"There is a negative entropy change.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The entropy chage is : 0.2101 Btu/\u00b0F .\n",
+ "There is a positive entropy change.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 21.2, Page number: 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 21.1:\n",
+ "DSh = -0.2744 #Entropy for hot fluid (Btu/\u00b0F)\n",
+ "DSc = 0.3795 #Entropy for cold fluid (Btu/\u00b0F)\n",
+ "m = 1 #Mass flowrate (lb)\n",
+ "cP = 1 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "#From figure 21.4:\n",
+ "DT = 0 #Temperature difference driving force (\u00b0F)\n",
+ "DS_D = 0 #Entropy for D exchanger (Btu/\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DS_C = DSh+DSc #Entropy for C exchanger (Btu/\u00b0F)\n",
+ "DSt = DS_C+DS_D #Total entropy change of exchangers (Btu/\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total entropy change is :\",DSt,\" Btu/\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change is : 0.1051 Btu/\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 21.3, Page number: 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From figure 21.5:\n",
+ "m = 2 #Mass flowrate (lb)\n",
+ "cP = 1 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "DS1 = -0.2744 #Entropy for hot fluid for E exchanger (Btu/\u00b0F)\n",
+ "T1 = 180 #Temperature cold fluid entering the E exchabger (\u00b0F)\n",
+ "T2 = 60 #Temperature cold fluid leaving the E exchabger (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DS2 = m*cP*log((T1+460)/(T2+460)) #Entropy for cold fluid for E exchanger (Btu/\u00b0F)\n",
+ "DS_E = DS1+DS2 #Entropy for E exchanger (Btu/\u00b0F)\n",
+ "DS_F = DS_E #Entropy for F exchanger (Btu/\u00b0F)\n",
+ "DSt = DS_F+DS_E #Entropy change in exchangers E and F (Btu/\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The entropy change in exchangers E and F is :\",round(DSt,4),\" Btu/\u00b0F .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The entropy change in exchangers E and F is : 0.2818 Btu/\u00b0F .\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_22.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_22.ipynb
new file mode 100755
index 00000000..65afae0f
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_22.ipynb
@@ -0,0 +1,544 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:02a3e83bf8e73eb737ccd32c864c102b912719b43e71a2afa02159b5cd3f3cf2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 22: Design Principles and Industrial Applications"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.6, Page number: 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import symbols,solve\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From steam tables:\n",
+ "h1 = 1572 #Enthalpy for super heated steam at (P = 40 atm, T = 1000\u00b0F) (Btu/lb)\n",
+ "h2 = 1316 #Enthalpy for super heated steam at (P = 20 atm, T = 600\u00b0F) (Btu/lb)\n",
+ "h3 = 1151 #Enthalpy for saturated steam (Btu/lb)\n",
+ "h4 = 28.1 #Enthalpy for saturated water (Btu/lb)\n",
+ "m1 = 1000 #Mass flowrate of steam (lb/h)\n",
+ "m = symbols('m') #Mass flow rate of steam (lb/h)\n",
+ "\n",
+ "#Calculation:\n",
+ "Dh1 = m1*(h3-h4) #The change in enthalpy for the vaporization of the water stream (Btu/h)\n",
+ "Dh2 = m*(h1-h2) #The change in enthalpy for the cooling of the water stream (Btu/h)\n",
+ "x = solve(Dh1-Dh2,m) #Mass flowrate of steam (lb/h)\n",
+ "m2 = x[0]; #Mass flowrate of steam (lb/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mass flowrate of the utility steam required is :\",round(m2),\" lb/h.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass flowrate of the utility steam required is : 4386.0 lb/h.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.7, Page number: 473"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From table 22.1:\n",
+ "QH1 = 12*10**6 #Heat duty for process unit 1 (Btu/h)\n",
+ "QH2 = 6*10**6 #Heat duty for process unit 2 (Btu/h)\n",
+ "QH3 = 23.5*10**6 #Heat duty for process unit 3 (Btu/h)\n",
+ "QH4 = 17*10**6 #Heat duty for process unit 4 (Btu/h)\n",
+ "QH5 = 31*10**6 #Heat duty for process unit 5 (Btu/h)\n",
+ "T1 = 90 #Supply water temperature (\u00b0F)\n",
+ "T2 = 115 #Return water temperature (\u00b0F)\n",
+ "cP = 1 #Cooling water heat capacity (Btu/(lb.\u00b0F))\n",
+ "p = 62*0.1337 #Density of water (lb/gal)\n",
+ "BDR = 5/100 #Blow-down rate\n",
+ "\n",
+ "#Calculation:\n",
+ "QHL = (QH1+QH2+QH3+QH4+QH5)/60 #Heat load (Btu/min)\n",
+ "DT = T2-T1 #Change in temperature (\u00b0F)\n",
+ "qCW = round(QHL,-5)/(DT*cP*p) #Required cooling water flowrate (gpm)\n",
+ "qBD = BDR*qCW #Blow-down flow (gpm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total flowrate of cooling water required for the services is :\",round(qCW,-1),\" gpm.\"\n",
+ "print \"The required blow-down flow is :\",round(qBD),\" gpm.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total flowrate of cooling water required for the services is : 7240.0 gpm.\n",
+ "The required blow-down flow is : 362.0 gpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.8, Page number: 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q1 = 10*10**6 #Unit heat duty for process unit 1 (Btu/h)\n",
+ "Q2 = 8*10**6 #Unit heat duty for process unit 2 (Btu/h)\n",
+ "Q3 = 12*10**6 #Unit heat duty for process unit 3 (Btu/h)\n",
+ "Q4 = 20*10**6 #Unit heat duty for process unit 4 (Btu/h)\n",
+ "hv = 751 #Enthalpy of vaporization for pressure 500 psig (Btu/lb)\n",
+ "\n",
+ "#Calculation:\n",
+ "mB1 = Q1/hv #Mass flowrate of 500 psig steam through unit 1 (lb/h)\n",
+ "mB2 = Q2/hv #Mass flowrate of 500 psig steam through unit 2 (lb/h)\n",
+ "mB3 = Q3/hv #Mass flowrate of 500 psig steam through unit 3 (lb/h)\n",
+ "mB4 = Q4/hv #Mass flowrate of 500 psig steam through unit 4 (lb/h)\n",
+ "mBT = mB1+mB2+mB3+mB4 #Total steam required (lb/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total steam required is :\", round(mBT,-1),\" lb/h.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total steam required is : 66580.0 lb/h.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.9, Page number: 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import symbols,solve\n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "po = 53*16.0185 #Density of oil (kg/m^3)\n",
+ "co = 0.46*4186.7 #Heat capacity of oil (J/kg.\u00b0C)\n",
+ "muo = 150/1000 #Dynamic viscosity of oil (kg/m.s)\n",
+ "ko = 0.11*1.7303 #Thermal conductivity of oil (W/m.\u00b0C)\n",
+ "qo = 28830*4.381*10**-8 #Volumetric flowrate of oil (m^3/s)\n",
+ "pw = 964 #Density of water (kg/m^3)\n",
+ "cw = 4204 #Heat capacity of water (J/kg.\u00b0C)\n",
+ "muw = 0.7/3600*1.4881 #Dynamic viscosity of water (kg/m.s)\n",
+ "kw = 0.678 #Thermal conductivity of water (W/m.\u00b0C)\n",
+ "qw = 8406*4.381*10**-8 #Volumetric flowrate of water (m^3/s)\n",
+ "t1 = 23.5 #Initial temperature of oil (\u00b0C)\n",
+ "t2 = 27 #Final temperature of oil (\u00b0C)\n",
+ "T1 = 93 #Water heating temperature of water (\u00b0C)\n",
+ "T2 = symbols('T2') #Minimum temperature of heating water (\u00b0C)\n",
+ "A = symbols('A') #Heat transfer area (m^2)\n",
+ "Uc = 35.4 #Clean heat transfer coefficient (W/m^2.K)\n",
+ "Rf = 0.0007 #Thermal resistance (m^2.K/W)\n",
+ "D = 6*0.0254 #Inside diameter of pipe (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "vo = muo/po #Kinematic viscosity of oil (m^2/s)\n",
+ "mo = po*qo #Mass flowrate of oil (kg/s)\n",
+ "vw = muw/pw #Kinematic viscosity of (m^2/s)\n",
+ "mw = pw*qw #Masss flow rate of water (kg/s)\n",
+ "Q1 = mo*co*(t2-t1) #Duty of exchanger of oil (W)\n",
+ "T2m = t1 #Lowest possible temperature of the water (\u00b0C) (part 1)\n",
+ "Qmw = mw*cw*(T1-T2m) #Maximum duty of exchanger of water (W) (part 2)\n",
+ "Q2 = mw*cw*(T1-T2) #Duty of exchanger of water in terms of T2 (W)\n",
+ "x = solve(Q1-Q2,T2) #Solving value for T2 (\u00b0C)\n",
+ "T3 = x[0]; #Minimum temperature of heating water (\u00b0C)\n",
+ "DT1 = T3-t1 #Inlet temperature difference (\u00b0C)\n",
+ "DT2 = T1-t2 #Outlet temperature difference (\u00b0C)\n",
+ "DTlm = (DT1-DT2)/log(DT1/DT2) #Log mean temperature difference (\u00b0C)\n",
+ "Ud1 = 1/Uc+Rf #Dirty heat transfer coefficient (W/m^2.K) (part 3)\n",
+ "Ud2 = 34.6 #Dirty heat transfer coefficient (W/m^2.\u00b0C)\n",
+ "Q3 = Ud2*A*DTlm #Duty of exchanger (W) (part 4)\n",
+ "y = solve(Q1-Q3,A) #Heat transfer area (m^2)\n",
+ "A1 = y[0]; #Required heat transfer area (m^2)\n",
+ "L = A1/(pi*D) #Required heat transfer length (m)\n",
+ "Qmo = mo*co*(T1-t1) #Maximum duty of exchanger of oil (W) (part 5)\n",
+ "Qm = Qmw #Maximum duty of exchanger (W)\n",
+ "E = Q1/Qm*100 #Effectiveness (%)\n",
+ "NTU = Ud2*A1/(mw*cw) #Number of transfer units\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The lowest possible temperature of the water is :\",T2m,\" \u00b0C .\"\n",
+ "print \"2. The log mean temperature difference is :\",round(DTlm,2),\" \u00b0C .\"\n",
+ "print \"3. The overall heat transfer coefficient for the new clean exchanger is :\",round(Ud2,1),\" (W/m^2.\u00b0C .\"\n",
+ "print \"4. The length of the double pipe heat exchanger is :\",round(L,2),\" m .\"\n",
+ "print \"5. The effectiveness of the exchanger is :\",round(E,2),\" % .\"\n",
+ "print \" The NTU of the exchanger is :\",round(NTU,4),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The lowest possible temperature of the water is : 23.5 \u00b0C .\n",
+ "2. The log mean temperature difference is : 65.33 \u00b0C .\n",
+ "3. The overall heat transfer coefficient for the new clean exchanger is : 34.6 (W/m^2.\u00b0C .\n",
+ "4. The length of the double pipe heat exchanger is : 6.68 m .\n",
+ "5. The effectiveness of the exchanger is : 6.97 % .\n",
+ " The NTU of the exchanger is : 0.0741 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.10, Page number: 477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable declaration:\n",
+ "#From example 22.9:\n",
+ "t1 = 23.5 #Initial temperature of oil (\u00b0C)\n",
+ "t2 = 27 #Final temperature of oil (\u00b0C)\n",
+ "T1 = 93 #Water heating temperature of water (\u00b0C)\n",
+ "T2 = 88.16 #Minimum temperature of heating water (\u00b0C)\n",
+ "U = 34.6 #Overall heat transfer coefficient (W/m^2.\u00b0C)\n",
+ "Q = 7227.2 #Duty of exchanger (W)\n",
+ "D = 6*0.0254 #Inside diameter of pipe (m)\n",
+ "l = 6.68 #Previous heat transfer length (m)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T1-t1 #Inlet temperature difference (\u00b0C)\n",
+ "DT2 = T2-t2 #Outlet temperature difference (\u00b0C)\n",
+ "DTlm = (DT1-DT2)/log(DT1/DT2) #Log mean temperature difference (\u00b0C)\n",
+ "A = Q/(U*DTlm) #Required heat transfer area (m^2)\n",
+ "L = A/(pi*D) #Required heat transfer length (m)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The length of the parallel pipe heat exchanger is :\",round(L,2),\" m .\"\n",
+ "if L>l:\n",
+ " print \"The tube length would increase slightly.\"\n",
+ "elif L<l:\n",
+ " print \"The tube length would decrease slightly.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the parallel pipe heat exchanger is : 6.69 m .\n",
+ "The tube length would increase slightly.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.12, Page number: 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from scipy.optimize import fsolve\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "T = 80 #Pipe surface temperature (\u00b0F)\n",
+ "t1 = 10 #Inlet temperature of brine solution (\u00b0F)\n",
+ "m = 1200 #mass flowrate of solution (kg/s)\n",
+ "c = 0.99 #Heat capacity of brine solution (Btu/lb.\u00b0F)\n",
+ "A = 2.5 #Heat transfer area (ft^2)\n",
+ "U1 = 150 #Overall heat transfer coefficient at temperature approach (Btu/h.ft^2.\u00b0F)\n",
+ "U2 = 140 #Overall heat transfer coefficient at inlet brine temperature (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "DT1 = T-t1 #Temperature approach at the pipe entrance (\u00b0F)\n",
+ "\n",
+ "def equation(DT2):\n",
+ "\tQ1 = m*c*(DT1-DT2) #Energy balance to the brine solution across the full length of the pipe (Btu/h)\n",
+ "\tDTlm = (DT1-DT2)*log(DT2/DT1) #Log mean temperature difference (\u00b0F)\n",
+ "\tQ2 = A*(U2*DT1-U1*DT2)/log((U2*DT1)/(U1*DT2)) #Heat transfer rate (Btu/h)\n",
+ "\treturn Q2-Q1\t\n",
+ "t2 = round(T-fsolve(equation,1),1)\t #The temperature of the brine solution (\u00b0F)\n",
+ "\n",
+ "#Results:\n",
+ "print 'The temperature of brine solution is: ',(t2-32)/1.8,'\u00b0C'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature of brine solution is: -2.0 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.13, Page number: 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m = 1200 #mass flowrate of solution (kg/s)\n",
+ "c = 0.99 #Heat capacity of brine solution (Btu/lb.\u00b0F)\n",
+ "DT1 = 70 #Temperature approach at the pipe entrance (\u00b0F)\n",
+ "DT2 = 51.6 #Temperature difference at the pipe exit (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = m*c*(DT1-DT2) #Heat transfer rate (Btu/h)\n",
+ "DTlm = (DT1-DT2)/log(DT1/DT2) #Log mean temperature difference (\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The rate of heat transfer is :\",round(Q,-1),\" Btu/h.\"\n",
+ "print \"Or, the rate of heat transfer is :\",round(Q/3.412),\" W.\"\n",
+ "print \"2. The log mean temperature difference is :\",round(DTlm,1),\" \u00b0F.\"\n",
+ "print \"Or, the log mean temperature difference is :\",round(DTlm/1.8,1),\" \u00b0C.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The rate of heat transfer is : 21860.0 Btu/h.\n",
+ "Or, the rate of heat transfer is : 6407.0 W.\n",
+ "2. The log mean temperature difference is : 60.3 \u00b0F.\n",
+ "Or, the log mean temperature difference is : 33.5 \u00b0C.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.23, Page number: 484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Too = 100 #Steam temperature (\u00b0C)\n",
+ "Ti = 18 #Initial temperature of liquid TCA (\u00b0C)\n",
+ "Tf = 74 #Final temperature of liquid TCA (\u00b0C)\n",
+ "t = 180 #Heating time (s)\n",
+ "p = 87.4 #Density of TCA (lb/ft^3)\n",
+ "V = 18 #Kinematic viscosity of TCA (m^2/s)\n",
+ "cp = 0.23 #Heat capacity of TCA (Btu/lb.\u00b0F)\n",
+ "U = 200 #Overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "ui = Too-Ti #Initial excess temperature (\u00b0C)\n",
+ "uf = Too-Tf #Final excess temperature (\u00b0C)\n",
+ "R = log(ui/uf) #Ratio t/r\n",
+ "r = t/R #Thermal time constant (s)\n",
+ "A = p*V*cp/(3600*U*r) #Required heating area (ft^3)\n",
+ "Ti_F = Ti*9/5+32 #Initial temperature in fahrenheit scale (\u00b0F)\n",
+ "Tf_F = Tf*9/5+32 #Final temperature in fahrenheit scale (\u00b0F)\n",
+ "Q = p*V*cp*(Tf_F-Ti_F) #Total amount of heat added (Btu)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The required surface area of the heating coil is :\",(A,1),\" ft^3 .\"\n",
+ "print \"2. The total heat added to the liquid TCA is :\",round(Q),\" Btu .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The required surface area of the heating coil is : (3.2068907918330814e-06, 1) ft^3 .\n",
+ "2. The total heat added to the liquid TCA is : 36473.0 Btu .\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 22.24, Page number: 486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "m1 = 62000 #Mass flowrate of alcohol (lb/h)\n",
+ "h1 = 365 #Enthalpy of vapour (Btu/lb)\n",
+ "cp = 1 #Heat capacity of water (Btu/lb.\u00b0F)\n",
+ "T1 = 85 #Entering temperature of water (\u00b0F)\n",
+ "T2 = 120 #Exit temperature of water (\u00b0F)\n",
+ "a1 = 2.11 #Flow area for the shell side (ft^2)\n",
+ "N = 700 #Total number of tubes\n",
+ "a2 = 0.546 #Flow area per tube (in^2/tube)\n",
+ "n = 4 #Number of tube passes\n",
+ "p = 62.5 #Density of water (lb/ft^3)\n",
+ "L = 16 #Length of condenser (ft)\n",
+ "hio = 862.4 #Cooling water inside film coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "g = 9.8 #Gravitational accleration (m^2/s)\n",
+ "Rf = 0.003 #Fouling factor (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q1 = m1*h1 #Heat loss from alcohol (Btu/h)\n",
+ "Q2 = Q1 #Heat gained by water (Btu/h)\n",
+ "DT = T2-T1 #Temperature difference (\u00b0F)\n",
+ "m2 = Q2/(cp*DT) #Water mass flow rate (lb/h)\n",
+ "LMTD = ((T2-32)-(T1-32))/log((T2-32)/(T1-32)) #Log mean temperature difference (\u00b0F)\n",
+ "at = (N*a2)/(144*n) #Total flow area for tube side (ft^2)\n",
+ "G1 = m1/a1 #Mass velocity of flow in shell side (lb/h.ft^2)\n",
+ "G2 = m2/at #Mass velocity of flow in tube side (lb/h.ft^2)\n",
+ "V = G2/(3600*p) #Velocity of water (ft/s)\n",
+ "G3 = m1/(L*N)**(2/3) #Loading G (lb/h.ft)\n",
+ "#For alcohol:\n",
+ "kf = 0.105 #Thermal conductivity (Btu/h.ft.\u00b0F)\n",
+ "muf = 0.55*2.42 #Dynamic viscosity (lb/ft.h)\n",
+ "sf = 0.79 #\n",
+ "pf = sf*p #Density (lb/ft^3)\n",
+ "h = 151*(((kf**3)*(pf**2)*g*muf)/((muf**2)*n*G3))**(1/3) #Heat transfer coefficient for the shell side (Btu/h.ft^2.\u00b0F)\n",
+ "ho = h #Outside heat transfer coefficient of the tube bundle (Btu/h.ft^2.\u00b0F)\n",
+ "Uc = (hio*ho)/(hio+ho) #Overall heat transfer coefficient for a new (clean) heat exchanger (Btu/h.ft^2.\u00b0F)\n",
+ "A = N*L*0.2618 #Area for heat transfer (ft^2)\n",
+ "Ud = Q1/(A*DT) #Design (D) overall heat transfer coefficient (Btu/h.ft^2.\u00b0F)\n",
+ "Rd = (Uc-Ud)/(Uc*Ud) #Dirt (d) factor (Btu/h.ft^2.\u00b0F)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The dirt (d) factor is :\",round(Rd,4),\" Btu/h.ft^2.\u00b0F .\"\n",
+ "if (Rd>Rd):\n",
+ " print \"Therefore, the exchanger as specified is unsuitable for these process conditions since the fouling factor is above the recommended value. Cleaning is recommended.\"\n",
+ "else:\n",
+ " print \"Therefore, the exchanger as specified is suitable for these process conditions since the fouling factor is below the recommended value. Cleaning is not recommended.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dirt (d) factor is : -0.0157 Btu/h.ft^2.\u00b0F .\n",
+ "Therefore, the exchanger as specified is suitable for these process conditions since the fouling factor is below the recommended value. Cleaning is not recommended.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_23.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_23.ipynb
new file mode 100755
index 00000000..02544a8f
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_23.ipynb
@@ -0,0 +1,106 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ea99fc2be6052cbd9b5accb00ac50cd0a25a5282b964ce8d492c2c528e36d584"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 23: Environmental Management"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 23.6, Page number: 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Q = 20000 #Fuel input (Btu)\n",
+ "e = 1 #Energy produced (kW.h)\n",
+ "Btu = 3412 #Units Btu in 1 kW.h\n",
+ "\n",
+ "#Calulation:\n",
+ "ER = Q/Btu #Energy requirement in 1990 (kW.h)\n",
+ "E = e/ER*100 #Efficiency of energy conversion (%)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The efficiency of energy conversion is :\",round(E,1),\" % .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency of energy conversion is : 17.1 % .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 23.7, Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "ADL1 = 2 #Average daily load (MW)\n",
+ "R = 25/100 #Reduction in electrical load (%)\n",
+ "\n",
+ "#Calculation:\n",
+ "L = 1-R #New load fraction\n",
+ "ADL2 = ADL1*L #New average daily load (MW)\n",
+ "AR = ADL1-ADL2 #Average reduction in electrical load (MW)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The new Average daily load for the plant is :\",ADL2,\" MW.\"\n",
+ "print \"The average reduction in electrical load is :\",AR,\" MW.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new Average daily load for the plant is : 1.5 MW.\n",
+ "The average reduction in electrical load is : 0.5 MW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_24.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_24.ipynb
new file mode 100755
index 00000000..fb821b6b
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_24.ipynb
@@ -0,0 +1,387 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:20841f2d078ed8f6b672e93204c42bfe5b2cecc320cf09e962fc7cfcf63372c5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 24: Accident and Emergency Management"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.4, Page number: 514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "fm = 30/100 #Mole fraction of methane\n",
+ "fe = 50/100 #Mole fraction of ethane\n",
+ "fp = 20/100 #Mole fraction of pentane\n",
+ "LFLm = 0.046 #Lower flammability limit for methane\n",
+ "LFLe = 0.035 #Lower flammability limit for ethane\n",
+ "LFLp = 0.014 #Lower flammability limit for propane\n",
+ "UFLm = 0.142 #Upper flammability limit for methane\n",
+ "UFLe = 0.151 #Upper flammability limit for ethane\n",
+ "UFLp = 0.078 #Upper flammability limit for propane\n",
+ "\n",
+ "#Calculation:\n",
+ "LFLmix = 1/((fm/LFLm)+(fe/LFLe)+(fp/LFLp)) #Lower flammability limit of gas mixture\n",
+ "UFLmix = 1/((fm/UFLm)+(fe/UFLe)+(fp/UFLp)) #Upper flammability limit of gas mixture\n",
+ "\n",
+ "#Result:\n",
+ "print \"The upper flammability limit (UFL) of the gas mixture is :\",round(UFLmix*100,2),\" % .\"\n",
+ "print \"The lower flammability limit (LFL) of the gas mixture is :\",round(LFLmix*100,2),\" % .\"\n",
+ "print \"There is a printing mistake in book.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The upper flammability limit (UFL) of the gas mixture is : 12.52 % .\n",
+ "The lower flammability limit (LFL) of the gas mixture is : 2.85 % .\n",
+ "There is a printing mistake in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.5, Page number: 514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import nsimplify as changeToFraction\n",
+ "\n",
+ "#Variable declaration:\n",
+ "P_A = 10/100 #Probability that the first tube is defective if the first is replaced\n",
+ "P_B = 10/100 #Probability that the second tube is defective if the first is replaced\n",
+ "\n",
+ "#Calculation:\n",
+ "P_AB = P_A*P_B #Probability that the two tubes are defective if the first is replaced\n",
+ "P_B_A = 9/99 #Probability that the second tube is defective if the first tube is not replaced\n",
+ "Pd_AB = P_A*P_B_A #Probability that both tubes are defective if the first tube is not replaced\n",
+ "\n",
+ "#Result:\n",
+ "print \"The probability that both tubes are defective if :\"\n",
+ "print \"(a) the first is replaced before the second is drawn is :\",changeToFraction(P_AB),\" .\"\n",
+ "print \"(b) the first is not replaced before the second is drawn is :\",changeToFraction(Pd_AB),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The probability that both tubes are defective if :\n",
+ "(a) the first is replaced before the second is drawn is : 1/100 .\n",
+ "(b) the first is not replaced before the second is drawn is : 1/110 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.6, Page number: 515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from sympy import symbols, integrate, exp\n",
+ "\n",
+ "#Variable declaration:\n",
+ "X = symbols('X') #Range of X\n",
+ "Px = 1.7*(exp(-1.7*X)) #Probability distribution function\n",
+ "\n",
+ "#Calculation:\n",
+ "P = integrate(Px, (X,2,6)) #Probability that X will have a value between 2 and 6\n",
+ "\n",
+ "#Result:\n",
+ "print \"The probability that X will have a value between 2 and 6 is :\",round(P,4),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The probability that X will have a value between 2 and 6 is : 0.0333 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.7, Page number: 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import factorial\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "n = 20 #Total number of components\n",
+ "p = 0.1 #Probability of success\n",
+ "\n",
+ "#Calculations:\n",
+ "def binomial(n,p,x):\n",
+ " P=0\n",
+ " for x in range(0,x,1):\n",
+ " P = P + p**x*(1-p)**(n-x)*factorial(n)/(factorial(x)*factorial(n-x))\n",
+ " return P\n",
+ "\n",
+ "#Results:\n",
+ "print \"Probability that the sprinkler system fails :\",round((1-binomial(n,p,4))*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Probability that the sprinkler system fails : 13.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.8, Page number: 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from sympy import symbols, integrate, exp\n",
+ "\n",
+ "#Variable declaration:\n",
+ "a = 1.3*10**-3 #Constant a\n",
+ "B = 0.77 #Constant B\n",
+ "t = symbols('t') #Time (h)\n",
+ "Ft = a*B*t**(B-1)*(exp(-a*t**B)) #Pdf for heat exchanger tube\n",
+ "Pt = integrate(Ft, (t,0,1000)) #Probability that a heat exchanger will fail within 100 hours\n",
+ "\n",
+ "#Result:\n",
+ "print \"The probability that a tube in a heat exchanger will fail in 1000 hours is :\",round(Pt,2),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The probability that a tube in a heat exchanger will fail in 1000 hours is : 0.23 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.9, Page number: 519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from scipy.stats import norm as f\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m = 0.4008 #Mean(inch)\n",
+ "s = 0.0004 #Standard Deviation(inch)\n",
+ "UL = 0.4000+0.001 #Upper Limit\n",
+ "LL = 0.4000-0.001 #Upper Limit\n",
+ "\n",
+ "#Calculation:\n",
+ "Ps = f.cdf(UL,m,s)-f.cdf(LL,m,s)#Probability of meeting specs\n",
+ "Pd = 1-Ps #Probability of defect\n",
+ "\n",
+ "#Results:\n",
+ "print 'Probability of meeting specifications:',round(Ps*100,2),'%'\n",
+ "print 'Probability of Defect:',round(Pd*100,2),'%'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Probability of meeting specifications: 69.15 %\n",
+ "Probability of Defect: 30.85 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.10, Page number: 522"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from numpy import array,minimum\n",
+ "from math import sqrt\n",
+ "\n",
+ "#variable Declaration:\n",
+ "mTa = array([100]*10) #Mean weeks for thermometer failure(A)\n",
+ "mTb = array([90]*10) #Mean weeks for thermometer failure(B)\n",
+ "mTc = array([80]*10) #Mean weeks for thermometer failure(C)\n",
+ "sTa = 30 #Standard deviation (weeks) for thermometer failure(A)\n",
+ "sTb = 20 #Standard deviation (weeks) for thermometer failure(B)\n",
+ "sTc = 10 #Standard deviation (weeks) for thermometer failure(C)\n",
+ "Ra = array([0.52,0.80,0.45,0.68,0.59,0.01,0.50,0.29,0.34,0.46]) #Random No corrosponding to A\n",
+ "Rb = array([0.77,0.54,0.96,0.02,0.73,0.67,0.31,0.34,0.00,0.48]) #Random No corrosponding to B\n",
+ "Rc = array([0.14,0.39,0.06,0.86,0.87,0.90,0.28,0.51,0.56,0.82]) #Random No corrosponding to B\n",
+ "Za = array([0.05,0.84,-0.13,0.47,0.23,-2.33,0.00,-0.55,-0.41,-0.10]) #Normal variable corrosponding to random No for A\n",
+ "Zb = array([0.74,0.10,1.75,-2.05,0.61,0.44,-0.50,-0.41,-3.90,-0.05]) #Normal variable corrosponding to random No for B\n",
+ "Zc = array([-1.08,-0.28,-1.56,1.08,1.13,1.28,-0.58,0.03,0.15,0.92]) #Normal variable corrosponding to random No for C\n",
+ "\n",
+ "#Calculations:\n",
+ "Ta = mTa+sTa*Za\n",
+ "Tb = mTb+sTb*Zb\n",
+ "Tc = mTc+sTc*Zc\n",
+ "Ts = minimum(Ta,Tb)\n",
+ "Ts = minimum(Ts,Tc)\n",
+ "m = array([sum(Ts)/len(Ts)]*10)\n",
+ "s = sqrt(sum((Ts-m)**2)/(len(Ts)-1))\n",
+ "\n",
+ "#Results:\n",
+ "print 'Standard deviation :',round(s,1),\" Weeks\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Standard deviation : 25.9 Weeks\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 24.15, Page number: 531"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "t = 273 #Standard temperature (K)\n",
+ "v = 0.0224 #Volume of air occupied by 1 gmol of ideal gas (m^3)\n",
+ "V = 1100 #Volume of heat exchanger (m^3)\n",
+ "T = 22+273 #Temperature of heat exchanger (K)\n",
+ "x1 = 0.75 #gmols of hydrocarbon leaking from the exchanger (gmol)\n",
+ "\n",
+ "#Calculation:\n",
+ "n = V*(1/v)*(t/T) #Total number of gmols of air in the room (gmol)\n",
+ "xHC = (x1/(n+x1))*10**6 #The mole fraction of hydrocarbon in the room (ppm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The mole fraction of hydrocarbon in the room is :\",round(xHC*1000,-1),\" ppb .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The mole fraction of hydrocarbon in the room is : 16500.0 ppb .\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_26.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_26.ipynb
new file mode 100755
index 00000000..64b80ece
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_26.ipynb
@@ -0,0 +1,167 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4c0513ab1606f42cc2658f4efc57e03793ddba6911c2c7915b3159fc7138c6b8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 26: Numerical Methods"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 26.8, Page number: 558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import symbols,solve,log\n",
+ "from math import exp\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A,B,r,C = symbols('A B r C');\n",
+ "\n",
+ "#Calculation:\n",
+ "res = solve([A + B*log(2)-log(3),A + B*log(4)-log(12)],[A,B])\n",
+ "A = round(float(res[A]),4)\n",
+ "B = round(float(res[B]))\n",
+ "kA = round(exp(A),2)\n",
+ "a = B\n",
+ "\n",
+ "#Result:\n",
+ "print 'The equation for rate of reaction is: ',-r,'=',kA*C**a "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equation for rate of reaction is: -r = 0.75*C**2.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 26.9, Page number: 559"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.stats as f\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "T = [-40,-20,0,10,12,30,40,50,60,80,100,150,200,250,300,400,500]\n",
+ "u = [1.51,1.61,1.71,1.76,1.81,1.86,1.90,1.95,2.00,2.09,2.17,2.38,2.57,2.75,2.93,3.25,3.55]\n",
+ "\n",
+ "#Calculations:\n",
+ "B,A,r_value, p_value, std_err = f.linregress(T,u)\n",
+ "\n",
+ "#Results:\n",
+ "print 'The value of A in regression model is:',round(A,4)\n",
+ "print 'The value of B in regression model is:',round(B,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of A in regression model is: 1.7484\n",
+ "The value of B in regression model is: 0.0038\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 26.11, Page number: 561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from scipy.optimize import fmin_cobyla as optimize\n",
+ "\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "def f(x):\t\n",
+ " return -2.0*x[0] - 1.6*x[1]\n",
+ "\n",
+ "def c1(x):\n",
+ " return 16820 - x[0]\n",
+ "\n",
+ "def c2(x):\n",
+ " return 1152 - x[1]\n",
+ "\n",
+ "def c3(x):\n",
+ " return 1500 - 0.08*x[0] - 0.11*x[1]\n",
+ "\n",
+ "def c4(x):\n",
+ " return 6000 - 0.29*x[0] - 0.54*x[1]\n",
+ "\n",
+ "def c5(x):\n",
+ " return 11000 - 0.63*x[0] - 0.35*x[1]\n",
+ "\n",
+ "def c6(x):\n",
+ " return x[0]\n",
+ "\n",
+ "def c7(x):\n",
+ " return x[1]\n",
+ "\n",
+ "#Calculation\n",
+ "X = optimize(f,[16820,1152],[c1,c2,c3,c4,c5,c6], disp = 0)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Maximum Profit is $\",round(-f(X)), \"/day or $\", -365*f(X), \"/year\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum Profit is $ 35483.0 /day or $ 12951368.0 /year\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_27.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_27.ipynb
new file mode 100755
index 00000000..c5e5dea1
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_27.ipynb
@@ -0,0 +1,544 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9cb92879a3edfd07367a11876840b47bf3060ee079039238aa0305841473df9a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 27: Economics and Finance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.5, Page number: 575"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration:\n",
+ "i = 0.03375 #Rate of interest (%)\n",
+ "n = 9 #Years to the end of life (yr)\n",
+ "P = 60000 #Cost of exchanger ($)\n",
+ "L = 500 #Salvage value ($)\n",
+ "x = 5 #Time after 5 years (yr)\n",
+ "\n",
+ "#Calculation:\n",
+ "SFDF = i/((1+i)**n-1) #Sinking fund depreciation factor\n",
+ "UAP = (P-L)*SFDF #Uniform annual payment ($)\n",
+ "B = P-((P-L)/n)*x #Appraisal value after 5 years ($)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The uniform annual payment made into the fund at the of the year is : $\",round(UAP),\" .\"\n",
+ "print \"2. The appraisal value of the exchanger at the end of the fifth year is : $\",round(B),\" .\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The uniform annual payment made into the fund at the of the year is : $ 5768.0 .\n",
+ "2. The appraisal value of the exchanger at the end of the fifth year is : $ 26945.0 .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.6, Page number: 576"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "C = 150000 #Capital cost ($)\n",
+ "i = 7/100 #Interest rate\n",
+ "n = 5 #Time (yr)\n",
+ "OC = 15000 #Operating cost ($)\n",
+ "A = 75000 #Annual cost for the old process ($)\n",
+ "\n",
+ "#Calculation:\n",
+ "CRF = (i*(1+i)**n)/((1+i)**n-1) #Capital recovery factor\n",
+ "IC = CRF*C #Initial cost ($)\n",
+ "AC = IC+OC #Total annualized cost ($)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The annualized cost for the new heating system is : $\",round(AC),\" .\"\n",
+ "if (AC<A):\n",
+ " print \"Since this cost is lower than the annual cost of $75,000 for the old process, the proposed plan should be implemented.\"\n",
+ "else :\n",
+ " print \"Since this cost is higher than the annual cost of $75,000 for the old process, the proposed plan should not be implemented.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annualized cost for the new heating system is : $ 51584.0 .\n",
+ "Since this cost is lower than the annual cost of $75,000 for the old process, the proposed plan should be implemented.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.7, Page number: 577"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration:\n",
+ "i = 12/100 #Intersest rate\n",
+ "n = 12 #Lifetime period (yr)\n",
+ "CC = 2625000 #Capital cost ($)\n",
+ "IC = 1575000 #Installation cost ($)\n",
+ "#From table 27.3:\n",
+ "Ic1 = 2000000 #Income credit for double pipe ($/yr)\n",
+ "Ic2 = 2500000 #Income credit for Shell-and-tube ($/yr)\n",
+ "AC1 = 1728000 #Total annual cost for double pipe ($/yr)\n",
+ "AC2 = 2080000 #Total annual cost for Shell-and-tube ($/yr)\n",
+ "\n",
+ "#Calculation:\n",
+ "CRF = i/(1-(1+i)**-n) #Capital recovery factor\n",
+ "DPc = (CC+IC)*CRF #Annual capital and installation costs for the DP unit ($/yr)\n",
+ "STc = (CC+IC)*CRF #Annual capital and installation costs for the ST unit ($/yr)\n",
+ "DPp = Ic1-AC1 #Profit for the DP unit ($/yr)\n",
+ "STp = Ic2-AC2 #Profit for the ST unit ($/yr)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The profit for the shell-and-tube unit is : $\",round(DPp),\"/yr .\"\n",
+ "print \"The profit for the double pipe unit is : $\",round(STp),\"/yr .\"\n",
+ "if (STp>DPp):\n",
+ " print \"A shell-and-tube heat exchanger should therefore be selected based on the above economic analysis.\"\n",
+ "else :\n",
+ " print \"A double pipe heat exchanger should therefore be selected based on the above economic analysis.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The profit for the shell-and-tube unit is : $ 272000.0 /yr .\n",
+ "The profit for the double pipe unit is : $ 420000.0 /yr .\n",
+ "A shell-and-tube heat exchanger should therefore be selected based on the above economic analysis.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.8, Page number: 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration:\n",
+ "m = 50000 #Mass flowrate of the organic fluid (lb/h)\n",
+ "cP = 0.6 #The heat capacity of the organic liquid (Btu/lb.\u00b0F)\n",
+ "T1 = 150 #Initial temperature of organic fluid (\u00b0F)\n",
+ "T2 = 330 #Final temperature of organic fluid (\u00b0F)\n",
+ "Ts1 = 358 #Saturation temperature for 150 psia (\u00b0F)\n",
+ "Ts2 = 417 #Saturation temperature for 300 psia (\u00b0F)\n",
+ "L1 = 863.6 #Latent heat for 150 psia (Btu/lb)\n",
+ "L2 = 809 #Latent heat for 300 psia (Btu/lb)\n",
+ "c1 = 5.20/1000 #Cost for 150 psia ($/lb)\n",
+ "c2 = 5.75/1000 #Cost for 300 psia ($/lb)\n",
+ "CI1 = 230 #Cost index in 1998 \n",
+ "CI2 = 360 #Cost index in 2011\n",
+ "IF = 3.29 #Installation factor\n",
+ "PF1 = 1.15 #Pressure factors for 100 to 200 psig\n",
+ "PF2 = 1.20 #Pressure factors for 200 to 300 psig\n",
+ "OP = 90/100 #Plant on-stream operation factor\n",
+ "h = 365*24 #Hours in a year (h)\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = m*cP*(T2-T1) #Overall heta duty (Btu/h)\n",
+ "DT1 = Ts1-T1 #Temperature driving force 1 for 150 psia (\u00b0F)\n",
+ "DT2 = Ts1-T2 #Temperature driving force 2 for 150 psia (\u00b0F)\n",
+ "LMTD1 = (DT1-DT2)/log(DT1/DT2) #Log-mean temperature difference for 150 psia (\u00b0F)\n",
+ "DT3 = Ts2-T1 #Temperature driving force 1 for 300 psia (\u00b0F)\n",
+ "DT4 = Ts2-T2 #Temperature driving force 2 for 300 psia (\u00b0F)\n",
+ "LMTD2 = (DT3-DT4)/log(DT3/DT4) #Log-mean temperature difference for 1300 psia (\u00b0F)\n",
+ "A1 = Q/(138*LMTD1) #Required heat transfer area for 150 psia (ft^2)\n",
+ "A2 = Q/(138*LMTD2) #Required heat transfer area for 300 psia (ft^2)\n",
+ "BC1 = 117*A1**0.65 #Base cost for 150 psia ($)\n",
+ "BC2 = 117*A2**0.65 #Base cost for 13000 psia ($)\n",
+ "C1 = BC1*(CI2/CI1)*IF*PF1 #Capital cost for 150 psia ($)\n",
+ "C2 = BC2*(CI2/CI1)*IF*PF2 #Capital cost for 300 psia ($)\n",
+ "S1 = Q*(h*OP)/L1 #Steam requirement for 150 psia (lb/yr)\n",
+ "S2 = Q*(h*OP)/L2 #Steam requirement for 300 psia (lb/yr)\n",
+ "SC1 = S1*c1 #Annual steam cost for 150 psia ($/yr)\n",
+ "SC2 = S2*c2 #Annual steam cost for 300 psia ($/yr)\n",
+ "\n",
+ "#Result:\n",
+ "print \"1. The capital cost for 150 psia is : $\",round(C1,-3),\" .\"\n",
+ "print \" The capital cost for 300 psia is : $\",round(C2,-3),\" .\"\n",
+ "print \"2. The annual steam cost for 150 psia is : $\",round(SC1,-3),\"/yr .\"\n",
+ "print \" The annual steam cost for 300 psia is : $\",round(SC2,-3),\"/yr .\"\n",
+ "if (C1<C2 and SC1>SC2):\n",
+ " print \"The 300-psia exchanger costs less to purchase and install, but it costs more to operate. Choosing the more expensive, 150-psia exchanger is the obvious choice.\"\n",
+ "elif (C1>C2 and SC1<SC2):\n",
+ " print \"The 150-psia exchanger costs less to purchase and install, but it costs more to operate. Choosing the more expensive, 300-psia exchanger is the obvious choice.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. The capital cost for 150 psia is : $ 36000.0 .\n",
+ " The capital cost for 300 psia is : $ 26000.0 .\n",
+ "2. The annual steam cost for 150 psia is : $ 256000.0 /yr .\n",
+ " The annual steam cost for 300 psia is : $ 303000.0 /yr .\n",
+ "The 150-psia exchanger costs less to purchase and install, but it costs more to operate. Choosing the more expensive, 300-psia exchanger is the obvious choice.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.9, Page number: 581"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import symbols,solve\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TCC_TB = 2500000 #Total capital cost ($)\n",
+ "R_TB = 3600000 #R_TBevenue generated from the facility ($)\n",
+ "AOC_TB = 1200000 #Annual operating costs ($)\n",
+ "TCC_FB = 3500000 #Total capital cost ($)\n",
+ "R_FB = 5300000 #R_TBevenue generated from the facility ($)\n",
+ "AOC_FB = 1400000 #Annual operating costs ($)\n",
+ "n = 10 \t#Time of facility (yr)\n",
+ "\n",
+ "#Calculation:\n",
+ "D = 0.1*TCC_TB #Depriciation ($)\n",
+ "WC = 0.1*TCC_TB #Working capital ($)\n",
+ "TI = R_TB-AOC_TB-D #Taxable income ($)\n",
+ "IT = 0.5*TI #Income tax to be paid ($)\n",
+ "A = R_TB-AOC_TB-IT #After-tax cash flow ($)\n",
+ "def eqTB(i):\n",
+ "\tx = (((1+i)**n-1)/(i*(1+i)**n))*A + (1/(1+i)**n)*WC #Equation for computing rate of return for TB unit\n",
+ "\ty = WC + 0.5*TCC_TB + 0.5*TCC_TB*(1+i)**1 #Equation for computing rate of return for TB unit\n",
+ "\treturn x-y\n",
+ "iTB = round(fsolve(eqTB,0.8)*100,1) #Rate of return for TB unit (%)\n",
+ "\n",
+ "D = 0.1*TCC_FB #Depriciation ($)\n",
+ "WC = 0.1*TCC_FB #Working capital ($)\n",
+ "TI = R_FB-AOC_FB-D #Taxable income ($)\n",
+ "IT = 0.5*TI #Income tax to be paid ($)\n",
+ "A = R_FB-AOC_FB-IT #After-tax cash flow ($)\n",
+ "\n",
+ "def eqFB(i):\n",
+ "\tx = (((1+i)**n-1)/(i*(1+i)**n))*A + (1/(1+i)**n)*WC #Equation for computing rate of return for FB unit\n",
+ "\ty = WC + 0.5*TCC_FB + 0.5*TCC_FB*(1+i)**1 #Equation for computing rate of return for FB unit\n",
+ "\treturn x-y\n",
+ "iFB = round(fsolve(eqFB,0.8)*100,1) #Rate of return for FB unit (%)\n",
+ "\n",
+ "#Results:\n",
+ "print \"The rate of return for TB unit is:\",round(iTB),\" %.\"\n",
+ "print \"The rate of return for FB unit is:\",round(iFB,1),\" %.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of return for TB unit is: 40.0 %.\n",
+ "The rate of return for FB unit is: 44.8 %.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.10, Page number: 582"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "f = 100000 #Flow rate of flue gas (acfm)\n",
+ "i = 0.1 #Interest rate\n",
+ "#From table 27.4:\n",
+ "#For finned preheater:\n",
+ "ac1 = 3.1 #Equipment cost ($/acfm)\n",
+ "ac2 = 0.8 #Installation cost ($/acfm)\n",
+ "ac3 = 0.06 #Operating cost ($/acfm-yr)\n",
+ "ac4 = 14000 #Maintenance cost ($/yr)\n",
+ "an = 20 #Lifetime (yr)\n",
+ "#For 4-pass preheater:\n",
+ "bc1 = 1.9 #Equipment cost ($/acfm)\n",
+ "bc2 = 1.4 #Installation cost ($/acfm)\n",
+ "bc3 = 0.06 #Operating cost for ($/acfm-yr)\n",
+ "bc4 = 28000 #Maintenance cost ($/yr)\n",
+ "bn = 15 #Lifetime of (yr)\n",
+ "#For 2-pass preheater:\n",
+ "cc1 = 2.5 #Equipment cost ($/acfm)\n",
+ "cc2 = 1.0 #Installation cost ($/acfm)\n",
+ "cc3 = 0.095 #Operating cost for ($/acfm-yr)\n",
+ "cc4 = 9500 #Maintenance cost for ($/yr)\n",
+ "cn = 20 #Lifetime of (yr)\n",
+ "\n",
+ "#Calculation:\n",
+ "#For Finned preheater:\n",
+ "aEC = f*ac1 #Total equipment cost ($)\n",
+ "aIC = f*ac2 #Total installation cost ($)\n",
+ "aOC = f*ac3 #Total operating cost ($)\n",
+ "aMC = f*ac4 #Total maintenance cost ($)\n",
+ "aCRF = (i*(1+i)**an)/((1+i)**an-1) #Capital recovery factor\n",
+ "aAEC = aEC*aCRF #Equipment annual cost ($/yr)\n",
+ "aAIC = aIC*aCRF #Installation annual cost($/yr)\n",
+ "aAOC = ac3*f #Annual operating cost ($)\n",
+ "aAMC = ac4 #Annual maintenance cost ($)\n",
+ "aTAC = aAEC+aAIC+aAOC+aAMC #Total annual cost ($)\n",
+ "\n",
+ "#For 4-pass preheater:\n",
+ "bEC = f*bc1 #Total equipment cost ($)\n",
+ "bIC = f*bc2 #Total installation cost ($)\n",
+ "bOC = f*bc3 #Total operating cost ($)\n",
+ "bMC = f*bc4 #Total maintenance cost ($)\n",
+ "bCRF = (i*(1+i)**bn)/((1+i)**bn-1) #Capital recovery factor\n",
+ "bAEC = bEC*bCRF #Equipment annual cost ($/yr)\n",
+ "bAIC = bIC*bCRF #Installation annual cost($/yr)\n",
+ "bAOC = bc3*f #Annual operating cost ($)\n",
+ "bAMC = bc4 #Annual maintenance cost ($)\n",
+ "bTAC = bAEC+bAIC+bAOC+bAMC #Total annual cost ($)\n",
+ "#For 2-pass preheater:\n",
+ "cEC = f*cc1 #Total equipment cost ($)\n",
+ "cIC = f*cc2 #Total installation cost ($)\n",
+ "cOC = f*cc3 #Total operating cost ($)\n",
+ "cMC = f*cc4 #Total maintenance cost ($)\n",
+ "cCRF = (i*(1+i)**cn)/((1+i)**cn-1) #Capital recovery factor\n",
+ "cAEC = cEC*cCRF #Equipment annual cost ($/yr)\n",
+ "cAIC = cIC*cCRF #Installation annual cost($/yr)\n",
+ "cAOC = cc3*f #Annual operating cost ($)\n",
+ "cAMC = cc4 #Annual maintenance cost ($)\n",
+ "cTAC = cAEC+cAIC+cAOC+cAMC #Total annual cost ($)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Total annual cost for finned preheater is : $\",round(aTAC),\" .\"\n",
+ "print \"Total annual cost for 4-pass preheater is : $\",round(bTAC),\" .\"\n",
+ "print \"Total annual cost for 2-pass preheater is : $\",round(cTAC),\" .\"\n",
+ "if (cTAC<aTAC and cTAC<bTAC):\n",
+ " print \"According to the analysis, the 2-pass exchanger is the most economically attractive device since the annual cost is the lowest.\"\n",
+ "elif (bTAC<aTAC and bTAC<cTAC):\n",
+ " print \"According to the analysis, the 4-pass exchanger is the most economically attractive device since the annual cost is the lowest.\"\n",
+ "elif (aTAC<cTAC and aTAC<bTAC):\n",
+ " print \"According to the analysis, the finned exchanger is the most economically attractive device since the annual cost is the lowest.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total annual cost for finned preheater is : $ 65809.0 .\n",
+ "Total annual cost for 4-pass preheater is : $ 77386.0 .\n",
+ "Total annual cost for 2-pass preheater is : $ 60111.0 .\n",
+ "According to the analysis, the 2-pass exchanger is the most economically attractive device since the annual cost is the lowest.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.12, Page number: 584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from numpy import roots\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration:\n",
+ "TH = 500 #Hot stream temperature at exchanger 1 (\u00b0F)\n",
+ "tc = 100 #Cold stream temperature at exchanger 2 (\u00b0F)\n",
+ "A = 10 #Constant A\n",
+ "B1 = 100000 #Constant B1\n",
+ "B2 = 4000 #Constant B2\n",
+ "B3 = 400000 #Constant B3\n",
+ "\n",
+ "#Calculations:\n",
+ "#It forms equation fo form t^2 - t(Th-tc) +tcTH +B/A\n",
+ "t1 = roots([1, -(TH+tc),(tc*TH + B1/A) ]); #Roots\n",
+ "tmax1 = TH - sqrt(B1/A) #Upon maximising profit\n",
+ "t2 = roots([1, -(TH+tc),(tc*TH + B2/A) ]); #Roots\n",
+ "tmax2 = TH - sqrt(B2/A) #Upon maximising profit\n",
+ "t3 = roots([1, -(TH+tc),(tc*TH + B3/A) ]); #Roots\n",
+ "tmax3 = TH - sqrt(B3/A) #Upon maximising profit\n",
+ "\n",
+ "#Results:\n",
+ "print 'tBE for case 1: ',round(t1[0]),'\u00b0F',round(t1[1]),'\u00b0F'\n",
+ "print 'tmax1:', round(tmax1),'\u00b0F'\n",
+ "print 'tBE for case 2: ',round(t2[0]),'\u00b0F',round(t2[1]),'\u00b0F'\n",
+ "print 'tmax1:', round(tmax2),'\u00b0F'\n",
+ "print 'tBE for case 1: ',round(t3[0]),'\u00b0F',round(t3[1]),'\u00b0F'\n",
+ "print 'tmax1:', round(tmax3),'\u00b0F'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tBE for case 1: 473.0 \u00b0F 127.0 \u00b0F\n",
+ "tmax1: 400.0 \u00b0F\n",
+ "tBE for case 2: 499.0 \u00b0F 101.0 \u00b0F\n",
+ "tmax1: 480.0 \u00b0F\n",
+ "tBE for case 1: 300.0 \u00b0F 300.0 \u00b0F\n",
+ "tmax1: 300.0 \u00b0F\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 27.15, Page number: 588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from scipy.optimize import fmin_cobyla as optimize\n",
+ "\n",
+ "#Key:\n",
+ "#f(x) : Objective Function\n",
+ "#ci(x)'s : Constraints\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "def f(x):\t\n",
+ " return -1.70*x[0] - 2*x[1]\n",
+ "\n",
+ "def c1(x):\n",
+ " return 8000 - x[0]\n",
+ "\n",
+ "def c2(x):\n",
+ " return 6000 - x[1]\n",
+ "\n",
+ "def c3(x):\n",
+ " return 12000 - 0.75*x[0] - 0.40*x[1]\n",
+ "\n",
+ "def c4(x):\n",
+ " return 6000 - 0.60*x[0] - 0.25*x[1]\n",
+ "\n",
+ "def c5(x):\n",
+ " return x[0]\n",
+ "\n",
+ "def c6(x):\n",
+ " return x[1]\n",
+ "\n",
+ "#Calculation\n",
+ "X = optimize(f,[7000,6000],[c1,c2,c3,c4,c5,c6], disp = 0)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Maximum Profit is $\",-f(X), \"/day or $\", -365*f(X), \"/year\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum Profit is $ 24750.0 /day or $ 9033750.0 /year\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_28.ipynb b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_28.ipynb
new file mode 100755
index 00000000..9031d510
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/Chapter_28.ipynb
@@ -0,0 +1,108 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:14824d48a431915b3dac3068270b7ce0d86b9e98bf4622dc413ebf717903e290"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 28: Open-Ended Problems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "ILLUSTRATIVE EXAMPLE 28.11, Page number: 600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "hm1 = 50000 #Mass flowrate (lb/h)\n",
+ "hcP1 = 0.65 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "hTi1 = 70 #Inlet temperature (\u00b0F)\n",
+ "hTo1 = 300 #Outlet temperature (\u00b0F)\n",
+ "#For stream 2 to be heated:\n",
+ "hm2 = 60000 #Mass flowrate (lb/h)\n",
+ "hcP2 = 0.58 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "hTi2 = 120 #Inlet temperature (\u00b0F)\n",
+ "hTo2 = 310 #Outlet temperature (\u00b0F)\n",
+ "#For stream 3 to be heated:\n",
+ "hm3 = 80000 #Mass flowrate (lb/h)\n",
+ "hcP3 = 0.78 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "hTi3 = 90 #Inlet temperature (\u00b0F)\n",
+ "hTo3 = 250 #Outlet temperature (\u00b0F)\n",
+ "#From table 28.4:\n",
+ "#For stream 1 to be cooled:\n",
+ "cm1 = 60000 #Mass flowrate (lb/h)\n",
+ "ccP1 = 0.70 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "cTi1 = 420 #Inlet temperature (\u00b0F)\n",
+ "cTo1 = 120 #Outlet temperature (\u00b0F)\n",
+ "#For stream 2 to be cooled:\n",
+ "cm2 = 40000 #Mass flowrate (lb/h)\n",
+ "ccP2 = 0.52 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "cTi2 = 300 #Inlet temperature (\u00b0F)\n",
+ "cTo2 = 100 #Outlet temperature (\u00b0F)\n",
+ "#For stream 3 to be cooled:\n",
+ "cm3 = 35000 #Mass flowrate (lb/h)\n",
+ "ccP3 = 0.60 #Heat capacity (Btu/lb.\u00b0F)\n",
+ "cTi3 = 240 #Inlet temperature (\u00b0F)\n",
+ "cTo3 = 90 #Outlet temperature (\u00b0F)\n",
+ "\n",
+ "#Calculation:\n",
+ "H1 = hm1*hcP1*(hTo1-hTi1) #Heating duty for stream 1 (Btu/h)\n",
+ "H2 = hm2*hcP2*(hTo2-hTi2) #Heating duty for stream 2 (Btu/h)\n",
+ "H3 = hm3*hcP3*(hTo3-hTi3) #Heating duty for stream 1 (Btu/h)\n",
+ "H = H1+H2+H3 #Total heating duty (Btu/h)\n",
+ "C1 = cm1*ccP1*(cTi1-cTo1) #Cooling duty for stream 1 (Btu/h)\n",
+ "C2 = cm2*ccP2*(cTi2-cTo2) #Cooling duty for stream 2 (Btu/h)\n",
+ "C3 = cm3*ccP3*(cTi3-cTo3) #Cooling duty for stream 1 (Btu/h)\n",
+ "C = C1+C2+C3 #Total Cooling duty (Btu/h)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Table: Duty Requirements.\"\n",
+ "print \"Stream Duty, Btu/h\"\n",
+ "print \"1 \",round(H1)\n",
+ "print \"2 \",round(H2)\n",
+ "print \"3 \",round(H3)\n",
+ "print \"4 \",round(C1)\n",
+ "print \"5 \",round(C2)\n",
+ "print \"6 \",round(C3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Table: Duty Requirements.\n",
+ "Stream Duty, Btu/h\n",
+ "1 7475000.0\n",
+ "2 6612000.0\n",
+ "3 9984000.0\n",
+ "4 12600000.0\n",
+ "5 4160000.0\n",
+ "6 3150000.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/README.txt b/Heat_Transfer_Applications_for_the_Practicing_Engineer/README.txt
new file mode 100755
index 00000000..7cc312e6
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Amitesh Kumar
+Course: btech
+College/Institute/Organization: Manav Rachna International University
+Department/Designation: Electrical & Electronic Engg.
+Book Title: Heat Transfer Applications for the Practicing Engineer
+Author: Louis Theodore
+Publisher: John Wiley & Sons Inc. Publication
+Year of publication: 2011
+Isbn: 9780470643723
+Edition: 1st \ No newline at end of file
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/economics.png b/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/economics.png
new file mode 100755
index 00000000..e58b6698
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/economics.png
Binary files differ
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/forced_convention.png b/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/forced_convention.png
new file mode 100755
index 00000000..44694e5e
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/forced_convention.png
Binary files differ
diff --git a/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/shell_heat.png b/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/shell_heat.png
new file mode 100755
index 00000000..427304c9
--- /dev/null
+++ b/Heat_Transfer_Applications_for_the_Practicing_Engineer/screenshots/shell_heat.png
Binary files differ
diff --git a/Hydraulics/Chapter_1.ipynb b/Hydraulics/Chapter_1.ipynb
index 0bf18fae..0bf18fae 100644..100755
--- a/Hydraulics/Chapter_1.ipynb
+++ b/Hydraulics/Chapter_1.ipynb
diff --git a/Hydraulics/Chapter_2.ipynb b/Hydraulics/Chapter_2.ipynb
index 8353a544..8353a544 100644..100755
--- a/Hydraulics/Chapter_2.ipynb
+++ b/Hydraulics/Chapter_2.ipynb
diff --git a/Hydraulics/Chapter_3.ipynb b/Hydraulics/Chapter_3.ipynb
index 6b36939a..6b36939a 100644..100755
--- a/Hydraulics/Chapter_3.ipynb
+++ b/Hydraulics/Chapter_3.ipynb
diff --git a/Hydraulics/Chapter_4.ipynb b/Hydraulics/Chapter_4.ipynb
index 60ede3c8..60ede3c8 100644..100755
--- a/Hydraulics/Chapter_4.ipynb
+++ b/Hydraulics/Chapter_4.ipynb
diff --git a/Hydraulics/Chapter_5.ipynb b/Hydraulics/Chapter_5.ipynb
index a400585d..a400585d 100644..100755
--- a/Hydraulics/Chapter_5.ipynb
+++ b/Hydraulics/Chapter_5.ipynb
diff --git a/Hydraulics/Chapter_6.ipynb b/Hydraulics/Chapter_6.ipynb
index 2ab32b0e..2ab32b0e 100644..100755
--- a/Hydraulics/Chapter_6.ipynb
+++ b/Hydraulics/Chapter_6.ipynb
diff --git a/Hydraulics/README.txt b/Hydraulics/README.txt
index 0c52211b..0c52211b 100644..100755
--- a/Hydraulics/README.txt
+++ b/Hydraulics/README.txt
diff --git a/Hydraulics/screenshots/pic11.png b/Hydraulics/screenshots/pic11.png
index 234881bb..234881bb 100644..100755
--- a/Hydraulics/screenshots/pic11.png
+++ b/Hydraulics/screenshots/pic11.png
Binary files differ
diff --git a/Hydraulics/screenshots/pic22.png b/Hydraulics/screenshots/pic22.png
index 0107e587..0107e587 100644..100755
--- a/Hydraulics/screenshots/pic22.png
+++ b/Hydraulics/screenshots/pic22.png
Binary files differ
diff --git a/Hydraulics/screenshots/pic33.png b/Hydraulics/screenshots/pic33.png
index fe6ba2b2..fe6ba2b2 100644..100755
--- a/Hydraulics/screenshots/pic33.png
+++ b/Hydraulics/screenshots/pic33.png
Binary files differ
diff --git a/Industrial_Instrumentation/Chapter_1.ipynb b/Industrial_Instrumentation/Chapter_1.ipynb
index d0854801..d0854801 100644..100755
--- a/Industrial_Instrumentation/Chapter_1.ipynb
+++ b/Industrial_Instrumentation/Chapter_1.ipynb
diff --git a/Industrial_Instrumentation/Chapter_2.ipynb b/Industrial_Instrumentation/Chapter_2.ipynb
index 58fb16b3..58fb16b3 100644..100755
--- a/Industrial_Instrumentation/Chapter_2.ipynb
+++ b/Industrial_Instrumentation/Chapter_2.ipynb
diff --git a/Industrial_Instrumentation/Chapter_3.ipynb b/Industrial_Instrumentation/Chapter_3.ipynb
index b7ff3a1a..b7ff3a1a 100644..100755
--- a/Industrial_Instrumentation/Chapter_3.ipynb
+++ b/Industrial_Instrumentation/Chapter_3.ipynb
diff --git a/Industrial_Instrumentation/Chapter_4.ipynb b/Industrial_Instrumentation/Chapter_4.ipynb
index 3b3b8ccb..3b3b8ccb 100644..100755
--- a/Industrial_Instrumentation/Chapter_4.ipynb
+++ b/Industrial_Instrumentation/Chapter_4.ipynb
diff --git a/Industrial_Instrumentation/Chapter_5.ipynb b/Industrial_Instrumentation/Chapter_5.ipynb
index e24a4f35..e24a4f35 100644..100755
--- a/Industrial_Instrumentation/Chapter_5.ipynb
+++ b/Industrial_Instrumentation/Chapter_5.ipynb
diff --git a/Industrial_Instrumentation/Chapter_6.ipynb b/Industrial_Instrumentation/Chapter_6.ipynb
index bdc5920d..bdc5920d 100644..100755
--- a/Industrial_Instrumentation/Chapter_6.ipynb
+++ b/Industrial_Instrumentation/Chapter_6.ipynb
diff --git a/Industrial_Instrumentation/Chapter_7.ipynb b/Industrial_Instrumentation/Chapter_7.ipynb
index 4a5cfd38..4a5cfd38 100644..100755
--- a/Industrial_Instrumentation/Chapter_7.ipynb
+++ b/Industrial_Instrumentation/Chapter_7.ipynb
diff --git a/Industrial_Instrumentation/Chapter_8.ipynb b/Industrial_Instrumentation/Chapter_8.ipynb
index 45717557..45717557 100644..100755
--- a/Industrial_Instrumentation/Chapter_8.ipynb
+++ b/Industrial_Instrumentation/Chapter_8.ipynb
diff --git a/Industrial_Instrumentation/README.txt b/Industrial_Instrumentation/README.txt
index 2f922759..2f922759 100644..100755
--- a/Industrial_Instrumentation/README.txt
+++ b/Industrial_Instrumentation/README.txt
diff --git a/Industrial_Instrumentation/ch2.ipynb b/Industrial_Instrumentation/ch2.ipynb
index 0f54145a..0f54145a 100644..100755
--- a/Industrial_Instrumentation/ch2.ipynb
+++ b/Industrial_Instrumentation/ch2.ipynb
diff --git a/Industrial_Instrumentation/ch3.ipynb b/Industrial_Instrumentation/ch3.ipynb
index e1873694..e1873694 100644..100755
--- a/Industrial_Instrumentation/ch3.ipynb
+++ b/Industrial_Instrumentation/ch3.ipynb
diff --git a/Industrial_Instrumentation/ch4.ipynb b/Industrial_Instrumentation/ch4.ipynb
index 7eb1e631..7eb1e631 100644..100755
--- a/Industrial_Instrumentation/ch4.ipynb
+++ b/Industrial_Instrumentation/ch4.ipynb
diff --git a/Industrial_Instrumentation/ch5.ipynb b/Industrial_Instrumentation/ch5.ipynb
index 66f7a8b4..66f7a8b4 100644..100755
--- a/Industrial_Instrumentation/ch5.ipynb
+++ b/Industrial_Instrumentation/ch5.ipynb
diff --git a/Industrial_Instrumentation/ch6.ipynb b/Industrial_Instrumentation/ch6.ipynb
index 2fc63442..2fc63442 100644..100755
--- a/Industrial_Instrumentation/ch6.ipynb
+++ b/Industrial_Instrumentation/ch6.ipynb
diff --git a/Industrial_Instrumentation/ch7.ipynb b/Industrial_Instrumentation/ch7.ipynb
index 50954e24..50954e24 100644..100755
--- a/Industrial_Instrumentation/ch7.ipynb
+++ b/Industrial_Instrumentation/ch7.ipynb
diff --git a/Industrial_Instrumentation/ch8.ipynb b/Industrial_Instrumentation/ch8.ipynb
index 0650ff08..0650ff08 100644..100755
--- a/Industrial_Instrumentation/ch8.ipynb
+++ b/Industrial_Instrumentation/ch8.ipynb
diff --git a/Industrial_Instrumentation/ch9.ipynb b/Industrial_Instrumentation/ch9.ipynb
index d03841d8..d03841d8 100644..100755
--- a/Industrial_Instrumentation/ch9.ipynb
+++ b/Industrial_Instrumentation/ch9.ipynb
diff --git a/Industrial_Instrumentation/screenshots/chapter8.png b/Industrial_Instrumentation/screenshots/chapter8.png
index d0d66354..d0d66354 100644..100755
--- a/Industrial_Instrumentation/screenshots/chapter8.png
+++ b/Industrial_Instrumentation/screenshots/chapter8.png
Binary files differ
diff --git a/Industrial_Instrumentation/screenshots/coldair-stardotto.png b/Industrial_Instrumentation/screenshots/coldair-stardotto.png
index 7234c1fa..7234c1fa 100644..100755
--- a/Industrial_Instrumentation/screenshots/coldair-stardotto.png
+++ b/Industrial_Instrumentation/screenshots/coldair-stardotto.png
Binary files differ
diff --git a/Industrial_Instrumentation/screenshots/decreaseentropy.png b/Industrial_Instrumentation/screenshots/decreaseentropy.png
index 718cfb9f..718cfb9f 100644..100755
--- a/Industrial_Instrumentation/screenshots/decreaseentropy.png
+++ b/Industrial_Instrumentation/screenshots/decreaseentropy.png
Binary files differ
diff --git a/Industrial_Instrumentation/screenshots/mechanicsesmicinst.png b/Industrial_Instrumentation/screenshots/mechanicsesmicinst.png
index 535bb827..535bb827 100644..100755
--- a/Industrial_Instrumentation/screenshots/mechanicsesmicinst.png
+++ b/Industrial_Instrumentation/screenshots/mechanicsesmicinst.png
Binary files differ
diff --git a/Industrial_Instrumentation/screenshots/pvdiagram.png b/Industrial_Instrumentation/screenshots/pvdiagram.png
index bd945aff..bd945aff 100644..100755
--- a/Industrial_Instrumentation/screenshots/pvdiagram.png
+++ b/Industrial_Instrumentation/screenshots/pvdiagram.png
Binary files differ
diff --git a/Industrial_Instrumentation/screenshots/rangeflowratameter.png b/Industrial_Instrumentation/screenshots/rangeflowratameter.png
index 3a5df08f..3a5df08f 100644..100755
--- a/Industrial_Instrumentation/screenshots/rangeflowratameter.png
+++ b/Industrial_Instrumentation/screenshots/rangeflowratameter.png
Binary files differ
diff --git a/Introduction_To_Chemical_Engineering/README.txt b/Introduction_To_Chemical_Engineering/README.txt
index 4b3c548b..4b3c548b 100644..100755
--- a/Introduction_To_Chemical_Engineering/README.txt
+++ b/Introduction_To_Chemical_Engineering/README.txt
diff --git a/Introduction_To_Chemical_Engineering/ch1.ipynb b/Introduction_To_Chemical_Engineering/ch1.ipynb
index b28f0745..b28f0745 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch1.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch1.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch2.ipynb b/Introduction_To_Chemical_Engineering/ch2.ipynb
index 845b485b..845b485b 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch2.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch2.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch3.ipynb b/Introduction_To_Chemical_Engineering/ch3.ipynb
index ea36928b..ea36928b 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch3.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch3.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch4.ipynb b/Introduction_To_Chemical_Engineering/ch4.ipynb
index 3a5046ad..3a5046ad 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch4.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch4.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch5.ipynb b/Introduction_To_Chemical_Engineering/ch5.ipynb
index 24e997c2..24e997c2 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch5.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch5.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch6.ipynb b/Introduction_To_Chemical_Engineering/ch6.ipynb
index 1a7b64a4..1a7b64a4 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch6.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch6.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch7.ipynb b/Introduction_To_Chemical_Engineering/ch7.ipynb
index cf9ad80b..cf9ad80b 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch7.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch7.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch8.ipynb b/Introduction_To_Chemical_Engineering/ch8.ipynb
index d67175c5..d67175c5 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch8.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch8.ipynb
diff --git a/Introduction_To_Chemical_Engineering/ch9.ipynb b/Introduction_To_Chemical_Engineering/ch9.ipynb
index ff828207..ff828207 100644..100755
--- a/Introduction_To_Chemical_Engineering/ch9.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch9.ipynb
diff --git a/Introduction_To_Chemical_Engineering/screenshots/pic11.png b/Introduction_To_Chemical_Engineering/screenshots/pic11.png
index 25fb271a..25fb271a 100644..100755
--- a/Introduction_To_Chemical_Engineering/screenshots/pic11.png
+++ b/Introduction_To_Chemical_Engineering/screenshots/pic11.png
Binary files differ
diff --git a/Introduction_To_Chemical_Engineering/screenshots/pic22.png b/Introduction_To_Chemical_Engineering/screenshots/pic22.png
index 10d2054e..10d2054e 100644..100755
--- a/Introduction_To_Chemical_Engineering/screenshots/pic22.png
+++ b/Introduction_To_Chemical_Engineering/screenshots/pic22.png
Binary files differ
diff --git a/Introduction_To_Chemical_Engineering/screenshots/pic33.png b/Introduction_To_Chemical_Engineering/screenshots/pic33.png
index ccbe0f95..ccbe0f95 100644..100755
--- a/Introduction_To_Chemical_Engineering/screenshots/pic33.png
+++ b/Introduction_To_Chemical_Engineering/screenshots/pic33.png
Binary files differ
diff --git a/Let_us_C/README.txt b/Let_us_C/README.txt
index 752b7f71..752b7f71 100644..100755
--- a/Let_us_C/README.txt
+++ b/Let_us_C/README.txt
diff --git a/Let_us_C/chapter-1.ipynb b/Let_us_C/chapter-1.ipynb
index 215baac9..215baac9 100644..100755
--- a/Let_us_C/chapter-1.ipynb
+++ b/Let_us_C/chapter-1.ipynb
diff --git a/Let_us_C/chapter-10.ipynb b/Let_us_C/chapter-10.ipynb
index 7257e56a..7257e56a 100644..100755
--- a/Let_us_C/chapter-10.ipynb
+++ b/Let_us_C/chapter-10.ipynb
diff --git a/Let_us_C/chapter-11.ipynb b/Let_us_C/chapter-11.ipynb
index 697d86a1..697d86a1 100644..100755
--- a/Let_us_C/chapter-11.ipynb
+++ b/Let_us_C/chapter-11.ipynb
diff --git a/Let_us_C/chapter-12.ipynb b/Let_us_C/chapter-12.ipynb
index a3331f4d..a3331f4d 100644..100755
--- a/Let_us_C/chapter-12.ipynb
+++ b/Let_us_C/chapter-12.ipynb
diff --git a/Let_us_C/chapter-13.ipynb b/Let_us_C/chapter-13.ipynb
index bd79a9c1..bd79a9c1 100644..100755
--- a/Let_us_C/chapter-13.ipynb
+++ b/Let_us_C/chapter-13.ipynb
diff --git a/Let_us_C/chapter-14.ipynb b/Let_us_C/chapter-14.ipynb
index 8181a680..8181a680 100644..100755
--- a/Let_us_C/chapter-14.ipynb
+++ b/Let_us_C/chapter-14.ipynb
diff --git a/Let_us_C/chapter-15.ipynb b/Let_us_C/chapter-15.ipynb
index 087a08d0..993f6a9b 100644..100755
--- a/Let_us_C/chapter-15.ipynb
+++ b/Let_us_C/chapter-15.ipynb
@@ -1,603 +1,602 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:d98d61d8802af6f3fda8e30c6e47e6355ba4d55d204c760c90ae2fa05295236c"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1>Chapter 15: Miscellaneous Features <h1>"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Enumerated Data Type , Page number: 508<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "def enum(**enums):\n",
- " return type('Enum', (), enums)\n",
- "#Enum declaration\n",
- "emp_dept = enum(assembly = 0, manufacturing = 1,accounts = 2, stores = 3)\n",
- "\n",
- "from collections import namedtuple\n",
- "#Structure declaration\n",
- "struct_employee = namedtuple(\"struct_employee\", \"name age bs emp_dept\")\n",
- "\n",
- "\n",
- "#Structure for employee\n",
- "department = emp_dept.manufacturing\n",
- "e = struct_employee(\"Lothar Mattheus\",28,5575.50,department)\n",
- "\n",
- "#Result\n",
- "print \"Name = \",e.name\n",
- "print \"Age = \",e.age\n",
- "print \"Basic salary = \",e.bs\n",
- "print \"Dept = \",e.emp_dept\n",
- "\n",
- "if(e.emp_dept == 2):\n",
- " print \"%s is an accountant\" %(e.name)\n",
- "else:\n",
- " print \"%s is not an accountant\" %(e.name)\n",
- " \n",
- " \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Name = Lothar Mattheus\n",
- "Age = 28\n",
- "Basic salary = 5575.5\n",
- "Dept = 1\n",
- "Lothar Mattheus is not an accountant\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Are Enums Necessary, Page number: 510<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#macro definition\n",
- "ASSEMBLY = 0\n",
- "MANUFACTURING = 1\n",
- "ACCOUNTS = 2\n",
- "STORES = 3\n",
- "\n",
- "from collections import namedtuple\n",
- "#Structure declaration\n",
- "struct_employee = namedtuple(\"struct_employee\", \"name age bs department\")\n",
- "\n",
- "#Structure for employee\n",
- "e = struct_employee(\"Lothar Mattheus\",28,5575.50,MANUFACTURING)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 2
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Division Without Typecasting , Page number: 513<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Variable declaration\n",
- "x=6\n",
- "y=4\n",
- "\n",
- "#Calculation\n",
- "a = int( x/y) \n",
- "\n",
- "#Result\n",
- "print \"Value of a = %f\" %(a)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Value of a = 1.000000\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Division With Typecasting , Page number: 513<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Variable declaration\n",
- "x=6\n",
- "y=4\n",
- "\n",
- "#Calculation\n",
- "a = float( x)/y\n",
- "\n",
- "#Result\n",
- "print \"Value of a = %f\" %(a)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Value of a = 1.500000\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Type Casting , Page number: 514<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Variable declaration\n",
- "a=6.35\n",
- "\n",
- "#Result\n",
- "print \"Value of a on typecasting = %d\" %(int(a))\n",
- "print \"Value of a = %f\"%(a)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Value of a on typecasting = 6\n",
- "Value of a = 6.350000\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Bit Fields , Page number: 516<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from ctypes import *\n",
- "import ctypes\n",
- "import math\n",
- "\n",
- "#macro definition\n",
- "MALE = 0\n",
- "FEMALE = 1\n",
- "SINGLE = 0\n",
- "MARRIED = 1\n",
- "DIVORCED = 2\n",
- "WIDOWED = 3\n",
- "\n",
- "#Structure declaration\n",
- "class employee(Structure):\n",
- " _fields_ = [(\"gender\", c_int, 1),(\"mar_stat\", c_int, 3),(\"hobby\", c_int, 3),(\"scheme\", c_int, 4)]\n",
- " _sizeof_ = 2\n",
- "#Structure for employee\n",
- "e = employee()\n",
- "e.gender = MALE\n",
- "e.mar_stat = DIVORCED\n",
- "e.hobby = 5\n",
- "e.scheme =9\n",
- "\n",
- "#Result\n",
- "print \"Gender = \",e.gender\n",
- "print \"Marital status = \",e.mar_stat\n",
- "print \"Bytes occupied by e = \",sizeof(e)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Gender = 0\n",
- "Marital status = 2\n",
- "Bytes occupied by e = 4\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Address of a Function , Page number: 517<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Function definition\n",
- "def display():\n",
- " print \"Long live viruses!!\"\n",
- "\n",
- "#Result\n",
- "print \"Address of function display is \",id(display)\n",
- "display() #function call\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Address of function display is 133993192\n",
- "Long live viruses!!\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Invoking a Function Using Pointer, Page number: 518<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Function definition\n",
- "def display():\n",
- " print \"Long live viruses!!\"\n",
- "\n",
- "func_ptr = id(display) #assigning address of function\n",
- "print \"Address of function display is \",func_ptr\n",
- "display() #function call\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Address of function display is 133993080\n",
- "Long live viruses!!\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Functions Returning Pointers , Page number: 520<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Function definition\n",
- "def fun():\n",
- " i = 20\n",
- " return (i)\n",
- "\n",
- "#Result\n",
- "p =fun() #function call\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 11
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>String Copy , Page number: 520<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#Function definition\n",
- "def copy(t,s):\n",
- " i = 0\n",
- " while ( s[i] != '\\0' ):\n",
- " t = t + s[i]\n",
- " i = i + 1\n",
- " return t\n",
- "\n",
- "#Variable declaration\n",
- "source = \"Jaded\\0\" \n",
- "target = ''\n",
- "string = copy( target, source ) # function call\n",
- "\n",
- "#Result\n",
- "print string\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Jaded\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Findmax Function , Page number: 522<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#function declaration\n",
- "def findmax(*arg):\n",
- " maxi = arg[1]\n",
- " for count in range(2,arg[0]):\n",
- " num = arg[count]\n",
- " if (num > maxi):\n",
- " maxi = num\n",
- " return maxi\n",
- "\n",
- "maxi = findmax(5,23,15,1,92,50)#function call \n",
- "print \"maximum = \",maxi\n",
- "\n",
- "maxi = findmax(3,100,300,29)#function call \n",
- "print \"maximum = \",maxi\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "maximum = 92\n",
- "maximum = 300\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Display Function, Page number: 524<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#function declaration\n",
- "def display(*arg):\n",
- " if(arg[0] == 1): #case int\n",
- " for j in range(2,arg[1]+2):\n",
- " i = arg[j]\n",
- " print \"%d\"%(i)\n",
- " elif(arg[0] == 2): #case char\n",
- " for j in range(2,arg[1]+2):\n",
- " i = arg[j]\n",
- " print \"%c\"%(i)\n",
- " elif(arg[0] == 3): #case double\n",
- " for j in range(2,arg[1]+2):\n",
- " i = arg[j]\n",
- " print \"%lf\"%(i)\n",
- " \n",
- "#function calls\n",
- "display(1,2,5,6)\n",
- "display(2,4,'A','a','b','c')\n",
- "display(3,3,2.5,299.3,-1.0)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "5\n",
- "6\n",
- "A\n",
- "a\n",
- "b\n",
- "c\n",
- "2.500000\n",
- "299.300000\n",
- "-1.000000\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Union Demo , Page number: 526<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from ctypes import *\n",
- "\n",
- "#union declaration\n",
- "class union_a(Union):\n",
- " _fields_ = [(\"i\", c_int),\n",
- " (\"ch\", ((c_char * 1)*2))]\n",
- "\n",
- "key = union_a()\n",
- "key.i = 512\n",
- "print \"key.i = \",key.i\n",
- "print \"key.ch[0] = \",(key.ch[0][0])\n",
- "print \"key.ch[1] = \",(key.ch[1][0])\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": []
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Union Example , Page number: 530<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from ctypes import *\n",
- "\n",
- "#Union declaration\n",
- "class union_a(Union):\n",
- " _fields_ = [(\"i\", c_int),\n",
- " (\"ch\", ((c_char * 1)*2))]\n",
- "\n",
- "key = union_a()\n",
- "key.i = 512\n",
- "print \"key.i = \",key.i\n",
- "print \"key.ch[0] = \",(key.ch[0][0])\n",
- "print \"key.ch[1] = \",(key.ch[1][0])\n",
- "\n",
- "key.ch[0][0] = 50 #assign new value to key.ch[0]\n",
- "print\"key.i = \",key.i\n",
- "print\"key.ch[0] = \",(key.ch[0][0])\n",
- "print\"key.ch[1] = \",(key.ch[1][0])\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": []
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Union of Structures , Page number: 531<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from ctypes import *\n",
- "\n",
- "#Structure declarations\n",
- "class a(Structure):\n",
- " _fields_ = [(\"i\", c_int),\n",
- " (\"c\", ((c_char * 1)*2))]\n",
- "\n",
- "class b(Structure):\n",
- " _fields_ = [(\"j\", c_int),\n",
- " (\"d\", ((c_char * 1)*2))]\n",
- " \n",
- "#Union declaration\n",
- "class union_z(Union):\n",
- " _fields_ = [(\"key\", a),\n",
- " (\"data\", b )]\n",
- "\n",
- "strange = union_z()\n",
- "strange.key.i = 512\n",
- "strange.data.d[0][0] = 0\n",
- "strange.data.d[1][0] = 32\n",
- "\n",
- "print strange.key.i\n",
- "print strange.data.j\n",
- "print strange.key.c[0][0]\n",
- "print strange.data.d[0][0]\n",
- "print strange.key.c[1][0]\n",
- "print strange.data.d[1][0]\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
+{
+ "metadata": {
+ "name": "chapter-15.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 15: Miscellaneous Features <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Enumerated Data Type , Page number: 508<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def enum(**enums):\n",
+ " return type('Enum', (), enums)\n",
+ "#Enum declaration\n",
+ "emp_dept = enum(assembly = 0, manufacturing = 1,accounts = 2, stores = 3)\n",
+ "\n",
+ "from collections import namedtuple\n",
+ "#Structure declaration\n",
+ "struct_employee = namedtuple(\"struct_employee\", \"name age bs emp_dept\")\n",
+ "\n",
+ "\n",
+ "#Structure for employee\n",
+ "department = emp_dept.manufacturing\n",
+ "e = struct_employee(\"Lothar Mattheus\",28,5575.50,department)\n",
+ "\n",
+ "#Result\n",
+ "print \"Name = \",e.name\n",
+ "print \"Age = \",e.age\n",
+ "print \"Basic salary = \",e.bs\n",
+ "print \"Dept = \",e.emp_dept\n",
+ "\n",
+ "if(e.emp_dept == 2):\n",
+ " print \"%s is an accountant\" %(e.name)\n",
+ "else:\n",
+ " print \"%s is not an accountant\" %(e.name)\n",
+ " \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name = Lothar Mattheus\n",
+ "Age = 28\n",
+ "Basic salary = 5575.5\n",
+ "Dept = 1\n",
+ "Lothar Mattheus is not an accountant\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Are Enums Necessary, Page number: 510<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#macro definition\n",
+ "ASSEMBLY = 0\n",
+ "MANUFACTURING = 1\n",
+ "ACCOUNTS = 2\n",
+ "STORES = 3\n",
+ "\n",
+ "from collections import namedtuple\n",
+ "#Structure declaration\n",
+ "struct_employee = namedtuple(\"struct_employee\", \"name age bs department\")\n",
+ "\n",
+ "#Structure for employee\n",
+ "e = struct_employee(\"Lothar Mattheus\",28,5575.50,MANUFACTURING)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Division Without Typecasting , Page number: 513<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "x=6\n",
+ "y=4\n",
+ "\n",
+ "#Calculation\n",
+ "a = int( x/y) \n",
+ "\n",
+ "#Result\n",
+ "print \"Value of a = %f\" %(a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of a = 1.000000\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Division With Typecasting , Page number: 513<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "x=6\n",
+ "y=4\n",
+ "\n",
+ "#Calculation\n",
+ "a = float( x)/y\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of a = %f\" %(a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of a = 1.500000\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Type Casting , Page number: 514<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "a=6.35\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of a on typecasting = %d\" %(int(a))\n",
+ "print \"Value of a = %f\"%(a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of a on typecasting = 6\n",
+ "Value of a = 6.350000\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Bit Fields , Page number: 516<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "import ctypes\n",
+ "import math\n",
+ "\n",
+ "#macro definition\n",
+ "MALE = 0\n",
+ "FEMALE = 1\n",
+ "SINGLE = 0\n",
+ "MARRIED = 1\n",
+ "DIVORCED = 2\n",
+ "WIDOWED = 3\n",
+ "\n",
+ "#Structure declaration\n",
+ "class employee(Structure):\n",
+ " _fields_ = [(\"gender\", c_int, 1),(\"mar_stat\", c_int, 3),(\"hobby\", c_int, 3),(\"scheme\", c_int, 4)]\n",
+ " _sizeof_ = 2\n",
+ "#Structure for employee\n",
+ "e = employee()\n",
+ "e.gender = MALE\n",
+ "e.mar_stat = DIVORCED\n",
+ "e.hobby = 5\n",
+ "e.scheme =9\n",
+ "\n",
+ "#Result\n",
+ "print \"Gender = \",e.gender\n",
+ "print \"Marital status = \",e.mar_stat\n",
+ "print \"Bytes occupied by e = \",sizeof(e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gender = 0\n",
+ "Marital status = 2\n",
+ "Bytes occupied by e = 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Address of a Function , Page number: 517<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Function definition\n",
+ "def display():\n",
+ " print \"Long live viruses!!\"\n",
+ "\n",
+ "#Result\n",
+ "print \"Address of function display is \",id(display)\n",
+ "display() #function call\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Address of function display is 133993192\n",
+ "Long live viruses!!\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Invoking a Function Using Pointer, Page number: 518<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Function definition\n",
+ "def display():\n",
+ " print \"Long live viruses!!\"\n",
+ "\n",
+ "func_ptr = id(display) #assigning address of function\n",
+ "print \"Address of function display is \",func_ptr\n",
+ "display() #function call\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Address of function display is 133993080\n",
+ "Long live viruses!!\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Functions Returning Pointers , Page number: 520<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Function definition\n",
+ "def fun():\n",
+ " i = 20\n",
+ " return (i)\n",
+ "\n",
+ "#Result\n",
+ "p =fun() #function call\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>String Copy , Page number: 520<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Function definition\n",
+ "def copy(t,s):\n",
+ " i = 0\n",
+ " while ( s[i] != '\\0' ):\n",
+ " t = t + s[i]\n",
+ " i = i + 1\n",
+ " return t\n",
+ "\n",
+ "#Variable declaration\n",
+ "source = \"Jaded\\0\" \n",
+ "target = ''\n",
+ "string = copy( target, source ) # function call\n",
+ "\n",
+ "#Result\n",
+ "print string\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Jaded\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Findmax Function , Page number: 522<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "to find out max value from a set of values\n",
+ "\n",
+ "#function declaration\n",
+ "def findmax(*arg):\n",
+ " maxi = arg[1]\n",
+ " for count in range(2,arg[0]):\n",
+ " num = arg[count]\n",
+ " if (num > maxi):\n",
+ " maxi = num\n",
+ " return maxi\n",
+ "\n",
+ "maxi = findmax(5,23,15,1,92,50)#function call \n",
+ "print \"maximum = \",maxi\n",
+ "\n",
+ "maxi = findmax(3,100,300,29)#function call \n",
+ "print \"maximum = \",maxi\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum = 92\n",
+ "maximum = 300\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Display Function, Page number: 524<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#function declaration\n",
+ "def display(*arg):\n",
+ " if(arg[0] == 1): #case int\n",
+ " for j in range(2,arg[1]+2):\n",
+ " i = arg[j]\n",
+ " print \"%d\"%(i)\n",
+ " elif(arg[0] == 2): #case char\n",
+ " for j in range(2,arg[1]+2):\n",
+ " i = arg[j]\n",
+ " print \"%c\"%(i)\n",
+ " elif(arg[0] == 3): #case double\n",
+ " for j in range(2,arg[1]+2):\n",
+ " i = arg[j]\n",
+ " print \"%lf\"%(i)\n",
+ " \n",
+ "#function calls\n",
+ "display(1,2,5,6)\n",
+ "display(2,4,'A','a','b','c')\n",
+ "display(3,3,2.5,299.3,-1.0)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n",
+ "6\n",
+ "A\n",
+ "a\n",
+ "b\n",
+ "c\n",
+ "2.500000\n",
+ "299.300000\n",
+ "-1.000000\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Union Demo , Page number: 526<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "#union declaration\n",
+ "class union_a(Union):\n",
+ " _fields_ = [(\"i\", c_int),\n",
+ " (\"ch\", ((c_char * 1)*2))]\n",
+ "\n",
+ "key = union_a()\n",
+ "key.i = 512\n",
+ "print \"key.i = \",key.i\n",
+ "print \"key.ch[0] = \",(key.ch[0][0])\n",
+ "print \"key.ch[1] = \",(key.ch[1][0])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Union Example , Page number: 530<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "#Union declaration\n",
+ "class union_a(Union):\n",
+ " _fields_ = [(\"i\", c_int),\n",
+ " (\"ch\", ((c_char * 1)*2))]\n",
+ "\n",
+ "key = union_a()\n",
+ "key.i = 512\n",
+ "print \"key.i = \",key.i\n",
+ "print \"key.ch[0] = \",(key.ch[0][0])\n",
+ "print \"key.ch[1] = \",(key.ch[1][0])\n",
+ "\n",
+ "key.ch[0][0] = 50 #assign new value to key.ch[0]\n",
+ "print\"key.i = \",key.i\n",
+ "print\"key.ch[0] = \",(key.ch[0][0])\n",
+ "print\"key.ch[1] = \",(key.ch[1][0])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Union of Structures , Page number: 531<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "#Structure declarations\n",
+ "class a(Structure):\n",
+ " _fields_ = [(\"i\", c_int),\n",
+ " (\"c\", ((c_char * 1)*2))]\n",
+ "\n",
+ "class b(Structure):\n",
+ " _fields_ = [(\"j\", c_int),\n",
+ " (\"d\", ((c_char * 1)*2))]\n",
+ " \n",
+ "#Union declaration\n",
+ "class union_z(Union):\n",
+ " _fields_ = [(\"key\", a),\n",
+ " (\"data\", b )]\n",
+ "\n",
+ "strange = union_z()\n",
+ "strange.key.i = 512\n",
+ "strange.data.d[0][0] = 0\n",
+ "strange.data.d[1][0] = 32\n",
+ "\n",
+ "print strange.key.i\n",
+ "print strange.data.j\n",
+ "print strange.key.c[0][0]\n",
+ "print strange.data.d[0][0]\n",
+ "print strange.key.c[1][0]\n",
+ "print strange.data.d[1][0]\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
} \ No newline at end of file
diff --git a/Let_us_C/chapter-16.ipynb b/Let_us_C/chapter-16.ipynb
index 195741f0..195741f0 100644..100755
--- a/Let_us_C/chapter-16.ipynb
+++ b/Let_us_C/chapter-16.ipynb
diff --git a/Let_us_C/chapter-17.ipynb b/Let_us_C/chapter-17.ipynb
index ea406a32..ea406a32 100644..100755
--- a/Let_us_C/chapter-17.ipynb
+++ b/Let_us_C/chapter-17.ipynb
diff --git a/Let_us_C/chapter-18.ipynb b/Let_us_C/chapter-18.ipynb
index 3aa35505..3aa35505 100644..100755
--- a/Let_us_C/chapter-18.ipynb
+++ b/Let_us_C/chapter-18.ipynb
diff --git a/Let_us_C/chapter-2.ipynb b/Let_us_C/chapter-2.ipynb
index b7409b44..b7409b44 100644..100755
--- a/Let_us_C/chapter-2.ipynb
+++ b/Let_us_C/chapter-2.ipynb
diff --git a/Let_us_C/chapter-20.ipynb b/Let_us_C/chapter-20.ipynb
index 16c8fdc8..16c8fdc8 100644..100755
--- a/Let_us_C/chapter-20.ipynb
+++ b/Let_us_C/chapter-20.ipynb
diff --git a/Let_us_C/chapter-21.ipynb b/Let_us_C/chapter-21.ipynb
index 9883bc71..9883bc71 100644..100755
--- a/Let_us_C/chapter-21.ipynb
+++ b/Let_us_C/chapter-21.ipynb
diff --git a/Let_us_C/chapter-3.ipynb b/Let_us_C/chapter-3.ipynb
index 5b3de0d9..5b3de0d9 100644..100755
--- a/Let_us_C/chapter-3.ipynb
+++ b/Let_us_C/chapter-3.ipynb
diff --git a/Let_us_C/chapter-4.ipynb b/Let_us_C/chapter-4.ipynb
index fcd96271..fcd96271 100644..100755
--- a/Let_us_C/chapter-4.ipynb
+++ b/Let_us_C/chapter-4.ipynb
diff --git a/Let_us_C/chapter-5.ipynb b/Let_us_C/chapter-5.ipynb
index 2055e966..2055e966 100644..100755
--- a/Let_us_C/chapter-5.ipynb
+++ b/Let_us_C/chapter-5.ipynb
diff --git a/Let_us_C/chapter-6.ipynb b/Let_us_C/chapter-6.ipynb
index ff2bda1a..ff2bda1a 100644..100755
--- a/Let_us_C/chapter-6.ipynb
+++ b/Let_us_C/chapter-6.ipynb
diff --git a/Let_us_C/chapter-7.ipynb b/Let_us_C/chapter-7.ipynb
index 960282bf..960282bf 100644..100755
--- a/Let_us_C/chapter-7.ipynb
+++ b/Let_us_C/chapter-7.ipynb
diff --git a/Let_us_C/chapter-8.ipynb b/Let_us_C/chapter-8.ipynb
index 9467d28a..9467d28a 100644..100755
--- a/Let_us_C/chapter-8.ipynb
+++ b/Let_us_C/chapter-8.ipynb
diff --git a/Let_us_C/chapter-9.ipynb b/Let_us_C/chapter-9.ipynb
index a712e2f0..a712e2f0 100644..100755
--- a/Let_us_C/chapter-9.ipynb
+++ b/Let_us_C/chapter-9.ipynb
diff --git a/Let_us_C/screenshots/binary.png b/Let_us_C/screenshots/binary.png
index 5a14ee93..5a14ee93 100644..100755
--- a/Let_us_C/screenshots/binary.png
+++ b/Let_us_C/screenshots/binary.png
Binary files differ
diff --git a/Let_us_C/screenshots/hellowindows.png b/Let_us_C/screenshots/hellowindows.png
index 622bf2b7..622bf2b7 100644..100755
--- a/Let_us_C/screenshots/hellowindows.png
+++ b/Let_us_C/screenshots/hellowindows.png
Binary files differ
diff --git a/Let_us_C/screenshots/macro.png b/Let_us_C/screenshots/macro.png
index 161b4c74..161b4c74 100644..100755
--- a/Let_us_C/screenshots/macro.png
+++ b/Let_us_C/screenshots/macro.png
Binary files differ
diff --git a/Linear_Integrated_Circuits/Chapter_1.ipynb b/Linear_Integrated_Circuits/Chapter_1.ipynb
index e8573149..e8573149 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_1.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_1.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_10.ipynb b/Linear_Integrated_Circuits/Chapter_10.ipynb
index 9b461180..9b461180 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_10.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_10.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_11.ipynb b/Linear_Integrated_Circuits/Chapter_11.ipynb
index 85490636..85490636 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_11.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_11.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_2.ipynb b/Linear_Integrated_Circuits/Chapter_2.ipynb
index 2bd3dfb6..2bd3dfb6 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_2.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_2.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_3.ipynb b/Linear_Integrated_Circuits/Chapter_3.ipynb
index 8906bf98..8906bf98 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_3.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_3.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_4.ipynb b/Linear_Integrated_Circuits/Chapter_4.ipynb
index cd759624..cd759624 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_4.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_4.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_5.ipynb b/Linear_Integrated_Circuits/Chapter_5.ipynb
index 53ae3319..53ae3319 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_5.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_5.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_6.ipynb b/Linear_Integrated_Circuits/Chapter_6.ipynb
index 1e4a097d..1e4a097d 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_6.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_6.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_7.ipynb b/Linear_Integrated_Circuits/Chapter_7.ipynb
index ff558ee5..ff558ee5 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_7.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_7.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_8.ipynb b/Linear_Integrated_Circuits/Chapter_8.ipynb
index b9f79a2c..b9f79a2c 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_8.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_8.ipynb
diff --git a/Linear_Integrated_Circuits/Chapter_9.ipynb b/Linear_Integrated_Circuits/Chapter_9.ipynb
index c60b9c67..c60b9c67 100644..100755
--- a/Linear_Integrated_Circuits/Chapter_9.ipynb
+++ b/Linear_Integrated_Circuits/Chapter_9.ipynb
diff --git a/Linear_Integrated_Circuits/README.txt b/Linear_Integrated_Circuits/README.txt
index f34d66f4..f34d66f4 100644..100755
--- a/Linear_Integrated_Circuits/README.txt
+++ b/Linear_Integrated_Circuits/README.txt
diff --git a/Linear_Integrated_Circuits/screenshots/frequency_response.JPG b/Linear_Integrated_Circuits/screenshots/frequency_response.JPG
index fcfef356..fcfef356 100644..100755
--- a/Linear_Integrated_Circuits/screenshots/frequency_response.JPG
+++ b/Linear_Integrated_Circuits/screenshots/frequency_response.JPG
Binary files differ
diff --git a/Linear_Integrated_Circuits/screenshots/input_output_differentiator.JPG b/Linear_Integrated_Circuits/screenshots/input_output_differentiator.JPG
index 077129ed..077129ed 100644..100755
--- a/Linear_Integrated_Circuits/screenshots/input_output_differentiator.JPG
+++ b/Linear_Integrated_Circuits/screenshots/input_output_differentiator.JPG
Binary files differ
diff --git a/Linear_Integrated_Circuits/screenshots/ip_and_op_integrator.JPG b/Linear_Integrated_Circuits/screenshots/ip_and_op_integrator.JPG
index f7c036e1..f7c036e1 100644..100755
--- a/Linear_Integrated_Circuits/screenshots/ip_and_op_integrator.JPG
+++ b/Linear_Integrated_Circuits/screenshots/ip_and_op_integrator.JPG
Binary files differ
diff --git a/Materials_science_and_engineering_an_introduction/CH10.ipynb b/Materials_science_and_engineering_an_introduction/CH10.ipynb
index b7fb2351..b7fb2351 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH10.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH10.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH12.ipynb b/Materials_science_and_engineering_an_introduction/CH12.ipynb
index b2774698..b2774698 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH12.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH12.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH14.ipynb b/Materials_science_and_engineering_an_introduction/CH14.ipynb
index e860f213..e860f213 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH14.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH14.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH16.ipynb b/Materials_science_and_engineering_an_introduction/CH16.ipynb
index 02f6165f..02f6165f 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH16.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH16.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH17.ipynb b/Materials_science_and_engineering_an_introduction/CH17.ipynb
index 889d524a..889d524a 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH17.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH17.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH18.ipynb b/Materials_science_and_engineering_an_introduction/CH18.ipynb
index cae50c36..cae50c36 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH18.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH18.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH19.ipynb b/Materials_science_and_engineering_an_introduction/CH19.ipynb
index 1da6512a..1da6512a 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH19.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH19.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH20.ipynb b/Materials_science_and_engineering_an_introduction/CH20.ipynb
index b3d2e8d5..b3d2e8d5 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH20.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH20.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH21.ipynb b/Materials_science_and_engineering_an_introduction/CH21.ipynb
index 38c06f2e..38c06f2e 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH21.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH21.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH3.ipynb b/Materials_science_and_engineering_an_introduction/CH3.ipynb
index eeb7447f..eeb7447f 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH3.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH3.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH4.ipynb b/Materials_science_and_engineering_an_introduction/CH4.ipynb
index 253ffd46..253ffd46 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH4.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH4.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH5.ipynb b/Materials_science_and_engineering_an_introduction/CH5.ipynb
index caf36165..caf36165 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH5.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH5.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH6.ipynb b/Materials_science_and_engineering_an_introduction/CH6.ipynb
index 490f5d5d..490f5d5d 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH6.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH6.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH7.ipynb b/Materials_science_and_engineering_an_introduction/CH7.ipynb
index 262231ec..262231ec 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH7.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH7.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH8.ipynb b/Materials_science_and_engineering_an_introduction/CH8.ipynb
index b5a32873..b5a32873 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH8.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH8.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/CH9.ipynb b/Materials_science_and_engineering_an_introduction/CH9.ipynb
index 0ddab2a7..0ddab2a7 100644..100755
--- a/Materials_science_and_engineering_an_introduction/CH9.ipynb
+++ b/Materials_science_and_engineering_an_introduction/CH9.ipynb
diff --git a/Materials_science_and_engineering_an_introduction/README.txt b/Materials_science_and_engineering_an_introduction/README.txt
index 5f1056e2..5f1056e2 100644..100755
--- a/Materials_science_and_engineering_an_introduction/README.txt
+++ b/Materials_science_and_engineering_an_introduction/README.txt
diff --git a/Materials_science_and_engineering_an_introduction/screenshots/10_2.png b/Materials_science_and_engineering_an_introduction/screenshots/10_2.png
index 2ab2bcc8..2ab2bcc8 100644..100755
--- a/Materials_science_and_engineering_an_introduction/screenshots/10_2.png
+++ b/Materials_science_and_engineering_an_introduction/screenshots/10_2.png
Binary files differ
diff --git a/Materials_science_and_engineering_an_introduction/screenshots/8_1.png b/Materials_science_and_engineering_an_introduction/screenshots/8_1.png
index 6d576bb0..6d576bb0 100644..100755
--- a/Materials_science_and_engineering_an_introduction/screenshots/8_1.png
+++ b/Materials_science_and_engineering_an_introduction/screenshots/8_1.png
Binary files differ
diff --git a/Materials_science_and_engineering_an_introduction/screenshots/9_3.png b/Materials_science_and_engineering_an_introduction/screenshots/9_3.png
index d332d145..d332d145 100644..100755
--- a/Materials_science_and_engineering_an_introduction/screenshots/9_3.png
+++ b/Materials_science_and_engineering_an_introduction/screenshots/9_3.png
Binary files differ
diff --git a/Mechanics_of_Materials/README.txt b/Mechanics_of_Materials/README.txt
index 433bd9d4..433bd9d4 100644..100755
--- a/Mechanics_of_Materials/README.txt
+++ b/Mechanics_of_Materials/README.txt
diff --git a/Mechanics_of_Materials/chapter1.ipynb b/Mechanics_of_Materials/chapter1.ipynb
index ab371470..ab371470 100644..100755
--- a/Mechanics_of_Materials/chapter1.ipynb
+++ b/Mechanics_of_Materials/chapter1.ipynb
diff --git a/Mechanics_of_Materials/chapter11.ipynb b/Mechanics_of_Materials/chapter11.ipynb
index 6c1963de..6c1963de 100644..100755
--- a/Mechanics_of_Materials/chapter11.ipynb
+++ b/Mechanics_of_Materials/chapter11.ipynb
diff --git a/Mechanics_of_Materials/chapter12.ipynb b/Mechanics_of_Materials/chapter12.ipynb
index 461ae35c..461ae35c 100644..100755
--- a/Mechanics_of_Materials/chapter12.ipynb
+++ b/Mechanics_of_Materials/chapter12.ipynb
diff --git a/Mechanics_of_Materials/chapter2.ipynb b/Mechanics_of_Materials/chapter2.ipynb
index 831eb87c..831eb87c 100644..100755
--- a/Mechanics_of_Materials/chapter2.ipynb
+++ b/Mechanics_of_Materials/chapter2.ipynb
diff --git a/Mechanics_of_Materials/chapter3.ipynb b/Mechanics_of_Materials/chapter3.ipynb
index d7c23e2c..d7c23e2c 100644..100755
--- a/Mechanics_of_Materials/chapter3.ipynb
+++ b/Mechanics_of_Materials/chapter3.ipynb
diff --git a/Mechanics_of_Materials/chapter4.ipynb b/Mechanics_of_Materials/chapter4.ipynb
index deb5ebe3..deb5ebe3 100644..100755
--- a/Mechanics_of_Materials/chapter4.ipynb
+++ b/Mechanics_of_Materials/chapter4.ipynb
diff --git a/Mechanics_of_Materials/chapter5.ipynb b/Mechanics_of_Materials/chapter5.ipynb
index eded6995..eded6995 100644..100755
--- a/Mechanics_of_Materials/chapter5.ipynb
+++ b/Mechanics_of_Materials/chapter5.ipynb
diff --git a/Mechanics_of_Materials/chapter6.ipynb b/Mechanics_of_Materials/chapter6.ipynb
index abed2b92..abed2b92 100644..100755
--- a/Mechanics_of_Materials/chapter6.ipynb
+++ b/Mechanics_of_Materials/chapter6.ipynb
diff --git a/Mechanics_of_Materials/chapter7.ipynb b/Mechanics_of_Materials/chapter7.ipynb
index 3bf957bb..3bf957bb 100644..100755
--- a/Mechanics_of_Materials/chapter7.ipynb
+++ b/Mechanics_of_Materials/chapter7.ipynb
diff --git a/Mechanics_of_Materials/chapter8.ipynb b/Mechanics_of_Materials/chapter8.ipynb
index 5e6a3e95..5e6a3e95 100644..100755
--- a/Mechanics_of_Materials/chapter8.ipynb
+++ b/Mechanics_of_Materials/chapter8.ipynb
diff --git a/Mechanics_of_Materials/chapter9.ipynb b/Mechanics_of_Materials/chapter9.ipynb
index ee48f481..ee48f481 100644..100755
--- a/Mechanics_of_Materials/chapter9.ipynb
+++ b/Mechanics_of_Materials/chapter9.ipynb
diff --git a/Mechanics_of_Materials/screenshots/screen1.png b/Mechanics_of_Materials/screenshots/screen1.png
index 2e923aea..2e923aea 100644..100755
--- a/Mechanics_of_Materials/screenshots/screen1.png
+++ b/Mechanics_of_Materials/screenshots/screen1.png
Binary files differ
diff --git a/Mechanics_of_Materials/screenshots/screen2.png b/Mechanics_of_Materials/screenshots/screen2.png
index eb6ad8e1..eb6ad8e1 100644..100755
--- a/Mechanics_of_Materials/screenshots/screen2.png
+++ b/Mechanics_of_Materials/screenshots/screen2.png
Binary files differ
diff --git a/Mechanics_of_Materials/screenshots/screen3.png b/Mechanics_of_Materials/screenshots/screen3.png
index ff023b0d..ff023b0d 100644..100755
--- a/Mechanics_of_Materials/screenshots/screen3.png
+++ b/Mechanics_of_Materials/screenshots/screen3.png
Binary files differ
diff --git a/Microwave_and_Radar_Engineering/Chapter_10.ipynb b/Microwave_and_Radar_Engineering/Chapter_10.ipynb
index 406bdd3e..406bdd3e 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_10.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_10.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_11.ipynb b/Microwave_and_Radar_Engineering/Chapter_11.ipynb
index afe53dd6..afe53dd6 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_11.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_11.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_3.ipynb b/Microwave_and_Radar_Engineering/Chapter_3.ipynb
index 116264a3..116264a3 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_3.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_3.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_4.ipynb b/Microwave_and_Radar_Engineering/Chapter_4.ipynb
index 05272d36..05272d36 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_4.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_4.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_5.ipynb b/Microwave_and_Radar_Engineering/Chapter_5.ipynb
index dae9fa40..dae9fa40 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_5.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_5.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_6.ipynb b/Microwave_and_Radar_Engineering/Chapter_6.ipynb
index 28637666..28637666 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_6.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_6.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_7.ipynb b/Microwave_and_Radar_Engineering/Chapter_7.ipynb
index 5b27b735..5b27b735 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_7.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_7.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_8.ipynb b/Microwave_and_Radar_Engineering/Chapter_8.ipynb
index 7dc18da5..7dc18da5 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_8.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_8.ipynb
diff --git a/Microwave_and_Radar_Engineering/Chapter_9.ipynb b/Microwave_and_Radar_Engineering/Chapter_9.ipynb
index 9e0e63f1..9e0e63f1 100644..100755
--- a/Microwave_and_Radar_Engineering/Chapter_9.ipynb
+++ b/Microwave_and_Radar_Engineering/Chapter_9.ipynb
diff --git a/Microwave_and_Radar_Engineering/README.txt b/Microwave_and_Radar_Engineering/README.txt
index 37a02654..37a02654 100644..100755
--- a/Microwave_and_Radar_Engineering/README.txt
+++ b/Microwave_and_Radar_Engineering/README.txt
diff --git a/Microwave_and_Radar_Engineering/screenshots/sachin1.png b/Microwave_and_Radar_Engineering/screenshots/sachin1.png
index dd2559b4..dd2559b4 100644..100755
--- a/Microwave_and_Radar_Engineering/screenshots/sachin1.png
+++ b/Microwave_and_Radar_Engineering/screenshots/sachin1.png
Binary files differ
diff --git a/Microwave_and_Radar_Engineering/screenshots/sachin2.png b/Microwave_and_Radar_Engineering/screenshots/sachin2.png
index 93f52d70..93f52d70 100644..100755
--- a/Microwave_and_Radar_Engineering/screenshots/sachin2.png
+++ b/Microwave_and_Radar_Engineering/screenshots/sachin2.png
Binary files differ
diff --git a/Microwave_and_Radar_Engineering/screenshots/sachin3.png b/Microwave_and_Radar_Engineering/screenshots/sachin3.png
index 21abafa9..21abafa9 100644..100755
--- a/Microwave_and_Radar_Engineering/screenshots/sachin3.png
+++ b/Microwave_and_Radar_Engineering/screenshots/sachin3.png
Binary files differ
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1.ipynb
new file mode 100755
index 00000000..df948150
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1.ipynb
@@ -0,0 +1,20 @@
+{
+ "metadata": {
+ "name": "Chapter1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1: Introduction"
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10.ipynb
new file mode 100755
index 00000000..6917db4a
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10.ipynb
@@ -0,0 +1,284 @@
+{
+ "metadata": {
+ "name": "Chapter10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 10: Inferences Concerning Proportions "
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-280"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A large sample 95% confidence interval for p\n\n# Variable declaration\nn = 100 # total person\nx = 36 \nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\np = float(x) / n # probability\nZ = 1.96 # Z value corresponding to alpha/2\n\nval = Z*( sqrt( p*(1-p)/n ) ) \nlower = p - val\nupper = p + val\n\n# Result\nprint \"95% confidence interval: (\",round(lower,3),\",\",round(upper,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 0.266 , 0.454 )\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-281"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# An estimation of maximum error\n\n# Variable declaration\nn = 400 # total person\nx = 136 # number of person answering yes\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\np = float(x) / n # probability\nZ = 2.575 # Z value corresponding to alpha/2\n\nmax_err = Z*( sqrt( p*(1-p)/n ) ) # maximum error\nmax_err = round(max_err,3)\n\n# Result\nprint \"Maximum error with 99% confidence interval: \",max_err",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum error with 99% confidence interval: 0.061\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-282"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Selecting a sample size for estimating a proportion\n\n# Variable declaration\nE = 0.04 # Maximum Error\nalpha = 0.05\nZ = 1.96 # Z value corresponding to alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Part-A\nn1 = pow((Z/E),2)/4 # Sample size\nn1 = int(math.ceil(n1))\n\n# Part-B\np = 0.12\nn2 = pow((Z/E),2)*p*(1-p) # Sample size\nn2 = int(math.ceil(n2))\n\n# Result\nprint \"Part(A): sample size:\",n1\nprint \"Part(B): sample size:\",n2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A): sample size: 601\nPart(B): sample size: 254\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-284"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A one-sided test of the proportion of transceivers\n\n# Variable declaration\nalpha = 0.05 # level of significance\nx = 48\nn = 60\np0 = 0.70\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if p=0.70 , Alternative hypothesis if p>0.70\nZ_thr = 1.645 # theoritical value of Z\n\nZ_prt = (x - n*p0)/ sqrt(n*p0*(1-p0)) # practical value of Z\nZ_prt = round(Z_prt,3)\n\n# Result\nprint \"Practical Z value: \",Z_prt\nif(Z_thr > Z_prt):\n print \"null hypothesis can not be rejected\"\n print \"Proportion of good transceivers is not greater than 0.70\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Proportion of good transceivers is greater than 0.70\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical Z value: 1.69\nnull hypothesis must be rejected\nProportion of good transceivers is greater than 0.70\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-286"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing the equality of three proportions using chi square statistics\n\n# Variable declaration\nalpha = 0.05 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nchi_sq_thr = 5.991 # theoritical value of chi square at alpha = 0.05 with v = 2\n\nl = array([[41,27,22],[79,53,78]])\n\ncrum = l[0,0:3] # list of crumbled\nrem_int = l[1,0:3 ] # list of remained intact\n\ne11 = sum(crum)*sum(l[0:2,0]) / (sum(crum)+sum(rem_int))\ne12 = sum(crum)*sum(l[0:2,1]) / (sum(crum)+sum(rem_int))\ne13 = sum(crum)*sum(l[0:2,2]) / (sum(crum)+sum(rem_int))\ne21 = sum(rem_int)*sum(l[0:2,0]) / (sum(crum)+sum(rem_int))\ne22 = sum(rem_int)*sum(l[0:2,1]) / (sum(crum)+sum(rem_int))\ne23 = sum(rem_int)*sum(l[0:2,2]) / (sum(crum)+sum(rem_int))\n\nq = [e11,e12,e13,e21,e22,e23] # list of expected frequency\np = [41,27,22,79,53,78] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,6):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2.0) / q[i]\n \n\n\nchi_sq_prt = round(chi_sq_prt,3) # practical value of chi square\n\n# Result\nprint \"Practical chi square value: \",chi_sq_prt\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"data don't refute to hypothesis\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"data refute to hypothesis\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 4.575\nnull hypothesis can not be rejected\ndata don't refute to hypothesis\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-287"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Graphical display of confidence interval\n\n# Variable declaration\nalpha = 0.05 # level of significance\nsemi = []\nfailures = []\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n# null hypothesis: if p1=p2=p3=p4 , Alternative hypothesis if p1,p2,p3,p4 all are not equal\n\nchi_sq_thr = 7.815 # theoritical value of chi square at alpha = 0.05 with v = 3\n\nl = array([[31,42,22,25],[19,8,28,25]])\n\nsemi = l[0,0:4] # list of semiconductors\nfailures = l[1,0:4] # list of failures\n\ne11 = sum(semi)*sum(l[0:2,0]) / float(sum(semi)+sum(failures))\ne12 = sum(semi)*sum(l[0:2,1]) / float(sum(semi)+sum(failures))\ne13 = sum(semi)*sum(l[0:2,2]) / float(sum(semi)+sum(failures))\ne14 = sum(semi)*sum(l[0:2,3]) / float(sum(semi)+sum(failures))\ne21 = sum(failures)*sum(l[0:2,0]) / float(sum(semi)+sum(failures))\ne22 = sum(failures)*sum(l[0:2,1]) / float(sum(semi)+sum(failures))\ne23 = sum(failures)*sum(l[0:2,2]) / float(sum(semi)+sum(failures))\ne24 = sum(failures)*sum(l[0:2,3]) / float(sum(semi)+sum(failures))\n\nq = [e11,e12,e13,e14,e21,e22,e23,e24] # list of expected frequency\np = [31,42,22,25,19,8,28,25] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,8):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2) / q[i]\n\n# Result\nprint \"Practical chi square value: \",chi_sq_prt\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"data dont refute to hypothesis\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"data refute to hypothesis\"\n\na1 = [0.62,0.84,0.44,0.50]\na2 = [1.0,1.1,1.2,1.3]\nerr1 = [0.13,0.10,0.14,0.14]\nerr2 = [0,0,0,0]\nylim(0.9,1.5)\n\nerrorbar(a1,a2,xerr=err1,yerr=err2,fmt='bo')\ntitle(\"Confidence intervals\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 19.5\nnull hypothesis must be rejected\ndata refute to hypothesis\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": "<matplotlib.text.Text at 0x831eac8>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEKCAYAAAAGvn7fAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHPhJREFUeJzt3X9UVHX+P/DnyGD+ABEBWUFMGX8sBY6oZZTouJ3CH6uL\n4NkD7ppKGesaop3O0RIDzNzafuwJPJtZaFv+3LSkdgRszQFPapaUmviLSRDxaIxKrpkG9Pr+4cf5\ngjLMIMPM8O75OGfOmZn79n2fd4Z5cr13rmpEREBERMro5O4ARETkXCx2IiLFsNiJiBTDYiciUgyL\nnYhIMSx2IiLFsNjJpX766SdMnjwZPXv2xB//+Eds2LABcXFxNscbDAbk5eW5MGHL5s6di+XLl7s7\nhkP69++PnTt3ujsGuYHW3QHIM23YsAGvv/46jh8/Dl9fXww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Kqqsj4+c+YMQkNDmx2blZVlvW8wGGDgroJSTCZArd/pzX88ioq8\nlNnOsWPdnYBuZTKZYGrjMbI2F/uUKVOwcuVKJCUlYd++fejZs6fNwzCNi53UYzCodcw2Lq4eO3Y0\n93wDWvg+QYfCj6TnuXWnNzs7u9Vz2C325ORkFBcXw2KxICwsDNnZ2airqwMApKamYuLEidi+fTsG\nDhyI7t27Y+3ata0OQeSJ5s9/FGbzkiaHY3S655CWNt6NqYjs08itB8jba0UazW3H4kktKp6IMxpL\nkJv7Ka5d80KXLg1IS3tEmROngJrvmWrupDtZ7EREHuxOupP/pAARkWJY7EREimGxExEphsVORKQY\nFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7EREimGxExEp\nhsVORKQYFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7ERE\nimGxExEpxm6xFxYW4re//S0GDRqEl19++bblly5dwtSpU6HX6zFq1CgcOXKkXYISEZFjWiz2hoYG\nPPXUUygsLERZWRk2btyIo0ePNhmzYsUKDB8+HAcPHsR7772H9PT0dg3c3kwmk7sjOKQj5OwIGQHm\ndDbmdL8Wi33//v0YOHAg+vfvD29vbyQlJSE/P7/JmKNHj2LcuHEAgCFDhqCiogI1NTXtl7iddZQ3\nuyPk7AgZAeZ0NuZ0vxaLvbq6GmFhYdbHffv2RXV1dZMxer0eH374IYAbvwgqKytx5syZdohKRESO\naLHYNRqN3QkWL16M2tpaREdHY+XKlYiOjoaXl5fTAhIRUStJC/bu3StxcXHWxytWrJCXXnqppT8i\n/fv3l//973+3Pa/T6QQAb7zxxhtvrbjpdLoWO7c5WrRg5MiROHnyJCoqKhASEoLNmzdj48aNTcb8\n8MMP6Nq1Kzp37oy3334bY8eOhY+Pz21zlZeXt7QqIiJykhaLXavVYuXKlYiLi0NDQwMef/xxRERE\n4K233gIApKamoqysDLNmzYJGo0FkZCTy8vJcEpyIiJqnERFxdwgiInIep195au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8IbWfIY++eQTjB49Gj17\n9mzHRM1zJOeKFSswbNgwmEwmmM1mPPLIIzh48CB8fX1dkNDxCyzT09Ot5ys8+QLLWz/fLW2fU4s9\nNDQUVVVV1sdVVVXWv9Y2dujQIcyZMweFhYUt/vWjPTia8abY2FjU19fjwoULCAgIcEVEAI7lPHDg\nAJKSkgDcOFFVUFAAb29vTJkyxaNyNv4gT5gwAX/9619x8eJF9OrVy6NyhoWFITAwEF27dkXXrl0x\nZswYHDx40KXF3pqfz02bNrnlMAzgWM49e/ZgyZIlAACdTocBAwbg+PHjGDlypMdk9PX1xZo1a6yP\nBwwYgPDwcJfka41bt+XMmTMIDQ21/QeceQKgrq5OwsPD5dSpU3L9+vVmT1ZUVlaKTqeTvXv3OnPV\nTs1YXl4uv/zyi4iIHDhwQMLDwz0yZ2OzZs2SrVu3ujDhDY7kPHfunPX1/OKLL+Tuu+/2yJxHjx6V\nhx9+WOrr6+XHH3+UyMhIOXLkiMflFBGpra2VXr16ydWrV12a7yZHci5cuFCysrJE5MbPQGhoqFy4\ncMGjMtbW1sr169dFRGT16tUyc+ZMl+W71alTpxw6ebp37167J0+dWuwiItu3b5fBgweLTqeTFStW\niIjIqlWrZNWqVSIi8vjjj0uvXr1k2LBhMmzYMLnvvvucHaHNGV9++WW59957ZdiwYTJ69GjZv3+/\nyzM6krMxdxW7iP2cK1eulHvvvVf0er3ExMS47Ze6I6/nK6+8Ivfcc49ERkbKG2+84bE53333XUlO\nTnZLvpvs5aypqZHf//73MnToUImMjJT169d7XMY9e/bI4MGDZciQIZKYmGj9xp6rJSUlSZ8+fcTb\n21v69u0reXl5t73n8+bNE51OJ0OHDpUDBw60OB8vUCIiUgz/azwiIsWw2ImIFMNiJyJSDIudiEgx\nLHYiIsWw2ImIFMNiJyJSDIudiEgx/w8mZ7rU6IUnegAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x8303320>"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-289"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A large sample test concerning two proportion\n\n# Variable declaration\nn1 = 200 # sample-1 size\nn2 = 400 # sample-2 size\nx1 = 16\nx2 = 14\nalpha = 0.01 # level of significance\n\nZ_thr = 2.33 # Z value\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\np = (x1+x2)/float(n1+n2)\n\nZ_prt = (x1/float(n1) - x2/float(n2)) / (sqrt( (p*(1-p))*(1.0/n1 + 1.0/n2))) # Lower limit\n\nZ_prt = round(Z_prt,2)\n\n# Result\nprint \"Practical Z value: \",Z_prt\nif(Z_thr > Z_prt):\n print \"null hypothesis can not be rejected\"\n print \"Proportion of tractors is greater for first.\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Proportion of tractors is greater for first.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical Z value: 2.38\nnull hypothesis must be rejected\nProportion of tractors is greater for first.\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-290"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A large sample confidence interval for the difference of two proportions\n\n# Variable declaration\nn1 = 200 # sample-1 size\nn2 = 400 # sample-2 size\np1 = 16.0/200\np2 = 14.0/400\nalpha = 0.01 # level of significance\n\nZ = 1.96 # Z value at alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# we need to find confidence interval for p1-p2\ny1 = (p1-p2) - (Z* (sqrt( (p1*(1-p1))/n1 + (p2*(1-p2))/n2 ))) # Lower limit\ny2 = (p1-p2) + (Z* (sqrt( (p1*(1-p1))/n1 + (p2*(1-p2))/n2 ))) # Upper limit\n\ny1 = round(y1,3)\ny2 = round(y2,3)\n\n# Result\nprint \"95% confidence interval for (p1-p2) : ( \",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval for (p1-p2) : ( 0.003 , 0.087 )\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-292"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Contingency table with column totals fixed\n\n# Variable declaration\nl = array([[78,56,54],[15,30,31],[7,14,15]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nr1 = l[0,0:3] \nr2 = l[1,0:3 ] \nr3 = l[2,0:3 ] \n\ne11 = sum(r1)*sum(l[0:3,0]) / float(sum(r1)+sum(r2)+sum(r3))\ne12 = sum(r1)*sum(l[0:3,1]) / float(sum(r1)+sum(r2)+sum(r3))\ne13 = sum(r1)*sum(l[0:3,2]) / float(sum(r1)+sum(r2)+sum(r3))\ne21 = sum(r2)*sum(l[0:3,0]) / float(sum(r1)+sum(r2)+sum(r3))\ne22 = sum(r2)*sum(l[0:3,1]) / float(sum(r1)+sum(r2)+sum(r3))\ne23 = sum(r2)*sum(l[0:3,2]) / float(sum(r1)+sum(r2)+sum(r3))\ne31 = sum(r3)*sum(l[0:3,0]) / float(sum(r1)+sum(r2)+sum(r3))\ne32 = sum(r3)*sum(l[0:3,1]) / float(sum(r1)+sum(r2)+sum(r3))\ne33 = sum(r3)*sum(l[0:3,2]) / float(sum(r1)+sum(r2)+sum(r3))\n\n\nq = [e11,e12,e13,e21,e22,e23,e31,e32,e33] # list of expected frequency\n\nfor i in range(0,9):\n q[i] = round(q[i],2)\n# Result\nprint q",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "[62.67, 62.67, 62.67, 25.33, 25.33, 25.33, 12.0, 12.0, 12.0]\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-294"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The chi square test of independence\n\n# Variable declaration\nl = array([[23,60,29],[28,79,60],[9,49,63]])\nalpha = 0.01\nn = 400\nchi_sq_thr = 13.277 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nr1 = l[0,0:3] \nr2 = l[1,0:3 ] \nr3 = l[2,0:3 ] \n\ne11 = sum(r1)*sum(l[0:3,0]) / float(n)\ne12 = sum(r1)*sum(l[0:3,1]) / float(n)\ne13 = sum(r1)*sum(l[0:3,2]) / float(n)\ne21 = sum(r2)*sum(l[0:3,0]) / float(n)\ne22 = sum(r2)*sum(l[0:3,1]) / float(n)\ne23 = sum(r2)*sum(l[0:3,2]) / float(n)\ne31 = sum(r3)*sum(l[0:3,0]) / float(n)\ne32 = sum(r3)*sum(l[0:3,1]) / float(n)\ne33 = sum(r3)*sum(l[0:3,2]) / float(n)\n\n\nq = [e11,e12,e13,e21,e22,e23,e31,e32,e33] # list of expected frequency\np = [23,60,29,28,79,60,9,49,63] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,9):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2) / q[i]\n\n# Result\nprint \"Practical chi square value: \",round(chi_sq_prt,3)\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"Dependency between performance & success\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Dependency between performance & success\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 20.179\nnull hypothesis must be rejected\nDependency between performance & success\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-295"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The chi square test of independence\n\n# Variable declaration\nl = array([[23,60,29],[28,79,60],[9,49,63]])\nalpha = 0.01\nn = 400\nchi_sq_thr = 13.277 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nr1 = l[0,0:3] \nr2 = l[1,0:3 ] \nr3 = l[2,0:3 ] \n\ne11 = sum(r1)*sum(l[0:3,0]) / float(n)\ne12 = sum(r1)*sum(l[0:3,1]) / float(n)\ne13 = sum(r1)*sum(l[0:3,2]) / float(n)\ne21 = sum(r2)*sum(l[0:3,0]) / float(n)\ne22 = sum(r2)*sum(l[0:3,1]) / float(n)\ne23 = sum(r2)*sum(l[0:3,2]) / float(n)\ne31 = sum(r3)*sum(l[0:3,0]) / float(n)\ne32 = sum(r3)*sum(l[0:3,1]) / float(n)\ne33 = sum(r3)*sum(l[0:3,2]) / float(n)\n\n\nq = [e11,e12,e13,e21,e22,e23,e31,e32,e33] # list of expected frequency\np = [23,60,29,28,79,60,9,49,63] # list of entries\nr = []\nchi_sq_prt = 0\n\nfor i in range(0,9):\n r.append(round(pow( p[i]-q[i] ,2) / q[i],3))\n\n# Result\nprint r",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "[2.288, 1.029, 4.32, 0.347, 0.003, 0.189, 4.613, 1.089, 6.3]\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-296"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A chi square goodness of fit to the poisson distribution\n\n# Variable declaration\nalpha = 0.05\nn = 400\nchi_sq_thr = 16.919 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nq = [22.4,42.8,65.2,74.8,69.2,52.8,34.8,20.0,10.0,8.0] # list of expected frequency\np = [18,47,76,68,74,46,39,15,9,8] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,10):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2) / q[i]\n\n# Result\nprint \"Practical chi square value: \",round(chi_sq_prt,3)\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"Poisson distribution provides a good fit at level alphha=0.05\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Poisson distribution does not provide a good fit at level alphha=0.05\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 6.749\nnull hypothesis can not be rejected\nPoisson distribution provides a good fit at level alphha=0.05\n"
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10_1.ipynb
new file mode 100755
index 00000000..2d483ceb
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter10_1.ipynb
@@ -0,0 +1,284 @@
+{
+ "metadata": {
+ "name": "Chapter10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 10: Inferences Concerning Proportions "
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-280"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 100 # total person\nx = 36 \nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\np = float(x) / n # probability\nZ = 1.96 # Z value corresponding to alpha/2\n\nval = Z*( sqrt( p*(1-p)/n ) ) \nlower = p - val\nupper = p + val\n\n# Result\nprint \"95% confidence interval: (\",round(lower,3),\",\",round(upper,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 0.266 , 0.454 )\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-281"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 400 # total person\nx = 136 # number of person answering yes\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\np = float(x) / n # probability\nZ = 2.575 # Z value corresponding to alpha/2\n\nmax_err = Z*( sqrt( p*(1-p)/n ) ) # maximum error\nmax_err = round(max_err,3)\n\n# Result\nprint \"Maximum error with 99% confidence interval: \",max_err",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum error with 99% confidence interval: 0.061\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-282"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nE = 0.04 # Maximum Error\nalpha = 0.05\nZ = 1.96 # Z value corresponding to alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Part-A\nn1 = pow((Z/E),2)/4 # Sample size\nn1 = int(math.ceil(n1))\n\n# Part-B\np = 0.12\nn2 = pow((Z/E),2)*p*(1-p) # Sample size\nn2 = int(math.ceil(n2))\n\n# Result\nprint \"Part(A): sample size:\",n1\nprint \"Part(B): sample size:\",n2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A): sample size: 601\nPart(B): sample size: 254\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-284"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nx = 48\nn = 60\np0 = 0.70\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if p=0.70 , Alternative hypothesis if p>0.70\nZ_thr = 1.645 # theoritical value of Z\n\nZ_prt = (x - n*p0)/ sqrt(n*p0*(1-p0)) # practical value of Z\nZ_prt = round(Z_prt,3)\n\n# Result\nprint \"Practical Z value: \",Z_prt\nif(Z_thr > Z_prt):\n print \"null hypothesis can not be rejected\"\n print \"Proportion of good transceivers is not greater than 0.70\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Proportion of good transceivers is greater than 0.70\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical Z value: 1.69\nnull hypothesis must be rejected\nProportion of good transceivers is greater than 0.70\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-286"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nchi_sq_thr = 5.991 # theoritical value of chi square at alpha = 0.05 with v = 2\n\nl = array([[41,27,22],[79,53,78]])\n\ncrum = l[0,0:3] # list of crumbled\nrem_int = l[1,0:3 ] # list of remained intact\n\ne11 = sum(crum)*sum(l[0:2,0]) / (sum(crum)+sum(rem_int))\ne12 = sum(crum)*sum(l[0:2,1]) / (sum(crum)+sum(rem_int))\ne13 = sum(crum)*sum(l[0:2,2]) / (sum(crum)+sum(rem_int))\ne21 = sum(rem_int)*sum(l[0:2,0]) / (sum(crum)+sum(rem_int))\ne22 = sum(rem_int)*sum(l[0:2,1]) / (sum(crum)+sum(rem_int))\ne23 = sum(rem_int)*sum(l[0:2,2]) / (sum(crum)+sum(rem_int))\n\nq = [e11,e12,e13,e21,e22,e23] # list of expected frequency\np = [41,27,22,79,53,78] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,6):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2.0) / q[i]\n \n\n\nchi_sq_prt = round(chi_sq_prt,3) # practical value of chi square\n\n# Result\nprint \"Practical chi square value: \",chi_sq_prt\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"data don't refute to hypothesis\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"data refute to hypothesis\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 4.575\nnull hypothesis can not be rejected\ndata don't refute to hypothesis\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-287"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nsemi = []\nfailures = []\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n# null hypothesis: if p1=p2=p3=p4 , Alternative hypothesis if p1,p2,p3,p4 all are not equal\n\nchi_sq_thr = 7.815 # theoritical value of chi square at alpha = 0.05 with v = 3\n\nl = array([[31,42,22,25],[19,8,28,25]])\n\nsemi = l[0,0:4] # list of semiconductors\nfailures = l[1,0:4] # list of failures\n\ne11 = sum(semi)*sum(l[0:2,0]) / float(sum(semi)+sum(failures))\ne12 = sum(semi)*sum(l[0:2,1]) / float(sum(semi)+sum(failures))\ne13 = sum(semi)*sum(l[0:2,2]) / float(sum(semi)+sum(failures))\ne14 = sum(semi)*sum(l[0:2,3]) / float(sum(semi)+sum(failures))\ne21 = sum(failures)*sum(l[0:2,0]) / float(sum(semi)+sum(failures))\ne22 = sum(failures)*sum(l[0:2,1]) / float(sum(semi)+sum(failures))\ne23 = sum(failures)*sum(l[0:2,2]) / float(sum(semi)+sum(failures))\ne24 = sum(failures)*sum(l[0:2,3]) / float(sum(semi)+sum(failures))\n\nq = [e11,e12,e13,e14,e21,e22,e23,e24] # list of expected frequency\np = [31,42,22,25,19,8,28,25] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,8):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2) / q[i]\n\n# Result\nprint \"Practical chi square value: \",chi_sq_prt\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"data dont refute to hypothesis\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"data refute to hypothesis\"\n\na1 = [0.62,0.84,0.44,0.50]\na2 = [1.0,1.1,1.2,1.3]\nerr1 = [0.13,0.10,0.14,0.14]\nerr2 = [0,0,0,0]\nylim(0.9,1.5)\n\nerrorbar(a1,a2,xerr=err1,yerr=err2,fmt='bo')\ntitle(\"Confidence intervals\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 19.5\nnull hypothesis must be rejected\ndata refute to hypothesis\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": "<matplotlib.text.Text at 0x831eac8>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEKCAYAAAAGvn7fAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHPhJREFUeJzt3X9UVHX+P/DnyGD+ABEBWUFMGX8sBY6oZZTouJ3CH6uL\n4NkD7ppKGesaop3O0RIDzNzafuwJPJtZaFv+3LSkdgRszQFPapaUmviLSRDxaIxKrpkG9Pr+4cf5\ngjLMIMPM8O75OGfOmZn79n2fd4Z5cr13rmpEREBERMro5O4ARETkXCx2IiLFsNiJiBTDYiciUgyL\nnYhIMSx2IiLFsNjJpX766SdMnjwZPXv2xB//+Eds2LABcXFxNscbDAbk5eW5MGHL5s6di+XLl7s7\nhkP69++PnTt3ujsGuYHW3QHIM23YsAGvv/46jh8/Dl9fXwwbNgxLlizBQw891KZ5t2zZgu+//x4X\nL15Ep0439iumT59uc7xGo4FGo2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PYsiQIejUqROeffZZfPPNN6iqqrKOWbx4MXr06IGwsDCM\nGzcOBw8eBAC88847WLRoEUaMGAEA0Ol06NevH7788ktYLBZkZGRAq9ViwIABeOKJJ7Bp0yab2984\nf0vbeutYR9b14IMPYsqUKQCALl26YPr06di4caN1rs2bN1vPSeh0Ojz88MPw9vZGYGAgFi5ciOLi\n4mYzd+7cGSdPnoTFYkG3bt0watQom9tHHR+LnZoICAiAxWLBL7/8YnPM2bNncffdd1sf9+vXD2fP\nnm0yR+NfDN26dcOVK1fsrvvs2bPo27dvk+fCwsKs9ysrK5Geng5/f3/4+/sjICAAAFBdXW0d0/gX\nQeP1njlzBjqd7rZ1VlZW4uzZs9Y5/f398be//Q3ff/+93byt3VZH1nXr9ickJGDv3r04d+4cSkpK\n0KlTJ4wePRoAcP78eSQlJaFv377w8/PDjBkzcOHChWbXnZeXhxMnTiAiIgL3338/jEajQ9tHHRO/\nFUNNxMTE4K677sJHH32ExMTEZseEhISgoqICERERAIDTp08jJCSkzesOCQlBfn6+9bGINNkb79ev\nH5YuXYrk5ORWzx0WFoby8vLbnu/Xrx8GDBiAEydOODyXo980uXWcvXU19y0Wf39/PProo9i8eTPK\nysqabPtzzz0HLy8vfPvtt+jZsye2bduGtLS0ZuceOHAgNmzYAADYunUrpk2bhosXL6Jr164ObQt1\nLNxjpyb8/PywbNkyzJs3D/n5+bh69Srq6upQUFCARYsWAQCSk5OxfPlyWCwWWCwWLFu2DDNmzGjz\nuidOnIgjR47go48+Qn19PXJycnDu3Dnr8r/85S9YsWIFysrKAAA//PADPvjgA5vzNT7s88QTT+DV\nV19FaWkpRATl5eU4ffo07r//fvj6+uLvf/87fvrpJzQ0NODbb7/FV199ZXdOe4KDg/Hdd99ZH9tb\nl615p0+fjn/961/YunVrk6+GXrlyBd27d0ePHj1QXV2NV155xWaWdevWoaamBsCN91ij0fCbSQrj\nO0u3efrpp/H6669j+fLl6N27N/r164d//vOfmDp1KgAgIyMDI0eOxNChQzF06FCMHDkSG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NnOsWPdnYBuZTKZYGrjMbI2F/uUKVOwcuVKJCUlYd++fejZs6fNwzCNi53UYzCodcw2Lq4eO3Y0\n93wDWvg+QYfCj6TnuXWnNzs7u9Vz2C325ORkFBcXw2KxICwsDNnZ2airqwMApKamYuLEidi+fTsG\nDhyI7t27Y+3ata0OQeSJ5s9/FGbzkiaHY3S655CWNt6NqYjs08itB8jba0UazW3H4kktKp6IMxpL\nkJv7Ka5d80KXLg1IS3tEmROngJrvmWrupDtZ7EREHuxOupP/pAARkWJY7EREimGxExEphsVORKQY\nFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7EREimGxExEp\nhsVORKQYFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7EREimGxExEphsVORKQYFjsRkWJY7ERE\nimGxExEpxm6xFxYW4re//S0GDRqEl19++bblly5dwtSpU6HX6zFq1CgcOXKkXYISEZFjWiz2hoYG\nPPXUUygsLERZWRk2btyIo0ePNhmzYsUKDB8+HAcPHsR7772H9PT0dg3c3kwmk7sjOKQj5OwIGQHm\ndDbmdL8Wi33//v0YOHAg+vfvD29vbyQlJSE/P7/JmKNHj2LcuHEAgCFDhqCiogI1NTXtl7iddZQ3\nuyPk7AgZAeZ0NuZ0vxaLvbq6GmFhYdbHffv2RXV1dZMxer0eH374IYAbvwgqKytx5syZdohKRESO\naLHYNRqN3QkWL16M2tpaREdHY+XKlYiOjoaXl5fTAhIRUStJC/bu3StxcXHWxytWrJCXXnqppT8i\n/fv3l//973+3Pa/T6QQAb7zxxhtvrbjpdLoWO7c5WrRg5MiROHnyJCoqKhASEoLNmzdj48aNTcb8\n8MMP6Nq1Kzp37oy3334bY8eOhY+Pz21zlZeXt7QqIiJykhaLXavVYuXKlYiLi0NDQwMef/xxRERE\n4K233gIApKamoqysDLNmzYJGo0FkZCTy8vJcEpyIiJqnERFxdwgiInIep195au+CpvXr10Ov12Po\n0KF46KGHcOjQIWdHaHPG/Px86PV6REdHY8SIEf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IIzh48CB8fX1dkNDxCyzT09Ot5ys8+QLLWz/fLW2fU4s9\nNDQUVVVV1sdVVVXWv9Y2dujQIcyZMweFhYUt/vWjPTia8abY2FjU19fjwoULCAgIcEVEAI7lPHDg\nAJKSkgDcOFFVUFAAb29vTJkyxaNyNv4gT5gwAX/9619x8eJF9OrVy6NyhoWFITAwEF27dkXXrl0x\nZswYHDx40KXF3pqfz02bNrnlMAzgWM49e/ZgyZIlAACdTocBAwbg+PHjGDlypMdk9PX1xZo1a6yP\nBwwYgPDwcJfka41bt+XMmTMIDQ21/QeceQKgrq5OwsPD5dSpU3L9+vVmT1ZUVlaKTqeTvXv3OnPV\nTs1YXl4uv/zyi4iIHDhwQMLDwz0yZ2OzZs2SrVu3ujDhDY7kPHfunPX1/OKLL+Tuu+/2yJxHjx6V\nhx9+WOrr6+XHH3+UyMhIOXLkiMflFBGpra2VXr16ydWrV12a7yZHci5cuFCysrJE5MbPQGhoqFy4\ncMGjMtbW1sr169dFRGT16tUyc+ZMl+W71alTpxw6ebp37167J0+dWuwiItu3b5fBgweLTqeTFStW\niIjIqlWrZNWqVSIi8vjjj0uvXr1k2LBhMmzYMLnvvvucHaHNGV9++WW59957ZdiwYTJ69GjZv3+/\nyzM6krMxdxW7iP2cK1eulHvvvVf0er3ExMS47Ze6I6/nK6+8Ivfcc49ERkbKG2+84bE53333XUlO\nTnZLvpvs5aypqZHf//73MnToUImMjJT169d7XMY9e/bI4MGDZciQIZKYmGj9xp6rJSUlSZ8+fcTb\n21v69u0reXl5t73n8+bNE51OJ0OHDpUDBw60OB8vUCIiUgz/azwiIsWw2ImIFMNiJyJSDIudiEgx\nLHYiIsWw2ImIFMNiJyJSDIudiEgx/w8mZ7rU6IUnegAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x8303320>"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-289"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn1 = 200 # sample-1 size\nn2 = 400 # sample-2 size\nx1 = 16\nx2 = 14\nalpha = 0.01 # level of significance\n\nZ_thr = 2.33 # Z value\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\np = (x1+x2)/float(n1+n2)\n\nZ_prt = (x1/float(n1) - x2/float(n2)) / (sqrt( (p*(1-p))*(1.0/n1 + 1.0/n2))) # Lower limit\n\nZ_prt = round(Z_prt,2)\n\n# Result\nprint \"Practical Z value: \",Z_prt\nif(Z_thr > Z_prt):\n print \"null hypothesis can not be rejected\"\n print \"Proportion of tractors is greater for first.\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Proportion of tractors is greater for first.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical Z value: 2.38\nnull hypothesis must be rejected\nProportion of tractors is greater for first.\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-290"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn1 = 200 # sample-1 size\nn2 = 400 # sample-2 size\np1 = 16.0/200\np2 = 14.0/400\nalpha = 0.01 # level of significance\n\nZ = 1.96 # Z value at alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# we need to find confidence interval for p1-p2\ny1 = (p1-p2) - (Z* (sqrt( (p1*(1-p1))/n1 + (p2*(1-p2))/n2 ))) # Lower limit\ny2 = (p1-p2) + (Z* (sqrt( (p1*(1-p1))/n1 + (p2*(1-p2))/n2 ))) # Upper limit\n\ny1 = round(y1,3)\ny2 = round(y2,3)\n\n# Result\nprint \"95% confidence interval for (p1-p2) : ( \",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval for (p1-p2) : ( 0.003 , 0.087 )\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-292"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[78,56,54],[15,30,31],[7,14,15]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nr1 = l[0,0:3] \nr2 = l[1,0:3 ] \nr3 = l[2,0:3 ] \n\ne11 = sum(r1)*sum(l[0:3,0]) / float(sum(r1)+sum(r2)+sum(r3))\ne12 = sum(r1)*sum(l[0:3,1]) / float(sum(r1)+sum(r2)+sum(r3))\ne13 = sum(r1)*sum(l[0:3,2]) / float(sum(r1)+sum(r2)+sum(r3))\ne21 = sum(r2)*sum(l[0:3,0]) / float(sum(r1)+sum(r2)+sum(r3))\ne22 = sum(r2)*sum(l[0:3,1]) / float(sum(r1)+sum(r2)+sum(r3))\ne23 = sum(r2)*sum(l[0:3,2]) / float(sum(r1)+sum(r2)+sum(r3))\ne31 = sum(r3)*sum(l[0:3,0]) / float(sum(r1)+sum(r2)+sum(r3))\ne32 = sum(r3)*sum(l[0:3,1]) / float(sum(r1)+sum(r2)+sum(r3))\ne33 = sum(r3)*sum(l[0:3,2]) / float(sum(r1)+sum(r2)+sum(r3))\n\n\nq = [e11,e12,e13,e21,e22,e23,e31,e32,e33] # list of expected frequency\n\nfor i in range(0,9):\n q[i] = round(q[i],2)\n# Result\nprint q",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "[62.67, 62.67, 62.67, 25.33, 25.33, 25.33, 12.0, 12.0, 12.0]\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-294"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[23,60,29],[28,79,60],[9,49,63]])\nalpha = 0.01\nn = 400\nchi_sq_thr = 13.277 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nr1 = l[0,0:3] \nr2 = l[1,0:3 ] \nr3 = l[2,0:3 ] \n\ne11 = sum(r1)*sum(l[0:3,0]) / float(n)\ne12 = sum(r1)*sum(l[0:3,1]) / float(n)\ne13 = sum(r1)*sum(l[0:3,2]) / float(n)\ne21 = sum(r2)*sum(l[0:3,0]) / float(n)\ne22 = sum(r2)*sum(l[0:3,1]) / float(n)\ne23 = sum(r2)*sum(l[0:3,2]) / float(n)\ne31 = sum(r3)*sum(l[0:3,0]) / float(n)\ne32 = sum(r3)*sum(l[0:3,1]) / float(n)\ne33 = sum(r3)*sum(l[0:3,2]) / float(n)\n\n\nq = [e11,e12,e13,e21,e22,e23,e31,e32,e33] # list of expected frequency\np = [23,60,29,28,79,60,9,49,63] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,9):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2) / q[i]\n\n# Result\nprint \"Practical chi square value: \",round(chi_sq_prt,3)\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"Dependency between performance & success\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Dependency between performance & success\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 20.179\nnull hypothesis must be rejected\nDependency between performance & success\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-295"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[23,60,29],[28,79,60],[9,49,63]])\nalpha = 0.01\nn = 400\nchi_sq_thr = 13.277 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nr1 = l[0,0:3] \nr2 = l[1,0:3 ] \nr3 = l[2,0:3 ] \n\ne11 = sum(r1)*sum(l[0:3,0]) / float(n)\ne12 = sum(r1)*sum(l[0:3,1]) / float(n)\ne13 = sum(r1)*sum(l[0:3,2]) / float(n)\ne21 = sum(r2)*sum(l[0:3,0]) / float(n)\ne22 = sum(r2)*sum(l[0:3,1]) / float(n)\ne23 = sum(r2)*sum(l[0:3,2]) / float(n)\ne31 = sum(r3)*sum(l[0:3,0]) / float(n)\ne32 = sum(r3)*sum(l[0:3,1]) / float(n)\ne33 = sum(r3)*sum(l[0:3,2]) / float(n)\n\n\nq = [e11,e12,e13,e21,e22,e23,e31,e32,e33] # list of expected frequency\np = [23,60,29,28,79,60,9,49,63] # list of entries\nr = []\nchi_sq_prt = 0\n\nfor i in range(0,9):\n r.append(round(pow( p[i]-q[i] ,2) / q[i],3))\n\n# Result\nprint r",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "[2.288, 1.029, 4.32, 0.347, 0.003, 0.189, 4.613, 1.089, 6.3]\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-296"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05\nn = 400\nchi_sq_thr = 16.919 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nq = [22.4,42.8,65.2,74.8,69.2,52.8,34.8,20.0,10.0,8.0] # list of expected frequency\np = [18,47,76,68,74,46,39,15,9,8] # list of entries\n\nchi_sq_prt = 0\n\nfor i in range(0,10):\n chi_sq_prt = chi_sq_prt + pow( p[i]-q[i] ,2) / q[i]\n\n# Result\nprint \"Practical chi square value: \",round(chi_sq_prt,3)\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"Poisson distribution provides a good fit at level alphha=0.05\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Poisson distribution does not provide a good fit at level alphha=0.05\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical chi square value: 6.749\nnull hypothesis can not be rejected\nPoisson distribution provides a good fit at level alphha=0.05\n"
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11.ipynb
new file mode 100755
index 00000000..650e10af
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11.ipynb
@@ -0,0 +1,466 @@
+{
+ "metadata": {
+ "name": "Chapter11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 11: Regression Analysis"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-305"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A numerical example of fitting a straight line by least squares\n\n# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nx = l[:,0]\ny = l[:,1]\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\n# For x = 190 cm/s\nvalue = c + Slope*190\nvalue = round(value,2)\n\nSum_of_square = s3 - square(s2)/s1\nSum_of_square = round(Sum_of_square,5)\n\n# Result\nprint \"Evaporation coefficient: \",value,\"mm(square)/s\"\nprint \"sum of squares: \",Sum_of_square",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Evaporation coefficient: 0.8 mm(square)/s\nsum of squares: 0.20238\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-306"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# One scatter plot but two different fitted lines\n\n# Variable declaration\nn = 50\nMeanx = 88.34\nMeany = 305.58\ns1 = 7239.22\ns2 = 17840.1\ns3 = 66975.2\nx = []\nfor i in range(60,120):\n x.append(i)\n \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nx = array(x)\nSlope1 = s2/s1\nSlope1 = round(Slope1,3)\n\nc1 = Meany - (s2/s1)*Meanx\nc1 = round(c1,2)\n\n\nSlope2 = s2/s3\nSlope2 = round(Slope2,3)\n\nc2 = Meanx - (s2/s3)*Meany\n \n# Result\nprint \"Part-A: \",\"Height = \",c1,\"+\",Slope1,\"*width\"\nprint \"Part-B: \",\"Height = \",round(-c2/Slope2,2),\"+\",round(1/Slope2,3),\"*width\"\n\nplot(x,c1+Slope1*x)\nplot(x,-c2/Slope2 + x/Slope2)\nlegend(['height = 87.88 + 2.464*width', 'height = -26.11 + 3.759*width'])\nxlabel(\"$Width$\")\nylabel(\"$Height$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part-A: Height = 87.88 + 2.464 *width\nPart-B: Height = -26.1 + 3.759 *width\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": "<matplotlib.text.Text at 0xa58bf60>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAERCAYAAABsNEDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nA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Jpk2baN++PQBt27YlODiYvn37smzZMvr27QtoJ9Zb\ntGgBQFxcHDY2NgAkJydTt25d6tWrx8GDB/XLCFHaSXAIUUR16tRh9+7d9O7dW/84NTVVfwgrMTER\nnU7HiRMnSEhIoEmTJmRkZJCcnMzBgwcBiIiIoHXr1kRERBAWFsYLL7wAaFdXtW3bliNHjpimcUIY\nQIJDiCKqV68eEydO1D92dXVlzJgx+sfZ2dlYWVmRnp7OyJEjCQkJITg4mEaNGulnB7SzsyMmJoak\npCSuXLlCp06dAKhfvz4RERF4enoat1FCPAaZyEkIIYRBpMchhBDCIBIcQgghDCLBIYQQwiASHEII\nIQwiwSGEEMIgEhxCCCEMIsEhhBDCIBIcQgghDPL/UBUfvjvs9zQAAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0xa171c50>"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-308"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The least squares estimates obtained from the normal equations\n\n# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\n\na = np.array([[10,2000], [2000,532000]])\nb = np.array([8.35,2175.40])\nx = np.linalg.solve(a, b)\n \n# Result\nprint \"a =\",round(x[0],3)\nprint \"b =\",round(x[1],5)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "a = 0.069\nb = 0.00383\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-311"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A confidence interval for the intercept\n\n# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\ns = (s3 - square(s2)/s1) / 8 # estimation of sigma square\ns = round(sqrt(s),3)\n\n# 95% confidence interval\nt_thr = 2.306 # at 0.025 and v = 8\n\ny1 = c - ( (t_thr)*s* sqrt(1.0/10 + square(sum(x)/10)/float(s1) ) )\ny1 = round(y1,3)\ny2 = c + ( (t_thr)*s* sqrt(1.0/10 + square(sum(x)/10)/float(s1) ) )\ny2 = round(y2,3)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( -0.164 , 0.302 )\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-311"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A test of hypothesis concerning the slope parameter\n\n# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nalpha = 0.05\nbeta = 0.0\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\ns3 = round(s3,5)\n\nt_thr = 2.306 # theoritical t-value t(0.025)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nSum_of_square = (s3 - square(s2)/s1)/8\nSe = sqrt(Sum_of_square)\nSe = round(Se,3)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\nt_prt = ((Slope)/Se)*sqrt(s1)\nt_prt = round(t_prt,2)\n\n# Result\nprint \"Practical t-value: \",t_prt\nif(t_prt > t_thr):\n print \"null hypothesis is rejected\"\n print \"Relationship between air velocity & average evaporation cofficient EXISTS\"\nelse:\n print \"null hypothesis is accepted\"\n print \"No Relationship between air velocity & average evaporation cofficient EXISTS\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical t-value: 8.75\nnull hypothesis is rejected\nRelationship between air velocity & average evaporation cofficient EXISTS\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-313"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A confidence interval for the mean response at x0 = 190\n\n# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nalpha = 0.05\nbeta = 0.0\nx0 = 190\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\ns3 = round(s3,5)\n\nt_thr = 2.306 # theoritical t-value t(0.025)\n\nSlope = s2/s1\n\nSum_of_square = (s3 - square(s2)/s1)/8\nSe = sqrt(Sum_of_square)\nSe = round(Se,3)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\ny1 = (c+Slope*x0) - (t_thr*Se)*sqrt(1.0/10 + ((x0-mean(x))**2)/float(s1)) # Lower limit\ny2 = (0.8) + (t_thr*Se)*sqrt(1.0/10 + ((x0-mean(x))**2)/float(s1)) # Lower limit\n\ny1 = round(y1,3)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in gallons): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in gallons): ( 0.68 , 0.92 )\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# 95% prediction limits for a future observation at x = 190\n\n# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nair_vel = 190 # air velocity in cm/s\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\n# 95% confidence interval\nt_thr = 2.306 # at 0.025 and v = 8\n\ns = (s3 - square(s2)/s1) / 8 # estimation of sigma square\ns = round(sqrt(s),3)\n\n# For x = 190 cm/s\nvalue = c + Slope*190\nvalue = round(value,2)\n\ny1 = value - ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny2 = value + ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 0.42 , 1.18 )\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The limits of prediction become wider if x_not is farther from x_bar\n\n# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nair_vel = 450 # air velocity in cm/s\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\n# 95% confidence interval\nt_thr = 2.306 # at 0.025 and v = 8\n\ns = (s3 - square(s2)/s1) / 8 # estimation of sigma square\ns = round(sqrt(s),3)\n\n# For x = 190 cm/s\ny1 = 1.79 - ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny2 = 1.79 + ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in mm(square)/s): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in mm(square)/s): ( 1.33 , 2.25 )\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-321"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A plot of logy versus x leads to filtering a straight line\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nl = array([[1,98.2],[2,91.7],[5,81.3],[10,64.0],[20,36.4],[30,32.6],[40,17.1],[50,11.3]]) \nx = l[:,0]\ny = l[:,1]\nlogy = log10(y)\n\nx_sum = sum(x)\nx_sq_sum = sum(square(x))\nlogy_sum = sum(logy)\nxlogy_sum = sum(x*logy)\n\ns1 = (x_sq_sum) - square(x_sum)/8.0\ns2 = (xlogy_sum) - (x_sum)*(logy_sum)/8.0\n\nscatter(x,logy)\n\ntitle(\"Logrithmic Graph\")\nxlabel(\"x\")\nylabel(\"logy\")\nc = 2.0002\nd = -0.0188\n# equation logy = c - d*x\n\nlogy = c - d*25\n\n# taking antilog y = 33.9%\n\n# Result\nprint \"% of high performance tries that will last at least 25000 miles: 33.9%\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "% of high performance tries that will last at least 25000 miles: 33.9%\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUlPWi//H3KKhcFJV0RMBMvMu1KDKlIPNaUqadlaYo\n7uPm2Nm5rV97WedkQcfULvu4uuxTp7zUVvcuXctO7mKT5nG8bS9tRawspQQFRXJU5CYC8vz+aPYc\nCRCHGB5GP6+1Zi2eeS7zGRc+H57n+zwzFsMwDERE5IbXzuwAIiLSNqgQREQEUCGIiIiDCkFERAAV\ngoiIOKgQREQEUCHIdWzu3LksWrSo0flpaWnMmDGjRV7rxIkTdO7cGU+5irtdu3YcO3bM7BjSxqgQ\npNX17duXLVu2uP113n77bZ577jkAbDYboaGhdeZbLJYWe60+ffpQWlrarG0WFhYyZ84cgoOD6dy5\nM2FhYaSkpHDkyJEWyydyLVQI0uosFkuL7owbUltb2+QybeGv+bNnz3LXXXdRWVnJzp07KS0t5cCB\nA9xzzz1s3ry5wXVqampaOaXcKFQI0mZcunSJ+fPnExwcTHBwME8++SRVVVXO+a+88gq9e/cmJCSE\n5cuX1zntMWvWLObOncuECRPw9/dn69atzJo1i4ULF1JRUcH48eM5deoUnTt3pkuXLhQWFmKxWKiq\nqmLmzJl06dKF8PBw9u/f73y9vn378tprrxEZGUnnzp351a9+RVFREePHjycgIIDRo0dTXFwMQF5e\nHu3atXMW0blz50hJSSE4OJju3bszadKkBt/zsmXL6Nq1K6tXr+aWW24BICAggFmzZvGb3/ymzrZX\nrlzJzTffzH333QfAI488QlBQEF27duWee+7h8OHDzu3OmjWLf/mXf2HMmDF06dKFhIQETpw4Uee1\nN2/ezMCBA+nWrZvzteTGpkKQNuOll15i3759ZGdnk52dzb59+5xjAJmZmSxbtowtW7aQk5ODzWar\nt/6f//xnFi5cSFlZGSNHjnQeifj6+pKZmUnv3r0pLS2lpKSEoKAgDMNg48aNTJ06lQsXLpCUlFRn\nx2ixWNiwYQNbtmzhyJEjfPrpp4wfP56lS5fy448/UltbyxtvvNHge5kxYwaVlZUcPnyYH3/8kaee\neqrB5b744otGy+Lntm/fznfffcfnn38OwP3338/333/PmTNnuPXWW3nsscfqLP+nP/2J559/Hrvd\nTnR0dL35n332GX//+985dOgQ69atc25XblwqBGkz/rEDu+mmm7jpppt44YUXWL16NQDr1q1j9uzZ\nDBkyBB8fH9LT0+ut/9BDDzF8+HAAOnbsCPzfaaHGTg/Fx8czbtw4LBYL06dPJzs7u878J554gh49\netC7d2/i4+MZPnw4UVFRdOzYkUmTJpGVlVVvm4WFhWRmZvLOO+8QEBCAl5cX8fHxDb7+2bNn6dWr\nl3N648aNdOvWjS5dujB27Ng6y6alpeHj4+N8b7NmzcLPzw9vb29eeOEFsrOzKS0tdS7/wAMPMHLk\nSDp06MBLL73E7t27OXnypHP+M888Q5cuXQgNDSUxMZGDBw82mFFuHCoEaTNOnTrFzTff7Jzu06cP\np06dAn7ayV45KBwSElJnXYvFUm/Q+FpYrVbnz76+vlRWVtYZf7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bpd5\n7bXXOHr0KO+++66744iISAO83P0CZWVlTJkyhddff73RMti6dSsrV65k165d7o4jIiKNMdyoqqrK\nGDNmjLFs2bJGl8nOzjbCwsKMnJycRpcJCwszAD300EMPPVx4hIWFubTPdlsh1NbWGjNmzDDmz5/f\n6DLHjx83wsLCjN27d191W+DW3nK7F154wewIzebJ2Q1D+c2m/OZydd/ptlNGu3btYs2aNURGRhIT\nEwPA4sWLnZ+4mJqayosvvsj58+eZO3cu8NOVSfv27XNXJBERuQq3FcLIkSOb/Ez65cuXs3z5cndF\nEBERF+gi7laQkJBgdoRm8+TsoPxmU37P0iqXnf5SFotFN9qIiLjI1X2njhBERARQIYiIiIMKQURE\nABWCiIg4qBBERARQIYiIiIMKQUREABWCiIg4qBBERARQIYiIiIMKQUREABWCiIg4qBBERARQIYiI\niIMKQUREABWCiIg4qBBERARQIYiIiIMKQUREABWCiIg4qBBERARQIYiIiIMKQUREABWCiIg4qBBE\nRARQIYiIiIPbCiE/P5/ExESGDRtGeHg4b7zxRoPLzZs3jwEDBhAVFUVWVpa74oiISBO83LVhb29v\nli1bRnR0NGVlZdx2222MHj2aIUOGOJfJyMjg+++/Jycnh7179zJ37lz27NnjrkgiInIVbjtC6NWr\nF9HR0QD4+/szZMgQTp06VWeZjRs3MnPmTADi4uIoLi6mqKjIXZFEROQq3HaEcKW8vDyysrKIi4ur\n8/zJkycJDQ11ToeEhFBQUIDVam2NWK2upqaG9evXU1RUxIgRI7j99tvNjiQi4uT2QigrK2PKlCm8\n/vrr+Pv715tvGEadaYvF4u5IpqipqSEx8QGyssqpqYmmXbuXefvtV5g5c4bZ0UREADcXQnV1NZMn\nT2b69Ok89NBD9eYHBweTn5/vnC4oKCA4OLjBbaWlpTl/TkhIICEhoaXjutWnn37KwYPFlJfvAtoD\nqTz+eDzJydOv2xIUkdZls9mw2WzNXt9i/PxP9BZiGAYzZ84kMDCQZcuWNbhMRkYGb731FhkZGezZ\ns4f58+c3OKhssVjqHUl4muXLl/Pb3+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ETEQYUgIiKACkFERBxUCCIiAqgQRETEQYUgIiIA/H9+2O13FE9f2AAAAABJ\nRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x830b1d0>"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-324"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Fitting a quadratic function by the method of least squares\n\n# Variable Declaration\nl = array([[0,12.0],[1,10.5],[2,10.0],[3,8.0],[4,7.0],[5,8.0],[6,7.5],[7,8.5],[8,9.0]]) \nX = 6.5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\n%matplotlib inline\n\nx = l[:,0]\ny = l[:,1]\n\nx_sum = sum(x)\nx_sq_sum = sum(square(x))\nx_cube_sum = sum(square(x)*x)\nx_four_sum = sum(square(x)*square(x))\n\ny_sum = sum(y)\nxy_sum = sum(x*y)\nx2y_sum = sum(x*x*y)\n\na = np.array([[9,x_sum,x_sq_sum], [x_sum,x_sq_sum,x_cube_sum],[x_sq_sum,x_cube_sum,x_four_sum]])\nb = np.array([y_sum,xy_sum,x2y_sum])\nval = np.linalg.solve(a, b)\nval[0] = round(val[0],1)\nval[1] = round(val[1],2)\nval[2] = round(val[2],3)\n\nscatter(x,y)\ntitle(\"Scatter plot\")\nxlabel(\"x\")\nylabel(\"y\")\n\n# Result\nprint \"Least square polynomial: y=\",val[0],val[1],\"*x(1)+\",val[2],\"*x(2)\"\n# for x = 6.5\nprint \"y =\",round(val[0] + val[1]*X + val[2]*(X**2),1),\"hours\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Least square polynomial: y= 12.2 -1.85 *x(1)+ 0.183 *x(2)\ny = 7.9 hours\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEZCAYAAAB2Ao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qVbr99tudjuWIli1bqmXLlrrqqqskSUOGDFF2drbD\nqZyxceNG9ezZU40bN1ZQUJAGDx6stWvXOh2rSpT9j3Tr1k3ffvutcnJydPLkSS1cuFADBw50OpYj\njDEaM2aMEhISdP/99zsdx1FPPfWUcnNztWfPHmVmZuo3v/mN5s2b53QsR5x7YaSkKi+MtEV8fLzW\nrVunkpISGWO0cuVKJSQkOB2rSj6/gtbfBQUF6aWXXtL111+vsrIyjRkzxtpvGnz22WeaP3++rrzy\nSiUnJ0s68zWz3/72tw4nc57t030zZ87U8OHDK10YaaPOnTvr9ttvV7du3RQQEKCuXbtq3LhxTseq\nEhdVAYAFmMYBAAtQ9gBgAcoeACxA2QOABSh7ALAAZQ8AFqDsAcAClD0AWICyB2pgw4YN6ty5s0pL\nS1VUVKROnTpp+/btTscCaowraIEamjRpkk6cOKGSkhLFxMRo4sSJTkcCaoyyB2ro1KlT6tatm+rW\nravPP//c+vVxULswjQPUUH5+voqKilRYWKiSkhKn4wCXhJE9UEMDBw5UamqqvvvuOx08eFAzZ850\nOhJQYyxxDNTAvHnzVKdOHd16660qLy9Xz5495fF45Ha7nY4G1AgjewCwAHP2AGAByh4ALEDZA4AF\nKHsAsABlDwAWoOwBwAKUPQBYgLIHAAv8L3WN15N/euJVAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x82f1080>"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-327"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A multiple regression with two predictor variables\n\n# Variable declaration\nl = array([[41,1,5],[49,2,5],[69,3,5],[65,4,5],[40,1,10],[50,2,10],[58,3,10],\n [57,4,10],[31,1,15],[36,2,15],[44,3,15],[57,4,15],[19,1,20],[31,2,20],\n [33,3,20],[43,4,20]])\nX1 = 2.5\nX2 = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\n \ny = l[:,0]\nx1 = l[:,1]\nx2 = l[:,2]\n\nx1_sum = sum(x1)\nx1_sq_sum = sum(square(x1))\nx2_sum = sum(x2)\nx2_sq_sum = sum(square(x2))\nx1x2_sum = sum(x1*x2)\n\ny_sum = sum(y)\nx1y_sum = sum(x1*y)\nx2y_sum = sum(x2*y)\n\na = np.array([[16,x1_sum,x2_sum], [x1_sum,x1_sq_sum,x1x2_sum],[x2_sum,x1x2_sum,x2_sq_sum]])\nb = np.array([y_sum,x1y_sum,x2y_sum])\nval = np.linalg.solve(a, b)\nval[0] = round(val[0],1)\nval[1] = round(val[1],2)\nval[2] = round(val[2],2)\n\n# Result\nprint \"Estimated regression plane: y=\",val[0],\"+\",val[1],\"*x1\",val[2],\"*x2\"\nprint \"y =\",round(val[0] + val[1]*X1 + val[2]*X2,1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Estimated regression plane: y= 46.4 + 7.78 *x1 -1.65 *x2\ny = 46.0\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-336"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the sample correlation coefficient \n\n# Variable Declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nl = array([[11.1,10.9],[10.3,14.2],[12.0,13.8],[15.1,21.5],[13.7,13.2],[18.5,21.1],[17.3,16.4],[14.2,19.3],[14.8,17.4],[15.3,19.0]])\nx = l[:,0]\ny = l[:,1]\n\nscatter(x,y)\ntitle(\"y Vs x\")\nxlabel(\"$x$\")\nylabel(\"$y$\")\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\n# correlation coefficient\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\n\n# Result\nprint \"correlation coefficient: \",r",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "correlation coefficient: 0.732\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEZCAYAAACaWyIJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHT1JREFUeJzt3XtQVfeh9vFno6Ao4g3doqigBkVBMFTwEsz2VYxaNUaN\nrZwgETt5m+k5jk1iNHmnjTFH8TLWaFpTa2M0Mb2YmzonhsaIG00bKl7GoDUHjRLwgkbEC2Lktt4/\nknLKARK5LNaG9f3M7Bn87c3ezxrjevJbv7XWdhiGYQgAYFteVgcAAFiLIgAAm6MIAMDmKAIAsDmK\nAABsjiIAAJujCADA5igCoBYTJ07UCy+8UG18165dCgwMVEVFhQWpgMZHEQC1ePzxx7V9+/Zq42++\n+aYee+wxeXnxzwctA/8lw1bWrFmjWbNmVRlbsGCBFi5cWO21Dz/8sAoKCnTw4MHKscLCQn3wwQea\nO3euJGnPnj0aMmSI/P39FRQUpLVr19b4uU8++WSVz128eLHGjx/fGJsENJiDW0zATvLz8zVgwABd\nuHBBHTt2VFlZmXr16qXU1FQNGzas2uufeOIJGYahzZs3S5I2bdqkTZs26ejRo5KkwMBAvfPOOxo9\nerRu3Lihs2fP1vg+d+7cUVRUlJ5//nn169dPM2bM0PHjx9WzZ09zNxi4B8wIYCs9evRQXFyc3n77\nbUlSamqqunXrVuPOW5KSkpL0zjvvqKSkRJL0xhtvKCkpqfJ5Hx8fnTx5Ujdv3lTHjh1rfR9fX1+9\n+eab+vnPf67ExET9+te/pgTgMSgC2E5SUlLlsf/t27crMTGx1teOHj1aAQEBev/99/XFF18oMzNT\nCQkJlc+/++672rNnj4KDg+VyuZSRkVHre8XExKhfv36SpEcffbSRtgZoOA4NwXbu3LmjXr166cCB\nAxo5cqROnTqloKCgWl//0ksvKSMjQz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AeKTu3TvL\ny+u/K//scGSrW7cuFiZquTh9FIBHOnv2rKKjH9CdOxNlGN5q0+Z9ffrpfg0ZMsTqaB7NI08fTU5O\nltPpVERERJXxV155RWFhYQoPD9fixYvNjgGgmenXr59OnjysVasilZIyUFlZmZSASUyfERw8eFB+\nfn6aO3eusrKyJEn79+/XihUrtGfPHnl7e+urr75St27dqodjRgAAdeKRM4K4uDh17ty5ytirr76q\n5557Tt7e3pJUYwkAAJqGJYvFp0+f1oEDBzRixAi5XC4dPnzYihgAAN3D3UfNUFZWpsLCQmVkZCgz\nM1OzZ8/W2bNna3zt0qVLK392uVxyuVxNExIAmgG32y23292g92iSs4ZycnI0derUyjWCSZMmacmS\nJXrwwQclSQMGDNDf//53de3atWo41ggAoE48co2gJtOnT1daWpokKTs7WyUlJdVKAADQNEw/NDRn\nzhylp6eroKBAvXv31rJly5ScnKzk5GRFRETIx8dHb7zxhtkxAAC14IIyAGhBms2hIQCA56AIAMDm\nKAIAsDmKAABsjiIAAJujCADA5igCALA5igAAbI4iAACbowgAwOYoAgCwOYoAAGyOIgAAm6MIAMDm\nKAIAsDmKAABsjiIAAJujCADA5igCALA5igAAbI4iAACbowg8zO3bt5WY+H/ldPbX4MGxOnjwoNWR\nALRwDsMwDKtD1MbhcMiD45nikUf+TampZfr662WSTqhdu5/q2LG/KjQ01OpoAJqB+uw3TZ8RJCcn\ny+l0KiIiotpza9eulZeXl65du2Z2jGbBMAz913+9p6+/3ixpoKSZqqiYoY8++sjqaABaMNOLYN68\neUpNTa02npeXp71796pv375mR2g2HA6H2rb1k3ShcqxVqwvy8/OzLhSAFs/0IoiLi1Pnzp2rjT/1\n1FNavXq12R/f7KSkLFO7dpMlpahNm39Tjx65mjVrltWxALRgra340F27dikoKEhDhw614uM92r//\n+5MaMCBEH32UJqczUk8++SozAgCmavIiKC4u1ooVK7R3797Kse9a2Fi6dGnlzy6XSy6Xy8R0nmHi\nxImaOHGi1THqpbCwUG+88YZu376tH/7wh4qMjLQ6Et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43AwEDD29vbCAoKMrZs2WIUFBQY48aNM+677z4jPj7e\nKCwstDpmvf3v7XvttdeMAQMGGH369DGioqKMqKgo48knn7Q6Zr38c9t8fHwq/+7+VUhISLM+a6im\n7SspKTEee+wxIzw83Lj//vuN/fv3Wx2z3mr6t5eZmWnExMQYkZGRxogRI4yjR49aHbPeDh48aDgc\nDiMyMrLy39qHH35Y5/0LF5QBgM153KEhAEDToggAwOYoAgCwOYoAAGyOIgAAm6MIAMDmKAIAsDmK\nAABsjiIAAJuz5MvrgeaovLxcf/7zn3X27Fn17t1bhw4d0tNPP61+/fpZHQ1oEGYEwD06fvy4Zs6c\nqX79+qmiokKPPvqoAgMDrY4FNBhFANyj+++/X23atNGnn34ql8sll8slX19fq2MBDUYRAPcoMzNT\nV69e1YkTJxQSEqKDBw9aHQloFKwRAPcoNTVVTqdTo0eP1vvvv6+AgACrIwGNgttQA4DNcWgIAGyO\nIgAAm6MIAMDmKAIAsDmKAABsjiIAAJujCADA5igCALC5/w+Y+pI4hoLlSQAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x83248d0>"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-337"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Exploring the interpreting correlation \n\n# Variable Declaration\nl = array([[250,19],[290,10],[270,17],[100,11],[300,70],[410,60],[110,18],[130,30],[1100,180]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nx = l[:,0]\ny = l[:,1]\n\n\nfigure()\nscatter(x,y)\ntitle(\"y Vs x\")\nxlabel(\"$x$\")\nylabel(\"$y$\")\n\ns1 = sum(square(x)) - square(sum(x))/9.0\ns2 = sum(x*y) - (sum(x)*sum(y))/9.0\ns3 = sum(square(y)) - square(sum(y))/9.0\n\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\nprint \"correlation coefficient: \",r\n\nfor i in range(0,9):\n for j in range(0,2):\n l[i,j] = math.log(l[i,j])\n\nlnx = l[:,0]\nlny = l[:,1]\n \nfigure() \nscatter(lnx,lny)\ntitle(\"lny Vs lnx\")\nxlabel(\"$lnx$\")\nylabel(\"$lny$\")\n\ns1 = sum(square(lnx)) - square(sum(lnx))/9.0\ns2 = sum(lnx*lny) - (sum(lnx)*sum(lny))/9.0\ns3 = sum(square(lny)) - square(sum(lny))/9.0\n\n# correlation coefficient\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\nprint \"correlation coefficient: \",r",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "correlation coefficient: 0.942\ncorrelation coefficient: "
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " 0.75\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEZCAYAAACAZ8KHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG5dJREFUeJzt3X1UlHX+//HXJFgIopUyIGAgoIgS2hrWmr+lFN32q2Ra\nlBSQ2dbPtntrdT1baZ0Et9Nu93usdCXtZGbrzSnjy2pLeVLCvNuU9ocZFoLQeoOJkiB8fn/UzslE\n7aMzXAw+H+fMOXDNzHW93rs2L66bmXEZY4wAAPiZznM6AADAv1AcAAArFAcAwArFAQCwQnEAAKxQ\nHAAAKxQHAMAKxQFY+vWvf63HH3/8hOUrVqxQRESEWlpaHEgFtB2KA7B02223adGiRScsX7hwoW69\n9Vaddx7/WaFj4184IOnpp5/WDTfccNyy++67Tw888MAJj73uuuu0b98+rV271rPswIEDeu+995ST\nkyNJWrVqlQYMGKDQ0FBFRUXpmWeeaXW7U6ZMOW6706ZN08iRI70xEuAzLj5yBJBqamoUHx+vqqoq\ndevWTceOHVNkZKQKCws1ePDgEx5/5513yhijV199VZI0d+5czZ07V5s2bZIkRUREa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KVVP51v3rx5Jj4+3vTu3dvz+jJlyhTP4701H28ABABY8ZtD\nVQCA9oHiAABYoTgAAFYoDgCAFYoDAGCF4gAAWKE4AABWKA4AgBWKAwBgpd195zjgj5qbm/XWW2/p\nyy+/VHR0tEpLSzV16lT16dPH6WiA17HHAXjB1q1bNWHCBPXp00ctLS268cYbFRER4XQswCcoDsAL\nLrvsMp1//vlav3690tLSlJaWpqCgIKdjAT5BcQBesGHDBu3du1fbtm1TbGys1q5d63QkwGc4xwF4\nQWFhodxut4YNG6Zly5apR48eTkcCfIaPVQcAWOFQFQDACsUBALBCcQAArFAcAAArFAcAwArFAQCw\nQnEAAKxQHAAAK/8fTzPmMmhpWdwAAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x7adab00>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEbCAYAAADERMP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH35JREFUeJzt3Xt0VPXB7vFnh2DJBIikQsAklhBwkXBJJiDDOgYZKqBQ\n0VCQUy4hXvBNqZSC4lJ6cBEr0r7iDYqLplrxRdrSiqJRJhxBHeQWQkNAhS65FEqCnlEsiYSENyHZ\n5w/LvAxJNpkAeyby/ayVtTJ7/7Ln8afuJ/u3ZzKGaZqmAABoRkSoAwAAwhtFAQCwRFEAACxRFAAA\nSxQFAMASRQEAsERR4DutZ8+eev/990Mdo1mvvvqqhg0bFuoYgCWKAt9phmHIMIzLeszbb79dCxcu\nbLT97bffVo8ePdTQ0HBZnw8INYoCCNI999yj1atXN9r+2muvadq0aYqI4H8rfLfwXzSuGnl5eZo0\naZJycnLUuXNn9e/fXyUlJZKkJUuWaOLEiQHjZ8+erTlz5jQ6zl133aWvv/5aW7Zs8W87efKk1q9f\nr+nTp0uSPB6P+vXrp86dOyshIUHPPvtsizJGREQoPz9fN954o7p06aJZs2b5982cOTMg46OPPqqR\nI0e2fAKA1jKB77CePXua77//vmmaprlw4UKzQ4cOZmFhodnQ0GDOnz/fHDp0qGmapvn555+b0dHR\nZkVFhWmapllXV2d269bN3L17d5PHfeCBB8wZM2b4H//ud78znU6n/3H37t3NrVu3mqZpmhUVFc0e\nZ+XKlWZmZqb/sWEY5rhx48zKykrz2LFjZteuXc0NGzaYpmma1dXV5o033mi++uqr5kcffWRed911\n5vHjx1s7NUCLcUWBq8qwYcN0++23yzAMTZs2TXv37pUk9ejRQ8OGDdPrr78uSdqwYYO6du0qp9PZ\n5HFycnK0du1a1dbWSpJWrVqlnJwc//5rrrlG+/bt0zfffKOYmJhmj9OUxx57TJ07d1ZiYqJGjBih\nPXv2SJKioqL02muvae7cucrOztby5ct1/fXXt2oegGBQFLiqxMXF+b93OBw6c+aM/+ZzTk6O/97D\n6tWrlZ2d3exxbr75Zl133XVat26dDh8+rF27dmnKlCn+/W+88YY8Ho969uwpt9utoqKiFmfs3r17\nQMaqqir/4yFDhqhXr16SpLvvvrvFxwQuBUUB/Ntdd92ljz/+WJ9++qnWr1+vqVOnWo6fPn26Vq1a\npdWrV+v2229X165d/fsGDx6st956S1999ZWysrI0adKky5LxxRdfVG1tra6//no9/fTTl+WYwMVE\nhjoAEC6ioqI0YcIETZkyRS6XSwkJCZbjp0+frieffFIff/yxXnjhBf/2uro6/fWvf9Udd9yhmJgY\nderUSe3atWtVJvO8TwE4cOCAHn/8cW3evFlRUVEaMmSIxowZo7S0tFYdG2gprihw1WjqPRUXPs7J\nydGnn35quex0zg9+8APdfPPNqq6u1p133hmwb/Xq1UpKSlJMTIx+//vf649//GOLMjWVzzAM1dfX\nKzs7W4899pgGDBig3r17a/HixcrOzlZdXd1FswKXwjBNez+4qGfPnurcubPatWun9u3bq7i4OGC/\n1+vVXXfd5V+HnTBhghYsWGBnRFzFysrK1LdvX/l8PnXs2DHUcYCwYPvSk2EY8nq9io2NbXbM8OHD\nVVBQYGMqQGpoaNCzzz6ryZMnUxLAeUJyj+JiF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V14Ju/lsSc5wmc/Tp09r06ZNAfelwnE+L5Yz2PnkDXcAAEthu/QEAAgPFAUAwBJFAQCw\nRFEAACxRFAAASxQFAMASRQEAsERRAAAsURRAK8ybN0+PP/54qGMAtgjbP+EBhLPk5GTdcMMNoY4B\n2IIrCqAViouLm/2oVuC7hisKoBW+/PJLffbZZ3rqqac0fPhwSdK+ffu0YMEC1dfX6y9/+Yv+8Y9/\nKDExUcXFxXr44YfVq1evEKcGWocrCiBIlZWV6tKli/9xQkKCxo8fr4MHD0qS9u7dqwkTJqhXr15q\naGjQ3Xff7f/8CqAtoiiAIO3atUsul0uZmZk6fPiwbrrpJlVWVioy8tsL9IyMDH3ve9/Tjh075Ha7\n5Xa7FRUVFeLUQOtRFECQSkpKNGjQIK1fv14dOnSQJHk8Ho0aNUo7duzQrl27dOLECX366adKSkpq\n8uNcgbaEogCClJycrK1btyouLs5/f6JTp07y+XxKSEjQhg0b9Oabb+rmm2/WunXrQpwWuHR8cBEA\nwBJXFAAASxQFAMASRQEAsERRAAAsURQAAEsUBQDAEkUBALBEUQAALP1/Eh+4mLI0G8oAAAAASUVO\nRK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x9a93f28>"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-339"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the proportion of y variation attributed to the linear relation.\n\n# Variable Declaration\nl = array([[11.1,10.9],[10.3,14.2],[12.0,13.8],[15.1,21.5],[13.7,13.2],[18.5,21.1],[17.3,16.4],[14.2,19.3],[14.8,17.4],[15.3,19.0]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\n# correlation coefficient\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\n\n# Result\nprint \"around\",round(100*(r**2),1),\"% of the variation among the afternoon times is explained by the corresponding differenced among the morning times.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "around 53.6 % of the variation among the afternoon times is explained by the corresponding differenced among the morning times.\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-341"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing for non zero correlation in a normal polulation\n\n# Variable declaration\nr = 0.732 # correlation coff;\nn = 10 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# 95% confidence interval\nZ1 = 0.5*math.log((1+r)/(1-r)) # Z value corresponds to r=0.7\nz_prt = sqrt(n-3)*Z1\n\nz_thr = 1.96 # at 0.025\n\n# Result\nprint \"Practical Z-value: \",round(z_prt,2)\nif(z_prt > z_thr):\n print \"null hypothesis must be rejected\"\n print \"Relationship between morning & afternoon times it takes a mechanic to assemble the machinery, EXISTS\"\nelse:\n print \"null hypothesis is accepted\"\n print \"Relationship between morning & afternoon times it takes a mechanic to assemble the machinery, does not EXIST\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical Z-value: 2.47\nnull hypothesis must be rejected\nRelationship between morning & afternoon times it takes a mechanic to assemble the machinery, EXISTS\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-342"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# determining a confidence interval for normal population\n\n# Variable declaration\nr = 0.70 # correlation coff;\nn = 30 # number of students\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# 95% confidence interval\nZ = 0.5*log((1+r)/(1-r))\nZ = 0.5*math.log((1+r)/(1-r)) # Z value corresponds to r=0.7\n\nz_thr = 1.96 # at 0.025\n\nu1 = Z - (z_thr) / sqrt(27)\nu2 = Z + (z_thr) / sqrt(27)\n\ny1 = (exp(u1) - exp(-u1)) / (exp(u1) + exp(-u1))\ny2 = (exp(u2) - exp(-u2)) / (exp(u2) + exp(-u2))\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval for normal population: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval for normal population: ( 0.45 , 0.85 )\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-346"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the least squares estimates using (X'X)-1X'Y\n\n# Variable declaration\nn = 16\nX1 = 2.5\nX2 = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\nfrom numpy import matrix\n\nl = array([[41,1,5],[49,2,5],[69,3,5],[65,4,5],[40,1,10],[50,2,10],[58,3,10],\n [57,4,10],[31,1,15],[36,2,15],[44,3,15],[57,4,15],[19,1,20],[31,2,20],\n [33,3,20],[43,4,20]])\ny = l[:,0]\nx1 = l[:,1]\nx2 = l[:,2]\n\nx1_sum = sum(x1)\nx1_sq_sum = sum(square(x1))\nx2_sum = sum(x2)\nx2_sq_sum = sum(square(x2))\nx1x2_sum = sum(x1*x2)\n\ny_sum = sum(y)\nx1y_sum = sum(x1*y)\nx2y_sum = sum(x2*y)\n\nA = matrix([[n,x1_sum,x2_sum],[x1_sum,x1_sq_sum,x1x2_sum],[x2_sum,x1x2_sum,x2_sq_sum]])\nA = A.I\n\n\nB = matrix([[y_sum],[x1y_sum],[x2y_sum]])\n\nb = A*B\n\n# Result\nprint \"Least square estimates of multiple regression coefficients\",b",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Least square estimates of multiple regression coefficients [[ 46.4375]\n [ 7.775 ]\n [ -1.655 ]]\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-348"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Fitting a straight line using the matrix formulas \n\n# Variable declaration\nn = 5\nk = 1\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\nfrom numpy import matrix\n\nX = matrix([[1,0],[1,1],[1,2],[1,3],[1,4]])\nY = matrix([[8],[9],[4],[3],[1]])\n\nXT = X.T\n\nXTX = XT*X\nXTXI = XTX.I\nXTY = XT*Y\n\nb = XTXI*XTY\n\nY1 = X*b\nMMT = ((Y-Y1).T)*(Y-Y1)\nMMT = int(MMT)\n\nSe_square = (1.0/(n-k-1))*MMT \n\n# Result\nprint \"Se Square value: \",Se_square",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Se Square value: 2.0\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-349"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Estimating the varaince of the least squares estimators\n\n# Variable declaration\nn = 5\nk = 1\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\nfrom numpy import matrix\n\nX = matrix([[1,0],[1,1],[1,2],[1,3],[1,4]])\nY = matrix([[8],[9],[4],[3],[1]])\n\nXT = X.T\n\nXTX = XT*X\nXTXI = XTX.I\nXTY = XT*Y\n\nb = XTXI*XTY\n\nY1 = X*b\nMMT = ((Y-Y1).T)*(Y-Y1)\nMMT = int(MMT)\n\nSe_square = (1.0/(n-k-1))*MMT \n\nFinal = Se_square*XTXI\n\n# Result\nprint \"var(bo): \",float(Final[0,0])\nprint \"var(b1): \",float(Final[1,1])",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "var(bo): 1.2\nvar(b1): 0.2\n"
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11_1.ipynb
new file mode 100755
index 00000000..1ea2936c
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter11_1.ipynb
@@ -0,0 +1,466 @@
+{
+ "metadata": {
+ "name": "Chapter11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 11: Regression Analysis"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-305"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nx = l[:,0]\ny = l[:,1]\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\n# For x = 190 cm/s\nvalue = c + Slope*190\nvalue = round(value,2)\n\nSum_of_square = s3 - square(s2)/s1\nSum_of_square = round(Sum_of_square,5)\n\n# Result\nprint \"Evaporation coefficient: \",value,\"mm(square)/s\"\nprint \"sum of squares: \",Sum_of_square",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Evaporation coefficient: 0.8 mm(square)/s\nsum of squares: 0.20238\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-306"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 50\nMeanx = 88.34\nMeany = 305.58\ns1 = 7239.22\ns2 = 17840.1\ns3 = 66975.2\nx = []\nfor i in range(60,120):\n x.append(i)\n \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nx = array(x)\nSlope1 = s2/s1\nSlope1 = round(Slope1,3)\n\nc1 = Meany - (s2/s1)*Meanx\nc1 = round(c1,2)\n\n\nSlope2 = s2/s3\nSlope2 = round(Slope2,3)\n\nc2 = Meanx - (s2/s3)*Meany\n \n# Result\nprint \"Part-A: \",\"Height = \",c1,\"+\",Slope1,\"*width\"\nprint \"Part-B: \",\"Height = \",round(-c2/Slope2,2),\"+\",round(1/Slope2,3),\"*width\"\n\nplot(x,c1+Slope1*x)\nplot(x,-c2/Slope2 + x/Slope2)\nlegend(['height = 87.88 + 2.464*width', 'height = -26.11 + 3.759*width'])\nxlabel(\"$Width$\")\nylabel(\"$Height$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part-A: Height = 87.88 + 2.464 *width\nPart-B: Height = -26.1 + 3.759 *width\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": "<matplotlib.text.Text at 0xa58bf60>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAERCAYAAABsNEDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJz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27QtoJ9Zb\ntGgBQFxcHDY2NgAkJydTt25d6tWrx8GDB/XLCFHaSXAIUUR16tRh9+7d9O7dW/84NTVVfwgrMTER\nnU7HiRMnSEhIoEmTJmRkZJCcnMzBgwcBiIiIoHXr1kRERBAWFsYLL7wAaFdXtW3bliNHjpimcUIY\nQIJDiCKqV68eEydO1D92dXVlzJgx+sfZ2dlYWVmRnp7OyJEjCQkJITg4mEaNGulnB7SzsyMmJoak\npCSuXLlCp06dAKhfvz4RERF4enoat1FCPAaZyEkIIYRBpMchhBDCIBIcQgghDCLBIYQQwiASHEII\nIQwiwSGEEMIgEhxCCCEMIsEhhBDCIBIcQgghDPL/UBUfvjvs9zQAAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0xa171c50>"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-308"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\n\na = np.array([[10,2000], [2000,532000]])\nb = np.array([8.35,2175.40])\nx = np.linalg.solve(a, b)\n \n# Result\nprint \"a =\",round(x[0],3)\nprint \"b =\",round(x[1],5)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "a = 0.069\nb = 0.00383\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-311"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\ns = (s3 - square(s2)/s1) / 8 # estimation of sigma square\ns = round(sqrt(s),3)\n\n# 95% confidence interval\nt_thr = 2.306 # at 0.025 and v = 8\n\ny1 = c - ( (t_thr)*s* sqrt(1.0/10 + square(sum(x)/10)/float(s1) ) )\ny1 = round(y1,3)\ny2 = c + ( (t_thr)*s* sqrt(1.0/10 + square(sum(x)/10)/float(s1) ) )\ny2 = round(y2,3)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( -0.164 , 0.302 )\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-311"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nalpha = 0.05\nbeta = 0.0\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\ns3 = round(s3,5)\n\nt_thr = 2.306 # theoritical t-value t(0.025)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nSum_of_square = (s3 - square(s2)/s1)/8\nSe = sqrt(Sum_of_square)\nSe = round(Se,3)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\nt_prt = ((Slope)/Se)*sqrt(s1)\nt_prt = round(t_prt,2)\n\n# Result\nprint \"Practical t-value: \",t_prt\nif(t_prt > t_thr):\n print \"null hypothesis is rejected\"\n print \"Relationship between air velocity & average evaporation cofficient EXISTS\"\nelse:\n print \"null hypothesis is accepted\"\n print \"No Relationship between air velocity & average evaporation cofficient EXISTS\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical t-value: 8.75\nnull hypothesis is rejected\nRelationship between air velocity & average evaporation cofficient EXISTS\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-313"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nalpha = 0.05\nbeta = 0.0\nx0 = 190\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\ns3 = round(s3,5)\n\nt_thr = 2.306 # theoritical t-value t(0.025)\n\nSlope = s2/s1\n\nSum_of_square = (s3 - square(s2)/s1)/8\nSe = sqrt(Sum_of_square)\nSe = round(Se,3)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\ny1 = (c+Slope*x0) - (t_thr*Se)*sqrt(1.0/10 + ((x0-mean(x))**2)/float(s1)) # Lower limit\ny2 = (0.8) + (t_thr*Se)*sqrt(1.0/10 + ((x0-mean(x))**2)/float(s1)) # Lower limit\n\ny1 = round(y1,3)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in gallons): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in gallons): ( 0.68 , 0.92 )\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nair_vel = 190 # air velocity in cm/s\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\n# 95% confidence interval\nt_thr = 2.306 # at 0.025 and v = 8\n\ns = (s3 - square(s2)/s1) / 8 # estimation of sigma square\ns = round(sqrt(s),3)\n\n# For x = 190 cm/s\nvalue = c + Slope*190\nvalue = round(value,2)\n\ny1 = value - ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny2 = value + ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 0.42 , 1.18 )\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[20,0.18],[60,0.37],[100,0.35],[140,0.78],[180,0.56],[220,0.75],[260,1.18],[300,1.36],[340,1.17],[380,1.65]])\nair_vel = 450 # air velocity in cm/s\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\ns3 = round(s3,5)\n\nSlope = s2/s1\nSlope = round(Slope,5)\n\nc = sum(y)/10.0 - Slope*sum(x)/10.0\nc = round(c,3)\n\n# 95% confidence interval\nt_thr = 2.306 # at 0.025 and v = 8\n\ns = (s3 - square(s2)/s1) / 8 # estimation of sigma square\ns = round(sqrt(s),3)\n\n# For x = 190 cm/s\ny1 = 1.79 - ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny2 = 1.79 + ( (t_thr)*s* sqrt(1 + 1.0/10 + square(air_vel - sum(x)/10.0)/float(s1) ) )\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in mm(square)/s): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in mm(square)/s): ( 1.33 , 2.25 )\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-321"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nl = array([[1,98.2],[2,91.7],[5,81.3],[10,64.0],[20,36.4],[30,32.6],[40,17.1],[50,11.3]]) \nx = l[:,0]\ny = l[:,1]\nlogy = log10(y)\n\nx_sum = sum(x)\nx_sq_sum = sum(square(x))\nlogy_sum = sum(logy)\nxlogy_sum = sum(x*logy)\n\ns1 = (x_sq_sum) - square(x_sum)/8.0\ns2 = (xlogy_sum) - (x_sum)*(logy_sum)/8.0\n\nscatter(x,logy)\n\ntitle(\"Logrithmic Graph\")\nxlabel(\"x\")\nylabel(\"logy\")\nc = 2.0002\nd = -0.0188\n# equation logy = c - d*x\n\nlogy = c - d*25\n\n# taking antilog y = 33.9%\n\n# Result\nprint \"% of high performance tries that will last at least 25000 miles: 33.9%\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "% of high performance tries that will last at least 25000 miles: 33.9%\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUlPWi//H3KKhcFJV0RMBMvMu1KDKlIPNaUqadlaYo\n7uPm2Nm5rV97WedkQcfULvu4uuxTp7zUVvcuXctO7mKT5nG8bS9tRawspQQFRXJU5CYC8vz+aPYc\nCRCHGB5GP6+1Zi2eeS7zGRc+H57n+zwzFsMwDERE5IbXzuwAIiLSNqgQREQEUCGIiIiDCkFERAAV\ngoiIOKgQREQEUCHIdWzu3LksWrSo0flpaWnMmDGjRV7rxIkTdO7cGU+5irtdu3YcO3bM7BjSxqgQ\npNX17duXLVu2uP113n77bZ577jkAbDYboaGhdeZbLJYWe60+ffpQWlrarG0WFhYyZ84cgoOD6dy5\nM2FhYaSkpHDkyJEWyydyLVQI0uosFkuL7owbUltb2+QybeGv+bNnz3LXXXdRWVnJzp07KS0t5cCB\nA9xzzz1s3ry5wXVqampaOaXcKFQI0mZcunSJ+fPnExwcTHBwME8++SRVVVXO+a+88gq9e/cmJCSE\n5cuX1zntMWvWLObOncuECRPw9/dn69atzJo1i4ULF1JRUcH48eM5deoUnTt3pkuXLhQWFmKxWKiq\nqmLmzJl06dKF8PBw9u/f73y9vn378tprrxEZGUnnzp351a9+RVFREePHjycgI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ldvn8fkDwkJISQkhNtvvx2AKVOmsGTJEnr16uVS\nfo84ZWRccWVsUlISH374IVVVVeTm5pKTk+O8IqAtiY2NJScnh7y8PKqqqvjoo49ISkoyO5bLkpKS\n+OCDDwD44IMPnDvZtsgwDH71q18xdOhQ5s+f73zeE96D3W53XgFy8eJFNm/eTExMjEdkh5+O6vPz\n88nNzeXDDz/k3nvvZfXq1R6Tv6KigtLSUgDKy8vZtGkTERERHpO/V69ehIaGcvToUQC++OILhg0b\nxsSJE13L74bxjRaxYcMGIyQkxOjUqZNhtVqNcePGOee99NJLRlhYmDFo0CAjMzPTxJRXl5GRYQwc\nONAICwszFi9ebHacJj366KNGUFCQ4e3tbYSEhBgrV640zp49a4waNcoYMGCAMXr0aOP8+fNmx2zU\njh07DIvFYkRFRRnR0dFGdHS08de//tUj3sOhQ4eMmJgYIyoqyoiIiDBeeeUVwzAMj8j+czabzXmV\nkafkP3bsmBEVFWVERUUZw4YNc/5/9ZT8hmEYBw8eNGJjY43IyEhj0qRJRnFxscv5dWOaiIgAHnLK\nSERE3E/reGm4AAABA0lEQVSFICIigApBREQcVAgiIgKoEERExEGFICIigApBREQcVAgiIgKoEERc\n9uWXXxIVFcWlS5coLy8nPDycw4cPmx1L5BfTncoizbBw4UIqKyu5ePEioaGhLFiwwOxIIr+YCkGk\nGaqrq4mNjcXHx4fdu3e32Y9FFnGFThmJNIPdbqe8vJyysjIuXrxodhyRFqEjBJFmSEpKYtq0aRw7\ndozCwkLefPNNsyOJ/GKmfkGOiCf64x//SMeOHXn00Uepra3lrrvuwmazkZCQYHY0kV9ERwgiIgJo\nDEFERBxUCCIiAqgQRETEQYUgIiKACkFERBxUCCIiAqgQRETEQYUgIiIA/H9+2O13FE9f2AAAAABJ\nRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x830b1d0>"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-324"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable Declaration\nl = array([[0,12.0],[1,10.5],[2,10.0],[3,8.0],[4,7.0],[5,8.0],[6,7.5],[7,8.5],[8,9.0]]) \nX = 6.5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\n%matplotlib inline\n\nx = l[:,0]\ny = l[:,1]\n\nx_sum = sum(x)\nx_sq_sum = sum(square(x))\nx_cube_sum = sum(square(x)*x)\nx_four_sum = sum(square(x)*square(x))\n\ny_sum = sum(y)\nxy_sum = sum(x*y)\nx2y_sum = sum(x*x*y)\n\na = np.array([[9,x_sum,x_sq_sum], [x_sum,x_sq_sum,x_cube_sum],[x_sq_sum,x_cube_sum,x_four_sum]])\nb = np.array([y_sum,xy_sum,x2y_sum])\nval = np.linalg.solve(a, b)\nval[0] = round(val[0],1)\nval[1] = round(val[1],2)\nval[2] = round(val[2],3)\n\nscatter(x,y)\ntitle(\"Scatter plot\")\nxlabel(\"x\")\nylabel(\"y\")\n\n# Result\nprint \"Least square polynomial: y=\",val[0],val[1],\"*x(1)+\",val[2],\"*x(2)\"\n# for x = 6.5\nprint \"y =\",round(val[0] + val[1]*X + val[2]*(X**2),1),\"hours\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Least square polynomial: y= 12.2 -1.85 *x(1)+ 0.183 *x(2)\ny = 7.9 hours\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEZCAYAAAB2AoVaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGvlJREFUeJzt3Xl0VFWi7/FfZSIQAiQMSQMJQwBDQoTQCDc8kKIVbWlE\nGmmUgEIA0WurqDybdVXaIGpwRMB2AG0Q8RHkPhEZTNuIhSgicCPIoCBIIGFoDWHoDARI9v2D7kAk\nhCBWnYr7+1mr1qo6dajz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2rSj6/gtbfBQUF6aWXXtL111+vsrIyjRkzxtpvGnz22WeaP3++rrzy\nSiUnJ0s68zWz3/72tw4nc57t030zZ87U8OHDK10YaaPOnTvr9ttvV7du3RQQEKCuXbtq3LhxTseq\nEhdVAYAFmMYBAAtQ9gBgAcoeACxA2QOABSh7ALAAZQ8AFqDsAcAClD0AWICyB2pgw4YN6ty5s0pL\nS1VUVKROnTpp+/btTscCaowraIEamjRpkk6cOKGSkhLFxMRo4sSJTkcCaoyyB2ro1KlT6tatm+rW\nravPP//c+vVxULswjQPUUH5+voqKilRYWKiSkhKn4wCXhJE9UEMDBw5UamqqvvvuOx08eFAzZ850\nOhJQYyxxDNTAvHnzVKdOHd16660qLy9Xz5495fF45Ha7nY4G1AgjewCwAHP2AGAByh4ALEDZA4AF\nKHsAsABlDwAWoOwBwAKUPQBYgLIHAAv8L3WN15N/euJVAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x82f1080>"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-327"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = array([[41,1,5],[49,2,5],[69,3,5],[65,4,5],[40,1,10],[50,2,10],[58,3,10],\n [57,4,10],[31,1,15],[36,2,15],[44,3,15],[57,4,15],[19,1,20],[31,2,20],\n [33,3,20],[43,4,20]])\nX1 = 2.5\nX2 = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\n \ny = l[:,0]\nx1 = l[:,1]\nx2 = l[:,2]\n\nx1_sum = sum(x1)\nx1_sq_sum = sum(square(x1))\nx2_sum = sum(x2)\nx2_sq_sum = sum(square(x2))\nx1x2_sum = sum(x1*x2)\n\ny_sum = sum(y)\nx1y_sum = sum(x1*y)\nx2y_sum = sum(x2*y)\n\na = np.array([[16,x1_sum,x2_sum], [x1_sum,x1_sq_sum,x1x2_sum],[x2_sum,x1x2_sum,x2_sq_sum]])\nb = np.array([y_sum,x1y_sum,x2y_sum])\nval = np.linalg.solve(a, b)\nval[0] = round(val[0],1)\nval[1] = round(val[1],2)\nval[2] = round(val[2],2)\n\n# Result\nprint \"Estimated regression plane: y=\",val[0],\"+\",val[1],\"*x1\",val[2],\"*x2\"\nprint \"y =\",round(val[0] + val[1]*X1 + val[2]*X2,1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Estimated regression plane: y= 46.4 + 7.78 *x1 -1.65 *x2\ny = 46.0\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-336"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable Declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nl = array([[11.1,10.9],[10.3,14.2],[12.0,13.8],[15.1,21.5],[13.7,13.2],[18.5,21.1],[17.3,16.4],[14.2,19.3],[14.8,17.4],[15.3,19.0]])\nx = l[:,0]\ny = l[:,1]\n\nscatter(x,y)\ntitle(\"y Vs x\")\nxlabel(\"$x$\")\nylabel(\"$y$\")\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\n# correlation coefficient\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\n\n# Result\nprint \"correlation coefficient: \",r",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "correlation coefficient: 0.732\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEZCAYAAACaWyIJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHT1JREFUeJzt3XtQVfeh9vFno6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Fp0+f1oEDBzRixAi5XC4dPnzYihgAAN3D3UfNUFZWpsLCQmVkZCgz\nM1OzZ8/W2bNna3zt0qVLK392uVxyuVxNExIAmgG32y23292g92iSs4ZycnI0derUyjWCSZMmacmS\nJXrwwQclSQMGDNDf//53de3atWo41ggAoE48co2gJtOnT1daWpokKTs7WyUlJdVKAADQNEw/NDRn\nzhylp6eroKBAvXv31rJly5ScnKzk5GRFRETIx8dHb7zxhtkxAAC14IIyAGhBms2hIQCA56AIAMDm\nKAIAsDmKAABsjiIAAJujCADA5igCALA5igAAbI4iAACbowgAwOYoAgCwOYoAAGyOIgAAm6MIAMDm\nKAIAsDmKAABsjiIAAJujCADA5igCALA5igAAbI4iAACbowg8zO3bt5WY+H/ldPbX4MGxOnjwoNWR\nALRwDsMwDKtD1MbhcMiD45nikUf+TampZfr662WSTqhdu5/q2LG/KjQ01OpoAJqB+uw3TZ8RJCcn\ny+l0KiIiotpza9eulZeXl65du2Z2jGbBMAz913+9p6+/3ixpoKSZqqiYoY8++sjqaABaMNOLYN68\neUpNTa02npeXp71796pv375mR2g2HA6H2rb1k3ShcqxVqwvy8/OzLhSAFs/0IoiLi1Pnzp2rjT/1\n1FNavXq12R/f7KSkLFO7dpMlpahNm39Tjx65mjVrltWxALRgra340F27dikoKEhDhw614uM92r//\n+5MaMCBEH32UJqczUk8++SozAgCmavIiKC4u1ooVK7R3797Kse9a2Fi6dGnlzy6XSy6Xy8R0nmHi\nxImaOHGi1THqpbCwUG+88YZu376tH/7wh4qMjLQ6EtCiud1uud3uBr1Hk5w1lJOTo6lTpyorK0tZ\nWVkaP3682rVrJ0k6f/68evXqpUOHDql79+5Vw9nwrKHmrKCgQEOHjtC1a8NVWtpLbdps0/vvb9eE\nCROsjgbYRn32m00+I4iIiNDly5cr/xwSEqIjR46oS5cuTR0Fjey3v92kq1fjVFKyRZJUXDxGCxb8\nP33+OUUAeDLTF4vnzJmjUaNGKTs7W71799brr79e5XmHw2F2BDSRgoLrKikZ8C8jA3T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AMDmKAIAsDmK\nAABsjiIAAJuz5MvrgeaovLxcf/7zn3X27Fn17t1bhw4d0tNPP61+/fpZHQ1oEGYEwD06fvy4Zs6c\nqX79+qmiokKPPvqoAgMDrY4FNBhFANyj+++/X23atNGnn34ql8sll8slX19fq2MBDUYRAPcoMzNT\nV69e1YkTJxQSEqKDBw9aHQloFKwRAPcoNTVVTqdTo0eP1vvvv6+AgACrIwGNgttQA4DNcWgIAGyO\nIgAAm6MIAMDmKAIAsDmKAABsjiIAAJujCADA5igCALC5/w+Y+pI4hoLlSQAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x83248d0>"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-337"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable Declaration\nl = array([[250,19],[290,10],[270,17],[100,11],[300,70],[410,60],[110,18],[130,30],[1100,180]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nx = l[:,0]\ny = l[:,1]\n\n\nfigure()\nscatter(x,y)\ntitle(\"y Vs x\")\nxlabel(\"$x$\")\nylabel(\"$y$\")\n\ns1 = sum(square(x)) - square(sum(x))/9.0\ns2 = sum(x*y) - (sum(x)*sum(y))/9.0\ns3 = sum(square(y)) - square(sum(y))/9.0\n\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\nprint \"correlation coefficient: \",r\n\nfor i in range(0,9):\n for j in range(0,2):\n l[i,j] = math.log(l[i,j])\n\nlnx = l[:,0]\nlny = l[:,1]\n \nfigure() \nscatter(lnx,lny)\ntitle(\"lny Vs lnx\")\nxlabel(\"$lnx$\")\nylabel(\"$lny$\")\n\ns1 = sum(square(lnx)) - square(sum(lnx))/9.0\ns2 = sum(lnx*lny) - (sum(lnx)*sum(lny))/9.0\ns3 = sum(square(lny)) - square(sum(lny))/9.0\n\n# correlation coefficient\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\nprint \"correlation coefficient: \",r",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "correlation coefficient: 0.942\ncorrelation coefficient: "
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " 0.75\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEZCAYAAACAZ8KHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG5dJREFUeJzt3X1UlHX+//HXJFgIopUyIGAgoIgS2hrWmr+lFN32q2Ra\nlBSQ2dbPtntrdT1baZ0Et9Nu93usdCXtZGbrzSnjy2pLeVLCvNuU9ocZFoLQeoOJkiB8fn/UzslE\n7aMzXAw+H+fMOXDNzHW93rs2L66bmXEZY4wAAPiZznM6AADAv1AcAAArFAcAwArFAQCwQnEAAKxQ\nHAAAKxQHAMAKxQFY+vWvf63HH3/8hOUrVqxQRESEWlpaHEgFtB2KA7B02223adGiRScsX7hwoW69\n9Vaddx7/WaFj4184IOnpp5/WDTfccNyy++67Tw888MAJj73uuuu0b98+rV271rPswIEDeu+995ST\nkyNJWrVqlQYMGKDQ0FBFRUXpmWeeaXW7U6ZMOW6706ZN08iRI70xEuAzLj5yBJBqamoUHx+vqqoq\ndevWTceOHVNkZKQKCws1ePDgEx5/5513yhijV199VZI0d+5czZ07V5s2bZIkRUREaOnSpRo2bJgO\nHjyoL7/8stX1NDQ0aNCgQZoxY4b69Omj8ePHa+vWrerVq5dvBwbOAnscgKTw8HANHz5cb7/9tiSp\nsLBQPXv2bPXFXpJyc3O1dOlSNTY2SpJef/115ebmeu7v3Lmztm/frm+//VbdunU76XqCgoK0cOFC\nPfjgg8rOztaLL75IaaDdoziAH+Tm5nrOXSxatEjZ2dknfeywYcPUo0cPLVu2TDt37tSGDRuUlZXl\nuf+dd97RqlWrFBMTo7S0NJWUlJx0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\nQWFhodxut4YNG6Zly5apR48eTkcCfIaPVQcAWOFQFQDACsUBALBCcQAArFAcAAArFAcAwArFAQCw\nQnEAAKxQHAAAK/8fTzPmMmhpWdwAAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x7adab00>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEbCAYAAADERMP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH35JREFUeJzt3Xt0VPXB7vFnh2DJBIikQsAklhBwkXBJJiDDOgYZKqBQ\n0VCQUy4hXvBNqZSC4lJ6cBEr0r7iDYqLplrxRdrSiqJRJhxBHeQWQkNAhS65FEqCnlEsiYSENyHZ\n5w/LvAxJNpkAeyby/ayVtTJ7/7Ln8afuJ/u3ZzKGaZqmAABoRkSoAwAAwhtFAQCwRFEAACxRFAAA\nSxQFAMASRQEAsERR4DutZ8+eev/990Mdo1mvvvqqhg0bFuoYgCWKAt9phmHIMIzLeszbb79dCxcu\nbLT97bffVo8ePdTQ0HBZnw8INYoCCNI999yj1atXN9r+2muvadq0aYqI4H8rfLfwXzSuGnl5eZo0\naZJycnLUuXNn9e/fXyUlJZKkJUuWaOLEiQHjZ8+erTlz5jQ6zl133aWvv/5aW7Zs8W87efKk1q9f\nr+nTp0uSPB6P+vXrp86dOyshIUHPPvtsizJGREQoPz9fN954o7p06aJZs2b5982cOTMg46OPPqqR\nI0e2fAKA1jKB77CePXua77//vmmaprlw4UKzQ4cOZmFhodnQ0GDOnz/fHDp0qGmapvn555+b0dHR\nZkVFhWmapllXV2d269bN3L17d5PHfeCBB8wZM2b4H//ud78znU6n/3H37t3NrVu3mqZpmhUVFc0e\nZ+XKlWZmZqb/sWEY5rhx48zKykrz2LFjZteuXc0NGzaYpmma1dXV5o033mi++uqr5kcffWRed911\n5vHjx1s7NUCLcUWBq8qwYcN0++23yzAMTZs2TXv37pUk9ejRQ8O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KCxo8fr4MHD0qS9u7dqwkTJqhXr15q\naGjQ3Xff7f/8CqAtoiiAIO3atUsul0uZmZk6fPiwbrrpJlVWVioy8tsL9IyMDH3ve9/Tjh075Ha7\n5Xa7FRUVFeLUQOtRFECQSkpKNGjQIK1fv14dOnSQJHk8Ho0aNUo7duzQrl27dOLECX366adKSkpq\n8uNcgbaEogCClJycrK1btyouLs5/f6JTp07y+XxKSEjQhg0b9Oabb+rmm2/WunXrQpwWuHR8cBEA\nwBJXFAAASxQFAMASRQEAsERRAAAsURQAAEsUBQDAEkUBALBEUQAALP1/Eh+4mLI0G8oAAAAASUVO\nRK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x9a93f28>"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-339"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable Declaration\nl = array([[11.1,10.9],[10.3,14.2],[12.0,13.8],[15.1,21.5],[13.7,13.2],[18.5,21.1],[17.3,16.4],[14.2,19.3],[14.8,17.4],[15.3,19.0]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx = l[:,0]\ny = l[:,1]\n\ns1 = sum(square(x)) - square(sum(x))/10.0\ns2 = sum(x*y) - (sum(x)*sum(y))/10.0\ns3 = sum(square(y)) - square(sum(y))/10.0\n\n# correlation coefficient\nr = s2 / sqrt(s1*s3)\nr = round(r,3)\n\n# Result\nprint \"around\",round(100*(r**2),1),\"% of the variation among the afternoon times is explained by the corresponding differenced among the morning times.\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "around 53.6 % of the variation among the afternoon times is explained by the corresponding differenced among the morning times.\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-341"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nr = 0.732 # correlation coff;\nn = 10 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# 95% confidence interval\nZ1 = 0.5*math.log((1+r)/(1-r)) # Z value corresponds to r=0.7\nz_prt = sqrt(n-3)*Z1\n\nz_thr = 1.96 # at 0.025\n\n# Result\nprint \"Practical Z-value: \",round(z_prt,2)\nif(z_prt > z_thr):\n print \"null hypothesis must be rejected\"\n print \"Relationship between morning & afternoon times it takes a mechanic to assemble the machinery, EXISTS\"\nelse:\n print \"null hypothesis is accepted\"\n print \"Relationship between morning & afternoon times it takes a mechanic to assemble the machinery, does not EXIST\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical Z-value: 2.47\nnull hypothesis must be rejected\nRelationship between morning & afternoon times it takes a mechanic to assemble the machinery, EXISTS\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-342"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nr = 0.70 # correlation coff;\nn = 30 # number of students\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# 95% confidence interval\nZ = 0.5*log((1+r)/(1-r))\nZ = 0.5*math.log((1+r)/(1-r)) # Z value corresponds to r=0.7\n\nz_thr = 1.96 # at 0.025\n\nu1 = Z - (z_thr) / sqrt(27)\nu2 = Z + (z_thr) / sqrt(27)\n\ny1 = (exp(u1) - exp(-u1)) / (exp(u1) + exp(-u1))\ny2 = (exp(u2) - exp(-u2)) / (exp(u2) + exp(-u2))\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval for normal population: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval for normal population: ( 0.45 , 0.85 )\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-346"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 16\nX1 = 2.5\nX2 = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\nfrom numpy import matrix\n\nl = array([[41,1,5],[49,2,5],[69,3,5],[65,4,5],[40,1,10],[50,2,10],[58,3,10],\n [57,4,10],[31,1,15],[36,2,15],[44,3,15],[57,4,15],[19,1,20],[31,2,20],\n [33,3,20],[43,4,20]])\ny = l[:,0]\nx1 = l[:,1]\nx2 = l[:,2]\n\nx1_sum = sum(x1)\nx1_sq_sum = sum(square(x1))\nx2_sum = sum(x2)\nx2_sq_sum = sum(square(x2))\nx1x2_sum = sum(x1*x2)\n\ny_sum = sum(y)\nx1y_sum = sum(x1*y)\nx2y_sum = sum(x2*y)\n\nA = matrix([[n,x1_sum,x2_sum],[x1_sum,x1_sq_sum,x1x2_sum],[x2_sum,x1x2_sum,x2_sq_sum]])\nA = A.I\n\n\nB = matrix([[y_sum],[x1y_sum],[x2y_sum]])\n\nb = A*B\n\n# Result\nprint \"Least square estimates of multiple regression coefficients\",b",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Least square estimates of multiple regression coefficients [[ 46.4375]\n [ 7.775 ]\n [ -1.655 ]]\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-348"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 5\nk = 1\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\nfrom numpy import matrix\n\nX = matrix([[1,0],[1,1],[1,2],[1,3],[1,4]])\nY = matrix([[8],[9],[4],[3],[1]])\n\nXT = X.T\n\nXTX = XT*X\nXTXI = XTX.I\nXTY = XT*Y\n\nb = XTXI*XTY\n\nY1 = X*b\nMMT = ((Y-Y1).T)*(Y-Y1)\nMMT = int(MMT)\n\nSe_square = (1.0/(n-k-1))*MMT \n\n# Result\nprint \"Se Square value: \",Se_square",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Se Square value: 2.0\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-349"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 5\nk = 1\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nimport numpy as np\nfrom numpy import matrix\n\nX = matrix([[1,0],[1,1],[1,2],[1,3],[1,4]])\nY = matrix([[8],[9],[4],[3],[1]])\n\nXT = X.T\n\nXTX = XT*X\nXTXI = XTX.I\nXTY = XT*Y\n\nb = XTXI*XTY\n\nY1 = X*b\nMMT = ((Y-Y1).T)*(Y-Y1)\nMMT = int(MMT)\n\nSe_square = (1.0/(n-k-1))*MMT \n\nFinal = Se_square*XTXI\n\n# Result\nprint \"var(bo): \",float(Final[0,0])\nprint \"var(b1): \",float(Final[1,1])",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "var(bo): 1.2\nvar(b1): 0.2\n"
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12.ipynb
new file mode 100755
index 00000000..888bada9
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12.ipynb
@@ -0,0 +1,209 @@
+{
+ "metadata": {
+ "name": "Chapter12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 12: Analysis of Variance"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-363"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting a one-way analysis of variance\n\n# Variable declaration\nA = [0.25,0.27,0.22,0.30,0.27,0.28,0.32,0.24,0.31,0.26,0.21,0.28]\nB = [0.18,0.28,0.21,0.23,0.25,0.20,0.27,0.19,0.24,0.22,0.29,0.16]\nC = [0.19,0.25,0.27,0.24,0.18,0.26,0.28,0.24,0.25,0.20,0.21,0.19]\nD = [0.23,0.30,0.28,0.28,0.24,0.34,0.20,0.18,0.24,0.28,0.22,0.21]\nk = 4\nn = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nA_sum = sum(A)\nB_sum = sum(B)\nC_sum = sum(C)\nD_sum = sum(D)\n\nT = A_sum+B_sum+C_sum+D_sum\n\nc = (T**2)/float(4*n)\nSST = 0\n\nfor i in range(0,12):\n SST = SST + A[i]**2 + B[i]**2 + C[i]**2 + D[i]**2\n\nSST = SST - c\n\nSSTR = (A_sum**2 + B_sum**2 + C_sum**2 + D_sum**2)/n - c\nSSE = SST - SSTR\n\n# Result\nprint \"SST: \",round(SST,4)\nprint \"SSTR: \",round(SSTR,4)\nprint \"SSE: \",round(SSE,4)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SST: 0.0809\nSSTR: 0.013\nSSE: 0.0679\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-364"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Estimating the treatment effects\n\n# Variable declaration\na = [0.25,0.27,0.22,0.30,0.27,0.28,0.32,0.24,0.31,0.26,0.21,0.28]\nb = [0.18,0.28,0.21,0.23,0.25,0.20,0.27,0.19,0.24,0.22,0.29,0.16]\nc = [0.19,0.25,0.27,0.24,0.18,0.26,0.28,0.24,0.25,0.20,0.21,0.19]\nd = [0.23,0.30,0.28,0.28,0.24,0.34,0.20,0.18,0.24,0.28,0.22,0.21]\nK = 4 # number of samples\nn = 12 # entries in each sample\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nSum = sum(a)+sum(b)+sum(c)+sum(d)\nasum = sum(a)\nbsum = sum(b)\ncsum = sum(c)\ndsum = sum(d)\n\nU = Sum/48\na1 = (asum/12) - U\na2 = (bsum/12) - U\na3 = (csum/12) - U\na4 = (dsum/12) - U\n\na1 = round(a1,3)\na2 = round(a2,3)\na3 = round(a3,3)\na4 = round(a4,3)\n\n# Result\nprint \"parameters: sample-1: \",a1,\" , sample-2: \",a2,\" , sample-3: \",a3,\" , sample-4: \",a4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "parameters: sample-1: 0.024 , sample-2: -0.017 , sample-3: -0.014 , sample-4: 0.006\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-365"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Comparing mean shear strength at three roof locations\n\n# Variable declaration\nl1 = [90,82,79,98,83,91]\nl2 = [105,89,93,104,89,95,86]\nl3 = [83,89,80,94]\n\nalpha = 0.05 # level of significance\nf_thr = 3.74 # F value at 0.05 for (3-1,17-3) degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nSum = sum(l1)+sum(l2)+sum(l3)\ntotal = sum(square(l1)) + sum(square(l2)) + sum(square(l3))\nsst = total - square(Sum)/17\nsstr = square(sum(l1))/6.0 + square(sum(l2))/7.0 + square(sum(l3))/4.0 - square(Sum)/17.0\nsse = sst - sstr\nf_prt = 2.33 # calculated value\n\n# Result\nprint \"Since f_thr > f_prt so null hypothesis can not be rejected,we can't conclude that there is a difference in mean shear strength of bolts \"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Since f_thr > f_prt so null hypothesis can not be rejected,we can't conclude that there is a difference in mean shear strength of bolts \n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-366"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Comparing the mean strengths of different resins\n\n# Variable declaration\nA = array([0.99,1.19,0.79,0.95,0.90])\nB = array([1.11,1.53,1.37,1.24,1.42])\nC = array([0.83,0.68,0.94,0.86,0.57])\nn = 5\nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt_thr = 2.179 # t(0.025) at dof = 12\nS_sq = 0.0234\n\nBA_lower = mean(B)-mean(A) - t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nBA_upper = mean(B)-mean(A) + t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nBC_lower = mean(B)-mean(C) - t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nBC_upper = mean(B)-mean(C) + t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nAC_lower = mean(A)-mean(C) - t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nAC_upper = mean(A)-mean(C) + t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\n\n# Result\nprint \"MD-ED: (\",round(BA_lower,3),\",\",round(BA_upper,3),\")\"\nprint \"MD-PF: (\",round(BC_lower,3),\",\",round(BC_upper,3),\")\"\nprint \"ED-PF: (\",round(AC_lower,3),\",\",round(AC_upper,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "MD-ED: ( 0.159 , 0.581 )\nMD-PF: ( 0.347 , 0.769 )\nED-PF: ( -0.023 , 0.399 )\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-367"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Confidence intervals quantify the amount of difference\n\n# Variable declaration\nA = array([2.8,0.75,3.7])\nB = array([0.0,-0.1,3.45])\nC = array([1.15,1.75,4.2])\nD = array([1.88,2.65,2.7])\n\nn = 12\nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt_thr = 2.201 # t(0.025) at dof = 11\nMean = (sum(A)+sum(B)+sum(C)+sum(D))/n\nstd_dev = 1.417\nS_sq = 0.0234\n\nlower = Mean - t_thr*std_dev/sqrt(n)\nupper = Mean + t_thr*std_dev/sqrt(n)\n\n# Result\nprint \"95% confidence interval for mean of differences: (\",round(lower,2),\",\",round(upper,2),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval for mean of differences: ( 1.18 , 2.98 )\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-375"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Comparing four detergents using an F- test\n\n# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[45, 43, 51],[47, 46, 52],[48, 50, 55],[42, 37, 49]])\na = l[:,0]\nb = l[:,1]\nc = l[:,2]\n\nl1 = [a[0],b[0],c[0]]\nl2 = [a[1],b[1],c[1]]\nl3 = [a[2],b[2],c[2]]\nl4 = [a[3],b[3],c[3]]\n\n# null hypothesis if all alpha =0 and all beta =0 else Alterrnative hypothesis \nalpha = 0.01 # level of significance\nf_thr = 9.78 # theoritical f_value at 0.01 and (3,6) degrees of freedom\nrow = 4\ncolumn = 3\n\nC = square(sum(l1)+sum(l2)+sum(l3)) / 12.0\nsst = sum(square(l1)) + sum(square(l2)) + sum(square(l3)) - C \nsstr = (square(sum(l1)) + square(sum(l2)) + square(sum(l3)) + square(sum(l4)))/3.0 - C \nssbl = (square(sum(a)) + square(sum(b)) + square(sum(c)))/4.0 - C\nSSE = sst - sstr\n\nf_prt = 11.6 # calculated f_value\n\n# Result\nprint \"f_thr < f_prt , we conclude that there are differences in the effectiveness of the 4 detergents\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "f_thr < f_prt , we conclude that there are differences in the effectiveness of the 4 detergents\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-378"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating Bonferroni simultaneous confidence intervals for mean resin strength\n\n# Variable declaration\nalpha = 0.06\nk = 3\nt_thr = 2.681 # t value for alpha/(k*(k-1)) and 12 degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[0.99, 1.19, 0.79, 0.95, 0.90],[1.11, 1.53, 1.37, 1.24, 1.42],[0.83, 0.68, 0.94, 0.86, 0.57]])\na = l[:,0]\nb = l[:,1]\nc = l[:,2]\nd = l[:,3]\ne = l[:,4]\n\nl1 = [a[0],b[0],c[0],d[0],e[0]]\nl2 = [a[1],b[1],c[1],d[1],e[1]]\nl3 = [a[2],b[2],c[2],d[2],e[2]]\nMSE = 0.0234 # estimated s_square value\n\n# we need to find three confidence intervals\n\n# Result\n\n# for first interval\ny1 = mean(l2)-mean(l1) - 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\ny2 = mean(l2)-mean(l1) + 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\nprint \"first confidence interval:( \",round(y1,3),\",\",round(y2,3),\")\"\n\n# for second interval\ny1 = mean(l2)-mean(l3) - 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\ny2 = mean(l2)-mean(l3) + 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\nprint \"second confidence interval:( \",round(y1,3),\",\",round(y2,3),\")\"\n\n# for third interval\ny1 = mean(l1)-mean(l3) - 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\ny2 = mean(l1)-mean(l3) + 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\nprint \"third confidence interval:( \",round(y1,3),\",\",round(y2,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "first confidence interval:( 0.111 , 0.629 )\nsecond confidence interval:( 0.299 , 0.817 )\nthird confidence interval:( -0.071 , 0.447 )\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-379"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting the Duncan multiple-range test\n\n# Variable declaration\nA = [0.25,0.27,0.22,0.30,0.27,0.28,0.32,0.24,0.31,0.26,0.21,0.28]\nB = [0.18,0.28,0.21,0.23,0.25,0.20,0.27,0.19,0.24,0.22,0.29,0.16]\nC = [0.19,0.25,0.27,0.24,0.18,0.26,0.28,0.24,0.25,0.20,0.21,0.19]\nD = [0.23,0.30,0.28,0.28,0.24,0.34,0.20,0.18,0.24,0.28,0.22,0.21]\nn = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = array([sum(A)/len(A),sum(B)/len(B),sum(C)/len(C),sum(D)/len(D)])\n\nError_mean_square = 0.0015\ns = sqrt(Error_mean_square/n)\ns = round(s,3)\nrp = array([2.85,3.00,3.09])\nRp = s*rp\nfor i in range(0,3):\n Rp[i] = round(Rp[i],3)\n \n# Result\nprint \"RP: \",Rp",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RP: [ 0.031 0.033 0.034]\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-384"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting an analysis of covariance with one covariate\n\n# Variable declaration\nx1 = [0.5,0.55,0.6,0.35]\ny1 = [1.0,1.2,0.8,1.4]\nx2 = [0.75,1.65,1.0,1.1]\ny2 = [0.75,0.6,0.55,0.5]\nx3 = [0.6,0.9,0.8,0.7]\ny3 = [1.0,0.7,0.8,0.9]\nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx1_sum = sum(x1)\ny1_sum = sum(y1)\nx2_sum = sum(x2)\ny2_sum = sum(y2)\nx3_sum = sum(x3)\ny3_sum = sum(y3)\nx_sum = x1_sum+x2_sum+x3_sum \ny_sum = y1_sum+y2_sum+y3_sum\n\nc1 = (x_sum**2)/12\nc2 = (y_sum**2)/12\nc3 = (x_sum*y_sum)/12\n\nf_thr = 4.46\n\nSST1 = 0\nfor i in range(0,4):\n SST1 = SST1 + x1[i]**2 + x2[i]**2 + x3[i]**2\nSST1 = SST1 - c1\n\nSSTR1 = (x1_sum**2 + x2_sum**2 + x3_sum**2)/4 - c1\nSSE1 = SST1 - SSTR1\n\n\nSST2 = 0\nfor i in range(0,4):\n SST2 = SST2 + y1[i]**2 + y2[i]**2 + y3[i]**2\nSST2 = SST2 - c2\nSST2 = round(SST2,2)\n\nSSTR2 = (y1_sum**2 + y2_sum**2 + y3_sum**2)/4 - c2\nSSE2 = SST2 - SSTR2\n\n\nSPT = 0\nfor i in range(0,4):\n SPT = SPT + x1[i]*y1[i] + x2[i]*y2[i] + x3[i]*y3[i]\nSPT = SPT - c3\n\nSPTR = (x1_sum*y1_sum + x2_sum*y2_sum + x3_sum*y3_sum)/4 - c3\nSPE = SPT - SPTR\n\nSST = SST2 - SPT**2/SST1\nSSE = SSE2 - SPE**2/SSE1\nSSTR = SST - SSE\n\nMean_Sqaure_Treamtment = 0.035\nMean_Sqaure_Error = 0.029\n\nf_prt = Mean_Sqaure_Treamtment / Mean_Sqaure_Error\nf_prt = round(f_prt,2)\n\n# Result\nprint \"SST: \",round(SST,2)\nprint \"SSE: \",round(SSE,2)\nprint \"SSTR: \",round(SSTR,2)\n\nprint \"F- Practical: \",f_prt\nprint \"f_prt < f_thr , Null hypothesis can not be rejected\"\nprint \"One can not conclude that any of the cleaning agents is more effective than the others\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SST: 0.3\nSSE: 0.23\nSSTR: 0.07\nF- Practical: 1.21\nf_prt < f_thr , Null hypothesis can not be rejected\nOne can not conclude that any of the cleaning agents is more effective than the others\n"
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12_1.ipynb
new file mode 100755
index 00000000..decbcef2
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter12_1.ipynb
@@ -0,0 +1,209 @@
+{
+ "metadata": {
+ "name": "Chapter12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 12: Analysis of Variance"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-363"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nA = [0.25,0.27,0.22,0.30,0.27,0.28,0.32,0.24,0.31,0.26,0.21,0.28]\nB = [0.18,0.28,0.21,0.23,0.25,0.20,0.27,0.19,0.24,0.22,0.29,0.16]\nC = [0.19,0.25,0.27,0.24,0.18,0.26,0.28,0.24,0.25,0.20,0.21,0.19]\nD = [0.23,0.30,0.28,0.28,0.24,0.34,0.20,0.18,0.24,0.28,0.22,0.21]\nk = 4\nn = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nA_sum = sum(A)\nB_sum = sum(B)\nC_sum = sum(C)\nD_sum = sum(D)\n\nT = A_sum+B_sum+C_sum+D_sum\n\nc = (T**2)/float(4*n)\nSST = 0\n\nfor i in range(0,12):\n SST = SST + A[i]**2 + B[i]**2 + C[i]**2 + D[i]**2\n\nSST = SST - c\n\nSSTR = (A_sum**2 + B_sum**2 + C_sum**2 + D_sum**2)/n - c\nSSE = SST - SSTR\n\n# Result\nprint \"SST: \",round(SST,4)\nprint \"SSTR: \",round(SSTR,4)\nprint \"SSE: \",round(SSE,4)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SST: 0.0809\nSSTR: 0.013\nSSE: 0.0679\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-364"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\na = [0.25,0.27,0.22,0.30,0.27,0.28,0.32,0.24,0.31,0.26,0.21,0.28]\nb = [0.18,0.28,0.21,0.23,0.25,0.20,0.27,0.19,0.24,0.22,0.29,0.16]\nc = [0.19,0.25,0.27,0.24,0.18,0.26,0.28,0.24,0.25,0.20,0.21,0.19]\nd = [0.23,0.30,0.28,0.28,0.24,0.34,0.20,0.18,0.24,0.28,0.22,0.21]\nK = 4 # number of samples\nn = 12 # entries in each sample\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nSum = sum(a)+sum(b)+sum(c)+sum(d)\nasum = sum(a)\nbsum = sum(b)\ncsum = sum(c)\ndsum = sum(d)\n\nU = Sum/48\na1 = (asum/12) - U\na2 = (bsum/12) - U\na3 = (csum/12) - U\na4 = (dsum/12) - U\n\na1 = round(a1,3)\na2 = round(a2,3)\na3 = round(a3,3)\na4 = round(a4,3)\n\n# Result\nprint \"parameters: sample-1: \",a1,\" , sample-2: \",a2,\" , sample-3: \",a3,\" , sample-4: \",a4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "parameters: sample-1: 0.024 , sample-2: -0.017 , sample-3: -0.014 , sample-4: 0.006\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-365"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl1 = [90,82,79,98,83,91]\nl2 = [105,89,93,104,89,95,86]\nl3 = [83,89,80,94]\n\nalpha = 0.05 # level of significance\nf_thr = 3.74 # F value at 0.05 for (3-1,17-3) degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nSum = sum(l1)+sum(l2)+sum(l3)\ntotal = sum(square(l1)) + sum(square(l2)) + sum(square(l3))\nsst = total - square(Sum)/17\nsstr = square(sum(l1))/6.0 + square(sum(l2))/7.0 + square(sum(l3))/4.0 - square(Sum)/17.0\nsse = sst - sstr\nf_prt = 2.33 # calculated value\n\n# Result\nprint \"Since f_thr > f_prt so null hypothesis can not be rejected,we can't conclude that there is a difference in mean shear strength of bolts \"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Since f_thr > f_prt so null hypothesis can not be rejected,we can't conclude that there is a difference in mean shear strength of bolts \n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-366"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nA = array([0.99,1.19,0.79,0.95,0.90])\nB = array([1.11,1.53,1.37,1.24,1.42])\nC = array([0.83,0.68,0.94,0.86,0.57])\nn = 5\nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt_thr = 2.179 # t(0.025) at dof = 12\nS_sq = 0.0234\n\nBA_lower = mean(B)-mean(A) - t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nBA_upper = mean(B)-mean(A) + t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nBC_lower = mean(B)-mean(C) - t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nBC_upper = mean(B)-mean(C) + t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nAC_lower = mean(A)-mean(C) - t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\nAC_upper = mean(A)-mean(C) + t_thr*sqrt(S_sq*(1.0/n + 1.0/n))\n\n# Result\nprint \"MD-ED: (\",round(BA_lower,3),\",\",round(BA_upper,3),\")\"\nprint \"MD-PF: (\",round(BC_lower,3),\",\",round(BC_upper,3),\")\"\nprint \"ED-PF: (\",round(AC_lower,3),\",\",round(AC_upper,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "MD-ED: ( 0.159 , 0.581 )\nMD-PF: ( 0.347 , 0.769 )\nED-PF: ( -0.023 , 0.399 )\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-367"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nA = array([2.8,0.75,3.7])\nB = array([0.0,-0.1,3.45])\nC = array([1.15,1.75,4.2])\nD = array([1.88,2.65,2.7])\n\nn = 12\nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt_thr = 2.201 # t(0.025) at dof = 11\nMean = (sum(A)+sum(B)+sum(C)+sum(D))/n\nstd_dev = 1.417\nS_sq = 0.0234\n\nlower = Mean - t_thr*std_dev/sqrt(n)\nupper = Mean + t_thr*std_dev/sqrt(n)\n\n# Result\nprint \"95% confidence interval for mean of differences: (\",round(lower,2),\",\",round(upper,2),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval for mean of differences: ( 1.18 , 2.98 )\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-375"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[45, 43, 51],[47, 46, 52],[48, 50, 55],[42, 37, 49]])\na = l[:,0]\nb = l[:,1]\nc = l[:,2]\n\nl1 = [a[0],b[0],c[0]]\nl2 = [a[1],b[1],c[1]]\nl3 = [a[2],b[2],c[2]]\nl4 = [a[3],b[3],c[3]]\n\n# null hypothesis if all alpha =0 and all beta =0 else Alterrnative hypothesis \nalpha = 0.01 # level of significance\nf_thr = 9.78 # theoritical f_value at 0.01 and (3,6) degrees of freedom\nrow = 4\ncolumn = 3\n\nC = square(sum(l1)+sum(l2)+sum(l3)) / 12.0\nsst = sum(square(l1)) + sum(square(l2)) + sum(square(l3)) - C \nsstr = (square(sum(l1)) + square(sum(l2)) + square(sum(l3)) + square(sum(l4)))/3.0 - C \nssbl = (square(sum(a)) + square(sum(b)) + square(sum(c)))/4.0 - C\nSSE = sst - sstr\n\nf_prt = 11.6 # calculated f_value\n\n# Result\nprint \"f_thr < f_prt , we conclude that there are differences in the effectiveness of the 4 detergents\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "f_thr < f_prt , we conclude that there are differences in the effectiveness of the 4 detergents\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-378"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.06\nk = 3\nt_thr = 2.681 # t value for alpha/(k*(k-1)) and 12 degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[0.99, 1.19, 0.79, 0.95, 0.90],[1.11, 1.53, 1.37, 1.24, 1.42],[0.83, 0.68, 0.94, 0.86, 0.57]])\na = l[:,0]\nb = l[:,1]\nc = l[:,2]\nd = l[:,3]\ne = l[:,4]\n\nl1 = [a[0],b[0],c[0],d[0],e[0]]\nl2 = [a[1],b[1],c[1],d[1],e[1]]\nl3 = [a[2],b[2],c[2],d[2],e[2]]\nMSE = 0.0234 # estimated s_square value\n\n# we need to find three confidence intervals\n\n# Result\n\n# for first interval\ny1 = mean(l2)-mean(l1) - 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\ny2 = mean(l2)-mean(l1) + 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\nprint \"first confidence interval:( \",round(y1,3),\",\",round(y2,3),\")\"\n\n# for second interval\ny1 = mean(l2)-mean(l3) - 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\ny2 = mean(l2)-mean(l3) + 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\nprint \"second confidence interval:( \",round(y1,3),\",\",round(y2,3),\")\"\n\n# for third interval\ny1 = mean(l1)-mean(l3) - 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\ny2 = mean(l1)-mean(l3) + 2.681*sqrt( 0.0234*(1.0/5 + 1.0/5) )\nprint \"third confidence interval:( \",round(y1,3),\",\",round(y2,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "first confidence interval:( 0.111 , 0.629 )\nsecond confidence interval:( 0.299 , 0.817 )\nthird confidence interval:( -0.071 , 0.447 )\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-379"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nA = [0.25,0.27,0.22,0.30,0.27,0.28,0.32,0.24,0.31,0.26,0.21,0.28]\nB = [0.18,0.28,0.21,0.23,0.25,0.20,0.27,0.19,0.24,0.22,0.29,0.16]\nC = [0.19,0.25,0.27,0.24,0.18,0.26,0.28,0.24,0.25,0.20,0.21,0.19]\nD = [0.23,0.30,0.28,0.28,0.24,0.34,0.20,0.18,0.24,0.28,0.22,0.21]\nn = 12\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = array([sum(A)/len(A),sum(B)/len(B),sum(C)/len(C),sum(D)/len(D)])\n\nError_mean_square = 0.0015\ns = sqrt(Error_mean_square/n)\ns = round(s,3)\nrp = array([2.85,3.00,3.09])\nRp = s*rp\nfor i in range(0,3):\n Rp[i] = round(Rp[i],3)\n \n# Result\nprint \"RP: \",Rp",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RP: [ 0.031 0.033 0.034]\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-384"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nx1 = [0.5,0.55,0.6,0.35]\ny1 = [1.0,1.2,0.8,1.4]\nx2 = [0.75,1.65,1.0,1.1]\ny2 = [0.75,0.6,0.55,0.5]\nx3 = [0.6,0.9,0.8,0.7]\ny3 = [1.0,0.7,0.8,0.9]\nalpha = 0.05\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nx1_sum = sum(x1)\ny1_sum = sum(y1)\nx2_sum = sum(x2)\ny2_sum = sum(y2)\nx3_sum = sum(x3)\ny3_sum = sum(y3)\nx_sum = x1_sum+x2_sum+x3_sum \ny_sum = y1_sum+y2_sum+y3_sum\n\nc1 = (x_sum**2)/12\nc2 = (y_sum**2)/12\nc3 = (x_sum*y_sum)/12\n\nf_thr = 4.46\n\nSST1 = 0\nfor i in range(0,4):\n SST1 = SST1 + x1[i]**2 + x2[i]**2 + x3[i]**2\nSST1 = SST1 - c1\n\nSSTR1 = (x1_sum**2 + x2_sum**2 + x3_sum**2)/4 - c1\nSSE1 = SST1 - SSTR1\n\n\nSST2 = 0\nfor i in range(0,4):\n SST2 = SST2 + y1[i]**2 + y2[i]**2 + y3[i]**2\nSST2 = SST2 - c2\nSST2 = round(SST2,2)\n\nSSTR2 = (y1_sum**2 + y2_sum**2 + y3_sum**2)/4 - c2\nSSE2 = SST2 - SSTR2\n\n\nSPT = 0\nfor i in range(0,4):\n SPT = SPT + x1[i]*y1[i] + x2[i]*y2[i] + x3[i]*y3[i]\nSPT = SPT - c3\n\nSPTR = (x1_sum*y1_sum + x2_sum*y2_sum + x3_sum*y3_sum)/4 - c3\nSPE = SPT - SPTR\n\nSST = SST2 - SPT**2/SST1\nSSE = SSE2 - SPE**2/SSE1\nSSTR = SST - SSE\n\nMean_Sqaure_Treamtment = 0.035\nMean_Sqaure_Error = 0.029\n\nf_prt = Mean_Sqaure_Treamtment / Mean_Sqaure_Error\nf_prt = round(f_prt,2)\n\n# Result\nprint \"SST: \",round(SST,2)\nprint \"SSE: \",round(SSE,2)\nprint \"SSTR: \",round(SSTR,2)\n\nprint \"F- Practical: \",f_prt\nprint \"f_prt < f_thr , Null hypothesis can not be rejected\"\nprint \"One can not conclude that any of the cleaning agents is more effective than the others\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SST: 0.3\nSSE: 0.23\nSSTR: 0.07\nF- Practical: 1.21\nf_prt < f_thr , Null hypothesis can not be rejected\nOne can not conclude that any of the cleaning agents is more effective than the others\n"
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13.ipynb
new file mode 100755
index 00000000..add67b11
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "Chapter13"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 13: Factorial Experimentation"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-394"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting statistical tests for a 3X3 factorial experimental design\n\n# Variable declaration\nA1 = [3.5,3.0,2.7]\nA2 = [2.2,2.3,2.4]\nB1 = [7.1,6.9,7.5]\nB2 = [5.2,4.6,6.8]\nC1 = [10.8,10.6,11.0]\nC2 = [7.6,7.1,7.3]\na = 3\nb = 2\nr = 3\nalpha = 0.01\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nFR_thr = 7.56 # for replications\nFA_thr = 7.56 # for A\nFB_thr = 10.04 # for B\nFI_thr = 7.56 # Interaction effect\n\nA_sum = sum(A1)+sum(A2)\nB_sum = sum(B1)+sum(B2)\nC_sum = sum(C1)+sum(C2)\n\nT1 = sum(A1)+sum(B1)+sum(C1)\nT2 = sum(A2)+sum(B2)+sum(C2)\n\nT = A_sum+B_sum+C_sum\n\nc = (T**2)/18\nSST = 0\n\nfor i in range(0,3):\n SST = SST + A1[i]**2 + A2[i]**2 + B1[i]**2 + B2[i]**2 + C1[i]**2 + C2[i]**2\n\nSST = SST - c\n\nSSTR = (sum(A1)**2 + sum(A2)**2 + sum(B1)**2 + sum(B2)**2 + sum(C1)**2 + sum(C2)**2)/3 - c\nSSR = 0.86\nSSE = SST - SSTR - SSR\n\nSSA = (1.0/6)*(A_sum**2 + B_sum**2 + C_sum**2) - c\nSSB = (1.0/9)*(T1**2 + T2**2) - c\n\nSSAB = SSTR - SSA - SSB\n\nfr_prt = 1.72\nfa_prt = 246\nfb_prt = 68.8\nfi_prt = 11.4\n\n# Result\nprint \"SST:\",round(SST,2),\" SSTR:\",round(SSTR,2),\" SSE:\",round(SSE,2),\" SSAB:\",round(SSAB,2)\n\nprint \"For replications: f =\",fr_prt\nprint \"fr_prt does not exceed 7.56, so we can not reject null hypothesis\"\nprint \"For main effect of factor A: f =\",fa_prt\nprint \"fb_prt exceeds 7.56, so we reject null hypothesis\"\nprint \"For main effect of factor B: f =\",fb_prt\nprint \"fb_prt exceeds 10.04, so we reject null hypothesis\"\nprint \"For interaction: f =\",fi_prt\nprint \"fi_prt exceeds 7.56, so we reject null hypothesis\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SST: 149.38 SSTR: 146.05 SSE: 2.47 SSAB: 5.7\nFor replications: f = 1.72\nfr_prt does not exceed 7.56, so we can not reject null hypothesis\nFor main effect of factor A: f = 246\nfb_prt exceeds 7.56, so we reject null hypothesis\nFor main effect of factor B: f = 68.8\nfb_prt exceeds 10.04, so we reject null hypothesis\nFor interaction: f = 11.4\nfi_prt exceeds 7.56, so we reject null hypothesis\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-398"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using confidence intervals to compare means at different factor level\n\n# Variable declaration\ns_square = 0.25 # mean square error\nv = 10 # degree of freedom\nt_thr = 2.228 # theoritical value of t at 0.025\nb = 2\nr = 3\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[3.07, 2.30],[7.17, 5.53],[10.80, 7.33]])\na = l[:,0]\nb = l[:,1]\n\nl1 = [a[0],b[0]]\nl2 = [a[1],b[1]]\nl3 = [a[2],b[2]]\n\n# Result\n# first confidence interval\ny1 = mean(l1)-mean(l2) - 2.228*( sqrt(0.25 * (2.0/6)) )\ny2 = mean(l1)-mean(l2) + 2.228*( sqrt(0.25 * (2.0/6)) )\nprint \"first confidence interval: (\",round(y1,2),\",\",round(y2,2),\")\"\n\n# second confidence interval\ny1 = mean(l1)-mean(l3) - 2.228*( sqrt(0.25 * (2.0/6)) )\ny2 = mean(l1)-mean(l3) + 2.228*( sqrt(0.25 * (2.0/6)) )\nprint \"second confidence interval: (\",round(y1,2),\",\",round(y2,2),\")\"\n\n# third confidence interval\ny1 = mean(l2)-mean(l3) - 2.228*( sqrt(0.25 * (2.0/6)) )\ny2 = mean(l2)-mean(l3) + 2.228*( sqrt(0.25 * (2.0/6)) )\nprint \"third confidence interval: (\",round(y1,2),\",\",round(y2,2),\")\"\n\n# confidence interval for single difference in mean\ny1 = mean(a)-mean(b) - 2.228*( sqrt(0.25 * (2.0/9)) )\ny2 = mean(a)-mean(b) + 2.228*( sqrt(0.25 * (2.0/9)) )\nprint \"interval for single difference in mean(in hours): (\",round(y1,2),\",\",round(y2,2),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "first confidence interval: ( -4.31 , -3.02 )\nsecond confidence interval: ( -7.02 , -5.74 )\nthird confidence interval: ( -3.36 , -2.07 )\ninterval for single difference in mean(in hours): ( 1.43 , 2.49 )\n"
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13_1.ipynb
new file mode 100755
index 00000000..f52a054f
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter13_1.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "Chapter13"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 13: Factorial Experimentation"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-394"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nA1 = [3.5,3.0,2.7]\nA2 = [2.2,2.3,2.4]\nB1 = [7.1,6.9,7.5]\nB2 = [5.2,4.6,6.8]\nC1 = [10.8,10.6,11.0]\nC2 = [7.6,7.1,7.3]\na = 3\nb = 2\nr = 3\nalpha = 0.01\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nFR_thr = 7.56 # for replications\nFA_thr = 7.56 # for A\nFB_thr = 10.04 # for B\nFI_thr = 7.56 # Interaction effect\n\nA_sum = sum(A1)+sum(A2)\nB_sum = sum(B1)+sum(B2)\nC_sum = sum(C1)+sum(C2)\n\nT1 = sum(A1)+sum(B1)+sum(C1)\nT2 = sum(A2)+sum(B2)+sum(C2)\n\nT = A_sum+B_sum+C_sum\n\nc = (T**2)/18\nSST = 0\n\nfor i in range(0,3):\n SST = SST + A1[i]**2 + A2[i]**2 + B1[i]**2 + B2[i]**2 + C1[i]**2 + C2[i]**2\n\nSST = SST - c\n\nSSTR = (sum(A1)**2 + sum(A2)**2 + sum(B1)**2 + sum(B2)**2 + sum(C1)**2 + sum(C2)**2)/3 - c\nSSR = 0.86\nSSE = SST - SSTR - SSR\n\nSSA = (1.0/6)*(A_sum**2 + B_sum**2 + C_sum**2) - c\nSSB = (1.0/9)*(T1**2 + T2**2) - c\n\nSSAB = SSTR - SSA - SSB\n\nfr_prt = 1.72\nfa_prt = 246\nfb_prt = 68.8\nfi_prt = 11.4\n\n# Result\nprint \"SST:\",round(SST,2),\" SSTR:\",round(SSTR,2),\" SSE:\",round(SSE,2),\" SSAB:\",round(SSAB,2)\n\nprint \"For replications: f =\",fr_prt\nprint \"fr_prt does not exceed 7.56, so we can not reject null hypothesis\"\nprint \"For main effect of factor A: f =\",fa_prt\nprint \"fb_prt exceeds 7.56, so we reject null hypothesis\"\nprint \"For main effect of factor B: f =\",fb_prt\nprint \"fb_prt exceeds 10.04, so we reject null hypothesis\"\nprint \"For interaction: f =\",fi_prt\nprint \"fi_prt exceeds 7.56, so we reject null hypothesis\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SST: 149.38 SSTR: 146.05 SSE: 2.47 SSAB: 5.7\nFor replications: f = 1.72\nfr_prt does not exceed 7.56, so we can not reject null hypothesis\nFor main effect of factor A: f = 246\nfb_prt exceeds 7.56, so we reject null hypothesis\nFor main effect of factor B: f = 68.8\nfb_prt exceeds 10.04, so we reject null hypothesis\nFor interaction: f = 11.4\nfi_prt exceeds 7.56, so we reject null hypothesis\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-398"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\ns_square = 0.25 # mean square error\nv = 10 # degree of freedom\nt_thr = 2.228 # theoritical value of t at 0.025\nb = 2\nr = 3\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = array([[3.07, 2.30],[7.17, 5.53],[10.80, 7.33]])\na = l[:,0]\nb = l[:,1]\n\nl1 = [a[0],b[0]]\nl2 = [a[1],b[1]]\nl3 = [a[2],b[2]]\n\n# Result\n# first confidence interval\ny1 = mean(l1)-mean(l2) - 2.228*( sqrt(0.25 * (2.0/6)) )\ny2 = mean(l1)-mean(l2) + 2.228*( sqrt(0.25 * (2.0/6)) )\nprint \"first confidence interval: (\",round(y1,2),\",\",round(y2,2),\")\"\n\n# second confidence interval\ny1 = mean(l1)-mean(l3) - 2.228*( sqrt(0.25 * (2.0/6)) )\ny2 = mean(l1)-mean(l3) + 2.228*( sqrt(0.25 * (2.0/6)) )\nprint \"second confidence interval: (\",round(y1,2),\",\",round(y2,2),\")\"\n\n# third confidence interval\ny1 = mean(l2)-mean(l3) - 2.228*( sqrt(0.25 * (2.0/6)) )\ny2 = mean(l2)-mean(l3) + 2.228*( sqrt(0.25 * (2.0/6)) )\nprint \"third confidence interval: (\",round(y1,2),\",\",round(y2,2),\")\"\n\n# confidence interval for single difference in mean\ny1 = mean(a)-mean(b) - 2.228*( sqrt(0.25 * (2.0/9)) )\ny2 = mean(a)-mean(b) + 2.228*( sqrt(0.25 * (2.0/9)) )\nprint \"interval for single difference in mean(in hours): (\",round(y1,2),\",\",round(y2,2),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "first confidence interval: ( -4.31 , -3.02 )\nsecond confidence interval: ( -7.02 , -5.74 )\nthird confidence interval: ( -3.36 , -2.07 )\ninterval for single difference in mean(in hours): ( 1.43 , 2.49 )\n"
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14.ipynb
new file mode 100755
index 00000000..237ef958
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter14"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 14: Nonparametric Tests"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-448"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting a sign test\n\n# Variable declaration\nalpha = 0.01 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if U = 98 else alternative hypothesis\n# x: number of Plus signs with respect to 98.0\n# sample size = 14\n\nl = array([99.0,102.3,99.8,100.5,99.7,96.2,99.1,102.5,103.3,97.4,100.4,98.9,98.3,98.0,101.6])\nl = l-98.0\n\ncount =0 # counts number of +ve signs\n\nfor each in l:\n if(each>0):\n count = count + 1\n\n# probability corresponding to count >=12 and n=14\n\np = 1 - 0.9935\np = round(p,4)\n\n# Result\nif(p>0.01):\n print \"null hypothesis can not be rejected, i.e. median octane rating does not exceed 98.0\"\nelse:\n print \"null hypothesis rejected, i.e. median octane rating exceeds 98.0\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis rejected, i.e. median octane rating exceeds 98.0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-448"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A sign test of the effectiveness of a safety program\n\n# Variable declaration\nalpha = 0.05 # level of significance\nn = 10\nl = [[45,73,46,124,33,57,83,34,26,17],[36,60,44,119,35,51,77,29,24,11]]\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if U = 0 else alternative hypothesis\n# sample size = 10\n\ncount =0 # counts number of +ve signs\n\nfor i in range(0,10):\n if(l[0][i]>l[1][i]):\n count = count + 1\n\n# probability corresponding to x >=count and n=10\np = 1 - 0.9893\np = round(p,4)\n\n# Result\nif(p>0.05):\n print \"null hypothesis can not be rejected, i.e. safety program is not effective\"\nelse:\n print \"null hypothesis rejected, i.e. safety program is effective\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis rejected, i.e. safety program is effective\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-451"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting the Wilcoxon test with large samples\n\n# Variable declaration\nalpha = 0.01 # level of significance\nn1 = 15\nn2 = 14\nl = array([[45,73,46,124,33,57,83,34,26,17],[36,60,44,119,35,51,77,29,24,11]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: populations are identical else alternative hypothesis\n# x: number of Plus signs with respect to 0\n# sample size = 10\n\nz_thr = 2.575\n\nW1 = 162\nU1 = W1 - (n1*(n1+1))/2\n\nMU1 = n1*n2/2\n\nsigma_sq_U1 = n1*n2*(n1+n2+1)/12\nsigma_U1 = sqrt(sigma_sq_U1)\n\nz_prt = (U1 - MU1)/sigma_U1\n\n# Result\nprint \"practical z:\",round(z_prt,2)\nif(z_prt<-2.575):\n print \"null hypothesis rejected, i.e. Difference in population of grain size\"\nelse:\n print \"null hypothesis can not be rejected, i.e. No Difference in population of grain size\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical z: -2.75\nnull hypothesis rejected, i.e. Difference in population of grain size\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-452"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting an H test to compare three methods\n\n# Variable declaration\nalpha = 0.05 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if populations are identical, else : Alternative hypothesis\n\nchi_sq_thr = 5.991 # theoritical value of chi square at alpha = 0.05 with v = 2\n\na = [6,13,14,16,17,18]\nb = [1,4.5,8,9,10,11,12]\nc = [2,3,4.5,7,15]\n\n# we know chi square calculated value\n\nchi_sq_prt = (12.0/(18*19)) * (pow(sum(a),2)/6 + pow(sum(b),2)/7 + pow(sum(c),2)/5) - 3*19 \nchi_sq_prt = round(chi_sq_prt,1)\n\n# Result\nprint \"practical chi square:\",round(chi_sq_prt,2)\nif(chi_sq_prt > chi_sq_thr):\n print \"null hypothesis must be rejected,three methods against corrosion are not equally effective\"\nelse:\n print \"null hypothesis can not be rejected,three methods against corrosion are equally effective\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical chi square: 6.7\nnull hypothesis must be rejected,three methods against corrosion are not equally effective\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-453"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Rank correlation of before and after plant safety\n\n# Variable declaration\nalpha = 0.05 # level of significance\nn = 10\nR = [5,8,6,10,3,7,9,4,2,1]\nS = [5,8,6,10,4,7,9,3,2,1]\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nRS = 0\n\nfor i in range(0,10):\n RS = RS + R[i]*S[i]\n \nrs = (RS - n*((n+1)**2)/4.0)/(n*(n**2-1)/12.0)\nrs = round(rs,3)\n\n# Result\nprint \"rs value:\",rs,\"i.e. there is strong association along an increasing curve\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "rs value: 0.988 i.e. there is strong association along an increasing curve\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-456"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting a test for randomness\n\n# Variable declaration\nalpha = 0.01 # level of significance\nn1 = 10\nn2 = 17\nU = 6\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nz_thr = 2.575\n\nMU = (2*n1*n2)/float(n1+n2) + 1\n\nSigmaU = sqrt(((2*n1*n2)*(2*n1*n2-n1-n2)) / float(((n1+n2)**2)*(n1+n2-1)))\n\nz_prt = (U - MU)/SigmaU\n\n# Result\nprint \"practical Z:\",round(z_prt,2)\nif(z_prt < -2.575):\n print \"null hypothesis must be rejected, Arrangement is not random\"\nelse:\n print \"null hypothesis can not be rejected,Arrangement is random\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical Z: -3.2\nnull hypothesis must be rejected, Arrangement is not random\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-457"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing for too many changes\n\n# Variable declaration\nalpha = 0.01 # level of significance\nn1 = 0\nn2 = 0\nR = array([0.261,0.258,0.249,0.251,0.247,0.256,0.250,0.247,0.255,0.243,\n 0.252,0.250,0.253,0.247,0.251,0.243,0.258,0.251,0.245,0.250,\n 0.248,0.252,0.254,0.250,0.247,0.253,0.251,0.246,0.249,0.252,\n 0.247,0.250,0.253,0.247,0.249,0.253,0.246,0.251,0.249,0.253])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nz_thr = 2.33\n\nMedian = median(R)\n\nfor i in range(0,40):\n if(R[i]>Median):\n n1 = n1 + 1\n elif(R[i]<Median):\n n2 = n2 + 1\n\nU = 27\nMU = (2*n1*n2)/float(n1+n2) + 1\n\nSigmaU = sqrt(((2*n1*n2)*(2*n1*n2-n1-n2)) / float(((n1+n2)**2)*(n1+n2-1)))\n\nz_prt = (U - MU)/SigmaU\n\n# Result\nprint \"practical Z:\",round(z_prt,2)\nif(z_prt > 2.33):\n print \"null hypothesis must be rejected\"\nelse:\n print \"null hypothesis can not be rejected\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical Z: 2.98\nnull hypothesis must be rejected\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-459"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Evaluating the Anderson-Darling statistic\n\n# Variable declaration\nalpha = 0.05 # level of significance\nx = array([2.4,4.4,4.8,6.2,14.8,19.5,23.1,25.0,28.2,28.7])\nn = 10 \nl = []\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nA_sq = 0\n\nfor i in range(0,10):\n l.append(x[i]/30)\n \nfor i in range(1,11):\n A_sq = A_sq + (2*i-1)*(math.log(l[i-1]) + math.log(1 - l[n-i]))\n \nA_sq = (-A_sq)/n - n\nA_sq = round(A_sq,4)\n\n# Result\nprint \"A square value:\",A_sq\nprint \"As A_sq is large, We can not reject Null hypothesis\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "A square value: 0.5266\nAs A_sq is large, We can not reject Null hypothesis\n"
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14_1.ipynb
new file mode 100755
index 00000000..a91d128c
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter14_1.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter14"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 14: Nonparametric Tests"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-448"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.01 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if U = 98 else alternative hypothesis\n# x: number of Plus signs with respect to 98.0\n# sample size = 14\n\nl = array([99.0,102.3,99.8,100.5,99.7,96.2,99.1,102.5,103.3,97.4,100.4,98.9,98.3,98.0,101.6])\nl = l-98.0\n\ncount =0 # counts number of +ve signs\n\nfor each in l:\n if(each>0):\n count = count + 1\n\n# probability corresponding to count >=12 and n=14\n\np = 1 - 0.9935\np = round(p,4)\n\n# Result\nif(p>0.01):\n print \"null hypothesis can not be rejected, i.e. median octane rating does not exceed 98.0\"\nelse:\n print \"null hypothesis rejected, i.e. median octane rating exceeds 98.0\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis rejected, i.e. median octane rating exceeds 98.0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-448"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nn = 10\nl = [[45,73,46,124,33,57,83,34,26,17],[36,60,44,119,35,51,77,29,24,11]]\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if U = 0 else alternative hypothesis\n# sample size = 10\n\ncount =0 # counts number of +ve signs\n\nfor i in range(0,10):\n if(l[0][i]>l[1][i]):\n count = count + 1\n\n# probability corresponding to x >=count and n=10\np = 1 - 0.9893\np = round(p,4)\n\n# Result\nif(p>0.05):\n print \"null hypothesis can not be rejected, i.e. safety program is not effective\"\nelse:\n print \"null hypothesis rejected, i.e. safety program is effective\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis rejected, i.e. safety program is effective\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-451"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.01 # level of significance\nn1 = 15\nn2 = 14\nl = array([[45,73,46,124,33,57,83,34,26,17],[36,60,44,119,35,51,77,29,24,11]])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: populations are identical else alternative hypothesis\n# x: number of Plus signs with respect to 0\n# sample size = 10\n\nz_thr = 2.575\n\nW1 = 162\nU1 = W1 - (n1*(n1+1))/2\n\nMU1 = n1*n2/2\n\nsigma_sq_U1 = n1*n2*(n1+n2+1)/12\nsigma_U1 = sqrt(sigma_sq_U1)\n\nz_prt = (U1 - MU1)/sigma_U1\n\n# Result\nprint \"practical z:\",round(z_prt,2)\nif(z_prt<-2.575):\n print \"null hypothesis rejected, i.e. Difference in population of grain size\"\nelse:\n print \"null hypothesis can not be rejected, i.e. No Difference in population of grain size\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical z: -2.75\nnull hypothesis rejected, i.e. Difference in population of grain size\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-452"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if populations are identical, else : Alternative hypothesis\n\nchi_sq_thr = 5.991 # theoritical value of chi square at alpha = 0.05 with v = 2\n\na = [6,13,14,16,17,18]\nb = [1,4.5,8,9,10,11,12]\nc = [2,3,4.5,7,15]\n\n# we know chi square calculated value\n\nchi_sq_prt = (12.0/(18*19)) * (pow(sum(a),2)/6 + pow(sum(b),2)/7 + pow(sum(c),2)/5) - 3*19 \nchi_sq_prt = round(chi_sq_prt,1)\n\n# Result\nprint \"practical chi square:\",round(chi_sq_prt,2)\nif(chi_sq_prt > chi_sq_thr):\n print \"null hypothesis must be rejected,three methods against corrosion are not equally effective\"\nelse:\n print \"null hypothesis can not be rejected,three methods against corrosion are equally effective\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical chi square: 6.7\nnull hypothesis must be rejected,three methods against corrosion are not equally effective\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-453"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nn = 10\nR = [5,8,6,10,3,7,9,4,2,1]\nS = [5,8,6,10,4,7,9,3,2,1]\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nRS = 0\n\nfor i in range(0,10):\n RS = RS + R[i]*S[i]\n \nrs = (RS - n*((n+1)**2)/4.0)/(n*(n**2-1)/12.0)\nrs = round(rs,3)\n\n# Result\nprint \"rs value:\",rs,\"i.e. there is strong association along an increasing curve\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "rs value: 0.988 i.e. there is strong association along an increasing curve\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-456"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.01 # level of significance\nn1 = 10\nn2 = 17\nU = 6\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nz_thr = 2.575\n\nMU = (2*n1*n2)/float(n1+n2) + 1\n\nSigmaU = sqrt(((2*n1*n2)*(2*n1*n2-n1-n2)) / float(((n1+n2)**2)*(n1+n2-1)))\n\nz_prt = (U - MU)/SigmaU\n\n# Result\nprint \"practical Z:\",round(z_prt,2)\nif(z_prt < -2.575):\n print \"null hypothesis must be rejected, Arrangement is not random\"\nelse:\n print \"null hypothesis can not be rejected,Arrangement is random\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical Z: -3.2\nnull hypothesis must be rejected, Arrangement is not random\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-457"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.01 # level of significance\nn1 = 0\nn2 = 0\nR = array([0.261,0.258,0.249,0.251,0.247,0.256,0.250,0.247,0.255,0.243,\n 0.252,0.250,0.253,0.247,0.251,0.243,0.258,0.251,0.245,0.250,\n 0.248,0.252,0.254,0.250,0.247,0.253,0.251,0.246,0.249,0.252,\n 0.247,0.250,0.253,0.247,0.249,0.253,0.246,0.251,0.249,0.253])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nz_thr = 2.33\n\nMedian = median(R)\n\nfor i in range(0,40):\n if(R[i]>Median):\n n1 = n1 + 1\n elif(R[i]<Median):\n n2 = n2 + 1\n\nU = 27\nMU = (2*n1*n2)/float(n1+n2) + 1\n\nSigmaU = sqrt(((2*n1*n2)*(2*n1*n2-n1-n2)) / float(((n1+n2)**2)*(n1+n2-1)))\n\nz_prt = (U - MU)/SigmaU\n\n# Result\nprint \"practical Z:\",round(z_prt,2)\nif(z_prt > 2.33):\n print \"null hypothesis must be rejected\"\nelse:\n print \"null hypothesis can not be rejected\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "practical Z: 2.98\nnull hypothesis must be rejected\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-459"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nx = array([2.4,4.4,4.8,6.2,14.8,19.5,23.1,25.0,28.2,28.7])\nn = 10 \nl = []\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nA_sq = 0\n\nfor i in range(0,10):\n l.append(x[i]/30)\n \nfor i in range(1,11):\n A_sq = A_sq + (2*i-1)*(math.log(l[i-1]) + math.log(1 - l[n-i]))\n \nA_sq = (-A_sq)/n - n\nA_sq = round(A_sq,4)\n\n# Result\nprint \"A square value:\",A_sq\nprint \"As A_sq is large, We can not reject Null hypothesis\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "A square value: 0.5266\nAs A_sq is large, We can not reject Null hypothesis\n"
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15.ipynb
new file mode 100755
index 00000000..1b7639d9
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15.ipynb
@@ -0,0 +1,95 @@
+{
+ "metadata": {
+ "name": "Chapter15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 15: The Statistical Content of Quality-Improvement Programs "
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-468"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Estimating the factor effects on varianc\n\n# Variable declaration\n\nx1=[-1,1,-1,1,-1,1,-1,1] # Solvent\nx2=[-1,-1,1,1,-1,-1,1,1] # Time\nx3=[-1,-1,-1,-1,1,1,1,1] # Temperature\nVar = [2048,2813,800,1352,2113,1568,882,1013] # Variance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nVar = log(Var)\n\nsolvent = 0\nfor i in range(0,8):\n solvent = solvent + x1[i]*Var[i]\nsolvent = round(solvent/4,3)\n\ntime=0\nfor i in range(0,8):\n time = time + x2[i]*Var[i]\ntime = round(time/4,3)\n\ntemp=0\nfor i in range(0,8):\n temp = temp + x3[i]*Var[i]\ntemp = round(temp/4,3)\n\nst = 0\nfor i in range(0,8):\n st = st + x1[i]*x2[i]*Var[i]\nst =round(st/4,3)\n\nstemp = 0\nfor i in range(0,8):\n stemp = stemp + x1[i]*x3[i]*Var[i]\nstemp =round(stemp/4,3)\n\ntt = 0\nfor i in range(0,8):\n tt = tt + x2[i]*x3[i]*Var[i]\ntt =round(tt/4,3)\n\nstt = 0\nfor i in range(0,8):\n stt = stt + x1[i]*x2[i]*x3[i]*Var[i]\nstt =round(stt/4,3)\n\nx = [0.15,0.30,0.45,0.60,0.90,1.2,1.5]\ny = [stt,st,stemp,solvent,(-1)*temp,(-1)*tt,(-1)*time]\n\n# Result\nprint \"solvent:\",solvent,\" time:\",time\nprint \"temp:\",temp,\" solvent*time:\",tt\nprint \"solvent*temp:\",st,\" time*temp:\",stemp\nprint \"solvent*time*temp:\",stt\nscatter(x,y)\ntitle(\"A Half Normal plot\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "solvent: 0.171 time: -0.746\ntemp: -0.186 solvent*time: 0.091\nsolvent*temp: 0.161 time*temp: -0.25\nsolvent*time*temp: 0.057\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": "<matplotlib.text.Text at 0xa254048>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEKCAYAAAAVaT4rAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHoZJREFUeJzt3XlQVHeiL/BvYxOlXdhBoIlEQJYgSC6KXCNpxkEQI4lL\nDKnEQSWMRQ0xyXMSjSlHsgom9/kU8uqSuQZFhTEzscS1nbh0YowEkyjWVYLEiGkawQ0kiJelO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NTUhKioKU6dOhb+/vwUS/sqcnO+//z4mTZoEnU6HixcvIjY2FqWl\npRg9erQFEprPmttPX1lzGzLHYNiGzNHXbciixe/l5QW9Xm9a1uv1pv+adDemqqoKXl5egyojAJw9\nexapqanQarW9/lfxfjAn53fffYekpCQAv56YPHjwIGxtbZGYmDiocnp7e8PFxQV2dnaws7NDdHQ0\nSktLLVr85uT8+uuv8eabbwIAfH198cgjj6C8vBwREREWy9kba28/fWHtbcgcg2EbMkeft6EBPP/Q\nq9bWVmn8+PHSpUuXpObm5l5P7p48edLiJ33MyXj58mXJ19dXOnnypEWz3cucnPdavHix9Nlnn1kw\n4a/MyVlWVibNmDFDamtrk27fvi2FhIRI586dG3Q5X331VSkjI0OSJEmqqamRvLy8pBs3blg0pyRJ\n0qVLl8w6uWuN7edePeUcDNvQXT3lvJe1tqG7esrZ123Ionv8SqUSOTk5iIuLg9FoREpKCoKCgpCb\nmwsAWLZsGRISEnDgwAH4+flh5MiRyMvLs2REszK+/fbbqKurMx33s7W1RUlJyaDLORiYkzMwMBDx\n8fEIDQ2FjY0NUlNTERwcPOhyrl69GkuWLEFYWBja29uxfv16ODk5WTTnc889hy+++ALXr1+Ht7c3\n3nrrLbS2tpoyWnv7MTfnYNiGzMk5WPSWs6/bEN/ARUQkGH5WMhGRYFj8RESCYfETEQmGxU9EJBgW\nPxGRYFj8RESCYfETEQmGxU9EJJj/B+rCh5Ps6bZ4AAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x98fd0b8>"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-470"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the process capability index\n\n# Variable declaration\n\nlsl = 10.98 # Diameter in mm \nusl = 11.01 # Diameter in mm \ns = 0.0035\nx_avg = 10.991\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nCp = (usl - lsl)/(6*s)\nCp\n\nCpk = min(x_avg-lsl , usl-x_avg)/(3*s)\nCpk\n\n# Result\nprint \"Second index is smaller than First\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Second index is smaller than First\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-483"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating a lower tolerance bound for the strength of cardboard\n\n# Variable declaration\nalpha = 0.05 # level of significance\nx = [210,234,216,232,262,183,227,197,\n 248,218,256,218,244,259,263,185,\n 218,196,235,223,212,237,275,240,\n 217,263,240,247,253,269,231,254,\n 248,261,268,262,247,292,238,215]\nn = 40 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = mean(x)\ns = 25.10\nk = 2.126\n\n# Result\nprint \"L =\",int(Mean-k*s),\"psi\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "L = 183 psi\n"
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15_1.ipynb
new file mode 100755
index 00000000..768a3960
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter15_1.ipynb
@@ -0,0 +1,95 @@
+{
+ "metadata": {
+ "name": "Chapter15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 15: The Statistical Content of Quality-Improvement Programs "
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-468"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\nx1=[-1,1,-1,1,-1,1,-1,1] # Solvent\nx2=[-1,-1,1,1,-1,-1,1,1] # Time\nx3=[-1,-1,-1,-1,1,1,1,1] # Temperature\nVar = [2048,2813,800,1352,2113,1568,882,1013] # Variance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nVar = log(Var)\n\nsolvent = 0\nfor i in range(0,8):\n solvent = solvent + x1[i]*Var[i]\nsolvent = round(solvent/4,3)\n\ntime=0\nfor i in range(0,8):\n time = time + x2[i]*Var[i]\ntime = round(time/4,3)\n\ntemp=0\nfor i in range(0,8):\n temp = temp + x3[i]*Var[i]\ntemp = round(temp/4,3)\n\nst = 0\nfor i in range(0,8):\n st = st + x1[i]*x2[i]*Var[i]\nst =round(st/4,3)\n\nstemp = 0\nfor i in range(0,8):\n stemp = stemp + x1[i]*x3[i]*Var[i]\nstemp =round(stemp/4,3)\n\ntt = 0\nfor i in range(0,8):\n tt = tt + x2[i]*x3[i]*Var[i]\ntt =round(tt/4,3)\n\nstt = 0\nfor i in range(0,8):\n stt = stt + x1[i]*x2[i]*x3[i]*Var[i]\nstt =round(stt/4,3)\n\nx = [0.15,0.30,0.45,0.60,0.90,1.2,1.5]\ny = [stt,st,stemp,solvent,(-1)*temp,(-1)*tt,(-1)*time]\n\n# Result\nprint \"solvent:\",solvent,\" time:\",time\nprint \"temp:\",temp,\" solvent*time:\",tt\nprint \"solvent*temp:\",st,\" time*temp:\",stemp\nprint \"solvent*time*temp:\",stt\nscatter(x,y)\ntitle(\"A Half Normal plot\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "solvent: 0.171 time: -0.746\ntemp: -0.186 solvent*time: 0.091\nsolvent*temp: 0.161 time*temp: -0.25\nsolvent*time*temp: 0.057\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": "<matplotlib.text.Text at 0xa254048>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEKCAYAAAAVaT4rAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHoZJREFUeJzt3XlQVHeiL/BvYxOlXdhBoIlEQJYgSC6KXCNpxkEQI4lL\nDKnEQSWMRQ0xyXMSjSlHsgom9/kU8uqSuQZFhTEzscS1nbh0YowEkyjWVYLEiGkawQ0kiJelOe+P\njP0kbA0Hu8Hf91PVVX26f31+XyjPl+M5p7sVkiRJICIiYdhYOwAREVkWi5+ISDAsfiIiwbD4iYgE\nw+InIhIMi5+ISDAsfhqydDodvL29Tcvl5eWYNGkSxowZg5ycHCsm65/FixdjzZo1/XqtRqPB5s2b\nBzgRPahY/DTgNBoNnJyc0NLS0uu435bVb8u8L9avX48ZM2agoaEB6enpXc5nZ2eHqqoq02OHDx/G\nI4880q/5BppCoYBCobivr62srISNjQ3a29v7NQ89GFj8NKAqKytRUlICNzc37Nmzp8excoquK5cv\nX0ZwcHCPY0aOHIl33nlnQOa7H+VpqfdT8n2bYmPx04DKz8/H73//eyxatAhbt26Vvb68vDwEBwdj\nzJgx8PX1xccff9zluN/97nfQ6XRIT0/HmDFj8OOPP3Yao1AosHz5chQWFuKnn37qcj1lZWXQaDRw\ndHRESEgI9u7da3pu8eLFSEtLQ0JCAkaNGoVjx47Bx8cHH374IUJDQzF69GikpKSgtrYWs2bNgr29\nPWJjY1FfX29axzPPPAMPDw84ODjgiSeewPnz5836PWzZsgXTpk3DSy+9BAcHBwQFBeHo0aNdjpUk\nCe+++y58fHzg7u6O5ORkNDQ0AACio6MBAA4ODhg9ejS++eYbs+anBwuLnwZUfn4+nn32WSxcuBCH\nDh3C1atXexzf256nu7s79u/fj4aGBuTl5eHVV1/F6dOnO407evQopk+fjo8++ggNDQ3w8/Prcn1e\nXl5ITU3F2rVrOz3X2tqKOXP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SuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x98fd0b8>"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-470"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\nlsl = 10.98 # Diameter in mm \nusl = 11.01 # Diameter in mm \ns = 0.0035\nx_avg = 10.991\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nCp = (usl - lsl)/(6*s)\nCp\n\nCpk = min(x_avg-lsl , usl-x_avg)/(3*s)\nCpk\n\n# Result\nprint \"Second index is smaller than First\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Second index is smaller than First\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-483"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nx = [210,234,216,232,262,183,227,197,\n 248,218,256,218,244,259,263,185,\n 218,196,235,223,212,237,275,240,\n 217,263,240,247,253,269,231,254,\n 248,261,268,262,247,292,238,215]\nn = 40 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = mean(x)\ns = 25.10\nk = 2.126\n\n# Result\nprint \"L =\",int(Mean-k*s),\"psi\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "L = 183 psi\n"
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16.ipynb
new file mode 100755
index 00000000..02b45e2e
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": "Chapter16"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 16: Applications to Reliability and Life Testing "
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-488"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the raliability of a series system\n\n# Variable declaration\nrel = 0.970\nn = 5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Result\nprint \"Riliability of 5 component system: \",round(rel**5,3)\nprint \"Riliability of 10 component system: \",round(rel**10,3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Riliability of 5 component system: 0.859\nRiliability of 10 component system: 0.737\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-489"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating reliability for a complex system\n\n# Variable declaration\na1 = 0.70\na2 = 0.75\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\na1 = 1-pow((1-a1),3)\na2 = 1-pow((1-a2),2)\n\nriliability = (0.95)*(0.99)*(a1)*(a2)*(0.90)\n\n# Result\nprint \"Riliability: \",round(riliability,3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Riliability: 0.772\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-495"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Obtaining a confidence interval for mean life\n\n# Variable declaration\nn = 50 # Units\nr = 10 # Failed units\nv = 20 # Degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = [65,110,380,420,505,580,650,840,910,950]\n\nT = sum(l)+(50-10)*950\nU = T/10\n\nX_sq_thr = 31.410 # chi-square theoritical at alpha = 0.05\nX_sq_thr1 = 10.851 # chi-square theoritical at alpha = 0.95\n\n# 90% Confidence interval\n\nllim = (2*T)/X_sq_thr\nulim = (2*T)/X_sq_thr1\n\n# Result\nprint \"90% confidence interval(in hours): (\",int(round(llim,0)),\",\",int(round(ulim,0)),\") \"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "90% confidence interval(in hours): ( 2764 , 8001 ) \n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-495"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing hypothesis concerning mean life\n\n# Variable declaration\nn = 50 # Units\nr = 10 # Failed units\nv = 20 # Degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = [65,110,380,420,505,580,650,840,910,950]\n\nU = 1000/0.4\nT_prt = sum(l)+(50-10)*950\n\nX_sq_thr = 31.410 # chi-square theoritical at alpha = 0.05\nT_thr = (0.5 * U * X_sq_thr)\n\n# Result\nprint \"Practical T value: \",T_prt\nif(T_thr > T_prt):\n print \"null hypothesis can not be rejected\"\n print \"Failure rate is greater than 0.40 failure per thousand hours.\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Failure rate is less than 0.40 failure per thousand hours.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical T value: 43410\nnull hypothesis must be rejected\nFailure rate is less than 0.40 failure per thousand hours.\n"
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16_1.ipynb
new file mode 100755
index 00000000..31982edc
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter16_1.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": "Chapter16"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 16: Applications to Reliability and Life Testing "
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-488"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nrel = 0.970\nn = 5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Result\nprint \"Riliability of 5 component system: \",round(rel**5,3)\nprint \"Riliability of 10 component system: \",round(rel**10,3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Riliability of 5 component system: 0.859\nRiliability of 10 component system: 0.737\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-489"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\na1 = 0.70\na2 = 0.75\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\na1 = 1-pow((1-a1),3)\na2 = 1-pow((1-a2),2)\n\nriliability = (0.95)*(0.99)*(a1)*(a2)*(0.90)\n\n# Result\nprint \"Riliability: \",round(riliability,3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Riliability: 0.772\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-495"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 50 # Units\nr = 10 # Failed units\nv = 20 # Degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = [65,110,380,420,505,580,650,840,910,950]\n\nT = sum(l)+(50-10)*950\nU = T/10\n\nX_sq_thr = 31.410 # chi-square theoritical at alpha = 0.05\nX_sq_thr1 = 10.851 # chi-square theoritical at alpha = 0.95\n\n# 90% Confidence interval\n\nllim = (2*T)/X_sq_thr\nulim = (2*T)/X_sq_thr1\n\n# Result\nprint \"90% confidence interval(in hours): (\",int(round(llim,0)),\",\",int(round(ulim,0)),\") \"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "90% confidence interval(in hours): ( 2764 , 8001 ) \n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-495"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 50 # Units\nr = 10 # Failed units\nv = 20 # Degrees of freedom\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nl = [65,110,380,420,505,580,650,840,910,950]\n\nU = 1000/0.4\nT_prt = sum(l)+(50-10)*950\n\nX_sq_thr = 31.410 # chi-square theoritical at alpha = 0.05\nT_thr = (0.5 * U * X_sq_thr)\n\n# Result\nprint \"Practical T value: \",T_prt\nif(T_thr > T_prt):\n print \"null hypothesis can not be rejected\"\n print \"Failure rate is greater than 0.40 failure per thousand hours.\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"Failure rate is less than 0.40 failure per thousand hours.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical T value: 43410\nnull hypothesis must be rejected\nFailure rate is less than 0.40 failure per thousand hours.\n"
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1_1.ipynb
new file mode 100755
index 00000000..df948150
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter1_1.ipynb
@@ -0,0 +1,20 @@
+{
+ "metadata": {
+ "name": "Chapter1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1: Introduction"
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2.ipynb
new file mode 100755
index 00000000..a7a96b80
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2.ipynb
@@ -0,0 +1,363 @@
+{
+ "metadata": {
+ "name": "Chapter2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2: Organization and Description of Data"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-13"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Dot diagrams expose outliers\n\n#Variable declaration\ntime=[0.107,0.196,0.021,0.283,0.179,0.854,0.58,0.19,7.3,1.18,2.0] # Time in Seconds\nneutrinos=[1,1,1,1,1.1,1,1,1.2,1,1,1]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n#Results\nscatter(time,neutrinos)\ntitle(\"Dot Diagram\")\nxlabel(\"$time(s)$\")\nylabel(\"$neutrinos$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": "<matplotlib.text.Text at 0x8170080>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEfCAYAAAC04jrjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHXi//HXCKgoVxG5DUoCiiIihpgmiaVlme1qapKX\nUtf1666btvX9bu53+yX73a9mm23bZW+mpltr1q6trgqPtETxFrZSlKJrfjUBQ8FUbgLDdH5/WLMh\nHmXiMpO+n48HjwcznzPnvAflvDm3ORbDMAxERESuoJ2rA4iIiPtSSYiIiCmVhIiImFJJiIiIKZWE\niIiYUkmIiIgplYRIC1uyZAmzZ892dQyRFqGSkOtGVFQUnTp1ws/Pj8DAQG699Vb++Mc/0tRLgV59\n9VVSU1OvOk1aWhre3t74+fnh7+9PcnIyS5cupa6uzjHNwoULWb58ebPei4i7UEnIdcNisbBp0ybK\ny8s5efIkTzzxBEuXLmXWrFktuoyXX36Z8vJySkpKWLZsGW+88Qb33HNPiy3DTH19fasvQ+RyKgm5\nLvn6+jJ27FjWrVvH6tWrOXjwIAAXLlxg+vTpdOvWjaioKP73f/8XwzAoKChg7ty57N27F19fX7p0\n6WI676+3TLy9vRk+fDgbN25k7969bN68GYBFixYxbdo0x/QTJ04kLCyMgIAAhg8fzqFDhxxjZ8+e\nZezYsfj7+5OSksIvfvGLBlsz7dq143e/+x2xsbH07t0bgPnz59O9e3fHlsyuXbsc0y9atIiJEycy\nbdo0/Pz86N+/P0ePHmXJkiWEhITQo0cPtm7d2gI/YblRqCTkujZo0CCsVqtjRfqTn/yEiooKjh8/\nzo4dO1izZg2rVq2iT58+/OEPf2DIkCFUVFTwxRdfmM7TYrE0eBwZGUlycjI5OTlXnH7MmDF8+umn\nlJaWMnDgQKZMmeIY+/G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WgoKAtIouICG1UEqmp\nqQQGBpqODxkyBH9/fwAGDx5MUVERALm5ucTExBAVFYWXlxeTJ09mw4YNbRG5VezZs4devW7G3z+M\n0aPvp6yszNWRRESuyu2OSaxYsYJ77rkHgOLiYiIjIx1jVquV4uJiV0VrlsLCQu666/scPfpzysv3\n8957EYwZ84CrY4mIXJWnqwN80/bt21m5ciW7d+8GwGKxuDhRy8nJyQHSgPsBsNl+w4EDPlRXV9Op\nUydXRhMRMeU2JZGfn8/s2bPJyspy7JqKiIigsLDQMU1hYSFWq/WKr1+0aJHj+7S0NNLS0lozrtP8\n/PyAz4AvubQBV4zFYqFDhw6uDSYiN4zs7Gyys7Odeo3FMAyjdeI0dOLECcaOHcvHH3/caOzkyZPc\nfvvtvPbaa9xyyy2O5+vr6+nduzfvvvsu4eHhpKSksHbtWvr06dPg9RaLhTZ6G9+azWZj2LC7+OST\n9lRXp9Cp0+s89dSP+a//+qmro4nIDaop6842KYn09HR27NhBWVkZISEhZGRkYLPZAJgzZw4/+MEP\nePvtt+nevTsAXl5e5ObmApCZmcmCBQuw2+3MmjWLhQsXNn4T34GSAKitreXVV1+luPgUt946lLvu\nusvVkUTkBuY2JdHavislISLiTpqy7nS7s5tERMR9qCRERMSUSkJEREypJERExJRKQkRETKkkRETE\nlEpCRERMqSRERMSUSkJEREypJERExJRKQkRETKkkRETElEpCRERMqSRERMSUSkJEREypJERExJRK\nQkRETKkkRETElEpCRERMqSRERMSUSkJEREypJERExJRKQkRETKkkRETElEpCRERMqSRERMSUSkJE\nREypJERExJRKQkRETLVJScycOZOQkBASEhKuOH748GGGDBlCx44dWbZsWYOxqKgo+vfvT1JSEikp\nKW0RV0REvtImJTFjxgyysrJMx4OCgnjxxRd5/PHHG41ZLBays7PJy8sjNze3NWOKiMhl2qQkUlNT\nCQwMNB0PDg4mOTkZLy+vK44bhtFa0URE5Crc/piExWJh5MiRJCcns3z5clfHERG5oXi6OsC17N69\nm7CwMEpLSxk1ahRxcXGkpqY2mm7Rok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Dh3Khg0bHDeSGjZsGMeOHWPQoEFUV1cTFBSEj48P+/btIzExkb///e/ExMSwadMmLBYLMTExwKWD\n3980depUfvrTn7J+/XpCQkIcz7vTPZrlxqSSELmG/fv3k5KSwv79+ykvL8disZCfnw9cuoNdx44d\ngUu3hUxJSQFg48aN3HbbbQB873vf49577yU1NZUzZ84A4OHh4Zj/1q1byc/PZ9euXY0OZLdrp19R\ncS39DxS5hvDwcIqLi6msrMRut9OtWzfH9Q0HDx5k+PDhwKXjCiNGjAAu3f/5/fffZ9q0aeTn57N5\n82bWrVuHv78/AJ06dXLMv1u3brRv354333yTSZMmOZ43DANfX9+2epsiV6Q704m4wLPPPsusWbMI\nDAw0neajjz7i8OHDPPDAA22YTKQhbUmIuMDs2bN56623rjrNu+++y8SJE9sokciVqSREXMDf358+\nffpw8uTJK44fPHiQO+64Q8ckxOW0u0lEREzpzxQRETGlkhAREVMqCRERMaWSEBERUyoJERExpZIQ\nERFTKgkRETGlkhAREVP/H6zhmW9x5afZAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x7954128>"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-14"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#A dot diagram for multiple samples reveals differences\n\n#Variable declaration\nsample1 = [0.27,0.35,0.37] # Copper content-1\nsample2 = [0.23,0.15,0.25,0.24,0.30,0.33,0.26] # Copper content-2\nYvalue1 = [1,1,1]\nYvalue2 = [1,1,1,1,1,1,1]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n#Results\nscatter(sample1,Yvalue1,c='b',marker='o')\nscatter(sample2,Yvalue2,c='r',marker='o')\n\ntitle(\"Dot Diagram\")\nxlabel(\"$Copper Content$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": "<matplotlib.text.Text at 0x82c74e0>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEdCAYAAADn46tbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1UVXW+P/D34UF5EoFQVA6KAgoJHk8XPeMkgflAaNJo\n2kXNQKlF/nKsrjWa1Yh1E1nTrJZFTlk+3xvZg4ZXgaamcLyJYuo1r4ADXhA4agrymCye/Pz+sM6I\nXx4OnKOAvV9rsRZ77+/3u78fdu03e++zRSMiAiIiopvY9PQEiIio92E4EBGRguFAREQKhgMRESkY\nDkREpGA4EBGRguFAZKakpCQ89dRTPT0NojuC4UC9nq+vL5ycnODq6gp3d3fcf//9eP/992HuKzrb\nt29HWFhYh20iIiLg6OgIV1dXDBw4EKGhoUhOTkZjY6OpzUsvvYQPPvjAolqI+gqGA/V6Go0G+/fv\nR01NDUpKSrB69WokJycjPj7eqvt49913UVNTg0uXLuHPf/4zPv74Y8ycOdNq+2hPc3Pzbd8HUVcx\nHKhPGTBgAGbPno3du3djx44dOHPmDACguroaTzzxBAYPHgxfX1+88cYbEBHk5eVh2bJlyM7OxoAB\nA+Dh4dHu2L9ciTg6OiI8PBz79u1DdnY2Dhw4AABITEzE4sWLTe3nz5+PoUOHws3NDeHh4cjNzTVt\nq6iowOzZszFw4EBMnDgRr7zySqurFxsbG2zatAkBAQEYM2YMAODZZ5/F8OHDTVcu//3f/21qn5iY\niPnz52Px4sVwdXXFuHHjUFBQgKSkJHh5eWHEiBH46quvrPATJrqB4UB90oQJE6DVak0n0N///veo\nra1FUVERDh48iJ07d2Lbtm0ICgrCe++9h0mTJqG2thZXr15td0yNRtNq2cfHB6GhoTh06FCb7WfN\nmoXCwkJcuXIF9913HxYtWmTa9swzz2DAgAH48ccfsWPHDuzcuVMZPy0tDceOHTOFysSJE3Hq1ClU\nVlZi4cKFmD9/fqvbWvv378cTTzy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O7cbF+82/9X3zxBQICAkz79ff3N6sf0e3EcKA+Z9as\nWThy5EirPwb/8ccfY8qUKWhoaMDw4cMBAJ999hkWL16MiooKuLi44JtvvsEjjzxi6nPz+ujoaDg4\nOOCRRx7Bww8/jLCwMPz4449oaGiAvb19t/ddX18PBwcHAEB6ejqmT5+O7OxsHDt2DBMnTsSxY8eg\n0WgQHR1t2u/ly5fN6nft2rXb90OmXz3bxMTExJ6eBFFXeHh4wN3dHR9++CFKS0tx5swZzJw5Ey4u\nLhgxYgTS09NRWFiICRMmYPDgwdizZw88PT1x+PBhrF27Fra2tjh37hz27t1rWp+YmIgxY8Zg3759\nqKurw/Hjx+Hh4YHy8nI8+OCD3dq3wWDAqVOnYGdnh4kTJ+L8+fMoLS2FwWCAjY0Nvv/+ewwbNgxR\nUVGt9nvffffhf//3fzvtN3r06B48CnS34x/7obvarl27oNFo8Pjjj5u1nohu4G0lumtdvHgRH374\nIYxGo1nrieifeOVAREQKXjkQEZGC4UBERAqGAxERKRgORESkYDgQEZGC4UBERAqGAxERKRgORESk\n+P8Dx7fMbOJcGgAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x5b857b8>"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-16"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Class marks & class interval for grouped data\n\n#Variable declaration\nl = [205,245,285,325,365,405] # intervels\nMarks = []\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor i in range(0,5):\n Marks.append((l[i]+l[i+1])/2)\n\n#Results\nprint \"Class Average: \"\nfor each in Marks:\n print each,\" \"\nprint \"Class Interval: \",l[1]-l[0]",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Class Average: \n225 \n265 \n305 \n345 \n385 \nClass Interval: 40\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-16"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Cumulative distribution of the nanopiller heights\n\n#Variable declaration\nl = [205,245,285,325,365,405] # intervels\nfrequency = [3,11,23,9,4]\ncal = []\nsum1 = 0\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor i in range(1,6):\n for j in range(0,i):\n sum1 = sum1 + frequency[j] \n cal.append(sum1)\n sum1 = 0\n \n#Results\nprint \"Cumulative Frequency: \"\nfor i in range(0,5):\n print \"(\",l[i],\",\",l[i+1],\"]\",\" \",cal[i]",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Cumulative Frequency: \n( 205 , 245 ] 3\n( 245 , 285 ] 14\n( 285 , 325 ] 37\n( 325 , 365 ] 46\n( 365 , 405 ] 50\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-19"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A histogram reveals the pattern of a supercomputer systems data\n\n#Variable declaration\nl = [2808, 4201, 3848, 9112, 2082, 5913, 1620, 6719, 21657,\n 3072, 2949, 11768, 4731, 14211, 1583, 9853, 78811, 6655,\n 1803, 7012, 1892, 4227, 6583, 15147, 4740, 8528, 10563,\n 43003, 16723, 2613, 26463, 34867, 4191, 4030, 2472, 28840,\n 24487, 14001, 15241, 1643, 5732, 5419, 28608, 2487, 995,\n 3116, 29508, 11440, 28336, 3440]\nheight = [0,0,0,0,0,0,0,0,0,0,0]\nX = [0,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nfor each in l: \n height[each/10000 ] = height[each/10000 ] + 1\n\n#Results\nbar(X,height,width=10000,fill=False)\nxlabel(\"$Time(microseconds)$\")\nylabel(\"$ClassFrequency$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": "<matplotlib.text.Text at 0x988d588>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEVCAYAAAD3pQL8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUlHXiBvBnDCIIBBQYVDSMq9wnRfI+ZGiokKbiJRGV\nOtu2l0rLTnuycNtVbNtdNdtzPKVBsauZhZIpoeaopeAFCS95ySBQuYg4yAA6IN/fHxznJ2Lpi8zM\n+zrP5xzPwjvD+z7B8j683+97UQkhBIiIiO5SN2sHICIiZWFxEBGRJCwOIiKShMVBRESSsDiIiEgS\nFgcREUliseK4evUqYmJiEBUVhZCQELzxxhsAgLS0NPj4+ECj0UCj0SA3N9dSkYiIqBNUlryOo7Gx\nEU5OTmhpacHw4cPx3nvvYefOnXBxccH8+fMtFYOIiO6BRYeqnJycAABGoxHXr1+Hu7s7AIDXIBIR\nKYdFi6O1tRVRUVFQq9WIjY1FaGgoAOD9999HZGQkUlNTodfrLRmJiIgksuhQ1Q11dXUYO3Ys0tPT\nERISAk9PTwDAokWLUFFRgTVr1lg6EhER3SU7a2zU1dUV48ePx6FDh6DVak3Ln3vuOSQkJHR4v7+/\nP86ePWvBhEREyufn54effvqpy9drsaGqmpoa0zBUU1MTtm/fDo1Gg8rKStN7srOzER4e3uFrz549\nCyGE7P+9/fbbVs/AnMzJnMx445+5/uC22BFHRUUFUlJS0NraitbWViQnJ2P06NGYPXs2ioqKoFKp\n0L9/f6xevdpSkYiIqBMsVhzh4eEoLCzssPyTTz6xVAQiIuoCvHK8C908XyNnzNm1mLNrKSGnEjKa\nk1XOqpJKpVJBATGJiGTFXPtOHnEQEZEkLA4iIpKExUFERJKwOIiISBIWBxERScL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iIiEgSFgcREUnC\n4iAiIklYHEREJMn/AeibDbB+/JJHAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x9868320>"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculation of sample mean and median\n\n#Variable declaration\nl=[15,14,2,27,13] #list of numbers of meals claimed\n\n#Calculation\nfrom scipy import *\nMedian=median(l) #median of all entries\nMean=round(mean(l),2) #mean of all entries\n\n#Results\nprint \"mean: \",Mean,\"meals\"\nprint \"median: \",int(Median),\"meals\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 14.2 meals\nmedian: 14 meals\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculation of the sample median with even sample size\n\n#Variable declaration\nl=[11,9,17,19,4,15] #list of numbers of e-mail received for six day\n\n#Calculation\nfrom scipy import *\nMedian=median(l) #median of all entries\nMean=round(mean(l),2) #mean of all entries\n\n#Results\nprint \"mean: \",Mean,\"requests\"\nprint \"median: \",int(Median),\"requests\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 12.5 requests\nmedian: 13 requests\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-27"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculation of the sample variance\n\n#Variable declaration\nl=[0.6,1.2,0.9,1.0,0.6,0.8] #list of delay times\nk=0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nMean=round(mean(l),4)\nfor each in l:\n k+=(each-Mean)**2\n\nssquare=round(k/(len(l)-1),3) # Sample Variance (in minute square)\n\n#Results\nprint \"Sample Variance: \",ssquare,\"(minute square)\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Sample Variance: 0.055 (minute square)\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-28"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculation of the sample standard deviation\n\n#Variable declaration\nl=[0.6,1.2,0.9,1.0,0.6,0.8] #list of delay times\nk=0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nMean=round(mean(l),4)\nfor each in l:\n k+=(each-Mean)**2\n \ns=sqrt(round(k/(len(l)-1),3)) # Standard deviation (in minute)\ns=round(s,2)\n\n#Results\nprint \"Standard deviation: \",s,\"minute\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Standard deviation: 0.23 minute\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-29"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The cofficient of variation for comparing relative preciseness\n\n#Variable declaration\nstddev1 = 0.0152 #standard deviation for ball bearing (in mm) \nmean1 = 3.92 #mean for ball bearing (in mm)\nstddev2 = 0.0086 #standard deviation for spring (in inch)\nmean2 = 1.54 #mean for spring (in inch)\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ncof_var1 = round((stddev1/mean1)*100,3) # coff of variation for ball bearing in %\ncof_var2 = round((stddev2/mean2)*100,3) # coff of variation for spring in %\n\n#Results\nif cof_var1<cof_var2:\n print \"First instrument is more precise\"\nelif cof_var1>cof_var2:\n print \"Second instrument is more precise\"\nelse:\n print \"both instruments are equal precise\"\n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First instrument is more precise\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-30"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculation of percentiles from the nanopillar height data\n\n#Variable declaration\nl = [221, 234, 245, 253, 265, 266, 271, 272, 274, 276,\n 276, 276, 278, 284, 289, 290, 290, 292, 292, 296,\n 297, 298, 300, 303, 304, 305, 305, 308, 308, 309,\n 310, 311, 312, 314, 315, 315, 323, 330, 333, 336,\n 337, 338, 343, 346, 355, 364, 366, 373, 390, 391]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nnp = len(l)*0.25 # np-losition in list l[],for first quartile p=1/4\nQ1 = l[12] # as np=12.5,so we round up to 13th\nnp = len(l)*0.5 #for second quartile p=1/2\nnp=int(np)\nQ2 = (l[np-1] + l[np])*0.5 # Average of 25th and 26th\nnp = len(l)*0.75 #for third quartile p=3/4\nQ3=l[37] # round up to 38th\nnp = len(l)*0.93 #for 93rd percentile p=0.93\nQ93=l[46] # round up to 47th\n\n#Results\nprint \"First quartile Q1: \",Q1,\"nm\"\nprint \"Second quartile Q2: \",Q2,\"nm\"\nprint \"Third quartile Q3: \",Q3,\"nm\"\nprint \"93rd quartile Q93: \",Q93,\"nm\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First quartile Q1: 278 nm\nSecond quartile Q2: 304.5 nm\nThird quartile Q3: 330 nm\n93rd quartile Q93: 366 nm\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-31"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculation of range and interquartile range for nonpillar data\n\n#Variable declaration\nl = [221, 234, 245, 253, 265, 266, 271, 272, 274, 276,\n 276, 276, 278, 284, 289, 290, 290, 292, 292, 296,\n 297, 298, 300, 303, 304, 305, 305, 308, 308, 309,\n 310, 311, 312, 314, 315, 315, 323, 330, 333, 336,\n 337, 338, 343, 346, 355, 364, 366, 373, 390, 391] #list of all height entries\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n \nnp = len(l)*0.25 # np-losition in list l[],for first quartile p=1/4\nQ1 = l[12] # as np=12.5,so we round up to 13th\nnp = len(l)*0.5 #for second quartile p=1/2\nnp = int(np)\nQ2 = (l[np-1] + l[np])*0.5 # Average of 25th and 26th\nnp = len(l)*0.75 #for third quartile p=3/4\nQ3 = l[37] # round up to 38th\nrng = max(l)-min(l) #range of height\nint_rng = Q3-Q1 #interquartile range of height\n\n#Results\nprint \"range : \",rng,\"nm\"\nprint \"interquartile range : \",int_rng,\"nm\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "range : 170 nm\ninterquartile range : 52 nm\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-32"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A modified boxplot - possible outliers are detached\n\n#Variable declaration\nx = [0.021, 0.107, 0.179, 0.190, 0.283, 0.580, 0.854, 1.18, 2.00, 7.30]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nimport matplotlib.pyplot as plt\n%matplotlib inline\n\nplt.boxplot(x,vert=False)\nxlabel(\"$Time(s)$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 24,
+ "text": "<matplotlib.text.Text at 0x9b1e1d0>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAWgAAAEQCAYAAACdlO55AAAABH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\nvb1d0l939klLS9PixYsVCoX0yCOPaMGCBeGLyv/yyy/avHmzNmzYoOzsbLW0tHR7E3D79u2aOnWq\n7rzzTrW0tIQ/39nZORAvEYiKQMO0o0ePhgM9Z84c7d27N3xziIcfflinT5/WzJkz1draquTkZI0e\nPVqVlZXhm/B+8sknmjRpkvbv3y+fz6esrCx1dHTc8BwlJSV69tln9fHHHys1NTX8eev33sM/H4GG\naUePHg3fbqm5uVk+n0+hUEjS9bu63HXXXZKu30po1qxZkqR9+/YpPz9foVBII0aM0MKFC7VgwQLl\n5+fr4sWLuuOOO8LbP3TokEKhkL7++utubxpav+ks/vn4DoRJtbW12rp1q0KhkPbs2aNLly6pq6tL\nY8eODZ+/fOLECc2dO1fS9ePIBQUFkq7f6+/bb79VXl6eli9frlAopM8++0y7d+9WYmKiRo4cGX6e\nsWPHavjw4frggw9uOH3POae77757AF8x0B13VMGQ88orr2jdunVKSkqKuqa2tlYnT56M+ZQ+IBbs\nQWPIWb9+vT788MMe13zxxRdaunTpAE0EREagMeQkJCQoOztbZ86cifj1EydO6LHHHuMYNDzHIQ4A\nMIpdBAAwikADgFEEGgCMItAAYBSBBgCjCDQAGEWgAcAoAg0ARv0XHgKvpjMNvIMAAAAASUVORK5C\nYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x9887940>"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-34"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating Variance using the handheld calculator formula \n\n#Variable declaration\nl = [19.7, 21.5, 22.5, 22.2, 22.6,\n 21.9, 20.5, 19.3, 19.9, 21.7,\n 22.8, 23.2, 21.4, 20.8, 19.4,\n 22.0, 23.0, 21.1, 20.9, 21.3]\nsum1 = 0.0\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean=sum(l)/len(l) \n\nfor each in l:\n sum1 = sum1 + each*each\nvariance = (sum1 - (pow(sum(l),2.0)/len(l)))/(len(l)-1) # variance\nvariance= round(variance,3)\n\n#Results\nprint \"mean: \",Mean,\"mpg\"\nprint \"variance: \",variance ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 21.385 mpg\nvariance: 1.412\n"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-35"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating a mean and variance from grouped data\n\n#Variable declaration\nx = array([[225,3],[265,11],[305,23],[345,9],[385,4]])\ntemp1 = 0\ntemp2 = 0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom numpy import *\n\nfor i in range(0,5):\n temp1 = temp1 + x[i][0]*x[i][1]\n\nMean = temp1/sum(x[0:5,1]) # mean=sum(x(i)*f(i))/sum(f(i) class average \n\nfor i in range(0,5):\n temp2 = temp2 + x[i][0]*x[i][0]*x[i][1]\n \nvariance = (temp2 - (temp1**2) / sum(x[0:5,1])) / float(sum(x[0:5,1])-1) # variance\nvariance=round(variance,2)\nstd_dev=round(sqrt(variance),1) # standard deviation\n\n#Results\nprint \"mean: \",Mean \nprint \"variance: \",variance \nprint \"standard deviation: \",std_dev",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 305\nvariance: 1567.35\nstandard deviation: 39.6\n"
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2_1.ipynb
new file mode 100755
index 00000000..519af65c
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter2_1.ipynb
@@ -0,0 +1,363 @@
+{
+ "metadata": {
+ "name": "Chapter2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2: Organization and Description of Data"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-13"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\ntime=[0.107,0.196,0.021,0.283,0.179,0.854,0.58,0.19,7.3,1.18,2.0] # Time in Seconds\nneutrinos=[1,1,1,1,1.1,1,1,1.2,1,1,1]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n#Results\nscatter(time,neutrinos)\ntitle(\"Dot Diagram\")\nxlabel(\"$time(s)$\")\nylabel(\"$neutrinos$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": "<matplotlib.text.Text at 0x8170080>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEfCAYAAAC04jrjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHXi//HXCKgoVxG5DUoCiiIihpgmiaVlme1qapKX\nUtf1666btvX9bu53+yX73a9mm23bZW+mpltr1q6trgqPtETxFrZSlKJrfjUBQ8FUbgLDdH5/WLMh\nHmXiMpO+n48HjwcznzPnvAflvDm3ORbDMAxERESuoJ2rA4iIiPtSSYiIiCmVhIiImFJJiIiIKZWE\niIiYUkmIiIgplYRIC1uyZAmzZ892dQyRFqGSkOtGVFQUnTp1ws/Pj8DAQG699Vb++Mc/0tRLgV59\n9VVSU1OvOk1aWhre3t74+fnh7+9PcnIyS5cupa6uzjHNwoULWb58ebPei4i7UEnIdcNisbBp0ybK\ny8s5efIkTzzxBEuXLmXWrFktu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ydOxfAcaprSUkJ48ePBy59TPKUKVO488472yKy\niIjQRiWxdu3aq46/8sorvPLKK42e79mzJx9++GFrxRIRkWtwi91N16O0tDRXR2jEHTOBe+ZSpqZR\npqZz11zX0iZXXLc2i8XCdfA2RETaVFPWndqSEBERUyoJERExpZIQERFTKgkRETGlkhAREVMqCRER\nMaWSEBERUyoJERExpZIQERFTKgkRETGlkhAREVMqCRERMaWSEBERUyoJERExpZIQERFTKgkRETGl\nkhAREVMqCRERMaWSEBERUyoJERExpZIQERFTKgkRETGlkhAREVMqCRERMaWSEBERUyoJEREx1SYl\nMXPmTEJCQkhISLji+Ouvv05iYiL9+/fn1ltvJT8/3zGWlZVFXFwcsbGxLF26tC3iiojIV9qkJGbM\nmEFWVpbpeM+ePdm5cyf5+fk8+eST/PCHPwTAbrczb948srKyOHToEGvXrqWgoKAtIouICG1UEqmp\nqQQGBpqODxkyBH9/fwAGDx5MUVERALm5ucTExBAVFYWXlxeTJ09mw4YNbRG5VezZs4devW7G3z+M\n0aPvp6yszNWRRESuyu2OSaxYsYJ77rkHgOLiYiIjIx1jVquV4uJiV0VrlsLCQu666/scPfpzysv3\n8957EYwZ84CrY4mIXJWnqwN80/bt21m5ciW7d+8GwGKxuDhRy8nJyQHSgPsBsNl+w4EDPlRXV9Op\nUydXRhMRMeU2JZGfn8/s2bPJyspy7JqKiIigsLDQMU1hYSFWq/WKr1+0aJHj+7S0NNLS0lozrtP8\n/PyAz4AvubQBV4zFYqFDhw6uDSYiN4zs7Gyys7Odeo3FMAyjdeI0dOLECcaOHcvHH3/caOzkyZPc\nfvvtvPbaa9xyyy2O5+vr6+nduzfvvvsu4eHhpKSksHbtWvr06dPg9RaLhTZ6G9+azWZj2LC7+OST\n9lRXp9Cp0+s89dSP+a//+qmro4nIDaop6842KYn09HR27NhBWVkZISEhZGRkYLPZAJgzZw4/+MEP\nePvtt+nevTsAXl5e5ObmApCZmcmCBQuw2+3MmjWLhQsXNn4T34GSAKitreXVV1+luPgUt946lLvu\nusvVkUTkBuY2JdHavislISLiTpqy7nS7s5tERMR9qCRERMSUSkJEREypJERExJRKQkRETKkkRETE\nlEpCRERMqSRERMSUSkJEREypJERExJRKQkRETKkkRETElEpCRERMqSRERMSUSkJEREypJERExJRK\nQkRETKkkRETElEpCRERMqSRERMSUSkJEREypJERExJRKQkRETKkkRETElEpCRERMqSRERMSUSkJE\nREypJERExJRKQkRETLVJScycOZOQkBASEhKuOH748GGGDBlCx44dWbZsWYOxqKgo+vfvT1JSEikp\nKW0RV0REvtImJTFjxgyysrJMx4OCgnjxxRd5/PHHG41ZLBays7PJy8sjNze3NWOKiMhl2qQkUlNT\nCQwMNB0PDg4mOTkZLy+vK44bhtFa0URE5Crc/piExWJh5MiRJCcns3z5clfHERG5oXi6OsC17N69\nm7CwMEpLSxk1ahRxcXGkpqY2mm7RokWO79PS0khLS2u7kCIi3wHZ2dlkZ2c79Rq3L4mwsDDg0i6p\ncePGkZube82SEBGRxi7/AzojI+Oar3Gr3U2XH3uorq6moqICgKqqKt555x3TM6RERKTlWYw2OCqc\nnp7Ojh07KCsrIyQkhIyMDGw2GwBz5syhpKSEQYMGUV5eTrt27fD19eXQoUOcOXOG8ePHA1BfX8+U\nKVNYuHBh4zdhsejgtoiIk5qy7myTkmhtKgkREec1Zd3pVrubRETEvagkRETElEpCRERMqSRERMSU\nSkJEREypJERExJRKQkRETKkkRETElEpCRERMqSRERMSUSkJEREypJERExJRTJVFVVcXp06dbK4uI\niLgZp2469Nprr9GhQwfWr19P165dmTRpEqNHj26tbCIi4mJObUl4e3vTt29fvvjiC1auXEl5eXlr\n5RIRETfgVEkMHDiQN954gxdeeIFXX32V+vr61solIiJu4FvfdGjr1q1069aNxMTEls7kNN10SETE\neU1Zdzp1TKKgoIDf/e53BAYGMm3aNGJjY5sVUERE3JtTu5s2b97M3LlzGTJkCE8//TSZmZmtlUtE\nRNyAUyURHBxM3759ufvuu1mxYgVnzpxprVwiIuIGnNrdFBQUxOTJk5kyZQrdu3dXSY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V5qamraOInIlakkRJxks9la5HN4Nm3a5Pj8o8sVFRWxbdu2Zi9DpLlUEiJNUFBQwOLFiwHw8vJi\n7dq1zZrf559/Tnl5OV27dr3ieExMDIcOHeLixYvNWo5Ic6kkRJpg+/btLfqJsKtWrWLcuHFXnWbM\nmDHNLiOR5vpO3U9CxBUyMzNZsWIF//Ef/8GePXv44IMPCA8PZ8KECeTk5PC3v/2N4cOHYxgG2dnZ\njB49mrKyMgCmT59OZmYmhw8fpn379tx///2EhoZy5swZvL29Hcv45JNPOHDgABcvXmTq1Kl07tyZ\n6OhoXnrpJVe9bRFAWxIi13T33XcTHh7O7NmzAQgKCqKurg74950IrVYr48ePJz8/n9tuu417772X\nAwcOcPLkSRYvXsyjjz5Knz59qKysBBofmF65ciVxcXF06NDBMQ1cutuaiCupJESuoaSkhNDQUACG\nDh3Khg0bHDeSGjZsGMeOHWPQoEFUV1cTFBSEj48P+/btIzExkb///e/ExMSwadMmLBYLMTExwKWD\n3980depUfvrTn7J+/XpCQkIcz7vTPZrlxqSSELmG/fv3k5KSwv79+ykvL8disZCfnw9cuoNdx44d\ngUu3hUxJSQFg48aN3HbbbQB873vf49577yU1NZUzZ84A4OHh4Zj/1q1byc/PZ9euXY0OZLdrp19R\ncS39DxS5hvDwcIqLi6msrMRut9OtWzfH9Q0HDx5k+PDhwKXjCiNGjAAu3f/5/fffZ9q0aeTn57N5\n82bWrVuHv78/AJ06dXLMv1u3brRv354333yTSZMmOZ43DANfX9+2epsiV6Q704m4wLPPPsusWbMI\nDAw0neajjz7i8OHDPPDAA22YTKQhbUmIuMDs2bN56623rjrNu+++y8SJE9sokciVqSREXMDf358+\nffpw8uTJK44fPHiQO+64Q8ckxOW0u0lEREzpzxQRETGlkhAREVMqCRERMaWSEBERUyoJERExpZIQ\nERFTKgkRETGlkhAREVP/H6zhmW9x5afZAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x7954128>"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-14"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nsample1 = [0.27,0.35,0.37] # Copper content-1\nsample2 = [0.23,0.15,0.25,0.24,0.30,0.33,0.26] # Copper content-2\nYvalue1 = [1,1,1]\nYvalue2 = [1,1,1,1,1,1,1]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n#Results\nscatter(sample1,Yvalue1,c='b',marker='o')\nscatter(sample2,Yvalue2,c='r',marker='o')\n\ntitle(\"Dot Diagram\")\nxlabel(\"$Copper Content$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": "<matplotlib.text.Text at 0x82c74e0>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEdCAYAAADn46tbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1UVXW+P/D34UF5EoFQVA6KAgoJHk8XPeMkgflAaNJo\n2kXNQKlF/nKsrjWa1Yh1E1nTrJZFTlk+3xvZg4ZXgaamcLyJYuo1r4ADXhA4agrymCye/Pz+sM6I\nXx4OnKOAvV9rsRZ77+/3u78fdu03e++zRSMiAiIiopvY9PQEiIio92E4EBGRguFAREQKhgMRESkY\nDkREpGA4EBGRguFAZKakpCQ89dRTPT0NojuC4UC9nq+vL5ycnODq6gp3d3fcf//9eP/992HuKzrb\nt29HWFhYh20iIiLg6OgIV1dXDBw4EKGhoUhOTkZjY6OpzUsvvYQPPvjAolqI+gqGA/V6Go0G+/fv\nR01NDUpKSrB69WokJycjPj7eqvt49913UVNTg0uXLuHPf/4zPv74Y8ycOdNq+2hPc3Pzbd8HUVcx\nHKhPGTBgAGbPno3du3djx44dOHPmDACguroaTzzxBAYPHgxfX1+88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+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-16"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [205,245,285,325,365,405] # intervels\nMarks = []\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor i in range(0,5):\n Marks.append((l[i]+l[i+1])/2)\n\n#Results\nprint \"Class Average: \"\nfor each in Marks:\n print each,\" \"\nprint \"Class Interval: \",l[1]-l[0]",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Class Average: \n225 \n265 \n305 \n345 \n385 \nClass Interval: 40\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-16"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [205,245,285,325,365,405] # intervels\nfrequency = [3,11,23,9,4]\ncal = []\nsum1 = 0\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor i in range(1,6):\n for j in range(0,i):\n sum1 = sum1 + frequency[j] \n cal.append(sum1)\n sum1 = 0\n \n#Results\nprint \"Cumulative Frequency: \"\nfor i in range(0,5):\n print \"(\",l[i],\",\",l[i+1],\"]\",\" \",cal[i]",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Cumulative Frequency: \n( 205 , 245 ] 3\n( 245 , 285 ] 14\n( 285 , 325 ] 37\n( 325 , 365 ] 46\n( 365 , 405 ] 50\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-19"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [2808, 4201, 3848, 9112, 2082, 5913, 1620, 6719, 21657,\n 3072, 2949, 11768, 4731, 14211, 1583, 9853, 78811, 6655,\n 1803, 7012, 1892, 4227, 6583, 15147, 4740, 8528, 10563,\n 43003, 16723, 2613, 26463, 34867, 4191, 4030, 2472, 28840,\n 24487, 14001, 15241, 1643, 5732, 5419, 28608, 2487, 995,\n 3116, 29508, 11440, 28336, 3440]\nheight = [0,0,0,0,0,0,0,0,0,0,0]\nX = [0,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nfor each in l: \n height[each/10000 ] = height[each/10000 ] + 1\n\n#Results\nbar(X,height,width=10000,fill=False)\nxlabel(\"$Time(microseconds)$\")\nylabel(\"$ClassFrequency$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": "<matplotlib.text.Text at 0x988d588>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEVCAYAAAD3pQL8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUlHXiBvBnDCIIBBQYVDSMq9wnRfI+ZGiokKbiJRGV\nOtu2l0rLTnuycNtVbNtdNdtzPKVBsauZhZIpoeaopeAFCS95ySBQuYg4yAA6IN/fHxznJ2Lpi8zM\n+zrP5xzPwjvD+z7B8j683+97UQkhBIiIiO5SN2sHICIiZWFxEBGRJCwOIiKShMVBRESSsDiIiEgS\nFgcREUliseK4evUqYmJiEBUVhZCQELzxxhsAgLS0NPj4+ECj0UCj0SA3N9dSkYiIqBNUlryOo7Gx\nEU5OTmhpacHw4cPx3nvvYefOnXBxccH8+fMtFYOIiO6BRYeqnJycAABGoxHXr1+Hu7s7AIDXIBIR\nKYdFi6O1tRVRUVFQq9WIjY1FaGgoAOD9999HZGQkUlNTodfrLRmJiIgksuhQ1Q11dXUYO3Ys0tPT\nERISAk9PTwDAokWLUFFRgTVr1lg6EhER3SU7a2zU1dUV48ePx6FDh6DVak3Ln3vuOSQkJHR4v7+/\nP86ePWvBhEREyufn54effvqpy9drsaGqmpoa0zBUU1MTtm/fDo1Gg8rKStN7srOzER4e3uFrz549\nCyGE7P+9/fbbVs/AnMzJnMx445+5/uC22BFHRUUFUlJS0NraitbWViQnJ2P06NGYPXs2ioqKoFKp\n0L9/f6xevdpSkYiIqBMsVhzh4eEoLCzssPyTTz6xVAQiIuoCvHK8C908XyNnzNm1mLNrKSGnEjKa\nk1XOqpJKpVJBATGJiGTFXPtOHnEQEZEkLA4iIpKExUFERJKwOIiISBIWBxERScLiICIiSVgcREQk\nCYuDiIgkYXEQEZEkLA4iIpKExUFERJKwOIiISBIWBxERSWKVR8d2hkqlsnaEO3J3d0dtba21YxAR\nmZViikMJt1VXQrkREd0rDlUREZEkLA4iIpKExUFERJKwOIiISBIWBxERScLiICIiSSxWHFevXkVM\nTAyioqIQEhKCN954AwBQW1uLuLg4BAYGYsyYMdDr9ZaKREREnaASFrxAorGxEU5OTmhpacHw4cPx\n3nvvIScnBx4eHli4cCGWLVuGy5cvIz09vX1IlUox13EoIScR2QZz7ZMsOlTl5OQEADAajbh+/Trc\n3d2Rk5ODlJQUAEBKSgo2bdpkyUhERCSRRYujtbUVUVFRUKvViI2NRWhoKKqqqqBWqwEAarUaVVVV\nloxEREQSWfSWI926dUNRURHq6uowduxY7Nq1q93rKpXqV2/bkZaWZvpYq9VCq9WaMSkRkfLodDro\ndDqzb8eicxw3e+edd+Do6IiPPvoIOp0O3t7eqKioQGxsLE6ePNk+pELmDpSSk4hsg+LnOGpqakxn\nTDU1NWH79u3QaDRITExEZmYmACAzMxMTJ060VCQiIuoEix1xHD16FCkpKWhtbUVrayuSk5Px2muv\noba2FklJSSgrK4Ovry82bNgANze39iEV8pe8UnISkW0w1z7JakNVUihlh6yUnERkGxQ/VEVERPcH\nFgcREUnC4iAiIklYHEREJAmLg4iIJGFxEBGRJ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bC3t4der8eUKVPg5ORk2s7drEOv15u2+8ILL+Czzz5DWVkZ7OzsEB8fj19++QUDBw40rfP5\n559HTk4OioqKMGXKFAQEBKCxsREXL17Ehg0bTKcTT5s2rV22V199FZs3b2637lvXZTQaTXldXFxw\n9uxZDBs2DLNnz0ZeXh5OnDiBRx99FNXV1QAALy+vDtsVQsDFxcVsPzuyHXwCINmM9957D6mpqaYh\nJFvzww8/4OTJk/d8WjMRj1vJZjz//PP4/PPPrR3Danbu3ImpU6daOwbdB1gcZDNcXV0xYMAAlJWV\nWTuKxR0/fhyjR4/mHAd1CQ5VERGRJPzzg4iIJGFxEBGRJCwOIiKShMVBRESSsDiIiEgSFgcREUnC\n4iAiIklYHEREJMn/AeibDbB+/JJHAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x9868320>"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl=[15,14,2,27,13] #list of numbers of meals claimed\n\n#Calculation\nfrom scipy import *\nMedian=median(l) #median of all entries\nMean=round(mean(l),2) #mean of all entries\n\n#Results\nprint \"mean: \",Mean,\"meals\"\nprint \"median: \",int(Median),\"meals\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 14.2 meals\nmedian: 14 meals\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl=[11,9,17,19,4,15] #list of numbers of e-mail received for six day\n\n#Calculation\nfrom scipy import *\nMedian=median(l) #median of all entries\nMean=round(mean(l),2) #mean of all entries\n\n#Results\nprint \"mean: \",Mean,\"requests\"\nprint \"median: \",int(Median),\"requests\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 12.5 requests\nmedian: 13 requests\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-27"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl=[0.6,1.2,0.9,1.0,0.6,0.8] #list of delay times\nk=0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nMean=round(mean(l),4)\nfor each in l:\n k+=(each-Mean)**2\n\nssquare=round(k/(len(l)-1),3) # Sample Variance (in minute square)\n\n#Results\nprint \"Sample Variance: \",ssquare,\"(minute square)\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Sample Variance: 0.055 (minute square)\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-28"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl=[0.6,1.2,0.9,1.0,0.6,0.8] #list of delay times\nk=0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nMean=round(mean(l),4)\nfor each in l:\n k+=(each-Mean)**2\n \ns=sqrt(round(k/(len(l)-1),3)) # Standard deviation (in minute)\ns=round(s,2)\n\n#Results\nprint \"Standard deviation: \",s,\"minute\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Standard deviation: 0.23 minute\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-29"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nstddev1 = 0.0152 #standard deviation for ball bearing (in mm) \nmean1 = 3.92 #mean for ball bearing (in mm)\nstddev2 = 0.0086 #standard deviation for spring (in inch)\nmean2 = 1.54 #mean for spring (in inch)\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ncof_var1 = round((stddev1/mean1)*100,3) # coff of variation for ball bearing in %\ncof_var2 = round((stddev2/mean2)*100,3) # coff of variation for spring in %\n\n#Results\nif cof_var1<cof_var2:\n print \"First instrument is more precise\"\nelif cof_var1>cof_var2:\n print \"Second instrument is more precise\"\nelse:\n print \"both instruments are equal precise\"\n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First instrument is more precise\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-30"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [221, 234, 245, 253, 265, 266, 271, 272, 274, 276,\n 276, 276, 278, 284, 289, 290, 290, 292, 292, 296,\n 297, 298, 300, 303, 304, 305, 305, 308, 308, 309,\n 310, 311, 312, 314, 315, 315, 323, 330, 333, 336,\n 337, 338, 343, 346, 355, 364, 366, 373, 390, 391]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nnp = len(l)*0.25 # np-losition in list l[],for first quartile p=1/4\nQ1 = l[12] # as np=12.5,so we round up to 13th\nnp = len(l)*0.5 #for second quartile p=1/2\nnp=int(np)\nQ2 = (l[np-1] + l[np])*0.5 # Average of 25th and 26th\nnp = len(l)*0.75 #for third quartile p=3/4\nQ3=l[37] # round up to 38th\nnp = len(l)*0.93 #for 93rd percentile p=0.93\nQ93=l[46] # round up to 47th\n\n#Results\nprint \"First quartile Q1: \",Q1,\"nm\"\nprint \"Second quartile Q2: \",Q2,\"nm\"\nprint \"Third quartile Q3: \",Q3,\"nm\"\nprint \"93rd quartile Q93: \",Q93,\"nm\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First quartile Q1: 278 nm\nSecond quartile Q2: 304.5 nm\nThird quartile Q3: 330 nm\n93rd quartile Q93: 366 nm\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-31"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [221, 234, 245, 253, 265, 266, 271, 272, 274, 276,\n 276, 276, 278, 284, 289, 290, 290, 292, 292, 296,\n 297, 298, 300, 303, 304, 305, 305, 308, 308, 309,\n 310, 311, 312, 314, 315, 315, 323, 330, 333, 336,\n 337, 338, 343, 346, 355, 364, 366, 373, 390, 391] #list of all height entries\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n \nnp = len(l)*0.25 # np-losition in list l[],for first quartile p=1/4\nQ1 = l[12] # as np=12.5,so we round up to 13th\nnp = len(l)*0.5 #for second quartile p=1/2\nnp = int(np)\nQ2 = (l[np-1] + l[np])*0.5 # Average of 25th and 26th\nnp = len(l)*0.75 #for third quartile p=3/4\nQ3 = l[37] # round up to 38th\nrng = max(l)-min(l) #range of height\nint_rng = Q3-Q1 #interquartile range of height\n\n#Results\nprint \"range : \",rng,\"nm\"\nprint \"interquartile range : \",int_rng,\"nm\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "range : 170 nm\ninterquartile range : 52 nm\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-32"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nx = [0.021, 0.107, 0.179, 0.190, 0.283, 0.580, 0.854, 1.18, 2.00, 7.30]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nimport matplotlib.pyplot as plt\n%matplotlib inline\n\nplt.boxplot(x,vert=False)\nxlabel(\"$Time(s)$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 24,
+ "text": "<matplotlib.text.Text at 0x9b1e1d0>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAWgAAAEQCAYAAACdlO55AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADlZJREFUeJzt3W1MlfUfx/HPMbC8KUBCNKHhwBtAPOeUN5tFSvGgprhU\nvB1zU/NJj7K2th7p/4ll1latHriWtram1so0E5fUSMoROoRTNsMMEm+ms/+fEMG46fd/YP9T/jkH\nlQNcX+L92s4c8Nt1vkfh7bXrXFyXzznnBAAwZ5jXAwAAIiPQAGAUgQYAowg0ABhFoAHAKAINAEbF\nxbqBQCCg2travpgFAIYEv9+vmpqam66LeQ+6trZWzjnTj40bN3o+A3MyJ3My4/8et7pTyyEOADCK\nQAOAUUMi0PPmzfN6hFvCnH2LOfvWYJhzMMx4O3zOuZiuxeHz+RTjJgBgSLnVbg6JPWgAGIwINAAY\nRaABwCgCDQBGEWgAMIpAA4BRBBoAjCLQAGAUgQYAowg0ABhFoAHAKAINAEYRaAAwikADgFEEGgCM\nItAAYBSBBgCjCDQAGEWgAcAoAg0ARhFoADCKQAOAUQQaAIwi0ABgFIEGAKMINAAYRaABwCgCDQBG\nEWgAMIpAA4BRBBoAjCLQAGAUgQYAowg0ABhFoAHAKAINAEYRaAAwikADgFEEGgCMItAAYBSBBgCj\nCDQAGEWgAcAoAg0ARhFoADCKQAOAUQQaAIwi0ABgFIEGAKMINAAYRaABwCgCDQBGEWgAMIpAA4BR\nBBoAjCLQAGAUgQYAowg0ABhFoAHAKAINAEYRaAAwikADgFEEGgCMItAAYBSBBgCjCDQAGEWgAcAo\nAg0ARhFoADCKQAOAUQQaAIwi0ABgFIEGAKMINAAYRaABwCgCDQBGEWgAMIpAA4BRBBoAjCLQAGAU\ngQYAow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GiRT2umT9/vnbu3BnzcwGxYA8aJv3vMqanTp1SZmam\npOsXOz98+LB++uknFRcXq6KiQh999JHmzp0r55zKy8v1+OOP6/Lly5IUvg50aWmpTp48qeHDh2vJ\nkiW6dOnSDXvG33//vaqrq9XW1qaSkhKNGjVKmZmZevPNNwf4VQM3Yg8aplVVVYVv/3Xx4kUlJyer\nvb1d0l939klLS9PixYsVCoX0yCOPaMGCBeGLyv/yyy/avHmzNmzYoOzsbLW0tHR7E3D79u2aOnWq\n7rzzTrW0tIQ/39nZORAvEYiKQMO0o0ePhgM9Z84c7d27N3xziIcfflinT5/WzJkz1draquTkZI0e\nPVqVlZXhm/B+8sknmjRpkvbv3y+fz6esrCx1dHTc8BwlJSV69tln9fHHHys1NTX8eev33sM/H4GG\naUePHg3fbqm5uVk+n0+hUEjS9bu63HXXXZKu30po1qxZkqR9+/YpPz9foVBII0aM0MKFC7VgwQLl\n5+fr4sWLuuOOO8LbP3TokEKhkL7++utubxpav+ks/vn4DoRJtbW12rp1q0KhkPbs2aNLly6pq6tL\nY8eODZ+/fOLECc2dO1fS9ePIBQUFkq7f6+/bb79VXl6eli9frlAopM8++0y7d+9WYmKiRo4cGX6e\nsWPHavjw4frggw9uOH3POae77757AF8x0B13VMGQ88orr2jdunVKSkqKuqa2tlYnT56M+ZQ+IBbs\nQWPIWb9+vT788MMe13zxxRdaunTpAE0EREagMeQkJCQoOztbZ86cifj1EydO6LHHHuMYNDzHIQ4A\nMIpdBAAwikADgFEEGgCMItAAYBSBBgCjCDQAGEWgAcAoAg0ARv0XHgKvpjMNvIMAAAAASUVORK5C\nYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x9887940>"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-34"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [19.7, 21.5, 22.5, 22.2, 22.6,\n 21.9, 20.5, 19.3, 19.9, 21.7,\n 22.8, 23.2, 21.4, 20.8, 19.4,\n 22.0, 23.0, 21.1, 20.9, 21.3]\nsum1 = 0.0\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean=sum(l)/len(l) \n\nfor each in l:\n sum1 = sum1 + each*each\nvariance = (sum1 - (pow(sum(l),2.0)/len(l)))/(len(l)-1) # variance\nvariance= round(variance,3)\n\n#Results\nprint \"mean: \",Mean,\"mpg\"\nprint \"variance: \",variance ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 21.385 mpg\nvariance: 1.412\n"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-35"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nx = array([[225,3],[265,11],[305,23],[345,9],[385,4]])\ntemp1 = 0\ntemp2 = 0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom numpy import *\n\nfor i in range(0,5):\n temp1 = temp1 + x[i][0]*x[i][1]\n\nMean = temp1/sum(x[0:5,1]) # mean=sum(x(i)*f(i))/sum(f(i) class average \n\nfor i in range(0,5):\n temp2 = temp2 + x[i][0]*x[i][0]*x[i][1]\n \nvariance = (temp2 - (temp1**2) / sum(x[0:5,1])) / float(sum(x[0:5,1])-1) # variance\nvariance=round(variance,2)\nstd_dev=round(sqrt(variance),1) # standard deviation\n\n#Results\nprint \"mean: \",Mean \nprint \"variance: \",variance \nprint \"standard deviation: \",std_dev",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean: 305\nvariance: 1567.35\nstandard deviation: 39.6\n"
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3.ipynb
new file mode 100755
index 00000000..cc4d610e
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3.ipynb
@@ -0,0 +1,503 @@
+{
+ "metadata": {
+ "name": "Chapter3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 3: Probability"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-47"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Combining events by union, intersection and complement\n\n#Variable declaration\nSample = set([(0,0),(0,1),(1,0),(1,1),(0,2),(2,0)])\nC = set([(1,0),(0,1)])\nD = set([(0,0),(0,1),(0,2)])\nE = set([(0,0),(1,1)])\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom sets import Set\n\nun = C|E\ninter = C & D\nD_comp = Sample - D\n\n# Result\nprint \"Part A: \",un\nprint \"Part B: \",inter\nprint \"Part C: \",D_comp",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part A: set([(0, 1), (1, 0), (0, 0), (1, 1)])\nPart B: set([(0, 1)])\nPart C: set([(2, 0), (1, 0), (1, 1)])\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-50"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The multiplication rule for k=2 stages of choices\n\n#Variable declaration\nn=25 #total members\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(25,1) * comb(24,1) # total number of methods\n\n#Results\nprint \"total ways: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "total ways: 600\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-50"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The multiplication rule with k=12 stages of choices\n\n#Variable declaration\nn=12 #total Questions\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Each question can be answered in 2 ways,\nways = pow(2,float(n)) # total number of methods\n\n#Results\nprint \"total ways: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "total ways: 4096\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-51"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Determining the size of an experiment\n\n#Variable declaration\nn1 = 4 # Total operators\nn2 = 3 # Total Machines\nn3 = 8 # Test specimens for each pair\n\n#Calculation\nTotal_pairs = n1*n2\nTotal_specimens = n1*n2*n3\n\n#Results\nprint \"Total Pairs: \",Total_pairs\nprint \"Total Test specimens: \",Total_specimens",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total Pairs: 12\nTotal Test specimens: 96\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-52"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The number of ways to assemble chips in a controller\n\n#Variable declaration\nn = 5 # Total chips\nr = 5 # Total positions\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef perm(n,r):\n return fact(n)/(fact(n-r))\n\nways=perm(5,5) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 120\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-53"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Evaluating a combination\n\n#Variable declaration\nn=20 # Total Assistants\nr=3 # Assistants to be chosen\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(20,3) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 1140\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-53"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Selection of machines for an experiment\n\n#Variable declaration\nn = 15 # Total machines\nr = 3 \n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(n,r) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 455\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-53"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The number of choices of new researchers\n\n#Variable declaration\nn_chem=7 # Total chemists\nr_chem=2 # chemists to be selected\nn_phy=9 # Total physicists\nr_phy=3 # physicists to be selected\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(n_chem,r_chem) * comb(n_phy,r_phy) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 1764\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-56"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Will-shuffled cards are equally likely to be selected\n\n#Variable declaration\nn=52 # Total number of cards\nm=4 # Total number of ace\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nprob = float(comb(m,1))/comb(n,1) # Required probability\nprob=round(prob,3) # i.e. 1/13\n\n#Results\nprint \"Required probability: \",prob,\"or 1/13\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.077 or 1/13\n"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-56"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Random selection results in the equally likely case\n\n#Variable declaration\nn1 = 10 # Total machines\nn2 = 8 # Working Machines\nr = 2 # To be selected\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n return fact(n)/(fact(r)*fact(n-r))\n\np1 = comb(n2,r)/float(comb(n1,r)) \np2 = comb(n2,1)*comb(n1-n2,1)/float(comb(n1,r))\n\n#Results\nprint \"Probability: Both motors works: \",round(p1,3)\nprint \"Probability: Exactly one works: \",round(p2,3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability: Both motors works: 0.622\nProbability: Exactly one works: 0.356\n"
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-57"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Long-run relative frequency approximation to probability\n\n#Variable declaration\nn=300 # Total insulators\nm=294 \t\t\t\t # insulators having capacity of withstand shock\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nprob = float(comb(m,1)) / comb(n,1) # Resultant probability\nprob=round(prob,3)\n\n#Results\nprint \"Required probability: \",prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.98\n"
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-59"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Checking possible assignmnets of probability\n\n#Variable declaration\n\n# Part A\np1 = 1.0/3\np2 = 1.0/3\np3 = 1.0/3\nprint \"[Part:A] p1+p2+p3 = 1 so it is permissible\"\n\n# Part B\np1 = 0.64\np2 = 0.38\np3 = -0.02\nprint \"[Part:B] p3 < 0 so it is not permissible\"\n\n# Part C\np1 = 0.35\np2 = 0.52\np3 = 0.26\nprint \"[Part:C] p1+p2+p3 > 1 so it is not permissible\"\n\n# Part D\np1 = 0.57\np2 = 0.24\np3 = 0.19\nprint \"[Part:D] p1+p2+p3 = 1 so it is not permissible\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "[Part:A] p1+p2+p3 = 1 so it is permissible\n[Part:B] p3 < 0 so it is not permissible\n[Part:C] p1+p2+p3 > 1 so it is not permissible\n[Part:D] p1+p2+p3 = 1 so it is not permissible\n"
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Probability add for mutually exclusive events\n\n#Variable declaration\nl = [0.07, 0.12, 0.17, 0.32, 0.21, 0.11]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\np1 = l[0]+l[1]+l[2]+l[3] \np2 = l[3]+l[4]+l[5]\n\n#Results\nprint \"Part(a): Probability: \",p1\nprint \"Part(b): Probability: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): Probability: 0.68\nPart(b): Probability: 0.64\n"
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-63"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The probability of requiring repair under warranty\n\n#Variable Declaration\np1=0.87 # probability of Repair on the engine\np2=0.36 # probability of drive train\np3=0.29 # probability of rapair as well as drive train\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nP = p1+p2-p3 # Required probability\n\n#Results\nprint \"probability of at least one kind of repair: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of at least one kind of repair: 0.94\n"
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-68"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating a conditional probability\n\n#Variable Declaration\np1=0.81 # High fidelity\np2=0.18 # High fidelity and high selectivity\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nP = p2/p1 # i.e. required probability\nP=round(P,3) # i.e. 2/9\n\n#Results\nprint \"Required probability: \",P,\"or 2/9\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.222 or 2/9\n"
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Using the general multiplication rule of probability\n\n#Variable Declaration\nn=20 # Total workers\nm=8 # favourable condition\nr=2 # workers to be selected\n\n#Calculation\ndef fact(n):\n \"\"\"returns factorial of a given number\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\nP = float(comb(8,2))/comb(20,2) # Required probability=Favourable cases/Total cases\nP=round(P,3) # i.e. 14/95\n\n#Results\nprint \"required probability is: \",P,\"or 14/95\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "required probability is: 0.147 or 14/95\n"
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The outcomes to umrelated parts of an experiment can be treated as independent.\n\n#Variable declaration\np = 0.5 # Probability of getting head in one flip\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n#Results\nprint \"Probability: \",p*p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability: 0.25\n"
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Independence and selection with and without replacement\n\n#Variable Declaration\nn = 52 # Total cards\nm = 4 # Total aces in a deck\nr = 2 # Cards to be drawn\n\n#Calculation\ndef fact(n):\n \"\"\"returns factorial of a given number\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\np1 = (float(comb(m,1))/comb(n,1)) * (float(comb(m,1))/comb(n,1)) # Required probability for (a)\np2 = (float(comb(m,1))/comb(n,1)) * (float(comb(m-1,1))/comb(n-1,1)) # Required probability for (b)\np1=round(p1,3) # i.e. (4/52)*(4/52)\np2=round(p2,3) # i.e. (4/52)*(3/51)\n\n#Results\nprint \"probability of two aces with replacement: \",p1,\"or 1/169\"\nprint \"probability of two aces without replacement: \",p2,\"or 1/221\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of two aces with replacement: 0.006 or 1/169\nprobability of two aces without replacement: 0.005 or 1/221\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#checking if two events are independent under an assigned probability\n\n#Variable Declaration\np1 = 0.65 # probability of event C\np2 = 0.40 # probability of event D\np3 = 0.40 # probability of event C and D both Occuring symultanously\n\n#Calculation\n# two events are independent if P(C)*P(D)=P(C and D)\nMul = p1*p2\n\n#Results\nif(Mul==p3):\n print p1*p2,\"is equal to\",p3,\"Thus C and D are INDEPENDENT EVENTS\"\nelse:\n print p1*p2,\"is not equal to\",p3,\"Thus C and D are DEPENDENT EVENTS\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "0.26 is not equal to 0.4 Thus C and D are DEPENDENT EVENTS\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Assigning probability by the special product rule.\n\n#Variable Declaration\np1 = 0.8 # probability of event A\np2 = 0.7 # probability of event B\n\n#Calculation\nP_Intersection = p1*p2\n\n#Results\nprint \"P(A and B):\",P_Intersection",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(A and B): 0.56\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The extended special product rule of probabiity\n\n#Variable Declaration\nn = 6 # Total possible outcomes after one roll\nm = 5 # favourable outcomes of not getting 6 for each roll\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nP = float(comb(5,1))/comb(6,1) # probability of not getting 6 in one roll\nP = P**4 # required probability\nP=round(P,3) # equal to 625/1296\n\n#Results\nprint \"Required probability:\",P,\"or 625/1296\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.482 or 625/1296\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The probability of falsely signaling a pollution problem\n\n#Variable declaration\np = 0.99 # Probability of specimen to be in compliance\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n#Results\nprint \"Probability of both in compliance: \",round(p*p,4)\nprint \"Probability of both in compliance: \",round(pow(p,104.0),2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability of both in compliance: 0.9801\nProbability of both in compliance: 0.35\n"
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-74"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Using Baye's theorem\n\n#Variable Declaration\n# Event B-service incomplete\n# Event A1- breakdown service by Janet; Event A2- breakdown service by Tom; Event A3- breakdown service by Georgia; Event A4- breakdown service by Peter\n# Event B1- incomplete repair by Janet; Event B2- incomplete repair by Tom; Event B3- incomplete repair by Georgia; Event B4- incomplete repair by Peter\n# we need to find P(A1/B) i.e.=(P(A1).P(B/A1))/(P(A1).P(B/A1)+P(A2).P(B/A2)+P(A3).P(B/A3)+P(A4).P(B/A4))\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nP = (0.20 * .05)/((0.20*.05)+(0.60*.10)+(0.15*.10)+(0.05*.05)) # Required probability\nP=round(P,3)\n\n#Results\nprint \"Required probability: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.114\n"
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3_1.ipynb
new file mode 100755
index 00000000..557e4cb0
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter3_1.ipynb
@@ -0,0 +1,503 @@
+{
+ "metadata": {
+ "name": "Chapter3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 3: Probability"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-47"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nSample = set([(0,0),(0,1),(1,0),(1,1),(0,2),(2,0)])\nC = set([(1,0),(0,1)])\nD = set([(0,0),(0,1),(0,2)])\nE = set([(0,0),(1,1)])\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom sets import Set\n\nun = C|E\ninter = C & D\nD_comp = Sample - D\n\n# Result\nprint \"Part A: \",un\nprint \"Part B: \",inter\nprint \"Part C: \",D_comp",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part A: set([(0, 1), (1, 0), (0, 0), (1, 1)])\nPart B: set([(0, 1)])\nPart C: set([(2, 0), (1, 0), (1, 1)])\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-50"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=25 #total members\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(25,1) * comb(24,1) # total number of methods\n\n#Results\nprint \"total ways: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "total ways: 600\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-50"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=12 #total Questions\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Each question can be answered in 2 ways,\nways = pow(2,float(n)) # total number of methods\n\n#Results\nprint \"total ways: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "total ways: 4096\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-51"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn1 = 4 # Total operators\nn2 = 3 # Total Machines\nn3 = 8 # Test specimens for each pair\n\n#Calculation\nTotal_pairs = n1*n2\nTotal_specimens = n1*n2*n3\n\n#Results\nprint \"Total Pairs: \",Total_pairs\nprint \"Total Test specimens: \",Total_specimens",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total Pairs: 12\nTotal Test specimens: 96\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-52"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn = 5 # Total chips\nr = 5 # Total positions\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef perm(n,r):\n return fact(n)/(fact(n-r))\n\nways=perm(5,5) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 120\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-53"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=20 # Total Assistants\nr=3 # Assistants to be chosen\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(20,3) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 1140\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-53"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn = 15 # Total machines\nr = 3 \n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(n,r) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 455\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-53"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn_chem=7 # Total chemists\nr_chem=2 # chemists to be selected\nn_phy=9 # Total physicists\nr_phy=3 # physicists to be selected\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nways=comb(n_chem,r_chem) * comb(n_phy,r_phy) # total number of methods\n\n#Results\nprint \"Total methods: \",int(ways)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total methods: 1764\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-56"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=52 # Total number of cards\nm=4 # Total number of ace\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nprob = float(comb(m,1))/comb(n,1) # Required probability\nprob=round(prob,3) # i.e. 1/13\n\n#Results\nprint \"Required probability: \",prob,\"or 1/13\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.077 or 1/13\n"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-56"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn1 = 10 # Total machines\nn2 = 8 # Working Machines\nr = 2 # To be selected\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n return fact(n)/(fact(r)*fact(n-r))\n\np1 = comb(n2,r)/float(comb(n1,r)) \np2 = comb(n2,1)*comb(n1-n2,1)/float(comb(n1,r))\n\n#Results\nprint \"Probability: Both motors works: \",round(p1,3)\nprint \"Probability: Exactly one works: \",round(p2,3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability: Both motors works: 0.622\nProbability: Exactly one works: 0.356\n"
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-57"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=300 # Total insulators\nm=294 \t\t\t\t # insulators having capacity of withstand shock\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nprob = float(comb(m,1)) / comb(n,1) # Resultant probability\nprob=round(prob,3)\n\n#Results\nprint \"Required probability: \",prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.98\n"
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-59"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\n\n# Part A\np1 = 1.0/3\np2 = 1.0/3\np3 = 1.0/3\nprint \"[Part:A] p1+p2+p3 = 1 so it is permissible\"\n\n# Part B\np1 = 0.64\np2 = 0.38\np3 = -0.02\nprint \"[Part:B] p3 < 0 so it is not permissible\"\n\n# Part C\np1 = 0.35\np2 = 0.52\np3 = 0.26\nprint \"[Part:C] p1+p2+p3 > 1 so it is not permissible\"\n\n# Part D\np1 = 0.57\np2 = 0.24\np3 = 0.19\nprint \"[Part:D] p1+p2+p3 = 1 so it is not permissible\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "[Part:A] p1+p2+p3 = 1 so it is permissible\n[Part:B] p3 < 0 so it is not permissible\n[Part:C] p1+p2+p3 > 1 so it is not permissible\n[Part:D] p1+p2+p3 = 1 so it is not permissible\n"
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = [0.07, 0.12, 0.17, 0.32, 0.21, 0.11]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\np1 = l[0]+l[1]+l[2]+l[3] \np2 = l[3]+l[4]+l[5]\n\n#Results\nprint \"Part(a): Probability: \",p1\nprint \"Part(b): Probability: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): Probability: 0.68\nPart(b): Probability: 0.64\n"
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-63"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np1=0.87 # probability of Repair on the engine\np2=0.36 # probability of drive train\np3=0.29 # probability of rapair as well as drive train\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nP = p1+p2-p3 # Required probability\n\n#Results\nprint \"probability of at least one kind of repair: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of at least one kind of repair: 0.94\n"
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-68"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np1=0.81 # High fidelity\np2=0.18 # High fidelity and high selectivity\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nP = p2/p1 # i.e. required probability\nP=round(P,3) # i.e. 2/9\n\n#Results\nprint \"Required probability: \",P,\"or 2/9\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.222 or 2/9\n"
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn=20 # Total workers\nm=8 # favourable condition\nr=2 # workers to be selected\n\n#Calculation\ndef fact(n):\n \"\"\"returns factorial of a given number\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\nP = float(comb(8,2))/comb(20,2) # Required probability=Favourable cases/Total cases\nP=round(P,3) # i.e. 14/95\n\n#Results\nprint \"required probability is: \",P,\"or 14/95\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "required probability is: 0.147 or 14/95\n"
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\np = 0.5 # Probability of getting head in one flip\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n#Results\nprint \"Probability: \",p*p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability: 0.25\n"
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 52 # Total cards\nm = 4 # Total aces in a deck\nr = 2 # Cards to be drawn\n\n#Calculation\ndef fact(n):\n \"\"\"returns factorial of a given number\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\np1 = (float(comb(m,1))/comb(n,1)) * (float(comb(m,1))/comb(n,1)) # Required probability for (a)\np2 = (float(comb(m,1))/comb(n,1)) * (float(comb(m-1,1))/comb(n-1,1)) # Required probability for (b)\np1=round(p1,3) # i.e. (4/52)*(4/52)\np2=round(p2,3) # i.e. (4/52)*(3/51)\n\n#Results\nprint \"probability of two aces with replacement: \",p1,\"or 1/169\"\nprint \"probability of two aces without replacement: \",p2,\"or 1/221\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of two aces with replacement: 0.006 or 1/169\nprobability of two aces without replacement: 0.005 or 1/221\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np1 = 0.65 # probability of event C\np2 = 0.40 # probability of event D\np3 = 0.40 # probability of event C and D both Occuring symultanously\n\n#Calculation\n# two events are independent if P(C)*P(D)=P(C and D)\nMul = p1*p2\n\n#Results\nif(Mul==p3):\n print p1*p2,\"is equal to\",p3,\"Thus C and D are INDEPENDENT EVENTS\"\nelse:\n print p1*p2,\"is not equal to\",p3,\"Thus C and D are DEPENDENT EVENTS\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "0.26 is not equal to 0.4 Thus C and D are DEPENDENT EVENTS\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np1 = 0.8 # probability of event A\np2 = 0.7 # probability of event B\n\n#Calculation\nP_Intersection = p1*p2\n\n#Results\nprint \"P(A and B):\",P_Intersection",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(A and B): 0.56\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 6 # Total possible outcomes after one roll\nm = 5 # favourable outcomes of not getting 6 for each roll\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nP = float(comb(5,1))/comb(6,1) # probability of not getting 6 in one roll\nP = P**4 # required probability\nP=round(P,3) # equal to 625/1296\n\n#Results\nprint \"Required probability:\",P,\"or 625/1296\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.482 or 625/1296\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-70"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\np = 0.99 # Probability of specimen to be in compliance\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n#Results\nprint \"Probability of both in compliance: \",round(p*p,4)\nprint \"Probability of both in compliance: \",round(pow(p,104.0),2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability of both in compliance: 0.9801\nProbability of both in compliance: 0.35\n"
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-74"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\n# Event B-service incomplete\n# Event A1- breakdown service by Janet; Event A2- breakdown service by Tom; Event A3- breakdown service by Georgia; Event A4- breakdown service by Peter\n# Event B1- incomplete repair by Janet; Event B2- incomplete repair by Tom; Event B3- incomplete repair by Georgia; Event B4- incomplete repair by Peter\n# we need to find P(A1/B) i.e.=(P(A1).P(B/A1))/(P(A1).P(B/A1)+P(A2).P(B/A2)+P(A3).P(B/A3)+P(A4).P(B/A4))\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nP = (0.20 * .05)/((0.20*.05)+(0.60*.10)+(0.15*.10)+(0.05*.05)) # Required probability\nP=round(P,3)\n\n#Results\nprint \"Required probability: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.114\n"
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4.ipynb
new file mode 100755
index 00000000..a9a53b39
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4.ipynb
@@ -0,0 +1,563 @@
+{
+ "metadata": {
+ "name": "Chapter4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 4: Probability Distributions"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-83"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Checking for nonegativity and total probability equals one\n\n#Variable Declaration\nfrom scipy import *\nfrom pylab import *\n\nx1 = array([1,2,3,4]) # Domain of f(x)\nx2 = array([0,1,2,3,4]) # Domain of h(x)\nf = (x1-2)/2.0 # list of values of f(x)\nh = (x2*x2)/25.0 # list of values of h(x)\n\n#Calculation\n\n#Results\nif(sum(f)!=1):\n print \"f(x) can not serve as probability distribution\"\n\nif(sum(h)!=1):\n print \"h(x) can not serve as probability distribution\"\n \nprint \"f(0) is negative(P>=0) so f(x) can not serve as probability distribution\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "h(x) can not serve as probability distribution\nf(0) is negative(P>=0) so f(x) can not serve as probability distribution\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-87"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Evaluating binomial probabilities\n\n#Variable Declaration\nn = 5 # total number of installations \np = 0.6 # probability of heat installations reduced by one-third\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np1 = comb(5,4) * (p**4) * ((1-p)**1) # probability of exactly four out of five\np1=round(p1,3)\n\np2 = (comb(5,4) * (p**4) * ((1-p)**1)) + (comb(5,5) * (p**5) * ((1-p)**0)) # probability of atleast four out of five\np2=round(p2,3)\n\n#Results\nprint \"probability of reduction of utility bill in exactly 4 out of 5: \",p1\nprint \"probability of reduction of utility bill in atleast 4 out of 5: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of reduction of utility bill in exactly 4 out of 5: 0.259\nprobability of reduction of utility bill in atleast 4 out of 5: 0.337\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-87"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Evaluating cumulative binomial probabilities\n\n#Variable Declaration\np = 0.05 # probability of failure due to load\nn = 16 # total columns\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np1 = comb(16,0)*(p**0)*((1-p)**16) + comb(16,1)*(p**1)*((1-p)**15) + comb(16,2)*(p**2)*((1-p)**14) # probability of failure of at most 2\np1 = round(p1,3)\np2 = comb(16,0)*(p**0)*((1-p)**16) + comb(16,1)*(p**1)*((1-p)**15) + comb(16,2)*(p**2)*((1-p)**14) + comb(16,3)*(p**3)*((1-p)**13) # probability of at most 3\np2 = 1-p2 # probability of failures of at least 4\np2 = round(p2,3)\n\n#Results\nprint \"probability of failure of at most 2 out of 16 columns: \",p1\nprint \"probability of failure of at least 4 out of 16 columns: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of failure of at most 2 out of 16 columns: 0.957\nprobability of failure of at least 4 out of 16 columns: 0.007\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-88"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Finding a binomial probability using cumulative binomial probabilities\n\n#Variable Declaration\np = 0.3 # probability of not passing inspection\nn = 18 # total panels\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\np1 = comb(18,6)*(p**6)*((1-p)**12)\np1 = round(p1,4)\n\n#Results\nprint \"Required probability: \",p1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.1873\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-88"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A binomial probability to guide decision making\n\n#Variable Declaration\np = 0.1 # probability for repairing\nn = 20 # total hard drives\np1 = 0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nfor i in range(0,5):\n p1 = p1 + comb(20,i)*(p**i)*((1-p)**(n-i))\np1 = 1 - round(p1,4)\n\n#Results\nprint \"As the probability(\",p1,\") is very less, so reject the claim.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "As the probability( 0.0432 ) is very less, so reject the claim.\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-90"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating a probability using the hypergeometric distribution\n\n#Variable Declaration\nn = 20 # total chargers\nn1 = 10 # total selected chargers\nr = 5 # total defective chargers\nr1 = 2 # defective chargers to be selected out of 5\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np = (comb(r,r1)*comb(n-r,n1-r1)) / float(comb(n,n1)) # Required probability\np = round(p,3)\n\n#Results\nprint \"probability of exactly 2 defective out of 10: \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of exactly 2 defective out of 10: 0.348\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-90"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A numerical comparision of the hypergeometric and binomial distributions.\n\n#Variable Declaration\nn = 100 # total chargers\nn1 = 10 # total selected chargers\nr = 25 # total defective chargers\nr1 = 2 # defective chargers to be selected out of 5\np = 0.25\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np1 = (comb(r,r1)*comb(n-r,n1-r1)) / float(comb(n,n1)) \np1 = round(p1,3)\n\np2 = comb(n1,r1)*(p**r1)*((1-p)**(n1-r1))\np2 = round(p2,3)\n\n#Results\nprint \"For Hypergeometric distribution: \",p1\nprint \"For Binomial distribution: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "For Hypergeometric distribution: 0.292\nFor Binomial distribution: 0.282\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-95"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The mean number of heads in threee tosses\n\n#Variable Declaration\nn = 3 # no of tosses\np0 = (0.5)*(0.5)*(0.5) # probability of Number of heads=0\np1 = 3*(0.5)*(0.5)*(0.5) # probability of Number of heads=1\np2 = 3*(0.5)*(0.5)*(0.5) # probability of Number of heads=2\np3 = (0.5)*(0.5)*(0.5) # probability of Number of heads=3\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, mean = Sum(x*P(x))\nmean_head = (p0)*0 + (p1)*1 + (p2)*2 + (p3)*3 # mean of number of heads\n\n#Results\nprint \"Mean of number of heads in 3 flips: \",mean_head",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of number of heads in 3 flips: 1.5\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-95"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The mean number of preferred used car attributes\n\n#Variable Declaration\na = ([[0,0.18], [1,0.5], [2,0.29], [3,0.03]])\nU = 0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor i in range(0,4):\n U = U + a[i][0]*a[i][1]\n \n#Results\nprint \"Mean of the probability distribution: \",U",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of the probability distribution: 1.17\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using u=np to find the mean number of heads in three tosses\n\n#Variable Declaration\nn = 3 # No. of flips\np = 0.5 # probability of head in one flip\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n#Results\nprint \"Mean Number of heads: \",n*p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean Number of heads: 1.5\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Using the formula for the mean of a hypergeometric distribution\n\n#Variable Declaration\nN = 20 # Total car chargers\nn = 10 # Number of selected car chargers\na = 5 # Defective car chargers\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, for hypergeometric distribution, mean = (n*a)/N\nMean=float((n*a))/N # Mean of probability distribution of number of defectives\n\n#Results\nprint \"mean of probability distribution of the number of defectives in a sample of 10 car chargers: \",Mean",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean of probability distribution of the number of defectives in a sample of 10 car chargers: 2.5\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-97"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculate the standard deviation of the two probability distribution of figure \"Ex.2.97.1.png\".\n\n#Variable declaration\nn1 = 4 # for subplot-1\np1 = 0.5 # for subplot-1\nn2 = 16 # for subplot-2\np2 = 0.5 # for subplot-2\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n%matplotlib inline\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n# To calculate standard deviation of subplot-1\n\nx1 = [0,1,2,3,4] # for subplot-1\nf1=[]\nMean1 = (n1)*(p1) # mean of subplot-1\ny1=0\n\nfor each in x1:\n y1 = y1 + ((each-Mean1)**2)*(comb(n1,each)*((p1)**n1))\n\nstd_dev1 = sqrt(y1) # standard deviation of subplot-1\n\nfor each in x1:\n f1.append((comb(n1,each)*((p1)**n1)))\n \n# To calculate standard deviation of subplot-2\n\nx2=[2,3,4,5,6,7,8,9,10,11,12,13,14] # for subplot-2\nf2=[]\nMean2 = (n2)*(p2) # Mean of subplot-2\ny2 = 0\n\nfor each in x2:\n y2 = y2 + ((each-Mean2)**2)*(comb(n2,each)*((p2)**n2))\n\nstd_dev2 = sqrt(y2) # Standard deviation of subplot-2\nstd_dev2=round(std_dev2,1)\n\nfor each in x2:\n f2.append((comb(n2,each)*((p2)**n2)))\n \n# subplot-1\nsubplot(2,1,1)\nbar(x1,f1,width=1.0,fill=False)\ntitle(\"Probability distribution plot-1\")\nxlabel(\"$x$\")\nylabel(\"$f1(x)$\")\n\n# subplot-2\nsubplot(2,1,2)\ntitle(\"Probability distribution plot-2\")\nbar(x2,f2,width=1.0,fill=False)\nxlabel(\"$x$\")\nylabel(\"$f2(x)$\")\n\n#Results\nprint \"First subplot standard deviation: \",std_dev1,\"\\nSecond subplot standard deviation: \",std_dev2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First subplot standard deviation: 1.0 \nSecond subplot standard deviation: 2.0\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUU2f+P/B30KCCyCZFQrAoUEAFxAawVioq4tKKgrXi\nuFZK+3Vq+9NuHmjda+sy2m9dOkcZl6ladOginqqMdUmltkgVKxV0VEqGHTdUlAoS7+8PviZEAiRB\ncgHfr3N6TpP7PE8+9zHkc9fPlQiCIICIiMhIFmIHQEREbRMTCBERmYQJhIiITMIEQkREJmECISIi\nkzCBEBGRSZhAyCwsLCzwxx9/mNTX3d0dR44c0bssLS0NPj4+Om2PHj0KAPjkk08QFxdn0mc2RaVS\nwcLCAg8ePAAAjBkzBjt27HgsY+tbp4bW3xT9+vXD8ePHH9t4hnh0vqh9YAKhBrm7u8PKygo2Njbo\n0aMHXn31Vdy9e9fscUgkEkgkEr3LQkNDceHCBZ22DyUkJCAxMRFAy/+AHThwANOmTWuynSGJVN86\nNbT+TZk5cyYWLFig8965c+fwwgsvmDSeOSxevLjJuSwtLUVkZCRcXV1hYWGB/Px8M0VHdTGBUIMk\nEgm+//57VFRUIDMzE6dOncLHH39cr11NTY0I0ZmmNdw321gMbWkuxWRhYYExY8bgm2++ETuUJxoT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RERkEiYQIiIyCRMIERGZhAmEiIhMwgRCREQmYQIhIiKT\n/H+2ltTIZ/ZyeAAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0xa390710>"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-98"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Using the formula for variance of the binomial distribution\n\n#Variable Declaration\nn = 16 \np = 0.5 \n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nVariance = float(n*p*(1-p)) # Variance of Sample\nstd_dev=sqrt(Variance) # standard deviation of sample\n\n#Results\nprint \"standard deviation of given sample: \",int(std_dev)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "standard deviation of given sample: 2\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-98"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Using the formula for variance of the hypergeometric distribution\n\n#Variable Declaration\nN = 20 # Total car chargers\nn = 10 # Number of selected car chargers\na = 5 # Defective car chargers\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, for hypergeometric distribution, Variance = (n.a/n)*(1-a/N)*((N-n)/(N-1))\nVariance = (float((n*a))/N)*(1-(float(a)/N))*((float(N-n)/(N-1))) # Variance of Sample\nstd_dev=sqrt(Variance) # standard deviation of sample\nstd_dev = round(std_dev,2)\n\n#Results\nprint \"standard deviation of given sample: \",std_dev",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "standard deviation of given sample: 0.99\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating variance using the alternative computing formula\n\n#Variable Declaration\nU = (1.0/6)*(1+2+3+4+5+6) # Mean of probability distribution \nU1 = (1.0/6)*(1*1 + 2*2 + 3*3 + 4*4 + 5*5 + 6*6) # Second moment about the origin\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, Variance = (U1)-U*U\n\nVariance = (U1) - U*U # Variance of probability distribution\nVariance = round(Variance,2)\n\n#Results\nprint \"Variance of Given probability distribution: \",Variance,\"or 35/12\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Variance of Given probability distribution: 2.92 or 35/12\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#The mean and variance of the number of incorrect addresses\n\n#Variable declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nl = array([[0,0.05],[1,0.20],[2,0.45],[3,0.20],[4,0.10]])\nx = l[:,0]\nf = l[:,1]\n\nU = sum(x*f) # Mean of distribution\nU2 = sum(x*x*f) # Second moment about origin\nVariance = U2 - (U)*(U) # Variance of given probability distribution\n\nVariance = round(Variance,2)\nU = round(U,2)\n\n#Results\nprint \"Mean of given probability distribution: \",U\nprint \"Variance of given probability distribution: \",Variance\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of given probability distribution: 2.1\nVariance of given probability distribution: 0.99\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-101"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#A probability bound using chebyshev's theorem\n\n#Variable Declaration\n# as we know K = (x-Mean)/std_dev, P(|x-Mean| < K*std_dev) >= 1-(1/(K*K))\n\nK1 = (28-18)/2.5 # Corresponding to 28 customers\nK2 = (18-8)/2.5 # Corresponding to 8 customers\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# P( 8 < X < 28) >= 1-(1/(K*K)) \n\nK = 4 # K=K1=K2\nP = 1-(1.0 / (K*K)) # Required probability\n\n#Results\nprint \" Probability of number of customers greater than 8 but less than 28 is greater than or equal to : \",P,\"or 15/16\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Probability of number of customers greater than 8 but less than 28 is greater than or equal to : 0.9375 or 15/16\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-102"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Chebyshev's theorem with a large number of bernoulli trials\n\n#Variable Declaration\nn = 40000 \np = 0.5 \n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = n*p\nVariance = float(n*p*(1-p)) # Variance of Sample\nstd_dev=sqrt(Variance) # standard deviation of sample\n\nk_square = 1/(1-0.99)\nk = sqrt(k_square)\n\nMin_heads = Mean - k*std_dev\nMax_heads = Mean + k*std_dev\n\np1 = Min_heads/n\np2 = Max_heads/n\n\n#Results\nprint \"Probability limit: (\",round(p1,3),\",\",round(p2,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability limit: ( 0.475 , 0.525 )\n"
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-105"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Comparing poisson and binomial probabilities\n\n#Variable Declaration\nr = 2 # defective books\nn = 100 # total books\np = 0.05 # probability of a book being defective\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n# using bionomial distribution\np1 = comb(100,2)*pow(p,2)*pow(1-p,98) # required probability using bionomial distribution\np1=round(p1,3)\n# using poisson distribution\nlamda = n*p\n# we know P = (pow(e,-lamda)*pow(lamda,r)) / fact(r)\np2 = (pow(e,-lamda)*pow(lamda,r)) / fact(r) # required probability\np2 = round(p2,3)\n\n#Results\nprint \"using bionomial distribution: probability = \",p1\nprint \"using poisson distribution: probability = \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "using bionomial distribution: probability = 0.081\nusing poisson distribution: probability = 0.084\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-106"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A poisson approximation to binomial probabilities\n\n#Variable Declaration\nn = 3840 \np = 1.0/1200 \nl = []\nx = [0,1,2,3,4,5,6,7,8,9,10]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \nlamda = n*p\n\nfor i in range(0,11):\n val = (pow(e,-lamda)*pow(lamda,i))/fact(i)\n l.append(val)\n\n#Results\nprint \"Lamda: \",lamda\nbar(x,l,width=1,fill=False) \nxlabel(\"$No. of Failed generators$\")\nylabel(\"$Probability$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Lamda: 3.2\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 27,
+ "text": "<matplotlib.text.Text at 0xa350898>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAETCAYAAAAh/OHhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHyhJREFUeJzt3XlwVfX9//HXtbmKEoQkDQnJDUZzQxYJYckiIGNUAhIl\nlsjYKJuKiLRUpWhb269j6lg0ZRyL0s4gi4WCkXEZQhGiRROrQAibsmtAlhBMQCFAAM3S8/uD8f6M\nYckHcs9NLs/HDDN3+Xzu531yyXnlLJ9zHJZlWQIAoIWu8HUBAID2heAAABghOAAARggOAIARggMA\nYITgAAAYsTU4ioqKFB8fr9jYWOXn5zd7f9GiRUpOTlavXr00cOBAbd682fNedHS0evXqpT59+igt\nLc3OsgEAP+Kwax5HY2Oj4uLitHLlSkVGRio1NVUFBQVKSEjwtFmzZo0SExPVuXNnFRUVKS8vT6Wl\npZKk66+/Xhs2bFBwcLAd5QIAzsG2LY6ysjK53W5FR0fL6XQqNzdXhYWFTdr0799fnTt3liSlp6fr\nwIEDTd5nriIA+J5twVFZWamoqCjPc5fLpcrKynO2nzt3rrKysjzPHQ6HBg8erJSUFM2ePdurtQIA\nzi3AroEcDkeL2xYXF2vevHlatWqV57VVq1apW7duOnz4sDIzMxUfH69BgwZ5o1QAwHnYFhyRkZGq\nqKjwPK+oqJDL5WrWbvPmzZowYYKKiooUFBTkeb1bt26SpNDQUI0YMUJlZWXNgsPtdmv37t1eWgIA\n8E8xMTHatWtXyztYNqmvr7duuOEGa8+ePdb3339vJScnW9u3b2/SZt++fVZMTIy1Zs2aJq+fPHnS\nOn78uGVZllVbW2sNGDDAev/995uNYePi+MSzzz7r6xK8iuVrv/x52SzL/5fPdN1p2xZHQECAZs6c\nqaFDh6qxsVHjx49XQkKCZs2aJUmaOHGinnvuOR09elSTJk2SJDmdTpWVlamqqko5OTmSpIaGBo0a\nNUpDhgyxq3QAwI/YFhyS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zj959913P3QLnz5+vUaNG\nSTqzQv3xvZTP9962bduUlJTkef7NN9+orq5OU6dO1WOPPebZMli4cKHn3i6ff/65+vbtqwEDBqiw\nsFDDhw9vsptqyZIlio2N1bJly+RwOOR2u5v037x5s3r37q29e/fKsiwFBgZq7dq16t+/v5YsWSK3\n292k780336zdu3crNTVVx44dU0BAwFnH6dmzp9avX69bb71VV1111Tnr/mEr41w/n5tuuqnZ50jS\n6NGj9dvf/lbvvvvuOY/54PJCcKDNW7dunfr27StJ6tSpk3r27KnDhw9Lkurq6tS9e3dJ0ttvv60x\nY8Zo375953zvB1u3bm0SHGVlZZ5dQklJSZ5jGzU1NYqLi1NdXZ1OnDihdevW6fjx43I4HNqyZYs2\nbNigfv36qbi4WFdffbWys7N11113adCgQTp06FCT/rW1tSotLfW8Jkkff/yxBgwYoA4dOujuu+9u\n0vf06dOem+osX75cmZmZWrNmTbNxqqur9f3338vpdHqW52x1r1u3TmlpaVq3bp1OnTp11p/PTz/n\nP//5jzZv3qxPP/3UszsO+FleXl6er4sAzuWjjz7Sn/70J4WHh3vuLNehQwfFxMQoKipK1113nZYv\nX+45fhAXF6ecnByNHz++2Xs/PoA9e/ZsPfLII5LOHBSfPn26LMtSdHR0k9sOh4aGqri4WF9//bVq\na2sVHBys6OholZWVKTY2VldffbU+//xzZWVlKSkpSUuXLlVtba02bNigvn37Kjw8vEn/kJAQ3XLL\nLSouLtaxY8f01ltvacqUKXK73c36bt26VQEBAUpLS9O+fftUUVGh9PR09evXr0nb4OBgffPNN7rt\nttvOWXdQUJC6d++u9evXKyIiQj169Gj28+nWrZuqqqqafE5tba2OHDmiHTt2qG/fvnK73d7+ytEO\ncCMnXFbeffdd1dXV6dNPP9XMmTN9UkN1dbXCwsJ07NgxPfXUU3rttdd8UgdwsTirCpcVp9Op3bt3\n6ze/+Y3PavjDH/6gu+++W+Xl5WKDH+0RWxwAACMcHAcAGCE4AABGCA4AgBGCAwBghOAAABghOAAA\nRggOAIARggMAYOT/AWuv49so9M+lAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0xa3475f8>"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-106"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A poisson distribution for counts of particles\n\n#Variable Declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \nlamda = 1.3\n\nval = (pow(e,-lamda)*pow(lamda,0))/fact(0)\np = 1 - val\nvariance = lamda\n\n#Results\nprint \"Lamda: \",lamda\nprint \"Probability(X>=1): \",round(p,3)\nprint \"Variance: \",variance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Lamda: 1.3\nProbability(X>=1): 0.727\nVariance: 1.3\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-107"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating probabilities concerning bad checks\n\n#Variable Declaration\nalpha = 6 # no of bad checks per day\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n# 4 bad checks on any day\nlamda = alpha*1 # As T=1\n\np1 = (pow(e,-lamda)*pow(lamda,4)) / fact(4) # required probability\np1 = round(p1,3)\n\n# 10 bad checks over any 2 consecutive days\nlamda = alpha*2\n\np2 = ((pow(e,-lamda)*pow(lamda,10)) / fact(10)) # required probability\np2 = round(p2,3)\n\n#Results\nprint \" probability of 4 bad cheacks on any day: \",p1\nprint \" probability of 10 bad cheacks on any 2 consecutive days: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " probability of 4 bad cheacks on any day: 0.134\n probability of 10 bad cheacks on any 2 consecutive days: 0.105\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-108"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the probabilities of imperfections\n\n#Variable Declaration\nl = []\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \nlamda = (0.2)*3\nl.append((pow(e,-lamda)*pow(lamda,1))/fact(1))\n\nlamda = (0.2)*5\nval = (pow(e,-lamda)*pow(lamda,0))/fact(0) + (pow(e,-lamda)*pow(lamda,1))/fact(1)\nl.append(1 - val)\n\nlamda = (0.2)*15\nl.append((pow(e,-lamda)*pow(lamda,0))/fact(0) + (pow(e,-lamda)*pow(lamda,1))/fact(1))\n\n#Results\nprint \"Part(a): \",round(l[0],3)\nprint \"Part(b): \",round(l[1],3)\nprint \"Part(c): \",round(l[2],3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): 0.329\nPart(b): 0.264\nPart(c): 0.199\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-109"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating a probability using the geometric distribution\n\n#Variable Declaration\np = 0.05 # probability of any device to show excessive drift\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\np1 = pow(1-p,5)*pow(p,1) # required probability\np1 = round(p1,3)\n\n#Results\nprint \"probability of sixth measuring device to be the first to show excessive drift: \",p1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of sixth measuring device to be the first to show excessive drift: 0.039\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-112"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating a probability using the multinomial distribution\n\n#Variable Declaration\nn = 8\nn1 = 2\nn2 = 5\nn3 = 1\np1 = 0.3\np2 = 0.5\np3 = 0.2\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \np = (fact(8)/(fact(2)*fact(5)*fact(1)))*(pow(p1,2)*pow(p2,5)*pow(p3,1))\n\n#Results\nprint \"Required Probability: \",round(p,4)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required Probability: 0.0945\n"
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4_1.ipynb
new file mode 100755
index 00000000..244a979a
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter4_1.ipynb
@@ -0,0 +1,563 @@
+{
+ "metadata": {
+ "name": "Chapter4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 4: Probability Distributions"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-83"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nfrom scipy import *\nfrom pylab import *\n\nx1 = array([1,2,3,4]) # Domain of f(x)\nx2 = array([0,1,2,3,4]) # Domain of h(x)\nf = (x1-2)/2.0 # list of values of f(x)\nh = (x2*x2)/25.0 # list of values of h(x)\n\n#Calculation\n\n#Results\nif(sum(f)!=1):\n print \"f(x) can not serve as probability distribution\"\n\nif(sum(h)!=1):\n print \"h(x) can not serve as probability distribution\"\n \nprint \"f(0) is negative(P>=0) so f(x) can not serve as probability distribution\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "h(x) can not serve as probability distribution\nf(0) is negative(P>=0) so f(x) can not serve as probability distribution\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-87"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 5 # total number of installations \np = 0.6 # probability of heat installations reduced by one-third\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np1 = comb(5,4) * (p**4) * ((1-p)**1) # probability of exactly four out of five\np1=round(p1,3)\n\np2 = (comb(5,4) * (p**4) * ((1-p)**1)) + (comb(5,5) * (p**5) * ((1-p)**0)) # probability of atleast four out of five\np2=round(p2,3)\n\n#Results\nprint \"probability of reduction of utility bill in exactly 4 out of 5: \",p1\nprint \"probability of reduction of utility bill in atleast 4 out of 5: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of reduction of utility bill in exactly 4 out of 5: 0.259\nprobability of reduction of utility bill in atleast 4 out of 5: 0.337\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-87"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np = 0.05 # probability of failure due to load\nn = 16 # total columns\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np1 = comb(16,0)*(p**0)*((1-p)**16) + comb(16,1)*(p**1)*((1-p)**15) + comb(16,2)*(p**2)*((1-p)**14) # probability of failure of at most 2\np1 = round(p1,3)\np2 = comb(16,0)*(p**0)*((1-p)**16) + comb(16,1)*(p**1)*((1-p)**15) + comb(16,2)*(p**2)*((1-p)**14) + comb(16,3)*(p**3)*((1-p)**13) # probability of at most 3\np2 = 1-p2 # probability of failures of at least 4\np2 = round(p2,3)\n\n#Results\nprint \"probability of failure of at most 2 out of 16 columns: \",p1\nprint \"probability of failure of at least 4 out of 16 columns: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of failure of at most 2 out of 16 columns: 0.957\nprobability of failure of at least 4 out of 16 columns: 0.007\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-88"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np = 0.3 # probability of not passing inspection\nn = 18 # total panels\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\np1 = comb(18,6)*(p**6)*((1-p)**12)\np1 = round(p1,4)\n\n#Results\nprint \"Required probability: \",p1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required probability: 0.1873\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-88"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np = 0.1 # probability for repairing\nn = 20 # total hard drives\np1 = 0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n\nfor i in range(0,5):\n p1 = p1 + comb(20,i)*(p**i)*((1-p)**(n-i))\np1 = 1 - round(p1,4)\n\n#Results\nprint \"As the probability(\",p1,\") is very less, so reject the claim.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "As the probability( 0.0432 ) is very less, so reject the claim.\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-90"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 20 # total chargers\nn1 = 10 # total selected chargers\nr = 5 # total defective chargers\nr1 = 2 # defective chargers to be selected out of 5\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np = (comb(r,r1)*comb(n-r,n1-r1)) / float(comb(n,n1)) # Required probability\np = round(p,3)\n\n#Results\nprint \"probability of exactly 2 defective out of 10: \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of exactly 2 defective out of 10: 0.348\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-90"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 100 # total chargers\nn1 = 10 # total selected chargers\nr = 25 # total defective chargers\nr1 = 2 # defective chargers to be selected out of 5\np = 0.25\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\np1 = (comb(r,r1)*comb(n-r,n1-r1)) / float(comb(n,n1)) \np1 = round(p1,3)\n\np2 = comb(n1,r1)*(p**r1)*((1-p)**(n1-r1))\np2 = round(p2,3)\n\n#Results\nprint \"For Hypergeometric distribution: \",p1\nprint \"For Binomial distribution: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "For Hypergeometric distribution: 0.292\nFor Binomial distribution: 0.282\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-95"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 3 # no of tosses\np0 = (0.5)*(0.5)*(0.5) # probability of Number of heads=0\np1 = 3*(0.5)*(0.5)*(0.5) # probability of Number of heads=1\np2 = 3*(0.5)*(0.5)*(0.5) # probability of Number of heads=2\np3 = (0.5)*(0.5)*(0.5) # probability of Number of heads=3\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, mean = Sum(x*P(x))\nmean_head = (p0)*0 + (p1)*1 + (p2)*2 + (p3)*3 # mean of number of heads\n\n#Results\nprint \"Mean of number of heads in 3 flips: \",mean_head",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of number of heads in 3 flips: 1.5\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-95"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\na = ([[0,0.18], [1,0.5], [2,0.29], [3,0.03]])\nU = 0\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor i in range(0,4):\n U = U + a[i][0]*a[i][1]\n \n#Results\nprint \"Mean of the probability distribution: \",U",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of the probability distribution: 1.17\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 3 # No. of flips\np = 0.5 # probability of head in one flip\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\n#Results\nprint \"Mean Number of heads: \",n*p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean Number of heads: 1.5\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nN = 20 # Total car chargers\nn = 10 # Number of selected car chargers\na = 5 # Defective car chargers\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, for hypergeometric distribution, mean = (n*a)/N\nMean=float((n*a))/N # Mean of probability distribution of number of defectives\n\n#Results\nprint \"mean of probability distribution of the number of defectives in a sample of 10 car chargers: \",Mean",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "mean of probability distribution of the number of defectives in a sample of 10 car chargers: 2.5\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-97"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn1 = 4 # for subplot-1\np1 = 0.5 # for subplot-1\nn2 = 16 # for subplot-2\np2 = 0.5 # for subplot-2\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n%matplotlib inline\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n\ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n# To calculate standard deviation of subplot-1\n\nx1 = [0,1,2,3,4] # for subplot-1\nf1=[]\nMean1 = (n1)*(p1) # mean of subplot-1\ny1=0\n\nfor each in x1:\n y1 = y1 + ((each-Mean1)**2)*(comb(n1,each)*((p1)**n1))\n\nstd_dev1 = sqrt(y1) # standard deviation of subplot-1\n\nfor each in x1:\n f1.append((comb(n1,each)*((p1)**n1)))\n \n# To calculate standard deviation of subplot-2\n\nx2=[2,3,4,5,6,7,8,9,10,11,12,13,14] # for subplot-2\nf2=[]\nMean2 = (n2)*(p2) # Mean of subplot-2\ny2 = 0\n\nfor each in x2:\n y2 = y2 + ((each-Mean2)**2)*(comb(n2,each)*((p2)**n2))\n\nstd_dev2 = sqrt(y2) # Standard deviation of subplot-2\nstd_dev2=round(std_dev2,1)\n\nfor each in x2:\n f2.append((comb(n2,each)*((p2)**n2)))\n \n# subplot-1\nsubplot(2,1,1)\nbar(x1,f1,width=1.0,fill=False)\ntitle(\"Probability distribution plot-1\")\nxlabel(\"$x$\")\nylabel(\"$f1(x)$\")\n\n# subplot-2\nsubplot(2,1,2)\ntitle(\"Probability distribution plot-2\")\nbar(x2,f2,width=1.0,fill=False)\nxlabel(\"$x$\")\nylabel(\"$f2(x)$\")\n\n#Results\nprint \"First subplot standard deviation: \",std_dev1,\"\\nSecond subplot standard deviation: \",std_dev2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "First subplot standard deviation: 1.0 \nSecond subplot standard deviation: 2.0\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUU2f+P/B30KCCyCZFQrAoUEAFxAawVioq4tKKgrXi\nuFZK+3Vq+9NuHmjda+sy2m9dOkcZl6ladOginqqMdUmltkgVKxV0VEqGHTdUlAoS7+8PviZEAiRB\ncgHfr3N6TpP7PE8+9zHkc9fPlQiCIICIiMhIFmIHQEREbRMTCBERmYQJhIiITMIEQkREJmECISIi\nkzCBEBGRSZhAyCwsLCzwxx9/mNTX3d0dR44c0bssLS0NPj4+Om2PHj0KAPjkk08QFxdn0mc2RaVS\nwcLCAg8ePAAAjBkzBjt27HgsY+tbp4bW3xT9+vXD8ePHH9t4hnh0vqh9YAKhBrm7u8PKygo2Njbo\n0aMHXn31Vdy9e9fscUgkEkgkEr3LQkNDceHCBZ22DyUkJCAxMRFAy/+AHThwANOmTWuynSGJVN86\nNbT+TZk5cyYWLFig8965c+fwwgsvmDSeOSxevLjJuSwtLUVkZCRcXV1hYWGB/Px8M0VHdTGBUIMk\nEgm+//57VFRUIDMzE6dOncLHH39cr11NTY0I0ZmmNdw321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Yzl3IiIyCQ9hERGRSZhAiIjIJEwgRERkEiYQIiIyCRMIERGZhAmEiIhMwgRCREQmYQIhIiKT\n/H+2ltTIZ/ZyeAAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0xa390710>"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-98"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 16 \np = 0.5 \n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nVariance = float(n*p*(1-p)) # Variance of Sample\nstd_dev=sqrt(Variance) # standard deviation of sample\n\n#Results\nprint \"standard deviation of given sample: \",int(std_dev)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "standard deviation of given sample: 2\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-98"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nN = 20 # Total car chargers\nn = 10 # Number of selected car chargers\na = 5 # Defective car chargers\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, for hypergeometric distribution, Variance = (n.a/n)*(1-a/N)*((N-n)/(N-1))\nVariance = (float((n*a))/N)*(1-(float(a)/N))*((float(N-n)/(N-1))) # Variance of Sample\nstd_dev=sqrt(Variance) # standard deviation of sample\nstd_dev = round(std_dev,2)\n\n#Results\nprint \"standard deviation of given sample: \",std_dev",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "standard deviation of given sample: 0.99\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nU = (1.0/6)*(1+2+3+4+5+6) # Mean of probability distribution \nU1 = (1.0/6)*(1*1 + 2*2 + 3*3 + 4*4 + 5*5 + 6*6) # Second moment about the origin\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# As we know, Variance = (U1)-U*U\n\nVariance = (U1) - U*U # Variance of probability distribution\nVariance = round(Variance,2)\n\n#Results\nprint \"Variance of Given probability distribution: \",Variance,\"or 35/12\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Variance of Given probability distribution: 2.92 or 35/12\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nl = array([[0,0.05],[1,0.20],[2,0.45],[3,0.20],[4,0.10]])\nx = l[:,0]\nf = l[:,1]\n\nU = sum(x*f) # Mean of distribution\nU2 = sum(x*x*f) # Second moment about origin\nVariance = U2 - (U)*(U) # Variance of given probability distribution\n\nVariance = round(Variance,2)\nU = round(U,2)\n\n#Results\nprint \"Mean of given probability distribution: \",U\nprint \"Variance of given probability distribution: \",Variance\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of given probability distribution: 2.1\nVariance of given probability distribution: 0.99\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-101"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\n# as we know K = (x-Mean)/std_dev, P(|x-Mean| < K*std_dev) >= 1-(1/(K*K))\n\nK1 = (28-18)/2.5 # Corresponding to 28 customers\nK2 = (18-8)/2.5 # Corresponding to 8 customers\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n# P( 8 < X < 28) >= 1-(1/(K*K)) \n\nK = 4 # K=K1=K2\nP = 1-(1.0 / (K*K)) # Required probability\n\n#Results\nprint \" Probability of number of customers greater than 8 but less than 28 is greater than or equal to : \",P,\"or 15/16\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Probability of number of customers greater than 8 but less than 28 is greater than or equal to : 0.9375 or 15/16\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-102"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 40000 \np = 0.5 \n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = n*p\nVariance = float(n*p*(1-p)) # Variance of Sample\nstd_dev=sqrt(Variance) # standard deviation of sample\n\nk_square = 1/(1-0.99)\nk = sqrt(k_square)\n\nMin_heads = Mean - k*std_dev\nMax_heads = Mean + k*std_dev\n\np1 = Min_heads/n\np2 = Max_heads/n\n\n#Results\nprint \"Probability limit: (\",round(p1,3),\",\",round(p2,3),\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability limit: ( 0.475 , 0.525 )\n"
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-105"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nr = 2 # defective books\nn = 100 # total books\np = 0.05 # probability of a book being defective\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \ndef comb(n,r):\n \"\"\"returns number of total combination of selecting \"r\" items out of \"n\" \"\"\"\n return fact(n)/(fact(r)*fact(n-r))\n# using bionomial distribution\np1 = comb(100,2)*pow(p,2)*pow(1-p,98) # required probability using bionomial distribution\np1=round(p1,3)\n# using poisson distribution\nlamda = n*p\n# we know P = (pow(e,-lamda)*pow(lamda,r)) / fact(r)\np2 = (pow(e,-lamda)*pow(lamda,r)) / fact(r) # required probability\np2 = round(p2,3)\n\n#Results\nprint \"using bionomial distribution: probability = \",p1\nprint \"using poisson distribution: probability = \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "using bionomial distribution: probability = 0.081\nusing poisson distribution: probability = 0.084\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-106"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 3840 \np = 1.0/1200 \nl = []\nx = [0,1,2,3,4,5,6,7,8,9,10]\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \nlamda = n*p\n\nfor i in range(0,11):\n val = (pow(e,-lamda)*pow(lamda,i))/fact(i)\n l.append(val)\n\n#Results\nprint \"Lamda: \",lamda\nbar(x,l,width=1,fill=False) \nxlabel(\"$No. of Failed generators$\")\nylabel(\"$Probability$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Lamda: 3.2\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 27,
+ "text": "<matplotlib.text.Text at 0xa350898>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAETCAYAAAAh/OHhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxI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f//73Gj169EV/5quvvqpRo0Z57nWSnp6ugQMHasKECXr44Ye1\nYMECz6W0f8rpdKqgoECSFBMTo5tuuumC48XGxsrtdiskJOSia75UO3bs0LRp03w2PvwDwYF24dCh\nQ3r88cc9K+sTJ07o2muvvaTP/O6775SSkqLo6GhJUmlpqSdEampq5HA4FBwcfMHPKSsra9H9UU6d\nOnXJNV+q4uJi9enTx6c1oP0L8HUBQEtYlqVu3bqpc+fO2rlzp6qrq9WvXz9JZ+7p8e233+rw4cO6\n8847m9ya9VzvvfTSSzp9+rQKCwt19913S5LWrVunkSNHyrIsvf/++/rlL3+p4cOHq6CgQPX19Tpw\n4IC6du2q2267TcuWLVNERIRGjhypQ4cO6ec//7kkacWKFdq5c6euvPJK3XPPPQoPD9cbb7yh+vp6\n7dq1y3N59YMHD2revHmKiorS6tWrNWvWrGZ9y8vL9c477+iWW26RJG3btk3/93//12yc5ORkLVu2\nTDU1NaqpqdGvf/1rDRo0qFndLpdLc+fO1aOPPqqqqiqFh4c3+fmkpqZqxYoVzT5n69at2rhxo06f\nPq3Ro0erY8eO9nzpaLPY4kC7MmrUKC1atEjV1dUKDQ3VF198oYULF2rcuHHKysrSP/7xD0/b872X\nkpKiO++80xMakrR27Vp99dVXeuSRR9SlSxfPZ7z//vsaO3asfvazn6lnz56qqqpSSEiI6urqdPz4\ncc9tOPft26dp06ZpypQpSkhIUG1trb744gt98MEHGjdunAIDAz1bJpMmTdITTzyhzMxMdezYUfv3\n72/W94ebBblcLo0YMULl5eVnHadLly7q1KmTcnJyNH/+fA0aNOisdd9xxx2KiIjQhAkTFB4e3uzn\n8/zzzzf7HOnMHeHi4+N11VVXqba21ovfLtoLggNtXlVVlSIiIiRJ99xzj959913P3QLnz5+vUaNG\nSTqzQv3xvZTP9962bduUlJTkef7NN9+orq5OU6dO1WOPPebZMli4cKHn3i6ff/65+vbtqwEDBqiw\nsFDDhw9vsptqyZIlio2N1bJly+RwOOR2u5v037x5s3r37q29e/fKsiwFBgZq7dq16t+/v5YsWSK3\n292k780336zdu3crNTVVx44dU0BAwFnH6dmzp9avX69bb71VV1111Tnr/mEr41w/n5tuuqnZ50jS\n6NGj9dvf/lbvvvvuOY/54PJCcKDNW7dunfr27StJ6tSpk3r27KnDhw9Lkurq6tS9e3dJ0ttvv60x\nY8Zo375953zvB1u3bm0SHGVlZZ5dQklJSZ5jGzU1NYqLi1NdXZ1OnDihdevW6fjx43I4HNqyZYs2\nbNigfv36qbi4WFdffbWys7N11113adCgQTp06FCT/rW1tSotLfW8Jkkff/yxBgwYoA4dOujuu+9u\n0vf06dOem+osX75cmZmZWrNmTbNxqqur9f3338vpdHqW52x1r1u3TmlpaVq3bp1OnTp11p/PTz/n\nP//5jzZv3qxPP/3UszsO+FleXl6er4sAzuWjjz7Sn/70J4WHh3vuLNehQwfFxMQoKipK1113nZYv\nX+45fhAXF6ecnByNHz++2Xs/PoA9e/ZsPfLII5LOHBSfPn26LMtSdHR0k9sOh4aGqri4WF9//bVq\na2sVHBys6OholZWVKTY2VldffbU+//xzZWVlKSkpSUuXLlVtba02bNigvn37Kjw8vEn/kJAQ3XLL\nLSouLtaxY8f01ltvacqUKXK73c36bt26VQEBAUpLS9O+fftUUVGh9PR09evXr0nb4OBgffPNN7rt\nttvOWXdQUJC6d++u9evXKyIiQj169Gj28+nWrZuqqqqafE5tba2OHDmiHTt2qG/fvnK73d7+ytEO\ncCMnXFbeffdd1dXV6dNPP9XMmTN9UkN1dbXCwsJ07NgxPfXUU3rttdd8UgdwsTirCpcVp9Op3bt3\n6ze/+Y3PavjDH/6gu+++W+Xl5WKDH+0RWxwAACMcHAcAGCE4AABGCA4AgBGCAwBghOAAABghOAAA\nRggOAIARggMAYOT/AWuv49so9M+lAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0xa3475f8>"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-106"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \nlamda = 1.3\n\nval = (pow(e,-lamda)*pow(lamda,0))/fact(0)\np = 1 - val\nvariance = lamda\n\n#Results\nprint \"Lamda: \",lamda\nprint \"Probability(X>=1): \",round(p,3)\nprint \"Variance: \",variance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Lamda: 1.3\nProbability(X>=1): 0.727\nVariance: 1.3\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-107"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nalpha = 6 # no of bad checks per day\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n# 4 bad checks on any day\nlamda = alpha*1 # As T=1\n\np1 = (pow(e,-lamda)*pow(lamda,4)) / fact(4) # required probability\np1 = round(p1,3)\n\n# 10 bad checks over any 2 consecutive days\nlamda = alpha*2\n\np2 = ((pow(e,-lamda)*pow(lamda,10)) / fact(10)) # required probability\np2 = round(p2,3)\n\n#Results\nprint \" probability of 4 bad cheacks on any day: \",p1\nprint \" probability of 10 bad cheacks on any 2 consecutive days: \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " probability of 4 bad cheacks on any day: 0.134\n probability of 10 bad cheacks on any 2 consecutive days: 0.105\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-108"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nl = []\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \nlamda = (0.2)*3\nl.append((pow(e,-lamda)*pow(lamda,1))/fact(1))\n\nlamda = (0.2)*5\nval = (pow(e,-lamda)*pow(lamda,0))/fact(0) + (pow(e,-lamda)*pow(lamda,1))/fact(1)\nl.append(1 - val)\n\nlamda = (0.2)*15\nl.append((pow(e,-lamda)*pow(lamda,0))/fact(0) + (pow(e,-lamda)*pow(lamda,1))/fact(1))\n\n#Results\nprint \"Part(a): \",round(l[0],3)\nprint \"Part(b): \",round(l[1],3)\nprint \"Part(c): \",round(l[2],3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): 0.329\nPart(b): 0.264\nPart(c): 0.199\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-109"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\np = 0.05 # probability of any device to show excessive drift\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\np1 = pow(1-p,5)*pow(p,1) # required probability\np1 = round(p1,3)\n\n#Results\nprint \"probability of sixth measuring device to be the first to show excessive drift: \",p1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of sixth measuring device to be the first to show excessive drift: 0.039\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-112"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nn = 8\nn1 = 2\nn2 = 5\nn3 = 1\np1 = 0.3\np2 = 0.5\np3 = 0.2\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\ndef fact(n):\n \"\"\"returns factorial of number n\"\"\"\n if(n==1 or n==0):\n return 1\n else:\n return n*fact(n-1)\n \np = (fact(8)/(fact(2)*fact(5)*fact(1)))*(pow(p1,2)*pow(p2,5)*pow(p3,1))\n\n#Results\nprint \"Required Probability: \",round(p,4)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required Probability: 0.0945\n"
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5.ipynb
new file mode 100755
index 00000000..0abee667
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5.ipynb
@@ -0,0 +1,601 @@
+{
+ "metadata": {
+ "name": "Chapter5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 5: Probability Densities"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-122"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Calculating probabilities from the probability density function\n\n#Variable Declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# between 1 and 3\nresult = quad(lambda x: 2*pow(e,-2*x), 1, 3) # probability for 1 < x < 3\nresult=round(result[0],3)\n\n# greater than 0.5\nresult1 = quad(lambda x: 2*pow(e,-2*x), 0.5, +inf) # probability for 0.5 < x < +inf\nresult1 = round(result1[0],3)\n\n# Result\nprint \"probability of x to lie between 1 and 3 is: \",result\nprint \"probability of x to be greater than 0.5 is: \",result1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of x to lie between 1 and 3 is: 0.133\nprobability of x to be greater than 0.5 is: 0.368\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-123"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining a distribution function from its density function\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# x<=1\nresult = array(quad(lambda x: 0, -inf, 0)) + array(quad(lambda x: 2*pow(e,-2*x), 0, 1)) # probability for -inf < x <= 1\nresult = round(result[0],3)\n\n# Result\nprint \"probability of x less than or equal to 1 is: \",result",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of x less than or equal to 1 is: 0.865\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-124"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining the mean & variance using the probability density function\n\n#Variable Declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# between 1 and 3\nresult = quad(lambda x: x*2*pow(e,-2*x), 0, +inf) # probability for 1 < x < 3\nresult=round(result[0],3)\n\n# greater than 0.5\nresult1 = quad(lambda x: pow((x-result),2)*2*pow(e,-2*x), 0, +inf) # probability for 0.5 < x < +inf\nresult1 = round(result1[0],3)\n\n# Result\nprint \"Mean: \",result\nprint \"Variance: \",result1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean: 0.5\nVariance: 0.25\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-126"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculationg some standard normal probabilities\n\n# Variable Declaration \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# (A) between 0.87 and 1.28\n# p1 = p( at 1.28 ) - p( at 0.87 )\np1 = 0.8997 - 0.8078 # probability between 0.87 and 1.28\np1 = round(p1,4)\n\n# (B) between -0.34 and 0.62\n# p2 = p( at 0.62 ) - p( at -0.34 )\np2 = 0.7324 - 0.3669 # probability between -0.34 and 0.62\np2 = round(p2,4)\n \n# (C) greater than 0.85\n# p3 = 1 - p( at 0.85 )\np3 = 1 - 0.8023 # probability greater than 0.85\np3 = round(p3,4)\n \n# (D) greater than -0.65\n# p4 = 1 - p( at -0.65 )\np4 = 1 - 0.2578 # probability greater than -0.65\np4 = round(p4,4)\n\n# Result\nprint \"probability 0.87<x1.28 : \",p1\nprint \"probability -0.34<x<0.62 : \",p2\nprint \"probability x>0.85 : \",p3\nprint \"probability x> (-0.65) : \",p4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability 0.87<x1.28 : 0.0919\nprobability -0.34<x<0.62 : 0.3655\nprobability x>0.85 : 0.1977\nprobability x> (-0.65) : 0.7422\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-128"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Two important values for z(alpha)\n\n# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know F(z:0.01) = 0.99 & closest to the value 0.99 i.e. 0.9901 so z = 2.33\n# as we know F(z:0.05) = 0.95 & closest to the value 0.95 i.e. 0.9495 & 0.9505 so z = (1.64+1.65)/2\n\n# Result\nprint \"Part(a): \",2.33\nprint \"Part(b): \",(1.64+1.65)/2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): 2.33\nPart(b): 1.645\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-129"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculation of probabilities using a normal distribution\n\n# Variable declaration\nMean = 10.1 # dB\nstd_dev = 2.7 # dB\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Part(a)\nLower = (8.5-Mean)/std_dev \nUpper = (13.0-Mean)/std_dev\n\n# We need to calculate F- Value for lower & Upper values.\n# F(1.07) = 0.8577 & F(-0.59) = 0.2776\n\n# Part(b)\nval = 1 - 0.9678 # 1 - F(1.85)\n# Result\nprint \"Part(a): \",(0.8577-0.2776)\nprint \"Part(b): \",(0.8577-0.2776)\nprint \"Part(c): \",(1-0.9678)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): 0.5801\nPart(b): 0.5801\nPart(c): 0.0322\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-130"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using normal probabilities to determine the mean fill of jars\n\n# Variable declaration\nstd_dev = 0.04 #standard deviation\nx = 4 # number of ounces\np = 0.02 # probability of x <4\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know p = (x-Mean)/std_dev\n# from Table-3 (page-514) we find closest value to 0.02 which is 0.0202 corresponding to Z = -2.05\nMean = 4 - (-2.05*0.04) # from z=(x-mean)/std_dev\nMean=round(Mean,3)\n\n# Result\nprint \"Mean of given distribution: \",Mean,\"ounces\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of given distribution: 4.082 ounces\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-130"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating probabilities when ln X has a normal distribution.\n\n# Variable declaration\nMean = -4.6\nvariance = 1.21 \nx = 0.0015 # oz/st gold\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nLower = (math.log(x,e)-Mean)/sqrt(variance)\n\n# We need to calculate F- Value for lower i.e. F(-1.73) to be find out.\n# Using table F(-1.73) = 0.0419\n# As F-value is too small \n\n# Result\nprint \"Specimen was collected outside of vein.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Specimen was collected outside of vein.\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-131"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A continuity correction to improve the normal approximation to a count variable\n\n# Variable declaration\nMean = 11.6\nstd_dev = 3.3 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nLower = 7.5 # corresponding to outages = 8 -> 7.5 to 8.5 thus atleast = 7.5\n\nindex = (Lower-Mean)/std_dev\nF = 0.1075 # F value for F(index) i.e. F(-1.24) = 0.1075\n\n# Result\nprint \"Desired probability: \",1-F",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Desired probability: 0.8925\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-132"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A normal approximation to binomial probabilities\n\n# Variable declaration\np = 0.2\nn = 100 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = n*p\nstd_dev = sqrt(n*p*(1-p))\n\nUpper = 15.5 # corresponding to chips = 15 -> 14.5 to 15.5 thus atmost = 15.5\nLower = 14.5\n\nin_upper = (Upper-Mean)/std_dev\nin_lower = (Lower-Mean)/std_dev\n\nf_upper = 0.1292 # F value for F(upper) i.e. F(-1.13) = 0.1292\nf_lower = 0.0838 # F value for F(upper) i.e. F(-1.38) = 0.0838\n\n# Result\nprint \"Part(A) Probability: \",f_upper\nprint \"Part(B) Probability: \",(f_upper-f_lower)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A) Probability: 0.1292\nPart(B) Probability: 0.0454\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-137"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating a log-normal probability\n\n# Variable declaration\nalpha = 2 # mean of normal distribution\nbeta = 0.1 # standard deviation of normal distribution\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# we need to find p(Io/Ii) = p( (ln(b)-alpha) / beta) - p( (ln(a)-alpha) / beta)\na = 6.1 # lower limit\nb = 8.2 # upper limit\n\nZ1 = (math.log(b) - alpha)/float(0.1) # Z value correponding to upper limit\nZ2 = (math.log(a) - alpha)/float(0.1) # Z value correponding to lower limit\n\np1 = 0.8413 # probability corresponding to Z1\np2 = 0.0274 # probability corresponding to Z2\np = round(p1 - p2,4) # Required probability\n\n# Result\nprint \" required probability: \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " required probability: 0.8139\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-138"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A log-normal probability calculation for a risk analysis\n\n# Variable declaration\nMean = 4.0\nstd_dev = 0.3\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nval = 33\nindex = (val-Mean)/std_dev\n\nf = 0.0465 # F value for F(index) i.e. F(-1.68) = 0.9535\n\n# Result\nprint \"Probability: \",1-f",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability: 0.9535\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "Example, page-138"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# calculating mean and variance for a log normal distribution\n\n# Variable declaration\nalpha = 2 # mean of normal distribtion\nbeta = 0.1 # standard deviation of normal distribution\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = math.pow(e, 2.0 + math.pow(0.1,2.0)/2.0) # mean of log normal distribution\nVariance = math.pow(e, 2*2.0 + math.pow(0.1,2.0)) * ( pow(e, pow(0.1,2.0)) -1.0) # variance of log normal distribution\n\nVariance = round(Variance,2)\nMean = round(Mean,2)\n\n# Resultath.\nprint \" Mean: \",Mean\nprint \"Variance: \",Variance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Mean: 7.43\nVariance: 0.55\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-140"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# An exponential density function on top of a density histogram( data stored in \"Ex.5.140.1.txt\")\n\n# Variable declaration\nbeta = 0.25\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nx = array([0.894, 0.991, 0.261, 0.186, 0.311, 0.817, 2.267, 0.091, 0.139, 0.083, \n 0.235, 0.424, 0.216, 0.579, 0.429, 0.612, 0.143, 0.055, 0.752, 0.188,\n 0.071, 0.159, 0.082, 1.653, 2.010, 0.258, 0.527, 1.033, 2.863, 0.365,\n 0.459, 0.431, 0.092, 0.830, 1.718, 0.099, 0.162, 0.076, 0.107, 0.278,\n 0.100, 0.919, 0.900, 0.093, 0.041, 0.712, 0.994, 0.149, 0.866, 0.054])\nf=[] # list of probability values corresponding to each x\nx1=[]\n\nfor i in range(0,50):\n x1.append(x[i])\n\nx=x1\n\nfor each in x:\n val = (1/0.25) * ( pow(e,-each/0.25) )\n f.append(val)\n\n# Result\nscatter(x,f,c='r')\nbar(x,f,width=1.0,fill=False)\ntitle(\"$Exponential-density-function$\") \nxlabel(\"$decay-time(s)$\")\nylabel(\"$density$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": "<matplotlib.text.Text at 0x8390860>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8TPf+x/HXZLFMrCGJSqJIUgTNYkmtSShqrZZbda+t\ndftL3dvbSx9druv+SntbrdveKnV/frSK1A9Fi5QktVyjVCMkQWsNtSRBrEFEZPv+/iBzszJJJnNm\n+Twfj3nknJlzZt5nhvnM9/s9i04ppRBCCCEewknrAEIIIWyDFAwhhBAmkYIhhBDCJFIwhBBCmEQK\nhhBCCJNIwRBCCGESKRhCCCFMIgVDCCGESaRgiIdKSkpi6NCh9OjRgyVLlvDFF1/w8ccf07ZtW06f\nPq11vCr5y1/+wpYtWx663MqVK/Hw8Kj26+zYsYOWLVuSlpZW7eeoiKn5a2ru3LnMmDGDRYsW1fpr\nWWqbhBkoIUwwZswYtWLFilL3LVy4UOXm5mqUyDT9+vVT+fn5VV4vOTlZjR49utqvm5+fr4KDg6u9\nvqmqu30PkpWVpZ544gm1d+9e9csvv5j1uZWqnczCMqSFIUzyww8/MGjQIAD+7//+D4B+/fpRt25d\nLWM9UEZGBkop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s2YNzz33nPF+pRQNGzY0z5soHJZccU+I\navriiy/w8/PD29ubDRs28Oabb2qS4+OPP2by5Mk0bdq00mUOHjzIsWPHGDNmjAWTCXsjbVQhqsnX\n15fs7Gx++OEHXn/9dc1yvPTSS6xdu/aBy2zfvp3f/OY3Fkok7JW0MISwA7t27eLRRx81jr2UdPjw\nYQoKCggKCtIgmbAnUjCEEEKYRLqkhBBCmEQKhhBCCJNIwRBCCGESKRhCCCFMIgVDCCGESaRgCCGE\nMIkUDCGEECaRgiGEEMIk/w82gqg773VoXwAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x8395eb8>"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-141"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Probability calculation using the exponential distribution\n\n#Variable Declaration\nalpha = 3\nbeta = 1.0/3\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nresult = quad(lambda x: 3*pow(e,-3*x), 0, 1.0/12)\nresult=round(result[0],3)\n\nresult1 = quad(lambda x: 3*pow(e,-3*x), 3.0/4, +inf) # probability for 0.5 < x < +inf\nresult1 = round(result1[0],3)\n\n# Result\nprint \"probability(Part A): \",result\nprint \"probability(Part B): \",result1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability(Part A): 0.221\nprobability(Part B): 0.105\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-141"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Probability calculation using a beta distribution\n\n#Variable Declaration\nalpha = 3\nbeta = 2\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nMean = 3/float(3+2)\n\nx1 = math.gamma(3+2)\nx2 = math.gamma(3)\nx3 = math.gamma(2)\nresult = quad(lambda x: (x1/float(x2*x3))*(pow(x,float(2.0))*pow((1-x),float(1.0))), 0, 0.5)\nresult=round(result[0],3)\n\n# Result\nprint \"Part(A): \",Mean\nprint \"Part(B): \",result # i.e. 5/16",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A): 0.6\nPart(B): 0.313\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-143"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# probability calculations using a Weibull distribution\n\n# Variable declaration\nalpha = 0.1 # Mean of normal distribution\nbeta = 0.5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nMean = pow(0.1,-1.0/0.5)* math.gamma(int(1+1/0.5)) # Mean life\nMean = round(Mean,0)\nresult = quad(lambda x: 0.1*0.5*pow(x,-0.5)*pow(e,-0.1*pow(x,0.5)) , 300, +inf) # probability of battery life > 300 hours\nresult = round(result[0],3)\n\n# Result\nprint \"Mean lifetime: \",int(Mean),\"hours\"\nprint \"probability of battery life > 300 hours: \",result",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean lifetime: 200 hours\nprobability of battery life > 300 hours: 0.177\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-145"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating probabilities from a discrete joint probability distribution\n\n#Variable Declaration\nx = array([[0.1,0.4,0.1],[0.2,0.2,0]])\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\np = x[0,2]+sum(x[1:2,1:3])\n\np0 = sum(x[0:2,0]) # for x1=0 \np1 = sum(x[0:2,1]) # for x1=1\np2 = sum(x[0:2,2]) # for x1=2\n\n\n# Result\nprint \"Part(A): \",p\nprint \"Part(B): P(x1=0):\",p0,\" P(x1=1):\",p1,\" P(x1=2):\",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A): 0.3\nPart(B): P(x1=0): 0.3 P(x1=1): 0.6 P(x1=2): 0.1\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-146"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A conditional probability distribution\n\n#Variable Declaration\nx = array([[0.1,0.4,0.1],[0.2,0.2,0]])\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\np1 = x[1,0]/sum(x[1,0:3]) # for x1=0 & x2=1 \np2 = x[1,1]/sum(x[1,0:3]) # for x1=1 & x2=1 \np3 = x[1,2]/sum(x[1,0:3]) # for x1=2 & x2=1 \n\n# Result\nprint \"P(0|1):\",p1,\" P(1|1):\",p2,\" P(2|1):\",p3\nprint \"As P(0|1) is not equal to P(0) (0.5!=0.3) i.e. X1 & X2 are dependent\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(0|1): 0.5 P(1|1): 0.5 P(2|1): 0.0\nAs P(0|1) is not equal to P(0) (0.5!=0.3) i.e. X1 & X2 are dependent\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-148"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating probabilities from a joint probability density function\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# (A) x1 limit- (1,2) x2 limit- (2,3)\np = dblquad(lambda x1, x2: 6*exp(-2*x1-3*x2), 2, 3, lambda x1: 1, lambda x1: 2)\np1 = round(p[0],4)\n\n# (B) x1 limit- (0,2) x2 limit- (2,+inf)\np = dblquad(lambda x1, x2: 6*exp(-2*x1-3*x2), 2, +inf, lambda x1: 0, lambda x1: 2)\np2 = round(p[0],4)\n\n# Result\nprint \"P(1<x1<2 and 2<x2<3): \",p1\nprint \"P(0<x1<2 and 2<x2<+inf): \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(1<x1<2 and 2<x2<3): 0.0003\nP(0<x1<2 and 2<x2<+inf): 0.0024\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-148"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining a joint probability distribution function\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# (A) x1 limit- (0,1) x2 limit- (0,1)\np1 = dblquad(lambda x1, x2: 6*exp(-2*x1-3*x2), 0, 1, lambda x2: 0, lambda x2: 1)\np = round(p1[0],4)\n\n# Result\nprint \"P(x1<1 and x2<1): \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(x1<1 and x2<1): 0.8216\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-152"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining the mean & variance of 20 X\n\n# Variable declaration\nMean = 10 # mean: kilowatt-hours\nstd_dev = 3 # standard deviation: kilowatt-hours\ncost = 20 # in $ per kilowatt-hours\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nm1 = Mean*cost\ns1 = std_dev*cost\nv1 = s1**2\n\n# Result\nprint \"Mean: \",m1,\"dollar\"\nprint \"Standard Deviation: \",s1,\"dollar\"\nprint \"Variance: \",v1,\"dollar\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean: 200 dollar\nStandard Deviation: 60 dollar\nVariance: 3600 dollar\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-154"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Finding the mean and variance of 2*X1 + X2 - 5 \n\n# Variable declaration\nMean1 = 4 # Mean of X1\nVariance1 = 9 # Variance of X1\n\nMean2 = -2 # Mean of X2\nVariance2 = 5 # Variance of X2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# (A) E(2*X1 + X2 - 5)\nMean = 2*Mean1 + Mean2 - 5 # Required Mean\n\n# (B) Var(2*X1 + X2 - 5)\nVariance = pow(2,2)*Variance1 + Variance2 # Required Variance\n\n# Result\nprint \"Mean of (2*X1 + X2 - 5) : \",Mean\nprint \"Variance of (2*X1 + X2 - 5) : \",Variance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of (2*X1 + X2 - 5) : 1\nVariance of (2*X1 + X2 - 5) : 41\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-154"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# The mean and variance of total time to coat and rinse.\n\n# Variable declaration\nMean1 = 35 # Mean time in coating process( in minutes)\nVariance1 = 11 # variance of time in coating process( in minutes)\n\nVariance2 = 5 # variance of time in rinse process( in minutes)\nMean2 = 8 # Mean time in rinse process( in minutes)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = Mean1 + Mean2 # Mean of total time\nVariance = Variance1 + Variance2 # Variance of total time\nstd_dev = int(sqrt(Variance)) # standard deviation\n\n# Result\nprint \"Total Mean time: \",Mean,\"minutes\"\nprint \"Standard Deviation of Total time: \",std_dev,\"minutes\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total Mean time: 43 minutes\nStandard Deviation of Total time: 4 minutes\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-164"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A simple normal scores plot\n\n# Variable declaration\nl = [67,48,76,81] # list of observations\nf=[]\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n# As we know Normal scores\nm1 = -0.84\nm2 = -0.25\nm3 = 0.25\nm4 = 0.84\n\nl = sorted(l)\nf = [m1,m2,m3,m4] # List of normal scores\n\n# Result\nscatter(f,l)\ntitle(\"SimpleNormalScorePlot\")\nxlabel(\"$NormalScore$\")\nylabel(\"$OrderedObservation$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 25,
+ "text": "<matplotlib.text.Text at 0xa326a58>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEbCAYAAADajfNFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlPX+//Hn4IKaIKA4oKgYKrhyUNDQOI4l5gL+tDou\nmWIu7YvpOXrOMVPLEs+33TpmbuHXsjx1zNI0jx3HFjVcwXKhlMUFcMExtkTw/v0hzTcClVFnQH09\nrmuui3vmvufzntvxfs39+dyLyTAMAxERuem5VXUBIiJSPSgQREQEUCCIiEgpBYKIiAAKBBERKaVA\nEBERQIEgV+m9997jrrvucsp7jx49mmnTpjnlvV3NYrGwaNGiqi6j0gIDA/nyyy+rugxxMQWCVMo3\n33xD9+7d8fLyom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bdvX8MwDOPo0aNG//797fN9/vnnRps2bYygoCDjxRdfrKpyq71Tp04Z\nd955p9G6dWsjOjraOH36tGEYZdfnwYMHjdDQUCM0NNRo37691mcFKvq+vf3228bbb79tn+exxx4z\ngoKCjE6dOl30CDm5/Lp88803jfbt2xuhoaFGZGSksWXLlqost1obNmyY4e/vb9SqVcsICAgwFi1a\ndNXfS52YJiIiQDXuMhIREddSIIiICKBAEBGRUgoEEREBFAgiIlJKgSAiIoACQURESikQREQEUCDI\nDebVV1+lfv36ZGZmAhcu3NelSxeWLVvm1Hb//Oc/M23aNPv09u3bef3111m6dCmvv/46q1evdmr7\nIteCAkFuKJ07d+bxxx/ngw8+AKBHjx5MmTKF+++/36ntBgUFcdtttwFQWFjIO++8w1NPPcWoUaMo\nLCwkNDTUqe2LXAsKBLmhHD9+nKeeeorly5cDkJubi6enp9PbTUxMpFu3bgAkJydTUFBgfy0qKqrM\ndelFqiuXX/5axJkMw8Df358GDRqwf/9+srOz6dKlCwCrV6/m1KlTnDhxgoiICNauXYvNZsNms/HY\nY49hMpn46KOP6NmzJ4ZhYLVa6du3LydPngRg1KhRACxfvpxz585x5MgRGjduzLhx4zh+/DiNGjUC\noG3btmzYsIGoqCiGDRvGY489BsCaNWs4fvw469evZ86cOSQnJ9vrGTBgAKdOnWL16tVlaoqKimLt\n2rXs37+f2rVrc8899+Dn51cFa1ZuBtpDkBvSiBEjeO+998jOzsbX15cDBw6wbNky4uLi6N+/P7Nm\nzcLDw4O7776bhISEMvd/CAgI4O677yY5OZk//vGPxMTEsHPnTgAOHDjAF198wahRo6hRowYdOnTg\nzJkzZW5l6Onpyf79+xkzZgzz58/nww8/JCUlhaVLl/LAAw/w7rvvUlhYWKaef/7zn/j6+parKT09\nnRdffJGnn36atm3bkpeX5/J1KTcPBYLcMLKysmjSpAkA99xzD//+97/t19ZPSEhgxIgRAKSnp3Pb\nbbexfft2evXqhbu7OwC33347Bw8eJCIigoKCAho2bEj9+vXZunUrf/jDHwBYtmyZ/Rr+SUlJhIWF\nsW3bNnt30fnz50lMTMTLy4sHHniAZ599lhMnTpCQkGAfx3B3dy9Xj7e3N8HBweVq+uSTT2jdujWr\nV6/GZDLRqlUrV6xKuUkpEOSGsW3bNjp37gxcuPNWhw4dOHHiBABFRUU0b94cgI8++oiRI0dy9uxZ\natWqZV++sLCQOnXqABeOEuratStw4WblUVFRJCcnY7PZCA4OpqioiNzcXLZv386OHTvo0qULGzdu\nZM+ePWXuA/zDDz8QExPDuXPn7O1nZGSQlZVVrh7DMMrVVLduXQYOHEhMTAxRUVEcP37cWatPhBoz\nZsyYUdVFiFyt//73v0ydOhU/Pz/atWsHQJ06dQgKCqJZs2a0aNGCzz//nJ9++omIiAj8/f3Jysri\njjvusL9HUlISNWvWpGvXrqxZs4YePXrQtGlTduzYQWFhIXfeeSe+vr5s3LiRzMxM8vLy8Pb2xsfH\nh6SkJPr160diYiL5+fns3LmTb775htDQUMLDwwkKCuKTTz7BZrNx6tQpYmNjy9TTrVs3e1D8tqZW\nrVrx6aefkpeXx44dO+jcuTM1a2roT5xDN8gRERFAXUYiIlJKgSAiIoACQURESikQREQEUCCIiEgp\nBYKIiAAKBBERKaVAEBERAP4/2wjztNnSz4YAAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x5a72320>"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-168"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Simulating five values a Weibull distribution\n\n# Variable declaration\nval = array([0.57, 0.74, 0.26, 0.77, 0.12])\nl = []\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor each in val:\n l.append(math.sqrt(-20.0*math.log(1-each,e)))\n \n# Result\nprint \"Five observations: \"\nfor i in range(0,5):\n print round(l[i],3),\" \"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Five observations: \n4.108 \n5.191 \n2.454 \n5.422 \n1.599 \n"
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-169"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Simulating two values from a normal distribution\n\n# Variable declaration\nMean = 50 # Mean of normal distribution\nstd_dev = 5 # standard deviation of normal distribution\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Computer generates 2 values 0.253 and 0.531 from uniform distribution(can be obtained by reading 3 digits at a time in TABLE-7\nu1 = 0.253\nu2 = 0.531\n\n# As we know z1 = sqrt(-2*ln(u2)) * cos(2*pi*u1) and z2 = sqrt(-2*ln(u2)) * sin(2*pi*u1)\nZ1 = sqrt(-2 * (math.log(u2,e))) *( math.cos(2*pi*u1) )\nZ1 = round(Z1,3)\n\nZ2 = sqrt(-2 * (math.log(u2,e))) *( math.sin(2*pi*u1) )\nZ2 = round(Z2,3)\n\n# normal values x1 = Mean + std_dev*Z1 and x2 = Mean + std_dev*Z2\nX1 = Mean + std_dev*Z1 \nX2 = Mean + std_dev*Z2 \n\n# Result\nprint \" Normal values : \",X1,\" , \",X2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Normal values : 49.895 , 55.625\n"
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5_1.ipynb
new file mode 100755
index 00000000..1800036b
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter5_1.ipynb
@@ -0,0 +1,601 @@
+{
+ "metadata": {
+ "name": "Chapter5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 5: Probability Densities"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-122"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# between 1 and 3\nresult = quad(lambda x: 2*pow(e,-2*x), 1, 3) # probability for 1 < x < 3\nresult=round(result[0],3)\n\n# greater than 0.5\nresult1 = quad(lambda x: 2*pow(e,-2*x), 0.5, +inf) # probability for 0.5 < x < +inf\nresult1 = round(result1[0],3)\n\n# Result\nprint \"probability of x to lie between 1 and 3 is: \",result\nprint \"probability of x to be greater than 0.5 is: \",result1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of x to lie between 1 and 3 is: 0.133\nprobability of x to be greater than 0.5 is: 0.368\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-123"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# x<=1\nresult = array(quad(lambda x: 0, -inf, 0)) + array(quad(lambda x: 2*pow(e,-2*x), 0, 1)) # probability for -inf < x <= 1\nresult = round(result[0],3)\n\n# Result\nprint \"probability of x less than or equal to 1 is: \",result",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability of x less than or equal to 1 is: 0.865\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-124"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# between 1 and 3\nresult = quad(lambda x: x*2*pow(e,-2*x), 0, +inf) # probability for 1 < x < 3\nresult=round(result[0],3)\n\n# greater than 0.5\nresult1 = quad(lambda x: pow((x-result),2)*2*pow(e,-2*x), 0, +inf) # probability for 0.5 < x < +inf\nresult1 = round(result1[0],3)\n\n# Result\nprint \"Mean: \",result\nprint \"Variance: \",result1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean: 0.5\nVariance: 0.25\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-126"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable Declaration \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# (A) between 0.87 and 1.28\n# p1 = p( at 1.28 ) - p( at 0.87 )\np1 = 0.8997 - 0.8078 # probability between 0.87 and 1.28\np1 = round(p1,4)\n\n# (B) between -0.34 and 0.62\n# p2 = p( at 0.62 ) - p( at -0.34 )\np2 = 0.7324 - 0.3669 # probability between -0.34 and 0.62\np2 = round(p2,4)\n \n# (C) greater than 0.85\n# p3 = 1 - p( at 0.85 )\np3 = 1 - 0.8023 # probability greater than 0.85\np3 = round(p3,4)\n \n# (D) greater than -0.65\n# p4 = 1 - p( at -0.65 )\np4 = 1 - 0.2578 # probability greater than -0.65\np4 = round(p4,4)\n\n# Result\nprint \"probability 0.87<x1.28 : \",p1\nprint \"probability -0.34<x<0.62 : \",p2\nprint \"probability x>0.85 : \",p3\nprint \"probability x> (-0.65) : \",p4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability 0.87<x1.28 : 0.0919\nprobability -0.34<x<0.62 : 0.3655\nprobability x>0.85 : 0.1977\nprobability x> (-0.65) : 0.7422\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-128"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know F(z:0.01) = 0.99 & closest to the value 0.99 i.e. 0.9901 so z = 2.33\n# as we know F(z:0.05) = 0.95 & closest to the value 0.95 i.e. 0.9495 & 0.9505 so z = (1.64+1.65)/2\n\n# Result\nprint \"Part(a): \",2.33\nprint \"Part(b): \",(1.64+1.65)/2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): 2.33\nPart(b): 1.645\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-129"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 10.1 # dB\nstd_dev = 2.7 # dB\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Part(a)\nLower = (8.5-Mean)/std_dev \nUpper = (13.0-Mean)/std_dev\n\n# We need to calculate F- Value for lower & Upper values.\n# F(1.07) = 0.8577 & F(-0.59) = 0.2776\n\n# Part(b)\nval = 1 - 0.9678 # 1 - F(1.85)\n# Result\nprint \"Part(a): \",(0.8577-0.2776)\nprint \"Part(b): \",(0.8577-0.2776)\nprint \"Part(c): \",(1-0.9678)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(a): 0.5801\nPart(b): 0.5801\nPart(c): 0.0322\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-130"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nstd_dev = 0.04 #standard deviation\nx = 4 # number of ounces\np = 0.02 # probability of x <4\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know p = (x-Mean)/std_dev\n# from Table-3 (page-514) we find closest value to 0.02 which is 0.0202 corresponding to Z = -2.05\nMean = 4 - (-2.05*0.04) # from z=(x-mean)/std_dev\nMean=round(Mean,3)\n\n# Result\nprint \"Mean of given distribution: \",Mean,\"ounces\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of given distribution: 4.082 ounces\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-130"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = -4.6\nvariance = 1.21 \nx = 0.0015 # oz/st gold\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nLower = (math.log(x,e)-Mean)/sqrt(variance)\n\n# We need to calculate F- Value for lower i.e. F(-1.73) to be find out.\n# Using table F(-1.73) = 0.0419\n# As F-value is too small \n\n# Result\nprint \"Specimen was collected outside of vein.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Specimen was collected outside of vein.\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-131"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 11.6\nstd_dev = 3.3 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nLower = 7.5 # corresponding to outages = 8 -> 7.5 to 8.5 thus atleast = 7.5\n\nindex = (Lower-Mean)/std_dev\nF = 0.1075 # F value for F(index) i.e. F(-1.24) = 0.1075\n\n# Result\nprint \"Desired probability: \",1-F",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Desired probability: 0.8925\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-132"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\np = 0.2\nn = 100 \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = n*p\nstd_dev = sqrt(n*p*(1-p))\n\nUpper = 15.5 # corresponding to chips = 15 -> 14.5 to 15.5 thus atmost = 15.5\nLower = 14.5\n\nin_upper = (Upper-Mean)/std_dev\nin_lower = (Lower-Mean)/std_dev\n\nf_upper = 0.1292 # F value for F(upper) i.e. F(-1.13) = 0.1292\nf_lower = 0.0838 # F value for F(upper) i.e. F(-1.38) = 0.0838\n\n# Result\nprint \"Part(A) Probability: \",f_upper\nprint \"Part(B) Probability: \",(f_upper-f_lower)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A) Probability: 0.1292\nPart(B) Probability: 0.0454\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-137"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 2 # mean of normal distribution\nbeta = 0.1 # standard deviation of normal distribution\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# we need to find p(Io/Ii) = p( (ln(b)-alpha) / beta) - p( (ln(a)-alpha) / beta)\na = 6.1 # lower limit\nb = 8.2 # upper limit\n\nZ1 = (math.log(b) - alpha)/float(0.1) # Z value correponding to upper limit\nZ2 = (math.log(a) - alpha)/float(0.1) # Z value correponding to lower limit\n\np1 = 0.8413 # probability corresponding to Z1\np2 = 0.0274 # probability corresponding to Z2\np = round(p1 - p2,4) # Required probability\n\n# Result\nprint \" required probability: \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " required probability: 0.8139\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-138"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 4.0\nstd_dev = 0.3\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nval = 33\nindex = (val-Mean)/std_dev\n\nf = 0.0465 # F value for F(index) i.e. F(-1.68) = 0.9535\n\n# Result\nprint \"Probability: \",1-f",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Probability: 0.9535\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": "Example, page-138"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 2 # mean of normal distribtion\nbeta = 0.1 # standard deviation of normal distribution\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = math.pow(e, 2.0 + math.pow(0.1,2.0)/2.0) # mean of log normal distribution\nVariance = math.pow(e, 2*2.0 + math.pow(0.1,2.0)) * ( pow(e, pow(0.1,2.0)) -1.0) # variance of log normal distribution\n\nVariance = round(Variance,2)\nMean = round(Mean,2)\n\n# Resultath.\nprint \" Mean: \",Mean\nprint \"Variance: \",Variance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Mean: 7.43\nVariance: 0.55\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-140"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nbeta = 0.25\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nx = array([0.894, 0.991, 0.261, 0.186, 0.311, 0.817, 2.267, 0.091, 0.139, 0.083, \n 0.235, 0.424, 0.216, 0.579, 0.429, 0.612, 0.143, 0.055, 0.752, 0.188,\n 0.071, 0.159, 0.082, 1.653, 2.010, 0.258, 0.527, 1.033, 2.863, 0.365,\n 0.459, 0.431, 0.092, 0.830, 1.718, 0.099, 0.162, 0.076, 0.107, 0.278,\n 0.100, 0.919, 0.900, 0.093, 0.041, 0.712, 0.994, 0.149, 0.866, 0.054])\nf=[] # list of probability values corresponding to each x\nx1=[]\n\nfor i in range(0,50):\n x1.append(x[i])\n\nx=x1\n\nfor each in x:\n val = (1/0.25) * ( pow(e,-each/0.25) )\n f.append(val)\n\n# Result\nscatter(x,f,c='r')\nbar(x,f,width=1.0,fill=False)\ntitle(\"$Exponential-density-function$\") \nxlabel(\"$decay-time(s)$\")\nylabel(\"$density$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": "<matplotlib.text.Text at 0x8390860>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8TPf+x/HXZLFMrCGJSqJIUgTNYkmtSShqrZZbda+t\ndftL3dvbSx9druv+SntbrdveKnV/frSK1A9Fi5QktVyjVCMkQWsNtSRBrEFEZPv+/iBzszJJJnNm\n+Twfj3nknJlzZt5nhvnM9/s9i04ppRBCCCEewknrAEIIIWyDFAwhhBAmkYIhhBDCJFIwhBBCmEQK\nhhBCCJNIwRBCCGESKRhCCCFMIgVDCCGESaRgiIdKSkpi6NCh9OjRgyVLlvDFF1/w8ccf07ZtW06f\nPq11vCr5y1/+wpYtWx663MqVK/Hw8Kj26+zYsYOWLVuSlpZW7eeoiKn5a2ru3LnMmDGDRYsW1fpr\nWWqbhBkoIUww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eysrJ4/fXX2bhxI+fOncPFxYXBgweX\nWs/Pz48LFy4A0KpVK9auXUtSUlKpX/OVadmyJUlJSfj7+1NYWIinp6fx+InDhw8THh4O3BuHiIyM\nBO5db3nv3r2MHz+ezz77zJhz9OjRAMaiBeDp6cnly5dZs2YNzz33nPF+pRQNGzY0z5soHJZccU+I\navriiy/w8/PD29ubDRs28Oabb2qS4+OPP2by5Mk0bdq00mUOHjzIsWPHGDNmjAWTCXsjbVQhqsnX\n15fs7Gx++OEHXn/9dc1yvPTSS6xdu/aBy2zfvp3f/OY3Fkok7JW0MISwA7t27eLRRx81jr2UdPjw\nYQoKCggKCtIgmbAnUjCEEEKYRLqkhBBCmEQKhhBCCJNIwRBCCGESKRhCCCFMIgVDCCGESaRgCCGE\nMIkUDCGEECaRgiGEEMIk/w82gqg773VoXwAAAABJRU5ErkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x8395eb8>"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-141"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nalpha = 3\nbeta = 1.0/3\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nresult = quad(lambda x: 3*pow(e,-3*x), 0, 1.0/12)\nresult=round(result[0],3)\n\nresult1 = quad(lambda x: 3*pow(e,-3*x), 3.0/4, +inf) # probability for 0.5 < x < +inf\nresult1 = round(result1[0],3)\n\n# Result\nprint \"probability(Part A): \",result\nprint \"probability(Part B): \",result1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "probability(Part A): 0.221\nprobability(Part B): 0.105\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-141"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nalpha = 3\nbeta = 2\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nMean = 3/float(3+2)\n\nx1 = math.gamma(3+2)\nx2 = math.gamma(3)\nx3 = math.gamma(2)\nresult = quad(lambda x: (x1/float(x2*x3))*(pow(x,float(2.0))*pow((1-x),float(1.0))), 0, 0.5)\nresult=round(result[0],3)\n\n# Result\nprint \"Part(A): \",Mean\nprint \"Part(B): \",result # i.e. 5/16",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A): 0.6\nPart(B): 0.313\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-143"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.1 # Mean of normal distribution\nbeta = 0.5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\nMean = pow(0.1,-1.0/0.5)* math.gamma(int(1+1/0.5)) # Mean life\nMean = round(Mean,0)\nresult = quad(lambda x: 0.1*0.5*pow(x,-0.5)*pow(e,-0.1*pow(x,0.5)) , 300, +inf) # probability of battery life > 300 hours\nresult = round(result[0],3)\n\n# Result\nprint \"Mean lifetime: \",int(Mean),\"hours\"\nprint \"probability of battery life > 300 hours: \",result",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean lifetime: 200 hours\nprobability of battery life > 300 hours: 0.177\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-145"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nx = array([[0.1,0.4,0.1],[0.2,0.2,0]])\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\np = x[0,2]+sum(x[1:2,1:3])\n\np0 = sum(x[0:2,0]) # for x1=0 \np1 = sum(x[0:2,1]) # for x1=1\np2 = sum(x[0:2,2]) # for x1=2\n\n\n# Result\nprint \"Part(A): \",p\nprint \"Part(B): P(x1=0):\",p0,\" P(x1=1):\",p1,\" P(x1=2):\",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Part(A): 0.3\nPart(B): P(x1=0): 0.3 P(x1=1): 0.6 P(x1=2): 0.1\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-146"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable Declaration\nx = array([[0.1,0.4,0.1],[0.2,0.2,0]])\n\n#Calculation\nfrom scipy import *\nfrom pylab import *\n\np1 = x[1,0]/sum(x[1,0:3]) # for x1=0 & x2=1 \np2 = x[1,1]/sum(x[1,0:3]) # for x1=1 & x2=1 \np3 = x[1,2]/sum(x[1,0:3]) # for x1=2 & x2=1 \n\n# Result\nprint \"P(0|1):\",p1,\" P(1|1):\",p2,\" P(2|1):\",p3\nprint \"As P(0|1) is not equal to P(0) (0.5!=0.3) i.e. X1 & X2 are dependent\" ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(0|1): 0.5 P(1|1): 0.5 P(2|1): 0.0\nAs P(0|1) is not equal to P(0) (0.5!=0.3) i.e. X1 & X2 are dependent\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-148"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# (A) x1 limit- (1,2) x2 limit- (2,3)\np = dblquad(lambda x1, x2: 6*exp(-2*x1-3*x2), 2, 3, lambda x1: 1, lambda x1: 2)\np1 = round(p[0],4)\n\n# (B) x1 limit- (0,2) x2 limit- (2,+inf)\np = dblquad(lambda x1, x2: 6*exp(-2*x1-3*x2), 2, +inf, lambda x1: 0, lambda x1: 2)\np2 = round(p[0],4)\n\n# Result\nprint \"P(1<x1<2 and 2<x2<3): \",p1\nprint \"P(0<x1<2 and 2<x2<+inf): \",p2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(1<x1<2 and 2<x2<3): 0.0003\nP(0<x1<2 and 2<x2<+inf): 0.0024\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-148"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculation\nfrom scipy import *\nfrom pylab import *\nfrom scipy.integrate import *\n\n# (A) x1 limit- (0,1) x2 limit- (0,1)\np1 = dblquad(lambda x1, x2: 6*exp(-2*x1-3*x2), 0, 1, lambda x2: 0, lambda x2: 1)\np = round(p1[0],4)\n\n# Result\nprint \"P(x1<1 and x2<1): \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P(x1<1 and x2<1): 0.8216\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-152"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 10 # mean: kilowatt-hours\nstd_dev = 3 # standard deviation: kilowatt-hours\ncost = 20 # in $ per kilowatt-hours\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nm1 = Mean*cost\ns1 = std_dev*cost\nv1 = s1**2\n\n# Result\nprint \"Mean: \",m1,\"dollar\"\nprint \"Standard Deviation: \",s1,\"dollar\"\nprint \"Variance: \",v1,\"dollar\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean: 200 dollar\nStandard Deviation: 60 dollar\nVariance: 3600 dollar\n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-154"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean1 = 4 # Mean of X1\nVariance1 = 9 # Variance of X1\n\nMean2 = -2 # Mean of X2\nVariance2 = 5 # Variance of X2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# (A) E(2*X1 + X2 - 5)\nMean = 2*Mean1 + Mean2 - 5 # Required Mean\n\n# (B) Var(2*X1 + X2 - 5)\nVariance = pow(2,2)*Variance1 + Variance2 # Required Variance\n\n# Result\nprint \"Mean of (2*X1 + X2 - 5) : \",Mean\nprint \"Variance of (2*X1 + X2 - 5) : \",Variance",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mean of (2*X1 + X2 - 5) : 1\nVariance of (2*X1 + X2 - 5) : 41\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-154"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean1 = 35 # Mean time in coating process( in minutes)\nVariance1 = 11 # variance of time in coating process( in minutes)\n\nVariance2 = 5 # variance of time in rinse process( in minutes)\nMean2 = 8 # Mean time in rinse process( in minutes)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean = Mean1 + Mean2 # Mean of total time\nVariance = Variance1 + Variance2 # Variance of total time\nstd_dev = int(sqrt(Variance)) # standard deviation\n\n# Result\nprint \"Total Mean time: \",Mean,\"minutes\"\nprint \"Standard Deviation of Total time: \",std_dev,\"minutes\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total Mean time: 43 minutes\nStandard Deviation of Total time: 4 minutes\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-164"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = [67,48,76,81] # list of observations\nf=[]\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\n# As we know Normal scores\nm1 = -0.84\nm2 = -0.25\nm3 = 0.25\nm4 = 0.84\n\nl = sorted(l)\nf = [m1,m2,m3,m4] # List of normal scores\n\n# Result\nscatter(f,l)\ntitle(\"SimpleNormalScorePlot\")\nxlabel(\"$NormalScore$\")\nylabel(\"$OrderedObservation$\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 25,
+ "text": "<matplotlib.text.Text at 0xa326a58>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEbCAYAAADajfNFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlPX+//Hn4IKaIKA4oKgYKrhyUNDQOI4l5gL+tDou\nmWIu7YvpOXrOMVPLEs+33TpmbuHXsjx1zNI0jx3HFjVcwXKhlMUFcMExtkTw/v0hzTcClVFnQH09\nrmuui3vmvufzntvxfs39+dyLyTAMAxERuem5VXUBIiJSPSgQREQEUCCIiEgpBYKIiAAKBBERKaVA\nEBERQIEgV+m9997jrrvucsp7jx49mmnTpjnlvV3NYrGwaNGiqi6j0gIDA/nyyy+rugxxMQWCVMo3\n33xD9+7d8fLyomHDhtx+++1s376dESNG8MUXXzilTZPJhMlkqtS8gYGBmM1mCgoK7M8tXLiQXr16\nOaU2R/32sxQVFTFp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dfnwYMHjdDQUCM0NNRo37691mcFKvq+vf3228bbb79tn+exxx4z\ngoKCjE6dOl30CDm5/Lp88803jfbt2xuhoaFGZGSksWXLlqost1obNmyY4e/vb9SqVcsICAgwFi1a\ndNXfS52YJiIiQDXuMhIREddSIIiICKBAEBGRUgoEEREBFAgiIlJKgSAiIoACQURESikQREQEUCDI\nDebVV1+lfv36ZGZmAhcu3NelSxeWLVvm1Hb//Oc/M23aNPv09u3bef3111m6dCmvv/46q1evdmr7\nIteCAkFuKJ07d+bxxx/ngw8+AKBHjx5MmTKF+++/36ntBgUFcdtttwFQWFjIO++8w1NPPcWoUaMo\nLCwkNDTUqe2LXAsKBLmhHD9+nKeeeorly5cDkJubi6enp9PbTUxMpFu3bgAkJydTUFBgfy0qKqrM\ndelFqiuXX/5axJkMw8Df358GDRqwf/9+srOz6dKlCwCrV6/m1KlTnDhxgoiICNauXYvNZsNms/HY\nY49hMpn46KOP6NmzJ4ZhYLVa6du3LydPngRg1KhRACxfvpxz585x5MgRGjduzLhx4zh+/DiNGjUC\noG3btmzYsIGoqCiGDRvGY489BsCaNWs4fvw469evZ86cOSQnJ9vrGTBgAKdOnWL16tVlaoqKimLt\n2rXs37+f2rVrc8899+Dn51cFa1ZuBtpDkBvSiBEjeO+998jOzsbX15cDBw6wbNky4uLi6N+/P7Nm\nzcLDw4O7776bhISEMvd/CAgI4O677yY5OZk//vGPxMTEsHPnTgAOHDjAF198wahRo6hRowYdOnTg\nzJkzZW5l6Onpyf79+xkzZgzz58/nww8/JCUlhaVLl/LAAw/w7rvvUlhYWKaef/7zn/j6+parKT09\nnRdffJGnn36atm3bkpeX5/J1KTcPBYLcMLKysmjSpAkA99xzD//+97/t19ZPSEhgxIgRAKSnp3Pb\nbbexfft2evXqhbu7OwC33347Bw8eJCIigoKCAho2bEj9+vXZunUrf/jDHwBYtmyZ/Rr+SUlJhIWF\nsW3bNnt30fnz50lMTMTLy4sHHniAZ599lhMnTpCQkGAfx3B3dy9Xj7e3N8HBweVq+uSTT2jdujWr\nV6/GZDLRqlUrV6xKuUkpEOSGsW3bNjp37gxcuPNWhw4dOHHiBABFRUU0b94cgI8++oiRI0dy9uxZ\natWqZV++sLCQOnXqABeOEuratStw4WblUVFRJCcnY7PZCA4OpqioiNzcXLZv386OHTvo0qULGzdu\nZM+ePWXuA/zDDz8QExPDuXPn7O1nZGSQlZVVrh7DMMrVVLduXQYOHEhMTAxRUVEcP37cWatPhBoz\nZsyYUdVFiFyt//73v0ydOhU/Pz/atWsHQJ06dQgKCqJZs2a0aNGCzz//nJ9++omIiAj8/f3Jysri\njjvusL9HUlISNWvWpGvXrqxZs4YePXrQtGlTduzYQWFhIXfeeSe+vr5s3LiRzMxM8vLy8Pb2xsfH\nh6SkJPr160diYiL5+fns3LmTb775htDQUMLDwwkKCuKTTz7BZrNx6tQpYmNjy9TTrVs3e1D8tqZW\nrVrx6aefkpeXx44dO+jcuTM1a2roT5xDN8gRERFAXUYiIlJKgSAiIoACQURESikQREQEUCCIiEgp\nBYKIiAAKBBERKaVAEBERAP4/2wjztNnSz4YAAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x5a72320>"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-168"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nval = array([0.57, 0.74, 0.26, 0.77, 0.12])\nl = []\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nfor each in val:\n l.append(math.sqrt(-20.0*math.log(1-each,e)))\n \n# Result\nprint \"Five observations: \"\nfor i in range(0,5):\n print round(l[i],3),\" \"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Five observations: \n4.108 \n5.191 \n2.454 \n5.422 \n1.599 \n"
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-169"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 50 # Mean of normal distribution\nstd_dev = 5 # standard deviation of normal distribution\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Computer generates 2 values 0.253 and 0.531 from uniform distribution(can be obtained by reading 3 digits at a time in TABLE-7\nu1 = 0.253\nu2 = 0.531\n\n# As we know z1 = sqrt(-2*ln(u2)) * cos(2*pi*u1) and z2 = sqrt(-2*ln(u2)) * sin(2*pi*u1)\nZ1 = sqrt(-2 * (math.log(u2,e))) *( math.cos(2*pi*u1) )\nZ1 = round(Z1,3)\n\nZ2 = sqrt(-2 * (math.log(u2,e))) *( math.sin(2*pi*u1) )\nZ2 = round(Z2,3)\n\n# normal values x1 = Mean + std_dev*Z1 and x2 = Mean + std_dev*Z2\nX1 = Mean + std_dev*Z1 \nX2 = Mean + std_dev*Z2 \n\n# Result\nprint \" Normal values : \",X1,\" , \",X2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Normal values : 49.895 , 55.625\n"
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6.ipynb
new file mode 100755
index 00000000..cc4ba95d
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6: Sampling Distributions"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-182"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating a finite population correction factor\n\n# Variable declaration\nn = 10 # Sample size\nN = 1000 # population size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know correction factor = (N-n)/(N-1)\ncorr_fact = (float(N-n))/(N-1) # correction factor\ncorr_fact = round(corr_fact,3)\n\n# Result\nprint \"Correction Factor: \",corr_fact",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Correction Factor: 0.991\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-185"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using the central limit theorem to calculate the probability of paint coverage\n\n# Variable declaration\nMean = 513.3 # Mean( in square feet)\nstd_dev = 31.5 # Standard deviation ( in square feet)\nn = 40 # Number of cans\nx1 = 510.0 # lower limit of area (in square feet)\nx2 = 520.0 # upper limit of area (in square feet)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know Z = (X-Mean) / (std_dev/sqrt(n))\nZ1 = round( ((x1-Mean) / (std_dev/sqrt(n))),3) # Z value corresponding to lower limit \nZ2 = round( ((x2-Mean) / (std_dev/sqrt(n))),3) # Z value corresponding to upper limit \n\n# Using values of Z1 & Z2 from Table-3\nP = 0.6553 # Requires probability (from Table-3)\n\n# Result\nprint \"required probability: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "required probability: 0.6553\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-188"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using a probability calculation from t-distribution to refute a claim\n\n# Variable declaration\nMean = 12.40 # Mean( in minutes)\nstd_dev = 2.48 # Standard deviation ( in minutes)\nn = 20 # sample size\nx = 10.63 # observes time( in minutes)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt = (x-Mean) / (std_dev/sqrt(n)) # t-value corresponding to observation\nt = round( t,2)\nv = n-1 # degree of freedom\n\n# corresponding to v = 19 , porbability that t will be below -2.861, is 0.005 (Table-4)\n# As 0.005 is very small probability, so data tend to refute manufacturer's claim \n\n# Result\nprint \" The Data tend to refute manufacturer's claim\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " The Data tend to refute manufacturer's claim\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-190"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A probability calculation based on the \" chi square\" distribution helps monitor variability \n\n# Variable declaration\nn = 20 # sample size\nvar_pop = 0.000126 # variance of population\nvar_samp = 0.0002 # variance of sample\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nchi_square = ((n-1)*var_samp) / var_pop # chi square value\nchi_square = round(chi_square , 1) # i.e. 30.2\n\n# From Table-5 for v = 19 and alpha = 0.05, chi_square(thoeritical) = 30.1, thus probability will be less than 0.05\n\n# Result\nprint \"chi square value: \",chi_square\nprint \"probability of rejection of shipment is less than 0.05\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "chi square value: 30.2\nprobability of rejection of shipment is less than 0.05\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-190"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using Table-6 to evaluate a probability\n\n# Variable declaration\nn1 = 7 # Smaple-1 size\nn2 = 13 # Smaple-2 size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Using Table-6, for v1 = 6 and v2 = 12 ,F(0.05) = 3.00 thus probability is 0.05 \nP = 0.05 # required probability\n\n# Result\nprint \"required probability: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "required probability: 0.05\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-191"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using Table-6 to find a left hand tail probability\n\n# Variable declaration\nv1 = 10 # Degree of freedom a corresponding to (a,b)\nv2 = 20 # Degree of freedom b corresponding to (a,b)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# we need to find f(0.95) at (10,20) i.e. 1/ f(0.05) at(20,10)\nf = 1 / 2.77 # Required value f(0.05) at(20,10) = 2.77 from Table-6\nf = round(f,2)\n\n# Result\nprint \"F value: \",f",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "F value: 0.36\n"
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6_1.ipynb
new file mode 100755
index 00000000..1a202b14
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter6_1.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6: Sampling Distributions"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-182"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 10 # Sample size\nN = 1000 # population size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know correction factor = (N-n)/(N-1)\ncorr_fact = (float(N-n))/(N-1) # correction factor\ncorr_fact = round(corr_fact,3)\n\n# Result\nprint \"Correction Factor: \",corr_fact",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Correction Factor: 0.991\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-185"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 513.3 # Mean( in square feet)\nstd_dev = 31.5 # Standard deviation ( in square feet)\nn = 40 # Number of cans\nx1 = 510.0 # lower limit of area (in square feet)\nx2 = 520.0 # upper limit of area (in square feet)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as we know Z = (X-Mean) / (std_dev/sqrt(n))\nZ1 = round( ((x1-Mean) / (std_dev/sqrt(n))),3) # Z value corresponding to lower limit \nZ2 = round( ((x2-Mean) / (std_dev/sqrt(n))),3) # Z value corresponding to upper limit \n\n# Using values of Z1 & Z2 from Table-3\nP = 0.6553 # Requires probability (from Table-3)\n\n# Result\nprint \"required probability: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "required probability: 0.6553\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-188"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 12.40 # Mean( in minutes)\nstd_dev = 2.48 # Standard deviation ( in minutes)\nn = 20 # sample size\nx = 10.63 # observes time( in minutes)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt = (x-Mean) / (std_dev/sqrt(n)) # t-value corresponding to observation\nt = round( t,2)\nv = n-1 # degree of freedom\n\n# corresponding to v = 19 , porbability that t will be below -2.861, is 0.005 (Table-4)\n# As 0.005 is very small probability, so data tend to refute manufacturer's claim \n\n# Result\nprint \" The Data tend to refute manufacturer's claim\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " The Data tend to refute manufacturer's claim\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-190"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 20 # sample size\nvar_pop = 0.000126 # variance of population\nvar_samp = 0.0002 # variance of sample\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nchi_square = ((n-1)*var_samp) / var_pop # chi square value\nchi_square = round(chi_square , 1) # i.e. 30.2\n\n# From Table-5 for v = 19 and alpha = 0.05, chi_square(thoeritical) = 30.1, thus probability will be less than 0.05\n\n# Result\nprint \"chi square value: \",chi_square\nprint \"probability of rejection of shipment is less than 0.05\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "chi square value: 30.2\nprobability of rejection of shipment is less than 0.05\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-190"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn1 = 7 # Smaple-1 size\nn2 = 13 # Smaple-2 size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# Using Table-6, for v1 = 6 and v2 = 12 ,F(0.05) = 3.00 thus probability is 0.05 \nP = 0.05 # required probability\n\n# Result\nprint \"required probability: \",P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "required probability: 0.05\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-191"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nv1 = 10 # Degree of freedom a corresponding to (a,b)\nv2 = 20 # Degree of freedom b corresponding to (a,b)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# we need to find f(0.95) at (10,20) i.e. 1/ f(0.05) at(20,10)\nf = 1 / 2.77 # Required value f(0.05) at(20,10) = 2.77 from Table-6\nf = round(f,2)\n\n# Result\nprint \"F value: \",f",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "F value: 0.36\n"
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7.ipynb
new file mode 100755
index 00000000..48fda057
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7.ipynb
@@ -0,0 +1,362 @@
+{
+ "metadata": {
+ "name": "Chapter7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 7: Inferences Concerning a Mean"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-204"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Two components of closeness: variance and bias\n\n# Variable declaration\nl = [2.4,2.9,2.7,2.6,2.9,2.0,2.8,2.2,2.4,2.4,2.0,2.5] # list of lead concentration\nx = [1,1,1,1,1.1,1,1,1,1.1,1.2,1.1,1]\nn = 12 # sample size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nscatter(l,x)\ntitle(\"DOT DIAGRAM\")\nxlabel(\"$ Lead(micro gram/l$\")\n\nMean = sum(l)/len(l) # Mean of sample\nMean = round(Mean,3)\nVariance = (sum(square(l)) - pow(sum(l),2)/ n) / (n-1) # Variance of sample\nVariance = round(Variance,5)\n\n# Result\nstd_err = round(sqrt(Variance / n),3) # Estimated standard error\nprint \"Estimated standard error: \",std_err",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Estimated standard error: 0.09\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEfCAYAAACtRRYAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUVFeeB/BvIShLAQJiyRZQQdCwmaDEhQQSV+LSIGak\nbVEhNm3iGGc6mdE+kxEy0zmak8xp256ko9HElTGtSTRBaJO0hWBURBEMKEHjAogCyiYoFMWdPwx1\nUgHZrKLA+/2cwznUu++93++qfH3celWlEEIIEBGRFMxM3QAREfUdhj4RkUQY+kREEmHoExFJhKFP\nRCQRhj4RkUQY+kREEmHok0l4eXnB2toadnZ2cHBwwJQpU/Dhhx/ily8b+e677/D888/Dzs4OQ4cO\nxbx583DhwgUAwJ49e2BrawtbW1tYW1vDzMxM99jOzq7DumZmZlAqlbC1tcWwYcMwbdo0fPrpp3r7\nhIeHY9u2bXrbrly5AjMzM7zyyivtzllfX49//dd/xciRI6FUKuHp6YmFCxciOzu7w7pubm5YvXo1\nWlpaul3DzMwMKpUKWq1Wt02j0WD48OEwM+OPMXUf/7WQSSgUCnz11Veoq6vD9evXsXbtWmzcuBEJ\nCQm6fU6cOIGZM2ciKioK5eXluHLlCoKCgjBlyhRcuXIFixcvRn19Perr65GWlgY3Nzfd47q6uofW\nzs/PR319PX744QcsW7YMq1atwltvvaXXm0Kh0Dtm586d8Pf3x759+9Dc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84M4G2e8+MAAAAAABJRU5E\nrkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x7a0cf98>"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-207"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Specifying a high probability for the maximum error\n\n# Variable declaration\nn = 150\nstd_dev = 6.2 # Standard deviation\n\n# as alpha = 0.01 , z(alpha/2) = 2.575\nZ = 2.575 # Z value\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nE = (Z*std_dev)/sqrt(n)\nE = round(E,2)\n\n# Result\nprint \"Maximum Error: \",E",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum Error: 1.3\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-208"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Selecting the sample size\n\n# Variable declaration\nE = 0.50 # Atmost error\nstd_dev = 1.6 # Standard deviation\n\n# as alpha = 0.05 , z(alpha/2) = 1.96\nZ = 1.96 # Z value\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nn = pow( (Z*std_dev) / E,2 ) # Sample size\nn = round(n,-1)\n\n# Result\nprint \"Sample size: \",int(n)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Sample size: 40\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-209"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A 98% confidence bound on the maximum error\n\n# Variable declaration\nn = 6 # number of observations\nstd_dev = 0.14 # standard deviation(in degree)\n# as alpha = 0.02 , t(alpha/2) = 3.365 for v = 5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt = 3.365 # i.e. t(0.01) for v=5\nstd_err = (t*std_dev) / sqrt(n) # estimated standard error\nstd_err = round(std_err,2)\n\n# Result\nprint \"Maximum error: \",std_err,\"degree\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum error: 0.19 degree\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-210"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating and interpreting a large sample confidence interval\n\n# Variable declaration\nn = 100 # sample size\nMean = 21.6 # sample mean\nstd_dev = 5.1 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as alpha = 0.05 , z(alpha/2) = 1.96\nZ = 1.96\n\ny1 = Mean - Z*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + Z*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,1)\ny2 = round(y2,1)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 20.6 , 22.6 )\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-210"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A 99% confidence interval for the mean nanopillar height\n\n# Variable declaration\nn = 50 # sample size\nMean = 305.58 # sample mean(in nm)\nstd_dev = 36.97 # standard deviation(in nm)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as alpha = 0.01 , z(alpha/2) = 2.575\nZ = 2.575\n\ny1 = Mean - Z*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + Z*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"99% confidence interval(in nm): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "99% confidence interval(in nm): ( 292.12 , 319.04 )\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-211"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A 99% confidence interval for the mean of a normal population\n\n# Variable declaration\nn = 16 # sample size\nMean = 3.42 # sample mean\nstd_dev = 0.68 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# t(0.05) = 2.947\nt = 2.947\n\ny1 = Mean - t*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + t*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"99% confidence interval(in grams): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "99% confidence interval(in grams): ( 2.92 , 3.92 )\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-219"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Maximum likelihood estimator of function of lembda\n\n# Variable declaration\ncount = [7,3,1,2,4,1,2,3,1,2] # count list for 10 days\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nlembda = float(sum(count)) / len(count) # maximaum likelihood estimate of lembda\nlembda = round(lembda,2)\n\n# we need to find P(x=0 or x=1) using poisson distribution\np = exp(-lembda) + (exp(-lembda) * lembda) / math.factorial(1) # maximum estimated probability\np = round(p,3)\n\n# Result\nprint \"Maximum estimated probability: \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum estimated probability: 0.267\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-220"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Estimation of yield for a green gas process\n\n#Variable declaration\nl = array([5.57,5.76,4.18,4.64,7.02,6.62,6.33,7.24,5.57,7.89,4.67,7.24,6.43,5.59,5.39])\n \n# calculation\nMean = mean(l)\nvar = 0\n\nfor each in l:\n var = var + (each-Mean)**2\n\nvar = var/len(l)\n\ncoff = sqrt(var)/Mean\n\n# Results\nprint \"Maximum likelihood estimates of Mean:\",round(Mean,3),\" Variance:\",round(var,3)\nprint \"Cofficient of variation:\",round(coff,3) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum likelihood estimates of Mean: 6.009 Variance: 1.084\nCofficient of variation: 0.173\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-231"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Calculating the P-value\n\n# Variable declaration\nMean = 4.5 # mean of normal distribution\nstd_dev = 1.5 # standard deviation of normal distribution\nn = 25 # number of vinyl specimens\nx = 3.9\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# corresponding to x = 3.9 , Z = (x-Mean) / (std_dev/sqrt(n))\nZ = (x-Mean) / (std_dev/sqrt(n)) # Z value\nZ = round(Z,0)\n\n# from Normal Table P(Z>2.00) = 0.0228 which is same as P(Z<-2.00)\np = 0.0228 # probability P(z<-2.00)\np_val = 2*p # Required P-Value\n\n# Result\nprint \"P-Value: \",p_val",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P-Value: 0.0456\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-232"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A large sample test of mean tire life\n\n# Variable declaration\nalpha = 0.01 # level of significance\nx = 27463 # in miles\nMean = 28000 # Mean( in miles)\nstd_dev = 1348 # standard deviation(in miles)\nn = 40 # sample size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis is accepted if Z< -z(alpha) and rejected if Z> -z(alpha), z(0.01) = 2.33\nZ = (x-Mean) / (std_dev / sqrt(n)) # Z value corresponding to x\nZ = round(Z,2)\n\n# Result\nif(Z<-2.33):\n print \"Null hypothesis rejected\"\nelse:\n print \"Null hypothesis accepted\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-233"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A t-test of a normal population mean\n\n# Variable declaration\n\nalpha = 0.01 # level of significance\nMean = 180 # Mean( in pound)\nn = 5 # sample size\nstd_dev = 5.7 # standard deviation(in pound)\nx = 169.5 # in pound\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# consider (1) null hypothesis if value=180 punds (2) alternative hypothesis if value < 180 pounds\n\nt = (x-Mean) / (std_dev / sqrt(n)) # t value corresponding to x\nt = round(t,2)\n\n# Result\nif(t < -3.747):\n print \"Null hypothesis rejected\"\nelse:\n print \"Null hypothesis accepted\"\n\nprint \"The breaking strength is below specifications\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nThe breaking strength is below specifications\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-236"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Illustrating the relation between tests and confidence intervals\n\n# Variable declaration\nn = 16 # sample size\nMean = 3.42 # sample mean\nstd_dev = 0.68 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# t(0.025) = 2.131\nt = 2.131\n\ny1 = Mean - t*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + t*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in grams): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in grams): ( 3.06 , 3.78 )\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-239"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining the probability of a type-2 error- One sided test\n\n# Variable declaration\nn = 15 # sample size\nMean1 = 75.20 # sample mean\nMean2 = 77 # sample mean\nstd_dev = 3.6 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# z(0.05) = 1.645\nZ = 1.645\n\ny1 = Z + sqrt(n)*((Mean1-Mean2) / std_dev) # lower limit of range\ny1 = round(y1,3)\n\n# probability corresponding to Z>y1 is 0.614\np = 0.614 # P(Z > -0.219) = 0.614\n\nprob = 1 - p\n\n# Result\nprint \"Type-2 error probability: \",prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Type-2 error probability: 0.386\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-240"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining the probability of a type-2 error- Two sided test\n\n# Variable declaration\nn = 30 # sample size\nMean1 = 2.000 # sample mean\nMean2 = 2.010 # sample mean\nstd_dev = 0.050 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# z(0.025) = 1.96\nZ = 1.96\n\ny1 = -Z + sqrt(n)*((Mean1-Mean2) / std_dev) \ny2 = Z + sqrt(n)*((Mean1-Mean2) / std_dev) \n\n\n# probability corresponding to Z>y1 is 0.614\np1 = 0.0015 # P(Z < Y1) = 0.001\np2 = 0.1945 # P(Z > Y2) = 0.194\np = p1 + p2\n\nprob = 1 - p\n\n# Result\nprint \"Type-2 error probability: \",prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Type-2 error probability: 0.804\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-241"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Determining a sample size - One sided test\n\n# Variable declaration\n\nalpha = 0.05\nbeta = 0.10\nMean1 = 20 # mean corresponding to alpha\nMean2 = 21 # mean corresponding to beta\nstd_dev = 2.4 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nZ1 = 1.645 # Z value corresponding to alpha=0.05\nZ2 = 1.280 # Z value corresponding to beta=0.10\n\nSize = pow( (std_dev*(Z1 + Z2))/(Mean1 - Mean2) ,2) # Minimum sample size\nSize = round(Size,-1)\n\n# Result\nprint \"Required sample size: \",int(Size)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required sample size: 50\n"
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7_1.ipynb
new file mode 100755
index 00000000..3bde5130
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter7_1.ipynb
@@ -0,0 +1,362 @@
+{
+ "metadata": {
+ "name": "Chapter7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 7: Inferences Concerning a Mean"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-204"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nl = [2.4,2.9,2.7,2.6,2.9,2.0,2.8,2.2,2.4,2.4,2.0,2.5] # list of lead concentration\nx = [1,1,1,1,1.1,1,1,1,1.1,1.2,1.1,1]\nn = 12 # sample size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nscatter(l,x)\ntitle(\"DOT DIAGRAM\")\nxlabel(\"$ Lead(micro gram/l$\")\n\nMean = sum(l)/len(l) # Mean of sample\nMean = round(Mean,3)\nVariance = (sum(square(l)) - pow(sum(l),2)/ n) / (n-1) # Variance of sample\nVariance = round(Variance,5)\n\n# Result\nstd_err = round(sqrt(Variance / n),3) # Estimated standard error\nprint \"Estimated standard error: \",std_err",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Estimated standard error: 0.09\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEfCAYAAACtRRYAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUVFeeB/BvIShLAQJiyRZQQdCwmaDEhQQSV+LSIGak\nbVEhNm3iGGc6mdE+kxEy0zmak8xp256ko9HElTGtSTRBaJO0hWBURBEMK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LYawIOr/qeffhpHjx41zF8G\nSYNr+mQSp0+fxqZNmzB48GB89NFHKCgowA8//IC9e/di06ZNsLCwQE1NDWJiYhAXF4cjR46gsLAQ\no0ePxo0bN/S2jRo1ChUVFQAAa2trXY2CggI899xzAIDvv/8eERERAAAXFxecOnUKsbGxqKmpwfDh\nw3X39f/ud7/Dvn37cP36dZibm2PcuHF4+umndeds+wzgc+fOISYmBj4+PtBqtRg0aBAOHDiAU6dO\nwdXVFVevXtU77pdzKC8v73aPwINbNRMSEnTnGz16NLKysvS2EXUHPzmLHivvvvsuEhIS+nS9+9at\nW1CpVKitrcUbb7yBLVu2GLzG5s2b8c///M8GPy/Jh8s79FhZsWIF/va3v/VpzbVr1+KLL77Ali1b\nkJSUZPDz37hxA25ubgY/L8mJV/r02MnMzISnp+dj88Klffv2Yc6cObCxsTF1K/QYYOgTEUmEyztE\nRBJh6BMRSYShT0QkEYY+EZFEGPpERBJh6BMRSYShT0QkEYY+EZFE/h84M4G2e8+MAAAAAABJRU5E\nrkJggg==\n",
+ "text": "<matplotlib.figure.Figure at 0x7a0cf98>"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-207"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 150\nstd_dev = 6.2 # Standard deviation\n\n# as alpha = 0.01 , z(alpha/2) = 2.575\nZ = 2.575 # Z value\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nE = (Z*std_dev)/sqrt(n)\nE = round(E,2)\n\n# Result\nprint \"Maximum Error: \",E",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum Error: 1.3\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-208"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nE = 0.50 # Atmost error\nstd_dev = 1.6 # Standard deviation\n\n# as alpha = 0.05 , z(alpha/2) = 1.96\nZ = 1.96 # Z value\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nn = pow( (Z*std_dev) / E,2 ) # Sample size\nn = round(n,-1)\n\n# Result\nprint \"Sample size: \",int(n)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Sample size: 40\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-209"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 6 # number of observations\nstd_dev = 0.14 # standard deviation(in degree)\n# as alpha = 0.02 , t(alpha/2) = 3.365 for v = 5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nt = 3.365 # i.e. t(0.01) for v=5\nstd_err = (t*std_dev) / sqrt(n) # estimated standard error\nstd_err = round(std_err,2)\n\n# Result\nprint \"Maximum error: \",std_err,\"degree\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum error: 0.19 degree\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-210"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 100 # sample size\nMean = 21.6 # sample mean\nstd_dev = 5.1 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as alpha = 0.05 , z(alpha/2) = 1.96\nZ = 1.96\n\ny1 = Mean - Z*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + Z*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,1)\ny2 = round(y2,1)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 20.6 , 22.6 )\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-210"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 50 # sample size\nMean = 305.58 # sample mean(in nm)\nstd_dev = 36.97 # standard deviation(in nm)\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# as alpha = 0.01 , z(alpha/2) = 2.575\nZ = 2.575\n\ny1 = Mean - Z*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + Z*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"99% confidence interval(in nm): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "99% confidence interval(in nm): ( 292.12 , 319.04 )\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-211"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 16 # sample size\nMean = 3.42 # sample mean\nstd_dev = 0.68 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# t(0.05) = 2.947\nt = 2.947\n\ny1 = Mean - t*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + t*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"99% confidence interval(in grams): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "99% confidence interval(in grams): ( 2.92 , 3.92 )\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-219"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\ncount = [7,3,1,2,4,1,2,3,1,2] # count list for 10 days\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nlembda = float(sum(count)) / len(count) # maximaum likelihood estimate of lembda\nlembda = round(lembda,2)\n\n# we need to find P(x=0 or x=1) using poisson distribution\np = exp(-lembda) + (exp(-lembda) * lembda) / math.factorial(1) # maximum estimated probability\np = round(p,3)\n\n# Result\nprint \"Maximum estimated probability: \",p",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum estimated probability: 0.267\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-220"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nl = array([5.57,5.76,4.18,4.64,7.02,6.62,6.33,7.24,5.57,7.89,4.67,7.24,6.43,5.59,5.39])\n \n# calculation\nMean = mean(l)\nvar = 0\n\nfor each in l:\n var = var + (each-Mean)**2\n\nvar = var/len(l)\n\ncoff = sqrt(var)/Mean\n\n# Results\nprint \"Maximum likelihood estimates of Mean:\",round(Mean,3),\" Variance:\",round(var,3)\nprint \"Cofficient of variation:\",round(coff,3) ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum likelihood estimates of Mean: 6.009 Variance: 1.084\nCofficient of variation: 0.173\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-231"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nMean = 4.5 # mean of normal distribution\nstd_dev = 1.5 # standard deviation of normal distribution\nn = 25 # number of vinyl specimens\nx = 3.9\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# corresponding to x = 3.9 , Z = (x-Mean) / (std_dev/sqrt(n))\nZ = (x-Mean) / (std_dev/sqrt(n)) # Z value\nZ = round(Z,0)\n\n# from Normal Table P(Z>2.00) = 0.0228 which is same as P(Z<-2.00)\np = 0.0228 # probability P(z<-2.00)\np_val = 2*p # Required P-Value\n\n# Result\nprint \"P-Value: \",p_val",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "P-Value: 0.0456\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-232"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.01 # level of significance\nx = 27463 # in miles\nMean = 28000 # Mean( in miles)\nstd_dev = 1348 # standard deviation(in miles)\nn = 40 # sample size\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis is accepted if Z< -z(alpha) and rejected if Z> -z(alpha), z(0.01) = 2.33\nZ = (x-Mean) / (std_dev / sqrt(n)) # Z value corresponding to x\nZ = round(Z,2)\n\n# Result\nif(Z<-2.33):\n print \"Null hypothesis rejected\"\nelse:\n print \"Null hypothesis accepted\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-233"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\nalpha = 0.01 # level of significance\nMean = 180 # Mean( in pound)\nn = 5 # sample size\nstd_dev = 5.7 # standard deviation(in pound)\nx = 169.5 # in pound\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# consider (1) null hypothesis if value=180 punds (2) alternative hypothesis if value < 180 pounds\n\nt = (x-Mean) / (std_dev / sqrt(n)) # t value corresponding to x\nt = round(t,2)\n\n# Result\nif(t < -3.747):\n print \"Null hypothesis rejected\"\nelse:\n print \"Null hypothesis accepted\"\n\nprint \"The breaking strength is below specifications\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nThe breaking strength is below specifications\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-236"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 16 # sample size\nMean = 3.42 # sample mean\nstd_dev = 0.68 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# t(0.025) = 2.131\nt = 2.131\n\ny1 = Mean - t*(std_dev / sqrt(n)) # lower limit of range\ny2 = Mean + t*(std_dev / sqrt(n)) # upper limit of range\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in grams): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in grams): ( 3.06 , 3.78 )\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-239"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 15 # sample size\nMean1 = 75.20 # sample mean\nMean2 = 77 # sample mean\nstd_dev = 3.6 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# z(0.05) = 1.645\nZ = 1.645\n\ny1 = Z + sqrt(n)*((Mean1-Mean2) / std_dev) # lower limit of range\ny1 = round(y1,3)\n\n# probability corresponding to Z>y1 is 0.614\np = 0.614 # P(Z > -0.219) = 0.614\n\nprob = 1 - p\n\n# Result\nprint \"Type-2 error probability: \",prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Type-2 error probability: 0.386\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-240"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 30 # sample size\nMean1 = 2.000 # sample mean\nMean2 = 2.010 # sample mean\nstd_dev = 0.050 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# z(0.025) = 1.96\nZ = 1.96\n\ny1 = -Z + sqrt(n)*((Mean1-Mean2) / std_dev) \ny2 = Z + sqrt(n)*((Mean1-Mean2) / std_dev) \n\n\n# probability corresponding to Z>y1 is 0.614\np1 = 0.0015 # P(Z < Y1) = 0.001\np2 = 0.1945 # P(Z > Y2) = 0.194\np = p1 + p2\n\nprob = 1 - p\n\n# Result\nprint \"Type-2 error probability: \",prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Type-2 error probability: 0.804\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-241"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\nalpha = 0.05\nbeta = 0.10\nMean1 = 20 # mean corresponding to alpha\nMean2 = 21 # mean corresponding to beta\nstd_dev = 2.4 # standard deviation\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nZ1 = 1.645 # Z value corresponding to alpha=0.05\nZ2 = 1.280 # Z value corresponding to beta=0.10\n\nSize = pow( (std_dev*(Z1 + Z2))/(Mean1 - Mean2) ,2) # Minimum sample size\nSize = round(Size,-1)\n\n# Result\nprint \"Required sample size: \",int(Size)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Required sample size: 50\n"
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8.ipynb
new file mode 100755
index 00000000..cd940d39
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8.ipynb
@@ -0,0 +1,284 @@
+{
+ "metadata": {
+ "name": "Chapter8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 8: Comparing Two Treatments"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-248"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Large sample confidence interval for difference of means\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\ndata = array([[45,204.4,13825.3],[55,130.0,8632.0]])\n\nsize = data[0:2,0]\nMean = data[0:2,1]\nvariance = data[0:2,2]\n\nalpha = 0.05 # level of significance\nZ = 1.96 # z value corresponding to alpha/2\n\n# Calculation\n\ny1 = (Mean[0] - Mean[1]) - ( Z* (sqrt( variance[0]/size[0] + variance[1]/size[1] )) ) # Lower limit\ny2 = (Mean[0] - Mean[1]) + ( Z* (sqrt( float(variance[0])/size[0] + float(variance[1])/size[1] )) ) # upper limit\n\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in kWh per month): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in kWh per month): ( 32.17 , 116.63 )\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-249"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing a difference in means with two large samples\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nMean = array([0.136,0.083])\nsize = array([32,32])\nvariance = array([0.004,0.005])\n\nalpha = 0.05 # level of significance\n\n# Calculation\nZ = (Mean[0] - Mean[1] - alpha)/(sqrt( variance[0]**2/size[0] + variance[1]**2/size[1] )) # Lower limit\nZ = round(Z,2)\n\n# Result\nif(Z>1.645):\n print \"Null hypothesis rejected\"\n print \"The data substantiate the claim\"\nelse:\n print \"Null hypothesis accepted\"\n print \"The data does not substantiate the claim\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nThe data substantiate the claim\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-250"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Large sample test of the null hypothesis of the equality of two means\n\n# Variable declaration\n\nalpha = 0.05 #level of significance\nn1 = 40 # size of sample-1\nn2 = 40 # size of sample-2\nstd_dev1 = 27 # standard deviation-1\nstd_dev2 = 31 # standard deviation-2\nMean1 = 1647 # Mean of sample-1 ( in hours) \nMean2 = 1638 # Mean of sample-2 ( in hours) \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis accepted if z>1.645 else rejected\nZ = (Mean1 - Mean2) / (sqrt( square(std_dev1)/float(n1) + square(std_dev2)/float(n2) )) # Z value\nZ = round(Z,2)\n\n# Result\n\nif(Z>1.645):\n print \"Null hypothesis rejected\"\n print \"observed difference between two samples is significant\"\nelse:\n print \"Null hypothesis accepted\"\n print \"observed difference between two samples is not significant\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis accepted\nobserved difference between two samples is not significant\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-251"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Approximating the probability if type-2 error\n\n# Variable declaration\n\nalpha = 0.05 #level of significance\nn1 = 40 # size of sample-1\nn2 = 40 # size of sample-2\nstd_dev1 = 27 # standard deviation-1\nstd_dev2 = 31 # standard deviation-2\nMean1 = 1647 # Mean of sample-1 ( in hours) \nMean2 = 1638 # Mean of sample-2 ( in hours) \ndelta1 = 0\ndelta2 = 16 # in hours\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nstd_dev = sqrt( square(std_dev1) + square(std_dev2) )\n\nZ = 1.645 # at alpha = 0.05\nZ1 = Z + sqrt(n1)*( (delta1 - delta2)/std_dev ) \nZ1 = round(Z1,3)\n\n\n\n# Probability of Z > -0.817 =0.793 \nerr_prob = 1 - 0.793 # type-2 error probability\n\n# Result\nprint \"type-2 error probability: \",err_prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "type-2 error probability: 0.207\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-253"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A two sample t test\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval1 = 0\nval2 = 0\n\nMine1 = array([8260,8130,8350,8070,8340])\nMine2 = array([7950,7890,7900,8140,7920,7840])\n\nalpha = 0.01 # level of significance\ndeg = len(Mine1) + len(Mine2) - 2 # Degree of freedom\n\nMean1 = sum(Mine1)/len(Mine1)\nMean2 = sum(Mine2)/len(Mine2)\n \n# Calculation\nfor each in Mine1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in Mine2:\n val2 = val2 + (Mean2-each)**2\n\nvar = (val1 + val2)/(len(Mine1)-1 + len(Mine2)-1)\nstd_dev = sqrt(var)\n\nt = (Mean1 - Mean2)/(std_dev*(sqrt(1.0/len(Mine1) + 1.0/len(Mine2))))\n\n# Result\nif(t>3.250):\n print \"Null hypothesis rejected\"\n print \"Average heat producing capacity is not same\"\nelse:\n print \"Null hypothesis accepted\"\n print \"Average heat producing capacity is same\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nAverage heat producing capacity is not same\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-254"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Graphics to accompny a two sample t test\n\n# Variable declaration\nf1 = [] #list for sample-1\nf2 = [] #list for sample-2\nn1 = 58 # sample-1 size\nn2 = 27 # sample-2 size\nt = 1.99 # t value corresponding to alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nf1 = array([66.4,67.7,68.0,68.0,68.3,68.4,68.6,68.8,68.9,\n 69.0,69.1,69.2,69.3,69.3,69.5,69.5,69.6,69.7,69.8,69.8,69.9,\n 70.0,70.0,70.1,70.2,70.3,70.3,70.4,70.5,70.6,70.6,70.8,70.9,\n 71.0,71.1,71.2,71.3,71.3,71.5,71.6,71.6,71.7,71.8,71.8,71.9,\n 72.1,72.2,72.3,72.4,72.6,72.7,72.9,\n 73.1,73.3,73.5,\n 74.2,74.5,\n 75.3])\n\nMean1 = mean(f1)\nMean1 = round(Mean1,2)\nstd_dev1 = std(f1)\nstd_dev1 = round(std_dev1,1) \n\nf2 = array([71.2,71.8,72.6,72.8,73.4,73.7,73.9,74.4,74.9,75.5,75.9,\n 76.3,76.5,76.7,76.9,\n 77.1,77.3,77.6,77.7,77.8,\n 78.1,78.2,78.4,78.6,\n 79.0,79.3,79.8])\n\nMean2 = mean(f2)\nMean2 = round(Mean2,2)\nstd_dev2 = std(f2)\nstd_dev2 = round(std_dev2,1)\n\ny1 = (Mean1 - Mean2) - t*sqrt( ( (n1-1)*pow(std_dev1,2) + (n2-1)*pow(std_dev2,2) ) / (n1+n2-2) ) * sqrt( 1.0/n1 + 1.0/n2 ) # lower limit\ny1 = round(y1,1)\ny2 = (Mean1 - Mean2) + t*sqrt( ( (n1-1)*pow(std_dev1,2) + (n2-1)*pow(std_dev2,2) ) / (n1+n2-2) ) * sqrt( 1.0/n1 + 1.0/n2 ) # upper limit\ny2 = round(y2,1)\nif abs(y1)>abs(y2):\n m1=abs(y2)\n m2=abs(y1)\nelse:\n m1=abs(y1)\n m2=abs(y2)\n# Result\nprint \"95% large sample confidence interval(in thousand pounds per square): (\",m1,\",\",m2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% large sample confidence interval(in thousand pounds per square): ( 4.5 , 6.4 )\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-255"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Comparing the two confidence intervals\n\n# Variable declaration\nf1 = [] #list for sample-1\nf2 = [] #list for sample-2\nn1 = 58 # sample-1 size\nn2 = 27 # sample-2 size\nZ = 1.96 # Z value corresponding to alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nf1 = [66.4,67.7,68.0,68.0,68.3,68.4,68.6,68.8,68.9,\n 69.0,69.1,69.2,69.3,69.3,69.5,69.5,69.6,69.7,\n 69.8,69.8,69.9,70.0,70.0,70.1,70.2,70.3,70.3,\n 70.4,70.5,70.6,70.6,70.8,70.9,71.0,71.1,71.2,\n 71.3,71.3,71.5,71.6,71.6,71.7,71.8,71.8,71.9,\n 72.1,72.2,72.3,72.4,72.6,72.7,72.9,73.1,73.3,\n 73.5,74.2,74.5,75.3]\n\nMean1 = mean(f1)\nMean1 = round(Mean1,2)\nstd_dev1 = std(f1)\nstd_dev1 = round(std_dev1,1) \n\nf2 = [71.2,71.8,72.6,72.8,73.4,73.7,73.9,\n 74.4,74.9,75.5,75.9,76.3,76.5,76.7,\n 76.9,77.1,77.3,77.6,77.7,77.8,78.1,\n 78.2,78.4,78.6,79.0,79.3,79.8]\n\nMean2 = mean(f2)\nMean2 = round(Mean2,2)\nstd_dev2 = std(f2)\nstd_dev2 = round(std_dev2,1)\n\ny1 = (Mean1 - Mean2) - Z*sqrt( pow(std_dev1,2)/n1 + pow(std_dev2,2)/n2 ) # lower limit\ny1 = round(y1,2)\ny1 = round(y1,1)\ny2 = (Mean1 - Mean2) + Z*sqrt( pow(std_dev1,2)/n1 + pow(std_dev2,2)/n2 ) # upper limit\ny2 = round(y2,1)\nif abs(y1)>abs(y2):\n m1=abs(y2)\n m2=abs(y1)\nelse:\n m1=abs(y1)\n m2=abs(y2)\n\n# Result\nprint \"95% large sample confidence interval(in thousand pounds per square): (\",m1,\",\",m2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% large sample confidence interval(in thousand pounds per square): ( 4.4 , 6.5 )\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-256"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing equality of mean product volume\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval1 = 0\nval2 = 0\n\ndata1 = array([0.63,2.64,1.85,1.68,1.09,1.67,0.73,1.04,0.68])\ndata2 = array([3.71,4.09,4.11,3.75,3.49,3.27,3.72,3.49,4.26])\nn1 = len(data1)\nn2 = len(data2)\n\nalpha = 0.05 # level of significance\nMean1 = sum(data1)/len(data1)\nMean2 = sum(data2)/len(data2)\n\n# Calculation\n\nfor each in data1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in data2:\n val2 = val2 + (Mean2-each)**2\n \nval1 = val1/(n1-1)\nval2 = val2/(n2-1)\n\nvar = (val1 + val2)/(len(Mine1)-1 + len(Mine2)-1)\n\ndeg = pow((val1/n1 + val2/n2),2)/(pow(val1/n1,2)/(n1-1) + pow(val2/n2,2)/(n2-1)) \ndeg = round(deg,0)\n\nt = (Mean1 - Mean2)/ sqrt( val1/n1 + val2/n2 ) # upper limit\nt = round(t,2)\n\n# Result\nif(t<-2.201):\n print \"Null hypothesis rejected\"\n print \"Mean product volume are different\"\nelse:\n print \"Null hypothesis accepted\"\n print \"Mean product volume are same\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nMean product volume are different\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-257"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A confidence interval for the difference of mean yields when variances are unequal\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval1 = 0\nval2 = 0\n\ndata1 = array([0.63,2.64,1.85,1.68,1.09,1.67,0.73,1.04,0.68])\ndata2 = array([3.71,4.09,4.11,3.75,3.49,3.27,3.72,3.49,4.26])\nn1 = len(data1)\nn2 = len(data2)\n\nalpha = 0.05 # level of significance\nMean1 = sum(data1)/len(data1)\nMean2 = sum(data2)/len(data2)\n\n# Calculation\n\nfor each in data1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in data2:\n val2 = val2 + (Mean2-each)**2\n \nval1 = val1/(n1-1)\nval2 = val2/(n2-1)\n\nvar = (val1 + val2)/(len(Mine1)-1 + len(Mine2)-1)\n\ndeg = pow((val1/n1 + val2/n2),2)/(pow(val1/n1,2)/(n1-1) + pow(val2/n2,2)/(n2-1)) \ndeg = round(deg,0)\n\nt = 2.201 # t-value for 11 degree of freedom\n\ny1 = (Mean1 - Mean2 - t*(sqrt(val1/n1 + val2/n2))) # Lower limit\ny2 = (Mean1 - Mean2 + t*(sqrt(val1/n1 + val2/n2))) # Lower limit\n\ny1 = round(y1,3)\ny2 = round(y2,3)\n\n# Result\nprint \"95% confidence interval(in gallons): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in gallons): ( -2.982 , -1.88 )\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-259"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Conducting a paired t-test\n\n# Variable declaration\nn = 10\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n \nl = array([[45,36],[73,60],[46,44],[124,119],[33,35],[57,51],[83,77],[34,29],[26,24],[17,11]])\nl1 = l[:,0]\nl2 = l[:,1]\ndiff = l1 - l2 # diffrence in values\nMean = mean(diff)\nstd_dev = 4.08\n\n# null hypothesis is rejected if t > 1.833 for v = 9 degrees of freedom\nt = (Mean - 0) / (std_dev / sqrt(n)) # t value\nt = round(t,2)\n\n# Result\nif(t > 1.833):\n print \"null hypothesis is rejected\"\n print \"Industrial safety program is effective\"\nelse:\n print \"null hypothesis is accepted\"\n print \"Industrial safety program is effective\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis is rejected\nIndustrial safety program is effective\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-260"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A 90% confidence interval for the mean of a paired difference\n\n# Variable declaration\nn = 10\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n \nl = array([[45,36],[73,60],[46,44],[124,119],[33,35],[57,51],[83,77],[34,29],[26,24],[17,11]])\nl1 = l[:,0]\nl2 = l[:,1]\ndiff = l1 - l2 # diffrence in values\nMean = mean(diff)\nstd_dev = 4.08\n\nt = 1.833\n\ny1 = (Mean - t*std_dev/sqrt(n)) # Lower limit\ny2 = (Mean + t*std_dev/sqrt(n)) # Lower limit\n\ny1 = round(y1,1)\ny2 = round(y2,1)\n\n# Result\nprint \"95% confidence interval(in gallons): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in gallons): ( 2.8 , 7.6 )\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-261"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Comparing the measurements made at two laboratories\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nval = 0\ndata1 = array([27,23,64,44,30,75,26,124,54,30,14])\ndata2 = array([15,13,22,29,31,64,30,64,56,20,21])\ny = [1,1,1,1,1,1,1,1,1,1.1,1]\nd = []\n\nalpha = 0.05 # level of significance\nfor i in range(0,11):\n d.append(data1[i]-data2[i])\n\nn = len(d) \nMean = sum(d)/float(len(d))\n\n# Calculation\nfor each in d:\n val = val + (Mean-each)**2\n \nval = val/float(n-1) \ndeg = n-1\n\nt = 2.228 # t-value for 10 degree of freedom\n\ny1 = (Mean - t*(sqrt(val/n))) # Lower limit\ny2 = (Mean + t*(sqrt(val/n))) # upper limit\n\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"\nscatter(d,y)\ntitle(\"Dot Diagram\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( -0.47 , 27.02 )\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": "<matplotlib.text.Text at 0x83da0b8>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEKCAYAAADzQPVvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUlHXiP/D3cL9fVBiUGaW4CYhcAlk3qSl19WdBqdiK\npAaULLuuYVbqXgrar6LreszbbukpErcFv+3xrKyOU9rusJaytkJmggrGJGCQGHdMYPj8/ijnK3dG\nLsP2vF/ncA7P83ku72eY3sx8mMdkQggBIiL6QTMzdQAiIhp5LHsiIglg2RMRSQDLnohIAlj2REQS\nwLInIpIAlj1RN5mZmXjuuedMHYNoWLHsaczw8vKCnZ0dnJyc4OrqigcffBBvvvkmBnsryDvvvIPo\n6Oh+t1GpVLC1tYWTkxOcnZ0RERGBrVu3oq2tzbDNxo0bsX///iFdC9FYw7KnMUMmk+Ho0aNobGzE\ntWvXsGHDBmzduhXJycnDeo69e/eisbER1dXV2L59O3Jzc7FgwYJhO0dfOjo6RvwcRH1h2dOY5Ojo\niJiYGBw6dAgHDhzAxYsXAQANDQ1YsWIF3N3d4eXlhU2bNkEIgZKSEqSmpuLMmTNwdHTEuHHj+jz2\nnXcKtra2ePjhh5GXl4czZ87g2LFjAID09HQsX77csP2SJUswceJEuLi44OGHH0ZxcbFh7ObNm4iJ\niYGzszNmzJiB3/zmN13eXZiZmeGPf/wjfH194e/vDwB4/vnnMXnyZMM7i48++siwfXp6OpYsWYLl\ny5fDyckJ06dPR2lpKTIzMyGXyzFlyhScOHFiGB5hkhqWPY1pkZGRUCgUhkL85S9/iaamJpSXlyM/\nPx/Z2dnIyspCQEAA3njjDcycORNNTU345ptv+jymTCbrsqxUKhEREYFTp071uv1jjz2GsrIy3Lhx\nA+Hh4UhISDCM/eIXv4CjoyNqampw4MABZ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HlUz33H0qVLxcSJE4WlpaVQKBTi7bffFjdv3hSzZ88Wvr6+Yu7cuaKurm5UM506\ndUrIZDIREhJieB4dP37c5Lk+++wzERYWJkJCQkRwcLD4/e9/L4QQJs91h1arNXwax5SZvvjiCxES\nEiJCQkJEUFCQ4blt6sfp008/FREREWL69Oli4cKFor6+3uSZmpubxfjx40VjY6NhnbGZeFMVEZEE\njIlP4xAR0chi2RMRSQDLnohIAlj2REQSwLInIpIAlj0RkQSw7ImIJIBlT0QkAf8fbgfeTJqFjrAA\nAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x83c21d0>"
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8_1.ipynb
new file mode 100755
index 00000000..83a09514
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter8_1.ipynb
@@ -0,0 +1,284 @@
+{
+ "metadata": {
+ "name": "Chapter8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 8: Comparing Two Treatments"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-248"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\ndata = array([[45,204.4,13825.3],[55,130.0,8632.0]])\n\nsize = data[0:2,0]\nMean = data[0:2,1]\nvariance = data[0:2,2]\n\nalpha = 0.05 # level of significance\nZ = 1.96 # z value corresponding to alpha/2\n\n# Calculation\n\ny1 = (Mean[0] - Mean[1]) - ( Z* (sqrt( variance[0]/size[0] + variance[1]/size[1] )) ) # Lower limit\ny2 = (Mean[0] - Mean[1]) + ( Z* (sqrt( float(variance[0])/size[0] + float(variance[1])/size[1] )) ) # upper limit\n\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval(in kWh per month): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in kWh per month): ( 32.17 , 116.63 )\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-249"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nMean = array([0.136,0.083])\nsize = array([32,32])\nvariance = array([0.004,0.005])\n\nalpha = 0.05 # level of significance\n\n# Calculation\nZ = (Mean[0] - Mean[1] - alpha)/(sqrt( variance[0]**2/size[0] + variance[1]**2/size[1] )) # Lower limit\nZ = round(Z,2)\n\n# Result\nif(Z>1.645):\n print \"Null hypothesis rejected\"\n print \"The data substantiate the claim\"\nelse:\n print \"Null hypothesis accepted\"\n print \"The data does not substantiate the claim\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nThe data substantiate the claim\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-250"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\nalpha = 0.05 #level of significance\nn1 = 40 # size of sample-1\nn2 = 40 # size of sample-2\nstd_dev1 = 27 # standard deviation-1\nstd_dev2 = 31 # standard deviation-2\nMean1 = 1647 # Mean of sample-1 ( in hours) \nMean2 = 1638 # Mean of sample-2 ( in hours) \n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis accepted if z>1.645 else rejected\nZ = (Mean1 - Mean2) / (sqrt( square(std_dev1)/float(n1) + square(std_dev2)/float(n2) )) # Z value\nZ = round(Z,2)\n\n# Result\n\nif(Z>1.645):\n print \"Null hypothesis rejected\"\n print \"observed difference between two samples is significant\"\nelse:\n print \"Null hypothesis accepted\"\n print \"observed difference between two samples is not significant\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis accepted\nobserved difference between two samples is not significant\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-251"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\n\nalpha = 0.05 #level of significance\nn1 = 40 # size of sample-1\nn2 = 40 # size of sample-2\nstd_dev1 = 27 # standard deviation-1\nstd_dev2 = 31 # standard deviation-2\nMean1 = 1647 # Mean of sample-1 ( in hours) \nMean2 = 1638 # Mean of sample-2 ( in hours) \ndelta1 = 0\ndelta2 = 16 # in hours\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nstd_dev = sqrt( square(std_dev1) + square(std_dev2) )\n\nZ = 1.645 # at alpha = 0.05\nZ1 = Z + sqrt(n1)*( (delta1 - delta2)/std_dev ) \nZ1 = round(Z1,3)\n\n\n\n# Probability of Z > -0.817 =0.793 \nerr_prob = 1 - 0.793 # type-2 error probability\n\n# Result\nprint \"type-2 error probability: \",err_prob",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "type-2 error probability: 0.207\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-253"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval1 = 0\nval2 = 0\n\nMine1 = array([8260,8130,8350,8070,8340])\nMine2 = array([7950,7890,7900,8140,7920,7840])\n\nalpha = 0.01 # level of significance\ndeg = len(Mine1) + len(Mine2) - 2 # Degree of freedom\n\nMean1 = sum(Mine1)/len(Mine1)\nMean2 = sum(Mine2)/len(Mine2)\n \n# Calculation\nfor each in Mine1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in Mine2:\n val2 = val2 + (Mean2-each)**2\n\nvar = (val1 + val2)/(len(Mine1)-1 + len(Mine2)-1)\nstd_dev = sqrt(var)\n\nt = (Mean1 - Mean2)/(std_dev*(sqrt(1.0/len(Mine1) + 1.0/len(Mine2))))\n\n# Result\nif(t>3.250):\n print \"Null hypothesis rejected\"\n print \"Average heat producing capacity is not same\"\nelse:\n print \"Null hypothesis accepted\"\n print \"Average heat producing capacity is same\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nAverage heat producing capacity is not same\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-254"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nf1 = [] #list for sample-1\nf2 = [] #list for sample-2\nn1 = 58 # sample-1 size\nn2 = 27 # sample-2 size\nt = 1.99 # t value corresponding to alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nf1 = array([66.4,67.7,68.0,68.0,68.3,68.4,68.6,68.8,68.9,\n 69.0,69.1,69.2,69.3,69.3,69.5,69.5,69.6,69.7,69.8,69.8,69.9,\n 70.0,70.0,70.1,70.2,70.3,70.3,70.4,70.5,70.6,70.6,70.8,70.9,\n 71.0,71.1,71.2,71.3,71.3,71.5,71.6,71.6,71.7,71.8,71.8,71.9,\n 72.1,72.2,72.3,72.4,72.6,72.7,72.9,\n 73.1,73.3,73.5,\n 74.2,74.5,\n 75.3])\n\nMean1 = mean(f1)\nMean1 = round(Mean1,2)\nstd_dev1 = std(f1)\nstd_dev1 = round(std_dev1,1) \n\nf2 = array([71.2,71.8,72.6,72.8,73.4,73.7,73.9,74.4,74.9,75.5,75.9,\n 76.3,76.5,76.7,76.9,\n 77.1,77.3,77.6,77.7,77.8,\n 78.1,78.2,78.4,78.6,\n 79.0,79.3,79.8])\n\nMean2 = mean(f2)\nMean2 = round(Mean2,2)\nstd_dev2 = std(f2)\nstd_dev2 = round(std_dev2,1)\n\ny1 = (Mean1 - Mean2) - t*sqrt( ( (n1-1)*pow(std_dev1,2) + (n2-1)*pow(std_dev2,2) ) / (n1+n2-2) ) * sqrt( 1.0/n1 + 1.0/n2 ) # lower limit\ny1 = round(y1,1)\ny2 = (Mean1 - Mean2) + t*sqrt( ( (n1-1)*pow(std_dev1,2) + (n2-1)*pow(std_dev2,2) ) / (n1+n2-2) ) * sqrt( 1.0/n1 + 1.0/n2 ) # upper limit\ny2 = round(y2,1)\nif abs(y1)>abs(y2):\n m1=abs(y2)\n m2=abs(y1)\nelse:\n m1=abs(y1)\n m2=abs(y2)\n# Result\nprint \"95% large sample confidence interval(in thousand pounds per square): (\",m1,\",\",m2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% large sample confidence interval(in thousand pounds per square): ( 4.5 , 6.4 )\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-255"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nf1 = [] #list for sample-1\nf2 = [] #list for sample-2\nn1 = 58 # sample-1 size\nn2 = 27 # sample-2 size\nZ = 1.96 # Z value corresponding to alpha/2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nf1 = [66.4,67.7,68.0,68.0,68.3,68.4,68.6,68.8,68.9,\n 69.0,69.1,69.2,69.3,69.3,69.5,69.5,69.6,69.7,\n 69.8,69.8,69.9,70.0,70.0,70.1,70.2,70.3,70.3,\n 70.4,70.5,70.6,70.6,70.8,70.9,71.0,71.1,71.2,\n 71.3,71.3,71.5,71.6,71.6,71.7,71.8,71.8,71.9,\n 72.1,72.2,72.3,72.4,72.6,72.7,72.9,73.1,73.3,\n 73.5,74.2,74.5,75.3]\n\nMean1 = mean(f1)\nMean1 = round(Mean1,2)\nstd_dev1 = std(f1)\nstd_dev1 = round(std_dev1,1) \n\nf2 = [71.2,71.8,72.6,72.8,73.4,73.7,73.9,\n 74.4,74.9,75.5,75.9,76.3,76.5,76.7,\n 76.9,77.1,77.3,77.6,77.7,77.8,78.1,\n 78.2,78.4,78.6,79.0,79.3,79.8]\n\nMean2 = mean(f2)\nMean2 = round(Mean2,2)\nstd_dev2 = std(f2)\nstd_dev2 = round(std_dev2,1)\n\ny1 = (Mean1 - Mean2) - Z*sqrt( pow(std_dev1,2)/n1 + pow(std_dev2,2)/n2 ) # lower limit\ny1 = round(y1,2)\ny1 = round(y1,1)\ny2 = (Mean1 - Mean2) + Z*sqrt( pow(std_dev1,2)/n1 + pow(std_dev2,2)/n2 ) # upper limit\ny2 = round(y2,1)\nif abs(y1)>abs(y2):\n m1=abs(y2)\n m2=abs(y1)\nelse:\n m1=abs(y1)\n m2=abs(y2)\n\n# Result\nprint \"95% large sample confidence interval(in thousand pounds per square): (\",m1,\",\",m2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% large sample confidence interval(in thousand pounds per square): ( 4.4 , 6.5 )\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-256"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval1 = 0\nval2 = 0\n\ndata1 = array([0.63,2.64,1.85,1.68,1.09,1.67,0.73,1.04,0.68])\ndata2 = array([3.71,4.09,4.11,3.75,3.49,3.27,3.72,3.49,4.26])\nn1 = len(data1)\nn2 = len(data2)\n\nalpha = 0.05 # level of significance\nMean1 = sum(data1)/len(data1)\nMean2 = sum(data2)/len(data2)\n\n# Calculation\n\nfor each in data1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in data2:\n val2 = val2 + (Mean2-each)**2\n \nval1 = val1/(n1-1)\nval2 = val2/(n2-1)\n\nvar = (val1 + val2)/(len(Mine1)-1 + len(Mine2)-1)\n\ndeg = pow((val1/n1 + val2/n2),2)/(pow(val1/n1,2)/(n1-1) + pow(val2/n2,2)/(n2-1)) \ndeg = round(deg,0)\n\nt = (Mean1 - Mean2)/ sqrt( val1/n1 + val2/n2 ) # upper limit\nt = round(t,2)\n\n# Result\nif(t<-2.201):\n print \"Null hypothesis rejected\"\n print \"Mean product volume are different\"\nelse:\n print \"Null hypothesis accepted\"\n print \"Mean product volume are same\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Null hypothesis rejected\nMean product volume are different\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-257"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval1 = 0\nval2 = 0\n\ndata1 = array([0.63,2.64,1.85,1.68,1.09,1.67,0.73,1.04,0.68])\ndata2 = array([3.71,4.09,4.11,3.75,3.49,3.27,3.72,3.49,4.26])\nn1 = len(data1)\nn2 = len(data2)\n\nalpha = 0.05 # level of significance\nMean1 = sum(data1)/len(data1)\nMean2 = sum(data2)/len(data2)\n\n# Calculation\n\nfor each in data1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in data2:\n val2 = val2 + (Mean2-each)**2\n \nval1 = val1/(n1-1)\nval2 = val2/(n2-1)\n\nvar = (val1 + val2)/(len(Mine1)-1 + len(Mine2)-1)\n\ndeg = pow((val1/n1 + val2/n2),2)/(pow(val1/n1,2)/(n1-1) + pow(val2/n2,2)/(n2-1)) \ndeg = round(deg,0)\n\nt = 2.201 # t-value for 11 degree of freedom\n\ny1 = (Mean1 - Mean2 - t*(sqrt(val1/n1 + val2/n2))) # Lower limit\ny2 = (Mean1 - Mean2 + t*(sqrt(val1/n1 + val2/n2))) # Lower limit\n\ny1 = round(y1,3)\ny2 = round(y2,3)\n\n# Result\nprint \"95% confidence interval(in gallons): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in gallons): ( -2.982 , -1.88 )\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-259"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 10\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n \nl = array([[45,36],[73,60],[46,44],[124,119],[33,35],[57,51],[83,77],[34,29],[26,24],[17,11]])\nl1 = l[:,0]\nl2 = l[:,1]\ndiff = l1 - l2 # diffrence in values\nMean = mean(diff)\nstd_dev = 4.08\n\n# null hypothesis is rejected if t > 1.833 for v = 9 degrees of freedom\nt = (Mean - 0) / (std_dev / sqrt(n)) # t value\nt = round(t,2)\n\n# Result\nif(t > 1.833):\n print \"null hypothesis is rejected\"\n print \"Industrial safety program is effective\"\nelse:\n print \"null hypothesis is accepted\"\n print \"Industrial safety program is effective\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis is rejected\nIndustrial safety program is effective\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-260"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nn = 10\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n \nl = array([[45,36],[73,60],[46,44],[124,119],[33,35],[57,51],[83,77],[34,29],[26,24],[17,11]])\nl1 = l[:,0]\nl2 = l[:,1]\ndiff = l1 - l2 # diffrence in values\nMean = mean(diff)\nstd_dev = 4.08\n\nt = 1.833\n\ny1 = (Mean - t*std_dev/sqrt(n)) # Lower limit\ny2 = (Mean + t*std_dev/sqrt(n)) # Lower limit\n\ny1 = round(y1,1)\ny2 = round(y2,1)\n\n# Result\nprint \"95% confidence interval(in gallons): (\",y1,\",\",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval(in gallons): ( 2.8 , 7.6 )\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-261"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n%matplotlib inline\n\nval = 0\ndata1 = array([27,23,64,44,30,75,26,124,54,30,14])\ndata2 = array([15,13,22,29,31,64,30,64,56,20,21])\ny = [1,1,1,1,1,1,1,1,1,1.1,1]\nd = []\n\nalpha = 0.05 # level of significance\nfor i in range(0,11):\n d.append(data1[i]-data2[i])\n\nn = len(d) \nMean = sum(d)/float(len(d))\n\n# Calculation\nfor each in d:\n val = val + (Mean-each)**2\n \nval = val/float(n-1) \ndeg = n-1\n\nt = 2.228 # t-value for 10 degree of freedom\n\ny1 = (Mean - t*(sqrt(val/n))) # Lower limit\ny2 = (Mean + t*(sqrt(val/n))) # upper limit\n\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"95% confidence interval: (\",y1,\",\",y2,\")\"\nscatter(d,y)\ntitle(\"Dot Diagram\")",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( -0.47 , 27.02 )\n"
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": "<matplotlib.text.Text at 0x83da0b8>"
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEKCAYAAADzQPVvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUlHXiP/D3cL9fVBiUGaW4CYhcAlk3qSl19WdBqdiK\npAaULLuuYVbqXgrar6LreszbbukpErcFv+3xrKyOU9rusJaytkJmggrGJGCQGHdMYPj8/ijnK3dG\nLsP2vF/ncA7P83ku72eY3sx8mMdkQggBIiL6QTMzdQAiIhp5LHsiIglg2RMRSQDLnohIAlj2REQS\nwLInIpIAlj1RN5mZmXjuuedMHYNoWLHsaczw8vKCnZ0dnJyc4OrqigcffBBvvvkmBnsryDvvvIPo\n6Oh+t1GpVLC1tYWTkxOcnZ0RERGBrVu3oq2tzbDNxo0bsX///iFdC9FYw7KnMUMmk+Ho0aNobGzE\ntWvXsGHDBmzduhXJycnDeo69e/eisbER1dXV2L59O3Jzc7FgwYJhO0dfOjo6RvwcRH1h2dOY5Ojo\niJiYGBw6dAgHDhzAxYsXAQANDQ1YsWIF3N3d4eXlhU2bNkEIgZKSEqSmpuLMmTNwdHTEuHHj+jz2\nnXcKtra2ePjhh5GXl4czZ87g2LFjAID09HQsX77csP2SJUswceJEuLi44OGHH0ZxcbFh7ObNm4iJ\niYGzszNmzJiB3/zmN13eXZiZmeGPf/wjfH194e/vDwB4/vnnMXnyZMM7i48++siwfXp6OpYsWYLl\ny5fDyckJ06dPR2lpKTIzMyGXyzFlyhScOHFiGB5hkhqWPY1pkZGRUCgUhkL85S9/iaamJpSXlyM/\nPx/Z2dnIyspCQEAA3njjDcycORNNTU345ptv+jymTCbrsqxUKhEREYFTp071uv1jjz2GsrIy3Lhx\nA+Hh4UhISDCM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Wq0W\nfn5+wtvbW2zevHlUz33H0qVLxcSJE4WlpaVQKBTi7bffFjdv3hSzZ88Wvr6+Yu7cuaKurm5UM506\ndUrIZDIREhJieB4dP37c5Lk+++wzERYWJkJCQkRwcLD4/e9/L4QQJs91h1arNXwax5SZvvjiCxES\nEiJCQkJEUFCQ4blt6sfp008/FREREWL69Oli4cKFor6+3uSZmpubxfjx40VjY6NhnbGZeFMVEZEE\njIlP4xAR0chi2RMRSQDLnohIAlj2REQSwLInIpIAlj0RkQSw7ImIJIBlT0QkAf8fbgfeTJqFjrAA\nAAAASUVORK5CYII=\n",
+ "text": "<matplotlib.figure.Figure at 0x83c21d0>"
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9.ipynb
new file mode 100755
index 00000000..59a6ac24
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 9: Inferences Concerning Variances"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-269"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Using the sample range to estimate sigma\n\n# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval = 0\nMine1 = array([8260,8130,8350,8070,8340])\n\n# Calculation\n\nMean1 = sum(Mine1)/len(Mine1)\n\nfor each in Mine1:\n val = val + (Mean1-each)**2\n \nvar = (val)/(len(Mine1)-1)\nstd_dev = sqrt(var)\n\nd2 = 2.326 # for n=5\n\nest_std_dev = (max(Mine1)-min(Mine1))/d2\n\n# Result\nprint \"Estimated standard deviation: \",round(est_std_dev,1)\nprint \"Actual standard deviation: \",round(std_dev,1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Estimated standard deviation: 120.4\nActual standard deviation: 125.5\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-270"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Finding a 95% confidence interval for sigma\n\n# Variable declaration\nv = 19 # degree of freedom\nVariance = 1.2* pow(10,-4) # variance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# alpha = 0.05\nchi_square1 = 8.907 # chi square value at alpha/2 from table-5\nchi_square2 = 32.852 # chi square value at 1-(alpha/2) from table-5\n\n# we need to find limits of sigma\n\ny1 = (v*Variance) / chi_square2 \ny2 = (v*Variance) / chi_square1 \n\ny1 = round( sqrt(y1), 4) #lower limit\ny2 = round( sqrt(y2), 4) #upper limit\n\n# Result\nprint \"95% confidence interval: (\",y1,\" , \",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 0.0083 , 0.016 )\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-271"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Testing hypothesis concerning a standard deviation\n\n# Variable declaration\nalpha = 0.05 # level of significance\nv = 14 # degree of freedom\nstd_dev = 0.64 # standard deviation(in mil)\nsigma = 0.5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if sigma = 0.5 , Alternative hypothesis if sigma > 0.5\n\nchi_sq_thr = 23.685 # theoritical value of chi square at alpha = 0.05 with v = 14\nchi_sq_prt = ( v*pow(std_dev,2) ) /pow(sigma,2) # calculated value of chi square\nchi_sq_prt = round(chi_sq_prt,2)\n\n# Result\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"we can not conclude that lapping process is unsatisfatory\"\nelse:\n print \"null hypothesis can be rejected\"\n print \"we can conclude that lapping process is unsatisfatory\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis can not be rejected\nwe can not conclude that lapping process is unsatisfatory\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-273"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A one-sided F test of the equality of two variances\n\n# Variable declaration\nv = 11 # degree of freedom\ns1 = 0.035 # company-1 work yield\ns2 = 0.062 # company-2 work yield\nalpha = 0.05 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if square(sigma1) = square(sigma2) , Alternative hypothesis if square(sigma1) < square(sigma2)\n\nf_thr = 2.82 # theoritical value of F at alpha = 0.05 with v = 11\nf_prt = square(s2) / square(s1) # calculated value of F\nf_prt = round(f_prt,2)\n\n# Result\nif(f_thr > f_prt):\n print \"null hypothesis can not be rejected\"\n print \"data does not support contention\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"data supports contention\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis must be rejected\ndata supports contention\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-273"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# A two-sided F test for the equality of two variances\n\n# Variable declaration\nalpha = 0.02 # level of significance\nval1 = 0\nval2 = 0\n\nMine1 = array([8260,8130,8350,8070,8340])\nMine2 = array([7950,7890,7900,8140,7920,7840])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean1 = sum(Mine1)/len(Mine1)\nMean2 = sum(Mine2)/len(Mine2)\n\nfor each in Mine1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in Mine2:\n val2 = val2 + (Mean2-each)**2\n\n# null hypothesis: if square(sigma1) = square(sigma2) , Alternative hypothesis if square(sigma1) < square(sigma2)\ns1_square = val1/(len(Mine1)-1)\ns2_square = val2/(len(Mine2)-1)\n\nf_thr = 11.4 # theoritical value of F at alpha = 0.02 for 4 & 5 DOF \nf_prt = s1_square / float(s2_square) # calculated value of F\nf_prt = round(f_prt,2)\n\n# Result\nprint \"Practical F value: \",f_prt\nif(f_thr > f_prt):\n print \"null hypothesis can not be rejected\"\n print \"It can be assumed that variances of two populations sampled are equal.\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"It can not be assumed that variances of two populations sampled are equal.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical F value: 1.44\nnull hypothesis can not be rejected\nIt can be assumed that variances of two populations sampled are equal.\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-275"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# confidence interval for ratio of variances of yield\n\n# Variable declaration\nv1 = 8 # degree of freedom of sample-1\nv2 = 8 # degree of freedom of sample-2\nalpha = 0.02 # level of significance\ns1_square = 0.4548 # for sample-1 \ns2_square = 0.1089 # for sample-2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# 98% confidence interval\n\nf1 = 6.03 # f value at 0.01\nf2 = 1 / 6.03 # f value at 0.99\n\ny1 = (f2)*(s2_square / s1_square) # lower limit\ny2 = (f1)*(s2_square / s1_square) # upper limit\n\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"98% confidence interval: (\",y1,\" , \",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "98% confidence interval: ( 0.04 , 1.44 )\n"
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9_1.ipynb b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9_1.ipynb
new file mode 100755
index 00000000..26299397
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/Chapter9_1.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 9: Inferences Concerning Variances"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-269"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nfrom scipy import *\nfrom pylab import *\n\nval = 0\nMine1 = array([8260,8130,8350,8070,8340])\n\n# Calculation\n\nMean1 = sum(Mine1)/len(Mine1)\n\nfor each in Mine1:\n val = val + (Mean1-each)**2\n \nvar = (val)/(len(Mine1)-1)\nstd_dev = sqrt(var)\n\nd2 = 2.326 # for n=5\n\nest_std_dev = (max(Mine1)-min(Mine1))/d2\n\n# Result\nprint \"Estimated standard deviation: \",round(est_std_dev,1)\nprint \"Actual standard deviation: \",round(std_dev,1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Estimated standard deviation: 120.4\nActual standard deviation: 125.5\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-270"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nv = 19 # degree of freedom\nVariance = 1.2* pow(10,-4) # variance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# alpha = 0.05\nchi_square1 = 8.907 # chi square value at alpha/2 from table-5\nchi_square2 = 32.852 # chi square value at 1-(alpha/2) from table-5\n\n# we need to find limits of sigma\n\ny1 = (v*Variance) / chi_square2 \ny2 = (v*Variance) / chi_square1 \n\ny1 = round( sqrt(y1), 4) #lower limit\ny2 = round( sqrt(y2), 4) #upper limit\n\n# Result\nprint \"95% confidence interval: (\",y1,\" , \",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "95% confidence interval: ( 0.0083 , 0.016 )\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-271"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.05 # level of significance\nv = 14 # degree of freedom\nstd_dev = 0.64 # standard deviation(in mil)\nsigma = 0.5\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if sigma = 0.5 , Alternative hypothesis if sigma > 0.5\n\nchi_sq_thr = 23.685 # theoritical value of chi square at alpha = 0.05 with v = 14\nchi_sq_prt = ( v*pow(std_dev,2) ) /pow(sigma,2) # calculated value of chi square\nchi_sq_prt = round(chi_sq_prt,2)\n\n# Result\nif(chi_sq_thr > chi_sq_prt):\n print \"null hypothesis can not be rejected\"\n print \"we can not conclude that lapping process is unsatisfatory\"\nelse:\n print \"null hypothesis can be rejected\"\n print \"we can conclude that lapping process is unsatisfatory\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis can not be rejected\nwe can not conclude that lapping process is unsatisfatory\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-273"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nv = 11 # degree of freedom\ns1 = 0.035 # company-1 work yield\ns2 = 0.062 # company-2 work yield\nalpha = 0.05 # level of significance\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# null hypothesis: if square(sigma1) = square(sigma2) , Alternative hypothesis if square(sigma1) < square(sigma2)\n\nf_thr = 2.82 # theoritical value of F at alpha = 0.05 with v = 11\nf_prt = square(s2) / square(s1) # calculated value of F\nf_prt = round(f_prt,2)\n\n# Result\nif(f_thr > f_prt):\n print \"null hypothesis can not be rejected\"\n print \"data does not support contention\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"data supports contention\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "null hypothesis must be rejected\ndata supports contention\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, Page-273"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nalpha = 0.02 # level of significance\nval1 = 0\nval2 = 0\n\nMine1 = array([8260,8130,8350,8070,8340])\nMine2 = array([7950,7890,7900,8140,7920,7840])\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\nMean1 = sum(Mine1)/len(Mine1)\nMean2 = sum(Mine2)/len(Mine2)\n\nfor each in Mine1:\n val1 = val1 + (Mean1-each)**2\n \nfor each in Mine2:\n val2 = val2 + (Mean2-each)**2\n\n# null hypothesis: if square(sigma1) = square(sigma2) , Alternative hypothesis if square(sigma1) < square(sigma2)\ns1_square = val1/(len(Mine1)-1)\ns2_square = val2/(len(Mine2)-1)\n\nf_thr = 11.4 # theoritical value of F at alpha = 0.02 for 4 & 5 DOF \nf_prt = s1_square / float(s2_square) # calculated value of F\nf_prt = round(f_prt,2)\n\n# Result\nprint \"Practical F value: \",f_prt\nif(f_thr > f_prt):\n print \"null hypothesis can not be rejected\"\n print \"It can be assumed that variances of two populations sampled are equal.\"\nelse:\n print \"null hypothesis must be rejected\"\n print \"It can not be assumed that variances of two populations sampled are equal.\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Practical F value: 1.44\nnull hypothesis can not be rejected\nIt can be assumed that variances of two populations sampled are equal.\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example, page-275"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Variable declaration\nv1 = 8 # degree of freedom of sample-1\nv2 = 8 # degree of freedom of sample-2\nalpha = 0.02 # level of significance\ns1_square = 0.4548 # for sample-1 \ns2_square = 0.1089 # for sample-2\n\n# Calculation\nfrom scipy import *\nfrom pylab import *\n\n# 98% confidence interval\n\nf1 = 6.03 # f value at 0.01\nf2 = 1 / 6.03 # f value at 0.99\n\ny1 = (f2)*(s2_square / s1_square) # lower limit\ny2 = (f1)*(s2_square / s1_square) # upper limit\n\ny1 = round(y1,2)\ny2 = round(y2,2)\n\n# Result\nprint \"98% confidence interval: (\",y1,\" , \",y2,\")\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "98% confidence interval: ( 0.04 , 1.44 )\n"
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/README.txt b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/README.txt
new file mode 100755
index 00000000..8ee3fa01
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Ashvini Jindal
+Course: btech
+College/Institute/Organization: NIT Warangal
+Department/Designation: CSE
+Book Title: Miller & Freund's Probability and Statistics for Engineers
+Author: Richard A. Johnson
+Publisher: PHI Learning Private Limited(New Delhi)
+Year of publication: 2011
+Isbn: 978-81-203-4213-2
+Edition: 8th Edition \ No newline at end of file
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1.png b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1.png
new file mode 100755
index 00000000..30e3233c
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1.png
Binary files differ
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1_1.png b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1_1.png
new file mode 100755
index 00000000..30e3233c
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/1_1.png
Binary files differ
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2.png b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2.png
new file mode 100755
index 00000000..b5aa6d69
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2.png
Binary files differ
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2_1.png b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2_1.png
new file mode 100755
index 00000000..b5aa6d69
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/2_1.png
Binary files differ
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3.png b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3.png
new file mode 100755
index 00000000..4d8b2730
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3.png
Binary files differ
diff --git a/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3_1.png b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3_1.png
new file mode 100755
index 00000000..4d8b2730
--- /dev/null
+++ b/Miller_&_Freund's_Probability_and_Statistics_for_Engineers/screenshots/3_1.png
Binary files differ
diff --git a/Optical_Communication_/Chapter_2.ipynb b/Optical_Communication_/Chapter_2.ipynb
new file mode 100755
index 00000000..ddfaa1d5
--- /dev/null
+++ b/Optical_Communication_/Chapter_2.ipynb
@@ -0,0 +1,1146 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:afd6588cf456d4d425f74443bb32014c9097e23d883f51c38473cadd2c6f5ba9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Optical Fibers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine maximum thickness of film'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 3.5 #core refractive index\n",
+ "n2 = 3.0 #cladding refractive index\n",
+ "v = 6 #no. of modes\n",
+ "lamda = 1.5 #propagating wavelength(um)\n",
+ "\n",
+ "#Calculations\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "h = (2*math.pi*v*lamda)/(2*math.pi*n1*math.cos(math.radians(theta_c)))\n",
+ "\n",
+ "#Result\n",
+ "print \"The thickness of the film should be less than\",round(h),\"um\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thickness of the film should be less than 5.0 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''find the angle of acceptance and crtitical angle'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.53 #core refractive index\n",
+ "n2 = 1.48 #cladding refractive index\n",
+ "n0 = 1 #refractive index for air\n",
+ "\n",
+ "#calculations\n",
+ "theta_a = math.degrees(math.asin(((n1**2-n2**2)**0.5)/n0)) \n",
+ "\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "\n",
+ "#Result\n",
+ "print \"Angle of acceptance =\",round(theta_a,2),\"degrees\"\n",
+ "print \"Critical angle =\",round(theta_c,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of acceptance = 22.83 degrees\n",
+ "Critical angle = 75.31 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the numerical aperture'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "v = 26.6 #frequency(Hz)\n",
+ "lamda = 1.3 #propagating wavelength(um)\n",
+ "a = 25 #core radius(um)\n",
+ "\n",
+ "#Calculation\n",
+ "NA = (v*lamda)/(2*math.pi*a)\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": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, Page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the numerical aperture'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.4675 #core refractive index\n",
+ "n2 = 1.4622 #cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical aperture =\",round(NA,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture = 0.125\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5, Page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine cut-off wavelength for step index fiber'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5 #core refractive index\n",
+ "n2 = 1.47 #cladding refractive index\n",
+ "a = 4 #core radius(um)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_c = (2*math.pi*a*((n1**2-n2**2)**0.5))/2.405\n",
+ "\n",
+ "#Result\n",
+ "print \"The cut-off wavelength is\",round(lamda_c,2),\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cut-off wavelength is 3.12 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6, Page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine maximum diameter of the core for single mode fiber'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.55 #core refractive index\n",
+ "n2 = 1.48 #cladding refractive index\n",
+ "lamda = 1.55 #wavelength(um)\n",
+ "\n",
+ "#Calculations\n",
+ "a = (2.405*lamda)/(2*math.pi*(n1**2-n2**2)**0.5)\n",
+ "d = 2*a #diameter\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum diameter of the core is\",round(d,2),\"um\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum diameter of the core is 2.58 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7, Page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the number of modes propagating'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.48 #core refractive index\n",
+ "n2 = 0.01 #cladding refractive index\n",
+ "a = 25 #core radius(um)\n",
+ "lamda = 0.84 #Wavelength(um)\n",
+ "\n",
+ "#Calculation\n",
+ "m = 2*(2*math.pi/lamda)**2*(a**2/2)*(n1**2-n2**2)\n",
+ "v = math.sqrt(2*m)\n",
+ "\n",
+ "#Result\n",
+ "print \"Number of modes =\",v, \"(Calculation mistake in textbook while calculating 'm'. Hence, the answer differs)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of modes = 391.074660134 (Calculation mistake in textbook while calculating 'm'. Hence, the answer differs)\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8, Page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the number of modes for multimode fiber and calculate the same when lamda is changed to 1.3um'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.475 #core refractive index\n",
+ "n2 = 1.472 #cladding refractive index\n",
+ "a = 20 #core radius(um)\n",
+ "lamda = 0.85 #Wavelength(um)\n",
+ "\n",
+ "#Calculation\n",
+ "v = (2*math.pi*a*math.sqrt((n1**2-n2**2)))/lamda\n",
+ "M1 = v**2/2\n",
+ "\n",
+ "lamda2 = 1.3 #um\n",
+ "v2 = (2*math.pi*a*math.sqrt((n1**2-n2**2)))/lamda2\n",
+ "M2 = v2**2/2\n",
+ "\n",
+ "#Results\n",
+ "print \"Number of modes when lamda is changed =\",round(M1) #v is calculated wrongly in the book and answer for case a M not given\n",
+ "print \"Number of modes when lamda is changed =\",round(M2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of modes when lamda is changed = 97.0\n",
+ "Number of modes when lamda is changed = 41.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9, Page number 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the numerical aperture'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5 #core refractive index\n",
+ "n2 = 1.48 #cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical aperture =\",round(NA,5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture = 0.24413\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10, Page number 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine core radius, NA and maximum acceptance angle'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.450 #core refractive index\n",
+ "n2 = 1.447 #cladding refractive index\n",
+ "lamda = 1.3 #Wavelength(um)\n",
+ "\n",
+ "#Calculation\n",
+ "v = 2.405\n",
+ "a = (v*lamda)/(2*math.pi*math.sqrt((n1**2-n2**2)))\n",
+ "\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "theta_max = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Results\n",
+ "print \"Core radius =\",round(a,3),\"um\"\n",
+ "print \"Numerical aperture =\",round(NA,4)\n",
+ "print \"Maximum acceptance angle =\",round(theta_max,3),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Core radius = 5.338 um\n",
+ "Numerical aperture = 0.0932\n",
+ "Maximum acceptance angle = 5.349 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11, Page number 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine critical angle at core cladding interface, NA and acceptance angle'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.50 #core refractive index\n",
+ "n2 = 1.47 #cladding refractive index\n",
+ "\n",
+ "#calculations\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "theta_a = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical angle at core cladding interface =\",round(theta_c,1),\"degrees\"\n",
+ "print \"Numerical aperture =\",round(NA,2)\n",
+ "print \"Maximum acceptance angle =\",round(theta_a,1),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical angle at core cladding interface = 78.5 degrees\n",
+ "Numerical aperture = 0.3\n",
+ "Maximum acceptance angle = 17.4 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12, Page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the acceptance angle for skew rays'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.4 #numerical aperture\n",
+ "#Since skew rays change direction by 100 degrees at each reflection,\n",
+ "r = 50 #degrees\n",
+ "\n",
+ "#Calculations\n",
+ "theta_as = math.degrees(math.asin(NA/math.cos(math.radians(r))))\n",
+ "\n",
+ "#print\n",
+ "print \"Acceptance angle =\",round(theta_as,1),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptance angle = 38.5 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13, Page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine normalized frequency and number of guided modes'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.48 #core refractive index\n",
+ "lamda = 0.85 #wavelength(um)\n",
+ "a = 80/2 #core radius(um)\n",
+ "delta = 1.5/100 #relative index difference\n",
+ "\n",
+ "#Calculations\n",
+ "v = (2*math.pi*a*n1*(2*delta)**0.5)/lamda\n",
+ "\n",
+ "M = v**2/2\n",
+ "\n",
+ "#Results\n",
+ "print \"Normalized frequency =\",round(v,1),\"Hz\"\n",
+ "print \"Number of guided modes =\",round(M)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized frequency = 75.8 Hz\n",
+ "Number of guided modes = 2872.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14, Page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine cut off value for normalized frequency and maximum core radius'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5 #core refractive index\n",
+ "lamda = 1.3 #wavelength(um)\n",
+ "delta = 1./100. #relative index difference\n",
+ "alpha = 2\n",
+ "\n",
+ "#Calculations\n",
+ "v = 2.4*(1+2/alpha)**0.5\n",
+ "\n",
+ "a = (v*lamda)/(2*math.pi*n1*(2*delta)**0.5)\n",
+ "\n",
+ "#Results\n",
+ "print \"Cut off value for normalized frequency =\",round(v,2)\n",
+ "print \"Maximum core radius =\",round(a,2),\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cut off value for normalized frequency = 3.39\n",
+ "Maximum core radius = 3.31 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15, Page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine cut-off wavelength for step index fiber'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.46 #core refractive index\n",
+ "a = 4.5 #core radius(um)\n",
+ "delta = 0.25/100\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_c = (2*math.pi*a*n1*(2*delta)**0.5)/2.405\n",
+ "\n",
+ "#Result\n",
+ "print \"The cut-off wavelength is\",round(lamda_c,3),\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cut-off wavelength is 1.214 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16, Page number 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the numerical aperture and acceptance angle'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.45 #core refractive index\n",
+ "n2 = 1.4 #cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "theta_m = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical aperture =\",round(NA,4)\n",
+ "print \"Acceptance angle =\",round(theta_m,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture = 0.3775\n",
+ "Acceptance angle = 22.18 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17, Page number 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate cladding index, crtical internal reflection angle, external critical acceptance angle and numerical aperture'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5 #core refractive index\n",
+ "delta = 0.0005\n",
+ "\n",
+ "#Calculations\n",
+ "n2 = n1*(1-delta)\n",
+ "\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "\n",
+ "n0 = 1 #refractive index for air\n",
+ "theta_m = math.degrees(math.asin(((n1**2-n2**2)**0.5)/n0))\n",
+ "\n",
+ "NA = n1*math.sqrt(2*delta)\n",
+ "\n",
+ "#Results\n",
+ "print \"Cladding index =\",round(n2,5)\n",
+ "print \"Crtical internal reflection angle =\",round(theta_c,1),\"degrees\"\n",
+ "print \"External critical acceptance angle =\",round(theta_m,2),\"Degrees\"\n",
+ "print \"Numerical aperture =\",round(NA,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cladding index = 1.49925\n",
+ "Crtical internal reflection angle = 88.2 degrees\n",
+ "External critical acceptance angle = 2.72 Degrees\n",
+ "Numerical aperture = 0.0474\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.18, Page number 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine acceptance angle for fiber in water'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.20 #numerical aperture\n",
+ "n2 = 1.59 #cladding refractive index\n",
+ "n0 = 1.33 #refractive index for water \n",
+ "\n",
+ "#Calculations\n",
+ "n1 = math.sqrt(NA**2+n2**2)\n",
+ "NA = math.sqrt(n1**2-n2**2)/n0\n",
+ "theta_m = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Acceptance angle for fiber in water =\",round(theta_m,1),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptance angle for fiber in water = 8.6 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19, Page number 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the numerical aperture and acceptance angle'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.55 #core refractive index\n",
+ "n2 = 1.51 #cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "delta = (n1-n2)/n1\n",
+ "NA = 2*math.sqrt(delta)\n",
+ "\n",
+ "theta_m = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical aperture =\",round(NA,4)\n",
+ "print \"Acceptance angle =\",round(theta_m,2),\"degrees\"\n",
+ "print \"\\nCalculation mistakes in textbook. Hence, the answers differ.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture = 0.3213\n",
+ "Acceptance angle = 18.74 degrees\n",
+ "\n",
+ "Calculation mistakes in textbook. Hence, the answers differ.\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.20, Page number 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine normalized frequency'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1.45 #core refractive index\n",
+ "lamda = 0.1 #wavelength(um)\n",
+ "a = 60/2 #core radius(um)\n",
+ "NA = 0.16 #numerical aperture\n",
+ "\n",
+ "#Calculations\n",
+ "v = (2*math.pi*a*NA)/lamda\n",
+ "\n",
+ "#Results\n",
+ "print \"Normalized frequency =\",round(v,1),\"(Calculation mistake in textbook)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized frequency = 301.6 (Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.21, Page number 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate NA and multi path dospersion per unit length'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3.*10**8 #speed of light in vacuum(m/s)\n",
+ "v = 2.*10**8 #speed of light in core(m/s)\n",
+ "theta_c = 75 #cricial angle(degrees)\n",
+ "\n",
+ "#Calculations\n",
+ "n1 = c/v\n",
+ "n2 = n1*math.sin(math.radians(theta_c))\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "delta_n = n1-n2\n",
+ "md = (n1/n2)*(delta_n/c) #multipath dispersion\n",
+ "\n",
+ "#Results\n",
+ "print \"Numerical aperture =\",round(NA,2)\n",
+ "print \"Multi path dospersion per unit length =\",round((md/1E-9),3),\"*10^-9 s/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture = 0.39\n",
+ "Multi path dospersion per unit length = 0.176 *10^-9 s/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.22, Page number 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine maximum thickness of guide slab'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 3.6 #core refractive index\n",
+ "n2 = 3.56 #cladding refractive index\n",
+ "lamda = 0.85 #wavelength(um)\n",
+ "#For TE10 mode,\n",
+ "m = 1\n",
+ "n = 0\n",
+ "vc = 2.405 #for planar guide\n",
+ "\n",
+ "#Calculation\n",
+ "a = (vc*lamda)/(2*math.pi*math.sqrt(n1**2-n2**2))\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum thickness of guide slab =\",round(a,3),\"um\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum thickness of guide slab = 0.608 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.23, Page number 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate diameter of core'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5 #core refractive index\n",
+ "lamda = 1.3*10**-6 #wavelength(um)\n",
+ "delta = 1./100. #relative index difference\n",
+ "M = 1100\n",
+ "\n",
+ "#Calculations\n",
+ "V = math.sqrt(2*M)\n",
+ "\n",
+ "a = (V*lamda)/(2*math.pi*n1*(2*delta)**0.5)\n",
+ "\n",
+ "d = 2*a\n",
+ "\n",
+ "#Result\n",
+ "print \"Diameter =\",round(d/1E-5,2),\"um(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter = 9.15 um(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.24, Page number 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine critical angle and numerical aperture'''\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.50 #core refractive index\n",
+ "n2 = 1.46 #cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "theta_c = math.degrees(math.asin(n2/n1))\n",
+ "\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical angle =\",round(theta_c,2),\"degrees\"\n",
+ "print \"Numerical aperture =\",round(NA,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical angle = 76.74 degrees\n",
+ "Numerical aperture = 0.34\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.25, Page number 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the acceptance angle for skew rays'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.344 #numerical aperture\n",
+ "#Since skew rays change direction by 100 degrees at each reflection,\n",
+ "gamma = 100/2 #degrees\n",
+ "\n",
+ "#Calculations\n",
+ "#For meridional rays\n",
+ "theta_a = math.degrees(math.asin(NA))\n",
+ "#For speed rays\n",
+ "theta_as = math.degrees(math.asin(NA/math.cos(math.radians(gamma))))\n",
+ "\n",
+ "#print\n",
+ "print \"Acceptance angle for meridional rays =\",round(theta_a,2),\"degrees\"\n",
+ "print \"Acceptance angle for speed rays =\",round(theta_as,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptance angle for meridional rays = 20.12 degrees\n",
+ "Acceptance angle for speed rays = 32.36 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.26, Page number 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the no. of guided modes and cut-off value of normalized frequency'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5 #core refractive index\n",
+ "lamda = 1.55 #wavelength(um)\n",
+ "delta = 1.3/100. #relative index difference\n",
+ "alpha = 1.90 #index profile\n",
+ "a = 40/2 #core radius(um)\n",
+ "\n",
+ "#Calculations\n",
+ "Mg = (alpha/(alpha+2))*((n1*2*math.pi*a)/lamda)**2*delta\n",
+ "\n",
+ "Vc = 2.405*math.sqrt(1+2/alpha)\n",
+ "\n",
+ "#Results\n",
+ "print \"Number of guided modes =\",round(Mg)\n",
+ "print \"Cut-off value of normalized frequency =\",round(Vc,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of guided modes = 94.0\n",
+ "Cut-off value of normalized frequency = 3.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Communication_/Chapter_4.ipynb b/Optical_Communication_/Chapter_4.ipynb
new file mode 100755
index 00000000..875e1b2a
--- /dev/null
+++ b/Optical_Communication_/Chapter_4.ipynb
@@ -0,0 +1,1221 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d4d0afedfad591dd3db7bcb4692f0b80c70309a906e9699c9f80be4fd8fe4dbc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Signal Degradation in Optical Fibers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, Page number 100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the loss of fiber'''\n",
+ "\n",
+ "from sympy import *\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 400./1000. #distance(km)\n",
+ "Pi = Symbol(\"Pi\")\n",
+ "Po = 0.25*Pi\n",
+ "\n",
+ "#Calculations\n",
+ "Loss = (10*math.log10(Pi/Po))/L\n",
+ "\n",
+ "#Result\n",
+ "print \"Loss =\",round(Loss),\"dB/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss = 15.0 dB/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2, Page number 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate power level'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 3 #distance(km)\n",
+ "a = 0.5 #attenuation loss(dB/km)\n",
+ "lamda = 0.82 #wavelength(um)\n",
+ "Pi = 1 #input power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "Po = Pi*10**((-a*L)/10)\n",
+ "\n",
+ "#Result\n",
+ "print \"Power level =\",round(Po,2),\"mW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power level = 0.71 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3, Page number 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine maximum possible link length'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.5 #attenuation loss(dB/km)\n",
+ "Pi = 1.5*10**-3 #input power(uW)\n",
+ "Po = 2.*10**-6 #output power(uW)\n",
+ "\n",
+ "#Calculation\n",
+ "L = (10*math.log10(Pi/Po))/a\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum possible link length =\",round(L,2),\"km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum possible link length = 57.5 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, Page number 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine pulse dispersion per unit length'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "pd = 1.2*10**-3 #pulse broadening(ns)\n",
+ "d = 30 #distance\n",
+ "\n",
+ "#Calculation\n",
+ "D = pd/d\n",
+ "\n",
+ "#Result\n",
+ "print \"Pulse dispersion per unit length =\",D,\"ns/m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pulse dispersion per unit length = 4e-05 ns/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5, Page number 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine the optical output power'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 30 #distance(km)\n",
+ "a = 0.8 #attenuation loss(dB/km)\n",
+ "lamda = 1300 #wavelength(nm)\n",
+ "Pi = 200 #input power(uW)\n",
+ "\n",
+ "#Calculation\n",
+ "Po = Pi*10**((-a*L)/10)\n",
+ "\n",
+ "#Result\n",
+ "print \"Optical output power =\",round(Po,3),\"uW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Optical output power = 0.796 uW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6, Page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine\n",
+ "a)Overall signal attenuation\n",
+ "b)signal attenuation per km\n",
+ "c)signal attenuation for the link\n",
+ "d)input output power ratio'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 8 #distance(km)\n",
+ "Pi = 120*10**-6 #input power(W)\n",
+ "Po = 3*10**-6 #output power(W)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "a = 10*math.log10(Pi/Po)\n",
+ "\n",
+ "#Part b\n",
+ "adb = a/L\n",
+ "\n",
+ "#Part c\n",
+ "l = 10\n",
+ "x = adb*l #loss occured along 10km of fiber\n",
+ "y = 9 #loss due to splices(dB)\n",
+ "dB = x+y\n",
+ "\n",
+ "#Part d\n",
+ "pi_by_po = 10**(round(dB)/10)\n",
+ "\n",
+ "#Results\n",
+ "print \"a) Overall signal attenuation =\",round(a),\"dB\"\n",
+ "print \"b) Signal attenuation per km =\",round(adb),\"dB/km\"\n",
+ "print \"c) Signal attenuation for the link =\",round(dB),\"dB\"\n",
+ "print \"d) Input output power ratio =\",round(pi_by_po,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a) Overall signal attenuation = 16.0 dB\n",
+ "b) Signal attenuation per km = 2.0 dB/km\n",
+ "c) Signal attenuation for the link = 29.0 dB\n",
+ "d) Input output power ratio = 794.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7, Page number 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine theoretical attenuation for two given wavelengths'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tf = 1400 #fictive temperature(K)\n",
+ "p = 0.286 #photoelastic coeeficient for silica\n",
+ "n = 1.46 #refractive index\n",
+ "Bo = 7*10**-11 #isothermal compressibility\n",
+ "K = 1.381*10**-23 #Boltzman's constant(J/k)\n",
+ "L = 10**3\n",
+ "\n",
+ "#Calculation\n",
+ "#For lamda = 0.63 um\n",
+ "lamda1 = 0.63*10**-6 #wavelength(m)\n",
+ "Yr1 = (8*math.pi**3*n**8*p**2*Bo*K*Tf)/(3*lamda1**4)\n",
+ "E1 = math.exp(-Yr1*L)\n",
+ "a1 = 10.*math.log10(1/E1)\n",
+ "\n",
+ "#For lamda = 1.30 um\n",
+ "lamda2 = 1.30*10**-6 #wavelength(m)\n",
+ "Yr2 = (8*math.pi**3*n**8*p**2*Bo*K*Tf)/(3*lamda2**4)\n",
+ "E2 = math.exp(-Yr2*L)\n",
+ "a2 = 10.*math.log10(1/E2)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"(solutions of example 4.8 and 4.7 are interchanged in the textbook)\"\n",
+ "print \"Theoretical attenuation =\",round(a1,3),\"dB/km\"\n",
+ "print \"Theoretical attenuation =\",round(a2,3),\"dB/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(solutions of example 4.8 and 4.7 are interchanged in the textbook)\n",
+ "Theoretical attenuation = 5.21 dB/km\n",
+ "Theoretical attenuation = 0.287 dB/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8, Page number 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the refractive index of glass'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1*10**-6 #wavelength(m)\n",
+ "p = 0.245 #photoelastic coefficient\n",
+ "Bc = 8.4*10**-11 #isothermal compressebility(m^2/N)\n",
+ "Tf = 758 #fictive temperature(K)\n",
+ "K = 1.381*10**-23 #Boltzman's constant(J/k)\n",
+ "alpha = 0.46 #attenuation(Db/Km)\n",
+ "L = 1.*10**3 #distance(km)\n",
+ "\n",
+ "#Calculations\n",
+ "Yr = (8*math.pi**3*p**2*Bc*K*Tf)/(3*lamda**4)\n",
+ "n= (alpha/(4.34*Yr*10**3))**(1./8.)\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index =\",round(n,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index = 1.49\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9, Page nuber 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the operating wavelength of laser and attenuation of fiber'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pb = 150.*10**-3 #threshold optical power for brillouin(W)\n",
+ "Pr = 1.5 #threshold optical power for raman(W)\n",
+ "d = 8.0 #core diameter(um)\n",
+ "v = 1 #bandwidth(GHz)\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "Pb is given by,\n",
+ "Pb = 4.4*10**-3*d^2*lamda^2*alpha*v ----(1)\n",
+ "\n",
+ "Pr is given by,\n",
+ "Pr = 5.9*10**-2*d^2*lamda*alpha ----(2)\n",
+ "\n",
+ "Dividing (1) by (2), we get,\n",
+ "'''\n",
+ "\n",
+ "lamda = (Pb*5.9*10**-2*d**2)/(Pr*4.4*10**-3*d**2)\n",
+ "\n",
+ "alpha = Pr/(5.9*10**-2*d**2*lamda)\n",
+ "\n",
+ "#Results\n",
+ "print \"Operating wavelength =\",round(lamda,2),\"um\"\n",
+ "print \"Attenuation =\",round(alpha,3),\"dB/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating wavelength = 1.34 um\n",
+ "Attenuation = 0.296 dB/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10, Page number 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimating the threshold optical powers for Brillowin and raman scattering'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 6 #core diameter(um)\n",
+ "v = 0.8 #bandwidth(GHz) \n",
+ "lamda = 1.5 #wavelength(um)\n",
+ "alpha = 0.5 #attenuation(dB/Km)\n",
+ "\n",
+ "#Calculations\n",
+ "Pb = 4.4*10**-3*d**2*lamda**2*alpha*v\n",
+ "\n",
+ "Pr = 5.9*10**-3*d**2*lamda*alpha\n",
+ "\n",
+ "#Results\n",
+ "print \"Threshold optical power for SBS =\",round((Pb/1E-3),2),\"mW\"\n",
+ "print \"Threshold optical power for SRS =\",round((Pr/1E-1),2),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Threshold optical power for SBS = 142.56 mW\n",
+ "Threshold optical power for SRS = 1.59 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11, Page number 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determing the critical radius of curvature'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta = 3./100 #relative refracive index difference\n",
+ "n1 = 1.5 #refractive index of core\n",
+ "lamda = 0.82*10**-6 #operating wavelength(m)\n",
+ "\n",
+ "#Calculations\n",
+ "n2 = math.sqrt(n1**2-2*delta*n1**2)\n",
+ "\n",
+ "Rc = (3*n1**2*lamda)/(4*math.pi*(n1**2-n2**2)**0.5)\n",
+ "\n",
+ "#Results\n",
+ "print \"The critical radius of curvature is\",round((Rc/1E-6),3),\"um(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The critical radius of curvature is 1.199 um(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12, Page number 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the crtitical radius of curvature'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta = 3./100 #relative refracive index difference\n",
+ "n1 = 2.0 #refractive index of core\n",
+ "lamda = 1.55*10**-6 #operating wavelength(m)\n",
+ "d = 8 #core diameter(um)\n",
+ "\n",
+ "#Calculations\n",
+ "a = d/2\n",
+ "n2 = math.sqrt(n1**2-2*delta*n1**2)\n",
+ "lamda_c = (2*math.pi*a*10**-6*n1*((2*delta)**0.5))/2.405\n",
+ "Rc = (20*lamda*(2.748-0.996*(lamda/lamda_c))**-3)/((n1**2-n2**2)**0.5)\n",
+ "\n",
+ "#Result\n",
+ "print \"The critical radius of curvature is\",round((Rc/1E-6),3),\"um\"\n",
+ "\n",
+ "#note There is a calculation mistake in calculating 'n' in the textbook. Hence, the difference in results\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The critical radius of curvature is 4.322 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.13, Page number 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determine-\n",
+ "a)Maximum possible bandwidth\n",
+ "b)pulse dispersion per unit length\n",
+ "c)bandwidth length product'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "t = 0.1*10**-6 #pulse broadening(sec)\n",
+ "L = 10 #distance(km)\n",
+ "\n",
+ "#Calculatons\n",
+ "#Part a\n",
+ "Bt = 1/(2*t)\n",
+ "\n",
+ "#Part b\n",
+ "D = t/L\n",
+ "\n",
+ "#Part c\n",
+ "Bl = Bt*L\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Maximum possible bandwidth =\",Bt/1E+6,\"MHz\"\n",
+ "print \"b)Pulse dispersion per unit length =\",D/1E-6,\"us/km\"\n",
+ "print \"c)Bandwidth length product =\",Bl/1E+6,\"Mhz km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Maximum possible bandwidth = 5.0 MHz\n",
+ "b)Pulse dispersion per unit length = 0.01 us/km\n",
+ "c)Bandwidth length product = 50.0 Mhz km\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.14, Page number 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimating the wavelength of transmitted light'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rc = 84*10**-6 #radius of curvature(m)\n",
+ "n1 = 1.46 #core refractive index\n",
+ "n2 = 1.45 #cladding refractive index\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = (Rc*4*math.pi*(n1**2-n2**2)**0.5)/(3*n1**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round(lamda/1e-6,2),\"um(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 28.16 um(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.15, Page number 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the pulse broadening due to dispersion'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1.5 #wavelength(um)\n",
+ "M = 20 #dispersion parameter(ps n/m-km)\n",
+ "L = 30 #length of fiber(km)\n",
+ "s_l = 2 #spectral width(nm)\n",
+ "\n",
+ "#Calculations\n",
+ "s_m = s_l*L*M\n",
+ "\n",
+ "#Result\n",
+ "print \"Pulse broadening =\",s_m,\"ps\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pulse broadening = 1200 ps\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16, Page number 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating material dispersion parameter and rms pulse broadening'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 850 #wavelength(nm)\n",
+ "s_l = 20 #spectral width(nm)\n",
+ "Dh = 0.025 #material dispersion\n",
+ "c = 2.998*10**5 #speed of light(km/s)\n",
+ "L = 1 #length of fiber(km)\n",
+ "\n",
+ "#Calculations\n",
+ "M = Dh/(c*lamda)\n",
+ "\n",
+ "s_m = s_l*L*M\n",
+ "\n",
+ "#Results\n",
+ "print \"Material dispersion parameter =\",round((M/1E-12),2),\"ps n/m km^-1\"\n",
+ "print \"RMS pulse broadening =\",round((s_m/1E-9),2),\"ns/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Material dispersion parameter = 98.1 ps n/m km^-1\n",
+ "RMS pulse broadening = 1.96 ns/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17, Pge number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determing the pulse boradening per km'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.9 #wavelength(um)\n",
+ "s_l = 45 #spectral width(um)\n",
+ "Dh = 4*10**-2 #material dispersion\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "L = 1 #length of fiber(km)\n",
+ "\n",
+ "#Calculations\n",
+ "s_m = (s_l*L*Dh*lamda)/c\n",
+ "\n",
+ "#Result\n",
+ "print \"Pulse boradening =\",s_m/1E-9,\"ns/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pulse boradening = 5.4 ns/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.18, Page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Determing the pulse boradening per km'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.85 #wavelength(nm)\n",
+ "M = 95 #material dispersion parameter(ps n/m km^-1)\n",
+ "\n",
+ "#Calculations\n",
+ "s_l = 0.0012*lamda\n",
+ "s_m = s_l*L*M\n",
+ "\n",
+ "#Result\n",
+ "print \"Pulse boradening =\",s_m,\"ns/km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pulse boradening = 0.0969 ns/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19, Page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the pulse broadening'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.275 #numerical aperture\n",
+ "n1 = 1.48 #core refractive index\n",
+ "L = 5 #length of fiber(km)\n",
+ "c = 3.*10**5 #speed of light(km/sec)\n",
+ "\n",
+ "#Calculations\n",
+ "STs = (L*NA**2)/(2*n1*c)\n",
+ "\n",
+ "#Result\n",
+ "print \"Pulse broadening =\",round((STs/1E-9),2),\"ns(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pulse broadening = 425.82 ns(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.20, Page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate -\n",
+ "a)delay difference between modes\n",
+ "b)rms pulse broadening\n",
+ "c)maximum bit rate\n",
+ "d)bandwidth length product'''\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 3*10**3 #length of link(m)\n",
+ "n1 = 1.5 #refractive index of core\n",
+ "D = 2./100 #refractive index difference\n",
+ "c = 2.998*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Sts = (L*n1*D)/c\n",
+ "\n",
+ "#Part b\n",
+ "s_s = (L*n1*D)/(2*sqrt(3)*c)\n",
+ "\n",
+ "#Part c\n",
+ "Bt = 1/(2*Sts)\n",
+ "\n",
+ "#Part d\n",
+ "Bl = Bt*L\n",
+ " \n",
+ "#Results\n",
+ "print \"Delay difference is\",round(Sts/1E-9),\"ns\"\n",
+ "print \"rms pulse broadening due to intermodal dispersion is\",round((s_s/1E-9),1),\"ns\"\n",
+ "print \"Maximum bit rate is\",round((Bt/1E+6),1),\"Mbits/sec\"\n",
+ "print \"Bandwidth length product is\",round((Bl/1E+9),1),\"MHz km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Delay difference is 300.0 ns\n",
+ "rms pulse broadening due to intermodal dispersion is 86.7 ns\n",
+ "Maximum bit rate is 1.7 Mbits/sec\n",
+ "Bandwidth length product is 5.0 MHz km\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.21, Page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the rms pulse broadening per km for multimode step index fiber and graded index fiber'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "s_s = 86.7 #pulse broadening(ns)\n",
+ "L = 6 #length of link(km)\n",
+ "n1 = 1.5 #core refractive index\n",
+ "delta = 1./100 #refractive index difference\n",
+ "c = 2.998*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "s_m = s_s/L\n",
+ "\n",
+ "L1 = 10**3\n",
+ "s_g = (L1*n1*delta**2)/(20*sqrt(3)*c)\n",
+ "\n",
+ "#Result\n",
+ "print \"The rms pulse broadening per km for multimode step index fiber is\",s_m,\"ns/km\"\n",
+ "print \"The rms pulse broadening per km for graded index fiber is\",round((s_g/1E-12),2),\"ps/km\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms pulse broadening per km for multimode step index fiber is 14.45 ns/km\n",
+ "The rms pulse broadening per km for graded index fiber is 14.44 ps/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.22, Page number 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimating the total pulse broadening per km '''\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.4 #numerical aperture\n",
+ "n1 = 1.48 #core refractive index\n",
+ "n2 = 1.47 #cladding refractive index\n",
+ "M = 30 #material dispersion parameter(ps n/m /km)\n",
+ "s_l = 25 #spectral width(ns)\n",
+ "L = 1 #length of fiber(km)\n",
+ "delta = 1./100 #refractive index difference\n",
+ "\n",
+ "#Calculations\n",
+ "s_m = M*L*s_l\n",
+ "s_s = (L1*n1*delta**2)/(20*sqrt(3)*c)\n",
+ "s_t = math.sqrt(s_m**2+s_s**2)\n",
+ "\n",
+ "#Results\n",
+ "print \"Total pulse broadening per km is\",s_t,\"ps\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total pulse broadening per km is 750.0 ps\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23, Page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate-\n",
+ "a)total pulse broadening per km\n",
+ "b)bandwidth length product'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.3 #numerical aperture\n",
+ "n1 = 1.45 #core refractive index\n",
+ "M = 250 #material dispersion parameter(ps n/m /km)\n",
+ "s_l = 50 #spectral width(ns)\n",
+ "L = 1 #length of fiber(km)\n",
+ "c = 2.998*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "s_m = (M*L*s_l)*10**-3 #ns/km\n",
+ "s_s = ((L*10**3*NA**2)/(4*math.sqrt(3)*n1*c*10**3))*10**12 #ns/km\n",
+ "s_t = math.sqrt(s_m**2+s_s**2)\n",
+ "\n",
+ "#Part b\n",
+ "Bl = 0.2/s_t\n",
+ "\n",
+ "#Results\n",
+ "print \"a)total pulse broadening =\",round(s_t,2),\"ns/km\" #Answer varies due to rounding-off errors\n",
+ "print \"b)bandwidth length product =\",round((Bl/1E-3),1),\"Mhz km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)total pulse broadening = 32.39 ns/km\n",
+ "b)bandwidth length product = 6.2 Mhz km\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.24, Page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Finding the beat length'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1.32 #wavelength(um)\n",
+ "Lbc = 100 #length of fiber(km)\n",
+ "Sf = 1.5 #spectral width(nm)\n",
+ "\n",
+ "#Calculations\n",
+ "Bf = lamda**2/(Lbc*Sf)\n",
+ "Lb = lamda/Bf\n",
+ "\n",
+ "#Result\n",
+ "print \"Beat length =\",round(Lb,1),\"km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Beat length = 113.6 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.25, Page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate modal birefringence'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1.3*10**-6 #wavelength(um)\n",
+ "Lb1 = 0.5*10**-3 #length of fiber(mm)\n",
+ "Lb2 = 60 #(m)\n",
+ "\n",
+ "#Calculations\n",
+ "#for beat length of 0.5mm,\n",
+ "Bf1 = lamda/Lb1\n",
+ "\n",
+ "#for beat length of 60m,\n",
+ "Bf2 = lamda/Lb2\n",
+ "\n",
+ "#Result\n",
+ "print \"The modal birefringences are \",Bf1/1E-3, \"*10^-3 and\",round((Bf2/1E-8),2),\"*10^-4\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The modal birefringences are 2.6 *10^-3 and 2.17 *10^-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.26, Page number 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the modal birefringence, coherence length and difference between propagation constants'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.5*10**-6 #wavelength(um)\n",
+ "Lb = 5*10**-2 #length of fiber(km)\n",
+ "S_l = 1*10**-9 #spectral width(nm)\n",
+ "\n",
+ "#Calculations\n",
+ "Bf = lamda/Lb\n",
+ "\n",
+ "Lbc = lamda**2/(Bf*S_l)\n",
+ "\n",
+ "B = (2*math.pi)/Lb #Bx-By\n",
+ "\n",
+ "#Results\n",
+ "print \"Modal birefringence =\",Bf\n",
+ "print \"Coherence length =\",Lbc,\"m\"\n",
+ "print \"Difference between propagation constants =\",round(B,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modal birefringence = 1e-05\n",
+ "Coherence length = 25.0 m\n",
+ "Difference between propagation constants = 125.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.27, Page number 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculating the maximum bit rate'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 10*10**3 #length of fiber(m)\n",
+ "St2 = 600*10**-12 #mode dispersion(s/km)\n",
+ "\n",
+ "#Calculations\n",
+ "Bt = 0.9/(0.55*St2*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum bit rate =\",round(Bt/1E+3),\"Kbps\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum bit rate = 273.0 Kbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Communication_/Chapter_5.ipynb b/Optical_Communication_/Chapter_5.ipynb
new file mode 100755
index 00000000..6b192b74
--- /dev/null
+++ b/Optical_Communication_/Chapter_5.ipynb
@@ -0,0 +1,1335 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:adfcaa081bb7f14f2178d52935bce7ffac6e527935ac706afefb7bf81046d312"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Optical Sources:Light emitting diode and Lasers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, Page number 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find-\n",
+ "a)bulk recombination life time\n",
+ "b)internal quantum efficiency\n",
+ "c)internal power level'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1310*10**-9 #operating wavelength(m)\n",
+ "Tr = 30. #radiative recombination times(ns)\n",
+ "Tnr = 100. #non-radiative recombination times(ns)\n",
+ "i = 40*10**-3 #injected current(A)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "T = 1/(1/Tr+1/Tnr)\n",
+ "\n",
+ "#Part b\n",
+ "Nint = T/Tr\n",
+ "\n",
+ "#Part c\n",
+ "Pint = (Nint*h*c*i)/(e*lamda)\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Bulk recombination life time =\",round(T,2),\"ns\"\n",
+ "print \"b)Internal quantum efficiency =\",round(Nint,3)\n",
+ "print \"c)Internal power level =\",round((Pint/1E-3),2),\"mW(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Bulk recombination life time = 23.08 ns\n",
+ "b)Internal quantum efficiency = 0.769\n",
+ "c)Internal power level = 29.15 mW(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, Page number 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the power radiated by an LED'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 670*10**-9 #operating wavelength(m)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "i = 50*10**-3 #injected current(mA)\n",
+ "Nint = 3./100 #quantum efficiency\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "P = (Nint*h*c*i)/(lamda*e)\n",
+ "\n",
+ "#Result\n",
+ "print \"Power radiated =\",round((P/1E-3),4),\"mW(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power radiated = 2.7789 mW(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3, Page number 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the non-radiative recombination time'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 890.*10**-9 #operating wavelength(m)\n",
+ "Tr = 100. #radiative recombination times(ns)\n",
+ "T = 130. #bulk-radiative recombination times(ns)\n",
+ "i = 14.*10**-3 #injected current(mA)\n",
+ "\n",
+ "#Calculation\n",
+ "Tnr = 1/(1/Tr-1/T)\n",
+ "\n",
+ "#Result\n",
+ "print \"The non-radiative recombination time is\",round(Tnr,1),\"ns\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The non-radiative recombination time is 433.3 ns\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page number 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the power internally generated within the device'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.87*10**-6 #operating wavelength(m)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "i = 40*10**-3 #injected current(mA)\n",
+ "Nint = 0.625 #quantum efficiency\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "P = (Nint*h*c*i)/(lamda*e)\n",
+ "\n",
+ "#Result\n",
+ "print \"Power radiated =\",round((P/1E-3),2),\"mW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power radiated = 35.67 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5, Page number 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimate the optical power emitted into air'''\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "F = 0.68 #transmission factor\n",
+ "nx = 3.6 #refractive index of GaAs\n",
+ "n = 1 #refractive index of air\n",
+ "\n",
+ "#Calculations\n",
+ "Pint = Symbol('Pint')\n",
+ "Pe = round(((F*n**2)/(4*F*nx**2)),4)*Pint\n",
+ "\n",
+ "#Result\n",
+ "print \"Optical power emitted =\",Pe"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Optical power emitted = 0.0193*Pint\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6, Page number 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find -\n",
+ "a)coupling efficiency\n",
+ "b)optical loss relative to power emitted from LED'''\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.2 #numerical paerture\n",
+ "n = 1.4 #refractive index of core\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Nc = NA**2\n",
+ "\n",
+ "#Part b\n",
+ "Loss = -math.log10(Nc)\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Coupling efficiency =\",Nc\n",
+ "print \"b)Optical loss =\",round(Loss,2),\"dB(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Coupling efficiency = 0.04\n",
+ "b)Optical loss = 1.4 dB(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7, Page number 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the optical power coupled into the fiber'''\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 0.01 #Fresnel reflection coefficient\n",
+ "NA = 0.15 #numerical aperture\n",
+ "Rd = 30 #radiance(s/r-cm^2)\n",
+ "i = 40 #drive current(mA)\n",
+ "R = 50./2*10**-4 #radius(cm)\n",
+ "\n",
+ "#Calculations\n",
+ "A = math.pi*R**2 #area\n",
+ "Pc = math.pi*(1-r)*A*Rd*NA**2\n",
+ "\n",
+ "#Result\n",
+ "print \"Optical power coupled into the fiber =\",round((Pc/1E-6),1),\"uW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Optical power coupled into the fiber = 41.2 uW\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8, Page number 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the overall power conversion efficiency'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pc = 150*10**-6 #optical power(W)\n",
+ "If = 25*10**-3 #forward current(A)\n",
+ "Vf = 2.5 #forward voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "P = If*Vf\n",
+ "Npc = (Pc/P)*100\n",
+ "\n",
+ "#Result\n",
+ "print \"The overall power conversion efficiency is\",round(Npc,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall power conversion efficiency is 0.24 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9, Page number 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the output power when device is modulated'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pdc = 300*10**-6 #optical o/p power(W)\n",
+ "f = 20*10**6 #frequency(Hz)\n",
+ "Ti = 5*10**-9 #recombination life time(sec)\n",
+ "\n",
+ "#Calculation\n",
+ "w = 2*math.pi*f\n",
+ "Pe = Pdc*(1+((w*Ti)**2))**-0.5\n",
+ "\n",
+ "#Result\n",
+ "print \"Output power of the device =\",round((Pe/1E-6),2),\"uW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output power of the device = 254.02 uW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10, Page number 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find-\n",
+ "a)internal quantum efficiency and internal power level\n",
+ "b)power emiited from device'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1310*10**-9 #operating wavelength(m)\n",
+ "Tr = 25. #radiative recombination times(ns)\n",
+ "Tnr = 90. #non-radiative recombination times(ns)\n",
+ "i = 35*10**-3 #injected current(A)\n",
+ "n = 3.5 #refractive index\n",
+ "h = 6.625*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "q = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "T = 1/(1/Tr+1/Tnr)\n",
+ "Nint = T/Tr\n",
+ "Pint = (Nint*h*c*i)/(q*lamda)\n",
+ "\n",
+ "#Part b\n",
+ "P = Pint/(n*(n+1)**2)\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Internal quantum efficiency =\",round(Nint,3)\n",
+ "print \" Internal power level =\",round((Pint/1E-3),2),\"mW(Calculation mistake in textbook)\"\n",
+ "print \"b)Power emitted from device =\",round((P/1E-3),3),\"mW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Internal quantum efficiency = 0.783\n",
+ " Internal power level = 25.97 mW(Calculation mistake in textbook)\n",
+ "b)Power emitted from device = 0.366 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11, Page number 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the transmission factor'''\n",
+ "\n",
+ "#Varible declaration\n",
+ "I = 37 #drive current(mA)\n",
+ "V = 1.6 #potential difference(V)\n",
+ "Nep = 0.75 #power efficiency(%)\n",
+ "Pint = 30 #optical power(mW)\n",
+ "nx = 3.46 #refractive index of InP\n",
+ "n = 1 #refractive index of air\n",
+ "\n",
+ "#Calculations\n",
+ "P = I*V\n",
+ "Pe = (P*Nep)/100\n",
+ "F = (Pe*4*nx**2)/(Pint*n**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Transmission factor =\",round(F,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Transmission factor = 0.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12, Page number 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the external power efficiency'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.85*10**-6 #operating wavelength(m)\n",
+ "Nint = 60./100 #internal quantum efficiency\n",
+ "i = 20*100**-3 #forward current(A/s)\n",
+ "v = 1 #potential difference(V)\n",
+ "F = 0.68 #transmission factor\n",
+ "nx = 3.6 #refractive index of GaAs\n",
+ "n = 1 #refractive index of air\n",
+ "h = 6.625*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "Pint = (Nint*h*c*i)/(e*lamda)\n",
+ "Pe = (Pint*F*v)/(4*nx**2)\n",
+ "Nep = (Pe/(i*v))*100\n",
+ "\n",
+ "#Result\n",
+ "print \"External power efficiency =\",round(Nep,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "External power efficiency = 1.15 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13, Page number 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the ratio of stimulated emission rate to spontaneous emission rate'''\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.5*10**-6 #operating wavelength(m)\n",
+ "T = 1000 #temperature(K)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.625*10**-34 #Planck's constant\n",
+ "k = 1.38*10**-23 #Boltman's constant\n",
+ "\n",
+ "#Calculations\n",
+ "f = c/lamda\n",
+ "r = 1/(math.exp((h*f)/(k*T))-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"Ratio = \",round((r/1E-13),2),\"*10^-13\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio = 3.09 *10^-13\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14, Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the optical spacing between mirrors'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.5*10**-6 #operating wavelength(m)\n",
+ "n = 1.38 #refractive index of laser\n",
+ "T = 1000 #temperature(K)\n",
+ "q = 1.3*10**4 #longitudnal modes\n",
+ "\n",
+ "#Calculation\n",
+ "L = (lamda*q)/(2*n)\n",
+ "\n",
+ "#Result\n",
+ "print \"The optical spacing between mirrors is\",round((L/1E-3),1),\"*10^-3 m(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The optical spacing between mirrors is 2.4 *10^-3 m(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15, Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the number of longitudnal modes and their frequency seperation'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.55*10**-6 #operating wavelength(m)\n",
+ "n = 1.78 #refractive index of laser\n",
+ "L = 4*10**-2 #crystal length(m)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "q = (2*n*L)/lamda\n",
+ "\n",
+ "Sf = c/(2*n*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"The number of longitudnal modes are\",round((q/1E+5),1),\"*10^5\"\n",
+ "print \"The frequency seperations is\",round((Sf/1E+9),1),\"GHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of longitudnal modes are 2.6 *10^5\n",
+ "The frequency seperations is 2.1 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16, Page number 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the optical gain'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1 = 0.32\n",
+ "R2 = R1\n",
+ "alpha = 10*10**-2 #cm\n",
+ "L = 500*10**-6 #m\n",
+ "\n",
+ "#Calculation\n",
+ "gth = alpha+((math.log(1/(R1*R2)))/(2*L))\n",
+ "\n",
+ "#Result\n",
+ "print \"Optical gain =\",round((gth/1E+2),1),\"cm^-1(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Optical gain = 22.8 cm^-1(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.17, Page number 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find frequency and wavelength spacing'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 850*10**-9 #operating wavelength(m)\n",
+ "n = 3.7 #refractive index of laser\n",
+ "L = 500*10**-6 #length(m)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "Sf = c/(2*n*L)\n",
+ "\n",
+ "Sl = lamda**2/(2*L*n)\n",
+ "\n",
+ "#Results\n",
+ "print \"Frequency =\",round(Sf/1E+9),\"GHz\"\n",
+ "print \"Wavelength spacing =\",round((Sl/1E-9),3),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 81.0 GHz\n",
+ "Wavelength spacing = 0.195 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.18, Page number 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the radiative minority carrier lifetimes in GaAs nd Si'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "Br1 = 7.21*10**-10 #for GaAs\n",
+ "Br2 = 1.79*10**-15 #for Si\n",
+ "N = 10**18 #hole concentration(/cm^3)\n",
+ "\n",
+ "#Calculations\n",
+ "#For GaAs\n",
+ "Tr = (Br1*N)**-1\n",
+ "\n",
+ "#For Si\n",
+ "Tt = (Br2*N)**-1\n",
+ "\n",
+ "#Results\n",
+ "print \"The radiative minority carrier lifetimes in GaAs is\",round((Tr/1E-9),1),\"ns\"\n",
+ "print \"The radiative minority carrier lifetimes in Si is\",round((Tt/1E-9),1),\"ns\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The radiative minority carrier lifetimes in GaAs is 1.4 ns\n",
+ "The radiative minority carrier lifetimes in Si is 558659.2 ns\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.19, Page number 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the threshold density'''\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Varaible declaration\n",
+ "B = 21*10**-3 #gain factor(A/cm^3)\n",
+ "alpha = 10 #loss coefficent(/cm)\n",
+ "L = 250*10**-6 #optical cavity length(m)\n",
+ "r = 0.32 #reflectivity\n",
+ "\n",
+ "#Calculation\n",
+ "Jth = (alpha+(1/L)*math.log(1/r))/B\n",
+ "\n",
+ "#Result\n",
+ "print \"Threshold density =\",round((Jth/1E+3),2),\"*10^3 A/cm^2(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Threshold density = 217.51 *10^3 A/cm^2(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.20, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the external power efficiency of the device'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "Nt = 18./100 #total efficiency\n",
+ "Eg = 1.43 #bandgap energy(eV)\n",
+ "V = 2.5 #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "Next = ((Nt*Eg)/V)*100\n",
+ "\n",
+ "#Result\n",
+ "print \"External power efficiiency =\",round(Next),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "External power efficiiency = 10.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.21, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimate the ratio of threshold current densities'''\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "T1 = 293. #tempearute(K)\n",
+ "T2 = 353. #K\n",
+ "To = 160. #K\n",
+ "\n",
+ "#Calculations\n",
+ "#At 20C\n",
+ "Jth1 = math.exp(T1/To)\n",
+ "\n",
+ "#At 80C\n",
+ "Jth2 = math.exp(T2/To)\n",
+ "\n",
+ "Jth = Jth2/Jth1\n",
+ "\n",
+ "#Result\n",
+ "print \"Ratio of current densities =\",round(Jth,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of current densities = 1.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.22, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the optical emission wavelength'''\n",
+ "\n",
+ "#Varaible declaraion\n",
+ "Eg = 1.43 #bandgap energy(eV)\n",
+ "h = 6.625*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "e = 1.602*10**-19 #charge of an electron\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = (h*c)/(Eg*e)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round(lamda/1e-6,3),\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 0.868 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.23, Page number 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the threshold coefficient gain'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 0.5 #cavity length(mm)\n",
+ "alpha = 1.5 #loss coefficent\n",
+ "R1 = 0.35 #refractivities\n",
+ "R2=R1\n",
+ "T = 0.8 #confinement factor\n",
+ "\n",
+ "#Calculation\n",
+ "gth = alpha+((math.log(1/(R1*R2)))/(2*L))\n",
+ "t = gth/T\n",
+ "\n",
+ "#Result\n",
+ "print \"Threshold coeeficient =\",round(t,2),\"mm^-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Threshold coeeficient = 4.5 mm^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.24, Page number 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the cavity length and no. of longitudnal modes'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.87*10**-6 #operating wavelength(m)\n",
+ "n = 3.6 #refractive index of laser\n",
+ "Sf = 278.*10**9 #frequency(Hz)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "L = c/(2*n*Sf)\n",
+ "\n",
+ "x = (2*n*L)/lamda\n",
+ "\n",
+ "#Results\n",
+ "print \"Cavity length =\",round((L/1E-2),4),\"cm\"\n",
+ "print \"No. of longitudnal modes =\",round((x/1E+3),2),\"*10^3\"\n",
+ "\n",
+ "#Answers are calculated incorrectly in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cavity length = 0.015 cm\n",
+ "No. of longitudnal modes = 1.24 *10^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.25, Page number 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the internal quantum efficiency'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 3.6 #refractive index of laser\n",
+ "L = 500*10**-6 #cavity length(mm)\n",
+ "alpha = 20 #loss coefficent(/cm)\n",
+ "Nd = 45./100 #differential quantum efficiency\n",
+ "\n",
+ "#Calculations\n",
+ "r1 = ((n-1)/(n+1))**2\n",
+ "r2=r1\n",
+ "Ni = Nd*(1+((2*alpha*L)/(math.log(1/(r1*r2)))))\n",
+ "\n",
+ "#Result\n",
+ "print \"Internal quantum efficiency =\",round((Ni*100),2),\"%(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal quantum efficiency = 45.39 %(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.26, Page number 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimate the no. of longitudnal modes and frequency seperation'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.5*10**-6 #operating wavelength(m)\n",
+ "n = 1.5 #refractive index of laser\n",
+ "L = 7*10**-2 #crystal length(m)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "q = (2*n*L)/lamda\n",
+ "\n",
+ "Sf = c/(2*n*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"The number of longitudnal modes are\",round((q/1E+5),1),\"*10^5\"\n",
+ "print \"The frequency seperations is\",round((Sf/1E+9),2),\"GHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of longitudnal modes are 4.2 *10^5\n",
+ "The frequency seperations is 1.43 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.27, Page number 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''find the length of optical cavity and no. of longitudnal modes'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 0.87*10**-6 #operating wavelength(m)\n",
+ "n = 3.6 #refractive index of laser\n",
+ "Sf = 278.*10**9 #frequency(Hz)\n",
+ "c = 2.99*10**8 #speed of light(m/s)\n",
+ "\n",
+ "#Calculations\n",
+ "L = c/(2*n*Sf)\n",
+ "\n",
+ "x = (2*n*L)/lamda\n",
+ "\n",
+ "#Results\n",
+ "print \"Cavity length =\",round((L/1E-6),1),\"um\"\n",
+ "print \"No. of longitudnal modes =\",round((x),2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cavity length = 149.4 um\n",
+ "No. of longitudnal modes = 1236.25\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.28, Page number 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find hole concentration'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tr = 1*10**-9 #minority carrier lifetime(sec)\n",
+ "Br = 2.39*10**-10\n",
+ "\n",
+ "#Calculation\n",
+ "P = 1/(Tr*Br)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hole concentration =\",round((P/1E+18),2),\"*10^18 cm^-3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hole concentration = 4.18 *10^18 cm^-3\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.29, Page number 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the gain factor'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 50*10**-6 #cavity length(m)\n",
+ "w = 15 #width(/cm)\n",
+ "Ith = 50*10**-3 #threshold current(A)\n",
+ "r1 = 0.3 #reflectivity\n",
+ "r2=r1\n",
+ "alpha = 10 #loss coefficient(/cm)\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Jth = Ith/(L*w)\n",
+ "B = (1/Jth)*(alpha+((1/(2*L))*math.log(1/(r1*r2))))\n",
+ "\n",
+ "#Result\n",
+ "print \"Gain factor =\",round((B/1E+2),2),\"*10^2 cm/A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gain factor = 3.61 *10^2 cm/A\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.30, Page number 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the internal quantum efficiency'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 3.6 #refractive index of laser\n",
+ "L = 500*10**-6 #cavity length(mm)\n",
+ "alpha = 20 #loss coefficent(/cm)\n",
+ "N = 22.5/100 #external quantum efficiency\n",
+ "\n",
+ "#Calculations\n",
+ "r1 = ((n-1)/(n+1))**2\n",
+ "r2=r1\n",
+ "Ni = N/(1/((1+((2*alpha*L)/(math.log(1/(r1*r2)))))))\n",
+ "ni=N*(1+((2*alpha*L*10**-4)/(math.log(1/(r1*r2)))))\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Internal quantum efficiency =\",round((Ni*100),2),\"%(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal quantum efficiency = 22.7 %(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\"\"\"\n",
+ "Example 5.31 is same as example 5.14\n",
+ "Example 5.32 is same as example 5.16\n",
+ "Example 5.33 is same as example 5.18\n",
+ "Example 5.34 is same as example 5.19\n",
+ "Example 5.35 is same as example 5.21\n",
+ "\"\"\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "'\\nExample 5.31 is same as example 5.14\\nExample 5.32 is same as example 5.16\\nExample 5.33 is same as example 5.18\\nExample 5.34 is same as example 5.19\\nExample 5.35 is same as example 5.21\\n'"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Communication_/Chapter_6.ipynb b/Optical_Communication_/Chapter_6.ipynb
new file mode 100755
index 00000000..dd5d0e2a
--- /dev/null
+++ b/Optical_Communication_/Chapter_6.ipynb
@@ -0,0 +1,888 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a50462da831719a6431c94babed9d22bf70a3961b6e3e7b72f3c1cbaed2eb5dc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Optical detectors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1, Page number 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the quantum efficiency'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "re = 4.2*10**6 #EHP's\n",
+ "rp = 6*10**6 #no. of photons\n",
+ "lamda = 1200 #wavelength(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "N = re/rp\n",
+ "\n",
+ "#Result\n",
+ "print \"Quantum efficiency =\",N*100,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantum efficiency = 70.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2, Page number 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find photocurrent'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "R = 0.85 #responsivity(A/W)\n",
+ "Po = 1 #incident power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "Ip = R*Po\n",
+ "\n",
+ "#Result\n",
+ "print \"Photocurrent =\",Ip,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Photocurrent = 0.85 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3, Page number 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find responsivity of photo diode'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "E = 0.75*1.6*10**-19 #energy gap(V)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "N = 60./100 #quantum efficiency\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = (h*c)/E\n",
+ "R = (N*lamda)/1248\n",
+ "\n",
+ "#Result\n",
+ "print \"Responsivity =\",round((R/1E-9),1),\"A/W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Responsivity = 0.8 A/W\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4, Page number 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find responsivity and quantum efficiency'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "re = 1.5*10**12 #EHP's\n",
+ "rp = 3*10**12 #no. of photons\n",
+ "lamda = 0.65*10**-6 #wavelength(m)\n",
+ "h = 6.62*10**-34 #Palnck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculation\n",
+ "N = re/rp\n",
+ "\n",
+ "R = (N*e*lamda)/(h*c)\n",
+ "\n",
+ "#Result\n",
+ "print \"Quantum efficiency =\",N*100,\"%\"\n",
+ "print \"Responsivity =\",round(R,3),\"A/W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantum efficiency = 50.0 %\n",
+ "Responsivity = 0.262 A/W\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5, Page number 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimate -\n",
+ "a)operating walength\n",
+ "b)incident optical power'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "E = 1.5*10**-19 #photon energy(J)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "N = 65./100 #quantum efficiency\n",
+ "Ip = 1.5*10**-6 #photocurrent(A)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "lamda = (h*c)/E\n",
+ "\n",
+ "#Part b\n",
+ "f = c/lamda\n",
+ "R = (N*e)/(h*f)\n",
+ "Po = Ip/R\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Operating waelength =\",lamda/1E-6,\"um\"\n",
+ "print \"b)Optical power =\",round((Po/1E-6),2),\"uW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Operating waelength = 1.324 um\n",
+ "b)Optical power = 2.16 uW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6, Page number 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find wavelength'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "Eg = 1.43*1.6*10**-19 #energy gap(V)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "\n",
+ "#Calculations\n",
+ "lamda_c = (h*c)/Eg\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength =\",round((lamda_c/1E-6),2),\"um\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 0.87 um\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7, Page number 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find -\n",
+ "a)responsivity\n",
+ "b)Optical power received\n",
+ "c)no. of received photons'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 50./100 #quantum efficiency\n",
+ "lamda = 900 #wavelength(nm)\n",
+ "Ip = 10**-6 #photocurrent(A)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "R = (N*lamda)/1248\n",
+ "\n",
+ "#Part b\n",
+ "Po = Ip/R\n",
+ "\n",
+ "#Part c\n",
+ "n = (Po*lamda*10**-9)/(h*c)\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Responsivity =\",round(R,2),\"A/W\"\n",
+ "print \"b)Optical power =\",round((Po/1E-6),2),\"*10^-6 W\"\n",
+ "print \"c)No. of photons =\",round((n/1e+13),3),\"*10^13(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Responsivity = 0.36 A/W\n",
+ "b)Optical power = 2.77 *10^-6 W\n",
+ "c)No. of photons = 1.257 *10^13(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8, Page number 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the multiplication factor of photodiode'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 80./100 #quantum efficiency\n",
+ "lamda = 0.9*10**-6 #wavelength(m)\n",
+ "I = 12*10**-6 #output current(A)\n",
+ "Po = 0.5*10**-6 #incident power(W)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "R = (N*e*lamda)/(h*c) #responsivity(A/W)\n",
+ "Ip = Po*R #photocurrent(A)\n",
+ "M = I/Ip\n",
+ "\n",
+ "#Result\n",
+ "print \"Multiplication factor =\",M"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Multiplication factor = 41.4125\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9, Page number 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the responsivity and multiplication factor'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 65./100 #quantum efficiency\n",
+ "lamda = 850*10**-9 #wavelength(m)\n",
+ "I = 10*10**-6 #output current(A)\n",
+ "Po = 0.5*10**-6 #incident power(W)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "R = (N*e*lamda)/(h*c) #responsivity(A/W)\n",
+ "\n",
+ "M = I/(R*Po)\n",
+ "\n",
+ "#Result\n",
+ "print \"Responsiviy =\",round(R,3),\"A/W\"\n",
+ "print \"Multiplication factor =\",M"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Responsiviy = 0.445 A/W\n",
+ "Multiplication factor = 44.9728506787\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10, Page number 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimate -\n",
+ "a)noise equivalent power\n",
+ "b)specific detectivity'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 55./100 #quantum efficiency\n",
+ "lamda = 1.3*10**-6 #wavelength(nm)\n",
+ "Id = 8*10**-9 #dark current(A)\n",
+ "A = 75*50*10**-12 #dimensions(m)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "NEP = (h*c*((2*e*Id)**0.5))/(N*e*lamda)\n",
+ "\n",
+ "#Part b\n",
+ "D = A**0.5/NEP\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Noise equivalent power =\",round((NEP/1E-14),2),\"*10^-14 W\"\n",
+ "print \"b)Specific detectivity =\",round((D/1E+8),2),\"*10^8\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Noise equivalent power = 8.78 *10^-14 W\n",
+ "b)Specific detectivity = 6.97 *10^8\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11, Page number 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find -\n",
+ "a)optical gain\n",
+ "b)CE current'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 60./100 #quantum efficiency\n",
+ "lamda = 1.26*10**-6 #wavelength(m)\n",
+ "Ic = 15*10**-3 #output current(A)\n",
+ "Po = 125*10**-6 #incident power(W)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Go = (h*c*Ic)/(lamda*e*Po)\n",
+ "\n",
+ "#Part b\n",
+ "Nfe = Go/N\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Optical gain =\",round(Go,1)\n",
+ "print \"b)Common emiiter current =\",round(Nfe,1),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Optical gain = 118.3\n",
+ "b)Common emiiter current = 197.2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the maximum 3dB bandwidth'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "tf = 5*10**-12 #transit time(sec)\n",
+ "G = 70 #photoconductive gain\n",
+ "\n",
+ "#Calculation\n",
+ "Bm = 1/(2*math.pi*tf*G)\n",
+ "\n",
+ "#Result\n",
+ "print \"The maximum 3dB bandwidth permitted by photoconductor is\",round((Bm/1E+6),1),\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum 3dB bandwidth permitted by photoconductor is 454.7 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the output photocurrent'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "rp = 10**11 #no. of photons/sec\n",
+ "hf = 1.28*10**19 #energy of photons(J)\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "Po = rp/hf\n",
+ "N = 1 #efficiency for an ideal photodiode\n",
+ "Ip = (N*Po*e)/hf\n",
+ "\n",
+ "#Result\n",
+ "print \"Output photocurrent =\",round((Ip/1E-47),2),\"*10^-47 A(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output photocurrent = 9.77 *10^-47 A(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.14, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the output photocurrent'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "R = 0.40 #responsivity(A/W)\n",
+ "phi = 100 #incident flux(uW/mm^2)\n",
+ "A = 2 #active area(mm^2)\n",
+ "\n",
+ "#Calculations\n",
+ "Po = phi*A #incident power(uW)\n",
+ "Ip = R*Po\n",
+ "\n",
+ "#Result\n",
+ "print \"Photocurrent =\",Ip/1e+3,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Photocurrent = 0.08 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.15, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the multiplication factor of photodiode'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 50./100 #quantum efficiency\n",
+ "lamda = 1.3*10**-6 #wavelength(m)\n",
+ "I = 8*10**-6 #output current(A)\n",
+ "Po = 0.4*10**-6 #incident power(W)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "R = (N*e*lamda)/(h*c) #responsivity(A/W)\n",
+ "Ip = Po*R #photocurrent(A)\n",
+ "M = I/Ip\n",
+ "\n",
+ "#Result\n",
+ "print \"Multiplication factor =\",round(M,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Multiplication factor = 38.23\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.16, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Calculate the maximum 3dB bandwidth'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "tf = 4.5*10**-12 #transit time(sec)\n",
+ "G = 80 #photoconductive gain\n",
+ "\n",
+ "#Calculation\n",
+ "Bm = 1/(2*math.pi*tf*G)\n",
+ "\n",
+ "#Result\n",
+ "print \"The maximum 3dB bandwidth permitted by photoconductor is\",round((Bm/1E+10),4),\"GHz(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum 3dB bandwidth permitted by photoconductor is 0.0442 GHz(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.17, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Estimate responsivity and received optical power'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 50./100 #quantum efficiency\n",
+ "lamda = 0.9*10**-6 #wavelength(m)\n",
+ "Ip = 10**-6 #photocurrent(A)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "R = (N*e*lamda)/(h*c)\n",
+ "\n",
+ "Po = Ip/R\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print \"Responsivity =\",round(R,2),\"A/W\"\n",
+ "print \"Optical power =\",round((Po/1E-6),2),\"*10^-6 W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Responsivity = 0.36 A/W\n",
+ "Optical power = 2.76 *10^-6 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.18, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the efficiency of a PIN silicon photodiode'''\n",
+ "\n",
+ "#Varaible declaration \n",
+ "R = 0.374 #responsivity(A/W)\n",
+ "lamda = 1300*10**-9 #wavelength(m)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "N = (R*h*c)/(e*lamda)\n",
+ "\n",
+ "#Result\n",
+ "print \"Efficiency =\",round((N*100),1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency = 35.7 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.20, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the thickness of the intrinsic region'''\n",
+ "\n",
+ "#Variable declaration\n",
+ "A = 1.5*10**-3 #area(mm^2)\n",
+ "R = 100 #load resistance(Ohms)\n",
+ "Eo = 1.04*10**-10 #permitivitty for Si(F/m)\n",
+ "vd = 10**7 #electron saturation velocity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "w = (R*Eo*A*vd)**0.5\n",
+ "\n",
+ "#Result\n",
+ "print \"The required thickness is\",round(w/1E-6),\"um(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required thickness is 12490.0 um(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.21, Page number 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''Find the dark current'''\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration \n",
+ "N = 64./100 #quantum efficiency\n",
+ "lamda = 0.85*10**-6 #wavelength(m)\n",
+ "B = 1 #bandwidth(Hz)\n",
+ "D = 7*10**10 #specific detectivity(/MHz-W)\n",
+ "A = 10*10**-6 #dimensions(m)\n",
+ "c = 3*10**8 #speed of light(m/s)\n",
+ "h = 6.62*10**-34 #Planck's constant\n",
+ "e = 1.602*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "Id = ((N*math.sqrt(e*A)*lamda)/(h*c*math.sqrt(2)*D))**0.5\n",
+ "\n",
+ "#Result\n",
+ "print \"Dark current =\",round((Id/1E-3),2),\"mA\"\n",
+ "#Square root of Id has not been taken in the textbook.Hence, the difference in solution"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dark current = 5.92 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Communication_/screenshots/finding_angles.png b/Optical_Communication_/screenshots/finding_angles.png
new file mode 100755
index 00000000..e05d7786
--- /dev/null
+++ b/Optical_Communication_/screenshots/finding_angles.png
Binary files differ
diff --git a/Optical_Communication_/screenshots/optical_power.png b/Optical_Communication_/screenshots/optical_power.png
new file mode 100755
index 00000000..2e06f4a8
--- /dev/null
+++ b/Optical_Communication_/screenshots/optical_power.png
Binary files differ
diff --git a/Optical_Communication_/screenshots/responsivity.png b/Optical_Communication_/screenshots/responsivity.png
new file mode 100755
index 00000000..b0cd045d
--- /dev/null
+++ b/Optical_Communication_/screenshots/responsivity.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter1.ipynb
new file mode 100755
index 00000000..76fe396c
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter1.ipynb
@@ -0,0 +1,28 @@
+{
+ "metadata": {
+ "name": "Chapter_1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 :- Introduction"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Theortical Chapter",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter10.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter10.ipynb
new file mode 100755
index 00000000..077ac9f5
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter10.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": "Chapter_10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 10 : Optical amplification, wavelength conversion and regeneration\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.1, page 555"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=1.5*10**-6 #peak gain wavelength\ndelt=10**-9 #mode spacing\nl=300*10**-6 #length\nc=2.998*10**8 #speed of light\nr=0.09 #facet reflectivities\ngs=3.020\n\n#Calculation\nn=(h**2)/(2*delt*l) #refractive index\na=c/(math.pi*n*l)\nd=1-(math.sqrt(r)*gs)\nf=2*math.sqrt(math.sqrt(r)*gs)\nB=a*math.asin(d/f) #spectral bandwidth\n#Result\nprint'Refractive index of a medium = %.2f'%n\nprint'3dB spectral bandwidth = %.1f GHz'%(B*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Refractive index of a medium = 3.75\n3dB spectral bandwidth = 4.2 GHz\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.3, page 562"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ngs=30 #gain in dB\ng=200 #net gain\nloge=0.434 #log(e)\ngs1=1000\nm=2.2 #mode no\nnsp=4 #spontaneous emission factor\nh1=6.626*10**-34 #plancks constant\nf=1.94*10**14\nB=1.0*10**12 #bandwidth\n\n#Calculation\nL=gs/(10*g*loge) #length of the device\nP=m*nsp*(gs1-1)*h1*f*B #noise power spectral density\n\n#Result\nprint'(a) Length of the device = %.2f mm'%(L*10**3)\nprint'(b) Noise power spectral density = %.2f mW'%(P*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Length of the device = 34.56 mm\n(b) Noise power spectral density = 1.13 mW\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.4, page 580"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nGp=62.2 #parametric peak gain in dB\nlog=10*math.log10(0.25)\nPp=1.4 #signal power in watt\nL=500 #length in meter\nlog2=20*math.log10(2.7182818284)\n\n\n#Calculation\ny=(Gp-log)/(Pp*L*log2) #fiber nonlinear coefficient\nGp2=10*math.log10((y*Pp*L)**2) #parametric gain\n \n#Result\nprint'(a) Fiber nonlinear coefficient = %.2f x 10^-3 W^-1 km^-1'%(y*1000)\nprint'(b) Quadratic gain, Gp = %.2f dB'%(Gp2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Fiber nonlinear coefficient = 11.22 x 10^-3 W^-1 km^-1\n(b) Quadratic gain, Gp = 17.90 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.5, page 589 "
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npt=0.5*10**-3 #input signal power\ndpt=0.01*10**-6 #input signal power variation\nh=1.55*10**-6 #signal wavelength\na=-1 #linewidth enhancement factor\ndn=-1.2*10**-26 #differential refractive index\n\n#Calculation\ndelt=(-a*dpt)/(4*math.pi*pt) #frequency chirp\ndg=(4*math.pi*dn)/(h*a) #differential gain\n \n#Result\nprint'(a) Frequency chirp variation = %.2f MHz'%(delt*10**6)\nprint'(b) Differential gain = %.2f x10^-20 m^2'%(dg*10**20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Frequency chirp variation = 1.59 MHz\n(b) Differential gain = 9.73 x10^-20 m^2\n"
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter10_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter10_1.ipynb
new file mode 100755
index 00000000..077ac9f5
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter10_1.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": "Chapter_10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 10 : Optical amplification, wavelength conversion and regeneration\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.1, page 555"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=1.5*10**-6 #peak gain wavelength\ndelt=10**-9 #mode spacing\nl=300*10**-6 #length\nc=2.998*10**8 #speed of light\nr=0.09 #facet reflectivities\ngs=3.020\n\n#Calculation\nn=(h**2)/(2*delt*l) #refractive index\na=c/(math.pi*n*l)\nd=1-(math.sqrt(r)*gs)\nf=2*math.sqrt(math.sqrt(r)*gs)\nB=a*math.asin(d/f) #spectral bandwidth\n#Result\nprint'Refractive index of a medium = %.2f'%n\nprint'3dB spectral bandwidth = %.1f GHz'%(B*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Refractive index of a medium = 3.75\n3dB spectral bandwidth = 4.2 GHz\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.3, page 562"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ngs=30 #gain in dB\ng=200 #net gain\nloge=0.434 #log(e)\ngs1=1000\nm=2.2 #mode no\nnsp=4 #spontaneous emission factor\nh1=6.626*10**-34 #plancks constant\nf=1.94*10**14\nB=1.0*10**12 #bandwidth\n\n#Calculation\nL=gs/(10*g*loge) #length of the device\nP=m*nsp*(gs1-1)*h1*f*B #noise power spectral density\n\n#Result\nprint'(a) Length of the device = %.2f mm'%(L*10**3)\nprint'(b) Noise power spectral density = %.2f mW'%(P*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Length of the device = 34.56 mm\n(b) Noise power spectral density = 1.13 mW\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.4, page 580"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nGp=62.2 #parametric peak gain in dB\nlog=10*math.log10(0.25)\nPp=1.4 #signal power in watt\nL=500 #length in meter\nlog2=20*math.log10(2.7182818284)\n\n\n#Calculation\ny=(Gp-log)/(Pp*L*log2) #fiber nonlinear coefficient\nGp2=10*math.log10((y*Pp*L)**2) #parametric gain\n \n#Result\nprint'(a) Fiber nonlinear coefficient = %.2f x 10^-3 W^-1 km^-1'%(y*1000)\nprint'(b) Quadratic gain, Gp = %.2f dB'%(Gp2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Fiber nonlinear coefficient = 11.22 x 10^-3 W^-1 km^-1\n(b) Quadratic gain, Gp = 17.90 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.5, page 589 "
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npt=0.5*10**-3 #input signal power\ndpt=0.01*10**-6 #input signal power variation\nh=1.55*10**-6 #signal wavelength\na=-1 #linewidth enhancement factor\ndn=-1.2*10**-26 #differential refractive index\n\n#Calculation\ndelt=(-a*dpt)/(4*math.pi*pt) #frequency chirp\ndg=(4*math.pi*dn)/(h*a) #differential gain\n \n#Result\nprint'(a) Frequency chirp variation = %.2f MHz'%(delt*10**6)\nprint'(b) Differential gain = %.2f x10^-20 m^2'%(dg*10**20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Frequency chirp variation = 1.59 MHz\n(b) Differential gain = 9.73 x10^-20 m^2\n"
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter10_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter10_2.ipynb
new file mode 100755
index 00000000..077ac9f5
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter10_2.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": "Chapter_10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 10 : Optical amplification, wavelength conversion and regeneration\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.1, page 555"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=1.5*10**-6 #peak gain wavelength\ndelt=10**-9 #mode spacing\nl=300*10**-6 #length\nc=2.998*10**8 #speed of light\nr=0.09 #facet reflectivities\ngs=3.020\n\n#Calculation\nn=(h**2)/(2*delt*l) #refractive index\na=c/(math.pi*n*l)\nd=1-(math.sqrt(r)*gs)\nf=2*math.sqrt(math.sqrt(r)*gs)\nB=a*math.asin(d/f) #spectral bandwidth\n#Result\nprint'Refractive index of a medium = %.2f'%n\nprint'3dB spectral bandwidth = %.1f GHz'%(B*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Refractive index of a medium = 3.75\n3dB spectral bandwidth = 4.2 GHz\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.3, page 562"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ngs=30 #gain in dB\ng=200 #net gain\nloge=0.434 #log(e)\ngs1=1000\nm=2.2 #mode no\nnsp=4 #spontaneous emission factor\nh1=6.626*10**-34 #plancks constant\nf=1.94*10**14\nB=1.0*10**12 #bandwidth\n\n#Calculation\nL=gs/(10*g*loge) #length of the device\nP=m*nsp*(gs1-1)*h1*f*B #noise power spectral density\n\n#Result\nprint'(a) Length of the device = %.2f mm'%(L*10**3)\nprint'(b) Noise power spectral density = %.2f mW'%(P*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Length of the device = 34.56 mm\n(b) Noise power spectral density = 1.13 mW\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.4, page 580"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nGp=62.2 #parametric peak gain in dB\nlog=10*math.log10(0.25)\nPp=1.4 #signal power in watt\nL=500 #length in meter\nlog2=20*math.log10(2.7182818284)\n\n\n#Calculation\ny=(Gp-log)/(Pp*L*log2) #fiber nonlinear coefficient\nGp2=10*math.log10((y*Pp*L)**2) #parametric gain\n \n#Result\nprint'(a) Fiber nonlinear coefficient = %.2f x 10^-3 W^-1 km^-1'%(y*1000)\nprint'(b) Quadratic gain, Gp = %.2f dB'%(Gp2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Fiber nonlinear coefficient = 11.22 x 10^-3 W^-1 km^-1\n(b) Quadratic gain, Gp = 17.90 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 10.5, page 589 "
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npt=0.5*10**-3 #input signal power\ndpt=0.01*10**-6 #input signal power variation\nh=1.55*10**-6 #signal wavelength\na=-1 #linewidth enhancement factor\ndn=-1.2*10**-26 #differential refractive index\n\n#Calculation\ndelt=(-a*dpt)/(4*math.pi*pt) #frequency chirp\ndg=(4*math.pi*dn)/(h*a) #differential gain\n \n#Result\nprint'(a) Frequency chirp variation = %.2f MHz'%(delt*10**6)\nprint'(b) Differential gain = %.2f x10^-20 m^2'%(dg*10**20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Frequency chirp variation = 1.59 MHz\n(b) Differential gain = 9.73 x10^-20 m^2\n"
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter11.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter11.ipynb
new file mode 100755
index 00000000..77cd82ac
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter11.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "Chapter_11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 : Integrated optics and photonics"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 11.1, page 624"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=1.3*10**-6 #wavlength\nd=25*10**-6 #distance between the electrodes\nn1=2.1 #refractive index\nr=30.8*10**-12 #electro-optic coefficient\nl=2*10**-2 #length\n\n\n#Calculation\nV=(h*d)/(n1**3*r*l) #voltage\n\n#Result\nprint'Voltage = %.1f V'%V",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Voltage = 5.7 V\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 11.2, page 629"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=3.1 #refractive index\nthet=1 #angle in degree\nh=1.52*10**-6 #wavelength\nl=10**-2 #length\n\n#Calculation\nne=n1*math.sin(2*thet*math.pi/180) #effective refractive index\nD=h/(2*ne) #Corrugation period\ns=D*h/l #filter bandwidth\n\n\n#Result\nprint'Corrugation period = %.1f um'%(D*10**6)\nprint'Filter 3 dB bandwidth = %.1f \u00c5 '%(s*10**10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Corrugation period = 7.0 um\nFilter 3 dB bandwidth = 10.7 \u00c5 \n"
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter11_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter11_1.ipynb
new file mode 100755
index 00000000..77cd82ac
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter11_1.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "Chapter_11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 : Integrated optics and photonics"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 11.1, page 624"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=1.3*10**-6 #wavlength\nd=25*10**-6 #distance between the electrodes\nn1=2.1 #refractive index\nr=30.8*10**-12 #electro-optic coefficient\nl=2*10**-2 #length\n\n\n#Calculation\nV=(h*d)/(n1**3*r*l) #voltage\n\n#Result\nprint'Voltage = %.1f V'%V",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Voltage = 5.7 V\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 11.2, page 629"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=3.1 #refractive index\nthet=1 #angle in degree\nh=1.52*10**-6 #wavelength\nl=10**-2 #length\n\n#Calculation\nne=n1*math.sin(2*thet*math.pi/180) #effective refractive index\nD=h/(2*ne) #Corrugation period\ns=D*h/l #filter bandwidth\n\n\n#Result\nprint'Corrugation period = %.1f um'%(D*10**6)\nprint'Filter 3 dB bandwidth = %.1f \u00c5 '%(s*10**10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Corrugation period = 7.0 um\nFilter 3 dB bandwidth = 10.7 \u00c5 \n"
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter11_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter11_2.ipynb
new file mode 100755
index 00000000..77cd82ac
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter11_2.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "Chapter_11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 : Integrated optics and photonics"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 11.1, page 624"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=1.3*10**-6 #wavlength\nd=25*10**-6 #distance between the electrodes\nn1=2.1 #refractive index\nr=30.8*10**-12 #electro-optic coefficient\nl=2*10**-2 #length\n\n\n#Calculation\nV=(h*d)/(n1**3*r*l) #voltage\n\n#Result\nprint'Voltage = %.1f V'%V",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Voltage = 5.7 V\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 11.2, page 629"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=3.1 #refractive index\nthet=1 #angle in degree\nh=1.52*10**-6 #wavelength\nl=10**-2 #length\n\n#Calculation\nne=n1*math.sin(2*thet*math.pi/180) #effective refractive index\nD=h/(2*ne) #Corrugation period\ns=D*h/l #filter bandwidth\n\n\n#Result\nprint'Corrugation period = %.1f um'%(D*10**6)\nprint'Filter 3 dB bandwidth = %.1f \u00c5 '%(s*10**10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Corrugation period = 7.0 um\nFilter 3 dB bandwidth = 10.7 \u00c5 \n"
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter12.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter12.ipynb
new file mode 100755
index 00000000..288c514a
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter12.ipynb
@@ -0,0 +1,488 @@
+{
+ "metadata": {
+ "name": "Chapter_12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 12 :- Optical fiber systems 1: Intensity modulation/direct detection\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.1, page 706"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=8 #bits in a time slot\nt=32 #bits in a frame\nf=8*10**3 #frequency\nm=16 #bits in a multiframe\n\n#Calculation\nnb=n*t #number of bits in a frame\nfr=nb*f #transmission rate\ntr=fr**-1 #bit duration\nts=tr*n #duration of a time slot\ntf=ts*t #duration of a frame\ntm=tf*m #duration of a multiframe\n\n#Result\nprint'(a) Bit rate for the system = %.3f Mbit s^-1'%(fr*10**-6)\nprint'(b) Duration of the time slot = %.1f \u03bcs'%(ts*10**6)\nprint'(c) Duration of a frame = %d \u03bcs' %(tf*10**6)\nprint'Duration of a multiframe = %d ms' %(tm*10**3)\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Bit rate for the system = 2.048 Mbit s^-1\n(b) Duration of the time slot = 3.9 \u03bcs\n(c) Duration of a frame = 125 \u03bcs\nDuration of a multiframe = 2 ms\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.2, page 720"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nm=4.24 #erfc = 2*10^9\na=2*math.sqrt(2)\n\n#Calculation\nsn=m*a #root of S/N = optical\nsn1=10*math.log10(sn) #in dB\nisq=sn**2 #S/N = electrical \nisq1=10*math.log10(isq) #in dB\n#Result\nprint'Optical SNR = %.1f'%sn\nprint' = %.1f dB'%sn1\nprint'Electrical SNR = %.1f'%round(isq)\nprint' = %.1f dB'%isq1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical SNR = 12.0\n = 10.8 dB\nElectrical SNR = 144.0\n = 21.6 dB\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.3, page 723"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nm=100 #multiplication factor\nk=0.02 #ratio of carrier ionization rates \nsn=144 #electrical SNR\nn=0.8 #quantum efficiency\nB=0.6\n\n#Calculation\nfm=(k*m)+(2-(1/m))*(1-k) #avalanche noise factor\nzm=2*B*round(fm)*sn/n #average number of photons\n\n#Result\nprint'Average no of photons = %d photons'%round(zm)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Average no of photons = 864 photons\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.4, page 724"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nzm=864 #average no of photons\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nl1=10**-6 #wavelength\nl2=10**-14 #wavelength\nbt=10**7 \nn=14\n\n\n#Calculation\npo1=(zm*h*c*bt)/(2*l1) #At 10 Mbit s^-1\npo2=(zm*h*c*n*bt)/(2*l2) #At 140 Mbit s^-1\n\n#Result\nprint'Incident optical power (10 Mbit s^-l) = %.1f pW'%(po1*10**12)\nprint'Incident optical power (140 Mbit s^-l) = %.3f W'%po2 #value given in a textbook is incorrect",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incident optical power (10 Mbit s^-l) = 858.2 pW\nIncident optical power (140 Mbit s^-l) = 1.201 W\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.5, page 726"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nafc=5 #fibre cable attenuation\nai=2 #splice losses\nl=4 #length in Km\naf=3.5+2.5 #connector losses at source and detector resp\n\n#Calculation\nCl=(afc+ai)*l+af #total channel loss\n\n#Result\nprint'Total channel loss = %d dB'%Cl",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total channel loss = 34 dB\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.6, page 727"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ns=0.6*10**-9 #rms pulse broadening\nL=8 #length in km\nbt=25*10**6 #bit rates\nbt1=150*10**6 #bit rates\n\n#Calculation\nst=s*L #total rms pulse broadening\ndl1=2*(2*st*bt*math.sqrt(2))**4 #without mode coupling\nst1=s*math.sqrt(L) #total rms pulse broadening\ndl2=2*(2*st1*bt*math.sqrt(2))**4 #with mode coupling\ndl3=2*(2*st*bt1*math.sqrt(2))**4 #without mode coupling\ndl4=2*(2*st1*bt1*math.sqrt(2))**4 #with mode coupling\n\n#Result\nprint'(a) For 25 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl1\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f x 10^-4 dB\\n'%(dl2*10**4)\nprint'(b) For 150 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl3\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f dB'%dl4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) For 25 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 0.03 dB\ndispersion\u2013equalization penalty (with mode coupling) = 4.15 x 10^-4 dB\n\n(b) For 150 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 34.40 dB\ndispersion\u2013equalization penalty (with mode coupling) = 0.54 dB\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.7, page 731"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nts=8 #rise time for source in ns\ntn=5*ts #for fiber intermodal\ntc=1*ts #for pulse broadening\ntd=6 #for detector\n\n#Calculation\ntsys=1.1*(ts**2+tn**2+tc**2+td**2)**0.5 #total system rise time\nBt=0.7/(tsys*10**-9) #max bit rate\n\n\n#Result\nprint'Bt (Max) = %.1f Mbit per sec'%(Bt/10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Bt (Max) = 15.2 Mbit per sec\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.8, page 732"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-55 #mean power required at the APD receiver at 35 Mbit s^-1\npo1=-44 #mean power required at the APD receiver at 400 Mbit s^-1\npi=-3 #mean power launched from the laser transmitter\nl1=0.4 #cable fiber loss\nl2=0.1 #splice losses\nl3=1 #connector loss \nma=7 #safety margin\na=0.5 \nacr=2\ndl=1.5\n\n#Calculation \nL1=(pi-po-acr-ma)/a #for 35 Mbit s^-1\nL2=(pi-po1-acr-ma)/a #for 400 Mbit s^-1\nL3=(pi-po1-acr-dl-ma)/a #reduction in the maximum possible link\n\n#Result\nprint'(a) Maximum possible link length (operating at 35 Mbit s^-1) = %d km'%L1\nprint'(b) Maximum possible link length (operating at 400 Mbit s^-1) = %d km'%L2\nprint'(c) Reduction in the maximum possible link length = %d km'%L3",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Maximum possible link length (operating at 35 Mbit s^-1) = 86 km\n(b) Maximum possible link length (operating at 400 Mbit s^-1) = 64 km\n(c) Reduction in the maximum possible link length = 61 km\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.9, page 734"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-10 #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-41 #receiver sensitivity at 20 Mbit s^-1\nl1=7*2.6 #cabled fiber loss\nl2=6*0.5 #splice losses\nl3=1*1.5 #connector loss \nms=6 #safety margin\n\n#Calculation\nts=po-rs #Total system margin\ntsl=l1+l2+l3+ms #Total system loss\npm=ts-tsl #Excess power margin \n\n#Result\nprint'Total system margin = %d dB'%ts\nprint'Total system loss = %.1f dB'%tsl\nprint'Excess power margin = %.1f dB'%pm\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total system margin = 31 dB\nTotal system loss = 28.7 dB\nExcess power margin = 2.3 dB\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.10, page 740"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nv=5 #output voltage\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nk=1.385*10**-23 #boltzman constant\nt=290 #tempreture in kelvin\nzo=100 #cable impedance\nn=0.7 #quantum efficiency\npi=10**-3 #optical power\nlam=0.85*10**-6 #wavelength\n\n#Calculation\nratio=(v**2*h*c)/(2*k*t*zo*n*pi*lam) #ratio\nratio1=10*math.log10(ratio) #ration in dB\n\n#Result\nprint'Ratio = %d dB'%ratio1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio = 40 dB\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.11, page 744"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nma=0.8 #modulation index\nR=0.5 #responsivity\nb=0.7 #ratio of luminance to composite video\nsnr=3.162*10**5 #SNR\ne=1.602*10**-19 #electron volt\nB=5*10**6 #bandwidth\nK=1.385*10**-23 #boltzman constant \nT=293 #tempreture in kelvin\nFn=1.413\nRl=10**6\n\n#Calculation\na=(2*ma*R*b)**2\nc=snr*2*e*B*R\nd=snr*4*K*T*B*Fn/Rl\nf = (c**2)+(4*a*d)\npo=(c+math.sqrt(f))/(2*a) #average incident optical power \npo1=10*math.log10(po*1000) #in dB\n\n#Result\nprint'Average incident optical power = %.2f uW'%(po*10**6)\nprint' = %.1f dB m'%po1\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Average incident optical power = 0.93 uW\n = -30.3 dB m\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.12, page 747"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\ne=1.602*10**-19 #1 electron volt\nn=0.6 #p\u2013i\u2013n photodiode quantum efficiency\nma=0.5 #modulation index\nlam=10**-6 #wavelength\nk=1.385*10**-23 #boltzman constant \nt=300 #tempreture in kelvin\nf=4 #amplifier noise figure\nrl=50*10**3 #effective load impedance\nsn=3.162*10**4 #signal to noise ratio\nB=10**7 #bandwidth\n\n#Calculation\na=h*c/(e*n*ma**2*lam)\nb=math.sqrt((8*k*t*f)/rl)\nc=math.sqrt(sn*B)\npo=a*b*c #optical power\npo1=10*math.log10(po*1000) #optical power in dB\n\n#Result\nprint'Optical power, Po = %.2f uW'%(po*10**6)\nprint' = %.1f dBm'%po1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power, Po = 7.58 uW\n = -21.2 dBm\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.13, page 748"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-10 #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-25 #receiver sensitivity \nl1=2*3.5 #cable fiber loss\nl2=2*0.7 #splice losses\nl3=1.6 #connector loss \nms=4.0 #safety margin\nafc=3.5\nai=0.7\nacr=1.6\nma=7\n\n#Calculation\nts=po-rs #Total system margi\ntsl=l1+l2+l3+ms #Total system loss\npm=ts-tsl #Excess power margin \nL=((0-rs)-(acr+ma))/(afc+ai)\n\n#Result\nprint'(a) Total system margin = %d dB'%ts\nprint' Total system loss = %.1f dB'%tsl\nprint' Excess power margin = %.1f dB'%pm\nprint'\\n(b) Increase in link length = %.1f Km'%(L)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Total system margin = 15 dB\n Total system loss = 14.0 dB\n Excess power margin = 1.0 dB\n\n(b) Increase in link length = 3.9 Km\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.14, page 750"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nBop=6*10**6\nts=10 #rise time for source in ns\ntn=5*9 #for fiber intermodal\ntc=5*2 #for pulse broadening\ntd=3 #for detector\n\n\n#Calculation\ntsys=0.35/Bop\ntsys1=1.1*(ts**2+tn**2+tc**2+td**2)**0.5 #total system rise time\n\n#Result\nprint'Maximum permitted system rise time = %.1f ns'%(tsys*10**9)\nprint'Total system rise time = %.1f ns'%(tsys1)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum permitted system rise time = 58.3 ns\nTotal system rise time = 52.0 ns\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.15, page 755"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nfd=400*10**3 #peak frequency deviation\nBa=4*10**3 #bandwidth\n\n#Calculation\nDf=fd/Ba #frequency deviation ratio\nsnr=1.76+(20*math.log10(Df)) #SNR improvement\nBm=2*(Df+1)*Ba #bandwidth of the FM\u2013IM signal \n \n#Result\nprint'(a) SNR improvement = %.2f dB'%snr\nprint'(b) Frequency deviation ratio = %d'%Df\nprint' Bandwidth of FM-IM signal = %d kHz'%(Bm/1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) SNR improvement = 41.76 dB\n(b) Frequency deviation ratio = 100\n Bandwidth of FM-IM signal = 808 kHz\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.16, page 757"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nfm=3 #output FM ratio\npm=1 #output PM ratio\n\n#Calculation\nratio=fm/pm #SNR ratio\nratio1=10*math.log10(ratio) #SNR ratio in dB\n\n#Result\nprint'Ratio of output SNR = %.2f dB'%(ratio1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio of output SNR = 4.77 dB\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.17, page 759"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=5*10**-8 #nominal pulse period\nfd=5*10**6 #Peak-to-peak frequency deviation\nM=60 #A PD multiplication factor\nR=0.7 #A PD responsivity\npo=10**-7 #peak optical power at receiver\ntr=12*10**-9 #Total system 10\u201390% rise time\nB=6*10**6 #baseband noise bandwidth\ni=10**-17 #Receiver mean square noise current\n\n\n#Calculation\nsnp=(3*(to*fd*M*R*po)**2)/(i*(2*math.pi*tr*B)**2) #peak-to-peak signal to rms noise ratio\nsnp1=10*math.log10(snp) #in dB\n\n#Result\nprint'Peak-to-peak signal to rms noise ratio = %.1f dB'%snp1\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Peak-to-peak signal to rms noise ratio = 62.1 dB\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.18, page 763"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "%pylab inline\nimport math\nfrom pylab import *\nfrom numpy import *\n\n#Variable declaration\nacr=1 #connector loss in dB\nafc=5 #loss per kilometer in dB\nLbu=0.1 #fiber length between each of the access couplers\nLac=1 #insertion loss\nLtr=10 #loss due to the tap ratio\nLsp=3 #splitting loss\n \n#Calculating, we get two equation in terms of N, no of nodes, i.e C(1,N-1)=(3.5*N)+8.5 and C(star)=4.5+(10*log10(N)) \n\n#For Bus distribution system\n\nfor N in range(1,13,1):\n C=(3.5*N)+8.5;\n a=plot(N,C,'.r')\n \n \n#for Star distribution system\n \nfor N in range(1,30,1):\n C1=4.5+(10*log10(N));\n b=plot(N,C1,'.g')\n \n \n#To show plot in same graph\n#Graphical comparison showing total channel loss against number of nodes\n\nxlabel(\"Number of nodes $N$\")\nylabel(\"Total channel loss $CL$ (dB)\")\ngrid()\nshow(a)\nshow(b)\n",
+ "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": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEOCAYAAABmVAtTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHX6B/DPqCgpJWgxmPprfJmoXIRREbdCpxAsTUQU\nq/UCarLpul1Nrd2Ktq1wU1O77UvXTUqp2LYIWzE1QbEyFbDLamIpWi2gCSheUIHv7w/irCjinMOc\nmTnf+bxfr14xw1yep7N7Hs7znPM9JiGEABEREYA2rg6AiIjcB4sCEREpWBSIiEjBokBERAoWBSIi\nUrAoEBGRwqlFoaqqChMmTED//v0RFBSEL7/8EhUVFYiJiUFgYCBiY2NRVVXlzJCIiOgiTi0KDz30\nEEaNGoV9+/bh66+/Rr9+/ZCWloaYmBgUFxcjOjoaaWlpzgyJiIguYnLWxWsnTpyA1WrFwYMHmzzf\nr18/bN26FWazGWVlZbDZbPjuu++cERIREV2inbO+6NChQ7jhhhswbdo0fPXVVxg0aBCWLl2K8vJy\nmM1mAIDZbEZ5efll7zWZTM4Kk4hIKmr/7nda+6i2thaFhYWYPXs2CgsL0alTp8taRSaT6YoFQAgh\n7T/PPPOMy2NgbsyP+cn3jxZOKwo9evRAjx49EBERAQCYMGECCgsLERAQgLKyMgBAaWkp/P39nRWS\n2ygpKXF1CLqROTeA+Rmd7Plp4bSiEBAQgJ49e6K4uBgAsHnzZgQHB2PMmDFIT08HAKSnpyM+Pt5Z\nIRER0SWcNlMAgFdeeQWTJk3C+fPn0bt3b7z55puoq6vDxIkTsWrVKlgsFmRmZjozJLeQnJzs6hB0\nI3NuAPMzOtnz08JpZx+1hslk0twfIyLyVFr2nbyi2Q3k5eW5OgTdyJwbwPyMTvb8tGBRICIiBdtH\nRESSYvuIiIhahUXBDcjc15Q5N4D5GZ3s+WnBokBERArOFIiIJMWZAhERtQqLghuQua8pc24A8zM6\n2fPTgkWBiIgU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GRgu0jIiJSsCgQEZGCRYGIiBQsCkREpGBRICIiBYsCEREpWBSIiEjBokBERIr/B5KTkPe2LreW\nAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x3f7ea90>"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.19, page 782"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nlam=1.55*10**-6 #wavelength\nL=100*10**3 #length\nK=4 \nB=1.2*10**9 #bandwidth\nsnr=50 #SNR\na=10**-2.5\npi=10**-3\n\n#Calculation\nLt=(pi*lam*a*L)/(K*h*c*B*snr) #link with a large number of cascaded amplifiers\n\n#Result\nprint'Maximum system length = %d x 10^4 km'%(Lt/10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum system length = 1 x 10^4 km\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.21, page 791"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nb=17 #second-order dispersion coefficient for the latter path\nL2=20 #path length in km\nL1=160.00 #path length in km\ns1=-0.075 #dispersion slope\n\n#Calculation\na=-b*L2\nG=a/L1 #second-order dispersion coefficient\ns2=s1*L1/L2 #chromatic dispersion slope\n\n#Result\nprint'(a) Second-order dispersion coefficient = %.3f ps nm^-1 km^-1'%G \nprint'(b) chromatic dispersion slope = %.1f ps nm^-2 km^-1'%s2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Second-order dispersion coefficient = -2.125 ps nm^-1 km^-1\n(b) chromatic dispersion slope = -0.6 ps nm^-2 km^-1\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.22, page 798"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=70*10**-12 #bit period\nt=6*10**-12 #RZ pulse width\nB2=50*10**-12*10**-12*10**-3 #second-order dispersion coefficient\nL=50*10**3 #amplifier spacing\n\n#Calculation\nqo=0.5*to/t #separation of the soliton pulses \nBt=(2*qo*math.sqrt(B2*L))**-1 #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^9'%(Bt*10**-8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Separation = 5.8\n(b) Transmission bit rate = 17.14 x 10^9\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.23, page 799"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=40*10**-12 #bit period\nt=4*10**-12 #RZ pulse width\na=0.2*10**-3 #attenuation coefficient\nB2=1.25*10**-12*10**-12*10**-3 #second-order dispersion coefficient\n\n#Calculation\nqo=0.5*to/t #separation of the soliton pulses \nb=1/(2*qo)\nc=math.sqrt(a/B2)\nBt=b*c #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^10 bit s^-1'%(Bt*10**-10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Separation = 5.0\n(b) Transmission bit rate = 4.00 x 10^10 bit s^-1\n"
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_1.ipynb
new file mode 100755
index 00000000..288c514a
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_1.ipynb
@@ -0,0 +1,488 @@
+{
+ "metadata": {
+ "name": "Chapter_12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 12 :- Optical fiber systems 1: Intensity modulation/direct detection\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.1, page 706"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=8 #bits in a time slot\nt=32 #bits in a frame\nf=8*10**3 #frequency\nm=16 #bits in a multiframe\n\n#Calculation\nnb=n*t #number of bits in a frame\nfr=nb*f #transmission rate\ntr=fr**-1 #bit duration\nts=tr*n #duration of a time slot\ntf=ts*t #duration of a frame\ntm=tf*m #duration of a multiframe\n\n#Result\nprint'(a) Bit rate for the system = %.3f Mbit s^-1'%(fr*10**-6)\nprint'(b) Duration of the time slot = %.1f \u03bcs'%(ts*10**6)\nprint'(c) Duration of a frame = %d \u03bcs' %(tf*10**6)\nprint'Duration of a multiframe = %d ms' %(tm*10**3)\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Bit rate for the system = 2.048 Mbit s^-1\n(b) Duration of the time slot = 3.9 \u03bcs\n(c) Duration of a frame = 125 \u03bcs\nDuration of a multiframe = 2 ms\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.2, page 720"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nm=4.24 #erfc = 2*10^9\na=2*math.sqrt(2)\n\n#Calculation\nsn=m*a #root of S/N = optical\nsn1=10*math.log10(sn) #in dB\nisq=sn**2 #S/N = electrical \nisq1=10*math.log10(isq) #in dB\n#Result\nprint'Optical SNR = %.1f'%sn\nprint' = %.1f dB'%sn1\nprint'Electrical SNR = %.1f'%round(isq)\nprint' = %.1f dB'%isq1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical SNR = 12.0\n = 10.8 dB\nElectrical SNR = 144.0\n = 21.6 dB\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.3, page 723"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nm=100 #multiplication factor\nk=0.02 #ratio of carrier ionization rates \nsn=144 #electrical SNR\nn=0.8 #quantum efficiency\nB=0.6\n\n#Calculation\nfm=(k*m)+(2-(1/m))*(1-k) #avalanche noise factor\nzm=2*B*round(fm)*sn/n #average number of photons\n\n#Result\nprint'Average no of photons = %d photons'%round(zm)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Average no of photons = 864 photons\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.4, page 724"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nzm=864 #average no of photons\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nl1=10**-6 #wavelength\nl2=10**-14 #wavelength\nbt=10**7 \nn=14\n\n\n#Calculation\npo1=(zm*h*c*bt)/(2*l1) #At 10 Mbit s^-1\npo2=(zm*h*c*n*bt)/(2*l2) #At 140 Mbit s^-1\n\n#Result\nprint'Incident optical power (10 Mbit s^-l) = %.1f pW'%(po1*10**12)\nprint'Incident optical power (140 Mbit s^-l) = %.3f W'%po2 #value given in a textbook is incorrect",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incident optical power (10 Mbit s^-l) = 858.2 pW\nIncident optical power (140 Mbit s^-l) = 1.201 W\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.5, page 726"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nafc=5 #fibre cable attenuation\nai=2 #splice losses\nl=4 #length in Km\naf=3.5+2.5 #connector losses at source and detector resp\n\n#Calculation\nCl=(afc+ai)*l+af #total channel loss\n\n#Result\nprint'Total channel loss = %d dB'%Cl",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total channel loss = 34 dB\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.6, page 727"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ns=0.6*10**-9 #rms pulse broadening\nL=8 #length in km\nbt=25*10**6 #bit rates\nbt1=150*10**6 #bit rates\n\n#Calculation\nst=s*L #total rms pulse broadening\ndl1=2*(2*st*bt*math.sqrt(2))**4 #without mode coupling\nst1=s*math.sqrt(L) #total rms pulse broadening\ndl2=2*(2*st1*bt*math.sqrt(2))**4 #with mode coupling\ndl3=2*(2*st*bt1*math.sqrt(2))**4 #without mode coupling\ndl4=2*(2*st1*bt1*math.sqrt(2))**4 #with mode coupling\n\n#Result\nprint'(a) For 25 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl1\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f x 10^-4 dB\\n'%(dl2*10**4)\nprint'(b) For 150 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl3\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f dB'%dl4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) For 25 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 0.03 dB\ndispersion\u2013equalization penalty (with mode coupling) = 4.15 x 10^-4 dB\n\n(b) For 150 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 34.40 dB\ndispersion\u2013equalization penalty (with mode coupling) = 0.54 dB\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.7, page 731"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nts=8 #rise time for source in ns\ntn=5*ts #for fiber intermodal\ntc=1*ts #for pulse broadening\ntd=6 #for detector\n\n#Calculation\ntsys=1.1*(ts**2+tn**2+tc**2+td**2)**0.5 #total system rise time\nBt=0.7/(tsys*10**-9) #max bit rate\n\n\n#Result\nprint'Bt (Max) = %.1f Mbit per sec'%(Bt/10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Bt (Max) = 15.2 Mbit per sec\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.8, page 732"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-55 #mean power required at the APD receiver at 35 Mbit s^-1\npo1=-44 #mean power required at the APD receiver at 400 Mbit s^-1\npi=-3 #mean power launched from the laser transmitter\nl1=0.4 #cable fiber loss\nl2=0.1 #splice losses\nl3=1 #connector loss \nma=7 #safety margin\na=0.5 \nacr=2\ndl=1.5\n\n#Calculation \nL1=(pi-po-acr-ma)/a #for 35 Mbit s^-1\nL2=(pi-po1-acr-ma)/a #for 400 Mbit s^-1\nL3=(pi-po1-acr-dl-ma)/a #reduction in the maximum possible link\n\n#Result\nprint'(a) Maximum possible link length (operating at 35 Mbit s^-1) = %d km'%L1\nprint'(b) Maximum possible link length (operating at 400 Mbit s^-1) = %d km'%L2\nprint'(c) Reduction in the maximum possible link length = %d km'%L3",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Maximum possible link length (operating at 35 Mbit s^-1) = 86 km\n(b) Maximum possible link length (operating at 400 Mbit s^-1) = 64 km\n(c) Reduction in the maximum possible link length = 61 km\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.9, page 734"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-10 #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-41 #receiver sensitivity at 20 Mbit s^-1\nl1=7*2.6 #cabled fiber loss\nl2=6*0.5 #splice losses\nl3=1*1.5 #connector loss \nms=6 #safety margin\n\n#Calculation\nts=po-rs #Total system margin\ntsl=l1+l2+l3+ms #Total system loss\npm=ts-tsl #Excess power margin \n\n#Result\nprint'Total system margin = %d dB'%ts\nprint'Total system loss = %.1f dB'%tsl\nprint'Excess power margin = %.1f dB'%pm\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total system margin = 31 dB\nTotal system loss = 28.7 dB\nExcess power margin = 2.3 dB\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.10, page 740"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nv=5 #output voltage\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nk=1.385*10**-23 #boltzman constant\nt=290 #tempreture in kelvin\nzo=100 #cable impedance\nn=0.7 #quantum efficiency\npi=10**-3 #optical power\nlam=0.85*10**-6 #wavelength\n\n#Calculation\nratio=(v**2*h*c)/(2*k*t*zo*n*pi*lam) #ratio\nratio1=10*math.log10(ratio) #ration in dB\n\n#Result\nprint'Ratio = %d dB'%ratio1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio = 40 dB\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.11, page 744"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nma=0.8 #modulation index\nR=0.5 #responsivity\nb=0.7 #ratio of luminance to composite video\nsnr=3.162*10**5 #SNR\ne=1.602*10**-19 #electron volt\nB=5*10**6 #bandwidth\nK=1.385*10**-23 #boltzman constant \nT=293 #tempreture in kelvin\nFn=1.413\nRl=10**6\n\n#Calculation\na=(2*ma*R*b)**2\nc=snr*2*e*B*R\nd=snr*4*K*T*B*Fn/Rl\nf = (c**2)+(4*a*d)\npo=(c+math.sqrt(f))/(2*a) #average incident optical power \npo1=10*math.log10(po*1000) #in dB\n\n#Result\nprint'Average incident optical power = %.2f uW'%(po*10**6)\nprint' = %.1f dB m'%po1\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Average incident optical power = 0.93 uW\n = -30.3 dB m\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.12, page 747"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\ne=1.602*10**-19 #1 electron volt\nn=0.6 #p\u2013i\u2013n photodiode quantum efficiency\nma=0.5 #modulation index\nlam=10**-6 #wavelength\nk=1.385*10**-23 #boltzman constant \nt=300 #tempreture in kelvin\nf=4 #amplifier noise figure\nrl=50*10**3 #effective load impedance\nsn=3.162*10**4 #signal to noise ratio\nB=10**7 #bandwidth\n\n#Calculation\na=h*c/(e*n*ma**2*lam)\nb=math.sqrt((8*k*t*f)/rl)\nc=math.sqrt(sn*B)\npo=a*b*c #optical power\npo1=10*math.log10(po*1000) #optical power in dB\n\n#Result\nprint'Optical power, Po = %.2f uW'%(po*10**6)\nprint' = %.1f dBm'%po1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power, Po = 7.58 uW\n = -21.2 dBm\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.13, page 748"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-10 #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-25 #receiver sensitivity \nl1=2*3.5 #cable fiber loss\nl2=2*0.7 #splice losses\nl3=1.6 #connector loss \nms=4.0 #safety margin\nafc=3.5\nai=0.7\nacr=1.6\nma=7\n\n#Calculation\nts=po-rs #Total system margi\ntsl=l1+l2+l3+ms #Total system loss\npm=ts-tsl #Excess power margin \nL=((0-rs)-(acr+ma))/(afc+ai)\n\n#Result\nprint'(a) Total system margin = %d dB'%ts\nprint' Total system loss = %.1f dB'%tsl\nprint' Excess power margin = %.1f dB'%pm\nprint'\\n(b) Increase in link length = %.1f Km'%(L)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Total system margin = 15 dB\n Total system loss = 14.0 dB\n Excess power margin = 1.0 dB\n\n(b) Increase in link length = 3.9 Km\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.14, page 750"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nBop=6*10**6\nts=10 #rise time for source in ns\ntn=5*9 #for fiber intermodal\ntc=5*2 #for pulse broadening\ntd=3 #for detector\n\n\n#Calculation\ntsys=0.35/Bop\ntsys1=1.1*(ts**2+tn**2+tc**2+td**2)**0.5 #total system rise time\n\n#Result\nprint'Maximum permitted system rise time = %.1f ns'%(tsys*10**9)\nprint'Total system rise time = %.1f ns'%(tsys1)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum permitted system rise time = 58.3 ns\nTotal system rise time = 52.0 ns\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.15, page 755"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nfd=400*10**3 #peak frequency deviation\nBa=4*10**3 #bandwidth\n\n#Calculation\nDf=fd/Ba #frequency deviation ratio\nsnr=1.76+(20*math.log10(Df)) #SNR improvement\nBm=2*(Df+1)*Ba #bandwidth of the FM\u2013IM signal \n \n#Result\nprint'(a) SNR improvement = %.2f dB'%snr\nprint'(b) Frequency deviation ratio = %d'%Df\nprint' Bandwidth of FM-IM signal = %d kHz'%(Bm/1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) SNR improvement = 41.76 dB\n(b) Frequency deviation ratio = 100\n Bandwidth of FM-IM signal = 808 kHz\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.16, page 757"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nfm=3 #output FM ratio\npm=1 #output PM ratio\n\n#Calculation\nratio=fm/pm #SNR ratio\nratio1=10*math.log10(ratio) #SNR ratio in dB\n\n#Result\nprint'Ratio of output SNR = %.2f dB'%(ratio1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio of output SNR = 4.77 dB\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.17, page 759"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=5*10**-8 #nominal pulse period\nfd=5*10**6 #Peak-to-peak frequency deviation\nM=60 #A PD multiplication factor\nR=0.7 #A PD responsivity\npo=10**-7 #peak optical power at receiver\ntr=12*10**-9 #Total system 10\u201390% rise time\nB=6*10**6 #baseband noise bandwidth\ni=10**-17 #Receiver mean square noise current\n\n\n#Calculation\nsnp=(3*(to*fd*M*R*po)**2)/(i*(2*math.pi*tr*B)**2) #peak-to-peak signal to rms noise ratio\nsnp1=10*math.log10(snp) #in dB\n\n#Result\nprint'Peak-to-peak signal to rms noise ratio = %.1f dB'%snp1\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Peak-to-peak signal to rms noise ratio = 62.1 dB\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.18, page 763"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "%pylab inline\nimport math\nfrom pylab import *\nfrom numpy import *\n\n#Variable declaration\nacr=1 #connector loss in dB\nafc=5 #loss per kilometer in dB\nLbu=0.1 #fiber length between each of the access couplers\nLac=1 #insertion loss\nLtr=10 #loss due to the tap ratio\nLsp=3 #splitting loss\n \n#Calculating, we get two equation in terms of N, no of nodes, i.e C(1,N-1)=(3.5*N)+8.5 and C(star)=4.5+(10*log10(N)) \n\n#For Bus distribution system\n\nfor N in range(1,13,1):\n C=(3.5*N)+8.5;\n a=plot(N,C,'.r')\n \n \n#for Star distribution system\n \nfor N in range(1,30,1):\n C1=4.5+(10*log10(N));\n b=plot(N,C1,'.g')\n \n \n#To show plot in same graph\n#Graphical comparison showing total channel loss against number of nodes\n\nxlabel(\"Number of nodes $N$\")\nylabel(\"Total channel loss $CL$ (dB)\")\ngrid()\nshow(a)\nshow(b)\n",
+ "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": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEOCAYAAABmVAtTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHX6B/DPqCgpJWgxmPprfJmoXIRREbdCpxAsTUQU\nq/UCarLpul1Nrd2Ktq1wU1O77UvXTUqp2LYIWzE1QbEyFbDLamIpWi2gCSheUIHv7w/irCjinMOc\nmTnf+bxfr14xw1yep7N7Hs7znPM9JiGEABEREYA2rg6AiIjcB4sCEREpWBSIiEjBokBERAoWBSIi\nUrAoEBGRwqlFoaqqChMmTED//v0RFBSEL7/8EhUVFYiJiUFgYCBiY2NRVVXlzJCIiOgiTi0KDz30\nEEaNGoV9+/bh66+/Rr9+/ZCWloaYmBgUFxcjOjoaaWlpzgyJiIguYnLWxWsnTpyA1WrFwYMHmzzf\nr18/bN26FWazGWVlZbDZbPjuu++cERIREV2inbO+6NChQ7jhhhswbdo0fPXVVxg0aBCWLl2K8vJy\nmM1mAIDZbEZ5efll7zWZTM4Kk4hIKmr/7nda+6i2thaFhYWYPXs2CgsL0alTp8taRSaT6YoFQAgh\n7T/PPPOMy2NgbsyP+cn3jxZOKwo9evRAjx49EBERAQCYMGECCgsLERAQgLKyMgBAaWkp/P39n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UJ3qFzxo2bBiGDRuGrKws\n1NTUoLq6Wsm5pZhLS0vh7e2NSZMmYe7cuSgsLLzs+3bt2oWBAwcCaDgqCwkJUT6L6FI8UiCXunhH\n/9hjj+HVV18F0HCk8PTTT2PIkCHo3r07goKCmn3PpY8v/rlv37547bXXMH36dAQHB2PWrFnw9vbG\nX/7yF8TGxqK+vh5eXl54/fXX8X//93/NfnYjq9WK5ORkpbU0c+ZMpXXUUrFqLtaWPuuee+5BWFgY\n/P39ld/379//ijF/8803ePzxx5UjpjfeeKPJ923ZsgWpqak4d+4cJkyYAKChlda1a9crxkyejUtn\nExGRgu0jIiJSsCgQEZGCRYGIiBQsCkREpGBRICIiBYsCEREpWBSIiEjBokBERIr/B5KTkPe2LreW\nAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x3f7ea90>"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.19, page 782"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nlam=1.55*10**-6 #wavelength\nL=100*10**3 #length\nK=4 \nB=1.2*10**9 #bandwidth\nsnr=50 #SNR\na=10**-2.5\npi=10**-3\n\n#Calculation\nLt=(pi*lam*a*L)/(K*h*c*B*snr) #link with a large number of cascaded amplifiers\n\n#Result\nprint'Maximum system length = %d x 10^4 km'%(Lt/10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum system length = 1 x 10^4 km\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.21, page 791"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nb=17 #second-order dispersion coefficient for the latter path\nL2=20 #path length in km\nL1=160.00 #path length in km\ns1=-0.075 #dispersion slope\n\n#Calculation\na=-b*L2\nG=a/L1 #second-order dispersion coefficient\ns2=s1*L1/L2 #chromatic dispersion slope\n\n#Result\nprint'(a) Second-order dispersion coefficient = %.3f ps nm^-1 km^-1'%G \nprint'(b) chromatic dispersion slope = %.1f ps nm^-2 km^-1'%s2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Second-order dispersion coefficient = -2.125 ps nm^-1 km^-1\n(b) chromatic dispersion slope = -0.6 ps nm^-2 km^-1\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.22, page 798"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=70*10**-12 #bit period\nt=6*10**-12 #RZ pulse width\nB2=50*10**-12*10**-12*10**-3 #second-order dispersion coefficient\nL=50*10**3 #amplifier spacing\n\n#Calculation\nqo=0.5*to/t #separation of the soliton pulses \nBt=(2*qo*math.sqrt(B2*L))**-1 #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^9'%(Bt*10**-8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Separation = 5.8\n(b) Transmission bit rate = 17.14 x 10^9\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.23, page 799"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=40*10**-12 #bit period\nt=4*10**-12 #RZ pulse width\na=0.2*10**-3 #attenuation coefficient\nB2=1.25*10**-12*10**-12*10**-3 #second-order dispersion coefficient\n\n#Calculation\nqo=0.5*to/t #separation of the soliton pulses \nb=1/(2*qo)\nc=math.sqrt(a/B2)\nBt=b*c #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^10 bit s^-1'%(Bt*10**-10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Separation = 5.0\n(b) Transmission bit rate = 4.00 x 10^10 bit s^-1\n"
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_2.ipynb
new file mode 100755
index 00000000..288c514a
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_2.ipynb
@@ -0,0 +1,488 @@
+{
+ "metadata": {
+ "name": "Chapter_12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 12 :- Optical fiber systems 1: Intensity modulation/direct detection\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.1, page 706"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=8 #bits in a time slot\nt=32 #bits in a frame\nf=8*10**3 #frequency\nm=16 #bits in a multiframe\n\n#Calculation\nnb=n*t #number of bits in a frame\nfr=nb*f #transmission rate\ntr=fr**-1 #bit duration\nts=tr*n #duration of a time slot\ntf=ts*t #duration of a frame\ntm=tf*m #duration of a multiframe\n\n#Result\nprint'(a) Bit rate for the system = %.3f Mbit s^-1'%(fr*10**-6)\nprint'(b) Duration of the time slot = %.1f \u03bcs'%(ts*10**6)\nprint'(c) Duration of a frame = %d \u03bcs' %(tf*10**6)\nprint'Duration of a multiframe = %d ms' %(tm*10**3)\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Bit rate for the system = 2.048 Mbit s^-1\n(b) Duration of the time slot = 3.9 \u03bcs\n(c) Duration of a frame = 125 \u03bcs\nDuration of a multiframe = 2 ms\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.2, page 720"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nm=4.24 #erfc = 2*10^9\na=2*math.sqrt(2)\n\n#Calculation\nsn=m*a #root of S/N = optical\nsn1=10*math.log10(sn) #in dB\nisq=sn**2 #S/N = electrical \nisq1=10*math.log10(isq) #in dB\n#Result\nprint'Optical SNR = %.1f'%sn\nprint' = %.1f dB'%sn1\nprint'Electrical SNR = %.1f'%round(isq)\nprint' = %.1f dB'%isq1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical SNR = 12.0\n = 10.8 dB\nElectrical SNR = 144.0\n = 21.6 dB\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.3, page 723"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nm=100 #multiplication factor\nk=0.02 #ratio of carrier ionization rates \nsn=144 #electrical SNR\nn=0.8 #quantum efficiency\nB=0.6\n\n#Calculation\nfm=(k*m)+(2-(1/m))*(1-k) #avalanche noise factor\nzm=2*B*round(fm)*sn/n #average number of photons\n\n#Result\nprint'Average no of photons = %d photons'%round(zm)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Average no of photons = 864 photons\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.4, page 724"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nzm=864 #average no of photons\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nl1=10**-6 #wavelength\nl2=10**-14 #wavelength\nbt=10**7 \nn=14\n\n\n#Calculation\npo1=(zm*h*c*bt)/(2*l1) #At 10 Mbit s^-1\npo2=(zm*h*c*n*bt)/(2*l2) #At 140 Mbit s^-1\n\n#Result\nprint'Incident optical power (10 Mbit s^-l) = %.1f pW'%(po1*10**12)\nprint'Incident optical power (140 Mbit s^-l) = %.3f W'%po2 #value given in a textbook is incorrect",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incident optical power (10 Mbit s^-l) = 858.2 pW\nIncident optical power (140 Mbit s^-l) = 1.201 W\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.5, page 726"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nafc=5 #fibre cable attenuation\nai=2 #splice losses\nl=4 #length in Km\naf=3.5+2.5 #connector losses at source and detector resp\n\n#Calculation\nCl=(afc+ai)*l+af #total channel loss\n\n#Result\nprint'Total channel loss = %d dB'%Cl",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total channel loss = 34 dB\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.6, page 727"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ns=0.6*10**-9 #rms pulse broadening\nL=8 #length in km\nbt=25*10**6 #bit rates\nbt1=150*10**6 #bit rates\n\n#Calculation\nst=s*L #total rms pulse broadening\ndl1=2*(2*st*bt*math.sqrt(2))**4 #without mode coupling\nst1=s*math.sqrt(L) #total rms pulse broadening\ndl2=2*(2*st1*bt*math.sqrt(2))**4 #with mode coupling\ndl3=2*(2*st*bt1*math.sqrt(2))**4 #without mode coupling\ndl4=2*(2*st1*bt1*math.sqrt(2))**4 #with mode coupling\n\n#Result\nprint'(a) For 25 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl1\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f x 10^-4 dB\\n'%(dl2*10**4)\nprint'(b) For 150 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl3\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f dB'%dl4",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) For 25 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 0.03 dB\ndispersion\u2013equalization penalty (with mode coupling) = 4.15 x 10^-4 dB\n\n(b) For 150 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 34.40 dB\ndispersion\u2013equalization penalty (with mode coupling) = 0.54 dB\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.7, page 731"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nts=8 #rise time for source in ns\ntn=5*ts #for fiber intermodal\ntc=1*ts #for pulse broadening\ntd=6 #for detector\n\n#Calculation\ntsys=1.1*(ts**2+tn**2+tc**2+td**2)**0.5 #total system rise time\nBt=0.7/(tsys*10**-9) #max bit rate\n\n\n#Result\nprint'Bt (Max) = %.1f Mbit per sec'%(Bt/10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Bt (Max) = 15.2 Mbit per sec\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.8, page 732"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-55 #mean power required at the APD receiver at 35 Mbit s^-1\npo1=-44 #mean power required at the APD receiver at 400 Mbit s^-1\npi=-3 #mean power launched from the laser transmitter\nl1=0.4 #cable fiber loss\nl2=0.1 #splice losses\nl3=1 #connector loss \nma=7 #safety margin\na=0.5 \nacr=2\ndl=1.5\n\n#Calculation \nL1=(pi-po-acr-ma)/a #for 35 Mbit s^-1\nL2=(pi-po1-acr-ma)/a #for 400 Mbit s^-1\nL3=(pi-po1-acr-dl-ma)/a #reduction in the maximum possible link\n\n#Result\nprint'(a) Maximum possible link length (operating at 35 Mbit s^-1) = %d km'%L1\nprint'(b) Maximum possible link length (operating at 400 Mbit s^-1) = %d km'%L2\nprint'(c) Reduction in the maximum possible link length = %d km'%L3",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Maximum possible link length (operating at 35 Mbit s^-1) = 86 km\n(b) Maximum possible link length (operating at 400 Mbit s^-1) = 64 km\n(c) Reduction in the maximum possible link length = 61 km\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.9, page 734"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-10 #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-41 #receiver sensitivity at 20 Mbit s^-1\nl1=7*2.6 #cabled fiber loss\nl2=6*0.5 #splice losses\nl3=1*1.5 #connector loss \nms=6 #safety margin\n\n#Calculation\nts=po-rs #Total system margin\ntsl=l1+l2+l3+ms #Total system loss\npm=ts-tsl #Excess power margin \n\n#Result\nprint'Total system margin = %d dB'%ts\nprint'Total system loss = %.1f dB'%tsl\nprint'Excess power margin = %.1f dB'%pm\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total system margin = 31 dB\nTotal system loss = 28.7 dB\nExcess power margin = 2.3 dB\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.10, page 740"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nv=5 #output voltage\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nk=1.385*10**-23 #boltzman constant\nt=290 #tempreture in kelvin\nzo=100 #cable impedance\nn=0.7 #quantum efficiency\npi=10**-3 #optical power\nlam=0.85*10**-6 #wavelength\n\n#Calculation\nratio=(v**2*h*c)/(2*k*t*zo*n*pi*lam) #ratio\nratio1=10*math.log10(ratio) #ration in dB\n\n#Result\nprint'Ratio = %d dB'%ratio1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio = 40 dB\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.11, page 744"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nma=0.8 #modulation index\nR=0.5 #responsivity\nb=0.7 #ratio of luminance to composite video\nsnr=3.162*10**5 #SNR\ne=1.602*10**-19 #electron volt\nB=5*10**6 #bandwidth\nK=1.385*10**-23 #boltzman constant \nT=293 #tempreture in kelvin\nFn=1.413\nRl=10**6\n\n#Calculation\na=(2*ma*R*b)**2\nc=snr*2*e*B*R\nd=snr*4*K*T*B*Fn/Rl\nf = (c**2)+(4*a*d)\npo=(c+math.sqrt(f))/(2*a) #average incident optical power \npo1=10*math.log10(po*1000) #in dB\n\n#Result\nprint'Average incident optical power = %.2f uW'%(po*10**6)\nprint' = %.1f dB m'%po1\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Average incident optical power = 0.93 uW\n = -30.3 dB m\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.12, page 747"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\ne=1.602*10**-19 #1 electron volt\nn=0.6 #p\u2013i\u2013n photodiode quantum efficiency\nma=0.5 #modulation index\nlam=10**-6 #wavelength\nk=1.385*10**-23 #boltzman constant \nt=300 #tempreture in kelvin\nf=4 #amplifier noise figure\nrl=50*10**3 #effective load impedance\nsn=3.162*10**4 #signal to noise ratio\nB=10**7 #bandwidth\n\n#Calculation\na=h*c/(e*n*ma**2*lam)\nb=math.sqrt((8*k*t*f)/rl)\nc=math.sqrt(sn*B)\npo=a*b*c #optical power\npo1=10*math.log10(po*1000) #optical power in dB\n\n#Result\nprint'Optical power, Po = %.2f uW'%(po*10**6)\nprint' = %.1f dBm'%po1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power, Po = 7.58 uW\n = -21.2 dBm\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.13, page 748"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=-10 #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-25 #receiver sensitivity \nl1=2*3.5 #cable fiber loss\nl2=2*0.7 #splice losses\nl3=1.6 #connector loss \nms=4.0 #safety margin\nafc=3.5\nai=0.7\nacr=1.6\nma=7\n\n#Calculation\nts=po-rs #Total system margi\ntsl=l1+l2+l3+ms #Total system loss\npm=ts-tsl #Excess power margin \nL=((0-rs)-(acr+ma))/(afc+ai)\n\n#Result\nprint'(a) Total system margin = %d dB'%ts\nprint' Total system loss = %.1f dB'%tsl\nprint' Excess power margin = %.1f dB'%pm\nprint'\\n(b) Increase in link length = %.1f Km'%(L)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Total system margin = 15 dB\n Total system loss = 14.0 dB\n Excess power margin = 1.0 dB\n\n(b) Increase in link length = 3.9 Km\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.14, page 750"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nBop=6*10**6\nts=10 #rise time for source in ns\ntn=5*9 #for fiber intermodal\ntc=5*2 #for pulse broadening\ntd=3 #for detector\n\n\n#Calculation\ntsys=0.35/Bop\ntsys1=1.1*(ts**2+tn**2+tc**2+td**2)**0.5 #total system rise time\n\n#Result\nprint'Maximum permitted system rise time = %.1f ns'%(tsys*10**9)\nprint'Total system rise time = %.1f ns'%(tsys1)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum permitted system rise time = 58.3 ns\nTotal system rise time = 52.0 ns\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.15, page 755"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nfd=400*10**3 #peak frequency deviation\nBa=4*10**3 #bandwidth\n\n#Calculation\nDf=fd/Ba #frequency deviation ratio\nsnr=1.76+(20*math.log10(Df)) #SNR improvement\nBm=2*(Df+1)*Ba #bandwidth of the FM\u2013IM signal \n \n#Result\nprint'(a) SNR improvement = %.2f dB'%snr\nprint'(b) Frequency deviation ratio = %d'%Df\nprint' Bandwidth of FM-IM signal = %d kHz'%(Bm/1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) SNR improvement = 41.76 dB\n(b) Frequency deviation ratio = 100\n Bandwidth of FM-IM signal = 808 kHz\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.16, page 757"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nfm=3 #output FM ratio\npm=1 #output PM ratio\n\n#Calculation\nratio=fm/pm #SNR ratio\nratio1=10*math.log10(ratio) #SNR ratio in dB\n\n#Result\nprint'Ratio of output SNR = %.2f dB'%(ratio1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio of output SNR = 4.77 dB\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.17, page 759"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=5*10**-8 #nominal pulse period\nfd=5*10**6 #Peak-to-peak frequency deviation\nM=60 #A PD multiplication factor\nR=0.7 #A PD responsivity\npo=10**-7 #peak optical power at receiver\ntr=12*10**-9 #Total system 10\u201390% rise time\nB=6*10**6 #baseband noise bandwidth\ni=10**-17 #Receiver mean square noise current\n\n\n#Calculation\nsnp=(3*(to*fd*M*R*po)**2)/(i*(2*math.pi*tr*B)**2) #peak-to-peak signal to rms noise ratio\nsnp1=10*math.log10(snp) #in dB\n\n#Result\nprint'Peak-to-peak signal to rms noise ratio = %.1f dB'%snp1\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Peak-to-peak signal to rms noise ratio = 62.1 dB\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.18, page 763"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "%pylab inline\nimport math\nfrom pylab import *\nfrom numpy import *\n\n#Variable declaration\nacr=1 #connector loss in dB\nafc=5 #loss per kilometer in dB\nLbu=0.1 #fiber length between each of the access couplers\nLac=1 #insertion loss\nLtr=10 #loss due to the tap ratio\nLsp=3 #splitting loss\n \n#Calculating, we get two equation in terms of N, no of nodes, i.e C(1,N-1)=(3.5*N)+8.5 and C(star)=4.5+(10*log10(N)) \n\n#For Bus distribution system\n\nfor N in range(1,13,1):\n C=(3.5*N)+8.5;\n a=plot(N,C,'.r')\n \n \n#for Star distribution system\n \nfor N in range(1,30,1):\n C1=4.5+(10*log10(N));\n b=plot(N,C1,'.g')\n \n \n#To show plot in same graph\n#Graphical comparison showing total channel loss against number of nodes\n\nxlabel(\"Number of nodes $N$\")\nylabel(\"Total channel loss $CL$ (dB)\")\ngrid()\nshow(a)\nshow(b)\n",
+ "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": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEOCAYAAABmVAtTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHX6B/DPqCgpJWgxmPprfJmoXIRREbdCpxAsTUQU\nq/UCarLpul1Nrd2Ktq1wU1O77UvXTUqp2LYIWzE1QbEyFbDLamIpWi2gCSheUIHv7w/irCjinMOc\nmTnf+bxfr14xw1yep7N7Hs7znPM9JiGEABEREYA2rg6AiIjcB4sCEREpWBSIiEjBokBERAoWBSIi\nUrAoEBGRwqlFoaqqChMmTED//v0RFBSEL7/8EhUVFYiJiUFgYC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Lb6WPBOLArmFhx9+GAMHDsS0adMAAO3atVNaJACU1g8AdOjQ\nQfm5TZs2aN++vfJzbW2t8ruLe/JCCJhMJgghkJSUhBdeeKHZODp16tTs843vvfTzrubiWNu2bavk\ncelntfRzSzH36dMHRUVF+Pe//40//elPiI6OxlNPPdXkNWVlZbjxxhsBAOPHj8fQoUMREhJy1djJ\nM3GmQG7Bz88PEydOxKpVq2AymWA2m3H06FFUVFTg3Llz+Pjjj1UPXo8cOYIdO3YAADIyMhAVFYXo\n6Gi8//77OHbsGICGG5sfOXLkqp8VFRWFrKwsnD17FqdPn0ZWVhaioqLUJ3qFzxo2bBiGDRuGrKws\n1NTUoLq6Wsm5pZhLS0vh7e2NSZMmYe7cuSgsLLzs+3bt2oWBAwcCaDgqCwkJUT6L6FI8UiCXunhH\n/9hjj+HVV18F0HCk8PTTT2PIkCHo3r07goKCmn3PpY8v/rlv37547bXXMH36dAQHB2PWrFnw9vbG\nX/7yF8TGxqK+vh5eXl54/fXX8X//93/NfnYjq9WK5ORkpbU0c+ZMpXXUUrFqLtaWPuuee+5BWFgY\n/P39ld/379//ijF/8803ePzxx5UjpjfeeKPJ923ZsgWpqak4d+4cJkyYAKChlda1a9crxkyejUtn\nExGRgu0jIiJSsCgQEZGCRYGIiBQsCkREpGBRICIiBYsCEREpWBSIiEjBokBERIr/B5KTkPe2LreW\nAAAAAElFTkSuQmCC\n",
+ "text": "<matplotlib.figure.Figure at 0x3f7ea90>"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.19, page 782"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\nlam=1.55*10**-6 #wavelength\nL=100*10**3 #length\nK=4 \nB=1.2*10**9 #bandwidth\nsnr=50 #SNR\na=10**-2.5\npi=10**-3\n\n#Calculation\nLt=(pi*lam*a*L)/(K*h*c*B*snr) #link with a large number of cascaded amplifiers\n\n#Result\nprint'Maximum system length = %d x 10^4 km'%(Lt/10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum system length = 1 x 10^4 km\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.21, page 791"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nb=17 #second-order dispersion coefficient for the latter path\nL2=20 #path length in km\nL1=160.00 #path length in km\ns1=-0.075 #dispersion slope\n\n#Calculation\na=-b*L2\nG=a/L1 #second-order dispersion coefficient\ns2=s1*L1/L2 #chromatic dispersion slope\n\n#Result\nprint'(a) Second-order dispersion coefficient = %.3f ps nm^-1 km^-1'%G \nprint'(b) chromatic dispersion slope = %.1f ps nm^-2 km^-1'%s2",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Second-order dispersion coefficient = -2.125 ps nm^-1 km^-1\n(b) chromatic dispersion slope = -0.6 ps nm^-2 km^-1\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.22, page 798"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=70*10**-12 #bit period\nt=6*10**-12 #RZ pulse width\nB2=50*10**-12*10**-12*10**-3 #second-order dispersion coefficient\nL=50*10**3 #amplifier spacing\n\n#Calculation\nqo=0.5*to/t #separation of the soliton pulses \nBt=(2*qo*math.sqrt(B2*L))**-1 #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^9'%(Bt*10**-8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Separation = 5.8\n(b) Transmission bit rate = 17.14 x 10^9\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 12.23, page 799"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nto=40*10**-12 #bit period\nt=4*10**-12 #RZ pulse width\na=0.2*10**-3 #attenuation coefficient\nB2=1.25*10**-12*10**-12*10**-3 #second-order dispersion coefficient\n\n#Calculation\nqo=0.5*to/t #separation of the soliton pulses \nb=1/(2*qo)\nc=math.sqrt(a/B2)\nBt=b*c #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^10 bit s^-1'%(Bt*10**-10)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Separation = 5.0\n(b) Transmission bit rate = 4.00 x 10^10 bit s^-1\n"
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter13.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter13.ipynb
new file mode 100755
index 00000000..3392b3ce
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter13.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter_13"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 13: Optical fiber systems 2: coherent and phase-modulated"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.1, page 832"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nf1=150*10**6 #reciever IF\nf2=19*10**9 #output frequency change\n\n\n#Calculation\nm=f1*f2**-1 #maximum tempreture change\n\n#Result\nprint'Maximum tempreture change = %d \u00d7 10^-3 \u00b0C '%round(m*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum tempreture change = 8 \u00d7 10^-3 \u00b0C \n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.2, page 834"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np=-85.45/10\nn=0.86 #quantum efficiency\nh1=1.54*10**-6 #homodyne receiver operating wavelength\nsn=10**-1.2 #SNR\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\n\n\n#Calculation\nps=10**(p) #incoming signal power in dB\nB=(n*ps*sn*h1)/(h*c) #Bandwidth\n\n#Result\nprint'Incoming signal power, Ps = %f nW'%(ps*10**9)\nprint'Operating bandwidth, B = %.1f GHz'%(B*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incoming signal power, Ps = 2.851018 nW\nOperating bandwidth, B = 1.2 GHz\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.3, page 878"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\npe=4.24 #probability error function\npe2=20 #probability exponential function\n\n\n#Calculation\nNp=pe**2*4 #no of photons\nNp2=pe2*4\nNp3=pe**2/2\n\n#Result\nprint'(a) ASK heterodyne synchronous detection = %d photons'%round(Np)\nprint'(b) ASK heterodyne asynchronous detection = %d photons'%round(Np2)\nprint'(c) pSK homodyne detection = %d photons'%round(Np3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) ASK heterodyne synchronous detection = 72 photons\n(b) ASK heterodyne asynchronous detection = 80 photons\n(c) pSK homodyne detection = 9 photons\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.4, page 881"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nBt=400*10**6 #FSK signal bit rate\nh=1.55*10**-6 #wavelength\n\n#Calculation\nps=(36*h1*c*Bt)/(h) #optical power\n\n#Result\nprint'Minimum incoming optical power level = %.1f nW'%(ps*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum incoming optical power level = 1.8 nW\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.5, page 883"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNp=36 #average photons\nNp2=9 #average photons\nh=6.63*10**-34 #plancks constant\nf=3*10**8 #frequency\nBt=50*10**6 #bit rates\nBt2=10**9 #bit rates\nh1=1.55*10**-6 #operating wavelength\na=0.2 #connector loss\n\n\n#Calculation\nPs=Np*h*f*Bt/h1 #in watt\nPs1=10*math.log10(Ps*10**3) #in dB\nma=4-Ps1 #Max. system margin\nmar=ma/a #Max. repeater spacing \n \nPs2=Np*h*f*Bt2/h1 #in watt\nPs3=10*math.log10(Ps2*10**3) #in dB\nma1=4-Ps3 #Max. system margin\nmar1=ma1/a #Max. repeater spacing \n\nPs4=Np2*h*f*Bt/h1 #in watt\nPs5=10*math.log10(Ps4*10**3) #in dB\nma2=4-Ps5 #Max. system margin\nmar2=ma2/a #Max. repeater spacing \n\nPs6=Np2*h*f*Bt2/h1 #in watt\nPs7=10*math.log10(Ps6*10**3) #in dB\nma3=4-Ps7 #Max. system margin\nmar3=ma3/a #Max. repeater spacing \n\n\n#Result\nprint'(a)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar)\nprint' (1 Gbit s^-1) = %.1f km'%round(mar1)\nprint'\\n(b)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar2)\nprint' (1 Gbit s^-1) = %.1f km'%round(mar3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a)Max. repeater spacing (50 Mbit s^-1) = 352.0 km\n (1 Gbit s^-1) = 287.0 km\n\n(b)Max. repeater spacing (50 Mbit s^-1) = 382.0 km\n (1 Gbit s^-1) = 317.0 km\n"
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.6, page 888"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nnp=150\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nbf=20*10**12 #optical bandwidth\nh=1.3*10**-6 #wavelength\n\n#Calculation\ntx=(np*h1*c*bf)/h #transmitter power\n\n#Result\nprint'Minimum transmitter power = %.1f mW' %(tx*1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum transmitter power = 0.5 mW\n"
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter13_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter13_1.ipynb
new file mode 100755
index 00000000..3392b3ce
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter13_1.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter_13"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 13: Optical fiber systems 2: coherent and phase-modulated"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.1, page 832"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nf1=150*10**6 #reciever IF\nf2=19*10**9 #output frequency change\n\n\n#Calculation\nm=f1*f2**-1 #maximum tempreture change\n\n#Result\nprint'Maximum tempreture change = %d \u00d7 10^-3 \u00b0C '%round(m*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum tempreture change = 8 \u00d7 10^-3 \u00b0C \n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.2, page 834"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np=-85.45/10\nn=0.86 #quantum efficiency\nh1=1.54*10**-6 #homodyne receiver operating wavelength\nsn=10**-1.2 #SNR\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\n\n\n#Calculation\nps=10**(p) #incoming signal power in dB\nB=(n*ps*sn*h1)/(h*c) #Bandwidth\n\n#Result\nprint'Incoming signal power, Ps = %f nW'%(ps*10**9)\nprint'Operating bandwidth, B = %.1f GHz'%(B*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incoming signal power, Ps = 2.851018 nW\nOperating bandwidth, B = 1.2 GHz\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.3, page 878"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\npe=4.24 #probability error function\npe2=20 #probability exponential function\n\n\n#Calculation\nNp=pe**2*4 #no of photons\nNp2=pe2*4\nNp3=pe**2/2\n\n#Result\nprint'(a) ASK heterodyne synchronous detection = %d photons'%round(Np)\nprint'(b) ASK heterodyne asynchronous detection = %d photons'%round(Np2)\nprint'(c) pSK homodyne detection = %d photons'%round(Np3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) ASK heterodyne synchronous detection = 72 photons\n(b) ASK heterodyne asynchronous detection = 80 photons\n(c) pSK homodyne detection = 9 photons\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.4, page 881"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nBt=400*10**6 #FSK signal bit rate\nh=1.55*10**-6 #wavelength\n\n#Calculation\nps=(36*h1*c*Bt)/(h) #optical power\n\n#Result\nprint'Minimum incoming optical power level = %.1f nW'%(ps*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum incoming optical power level = 1.8 nW\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.5, page 883"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNp=36 #average photons\nNp2=9 #average photons\nh=6.63*10**-34 #plancks constant\nf=3*10**8 #frequency\nBt=50*10**6 #bit rates\nBt2=10**9 #bit rates\nh1=1.55*10**-6 #operating wavelength\na=0.2 #connector loss\n\n\n#Calculation\nPs=Np*h*f*Bt/h1 #in watt\nPs1=10*math.log10(Ps*10**3) #in dB\nma=4-Ps1 #Max. system margin\nmar=ma/a #Max. repeater spacing \n \nPs2=Np*h*f*Bt2/h1 #in watt\nPs3=10*math.log10(Ps2*10**3) #in dB\nma1=4-Ps3 #Max. system margin\nmar1=ma1/a #Max. repeater spacing \n\nPs4=Np2*h*f*Bt/h1 #in watt\nPs5=10*math.log10(Ps4*10**3) #in dB\nma2=4-Ps5 #Max. system margin\nmar2=ma2/a #Max. repeater spacing \n\nPs6=Np2*h*f*Bt2/h1 #in watt\nPs7=10*math.log10(Ps6*10**3) #in dB\nma3=4-Ps7 #Max. system margin\nmar3=ma3/a #Max. repeater spacing \n\n\n#Result\nprint'(a)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar)\nprint' (1 Gbit s^-1) = %.1f km'%round(mar1)\nprint'\\n(b)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar2)\nprint' (1 Gbit s^-1) = %.1f km'%round(mar3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a)Max. repeater spacing (50 Mbit s^-1) = 352.0 km\n (1 Gbit s^-1) = 287.0 km\n\n(b)Max. repeater spacing (50 Mbit s^-1) = 382.0 km\n (1 Gbit s^-1) = 317.0 km\n"
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.6, page 888"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nnp=150\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nbf=20*10**12 #optical bandwidth\nh=1.3*10**-6 #wavelength\n\n#Calculation\ntx=(np*h1*c*bf)/h #transmitter power\n\n#Result\nprint'Minimum transmitter power = %.1f mW' %(tx*1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum transmitter power = 0.5 mW\n"
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter13_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter13_2.ipynb
new file mode 100755
index 00000000..3392b3ce
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter13_2.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "Chapter_13"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 13: Optical fiber systems 2: coherent and phase-modulated"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.1, page 832"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nf1=150*10**6 #reciever IF\nf2=19*10**9 #output frequency change\n\n\n#Calculation\nm=f1*f2**-1 #maximum tempreture change\n\n#Result\nprint'Maximum tempreture change = %d \u00d7 10^-3 \u00b0C '%round(m*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum tempreture change = 8 \u00d7 10^-3 \u00b0C \n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.2, page 834"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np=-85.45/10\nn=0.86 #quantum efficiency\nh1=1.54*10**-6 #homodyne receiver operating wavelength\nsn=10**-1.2 #SNR\nh=6.626*10**-34 #plancks constant\nc=2.998*10**8 #velocity of light\n\n\n#Calculation\nps=10**(p) #incoming signal power in dB\nB=(n*ps*sn*h1)/(h*c) #Bandwidth\n\n#Result\nprint'Incoming signal power, Ps = %f nW'%(ps*10**9)\nprint'Operating bandwidth, B = %.1f GHz'%(B*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incoming signal power, Ps = 2.851018 nW\nOperating bandwidth, B = 1.2 GHz\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.3, page 878"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\npe=4.24 #probability error function\npe2=20 #probability exponential function\n\n\n#Calculation\nNp=pe**2*4 #no of photons\nNp2=pe2*4\nNp3=pe**2/2\n\n#Result\nprint'(a) ASK heterodyne synchronous detection = %d photons'%round(Np)\nprint'(b) ASK heterodyne asynchronous detection = %d photons'%round(Np2)\nprint'(c) pSK homodyne detection = %d photons'%round(Np3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) ASK heterodyne synchronous detection = 72 photons\n(b) ASK heterodyne asynchronous detection = 80 photons\n(c) pSK homodyne detection = 9 photons\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.4, page 881"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nBt=400*10**6 #FSK signal bit rate\nh=1.55*10**-6 #wavelength\n\n#Calculation\nps=(36*h1*c*Bt)/(h) #optical power\n\n#Result\nprint'Minimum incoming optical power level = %.1f nW'%(ps*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum incoming optical power level = 1.8 nW\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.5, page 883"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNp=36 #average photons\nNp2=9 #average photons\nh=6.63*10**-34 #plancks constant\nf=3*10**8 #frequency\nBt=50*10**6 #bit rates\nBt2=10**9 #bit rates\nh1=1.55*10**-6 #operating wavelength\na=0.2 #connector loss\n\n\n#Calculation\nPs=Np*h*f*Bt/h1 #in watt\nPs1=10*math.log10(Ps*10**3) #in dB\nma=4-Ps1 #Max. system margin\nmar=ma/a #Max. repeater spacing \n \nPs2=Np*h*f*Bt2/h1 #in watt\nPs3=10*math.log10(Ps2*10**3) #in dB\nma1=4-Ps3 #Max. system margin\nmar1=ma1/a #Max. repeater spacing \n\nPs4=Np2*h*f*Bt/h1 #in watt\nPs5=10*math.log10(Ps4*10**3) #in dB\nma2=4-Ps5 #Max. system margin\nmar2=ma2/a #Max. repeater spacing \n\nPs6=Np2*h*f*Bt2/h1 #in watt\nPs7=10*math.log10(Ps6*10**3) #in dB\nma3=4-Ps7 #Max. system margin\nmar3=ma3/a #Max. repeater spacing \n\n\n#Result\nprint'(a)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar)\nprint' (1 Gbit s^-1) = %.1f km'%round(mar1)\nprint'\\n(b)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar2)\nprint' (1 Gbit s^-1) = %.1f km'%round(mar3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a)Max. repeater spacing (50 Mbit s^-1) = 352.0 km\n (1 Gbit s^-1) = 287.0 km\n\n(b)Max. repeater spacing (50 Mbit s^-1) = 382.0 km\n (1 Gbit s^-1) = 317.0 km\n"
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 13.6, page 888"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nnp=150\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nbf=20*10**12 #optical bandwidth\nh=1.3*10**-6 #wavelength\n\n#Calculation\ntx=(np*h1*c*bf)/h #transmitter power\n\n#Result\nprint'Minimum transmitter power = %.1f mW' %(tx*1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum transmitter power = 0.5 mW\n"
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter14.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter14.ipynb
new file mode 100755
index 00000000..80d85c26
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter14.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_14"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 14 : Optical fiber measurements"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.1, page 912"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nv2=10.7 #increased voltage\nv1=2.1 #voltage\nl1=2 #length in Km\nl2=0.002 #length in Km\n\n\n\n#Calculation\na=(10/(l1-l2))*math.log10(v2/v1) #Attenuation\nu=0.2/(l1-l2) #incertainty\n\n#Result\nprint'Attenuation per Km = %.1f dB Km^-1'%a\nprint'Uncertainty = \u00b1 %.1f dB'%u",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Attenuation per Km = 3.5 dB Km^-1\nUncertainty = \u00b1 0.1 dB\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.2, page 917"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt2=100 #time in sec\nt1=10 #time in sec\nti=0.525 #micro voltage\nto=0.021 #micro voltage\nC=1.64*10**4 #thermal capacity\ntin=4.3*10**-4 #maximum temperature rise\npop=98*10**-3 #optical power\n\n\n#Calculation\ntc=(t2-t1)/(math.log(ti)-math.log(to)) #time constant for the calorimeter\na=(C*tin)/(pop*tc) #absortion loss\n\n#Result\nprint'Absorption loss in dB = %.1f dB Km^-1'%a",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Absorption loss in dB = 2.6 dB Km^-1\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.3, page 919"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nVsc=6.14*10**-9 #voltage\nVop=153.38*10**-6 #voltage without scattering\nl=2.92 #length of fibre in cm\n\n\n#Calculation\na=4.343*10**5*Vsc/(l*Vop) #scattering loss\n\n#Result\nprint'Scattering loss in dB = %.1f dB Km^-1'%a",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Scattering loss in dB = 6.0 dB Km^-1\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.4, page 922"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt1=12.6*10**-9 #time in sec\nt2=0.3*10**-9 #time in sec\n\n\n\n#Calculation\nt=math.sqrt(t1**2-t2**2)/1.2 #pulse broadening \nBop=0.44/t #bandwidth length product\n\n#Result\nprint'(a) 3dB pulse broadening = %.1f ns km^-1'%(t*10**9)\nprint'(b) Fiber bandwidth\u2013length product = %.1f MHz km'%(Bop*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) 3dB pulse broadening = 10.5 ns km^-1\n(b) Fiber bandwidth\u2013length product = 41.9 MHz km\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.5, page 940"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nA=6.2 #output pattern size\nD=10 #screen position\n\n#Calculation\nNA=A/math.sqrt(A**2+(4*D**2)) #numerical aperture\n\n#Result\nprint'Numerical aperture = %.2f'%NA",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Numerical aperture = 0.30\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.6, page 942"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nphi=4 #angular velocity\nl=0.1 #length in meter\nwe=300*10**-6 #shadow pulse width\n\n#Calculation\ns=l*phi #shadow velocity\nd=we*s #fibre diameter\n\n#Result\nprint'Outer fibre diameter = %.1f um'%(d*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Outer fibre diameter = 120.0 um\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.7, page 950"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\na=5*10**-3 #optical signal power\nb=20*10**-6 #optical signal power\nc=0.3*10**-3 #optical signal power\nd=800*10**-9 #optical signal power\n\n#Calculation\nadb=10*math.log10(a*10**3) #in dBm\nbdb=10*math.log10(b*10**3) #in dBm\ncdb=10*math.log10(c*10**6) #in dBu\nddb=10*math.log10(d*10**6) #in dBu\n\n#Result\nprint'(a) For a 1 mW reference power level'\nprint' optical signal power of 5 mW = %.2f dBm'%adb\nprint' optical signal power of 20 uW = %.2f dBm'%bdb\nprint'\\n(b) For a 1 \u03bcW reference power level'\nprint' optical signal power of 0.3 mW = %.2f dBu'%cdb #value given in a textbook is incorrect\nprint' optical signal power of 800 nW = %.2f dBu'%ddb",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) For a 1 mW reference power level\n optical signal power of 5 mW = 6.99 dBm\n optical signal power of 20 uW = -16.99 dBm\n\n(b) For a 1 \u03bcW reference power level\n optical signal power of 0.3 mW = 24.77 dBu\n optical signal power of 800 nW = -0.97 dBu\n"
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.8, page 953"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.02 #numerical aperture\nyr=0.7*10**-3 #Rayleigh scattering coefficient\nc=2.998*10**8 #speed of light\nwo=50*10**-9 #pulse time\nn1=1.5\n\n#Calculation\np=0.5*(((NA**2)*yr*wo*c)/(4*(n1**3))) #power ratio\npdb=10*math.log10(p*10**3) #in dB\n\n#Result\nprint'Power ratio = %.3f X 10^-7'%(p*10**7) #value given in a textbook is incorrect\nprint'Power ratio in dB = %.1f dB'%pdb #value given in a textbook is incorrect",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Power ratio = 1.555 X 10^-7\nPower ratio in dB = -38.1 dB\n"
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter14_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter14_1.ipynb
new file mode 100755
index 00000000..80d85c26
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter14_1.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_14"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 14 : Optical fiber measurements"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.1, page 912"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nv2=10.7 #increased voltage\nv1=2.1 #voltage\nl1=2 #length in Km\nl2=0.002 #length in Km\n\n\n\n#Calculation\na=(10/(l1-l2))*math.log10(v2/v1) #Attenuation\nu=0.2/(l1-l2) #incertainty\n\n#Result\nprint'Attenuation per Km = %.1f dB Km^-1'%a\nprint'Uncertainty = \u00b1 %.1f dB'%u",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Attenuation per Km = 3.5 dB Km^-1\nUncertainty = \u00b1 0.1 dB\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.2, page 917"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt2=100 #time in sec\nt1=10 #time in sec\nti=0.525 #micro voltage\nto=0.021 #micro voltage\nC=1.64*10**4 #thermal capacity\ntin=4.3*10**-4 #maximum temperature rise\npop=98*10**-3 #optical power\n\n\n#Calculation\ntc=(t2-t1)/(math.log(ti)-math.log(to)) #time constant for the calorimeter\na=(C*tin)/(pop*tc) #absortion loss\n\n#Result\nprint'Absorption loss in dB = %.1f dB Km^-1'%a",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Absorption loss in dB = 2.6 dB Km^-1\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.3, page 919"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nVsc=6.14*10**-9 #voltage\nVop=153.38*10**-6 #voltage without scattering\nl=2.92 #length of fibre in cm\n\n\n#Calculation\na=4.343*10**5*Vsc/(l*Vop) #scattering loss\n\n#Result\nprint'Scattering loss in dB = %.1f dB Km^-1'%a",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Scattering loss in dB = 6.0 dB Km^-1\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.4, page 922"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt1=12.6*10**-9 #time in sec\nt2=0.3*10**-9 #time in sec\n\n\n\n#Calculation\nt=math.sqrt(t1**2-t2**2)/1.2 #pulse broadening \nBop=0.44/t #bandwidth length product\n\n#Result\nprint'(a) 3dB pulse broadening = %.1f ns km^-1'%(t*10**9)\nprint'(b) Fiber bandwidth\u2013length product = %.1f MHz km'%(Bop*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) 3dB pulse broadening = 10.5 ns km^-1\n(b) Fiber bandwidth\u2013length product = 41.9 MHz km\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.5, page 940"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nA=6.2 #output pattern size\nD=10 #screen position\n\n#Calculation\nNA=A/math.sqrt(A**2+(4*D**2)) #numerical aperture\n\n#Result\nprint'Numerical aperture = %.2f'%NA",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Numerical aperture = 0.30\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.6, page 942"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nphi=4 #angular velocity\nl=0.1 #length in meter\nwe=300*10**-6 #shadow pulse width\n\n#Calculation\ns=l*phi #shadow velocity\nd=we*s #fibre diameter\n\n#Result\nprint'Outer fibre diameter = %.1f um'%(d*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Outer fibre diameter = 120.0 um\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.7, page 950"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\na=5*10**-3 #optical signal power\nb=20*10**-6 #optical signal power\nc=0.3*10**-3 #optical signal power\nd=800*10**-9 #optical signal power\n\n#Calculation\nadb=10*math.log10(a*10**3) #in dBm\nbdb=10*math.log10(b*10**3) #in dBm\ncdb=10*math.log10(c*10**6) #in dBu\nddb=10*math.log10(d*10**6) #in dBu\n\n#Result\nprint'(a) For a 1 mW reference power level'\nprint' optical signal power of 5 mW = %.2f dBm'%adb\nprint' optical signal power of 20 uW = %.2f dBm'%bdb\nprint'\\n(b) For a 1 \u03bcW reference power level'\nprint' optical signal power of 0.3 mW = %.2f dBu'%cdb #value given in a textbook is incorrect\nprint' optical signal power of 800 nW = %.2f dBu'%ddb",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) For a 1 mW reference power level\n optical signal power of 5 mW = 6.99 dBm\n optical signal power of 20 uW = -16.99 dBm\n\n(b) For a 1 \u03bcW reference power level\n optical signal power of 0.3 mW = 24.77 dBu\n optical signal power of 800 nW = -0.97 dBu\n"
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.8, page 953"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.02 #numerical aperture\nyr=0.7*10**-3 #Rayleigh scattering coefficient\nc=2.998*10**8 #speed of light\nwo=50*10**-9 #pulse time\nn1=1.5\n\n#Calculation\np=0.5*(((NA**2)*yr*wo*c)/(4*(n1**3))) #power ratio\npdb=10*math.log10(p*10**3) #in dB\n\n#Result\nprint'Power ratio = %.3f X 10^-7'%(p*10**7) #value given in a textbook is incorrect\nprint'Power ratio in dB = %.1f dB'%pdb #value given in a textbook is incorrect",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Power ratio = 1.555 X 10^-7\nPower ratio in dB = -38.1 dB\n"
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter14_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter14_2.ipynb
new file mode 100755
index 00000000..80d85c26
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter14_2.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_14"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 14 : Optical fiber measurements"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.1, page 912"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nv2=10.7 #increased voltage\nv1=2.1 #voltage\nl1=2 #length in Km\nl2=0.002 #length in Km\n\n\n\n#Calculation\na=(10/(l1-l2))*math.log10(v2/v1) #Attenuation\nu=0.2/(l1-l2) #incertainty\n\n#Result\nprint'Attenuation per Km = %.1f dB Km^-1'%a\nprint'Uncertainty = \u00b1 %.1f dB'%u",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Attenuation per Km = 3.5 dB Km^-1\nUncertainty = \u00b1 0.1 dB\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.2, page 917"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt2=100 #time in sec\nt1=10 #time in sec\nti=0.525 #micro voltage\nto=0.021 #micro voltage\nC=1.64*10**4 #thermal capacity\ntin=4.3*10**-4 #maximum temperature rise\npop=98*10**-3 #optical power\n\n\n#Calculation\ntc=(t2-t1)/(math.log(ti)-math.log(to)) #time constant for the calorimeter\na=(C*tin)/(pop*tc) #absortion loss\n\n#Result\nprint'Absorption loss in dB = %.1f dB Km^-1'%a",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Absorption loss in dB = 2.6 dB Km^-1\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.3, page 919"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nVsc=6.14*10**-9 #voltage\nVop=153.38*10**-6 #voltage without scattering\nl=2.92 #length of fibre in cm\n\n\n#Calculation\na=4.343*10**5*Vsc/(l*Vop) #scattering loss\n\n#Result\nprint'Scattering loss in dB = %.1f dB Km^-1'%a",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Scattering loss in dB = 6.0 dB Km^-1\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.4, page 922"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt1=12.6*10**-9 #time in sec\nt2=0.3*10**-9 #time in sec\n\n\n\n#Calculation\nt=math.sqrt(t1**2-t2**2)/1.2 #pulse broadening \nBop=0.44/t #bandwidth length product\n\n#Result\nprint'(a) 3dB pulse broadening = %.1f ns km^-1'%(t*10**9)\nprint'(b) Fiber bandwidth\u2013length product = %.1f MHz km'%(Bop*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) 3dB pulse broadening = 10.5 ns km^-1\n(b) Fiber bandwidth\u2013length product = 41.9 MHz km\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.5, page 940"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nA=6.2 #output pattern size\nD=10 #screen position\n\n#Calculation\nNA=A/math.sqrt(A**2+(4*D**2)) #numerical aperture\n\n#Result\nprint'Numerical aperture = %.2f'%NA",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Numerical aperture = 0.30\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.6, page 942"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nphi=4 #angular velocity\nl=0.1 #length in meter\nwe=300*10**-6 #shadow pulse width\n\n#Calculation\ns=l*phi #shadow velocity\nd=we*s #fibre diameter\n\n#Result\nprint'Outer fibre diameter = %.1f um'%(d*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Outer fibre diameter = 120.0 um\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.7, page 950"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\na=5*10**-3 #optical signal power\nb=20*10**-6 #optical signal power\nc=0.3*10**-3 #optical signal power\nd=800*10**-9 #optical signal power\n\n#Calculation\nadb=10*math.log10(a*10**3) #in dBm\nbdb=10*math.log10(b*10**3) #in dBm\ncdb=10*math.log10(c*10**6) #in dBu\nddb=10*math.log10(d*10**6) #in dBu\n\n#Result\nprint'(a) For a 1 mW reference power level'\nprint' optical signal power of 5 mW = %.2f dBm'%adb\nprint' optical signal power of 20 uW = %.2f dBm'%bdb\nprint'\\n(b) For a 1 \u03bcW reference power level'\nprint' optical signal power of 0.3 mW = %.2f dBu'%cdb #value given in a textbook is incorrect\nprint' optical signal power of 800 nW = %.2f dBu'%ddb",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) For a 1 mW reference power level\n optical signal power of 5 mW = 6.99 dBm\n optical signal power of 20 uW = -16.99 dBm\n\n(b) For a 1 \u03bcW reference power level\n optical signal power of 0.3 mW = 24.77 dBu\n optical signal power of 800 nW = -0.97 dBu\n"
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 14.8, page 953"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.02 #numerical aperture\nyr=0.7*10**-3 #Rayleigh scattering coefficient\nc=2.998*10**8 #speed of light\nwo=50*10**-9 #pulse time\nn1=1.5\n\n#Calculation\np=0.5*(((NA**2)*yr*wo*c)/(4*(n1**3))) #power ratio\npdb=10*math.log10(p*10**3) #in dB\n\n#Result\nprint'Power ratio = %.3f X 10^-7'%(p*10**7) #value given in a textbook is incorrect\nprint'Power ratio in dB = %.1f dB'%pdb #value given in a textbook is incorrect",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Power ratio = 1.555 X 10^-7\nPower ratio in dB = -38.1 dB\n"
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter15.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter15.ipynb
new file mode 100755
index 00000000..06ca7e54
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter15.ipynb
@@ -0,0 +1,28 @@
+{
+ "metadata": {
+ "name": "Chapter_15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 15:- Optical networks"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Theoretical chapter",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter15_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter15_1.ipynb
new file mode 100755
index 00000000..06ca7e54
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter15_1.ipynb
@@ -0,0 +1,28 @@
+{
+ "metadata": {
+ "name": "Chapter_15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 15:- Optical networks"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Theoretical chapter",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter15_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter15_2.ipynb
new file mode 100755
index 00000000..06ca7e54
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter15_2.ipynb
@@ -0,0 +1,28 @@
+{
+ "metadata": {
+ "name": "Chapter_15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 15:- Optical networks"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Theoretical chapter",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter1_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter1_1.ipynb
new file mode 100755
index 00000000..76fe396c
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter1_1.ipynb
@@ -0,0 +1,28 @@
+{
+ "metadata": {
+ "name": "Chapter_1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 :- Introduction"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Theortical Chapter",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter1_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter1_2.ipynb
new file mode 100755
index 00000000..76fe396c
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter1_2.ipynb
@@ -0,0 +1,28 @@
+{
+ "metadata": {
+ "name": "Chapter_1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 1 :- Introduction"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# Theortical Chapter",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter2.ipynb
new file mode 100755
index 00000000..81d67649
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter2.ipynb
@@ -0,0 +1,251 @@
+{
+ "metadata": {
+ "name": "Chapter_2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 : Optical fiber waveguides\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.1, page 19"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.50 #core refractive index\nn2=1.47 #cladding refractive index\n\n#Calculation\nphic=math.asin(n2/n1)*180/(math.pi) #critical angle at core cladding\nNA=math.sqrt(n1**2-n2**2) #numerical aperture\nphia=math.asin(NA)*180/math.pi #acceptance angle in air\n\n#Result\nprint'(a) Critical angle at the core-cladding = %.1f\u00b0'%phic\nprint'(b) NA for the fiber = %.2f'%NA\nprint'(c) Acceptance angle in air for the fiber = %.1f\u00b0'%phia",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Critical angle at the core-cladding = 78.5\u00b0\n(b) NA for the fiber = 0.30\n(c) Acceptance angle in air for the fiber = 17.4\u00b0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.2, page 20"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ndelta=0.01 #relative refractive index = 1%\nn1=1.46 #core index\n\n#Calculation\nNA=n1*math.sqrt(2*delta) #numerical aperture\nzeta=math.pi*(NA)**2 #solid acceptance angle\nn12=1-delta #ratio of(n2/n1)\nphic=math.asin(n12)*180/math.pi #critical angle\n\n#Result\nprint'Numerical aperture (NA) = %.2f'%NA\nprint'Solid acceptance angle = ',round((zeta),2),'rad'\nprint'Critical angle at core-cladding = %.1f\u00b0'%phic",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Numerical aperture (NA) = 0.21\nSolid acceptance angle = 0.13 rad\nCritical angle at core-cladding = 81.9\u00b0\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.3, page 23"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nNA=0.4 #numerical aperture\ny=50*math.pi/180 #angle between projection of the ray and radius of fibre of core (radians)\n\n#Calculation\nphia1=math.asin(NA)*180/math.pi #acceptance angle for meridional rays\nphia2=math.asin(NA/(math.cos(y)))*180/math.pi #acceptance angle for skew rays\n\n#Result\nprint'Acceptance angle for meridional rays = %.1f\u00b0'%phia1\nprint'Acceptance angle for skew rays = %.1f\u00b0'%phia2\nprint\"Therefore, acceptance angle for the skew rays is about 15\u00b0 greater thanthe corresponding angle for meridional rays\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Acceptance angle for meridional rays = 23.6\u00b0\nAcceptance angle for skew rays = 38.5\u00b0\nTherefore, acceptance angle for the skew rays is about 15\u00b0 greater thanthe corresponding angle for meridional rays\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.4, page 45"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nn1=1.48 #core index\na=40*10**-6 #radius of core\ndelta=1.5/100 #relative refractive index = 1.5%\nh=0.85*10**-6 #operating wavelength\n\n#Calculation \nV=(2*math.pi*a*n1*math.sqrt(2*delta))/h #normalized frequency for the fiber\nMs=(V**2)/2 #no of guided modes\n\n#Result\nprint 'Normalised frequency, V = %.1f'%V\nprint'Total number of guided modes, Ms = %d'%round(Ms)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Normalised frequency, V = 75.8\nTotal number of guided modes, Ms = 2872\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.5, page 54"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nNA=0.2 #numerical aperture\na=25*10**-6 #radius of core\nh=1*10**-6 #operating wavelength\n\n#Calculation \nV=(2*math.pi*a*NA)/h #normalized frequency for the fiber\nMg=(V**2)/4 #no of guided modes gor parabolic profile\n\n#Result\nprint 'Normalised frequency, V = %.1f'%V\nprint'Total number of guided modes, Mg = %d'%round(Mg)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Normalised frequency, V = 31.4\nTotal number of guided modes, Mg = 247\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.6, page 55"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#variable declaration\nn1=1.48 #core index \nh=0.85*10**-6 #operating wavelength\nV=2.4 #normalized frequency for the fiber\ndelta=1.5/100 #relative refractive index (RRI)= 1.5%\ndelta1=delta/10 #RRI difference reduced by 10\n\n#Calculation\na=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core\nd=2*a\na1=(V*h)/(2*math.pi*n1*math.sqrt(2*delta1)) #new radius of core\nd1=2*a1\n\n#Result\nprint 'Maximum core diameter for relative refractive index of 1.5 percent = ',round((d*10**6),2),\"um\"\nprint \"Maximum core diameter for relative refractive index = \",round(d1*10**6),\"um\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum core diameter for relative refractive index of 1.5 percent = 2.53 um\nMaximum core diameter for relative refractive index = 8.0 um\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.7, page 2.7"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#variable declaration\nn1=1.5 #core index \ndelta=0.01 #relative refractive index (RRI)= 1%\nh=1.3*10**-6 #operating wavelength\nalph=2\n\n#Calculation\nV=(2.4)*math.sqrt(1+(2/alph)) #normalized frequency for the fiber\na=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core\nd=2*a\n\n#Result\nprint \"Maximum core diameter for relative refractive index = \",round(d*10**6,1),\"um\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum core diameter for relative refractive index = 6.6 um\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.8, page 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\na=4.5*10**-6 #radius of core\nn1=1.46 #core index \ndelta=0.25/100 #relative refractive index (RRI)= 0.25%\n\n\n#Calculation \nhc=(2*math.pi*a*n1*math.sqrt(2*delta))/2.405 #cutoff wavelength\n\n\n#Result\nprint 'Fibre is single moded to a wavelength = ',round(hc*10**9),'nm'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fibre is single moded to a wavelength = 1214.0 nm\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.10, page 69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\nwo=5.8*10**-6 #spot size \nV=2.2 #normalized frequency\n\n#Calculation \na=wo/((0.65+1.619*V**(-1.5))+(2.879*V**-6)) #radius of the core\nd=2*a\n\n#Result\nprint'Fibre core diameter = ',round(d*10**6,1),\"um\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fibre core diameter = 9.9 um\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.11, page 73"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\nh=1.30*10**-6 #operating wavelength \nhc=1.08*10**-6 #cutoff wavelength\ntheta=12 #in angle (degree)\n\n#Calculation \naeff=3.832*h/(2*math.pi*math.sin(theta)) #effective core radius\nVeff=2.405*hc/h #effective normalised frequency\nwo=3.81*10**-6*(0.6043+(1.755*Veff**-1.5)+(2.78*Veff**-6)) #spot size\n\n#Result\nprint 'Spot size = ',round(wo*10**6,2),'um'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Spot size = 4.84 um\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.12, page 74"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nwo=5.2*10**-6 #spot size\nn1=1.485 #core index\nhc=1.190*10**-6 #cutoff wavelength\n\n#Calculation \naesi=1.820*wo #ESI core radius\nD=(0.293/n1**2)*(hc/aesi)**2 #ESI relative index difference\n\n#Result\nprint'ESI relative refractive index difference = ',round(D*10**2,2),'%'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "ESI relative refractive index difference = 0.21 %\n"
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter2_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter2_1.ipynb
new file mode 100755
index 00000000..81d67649
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter2_1.ipynb
@@ -0,0 +1,251 @@
+{
+ "metadata": {
+ "name": "Chapter_2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 : Optical fiber waveguides\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.1, page 19"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.50 #core refractive index\nn2=1.47 #cladding refractive index\n\n#Calculation\nphic=math.asin(n2/n1)*180/(math.pi) #critical angle at core cladding\nNA=math.sqrt(n1**2-n2**2) #numerical aperture\nphia=math.asin(NA)*180/math.pi #acceptance angle in air\n\n#Result\nprint'(a) Critical angle at the core-cladding = %.1f\u00b0'%phic\nprint'(b) NA for the fiber = %.2f'%NA\nprint'(c) Acceptance angle in air for the fiber = %.1f\u00b0'%phia",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Critical angle at the core-cladding = 78.5\u00b0\n(b) NA for the fiber = 0.30\n(c) Acceptance angle in air for the fiber = 17.4\u00b0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.2, page 20"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ndelta=0.01 #relative refractive index = 1%\nn1=1.46 #core index\n\n#Calculation\nNA=n1*math.sqrt(2*delta) #numerical aperture\nzeta=math.pi*(NA)**2 #solid acceptance angle\nn12=1-delta #ratio of(n2/n1)\nphic=math.asin(n12)*180/math.pi #critical angle\n\n#Result\nprint'Numerical aperture (NA) = %.2f'%NA\nprint'Solid acceptance angle = ',round((zeta),2),'rad'\nprint'Critical angle at core-cladding = %.1f\u00b0'%phic",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Numerical aperture (NA) = 0.21\nSolid acceptance angle = 0.13 rad\nCritical angle at core-cladding = 81.9\u00b0\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.3, page 23"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nNA=0.4 #numerical aperture\ny=50*math.pi/180 #angle between projection of the ray and radius of fibre of core (radians)\n\n#Calculation\nphia1=math.asin(NA)*180/math.pi #acceptance angle for meridional rays\nphia2=math.asin(NA/(math.cos(y)))*180/math.pi #acceptance angle for skew rays\n\n#Result\nprint'Acceptance angle for meridional rays = %.1f\u00b0'%phia1\nprint'Acceptance angle for skew rays = %.1f\u00b0'%phia2\nprint\"Therefore, acceptance angle for the skew rays is about 15\u00b0 greater thanthe corresponding angle for meridional rays\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Acceptance angle for meridional rays = 23.6\u00b0\nAcceptance angle for skew rays = 38.5\u00b0\nTherefore, acceptance angle for the skew rays is about 15\u00b0 greater thanthe corresponding angle for meridional rays\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.4, page 45"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nn1=1.48 #core index\na=40*10**-6 #radius of core\ndelta=1.5/100 #relative refractive index = 1.5%\nh=0.85*10**-6 #operating wavelength\n\n#Calculation \nV=(2*math.pi*a*n1*math.sqrt(2*delta))/h #normalized frequency for the fiber\nMs=(V**2)/2 #no of guided modes\n\n#Result\nprint 'Normalised frequency, V = %.1f'%V\nprint'Total number of guided modes, Ms = %d'%round(Ms)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Normalised frequency, V = 75.8\nTotal number of guided modes, Ms = 2872\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.5, page 54"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nNA=0.2 #numerical aperture\na=25*10**-6 #radius of core\nh=1*10**-6 #operating wavelength\n\n#Calculation \nV=(2*math.pi*a*NA)/h #normalized frequency for the fiber\nMg=(V**2)/4 #no of guided modes gor parabolic profile\n\n#Result\nprint 'Normalised frequency, V = %.1f'%V\nprint'Total number of guided modes, Mg = %d'%round(Mg)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Normalised frequency, V = 31.4\nTotal number of guided modes, Mg = 247\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.6, page 55"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#variable declaration\nn1=1.48 #core index \nh=0.85*10**-6 #operating wavelength\nV=2.4 #normalized frequency for the fiber\ndelta=1.5/100 #relative refractive index (RRI)= 1.5%\ndelta1=delta/10 #RRI difference reduced by 10\n\n#Calculation\na=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core\nd=2*a\na1=(V*h)/(2*math.pi*n1*math.sqrt(2*delta1)) #new radius of core\nd1=2*a1\n\n#Result\nprint 'Maximum core diameter for relative refractive index of 1.5 percent = ',round((d*10**6),2),\"um\"\nprint \"Maximum core diameter for relative refractive index = \",round(d1*10**6),\"um\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum core diameter for relative refractive index of 1.5 percent = 2.53 um\nMaximum core diameter for relative refractive index = 8.0 um\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.7, page 2.7"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#variable declaration\nn1=1.5 #core index \ndelta=0.01 #relative refractive index (RRI)= 1%\nh=1.3*10**-6 #operating wavelength\nalph=2\n\n#Calculation\nV=(2.4)*math.sqrt(1+(2/alph)) #normalized frequency for the fiber\na=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core\nd=2*a\n\n#Result\nprint \"Maximum core diameter for relative refractive index = \",round(d*10**6,1),\"um\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum core diameter for relative refractive index = 6.6 um\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.8, page 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\na=4.5*10**-6 #radius of core\nn1=1.46 #core index \ndelta=0.25/100 #relative refractive index (RRI)= 0.25%\n\n\n#Calculation \nhc=(2*math.pi*a*n1*math.sqrt(2*delta))/2.405 #cutoff wavelength\n\n\n#Result\nprint 'Fibre is single moded to a wavelength = ',round(hc*10**9),'nm'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fibre is single moded to a wavelength = 1214.0 nm\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.10, page 69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\nwo=5.8*10**-6 #spot size \nV=2.2 #normalized frequency\n\n#Calculation \na=wo/((0.65+1.619*V**(-1.5))+(2.879*V**-6)) #radius of the core\nd=2*a\n\n#Result\nprint'Fibre core diameter = ',round(d*10**6,1),\"um\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fibre core diameter = 9.9 um\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.11, page 73"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\nh=1.30*10**-6 #operating wavelength \nhc=1.08*10**-6 #cutoff wavelength\ntheta=12 #in angle (degree)\n\n#Calculation \naeff=3.832*h/(2*math.pi*math.sin(theta)) #effective core radius\nVeff=2.405*hc/h #effective normalised frequency\nwo=3.81*10**-6*(0.6043+(1.755*Veff**-1.5)+(2.78*Veff**-6)) #spot size\n\n#Result\nprint 'Spot size = ',round(wo*10**6,2),'um'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Spot size = 4.84 um\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.12, page 74"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nwo=5.2*10**-6 #spot size\nn1=1.485 #core index\nhc=1.190*10**-6 #cutoff wavelength\n\n#Calculation \naesi=1.820*wo #ESI core radius\nD=(0.293/n1**2)*(hc/aesi)**2 #ESI relative index difference\n\n#Result\nprint'ESI relative refractive index difference = ',round(D*10**2,2),'%'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "ESI relative refractive index difference = 0.21 %\n"
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter2_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter2_2.ipynb
new file mode 100755
index 00000000..81d67649
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter2_2.ipynb
@@ -0,0 +1,251 @@
+{
+ "metadata": {
+ "name": "Chapter_2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 : Optical fiber waveguides\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.1, page 19"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.50 #core refractive index\nn2=1.47 #cladding refractive index\n\n#Calculation\nphic=math.asin(n2/n1)*180/(math.pi) #critical angle at core cladding\nNA=math.sqrt(n1**2-n2**2) #numerical aperture\nphia=math.asin(NA)*180/math.pi #acceptance angle in air\n\n#Result\nprint'(a) Critical angle at the core-cladding = %.1f\u00b0'%phic\nprint'(b) NA for the fiber = %.2f'%NA\nprint'(c) Acceptance angle in air for the fiber = %.1f\u00b0'%phia",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Critical angle at the core-cladding = 78.5\u00b0\n(b) NA for the fiber = 0.30\n(c) Acceptance angle in air for the fiber = 17.4\u00b0\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.2, page 20"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ndelta=0.01 #relative refractive index = 1%\nn1=1.46 #core index\n\n#Calculation\nNA=n1*math.sqrt(2*delta) #numerical aperture\nzeta=math.pi*(NA)**2 #solid acceptance angle\nn12=1-delta #ratio of(n2/n1)\nphic=math.asin(n12)*180/math.pi #critical angle\n\n#Result\nprint'Numerical aperture (NA) = %.2f'%NA\nprint'Solid acceptance angle = ',round((zeta),2),'rad'\nprint'Critical angle at core-cladding = %.1f\u00b0'%phic",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Numerical aperture (NA) = 0.21\nSolid acceptance angle = 0.13 rad\nCritical angle at core-cladding = 81.9\u00b0\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.3, page 23"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nNA=0.4 #numerical aperture\ny=50*math.pi/180 #angle between projection of the ray and radius of fibre of core (radians)\n\n#Calculation\nphia1=math.asin(NA)*180/math.pi #acceptance angle for meridional rays\nphia2=math.asin(NA/(math.cos(y)))*180/math.pi #acceptance angle for skew rays\n\n#Result\nprint'Acceptance angle for meridional rays = %.1f\u00b0'%phia1\nprint'Acceptance angle for skew rays = %.1f\u00b0'%phia2\nprint\"Therefore, acceptance angle for the skew rays is about 15\u00b0 greater thanthe corresponding angle for meridional rays\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Acceptance angle for meridional rays = 23.6\u00b0\nAcceptance angle for skew rays = 38.5\u00b0\nTherefore, acceptance angle for the skew rays is about 15\u00b0 greater thanthe corresponding angle for meridional rays\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.4, page 45"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nn1=1.48 #core index\na=40*10**-6 #radius of core\ndelta=1.5/100 #relative refractive index = 1.5%\nh=0.85*10**-6 #operating wavelength\n\n#Calculation \nV=(2*math.pi*a*n1*math.sqrt(2*delta))/h #normalized frequency for the fiber\nMs=(V**2)/2 #no of guided modes\n\n#Result\nprint 'Normalised frequency, V = %.1f'%V\nprint'Total number of guided modes, Ms = %d'%round(Ms)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Normalised frequency, V = 75.8\nTotal number of guided modes, Ms = 2872\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.5, page 54"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#variable declaration\nNA=0.2 #numerical aperture\na=25*10**-6 #radius of core\nh=1*10**-6 #operating wavelength\n\n#Calculation \nV=(2*math.pi*a*NA)/h #normalized frequency for the fiber\nMg=(V**2)/4 #no of guided modes gor parabolic profile\n\n#Result\nprint 'Normalised frequency, V = %.1f'%V\nprint'Total number of guided modes, Mg = %d'%round(Mg)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Normalised frequency, V = 31.4\nTotal number of guided modes, Mg = 247\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.6, page 55"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#variable declaration\nn1=1.48 #core index \nh=0.85*10**-6 #operating wavelength\nV=2.4 #normalized frequency for the fiber\ndelta=1.5/100 #relative refractive index (RRI)= 1.5%\ndelta1=delta/10 #RRI difference reduced by 10\n\n#Calculation\na=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core\nd=2*a\na1=(V*h)/(2*math.pi*n1*math.sqrt(2*delta1)) #new radius of core\nd1=2*a1\n\n#Result\nprint 'Maximum core diameter for relative refractive index of 1.5 percent = ',round((d*10**6),2),\"um\"\nprint \"Maximum core diameter for relative refractive index = \",round(d1*10**6),\"um\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum core diameter for relative refractive index of 1.5 percent = 2.53 um\nMaximum core diameter for relative refractive index = 8.0 um\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.7, page 2.7"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#variable declaration\nn1=1.5 #core index \ndelta=0.01 #relative refractive index (RRI)= 1%\nh=1.3*10**-6 #operating wavelength\nalph=2\n\n#Calculation\nV=(2.4)*math.sqrt(1+(2/alph)) #normalized frequency for the fiber\na=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core\nd=2*a\n\n#Result\nprint \"Maximum core diameter for relative refractive index = \",round(d*10**6,1),\"um\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum core diameter for relative refractive index = 6.6 um\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.8, page 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\na=4.5*10**-6 #radius of core\nn1=1.46 #core index \ndelta=0.25/100 #relative refractive index (RRI)= 0.25%\n\n\n#Calculation \nhc=(2*math.pi*a*n1*math.sqrt(2*delta))/2.405 #cutoff wavelength\n\n\n#Result\nprint 'Fibre is single moded to a wavelength = ',round(hc*10**9),'nm'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fibre is single moded to a wavelength = 1214.0 nm\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.10, page 69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\nwo=5.8*10**-6 #spot size \nV=2.2 #normalized frequency\n\n#Calculation \na=wo/((0.65+1.619*V**(-1.5))+(2.879*V**-6)) #radius of the core\nd=2*a\n\n#Result\nprint'Fibre core diameter = ',round(d*10**6,1),\"um\"\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fibre core diameter = 9.9 um\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.11, page 73"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n#Variable declaration\nh=1.30*10**-6 #operating wavelength \nhc=1.08*10**-6 #cutoff wavelength\ntheta=12 #in angle (degree)\n\n#Calculation \naeff=3.832*h/(2*math.pi*math.sin(theta)) #effective core radius\nVeff=2.405*hc/h #effective normalised frequency\nwo=3.81*10**-6*(0.6043+(1.755*Veff**-1.5)+(2.78*Veff**-6)) #spot size\n\n#Result\nprint 'Spot size = ',round(wo*10**6,2),'um'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Spot size = 4.84 um\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 2.12, page 74"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nwo=5.2*10**-6 #spot size\nn1=1.485 #core index\nhc=1.190*10**-6 #cutoff wavelength\n\n#Calculation \naesi=1.820*wo #ESI core radius\nD=(0.293/n1**2)*(hc/aesi)**2 #ESI relative index difference\n\n#Result\nprint'ESI relative refractive index difference = ',round(D*10**2,2),'%'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "ESI relative refractive index difference = 0.21 %\n"
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter3.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter3.ipynb
new file mode 100755
index 00000000..3778a224
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter3.ipynb
@@ -0,0 +1,322 @@
+{
+ "metadata": {
+ "name": "Chapter_3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 3 : Transmission characteristics of\noptical fibers"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.1, page 89"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nPi=120*10**-6 #mean i/p power in uW\nPo=3*10**-6 #mean o/p power in uW\nL=8 #length of fibre in Km\na1=2 #loss in dB\nL1=10 #length of fibre in Km\nloss=9 #loss in dB\n\n#Calculation \nSA=10*math.log10(Pi/Po) #overall signal attenuation\na=SA/L #signal attenuation per kilometer\nal=a1*L1\nSA1=al+loss #signal attenuation for the 10KM link\nP=10**(2.9) #i/o power ratio, 2.9 is numeric value\n\n\n#Result\nprint'Overall signal attenuation = ',round(SA),'dB'\nprint'Signal attenuation per kilometer = ',round(a),'per KM'\nprint'Overall signal attenuation for the 10KM link = ',round(SA1),'dB'\nprint'Numeric value for i/o power ratio = %.1f' %P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Overall signal attenuation = 16.0 dB\nSignal attenuation per kilometer = 2.0 per KM\nOverall signal attenuation for the 10KM link = 29.0 dB\nNumeric value for i/o power ratio = 794.3\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.2, page 96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nTf=1400 #tempreture in kelvin\nK=1.381*10**-23 #Boltzmann\u2019s constant\nBc=7*10**-11 #isothermal compressibility\nn=1.46 #refractive index\np=0.286 #refractive index\nh1=0.63*10**-6 #wavelength\nh2=10**-6 #wavelength\nh3=1.3*10**-6 #wavelength\nL=10**3 #length in km\n\n#Calculation \na=(8*math.pi**3*n**8*p**2*Bc*K*Tf)/3\nyr=a/h1**4 #Rayleigh scattering coefficient \nLk=math.exp(-yr*L) #transmission loss factor\nAt=10*math.log10(Lk**-1) #attenuation due to Rayleigh scattering\nyr1=a/h2**4 #Rayleigh scattering coefficient \nLk1=math.exp(-yr1*L) #transmission loss factor\nAt1=10*math.log10(Lk1**-1) #attenuation due to Rayleigh scattering\nyr2=a/h3**4 #Rayleigh scattering coefficient \nLk2=math.exp(-yr2*L) #transmission loss factor\nAt2=10*math.log10(Lk2**-1) #attenuation due to Rayleigh scattering\n\n#Result\nprint'Attenuation due to Rayleigh scattering (in 0.63 \u03bcm)= %.1f dB km^-1'%(At)\nprint'Attenuation due to Rayleigh scattering (in 1.0 \u03bcm)= %.1f dB km^-1'%(At1)\nprint'Attenuation due to Rayleigh scattering (in 1.30 \u03bcm)= %.1f dB km^-1'%(At2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Attenuation due to Rayleigh scattering (in 0.63 \u03bcm)= 5.2 dB\nAttenuation due to Rayleigh scattering (in 1.0 \u03bcm)= 0.8 dB\nAttenuation due to Rayleigh scattering (in 1.30 \u03bcm)= 0.3 dB\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.3, page 99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nd=6 #diameter in \u03bcm\nh=1.3 #wavelength in \u03bcm\nadb=0.5 #attenuation in dB\nv=0.6\n\n#Calculation \nPb=4.4*10**-3*d**2*h**2*adb*v #for SBS\nPr=5.9*10**-2*d**2*h*adb #for SRS\n\n#result\nprint'Threshold optical power for SBS = %.1f mW'%(Pb*1000)\nprint 'Threshold optical power for SRS = %.2f W'%Pr\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold optical power for SBS = 80.3 mW\nThreshold optical power for SRS = 1.38 W\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.4, page 101"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration \nn1=1.5 #refractive index\nh=0.82*10**-6 #operating wavelength\ndelta=0.03 #relative refractive index difference \ndelta1=0.003 #relative refractive index difference\nh1=1.55*10**-6 #operating wavelength\na=4*10**-6 #radius of core\n\n#Calculation\nn2=(n1**2)-(2*delta*n1**2) #refractive index\nRc=(3*n1**2*h)/(4*math.pi*(n1**2-n2)**0.5) #multimode fiber critical radius of curvature\nn21=(n1**2)-(2*delta1*n1**2) #refractive index \nhc=(2*math.pi*a*n1*math.sqrt(2*delta1))/(2.405) #cutoff wavelength for the single-mode fiber\nb=20*h1/math.sqrt(0.043)\nc=(2.748-(0.996*h1/hc))**-3\nRcs=b*c #critical radius of curvature for the single-mode\n\n#Result\nprint'Multimode fiber critical radius of curvature = %.2f um'%(Rc*10**6) #value given in the textbook is wrong \nprint'Single-mode fiber critical radius of curvature = %.2f um'%(Rcs*10**3) #value given in the textbook is wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Multimode fiber critical radius of curvature = 1.20 um\nSingle-mode fiber critical radius of curvature = 0.05 um\n"
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.5, page 109"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration \nt=0.1*10**-6 #total pulse time \nd=15 #distance in Km\n\n#Calculation\nBt=1/(2*t) #Maximum Bandwidth\nD=t/d #Pulse Dispersion\nBop=Bt*d #Bandwidth-length product\n\n#Result\nprint'Maximum Bandwidth = %d Mhz'%(Bt/10**6)\nprint'Pulse Dispersion = %.2f ns per Km'%(D*10**9)\nprint'Bandwidth-length product = %d Mhz Km'%(Bop/10**6)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum Bandwidth = 5 Mhz\nPulse Dispersion = 6.67 ns per Km\nBandwidth-length product = 75 Mhz Km\n"
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.6, page 111"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nb=0.025 #material dispersion \nc=2.998 #speed of light (x 10^8)\nh=85*10**6 #wavelength dispersion parameter\n\n\n#Calculation\nM=b/(c*h) #Material dispersion parameter\ns=M*20 #RMS pulse broadening (1 Km)\n\n#Result\nprint'Material dispersion parameter = %.1f ps n/m K/m'%(M*10**12)\nprint'RMS pulse broadening (1 Km) = %.2f ns K/m'%(s*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Material dispersion parameter = 98.1 ps n/m K/m\nRMS pulse broadening (1 Km) = 1.96 ns K/m\n"
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.7, page 112"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=0.85*10**-6 #wavelength \nb=0.0012 #relative spectral width\nM=98.1*10**-12 #material dispersion parameter\n\n#Calculation\nsh=b*h #relative spectral width\nsm=sh*M*10**9 #RMS pulse braodening\n\n#Result\nprint'RMS pulse braodening (1 Km) = %.2f ns K/m'%(sm*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS pulse braodening (1 Km) = 0.10 ns K/m\n"
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.8, page 117"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nL=6000 #optical link\nn1=1.5 #core refractive index\ndelt=0.01 #relative refractive index difference\nc=2.998*10**8 #speed of light\n\n\n#Calculation\nTs=(L*n1*delt)/c #Delay difference\nsc=(L*n1*delt)/(2*math.sqrt(3)*c) #RMS pulse broadening\nBt=1/(2*Ts)\nBtm=0.2/sc #Maximum bit rate using RMS pulse broadening\nBop=Btm*L #Bandwidth-length product\n\n#Result\nprint'(a) Delay difference = %d ns' %(Ts*10**9)\nprint'(b) RMS pulse broadening = %.1f ns' %(sc*10**9)\nprint'(c) Maximum bit rate using RMS pulse broadening = %.1f Mbit/s'%(Btm/10**6)\nprint'(d) Bandwidth-length product = %.1f Mhz km'%(Bop/10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Delay difference = 300 ns\n(b) RMS pulse broadening = 86.7 ns\n(c) Maximum bit rate using RMS pulse broadening = 2.3 Mbit/s\n(d) Bandwidth-length product = 13.8 Mhz km\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.9, page 121"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsc=86.7 #RMS pulse broadening\nL1=6 #optical link\nL=10**3 #for 1 Km\nn1=1.5 #core refractive index\ndelt=0.01 #relative refractive index difference\nc=3*10**8 #speed of light\n\n#Calculation\nd=sc/L1 #for multimode step index fiber\nsg=(L*n1*delt**2)/(20*math.sqrt(3)*c) #gradient index fiber\n\n#Result\nprint'RMS pulse broadening for multimode step index fiber = %.1f ns K/m'%(d)\nprint'RMS pulse broadening for gradient index fiber = %.1f ps K/m'%(sg*10**12)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS pulse broadening for multimode step index fiber = 14.5 ns K/m\nRMS pulse broadening for gradient index fiber = 14.4 ps K/m\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.10, page 125"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsh=50 #rms spectral width\nL=1 #1 Km\nM=250*10**-12 #material dispersion parameter\nL1=10**3 \nNA=0.3 #numerical aperture\nn1=1.45 #refractive index\nc=2.998*10**8 #speed of light\n\n#Calculation\nsm=sh*L*M #rms pulse broadening\nss=(L1*NA**2)/(4*math.sqrt(3)*n1*c) #rms pulse broadening per kilometer\nst=math.sqrt(sm**2+ss**2) #total rms pulse broadening per kilometer\nBop=0.2/st #bandwidth\u2013length product\n\n#Result\nprint'(a) Total RMS pulse broadening per Km = %.1f ns K/m'%(st*10**9)\nprint'(b) Bandwidth length product = %.1f Mhz Km'%(Bop*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Total RMS pulse broadening per Km = 32.4 ns K/m\n(b) Bandwidth length product = 6.2 Mhz Km\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.11, page 131"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "\n#Variable declaration\nh=1280 #wavelength in nm\nS0=0.09*10**-12 #dispersion slope\nh0=1310 #zero dispersion wavlength in nm\nh1=1550 #wavelength in nm\nDm=13.5*10**-12 #material dispersion wavelength in m\nDp=0.4*10**-12 #profile dispersion wavelength in m\n\n#Calculation\na=h*S0/4\nb=1-((h0*h**-1)**4)\nDt=a*b\nDt1=(h1*S0/4)*(1-(h0*h1**-1)**4)\nDw=Dt1-(Dm+Dp)\n\n#Result\nprint'Total first order dispersion (1280 nm) = %.1f nm^-1 km^-1'%(Dt*10**12)\nprint'Total first order dispersion (1550 nm) = %.1f ps n/m K/m'%(Dt1*10**12)\nprint'Waveguide dispersion at wavelength 1.55um = %.1f ps n/m K/m'%(Dw*10**12)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total first order dispersion (1280 nm) = -2.8 nm^-1 km^-1\nTotal first order dispersion (1550 nm) = 17.1 ps n/m K/m\nWaveguide dispersion at wavelength 1.55um = 3.2 ps n/m K/m\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.12, page 143"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=0.9*10**-6 #peak wavelength \nLb=0.09 #beat length\ns=10**-9 #spectral linewidth\n\n\n#Calculation\nBf=h/Lb #modal birefringence\nLbc=h**2/(Bf*s) #coherence length\nBxy=(2*math.pi)/Lb #difference between propagation constant\n\n#Result\nprint'Modal birefringence, Bf = %.1f x 10^-5' %(Bf*10**5)\nprint'Coherence length, Lf = %.1f m' %Lbc\nprint'Difference between propagation constant = %.1f' %Bxy",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Modal birefringence, Bf = 1.0 x 10^-5\nCoherence length, Lf = 81.0 m\nDifference between propagation constant = 69.8\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.13, page 144"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=1.3*10**-6 #fibers operating wavelength\nLs=0.7*10**-3 #beat length\nL=80 #beat length\n\n#Calculation\nBf=h/Ls #Fiber birefringence (0.7mm)\nBf1=h/L #Fiber birefringence (80m)\n\n#Result\nprint'Fiber birefringence (0.7mm) = %.2f x 10^-3'%(Bf*1000)\nprint'Fiber birefringence (80m) = %.2f x 10^-8'%(Bf1*10**8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fiber birefringence (0.7mm) = 1.86 x 10^-3\nFiber birefringence (80m) = 1.62 x 10^-8\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.14, page 150"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nL=3.5*10**3 #length of fiber\na=2*10**-3 #tanh(h*L)\n\n\n#Calculation\nh=a/L #mode coupling parameter \n\n#Result\nprint'Mode coupling parameter = %.1f x 10^-7 m^-1'%(h*10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mode coupling parameter = 5.7 x 10^-7 m^-1\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter3_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter3_1.ipynb
new file mode 100755
index 00000000..3778a224
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter3_1.ipynb
@@ -0,0 +1,322 @@
+{
+ "metadata": {
+ "name": "Chapter_3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 3 : Transmission characteristics of\noptical fibers"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.1, page 89"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nPi=120*10**-6 #mean i/p power in uW\nPo=3*10**-6 #mean o/p power in uW\nL=8 #length of fibre in Km\na1=2 #loss in dB\nL1=10 #length of fibre in Km\nloss=9 #loss in dB\n\n#Calculation \nSA=10*math.log10(Pi/Po) #overall signal attenuation\na=SA/L #signal attenuation per kilometer\nal=a1*L1\nSA1=al+loss #signal attenuation for the 10KM link\nP=10**(2.9) #i/o power ratio, 2.9 is numeric value\n\n\n#Result\nprint'Overall signal attenuation = ',round(SA),'dB'\nprint'Signal attenuation per kilometer = ',round(a),'per KM'\nprint'Overall signal attenuation for the 10KM link = ',round(SA1),'dB'\nprint'Numeric value for i/o power ratio = %.1f' %P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Overall signal attenuation = 16.0 dB\nSignal attenuation per kilometer = 2.0 per KM\nOverall signal attenuation for the 10KM link = 29.0 dB\nNumeric value for i/o power ratio = 794.3\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.2, page 96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nTf=1400 #tempreture in kelvin\nK=1.381*10**-23 #Boltzmann\u2019s constant\nBc=7*10**-11 #isothermal compressibility\nn=1.46 #refractive index\np=0.286 #refractive index\nh1=0.63*10**-6 #wavelength\nh2=10**-6 #wavelength\nh3=1.3*10**-6 #wavelength\nL=10**3 #length in km\n\n#Calculation \na=(8*math.pi**3*n**8*p**2*Bc*K*Tf)/3\nyr=a/h1**4 #Rayleigh scattering coefficient \nLk=math.exp(-yr*L) #transmission loss factor\nAt=10*math.log10(Lk**-1) #attenuation due to Rayleigh scattering\nyr1=a/h2**4 #Rayleigh scattering coefficient \nLk1=math.exp(-yr1*L) #transmission loss factor\nAt1=10*math.log10(Lk1**-1) #attenuation due to Rayleigh scattering\nyr2=a/h3**4 #Rayleigh scattering coefficient \nLk2=math.exp(-yr2*L) #transmission loss factor\nAt2=10*math.log10(Lk2**-1) #attenuation due to Rayleigh scattering\n\n#Result\nprint'Attenuation due to Rayleigh scattering (in 0.63 \u03bcm)= %.1f dB km^-1'%(At)\nprint'Attenuation due to Rayleigh scattering (in 1.0 \u03bcm)= %.1f dB km^-1'%(At1)\nprint'Attenuation due to Rayleigh scattering (in 1.30 \u03bcm)= %.1f dB km^-1'%(At2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Attenuation due to Rayleigh scattering (in 0.63 \u03bcm)= 5.2 dB\nAttenuation due to Rayleigh scattering (in 1.0 \u03bcm)= 0.8 dB\nAttenuation due to Rayleigh scattering (in 1.30 \u03bcm)= 0.3 dB\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.3, page 99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nd=6 #diameter in \u03bcm\nh=1.3 #wavelength in \u03bcm\nadb=0.5 #attenuation in dB\nv=0.6\n\n#Calculation \nPb=4.4*10**-3*d**2*h**2*adb*v #for SBS\nPr=5.9*10**-2*d**2*h*adb #for SRS\n\n#result\nprint'Threshold optical power for SBS = %.1f mW'%(Pb*1000)\nprint 'Threshold optical power for SRS = %.2f W'%Pr\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold optical power for SBS = 80.3 mW\nThreshold optical power for SRS = 1.38 W\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.4, page 101"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration \nn1=1.5 #refractive index\nh=0.82*10**-6 #operating wavelength\ndelta=0.03 #relative refractive index difference \ndelta1=0.003 #relative refractive index difference\nh1=1.55*10**-6 #operating wavelength\na=4*10**-6 #radius of core\n\n#Calculation\nn2=(n1**2)-(2*delta*n1**2) #refractive index\nRc=(3*n1**2*h)/(4*math.pi*(n1**2-n2)**0.5) #multimode fiber critical radius of curvature\nn21=(n1**2)-(2*delta1*n1**2) #refractive index \nhc=(2*math.pi*a*n1*math.sqrt(2*delta1))/(2.405) #cutoff wavelength for the single-mode fiber\nb=20*h1/math.sqrt(0.043)\nc=(2.748-(0.996*h1/hc))**-3\nRcs=b*c #critical radius of curvature for the single-mode\n\n#Result\nprint'Multimode fiber critical radius of curvature = %.2f um'%(Rc*10**6) #value given in the textbook is wrong \nprint'Single-mode fiber critical radius of curvature = %.2f um'%(Rcs*10**3) #value given in the textbook is wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Multimode fiber critical radius of curvature = 1.20 um\nSingle-mode fiber critical radius of curvature = 0.05 um\n"
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.5, page 109"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration \nt=0.1*10**-6 #total pulse time \nd=15 #distance in Km\n\n#Calculation\nBt=1/(2*t) #Maximum Bandwidth\nD=t/d #Pulse Dispersion\nBop=Bt*d #Bandwidth-length product\n\n#Result\nprint'Maximum Bandwidth = %d Mhz'%(Bt/10**6)\nprint'Pulse Dispersion = %.2f ns per Km'%(D*10**9)\nprint'Bandwidth-length product = %d Mhz Km'%(Bop/10**6)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum Bandwidth = 5 Mhz\nPulse Dispersion = 6.67 ns per Km\nBandwidth-length product = 75 Mhz Km\n"
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.6, page 111"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nb=0.025 #material dispersion \nc=2.998 #speed of light (x 10^8)\nh=85*10**6 #wavelength dispersion parameter\n\n\n#Calculation\nM=b/(c*h) #Material dispersion parameter\ns=M*20 #RMS pulse broadening (1 Km)\n\n#Result\nprint'Material dispersion parameter = %.1f ps n/m K/m'%(M*10**12)\nprint'RMS pulse broadening (1 Km) = %.2f ns K/m'%(s*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Material dispersion parameter = 98.1 ps n/m K/m\nRMS pulse broadening (1 Km) = 1.96 ns K/m\n"
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.7, page 112"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=0.85*10**-6 #wavelength \nb=0.0012 #relative spectral width\nM=98.1*10**-12 #material dispersion parameter\n\n#Calculation\nsh=b*h #relative spectral width\nsm=sh*M*10**9 #RMS pulse braodening\n\n#Result\nprint'RMS pulse braodening (1 Km) = %.2f ns K/m'%(sm*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS pulse braodening (1 Km) = 0.10 ns K/m\n"
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.8, page 117"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nL=6000 #optical link\nn1=1.5 #core refractive index\ndelt=0.01 #relative refractive index difference\nc=2.998*10**8 #speed of light\n\n\n#Calculation\nTs=(L*n1*delt)/c #Delay difference\nsc=(L*n1*delt)/(2*math.sqrt(3)*c) #RMS pulse broadening\nBt=1/(2*Ts)\nBtm=0.2/sc #Maximum bit rate using RMS pulse broadening\nBop=Btm*L #Bandwidth-length product\n\n#Result\nprint'(a) Delay difference = %d ns' %(Ts*10**9)\nprint'(b) RMS pulse broadening = %.1f ns' %(sc*10**9)\nprint'(c) Maximum bit rate using RMS pulse broadening = %.1f Mbit/s'%(Btm/10**6)\nprint'(d) Bandwidth-length product = %.1f Mhz km'%(Bop/10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Delay difference = 300 ns\n(b) RMS pulse broadening = 86.7 ns\n(c) Maximum bit rate using RMS pulse broadening = 2.3 Mbit/s\n(d) Bandwidth-length product = 13.8 Mhz km\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.9, page 121"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsc=86.7 #RMS pulse broadening\nL1=6 #optical link\nL=10**3 #for 1 Km\nn1=1.5 #core refractive index\ndelt=0.01 #relative refractive index difference\nc=3*10**8 #speed of light\n\n#Calculation\nd=sc/L1 #for multimode step index fiber\nsg=(L*n1*delt**2)/(20*math.sqrt(3)*c) #gradient index fiber\n\n#Result\nprint'RMS pulse broadening for multimode step index fiber = %.1f ns K/m'%(d)\nprint'RMS pulse broadening for gradient index fiber = %.1f ps K/m'%(sg*10**12)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS pulse broadening for multimode step index fiber = 14.5 ns K/m\nRMS pulse broadening for gradient index fiber = 14.4 ps K/m\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.10, page 125"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsh=50 #rms spectral width\nL=1 #1 Km\nM=250*10**-12 #material dispersion parameter\nL1=10**3 \nNA=0.3 #numerical aperture\nn1=1.45 #refractive index\nc=2.998*10**8 #speed of light\n\n#Calculation\nsm=sh*L*M #rms pulse broadening\nss=(L1*NA**2)/(4*math.sqrt(3)*n1*c) #rms pulse broadening per kilometer\nst=math.sqrt(sm**2+ss**2) #total rms pulse broadening per kilometer\nBop=0.2/st #bandwidth\u2013length product\n\n#Result\nprint'(a) Total RMS pulse broadening per Km = %.1f ns K/m'%(st*10**9)\nprint'(b) Bandwidth length product = %.1f Mhz Km'%(Bop*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Total RMS pulse broadening per Km = 32.4 ns K/m\n(b) Bandwidth length product = 6.2 Mhz Km\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.11, page 131"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "\n#Variable declaration\nh=1280 #wavelength in nm\nS0=0.09*10**-12 #dispersion slope\nh0=1310 #zero dispersion wavlength in nm\nh1=1550 #wavelength in nm\nDm=13.5*10**-12 #material dispersion wavelength in m\nDp=0.4*10**-12 #profile dispersion wavelength in m\n\n#Calculation\na=h*S0/4\nb=1-((h0*h**-1)**4)\nDt=a*b\nDt1=(h1*S0/4)*(1-(h0*h1**-1)**4)\nDw=Dt1-(Dm+Dp)\n\n#Result\nprint'Total first order dispersion (1280 nm) = %.1f nm^-1 km^-1'%(Dt*10**12)\nprint'Total first order dispersion (1550 nm) = %.1f ps n/m K/m'%(Dt1*10**12)\nprint'Waveguide dispersion at wavelength 1.55um = %.1f ps n/m K/m'%(Dw*10**12)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total first order dispersion (1280 nm) = -2.8 nm^-1 km^-1\nTotal first order dispersion (1550 nm) = 17.1 ps n/m K/m\nWaveguide dispersion at wavelength 1.55um = 3.2 ps n/m K/m\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.12, page 143"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=0.9*10**-6 #peak wavelength \nLb=0.09 #beat length\ns=10**-9 #spectral linewidth\n\n\n#Calculation\nBf=h/Lb #modal birefringence\nLbc=h**2/(Bf*s) #coherence length\nBxy=(2*math.pi)/Lb #difference between propagation constant\n\n#Result\nprint'Modal birefringence, Bf = %.1f x 10^-5' %(Bf*10**5)\nprint'Coherence length, Lf = %.1f m' %Lbc\nprint'Difference between propagation constant = %.1f' %Bxy",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Modal birefringence, Bf = 1.0 x 10^-5\nCoherence length, Lf = 81.0 m\nDifference between propagation constant = 69.8\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.13, page 144"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=1.3*10**-6 #fibers operating wavelength\nLs=0.7*10**-3 #beat length\nL=80 #beat length\n\n#Calculation\nBf=h/Ls #Fiber birefringence (0.7mm)\nBf1=h/L #Fiber birefringence (80m)\n\n#Result\nprint'Fiber birefringence (0.7mm) = %.2f x 10^-3'%(Bf*1000)\nprint'Fiber birefringence (80m) = %.2f x 10^-8'%(Bf1*10**8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fiber birefringence (0.7mm) = 1.86 x 10^-3\nFiber birefringence (80m) = 1.62 x 10^-8\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.14, page 150"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nL=3.5*10**3 #length of fiber\na=2*10**-3 #tanh(h*L)\n\n\n#Calculation\nh=a/L #mode coupling parameter \n\n#Result\nprint'Mode coupling parameter = %.1f x 10^-7 m^-1'%(h*10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mode coupling parameter = 5.7 x 10^-7 m^-1\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter3_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter3_2.ipynb
new file mode 100755
index 00000000..3778a224
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter3_2.ipynb
@@ -0,0 +1,322 @@
+{
+ "metadata": {
+ "name": "Chapter_3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 3 : Transmission characteristics of\noptical fibers"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.1, page 89"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nPi=120*10**-6 #mean i/p power in uW\nPo=3*10**-6 #mean o/p power in uW\nL=8 #length of fibre in Km\na1=2 #loss in dB\nL1=10 #length of fibre in Km\nloss=9 #loss in dB\n\n#Calculation \nSA=10*math.log10(Pi/Po) #overall signal attenuation\na=SA/L #signal attenuation per kilometer\nal=a1*L1\nSA1=al+loss #signal attenuation for the 10KM link\nP=10**(2.9) #i/o power ratio, 2.9 is numeric value\n\n\n#Result\nprint'Overall signal attenuation = ',round(SA),'dB'\nprint'Signal attenuation per kilometer = ',round(a),'per KM'\nprint'Overall signal attenuation for the 10KM link = ',round(SA1),'dB'\nprint'Numeric value for i/o power ratio = %.1f' %P",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Overall signal attenuation = 16.0 dB\nSignal attenuation per kilometer = 2.0 per KM\nOverall signal attenuation for the 10KM link = 29.0 dB\nNumeric value for i/o power ratio = 794.3\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.2, page 96"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nTf=1400 #tempreture in kelvin\nK=1.381*10**-23 #Boltzmann\u2019s constant\nBc=7*10**-11 #isothermal compressibility\nn=1.46 #refractive index\np=0.286 #refractive index\nh1=0.63*10**-6 #wavelength\nh2=10**-6 #wavelength\nh3=1.3*10**-6 #wavelength\nL=10**3 #length in km\n\n#Calculation \na=(8*math.pi**3*n**8*p**2*Bc*K*Tf)/3\nyr=a/h1**4 #Rayleigh scattering coefficient \nLk=math.exp(-yr*L) #transmission loss factor\nAt=10*math.log10(Lk**-1) #attenuation due to Rayleigh scattering\nyr1=a/h2**4 #Rayleigh scattering coefficient \nLk1=math.exp(-yr1*L) #transmission loss factor\nAt1=10*math.log10(Lk1**-1) #attenuation due to Rayleigh scattering\nyr2=a/h3**4 #Rayleigh scattering coefficient \nLk2=math.exp(-yr2*L) #transmission loss factor\nAt2=10*math.log10(Lk2**-1) #attenuation due to Rayleigh scattering\n\n#Result\nprint'Attenuation due to Rayleigh scattering (in 0.63 \u03bcm)= %.1f dB km^-1'%(At)\nprint'Attenuation due to Rayleigh scattering (in 1.0 \u03bcm)= %.1f dB km^-1'%(At1)\nprint'Attenuation due to Rayleigh scattering (in 1.30 \u03bcm)= %.1f dB km^-1'%(At2)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Attenuation due to Rayleigh scattering (in 0.63 \u03bcm)= 5.2 dB\nAttenuation due to Rayleigh scattering (in 1.0 \u03bcm)= 0.8 dB\nAttenuation due to Rayleigh scattering (in 1.30 \u03bcm)= 0.3 dB\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.3, page 99"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nd=6 #diameter in \u03bcm\nh=1.3 #wavelength in \u03bcm\nadb=0.5 #attenuation in dB\nv=0.6\n\n#Calculation \nPb=4.4*10**-3*d**2*h**2*adb*v #for SBS\nPr=5.9*10**-2*d**2*h*adb #for SRS\n\n#result\nprint'Threshold optical power for SBS = %.1f mW'%(Pb*1000)\nprint 'Threshold optical power for SRS = %.2f W'%Pr\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold optical power for SBS = 80.3 mW\nThreshold optical power for SRS = 1.38 W\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.4, page 101"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration \nn1=1.5 #refractive index\nh=0.82*10**-6 #operating wavelength\ndelta=0.03 #relative refractive index difference \ndelta1=0.003 #relative refractive index difference\nh1=1.55*10**-6 #operating wavelength\na=4*10**-6 #radius of core\n\n#Calculation\nn2=(n1**2)-(2*delta*n1**2) #refractive index\nRc=(3*n1**2*h)/(4*math.pi*(n1**2-n2)**0.5) #multimode fiber critical radius of curvature\nn21=(n1**2)-(2*delta1*n1**2) #refractive index \nhc=(2*math.pi*a*n1*math.sqrt(2*delta1))/(2.405) #cutoff wavelength for the single-mode fiber\nb=20*h1/math.sqrt(0.043)\nc=(2.748-(0.996*h1/hc))**-3\nRcs=b*c #critical radius of curvature for the single-mode\n\n#Result\nprint'Multimode fiber critical radius of curvature = %.2f um'%(Rc*10**6) #value given in the textbook is wrong \nprint'Single-mode fiber critical radius of curvature = %.2f um'%(Rcs*10**3) #value given in the textbook is wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Multimode fiber critical radius of curvature = 1.20 um\nSingle-mode fiber critical radius of curvature = 0.05 um\n"
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.5, page 109"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration \nt=0.1*10**-6 #total pulse time \nd=15 #distance in Km\n\n#Calculation\nBt=1/(2*t) #Maximum Bandwidth\nD=t/d #Pulse Dispersion\nBop=Bt*d #Bandwidth-length product\n\n#Result\nprint'Maximum Bandwidth = %d Mhz'%(Bt/10**6)\nprint'Pulse Dispersion = %.2f ns per Km'%(D*10**9)\nprint'Bandwidth-length product = %d Mhz Km'%(Bop/10**6)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum Bandwidth = 5 Mhz\nPulse Dispersion = 6.67 ns per Km\nBandwidth-length product = 75 Mhz Km\n"
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.6, page 111"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nb=0.025 #material dispersion \nc=2.998 #speed of light (x 10^8)\nh=85*10**6 #wavelength dispersion parameter\n\n\n#Calculation\nM=b/(c*h) #Material dispersion parameter\ns=M*20 #RMS pulse broadening (1 Km)\n\n#Result\nprint'Material dispersion parameter = %.1f ps n/m K/m'%(M*10**12)\nprint'RMS pulse broadening (1 Km) = %.2f ns K/m'%(s*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Material dispersion parameter = 98.1 ps n/m K/m\nRMS pulse broadening (1 Km) = 1.96 ns K/m\n"
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.7, page 112"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=0.85*10**-6 #wavelength \nb=0.0012 #relative spectral width\nM=98.1*10**-12 #material dispersion parameter\n\n#Calculation\nsh=b*h #relative spectral width\nsm=sh*M*10**9 #RMS pulse braodening\n\n#Result\nprint'RMS pulse braodening (1 Km) = %.2f ns K/m'%(sm*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS pulse braodening (1 Km) = 0.10 ns K/m\n"
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.8, page 117"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nL=6000 #optical link\nn1=1.5 #core refractive index\ndelt=0.01 #relative refractive index difference\nc=2.998*10**8 #speed of light\n\n\n#Calculation\nTs=(L*n1*delt)/c #Delay difference\nsc=(L*n1*delt)/(2*math.sqrt(3)*c) #RMS pulse broadening\nBt=1/(2*Ts)\nBtm=0.2/sc #Maximum bit rate using RMS pulse broadening\nBop=Btm*L #Bandwidth-length product\n\n#Result\nprint'(a) Delay difference = %d ns' %(Ts*10**9)\nprint'(b) RMS pulse broadening = %.1f ns' %(sc*10**9)\nprint'(c) Maximum bit rate using RMS pulse broadening = %.1f Mbit/s'%(Btm/10**6)\nprint'(d) Bandwidth-length product = %.1f Mhz km'%(Bop/10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Delay difference = 300 ns\n(b) RMS pulse broadening = 86.7 ns\n(c) Maximum bit rate using RMS pulse broadening = 2.3 Mbit/s\n(d) Bandwidth-length product = 13.8 Mhz km\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.9, page 121"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsc=86.7 #RMS pulse broadening\nL1=6 #optical link\nL=10**3 #for 1 Km\nn1=1.5 #core refractive index\ndelt=0.01 #relative refractive index difference\nc=3*10**8 #speed of light\n\n#Calculation\nd=sc/L1 #for multimode step index fiber\nsg=(L*n1*delt**2)/(20*math.sqrt(3)*c) #gradient index fiber\n\n#Result\nprint'RMS pulse broadening for multimode step index fiber = %.1f ns K/m'%(d)\nprint'RMS pulse broadening for gradient index fiber = %.1f ps K/m'%(sg*10**12)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS pulse broadening for multimode step index fiber = 14.5 ns K/m\nRMS pulse broadening for gradient index fiber = 14.4 ps K/m\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.10, page 125"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsh=50 #rms spectral width\nL=1 #1 Km\nM=250*10**-12 #material dispersion parameter\nL1=10**3 \nNA=0.3 #numerical aperture\nn1=1.45 #refractive index\nc=2.998*10**8 #speed of light\n\n#Calculation\nsm=sh*L*M #rms pulse broadening\nss=(L1*NA**2)/(4*math.sqrt(3)*n1*c) #rms pulse broadening per kilometer\nst=math.sqrt(sm**2+ss**2) #total rms pulse broadening per kilometer\nBop=0.2/st #bandwidth\u2013length product\n\n#Result\nprint'(a) Total RMS pulse broadening per Km = %.1f ns K/m'%(st*10**9)\nprint'(b) Bandwidth length product = %.1f Mhz Km'%(Bop*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Total RMS pulse broadening per Km = 32.4 ns K/m\n(b) Bandwidth length product = 6.2 Mhz Km\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.11, page 131"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "\n#Variable declaration\nh=1280 #wavelength in nm\nS0=0.09*10**-12 #dispersion slope\nh0=1310 #zero dispersion wavlength in nm\nh1=1550 #wavelength in nm\nDm=13.5*10**-12 #material dispersion wavelength in m\nDp=0.4*10**-12 #profile dispersion wavelength in m\n\n#Calculation\na=h*S0/4\nb=1-((h0*h**-1)**4)\nDt=a*b\nDt1=(h1*S0/4)*(1-(h0*h1**-1)**4)\nDw=Dt1-(Dm+Dp)\n\n#Result\nprint'Total first order dispersion (1280 nm) = %.1f nm^-1 km^-1'%(Dt*10**12)\nprint'Total first order dispersion (1550 nm) = %.1f ps n/m K/m'%(Dt1*10**12)\nprint'Waveguide dispersion at wavelength 1.55um = %.1f ps n/m K/m'%(Dw*10**12)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total first order dispersion (1280 nm) = -2.8 nm^-1 km^-1\nTotal first order dispersion (1550 nm) = 17.1 ps n/m K/m\nWaveguide dispersion at wavelength 1.55um = 3.2 ps n/m K/m\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.12, page 143"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh=0.9*10**-6 #peak wavelength \nLb=0.09 #beat length\ns=10**-9 #spectral linewidth\n\n\n#Calculation\nBf=h/Lb #modal birefringence\nLbc=h**2/(Bf*s) #coherence length\nBxy=(2*math.pi)/Lb #difference between propagation constant\n\n#Result\nprint'Modal birefringence, Bf = %.1f x 10^-5' %(Bf*10**5)\nprint'Coherence length, Lf = %.1f m' %Lbc\nprint'Difference between propagation constant = %.1f' %Bxy",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Modal birefringence, Bf = 1.0 x 10^-5\nCoherence length, Lf = 81.0 m\nDifference between propagation constant = 69.8\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.13, page 144"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=1.3*10**-6 #fibers operating wavelength\nLs=0.7*10**-3 #beat length\nL=80 #beat length\n\n#Calculation\nBf=h/Ls #Fiber birefringence (0.7mm)\nBf1=h/L #Fiber birefringence (80m)\n\n#Result\nprint'Fiber birefringence (0.7mm) = %.2f x 10^-3'%(Bf*1000)\nprint'Fiber birefringence (80m) = %.2f x 10^-8'%(Bf1*10**8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fiber birefringence (0.7mm) = 1.86 x 10^-3\nFiber birefringence (80m) = 1.62 x 10^-8\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 3.14, page 150"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nL=3.5*10**3 #length of fiber\na=2*10**-3 #tanh(h*L)\n\n\n#Calculation\nh=a/L #mode coupling parameter \n\n#Result\nprint'Mode coupling parameter = %.1f x 10^-7 m^-1'%(h*10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Mode coupling parameter = 5.7 x 10^-7 m^-1\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter4.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter4.ipynb
new file mode 100755
index 00000000..7a8733a2
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter4.ipynb
@@ -0,0 +1,35 @@
+{
+ "metadata": {
+ "name": "Chapter_4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 4 : Optical fibers and cables"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 4.1, page 196"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nl=0.16*10**-9 #bond distance\nSt=2.6*10**6 #cohesive strength\npsi=6894.76\nE=9*10**10 #Young modulus of silica\nC=10**-8\n\n#Calculation\nYp=4*l*St**2/E\nSf=math.sqrt((2*E*Yp)/(math.pi*C)) #Fracture stress for elliptical crack\nStr=Sf/E #Strain\n\n#Result\nprint'Fracture stress for elliptical crack = %.2f x 10^5 psi'%(Sf*10**-5)\nprint'Strain in percentage = %d percent'%(Str*6894.76*100)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": "*"
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter4_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter4_1.ipynb
new file mode 100755
index 00000000..7a8733a2
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter4_1.ipynb
@@ -0,0 +1,35 @@
+{
+ "metadata": {
+ "name": "Chapter_4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 4 : Optical fibers and cables"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 4.1, page 196"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nl=0.16*10**-9 #bond distance\nSt=2.6*10**6 #cohesive strength\npsi=6894.76\nE=9*10**10 #Young modulus of silica\nC=10**-8\n\n#Calculation\nYp=4*l*St**2/E\nSf=math.sqrt((2*E*Yp)/(math.pi*C)) #Fracture stress for elliptical crack\nStr=Sf/E #Strain\n\n#Result\nprint'Fracture stress for elliptical crack = %.2f x 10^5 psi'%(Sf*10**-5)\nprint'Strain in percentage = %d percent'%(Str*6894.76*100)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": "*"
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter4_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter4_2.ipynb
new file mode 100755
index 00000000..7a8733a2
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter4_2.ipynb
@@ -0,0 +1,35 @@
+{
+ "metadata": {
+ "name": "Chapter_4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 4 : Optical fibers and cables"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 4.1, page 196"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nl=0.16*10**-9 #bond distance\nSt=2.6*10**6 #cohesive strength\npsi=6894.76\nE=9*10**10 #Young modulus of silica\nC=10**-8\n\n#Calculation\nYp=4*l*St**2/E\nSf=math.sqrt((2*E*Yp)/(math.pi*C)) #Fracture stress for elliptical crack\nStr=Sf/E #Strain\n\n#Result\nprint'Fracture stress for elliptical crack = %.2f x 10^5 psi'%(Sf*10**-5)\nprint'Strain in percentage = %d percent'%(Str*6894.76*100)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": "*"
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter5.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter5.ipynb
new file mode 100755
index 00000000..0c445b62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter5.ipynb
@@ -0,0 +1,239 @@
+{
+ "metadata": {
+ "name": "Chapter_5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Chapter 5 : Optical fiber connection: joints, couplers and isolators"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.1, page 220"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.5 #core refractive index\nn=1.0 #refractive index of medium\n\n#Calculation\nr=((n1-n)/(n1+n))**2 #magnitude of the Fresnel reflection at the fiber\u2013air interface\nLoss=-10*math.log10(1-r) #loss in decibels at the single interface\nLoss1=2*Loss #total loss\n\n#Result\nprint'Total loss due to Fresnel reflection = %.2f dB'%Loss1 #loss due to fresnel resolution = 0.18X2 dB\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total loss due to Fresnel reflection = 0.35 dB\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.2, page 224"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.5 #refractive index\ny=5 #lateral offset of the fiber core axes in um\na=25 #radius in um\n\n#Calculation\nb=(16*n1**2)/(math.pi*(1+n1)**4)\nc=math.acos(y*(2*a)**-1)\ne=(y*a**-1)\nf=math.sqrt(1-(y*(2*a)**-1)**2)\nn=b*((2*c)-(e*f)) #coupling efficiency \nLoss=-10*math.log10(n) #insertion loss\nna=(math.pi**-1)*((2*c)-(e*f))\nLoss1=-10*math.log10(na) \n\n#Result\nprint'(a) Insertion loss = %.3f dB'%Loss\nprint'(b) Insertion loss = %.2f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Insertion loss = 0.945 dB\n(b) Insertion loss = 0.59 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.3, page 226"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ny=3 #lateral misalignment in um\na=25 #core radius in um\n\n#Calculation\nLt=0.85*(y*a**-1) #misalignment loss for guided modes\nn=1-Lt #coupling efficiency\nLoss=-10*math.log10(n) #insertion loss\nLt1=0.75*(y*a**-1) #both guided and leaky modes \nn1=1-Lt1 #coupling efficiency\nLoss1=-10*math.log10(n1) #insertion loss\n\n#Result\nprint'(a) Uniform illumination of all guided modes only = %.2f dB'%Loss\nprint'(b) Uniform illumination of all guided and leaky modes = %.2f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Uniform illumination of all guided modes only = 0.47 dB\n(b) Uniform illumination of all guided and leaky modes = 0.41 dB\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.4, page 227"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.2 #numerical aperture\nn1=1.48 #core refractive index\nang=(5*math.pi)/180 #angular misalignment (radians)\nNA1=0.4 #numerical aperture\n\n#Calculation\nna=((16*(n1)**2)/((1+n1)**4))*(1-(ang/(math.pi*NA))) #angular coupling efficiency\nLoss=-10*math.log10(na) #insertion loss\nna1=((16*(n1)**2)/((1+n1)**4))*(1-(ang/(math.pi*NA1))) #angular coupling efficiency\nLoss1=-10*math.log10(na1) #insertion loss\n\n#Result\nprint'Insertion loss at a joint (NA = 0.2) = %.2f dB'%Loss\nprint'Insertion loss at a joint (NA = 0.4) = %.2f dB'%Loss1 #in textbook, value is not calculated",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Insertion loss at a joint (NA = 0.2) = 0.98 dB\nInsertion loss at a joint (NA = 0.4) = 0.64 dB\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.5, page 231"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nV=2.4 #normalized frequency\na=4 #core radius in um\nNA=0.1 #numerical aperture \nn1=1.46 #core refractive index\ny=1 #lateral misalignment in um\nteta=math.pi/180 #angular misalignment in rad\n\n#Calculation\nw=a*(0.65+(1.62/V**1.5)+(2.88/V**6))/(2**0.5) #normalized spot size\nTl=2.17*(y/w)**2 #loss due to the lateral offset\nTa=2.17*((teta*w*n1*V)/(a*NA))**2 #loss due to angular misalignment\nTt=Tl+Ta #total insertion loss\n\n#Result\nprint'Total insertion loss = %.2f dB'%Tt",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total insertion loss = 0.72 dB\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.6, page 232"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nw01=5.6 #mode-field radius in um\nw02=4.2 #mode-field radius in um\n\n#Calculation\nLoss=-10*math.log10(4*((w02/w01)+(w01/w02))**(-2)) #intrinsic loss \n\n#Result\nprint'Intrinsic loss = %.2f dB'%Loss",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Intrinsic loss = 0.35 dB\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.7, page 262"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np1=60 #input port power\np2=0.004 #output port power\np3=26 #output port power\np4=27.5 #output port power\n\n\n#Calculation\nxloss=10*math.log10(p1/(p3+p4)) #Excess Loss\niloss1=10*math.log10(p1*p3**-1) #Insertion Loss at input\niloss2=10*math.log10(p1/p4) #Insertion Loss at output\ncross=10*math.log10(p2/p1) #Crosstalk ratio\nsrat=((p3/(p3+p4))*100) #Split ratio\n\n#Result\nprint'Excess Loss = %.1f dB'%xloss\nprint'Insertion Loss at input = %.2f dB'%iloss1\nprint'Insertion Loss at output = %.2f dB'%iloss2\nprint'Crosstalk ratio = %.1f dB'%cross\nprint'Split ratio = %.1f percent'%srat",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Excess Loss = 0.5 dB\nInsertion Loss at input = 3.63 dB\nInsertion Loss at output = 3.39 dB\nCrosstalk ratio = -41.8 dB\nSplit ratio = 48.6 percent\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.8, page 266"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nN=32 #total no of ports\npi=10**3 #optical power at input in micro-watt\npj=14 #optical power at input in micro-watt\n\n\n#Calculation\nsloss=10*math.log10(N) #splitting loss\nxloss=10*math.log10(pi*(pj*N)**-1) #excess loss\ntloss=sloss+xloss #total loss\niloss=10*math.log10(pi*pj**-1) #insertion loss\n\n#Result\nprint'Total loss = %.2f dB'%tloss\nprint'Insertion loss = %.2f dB'%iloss\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total loss = 18.54 dB\nInsertion loss = 18.54 dB\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.9, page 268"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np=16 #output ports\nl=0.2 #excess loss with split ratio of 50%\nl1=0.1 #splice loss\n\n#Calculation\nm=math.log(p)/math.log(2) #no of stages\nxloss=(4*l)+(3*l1) #excess loss\nsloss=10*math.log10(p) #split loss\niloss=sloss+xloss #insertion loss\n\n#Result\nprint'Insertion loss = %.2f dB'%iloss",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Insertion loss = 13.14 dB\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.10, page 277"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=1.55*10**-6 #optical signal wavelength\nN=1.46 #refractive index\n\n\n#Calculation\nv=h/(2*N) #grating period of the FBG\n\n#Result\nprint'Grating period of FBG = %.2f um'%(v*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Grating period of FBG = 0.53 um\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter5_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter5_1.ipynb
new file mode 100755
index 00000000..0c445b62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter5_1.ipynb
@@ -0,0 +1,239 @@
+{
+ "metadata": {
+ "name": "Chapter_5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Chapter 5 : Optical fiber connection: joints, couplers and isolators"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.1, page 220"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.5 #core refractive index\nn=1.0 #refractive index of medium\n\n#Calculation\nr=((n1-n)/(n1+n))**2 #magnitude of the Fresnel reflection at the fiber\u2013air interface\nLoss=-10*math.log10(1-r) #loss in decibels at the single interface\nLoss1=2*Loss #total loss\n\n#Result\nprint'Total loss due to Fresnel reflection = %.2f dB'%Loss1 #loss due to fresnel resolution = 0.18X2 dB\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total loss due to Fresnel reflection = 0.35 dB\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.2, page 224"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.5 #refractive index\ny=5 #lateral offset of the fiber core axes in um\na=25 #radius in um\n\n#Calculation\nb=(16*n1**2)/(math.pi*(1+n1)**4)\nc=math.acos(y*(2*a)**-1)\ne=(y*a**-1)\nf=math.sqrt(1-(y*(2*a)**-1)**2)\nn=b*((2*c)-(e*f)) #coupling efficiency \nLoss=-10*math.log10(n) #insertion loss\nna=(math.pi**-1)*((2*c)-(e*f))\nLoss1=-10*math.log10(na) \n\n#Result\nprint'(a) Insertion loss = %.3f dB'%Loss\nprint'(b) Insertion loss = %.2f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Insertion loss = 0.945 dB\n(b) Insertion loss = 0.59 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.3, page 226"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ny=3 #lateral misalignment in um\na=25 #core radius in um\n\n#Calculation\nLt=0.85*(y*a**-1) #misalignment loss for guided modes\nn=1-Lt #coupling efficiency\nLoss=-10*math.log10(n) #insertion loss\nLt1=0.75*(y*a**-1) #both guided and leaky modes \nn1=1-Lt1 #coupling efficiency\nLoss1=-10*math.log10(n1) #insertion loss\n\n#Result\nprint'(a) Uniform illumination of all guided modes only = %.2f dB'%Loss\nprint'(b) Uniform illumination of all guided and leaky modes = %.2f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Uniform illumination of all guided modes only = 0.47 dB\n(b) Uniform illumination of all guided and leaky modes = 0.41 dB\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.4, page 227"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.2 #numerical aperture\nn1=1.48 #core refractive index\nang=(5*math.pi)/180 #angular misalignment (radians)\nNA1=0.4 #numerical aperture\n\n#Calculation\nna=((16*(n1)**2)/((1+n1)**4))*(1-(ang/(math.pi*NA))) #angular coupling efficiency\nLoss=-10*math.log10(na) #insertion loss\nna1=((16*(n1)**2)/((1+n1)**4))*(1-(ang/(math.pi*NA1))) #angular coupling efficiency\nLoss1=-10*math.log10(na1) #insertion loss\n\n#Result\nprint'Insertion loss at a joint (NA = 0.2) = %.2f dB'%Loss\nprint'Insertion loss at a joint (NA = 0.4) = %.2f dB'%Loss1 #in textbook, value is not calculated",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Insertion loss at a joint (NA = 0.2) = 0.98 dB\nInsertion loss at a joint (NA = 0.4) = 0.64 dB\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.5, page 231"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nV=2.4 #normalized frequency\na=4 #core radius in um\nNA=0.1 #numerical aperture \nn1=1.46 #core refractive index\ny=1 #lateral misalignment in um\nteta=math.pi/180 #angular misalignment in rad\n\n#Calculation\nw=a*(0.65+(1.62/V**1.5)+(2.88/V**6))/(2**0.5) #normalized spot size\nTl=2.17*(y/w)**2 #loss due to the lateral offset\nTa=2.17*((teta*w*n1*V)/(a*NA))**2 #loss due to angular misalignment\nTt=Tl+Ta #total insertion loss\n\n#Result\nprint'Total insertion loss = %.2f dB'%Tt",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total insertion loss = 0.72 dB\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.6, page 232"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nw01=5.6 #mode-field radius in um\nw02=4.2 #mode-field radius in um\n\n#Calculation\nLoss=-10*math.log10(4*((w02/w01)+(w01/w02))**(-2)) #intrinsic loss \n\n#Result\nprint'Intrinsic loss = %.2f dB'%Loss",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Intrinsic loss = 0.35 dB\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.7, page 262"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np1=60 #input port power\np2=0.004 #output port power\np3=26 #output port power\np4=27.5 #output port power\n\n\n#Calculation\nxloss=10*math.log10(p1/(p3+p4)) #Excess Loss\niloss1=10*math.log10(p1*p3**-1) #Insertion Loss at input\niloss2=10*math.log10(p1/p4) #Insertion Loss at output\ncross=10*math.log10(p2/p1) #Crosstalk ratio\nsrat=((p3/(p3+p4))*100) #Split ratio\n\n#Result\nprint'Excess Loss = %.1f dB'%xloss\nprint'Insertion Loss at input = %.2f dB'%iloss1\nprint'Insertion Loss at output = %.2f dB'%iloss2\nprint'Crosstalk ratio = %.1f dB'%cross\nprint'Split ratio = %.1f percent'%srat",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Excess Loss = 0.5 dB\nInsertion Loss at input = 3.63 dB\nInsertion Loss at output = 3.39 dB\nCrosstalk ratio = -41.8 dB\nSplit ratio = 48.6 percent\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.8, page 266"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nN=32 #total no of ports\npi=10**3 #optical power at input in micro-watt\npj=14 #optical power at input in micro-watt\n\n\n#Calculation\nsloss=10*math.log10(N) #splitting loss\nxloss=10*math.log10(pi*(pj*N)**-1) #excess loss\ntloss=sloss+xloss #total loss\niloss=10*math.log10(pi*pj**-1) #insertion loss\n\n#Result\nprint'Total loss = %.2f dB'%tloss\nprint'Insertion loss = %.2f dB'%iloss\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total loss = 18.54 dB\nInsertion loss = 18.54 dB\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.9, page 268"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np=16 #output ports\nl=0.2 #excess loss with split ratio of 50%\nl1=0.1 #splice loss\n\n#Calculation\nm=math.log(p)/math.log(2) #no of stages\nxloss=(4*l)+(3*l1) #excess loss\nsloss=10*math.log10(p) #split loss\niloss=sloss+xloss #insertion loss\n\n#Result\nprint'Insertion loss = %.2f dB'%iloss",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Insertion loss = 13.14 dB\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.10, page 277"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=1.55*10**-6 #optical signal wavelength\nN=1.46 #refractive index\n\n\n#Calculation\nv=h/(2*N) #grating period of the FBG\n\n#Result\nprint'Grating period of FBG = %.2f um'%(v*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Grating period of FBG = 0.53 um\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter5_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter5_2.ipynb
new file mode 100755
index 00000000..0c445b62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter5_2.ipynb
@@ -0,0 +1,239 @@
+{
+ "metadata": {
+ "name": "Chapter_5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Chapter 5 : Optical fiber connection: joints, couplers and isolators"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.1, page 220"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.5 #core refractive index\nn=1.0 #refractive index of medium\n\n#Calculation\nr=((n1-n)/(n1+n))**2 #magnitude of the Fresnel reflection at the fiber\u2013air interface\nLoss=-10*math.log10(1-r) #loss in decibels at the single interface\nLoss1=2*Loss #total loss\n\n#Result\nprint'Total loss due to Fresnel reflection = %.2f dB'%Loss1 #loss due to fresnel resolution = 0.18X2 dB\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total loss due to Fresnel reflection = 0.35 dB\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.2, page 224"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn1=1.5 #refractive index\ny=5 #lateral offset of the fiber core axes in um\na=25 #radius in um\n\n#Calculation\nb=(16*n1**2)/(math.pi*(1+n1)**4)\nc=math.acos(y*(2*a)**-1)\ne=(y*a**-1)\nf=math.sqrt(1-(y*(2*a)**-1)**2)\nn=b*((2*c)-(e*f)) #coupling efficiency \nLoss=-10*math.log10(n) #insertion loss\nna=(math.pi**-1)*((2*c)-(e*f))\nLoss1=-10*math.log10(na) \n\n#Result\nprint'(a) Insertion loss = %.3f dB'%Loss\nprint'(b) Insertion loss = %.2f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Insertion loss = 0.945 dB\n(b) Insertion loss = 0.59 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.3, page 226"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ny=3 #lateral misalignment in um\na=25 #core radius in um\n\n#Calculation\nLt=0.85*(y*a**-1) #misalignment loss for guided modes\nn=1-Lt #coupling efficiency\nLoss=-10*math.log10(n) #insertion loss\nLt1=0.75*(y*a**-1) #both guided and leaky modes \nn1=1-Lt1 #coupling efficiency\nLoss1=-10*math.log10(n1) #insertion loss\n\n#Result\nprint'(a) Uniform illumination of all guided modes only = %.2f dB'%Loss\nprint'(b) Uniform illumination of all guided and leaky modes = %.2f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Uniform illumination of all guided modes only = 0.47 dB\n(b) Uniform illumination of all guided and leaky modes = 0.41 dB\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.4, page 227"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.2 #numerical aperture\nn1=1.48 #core refractive index\nang=(5*math.pi)/180 #angular misalignment (radians)\nNA1=0.4 #numerical aperture\n\n#Calculation\nna=((16*(n1)**2)/((1+n1)**4))*(1-(ang/(math.pi*NA))) #angular coupling efficiency\nLoss=-10*math.log10(na) #insertion loss\nna1=((16*(n1)**2)/((1+n1)**4))*(1-(ang/(math.pi*NA1))) #angular coupling efficiency\nLoss1=-10*math.log10(na1) #insertion loss\n\n#Result\nprint'Insertion loss at a joint (NA = 0.2) = %.2f dB'%Loss\nprint'Insertion loss at a joint (NA = 0.4) = %.2f dB'%Loss1 #in textbook, value is not calculated",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Insertion loss at a joint (NA = 0.2) = 0.98 dB\nInsertion loss at a joint (NA = 0.4) = 0.64 dB\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.5, page 231"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nV=2.4 #normalized frequency\na=4 #core radius in um\nNA=0.1 #numerical aperture \nn1=1.46 #core refractive index\ny=1 #lateral misalignment in um\nteta=math.pi/180 #angular misalignment in rad\n\n#Calculation\nw=a*(0.65+(1.62/V**1.5)+(2.88/V**6))/(2**0.5) #normalized spot size\nTl=2.17*(y/w)**2 #loss due to the lateral offset\nTa=2.17*((teta*w*n1*V)/(a*NA))**2 #loss due to angular misalignment\nTt=Tl+Ta #total insertion loss\n\n#Result\nprint'Total insertion loss = %.2f dB'%Tt",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total insertion loss = 0.72 dB\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.6, page 232"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nw01=5.6 #mode-field radius in um\nw02=4.2 #mode-field radius in um\n\n#Calculation\nLoss=-10*math.log10(4*((w02/w01)+(w01/w02))**(-2)) #intrinsic loss \n\n#Result\nprint'Intrinsic loss = %.2f dB'%Loss",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Intrinsic loss = 0.35 dB\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.7, page 262"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np1=60 #input port power\np2=0.004 #output port power\np3=26 #output port power\np4=27.5 #output port power\n\n\n#Calculation\nxloss=10*math.log10(p1/(p3+p4)) #Excess Loss\niloss1=10*math.log10(p1*p3**-1) #Insertion Loss at input\niloss2=10*math.log10(p1/p4) #Insertion Loss at output\ncross=10*math.log10(p2/p1) #Crosstalk ratio\nsrat=((p3/(p3+p4))*100) #Split ratio\n\n#Result\nprint'Excess Loss = %.1f dB'%xloss\nprint'Insertion Loss at input = %.2f dB'%iloss1\nprint'Insertion Loss at output = %.2f dB'%iloss2\nprint'Crosstalk ratio = %.1f dB'%cross\nprint'Split ratio = %.1f percent'%srat",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Excess Loss = 0.5 dB\nInsertion Loss at input = 3.63 dB\nInsertion Loss at output = 3.39 dB\nCrosstalk ratio = -41.8 dB\nSplit ratio = 48.6 percent\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.8, page 266"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nN=32 #total no of ports\npi=10**3 #optical power at input in micro-watt\npj=14 #optical power at input in micro-watt\n\n\n#Calculation\nsloss=10*math.log10(N) #splitting loss\nxloss=10*math.log10(pi*(pj*N)**-1) #excess loss\ntloss=sloss+xloss #total loss\niloss=10*math.log10(pi*pj**-1) #insertion loss\n\n#Result\nprint'Total loss = %.2f dB'%tloss\nprint'Insertion loss = %.2f dB'%iloss\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total loss = 18.54 dB\nInsertion loss = 18.54 dB\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.9, page 268"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\np=16 #output ports\nl=0.2 #excess loss with split ratio of 50%\nl1=0.1 #splice loss\n\n#Calculation\nm=math.log(p)/math.log(2) #no of stages\nxloss=(4*l)+(3*l1) #excess loss\nsloss=10*math.log10(p) #split loss\niloss=sloss+xloss #insertion loss\n\n#Result\nprint'Insertion loss = %.2f dB'%iloss",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Insertion loss = 13.14 dB\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.10, page 277"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nh=1.55*10**-6 #optical signal wavelength\nN=1.46 #refractive index\n\n\n#Calculation\nv=h/(2*N) #grating period of the FBG\n\n#Result\nprint'Grating period of FBG = %.2f um'%(v*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Grating period of FBG = 0.53 um\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter6.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter6.ipynb
new file mode 100755
index 00000000..fa4189b4
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter6.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6 - Optical sources 1: the laser\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.1, page 301"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nc=2.998*10**8 #speed of light in m/s\nh=0.5*10**-6 #operating wavelength in um\nt=1000 #tempreture in K\n\n#Calculation\nf=c/h #operating frequency\nr=1/math.exp((6.626*10**-34*f)/(1.381*10**-23*t)) #ratio\n\n#Result\nprint'Ratio = %.1f x 10^-13 '%(r*10**13)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio = 3.2 x 10^-13 \n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.2, page 306"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=1.78 #refractive index\nL=0.04 #length in meter\nh=0.55*10**-6 #peak emission wavelength in um\nc=2.998*10**8 #speed of light in meter\n\n#Calculation\nq=2*n*L/h #no of longitudinal modes\nsf=c/(2*n*L) #frequency separation modes\n\n#Result\nprint'No of longitudinal modes = %.1f x 10^5'%(q/10**5)\nprint'Frequency separation modes = %.1f GHz'%(sf/10**9)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "No of longitudinal modes = 2.6 x 10^5\nFrequency separation modes = 2.1 GHz\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.3, page 308"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\na=30 #active cavity losses\nL=0.06 #length in meter\nr=0.3 #reflectivity\n\n\n#Calculation\ngm=a+(1/L)+(1/r) #laser gain coefficient\n\n\n#Result\nprint'Laser gain coefficient = %.1f cm^-1'%gm",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Laser gain coefficient = 50.0 cm^-1\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.4, page 315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nBt1=7.21*10**-10 #recombination coefficient of GaAs\nBt2=1.79*10**-15 #recombination coefficient of Si\nN=10**18 #hole concentration \n\n#Calculation\ntr1=(Bt1*N)**-1 #radiative carrier lifetime of GaAs\ntr2=(Bt2*N)**-1 #radiative carrier lifetime of Si\n\n#Result\nprint'Radiative carrier lifetime of silicon = %.2f ms'%(tr2*1000)\nprint'Radiative carrier lifetime of gallium arsenide = %.2f ns'%(tr1*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Radiative carrier lifetime of silicon = 0.56 ms\nRadiative carrier lifetime of gallium arsenide = 1.39 ns\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.5, page 322"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn=3.6 #refractive index\nB=21*10**-3 #gain factor\na=10 #loss coefficient per cm\nL=250*10**-4 #optical cavity length\nw=100*10**-4 #optical cavity width\n\n#Calculation\nr=((n-1)/(n+1))**2 #reflectivity\njth=(1/B)*(a+math.log(1/r)/L) #threshold current density\narea=L*w #area\nith=jth*area #threshold current\n \n#Result\nprint'Threshold current = %.1f mA'%(ith*1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold current = 662.4 mA\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.6, page 330"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nnt=0.18 #total efficiency\nE=1.43 #bandgap energy\nV=2.5 #voltage\n\n\n#Calculation\nnep=nt*(E/V)*100 #external power efficiency\n\n#Result\nprint'External power efficiency = %d percent'%nep",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "External power efficiency = 10 percent\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.7, page 352"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt1=20+273 #tempreture 20 \u00b0C convert to kelvin\nt2=80+273 #tempreture 80 \u00b0C convert to kelvin\nL1=160 #tempreture 160K\nL2=55 #tempreture 55K\n\n#Calculation\na=t1*L1**-1 \nb=t2*L1**-1\nc=t1*L2**-1\nd=t2*L2**-1\nJa1=math.exp(a) #For the AlGaAs device\nJa2=math.exp(b) #For the AlGaAs device\nJa=Ja2/Ja1 #ratio of the current densities\nJb1=math.exp(c) #For the InGaAsP device\nJb2=math.exp(d) #For the InGaAsP device\nJb=Jb2/Jb1 #ratio of the current densities\n\n#Result\nprint'Threshold current density at 20 \u00b0C = %.2f'%Ja\nprint' at 80 \u00b0C = %.2f' %Jb\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold current density at 20 \u00b0C = 1.45\n at 80 \u00b0C = 2.98\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.8, page 359"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ns=10**-15 #RIN value \nf=100*10**6 #bandwidth\ne=1.602*10**-19 #1 electron volt\nn=0.6 #quantum efficiency\nh=1.55*10**-6 #wavelength in um\npe=2*10**-3 #power incident\nB=100*10**6 #bandwidth\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\n\n#Calculation\nsr=s*f \nrin=math.sqrt(sr) #RMS value of power fluctuation\nirn=e*n*h*rin*pe*math.sqrt(B)*10**-4/(h1*c) #RMS noise current\n\n#Result\nprint'(a) RMS value of power fluctuation = %.2f x 10^-4 W'%(rin*10**4)\nprint'(b) RMS noise current = %.2f x 10^-7 A'%(irn*10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) RMS value of power fluctuation = 3.16 x 10^-4 W\n(b) RMS noise current = 4.74 x 10^-7 A\n"
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter6_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter6_1.ipynb
new file mode 100755
index 00000000..fa4189b4
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter6_1.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6 - Optical sources 1: the laser\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.1, page 301"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nc=2.998*10**8 #speed of light in m/s\nh=0.5*10**-6 #operating wavelength in um\nt=1000 #tempreture in K\n\n#Calculation\nf=c/h #operating frequency\nr=1/math.exp((6.626*10**-34*f)/(1.381*10**-23*t)) #ratio\n\n#Result\nprint'Ratio = %.1f x 10^-13 '%(r*10**13)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio = 3.2 x 10^-13 \n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.2, page 306"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=1.78 #refractive index\nL=0.04 #length in meter\nh=0.55*10**-6 #peak emission wavelength in um\nc=2.998*10**8 #speed of light in meter\n\n#Calculation\nq=2*n*L/h #no of longitudinal modes\nsf=c/(2*n*L) #frequency separation modes\n\n#Result\nprint'No of longitudinal modes = %.1f x 10^5'%(q/10**5)\nprint'Frequency separation modes = %.1f GHz'%(sf/10**9)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "No of longitudinal modes = 2.6 x 10^5\nFrequency separation modes = 2.1 GHz\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.3, page 308"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\na=30 #active cavity losses\nL=0.06 #length in meter\nr=0.3 #reflectivity\n\n\n#Calculation\ngm=a+(1/L)+(1/r) #laser gain coefficient\n\n\n#Result\nprint'Laser gain coefficient = %.1f cm^-1'%gm",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Laser gain coefficient = 50.0 cm^-1\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.4, page 315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nBt1=7.21*10**-10 #recombination coefficient of GaAs\nBt2=1.79*10**-15 #recombination coefficient of Si\nN=10**18 #hole concentration \n\n#Calculation\ntr1=(Bt1*N)**-1 #radiative carrier lifetime of GaAs\ntr2=(Bt2*N)**-1 #radiative carrier lifetime of Si\n\n#Result\nprint'Radiative carrier lifetime of silicon = %.2f ms'%(tr2*1000)\nprint'Radiative carrier lifetime of gallium arsenide = %.2f ns'%(tr1*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Radiative carrier lifetime of silicon = 0.56 ms\nRadiative carrier lifetime of gallium arsenide = 1.39 ns\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.5, page 322"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn=3.6 #refractive index\nB=21*10**-3 #gain factor\na=10 #loss coefficient per cm\nL=250*10**-4 #optical cavity length\nw=100*10**-4 #optical cavity width\n\n#Calculation\nr=((n-1)/(n+1))**2 #reflectivity\njth=(1/B)*(a+math.log(1/r)/L) #threshold current density\narea=L*w #area\nith=jth*area #threshold current\n \n#Result\nprint'Threshold current = %.1f mA'%(ith*1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold current = 662.4 mA\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.6, page 330"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nnt=0.18 #total efficiency\nE=1.43 #bandgap energy\nV=2.5 #voltage\n\n\n#Calculation\nnep=nt*(E/V)*100 #external power efficiency\n\n#Result\nprint'External power efficiency = %d percent'%nep",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "External power efficiency = 10 percent\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.7, page 352"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt1=20+273 #tempreture 20 \u00b0C convert to kelvin\nt2=80+273 #tempreture 80 \u00b0C convert to kelvin\nL1=160 #tempreture 160K\nL2=55 #tempreture 55K\n\n#Calculation\na=t1*L1**-1 \nb=t2*L1**-1\nc=t1*L2**-1\nd=t2*L2**-1\nJa1=math.exp(a) #For the AlGaAs device\nJa2=math.exp(b) #For the AlGaAs device\nJa=Ja2/Ja1 #ratio of the current densities\nJb1=math.exp(c) #For the InGaAsP device\nJb2=math.exp(d) #For the InGaAsP device\nJb=Jb2/Jb1 #ratio of the current densities\n\n#Result\nprint'Threshold current density at 20 \u00b0C = %.2f'%Ja\nprint' at 80 \u00b0C = %.2f' %Jb\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold current density at 20 \u00b0C = 1.45\n at 80 \u00b0C = 2.98\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.8, page 359"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ns=10**-15 #RIN value \nf=100*10**6 #bandwidth\ne=1.602*10**-19 #1 electron volt\nn=0.6 #quantum efficiency\nh=1.55*10**-6 #wavelength in um\npe=2*10**-3 #power incident\nB=100*10**6 #bandwidth\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\n\n#Calculation\nsr=s*f \nrin=math.sqrt(sr) #RMS value of power fluctuation\nirn=e*n*h*rin*pe*math.sqrt(B)*10**-4/(h1*c) #RMS noise current\n\n#Result\nprint'(a) RMS value of power fluctuation = %.2f x 10^-4 W'%(rin*10**4)\nprint'(b) RMS noise current = %.2f x 10^-7 A'%(irn*10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) RMS value of power fluctuation = 3.16 x 10^-4 W\n(b) RMS noise current = 4.74 x 10^-7 A\n"
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter6_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter6_2.ipynb
new file mode 100755
index 00000000..fa4189b4
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter6_2.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 6 - Optical sources 1: the laser\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.1, page 301"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nc=2.998*10**8 #speed of light in m/s\nh=0.5*10**-6 #operating wavelength in um\nt=1000 #tempreture in K\n\n#Calculation\nf=c/h #operating frequency\nr=1/math.exp((6.626*10**-34*f)/(1.381*10**-23*t)) #ratio\n\n#Result\nprint'Ratio = %.1f x 10^-13 '%(r*10**13)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Ratio = 3.2 x 10^-13 \n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.2, page 306"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=1.78 #refractive index\nL=0.04 #length in meter\nh=0.55*10**-6 #peak emission wavelength in um\nc=2.998*10**8 #speed of light in meter\n\n#Calculation\nq=2*n*L/h #no of longitudinal modes\nsf=c/(2*n*L) #frequency separation modes\n\n#Result\nprint'No of longitudinal modes = %.1f x 10^5'%(q/10**5)\nprint'Frequency separation modes = %.1f GHz'%(sf/10**9)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "No of longitudinal modes = 2.6 x 10^5\nFrequency separation modes = 2.1 GHz\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.3, page 308"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\na=30 #active cavity losses\nL=0.06 #length in meter\nr=0.3 #reflectivity\n\n\n#Calculation\ngm=a+(1/L)+(1/r) #laser gain coefficient\n\n\n#Result\nprint'Laser gain coefficient = %.1f cm^-1'%gm",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Laser gain coefficient = 50.0 cm^-1\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.4, page 315"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nBt1=7.21*10**-10 #recombination coefficient of GaAs\nBt2=1.79*10**-15 #recombination coefficient of Si\nN=10**18 #hole concentration \n\n#Calculation\ntr1=(Bt1*N)**-1 #radiative carrier lifetime of GaAs\ntr2=(Bt2*N)**-1 #radiative carrier lifetime of Si\n\n#Result\nprint'Radiative carrier lifetime of silicon = %.2f ms'%(tr2*1000)\nprint'Radiative carrier lifetime of gallium arsenide = %.2f ns'%(tr1*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Radiative carrier lifetime of silicon = 0.56 ms\nRadiative carrier lifetime of gallium arsenide = 1.39 ns\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.5, page 322"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nn=3.6 #refractive index\nB=21*10**-3 #gain factor\na=10 #loss coefficient per cm\nL=250*10**-4 #optical cavity length\nw=100*10**-4 #optical cavity width\n\n#Calculation\nr=((n-1)/(n+1))**2 #reflectivity\njth=(1/B)*(a+math.log(1/r)/L) #threshold current density\narea=L*w #area\nith=jth*area #threshold current\n \n#Result\nprint'Threshold current = %.1f mA'%(ith*1000)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold current = 662.4 mA\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.6, page 330"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nnt=0.18 #total efficiency\nE=1.43 #bandgap energy\nV=2.5 #voltage\n\n\n#Calculation\nnep=nt*(E/V)*100 #external power efficiency\n\n#Result\nprint'External power efficiency = %d percent'%nep",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "External power efficiency = 10 percent\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.7, page 352"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt1=20+273 #tempreture 20 \u00b0C convert to kelvin\nt2=80+273 #tempreture 80 \u00b0C convert to kelvin\nL1=160 #tempreture 160K\nL2=55 #tempreture 55K\n\n#Calculation\na=t1*L1**-1 \nb=t2*L1**-1\nc=t1*L2**-1\nd=t2*L2**-1\nJa1=math.exp(a) #For the AlGaAs device\nJa2=math.exp(b) #For the AlGaAs device\nJa=Ja2/Ja1 #ratio of the current densities\nJb1=math.exp(c) #For the InGaAsP device\nJb2=math.exp(d) #For the InGaAsP device\nJb=Jb2/Jb1 #ratio of the current densities\n\n#Result\nprint'Threshold current density at 20 \u00b0C = %.2f'%Ja\nprint' at 80 \u00b0C = %.2f' %Jb\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Threshold current density at 20 \u00b0C = 1.45\n at 80 \u00b0C = 2.98\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 6.8, page 359"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ns=10**-15 #RIN value \nf=100*10**6 #bandwidth\ne=1.602*10**-19 #1 electron volt\nn=0.6 #quantum efficiency\nh=1.55*10**-6 #wavelength in um\npe=2*10**-3 #power incident\nB=100*10**6 #bandwidth\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\n\n#Calculation\nsr=s*f \nrin=math.sqrt(sr) #RMS value of power fluctuation\nirn=e*n*h*rin*pe*math.sqrt(B)*10**-4/(h1*c) #RMS noise current\n\n#Result\nprint'(a) RMS value of power fluctuation = %.2f x 10^-4 W'%(rin*10**4)\nprint'(b) RMS noise current = %.2f x 10^-7 A'%(irn*10**7)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) RMS value of power fluctuation = 3.16 x 10^-4 W\n(b) RMS noise current = 4.74 x 10^-7 A\n"
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter7.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter7.ipynb
new file mode 100755
index 00000000..7150478c
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter7.ipynb
@@ -0,0 +1,167 @@
+{
+ "metadata": {
+ "name": "Chapter_7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 - Optical sources 2: the light-emitting diode\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.1, page 401"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ntr=60*10**-9 #radiative ecombination lifetime\ntnr=100*10**-9 #nonradiative ecombination lifetime\nh=6.626*10**-34 #plancks const\nc=2.998*10**8 #speed of light\ni=40*10**-3 #drive current\ne=1.602*10**-19 #1 electron volt\nh1=0.87*10**-6 #wavelength\n\n#Calculation\nt=(tr*tnr)/(tr+tnr) #total carrier recombination lifetime\nn=t/tr #quantum efficiency \npin=n*h*c*i/(e*h1) #internal power generated\n\n#Result\nprint'Total carrier recombination lifetime = %.1f ns'%(t*10**9)\nprint'Power internally generated = %.1f mW'%(pin*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total carrier recombination lifetime = 37.5 ns\nPower internally generated = 35.6 mW\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.2, page 402"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nF=0.68 #crystal\u2013air interface\nn=1 #refractive index of air\nnx=3.6 #refractive index of Ga\n\n\n#Calculation\npe=(F*n**2)/(4*nx**2) #Optical power emitted\nn1=pe*100/2 #External power efficiency\n\n#Result\nprint'Optical power emitted = %.3f *Pint'%(pe)\nprint'External power efficiency = %.2f percent'%n1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power emitted = 0.013 *Pint\nExternal power efficiency = 0.66 percent\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.3, page 404"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.2 #numerical aperture\npe=0.013 #optical power emitted\n\n#Calculation\nnc=NA**2 #coupling efficiency\nLoss=-10*math.log10(nc) #optical loss\npc=nc*pe #coupling power\nLoss1=-10*math.log10(pc) #internal power relative loss\n\n#Result\nprint'Coupling efficiency = %.2f'%nc\nprint'Optical loss = %.1f dB'%Loss\nprint'Loss due internal optical power = %.1f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Coupling efficiency = 0.04\nOptical loss = 14.0 dB\nLoss due internal optical power = 32.8 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.4, page 409"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nr=0.01 #fresnel reflection coefficient \nRd=30 #radiance\nNA=0.15 #numerical aperture\na=25*10**-4 \n\n#Calculation\nA=math.pi*a**2 #emission area\npc=math.pi*(1-r)*A*Rd*NA**2 #optical power\n\n#Result\nprint'Optical power = %.1f uW'%(pc*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power = 41.2 uW\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.5, page 421"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npc=190*10**-6 #optical power\np=25*10**-3 #forward current\nv=1.5 #voltage\n\n\n#Calculation\nn=(pc/(p*v))*100 #power efficiency\n\n#Result\nprint'Overall power efficiency = %.1f percent'%n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Overall power efficiency = 0.5 percent\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.7, page 430"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npdc=300*10**-6 #optical output power\nf=20*10**6 #frequency in hertz\nti=5*10**-9 #minority carrier recombination lifetime\nf2=100*10**6 #frequency in hertz\nt=10**-8\nw=math.sqrt(3)\n\n#Calculation\npe1=pdc/math.sqrt(1+(2*math.pi*f*ti)**2) #Optical output power (f=20 MHz)\npe2=pdc/math.sqrt(1+(2*math.pi*f2*ti)**2) #Optical output power (f=100 MHz)\nf=w/(math.pi*t)\nB=f/math.sqrt(2)\n\n#Result\nprint'(a) Optical output power (f=20 MHz) = %.2f uW'%(pe1*10**6)\nprint'(b) Optical output power (f=100 MHz) = %.2f uW'%(pe2*10**6)\nprint'Electrical bandwidth = %.1f MHz'%(B*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Optical output power (f=20 MHz) = 254.02 uW\n(b) Optical output power (f=100 MHz) = 90.99 uW\nElectrical bandwidth = 39.0 MHz\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.8, page 435"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nbo=1.84*10**7 #proportionality constant\ne=-1.602*10**-19 #charge of electron\nk=1.38*10**-23 #boltzman constant\nt1=290 #tempreture in kelvin\nexp=0.67\n\n\n\n#Calculation\nbt=bo*math.exp(e/(k*t1)) #degradation rate\nt=-math.log(exp)/bt #operating lifetime\n\n#Result\nprint'CW operating lifetime = %.1f x 10^9 h'%(t*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "CW operating lifetime = 5.3 x 10^9 h\n"
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter7_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter7_1.ipynb
new file mode 100755
index 00000000..7150478c
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter7_1.ipynb
@@ -0,0 +1,167 @@
+{
+ "metadata": {
+ "name": "Chapter_7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 - Optical sources 2: the light-emitting diode\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.1, page 401"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ntr=60*10**-9 #radiative ecombination lifetime\ntnr=100*10**-9 #nonradiative ecombination lifetime\nh=6.626*10**-34 #plancks const\nc=2.998*10**8 #speed of light\ni=40*10**-3 #drive current\ne=1.602*10**-19 #1 electron volt\nh1=0.87*10**-6 #wavelength\n\n#Calculation\nt=(tr*tnr)/(tr+tnr) #total carrier recombination lifetime\nn=t/tr #quantum efficiency \npin=n*h*c*i/(e*h1) #internal power generated\n\n#Result\nprint'Total carrier recombination lifetime = %.1f ns'%(t*10**9)\nprint'Power internally generated = %.1f mW'%(pin*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total carrier recombination lifetime = 37.5 ns\nPower internally generated = 35.6 mW\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.2, page 402"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nF=0.68 #crystal\u2013air interface\nn=1 #refractive index of air\nnx=3.6 #refractive index of Ga\n\n\n#Calculation\npe=(F*n**2)/(4*nx**2) #Optical power emitted\nn1=pe*100/2 #External power efficiency\n\n#Result\nprint'Optical power emitted = %.3f *Pint'%(pe)\nprint'External power efficiency = %.2f percent'%n1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power emitted = 0.013 *Pint\nExternal power efficiency = 0.66 percent\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.3, page 404"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.2 #numerical aperture\npe=0.013 #optical power emitted\n\n#Calculation\nnc=NA**2 #coupling efficiency\nLoss=-10*math.log10(nc) #optical loss\npc=nc*pe #coupling power\nLoss1=-10*math.log10(pc) #internal power relative loss\n\n#Result\nprint'Coupling efficiency = %.2f'%nc\nprint'Optical loss = %.1f dB'%Loss\nprint'Loss due internal optical power = %.1f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Coupling efficiency = 0.04\nOptical loss = 14.0 dB\nLoss due internal optical power = 32.8 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.4, page 409"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nr=0.01 #fresnel reflection coefficient \nRd=30 #radiance\nNA=0.15 #numerical aperture\na=25*10**-4 \n\n#Calculation\nA=math.pi*a**2 #emission area\npc=math.pi*(1-r)*A*Rd*NA**2 #optical power\n\n#Result\nprint'Optical power = %.1f uW'%(pc*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power = 41.2 uW\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.5, page 421"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npc=190*10**-6 #optical power\np=25*10**-3 #forward current\nv=1.5 #voltage\n\n\n#Calculation\nn=(pc/(p*v))*100 #power efficiency\n\n#Result\nprint'Overall power efficiency = %.1f percent'%n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Overall power efficiency = 0.5 percent\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.7, page 430"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npdc=300*10**-6 #optical output power\nf=20*10**6 #frequency in hertz\nti=5*10**-9 #minority carrier recombination lifetime\nf2=100*10**6 #frequency in hertz\nt=10**-8\nw=math.sqrt(3)\n\n#Calculation\npe1=pdc/math.sqrt(1+(2*math.pi*f*ti)**2) #Optical output power (f=20 MHz)\npe2=pdc/math.sqrt(1+(2*math.pi*f2*ti)**2) #Optical output power (f=100 MHz)\nf=w/(math.pi*t)\nB=f/math.sqrt(2)\n\n#Result\nprint'(a) Optical output power (f=20 MHz) = %.2f uW'%(pe1*10**6)\nprint'(b) Optical output power (f=100 MHz) = %.2f uW'%(pe2*10**6)\nprint'Electrical bandwidth = %.1f MHz'%(B*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Optical output power (f=20 MHz) = 254.02 uW\n(b) Optical output power (f=100 MHz) = 90.99 uW\nElectrical bandwidth = 39.0 MHz\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.8, page 435"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nbo=1.84*10**7 #proportionality constant\ne=-1.602*10**-19 #charge of electron\nk=1.38*10**-23 #boltzman constant\nt1=290 #tempreture in kelvin\nexp=0.67\n\n\n\n#Calculation\nbt=bo*math.exp(e/(k*t1)) #degradation rate\nt=-math.log(exp)/bt #operating lifetime\n\n#Result\nprint'CW operating lifetime = %.1f x 10^9 h'%(t*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "CW operating lifetime = 5.3 x 10^9 h\n"
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter7_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter7_2.ipynb
new file mode 100755
index 00000000..7150478c
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter7_2.ipynb
@@ -0,0 +1,167 @@
+{
+ "metadata": {
+ "name": "Chapter_7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 2 - Optical sources 2: the light-emitting diode\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.1, page 401"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ntr=60*10**-9 #radiative ecombination lifetime\ntnr=100*10**-9 #nonradiative ecombination lifetime\nh=6.626*10**-34 #plancks const\nc=2.998*10**8 #speed of light\ni=40*10**-3 #drive current\ne=1.602*10**-19 #1 electron volt\nh1=0.87*10**-6 #wavelength\n\n#Calculation\nt=(tr*tnr)/(tr+tnr) #total carrier recombination lifetime\nn=t/tr #quantum efficiency \npin=n*h*c*i/(e*h1) #internal power generated\n\n#Result\nprint'Total carrier recombination lifetime = %.1f ns'%(t*10**9)\nprint'Power internally generated = %.1f mW'%(pin*10**3)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Total carrier recombination lifetime = 37.5 ns\nPower internally generated = 35.6 mW\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.2, page 402"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nF=0.68 #crystal\u2013air interface\nn=1 #refractive index of air\nnx=3.6 #refractive index of Ga\n\n\n#Calculation\npe=(F*n**2)/(4*nx**2) #Optical power emitted\nn1=pe*100/2 #External power efficiency\n\n#Result\nprint'Optical power emitted = %.3f *Pint'%(pe)\nprint'External power efficiency = %.2f percent'%n1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power emitted = 0.013 *Pint\nExternal power efficiency = 0.66 percent\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.3, page 404"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nNA=0.2 #numerical aperture\npe=0.013 #optical power emitted\n\n#Calculation\nnc=NA**2 #coupling efficiency\nLoss=-10*math.log10(nc) #optical loss\npc=nc*pe #coupling power\nLoss1=-10*math.log10(pc) #internal power relative loss\n\n#Result\nprint'Coupling efficiency = %.2f'%nc\nprint'Optical loss = %.1f dB'%Loss\nprint'Loss due internal optical power = %.1f dB'%Loss1",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Coupling efficiency = 0.04\nOptical loss = 14.0 dB\nLoss due internal optical power = 32.8 dB\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.4, page 409"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nr=0.01 #fresnel reflection coefficient \nRd=30 #radiance\nNA=0.15 #numerical aperture\na=25*10**-4 \n\n#Calculation\nA=math.pi*a**2 #emission area\npc=math.pi*(1-r)*A*Rd*NA**2 #optical power\n\n#Result\nprint'Optical power = %.1f uW'%(pc*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical power = 41.2 uW\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.5, page 421"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npc=190*10**-6 #optical power\np=25*10**-3 #forward current\nv=1.5 #voltage\n\n\n#Calculation\nn=(pc/(p*v))*100 #power efficiency\n\n#Result\nprint'Overall power efficiency = %.1f percent'%n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Overall power efficiency = 0.5 percent\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.7, page 430"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npdc=300*10**-6 #optical output power\nf=20*10**6 #frequency in hertz\nti=5*10**-9 #minority carrier recombination lifetime\nf2=100*10**6 #frequency in hertz\nt=10**-8\nw=math.sqrt(3)\n\n#Calculation\npe1=pdc/math.sqrt(1+(2*math.pi*f*ti)**2) #Optical output power (f=20 MHz)\npe2=pdc/math.sqrt(1+(2*math.pi*f2*ti)**2) #Optical output power (f=100 MHz)\nf=w/(math.pi*t)\nB=f/math.sqrt(2)\n\n#Result\nprint'(a) Optical output power (f=20 MHz) = %.2f uW'%(pe1*10**6)\nprint'(b) Optical output power (f=100 MHz) = %.2f uW'%(pe2*10**6)\nprint'Electrical bandwidth = %.1f MHz'%(B*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Optical output power (f=20 MHz) = 254.02 uW\n(b) Optical output power (f=100 MHz) = 90.99 uW\nElectrical bandwidth = 39.0 MHz\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 7.8, page 435"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nbo=1.84*10**7 #proportionality constant\ne=-1.602*10**-19 #charge of electron\nk=1.38*10**-23 #boltzman constant\nt1=290 #tempreture in kelvin\nexp=0.67\n\n\n\n#Calculation\nbt=bo*math.exp(e/(k*t1)) #degradation rate\nt=-math.log(exp)/bt #operating lifetime\n\n#Result\nprint'CW operating lifetime = %.1f x 10^9 h'%(t*10**-9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "CW operating lifetime = 5.3 x 10^9 h\n"
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter8.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter8.ipynb
new file mode 100755
index 00000000..057f59a0
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter8.ipynb
@@ -0,0 +1,209 @@
+{
+ "metadata": {
+ "name": "Chapter_8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter - 8 : Optical detectors"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.1, page 454"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=1.2*10**11 #no of electrons\nm=3*10**11 #no of photons\ne=1.602*10**-19 #1 electron volt\nh=0.85*10**-6 #wavelength\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\n\n#Calculation\nQ=n/m #quantum efficiency\nR=(Q*e*h)/(h1*c) #responsivity\n\n#Result\nprint'Quantum efficiency = %.1f '%Q\nprint'Responsivity = %.3f A W^-1'%R",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Quantum efficiency = 0.4 \nResponsivity = 0.274 A W^-1\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.2, page 454"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nE=1.5*10**-19 #energy of photons\nn=0.65 #quantum efficiency\ne=1.602*10**-19 #1 electron volt\nio=25*10**-6 #photocurrent\n\n#Calculation\nh=h1*c/E #wavelength\nR=(n*e)/(E) #responsivity\npo=io/R #incident optical power\n\n#Result\nprint'(a) Wavelength = %.2f um'%(h*10**6)\nprint'(b) Incident optical power = %.2f uW'%(po*10**6)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Wavelength = 1.32 um\n(b) Incident optical power = 36.01 uW\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.3, page 456"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nE=1.43 #bandgap energy in eV\n\n#Calculation\nh=h1*c/(E*e) #wavelength\n\n#Result\nprint'Wavelength = %.3f um'%(h*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Wavelength = 0.867 um\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.4, page 463"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nw=20*10**-6 #width\nvd=10**5 #drift velocity\nr=500*10**-6 #diameter in meter\nes=10.5*10**-13 #permitivity\n\n#Calculation\ntd=w/vd #drift time\nA=math.pi*r**2 #area\ncj=es*A/w #junction capacitance\n\n#Result\nprint'Drift time = %.1f x 10^-10 S'%(td*10**10)\nprint'Junction capacitance = %.2f x 10^-13 F'%(cj*10**13)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Drift time = 2.0 x 10^-10 S\nJunction capacitance = 0.41 x 10^-13 F\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.5, page 464"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nvd=3*10**4 #drift velocity\nw=25*10**-6 #width\n\n#Calculation\nBm=vd/(2*math.pi*w) #maximum bandwidth\ntr=1/Bm #maximum response time\n\n#Result\nprint'Maximum response time = %.1f ns'%(tr*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum response time = 5.2 ns\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.6, page 470"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nl=8*10**-9 #dark current\nn=0.55 #quantum efficiency\nh=1.3*10**-6 #wavelength\nA=100*50*10**-12\n\n#Calculation\nnep=(h1*c*math.sqrt(2*e*l))/(n*e*h) #Noise equivalent power\nD=math.sqrt(A)/nep #Specific detectivity\n\n#Result\nprint'Noise equivalent power = %.2f x 10^-14 W'%(nep*10**14)\nprint'Specific detectivity = %.1f x 10^8 m Hz^(1/2) W^-1'%(D*10**-8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Noise equivalent power = 8.78 x 10^-14 W\nSpecific detectivity = 8.1 x 10^8 m Hz^(1/2) W^-1\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.7, page 482"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nn=0.8 #quantum efficiency\nh=0.9*10**-6 #wavelength\npo=0.5*10**-6 #incident optical power\nI=11*10**-6 #output current\n\n#Calculation\nR=(n*e*h)/(h1*c) #resposivity\nIp=po*R #photocurrent\nM=I/Ip #multiplication factor\n\n#Result\nprint'Multiplication factor = %.2f '%M\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Multiplication factor = 37.89 \n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.8, page 487"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nh=1.26*10**-6 #wavelength\nIc=15*10**-3 #collector current\npo=125*10**-6 #incident optical power\nn=0.4 #quantum efficiency\n\n#Calculation\ngo=(h1*c*Ic)/(h*e*po) #Optical gain\nhfe=go/n #Common emitter current gain\n \n#Result\nprint'Optical gain, Go = %.1f'%go\nprint'Common emitter current gain, hfe = %.1f '%hfe",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical gain, Go = 118.1\nCommon emitter current gain, hfe = 295.2 \n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.9, page 491"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt=5*10**-12 #electron transit time\nG=70 #Optical gain\n\n#Calculation\nB=1/(2*math.pi*t*G) #Maximum 3dB bandwidth\n\n#Result\nprint'Maximum bandwidth = %.1f MHz'%(B*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum bandwidth = 454.7 MHz\n"
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter8_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter8_1.ipynb
new file mode 100755
index 00000000..057f59a0
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter8_1.ipynb
@@ -0,0 +1,209 @@
+{
+ "metadata": {
+ "name": "Chapter_8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter - 8 : Optical detectors"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.1, page 454"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=1.2*10**11 #no of electrons\nm=3*10**11 #no of photons\ne=1.602*10**-19 #1 electron volt\nh=0.85*10**-6 #wavelength\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\n\n#Calculation\nQ=n/m #quantum efficiency\nR=(Q*e*h)/(h1*c) #responsivity\n\n#Result\nprint'Quantum efficiency = %.1f '%Q\nprint'Responsivity = %.3f A W^-1'%R",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Quantum efficiency = 0.4 \nResponsivity = 0.274 A W^-1\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.2, page 454"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nE=1.5*10**-19 #energy of photons\nn=0.65 #quantum efficiency\ne=1.602*10**-19 #1 electron volt\nio=25*10**-6 #photocurrent\n\n#Calculation\nh=h1*c/E #wavelength\nR=(n*e)/(E) #responsivity\npo=io/R #incident optical power\n\n#Result\nprint'(a) Wavelength = %.2f um'%(h*10**6)\nprint'(b) Incident optical power = %.2f uW'%(po*10**6)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Wavelength = 1.32 um\n(b) Incident optical power = 36.01 uW\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.3, page 456"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nE=1.43 #bandgap energy in eV\n\n#Calculation\nh=h1*c/(E*e) #wavelength\n\n#Result\nprint'Wavelength = %.3f um'%(h*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Wavelength = 0.867 um\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.4, page 463"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nw=20*10**-6 #width\nvd=10**5 #drift velocity\nr=500*10**-6 #diameter in meter\nes=10.5*10**-13 #permitivity\n\n#Calculation\ntd=w/vd #drift time\nA=math.pi*r**2 #area\ncj=es*A/w #junction capacitance\n\n#Result\nprint'Drift time = %.1f x 10^-10 S'%(td*10**10)\nprint'Junction capacitance = %.2f x 10^-13 F'%(cj*10**13)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Drift time = 2.0 x 10^-10 S\nJunction capacitance = 0.41 x 10^-13 F\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.5, page 464"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nvd=3*10**4 #drift velocity\nw=25*10**-6 #width\n\n#Calculation\nBm=vd/(2*math.pi*w) #maximum bandwidth\ntr=1/Bm #maximum response time\n\n#Result\nprint'Maximum response time = %.1f ns'%(tr*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum response time = 5.2 ns\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.6, page 470"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nl=8*10**-9 #dark current\nn=0.55 #quantum efficiency\nh=1.3*10**-6 #wavelength\nA=100*50*10**-12\n\n#Calculation\nnep=(h1*c*math.sqrt(2*e*l))/(n*e*h) #Noise equivalent power\nD=math.sqrt(A)/nep #Specific detectivity\n\n#Result\nprint'Noise equivalent power = %.2f x 10^-14 W'%(nep*10**14)\nprint'Specific detectivity = %.1f x 10^8 m Hz^(1/2) W^-1'%(D*10**-8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Noise equivalent power = 8.78 x 10^-14 W\nSpecific detectivity = 8.1 x 10^8 m Hz^(1/2) W^-1\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.7, page 482"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nn=0.8 #quantum efficiency\nh=0.9*10**-6 #wavelength\npo=0.5*10**-6 #incident optical power\nI=11*10**-6 #output current\n\n#Calculation\nR=(n*e*h)/(h1*c) #resposivity\nIp=po*R #photocurrent\nM=I/Ip #multiplication factor\n\n#Result\nprint'Multiplication factor = %.2f '%M\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Multiplication factor = 37.89 \n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.8, page 487"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nh=1.26*10**-6 #wavelength\nIc=15*10**-3 #collector current\npo=125*10**-6 #incident optical power\nn=0.4 #quantum efficiency\n\n#Calculation\ngo=(h1*c*Ic)/(h*e*po) #Optical gain\nhfe=go/n #Common emitter current gain\n \n#Result\nprint'Optical gain, Go = %.1f'%go\nprint'Common emitter current gain, hfe = %.1f '%hfe",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical gain, Go = 118.1\nCommon emitter current gain, hfe = 295.2 \n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.9, page 491"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt=5*10**-12 #electron transit time\nG=70 #Optical gain\n\n#Calculation\nB=1/(2*math.pi*t*G) #Maximum 3dB bandwidth\n\n#Result\nprint'Maximum bandwidth = %.1f MHz'%(B*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum bandwidth = 454.7 MHz\n"
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter8_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter8_2.ipynb
new file mode 100755
index 00000000..057f59a0
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter8_2.ipynb
@@ -0,0 +1,209 @@
+{
+ "metadata": {
+ "name": "Chapter_8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter - 8 : Optical detectors"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.1, page 454"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nn=1.2*10**11 #no of electrons\nm=3*10**11 #no of photons\ne=1.602*10**-19 #1 electron volt\nh=0.85*10**-6 #wavelength\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\n\n#Calculation\nQ=n/m #quantum efficiency\nR=(Q*e*h)/(h1*c) #responsivity\n\n#Result\nprint'Quantum efficiency = %.1f '%Q\nprint'Responsivity = %.3f A W^-1'%R",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Quantum efficiency = 0.4 \nResponsivity = 0.274 A W^-1\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.2, page 454"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nE=1.5*10**-19 #energy of photons\nn=0.65 #quantum efficiency\ne=1.602*10**-19 #1 electron volt\nio=25*10**-6 #photocurrent\n\n#Calculation\nh=h1*c/E #wavelength\nR=(n*e)/(E) #responsivity\npo=io/R #incident optical power\n\n#Result\nprint'(a) Wavelength = %.2f um'%(h*10**6)\nprint'(b) Incident optical power = %.2f uW'%(po*10**6)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Wavelength = 1.32 um\n(b) Incident optical power = 36.01 uW\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.3, page 456"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nE=1.43 #bandgap energy in eV\n\n#Calculation\nh=h1*c/(E*e) #wavelength\n\n#Result\nprint'Wavelength = %.3f um'%(h*10**6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Wavelength = 0.867 um\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.4, page 463"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nw=20*10**-6 #width\nvd=10**5 #drift velocity\nr=500*10**-6 #diameter in meter\nes=10.5*10**-13 #permitivity\n\n#Calculation\ntd=w/vd #drift time\nA=math.pi*r**2 #area\ncj=es*A/w #junction capacitance\n\n#Result\nprint'Drift time = %.1f x 10^-10 S'%(td*10**10)\nprint'Junction capacitance = %.2f x 10^-13 F'%(cj*10**13)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Drift time = 2.0 x 10^-10 S\nJunction capacitance = 0.41 x 10^-13 F\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.5, page 464"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nvd=3*10**4 #drift velocity\nw=25*10**-6 #width\n\n#Calculation\nBm=vd/(2*math.pi*w) #maximum bandwidth\ntr=1/Bm #maximum response time\n\n#Result\nprint'Maximum response time = %.1f ns'%(tr*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum response time = 5.2 ns\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.6, page 470"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nl=8*10**-9 #dark current\nn=0.55 #quantum efficiency\nh=1.3*10**-6 #wavelength\nA=100*50*10**-12\n\n#Calculation\nnep=(h1*c*math.sqrt(2*e*l))/(n*e*h) #Noise equivalent power\nD=math.sqrt(A)/nep #Specific detectivity\n\n#Result\nprint'Noise equivalent power = %.2f x 10^-14 W'%(nep*10**14)\nprint'Specific detectivity = %.1f x 10^8 m Hz^(1/2) W^-1'%(D*10**-8)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Noise equivalent power = 8.78 x 10^-14 W\nSpecific detectivity = 8.1 x 10^8 m Hz^(1/2) W^-1\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.7, page 482"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nn=0.8 #quantum efficiency\nh=0.9*10**-6 #wavelength\npo=0.5*10**-6 #incident optical power\nI=11*10**-6 #output current\n\n#Calculation\nR=(n*e*h)/(h1*c) #resposivity\nIp=po*R #photocurrent\nM=I/Ip #multiplication factor\n\n#Result\nprint'Multiplication factor = %.2f '%M\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Multiplication factor = 37.89 \n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.8, page 487"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\ne=1.602*10**-19 #1 electron volt\nh=1.26*10**-6 #wavelength\nIc=15*10**-3 #collector current\npo=125*10**-6 #incident optical power\nn=0.4 #quantum efficiency\n\n#Calculation\ngo=(h1*c*Ic)/(h*e*po) #Optical gain\nhfe=go/n #Common emitter current gain\n \n#Result\nprint'Optical gain, Go = %.1f'%go\nprint'Common emitter current gain, hfe = %.1f '%hfe",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optical gain, Go = 118.1\nCommon emitter current gain, hfe = 295.2 \n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 8.9, page 491"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nt=5*10**-12 #electron transit time\nG=70 #Optical gain\n\n#Calculation\nB=1/(2*math.pi*t*G) #Maximum 3dB bandwidth\n\n#Result\nprint'Maximum bandwidth = %.1f MHz'%(B*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximum bandwidth = 454.7 MHz\n"
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter9.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter9.ipynb
new file mode 100755
index 00000000..42d197be
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter9.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 9 :Direct detection receiver performance considerations\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.1, page 506"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nzm=20.7 #average number of photons\nh=6.626*10**-34 #plancks constant\nf=2.998*10**14 #frequency in hertz \nn=1 #for ideal detector\nBt=10**7 #bit rate\n\n#Calculation\npo=zm*h*f*Bt/(2*n) #output power in binary\npod=10*math.log10(po) #output power in dBW\npod1=10*math.log10(po*10**3) #output power in dBm\n\n#Result\nprint'Minimum incident optical power = %.1f dBW'%(pod)\nprint' = %.1f dBm'%(pod1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum incident optical power = -106.9 dBW\n = -76.9 dBm\n"
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.2, page 508"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsn=50/10 #signal to noise ratio in dB\nf=2.998*10**14 #frequency in hertz\nn=1 #for an ideal detector\nB=5*10**6 #bandwidth\nh=6.626*10**-34 #plancks constant\n\n#Calculation\nSN=10**(sn) \npo=SN*f*2*h*B/n #incident optical power\npdb=10*math.log10(po*10**3) #incident optical power in dB\n\n#Result\nprint'Incident optical power = %.1f nW '%(po*10**9)\nprint' in dB = %.1f dBm'%(pdb)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incident optical power = 198.6 nW \n in dB = -37.0 dBm\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.3, page 512"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=200*10**-9 #incident optical power in W\ne=1.602*10**-19 #1 electron volt\nh=0.9*10**-6 #operating wavelength\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nK=1.38*10**-23 #boltzman constant\nT=293 #tempreture in kelvin\nn=0.6 #quantum efficiency\nB=5*10**6 #post-detection bandwidth \nib=3*10**-9 #dark current in ampere\nRl=4*10**3 #load resistance\n\n#Calculation\nip=n*po*e*h/(h1*c) #photocurrent\ni2=2*e*B*(ib+ip) #total shot noise current\ni2rms=math.sqrt(i2) #RMS value \nit=4*K*T*B/Rl #thermal noise current\nitrms=math.sqrt(it) #RMS value\n\n#Result\nprint'RMS shot noise current = %.2f x10^-10 A'%(i2rms*10**10)\nprint'RMS thermal noise current = %.2f x10^-9 A'%(itrms*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS shot noise current = 3.80 x10^-10 A\nRMS thermal noise current = 4.50 x10^-9 A\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.4, page 514"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nip=87.1*10**-9 #photocurrent\nits=1.44*10**-19 #rms shot noise current \nit=2.02*10**-17 #rms thermal noise current\nfd=0.3 #frequency in 3 dB\n\n#Calculation\nf=10**(fd)\nsn=ip**2/(its+(it*f)) #signal to noise ratio\nsnr=10*math.log10(sn) #signal to noise ratio in dB\n\n#Result\nprint'SNR at output = %.2f dB'%snr",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SNR at output = 22.73 dB\n"
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.5, page 516"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nB=8*10**6 #post detection bandwidth\nCd=6*10**-12 #capacitance in farad\nCa=12*10**-12 #input capacitance in farad\n\n\n#Calculation\nRl=1/(2*math.pi*Cd*B) #maximum load resistance\nB1=1/(2*math.pi*Rl*Ca) #maximum bandwidth\n\n#Result\nprint'Maximu load resistance = %.2f K\u03a9'%(Rl*10**-3)\nprint'Maximum bandwidth = %.1f MHz'%(B1*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximu load resistance = 3.32 K\u03a9\nMaximum bandwidth = 4.0 MHz\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.6, page 518"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nB=50*10**6 #post detection bandwidth\nCd=5*10**-12 #capacitance in farad\ne=1.602*10**-19 #1 electron volt\nK=1.38*10**-23 #boltzman constant\nT=291 #tempreture in kelvin\nib=10**-7 #photocurrent before gain\nx=0.3\n\n#Calculation\nRl=1/(2*math.pi*Cd*B) #maximum value of the load resistor\na=2*e*B*ib #shot noise\nb=4*K*T*B/Rl #thermal noise\nsn=ib**2/(a+b) #SNR, when M = 1,\nsnd=10*math.log10(sn) #SNR in dB\nMop=((4*K*T)/(x*e*Rl*ib))**0.435\nsn1=(Mop**2*ib**2)/((2*e*B*ib*Mop**2.3)+b) #SNR, when M = Mop,\nsdb=10*math.log10(sn1) #SNR in dB\n\n#Result\nprint'SNR (M=1) = %.2f dB'%(snd)\nprint'SNR (M=Mop) = %.1f dB'%(sdb)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SNR (M=1) = 8.99 dB\nSNR (M=Mop) = 32.5 dB\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.7, page 520"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ne=1.602*10**-19 #1 electron volt\nK=1.38*10**-23 #boltzman constant\nT=120 #tempreture in kelvin\nB=10**7 #post detection bandwidth\nsn=3.5 #SNR/10\nfn=0.1 #noise figure/10\nRl=10**4 #load resistance\n\n#Calculation\nsn1=10**(sn)\nfn1=10**(fn)\na=12*K*T*B*fn1/Rl\nb=((4*K*T*fn1)/(1.1*e*Rl))**0.667\nIp=(sn1*a/b)**0.75 #minimum photocurrent\nMop=((4*K*T*fn1)/(e*Ip*1.1*10**3))**0.334 #optimum avalanche multiplication factor\n\n#Result\nprint'Optimum avalanche multiplication factor = %.1f '%(Mop)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optimum avalanche multiplication factor = 8.9 \n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.8, page 528"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nr1=4*10**6 #effective input resistance in ohm\nr2=8*10**6 #resistance in ohm\nct=6*10**-12 #total capacitance in farad\nK=1.38*10**-23 #boltzman constant\nT=300 #tempreture in kelvin\nRf=10**5 #feedback resitor\nG=400 #open loop gain\n\n#Calculation\nRt=(r1**2)/r2 #total effective load resistance\nB=1/(2*math.pi*Rt*ct) #maximum bandwidth\ni2=4*K*T/Rt #for highimpedance config\nB1=G/(2*math.pi*Rf*ct) #maximum bandwidth for transimpedance config\nit=4*K*T/(Rf) #for transimpedance\n\n#transimpedance configuration factor of 20 greater than that obtained high-input-impedance configuration.\nn=it/i2\nndb=10*math.log10(n)\n\n#Result\nprint'(a) Maximum bandwidth = %.2f x10^4 Hz'%(B*10**-4)\nprint'(b) Mean square thermal noise current (high impedance config)= %.2f x10^-27 A^2 Hz^-1'%(i2*10**27)\nprint'\\n(c) Maximum bandwidth for transimpedance = %.2f X 10^6 Hz'%(B1*10**-8)\nprint' Mean square thermal noise current (transimpedance config) = %.2f x10^-25 A^2 Hz^-1'%(it*10**25)\nprint' Ratio of these noise power = %d dB'%ndb",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Maximum bandwidth = 1.33 x10^4 Hz\n(b) Mean square thermal noise current (high impedance config)= 8.28 x10^-27 A^2 Hz^-1\n\n(c) Maximum bandwidth for transimpedance = 1.06 X 10^6 Hz\n Mean square thermal noise current (transimpedance config) = 1.66 x10^-25 A^2 Hz^-1\n Ratio of these noise power = 13 dB\n"
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter9_1.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter9_1.ipynb
new file mode 100755
index 00000000..42d197be
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter9_1.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 9 :Direct detection receiver performance considerations\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.1, page 506"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nzm=20.7 #average number of photons\nh=6.626*10**-34 #plancks constant\nf=2.998*10**14 #frequency in hertz \nn=1 #for ideal detector\nBt=10**7 #bit rate\n\n#Calculation\npo=zm*h*f*Bt/(2*n) #output power in binary\npod=10*math.log10(po) #output power in dBW\npod1=10*math.log10(po*10**3) #output power in dBm\n\n#Result\nprint'Minimum incident optical power = %.1f dBW'%(pod)\nprint' = %.1f dBm'%(pod1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum incident optical power = -106.9 dBW\n = -76.9 dBm\n"
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.2, page 508"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsn=50/10 #signal to noise ratio in dB\nf=2.998*10**14 #frequency in hertz\nn=1 #for an ideal detector\nB=5*10**6 #bandwidth\nh=6.626*10**-34 #plancks constant\n\n#Calculation\nSN=10**(sn) \npo=SN*f*2*h*B/n #incident optical power\npdb=10*math.log10(po*10**3) #incident optical power in dB\n\n#Result\nprint'Incident optical power = %.1f nW '%(po*10**9)\nprint' in dB = %.1f dBm'%(pdb)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incident optical power = 198.6 nW \n in dB = -37.0 dBm\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.3, page 512"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=200*10**-9 #incident optical power in W\ne=1.602*10**-19 #1 electron volt\nh=0.9*10**-6 #operating wavelength\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nK=1.38*10**-23 #boltzman constant\nT=293 #tempreture in kelvin\nn=0.6 #quantum efficiency\nB=5*10**6 #post-detection bandwidth \nib=3*10**-9 #dark current in ampere\nRl=4*10**3 #load resistance\n\n#Calculation\nip=n*po*e*h/(h1*c) #photocurrent\ni2=2*e*B*(ib+ip) #total shot noise current\ni2rms=math.sqrt(i2) #RMS value \nit=4*K*T*B/Rl #thermal noise current\nitrms=math.sqrt(it) #RMS value\n\n#Result\nprint'RMS shot noise current = %.2f x10^-10 A'%(i2rms*10**10)\nprint'RMS thermal noise current = %.2f x10^-9 A'%(itrms*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS shot noise current = 3.80 x10^-10 A\nRMS thermal noise current = 4.50 x10^-9 A\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.4, page 514"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nip=87.1*10**-9 #photocurrent\nits=1.44*10**-19 #rms shot noise current \nit=2.02*10**-17 #rms thermal noise current\nfd=0.3 #frequency in 3 dB\n\n#Calculation\nf=10**(fd)\nsn=ip**2/(its+(it*f)) #signal to noise ratio\nsnr=10*math.log10(sn) #signal to noise ratio in dB\n\n#Result\nprint'SNR at output = %.2f dB'%snr",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SNR at output = 22.73 dB\n"
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.5, page 516"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nB=8*10**6 #post detection bandwidth\nCd=6*10**-12 #capacitance in farad\nCa=12*10**-12 #input capacitance in farad\n\n\n#Calculation\nRl=1/(2*math.pi*Cd*B) #maximum load resistance\nB1=1/(2*math.pi*Rl*Ca) #maximum bandwidth\n\n#Result\nprint'Maximu load resistance = %.2f K\u03a9'%(Rl*10**-3)\nprint'Maximum bandwidth = %.1f MHz'%(B1*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximu load resistance = 3.32 K\u03a9\nMaximum bandwidth = 4.0 MHz\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.6, page 518"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nB=50*10**6 #post detection bandwidth\nCd=5*10**-12 #capacitance in farad\ne=1.602*10**-19 #1 electron volt\nK=1.38*10**-23 #boltzman constant\nT=291 #tempreture in kelvin\nib=10**-7 #photocurrent before gain\nx=0.3\n\n#Calculation\nRl=1/(2*math.pi*Cd*B) #maximum value of the load resistor\na=2*e*B*ib #shot noise\nb=4*K*T*B/Rl #thermal noise\nsn=ib**2/(a+b) #SNR, when M = 1,\nsnd=10*math.log10(sn) #SNR in dB\nMop=((4*K*T)/(x*e*Rl*ib))**0.435\nsn1=(Mop**2*ib**2)/((2*e*B*ib*Mop**2.3)+b) #SNR, when M = Mop,\nsdb=10*math.log10(sn1) #SNR in dB\n\n#Result\nprint'SNR (M=1) = %.2f dB'%(snd)\nprint'SNR (M=Mop) = %.1f dB'%(sdb)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SNR (M=1) = 8.99 dB\nSNR (M=Mop) = 32.5 dB\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.7, page 520"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ne=1.602*10**-19 #1 electron volt\nK=1.38*10**-23 #boltzman constant\nT=120 #tempreture in kelvin\nB=10**7 #post detection bandwidth\nsn=3.5 #SNR/10\nfn=0.1 #noise figure/10\nRl=10**4 #load resistance\n\n#Calculation\nsn1=10**(sn)\nfn1=10**(fn)\na=12*K*T*B*fn1/Rl\nb=((4*K*T*fn1)/(1.1*e*Rl))**0.667\nIp=(sn1*a/b)**0.75 #minimum photocurrent\nMop=((4*K*T*fn1)/(e*Ip*1.1*10**3))**0.334 #optimum avalanche multiplication factor\n\n#Result\nprint'Optimum avalanche multiplication factor = %.1f '%(Mop)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optimum avalanche multiplication factor = 8.9 \n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.8, page 528"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nr1=4*10**6 #effective input resistance in ohm\nr2=8*10**6 #resistance in ohm\nct=6*10**-12 #total capacitance in farad\nK=1.38*10**-23 #boltzman constant\nT=300 #tempreture in kelvin\nRf=10**5 #feedback resitor\nG=400 #open loop gain\n\n#Calculation\nRt=(r1**2)/r2 #total effective load resistance\nB=1/(2*math.pi*Rt*ct) #maximum bandwidth\ni2=4*K*T/Rt #for highimpedance config\nB1=G/(2*math.pi*Rf*ct) #maximum bandwidth for transimpedance config\nit=4*K*T/(Rf) #for transimpedance\n\n#transimpedance configuration factor of 20 greater than that obtained high-input-impedance configuration.\nn=it/i2\nndb=10*math.log10(n)\n\n#Result\nprint'(a) Maximum bandwidth = %.2f x10^4 Hz'%(B*10**-4)\nprint'(b) Mean square thermal noise current (high impedance config)= %.2f x10^-27 A^2 Hz^-1'%(i2*10**27)\nprint'\\n(c) Maximum bandwidth for transimpedance = %.2f X 10^6 Hz'%(B1*10**-8)\nprint' Mean square thermal noise current (transimpedance config) = %.2f x10^-25 A^2 Hz^-1'%(it*10**25)\nprint' Ratio of these noise power = %d dB'%ndb",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Maximum bandwidth = 1.33 x10^4 Hz\n(b) Mean square thermal noise current (high impedance config)= 8.28 x10^-27 A^2 Hz^-1\n\n(c) Maximum bandwidth for transimpedance = 1.06 X 10^6 Hz\n Mean square thermal noise current (transimpedance config) = 1.66 x10^-25 A^2 Hz^-1\n Ratio of these noise power = 13 dB\n"
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/Chapter9_2.ipynb b/Optical_Fiber_Communication_Principles_and_Practice/Chapter9_2.ipynb
new file mode 100755
index 00000000..42d197be
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/Chapter9_2.ipynb
@@ -0,0 +1,188 @@
+{
+ "metadata": {
+ "name": "Chapter_9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Chapter 9 :Direct detection receiver performance considerations\n"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.1, page 506"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nzm=20.7 #average number of photons\nh=6.626*10**-34 #plancks constant\nf=2.998*10**14 #frequency in hertz \nn=1 #for ideal detector\nBt=10**7 #bit rate\n\n#Calculation\npo=zm*h*f*Bt/(2*n) #output power in binary\npod=10*math.log10(po) #output power in dBW\npod1=10*math.log10(po*10**3) #output power in dBm\n\n#Result\nprint'Minimum incident optical power = %.1f dBW'%(pod)\nprint' = %.1f dBm'%(pod1)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Minimum incident optical power = -106.9 dBW\n = -76.9 dBm\n"
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.2, page 508"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nsn=50/10 #signal to noise ratio in dB\nf=2.998*10**14 #frequency in hertz\nn=1 #for an ideal detector\nB=5*10**6 #bandwidth\nh=6.626*10**-34 #plancks constant\n\n#Calculation\nSN=10**(sn) \npo=SN*f*2*h*B/n #incident optical power\npdb=10*math.log10(po*10**3) #incident optical power in dB\n\n#Result\nprint'Incident optical power = %.1f nW '%(po*10**9)\nprint' in dB = %.1f dBm'%(pdb)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Incident optical power = 198.6 nW \n in dB = -37.0 dBm\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.3, page 512"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\npo=200*10**-9 #incident optical power in W\ne=1.602*10**-19 #1 electron volt\nh=0.9*10**-6 #operating wavelength\nh1=6.626*10**-34 #plancks constant\nc=2.998*10**8 #speed of light\nK=1.38*10**-23 #boltzman constant\nT=293 #tempreture in kelvin\nn=0.6 #quantum efficiency\nB=5*10**6 #post-detection bandwidth \nib=3*10**-9 #dark current in ampere\nRl=4*10**3 #load resistance\n\n#Calculation\nip=n*po*e*h/(h1*c) #photocurrent\ni2=2*e*B*(ib+ip) #total shot noise current\ni2rms=math.sqrt(i2) #RMS value \nit=4*K*T*B/Rl #thermal noise current\nitrms=math.sqrt(it) #RMS value\n\n#Result\nprint'RMS shot noise current = %.2f x10^-10 A'%(i2rms*10**10)\nprint'RMS thermal noise current = %.2f x10^-9 A'%(itrms*10**9)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "RMS shot noise current = 3.80 x10^-10 A\nRMS thermal noise current = 4.50 x10^-9 A\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.4, page 514"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nip=87.1*10**-9 #photocurrent\nits=1.44*10**-19 #rms shot noise current \nit=2.02*10**-17 #rms thermal noise current\nfd=0.3 #frequency in 3 dB\n\n#Calculation\nf=10**(fd)\nsn=ip**2/(its+(it*f)) #signal to noise ratio\nsnr=10*math.log10(sn) #signal to noise ratio in dB\n\n#Result\nprint'SNR at output = %.2f dB'%snr",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SNR at output = 22.73 dB\n"
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.5, page 516"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nB=8*10**6 #post detection bandwidth\nCd=6*10**-12 #capacitance in farad\nCa=12*10**-12 #input capacitance in farad\n\n\n#Calculation\nRl=1/(2*math.pi*Cd*B) #maximum load resistance\nB1=1/(2*math.pi*Rl*Ca) #maximum bandwidth\n\n#Result\nprint'Maximu load resistance = %.2f K\u03a9'%(Rl*10**-3)\nprint'Maximum bandwidth = %.1f MHz'%(B1*10**-6)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Maximu load resistance = 3.32 K\u03a9\nMaximum bandwidth = 4.0 MHz\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.6, page 518"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nB=50*10**6 #post detection bandwidth\nCd=5*10**-12 #capacitance in farad\ne=1.602*10**-19 #1 electron volt\nK=1.38*10**-23 #boltzman constant\nT=291 #tempreture in kelvin\nib=10**-7 #photocurrent before gain\nx=0.3\n\n#Calculation\nRl=1/(2*math.pi*Cd*B) #maximum value of the load resistor\na=2*e*B*ib #shot noise\nb=4*K*T*B/Rl #thermal noise\nsn=ib**2/(a+b) #SNR, when M = 1,\nsnd=10*math.log10(sn) #SNR in dB\nMop=((4*K*T)/(x*e*Rl*ib))**0.435\nsn1=(Mop**2*ib**2)/((2*e*B*ib*Mop**2.3)+b) #SNR, when M = Mop,\nsdb=10*math.log10(sn1) #SNR in dB\n\n#Result\nprint'SNR (M=1) = %.2f dB'%(snd)\nprint'SNR (M=Mop) = %.1f dB'%(sdb)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "SNR (M=1) = 8.99 dB\nSNR (M=Mop) = 32.5 dB\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.7, page 520"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\ne=1.602*10**-19 #1 electron volt\nK=1.38*10**-23 #boltzman constant\nT=120 #tempreture in kelvin\nB=10**7 #post detection bandwidth\nsn=3.5 #SNR/10\nfn=0.1 #noise figure/10\nRl=10**4 #load resistance\n\n#Calculation\nsn1=10**(sn)\nfn1=10**(fn)\na=12*K*T*B*fn1/Rl\nb=((4*K*T*fn1)/(1.1*e*Rl))**0.667\nIp=(sn1*a/b)**0.75 #minimum photocurrent\nMop=((4*K*T*fn1)/(e*Ip*1.1*10**3))**0.334 #optimum avalanche multiplication factor\n\n#Result\nprint'Optimum avalanche multiplication factor = %.1f '%(Mop)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Optimum avalanche multiplication factor = 8.9 \n"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 9.8, page 528"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "import math\n\n#Variable declaration\nr1=4*10**6 #effective input resistance in ohm\nr2=8*10**6 #resistance in ohm\nct=6*10**-12 #total capacitance in farad\nK=1.38*10**-23 #boltzman constant\nT=300 #tempreture in kelvin\nRf=10**5 #feedback resitor\nG=400 #open loop gain\n\n#Calculation\nRt=(r1**2)/r2 #total effective load resistance\nB=1/(2*math.pi*Rt*ct) #maximum bandwidth\ni2=4*K*T/Rt #for highimpedance config\nB1=G/(2*math.pi*Rf*ct) #maximum bandwidth for transimpedance config\nit=4*K*T/(Rf) #for transimpedance\n\n#transimpedance configuration factor of 20 greater than that obtained high-input-impedance configuration.\nn=it/i2\nndb=10*math.log10(n)\n\n#Result\nprint'(a) Maximum bandwidth = %.2f x10^4 Hz'%(B*10**-4)\nprint'(b) Mean square thermal noise current (high impedance config)= %.2f x10^-27 A^2 Hz^-1'%(i2*10**27)\nprint'\\n(c) Maximum bandwidth for transimpedance = %.2f X 10^6 Hz'%(B1*10**-8)\nprint' Mean square thermal noise current (transimpedance config) = %.2f x10^-25 A^2 Hz^-1'%(it*10**25)\nprint' Ratio of these noise power = %d dB'%ndb",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "(a) Maximum bandwidth = 1.33 x10^4 Hz\n(b) Mean square thermal noise current (high impedance config)= 8.28 x10^-27 A^2 Hz^-1\n\n(c) Maximum bandwidth for transimpedance = 1.06 X 10^6 Hz\n Mean square thermal noise current (transimpedance config) = 1.66 x10^-25 A^2 Hz^-1\n Ratio of these noise power = 13 dB\n"
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_001.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_001.png
new file mode 100755
index 00000000..effd888e
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_001.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_002.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_002.png
new file mode 100755
index 00000000..394be49f
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Selection_002.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes.png
new file mode 100755
index 00000000..e92adc62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_1.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_1.png
new file mode 100755
index 00000000..e92adc62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_1.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_2.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_2.png
new file mode 100755
index 00000000..e92adc62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_2.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_3.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_3.png
new file mode 100755
index 00000000..e92adc62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_3.png
Binary files differ
diff --git a/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_4.png b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_4.png
new file mode 100755
index 00000000..e92adc62
--- /dev/null
+++ b/Optical_Fiber_Communication_Principles_and_Practice/screenshots/Total_channel_loss_against_number_of_nodes_4.png
Binary files differ
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/README.txt b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/README.txt
index e9dea4fd..e9dea4fd 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/README.txt
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/README.txt
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch1.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch1.ipynb
index 23e275b1..23e275b1 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch1.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch1.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch10.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch10.ipynb
index c6aa5bdf..c6aa5bdf 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch10.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch10.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch11.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch11.ipynb
index f7d878eb..f7d878eb 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch11.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch11.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch12.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch12.ipynb
index 210f4e9f..210f4e9f 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch12.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch12.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch13.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch13.ipynb
index b398bb05..b398bb05 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch13.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch13.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch14.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch14.ipynb
index 335565d5..335565d5 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch14.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch14.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch15.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch15.ipynb
index a8bdca38..a8bdca38 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch15.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch15.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
index aa52001e..aa52001e 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch3.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch3.ipynb
index c6d63f53..c6d63f53 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch3.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch3.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb
index 9278e05d..9278e05d 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch5.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch5.ipynb
index df919019..df919019 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch5.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch5.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb
index ce95f234..ce95f234 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch7.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch7.ipynb
index 7020eec3..7020eec3 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch7.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch7.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch8.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch8.ipynb
index 494454b7..494454b7 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch8.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch8.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch9.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch9.ipynb
index cdb65f60..cdb65f60 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch9.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch9.ipynb
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic111.png b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic111.png
index f6781e82..f6781e82 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic111.png
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic111.png
Binary files differ
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic222.png b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic222.png
index b13b4e55..b13b4e55 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic222.png
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic222.png
Binary files differ
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic333.png b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic333.png
index 46a7d555..46a7d555 100644..100755
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic333.png
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/screenshots/pic333.png
Binary files differ
diff --git a/Practical_C_Programming/Chapter_10_1.ipynb b/Practical_C_Programming/Chapter_10_1.ipynb
index 616dbfad..616dbfad 100644..100755
--- a/Practical_C_Programming/Chapter_10_1.ipynb
+++ b/Practical_C_Programming/Chapter_10_1.ipynb
diff --git a/Practical_C_Programming/Chapter_11_1.ipynb b/Practical_C_Programming/Chapter_11_1.ipynb
index 348ea0f2..348ea0f2 100644..100755
--- a/Practical_C_Programming/Chapter_11_1.ipynb
+++ b/Practical_C_Programming/Chapter_11_1.ipynb
diff --git a/Practical_C_Programming/Chapter_12_1.ipynb b/Practical_C_Programming/Chapter_12_1.ipynb
index 090a4ee1..090a4ee1 100644..100755
--- a/Practical_C_Programming/Chapter_12_1.ipynb
+++ b/Practical_C_Programming/Chapter_12_1.ipynb
diff --git a/Practical_C_Programming/Chapter_13_1.ipynb b/Practical_C_Programming/Chapter_13_1.ipynb
index e3f18fc3..e3f18fc3 100644..100755
--- a/Practical_C_Programming/Chapter_13_1.ipynb
+++ b/Practical_C_Programming/Chapter_13_1.ipynb
diff --git a/Practical_C_Programming/Chapter_14_1.ipynb b/Practical_C_Programming/Chapter_14_1.ipynb
index 6d3c736e..6d3c736e 100644..100755
--- a/Practical_C_Programming/Chapter_14_1.ipynb
+++ b/Practical_C_Programming/Chapter_14_1.ipynb
diff --git a/Practical_C_Programming/Chapter_15_1.ipynb b/Practical_C_Programming/Chapter_15_1.ipynb
index 34a86a67..34a86a67 100644..100755
--- a/Practical_C_Programming/Chapter_15_1.ipynb
+++ b/Practical_C_Programming/Chapter_15_1.ipynb
diff --git a/Practical_C_Programming/Chapter_16_1.ipynb b/Practical_C_Programming/Chapter_16_1.ipynb
index 505718fd..505718fd 100644..100755
--- a/Practical_C_Programming/Chapter_16_1.ipynb
+++ b/Practical_C_Programming/Chapter_16_1.ipynb
diff --git a/Practical_C_Programming/Chapter_17_1.ipynb b/Practical_C_Programming/Chapter_17_1.ipynb
index 3d179b54..3d179b54 100644..100755
--- a/Practical_C_Programming/Chapter_17_1.ipynb
+++ b/Practical_C_Programming/Chapter_17_1.ipynb
diff --git a/Practical_C_Programming/Chapter_18_1.ipynb b/Practical_C_Programming/Chapter_18_1.ipynb
index 0369d712..0369d712 100644..100755
--- a/Practical_C_Programming/Chapter_18_1.ipynb
+++ b/Practical_C_Programming/Chapter_18_1.ipynb
diff --git a/Practical_C_Programming/Chapter_19_1.ipynb b/Practical_C_Programming/Chapter_19_1.ipynb
index 00ddd7e8..00ddd7e8 100644..100755
--- a/Practical_C_Programming/Chapter_19_1.ipynb
+++ b/Practical_C_Programming/Chapter_19_1.ipynb
diff --git a/Practical_C_Programming/Chapter_21_1.ipynb b/Practical_C_Programming/Chapter_21_1.ipynb
index 144ac453..144ac453 100644..100755
--- a/Practical_C_Programming/Chapter_21_1.ipynb
+++ b/Practical_C_Programming/Chapter_21_1.ipynb
diff --git a/Practical_C_Programming/Chapter_23_1.ipynb b/Practical_C_Programming/Chapter_23_1.ipynb
index bde77ef6..bde77ef6 100644..100755
--- a/Practical_C_Programming/Chapter_23_1.ipynb
+++ b/Practical_C_Programming/Chapter_23_1.ipynb
diff --git a/Practical_C_Programming/Chapter_2_3.ipynb b/Practical_C_Programming/Chapter_2_3.ipynb
index d166fe06..d166fe06 100644..100755
--- a/Practical_C_Programming/Chapter_2_3.ipynb
+++ b/Practical_C_Programming/Chapter_2_3.ipynb
diff --git a/Practical_C_Programming/Chapter_3_4.ipynb b/Practical_C_Programming/Chapter_3_4.ipynb
index a8e0779c..a8e0779c 100644..100755
--- a/Practical_C_Programming/Chapter_3_4.ipynb
+++ b/Practical_C_Programming/Chapter_3_4.ipynb
diff --git a/Practical_C_Programming/Chapter_4_4.ipynb b/Practical_C_Programming/Chapter_4_4.ipynb
index 8602f989..8602f989 100644..100755
--- a/Practical_C_Programming/Chapter_4_4.ipynb
+++ b/Practical_C_Programming/Chapter_4_4.ipynb
diff --git a/Practical_C_Programming/Chapter_5_4.ipynb b/Practical_C_Programming/Chapter_5_4.ipynb
index 2d2abf16..2d2abf16 100644..100755
--- a/Practical_C_Programming/Chapter_5_4.ipynb
+++ b/Practical_C_Programming/Chapter_5_4.ipynb
diff --git a/Practical_C_Programming/Chapter_6_4.ipynb b/Practical_C_Programming/Chapter_6_4.ipynb
index 2769b901..2769b901 100644..100755
--- a/Practical_C_Programming/Chapter_6_4.ipynb
+++ b/Practical_C_Programming/Chapter_6_4.ipynb
diff --git a/Practical_C_Programming/Chapter_7_4.ipynb b/Practical_C_Programming/Chapter_7_4.ipynb
index 620d440f..620d440f 100644..100755
--- a/Practical_C_Programming/Chapter_7_4.ipynb
+++ b/Practical_C_Programming/Chapter_7_4.ipynb
diff --git a/Practical_C_Programming/Chapter_8_4.ipynb b/Practical_C_Programming/Chapter_8_4.ipynb
index 24580c55..24580c55 100644..100755
--- a/Practical_C_Programming/Chapter_8_4.ipynb
+++ b/Practical_C_Programming/Chapter_8_4.ipynb
diff --git a/Practical_C_Programming/Chapter_9_4.ipynb b/Practical_C_Programming/Chapter_9_4.ipynb
index 39cb7cdd..39cb7cdd 100644..100755
--- a/Practical_C_Programming/Chapter_9_4.ipynb
+++ b/Practical_C_Programming/Chapter_9_4.ipynb
diff --git a/Practical_C_Programming/README.txt b/Practical_C_Programming/README.txt
index 82e51f0a..82e51f0a 100644..100755
--- a/Practical_C_Programming/README.txt
+++ b/Practical_C_Programming/README.txt
diff --git a/Practical_C_Programming/screenshots/ancientcompilers.png b/Practical_C_Programming/screenshots/ancientcompilers.png
index 46fba46d..46fba46d 100644..100755
--- a/Practical_C_Programming/screenshots/ancientcompilers.png
+++ b/Practical_C_Programming/screenshots/ancientcompilers.png
Binary files differ
diff --git a/Practical_C_Programming/screenshots/bitoperations.png b/Practical_C_Programming/screenshots/bitoperations.png
index 48925b6a..48925b6a 100644..100755
--- a/Practical_C_Programming/screenshots/bitoperations.png
+++ b/Practical_C_Programming/screenshots/bitoperations.png
Binary files differ
diff --git a/Practical_C_Programming/screenshots/mahesh-1.png b/Practical_C_Programming/screenshots/mahesh-1.png
index bfa1980b..bfa1980b 100644..100755
--- a/Practical_C_Programming/screenshots/mahesh-1.png
+++ b/Practical_C_Programming/screenshots/mahesh-1.png
Binary files differ
diff --git a/Practical_C_Programming/screenshots/mahesh-2.png b/Practical_C_Programming/screenshots/mahesh-2.png
index ddc5be59..ddc5be59 100644..100755
--- a/Practical_C_Programming/screenshots/mahesh-2.png
+++ b/Practical_C_Programming/screenshots/mahesh-2.png
Binary files differ
diff --git a/Practical_C_Programming/screenshots/mahesh-3.png b/Practical_C_Programming/screenshots/mahesh-3.png
index 7f65aa5c..7f65aa5c 100644..100755
--- a/Practical_C_Programming/screenshots/mahesh-3.png
+++ b/Practical_C_Programming/screenshots/mahesh-3.png
Binary files differ
diff --git a/Practical_C_Programming/screenshots/programmingprocess.png b/Practical_C_Programming/screenshots/programmingprocess.png
index c2f21380..c2f21380 100644..100755
--- a/Practical_C_Programming/screenshots/programmingprocess.png
+++ b/Practical_C_Programming/screenshots/programmingprocess.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter1.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter1.ipynb
index ed34729f..ed34729f 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter1.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter1.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter2.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter2.ipynb
index 29386b12..29386b12 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter2.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter2.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter3.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter3.ipynb
index c21cf09b..c21cf09b 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter3.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter3.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter4.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter4.ipynb
index 7f91e8cf..7f91e8cf 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter4.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter4.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter5.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter5.ipynb
index a8015b6a..a8015b6a 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter5.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter5.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter6.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter6.ipynb
index ff850644..ff850644 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter6.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter6.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter7.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter7.ipynb
index f0b687da..f0b687da 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter7.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter7.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter8.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter8.ipynb
index 3323ea05..3323ea05 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter8.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter8.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter9.ipynb b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter9.ipynb
index b8f59cd9..b8f59cd9 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter9.ipynb
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/Chapter9.ipynb
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/README.txt b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/README.txt
index daab5f7f..daab5f7f 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/README.txt
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/README.txt
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1.png
index 8555a45e..8555a45e 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_1.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_1.png
index 8555a45e..8555a45e 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_1.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_1.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_2.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_2.png
index 8555a45e..8555a45e 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_2.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak1_2.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2.png
index e83209e0..e83209e0 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_1.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_1.png
index e83209e0..e83209e0 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_1.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_1.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_2.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_2.png
index e83209e0..e83209e0 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_2.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak2_2.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3.png
index 579c4a57..579c4a57 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_1.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_1.png
index 579c4a57..579c4a57 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_1.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_1.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_2.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_2.png
index 579c4a57..579c4a57 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_2.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/deepak3_2.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/programmingprocess.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/programmingprocess.png
index c2f21380..c2f21380 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/programmingprocess.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/programmingprocess.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter.png
index 96f57d0c..96f57d0c 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter.png
Binary files differ
diff --git a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter_1.png b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter_1.png
index 96f57d0c..96f57d0c 100644..100755
--- a/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter_1.png
+++ b/Principles_And_Modern_Applications_Of_Mass_Transfer_Operations/screenshots/transfercharecter_1.png
Binary files differ
diff --git a/Problems_In_Fluid_Flow/README.txt b/Problems_In_Fluid_Flow/README.txt
index d0180dc8..d0180dc8 100644..100755
--- a/Problems_In_Fluid_Flow/README.txt
+++ b/Problems_In_Fluid_Flow/README.txt
diff --git a/Problems_In_Fluid_Flow/ch1.ipynb b/Problems_In_Fluid_Flow/ch1.ipynb
index 468c5738..468c5738 100644..100755
--- a/Problems_In_Fluid_Flow/ch1.ipynb
+++ b/Problems_In_Fluid_Flow/ch1.ipynb
diff --git a/Problems_In_Fluid_Flow/ch10.ipynb b/Problems_In_Fluid_Flow/ch10.ipynb
index b9f62b91..b9f62b91 100644..100755
--- a/Problems_In_Fluid_Flow/ch10.ipynb
+++ b/Problems_In_Fluid_Flow/ch10.ipynb
diff --git a/Problems_In_Fluid_Flow/ch11.ipynb b/Problems_In_Fluid_Flow/ch11.ipynb
index a2484ed7..a2484ed7 100644..100755
--- a/Problems_In_Fluid_Flow/ch11.ipynb
+++ b/Problems_In_Fluid_Flow/ch11.ipynb
diff --git a/Problems_In_Fluid_Flow/ch12.ipynb b/Problems_In_Fluid_Flow/ch12.ipynb
index 7b9dbb44..7b9dbb44 100644..100755
--- a/Problems_In_Fluid_Flow/ch12.ipynb
+++ b/Problems_In_Fluid_Flow/ch12.ipynb
diff --git a/Problems_In_Fluid_Flow/ch13.ipynb b/Problems_In_Fluid_Flow/ch13.ipynb
index 3eb84b32..3eb84b32 100644..100755
--- a/Problems_In_Fluid_Flow/ch13.ipynb
+++ b/Problems_In_Fluid_Flow/ch13.ipynb
diff --git a/Problems_In_Fluid_Flow/ch2.ipynb b/Problems_In_Fluid_Flow/ch2.ipynb
index 3ed00d28..3ed00d28 100644..100755
--- a/Problems_In_Fluid_Flow/ch2.ipynb
+++ b/Problems_In_Fluid_Flow/ch2.ipynb
diff --git a/Problems_In_Fluid_Flow/ch3.ipynb b/Problems_In_Fluid_Flow/ch3.ipynb
index aae6f3e2..aae6f3e2 100644..100755
--- a/Problems_In_Fluid_Flow/ch3.ipynb
+++ b/Problems_In_Fluid_Flow/ch3.ipynb
diff --git a/Problems_In_Fluid_Flow/ch4.ipynb b/Problems_In_Fluid_Flow/ch4.ipynb
index 5938d17b..5938d17b 100644..100755
--- a/Problems_In_Fluid_Flow/ch4.ipynb
+++ b/Problems_In_Fluid_Flow/ch4.ipynb
diff --git a/Problems_In_Fluid_Flow/ch5.ipynb b/Problems_In_Fluid_Flow/ch5.ipynb
index 9a1752c6..9a1752c6 100644..100755
--- a/Problems_In_Fluid_Flow/ch5.ipynb
+++ b/Problems_In_Fluid_Flow/ch5.ipynb
diff --git a/Problems_In_Fluid_Flow/ch6.ipynb b/Problems_In_Fluid_Flow/ch6.ipynb
index 3eb6270f..3eb6270f 100644..100755
--- a/Problems_In_Fluid_Flow/ch6.ipynb
+++ b/Problems_In_Fluid_Flow/ch6.ipynb
diff --git a/Problems_In_Fluid_Flow/ch7.ipynb b/Problems_In_Fluid_Flow/ch7.ipynb
index 1cf884f4..1cf884f4 100644..100755
--- a/Problems_In_Fluid_Flow/ch7.ipynb
+++ b/Problems_In_Fluid_Flow/ch7.ipynb
diff --git a/Problems_In_Fluid_Flow/ch8.ipynb b/Problems_In_Fluid_Flow/ch8.ipynb
index 09ab4234..09ab4234 100644..100755
--- a/Problems_In_Fluid_Flow/ch8.ipynb
+++ b/Problems_In_Fluid_Flow/ch8.ipynb
diff --git a/Problems_In_Fluid_Flow/ch9.ipynb b/Problems_In_Fluid_Flow/ch9.ipynb
index 8a82285f..8a82285f 100644..100755
--- a/Problems_In_Fluid_Flow/ch9.ipynb
+++ b/Problems_In_Fluid_Flow/ch9.ipynb
diff --git a/Problems_In_Fluid_Flow/screenshots/pic1.png b/Problems_In_Fluid_Flow/screenshots/pic1.png
index ad04e9de..ad04e9de 100644..100755
--- a/Problems_In_Fluid_Flow/screenshots/pic1.png
+++ b/Problems_In_Fluid_Flow/screenshots/pic1.png
Binary files differ
diff --git a/Problems_In_Fluid_Flow/screenshots/pic2.png b/Problems_In_Fluid_Flow/screenshots/pic2.png
index 1bb10249..1bb10249 100644..100755
--- a/Problems_In_Fluid_Flow/screenshots/pic2.png
+++ b/Problems_In_Fluid_Flow/screenshots/pic2.png
Binary files differ
diff --git a/Problems_In_Fluid_Flow/screenshots/pic3.png b/Problems_In_Fluid_Flow/screenshots/pic3.png
index 06f61a6f..06f61a6f 100644..100755
--- a/Problems_In_Fluid_Flow/screenshots/pic3.png
+++ b/Problems_In_Fluid_Flow/screenshots/pic3.png
Binary files differ
diff --git a/Programming_With_C/README.txt b/Programming_With_C/README.txt
new file mode 100755
index 00000000..87b1d603
--- /dev/null
+++ b/Programming_With_C/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Adnaan Ahmed
+Course: btech
+College/Institute/Organization: Heritage Institute of Technology
+Department/Designation: Computer Science and Engineering
+Book Title: Programming With C
+Author: Byron S. Gottfried
+Publisher: McGraw Hill Education (India) Private Limited, New Delhi
+Year of publication: 2013
+Isbn: 978-0-07-014590-0
+Edition: 3rd Edition \ No newline at end of file
diff --git a/Programming_With_C/chapter1.ipynb b/Programming_With_C/chapter1.ipynb
new file mode 100755
index 00000000..c1eb1997
--- /dev/null
+++ b/Programming_With_C/chapter1.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:be853ba23904264307d7e754c6f226daff90dc0e3bd2eca38f5b65419e2b80bc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 1: Introductory Concepts <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.6, Page number: 1.19<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "radius=5\n",
+ "area=math.pi*radius*radius\n",
+ "print \"Area = \",area\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area = 78.5398163397\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter10.ipynb b/Programming_With_C/chapter10.ipynb
new file mode 100755
index 00000000..ea2e1985
--- /dev/null
+++ b/Programming_With_C/chapter10.ipynb
@@ -0,0 +1,556 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3323f7a9a077b84fffdd30478d4b0d0b7f4032b86670a58b5b333d42bee04f15"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 10: Strings<h1> "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.3, Page Number: 10.3<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "st='Programming'\n",
+ "print 'The string is %s' %st"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The string is Programming\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.4, Page Number: 10.4<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "st='Hello World'\n",
+ "print 'The line is :'\n",
+ "print st"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line is :\n",
+ "Hello World\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.6, Page Number: 10.5<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "strin='Welcome to python'\n",
+ "for i in strin:\n",
+ " print i,"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W e l c o m e t o p y t h o n\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.7, Page Number: 10.6<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "str1='Programming'\n",
+ "len1=len(str1)\n",
+ "print 'The length of the string is ',len1\n",
+ "\n",
+ "str2=str1\n",
+ "print 'First string is %s and copied string is %s' %(str1,str2)\n",
+ "\n",
+ "str3='Computer'\n",
+ "\n",
+ "if str1==str3:\n",
+ " print 'Both strings are equal'\n",
+ "elif str1<str2:\n",
+ " print 'First string is lesser than second string'\n",
+ "else:\n",
+ " print 'First string is greater than second string'\n",
+ " \n",
+ "tempstr=' with C'\n",
+ "str1=str1+tempstr\n",
+ "print 'The concated string is ',str1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the string is 11\n",
+ "First string is Programming and copied string is Programming\n",
+ "First string is greater than second string\n",
+ "The concated string is Programming with C\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.8,Page Number: 10.7<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def strlength(str1):\n",
+ " count=0\n",
+ " for i in str1:\n",
+ " count+=1\n",
+ " \n",
+ " return count\n",
+ "def strcopy(src):\n",
+ " dst=[]\n",
+ " for i in src:\n",
+ " dst.append(i)\n",
+ " \n",
+ " dst=''.join(dst)\n",
+ " \n",
+ " return dst\n",
+ "\n",
+ "\n",
+ "str1='New Delhi'\n",
+ "len1=strlength(str1)\n",
+ "print 'The length of the string is ',len1\n",
+ "\n",
+ "str2=strcopy(str1)\n",
+ "print 'First string is %s and copied string is %s' %(str1,str2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the string is 9\n",
+ "First string is New Delhi and copied string is New Delhi\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.9,Page Number: 10.9<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def strcompare(str1,str2):\n",
+ " \n",
+ " len1=len(str1)\n",
+ " len2=len(str2)\n",
+ " \n",
+ " if len1<len2:\n",
+ " length=len1\n",
+ " else:\n",
+ " length=len2\n",
+ " \n",
+ " for i in xrange(0,length):\n",
+ " if str1[i]<str2[i]:\n",
+ " return -1\n",
+ " elif str1[i]>str2[i]:\n",
+ " return 1\n",
+ " \n",
+ " return 0\n",
+ "\n",
+ "str1='Programming'\n",
+ "str2='Computer'\n",
+ "status=strcompare(str1,str2)\n",
+ "if status==-1:\n",
+ " print 'First string is lesser than second string'\n",
+ "elif status==1:\n",
+ " print 'First string is greater than second string'\n",
+ "else:\n",
+ " print 'Both strings ae equal'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "First string is greater than second string\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.10, Page Number: 10.10<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def leftconcat(dst,src):\n",
+ " dst=src+dst\n",
+ " return dst\n",
+ "\n",
+ "def rightconcat(dst,src):\n",
+ " dst=dst+src\n",
+ " return dst\n",
+ "\n",
+ "str1='Hello'\n",
+ "str2='Friends'\n",
+ "\n",
+ "tempstr=leftconcat(str2,str1)\n",
+ "print 'The first string after left concatenation becomes ', tempstr\n",
+ "\n",
+ "tempstr=rightconcat(str2,str1)\n",
+ "print 'The first string after right concatenation becomes', tempstr\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The first string after left concatenation becomes HelloFriends\n",
+ "The first string after right concatenation becomes FriendsHello\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.11,Page Numbr: 10.12<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "str1='All good boys have bread'\n",
+ "count=0\n",
+ "\n",
+ "for i in str1:\n",
+ " if i=='a' or i=='e'or i=='i' or i=='o' or i=='u' or i=='A' or i=='E' or i=='I' or i=='O' or i=='U' :\n",
+ " count+=1\n",
+ " \n",
+ "print 'Total number of vowels in a given text are ',count"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total number of vowels in a given text are 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.12, Page Number: 10.13<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "ch1='A'\n",
+ "ch2=ord(ch1)+3\n",
+ "print chr(ch2)\n",
+ "\n",
+ "ch1=chr(ord(ch1)+1)\n",
+ "print ch1\n",
+ "\n",
+ "print ord('a')\n",
+ "print ord('l')\n",
+ "\n",
+ "val=ord(ch1)*ch2\n",
+ "print val\n",
+ "\n",
+ "print chr(100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "D\n",
+ "B\n",
+ "97\n",
+ "108\n",
+ "4488\n",
+ "d\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.13, Page Number: 10.13<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "text='I am studying 6 Theory Papers & 4 practicals'\n",
+ "\n",
+ "len1=len(text)\n",
+ "text=list(text)\n",
+ "for i in xrange(0,len1):\n",
+ " if text[i]>='a' and text[i]<='z':\n",
+ " text[i]=chr(ord(text[i])+ord('A')-ord('a'))\n",
+ " \n",
+ " \n",
+ "text=''.join(text)\n",
+ "\n",
+ "print 'The text after converting lowercase alphabets to uppercase is '\n",
+ "print text"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The text after converting lowercase alphabets to uppercase is \n",
+ "I AM STUDYING 6 THEORY PAPERS & 4 PRACTICALS\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.14, Page Number: 10.14<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "text='The programming is a systematic process'\n",
+ "substr='pro'\n",
+ "text_len=len(text)\n",
+ "sub_len=len(substr)\n",
+ "text=list(text)\n",
+ "substr=list(substr)\n",
+ "\n",
+ "for i in xrange(0,text_len-sub_len+1):\n",
+ " \n",
+ " for j in xrange(0,sub_len):\n",
+ " \n",
+ " if text[i+j]==substr[j]:\n",
+ " continue\n",
+ " else:\n",
+ " break\n",
+ " \n",
+ " if j==sub_len-1:\n",
+ " print 'The substring is present from subscript %d onwards' %i\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The substring is present from subscript 4 onwards\n",
+ "The substring is present from subscript 32 onwards\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.15,Page number: 10.15<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def reorder(x):\n",
+ "\n",
+ " n=len(x)\n",
+ " for item in range(0,n-1):\n",
+ " for i in range(item+1,n):\n",
+ " if x[item]>x[i]:\n",
+ " temp=x[item]\n",
+ " x[item]=x[i]\n",
+ " x[i]=temp\n",
+ "\n",
+ "\n",
+ " return\n",
+ "\n",
+ "x=['PACIFIC','ATLANTIC','INDIAN','CARIBBEAN','BERING','BLACK','RED','NORTH','BALTIC','CASPIAN']\n",
+ "print 'Original list of strings :\\n\\n'\n",
+ "\n",
+ "for i in x:\n",
+ " print \"String : \",i\n",
+ "\n",
+ "reorder(x)\n",
+ "\n",
+ "print \"\\nReodered list of strings : \\n\\n\"\n",
+ "\n",
+ "for i in x:\n",
+ " print \"String : \",i\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original list of strings :\n",
+ "\n",
+ "\n",
+ "String : PACIFIC\n",
+ "String : ATLANTIC\n",
+ "String : INDIAN\n",
+ "String : CARIBBEAN\n",
+ "String : BERING\n",
+ "String : BLACK\n",
+ "String : RED\n",
+ "String : NORTH\n",
+ "String : BALTIC\n",
+ "String : CASPIAN\n",
+ "\n",
+ "Reodered list of strings : \n",
+ "\n",
+ "\n",
+ "String : ATLANTIC\n",
+ "String : BALTIC\n",
+ "String : BERING\n",
+ "String : BLACK\n",
+ "String : CARIBBEAN\n",
+ "String : CASPIAN\n",
+ "String : INDIAN\n",
+ "String : NORTH\n",
+ "String : PACIFIC\n",
+ "String : RED\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter11.ipynb b/Programming_With_C/chapter11.ipynb
new file mode 100755
index 00000000..d858cd07
--- /dev/null
+++ b/Programming_With_C/chapter11.ipynb
@@ -0,0 +1,977 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:81f953770b0acac35782d6d61b5968cf0c7681b2e047ca75cfe8abd7244d5bab"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 11: Pointers<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.1, Page 11.2<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "u,v=[3],[]\n",
+ "pu=u\n",
+ "v=pu\n",
+ "pv=v\n",
+ "\n",
+ "print \"u=\",u[0],\n",
+ "print \"&u=\",id(u),\n",
+ "print \"pu=\",id(u),\n",
+ "print \"*pu\",pu[0]\n",
+ "\n",
+ "print \"v=\",v[0],\n",
+ "print \"&v=\",id(v),\n",
+ "print \"pv=\",id(v),\n",
+ "print \"*pv\",pv[0]\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u= 3 &u= 56575840 pu= 56575840 *pu 3\n",
+ "v= 3 &v= 56575840 pv= 56575840 *pv 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.2, Page number: 11.3<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "v=[3]\n",
+ "u1=2*(v[0]+5)\n",
+ "pv=v\n",
+ "u2=2*(pv[0]+5)\n",
+ "\n",
+ "print \"u1=%d u2=%d\" %(u1,u2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u1=16 u2=16\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.3, Page munber: 11.4<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "v=[3]\n",
+ "pv=v\n",
+ "print \"*pv=%d v=%d\" %(pv[0],v[0])\n",
+ "\n",
+ "pv[0]=0\n",
+ "print \"*pv=%d v=%d\" %(pv[0],v[0])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "*pv=3 v=3\n",
+ "*pv=0 v=0\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.7, Page number: 11.6<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def funct1(u,v):\n",
+ " u=0\n",
+ " v=0\n",
+ " print \"Within funct1 : u=%d v=%d\" %(u,v)\n",
+ " return\n",
+ "\n",
+ "def funct2(u,v):\n",
+ " u[0]=0\n",
+ " v[0]=0\n",
+ " print \"Within funct2 : *pu=%d *pv=%d\" %(u[0],v[0])\n",
+ " return\n",
+ "\n",
+ "u=[1]\n",
+ "v=[3]\n",
+ "\n",
+ "print \"Before calling funct1: u=%d v=%d\" %(u[0],v[0])\n",
+ "funct1(u[0],v[0])\n",
+ "print \"After calling funct1 : u=%d v=%d\" %(u[0],v[0])\n",
+ "\n",
+ "print \"Before calling funct2: u=%d v=%d\" %(u[0],v[0])\n",
+ "funct2(u,v)\n",
+ "print \"After calling funct2 : u=%d v=%d\" %(u[0],v[0])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Before calling funct1: u=1 v=3\n",
+ "Within funct1 : u=0 v=0\n",
+ "After calling funct1 : u=1 v=3\n",
+ "Before calling funct2: u=1 v=3\n",
+ "Within funct2 : *pu=0 *pv=0\n",
+ "After calling funct2 : u=0 v=0\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.8, Page number: 11.8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "def scan_line(line,pv,pc,pd,pw,po):\n",
+ "\n",
+ " for c in line:\n",
+ "\n",
+ " if c=='A' or c=='E' or c=='I' or c=='O' or c=='U':\n",
+ " pv[0]+=1\n",
+ " elif c>='A' and c<='Z':\n",
+ " pc[0]+=1\n",
+ " elif c>='0' and c<='9':\n",
+ " pd[0]+=1\n",
+ " elif c==' ' or c=='\\t':\n",
+ " pw[0]+=1\n",
+ " else:\n",
+ " po[0]+=1\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "vowel,consonants,digits,whitespc,other=[0],[0],[0],[0],[0]\n",
+ "line=\"Personal computers with memories in excess of 4096 KB are now quite common.\"\n",
+ "line=line.upper()\n",
+ "scan_line(line,vowel,consonants,digits,whitespc,other)\n",
+ "print \"\\n\\n\"\n",
+ "print \"No. of vowels : \",vowel[0]\n",
+ "print \"No. of consonants : \",consonants[0]\n",
+ "print \"No. of digits : \",digits[0]\n",
+ "print \"No. of whitespace characters : \",whitespc[0]\n",
+ "print \"No. of other characters : \",other[0]"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "\n",
+ "No. of vowels : 23\n",
+ "No. of consonants : 35\n",
+ "No. of digits : 4\n",
+ "No. of whitespace characters : 12\n",
+ "No. of other characters : 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.12, Page number: 11.15<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "x=[10,11,12,13,14,15,16,17,18,19]\n",
+ "\n",
+ "for i in range(0,10):\n",
+ " print \"i=%d x[i]=%d *(x+1)=%d\" %(i,x[i],x[i]),\n",
+ " print \" &x[i]=\",id(x[i]),\n",
+ " print \" x+i=\",id(x[i])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i=0 x[i]=10 *(x+1)=10 &x[i]= 30696620 x+i= 30696620\n",
+ "i=1 x[i]=11 *(x+1)=11 &x[i]= 30696608 x+i= 30696608\n",
+ "i=2 x[i]=12 *(x+1)=12 &x[i]= 30696596 x+i= 30696596\n",
+ "i=3 x[i]=13 *(x+1)=13 &x[i]= 30696584 x+i= 30696584\n",
+ "i=4 x[i]=14 *(x+1)=14 &x[i]= 30696572 x+i= 30696572\n",
+ "i=5 x[i]=15 *(x+1)=15 &x[i]= 30696560 x+i= 30696560\n",
+ "i=6 x[i]=16 *(x+1)=16 &x[i]= 30696548 x+i= 30696548\n",
+ "i=7 x[i]=17 *(x+1)=17 &x[i]= 30696536 x+i= 30696536\n",
+ "i=8 x[i]=18 *(x+1)=18 &x[i]= 30696524 x+i= 30696524\n",
+ "i=9 x[i]=19 *(x+1)=19 &x[i]= 30696512 x+i= 30696512\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.14, Page number: 11.17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def main():\n",
+ " global x\n",
+ " y=\"This string is declared within main\"\n",
+ " y=list(y)\n",
+ " x=list(x)\n",
+ " print x\n",
+ " print y\n",
+ "\n",
+ " return\n",
+ "\n",
+ "x=\"This string is declared externally\"\n",
+ "main()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "['T', 'h', 'i', 's', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ', 'i', 's', ' ', 'd', 'e', 'c', 'l', 'a', 'r', 'e', 'd', ' ', 'e', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'l', 'y']\n",
+ "['T', 'h', 'i', 's', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ', 'i', 's', ' ', 'd', 'e', 'c', 'l', 'a', 'r', 'e', 'd', ' ', 'w', 'i', 't', 'h', 'i', 'n', ' ', 'm', 'a', 'i', 'n']\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.16, Page number: 11.19<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def reorder(x):\n",
+ " n=len(x)\n",
+ " for item in range(0,n-1):\n",
+ " for i in range(item+1,n):\n",
+ " if x[i]<x[item]:\n",
+ " temp=x[item]\n",
+ " x[item]=x[i]\n",
+ " x[i]=temp\n",
+ "\n",
+ " return\n",
+ "\n",
+ "n=10\n",
+ "x=[]\n",
+ "\n",
+ "for i in range(0,n):\n",
+ " inp=i+1\n",
+ " print \"\\ni=%d x=%d\" %(i+1,inp),\n",
+ " x.append(inp)\n",
+ "\n",
+ "reorder(x)\n",
+ "\n",
+ "print \"\\n\"\n",
+ "for i in range(0,n):\n",
+ " print \"i=%d x=%d\" %(i+1,x[i])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "i=1 x=1 \n",
+ "i=2 x=2 \n",
+ "i=3 x=3 \n",
+ "i=4 x=4 \n",
+ "i=5 x=5 \n",
+ "i=6 x=6 \n",
+ "i=7 x=7 \n",
+ "i=8 x=8 \n",
+ "i=9 x=9 \n",
+ "i=10 x=10 \n",
+ "\n",
+ "i=1 x=1\n",
+ "i=2 x=2\n",
+ "i=3 x=3\n",
+ "i=4 x=4\n",
+ "i=5 x=5\n",
+ "i=6 x=6\n",
+ "i=7 x=7\n",
+ "i=8 x=8\n",
+ "i=9 x=9\n",
+ "i=10 x=10\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.17, Page number: 11.21<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "i=[4]\n",
+ "i[0]=1\n",
+ "f=0.3\n",
+ "d=0.005\n",
+ "c='*'\n",
+ "\n",
+ "px=i\n",
+ "print 'Values: i=%d f=%f d=%f c=%c \\n' %(i[0],f,d,c)\n",
+ "print 'Addresses: &i=%X &f=%X &d=%X &c=%X \\n' %(id(i[0]),id(f),id(d),id(c))\n",
+ "print 'Pointer Values: px=%X px+1=%X px+2=%X px+3=%X' %(id(px[0]),id(px[0]+1),id(px[0]+2),id(px[0]+3))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Values: i=1 f=0.300000 d=0.005000 c=* \n",
+ "\n",
+ "Addresses: &i=1D46518 &f=32BD940 &d=32BD950 &c=1D9F158 \n",
+ "\n",
+ "Pointer Values: px=1D46518 px+1=1D4650C px+2=1D46500 px+3=1D464F4\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.18, Page number: 11.22<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "a=[1,2,3,4,5,6]\n",
+ "\n",
+ "px=a[0]\n",
+ "py=a[5]\n",
+ "\n",
+ "print 'px=%X py=%X \\n' %(id(px),id(py))\n",
+ "print 'py - px = %X' %(id(py)-id(px))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "px=1D46518 py=1D464DC \n",
+ "\n",
+ "py - px = -3C\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.22, Page number: 11.26<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def readinput(m,n,i=0):\n",
+ "\n",
+ " at=[]\n",
+ " for row in range(0,m):\n",
+ " temp=[]\n",
+ " for col in range(0,n):\n",
+ " t=i\n",
+ " i+=2\n",
+ " temp.append(t)\n",
+ " at.append(temp)\n",
+ "\n",
+ "\n",
+ " return at\n",
+ " \n",
+ "def computesum(a,b,m,n):\n",
+ "\n",
+ " c=[]\n",
+ "\n",
+ " for row in range(0,m):\n",
+ " temp=[]\n",
+ " for col in range(0,n):\n",
+ " t=a[row][col]+b[row][col]\n",
+ " temp.append(t)\n",
+ " c.append(temp)\n",
+ "\n",
+ " return c\n",
+ "\n",
+ "def writeoutput(c,m,n):\n",
+ "\n",
+ " for row in range(0,m):\n",
+ " for col in range(0,n):\n",
+ " print \"%4d\" %(c[row][col]),\n",
+ " print\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n FIRST TABLE : \\n\"\n",
+ "a=readinput(5,5,1)\n",
+ "writeoutput(a,5,5)\n",
+ "\n",
+ "print \"\\n SECOND TABLE : \\n\"\n",
+ "b=readinput(5,5,50)\n",
+ "writeoutput(b,5,5)\n",
+ "\n",
+ "c=computesum(a,b,5,5)\n",
+ "print \"Sums of the elements : \\n\"\n",
+ "writeoutput(c,5,5)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " FIRST TABLE : \n",
+ "\n",
+ " 1 3 5 7 9\n",
+ " 11 13 15 17 19\n",
+ " 21 23 25 27 29\n",
+ " 31 33 35 37 39\n",
+ " 41 43 45 47 49\n",
+ "\n",
+ " SECOND TABLE : \n",
+ "\n",
+ " 50 52 54 56 58\n",
+ " 60 62 64 66 68\n",
+ " 70 72 74 76 78\n",
+ " 80 82 84 86 88\n",
+ " 90 92 94 96 98\n",
+ "Sums of the elements : \n",
+ "\n",
+ " 51 55 59 63 67\n",
+ " 71 75 79 83 87\n",
+ " 91 95 99 103 107\n",
+ " 111 115 119 123 127\n",
+ " 131 135 139 143 147\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.24, Page number: 11.31<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def readinput(m,n,i=0):\n",
+ "\n",
+ " at=[]\n",
+ " for row in range(0,m):\n",
+ " temp=[]\n",
+ " for col in range(0,n):\n",
+ " t=i\n",
+ " i+=2\n",
+ " temp.append(t)\n",
+ " at.append(temp)\n",
+ "\n",
+ "\n",
+ " return at\n",
+ " \n",
+ "def computesum(a,b,m,n):\n",
+ "\n",
+ " c=[]\n",
+ "\n",
+ " for row in range(0,m):\n",
+ " temp=[]\n",
+ " for col in range(0,n):\n",
+ " t=a[row][col]+b[row][col]\n",
+ " temp.append(t)\n",
+ " c.append(temp)\n",
+ "\n",
+ " return c\n",
+ "\n",
+ "def writeoutput(c,m,n):\n",
+ "\n",
+ " for row in range(0,m):\n",
+ " for col in range(0,n):\n",
+ " print \"%4d\" %(c[row][col]),\n",
+ " print\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n FIRST TABLE : \\n\"\n",
+ "a=readinput(5,5,1)\n",
+ "writeoutput(a,5,5)\n",
+ "\n",
+ "print \"\\n SECOND TABLE : \\n\"\n",
+ "b=readinput(5,5,50)\n",
+ "writeoutput(b,5,5)\n",
+ "\n",
+ "c=computesum(a,b,5,5)\n",
+ "print \"Sums of the elements : \\n\"\n",
+ "writeoutput(c,5,5)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " FIRST TABLE : \n",
+ "\n",
+ " 1 3 5 7 9\n",
+ " 11 13 15 17 19\n",
+ " 21 23 25 27 29\n",
+ " 31 33 35 37 39\n",
+ " 41 43 45 47 49\n",
+ "\n",
+ " SECOND TABLE : \n",
+ "\n",
+ " 50 52 54 56 58\n",
+ " 60 62 64 66 68\n",
+ " 70 72 74 76 78\n",
+ " 80 82 84 86 88\n",
+ " 90 92 94 96 98\n",
+ "Sums of the elements : \n",
+ "\n",
+ " 51 55 59 63 67\n",
+ " 71 75 79 83 87\n",
+ " 91 95 99 103 107\n",
+ " 111 115 119 123 127\n",
+ " 131 135 139 143 147\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.26, Page number: 11.34<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def reorder(x):\n",
+ "\n",
+ " n=len(x)\n",
+ " for item in range(0,n-1):\n",
+ " for i in range(item+1,n):\n",
+ " if x[item]>x[i]:\n",
+ " temp=x[item]\n",
+ " x[item]=x[i]\n",
+ " x[i]=temp\n",
+ "\n",
+ "\n",
+ " return\n",
+ "\n",
+ "x=['PACIFIC','ATLANTIC','INDIAN','CARIBBEAN','BERING','BLACK','RED','NORTH','BALTIC','CASPIAN']\n",
+ "print 'Original list of strings :\\n\\n'\n",
+ "\n",
+ "for i in x:\n",
+ " print \"String : \",i\n",
+ "\n",
+ "reorder(x)\n",
+ "\n",
+ "print \"\\nReodered list of strings : \\n\\n\"\n",
+ "\n",
+ "for i in x:\n",
+ " print \"String : \",i"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original list of strings :\n",
+ "\n",
+ "\n",
+ "String : PACIFIC\n",
+ "String : ATLANTIC\n",
+ "String : INDIAN\n",
+ "String : CARIBBEAN\n",
+ "String : BERING\n",
+ "String : BLACK\n",
+ "String : RED\n",
+ "String : NORTH\n",
+ "String : BALTIC\n",
+ "String : CASPIAN\n",
+ "\n",
+ "Reodered list of strings : \n",
+ "\n",
+ "\n",
+ "String : ATLANTIC\n",
+ "String : BALTIC\n",
+ "String : BERING\n",
+ "String : BLACK\n",
+ "String : CARIBBEAN\n",
+ "String : CASPIAN\n",
+ "String : INDIAN\n",
+ "String : NORTH\n",
+ "String : PACIFIC\n",
+ "String : RED\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.28, Page number: 11.37<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def convert(mm,dd,yy):\n",
+ " yy-=1900\n",
+ " ndays=long(30.42*(mm-1)+dd)\n",
+ " if mm==2:\n",
+ " ndays+=1\n",
+ " if mm>2 and mm<8:\n",
+ " ndays-=1\n",
+ " if yy%4==0 and mm<2:\n",
+ " ndays+=1\n",
+ "\n",
+ " ncycles=yy/4\n",
+ " ndays+=ncycles*1461\n",
+ "\n",
+ " nyears=yy%4\n",
+ " if nyears>0:\n",
+ " ndays+=365*nyears+1\n",
+ " if ndays>59:\n",
+ " ndays-=1\n",
+ "\n",
+ " day=ndays%7\n",
+ "\n",
+ " return day\n",
+ "\n",
+ "def main(mm,dd,yy):\n",
+ " day_of_week=convert(mm,dd,yy)\n",
+ " print \"%s, %s %d %d\" %(weekday[day_of_week],month[mm-1],dd,yy)\n",
+ " return\n",
+ " \n",
+ "weekday=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']\n",
+ "month=['January','February','March','April','May','June','July','August',\\\n",
+ " 'September','October','November','December']\n",
+ "\n",
+ "main(10,29,1929)\n",
+ "print\n",
+ "main(8,15,1945)\n",
+ "print\n",
+ "main(7,20,1969)\n",
+ "print\n",
+ "main(5,24,1997)\n",
+ "print\n",
+ "main(8,30,2010)\n",
+ "print\n",
+ "main(4,12,2069)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tuesday, October 29 1929\n",
+ "\n",
+ "Wednesday, August 15 1945\n",
+ "\n",
+ "Sunday, July 20 1969\n",
+ "\n",
+ "Saturday, May 24 1997\n",
+ "\n",
+ "Monday, August 30 2010\n",
+ "\n",
+ "Friday, April 12 2069\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.30, Page number: 11.44<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def ratio_choose(freq,a,m,n):\n",
+ "\n",
+ " if freq=='C':\n",
+ " ratio=md3(a,m,n)\n",
+ " elif freq=='D':\n",
+ " ratio=md2(a,m,n)\n",
+ " else:\n",
+ " ratio=md1(a,m,n)\n",
+ "\n",
+ " return ratio\n",
+ "\n",
+ "\n",
+ "def table(freq,a,m,n):\n",
+ "\n",
+ "\n",
+ " print \"Interest Rate Future Amount\\n\\n\"\n",
+ " for count in range(1,21):\n",
+ " i=0.01*count\n",
+ " f=a*ratio_choose(freq,i,m,n)\n",
+ " print \" %2d %.2f\" %(count,f)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "def md1(i,m,n):\n",
+ " \n",
+ " factor=1+i/m\n",
+ " ratio=12*(factor**(m*n)-1)/i\n",
+ " return ratio\n",
+ "\n",
+ "def md2(i,m,n):\n",
+ "\n",
+ " factor=1+i/m\n",
+ " ratio=(factor**(m*n)-1)/(factor**(m/12)-1)\n",
+ " return ratio\n",
+ "\n",
+ "def md3(i,dummy,n):\n",
+ " ratio=(10**(i*n)-1)/(10**(i/12)-1)\n",
+ " return ratio\n",
+ "\n",
+ "def main(freq):\n",
+ " m=0\n",
+ " freq=freq.upper()\n",
+ " if freq=='A':\n",
+ " m=1\n",
+ " print \"\\nAnual Compounding\\n\"\n",
+ " \n",
+ " elif freq=='S':\n",
+ " m=2\n",
+ " print \"\\nSemiannual Compounding\\n\"\n",
+ " \n",
+ " elif freq=='Q':\n",
+ " print \"\\nQuaterly Compounding\\n\"\n",
+ " m=4\n",
+ " \n",
+ " elif freq=='M':\n",
+ " m=12\n",
+ " print \"\\nMonthly Compounding\\n\"\n",
+ " \n",
+ " elif freq=='D':\n",
+ " m=360\n",
+ " print \"\\nDaily Compounding\\n\"\n",
+ "\n",
+ " elif freq=='C':\n",
+ " m=0\n",
+ " print \"\\nContinuous Compounding\\n\"\n",
+ " \n",
+ " else:\n",
+ " print \"\\nERROR!!! Please Repeat\\n\\n\"\n",
+ " return\n",
+ " \n",
+ " return m\n",
+ "\n",
+ "\n",
+ "a,n,freq=100,3,'m'\n",
+ "print \"FUTURE VALUE OF A SERIES OF MONTHLY DEPOSITS\\n\\n\"\n",
+ "print \"Frequency of Compunding (A,S,Q,M,D,C): \",freq\n",
+ "print \"Amount of Each Monthly Payement : \",a\n",
+ "print \"Number of years: \",n\n",
+ "m=main(freq)\n",
+ "\n",
+ "table(freq,a,m,n)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "FUTURE VALUE OF A SERIES OF MONTHLY DEPOSITS\n",
+ "\n",
+ "\n",
+ "Frequency of Compunding (A,S,Q,M,D,C): m\n",
+ "Amount of Each Monthly Payement : 100\n",
+ "Number of years: 3\n",
+ "\n",
+ "Monthly Compounding\n",
+ "\n",
+ "Interest Rate Future Amount\n",
+ "\n",
+ "\n",
+ " 1 3653.00\n",
+ " 2 3707.01\n",
+ " 3 3762.06\n",
+ " 4 3818.16\n",
+ " 5 3875.33\n",
+ " 6 3933.61\n",
+ " 7 3993.01\n",
+ " 8 4053.56\n",
+ " 9 4115.27\n",
+ " 10 4178.18\n",
+ " 11 4242.31\n",
+ " 12 4307.69\n",
+ " 13 4374.33\n",
+ " 14 4442.28\n",
+ " 15 4511.55\n",
+ " 16 4582.17\n",
+ " 17 4654.18\n",
+ " 18 4727.60\n",
+ " 19 4802.45\n",
+ " 20 4878.78\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter12.ipynb b/Programming_With_C/chapter12.ipynb
new file mode 100755
index 00000000..09e4c7e9
--- /dev/null
+++ b/Programming_With_C/chapter12.ipynb
@@ -0,0 +1,565 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 12: Structures and Unions<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.1, Page 12.2<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*20\n",
+ "\n",
+ "class account(Structure):\n",
+ "\t_fields_=[('acct_no',c_int),('acct_type',c_char),('name',string),('balance',c_int)]\n",
+ "\n",
+ "customer=account(12632,'r','Joseph',1200)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.4, Page 12.4<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*20\n",
+ "\n",
+ "class date(Structure):\n",
+ "\t_fields_=[('month',c_int),('day',c_int),('year',c_int)]\n",
+ "\t\n",
+ "class account(Structure):\n",
+ "\t_fields_=[('acct_no',c_int),('acct_type',c_char),('name',string),('balance',c_float),('lastpayment',date)]\n",
+ "\t\n",
+ "customer=account(12345,'r','John W. Smith',586.30,date(5,24,90))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.6, Page 12.6<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*20\n",
+ "\n",
+ "class date(Structure):\n",
+ "\t\n",
+ "\t_fields_=[('name',string),('month',c_int),('day',c_int),('year',c_int)]\n",
+ "\n",
+ "birthday=[]\n",
+ "birthday.append(date('Amy',12,30,73))\n",
+ "birthday.append(date('Gail',5,13,66))\n",
+ "birthday.append(date('Marc',7,15,72))\n",
+ "birthday.append(date('Marla',11,29,70))\n",
+ "birthday.append(date('Megan',2,4,77))\n",
+ "birthday.append(date('Sharon',12,29,63))\n",
+ "birthday.append(date('Susan',4,12,69))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.14, Page 12.13<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*50\n",
+ "\n",
+ "def writeoutput(obj):\n",
+ "\tprint \"Name : \",obj.name,\n",
+ "\tprint \"\\t Account Number : \",obj.acct_no\n",
+ "\tprint \"Street : \",obj.street\n",
+ "\tprint \"City : \",obj.city\n",
+ "\tprint \"Old Balance : %7.2f\" %(obj.oldbalance)\n",
+ "\tprint \"Payment : %7.2f\" %(obj.payment)\n",
+ "\tprint \"New Balance : %7.2f\" %(obj.newbalance)\n",
+ "\tprint \"Account Status : \",\n",
+ "\t\n",
+ "\tif obj.acct_type=='C':\n",
+ "\t\tprint \"CURRENT\\n\\n\"\n",
+ "\telif obj.acct_type=='O':\n",
+ "\t\tprint \"OVERDUE\\n\\n\"\n",
+ "\telse:\n",
+ "\t\tprint \"DELINQUENT\\n\\n\"\n",
+ "\t\t\n",
+ "\treturn\n",
+ "\n",
+ "\n",
+ "class date(Structure):\n",
+ "\t_fields_=[('month',c_int),('day',c_int),('year',c_int)]\n",
+ "\t\n",
+ "\n",
+ "class account(Structure):\n",
+ "\t_fields_=[('name',string),('street',string),('city',string),('acct_no',c_int),('oldbalance',c_float),('payment',c_float),('lastpayment',date),('newbalance',c_float),('acct_type',c_char)]\n",
+ "\t\t\n",
+ "print \"CUSOMER BILLING SYSTEM\\n\\n\"\n",
+ "customer=[]\n",
+ "name='Steve Johnson'\n",
+ "street='123 Mountainview Drive '\n",
+ "city='Denver . CO'\n",
+ "acct_no=4208\n",
+ "oldbalance=247.88\n",
+ "payment=25.00\n",
+ "lastpay=date(6,14,1998)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "name='Susan Richards'\n",
+ "street='4383 Aligator Blvd'\n",
+ "city='Fort Lauderdale. FL'\n",
+ "acct_no=2219\n",
+ "oldbalance=135.00\n",
+ "payment=135.00\n",
+ "lastpay=date(8,10,2000)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "name='Martin Peterson'\n",
+ "street='1787 Pacific Parkway'\n",
+ "city='San Diego. CA'\n",
+ "acct_no=8452\n",
+ "oldbalance=387.42\n",
+ "payment=35.00\n",
+ "lastpay=date(9,22,1999)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "name='Phyllis Smith'\n",
+ "street='1000 Great White Way'\n",
+ "city='New York. NY'\n",
+ "acct_no=711\n",
+ "oldbalance=260.00\n",
+ "payment=0.00\n",
+ "lastpay=date(11,27,2001)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "\n",
+ "\n",
+ "for i in range(0,4):\n",
+ "\tif customer[i].payment>0:\n",
+ "\t\tif customer[i].payment<0.1*customer[i].oldbalance:\n",
+ "\t\t\tcustomer[i].acct_type='O'\n",
+ "\t\telse:\n",
+ "\t\t\tcustomer[i].acct_type='C'\n",
+ "\telse:\n",
+ "\t\tif customer[i].oldbalance>0:\n",
+ "\t\t\tcustomer[i].acct_type='D'\n",
+ "\t\telse:\n",
+ "\t\t\tcustomer[i].acct_type='C'\n",
+ "\t\n",
+ "\tcustomer[i].newbalance=customer[i].oldbalance-customer[i].payment\n",
+ "\t\n",
+ "\twriteoutput(customer[i])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CUSOMER BILLING SYSTEM\n",
+ "\n",
+ "\n",
+ "Name : Steve Johnson \t Account Number : 4208\n",
+ "Street : 123 Mountainview Drive \n",
+ "City : Denver . CO\n",
+ "Old Balance : 247.88\n",
+ "Payment : 25.00\n",
+ "New Balance : 222.88\n",
+ "Account Status : CURRENT\n",
+ "\n",
+ "\n",
+ "Name : Susan Richards \t Account Number : 2219\n",
+ "Street : 4383 Aligator Blvd\n",
+ "City : Fort Lauderdale. FL\n",
+ "Old Balance : 135.00\n",
+ "Payment : 135.00\n",
+ "New Balance : 0.00\n",
+ "Account Status : CURRENT\n",
+ "\n",
+ "\n",
+ "Name : Martin Peterson \t Account Number : 8452\n",
+ "Street : 1787 Pacific Parkway\n",
+ "City : San Diego. CA\n",
+ "Old Balance : 387.42\n",
+ "Payment : 35.00\n",
+ "New Balance : 352.42\n",
+ "Account Status : OVERDUE\n",
+ "\n",
+ "\n",
+ "Name : Phyllis Smith \t Account Number : 711\n",
+ "Street : 1000 Great White Way\n",
+ "City : New York. NY\n",
+ "Old Balance : 260.00\n",
+ "Payment : 0.00\n",
+ "New Balance : 260.00\n",
+ "Account Status : DELINQUENT\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.25, Page 12.29<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*10\n",
+ "\n",
+ "class record(Structure):\n",
+ "\t_fields_=[('name',string),('acct_no',c_int),('acct_type',c_char),('balance',c_float)]\n",
+ "\t\n",
+ "def adjust(obj):\n",
+ "\tobj.name='Jones'\n",
+ "\tobj.acct_no=9999\n",
+ "\tobj.acct_type='R'\n",
+ "\tobj.balance=99.99\n",
+ "\treturn\n",
+ "\n",
+ "\n",
+ "customer=record('Smith',3333,'C',33.33)\n",
+ "print customer.name,customer.acct_no,customer.acct_type,\n",
+ "print \"%.2f\" %customer.balance\n",
+ "\n",
+ "adjust(customer)\n",
+ "\n",
+ "print customer.name,customer.acct_no,customer.acct_type,\n",
+ "print \"%.2f\" %customer.balance\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Smith 3333 C 33.33\n",
+ "Jones 9999 R 99.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.32, Page 12.42<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "class node():\n",
+ "\t\n",
+ "\tdef __init__(self,data):\n",
+ "\t\tself.data=data\n",
+ "\t\tself.next=None\n",
+ "\n",
+ "\t\t\n",
+ "class list():\n",
+ "\t\n",
+ "\tdef __init__(self):\n",
+ "\t\tself.head=None\n",
+ "\t\tself.tail=None\n",
+ "\t\n",
+ "\tdef insert(self,x):\n",
+ "\t\t\n",
+ "\t\te=node(x)\n",
+ "\t\t\n",
+ "\t\tif self.head==None:\n",
+ "\t\t\tself.head=e\n",
+ "\t\t\tself.tail=e\n",
+ "\t\t\t\n",
+ "\t\telse:\n",
+ "\t\t\tself.tail.next=e\n",
+ "\t\t\tself.tail=e\n",
+ "\t\t\t\n",
+ "def display(ptr):\n",
+ "\tnptr=ptr.head\n",
+ "\twhile nptr!=None:\n",
+ "\t\tprint nptr.data\n",
+ "\t\tnptr=nptr.next\n",
+ "\t\n",
+ "\treturn\n",
+ "\t\n",
+ "def delete(ptr,element):\n",
+ "\tnptr=ptr.head\n",
+ "\twhile nptr.next.data!=element:\n",
+ "\t\tnptr=nptr.next\n",
+ "\t\tif nptr.next==None:\n",
+ "\t\t\treturn\n",
+ "\t\n",
+ "\tdptr=nptr.next\n",
+ "\tnptr.next=dptr.next\n",
+ "\tdel dptr\n",
+ "\treturn\n",
+ "\t\n",
+ "p=list()\n",
+ "p.insert('BOSTON')\n",
+ "p.insert('CHICAGO')\n",
+ "p.insert('DENVER')\n",
+ "p.insert('NEW YORK')\n",
+ "p.insert('PITTSBURG')\n",
+ "\n",
+ "display(p)\n",
+ "print '\\n\\nAFTER DELETING DENVER\\n\\n'\n",
+ "delete(p,'DENVER')\n",
+ "display(p)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "BOSTON\n",
+ "CHICAGO\n",
+ "DENVER\n",
+ "NEW YORK\n",
+ "PITTSBURG\n",
+ "\n",
+ "\n",
+ "AFTER DELETING DENVER\n",
+ "\n",
+ "\n",
+ "BOSTON\n",
+ "CHICAGO\n",
+ "NEW YORK\n",
+ "PITTSBURG\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.35, Page 12.57<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*20\n",
+ "\n",
+ "class id(Union):\n",
+ "\t_fields_=[('color',c_char),('size',c_int)]\n",
+ "\t\n",
+ "class clothes(Structure):\n",
+ "\t_fields_=[('manufacturer',string),('cost',c_float),('description',id)]\n",
+ "\t\n",
+ "shirt=clothes()\n",
+ "shirt.description.color='w'\n",
+ "print \"%c %d\\n\" %(shirt.description.color,shirt.description.size)\n",
+ "\n",
+ "shirt.description.size=12\n",
+ "print \"%c %d\" %(shirt.description.color,shirt.description.size)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "w 119\n",
+ "\n",
+ "\f",
+ " 12\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.37, Page 12.59<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "class nvals(Union):\n",
+ "\t_fields_=[('fexp',c_float),('nexp',c_int)]\n",
+ "\t\n",
+ "class values(Structure):\n",
+ "\t_fields_=[('x',c_float),('flag',c_char),('exp',nvals)]\n",
+ "\t\n",
+ "def power(a):\n",
+ "\ty=a.x\n",
+ "\t\n",
+ "\tif a.flag=='i':\n",
+ "\t\tif a.exp.nexp==0:\n",
+ "\t\t\ty=1.0\n",
+ "\t\telse:\n",
+ "\t\t\ti=1\n",
+ "\t\t\twhile i<abs(a.exp.nexp):\n",
+ "\t\t\t\ty*=a.x\n",
+ "\t\t\t\ti+=1\n",
+ "\t\t\t\n",
+ "\t\t\tif a.exp.nexp<0:\n",
+ "\t\t\t\ty=1.0/y\n",
+ "\t\n",
+ "\telse:\n",
+ "\t\ty=math.exp(a.exp.fexp*math.log(a.x))\n",
+ "\t\n",
+ "\treturn y\n",
+ "\t\n",
+ "def main(in1,n):\n",
+ "\ta=values()\n",
+ "\ta.x=in1\n",
+ "\t\n",
+ "\ti=int(n)\n",
+ "\t\n",
+ "\tif i==n:\n",
+ "\t\ta.flag='i'\n",
+ "\telse:\n",
+ "\t\ta.flag='f'\n",
+ "\t\n",
+ "\tif a.flag=='i':\n",
+ "\t\ta.exp.nexp=i\n",
+ "\telse:\n",
+ "\t\ta.exp.fexp=n\n",
+ "\t\t\n",
+ "\tif a.flag=='f' and a.x<=0.0:\n",
+ "\t\tprint \"ERROR - Cannot raise a non-positive number to a floating point power\"\n",
+ "\telse:\n",
+ "\t\ty=power(a)\n",
+ "\t\tprint \"y=%.4f\" %y\n",
+ "\t\n",
+ "\treturn\n",
+ "\n",
+ "print \"\\nx=2\\nn=3\"\n",
+ "main(2,3)\n",
+ "print \"\\nx=-2\\nn=3\"\n",
+ "main(-2,3)\n",
+ "print \"\\nx=2.2\\nn=3.3\"\n",
+ "main(2.2,3.3)\n",
+ "print \"\\nx=-2.2\\nn=3.3\"\n",
+ "main(-2.2,3.3)\n",
+ "\n",
+ "\n",
+ "\t\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "x=2\n",
+ "n=3\n",
+ "y=8.0000\n",
+ "\n",
+ "x=-2\n",
+ "n=3\n",
+ "y=-8.0000\n",
+ "\n",
+ "x=2.2\n",
+ "n=3.3\n",
+ "y=13.4895\n",
+ "\n",
+ "x=-2.2\n",
+ "n=3.3\n",
+ "ERROR - Cannot raise a non-positive number to a floating point power\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter13.ipynb b/Programming_With_C/chapter13.ipynb
new file mode 100755
index 00000000..fe4b86df
--- /dev/null
+++ b/Programming_With_C/chapter13.ipynb
@@ -0,0 +1,180 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 13: File Handling<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.3, Page 12.4<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "fp=open(\"output.txt\",'w')\n",
+ "for k in range(65,91):\n",
+ "\tfp.write(str(k)+'\\n')\n",
+ "fp.close()\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.7, Page 13.8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*40\n",
+ "\n",
+ "class date(Structure):\n",
+ "\t_fields_=[('month',c_int),('day',c_int),('year',c_int)]\n",
+ "\t\n",
+ "class account(Structure):\n",
+ "\t_fields_=[('name',string),('street',string),('city',string),('acct_no',c_int),('oldbalance',c_float),('payment',c_float),('lastpayment',date),('acct_type',c_char),('newbalance',c_float)]\n",
+ "\n",
+ "\n",
+ "def writefile(obj,fpt):\n",
+ "\tfpt.write(obj.name+'\\n')\n",
+ "\tfpt.write(obj.city+'\\n')\n",
+ "\tfpt.write(str(obj.acct_no)+'\\n')\n",
+ "\tfpt.write(obj.acct_type+'\\n')\n",
+ "\tfpt.write(str(obj.oldbalance)+'\\n')\n",
+ "\tfpt.write(str(obj.newbalance)+'\\n')\n",
+ "\tfpt.write(str(obj.payment)+'\\n')\n",
+ "\tfpt.write(str(obj.lastpayment.month)+' ')\n",
+ "\tfpt.write(str(obj.lastpayment.day)+' ')\n",
+ "\tfpt.write(str(obj.lastpayment.year)+'\\n\\n')\n",
+ "\t\n",
+ "\treturn\t\n",
+ "\t\n",
+ "fpt=open('records.txt','w')\n",
+ "\n",
+ "\n",
+ "customer=[]\n",
+ "\n",
+ "name='Steve Johnson'\n",
+ "street='123 Mountainview Drive '\n",
+ "city='Denver . CO'\n",
+ "acct_no=4208\n",
+ "oldbalance=247.88\n",
+ "payment=25.00\n",
+ "lastpay=date(6,14,1998)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "name='Susan Richards'\n",
+ "street='4383 Aligator Blvd'\n",
+ "city='Fort Lauderdale. FL'\n",
+ "acct_no=2219\n",
+ "oldbalance=135.00\n",
+ "payment=135.00\n",
+ "lastpay=date(8,10,2000)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "name='Martin Peterson'\n",
+ "street='1787 Pacific Parkway'\n",
+ "city='San Diego. CA'\n",
+ "acct_no=8452\n",
+ "oldbalance=387.42\n",
+ "payment=35.00\n",
+ "lastpay=date(9,22,1999)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "name='Phyllis Smith'\n",
+ "street='1000 Great White Way'\n",
+ "city='New York. NY'\n",
+ "acct_no=711\n",
+ "oldbalance=260.00\n",
+ "payment=0.00\n",
+ "lastpay=date(11,27,2001)\n",
+ "customer.append(account(name,street,city,acct_no,oldbalance,payment,lastpay))\n",
+ "\n",
+ "\n",
+ "\n",
+ "for i in range(0,4):\n",
+ "\tif customer[i].payment>0:\n",
+ "\t\tif customer[i].payment<0.1*customer[i].oldbalance:\n",
+ "\t\t\tcustomer[i].acct_type='O'\n",
+ "\t\telse:\n",
+ "\t\t\tcustomer[i].acct_type='C'\n",
+ "\telse:\n",
+ "\t\tif customer[i].oldbalance>0:\n",
+ "\t\t\tcustomer[i].acct_type='D'\n",
+ "\t\telse:\n",
+ "\t\t\tcustomer[i].acct_type='C'\n",
+ "\t\n",
+ "\tcustomer[i].newbalance=customer[i].oldbalance-customer[i].payment\n",
+ "\t\n",
+ "\twritefile(customer[i],fpt)\n",
+ "\n",
+ "fpt.close()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.13, Page 13.28<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "fp=open('binval.txt','wb')\n",
+ "\n",
+ "for i in range(1000,11001):\n",
+ "\tfp.write(str(i))\n",
+ "\n",
+ "fp.close()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter14.ipynb b/Programming_With_C/chapter14.ipynb
new file mode 100755
index 00000000..d89e7c72
--- /dev/null
+++ b/Programming_With_C/chapter14.ipynb
@@ -0,0 +1,232 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 14: Low-Level Programming<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.14, Page number: 14.12<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "a=0xf05a\n",
+ "\n",
+ "print \"%u\" %(a)\n",
+ "print \"%x\" %(a>>6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "61530\n",
+ "3c1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.16, Page number: 14.13<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "a=1\n",
+ "nbits=16\n",
+ "m=0x1<<(nbits-1)\n",
+ "\n",
+ "def main(a):\n",
+ " mask=abs(m)\n",
+ " for count in range(1,nbits+1):\n",
+ " if a&mask:\n",
+ " b=1\n",
+ " else:\n",
+ " b=0\n",
+ "\n",
+ " print \"%x\" %(b),\n",
+ " if count%4==0:\n",
+ " print \"\\t\",\n",
+ "\n",
+ " mask>>=1\n",
+ " return\n",
+ "print \"\\n1-->\\n\"\n",
+ "main(1)\n",
+ "print \"\\n-1-->\\n\"\n",
+ "main(-1)\n",
+ "print \"\\n0-->\\n\"\n",
+ "main(0)\n",
+ "print \"\\n2-->\\n\"\n",
+ "main(2)\n",
+ "print \"\\n-2-->\\n\"\n",
+ "main(-2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "1-->\n",
+ "\n",
+ "0 0 0 0 \t0 0 0 0 \t0 0 0 0 \t0 0 0 1 \t\n",
+ "-1-->\n",
+ "\n",
+ "1 1 1 1 \t1 1 1 1 \t1 1 1 1 \t1 1 1 1 \t\n",
+ "0-->\n",
+ "\n",
+ "0 0 0 0 \t0 0 0 0 \t0 0 0 0 \t0 0 0 0 \t\n",
+ "2-->\n",
+ "\n",
+ "0 0 0 0 \t0 0 0 0 \t0 0 0 0 \t0 0 1 0 \t\n",
+ "-2-->\n",
+ "\n",
+ "1 1 1 1 \t1 1 1 1 \t1 1 1 1 \t1 1 1 0 \t"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.23, Page Number: 14.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from ctypes import *\n",
+ "\n",
+ "string=c_char*50\n",
+ "\n",
+ "\n",
+ "def convert(mm,dd,yy):\n",
+ " yy-=1900\n",
+ " ndays=long(30.42*(mm-1)+dd)\n",
+ " if mm==2:\n",
+ " ndays+=1\n",
+ " if mm>2 and mm<8:\n",
+ " ndays-=1\n",
+ " if yy%4==0 and mm<2:\n",
+ " ndays+=1\n",
+ "\n",
+ " ncycles=yy/4\n",
+ " ndays+=ncycles*1461\n",
+ "\n",
+ " nyears=yy%4\n",
+ " if nyears>0:\n",
+ " ndays+=365*nyears+1\n",
+ " if ndays>59:\n",
+ " ndays-=1\n",
+ "\n",
+ " day=ndays%7\n",
+ " yy+=1900\n",
+ " if yy%4==0 and yy%400!=0:\n",
+ " day+=1\n",
+ " return day\n",
+ "\n",
+ "\n",
+ "class date(Structure):\n",
+ "\t_fields_=[('month',c_int),('day',c_int),('year',c_int)]\n",
+ "\t\n",
+ "\n",
+ "class person(Structure):\n",
+ "\t_fields_=[('name',string),('birthdate',date)]\n",
+ "\t\t\n",
+ "student=[]\n",
+ "\n",
+ "weekday=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']\n",
+ "\n",
+ "month=['January','February','March','April','May','June','July','August',\\\n",
+ " 'September','October','November','December']\n",
+ "\n",
+ "\n",
+ "name='Rob Smith'\n",
+ "birthdate=date(7,20,1972)\n",
+ "student.append(person(name,birthdate))\n",
+ "\n",
+ "name='Judy Thompson'\n",
+ "birthdate=date(11,27,1983)\n",
+ "student.append(person(name,birthdate))\n",
+ "\n",
+ "name='Jim Williams'\n",
+ "birthdate=date(12,29,1998)\n",
+ "student.append(person(name,birthdate))\n",
+ "\n",
+ "name='Mort Davis'\n",
+ "birthdate=date(6,10,2010)\n",
+ "student.append(person(name,birthdate))\n",
+ "\n",
+ "\n",
+ "\t\n",
+ "for count in xrange(0,4):\n",
+ " day_of_week=convert(student[count].birthdate.month,student[count].birthdate.day,student[count].birthdate.year)\n",
+ " print student[count].name,\n",
+ " print \" %s, %s %d %d \\n\" %(weekday[day_of_week],month[student[count].birthdate.month-1],student[count].birthdate.day,student[count].birthdate.year)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rob Smith Thursday, July 20 1972 \n",
+ "\n",
+ "Judy Thompson Sunday, November 27 1983 \n",
+ "\n",
+ "Jim Williams Tuesday, December 29 1998 \n",
+ "\n",
+ "Mort Davis Thursday, June 10 2010 \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/Programming_With_C/chapter2.ipynb b/Programming_With_C/chapter2.ipynb
new file mode 100755
index 00000000..178b56ae
--- /dev/null
+++ b/Programming_With_C/chapter2.ipynb
@@ -0,0 +1,117 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 2: Introduction to C Programming<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.1, Page number: 2.2<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"Welcome to python programming\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Welcome to python programming\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.5, Page number: 2.5<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "sum=10+20\n",
+ "print sum\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "30\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.6, Page number: 2.5<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "num1,num2=50,25\n",
+ "Sum=num1+num2\n",
+ "print \"addition of %d and %d = %d\" %(num1,num2,Sum)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "addition of 50 and 25 = 75\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter3.ipynb b/Programming_With_C/chapter3.ipynb
new file mode 100755
index 00000000..fbf10f10
--- /dev/null
+++ b/Programming_With_C/chapter3.ipynb
@@ -0,0 +1,132 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 3: Operators and Expressions<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.13, Page number: 3.9 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import ctypes as ct\n",
+ "\n",
+ "print \"interger : \",ct.sizeof(ct.c_int())\n",
+ "print \"float : \",ct.sizeof(ct.c_float())\n",
+ "print \"double : \",ct.sizeof(ct.c_double())\n",
+ "print \"character : \",ct.sizeof(ct.c_char())\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "interger : 4\n",
+ "float : 4\n",
+ "double : 8\n",
+ "character : 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.30, Page number: 3.19<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "print \"for the equation ax^2+bx+c \\n\"\n",
+ "\n",
+ "a=2\n",
+ "b=6\n",
+ "c=3\n",
+ "\n",
+ "root=(b*b-4*a*c)**0.5\n",
+ "x1=(-b + root)/(2*a)\n",
+ "x2=(-b - root)/(2*a)\n",
+ "\n",
+ "print \"x1=\",x1\n",
+ "print \"x2=\",x2\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for the equation ax^2+bx+c \n",
+ "\n",
+ "x1= -0.633974596216\n",
+ "x2= -2.36602540378\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.31, Page number: 3.20<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "lower=\"l\"\n",
+ "upper=lower.upper()\n",
+ "print upper\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter4.ipynb b/Programming_With_C/chapter4.ipynb
new file mode 100755
index 00000000..21edac6f
--- /dev/null
+++ b/Programming_With_C/chapter4.ipynb
@@ -0,0 +1,561 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 4: Data Input and Output<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.4, Page number: 4.4 <h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "ch='a'\n",
+ "print 'equivalent uppercase character is ',ch.upper()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "equivalent uppercase character is A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.16, Page number: 4.14<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "i,j=2.0,3.0\n",
+ "print \"%f %f %f %f\" %(i,i,i+j,math.sqrt(i+j))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2.000000 2.000000 5.000000 2.236068\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.18, Page number: 4.15<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "x,y=5000.0,0.0025\n",
+ "\n",
+ "print \"%f %f %f %f\\n\\n\" %(x,y,x*y,x/y)\n",
+ "print \"%e %e %e %e\" %(x,y,x*y,x/y)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5000.000000 0.002500 12.500000 2000000.000000\n",
+ "\n",
+ "\n",
+ "5.000000e+03 2.500000e-03 1.250000e+01 2.000000e+06\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.19, Page number: 4.16<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "line=\"The PITTSBURG STEELERS is one of America's favorite football teams!\"\n",
+ "print \"%s\" %(line)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The PITTSBURG STEELERS is one of America's favorite football teams!\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.20, Page number: 4.17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "i=12345\n",
+ "x=345.678\n",
+ "\n",
+ "print \"%3d %5d %8d\\n\\n\" %(i,i,i)\n",
+ "print \"%3f %10f %13f\" %(x,x,x)\n",
+ "print \"%3e %13e %16e\" %(x,x,x)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "12345 12345 12345\n",
+ "\n",
+ "\n",
+ "345.678000 345.678000 345.678000\n",
+ "3.456780e+02 3.456780e+02 3.456780e+02\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.21, Page number: 4.17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "i=12345\n",
+ "x=345.678\n",
+ "\n",
+ "print \"%3d %5d %8d\\n\\n\" %(i,i,i)\n",
+ "print \"%3g %10g %13g\" %(x,x,x)\n",
+ "print \"%3g %13g %16g\" %(x,x,x)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "12345 12345 12345\n",
+ "\n",
+ "\n",
+ "345.678 345.678 345.678\n",
+ "345.678 345.678 345.678\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.22, Page number: 4.18<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "x=123.456\n",
+ "\n",
+ "print \"%7f %7.3f %7.1f\" %(x,x,x)\n",
+ "print \"%12e %12.5e %12.3e\" %(x,x,x)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "123.456000 123.456 123.5\n",
+ "1.234560e+02 1.23456e+02 1.235e+02\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.23, Page number: 4.19<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "x=123.456\n",
+ "\n",
+ "print \"%f %.3f %.1f\" %(x,x,x)\n",
+ "print \"%e %.5e %.3e\" %(x,x,x)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "123.456000 123.456 123.5\n",
+ "1.234560e+02 1.23456e+02 1.235e+02\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.24, Page number: 4.20<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "line=\"hexadecimal\"\n",
+ "\n",
+ "print \"%10s %15s %15.5s %.5s\" %(line,line,line,line)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hexadecimal hexadecimal hexad hexad\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.26, Page number 4.21<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "a=0x80ec\n",
+ "b=0.3e-12\n",
+ "\n",
+ "print \"%4x %10.2e\\n\\n\" %(a,b)\n",
+ "print \"%4X %10.2E\" %(a,b)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "80ec 3.00e-13\n",
+ "\n",
+ "\n",
+ "80EC 3.00E-13\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.27, Page number: 4.22<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "i,x,y=123,12.0,-3.3\n",
+ "\n",
+ "print \":%6d %7.0f %10.1e: \\n\" %(i,x,y)\n",
+ "print \":%-6d %-7.0f %-10.1e: \\n\" %(i,x,y)\n",
+ "print \":%+6d %+7.0f %+10.1e: \\n\" %(i,x,y)\n",
+ "print \":%-+6d %-+7.0f %-+10.1e: \\n\" %(i,x,y)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ ": 123 12 -3.3e+00: \n",
+ "\n",
+ ":123 12 -3.3e+00 : \n",
+ "\n",
+ ": +123 +12 -3.3e+00: \n",
+ "\n",
+ ":+123 +12 -3.3e+00 : \n",
+ "\n",
+ ": 12 12. -3.3 -3.30000: \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.28, Page number: 4.23<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "i,j,k=1234,01777,0xa08c\n",
+ "\n",
+ "print \":%8u %8o %8x:\\n\" %(i,j,k)\n",
+ "print \":%-8u %-8o %-8x:\\n\" %(i,j,k)\n",
+ "print \":%08u %08o %08x:\\n\" %(i,j,k)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ ": 1234 1777 a08c:\n",
+ "\n",
+ ":1234 1777 a08c :\n",
+ "\n",
+ ": 1234 01777 0xa08c:\n",
+ "\n",
+ ":00001234 00001777 0000a08c:\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.29, Page number: 4.24<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "line=\"lower-case\"\n",
+ "\n",
+ "print \":%15s %15.5s %.5s:\" %(line,line,line)\n",
+ "print \":%-15s %-15.5s %-.5s:\" %(line,line,line)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ ": lower-case lower lower:\n",
+ ":lower-case lower lower:\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.30, Page number: 4.24<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "a,b,x1,x2=2.2,-6.2,0.005,-12.88\n",
+ "\n",
+ "print \"$%4.2f %7.1f%%\\n\" %(a,b)\n",
+ "print \"x1=%7.3f x2=%7.3f\" %(x1,x2)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "$2.20 -6.2%\n",
+ "\n",
+ "x1= 0.005 x2=-12.880\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.32, Page number: 4.26<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "name=\"Robert Smith\"\n",
+ "score1=88\n",
+ "score2=62.5\n",
+ "score3=90\n",
+ "\n",
+ "average=(float)(score1+score2+score3)/3\n",
+ "print \"Name: %-s\" %(name)\n",
+ "print \"Score1: %-5.1f\" %(score1)\n",
+ "print \"Score2: %-5.1f\" %(score2)\n",
+ "print \"Score3: %-5.1f\" %(score3)\n",
+ "print \"Average: %-5.1f\" %(average)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name: Robert Smith\n",
+ "Score1: 88.0 \n",
+ "Score2: 62.5 \n",
+ "Score3: 90.0 \n",
+ "Average: 80.2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter5.ipynb b/Programming_With_C/chapter5.ipynb
new file mode 100755
index 00000000..ea09f2bd
--- /dev/null
+++ b/Programming_With_C/chapter5.ipynb
@@ -0,0 +1,96 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Preparing And Running A Complete C Program<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.2, Page number: 5.4<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "p,r,n=10000,10,3\n",
+ "i=r/100.0\n",
+ "\n",
+ "f=p*math.pow(1+i,n)\n",
+ "print \"The final value (F) is: %.2f\" %f\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final value (F) is: 13310.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.4, Page number: 5.7<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "a,b,c=2.0,5.0,3.0\n",
+ "d=math.sqrt(b*b-(4*a*c))\n",
+ "x1=(-b+d)/(2*a)\n",
+ "x2=(-b-d)/(2*a)\n",
+ "\n",
+ "print \"x1 = %e x2 = %e\" %(x1,x2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x1 = -1.000000e+00 x2 = -1.500000e+00\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter6.ipynb b/Programming_With_C/chapter6.ipynb
new file mode 100755
index 00000000..5da628a1
--- /dev/null
+++ b/Programming_With_C/chapter6.ipynb
@@ -0,0 +1,1297 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 6: Control Statements<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.4, Page number: 6.3<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "inputs=[5,25,4,8]\n",
+ "Sum,SumSq,SumSqrt=0,0,0\n",
+ "\n",
+ "for x in inputs:\n",
+ "\n",
+ " Sum+=x\n",
+ " SumSq+=x*x\n",
+ " SumSqrt+=math.sqrt(x)\n",
+ "\n",
+ "\n",
+ "print \" Sum = %d \\n SumSq = %d \\n SumSqrt = %f\" %(Sum,SumSq,SumSqrt)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Sum = 42 \n",
+ " SumSq = 730 \n",
+ " SumSqrt = 12.064495\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.5, Page number: 6.4<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def main(first,second):\n",
+ " \n",
+ " if first>second:\n",
+ " print \"first number is bigger\"\n",
+ " if second>first:\n",
+ " print \"second number is bigger\"\n",
+ " if first==second:\n",
+ " print \"both are equal\"\n",
+ " return\n",
+ "\n",
+ "main(5,6)\n",
+ "main(6,5)\n",
+ "main(1,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "second number is bigger\n",
+ "first number is bigger\n",
+ "both are equal\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.7, Page naumber: 6.8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def main(time):\n",
+ "\n",
+ " if time>=0. and time<12.:\n",
+ " print \"Good Morning\"\n",
+ " elif time>=12. and time<18.:\n",
+ " print \"Good Afternoon\"\n",
+ " elif time>=18. and time<=24.:\n",
+ " print \"Good Evening\"\n",
+ " else:\n",
+ " print \"time is out of range\"\n",
+ " return\n",
+ "\n",
+ "main(9)\n",
+ "main(15)\n",
+ "main(21)\n",
+ "main(36)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Good Morning\n",
+ "Good Afternoon\n",
+ "Good Evening\n",
+ "time is out of range\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.8, Page number: 6.8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "digit=0\n",
+ "while digit<=9:\n",
+ " print digit\n",
+ " digit=digit+1\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n",
+ "1\n",
+ "2\n",
+ "3\n",
+ "4\n",
+ "5\n",
+ "6\n",
+ "7\n",
+ "8\n",
+ "9\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.9, Page number: 6.9<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "letter=\"Fourscore and seven years ago aou fathers brought forth...\"\n",
+ "letter=list(letter)\n",
+ "count=0\n",
+ "tag=len(letter)\n",
+ "\n",
+ "while count<tag:\n",
+ " letter[count]=letter[count].upper()\n",
+ " count=count+1\n",
+ "letter=''.join(letter)\n",
+ "print letter\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "FOURSCORE AND SEVEN YEARS AGO AOU FATHERS BROUGHT FORTH...\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.10, Page number: 6.11<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Sum,count=0,0\n",
+ "\n",
+ "numbers=[1,2,3,4,5,6]\n",
+ "n=6.0\n",
+ "\n",
+ "while count<n:\n",
+ " x=numbers[count]\n",
+ " print \"x = \",x\n",
+ " Sum+=x\n",
+ " count+=1\n",
+ "\n",
+ "average=Sum/n\n",
+ "\n",
+ "print 'Average = ',average\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x = 1\n",
+ "x = 2\n",
+ "x = 3\n",
+ "x = 4\n",
+ "x = 5\n",
+ "x = 6\n",
+ "Average = 3.5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x = 1\n",
+ "x = 2\n",
+ "x = 3\n",
+ "x = 4\n",
+ "x = 5\n",
+ "x = 6\n",
+ "Average = 3.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.11, Page number: 6.12<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "digit=0\n",
+ "while True:\n",
+ " print digit\n",
+ " digit=digit+1\n",
+ " if digit>9:\n",
+ " break\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n",
+ "1\n",
+ "2\n",
+ "3\n",
+ "4\n",
+ "5\n",
+ "6\n",
+ "7\n",
+ "8\n",
+ "9\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.12, Page number: 6.13<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "letter=\"Fourscore and seven years ago aou fathers brought forth...\"\n",
+ "letter=list(letter)\n",
+ "\n",
+ "count=0\n",
+ "tag=len(letter)\n",
+ "\n",
+ "while True:\n",
+ " letter[count]=letter[count].upper()\n",
+ " count=count+1\n",
+ " if count>=tag:\n",
+ " break\n",
+ "\n",
+ "letter=''.join(letter)\n",
+ "print letter\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "FOURSCORE AND SEVEN YEARS AGO AOU FATHERS BROUGHT FORTH...\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.13, Page number: 6.14<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Sum,count=0,0\n",
+ "\n",
+ "numbers=[1,2,3,4,5,6]\n",
+ "n=6.0\n",
+ "\n",
+ "while True:\n",
+ " x=numbers[count]\n",
+ " print \"x = \",x\n",
+ " Sum+=x\n",
+ " count+=1\n",
+ " if count>=n:\n",
+ " break\n",
+ "\n",
+ "average=Sum/n\n",
+ "\n",
+ "print 'Average = ',average\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x = 1\n",
+ "x = 2\n",
+ "x = 3\n",
+ "x = 4\n",
+ "x = 5\n",
+ "x = 6\n",
+ "Average = 3.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.14, Page number: 6.16<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "for digit in range(0,10):\n",
+ " print digit\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n",
+ "1\n",
+ "2\n",
+ "3\n",
+ "4\n",
+ "5\n",
+ "6\n",
+ "7\n",
+ "8\n",
+ "9\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.16, Page number: 6.17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "letter=\"Fourscore and seven years ago aou fathers brought forth...\"\n",
+ "letter=list(letter)\n",
+ "n=len(letter)\n",
+ "\n",
+ "for count in range(0,n):\n",
+ " \n",
+ " letter[count]=letter[count].upper()\n",
+ "\n",
+ "letter=''.join(letter)\n",
+ "print letter\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "FOURSCORE AND SEVEN YEARS AGO AOU FATHERS BROUGHT FORTH...\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.17, Page number: 6.17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "n=6\n",
+ "Sum=0.0\n",
+ "\n",
+ "for count in range(1,n+1):\n",
+ " Sum=Sum+count\n",
+ " \n",
+ "average=Sum/n\n",
+ "print \"the average is \",average\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the average is 3.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.18, Page number: 6.19<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "numbers=[[1.5,2.5,6.2,3.0],[4,-2,7],[5.4,8.0,2.2,1.7,-3.9]]\n",
+ "loopcount=3\n",
+ "loop=0\n",
+ "\n",
+ "while loop<loopcount:\n",
+ "\n",
+ " Sum=0\n",
+ "\n",
+ " for x in numbers[loop]:\n",
+ "\n",
+ " print 'x = ',x\n",
+ " Sum+=x\n",
+ "\n",
+ " print 'The average is ',Sum/len(numbers[loop])\n",
+ " loop+=1\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x = 1.5\n",
+ "x = 2.5\n",
+ "x = 6.2\n",
+ "x = 3.0\n",
+ "The average is 3.3\n",
+ "x = 4\n",
+ "x = -2\n",
+ "x = 7\n",
+ "The average is 3\n",
+ "x = 5.4\n",
+ "x = 8.0\n",
+ "x = 2.2\n",
+ "x = 1.7\n",
+ "x = -3.9\n",
+ "The average is 2.68\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.19, Page number: 6.20<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "text=['Now is the time for all good men to come to aid..','Fourscore and seven years ago our fathers brought forth...','*']\n",
+ "\n",
+ "\n",
+ "loop=0\n",
+ "\n",
+ "while True:\n",
+ " letter=text[loop]\n",
+ " if letter=='*':\n",
+ " print \"\\nGood bye\"\n",
+ " break\n",
+ "\n",
+ " print '\\n',letter\n",
+ " letter=list(letter)\n",
+ " n=len(letter)\n",
+ "\n",
+ " for count in range(0,n):\n",
+ " letter[count]=letter[count].upper()\n",
+ "\n",
+ " letter=''.join(letter)\n",
+ " print letter\n",
+ " loop+=1\n",
+ " \n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Now is the time for all good men to come to aid..\n",
+ "NOW IS THE TIME FOR ALL GOOD MEN TO COME TO AID..\n",
+ "\n",
+ "Fourscore and seven years ago our fathers brought forth...\n",
+ "FOURSCORE AND SEVEN YEARS AGO OUR FATHERS BROUGHT FORTH...\n",
+ "\n",
+ "Good bye\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.20, Page number: 6.22<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "line=\"The White House. 1600 Pennsylvania Avenue. Washington. DC\"\n",
+ "line=list(line)\n",
+ "line2=[]\n",
+ "for count in line:\n",
+ " if (count>='0' and count<'9') or \\\n",
+ " (count>='a' and count<'z') or \\\n",
+ " (count>='A' and count<'Z'):\n",
+ "\n",
+ " line2.extend(chr(ord(count)+1))\n",
+ "\n",
+ " elif count=='9':\n",
+ " line2.extend('0')\n",
+ " elif count=='z':\n",
+ " line2.extend('a')\n",
+ " elif count=='Z':\n",
+ " line2.extend('A')\n",
+ " else:\n",
+ " line2.extend('.')\n",
+ "\n",
+ "line2=''.join(line2)\n",
+ "print line2\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uif.Xijuf.Ipvtf..2711.Qfootzmwbojb.Bwfovf..Xbtijohupo..ED\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.21, Page number: 6.23<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def main(p,r,n):\n",
+ " \n",
+ "\n",
+ " if p<0 or r<0 or n<0:\n",
+ " print \"ERROR! Wrong input\"\n",
+ " return\n",
+ " \n",
+ "\n",
+ " i=r/100.0\n",
+ " f=p*((i+1)**n)\n",
+ "\n",
+ " print \"The Final value (F) is %.2f\" %f\n",
+ "\n",
+ " return\n",
+ "main(1000,6,20)\n",
+ "main(5000,-7.5,12)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Final value (F) is 3207.14\n",
+ "ERROR! Wrong input\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.22, Page number: 6.25<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "def main(guess):\n",
+ " count=0\n",
+ " flag=True\n",
+ "\n",
+ " while flag:\n",
+ " count=count+1\n",
+ " if count==50:\n",
+ " flag=False\n",
+ "\n",
+ " test=10.-3.*guess*guess\n",
+ " if test>0:\n",
+ " root=test**.2\n",
+ " print \"Iteration number : %2d x= %7.5f\" %(count,root)\n",
+ " error=math.fabs(root-guess)\n",
+ " if error>0.00001:\n",
+ " guess=root\n",
+ " else:\n",
+ " flag=False\n",
+ " print \"\\n\\n root= %7.5f number of iterations %2d\" %(root,count)\n",
+ "\n",
+ " else:\n",
+ " flag=False\n",
+ " print \"number out of range... try another initial guess\"\n",
+ "\n",
+ "\n",
+ "\n",
+ " if count==50 and error>0.00001:\n",
+ " print \"convergence not obtained after 50 iterations\"\n",
+ " \n",
+ " return\n",
+ "\n",
+ "print \"initial guess: 1\"\n",
+ "main(1)\n",
+ "print \"\\ninitial guess: 10\"\n",
+ "main(10)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "initial guess: 1\n",
+ "Iteration number : 1 x= 1.47577\n",
+ "Iteration number : 2 x= 1.28225\n",
+ "Iteration number : 3 x= 1.38344\n",
+ "Iteration number : 4 x= 1.33613\n",
+ "Iteration number : 5 x= 1.35951\n",
+ "Iteration number : 6 x= 1.34826\n",
+ "Iteration number : 7 x= 1.35375\n",
+ "Iteration number : 8 x= 1.35109\n",
+ "Iteration number : 9 x= 1.35238\n",
+ "Iteration number : 10 x= 1.35175\n",
+ "Iteration number : 11 x= 1.35206\n",
+ "Iteration number : 12 x= 1.35191\n",
+ "Iteration number : 13 x= 1.35198\n",
+ "Iteration number : 14 x= 1.35195\n",
+ "Iteration number : 15 x= 1.35196\n",
+ "Iteration number : 16 x= 1.35195\n",
+ "\n",
+ "\n",
+ " root= 1.35195 number of iterations 16\n",
+ "\n",
+ "initial guess: 10\n",
+ "number out of range... try another initial guess\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.23, Page number: 6.30<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def main(ch):\n",
+ "\n",
+ " if ch=='r' or ch=='R':\n",
+ " print \"RED\"\n",
+ "\n",
+ " elif ch=='w' or ch=='W':\n",
+ " print \"WHITE\"\n",
+ "\n",
+ " elif ch=='b' or ch=='B':\n",
+ " print \"BLUE\"\n",
+ " \n",
+ " return\n",
+ "\n",
+ "main('r')\n",
+ "main('W')\n",
+ "main('b')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RED\n",
+ "WHITE\n",
+ "BLUE\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.24, Page number: 6.31<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def main(ch):\n",
+ " ch=ch.upper()\n",
+ "\n",
+ " if ch=='R':\n",
+ " print \"RED\"\n",
+ "\n",
+ " elif ch=='W':\n",
+ " print \"WHITE\"\n",
+ "\n",
+ " elif ch=='B':\n",
+ " print \"BLUE\"\n",
+ "\n",
+ " else:\n",
+ " print \"ERROR\"\n",
+ " \n",
+ " return\n",
+ "\n",
+ "main('r')\n",
+ "main('W')\n",
+ "main('b')\n",
+ "main('y')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RED\n",
+ "WHITE\n",
+ "BLUE\n",
+ "ERROR\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.25, Page number: 6.31<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "def main(x,flag):\n",
+ "\n",
+ " if flag==-1:\n",
+ " y=math.fabs(x)\n",
+ " elif flag==0:\n",
+ " y=x**0.5\n",
+ " elif flag==1:\n",
+ " y=x\n",
+ " elif flag==2 or flag==3:\n",
+ " y=2*(x-1)\n",
+ " else:\n",
+ " y=0\n",
+ " print \"y= \",y\n",
+ " \n",
+ " return\n",
+ "\n",
+ "main(36,-1)\n",
+ "main(36,0)\n",
+ "main(36,1)\n",
+ "main(36,2)\n",
+ "main(36,3)\n",
+ "main(36,5)\n",
+ "main(0,6)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "y= 36.0\n",
+ "y= 6.0\n",
+ "y= 36\n",
+ "y= 70\n",
+ "y= 70\n",
+ "y= 0\n",
+ "y= 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.26, Page number: 6.32<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "choice=0\n",
+ "\n",
+ "def main(choice,val,n):\n",
+ " \n",
+ " if choice==1:\n",
+ "\n",
+ " print \"Straight Line Method\\n\\n\"\n",
+ " val=float(val)\n",
+ " deprec=val/n\n",
+ " for year in range(1,n+1):\n",
+ " val=val-deprec\n",
+ " print \"End of year %2d Depreciation: %7.2f Current value: %8.2f\"\\\n",
+ " %(year,deprec,val)\n",
+ "\n",
+ "\n",
+ " elif choice==2:\n",
+ " print \"Double Declining Balance Method\\n\\n\"\n",
+ " val=float(val)\n",
+ " for year in range(1,n+1):\n",
+ " deprec=2*val/n\n",
+ " val=val-deprec\n",
+ " print \"End of year %2d Depreciation: %7.2f Current value: %8.2f\"\\\n",
+ " %(year,deprec,val)\n",
+ "\n",
+ " elif choice==3:\n",
+ " print \"Sum of the years' -Digit Method\\n\\n\"\n",
+ " val=float(val)\n",
+ " tag=val\n",
+ "\n",
+ " for year in range(1,n+1):\n",
+ " deprec=(n-year+1)*tag/(n*(n+1)/2)\n",
+ " val=val-deprec\n",
+ " print \"End of year %2d Depreciation: %7.2f Current value: %8.2f\"\\\n",
+ " %(year,deprec,val)\n",
+ "\n",
+ " else:\n",
+ " print \"incorrect data entry...\"\n",
+ "\n",
+ " return\n",
+ "\n",
+ "print \"\\n Method: (1-SSL 2-DDB 3-SYD) \"\n",
+ "print \"choice: 1 \\nval: 8000 \\nNumber of years: 10\"\n",
+ "main(1,8000,10)\n",
+ "print \"\\n Method: (1-SSL 2-DDB 3-SYD) \"\n",
+ "print \"choice: 2 \\nval: 8000 \\nNumber of years: 10\"\n",
+ "main(2,8000,10)\n",
+ "print \"\\n Method: (1-SSL 2-DDB 3-SYD) \"\n",
+ "print \"choice: 3 \\nval: 8000 \\nNumber of years: 10\"\n",
+ "main(3,8000,10)\n",
+ "print \"\\n Method: (1-SSL 2-DDB 3-SYD) \"\n",
+ "print \"choice: 5 \\nval: 8000 \\nNumber of years: 10\"\n",
+ "main(5,8000,10)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Method: (1-SSL 2-DDB 3-SYD) \n",
+ "choice: 1 \n",
+ "val: 8000 \n",
+ "Number of years: 10\n",
+ "Straight Line Method\n",
+ "\n",
+ "\n",
+ "End of year 1 Depreciation: 800.00 Current value: 7200.00\n",
+ "End of year 2 Depreciation: 800.00 Current value: 6400.00\n",
+ "End of year 3 Depreciation: 800.00 Current value: 5600.00\n",
+ "End of year 4 Depreciation: 800.00 Current value: 4800.00\n",
+ "End of year 5 Depreciation: 800.00 Current value: 4000.00\n",
+ "End of year 6 Depreciation: 800.00 Current value: 3200.00\n",
+ "End of year 7 Depreciation: 800.00 Current value: 2400.00\n",
+ "End of year 8 Depreciation: 800.00 Current value: 1600.00\n",
+ "End of year 9 Depreciation: 800.00 Current value: 800.00\n",
+ "End of year 10 Depreciation: 800.00 Current value: 0.00\n",
+ "\n",
+ " Method: (1-SSL 2-DDB 3-SYD) \n",
+ "choice: 2 \n",
+ "val: 8000 \n",
+ "Number of years: 10\n",
+ "Double Declining Balance Method\n",
+ "\n",
+ "\n",
+ "End of year 1 Depreciation: 1600.00 Current value: 6400.00\n",
+ "End of year 2 Depreciation: 1280.00 Current value: 5120.00\n",
+ "End of year 3 Depreciation: 1024.00 Current value: 4096.00\n",
+ "End of year 4 Depreciation: 819.20 Current value: 3276.80\n",
+ "End of year 5 Depreciation: 655.36 Current value: 2621.44\n",
+ "End of year 6 Depreciation: 524.29 Current value: 2097.15\n",
+ "End of year 7 Depreciation: 419.43 Current value: 1677.72\n",
+ "End of year 8 Depreciation: 335.54 Current value: 1342.18\n",
+ "End of year 9 Depreciation: 268.44 Current value: 1073.74\n",
+ "End of year 10 Depreciation: 214.75 Current value: 858.99\n",
+ "\n",
+ " Method: (1-SSL 2-DDB 3-SYD) \n",
+ "choice: 3 \n",
+ "val: 8000 \n",
+ "Number of years: 10\n",
+ "Sum of the years' -Digit Method\n",
+ "\n",
+ "\n",
+ "End of year 1 Depreciation: 1454.55 Current value: 6545.45\n",
+ "End of year 2 Depreciation: 1309.09 Current value: 5236.36\n",
+ "End of year 3 Depreciation: 1163.64 Current value: 4072.73\n",
+ "End of year 4 Depreciation: 1018.18 Current value: 3054.55\n",
+ "End of year 5 Depreciation: 872.73 Current value: 2181.82\n",
+ "End of year 6 Depreciation: 727.27 Current value: 1454.55\n",
+ "End of year 7 Depreciation: 581.82 Current value: 872.73\n",
+ "End of year 8 Depreciation: 436.36 Current value: 436.36\n",
+ "End of year 9 Depreciation: 290.91 Current value: 145.45\n",
+ "End of year 10 Depreciation: 145.45 Current value: 0.00\n",
+ "\n",
+ " Method: (1-SSL 2-DDB 3-SYD) \n",
+ "choice: 5 \n",
+ "val: 8000 \n",
+ "Number of years: 10\n",
+ "incorrect data entry...\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.31, Page number: 6.41<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "navg=0\n",
+ "Sum=0.0\n",
+ "n=6\n",
+ "\n",
+ "for count in range(-6,n+1):\n",
+ " x=count\n",
+ " if(x<0):\n",
+ " continue\n",
+ " Sum=Sum+x\n",
+ " navg=navg+1\n",
+ "\n",
+ "\n",
+ "average=Sum/navg\n",
+ "print \"The average is \",average\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average is 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.32, Page number: 6.42<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "def main(letter):\n",
+ " flag=True\n",
+ "\n",
+ " letter=list(letter)\n",
+ "\n",
+ " tag=len(letter)-1\n",
+ " countback=tag\n",
+ "\n",
+ " for count in range(0,(tag/2)+1):\n",
+ " if letter[count]!=letter[countback]:\n",
+ " flag=False\n",
+ " break\n",
+ " countback=countback-1\n",
+ "\n",
+ " letter=''.join(letter)\n",
+ " if flag:\n",
+ " print \"\\n %s IS a palindrome\" %letter\n",
+ " else:\n",
+ " print \"\\n %s is NOT a palindrome\" %letter\n",
+ " \n",
+ " return\n",
+ "\n",
+ "main('TOOT')\n",
+ "main('FALSE')\n",
+ "main('PULLUP')\n",
+ "main('ABLE WAS I ERE I SAW ELBA')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " TOOT IS a palindrome\n",
+ "\n",
+ " FALSE is NOT a palindrome\n",
+ "\n",
+ " PULLUP IS a palindrome\n",
+ "\n",
+ " ABLE WAS I ERE I SAW ELBA IS a palindrome\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.34, Page number: 6.47<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "text=['Now is the time for all good men to come to aid..','Fourscore and seven years ago our fathers brought forth.$$..','*']\n",
+ "\n",
+ "\n",
+ "loop,flag=0,False\n",
+ "\n",
+ "while True:\n",
+ " letter=text[loop]\n",
+ " if letter=='*' or flag:\n",
+ " print \"\\nGood bye\"\n",
+ " break\n",
+ "\n",
+ " print '\\n',letter\n",
+ " letter=list(letter)\n",
+ " n=len(letter)\n",
+ "\n",
+ " for count in range(0,n):\n",
+ " letter[count]=letter[count].upper()\n",
+ "\n",
+ " letter2=''.join(letter)\n",
+ " print letter2\n",
+ "\n",
+ " for count in range(0,n-1):\n",
+ " if letter[count]=='$' and letter[count+1]=='$':\n",
+ " print 'BREAK CONDITION DETECTED - TERMINATE EXECUTION'\n",
+ " flag=True\n",
+ " break\n",
+ " \n",
+ " loop+=1\n",
+ " \n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Now is the time for all good men to come to aid..\n",
+ "NOW IS THE TIME FOR ALL GOOD MEN TO COME TO AID..\n",
+ "\n",
+ "Fourscore and seven years ago our fathers brought forth.$$..\n",
+ "FOURSCORE AND SEVEN YEARS AGO OUR FATHERS BROUGHT FORTH.$$..\n",
+ "BREAK CONDITION DETECTED - TERMINATE EXECUTION\n",
+ "\n",
+ "Good bye\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter7.ipynb b/Programming_With_C/chapter7.ipynb
new file mode 100755
index 00000000..89247348
--- /dev/null
+++ b/Programming_With_C/chapter7.ipynb
@@ -0,0 +1,708 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 7: Functions<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.1, Page number: 7.2<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def lower_to_upper(c1):\n",
+ "\n",
+ " if c1>='a' and c1<='z':\n",
+ " c2=chr(ord('A')+ord(c1)-ord('a'))\n",
+ "\n",
+ " else:\n",
+ " c2=c1\n",
+ "\n",
+ " return c2\n",
+ "\n",
+ "lower='g'\n",
+ "upper=lower_to_upper(lower)\n",
+ "print \"the upper case equivalent is : \",upper\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the upper case equivalent is : G\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.3, Page number: 7.5<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def lower_to_upper(c1):\n",
+ "\n",
+ " if c1>='a' and c1<='z':\n",
+ " return (chr(ord('A')+ord(c1)-ord('a')))\n",
+ " else:\n",
+ " return c1\n",
+ "\n",
+ "lower='g'\n",
+ "upper=lower_to_upper(lower)\n",
+ "print \"The uppercase equivalent is : \",upper\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The uppercase equivalent is : G\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.4, Page number: 7.5<h3> "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def maximum(x,y):\n",
+ " if x>=y:\n",
+ " z=x\n",
+ " else:\n",
+ " z=y\n",
+ "\n",
+ " print \"Maximum value is : \",z\n",
+ "\n",
+ " return\n",
+ "\n",
+ "maximum(5,6)\n",
+ "maximum(6,5)\n",
+ "maximum(5,5)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value is : 6\n",
+ "Maximum value is : 6\n",
+ "Maximum value is : 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.5, Page number: 7.5<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def factorial(n):\n",
+ " prod=1\n",
+ " if n>1:\n",
+ " for i in range(2,n+1):\n",
+ " prod=prod*i\n",
+ "\n",
+ " return prod\n",
+ "\n",
+ "fact=factorial(6)\n",
+ "print \"Its factorial is : \",fact\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Its factorial is : 720\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.7, Page number: 7.7<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def maximum(x,y):\n",
+ "\n",
+ " if x>=y:\n",
+ " z=x\n",
+ " else:\n",
+ " z=y\n",
+ "\n",
+ " print 'Maximum value is = ',z\n",
+ " return\n",
+ "\n",
+ "maximum(5,9)\n",
+ "maximum(8,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value is = 9\n",
+ "Maximum value is = 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.9, Page number: 7.8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def maximum(x,y):\n",
+ " if x>=y:\n",
+ " z=x\n",
+ " else:\n",
+ " z=y\n",
+ "\n",
+ " return z\n",
+ "\n",
+ "a=5\n",
+ "b=4\n",
+ "c=7\n",
+ "\n",
+ "d=maximum(a,b)\n",
+ "print \"Maximum = \",maximum(c,d)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum = 7\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.10, Page number: 7.10<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def factorial(n):\n",
+ " prod=1\n",
+ " if n>1:\n",
+ " for i in range(2,n+1):\n",
+ " prod=prod*i\n",
+ "\n",
+ " return prod\n",
+ "\n",
+ "n=7\n",
+ "fact=factorial(n)\n",
+ "print \"Its factorial is : \",fact\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Its factorial is : 5040\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.11, Page number: 7.12<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "def play():\n",
+ " print \"Throwing the dice....\"\n",
+ " score1=throw()\n",
+ " print \"%2d\" %(score1)\n",
+ "\n",
+ " if score1==7 or score1==11:\n",
+ " print \"Congratulations!! you WIN on the first throw\"\n",
+ "\n",
+ " elif score1==2 or score1==3 or score1==12:\n",
+ " print \"sorry!! you LOSE on the first throw\"\n",
+ "\n",
+ " else:\n",
+ " while(True):\n",
+ " print \"Throwing the dice again...\"\n",
+ " score2=throw()\n",
+ " print \"%2d\" %(score2)\n",
+ " if score2==score1 or score2==7:\n",
+ " break\n",
+ "\n",
+ " if score2==score1:\n",
+ " print \"You WIN by matching your first score\"\n",
+ " else:\n",
+ " print \"You LOSE by failing to match your first score\"\n",
+ "\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "def throw():\n",
+ "\n",
+ " n1=random.randrange(1,7)\n",
+ " n2=random.randrange(1,7)\n",
+ " return n1+n2\n",
+ "\n",
+ "\n",
+ "import random\n",
+ "\n",
+ "\n",
+ "print \"Welcome to the Game of Craps \\n\\n\"\n",
+ "random.seed(2365)\n",
+ "play()\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Welcome to the Game of Craps \n",
+ "\n",
+ "\n",
+ "Throwing the dice....\n",
+ " 9\n",
+ "Throwing the dice again...\n",
+ " 4\n",
+ "Throwing the dice again...\n",
+ "11\n",
+ "Throwing the dice again...\n",
+ " 9\n",
+ "You WIN by matching your first score\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.12, Page number: 7.18<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def modify(a):\n",
+ " a=a*3\n",
+ " print \"a= %d (from the function, after being modified)\" %(a)\n",
+ " return\n",
+ "\n",
+ "a=2\n",
+ "print \"a=%d (from main, before calling the function)\" %(a)\n",
+ "modify(a)\n",
+ "print \"a=%d (from main, after calling the function)\" %(a)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a=2 (from main, before calling the function)\n",
+ "a= 6 (from the function, after being modified)\n",
+ "a=2 (from main, after calling the function)\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.13, Page number: 7.19<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def sl(val,n):\n",
+ " deprec=val/n\n",
+ " print \"in \",n\n",
+ " \n",
+ " for year in range(1,n+1):\n",
+ " val=val-deprec\n",
+ " writeoutput(year,deprec,val)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "def ddb(val,n):\n",
+ " for year in range(1,n+1):\n",
+ " deprec=2*val/n\n",
+ " val=val-deprec\n",
+ " writeoutput(year,deprec,val)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "def syd(val,n):\n",
+ " tag=val\n",
+ " for year in range(1,n+1):\n",
+ " deprec=(n-year+1)*tag/(n*(n+1)/2)\n",
+ " val=val-deprec\n",
+ " writeoutput(year,deprec,val)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "def writeoutput(year,depreciation,value):\n",
+ " print \"End of the year %2d Depreciation: %7.2f Current Value: %8.2f\" %(year,depreciation,value)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "\n",
+ "def main(choice,val,n):\n",
+ " \n",
+ " print \"Original value : \",val\n",
+ " val=float(val)\n",
+ " print \"Number of years : \",n\n",
+ "\n",
+ " if choice==1:\n",
+ " print \"Straight-Line Method\\n\\n\"\n",
+ " sl(val,n)\n",
+ " elif choice==2:\n",
+ " print \"Double-Declining-Balance Method \\n\\n\"\n",
+ " ddb(val,n)\n",
+ " elif choice==3:\n",
+ " print \"Sum-Of-The-Years'-Digits Method\"\n",
+ " syd(val,n)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "print \"\\n\\nMethod: (1-SL 2-DDB 3-SYD)\"\n",
+ "main(1,8000,10)\n",
+ "print \"\\n\\nMethod: (1-SL 2-DDB 3-SYD)\"\n",
+ "main(2,8000,10)\n",
+ "print \"\\n\\nMethod: (1-SL 2-DDB 3-SYD)\"\n",
+ "main(3,8000,10)\n",
+ "print \"\\n\\nMethod: (1-SL 2-DDB 3-SYD)\"\n",
+ "main(1,5000,4)\n",
+ "\n",
+ "\n",
+ " \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "Method: (1-SL 2-DDB 3-SYD)\n",
+ "Original value : 8000\n",
+ "Number of years : 10\n",
+ "Straight-Line Method\n",
+ "\n",
+ "\n",
+ "in 10\n",
+ "End of the year 1 Depreciation: 800.00 Current Value: 7200.00\n",
+ "End of the year 2 Depreciation: 800.00 Current Value: 6400.00\n",
+ "End of the year 3 Depreciation: 800.00 Current Value: 5600.00\n",
+ "End of the year 4 Depreciation: 800.00 Current Value: 4800.00\n",
+ "End of the year 5 Depreciation: 800.00 Current Value: 4000.00\n",
+ "End of the year 6 Depreciation: 800.00 Current Value: 3200.00\n",
+ "End of the year 7 Depreciation: 800.00 Current Value: 2400.00\n",
+ "End of the year 8 Depreciation: 800.00 Current Value: 1600.00\n",
+ "End of the year 9 Depreciation: 800.00 Current Value: 800.00\n",
+ "End of the year 10 Depreciation: 800.00 Current Value: 0.00\n",
+ "\n",
+ "\n",
+ "Method: (1-SL 2-DDB 3-SYD)\n",
+ "Original value : 8000\n",
+ "Number of years : 10\n",
+ "Double-Declining-Balance Method \n",
+ "\n",
+ "\n",
+ "End of the year 1 Depreciation: 1600.00 Current Value: 6400.00\n",
+ "End of the year 2 Depreciation: 1280.00 Current Value: 5120.00\n",
+ "End of the year 3 Depreciation: 1024.00 Current Value: 4096.00\n",
+ "End of the year 4 Depreciation: 819.20 Current Value: 3276.80\n",
+ "End of the year 5 Depreciation: 655.36 Current Value: 2621.44\n",
+ "End of the year 6 Depreciation: 524.29 Current Value: 2097.15\n",
+ "End of the year 7 Depreciation: 419.43 Current Value: 1677.72\n",
+ "End of the year 8 Depreciation: 335.54 Current Value: 1342.18\n",
+ "End of the year 9 Depreciation: 268.44 Current Value: 1073.74\n",
+ "End of the year 10 Depreciation: 214.75 Current Value: 858.99\n",
+ "\n",
+ "\n",
+ "Method: (1-SL 2-DDB 3-SYD)\n",
+ "Original value : 8000\n",
+ "Number of years : 10\n",
+ "Sum-Of-The-Years'-Digits Method\n",
+ "End of the year 1 Depreciation: 1454.55 Current Value: 6545.45\n",
+ "End of the year 2 Depreciation: 1309.09 Current Value: 5236.36\n",
+ "End of the year 3 Depreciation: 1163.64 Current Value: 4072.73\n",
+ "End of the year 4 Depreciation: 1018.18 Current Value: 3054.55\n",
+ "End of the year 5 Depreciation: 872.73 Current Value: 2181.82\n",
+ "End of the year 6 Depreciation: 727.27 Current Value: 1454.55\n",
+ "End of the year 7 Depreciation: 581.82 Current Value: 872.73\n",
+ "End of the year 8 Depreciation: 436.36 Current Value: 436.36\n",
+ "End of the year 9 Depreciation: 290.91 Current Value: 145.45\n",
+ "End of the year 10 Depreciation: 145.45 Current Value: 0.00\n",
+ "\n",
+ "\n",
+ "Method: (1-SL 2-DDB 3-SYD)\n",
+ "Original value : 5000\n",
+ "Number of years : 4\n",
+ "Straight-Line Method\n",
+ "\n",
+ "\n",
+ "in 4\n",
+ "End of the year 1 Depreciation: 1250.00 Current Value: 3750.00\n",
+ "End of the year 2 Depreciation: 1250.00 Current Value: 2500.00\n",
+ "End of the year 3 Depreciation: 1250.00 Current Value: 1250.00\n",
+ "End of the year 4 Depreciation: 1250.00 Current Value: 0.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.14, Page number: 7.24<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def factorial(n):\n",
+ "\n",
+ " if n<=1:\n",
+ " return 1\n",
+ "\n",
+ " else:\n",
+ " return (n*factorial(n-1))\n",
+ "\n",
+ "\n",
+ "n=10\n",
+ "fact=factorial(n)\n",
+ "print \"Its factorial is \",fact\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Its factorial is 3628800\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.15, Page number: 7.26<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def reverse(text,n):\n",
+ "\n",
+ " if n<0:\n",
+ " return\n",
+ " else:\n",
+ " print text[n],\n",
+ " reverse(text,n-1)\n",
+ "\n",
+ "\n",
+ "\n",
+ "text='Now is the time for all good men to come to tje aid of their country!'\n",
+ "n=len(text)\n",
+ "reverse(text,n-1)\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "! y r t n u o c r i e h t f o d i a e j t o t e m o c o t n e m d o o g l l a r o f e m i t e h t s i w o N\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.16, Page number: 7.16<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def transfer(n,From,to,temp):\n",
+ "\n",
+ " if n>0:\n",
+ " transfer(n-1,From,temp,to)\n",
+ " print \"Move disk %d from %c to %c\" %(n,From,to)\n",
+ " transfer(n-1,temp,to,From)\n",
+ "\n",
+ " return\n",
+ "\n",
+ "print \"Welcome to the TOWERS OF HANOI \\n\\n\"\n",
+ "transfer(3,'L','R','C')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Welcome to the TOWERS OF HANOI \n",
+ "\n",
+ "\n",
+ "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": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter8.ipynb b/Programming_With_C/chapter8.ipynb
new file mode 100755
index 00000000..e9a55558
--- /dev/null
+++ b/Programming_With_C/chapter8.ipynb
@@ -0,0 +1,555 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 8: Program Structure <h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.2, Page number: 8.2<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def factorial(n):\n",
+ "\t\n",
+ "\tprod=1\n",
+ "\tif n>1:\n",
+ "\t\t\n",
+ "\t\tfor i in xrange(2,n+1):\n",
+ "\t\t\tprod*=i\n",
+ "\t\t\n",
+ "\t\n",
+ "\treturn prod\n",
+ "\t\n",
+ "n=7\n",
+ "print 'n!=%d' %factorial(n)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n!=5040\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.3, Page number: 8.3<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def linecount(text):\n",
+ "\t\n",
+ "\treturn len(text)\n",
+ "\n",
+ "Sum=0\n",
+ "lines=['Now is the time for all good men','to come to the aid of their country.']\n",
+ "for i in lines:\n",
+ "\tSum+=linecount(i)\n",
+ "\n",
+ "count=len(lines)\n",
+ "count=float(count)\n",
+ "avg=Sum/count\n",
+ "\n",
+ "print 'Average numbers of characters per line: ',avg\n",
+ "\t\n",
+ "\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average numbers of characters per line: 34.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.4, Page number: 8.5<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "a,b,x1,y1,xr,yr,CNST=0,0,0,0,0,0,0.0001\n",
+ "\n",
+ "def reduce():\n",
+ "\n",
+ "\tglobal x1,xr,y1,yr,a,b\n",
+ "\t\n",
+ "\tx1 = a+0.5*(b-a-CNST)\n",
+ "\txr = x1 + CNST\n",
+ "\ty1 = curve(x1)\n",
+ "\tyr = curve(xr)\n",
+ "\t\n",
+ "\tif y1 > yr:\n",
+ "\t\tb = xr\n",
+ "\t\n",
+ "\telif y1 < yr:\n",
+ "\t\ta = x1\n",
+ "\t\t\n",
+ "\treturn\n",
+ "\n",
+ "def curve(x):\n",
+ "\t\n",
+ "\treturn x*math.cos(x)\n",
+ "\t\n",
+ "\t\n",
+ "a = 0\n",
+ "b = 3.141593\n",
+ "\n",
+ "while True:\n",
+ "\treduce()\n",
+ "\tif y1 == yr or b-a <= 3*CNST:\n",
+ "\t\tbreak\n",
+ "\t\t\n",
+ "\n",
+ "xmax = 0.5*(x1+xr)\n",
+ "ymax = curve(xmax)\n",
+ "print 'xmax = %8.6f ymax = %8.6f' %(xmax,ymax)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "xmax = 0.860394 ymax = 0.561096\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.5, Page number: 8.9<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def linecount(text):\n",
+ "\t\n",
+ "\tglobal Sum\n",
+ "\tSum += len(text)\n",
+ "\n",
+ "Sum=0\n",
+ "lines=['Now is the time for all good men','to come to the aid of their country.']\n",
+ "for i in lines:\n",
+ "\tlinecount(i)\n",
+ "\n",
+ "count=len(lines)\n",
+ "count=float(count)\n",
+ "avg=Sum/count\n",
+ "\n",
+ "print 'Average numbers of characters per line: ',avg\n",
+ "\t\n",
+ "\t\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average numbers of characters per line: 34.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.7, Page number: 8.12<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def fibonacci(count):\n",
+ "\t\n",
+ "\tif count<3:\n",
+ "\t\tf=1\n",
+ "\telse:\n",
+ "\t\tf = fibonacci.f1 + fibonacci.f2\n",
+ "\t\tfibonacci.f2 = fibonacci.f1\n",
+ "\t\tfibonacci.f1 = f\n",
+ "\t\t\n",
+ "\treturn f\n",
+ "\t\t\n",
+ "fibonacci.f1,fibonacci.f2=1,1\n",
+ "n=30\n",
+ "for count in range(1,n+1):\n",
+ "\t\n",
+ "\tprint 'i = %2d F = %d' %(count,fibonacci(count))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i = 1 F = 1\n",
+ "i = 2 F = 1\n",
+ "i = 3 F = 2\n",
+ "i = 4 F = 3\n",
+ "i = 5 F = 5\n",
+ "i = 6 F = 8\n",
+ "i = 7 F = 13\n",
+ "i = 8 F = 21\n",
+ "i = 9 F = 34\n",
+ "i = 10 F = 55\n",
+ "i = 11 F = 89\n",
+ "i = 12 F = 144\n",
+ "i = 13 F = 233\n",
+ "i = 14 F = 377\n",
+ "i = 15 F = 610\n",
+ "i = 16 F = 987\n",
+ "i = 17 F = 1597\n",
+ "i = 18 F = 2584\n",
+ "i = 19 F = 4181\n",
+ "i = 20 F = 6765\n",
+ "i = 21 F = 10946\n",
+ "i = 22 F = 17711\n",
+ "i = 23 F = 28657\n",
+ "i = 24 F = 46368\n",
+ "i = 25 F = 75025\n",
+ "i = 26 F = 121393\n",
+ "i = 27 F = 196418\n",
+ "i = 28 F = 317811\n",
+ "i = 29 F = 514229\n",
+ "i = 30 F = 832040\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.9, Page number: 8.18<h3> "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "def play():\n",
+ " print \"Throwing the dice....\"\n",
+ " score1=throw()\n",
+ " print \"%2d\" %(score1)\n",
+ "\n",
+ " if score1==7 or score1==11:\n",
+ " print \"Congratulations!! you WIN on the first throw\"\n",
+ "\n",
+ " elif score1==2 or score1==3 or score1==12:\n",
+ " print \"sorry!! you LOSE on the first throw\"\n",
+ "\n",
+ " else:\n",
+ " while(True):\n",
+ " print \"Throwing the dice again...\"\n",
+ " score2=throw()\n",
+ " print \"%2d\" %(score2)\n",
+ " if score2==score1 or score2==7:\n",
+ " break\n",
+ "\n",
+ " if score2==score1:\n",
+ " print \"You WIN by matching your first score\"\n",
+ " else:\n",
+ " print \"You LOSE by failing to match your first score\"\n",
+ "\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "def throw():\n",
+ "\n",
+ " n1=random.randrange(1,7)\n",
+ " n2=random.randrange(1,7)\n",
+ " return n1+n2\n",
+ "\n",
+ "\n",
+ "import random\n",
+ "\n",
+ "\n",
+ "print \"Welcome to the Game of Craps \\n\\n\"\n",
+ "random.seed(563)\n",
+ "play()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Welcome to the Game of Craps \n",
+ "\n",
+ "\n",
+ "Throwing the dice....\n",
+ "10\n",
+ "Throwing the dice again...\n",
+ " 3\n",
+ "Throwing the dice again...\n",
+ "12\n",
+ "Throwing the dice again...\n",
+ " 9\n",
+ "Throwing the dice again...\n",
+ " 7\n",
+ "You LOSE by failing to match your first score\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.11, Page Number: 8.21<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "a,b,x1,y1,xr,yr,CNST=0,0,0,0,0,0,0.0001\n",
+ "\n",
+ "def reduce():\n",
+ "\n",
+ "\tglobal x1,xr,y1,yr,a,b\n",
+ "\t\n",
+ "\tx1 = a+0.5*(b-a-CNST)\n",
+ "\txr = x1 + CNST\n",
+ "\ty1 = curve(x1)\n",
+ "\tyr = curve(xr)\n",
+ "\t\n",
+ "\tif y1 > yr:\n",
+ "\t\tb = xr\n",
+ "\t\n",
+ "\telif y1 < yr:\n",
+ "\t\ta = x1\n",
+ "\t\t\n",
+ "\treturn\n",
+ "\n",
+ "def curve(x):\n",
+ "\t\n",
+ "\treturn x*math.cos(x)\n",
+ "\t\n",
+ "\t\n",
+ "a = 0\n",
+ "b = 3.141593\n",
+ "\n",
+ "while True:\n",
+ "\treduce()\n",
+ "\tif y1 == yr or b-a <= 3*CNST:\n",
+ "\t\tbreak\n",
+ "\t\t\n",
+ "\n",
+ "xmax = 0.5*(x1+xr)\n",
+ "ymax = curve(xmax)\n",
+ "print 'xmax = %8.6f ymax = %8.6f' %(xmax,ymax)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "xmax = 0.860394 ymax = 0.561096\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3> Example 8.12, Page Number: 8.23<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def fibonacci(count):\n",
+ "\t\n",
+ "\tif count<3:\n",
+ "\t\tf=1\n",
+ "\telse:\n",
+ "\t\tf = fibonacci.f1 + fibonacci.f2\n",
+ "\t\tfibonacci.f2 = fibonacci.f1\n",
+ "\t\tfibonacci.f1 = f\n",
+ "\t\t\n",
+ "\treturn f\n",
+ "\t\t\n",
+ "fibonacci.f1,fibonacci.f2=1,1\n",
+ "n=40\n",
+ "for count in range(1,n+1):\n",
+ "\t\n",
+ "\tprint 'i = %2d F = %d' %(count,fibonacci(count))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i = 1 F = 1\n",
+ "i = 2 F = 1\n",
+ "i = 3 F = 2\n",
+ "i = 4 F = 3\n",
+ "i = 5 F = 5\n",
+ "i = 6 F = 8\n",
+ "i = 7 F = 13\n",
+ "i = 8 F = 21\n",
+ "i = 9 F = 34\n",
+ "i = 10 F = 55\n",
+ "i = 11 F = 89\n",
+ "i = 12 F = 144\n",
+ "i = 13 F = 233\n",
+ "i = 14 F = 377\n",
+ "i = 15 F = 610\n",
+ "i = 16 F = 987\n",
+ "i = 17 F = 1597\n",
+ "i = 18 F = 2584\n",
+ "i = 19 F = 4181\n",
+ "i = 20 F = 6765\n",
+ "i = 21 F = 10946\n",
+ "i = 22 F = 17711\n",
+ "i = 23 F = 28657\n",
+ "i = 24 F = 46368\n",
+ "i = 25 F = 75025\n",
+ "i = 26 F = 121393\n",
+ "i = 27 F = 196418\n",
+ "i = 28 F = 317811\n",
+ "i = 29 F = 514229\n",
+ "i = 30 F = 832040\n",
+ "i = 31 F = 1346269\n",
+ "i = 32 F = 2178309\n",
+ "i = 33 F = 3524578\n",
+ "i = 34 F = 5702887\n",
+ "i = 35 F = 9227465\n",
+ "i = 36 F = 14930352\n",
+ "i = 37 F = 24157817\n",
+ "i = 38 F = 39088169\n",
+ "i = 39 F = 63245986\n",
+ "i = 40 F = 102334155\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.13, Page Number: 8.25<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "p,r,n=10000,10,3\n",
+ "i=r/100.0\n",
+ "\n",
+ "f=p*math.pow(1+i,n)\n",
+ "print \"The final value (F) is: %.2f\" %f\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final value (F) is: 13310.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/chapter9.ipynb b/Programming_With_C/chapter9.ipynb
new file mode 100755
index 00000000..00db2e74
--- /dev/null
+++ b/Programming_With_C/chapter9.ipynb
@@ -0,0 +1,555 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 9: Arrays<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.2, Page number: 9.2<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "letter='heavenly feeling'\n",
+ "letter=list(letter)\n",
+ "\n",
+ "for count in letter:\n",
+ " print count.upper(),\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H E A V E N L Y F E E L I N G\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.8, Page number: 9.6<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "Sum=0.0\n",
+ "List=[]\n",
+ "n=5\n",
+ "for count in range(0,n):\n",
+ " x=count+1\n",
+ " print \"\\ni = %d x = %d\" %(count+1,x),\n",
+ " List.append(count)\n",
+ " Sum+=List[count]\n",
+ "\n",
+ "avg=Sum/n\n",
+ "print \"\\n\\nThe average is %5.2f\\n\\n\" %avg\n",
+ "for count in range(0,n):\n",
+ " d=List[count]-avg\n",
+ " print \"i=%d x=%5.2f d=%5.2f\" %(count+1,List[count],d)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "i = 1 x = 1 \n",
+ "i = 2 x = 2 \n",
+ "i = 3 x = 3 \n",
+ "i = 4 x = 4 \n",
+ "i = 5 x = 5 \n",
+ "\n",
+ "The average is 2.00\n",
+ "\n",
+ "\n",
+ "i=1 x= 0.00 d=-2.00\n",
+ "i=2 x= 1.00 d=-1.00\n",
+ "i=3 x= 2.00 d= 0.00\n",
+ "i=4 x= 3.00 d= 1.00\n",
+ "i=5 x= 4.00 d= 2.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.9, Page number: 9.8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "n=5\n",
+ "List=[3.0,-2.0,12.0,4.4,3.5]\n",
+ "Sum=0.0\n",
+ "\n",
+ "for count in range(0,n):\n",
+ " Sum+=List[count]\n",
+ "\n",
+ "avg=Sum/n\n",
+ "\n",
+ "print \"The average is %5.2f \\n\\n\" %avg\n",
+ "\n",
+ "for count in range(0,n):\n",
+ " d=List[count]-avg\n",
+ " print \"i=%d x=%5.2f d=%5.2f\\n\" %(count+1,List[count],d)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average is 4.18 \n",
+ "\n",
+ "\n",
+ "i=1 x= 3.00 d=-1.18\n",
+ "\n",
+ "i=2 x=-2.00 d=-6.18\n",
+ "\n",
+ "i=3 x=12.00 d= 7.82\n",
+ "\n",
+ "i=4 x= 4.40 d= 0.22\n",
+ "\n",
+ "i=5 x= 3.50 d=-0.68\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.11, Page number: 9.10<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def modify(a):\n",
+ " print \"From the function after modifying the values: \"\n",
+ "\n",
+ " for count in range(0,3):\n",
+ " a[count]=-9\n",
+ " print \"a[%d] = %d \" %(count,a[count])\n",
+ "\n",
+ " return\n",
+ "\n",
+ "a=[]\n",
+ "print \"From main, before calling the function: \"\n",
+ "for count in range(0,3):\n",
+ " a.append(count+1)\n",
+ " print \"a[%d] = %d \" %(count,a[count])\n",
+ "\n",
+ "modify(a)\n",
+ "print \"From the main, after calling the function: \"\n",
+ "for count in range(0,3):\n",
+ " print \"a[%d] = %d \" %(count,a[count])\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From main, before calling the function: \n",
+ "a[0] = 1 \n",
+ "a[1] = 2 \n",
+ "a[2] = 3 \n",
+ "From the function after modifying the values: \n",
+ "a[0] = -9 \n",
+ "a[1] = -9 \n",
+ "a[2] = -9 \n",
+ "From the main, after calling the function: \n",
+ "a[0] = -9 \n",
+ "a[1] = -9 \n",
+ "a[2] = -9 \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.12, Page number: 9.12<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "a=1\n",
+ "def modify(b,c):\n",
+ "\n",
+ " print \"From the function, after modifying the value : \"\n",
+ " global a\n",
+ " a=-999\n",
+ " b=-999\n",
+ " print \"a = %d b = %d\" %(a,b)\n",
+ " for count in range(0,3):\n",
+ " c[count]=-9\n",
+ " print \"c[%d] = %d\" %(count,c[count])\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "\n",
+ "b=2\n",
+ "c=[]\n",
+ "\n",
+ "print \"From main, before calling the function: \"\n",
+ "print \"a = %d b = %d\" %(a,b)\n",
+ "\n",
+ "for count in range(0,3):\n",
+ " c.append(10*(count+1))\n",
+ " print \"c[%d] = %d\" %(count,c[count])\n",
+ "\n",
+ "modify(b,c)\n",
+ "print \"From main, after calling the function:\"\n",
+ "print \"a = %d b = %d\" %(a,b)\n",
+ "\n",
+ "for count in range(0,3):\n",
+ " print \"c[%d] = %d\" %(count,c[count])\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From main, before calling the function: \n",
+ "a = 1 b = 2\n",
+ "c[0] = 10\n",
+ "c[1] = 20\n",
+ "c[2] = 30\n",
+ "From the function, after modifying the value : \n",
+ "a = -999 b = -999\n",
+ "c[0] = -9\n",
+ "c[1] = -9\n",
+ "c[2] = -9\n",
+ "From main, after calling the function:\n",
+ "a = -999 b = 2\n",
+ "c[0] = -9\n",
+ "c[1] = -9\n",
+ "c[2] = -9\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.13, Page number: 9.13<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "def reorder(n,x):\n",
+ " for item in range(0,n-1):\n",
+ " for i in range(item+1,n):\n",
+ " if x[i]<x[item]:\n",
+ " temp=x[item]\n",
+ " x[item]=x[i]\n",
+ " x[i]=temp\n",
+ "\n",
+ " return\n",
+ "\n",
+ "x=[]\n",
+ "n=10\n",
+ "print\n",
+ "\n",
+ "for i in range(0,n):\n",
+ " inp=i+1\n",
+ " print \"\\ni = %d x = %d\" %(i+1,inp),\n",
+ " x.append(inp)\n",
+ "\n",
+ "reorder(n,x)\n",
+ "\n",
+ "print \"\\n\\nReordered list of numbers: \\n\"\n",
+ "\n",
+ "for i in range(0,n):\n",
+ " print \"i = %d x = %d\" %(i+1,x[i])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "i = 1 x = 1 \n",
+ "i = 2 x = 2 \n",
+ "i = 3 x = 3 \n",
+ "i = 4 x = 4 \n",
+ "i = 5 x = 5 \n",
+ "i = 6 x = 6 \n",
+ "i = 7 x = 7 \n",
+ "i = 8 x = 8 \n",
+ "i = 9 x = 9 \n",
+ "i = 10 x = 10 \n",
+ "\n",
+ "Reordered list of numbers: \n",
+ "\n",
+ "i = 1 x = 1\n",
+ "i = 2 x = 2\n",
+ "i = 3 x = 3\n",
+ "i = 4 x = 4\n",
+ "i = 5 x = 5\n",
+ "i = 6 x = 6\n",
+ "i = 7 x = 7\n",
+ "i = 8 x = 8\n",
+ "i = 9 x = 9\n",
+ "i = 10 x = 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.14, Page number: 9.16<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "def countwords(english):\n",
+ " words=1\n",
+ " for count in range(0,len(english)-1):\n",
+ " if english[count]==' ' and english[count+1]!=' ':\n",
+ " words+=1\n",
+ " \n",
+ " return words\n",
+ "\n",
+ "def convert(words,english,piglatin):\n",
+ " m1=0\n",
+ " for n in range(1,words+1):\n",
+ " count=m1\n",
+ " while english[count]!=' ':\n",
+ " m2=count\n",
+ " count+=1\n",
+ "\n",
+ " for count in range(m1,m2):\n",
+ " piglatin.append(english[count+1])\n",
+ " piglatin.append(english[m1])\n",
+ " piglatin.append('a')\n",
+ " piglatin.append(' ')\n",
+ "\n",
+ " m1=m2+2\n",
+ "\n",
+ " return\n",
+ "\n",
+ "def writeoutput(piglatin):\n",
+ " piglatin=''.join(piglatin)\n",
+ " print piglatin\n",
+ " return\n",
+ "\n",
+ "def main(english):\n",
+ " english=list(english)\n",
+ " piglatin=[]\n",
+ " english.append(' ')\n",
+ "\n",
+ " words=countwords(english)\n",
+ " convert(words,english,piglatin)\n",
+ " writeoutput(piglatin)\n",
+ " \n",
+ " return\n",
+ "\n",
+ "print '\\nC is a popular structured programming language'\n",
+ "main('C is a popular structured programming language')\n",
+ "print '\\nbaseball is the great American pastime.'\n",
+ "main('baseball is the great American pastime.')\n",
+ "print '\\nthough there are many who prefer football'\n",
+ "main('though there are many who prefer football')\n",
+ "print '\\nplease do not sneeza in the computer room'\n",
+ "main('please do not sneeza in the computer room')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "C is a popular structured programming language\n",
+ "Ca sia aa opularpa tructuredsa rogrammingpa anguagela \n",
+ "\n",
+ "baseball is the great American pastime.\n",
+ "aseballba sia heta reatga mericanAa astime.pa \n",
+ "\n",
+ "though there are many who prefer football\n",
+ "houghta hereta reaa anyma howa referpa ootballfa \n",
+ "\n",
+ "please do not sneeza in the computer room\n",
+ "leasepa oda otna neezasa nia heta omputerca oomra \n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.19, Page number: 9.26<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "def readinput(m,n,i=0):\n",
+ "\n",
+ " at=[]\n",
+ " for row in range(0,m):\n",
+ " temp=[]\n",
+ " for col in range(0,n):\n",
+ " t=i\n",
+ " i+=1\n",
+ " temp.append(t)\n",
+ " at.append(temp)\n",
+ "\n",
+ "\n",
+ " return at\n",
+ " \n",
+ "def computesum(a,b,m,n):\n",
+ "\n",
+ " c=[]\n",
+ "\n",
+ " for row in range(0,m):\n",
+ " temp=[]\n",
+ " for col in range(0,n):\n",
+ " t=a[row][col]+b[row][col]\n",
+ " temp.append(t)\n",
+ " c.append(temp)\n",
+ "\n",
+ " return c\n",
+ "\n",
+ "def writeoutput(c,m,n):\n",
+ "\n",
+ " for row in range(0,m):\n",
+ " for col in range(0,n):\n",
+ " print \"%4d\" %(c[row][col]),\n",
+ " print\n",
+ "\n",
+ " return\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n FIRST TABLE : \\n\"\n",
+ "a=readinput(5,5,1)\n",
+ "writeoutput(a,5,5)\n",
+ "\n",
+ "print \"\\n SECOND TABLE : \\n\"\n",
+ "b=readinput(5,5,50)\n",
+ "writeoutput(b,5,5)\n",
+ "\n",
+ "c=computesum(a,b,5,5)\n",
+ "print \"Sums of the elements : \\n\"\n",
+ "writeoutput(c,5,5)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " FIRST TABLE : \n",
+ "\n",
+ " 1 2 3 4 5\n",
+ " 6 7 8 9 10\n",
+ " 11 12 13 14 15\n",
+ " 16 17 18 19 20\n",
+ " 21 22 23 24 25\n",
+ "\n",
+ " SECOND TABLE : \n",
+ "\n",
+ " 50 51 52 53 54\n",
+ " 55 56 57 58 59\n",
+ " 60 61 62 63 64\n",
+ " 65 66 67 68 69\n",
+ " 70 71 72 73 74\n",
+ "Sums of the elements : \n",
+ "\n",
+ " 51 53 55 57 59\n",
+ " 61 63 65 67 69\n",
+ " 71 73 75 77 79\n",
+ " 81 83 85 87 89\n",
+ " 91 93 95 97 99\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_With_C/screenshots/Untitled1.png b/Programming_With_C/screenshots/Untitled1.png
new file mode 100755
index 00000000..99318d7d
--- /dev/null
+++ b/Programming_With_C/screenshots/Untitled1.png
Binary files differ
diff --git a/Programming_With_C/screenshots/Untitled2.png b/Programming_With_C/screenshots/Untitled2.png
new file mode 100755
index 00000000..f39082e3
--- /dev/null
+++ b/Programming_With_C/screenshots/Untitled2.png
Binary files differ
diff --git a/Programming_With_C/screenshots/Untitled3.png b/Programming_With_C/screenshots/Untitled3.png
new file mode 100755
index 00000000..1b33e38c
--- /dev/null
+++ b/Programming_With_C/screenshots/Untitled3.png
Binary files differ
diff --git a/Programming_in_C/Chapter_03.ipynb b/Programming_in_C/Chapter_03.ipynb
index 30f0abae..30f0abae 100644..100755
--- a/Programming_in_C/Chapter_03.ipynb
+++ b/Programming_in_C/Chapter_03.ipynb
diff --git a/Programming_in_C/Chapter_04.ipynb b/Programming_in_C/Chapter_04.ipynb
index 43a3ac6c..43a3ac6c 100644..100755
--- a/Programming_in_C/Chapter_04.ipynb
+++ b/Programming_in_C/Chapter_04.ipynb
diff --git a/Programming_in_C/Chapter_05.ipynb b/Programming_in_C/Chapter_05.ipynb
index 588cb6d1..588cb6d1 100644..100755
--- a/Programming_in_C/Chapter_05.ipynb
+++ b/Programming_in_C/Chapter_05.ipynb
diff --git a/Programming_in_C/Chapter_06.ipynb b/Programming_in_C/Chapter_06.ipynb
index ef1fef64..ef1fef64 100644..100755
--- a/Programming_in_C/Chapter_06.ipynb
+++ b/Programming_in_C/Chapter_06.ipynb
diff --git a/Programming_in_C/Chapter_07.ipynb b/Programming_in_C/Chapter_07.ipynb
index 7c0f6329..7c0f6329 100644..100755
--- a/Programming_in_C/Chapter_07.ipynb
+++ b/Programming_in_C/Chapter_07.ipynb
diff --git a/Programming_in_C/Chapter_08.ipynb b/Programming_in_C/Chapter_08.ipynb
index f8d5211b..f8d5211b 100644..100755
--- a/Programming_in_C/Chapter_08.ipynb
+++ b/Programming_in_C/Chapter_08.ipynb
diff --git a/Programming_in_C/Chapter_09.ipynb b/Programming_in_C/Chapter_09.ipynb
index 56b0b95f..56b0b95f 100644..100755
--- a/Programming_in_C/Chapter_09.ipynb
+++ b/Programming_in_C/Chapter_09.ipynb
diff --git a/Programming_in_C/Chapter_10.ipynb b/Programming_in_C/Chapter_10.ipynb
index 0486f4f9..0486f4f9 100644..100755
--- a/Programming_in_C/Chapter_10.ipynb
+++ b/Programming_in_C/Chapter_10.ipynb
diff --git a/Programming_in_C/Chapter_11.ipynb b/Programming_in_C/Chapter_11.ipynb
index 76ced362..76ced362 100644..100755
--- a/Programming_in_C/Chapter_11.ipynb
+++ b/Programming_in_C/Chapter_11.ipynb
diff --git a/Programming_in_C/Chapter_12.ipynb b/Programming_in_C/Chapter_12.ipynb
index a19ac40d..a19ac40d 100644..100755
--- a/Programming_in_C/Chapter_12.ipynb
+++ b/Programming_in_C/Chapter_12.ipynb
diff --git a/Programming_in_C/Chapter_13.ipynb b/Programming_in_C/Chapter_13.ipynb
index 6d75e6fa..6d75e6fa 100644..100755
--- a/Programming_in_C/Chapter_13.ipynb
+++ b/Programming_in_C/Chapter_13.ipynb
diff --git a/Programming_in_C/Chapter_14.ipynb b/Programming_in_C/Chapter_14.ipynb
index d67dd4c7..d67dd4c7 100644..100755
--- a/Programming_in_C/Chapter_14.ipynb
+++ b/Programming_in_C/Chapter_14.ipynb
diff --git a/Programming_in_C/Chapter_16.ipynb b/Programming_in_C/Chapter_16.ipynb
index 2b519af8..2b519af8 100644..100755
--- a/Programming_in_C/Chapter_16.ipynb
+++ b/Programming_in_C/Chapter_16.ipynb
diff --git a/Programming_in_C/Chapter_17.ipynb b/Programming_in_C/Chapter_17.ipynb
index c854a59b..c854a59b 100644..100755
--- a/Programming_in_C/Chapter_17.ipynb
+++ b/Programming_in_C/Chapter_17.ipynb
diff --git a/Programming_in_C/Chapter_18.ipynb b/Programming_in_C/Chapter_18.ipynb
index 86358365..86358365 100644..100755
--- a/Programming_in_C/Chapter_18.ipynb
+++ b/Programming_in_C/Chapter_18.ipynb
diff --git a/Programming_in_C/Chapter_19.ipynb b/Programming_in_C/Chapter_19.ipynb
index 731d6d87..731d6d87 100644..100755
--- a/Programming_in_C/Chapter_19.ipynb
+++ b/Programming_in_C/Chapter_19.ipynb
diff --git a/Programming_in_C/README.txt b/Programming_in_C/README.txt
index 0f721b5b..0f721b5b 100644..100755
--- a/Programming_in_C/README.txt
+++ b/Programming_in_C/README.txt
diff --git a/Programming_in_C/screenshots/nalin-1.png b/Programming_in_C/screenshots/nalin-1.png
index 83b0e0a3..83b0e0a3 100644..100755
--- a/Programming_in_C/screenshots/nalin-1.png
+++ b/Programming_in_C/screenshots/nalin-1.png
Binary files differ
diff --git a/Programming_in_C/screenshots/nalin-2.png b/Programming_in_C/screenshots/nalin-2.png
index 44dceb57..44dceb57 100644..100755
--- a/Programming_in_C/screenshots/nalin-2.png
+++ b/Programming_in_C/screenshots/nalin-2.png
Binary files differ
diff --git a/Programming_in_C/screenshots/nalin-3.png b/Programming_in_C/screenshots/nalin-3.png
index 74db9f60..74db9f60 100644..100755
--- a/Programming_in_C/screenshots/nalin-3.png
+++ b/Programming_in_C/screenshots/nalin-3.png
Binary files differ
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter10.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter10.ipynb
new file mode 100755
index 00000000..68503d70
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter10.ipynb
@@ -0,0 +1,2940 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 10: Functions<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.1, Page number: 320<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#user defined function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 1\n",
+ "y = 2\n",
+ "\n",
+ "#Function definition\n",
+ "def add(a,b):\n",
+ " return a+b\n",
+ "\n",
+ "#Function call\n",
+ "z = add(x,y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"z = %d\"%(z))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "z = 3"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.2, Page number: 321<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call user-defined function at different places.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definitions\n",
+ "def y():\n",
+ " sys.stdout.write(\" Y\")\n",
+ " return\n",
+ "\n",
+ "def a():\n",
+ " sys.stdout.write(\" A\")\n",
+ " y()\n",
+ " return\n",
+ "\n",
+ "def b():\n",
+ " sys.stdout.write(\" B\")\n",
+ " a()\n",
+ " return\n",
+ "\n",
+ "def c():\n",
+ " a()\n",
+ " b()\n",
+ " sys.stdout.write(\" C\")\n",
+ " return\n",
+ "\n",
+ "def d():\n",
+ " sys.stdout.write(\" D\")\n",
+ " c()\n",
+ " b()\n",
+ " a()\n",
+ " return\n",
+ "\n",
+ "#Function calls\n",
+ "y()\n",
+ "a()\n",
+ "b()\n",
+ "c()\n",
+ "d()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Y A Y B A Y A Y B A Y C D A Y B A Y C B A Y A Y"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.3, Page number: 323<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Using similar variable names in different functions.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def fun():\n",
+ " b = 20\n",
+ " c = 10\n",
+ " sys.stdout.write(\"\\nIn fun() B = %d C = %d\"%(b,c))\n",
+ " return\n",
+ "\n",
+ "#Variable Initialization\n",
+ "b = 10\n",
+ "c = 5\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nIn main() B = %d C = %d\"%(b,c))\n",
+ "fun()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In main() B = 10 C = 5\n",
+ "In fun() B = 20 C = 10"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.4, Page number: 323<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Global variables on different functions.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Global Variable Initialization\n",
+ "b = 10\n",
+ "c = 5\n",
+ "\n",
+ "def fun():\n",
+ " global b \n",
+ " b += 1\n",
+ " global c \n",
+ " c -= 1\n",
+ " sys.stdout.write(\"\\nIn fun() B = %d C = %d\"%(b,c))\n",
+ " return\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nIn main() B = %d C = %d\"%(b,c))\n",
+ "fun()\n",
+ "b += 1\n",
+ "c -= 1\n",
+ "sys.stdout.write(\"\\nAgain In main() B = %d C = %d\"%(b,c))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In main() B = 10 C = 5\n",
+ "In fun() B = 11 C = 4\n",
+ "Again In main() B = 12 C = 3"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.5, Page number: 325<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Using return statement in different ways\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def pass1(a):\n",
+ " if a == 0:\n",
+ " return;\n",
+ " else:\n",
+ " return a*a*a\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter value of x : \"))\n",
+ "\n",
+ "#Function call & Result\n",
+ "if x != 1 or x > 0:\n",
+ " y = pass1(x)\n",
+ "\n",
+ "#There is no switch statement in python, so if..else statement\n",
+ "if y == 1:\n",
+ " sys.stdout.write(\"The value returned is %d\"%(y))\n",
+ "else:\n",
+ " sys.stdout.write(\"The Cube of %d is : %d\"%(x,y))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of x : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Cube of 5 is : 125"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.6, Page number: 327<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display message using user defined function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def message():\n",
+ " sys.stdout.write(\"Have a nice day\")\n",
+ "\n",
+ "#function call\n",
+ "message()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Have a nice day"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.7, Page number: 328<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display Alphabets 'A','B' and 'C' using functions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Functions definitions\n",
+ "def a():\n",
+ " sys.stdout.write(\"\\nA\")\n",
+ " \n",
+ "def b():\n",
+ " sys.stdout.write(\" B\")\n",
+ " \n",
+ "def c():\n",
+ " sys.stdout.write(\" C\")\n",
+ " \n",
+ "#Function call\n",
+ "a()\n",
+ "b()\n",
+ "c()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "A B C"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.8, Page number: 329<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Send value to user defined function and display results\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def dat(x,y,z):\n",
+ " sys.stdout.write(\"Date = %d/%d/%d\"%(x,y,z))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "d = int(raw_input(\"Enter date dd/mm/yy\"))\n",
+ "m = int(raw_input(\"Enter date dd/mm/yy\"))\n",
+ "y = int(raw_input(\"Enter date dd/mm/yy\"))\n",
+ "\n",
+ "#function call & Result\n",
+ "dat(d,m,y)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter date dd/mm/yy12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter date dd/mm/yy12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter date dd/mm/yy2001\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Date = 12/12/2001"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.9, Page number: 330<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Square of number using user defined function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#function definition\n",
+ "def sqr(k):\n",
+ " sys.stdout.write(\"\\n%d\"%(k*k))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "j = 0\n",
+ "\n",
+ "#Function call & Result\n",
+ "for j in range(1,5):\n",
+ " sqr(j)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "1\n",
+ "4\n",
+ "9\n",
+ "16"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.10, Page number: 330<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pass the value to main() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no main function in python\n",
+ "sys.stdout.write(\"\\nNumber of command line arguments J = %d\"%(len(sys.argv)))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Number of command line arguments J = 6"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.11, Page number: 331<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pass and return values to user defined function. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definitions\n",
+ "def dat(x,y,z):\n",
+ " sys.stdout.write(\"\\nToday = %d/%d/%d\"%(x,y,z))\n",
+ " x += 1\n",
+ " return x\n",
+ "\n",
+ "#Variable Initialization\n",
+ "d = int(raw_input(\"Enter Date dd/mm/yy : \"))\n",
+ "m = int(raw_input(\"Enter Date dd/mm/yy : \"))\n",
+ "y = int(raw_input(\"Enter Date dd/mm/yy : \"))\n",
+ "\n",
+ "#Function call\n",
+ "t = dat(d,m,y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nTomorrow = %d/%d/%d\"%(t,m,y))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Date dd/mm/yy : 12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Date dd/mm/yy : 12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Date dd/mm/yy : 2001\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Today = 12/12/2001\n",
+ "Tomorrow = 13/12/2001"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.12, Page number: 332<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Send and recieve values to user defined function \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def sum1(x,y,z):\n",
+ " return x+y+z\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "b = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "c = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "\n",
+ "#Function call\n",
+ "s = sum1(a,b,c)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Sum = %d\"%(s))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sum = 16"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.13, Page number: 333<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Recieve values from user defined function without passing any \n",
+ "#value through main().\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def sum1():\n",
+ " x = int(raw_input(\"Enter Three Numbers : \"))\n",
+ " y = int(raw_input(\"Enter Three Numbers : \"))\n",
+ " z = int(raw_input(\"Enter Three Numbers : \"))\n",
+ " return x+y+z\n",
+ "\n",
+ "#Function call\n",
+ "s = sum1()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Sum = %d\"%(s))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sum = 12"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.14, Page number: 333<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Return value in the form of address.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def sum1():\n",
+ " x = int(raw_input(\"Enter Three Values : \"))\n",
+ " y = int(raw_input(\"Enter Three Values : \"))\n",
+ " z = int(raw_input(\"Enter Three Values : \"))\n",
+ " k = x + y + z\n",
+ " return k\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "\n",
+ "#Function call\n",
+ "s = sum1()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Sum = %d\"%(s))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Values : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Values : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Values : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sum = 12"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.15, Page number: 334<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call by value\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def change(a,b):\n",
+ " k = a\n",
+ " a = b\n",
+ " b = k\n",
+ " sys.stdout.write(\"\\nIn Change() X = %d Y = %d\"%(a,b))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter Values of X & Y : \"))\n",
+ "y = int(raw_input(\"Enter Values of X & Y : \"))\n",
+ "\n",
+ "#Function call\n",
+ "change(x,y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nIn main() X = %d Y = %d\"%(x,y))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values of X & Y : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values of X & Y : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In Change() X = 4 Y = 5\n",
+ "In main() X = 5 Y = 4"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.16, Page number: 335<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call by reference \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def change(a,b):\n",
+ " k = a\n",
+ " a = b\n",
+ " b = k\n",
+ " sys.stdout.write(\"\\nIn Change() X = %d Y = %d\"%(a,b))\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter Values of X & Y : \"))\n",
+ "y = int(raw_input(\"Enter Values of X & Y : \"))\n",
+ "\n",
+ "#Function call\n",
+ "change(x,y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nIn main() X = %d Y = %d\"%(y,x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values of X & Y : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values of X & Y : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In Change() X = 4 Y = 5\n",
+ "In main() X = 4 Y = 5"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.17, Page number: 336<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Return by reference\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def change(a,b):\n",
+ " c = a + b\n",
+ " d = a - b\n",
+ " return c,d\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter Values of X & Y : \"))\n",
+ "y = int(raw_input(\"Enter Values of X & Y : \"))\n",
+ "\n",
+ "#Function call\n",
+ "add,sub = change(x,y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAddition : %d\"%(add))\n",
+ "sys.stdout.write(\"\\nSubtraction : %d\"%(sub))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values of X & Y : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values of X & Y : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Addition : 9\n",
+ "Subtraction : 1"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.18, Page number: 337<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call by value and reference\n",
+ "\n",
+ "k = 0\n",
+ "m = 0\n",
+ "\n",
+ "#Function Definition\n",
+ "def other(k,m):\n",
+ " sys.stdout.write(\"\\nAddress of k & m in other() : %u %u\"%(id(k),id(m)))\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAddress of k & m in main() : %u %u\"%(id(k),id(m)))\n",
+ "\n",
+ "#Function call\n",
+ "other(k,m)\n",
+ "\n",
+ "#there is no pointer concept in python and it uses value tagged method in data storage\n",
+ "#instead of addressing the memory location, values of same variables are tagged together"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of k & m in main() : 30922996 30922996\n",
+ "Address of k & m in other() : 30922996 30922996"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.19, Page number: 338<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#User defined function as an argument to another function.\n",
+ "\n",
+ "#Variable Initialization\n",
+ "y = 2\n",
+ "\n",
+ "#Function Definitions\n",
+ "def double(m):\n",
+ " return m*2\n",
+ "\n",
+ "def square(k):\n",
+ " return k*k\n",
+ "\n",
+ "#Function call\n",
+ "x = double(square(y))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"x = %d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x = 8"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.20, Page number: 338<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Two functions as arguments for another functions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definitions\n",
+ "def x(a,b):\n",
+ " return abs(a-b)\n",
+ "\n",
+ "def y():\n",
+ " y = int(raw_input(\"Enter First Number : \"))\n",
+ " return y\n",
+ "\n",
+ "def z():\n",
+ " z = int(raw_input(\"Enter Second Number : \"))\n",
+ " return z\n",
+ "\n",
+ "#Function call\n",
+ "d = x(y(),z())\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nz() - y() = %d\"%(d))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter First Number : 25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Second Number : 50\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "z() - y() = 25"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.21, Page number: 339<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Return only absolute value like abs() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def uabs(y):\n",
+ " if y < 0:\n",
+ " return y * -1\n",
+ " else:\n",
+ " return y\n",
+ " \n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter a Negative Value : \"))\n",
+ "\n",
+ "#Function call\n",
+ "x = uabs(x)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nX = %d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Negative Value : -5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "X = 5"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.22, Page number: 340<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Square and cube of an entered number. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definitions\n",
+ "def input1(): #Since input() is a built in function in python, input1() is used\n",
+ " k = int(raw_input(\"Number : \"))\n",
+ " return k\n",
+ "\n",
+ "def sqr(m):\n",
+ " sys.stdout.write(\"\\nSquare : %d\"%(m*m))\n",
+ " return m\n",
+ "\n",
+ "def cube(m):\n",
+ " return m*m*m\n",
+ "\n",
+ "#Function call and Result\n",
+ "sys.stdout.write(\"\\nCube : %d\"%(cube(sqr(input1()))))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number : 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Square : 4\n",
+ "Cube : 8"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.23, Page number: 341<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Assign return value of a function to variable.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def input1():\n",
+ " k = int(raw_input(\"Enter Value of x = \"))\n",
+ " return k\n",
+ "\n",
+ "#Function call\n",
+ "x = input1()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nx = %d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of x = 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "x = 5"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.24, Page number: 342<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Addition and subtraction of numbers with return value of function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def input1():\n",
+ " k = int(raw_input(\"Enter Value of x = \"))\n",
+ " return k\n",
+ "\n",
+ "def sqr(m):\n",
+ " return pow(m,2)\n",
+ "\n",
+ "#Function call\n",
+ "x = sqr(1 - input1() + 1)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSquare = %d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of x = 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Square = 9"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.25, Page number: 343<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Multiplication and division of numbers with return value of function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def input1():\n",
+ " k = int(raw_input(\"Enter Value of x = \"))\n",
+ " return k\n",
+ "\n",
+ "def sqr(m):\n",
+ " return pow(m,2)\n",
+ "\n",
+ "#Function call\n",
+ "x = sqr(5 * input1()/2)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSquare = %d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of x = 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Square = 144"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.26, Page number: 344<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ++ operator with return value of function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def input1():\n",
+ " k = int(raw_input(\"Enter Value of x = \"))\n",
+ " return k\n",
+ "\n",
+ "def sqr(m):\n",
+ " return pow(m,2)\n",
+ "\n",
+ "#Function call\n",
+ "#There is no ++ operator in python. so += operator is used\n",
+ "y = input1()\n",
+ "y += 1\n",
+ "x = sqr(y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSquare = %d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of x = 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Square = 64"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.27, Page number: 345<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use mod(%) with function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def j():\n",
+ " x = int(raw_input(\"Enter a Number : \"))\n",
+ " return x\n",
+ " \n",
+ "#Function call & Result\n",
+ "if j() %2 == 0:\n",
+ " sys.stdout.write(\"\\nNumber is Even.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nNumber is Odd.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Number is Odd."
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.28, Page number: 346<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Conditional operator(?) with function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definitions\n",
+ "def sqr(x):\n",
+ " sys.stdout.write(\"Square \")\n",
+ " return pow(x,2)\n",
+ "\n",
+ "def cube(x):\n",
+ " sys.stdout.write(\"Cube \")\n",
+ " return pow(x,3)\n",
+ "\n",
+ "def y():\n",
+ " return 10\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Function call\n",
+ "z = sqr(x) if x > y() else cube(x)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\" = %d\"%(z))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cube = 125"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.29, Page number: 346<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#compare two return values of functions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definitions\n",
+ "def a():\n",
+ " x = int(raw_input(\"Enter a Number a() : \"))\n",
+ " return x\n",
+ "\n",
+ "def b():\n",
+ " x = int(raw_input(\"Enter a Number b() : \"))\n",
+ " return x\n",
+ "\n",
+ "#Function call and Result\n",
+ "if a() == b():\n",
+ " sys.stdout.write(\"\\nValue of a() & b() are equal\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nValue of a() & b() are unique\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number a() : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number b() : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Value of a() & b() are equal"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.30, Page number: 347<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the equation s = sqr(a() + b()) using function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definitions\n",
+ "def a():\n",
+ " a = int(raw_input(\"Enter value of a : \"))\n",
+ " return a\n",
+ "\n",
+ "def b():\n",
+ " b = int(raw_input(\"Enter value of b : \"))\n",
+ " return b\n",
+ "\n",
+ "def sqr(x):\n",
+ " return x*x\n",
+ "\n",
+ "#Function call\n",
+ "s = sqr(a() + b())\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSquare of Sum = %d\"%(s))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of a : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of b : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Square of Sum = 64"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.31, Page number: 348<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the equation y = x^1+x^2..x^n using function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def b(m):\n",
+ " m += 1\n",
+ " #sys.stdout.write(\"%d\"%(m))\n",
+ " return m\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Values of 'x' and 'n' : \"))\n",
+ "n = int(raw_input(\"Values of 'x' and 'n' : \"))\n",
+ "y = 0\n",
+ "z = 1\n",
+ "m = 0\n",
+ "\n",
+ "while(z <= n):\n",
+ " m = b(m)\n",
+ " y = y + pow(x,m)\n",
+ " sys.stdout.write(\"%d + \"%(y))\n",
+ " z += 1\n",
+ " \n",
+ "if z >= n:\n",
+ " sys.stdout.write(\"\\nValue of y = %d\"%(y))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Values of 'x' and 'n' : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Values of 'x' and 'n' : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3 + 12 + 39 + \n",
+ "Value of y = 39"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.32, Page number: 350<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call user defined function through if statement\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def a():\n",
+ " a = int(raw_input(\"Enter value of a :\"))\n",
+ " return a\n",
+ "\n",
+ "#Function call and Result\n",
+ "if a()%2 == 0:\n",
+ " sys.stdout.write(\"\\nThe number is even.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nThe number is odd.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of a :5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The number is odd."
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.33, Page number: 351<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call user defined function through switch() statement\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def a():\n",
+ " c = raw_input(\"Enter Your Choice Square(s), Cube(c), Double(d) : \")\n",
+ " c = c.lower()\n",
+ " return c\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 5\n",
+ "\n",
+ "#There is no switch() statement in python.\n",
+ "c = a()\n",
+ "if c == 's':\n",
+ " sys.stdout.write(\"\\nSquare of %d is %d\"%(x,pow(x,2)))\n",
+ "else:\n",
+ " if c == 'c':\n",
+ " sys.stdout.write(\"\\nCube of %d is %d\"%(x,pow(x,3)))\n",
+ " else:\n",
+ " if c == 'd':\n",
+ " sys.stdout.write(\"\\nDouble of %d is %d\"%(x,x*2))\n",
+ " else:\n",
+ " sys.stdout.write(\"\\nUnexpected Choice printed as it is : %d\"%(x))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Choice Square(s), Cube(c), Double(d) : D\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Double of 5 is 10"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.34, Page number: 353<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call function through the for loop\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def plus(k):\n",
+ " if k == 10:\n",
+ " return 0\n",
+ " else:\n",
+ " return k\n",
+ " \n",
+ "#Variable Initialization\n",
+ "m = 1\n",
+ "\n",
+ "#Function call & Result\n",
+ "#in python, for loop iterates through a range of number. so while loop is used instead.\n",
+ "while plus(m) != 0:\n",
+ " sys.stdout.write(\"%3d\"%(m))\n",
+ " m += 1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 2 3 4 5 6 7 8 9"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.35, Page number: 354<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call user defined function through while() loop\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def y():\n",
+ " x = int(raw_input(\"Enter a Number : \"))\n",
+ " return x\n",
+ "\n",
+ "#Function call & Result\n",
+ "while y() != 0:\n",
+ " sys.stdout.write(\"Value enter is non-zero\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value enter is non-zero\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.36, Page number: 355<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call user defined function through do while() loop\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def y():\n",
+ " x = int(raw_input(\"Enter a Number : \"))\n",
+ " return x\n",
+ "\n",
+ "#Function call and Result\n",
+ "#There is no do-while loop in python\n",
+ "\n",
+ "while y() != 0:\n",
+ " sys.stdout.write(\"\\nValue entered is non-zero\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Value entered is non-zero\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.37, Page number: 356<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Initialize an array using functions.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def c(m):\n",
+ " n = int(raw_input(\"Enter Number d[%d]\"%(m+1)))\n",
+ " return n\n",
+ "\n",
+ "#Variable Initialization\n",
+ "d = [c(i) for i in range(0,5)]\n",
+ "\n",
+ "sys.stdout.write(\"\\nArray d[] elements are : \")\n",
+ "for k in range(0,5):\n",
+ " sys.stdout.write(\"%2d\"%d[k])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number d[1]4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number d[2]5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number d[3]6\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number d[4]7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number d[5]8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Array d[] elements are : 4 5 6 7 8"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.38, Page number: 357<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pass array element to the function using call by value method.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def show(m,u):\n",
+ " sys.stdout.write(\"\\nnum[%d] = %d\"%(m+1,u))\n",
+ " \n",
+ "#Variable initialization\n",
+ "num = [12,13,14,15,16,17,18]\n",
+ "\n",
+ "#Function call & Result\n",
+ "for k in range(0,7):\n",
+ " show(k,num[k])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "num[1] = 12\n",
+ "num[2] = 13\n",
+ "num[3] = 14\n",
+ "num[4] = 15\n",
+ "num[5] = 16\n",
+ "num[6] = 17\n",
+ "num[7] = 18"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.39, Page number: 358<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pass array element to the function using call by reference\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def show(u):\n",
+ " m = 0\n",
+ " sys.stdout.write(\"\\nnum[7] = {\")\n",
+ " while m != 7:\n",
+ " #There is no pointer concept in python\n",
+ " sys.stdout.write(\"%2d,\"%(u[m]))\n",
+ " m += 1\n",
+ " sys.stdout.write(\"\\b}\")\n",
+ " \n",
+ "#Variable Initialization\n",
+ "num = [12,13,14,15,16,17,18]\n",
+ "\n",
+ "#Function call\n",
+ "show(num)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "num[7] = {12,13,14,15,16,17,18,\b}"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.40, Page number: 359<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Array elements in reverse order.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def show(u):\n",
+ " m = 6\n",
+ " while m != -1:\n",
+ " sys.stdout.write(\"\\nnum[%d] = %d\"%(m,u[m]))\n",
+ " m -= 1\n",
+ " \n",
+ "#Variable Initialization\n",
+ "num = [12,13,14,15,16,17,18]\n",
+ "\n",
+ "#Function call\n",
+ "#There is no pointer concept in python\n",
+ "show(num)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "num[6] = 18\n",
+ "num[5] = 17\n",
+ "num[4] = 16\n",
+ "num[3] = 15\n",
+ "num[2] = 14\n",
+ "num[1] = 13\n",
+ "num[0] = 12"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.41, Page number: 360<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy array elements using user defined function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def cpy(p,m):\n",
+ " j = 0\n",
+ " while j != 5:\n",
+ " m[j] = p[j]\n",
+ " j += 1\n",
+ " \n",
+ "#Variable Initialization\n",
+ "a1 = [1,2,3,4,5]\n",
+ "a2 = [0 for i in range(0,5)]\n",
+ "\n",
+ "#Function call\n",
+ "cpy(a1,a2)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Source Target\")\n",
+ "for h in range(0,5):\n",
+ " sys.stdout.write(\"\\n%5d\\t%d\"%(a1[h],a2[h]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Source Target\n",
+ " 1\t1\n",
+ " 2\t2\n",
+ " 3\t3\n",
+ " 4\t4\n",
+ " 5\t5"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.42, Page number: 361<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read array of other function in main()\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def arry(k):\n",
+ " b = [1,2,3,4,5]\n",
+ " return b[k]\n",
+ "\n",
+ "#main() function\n",
+ "for k in range(0,5):\n",
+ " sys.stdout.write(\"\\t%d\"%(arry(k)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t1\t2\t3\t4\t5"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.43, Page number: 361<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Interchange array elements of two arrays using function.\n",
+ "\n",
+ "import sys\n",
+ "global a\n",
+ "global b\n",
+ "\n",
+ "#Function Definitions\n",
+ "def read():\n",
+ " x = int(raw_input(\"\"))\n",
+ " return x\n",
+ "\n",
+ "def change(a,b):\n",
+ "#Since there is no pointer concept in python, exchange is done in the function using global variables.\n",
+ " for x in range(0,5):\n",
+ " a[x] = a[x] + b[x]\n",
+ " b[x] = a[x] - b[x]\n",
+ " a[x] = a[x] - b[x]\n",
+ " \n",
+ "#Variable Initialization\n",
+ "a = [0 for i in range(0,5)]\n",
+ "b = [0 for i in range(0,5)]\n",
+ "\n",
+ "for x in range(0,10):\n",
+ " if x < 5:\n",
+ " a[x] = read()\n",
+ " else:\n",
+ " b[x-5] = read()\n",
+ "\n",
+ "#Swapping and Result\n",
+ "sys.stdout.write(\"\\nArray A & B \")\n",
+ "\n",
+ "for x in range(0,5):\n",
+ " sys.stdout.write(\"\\n%7d%8d\"%(a[x],b[x]))\n",
+ " \n",
+ "#There is no pointer concept in python.\n",
+ "change(a,b)\n",
+ " \n",
+ "sys.stdout.write(\"\\nNow A & B\")\n",
+ "for x in range(0,5):\n",
+ " sys.stdout.write(\"\\n%7d%8d\"%(a[x],b[x]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "6\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Array A & B \n",
+ " 1 6\n",
+ " 2 7\n",
+ " 3 8\n",
+ " 4 9\n",
+ " 5 0\n",
+ "Now A & B\n",
+ " 6 1\n",
+ " 7 2\n",
+ " 8 3\n",
+ " 9 4\n",
+ " 0 5"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.44, Page number: 363<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read array elements declared in different functions using global\n",
+ "#pointer declaration\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def call(j):\n",
+ " m = 0\n",
+ " u = [5,1,6,0,6]\n",
+ " q = u\n",
+ " while m != j:\n",
+ " sys.stdout.write(\"%3d\"%(u[m]))\n",
+ " m += 1\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " \n",
+ "#Variable Initialization\n",
+ "m = 0\n",
+ "k = [3,8,5,2,5]\n",
+ "q = k\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "while m != 5:\n",
+ " sys.stdout.write(\"%3d\"%(q[m]))\n",
+ " m += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\n\")\n",
+ "call(5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 3 8 5 2 5\n",
+ " 5 1 6 0 6\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.45, Page number: 364<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sum of 1 to 5 numbers using recursion\n",
+ "\n",
+ "import sys\n",
+ "global s\n",
+ "\n",
+ "s = 0\n",
+ "#Function definition\n",
+ "def main(x,s):\n",
+ " s = s + x\n",
+ " sys.stdout.write(\"\\nx = %d s = %d\"%(x,s))\n",
+ " if x == 5:\n",
+ " return\n",
+ " x += 1\n",
+ " main(x,s)\n",
+ " \n",
+ "main(1,s)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "x = 1 s = 1\n",
+ "x = 2 s = 3\n",
+ "x = 3 s = 6\n",
+ "x = 4 s = 10\n",
+ "x = 5 s = 15"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.46, Page number: 365<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate triangular number of a given number with recursion function method\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def tri_num(m):\n",
+ " f = 0\n",
+ " if m == 0:\n",
+ " return f\n",
+ " else:\n",
+ " f = f + m + tri_num(m-1)\n",
+ " return f\n",
+ "\n",
+ "#Variable Initialization\n",
+ "n = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Function call\n",
+ "t = tri_num(n)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nTriangular number of %d is %d\"%(n,t))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Triangular number of 5 is 15"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.47, Page number: 366<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the given string using recursion\n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "global x\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 0\n",
+ "str1 = \"Have a Good Day\"\n",
+ "\n",
+ "#Function Definition\n",
+ "def main(x):\n",
+ " if x == len(str1): #There is no null terminating character in python string\n",
+ " return\n",
+ " else:\n",
+ " if str1[x] == 'H':\n",
+ " os.system('cls')\n",
+ " sys.stdout.write(\"%c\"%(str1[x]))\n",
+ " else:\n",
+ " sys.stdout.write(\"%c\"%(str1[x]))\n",
+ " x += 1\n",
+ " main(x)\n",
+ " \n",
+ "#Function call\n",
+ "main(x)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Have a Good Day"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.48, Page number: 367<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the given string 10 times using recursion\n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "\n",
+ "#Function definition\n",
+ "def main(x):\n",
+ " sys.stdout.write(\"\\n%.2d] %s\"%(x,str1))\n",
+ " x += 1\n",
+ " if x == 11:\n",
+ " return\n",
+ " else:\n",
+ " if x == 1:\n",
+ " os.system('cls')\n",
+ " main(x)\n",
+ " else:\n",
+ " main(x)\n",
+ " \n",
+ " \n",
+ "#Variable Initialization\n",
+ "x = 0\n",
+ "str1 = \"Have a Good Day\"\n",
+ "\n",
+ "#Function call\n",
+ "main(x)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "00] Have a Good Day\n",
+ "01] Have a Good Day"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "02] Have a Good Day\n",
+ "03] Have a Good Day\n",
+ "04] Have a Good Day\n",
+ "05] Have a Good Day\n",
+ "06] Have a Good Day\n",
+ "07] Have a Good Day\n",
+ "08] Have a Good Day\n",
+ "09] Have a Good Day\n",
+ "10] Have a Good Day"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.49, Page number: 368<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Factorial using recursive function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function Definition\n",
+ "def fact(m):\n",
+ " f = 1\n",
+ " if m == 1:\n",
+ " return 1\n",
+ " else:\n",
+ " f = m * fact(m-1)\n",
+ " return f\n",
+ " \n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Function call\n",
+ "f = fact (x)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nFactorial of %d is %d\"%(x,f))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Factorial of 5 is 120"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.50, Page number: 369<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display address of user defined function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def show():\n",
+ " sys.stdout.write(\"\\nAddress of function show() is : \")\n",
+ " \n",
+ "#Function call\n",
+ "show()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"%u\"%(id(show)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of function show() is : 95041520"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.51, Page number: 369<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call function using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def show():\n",
+ " sys.stdout.write(\"\\nAddress of function show() is : \")\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "p = id(show)\n",
+ "show()\n",
+ "sys.stdout.write(\"%u\"%(id(show)))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of function show() is : 95041200"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.52, Page number: 370<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the address of library function.\n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAddress of printf() is %u\"%(id(sys.stdout.write)))\n",
+ "sys.stdout.write(\"\\nAddress of scanf() is %u\"%(id(sys.stdout.read)))\n",
+ "sys.stdout.write(\"\\nAddress of clrscr() is %u\"%(id(os.system('cls'))))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of printf() is 60743848\n",
+ "Address of scanf() is 60743848\n",
+ "Address of clrscr() is 4774132"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.53, Page number: 371<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Call main() using pointer to main() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initilization\n",
+ "x = 0\n",
+ "\n",
+ "#Function definition\n",
+ "def main(x):\n",
+ " p = id(main)\n",
+ " x += 1\n",
+ " sys.stdout.write(\"\\nCall %d Address of main() %u\"%(x,id(main)))\n",
+ " if x == 3:\n",
+ " return\n",
+ " main(x)\n",
+ " \n",
+ "#function call\n",
+ "main(x)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Call 1 Address of main() 95040880\n",
+ "Call 2 Address of main() 95040880\n",
+ "Call 3 Address of main() 95040880"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter11.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter11.ipynb
new file mode 100755
index 00000000..c8fac375
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter11.ipynb
@@ -0,0 +1,446 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 11: Storage Class<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.1, Page number: 376<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Working of auto variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Functio definitions\n",
+ "def call1():\n",
+ " v = 20\n",
+ " sys.stdout.write(\"\\nV = %d\"%(v))\n",
+ " \n",
+ "def call2():\n",
+ " v = 30\n",
+ " call1()\n",
+ " sys.stdout.write(\"\\nV = %d\"%(v))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "v = 10\n",
+ "\n",
+ "#Function call\n",
+ "call2()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nV = %d\"%(v))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "V = 20\n",
+ "V = 30\n",
+ "V = 10"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.2, Page number: 376<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Working of auto variables in different blocks\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 10\n",
+ "\n",
+ "sys.stdout.write(\"\\nX = %d\"%(x))\n",
+ "\n",
+ "x = 20\n",
+ "sys.stdout.write(\"\\nX = %d\"%(x))\n",
+ "\n",
+ "x = 10\n",
+ "sys.stdout.write(\"\\nX = %d\"%(x))\n",
+ "\n",
+ "#In python, block of statements are indicated using intendation.\n",
+ "#block of statements can be written for conditional,loop or function statements"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "X = 10\n",
+ "X = 20\n",
+ "X = 10"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.3, Page number: 377<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use same variable in different blocks with different data types\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization & Result\n",
+ "x = 10\n",
+ "sys.stdout.write(\"\\nX = %d\"%(x))\n",
+ "\n",
+ "x = 2.22\n",
+ "sys.stdout.write(\"\\nX = %g\"%(x))\n",
+ "\n",
+ "x = \"Auto Storage Class\"\n",
+ "sys.stdout.write(\"\\nX = %s\"%(x))\n",
+ "\n",
+ "x = 10\n",
+ "sys.stdout.write(\"\\nX = %d\"%(x))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "X = 10\n",
+ "X = 2.22\n",
+ "X = Auto Storage Class\n",
+ "X = 10"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.4, Page number: 378<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Working of external variables\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definitions\n",
+ "def call1():\n",
+ " sys.stdout.write(\"\\nIn Call1() V = %d\"%(v))\n",
+ " \n",
+ "def call2():\n",
+ " sys.stdout.write(\"\\nIn call2() V = %d\"%(v))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "global v\n",
+ "v = 10\n",
+ "\n",
+ "call1()\n",
+ "call2()\n",
+ "sys.stdout.write(\"\\nIn main() V = %d\"%(v))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In Call1() V = 10\n",
+ "In call2() V = 10\n",
+ "In main() V = 10"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.5, Page number: 379<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Working of auto and global variables with same name\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definitions\n",
+ "def call1():\n",
+ " v = 20\n",
+ " sys.stdout.write(\"\\nIn Call1() V = %d\"%(v))\n",
+ " \n",
+ "def call2():\n",
+ " sys.stdout.write(\"\\nIn call2() V = %d\"%(v))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "global v\n",
+ "v = 10\n",
+ "\n",
+ "#Function call\n",
+ "call1()\n",
+ "call2()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nIn main() V = %d\"%(v))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In Call1() V = 20\n",
+ "In call2() V = 10\n",
+ "In main() V = 10"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.6, Page number: 380<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Declare external variables using extern keyword\n",
+ "\n",
+ "#Variable Initialization\n",
+ "global m\n",
+ "m = 10\n",
+ "\n",
+ "#There is no extern keyword in python, global is used instead\n",
+ "sys.stdout.write(\"\\nM = %d\"%(m))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "M = 10"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.7, Page number: 380<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use of static variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def print1(m):\n",
+ " sys.stdout.write(\"\\nm = %d\"%(m))\n",
+ " if m == 3:\n",
+ " return\n",
+ " \n",
+ "m = 0\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " m += 1\n",
+ " print1(m)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "m = 1\n",
+ "m = 2\n",
+ "m = 3"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.8, Page number: 381<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Difference between variables of auto and static class\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "y = 0\n",
+ "sys.stdout.write(\"\\nx = %d & y = %d\"%(x,y))\n",
+ "\n",
+ "#Since x display the junk value which stored already, it differs in different systems"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "x = 10 & y = 0"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.9, Page number: 382<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Register class variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no register keyword in python\n",
+ "m = 1\n",
+ "\n",
+ "#Result\n",
+ "for m in range(1,5+1):\n",
+ " sys.stdout.write(\"\\t%d\"%(m))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t1\t2\t3\t4\t5"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.10, Page number: 382<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Register class variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no register class variable in python\n",
+ "m = 1\n",
+ "\n",
+ "for m in range(1,6):\n",
+ " sys.stdout.write(\"\\t%d\"%(m))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t1\t2\t3\t4\t5"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter12.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter12.ipynb
new file mode 100755
index 00000000..e1acaa2c
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter12.ipynb
@@ -0,0 +1,849 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 12: Preprocessor Directives<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.1, Page number: 386<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Area of circle\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Defining the macro\n",
+ "#There is no macro definitions/preprocessors in python\n",
+ "PI = 3.14\n",
+ "\n",
+ "#Variable Initialization\n",
+ "r = float(raw_input(\"Enter radius of circle in cms.\"))\n",
+ "\n",
+ "#Calculation\n",
+ "area = PI * r * r\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Area of a Circle = %.2f cm2\"%(area))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter radius of circle in cms.7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area of a Circle = 153.86 cm2"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.2, Page number: 387<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Identifers for 'c' statements and variables\n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "\n",
+ "#Macro definitions\n",
+ "#in python, function definitions are used instead of macros\n",
+ "def N():\n",
+ " return 10\n",
+ "\n",
+ "def cls():\n",
+ " os.system('cls')\n",
+ " \n",
+ "def wait():\n",
+ " t = raw_input(\"\")\n",
+ " \n",
+ "def display(s):\n",
+ " sys.stdout.write(s)\n",
+ "\n",
+ "for k in range(1,N()+1):\n",
+ " display(\"%d\\t\"%(k))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\t2\t3\t4\t5\t6\t7\t8\t9\t10\t"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.3, Page number: 387<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Macros for logical operators\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Macro definitions\n",
+ "#in python, function definitions are used as macros\n",
+ "\n",
+ "#There is no preprocessors in python\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "b = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "c = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "\n",
+ "if a > b and a > c:\n",
+ " sys.stdout.write(\"%d is the larger number\"%(a))\n",
+ "else:\n",
+ " if b > a and b > c:\n",
+ " sys.stdout.write(\"%d is the larger number\"%(b))\n",
+ " else:\n",
+ " if c > a and c > b:\n",
+ " sys.stdout.write(\"%d is the larger number\"%(c))\n",
+ " else:\n",
+ " if a == b and b == c:\n",
+ " sys.stdout.write(\"\\nNumbers are same.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "7 is the larger number"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.4, Page number: 388<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Identifier for displaying double and triple of a number.\n",
+ "\n",
+ "#Macro definitions\n",
+ "#Function definitions are used as macros in python\n",
+ "\n",
+ "def DOUBLE(a):\n",
+ " return a*2\n",
+ "\n",
+ "def TRIPLE(a):\n",
+ " return a*3\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSINGLE\\tDOUBLE\\tTRIPLE\")\n",
+ "\n",
+ "for a in range(1,5+1):\n",
+ " sys.stdout.write(\"\\n%d\\t%d\\t%d\"%(a,DOUBLE(a),TRIPLE(a)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "SINGLE\tDOUBLE\tTRIPLE\n",
+ "1\t2\t3\n",
+ "2\t4\t6\n",
+ "3\t6\t9\n",
+ "4\t8\t12\n",
+ "5\t10\t15"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.5, Page number: 389<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Undefine a macro\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "\n",
+ "def wait():\n",
+ " return (raw_input(\"\"))\n",
+ "\n",
+ "#Result\n",
+ "for k in range(1,5+1):\n",
+ " sys.stdout.write(\"%d\\t\"%(k))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\t2\t3\t4\t5\t"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.6, Page number: 389<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Stringizing operation\n",
+ "\n",
+ "#Macro definition\n",
+ "#in python, function definition can be used as macro\n",
+ "\n",
+ "def say(m):\n",
+ " sys.stdout.write(m)\n",
+ " \n",
+ "#Function call\n",
+ "say(\"Hello\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hello"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.7, Page number: 390<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Stringizing operation and macro arguments\n",
+ "\n",
+ "#There is no macro in python, function definitions can be used as macros\n",
+ "\n",
+ "def DOUBLE(x):\n",
+ " sys.stdout.write(\"Double of m = %d\\n\"%(x*2))\n",
+ " \n",
+ "def TRIPLE(x):\n",
+ " sys.stdout.write(\"Triple of m = %d\\n\"%(x*3))\n",
+ " \n",
+ "#Variable Initialization\n",
+ "m = int(raw_input(\"Enter a number : \"))\n",
+ "\n",
+ "#Function call & Result\n",
+ "DOUBLE(m)\n",
+ "TRIPLE(m)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Double of m = 10\n",
+ "Triple of m = 15\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.8, Page number: 390<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Larger of two numbers using macro with arguments.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Macro definition //function definition itself is used as macro\n",
+ "def MAX(x,y):\n",
+ " if x > y:\n",
+ " c = x\n",
+ " else:\n",
+ " c = y\n",
+ " return c\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 5\n",
+ "y = 8\n",
+ "\n",
+ "#Function call\n",
+ "c = MAX(x,y)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nLarger of two numbers = %d\"%(c))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Larger of two numbers = 8"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.9, Page number: 391<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Function defined in \"udf.c\" file.\n",
+ "\n",
+ "import sys\n",
+ "#since ipython notebook does not support this function, function is used\n",
+ "#in python, the udf.c file can be written and saved in udf.py and import command\n",
+ "#can be used to include that file in this program\n",
+ "\n",
+ "def display():\n",
+ " sys.stdout.write(\"\\nFunction Called\")\n",
+ " \n",
+ "#Function call\n",
+ "display()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Function Called"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.10, Page number: 392<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Conditional compilation \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "\n",
+ "LINE = 1\n",
+ "\n",
+ "if LINE:\n",
+ " sys.stdout.write(\"This is line number one\")\n",
+ "else:\n",
+ " sys.stdout.write(\"This is line number two\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "This is line number one"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.11, Page number: 393<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Conditional compilation \n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "def E():\n",
+ " return 1\n",
+ "\n",
+ "#Function call\n",
+ "if E():\n",
+ " a = 2\n",
+ " b = 3\n",
+ " sys.stdout.write(\"A = %d & B = %d\"%(a,b))\n",
+ "else:\n",
+ " c = 2\n",
+ " d = 3\n",
+ " sys.stdout.write(\"C = %d & D = %d\"%(c,d))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A = 2 & B = 3"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.12, Page number: 394<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Conditional compilation directives \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "T = 8\n",
+ "\n",
+ "#Result\n",
+ "if T == 0:\n",
+ " sys.stdout.write(\"\\nMacro is not defined.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nMacro is defined\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Macro is defined"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.13, Page number: 394<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#User defined error message \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "B = 1\n",
+ "A = 0\n",
+ "\n",
+ "#Result\n",
+ "if A == 0:\n",
+ " sys.stdout.write(\"MACRO A IS NOT DEFINED.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"Macro found.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MACRO A IS NOT DEFINED."
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.14, Page number: 397<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Set off certain errors \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "x = 2\n",
+ "y = 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\ny = %d\"%(y))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "y = 1"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.15, Page number: 398<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Predefined macros \n",
+ "\n",
+ "import sys\n",
+ "import datetime\n",
+ "\n",
+ "#Variable Initialization\n",
+ "FILE = 'PRE_MA~1.C'\n",
+ "LINE = 10\n",
+ "STDC = 1\n",
+ "\n",
+ "#Date/time can be set using datetime.date(2001,5,12)\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nDATE : %s\"%('Dec 05 2001')) \n",
+ "sys.stdout.write(\"\\nTIME : %s\"%(datetime.time(21,7,39)))\n",
+ "sys.stdout.write(\"\\nFILE NAME : %s\"%(FILE))\n",
+ "sys.stdout.write(\"\\nLINE NO : %d\"%(LINE))\n",
+ "sys.stdout.write(\"\\n_STDC_ : %x\"%(STDC))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "DATE : Dec 05 2001\n",
+ "TIME : 21:07:39\n",
+ "FILE NAME : PRE_MA~1.C\n",
+ "LINE NO : 10\n",
+ "_STDC_ : 1"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.16, Page number: 399<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the name of memory model that is currently in use.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no formal memory model and preprocessor directives in python\n",
+ "\n",
+ "TINY = 0\n",
+ "SMALL = 0\n",
+ "MEDIUM = 0\n",
+ "COMPACT = 0\n",
+ "LARGE = 1\n",
+ "HUGE = 0\n",
+ "\n",
+ "#Result\n",
+ "if TINY:\n",
+ " sys.stdout.write(\"\\nTINY %d\"%(TINY))\n",
+ "else:\n",
+ " if SMALL:\n",
+ " sys.stdout.write(\"\\nSMALL %d\"%(SMALL))\n",
+ " else:\n",
+ " if MEDIUM:\n",
+ " sys.stdout.write(\"\\nMEDIUM %d\"%(MEDIUM))\n",
+ " else:\n",
+ " if COMPACT:\n",
+ " sys.stdout.write(\"\\nCOMPACT %d\"%(COMPACT))\n",
+ " else:\n",
+ " if LARGE:\n",
+ " sys.stdout.write(\"\\nLARGE %d\"%(LARGE))\n",
+ " else:\n",
+ " sys.stdout.write(\"\\nHUGE %d\"%(HUGE))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "LARGE 1"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.17, Page number: 400<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Macro expansions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directives in python\n",
+ "ch = raw_input(\"Input a Text : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Text Input : %s\"%(ch))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input a Text : Programming\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Text Input : Programming"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.18, Page number: 401<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Predefined macros.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "d = raw_input(\"Enter any character : \")\n",
+ "\n",
+ "#Result\n",
+ "f = d.isalpha()\n",
+ "\n",
+ "if f != 0:\n",
+ " sys.stdout.write(\"\\n%c is a letter in\"%(d))\n",
+ " f = d.isupper()\n",
+ " if f != 0:\n",
+ " sys.stdout.write(\" Capital case\")\n",
+ " else:\n",
+ " sys.stdout.write(\" Small case\")\n",
+ "else:\n",
+ " f = d.isdigit()\n",
+ " if f != 0:\n",
+ " sys.stdout.write(\"\\n%c is a digit\"%(d))\n",
+ " else:\n",
+ " f = d.ispunct()\n",
+ " if f != 0:\n",
+ " sys.stdout.write(\"\\n%c is a punctuation symbol\"%(d))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter any character : C\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "C is a letter in Capital case"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter13.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter13.ipynb
new file mode 100755
index 00000000..f9222003
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter13.ipynb
@@ -0,0 +1,2367 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 13: Structure and Union<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.1, Page number: 409<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display size of structure elements\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class is used instead of structure in python\n",
+ "class book1:\n",
+ " book = ''\n",
+ " pages = 0\n",
+ " price = 0.00\n",
+ "\n",
+ "#Python variables uses value tagged methods for storing the values\n",
+ "\n",
+ "#Class variable declaration\n",
+ "bk1 = book1()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSize of Structure Elements\")\n",
+ "sys.stdout.write(\"\\nBook : %d\"%(sys.getsizeof(bk1.book)))\n",
+ "sys.stdout.write(\"\\nPages : %d\"%(sys.getsizeof(bk1.pages)))\n",
+ "sys.stdout.write(\"\\nPrice : %d\"%(sys.getsizeof(bk1.price)))\n",
+ "sys.stdout.write(\"\\nTotal Bytes : %d\"%(sys.getsizeof(bk1)))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Size of Structure Elements\n",
+ "Book : 21\n",
+ "Pages : 12\n",
+ "Price : 16\n",
+ "Total Bytes : 36"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.2, Page number: 410<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Define a structure and initialize its member variables\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class book1:\n",
+ " book = ''\n",
+ " pages = 0\n",
+ " price = 0.0\n",
+ " \n",
+ "#Class variable declaration and Initialization\n",
+ "bk1 = book1()\n",
+ "bk1.book = \"C++\"\n",
+ "bk1.pages = 300\n",
+ "bk1.price = 285\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nBook Name : %s\"%(bk1.book))\n",
+ "sys.stdout.write(\"\\nNo. of Pages : %d\"%(bk1.pages))\n",
+ "sys.stdout.write(\"\\nBook Price : %d\"%(bk1.price))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Book Name : C++\n",
+ "No. of Pages : 300\n",
+ "Book Price : 285"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.3, Page number: 411<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy structure elements from one object to another object\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class disk:\n",
+ " co = ''\n",
+ " type1 = 0.0\n",
+ " price = 0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "d1 = disk()\n",
+ "d2 = disk()\n",
+ "d3 = disk()\n",
+ "\n",
+ "#Class variable initialization\n",
+ "d1.co = \"SONY\"\n",
+ "d1.type1 = 1.44\n",
+ "d1.price = 20\n",
+ "\n",
+ "#Copying\n",
+ "d2.co = d1.co\n",
+ "d2.type1 = d1.type1\n",
+ "d2.price = d1.price\n",
+ "\n",
+ "d3 = d2\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n%s %g %d\"%(d1.co,d1.type1,d1.price))\n",
+ "sys.stdout.write(\"\\n%s %g %d\"%(d2.co,d2.type1,d2.price))\n",
+ "sys.stdout.write(\"\\n%s %g %d\"%(d3.co,d3.type1,d3.price))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "SONY 1.44 20\n",
+ "SONY 1.44 20\n",
+ "SONY 1.44 20"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.4, Page number: 412<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read values and assign them to structure variables\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class book1:\n",
+ " book = ''\n",
+ " pages = 0\n",
+ " price = 0.0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "bk1 = book1()\n",
+ "\n",
+ "#Variable initialization\n",
+ "bk1.book = raw_input(\"Enter Book name,pages,price : \")\n",
+ "bk1.pages = int(raw_input(\"Enter Book name,pages,price : \"))\n",
+ "bk1.price = float(raw_input(\"Enter Book name, pages,price : \"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nBook Name : %s\"%(bk1.book))\n",
+ "sys.stdout.write(\"\\nNo. of Pages : %d\"%(bk1.pages))\n",
+ "sys.stdout.write(\"\\nBook Price : %d\"%(bk1.price))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Book name,pages,price : C\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Book name,pages,price : 500\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Book name, pages,price : 450\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Book Name : C\n",
+ "No. of Pages : 500\n",
+ "Book Price : 450"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.5, Page number: 414<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read and display car details\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class time:\n",
+ " second = 0\n",
+ " minute = 0\n",
+ " hour = 0\n",
+ " \n",
+ "class t:\n",
+ " carno = 0\n",
+ " st = time()\n",
+ " rt = time()\n",
+ " \n",
+ "#Class variable declaration\n",
+ "r1 = t()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "r1.carno = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "r1.st.hour = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "r1.st.minute = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "r1.st.second = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "r1.rt.hour = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "r1.rt.minute = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "r1.rt.second = int(raw_input(\"Car No., Starting Time, Reaching Time :\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nCar No. \\tStarting Time \\tReaching Time\\n\")\n",
+ "sys.stdout.write(\"%d\\t\"%(r1.carno))\n",
+ "sys.stdout.write(\"\\t%d:%d:%d\\t\\t\"%(r1.st.hour,r1.st.minute,r1.st.second))\n",
+ "sys.stdout.write(\"%d:%d:%d\"%(r1.rt.hour,r1.rt.minute,r1.rt.second))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :125\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :50\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :30\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :50\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No., Starting Time, Reaching Time :25\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Car No. \tStarting Time \tReaching Time\n",
+ "125\t\t2:50:30\t\t3:50:25"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.6, Page number: 415<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read and display the details of a person\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class name:\n",
+ " first = ''\n",
+ " second = ''\n",
+ " last = ''\n",
+ " \n",
+ "class b_date:\n",
+ " day = 0\n",
+ " month = 0\n",
+ " year = 0\n",
+ " \n",
+ "class data:\n",
+ " nm = name()\n",
+ " bt = b_date()\n",
+ " \n",
+ "#Class variable declaration\n",
+ "r1 = data()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "r1.nm.first = raw_input(\"Enter Name (First/Second/Last)\")\n",
+ "r1.nm.second = raw_input(\"Enter Name (First/Second/Last)\")\n",
+ "r1.nm.last = raw_input(\"Enter Name (First/Second/Last)\")\n",
+ "r1.bt.day = int(raw_input(\"Enter Birth Date Day/Month/Year\"))\n",
+ "r1.bt.month = int(raw_input(\"Enter Birth Date Day/Month/Year\"))\n",
+ "r1.bt.year = int(raw_input(\"Enter Birth Date Day/Month/Year\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Name : %s %s %s\\n\"%(r1.nm.first,r1.nm.second,r1.nm.last))\n",
+ "sys.stdout.write(\"Birth Date : %d.%d.%d\"%(r1.bt.day,r1.bt.month,r1.bt.year))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name (First/Second/Last)Ram\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name (First/Second/Last)Sham\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name (First/Second/Last)Pande\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Birth Date Day/Month/Year12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Birth Date Day/Month/Year12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Birth Date Day/Month/Year1980\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name : Ram Sham Pande\n",
+ "Birth Date : 12.12.1980"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.7, Page number: 416<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Create array of structure objects\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class time:\n",
+ " second = 0\n",
+ " minute = 0\n",
+ " hour = 0\n",
+ " \n",
+ "class t:\n",
+ " carno = 0\n",
+ " st = time()\n",
+ " rt = time()\n",
+ " \n",
+ "#Class variable declaration\n",
+ "r1 = [t() for i in range(0,3)]\n",
+ "\n",
+ "#Variable Initialization\n",
+ "for k in range(0,3):\n",
+ " r1[k].carno = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " r1[k].st.hour = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " r1[k].st.minute = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " r1[k].st.second = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " r1[k].rt.hour = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " r1[k].rt.minute = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " r1[k].rt.second = int(raw_input(\"Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)\"))\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nCar No.\\t\\tStarting Time\\tReaching Time\")\n",
+ "for k in range(0,3):\n",
+ " sys.stdout.write(\"\\n%d\\t\"%(r1[k].carno))\n",
+ " sys.stdout.write(\"\\t%d:%d:%d\\t\"%(r1[k].st.hour,r1[k].st.minute,r1[k].st.second))\n",
+ " sys.stdout.write(\"\\t%d:%d:%d\\t\"%(r1[k].rt.hour,r1[k].rt.minute,r1[k].rt.second))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)120\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)58\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)121\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)40\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)40\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)122\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)30\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)52\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)40\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Car No. Starting Time(hh:mm:ss),Reaching Time(hh:mm:ss)10\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Car No.\t\tStarting Time\tReaching Time\n",
+ "120\t\t4:30:52\t\t5:40:10\t\n",
+ "121\t\t4:30:52\t\t5:40:10\t\n",
+ "122\t\t4:30:52\t\t5:40:10\t"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.8, Page number: 417<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read and display student details\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class stud:\n",
+ " name = ''\n",
+ " rollno = 0\n",
+ " grade = ''\n",
+ " \n",
+ "#Class variable declaration\n",
+ "st = [stud() for i in range(0,3)]\n",
+ "\n",
+ "#Variable Initialization\n",
+ "k = 0 \n",
+ "while k < 3:\n",
+ " st[k].name = raw_input(\"Name :\")\n",
+ " st[k].rollno = int(raw_input(\"Roll No. :\"))\n",
+ " st[k].grade = raw_input(\"Grade : \")\n",
+ " k += 1\n",
+ " \n",
+ "#Result\n",
+ "k = 0\n",
+ "sys.stdout.write(\"\\nName \\tRollno \\tGrade\\n\")\n",
+ "while k < 3:\n",
+ " sys.stdout.write(\"\\n%s\\t%d\\t%s\"%(st[k].name,st[k].rollno,st[k].grade))\n",
+ " k += 1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name :Suresh\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Roll No. :125\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Grade : A\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name :Mahesh\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Roll No. :126\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Grade : B\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name :Rajesh\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Roll No. :127\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Grade : A\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name \tRollno \tGrade\n",
+ "\n",
+ "Suresh\t125\tA\n",
+ "Mahesh\t126\tB\n",
+ "Rajesh\t127\tA"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.9, Page number: 419<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pointer to structure \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class book:\n",
+ " name = ''\n",
+ " author = ''\n",
+ " pages = 0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "b1 = book()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "b1.name = \"JAVA COMPLETE REFERENCE\"\n",
+ "b1.author = \"P.NAUGHTON\"\n",
+ "b1.pages = 886\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n%s by %s of %d pages\"%(b1.name,b1.author,b1.pages))\n",
+ "sys.stdout.write(\"\\n%s by %s of %d pages\"%(b1.name,b1.author,b1.pages))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "JAVA COMPLETE REFERENCE by P.NAUGHTON of 886 pages\n",
+ "JAVA COMPLETE REFERENCE by P.NAUGHTON of 886 pages"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.10, Page number: 420<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pointer as members of structure \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class boy:\n",
+ " name = ''\n",
+ " age = 0\n",
+ " height = 0.0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "sp = boy()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "sp.name = \"Mahesh\"\n",
+ "sp.age = 20\n",
+ "sp.height = 5.40\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nName = %s\"%(sp.name))\n",
+ "sys.stdout.write(\"\\nAge = %s\"%(sp.age))\n",
+ "sys.stdout.write(\"\\nHeight = %s\"%(sp.height))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name = Mahesh\n",
+ "Age = 20\n",
+ "Height = 5.4"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.11, Page number: 421<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pointer as members of structure \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class boy:\n",
+ " name = ''\n",
+ " age = 0\n",
+ " height = 0.0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "b = boy()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "nm = \"Somesh\"\n",
+ "ag = 20\n",
+ "ht = 5.40\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "b.name = nm\n",
+ "b.age = ag\n",
+ "b.height = ht\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nName : %s\"%(b.name))\n",
+ "sys.stdout.write(\"\\nAge = %d\"%(b.age))\n",
+ "sys.stdout.write(\"\\nHeight = %.2g\"%(b.height))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name : Somesh\n",
+ "Age = 20\n",
+ "Height = 5.4"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.12, Page number: 422<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the contents of the structure using ordinary pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class num:\n",
+ " a = 0\n",
+ " b = 0\n",
+ " c = 0\n",
+ "\n",
+ "#Class variable declaration\n",
+ "d = num()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "d.a = 2\n",
+ "d.b = 3\n",
+ "d.c = 4\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\na = %d\"%(d.a))\n",
+ "sys.stdout.write(\"\\nb = %d\"%(d.b))\n",
+ "sys.stdout.write(\"\\nc = %d\"%(d.c))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "a = 2\n",
+ "b = 3\n",
+ "c = 4"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.13, Page number: 423<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Passing address of structure variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class book:\n",
+ " name = ''\n",
+ " author = ''\n",
+ " pages = 0\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "b1 = book()\n",
+ "b1.name = \"JAVA COMPLETE REFERENCE\"\n",
+ "b1.author = \"P.NAUGHTON\"\n",
+ "b1.pages = 886\n",
+ "\n",
+ "#Function definition\n",
+ "def show(b1):\n",
+ " sys.stdout.write(\"\\n%s by %s of %d pages\"%(b1.name,b1.author,b1.pages))\n",
+ "\n",
+ "#Function call\n",
+ "show(b1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "JAVA COMPLETE REFERENCE by P.NAUGHTON of 886 pages"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.14, Page number: 424<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Passing structure elements to function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class boy:\n",
+ " name = ''\n",
+ " age = 0\n",
+ " wt = 0\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "b1 = boy()\n",
+ "b1.name = \"Amit\"\n",
+ "b1.age = 20\n",
+ "b1.wt = 25\n",
+ "\n",
+ "#Function definition\n",
+ "def print1(s,t,n):\n",
+ " sys.stdout.write(\"\\n%s %d %d\"%(s,t,n))\n",
+ " \n",
+ "#Function call\n",
+ "print1(b1.name,b1.age,b1.wt)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Amit 20 25"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.15, Page number: 425<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Pass entire structure to user defined function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class boy:\n",
+ " name = ''\n",
+ " age = 0\n",
+ " wt = 0\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "b1 = boy()\n",
+ "b1.name = \"Amit\"\n",
+ "b1.age = 20\n",
+ "b1.wt = 25\n",
+ "\n",
+ "#Function definition\n",
+ "def print1(b):\n",
+ " sys.stdout.write(\"\\n%s %d %d\"%(b.name,b.age,b1.wt))\n",
+ " \n",
+ "#Function call\n",
+ "print1(b1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Amit 20 25"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.16, Page number: 426<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#User defined data type \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no preprocessor directive in python\n",
+ "H = 60\n",
+ "\n",
+ "#There is no typedef function in python and no separate variable declaration is needed\n",
+ "hrs = int(raw_input(\"Enter Hours :\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nMinutes = %d\"%(hrs*H))\n",
+ "sys.stdout.write(\"\\nSeconds = %d\"%(hrs*H*H))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Hours :2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Minutes = 120\n",
+ "Seconds = 7200"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.17, Page number: 426<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#String data type\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no typedef function in python\n",
+ "a = \" Hello \"\n",
+ "b = raw_input(\"Enter Your Name : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"%s %s\"%(a,b))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name : KAMAL\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Hello KAMAL"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.18, Page number: 427<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Create user defined data type from structure\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "#There is no typedef function in python\n",
+ "class struct:\n",
+ " name = ''\n",
+ " sex = ''\n",
+ " acno = 0\n",
+ " \n",
+ "#class variable declaration and initialization\n",
+ "employee = struct()\n",
+ "employee.name = \"Sanjay\"\n",
+ "employee.sex = \"M\"\n",
+ "employee.acno = 125\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nName\\tSex\\tA/c No.\\n\")\n",
+ "sys.stdout.write(\"%s\\t\"%(employee.name))\n",
+ "sys.stdout.write(\"%s\\t\"%(employee.sex))\n",
+ "sys.stdout.write(\"%s\\n\"%(employee.acno))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name\tSex\tA/c No.\n",
+ "Sanjay\tM\t125\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.19, Page number: 427<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Create user defined data type from structure\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class struct:\n",
+ " name = ''\n",
+ " sex = ''\n",
+ " acno = 0\n",
+ " \n",
+ "#class Variable declaration and initialization\n",
+ "employee = [struct() for i in range(0,2)]\n",
+ "\n",
+ "for k in range(0,2):\n",
+ " employee[k].name = raw_input(\"Name of the Employee :\")\n",
+ " employee[k].sex = raw_input(\"Sex\")\n",
+ " employee[k].acno = raw_input(\"A/c No.\")\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nName\\tSex\\tA/c No.\\n\")\n",
+ "for k in range(0,2):\n",
+ " sys.stdout.write(\"%s\\t\"%(employee[k].name))\n",
+ " sys.stdout.write(\"%s\\t\"%(employee[k].sex))\n",
+ " sys.stdout.write(\"%s\\n\"%(employee[k].acno))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name of the Employee :AJAY\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "SexM\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A/c No.122\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name of the Employee :ANITA\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "SexF\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A/c No.124\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name\tSex\tA/c No.\n",
+ "AJAY\tM\t122\n",
+ "ANITA\tF\t124\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.20, Page number: 429<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Structure containing the details of the employees\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no typedef function in python\n",
+ "\n",
+ "#Class definition\n",
+ "class struct:\n",
+ " first = ''\n",
+ " middle = ''\n",
+ " last = ''\n",
+ " city = ''\n",
+ " pincode = 0\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "person = [struct() for i in range(0,2)]\n",
+ "\n",
+ "for j in range(0,2):\n",
+ " person[j].first = raw_input(\"First Name :\")\n",
+ " person[j].middle = raw_input(\"Middle Name : \")\n",
+ " person[j].last = raw_input(\"Last Name : \")\n",
+ " person[j].city = raw_input(\"City & Pincode\")\n",
+ " person[j].pincode = int(raw_input(\"City & Pincode\"))\n",
+ " \n",
+ "#Result\n",
+ "for j in range(0,2):\n",
+ " sys.stdout.write(\"\\nRecord No : %d\"%(j+1))\n",
+ " sys.stdout.write(\"\\nFirst Name : %s\"%(person[j].first))\n",
+ " sys.stdout.write(\"\\nMiddle Name : %s\"%(person[j].middle))\n",
+ " sys.stdout.write(\"\\nLast Name : %s\"%(person[j].last))\n",
+ " sys.stdout.write(\"\\nCity & Pincode : %s - %d\\n\"%(person[j].city,person[j].pincode))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "First Name :Jay\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Middle Name : Mohan\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Last Name : Deshmukh\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "City & PincodeNanded\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "City & Pincode431602\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "First Name :Vijay\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Middle Name : Kamal\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Last Name : Nandedkar\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "City & PincodeNanded\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "City & Pincode431602\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Record No : 1\n",
+ "First Name : Jay\n",
+ "Middle Name : Mohan\n",
+ "Last Name : Deshmukh\n",
+ "City & Pincode : Nanded - 431602\n",
+ "\n",
+ "Record No : 2\n",
+ "First Name : Vijay\n",
+ "Middle Name : Kamal\n",
+ "Last Name : Nandedkar\n",
+ "City & Pincode : Nanded - 431602\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.21, Page number: 431<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Information of vehicles\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "PETROL = 1\n",
+ "DISEL = 2\n",
+ "TWO_WH = 3\n",
+ "FOUR_WH = 4\n",
+ "OLD = 5\n",
+ "NEW = 6\n",
+ "\n",
+ "#Class declaration\n",
+ "class vehicle:\n",
+ " type1 = 3\n",
+ " fuel = 2\n",
+ " model = 3\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "v = vehicle()\n",
+ "v.type1 = FOUR_WH\n",
+ "v.fuel = DISEL\n",
+ "v.model = OLD\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nType of Vehicle : %d\"%(v.type1))\n",
+ "sys.stdout.write(\"\\nFuel : %d\"%(v.fuel))\n",
+ "sys.stdout.write(\"\\nModel : %d\"%(v.model))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Type of Vehicle : 4\n",
+ "Fuel : 2\n",
+ "Model : 5"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.22, Page number: 432<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the examination result of the student \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#There is no preprocessor directives in python\n",
+ "PASS = 1\n",
+ "FAIL = 0\n",
+ "A = 0\n",
+ "B = 1\n",
+ "C = 2\n",
+ "\n",
+ "#Class declaration\n",
+ "class student:\n",
+ " name = ''\n",
+ " result = 1\n",
+ " grade = 2\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "v = student()\n",
+ "\n",
+ "v.name = \"Sachin\"\n",
+ "v.result = PASS\n",
+ "v.grade = C\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nName : %s\"%(v.name))\n",
+ "sys.stdout.write(\"\\nResult : %d\"%(v.result))\n",
+ "sys.stdout.write(\"\\nGrade : %d\"%(v.grade))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name : Sachin\n",
+ "Result : 1\n",
+ "Grade : 2"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.23, Page number: 433<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enumerated data type for 12 months\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no enumerated data type in python and an alternate is to use class\n",
+ "#Class declaration\n",
+ "class month:\n",
+ " Jan = 0\n",
+ " Feb = 1\n",
+ " Mar = 2\n",
+ " Apr = 3\n",
+ " May = 4\n",
+ " June = 5\n",
+ " July = 6\n",
+ " Aug = 7\n",
+ " Sep = 8\n",
+ " Oct = 9\n",
+ " Nov = 10\n",
+ " Dec = 11\n",
+ " \n",
+ "#Class variable declaration\n",
+ "c = month()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nJan = %d\"%(c.Jan))\n",
+ "sys.stdout.write(\"\\nFeb = %d\"%(c.Feb))\n",
+ "sys.stdout.write(\"\\nJune = %d\"%(c.June))\n",
+ "sys.stdout.write(\"\\nDec = %d\"%(c.Dec))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Jan = 0\n",
+ "Feb = 1\n",
+ "June = 5\n",
+ "Dec = 11"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.24, Page number: 434<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enumerated data type \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no enumerated data type in python and an alternate is to use class\n",
+ "#Class declaration\n",
+ "class month:\n",
+ " Jan = 1\n",
+ " Feb = 2\n",
+ " Mar = 3\n",
+ " Apr = 4\n",
+ " May = 5\n",
+ " June = 6\n",
+ " July = 7\n",
+ " Aug = 8\n",
+ " Sep = 9\n",
+ " Oct = 10\n",
+ " Nov = 11\n",
+ " Dec = 12\n",
+ " \n",
+ "#Class variable declaration\n",
+ "c = month()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nJan = %d\"%(c.Jan))\n",
+ "sys.stdout.write(\"\\nFeb = %d\"%(c.Feb))\n",
+ "sys.stdout.write(\"\\nJune = %d\"%(c.June))\n",
+ "sys.stdout.write(\"\\nDec = %d\"%(c.Dec))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Jan = 1\n",
+ "Feb = 2\n",
+ "June = 6\n",
+ "Dec = 12"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.25, Page number: 434<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display name of month using enumerated data type\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no enumerated data type in python and an alternate is to use class\n",
+ "#Class declaration\n",
+ "class month:\n",
+ " Jan = 1\n",
+ " Feb = 2\n",
+ " Mar = 3\n",
+ " Apr = 4\n",
+ " May = 5\n",
+ " June = 6\n",
+ " July = 7\n",
+ " Aug = 8\n",
+ " Sep = 9\n",
+ " Oct = 10\n",
+ " Nov = 11\n",
+ " Dec = 12\n",
+ " \n",
+ "#Class variable declaration\n",
+ "c = month()\n",
+ "\n",
+ "#Result\n",
+ "for f in range(c.Jan,c.Dec+1):\n",
+ " #There is no switch case statement in python\n",
+ " if f == c.Jan:\n",
+ " sys.stdout.write(\"\\nJanuary\")\n",
+ " else:\n",
+ " if f == c.Feb:\n",
+ " sys.stdout.write(\"\\nFebruary\")\n",
+ " else:\n",
+ " if f == c.Mar:\n",
+ " sys.stdout.write(\"\\nMarch\")\n",
+ " else:\n",
+ " if f == c.Apr:\n",
+ " sys.stdout.write(\"\\nApril\")\n",
+ " else:\n",
+ " if f == c.May:\n",
+ " sys.stdout.write(\"\\nMay\")\n",
+ " else:\n",
+ " if f == c.June:\n",
+ " sys.stdout.write(\"\\nJune\")\n",
+ " else:\n",
+ " if f == c.July:\n",
+ " sys.stdout.write(\"\\nJuly\")\n",
+ " else:\n",
+ " if f == c.Aug:\n",
+ " sys.stdout.write(\"\\nAugust\")\n",
+ " else:\n",
+ " if f == c.Sep:\n",
+ " sys.stdout.write(\"\\nSeptember\")\n",
+ " else:\n",
+ " if f == c.Oct:\n",
+ " sys.stdout.write(\"\\nOctober\")\n",
+ " else:\n",
+ " if f == c.Nov:\n",
+ " sys.stdout.write(\"\\nNovember\")\n",
+ " else:\n",
+ " sys.stdout.write(\"\\nDecember\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "January\n",
+ "February\n",
+ "March\n",
+ "April\n",
+ "May\n",
+ "June\n",
+ "July\n",
+ "August\n",
+ "September\n",
+ "October\n",
+ "November\n",
+ "December"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.26, Page number: 436<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enumerated data type\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no enumerated data type in python. class is used instead\n",
+ "class capital:\n",
+ " Mumbai = 0\n",
+ " Hyderabad = 1\n",
+ " Bangalore = 2\n",
+ "\n",
+ "class state:\n",
+ " name = ''\n",
+ " c = capital()\n",
+ " \n",
+ "#Class variable declaration\n",
+ "s = state()\n",
+ "c1 = capital()\n",
+ "\n",
+ "#Class variable initialization\n",
+ "s.name = \"Andhra Pradesh\"\n",
+ "s.c = s.c.Hyderabad\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nState : %s\"%(s.name))\n",
+ "sys.stdout.write(\"\\nCapital : %d\"%(s.c))\n",
+ "\n",
+ "if s.c == c1.Hyderabad:\n",
+ " sys.stdout.write(\"\\nHyderabad is Capital of %s\"%(s.name))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "State : Andhra Pradesh\n",
+ "Capital : 1\n",
+ "Hyderabad is Capital of Andhra Pradesh"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.27, Page number: 437<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Identify the type of entered character using enumerated data type.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration instead of enumerated data type\n",
+ "class ctype:\n",
+ " Letter = 0\n",
+ " Digit = 1\n",
+ " Other = 2\n",
+ " \n",
+ "#Variable Initialization\n",
+ "ch = raw_input(\"Enter any character\")\n",
+ "c = ctype()\n",
+ "f = ch.isalpha()\n",
+ "\n",
+ "#Result\n",
+ "if f != 0:\n",
+ " sys.stdout.write(\"\\n%c is %d type of symbol\"%(ch,c.Letter))\n",
+ "else:\n",
+ " f = ch.isdigit()\n",
+ " if f != 0:\n",
+ " sys.stdout.write(\"\\n%c is %d type of symbol\"%(ch,c.Digit))\n",
+ " else:\n",
+ " sys.stdout.write(\"\\n%c is %d type of symbol\"%(ch,c.Other))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter any character=\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "= is 2 type of symbol"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.28, Page number: 438<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Size of union and number of bytes reserved for it\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no union/structure in python. class is used instead\n",
+ "#Class declaration\n",
+ "class result:\n",
+ " marks = 0\n",
+ " grade = ''\n",
+ " \n",
+ "class res:\n",
+ " name = ''\n",
+ " age = 0\n",
+ " perf = result()\n",
+ " \n",
+ "#Class variable declaration\n",
+ "data = res()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Size of Union : %d\\n\"%(sys.getsizeof(data.perf)))\n",
+ "sys.stdout.write(\"Size of Structure : %d\\n\"%(sys.getsizeof(data)))\n",
+ "\n",
+ "#in python, value tagged method is used for data storage and can represent large numbers"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Size of Union : 36\n",
+ "Size of Structure : 36\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.29, Page number: 440<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Memory size of the computer\n",
+ "\n",
+ "import psutil\n",
+ "\n",
+ "psutil.phymem_usage()\n",
+ "\n",
+ "#Displays current status of the memory\n",
+ "#different systems will have different memory status"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "usage(total=1600512000L, used=1496383488L, free=104128512L, percent=93.5)"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.30, Page number: 440<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the system time at specified cursor position\n",
+ "\n",
+ "import sys\n",
+ "import datetime\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"%s\"%(datetime.datetime.now()))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2013-09-20 11:04:15.649000"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.31, Page number: 441<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Change the cursor in different sizes\n",
+ "\n",
+ "import turtle\n",
+ "#Ipython supports graphics through turtle module\n",
+ "\n",
+ "from Tkinter import *\n",
+ "import Tkinter\n",
+ "\n",
+ "top = Tkinter.Tk()\n",
+ "\n",
+ "B1 = Tkinter.Button(top, text =\"circle\", relief=RAISED,\\\n",
+ " cursor=\"circle\")\n",
+ "B2 = Tkinter.Button(top, text =\"plus\", relief=RAISED,\\\n",
+ " cursor=\"plus\")\n",
+ "B1.pack()\n",
+ "B2.pack()\n",
+ "#top.mainloop()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.32, Page number: 441<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Create a directory using dos interrupt\n",
+ "\n",
+ "import os\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "dir1 = raw_input(\"Enter Directory Name : \")\n",
+ "\n",
+ "#Result\n",
+ "if not os.path.exists(dir1):\n",
+ " os.makedirs(dir1)\n",
+ " sys.stdout.write(\"Directory %s created\"%(dir1))\n",
+ "else:\n",
+ " sys.stdout.write(\"Directory %s not created\"%(dir1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Directory XYZ created"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.33, Page number: 442<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the given character on the screen\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "dl = 67\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"%c\"%(chr(dl)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.34, Page number: 442<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the attributes of a file using DOS interrupt\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "import os\n",
+ "\n",
+ "print os.stat(\"IO.SYS\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0L, st_atime=1383454467L, st_mtime=1383454467L, st_ctime=1383454467L)\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.35, Page number: 444<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Delete a file using dos interrupt\n",
+ "\n",
+ "import os\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "file1 = raw_input(\"Enter a file name : \")\n",
+ "\n",
+ "try:\n",
+ " os.remove(file1)\n",
+ " sys.stdout.write(\"File successfully deleted\")\n",
+ "except:\n",
+ " sys.stdout.write(\"File could not be deleted\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "File successfully deleted"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.36, Page number: 445<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Structuret within union\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#there is no union/structure in python. class is used instead\n",
+ "#Class declaration\n",
+ "class x:\n",
+ " f = 0.0\n",
+ " p = ['' for i in range(0,2)]\n",
+ " \n",
+ "class z:\n",
+ " set1 = x()\n",
+ " \n",
+ "#Class variable declaration and initialization\n",
+ "st = z()\n",
+ "\n",
+ "st.set1.f = 5.5\n",
+ "st.set1.p[0] = 65\n",
+ "st.set1.p[1] = 66\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n%g\"%(st.set1.f))\n",
+ "sys.stdout.write(\"\\n%c\"%(st.set1.p[0]))\n",
+ "sys.stdout.write(\"\\n%c\"%(st.set1.p[1]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "5.5\n",
+ "A\n",
+ "B"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter14.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter14.ipynb
new file mode 100755
index 00000000..409585bd
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter14.ipynb
@@ -0,0 +1,2311 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 14: Files<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.1, Page number: 454<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write data to text file and read it\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a')\n",
+ "\n",
+ "#Write data to file if successfully created the file\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " sys.stdout.write(\"Write data & to stop press '.'\")\n",
+ " c = ''\n",
+ " while c != '.':\n",
+ " c = raw_input(\"Write data & to stop press '.'\")\n",
+ " fp.write(c)\n",
+ " fp.close()\n",
+ "\n",
+ " #Read and display the contents of file\n",
+ " sys.stdout.write(\"\\nContents read : \")\n",
+ " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n",
+ " f = fp.readlines()\n",
+ " for f1 in f:\n",
+ " print f1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Write data & to stop press '.'"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Write data & to stop press '.'ABCDEFGHIJK\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Write data & to stop press '.'.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Contents read : ABCDEFGHIJK.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.2, Page number: 455<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the contents of the file before and after appending.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file for read data\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n",
+ "\n",
+ "#Read and display the contents of file\n",
+ "sys.stdout.write(\"\\nContents of file before appending :\\n\")\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n",
+ "f = fp.readlines()\n",
+ "for f1 in f:\n",
+ " print f1\n",
+ "\n",
+ "#Open file for appending\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a')\n",
+ "\n",
+ "if f == 0:\n",
+ " sys.stdout.write(\"File can not appended\")\n",
+ "else:\n",
+ " c = ''\n",
+ " #fp.write('\\n')\n",
+ " while c != '.':\n",
+ " c = raw_input(\"Enter string to append\")\n",
+ " fp.write(c)\n",
+ " \n",
+ " fp.close()\n",
+ " \n",
+ " #Read and display the contents of file\n",
+ " sys.stdout.write(\"\\nContents of file After appending\\n\")\n",
+ " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n",
+ " f = fp.readlines()\n",
+ " for f1 in f:\n",
+ " print f1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Contents of file before appending :\n",
+ "String is terminated with '\\0'.\n",
+ "\n",
+ "Contents of file After appending\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "String is terminated with '\\0'.This character is called as NULL character.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.3, Page number: 457<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Writing and reading of a file.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','w+')\n",
+ "\n",
+ "#Write data to file if successfully created the file\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " sys.stdout.write(\"Write data & to stop press '.'\")\n",
+ " c = ''\n",
+ " while c != '.':\n",
+ " c = raw_input(\"Write data & to stop press '.'\")\n",
+ " fp.write(c)\n",
+ " fp.close()\n",
+ "\n",
+ " #Read and display the contents of file\n",
+ " sys.stdout.write(\"\\nContents read : \")\n",
+ " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n",
+ " f = fp.readlines()\n",
+ " for f1 in f:\n",
+ " print f1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Write data & to stop press '.'\n",
+ "Contents read : "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ABCDEFGHIJK.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.4, Page number: 458<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Open a file in append mode and add new records in it.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a+')\n",
+ "\n",
+ "#Write data to file if successfully created the file\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " sys.stdout.write(\"Write data & to stop press '.'\")\n",
+ " c = ''\n",
+ " while c != '.':\n",
+ " c = raw_input(\"Write data & to stop press '.'\")\n",
+ " fp.write(c)\n",
+ " fp.close()\n",
+ "\n",
+ " #Read and display the contents of file\n",
+ " sys.stdout.write(\"\\nContents read : \")\n",
+ " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','a+')\n",
+ " f = fp.readlines()\n",
+ " for f1 in f:\n",
+ " print f1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Write data & to stop press '.'\n",
+ "Contents read : "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "This is append and read mode.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.5, Page number: 459<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Open a file in read/write mode in it\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r+')\n",
+ "\n",
+ "#Write data to file if successfully created the file\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " #Read and display the contents of file\n",
+ " sys.stdout.write(\"\\nContents read : \")\n",
+ " f = fp.readlines()\n",
+ " for f1 in f:\n",
+ " print f1\n",
+ " \n",
+ " sys.stdout.write(\"Write data & to stop press '.'\")\n",
+ " c = ''\n",
+ " while c != '.':\n",
+ " c = raw_input(\"Write data & to stop press '.'\")\n",
+ " fp.write(c)\n",
+ " fp.close()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Contents read : Help me.\n",
+ "Write data & to stop press '.'"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.6, Page number: 460<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Open a file for read/write operation in binary mode\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','wb')\n",
+ "\n",
+ "#Write data to file if successfully created the file\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " sys.stdout.write(\"Write data & to stop press '.'\")\n",
+ " c = ''\n",
+ " while c != '.':\n",
+ " c = raw_input(\"Write data & to stop press '.'\")\n",
+ " fp.write(c)\n",
+ " fp.close()\n",
+ "\n",
+ " #Read and display the contents of file\n",
+ " sys.stdout.write(\"\\nContents read : \")\n",
+ " fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','rb')\n",
+ " f = fp.readlines()\n",
+ " for f1 in f:\n",
+ " print f1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Write data & to stop press '.'\n",
+ "Contents read : "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ABCDEFGHIJK.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.7, Page number: 462<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Open a text file and write some text \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','w')\n",
+ "\n",
+ "#Read the string\n",
+ "text = raw_input(\"Enter Text Here : \")\n",
+ "\n",
+ "#Write to the file\n",
+ "#fp.write() is the equivalent function for fprintf() in python\n",
+ "fp.write(\"%s\"%(text))\n",
+ "\n",
+ "#To see the result, open the data.txt file"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.8, Page number: 463<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enter data into the text file and read the same. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','w')\n",
+ "\n",
+ "#Read the data\n",
+ "text = raw_input(\"Name & Age\")\n",
+ "age = int(raw_input(\"Name & Age\"))\n",
+ "\n",
+ "#Write to file\n",
+ "fp.write(\"%s %d\"%(text,age))\n",
+ "\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\data.txt','r')\n",
+ "#Result\n",
+ "sys.stdout.write(\"Name\\tAge\\n\")\n",
+ "text = fp.read()\n",
+ "age = fp.read()\n",
+ "sys.stdout.write(\"%s\\t%s\\n\"%(text,age))\n",
+ "fp.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name\tAge\n",
+ "AMIT 12\t\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.9, Page number: 463<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the contents of the file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "f = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\list.txt','r')\n",
+ "\n",
+ "if f == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " for c in f:\n",
+ " sys.stdout.write(\"%s\"%(c))\n",
+ " #Python gives iterative statements there is no getc() fucntion"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "aman\n",
+ "akash\n",
+ "amit\n",
+ "ajay\n",
+ "ankit"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.10, Page number: 464<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write some text into the file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\words.doc','w')\n",
+ "\n",
+ "#Write data to file\n",
+ "c = ''\n",
+ "while c != '*':\n",
+ " c = raw_input(\"Enter Few Words '*' to Exit\")\n",
+ " fp.write(c)\n",
+ "\n",
+ "fp.close()\n",
+ " #There is no putc() function in python\n",
+ " #Open the file to see the result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.11, Page number: 465<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count\n",
+ "\n",
+ "# Total number of statements\n",
+ "# Total number of included files\n",
+ "# Total number of blocks and brackets\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fs = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\PRG2.C','r')\n",
+ "\n",
+ "#variable initialization\n",
+ "i = 0\n",
+ "c = 0\n",
+ "sb = 0\n",
+ "b = 0\n",
+ "\n",
+ "if fs == 0:\n",
+ " sys.stdout.write(\"File opening error\")\n",
+ "else:\n",
+ " for line in fs:\n",
+ " k = 0\n",
+ " while k < len(line):\n",
+ " if line[k] == ';':\n",
+ " c += 1\n",
+ " else:\n",
+ " if line[k] == '{':\n",
+ " sb += 1\n",
+ " else:\n",
+ " if line[k] == '(':\n",
+ " b += 1\n",
+ " else:\n",
+ " if line[k] == '#':\n",
+ " i += 1\n",
+ " k += 1\n",
+ " \n",
+ " #Result\n",
+ " sys.stdout.write(\"\\nSummary of 'C' Program\\n\")\n",
+ " sys.stdout.write(\"===========================\")\n",
+ " sys.stdout.write(\"\\nTotal Statments : %d\"%(c+i))\n",
+ " sys.stdout.write(\"\\nInclude Statements : %d\"%(i))\n",
+ " sys.stdout.write(\"\\nTotal Blocks {} : %d\"%(sb))\n",
+ " sys.stdout.write(\"\\nTotal Brackets () : %d\"%(b))\n",
+ " sys.stdout.write(\"\\n============================\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Summary of 'C' Program\n",
+ "===========================\n",
+ "Total Statments : 8\n",
+ "Include Statements : 2\n",
+ "Total Blocks {} : 2\n",
+ "Total Brackets () : 9\n",
+ "============================"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.12, Page number: 466<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write text to a file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('C:\\Users\\Aathira\\Documents\\IPython Notebooks\\lines.txt','w')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"\")\n",
+ "else:\n",
+ " #Write data to file\n",
+ " c = ''\n",
+ " while c != '*':\n",
+ " c = raw_input(\"\")\n",
+ " fp.write(c)\n",
+ " fp.close()\n",
+ " #There is no fputc() function in python\n",
+ " #Open the file to see the result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.13, Page number: 467<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read text from the given file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "\n",
+ "file1 = raw_input(\"Enter File Name : \")\n",
+ "fp = open(file1,'r')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"File not found\\n\")\n",
+ "else:\n",
+ " for text in fp:\n",
+ " print text\n",
+ " #File pointer itself is iterable in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "#include <stdio.h>\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.14, Page number: 468<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write a string into a file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "\n",
+ "file1 = raw_input(\"Enter the name of file : \")\n",
+ "fp = open(file1,'w')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"File can not opened\\n\")\n",
+ "else:\n",
+ " text = raw_input(\"Enter Text Here : \")\n",
+ " fp.write(text)\n",
+ " \n",
+ " #Write() function is used to write character or string into the file in python\n",
+ " # there is no fputc() function in python\n",
+ "#open the file to see the result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.15, Page number: 469<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write integers in a file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('num.txt','w')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"File does not exist\\n\")\n",
+ "else:\n",
+ " v = ' '\n",
+ " while v != '0':\n",
+ " fp.write(v)\n",
+ " v = raw_input(\"Enter Numbers\")\n",
+ " \n",
+ " #open the file to see the result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.16, Page number: 470<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read integers from the file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('num.txt','r')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"File does not exist\\n\")\n",
+ "else:\n",
+ " for v in fp:\n",
+ " print v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1 2 3 4 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.17, Page number: 471<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write a block of structure elements to the given file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class student:\n",
+ " name = ''\n",
+ " age = 0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "stud = [student() for i in range(0,5)]\n",
+ "\n",
+ "#Open file\n",
+ "file1 = raw_input(\"Enter the file name : \")\n",
+ "fp = open(file1,'w')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"File does not exist\\n\")\n",
+ "else:\n",
+ " n = int(raw_input(\"How Many Records : \"))\n",
+ " for i in range(0,n):\n",
+ " stud[i].name = raw_input(\"Name : \")\n",
+ " stud[i].age = int(raw_input(\"Age : \"))\n",
+ " \n",
+ " j = 0\n",
+ " while j < n:\n",
+ " fp.write(\"%s %d\\n\"%(stud[j].name,stud[j].age))\n",
+ " j += 1\n",
+ " \n",
+ " fp.close()\n",
+ " \n",
+ " #open the file to see the result"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.18, Page number: 472<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write and read the information about the player \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class record:\n",
+ " player = ''\n",
+ " age = 0\n",
+ " runs = 0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "emp = record()\n",
+ "\n",
+ "#Open file\n",
+ "fp = open('record.dat','w')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Can not open the file\\n\")\n",
+ "else:\n",
+ " emp.player = raw_input(\"Enter Player Name\")\n",
+ " emp.age = int(raw_input(\"Enter Age\"))\n",
+ " emp.runs = int(raw_input(\"Enter runs scored\"))\n",
+ " fp.write(\"%s %d %d\"%(emp.player,emp.age,emp.runs))\n",
+ " fp.close()\n",
+ " \n",
+ " fp = open('record.dat','r')\n",
+ " if fp == 0:\n",
+ " sys.stdout.write(\"Error in opening file\")\n",
+ " else:\n",
+ " sys.stdout.write(\"\\nRecord Entered is\\n\")\n",
+ " emp.player,emp.age,emp.runs = fp.read().split(' ')\n",
+ " sys.stdout.write(\"\\n%s %s %s\"%(emp.player,emp.age,emp.runs))\n",
+ " fp.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Player NameSachin\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Age25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter runs scored10000\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Record Entered is\n",
+ "\n",
+ "Sachin 25 10000"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.19, Page number: 473<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Write a block of structure elements to the given file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "next1 = 'Y'\n",
+ "\n",
+ "#Class declaration\n",
+ "class bike:\n",
+ " name = ''\n",
+ " avg = 0\n",
+ " cost = 0.0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "e = bike()\n",
+ "\n",
+ "#open file\n",
+ "fp = open('bk.txt','wb')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " while next1 == 'Y':\n",
+ " e.name = raw_input(\"Model Name\")\n",
+ " e.avg = int(raw_input(\"Average\"))\n",
+ " e.cost = float(raw_input(\"Price\"))\n",
+ " fp.write(\"%s %d %f\\n\"%(e.name,e.avg,e.cost))\n",
+ " \n",
+ " next1 = raw_input(\"Add Another (Y/N):\")\n",
+ " fp.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Model NameHONDA\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average80\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Price45000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Add Another (Y/N):Y\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Model NameSUZUKI\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average65\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Price43000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Add Another (Y/N):Y\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Model NameYAMAHA\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average55\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Price48000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Add Another (Y/N):N\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.20, Page number: 474<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the information about the bike \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class bike:\n",
+ " name = ''\n",
+ " avg = 0\n",
+ " cost = 0.0\n",
+ " \n",
+ "#Class variable declaration\n",
+ "e = bike()\n",
+ "\n",
+ "#open file\n",
+ "fp = open('bk.txt','rb')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Cannot open file\")\n",
+ "else:\n",
+ " lines = fp.readlines()\n",
+ " for line in lines:\n",
+ " e.name,e.avg,e.cost = line.split(' ')\n",
+ " e.avg = int(e.avg)\n",
+ " e.cost = float(e.cost)\n",
+ " sys.stdout.write(\"\\n%s %d %.2f\"%(e.name,e.avg,e.cost))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "HONDA 80 45000.00\n",
+ "SUZUKI 65 43000.00\n",
+ "YAMAHA 55 48000.00"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.21, Page number: 476<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the text after skipping n characters from beginning of the file\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open(\"text.txt\",\"r\")\n",
+ "\n",
+ "sys.stdout.write(\"\\nContents of file\\n\")\n",
+ "ch = fp.read()\n",
+ "sys.stdout.write(\"%s\"%(ch))\n",
+ "\n",
+ "#Read n\n",
+ "n = int(raw_input(\"How many characters including spaces would you like to skip?\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nInformation after %d bytes\\n\"%(n))\n",
+ "\n",
+ "ch = ch[n:]\n",
+ "sys.stdout.write(\"%s\"%(ch))\n",
+ "\n",
+ "fp.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Contents of file\n",
+ "THE C PROGRAMMING LANGUAGE INVENTED BY DENNIS RITCHIE"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many characters including spaces would you like to skip?18\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Information after 18 bytes\n",
+ "LANGUAGE INVENTED BY DENNIS RITCHIE"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.22, Page number: 477<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read last few characters of the file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open(\"text.txt\",\"r\")\n",
+ "\n",
+ "sys.stdout.write(\"\\nContents of file\\n\")\n",
+ "ch = fp.read()\n",
+ "sys.stdout.write(\"%s\"%(ch))\n",
+ "\n",
+ "#Read n\n",
+ "n = int(raw_input(\"How many characters including spaces would you like to skip?\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nInformation after %d bytes\\n\"%(n))\n",
+ "\n",
+ "print ch[-n:]\n",
+ "\n",
+ "fp.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Contents of file\n",
+ "HELLO WORLD"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many characters including spaces would you like to skip?5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Information after 5 bytes\n",
+ "WORLD\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.23, Page number: 477<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display 'c' program files in current directory. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "l = 0\n",
+ "c = 0\n",
+ "\n",
+ "#Open file\n",
+ "file1 = raw_input(\"Enter the file name : \")\n",
+ "fp = open(file1,'r')\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nContents of 'c' program file in capital case\")\n",
+ "sys.stdout.write(\"\\n============================================\\n\")\n",
+ "\n",
+ "ch = fp.readlines()\n",
+ "\n",
+ "for line in ch:\n",
+ " i = 0\n",
+ " #print line.upper()\n",
+ " while i < len(line):\n",
+ " if line[i] =='\\n':\n",
+ " l += 1\n",
+ " else:\n",
+ " c += 1\n",
+ " sys.stdout.write(\"%c\"%(line[i].upper()))\n",
+ " i += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nTotal Characters : %d\"%(c))\n",
+ "sys.stdout.write(\"\\nTotal Lines : %d\"%(l))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Contents of 'c' program file in capital case\n",
+ "============================================\n",
+ "MAIN()\n",
+ "{\n",
+ "PRINTF(\" HELLO WORLD\");\n",
+ "}\n",
+ "\n",
+ "Total Characters : 31\n",
+ "Total Lines : 4"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.24, Page number: 479<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect the end of file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open(\"text.txt\",\"r\")\n",
+ "\n",
+ "#there is no feof() function in python\n",
+ "c = fp.tell()\n",
+ "sys.stdout.write(\"File pointer at the beginning of the file : %d\\n\"%(c))\n",
+ "\n",
+ "c = fp.read()\n",
+ "sys.stdout.write(\"%s\"%(c))\n",
+ "\n",
+ "c = fp.tell()\n",
+ "sys.stdout.write(\"\\nFile pointer at the end of file : %d\"%(c))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "File pointer at the beginning of the file : 0\n",
+ "TECHNOCRATS LEAD THE WORLD \n",
+ "File pointer at the end of file : 32"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.25, Page number: 480<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect an error while read/write operation of a file is in use.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "next1 = 'Y'\n",
+ "\n",
+ "#open file\n",
+ "fp = open('marks.dat','r')\n",
+ "\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Can not open file\")\n",
+ "else:\n",
+ " while next1 == 'Y':\n",
+ " name = raw_input(\"Enter Name, Marks, Percentage\")\n",
+ " marks = int(raw_input(\"Enter Name, Marks, Percentage\"))\n",
+ " \n",
+ " p = marks/7\n",
+ " try:\n",
+ " fp.write(\"%s %d %f\"%(name,marks,p))\n",
+ " except:\n",
+ " sys.stdout.write(\"\\nUnable to write data?\")\n",
+ " sys.stdout.write(\"\\nFile opening mode is incorrect.\")\n",
+ " fp.close()\n",
+ " \n",
+ " next1 = raw_input(\"Continue Y/N:\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name, Marks, PercentageKAMAL\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name, Marks, Percentage540\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Unable to write data?\n",
+ "File opening mode is incorrect."
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Continue Y/N:N\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.26, Page number: 481<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Catch the error that is occurred while file operation\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "f = open(\"io8.c\",\"w\")\n",
+ "\n",
+ "if f == 0:\n",
+ " sys.stdout.write(\"\\nCannot open file\")\n",
+ "else:\n",
+ " #Exception handling\n",
+ " try:\n",
+ " c = fp.readlines()\n",
+ " sys.stdout.write(\"%s\"%(c))\n",
+ " except:\n",
+ " sys.stdout.write(\"\\nCan't read file.\")\n",
+ "#There is no ferror() function python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Can't read file."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.27, Page number: 482<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect and print the error message\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "file1 = \"lines.txt\"\n",
+ "\n",
+ "#Open file\n",
+ "fr = open(file1,\"w\")\n",
+ "\n",
+ "sys.stdout.write(\"%s : \"%(file1))\n",
+ "#Exception handling\n",
+ "try:\n",
+ " c = fp.readlines()\n",
+ "except:\n",
+ " sys.stdout.write(\"Permission Denied\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lines.txt : Permission Denied"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.28, Page number: 482<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the current position of the file pointer \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Open file\n",
+ "fp = open(\"text.txt\",\"r\")\n",
+ "\n",
+ "#Set the pointer\n",
+ "fp.seek(21)\n",
+ "\n",
+ "#Result\n",
+ "while True:\n",
+ " c = fp.read(1)\n",
+ " if not c:\n",
+ " break\n",
+ " sys.stdout.write(\"%c\\t%d\\n\"%(c,fp.tell()))\n",
+ "#There is no endof file in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W\t22\n",
+ "O\t23\n",
+ "R\t24\n",
+ "L\t25\n",
+ "D\t26\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.29, Page number: 483<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect beginning of file\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#open file\n",
+ "fp = open(\"text.txt\",\"r\")\n",
+ "\n",
+ "fp.seek(12)\n",
+ "sys.stdout.write(\"Pointer is at %d\\n\"%(fp.tell()))\n",
+ "sys.stdout.write(\"Before rewind() : \")\n",
+ "\n",
+ "#Result\n",
+ "while True:\n",
+ " c = fp.read(1)\n",
+ " if not c:\n",
+ " break\n",
+ " sys.stdout.write(\"%c\"%(c))\n",
+ " \n",
+ "sys.stdout.write(\"\\nAfter rewind() : \")\n",
+ "fp.seek(0)\n",
+ "#There is no rewind function in python\n",
+ "\n",
+ "while True:\n",
+ " c = fp.read(1)\n",
+ " if not c:\n",
+ " break\n",
+ " sys.stdout.write(\"%c\"%(c))\n",
+ " \n",
+ "fp.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pointer is at 12\n",
+ "Before rewind() : LEAD THE WORLD\n",
+ "After rewind() : TECHNOCRATS LEAD THE WORLD"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.30, Page number: 484<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Delete the given file \n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "\n",
+ "#Read file name\n",
+ "file1 = raw_input(\"Enter The File Name : \")\n",
+ "\n",
+ "#There is no remove or unlink file function in python.\n",
+ "#A file can be deleted using remove function in the os module.\n",
+ "\n",
+ "try:\n",
+ " os.remove(file1)\n",
+ " sys.stdout.write(\"\\nFile (%s) has been deleted!\"%(file1))\n",
+ "except:\n",
+ " sys.stdout.write(\"\\nFile does not exist\")\n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "File (TEXT.TXT) has been deleted!"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.31, Page number: 485<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Change the name of the file\n",
+ "\n",
+ "import os\n",
+ "import sys\n",
+ "\n",
+ "old = raw_input(\"Old File Name : \")\n",
+ "\n",
+ "new = raw_input(\"New File Name : \")\n",
+ "\n",
+ "os.rename(old, new)\n",
+ "\n",
+ "#Check the directory to see the result\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.32, Page number: 486<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy the contents of one file to another file\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "fs = open(\"a.txt\",\"r\")\n",
+ "ft = open(\"b.txt\",\"w\")\n",
+ "c = 0\n",
+ "\n",
+ "if fs == 0:\n",
+ " sys.stdout.write(\"\\nSource file opening error.\")\n",
+ "else:\n",
+ " if ft == 0:\n",
+ " sys.stdout.write(\"\\nTarget file opening error.\")\n",
+ " else:\n",
+ " while True:\n",
+ " ch = fs.read(1)\n",
+ " if not ch:\n",
+ " break\n",
+ " ft.write(\"%c\"%(ch))\n",
+ " c += 1\n",
+ " sys.stdout.write(\"\\n%d Bytes copied from 'a.txt' to 'b.txt'.\"%(c))\n",
+ " c = 0\n",
+ " #there is no fcloseall() function in python\n",
+ " fs.close()\n",
+ " c += 1\n",
+ " ft.close()\n",
+ " c += 1\n",
+ " sys.stdout.write(\"\\n%d files closed.\"%(c))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "45 Bytes copied from 'a.txt' to 'b.txt'.\n",
+ "2 files closed."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.33, Page number: 487<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the contents of three files and find the largest file\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "y = 0\n",
+ "k = 0\n",
+ "t = 0\n",
+ "name = [\"1.txt\",\"2.txt\",\"3.txt\"]\n",
+ "f = [0 for i in range(0,3)]\n",
+ "x = [0 for i in range(0,3)]\n",
+ "\n",
+ "#Open all the files\n",
+ "for l in range(0,3):\n",
+ " fp = open(name[l],\"r\")\n",
+ " f[l] = fp\n",
+ " if fp == 0:\n",
+ " sys.stdout.write(\"\\n%s file not found.\"%(name[l]))\n",
+ " break\n",
+ " \n",
+ "#Read contents of all files\n",
+ "for l in range(0,3):\n",
+ " while True:\n",
+ " c1 = f[l].read(1)\n",
+ " if not c1:\n",
+ " break\n",
+ " x[l] = y\n",
+ " y += 1\n",
+ " y = 0\n",
+ "\n",
+ "#close the files\n",
+ "for l in range(0,3):\n",
+ " f[l].close()\n",
+ "\n",
+ "#Print size of all files\n",
+ "for l in range(0,2+1):\n",
+ " sys.stdout.write(\"File : %s Bytes : %d\\n\"%(name[l],x[l]))\n",
+ " t = t + x[l]\n",
+ " \n",
+ "#Find largest\n",
+ "for l in range(t,1,-1):\n",
+ " for k in range(0,3):\n",
+ " if l == x[k]:\n",
+ " sys.stdout.write(\"\\n%s are the largest file.\"%(name[k]))\n",
+ " break\n",
+ " if l == x[k]:\n",
+ " break"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "File : 1.txt Bytes : 16\n",
+ "File : 2.txt Bytes : 20\n",
+ "File : 3.txt Bytes : 25\n",
+ "\n",
+ "3.txt are the largest file."
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.34, Page number: 488<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy 100 characters from a file to an array\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "SIZE = 100\n",
+ "s = 0\n",
+ "x = 0\n",
+ "ch = ['0' for i in range(0,100)]\n",
+ "\n",
+ "#Open the files\n",
+ "f = open(\"poem.txt\",\"r\")\n",
+ "f2 = open(\"alpha.txt\",\"w\")\n",
+ "\n",
+ "if f ==0 or f2 == 0:\n",
+ " sys.stdout.write(\"?\")\n",
+ "else:\n",
+ " while True:\n",
+ " c = f.read(1)\n",
+ " x += 1\n",
+ " if not c:\n",
+ " break\n",
+ " else:\n",
+ " if x == 99:\n",
+ " break\n",
+ " else:\n",
+ " ch[s] = c\n",
+ " s += 1\n",
+ "\n",
+ "for s in range(0,100):\n",
+ " f2.write(\"%c\"%(ch[s]))\n",
+ "\n",
+ "sys.stdout.write(\"Process Completed : Error 0\")\n",
+ "f.close()\n",
+ "f2.close()\n",
+ "\n",
+ "#There is no perror() function in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Process Completed : Error 0"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.35, Page number: 491<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Low level disk I/O operations.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "file1 = raw_input(\"Enter a file name : \")\n",
+ "\n",
+ "#Open file\n",
+ "s = open(file1,\"w\")\n",
+ "\n",
+ "#Result\n",
+ "if s == -1:\n",
+ " sys.stdout.write(\"File does not exits\")\n",
+ "else:\n",
+ " buff = raw_input(\"Enter text below:\")\n",
+ " s.write(\"%s\"%(buff))\n",
+ " s.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a file name : TEXT\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter text below:PROGRAMMING IN C\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.36, Page number: 492<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read text from a specified file \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "file1 = raw_input(\"Enter a file name \")\n",
+ "\n",
+ "#open file\n",
+ "s = open(file1,\"r\")\n",
+ "\n",
+ "#Result\n",
+ "if s == -1:\n",
+ " sys.stdout.write(\"File does not exists\")\n",
+ "else:\n",
+ " while True:\n",
+ " ch = s.read(1)\n",
+ " if not ch:\n",
+ " break\n",
+ " sys.stdout.write(\"%c\"%(ch))\n",
+ " \n",
+ "s.close()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a file name TEXT\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "PROGRAMMING IN C"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.37, Page number: 493<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Set a buffer size \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nThis book teaches C\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "This book teaches C"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.38, Page number: 494<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display number of arguments and their names\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nTotal number of arguments are %d\\n\"%(len(sys.argv)))\n",
+ "\n",
+ "print str(sys.argv)\n",
+ "\n",
+ "#Command line arguments can be given in python by the command\n",
+ "\n",
+ "# python pgmname.py arg1 arg2 arg3\n",
+ "\n",
+ "#This is not possible in ipython notebook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.39, Page number: 495<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read any file from command prompt\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#open file\n",
+ "fp = open(sys.argv[1],\"r\")\n",
+ "\n",
+ "#Result\n",
+ "if fp == 0:\n",
+ " sys.stdout.write(\"Can not open file\")\n",
+ "else:\n",
+ " while True:\n",
+ " ch = fp.read(1)\n",
+ " if not ch:\n",
+ " break\n",
+ " sys.stdout.write(\"%c\"%(ch))\n",
+ " \n",
+ "fp.close()\n",
+ "\n",
+ "#This program can be run in python as\n",
+ "\n",
+ "# python pgmname.py filename"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.40, Page number: 495<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Command line argument to perform the task of DEL command\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Check number of arguments\n",
+ "if len(sys.argv) < 2:\n",
+ " sys.stdout.write(\"Insufficient Arguments\")\n",
+ "else:\n",
+ " fp = open(sys.argv[1],\"r\")\n",
+ " if fp == 0:\n",
+ " sys.stdout.write(\"File Not Found\")\n",
+ " fp.close()\n",
+ " os.remove(sys.argv[1])\n",
+ " sys.stdout.write(\"File has been deleted\")\n",
+ " \n",
+ "#This program can be deleted using\n",
+ "# python pgmname.py filename\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.41, Page number: 496<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Command line argument to perform the task of REN command\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Check number of arguments\n",
+ "if len(sys.srgv) < 3:\n",
+ " sys.stdout.write(\"Insufficient Arguments\")\n",
+ "else:\n",
+ " fp = open(sys.argv[1],\"r\")\n",
+ " if fp == 0:\n",
+ " sys.stdout.write(\"File Not Found\")\n",
+ " else:\n",
+ " sp = open(sys.argv[2],\"r\")\n",
+ " if sp == 0:\n",
+ " fp.close()\n",
+ " sp.close()\n",
+ " #Rename file\n",
+ " os.rename(sys.argv[1],sys.argv[2])\n",
+ " else:\n",
+ " sys.stdout.write(\"Duplicate file name or file is in use\")\n",
+ " \n",
+ "#This program can be executed as\n",
+ "\n",
+ "# python pgmname.py oldfilename newfilename\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.42, Page number: 497<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Environment variable and display the various settings.\n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "\n",
+ "#Result\n",
+ "print os.environ\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "{'TMP': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Local\\\\Temp', 'COMPUTERNAME': 'AATHIRA-PC', 'GUROBI_HOME': 'B:\\\\gurobi510\\\\win32', 'USERDOMAIN': 'Aathira-PC', 'PSMODULEPATH': 'C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules\\\\', 'COMMONPROGRAMFILES': 'C:\\\\Program Files (x86)\\\\Common Files', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 15 Stepping 13, GenuineIntel', 'PROGRAMFILES': 'C:\\\\Program Files (x86)', 'PROCESSOR_REVISION': '0f0d', 'SYSTEMROOT': 'C:\\\\Windows', 'PATH': 'C:\\\\Anaconda\\\\lib\\\\site-packages\\\\numpy\\\\core;B:\\\\gurobi510\\\\win32\\\\bin;C:\\\\Windows\\\\system32;C:\\\\Windows;C:\\\\Windows\\\\System32\\\\Wbem;C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\Program Files (x86)\\\\Common Files\\\\Adobe\\\\AGL;C:\\\\Program Files\\\\MATLAB\\\\R2009a\\\\bin;C:\\\\Program Files\\\\MATLAB\\\\R2009a\\\\bin\\\\win64;c:\\\\python27\\\\scripts;C:\\\\Program Files (x86)\\\\MiKTeX 2.9\\\\miktex\\\\bin\\\\;C:\\\\Anaconda;C:\\\\Anaconda\\\\Scripts;C:\\\\Program Files (x86)\\\\ffmpeg', 'CLICOLOR': '1', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'COMSPEC': 'C:\\\\Windows\\\\system32\\\\cmd.exe', 'TK_LIBRARY': 'C:\\\\Anaconda\\\\tcl\\\\tk8.5', 'TERM': 'xterm-color', 'TEMP': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Local\\\\Temp', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'PROCESSOR_ARCHITECTURE': 'x86', 'TIX_LIBRARY': 'C:\\\\Anaconda\\\\tcl\\\\tix8.4.3', 'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'LOCALAPPDATA': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Local', 'HOMEPATH': '\\\\Users\\\\Aathira', 'PROGRAMW6432': 'C:\\\\Program Files', 'USERNAME': 'Aathira', 'LOGONSERVER': '\\\\\\\\AATHIRA-PC', 'SESSIONNAME': 'Console', 'PROGRAMDATA': 'C:\\\\ProgramData', 'TCL_LIBRARY': 'C:\\\\Anaconda\\\\tcl\\\\tcl8.5', 'GIT_PAGER': 'cat', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'FP_NO_HOST_CHECK': 'NO', 'WINDIR': 'C:\\\\Windows', 'APPDATA': 'C:\\\\Users\\\\Aathira\\\\AppData\\\\Roaming', 'HOMEDRIVE': 'C:', 'PAGER': 'cat', 'SYSTEMDRIVE': 'C:', 'NUMBER_OF_PROCESSORS': '2', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_ARCHITEW6432': 'AMD64', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'OS': 'Windows_NT', 'PUBLIC': 'C:\\\\Users\\\\Public', 'USERPROFILE': 'C:\\\\Users\\\\Aathira'}\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.43, Page number: 498<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read character from keyboard \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "c = '0'\n",
+ "\n",
+ "#Result\n",
+ "while c != ' ':\n",
+ " c = raw_input(\"\")\n",
+ " sys.stdout.write(\"%c \"%(c))\n",
+ " \n",
+ "#Give space at the end"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1 2 "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3 4 "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5 6 "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "7 8 "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "9 "
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.44, Page number: 499<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display A to Z characters\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "for a in range(65,91):\n",
+ " sys.stdout.write(\"%c\\t\"%(chr(a)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A\tB\tC\tD\tE\tF\tG\tH\tI\tJ\tK\tL\tM\tN\tO\tP\tQ\tR\tS\tT\tU\tV\tW\tX\tY\tZ\t"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter3.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter3.ipynb
new file mode 100755
index 00000000..880e4fac
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter3.ipynb
@@ -0,0 +1,1060 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 3: Operators and Expressions<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.1, Page number: 22<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to demonstrate the use of Comma operator\n",
+ "\n",
+ "#Result\n",
+ "print \"Addition = \",2+3,\" \\nSubtraction = \",5-4"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Addition = 5 \n",
+ "Subtraction = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.2, Page number: 23<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to demonstrate the use of Conditional operator with two values\n",
+ "\n",
+ "#Result\n",
+ "#in python if..else statement can be written similar to conditional operator\n",
+ "#prints Result = 4 if 2 == 3, otherwise Result = 5\n",
+ "\n",
+ "print \"Result = \",4 if 2==3 else 5"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Result = 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.3, Page number: 23<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to use Conditional operator with two statements\n",
+ "\n",
+ "#Result\n",
+ "#in python if..else statement can be written similar to conditional operator\n",
+ "#prints True if 3>2, otherwise prints False\n",
+ "\n",
+ "print \"True\" if 3>2 else \"False\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "True\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.4, Page number: 25<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to use increment operator as prefix\n",
+ "\n",
+ "#Variable declaration\n",
+ "x = 10\n",
+ "y = 20\n",
+ "\n",
+ "#Calculation\n",
+ "#there is no ++/-- operator in python\n",
+ "\n",
+ "z = x * y\n",
+ "y += 1\n",
+ "a = x * y\n",
+ "\n",
+ "#Result\n",
+ "print z,\" \",a"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "200 210\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.5, Page number: 25<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to use increment operator as prefix\n",
+ "\n",
+ "#Variable declaration\n",
+ "x = 10\n",
+ "y = 20\n",
+ "\n",
+ "#Calculation\n",
+ "#there is no ++/-- operator in python\n",
+ "\n",
+ "y += 1\n",
+ "z = x * y\n",
+ "a = x * y\n",
+ "\n",
+ "#Result\n",
+ "print z,\" \",a"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "210 210\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.6, Page number: 26<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to find the size and address of integer and float variables\n",
+ "\n",
+ "#import python module\n",
+ "#sys python module is required for getsizeof() function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "#No specific float type variable declaration is available in python. If we\n",
+ "#assign a floating point value to a variable,\n",
+ "#it will be treated as floating point variable\n",
+ "x = 2\n",
+ "y = 2.0\n",
+ "\n",
+ "#Result\n",
+ "#In python, integer variable uses 12 bytes and float variable uses 16 bytes of\n",
+ "#memory to store the variables\n",
+ "#sys.getsizeof() function returns the size of variable in bytes which is similar\n",
+ "#to sizeof() operator\n",
+ "#id() function returns the address of variables which is similar to '&' operator\n",
+ "\n",
+ "print \"Size (x) = \",sys.getsizeof(x)\n",
+ "print \"Size (y) = \",sys.getsizeof(y)\n",
+ "print \"Address of x = \",id(x),\"and y = \",id(y)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Size (x) = 12\n",
+ "Size (y) = 16\n",
+ "Address of x = 5626076 and y = 54761072\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.7, Page number: 27<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to use various relational operators and display their return values\n",
+ "\n",
+ "#Result\n",
+ "#int() function is used to convert the boolean return value of the relational\n",
+ "#expression to integer/binary\n",
+ "\n",
+ "print \"Condition : Return Values\"\n",
+ "print \"10 != 10 : \",int(10 != 10)\n",
+ "print \"10 == 10 : \",int(10 == 10)\n",
+ "print \"10 >= 10 : \",int(10 >= 10)\n",
+ "print \"10 <= 100 : \",int(10 <= 100)\n",
+ "print \"10 != 9 : \",int(10 != 9)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Condition : Return Values\n",
+ "10 != 10 : 0\n",
+ "10 == 10 : 1\n",
+ "10 >= 10 : 1\n",
+ "10 <= 100 : 1\n",
+ "10 != 9 : 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.8, Page number: 28<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program uses conditional operator to determine the value of 'b'depending the inputted value of 'a'\n",
+ "\n",
+ "#Reads Input value for a\n",
+ "\n",
+ "a = raw_input(\"Enter Any Integer either above 5 or below 5 :-\")\n",
+ "a = int(a)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Calculation\n",
+ "#Assigns b = 3 if a > 5, otherwise b = 4\n",
+ "b = 3 if a > 5 else 4\n",
+ "\n",
+ "#Result\n",
+ "print \"Calculated Value of b is :- \",b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Any Integer either above 5 or below 5 :-6\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calculated Value of b is :- 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.9, Page number: 28<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to determine the value of 'b' using conditional operator\n",
+ "\n",
+ "#Input\n",
+ "\n",
+ "a = raw_input(\"Enter Any Integer either above 5 or below 5 :-\")\n",
+ "a = int(a)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Calculation\n",
+ "#Assigns b = 3 if a == 5, otherwise b = 4\n",
+ "b = 3 if a == 5 else 4\n",
+ "\n",
+ "#Result\n",
+ "print \"Calculated Value of b is :- \",b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Any Integer either above 5 or below 5 :-3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calculated Value of b is :- 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.10, Page number: 29<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read three variables x, y and z and Using conditional statements, evaluate\n",
+ "#values of variables a, b and c.\n",
+ "#Perform the sum with two sets of variables. Check whether the sums are equal or not\n",
+ "#and print appropriate messages.\n",
+ "\n",
+ "\n",
+ "#Reads three Input values for x,y and z\n",
+ "\n",
+ "x = raw_input(\"Enter Value of x \")\n",
+ "x = int(x)\n",
+ "\n",
+ "y = raw_input(\"Enter Value of y \")\n",
+ "y = int(y)\n",
+ "\n",
+ "z = raw_input(\"Enter Value of z \")\n",
+ "z = int(z)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Calculation\n",
+ "#Assigns a = 3 if x >= 5, otherwise a = 4\n",
+ "a = 3 if x >= 5 else 4\n",
+ "\n",
+ "#Result\n",
+ "print \"Calculated Value of a is :- \",a\n",
+ "\n",
+ "#Calculation\n",
+ "#Assigns b = 10 if y <= 8, otherwise b = 9\n",
+ "b = 10 if y <= 8 else 9\n",
+ "\n",
+ "#Result\n",
+ "print \"Calculated Value of b is :- \",b\n",
+ "\n",
+ "#Calculation\n",
+ "#Assigns c = 20 if z == 10, otherwise c = 30\n",
+ "c = 20 if z == 10 else 30\n",
+ "\n",
+ "#Result\n",
+ "print \"Calculated Value of c is :- \",c\n",
+ "\n",
+ "#Calculation\n",
+ "m = x + y + z\n",
+ "n = a + b + c\n",
+ "\n",
+ "#Result\n",
+ "print \"Addition of x,y,z is \",m,\"(m)\"\n",
+ "print \"Addition of a,b,c is \",n,\"(n)\"\n",
+ "print \"m & n NOT EQUAL\" if m != n else \"m & n ARE EQUAL\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of x 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of y 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of z 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calculated Value of a is :- 3\n",
+ "Calculated Value of b is :- 10\n",
+ "Calculated Value of c is :- 30\n",
+ "Addition of x,y,z is 14 (m)\n",
+ "Addition of a,b,c is 43 (n)\n",
+ "m & n NOT EQUAL\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.11, Page number: 30<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use of logical operators\n",
+ "\n",
+ "#Result\n",
+ "#In python, not equal to can be represented using both != and <>.\n",
+ "\n",
+ "print \"Condition : Return Values\"\n",
+ "print \"5 > 3 && 5 < 10 : \",int(5 > 3 & 5 < 10)\n",
+ "print \"8 > 5 || 8 < 2 : \",int(8 > 5 | 8 < 2)\n",
+ "print \"!(8 == 8) : \",int(8 != 8)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Condition : Return Values\n",
+ "5 > 3 && 5 < 10 : 1\n",
+ "8 > 5 || 8 < 2 : 0\n",
+ "!(8 == 8) : 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.12, Page number: 30<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print logic 1 if input character is capital otherwise 0\n",
+ "\n",
+ "#Import\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#raw_input() function is used to read a character from the keyboard in Python 2.7\n",
+ "#ord() function converts the character into its corresponding ASCII integer\n",
+ "\n",
+ "\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Enter a Character : \")\n",
+ "x = ord(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Condition\n",
+ "y = 1 if (x >= 65) and (x <= 90) else 0\n",
+ "\n",
+ "#Result\n",
+ "print \"Y : \",y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Character : A\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Y : 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.13, Page number: 31<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display logic 0 if one reads a character through keyboard otherwise logic 1.\n",
+ "#ASCII values for 0 to 9 are 48 to 57 respectively\n",
+ "\n",
+ "#Variable initialization\n",
+ "#raw_input() function is used to read a character from the keyboard in Python 2.7\n",
+ "#ord() function converts the character into its corresponding ASCII integer\n",
+ "\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Enter The Character or Integer : \")\n",
+ "x = ord(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Condition\n",
+ "y = 1 if (x >= 48) and (x <= 57) else 0\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Y = \",y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The Character or Integer : A\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Y = 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.14, Page number: 32<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display 1 if inputted number is between 1-100 otherwise 0.\n",
+ "#Use the logical AND operator\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Enter numbers : \")\n",
+ "x = int(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Condition\n",
+ "z = 1 if (x >= 1) and (x <= 100) else 0\n",
+ "\n",
+ "#Result\n",
+ "print \"Z = \",z"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Z = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.15, Page number: 32<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display 1 if inputted number is either 1 or 100 otherwise 0.\n",
+ "#Use the logical OR operator\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Enter numbers : \")\n",
+ "x = int(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Condition\n",
+ "z = 1 if (x == 1) or (x == 100) else 0\n",
+ "\n",
+ "#Result\n",
+ "print \"Z = \",z"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers : 1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Z = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.16, Page number: 33<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display 1 if inputted number is except 100 otherwise 0.\n",
+ "#Use the logical NOT operator\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Enter number : \")\n",
+ "x = int(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Condition\n",
+ "z = 1 if (x != 100) else 0\n",
+ "\n",
+ "#Result\n",
+ "print \"Z : \",z"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter number : 100\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Z : 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.17, Page number: 33<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Shift inputted data by two bits right\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Read The Integer from keyboard (x) :- \")\n",
+ "x = int(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#bitwise shifting\n",
+ "x >>= 2\n",
+ "y = x\n",
+ "\n",
+ "#Result\n",
+ "print \"The Right shifted data is = \",y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integer from keyboard (x) :- 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Right shifted data is = 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.18, Page number: 34<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Shift inputted data by two bits to the left\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "x = raw_input(\"Read The Integer from keyboard (x) :- \")\n",
+ "x = int(x)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#bitwise shifting\n",
+ "x <<= 3\n",
+ "y = x\n",
+ "\n",
+ "#Result\n",
+ "print \"The Left shifted data is = \",y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integer from keyboard (x) :- 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Left shifted data is = 16\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.19, Page number: 35<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use bitwise AND operator between the two integers and display the results\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "a = raw_input(\"Read The Integers from keyboard (a & b) :- \")\n",
+ "a = int(a)\n",
+ "\n",
+ "b = raw_input(\"Read The Integers from keyboard (a & b) :- \")\n",
+ "b = int(b)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#bitwise operation\n",
+ "c = a & b\n",
+ "\n",
+ "#Result\n",
+ "print \"The Answer after ANDing is (C) = \",c"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integers from keyboard (a & b) :- 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integers from keyboard (a & b) :- 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Answer after ANDing is (C) = 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.20, Page number: 37<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#operate OR operation on two integers and display the result\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "a = raw_input(\"Read The Integers from keyboard (a & b) :- \")\n",
+ "a = int(a)\n",
+ "\n",
+ "b = raw_input(\"Read The Integers from keyboard (a & b) :- \")\n",
+ "b = int(b)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#bitwise operation\n",
+ "c = a | b\n",
+ "\n",
+ "#Result\n",
+ "print \"The Oring operation betwen a & b in c = \",c"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integers from keyboard (a & b) :- 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integers from keyboard (a & b) :- 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Oring operation betwen a & b in c = 12\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.21, Page number: 38<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exclusive OR operation between the two integers and display the result\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for x\n",
+ "\n",
+ "a = raw_input(\"Read The Integers from keyboard (a & b) :- \")\n",
+ "a = int(a)\n",
+ "\n",
+ "b = raw_input(\"Read The Integers from keyboard (a & b) :- \")\n",
+ "b = int(b)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#bitwise operation\n",
+ "c = a ^ b\n",
+ "\n",
+ "#Result\n",
+ "print \"The data after Exclusive OR operation is in c = \",c"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integers from keyboard (a & b) :- 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Read The Integers from keyboard (a & b) :- 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The data after Exclusive OR operation is in c = 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter4.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter4.ipynb
new file mode 100755
index 00000000..758457a3
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter4.ipynb
@@ -0,0 +1,972 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 4: Input & Output in C<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.1, Page number: 47<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#show the effect of mismatch of data types\n",
+ "\n",
+ "#Reads Input value for a\n",
+ "\n",
+ "a = raw_input(\"Enter value of 'A' : \")\n",
+ "a = int(a)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "print \"A = \",a\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of 'A' : 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A = 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.2, Page number: 47<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#show the effect of mismatch of data types\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#Reads Input value for a\n",
+ "\n",
+ "a = raw_input(\"Enter value of 'A' : \")\n",
+ "a = int(a)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#there is no char datatype of 1 byte size in python.\n",
+ "#python has string variable only.\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "sys.stdout.write(\"A = %d\"%(a%256))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of 'A' : 256\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A = 0"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.3, Page number: 49<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#show the effect of various escape sequences\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = 1\n",
+ "b = a + 1\n",
+ "c = b + 1\n",
+ "d = c + 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write ('\\tA = %d\\nB = %d \\'C = %d\\''%(a,b,c))\n",
+ "sys.stdout.write ('\\n**D = %d**'%(d))\n",
+ "sys.stdout.write ('\\nA = %d B = %d'%(a,b))\n",
+ "sys.stdout.write ('\\r******')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\tA = 1\n",
+ "B = 2 'C = 3'\n",
+ "**D = 4**\n",
+ "A = 1 B = 2******"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.4, Page number: 50<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#print the third power of 2 using pow() function.\n",
+ "#assume the floating point numbers\n",
+ "\n",
+ "#Variable initialization\n",
+ "x = 2.0\n",
+ "y = 3.0\n",
+ "\n",
+ "#Result\n",
+ "print '%lf raised to %lf is %lf\\n' %(x,y,pow(x,y))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2.000000 raised to 3.000000 is 8.000000\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.5, Page number: 50<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#print the third power of 10 using pow() function.\n",
+ "#assume the floating point numbers\n",
+ "\n",
+ "#Variable initialization\n",
+ "p = 3\n",
+ "\n",
+ "#Result\n",
+ "#There is no pow10() function in Python.\n",
+ "print 'Ten raised to %lf is %lf\\n' %(p,pow(10,p))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ten raised to 3.000000 is 1000.000000\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.6, Page number: 51<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#detect an error while inputting a data. Use return value of scanf() statement.\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python,the map(int,a.split()) function splits the input characters\n",
+ "#and converts it into integers and returns a value if all the values are integers\n",
+ "#otherwise an exception will be generated and initializes v as 0.\n",
+ "#using exception handling, this result can be achieved.\n",
+ "\n",
+ "\n",
+ "#Exception handling\n",
+ "try:\n",
+ " a = raw_input(\"Enter value of 'A','B' & 'C' : \")\n",
+ " v = map(int,a.split())\n",
+ "except:\n",
+ " v = 0\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "print '\\nError In Inputting.' if v < 3 else '\\nValues Successfully read.'\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of 'A','B' & 'C' : 1 2 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Values Successfully read.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.7, Page number: 51<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find length of the string using print() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, print()or write() function would not return the number of characters\n",
+ "#written to the output buffer. so len() function is used to find the length.\n",
+ "\n",
+ "nm = raw_input(\"Enter String : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "l = len(nm)\n",
+ "\n",
+ "#Result\n",
+ "print '\\nLength = ',l\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String : HELLO\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Length = 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.8, Page number: 52<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Perform addition of two numbers\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = raw_input(\"ENTER TWO VALUES \")\n",
+ "b = raw_input(\"ENTER TWO VALUES \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "c = int(a) + int(b)\n",
+ "\n",
+ "#Result\n",
+ "print '\\nSUM IS = ',c\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ENTER TWO VALUES 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ENTER TWO VALUES 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "SUM IS = 13\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.9, Page number: 52<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the square of the given number\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = raw_input(\"ENTER ANY NUMBER \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "c = int(a) * int(a)\n",
+ "\n",
+ "#Result\n",
+ "print '\\nSQUARE OF GIVEN NUMBER = ',c\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ENTER ANY NUMBER 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "SQUARE OF GIVEN NUMBER = 25\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.10, Page number: 53<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate average of three real numbers.\n",
+ "\n",
+ "#Variable initialization\n",
+ "\n",
+ "a = raw_input(\"ENTER THREE FLOAT NUMBERS : \")\n",
+ "b = raw_input(\"ENTER THREE FLOAT NUMBERS : \")\n",
+ "c = raw_input(\"ENTER THREE FLOAT NUMBERS : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "d = float(a) + float(b) + float(c)\n",
+ "\n",
+ "#Result\n",
+ "print '\\nAverage of Given Numbers : ',d/3\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ENTER THREE FLOAT NUMBERS : 2.5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ENTER THREE FLOAT NUMBERS : 3.5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ENTER THREE FLOAT NUMBERS : 4.5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Average of Given Numbers : 3.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.11, Page number: 53<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print message with inputted name\n",
+ "\n",
+ "#Variable initialization\n",
+ "yourname = raw_input(\"Enter Your Name : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "print \"\\nWel Come %s to 'C' Programming Course\"%(yourname)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name : Ajay\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Wel Come Ajay to 'C' Programming Course\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.12, Page number: 54<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Input a single character and display it\n",
+ "\n",
+ "#Variable initialization\n",
+ "ch = raw_input(\"Enter any character : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "print \"\\nYour Entered Character is : %c\"%(ch)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter any character : C\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Your Entered Character is : C\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.13, Page number: 54<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Swap the values of two variables without using third variable.\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = 7\n",
+ "b = 4\n",
+ "\n",
+ "print \"\\n A = %d B = %d\"%(a,b)\n",
+ "\n",
+ "#Swapping\n",
+ "a = a + b\n",
+ "b = a - b\n",
+ "a = a - b\n",
+ "\n",
+ "#Result\n",
+ "print \"Now A = %d B = %d\"%(a,b)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " A = 7 B = 4\n",
+ "Now A = 4 B = 7\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.14, Page number: 55<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Accept characters through keyboard using getchar() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, string is an object. It has no nul-termination character.\n",
+ "#raw_input() reads the string constant from the stdin and the write() function\n",
+ "#prints it to the stdout based on the attribute length.\n",
+ "\n",
+ "ch = raw_input(\" \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(ch)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " COMPILER\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COMPILER"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.15, Page number: 56<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the characters using putchar() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, string is an object. It has no nul-termination character.\n",
+ "#raw_input() reads the string constant from the stdin.\n",
+ "\n",
+ "ch = raw_input(\"Enter Text Here : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "#using for loop, the string can be displayed character by character.\n",
+ "\n",
+ "sys.stdout.write(\"The Entered Text : \")\n",
+ "for c in ch:\n",
+ " sys.stdout.write(c)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Here : Characters\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Entered Text : Characters"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.16, Page number: 56<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Show the effect of getche() and getch() functions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, there is no equivalent function for getche() and getch() functions.\n",
+ "#raw_input() function reads the characters and terminates by pressing the\n",
+ "#enter key\n",
+ "\n",
+ "ch = raw_input(\"Enter any two alphabetics \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "#Result\n",
+ "sys.stdout.write(ch)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter any two alphabetics A \n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A "
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.17, Page number: 57<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read and display the character using getch() and putch() functions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, there is no equivalent function for getch() function.\n",
+ "#raw_input() function reads the characters and terminates by pressing the\n",
+ "#enter key\n",
+ "\n",
+ "ch = raw_input(\"Press any key to continue \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"You Pressed : %s\"%(ch))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press any key to continue 9\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "You Pressed : 9"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.18, Page number: 57<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Accept string through the keyboard using gets() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, raw_input() function reads the string and terminates by pressing the\n",
+ "#enter key and write() function displays the string.\n",
+ "\n",
+ "ch = raw_input(\"Enter the String : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Entered String : %s\"%(ch))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the String : USE OF GETS()\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entered String : USE OF GETS()"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.19, Page number: 58<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the accepted character using puts() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, raw_input() function reads the string and terminates by pressing the\n",
+ "#enter key and print() function displays the string.\n",
+ "\n",
+ "ch = raw_input(\"Enter the String : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "print\"Entered String : \"\n",
+ "print ch\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the String : puts is in use.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entered String : \n",
+ "puts is in use.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.20, Page number: 58<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#read string using cgets() and display it using cputs()\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python, raw_input() function reads the string and terminates by pressing the\n",
+ "#enter key and print() function displays the string.\n",
+ "#in python, string is an object.\n",
+ "\n",
+ "t = raw_input(\"Enter Text Here : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "print \"Your Entered Text : %s\"%(t)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Here : How are you?\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Your Entered Text : How are you?\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter5.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter5.ipynb
new file mode 100755
index 00000000..dac1632e
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter5.ipynb
@@ -0,0 +1,2624 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 5.1: Decision Statements<h1>\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.1, Page number: 64<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Check whether the entered number is less than 10? if yes, display the same\n",
+ "\n",
+ "#Variable initialization\n",
+ "v = raw_input(\"Enter the number : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "v = int(v)\n",
+ "\n",
+ "#Result\n",
+ "if v < 10 :\n",
+ " print '\\nNumber entered is less than 10'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the number : 9\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Number entered is less than 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.2, Page number: 65<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Check equivalence of two numbers. Use if statement.\n",
+ "\n",
+ "#Variable initialization\n",
+ "\n",
+ "m = raw_input(\"Enter two numbers : \")\n",
+ "n = raw_input(\"Enter two numbers : \")\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "m = int(m)\n",
+ "n = int(n)\n",
+ "\n",
+ "#Result\n",
+ "if m - n == 0 :\n",
+ " print '\\nTwo numbers are equal'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter two numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter two numbers : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Two numbers are equal\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.3, Page number: 66<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Check whether the candidate's age is greater than 17 or not. If yes, display\n",
+ "#message \"Eligible for Voting\"\n",
+ "\n",
+ "#Variable initialization\n",
+ "age = raw_input(\"Enter age : \")\n",
+ "age = int(age)\n",
+ "\n",
+ "#In python, raw_input() is used to read values\n",
+ "\n",
+ "#Result\n",
+ "if age > 17 :\n",
+ " print '\\nEligible for Voting.'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter age : 20\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Eligible for Voting.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.4, Page number: 66<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use curly brace in the if block. Enter only the three numbers and calculate\n",
+ "#their sum and multiplication\n",
+ "\n",
+ "#Variable initialization\n",
+ "#in python,the map(int,raw_input().split()) function splits the input characters\n",
+ "#and converts it into integers and returns a value if all the values are integers\n",
+ "#otherwise an exception will be generated and initializes v as 0.\n",
+ "#using exception handling, this result can be achieved.\n",
+ "\n",
+ "#Exception handling\n",
+ "try:\n",
+ " #use space to separate the input characters\n",
+ " v = raw_input(\"Enter Three Numbers : \")\n",
+ " a,b,c = map(int,v.split())\n",
+ " x = 3\n",
+ "except:\n",
+ " x = 0\n",
+ "\n",
+ "#Result\n",
+ "#in python, block of statements are identified using indentation\n",
+ " \n",
+ "if x == 3:\n",
+ " print \"Addition : %d\"%(a+b+c)\n",
+ " print \"Multiplication : %d\"%(a*b*c)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 1 2 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Addition : 7\n",
+ "Multiplication : 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.5, Page number: 68<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the values of a,b,c through the keyboard. Add them and after addition\n",
+ "#check if it is in the range of 100 & 200 or not. Print separate message for each.\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = raw_input(\"Enter Three Numbers a b c : \")\n",
+ "b = raw_input(\"Enter Three Numbers a b c : \")\n",
+ "c = raw_input(\"Enter Three Numbers a b c : \")\n",
+ "\n",
+ "a = int(a)\n",
+ "b = int(b)\n",
+ "c = int(c)\n",
+ "\n",
+ "print 'a = %d b = %d c = %d'%(a,b,c)\n",
+ "#Calculation\n",
+ "d = a + b + c\n",
+ "\n",
+ "#Condition evaluation and Result\n",
+ "if d <= 200 and d >= 100 :\n",
+ " print \"Sum is %d which is in between 100 & 200\"%(d)\n",
+ "else:\n",
+ " print \"\\nSum is %d which is out of range\"%(d)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers a b c : 50\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers a b c : 52\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers a b c : 54\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a = 50 b = 52 c = 54\n",
+ "Sum is 156 which is in between 100 & 200\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.6, Page number: 68<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the roots of a quadratic equation by using if else condition\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = raw_input(\"Enter Values for a, b, c : \")\n",
+ "b = raw_input(\"Enter Values for a, b, c : \")\n",
+ "c = raw_input(\"Enter Values for a, b, c : \")\n",
+ "\n",
+ "a = int(a)\n",
+ "b = int(b)\n",
+ "c = int(c)\n",
+ "\n",
+ "#Condition evaluation and Result\n",
+ "if b * b > 4 * a * c :\n",
+ " x1 = b + sqrt(b*b - 4*a*c)/2*a\n",
+ " x2 = b - sqrt(b*b - 4*a*c)/2*a\n",
+ " print \"\\nx1 = %f x2 = %f\"%(x1,x2)\n",
+ "else:\n",
+ " print \"\\nRoots are Imaginary\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a, b, c : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a, b, c : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a, b, c : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Roots are Imaginary\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.7, Page number: 69<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the square of those numbers only whose least significant digit is 5.\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "s = raw_input(\"Enter a Number : \")\n",
+ "s = int(s)\n",
+ "\n",
+ "d = s % 10;\n",
+ "\n",
+ "#Condition evaluation and Result\n",
+ "#There is no increment/decrement operator in python.\n",
+ "if d==5 :\n",
+ " s = s/10\n",
+ " s += 1\n",
+ " print \"\\nSquare = %d%d\"%(s*(s-1),d*d)\n",
+ "else:\n",
+ " print \"\\nInvalid Number\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 25\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Square = 625\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.8, Page number: 70<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the salary of medical representative based on the sales. Bonus and\n",
+ "#incentive to be offered to him will be based on total sales. If the sale\n",
+ "#exceeds Rs.100000/- follow the particulars of table (1) otherwise (2)\n",
+ "\n",
+ "# 1. TABLE 2. TABLE\n",
+ "# Basic = Rs. 3000 Basic = Rs. 3000\n",
+ "# HRA = 20% of basic HRA = 20% of basic\n",
+ "# DA = 110% of basic DA = 110% of basic\n",
+ "# Conveyance = Rs. 500 Conveyance = Rs. 500\n",
+ "# Incentive = 10% of sales Incentive = 5% of sales\n",
+ "# Bonus = Rs. 500 Bonus = Rs. 200\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "sale = raw_input(\"Enter Total Sales in Rs. : \")\n",
+ "sale = int(sale)\n",
+ "\n",
+ "#Condition evaluation\n",
+ "if sale >= 100000 :\n",
+ " bs = 3000\n",
+ " hra = 20 * bs/100\n",
+ " da = 110 * bs/100\n",
+ " cv = 500\n",
+ " incentive = sale * 10/100\n",
+ " bonus = 500\n",
+ "else:\n",
+ " bs = 3000\n",
+ " hra = 20 * bs/100\n",
+ " da = 110 * bs/100\n",
+ " cv = 500\n",
+ " incentive = sale * 5/100\n",
+ " bonus = 200\n",
+ "\n",
+ "#Result\n",
+ "ts = bs + hra + da + cv + incentive + bonus\n",
+ "print \"\\nTotal Sales : %.2f\"%(sale)\n",
+ "print \"\\nBasic Salary : %.2f\"%(bs)\n",
+ "print \"\\nHra : %.2f\"%(hra)\n",
+ "print \"\\nDa : %.2f\"%(da)\n",
+ "print \"\\nConveyance : %.2f\"%(cv)\n",
+ "print \"\\nIncentive : %.2f\"%(incentive)\n",
+ "print \"\\nBonus : %.2f\"%(bonus)\n",
+ "print \"\\nGross Salary : %.2f\"%(ts)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Total Sales in Rs. : 100000\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Total Sales : 100000.00\n",
+ "\n",
+ "Basic Salary : 3000.00\n",
+ "\n",
+ "Hra : 600.00\n",
+ "\n",
+ "Da : 3300.00\n",
+ "\n",
+ "Conveyance : 500.00\n",
+ "\n",
+ "Incentive : 10000.00\n",
+ "\n",
+ "Bonus : 500.00\n",
+ "\n",
+ "Gross Salary : 17900.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.9, Page number: 72<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate energy bill using the starting and ending meter reading.\n",
+ "#The charges are as follows:\n",
+ "\n",
+ "# No. of Units consumed Rates in (Rs.)\n",
+ "# 200 - 500 3.50\n",
+ "# 100 - 200 2.50\n",
+ "# Less than 100 1.50\n",
+ "\n",
+ "#Variable initialization\n",
+ "initial = raw_input(\"Initial & Final Readings : \")\n",
+ "final = raw_input(\"Initial & Final Readings : \")\n",
+ "\n",
+ "consumed = int(final) - int(initial)\n",
+ "\n",
+ "#Condition evaluation\n",
+ "if consumed >= 200 and consumed <= 500 :\n",
+ " total = consumed * 3.50\n",
+ "else:\n",
+ " if consumed >= 100 and consumed <= 199:\n",
+ " total = consumed * 2.50\n",
+ " else :\n",
+ " if consumed < 100 :\n",
+ " total = consumed * 1.50\n",
+ "\n",
+ "#Result\n",
+ "print \"Total bill for %d unit is %f\"%(consumed,total)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial & Final Readings : 1200\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial & Final Readings : 1500\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total bill for 300 unit is 1050.000000\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.10, Page number: 73<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate energy bill by reading the starting and ending meter reading.\n",
+ "#If the consumed electricity energy is greater than or equal to 200 units\n",
+ "#the rate should be 2.50/unit otherwise 1.50/unit.\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "initial = raw_input(\"Initial & Final Readings : \")\n",
+ "final = raw_input(\"Initial & Final Readings : \")\n",
+ "\n",
+ "consumed = int(final) - int(initial)\n",
+ "\n",
+ "#Condition evaluation\n",
+ "if consumed >= 200 :\n",
+ " total = consumed * 2.50\n",
+ "else:\n",
+ " total = consumed * 1.50\n",
+ "\n",
+ "#Result\n",
+ "print \"Total bill for %d unit is %f\"%(consumed,total)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total bill for 100 unit is 150.000000\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.11, Page number: 73<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort six numbers and find the largest one by using ladder of if else\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = int(raw_input(\"Enter 1st number : \"))\n",
+ "b = int(raw_input(\"Enter 2nd number : \"))\n",
+ "c = int(raw_input(\"Enter 3rd number : \"))\n",
+ "d = int(raw_input(\"Enter 4th number : \"))\n",
+ "e = int(raw_input(\"Enter 5th number : \"))\n",
+ "f = int(raw_input(\"Enter 6th number : \"))\n",
+ "\n",
+ "#Condition evaluation and Result\n",
+ "if a > b and a > c and a > d and a > e and a > f :\n",
+ " print \"Highest of six Number is : %d\"%(a)\n",
+ "else:\n",
+ " if b > a and b > c and b > d and b > e and b > f :\n",
+ " print \"Highest of six Number is : %d\"%(b)\n",
+ " else:\n",
+ " if c > a and c > b and c > d and c > e and c > f :\n",
+ " print \"Highest of six Number is : %d\"%(c)\n",
+ " else:\n",
+ " if d > a and d > b and d > c and d > e and d > f :\n",
+ " print \"Highest of six Number is : %d\"%(d)\n",
+ " else:\n",
+ " if e > a and e > b and e > c and e > d and e > f :\n",
+ " print \"Highest of six Number is : %d\"%(e)\n",
+ " else:\n",
+ " print \"Highest of six Number is : %d\"%(f)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter 1st number : 52\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter 2nd number : 74\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter 3rd number : 90\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter 4th number : 45\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter 5th number : 10\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter 6th number : 22\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Highest of six Number is : 90\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.12, Page number: 74<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find largest number out of three numbers. Read the numbers through the keyboard\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "x = int(raw_input(\"\\nEnter Three Numbers x,y,z : \"))\n",
+ "y = int(raw_input(\"\\nEnter Three Numbers x,y,z : \"))\n",
+ "z = int(raw_input(\"\\nEnter Three Numbers x,y,z : \"))\n",
+ "\n",
+ "print \"\\nLargest out of Three Numbers is : \"\n",
+ "\n",
+ "#Condition evaluation and Result\n",
+ "if x > y :\n",
+ " if x > z:\n",
+ " print \"x = %d\\n\"%(x)\n",
+ " else:\n",
+ " print \"z = %d\\n\"%(z)\n",
+ "else:\n",
+ " if z > y:\n",
+ " print \"z = %d\\n\"%(z)\n",
+ " else:\n",
+ " print \"y = %d\\n\"%(y)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Three Numbers x,y,z : 10\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Three Numbers x,y,z : 20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Three Numbers x,y,z : 30\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Largest out of Three Numbers is : \n",
+ "z = 30\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.13, Page number: 75<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the smallest out of the three numbers.\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = int(raw_input(\"\\nEnter Three Numbers : \"))\n",
+ "b = int(raw_input(\"\\nEnter Three Numbers : \"))\n",
+ "c = int(raw_input(\"\\nEnter Three Numbers : \"))\n",
+ " \n",
+ "#Condition evaluation and Result\n",
+ "if a < b :\n",
+ " if a < c:\n",
+ " smallest = a\n",
+ " else:\n",
+ " smallest = c\n",
+ "else:\n",
+ " if b < c:\n",
+ " smallest = b\n",
+ " else:\n",
+ " smallest = c\n",
+ "\n",
+ "#Result\n",
+ "print \"The smallest of %d %d %d is %d\\n\"%(a,b,c,smallest)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Three Numbers : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Three Numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Three Numbers : 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The smallest of 1 5 8 is 1\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.14, Page number: 76<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate gross salary for the conditions given below\n",
+ "\n",
+ "# BASIC SALARY(Rs.) DA(Rs.) HRA(Rs.) CONVEYANCE(Rs.)\n",
+ "# >= 5000 110% of basic 20% of basic 500\n",
+ "# bs>=3000 & bs<5000 100% of basic 15% of basic 400\n",
+ "# bs<3000 90% of basic 10% of basic 300\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "bs = int(raw_input(\"\\nEnter Basic Salary : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "if bs >= 5000 :\n",
+ " hra = 20 * bs/100\n",
+ " da = 110 * bs/100\n",
+ " cv = 500\n",
+ "else:\n",
+ " if bs >= 3000 and bs < 5000 :\n",
+ " hra = 15 * bs/100\n",
+ " da = 100 * bs/100\n",
+ " cv = 400\n",
+ " else:\n",
+ " if bs < 3000:\n",
+ " hra = 10 * bs/100\n",
+ " da = 90 * bs/100\n",
+ " cv = 300\n",
+ "\n",
+ "#Calculation\n",
+ "ts = bs + hra + da + cv\n",
+ "\n",
+ "#Result\n",
+ "print \"Basic Salary : %5.0f\"%(bs)\n",
+ "print \"Hra : %5.0f\"%(hra)\n",
+ "print \"Da : %5.0f\"%(da)\n",
+ "print \"Conveyance : %5.0f\"%(cv)\n",
+ "print \"Gross Salary : %5.0f\"%(ts)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Basic Salary : 5400\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Basic Salary : 5400\n",
+ "Hra : 1080\n",
+ "Da : 5940\n",
+ "Conveyance : 500\n",
+ "Gross Salary : 12920\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.15, Page number: 77<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the total interest based on the following.\n",
+ "\n",
+ "#Principle Amount(Rs.) Rate of Interest(Rs.)\n",
+ "# >= 10000 20%\n",
+ "# >= 8000 & <= 9999 18%\n",
+ "# < 8000 16%\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "princ = int(raw_input(\"\\nEnter Loan & No. of years :- \"))\n",
+ "nyrs = int(raw_input(\"\\nEnter Loan & No. of years :- \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "if princ >= 10000 :\n",
+ " rate = 20\n",
+ "else:\n",
+ " if princ >= 8000 and princ <= 9999 :\n",
+ " rate = 18\n",
+ " else:\n",
+ " if princ < 8000:\n",
+ " rate = 16\n",
+ "\n",
+ "#Calculation\n",
+ "interest = princ * nyrs * rate/100\n",
+ "\n",
+ "#Result\n",
+ "print \"Loan : %6.2f\"%(princ)\n",
+ "print \"Years : %6.2f\"%(nyrs)\n",
+ "print \"Rate : %6.2f\"%(rate)\n",
+ "print \"Interest : %6.2f\"%(interest)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Loan & No. of years :- 5500\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Loan & No. of years :- 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loan : 5500.00\n",
+ "Years : 3.00\n",
+ "Rate : 16.00\n",
+ "Interest : 2640.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.16, Page number: 78<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the average of six subjects and display the results as follows.\n",
+ "\n",
+ "# AVERAGE RESULT\n",
+ "# >34 & <50 Third Division\n",
+ "# >49 & <60 Second Division\n",
+ "# >60 & <75 First Division\n",
+ "# >75 & <100 Distinction\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "a = int(raw_input(\"\\nEnter Marks\\nP C B M E H\\n\"))\n",
+ "b = int(raw_input(\"\\nEnter Marks\\nP C B M E H\\n\"))\n",
+ "c = int(raw_input(\"\\nEnter Marks\\nP C B M E H\\n\"))\n",
+ "d = int(raw_input(\"\\nEnter Marks\\nP C B M E H\\n\"))\n",
+ "e = int(raw_input(\"\\nEnter Marks\\nP C B M E H\\n\"))\n",
+ "f = int(raw_input(\"\\nEnter Marks\\nP C B M E H\\n\"))\n",
+ "\n",
+ "#Calculation\n",
+ "#here sum1 is used instead of sum because sum is a function in python.\n",
+ "sum1 = a + b + c + d + e + f\n",
+ "avg = sum1/6\n",
+ "\n",
+ "print \"Total : %d \\nAverage : %.2f\"%(sum1,avg)\n",
+ "\n",
+ "#Condition evaluation and Result\n",
+ "if a < 35 or b < 35 or c < 35 or d < 35 or e < 35 :\n",
+ " print \"Result : Fail\"\n",
+ " exit\n",
+ "if avg >= 34 and avg < 50 :\n",
+ " print \"Result : Third Division \"\n",
+ "else:\n",
+ " if avg >= 49 and avg < 60:\n",
+ " print \"Result : Second Division\"\n",
+ " else:\n",
+ " if avg >= 60 and avg > 75:\n",
+ " print \"Result : First Division\"\n",
+ " else:\n",
+ " if avg >= 75 and avg <= 100:\n",
+ " print \"Result : Distinction\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks\n",
+ "P C B M E H\n",
+ "75\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks\n",
+ "P C B M E H\n",
+ "75\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks\n",
+ "P C B M E H\n",
+ "75\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks\n",
+ "P C B M E H\n",
+ "75\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks\n",
+ "P C B M E H\n",
+ "75\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks\n",
+ "P C B M E H\n",
+ "75\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total : 450 \n",
+ "Average : 75.00\n",
+ "Result : Distinction\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.17, Page number: 80<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect the entered number as to whether it is even or odd. Use goto statement.\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "x = int(raw_input(\"\\nEnter a Number : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#There is no goto/label statement in python\n",
+ "\n",
+ "if x%2 == 0:\n",
+ " print \"\\n%d is Even Number.\"%(x)\n",
+ "else:\n",
+ " print \"\\n%d is Odd Number.\"%(x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "5 is Odd Number.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.18, Page number: 81<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate telephone bill. Transfer controls at different places according\n",
+ "#to number of calls and calculate the total charges. Follow rates as per\n",
+ "#given in the table.\n",
+ "\n",
+ "# Telephone call Rate in Rs.\n",
+ "# < 100 No charges\n",
+ "# > 99 & < 200 1\n",
+ "# > 199 & < 300 2\n",
+ "# > 299 3\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "nc = int(raw_input(\"\\nEnter Number of Calls : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#There is no goto/label statement in python\n",
+ "\n",
+ "if nc < 100:\n",
+ " print \"\\nNo charges\"\n",
+ "else:\n",
+ " if nc > 99 and nc < 200:\n",
+ " print \"\\nTotal Charges : %d Rs.\"%(nc*1)\n",
+ " else:\n",
+ " if nc > 199 and nc < 300:\n",
+ " print \"\\nTotal Charges : %d Rs.\"%(nc*2)\n",
+ " else:\n",
+ " print \"\\nTotal Charges : %d Rs.\"%(nc*3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Number of Calls : 500\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Total Charges : 1500 Rs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.19, Page number: 82<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Check whether the entered year is a leap year or not. Use goto statement.\n",
+ "\n",
+ "#Variable initialization\n",
+ "leap = int(raw_input(\"\\nEnter Year : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#There is no goto/label statement in python\n",
+ "\n",
+ "if leap%4 == 0:\n",
+ " print \"\\n%d is a leap year.\"%(leap)\n",
+ "else:\n",
+ " print \"%d is not a leap year.\"%(leap)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Year : 2000\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "2000 is a leap year.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.20, Page number: 84<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print lines by selecting the choice.\n",
+ "\n",
+ "print \"\\n[1] ............\"\n",
+ "print \"\\n[2] ____________\"\n",
+ "print \"\\n[3] ************\"\n",
+ "print \"\\n[4] ============\"\n",
+ "print \"\\n[5] EXIT\"\n",
+ "\n",
+ "#Variable initialization\n",
+ "ch = int(raw_input(\"\\nENTER YOUR CHOICE : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#dictionary and functions\n",
+ "\n",
+ "def dot():\n",
+ " print \"\\n......................................................\"\n",
+ "\n",
+ "def line():\n",
+ " print \"\\n______________________________________________________\"\n",
+ "\n",
+ "def star():\n",
+ " print \"\\n******************************************************\"\n",
+ "\n",
+ "def equal():\n",
+ " print \"\\n======================================================\"\n",
+ "\n",
+ "def ex():\n",
+ " exit\n",
+ " \n",
+ "options = {1 : dot,\n",
+ " 2 : line,\n",
+ " 3 : star,\n",
+ " 4 : equal,\n",
+ " 5 : ex\n",
+ "}\n",
+ "\n",
+ "options[ch]()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "[1] ............\n",
+ "\n",
+ "[2] ____________\n",
+ "\n",
+ "[3] ************\n",
+ "\n",
+ "[4] ============\n",
+ "\n",
+ "[5] EXIT\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "ENTER YOUR CHOICE : 1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "......................................................\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.21, Page number: 85<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Provide multiple functions such as 1. addition 2.Subtraction 3. Multiplication\n",
+ "#4.Division 5.Remainder calculation 6.Larger out of two by using switch statement\n",
+ "\n",
+ "print \"\\n=============================\"\n",
+ "print \"\\n\\t\\tMENU\"\n",
+ "print \"\\n=============================\"\n",
+ "print \"\\n\\t[1] ADDITION\"\n",
+ "print \"\\n\\t[2] SUBTRACTION\"\n",
+ "print \"\\n\\t[3] MULTIPLICATION\"\n",
+ "print \"\\n\\t[4] DIVISION\"\n",
+ "print \"\\n\\t[5] REMAINDER\"\n",
+ "print \"\\n\\t[6] LARGER OUT OF TWO\"\n",
+ "print \"\\n\\t[0] EXIT\"\n",
+ "print \"\\n=============================\"\n",
+ "\n",
+ "#Variable initialization\n",
+ "ch = int(raw_input(\"\\nENTER YOUR CHOICE : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#dictionary and functions\n",
+ "\n",
+ "if ch <= 6 and ch > 0:\n",
+ " a = int(raw_input(\"Enter Two Numbers : \"))\n",
+ " b = int(raw_input(\"Enter Two Numbers : \"))\n",
+ " \n",
+ "def add():\n",
+ " c = a + b\n",
+ " print \"\\nAddition : %d\"%(c)\n",
+ "\n",
+ "def sub():\n",
+ " c = a - b\n",
+ " print \"\\nSubtraction : %d\"%(c)\n",
+ "\n",
+ "def mul():\n",
+ " c = a * b\n",
+ " print \"\\nMultiplication : %d\"%(c)\n",
+ "\n",
+ "def div():\n",
+ " c = a/b\n",
+ " print \"\\nDivision : %d\"%(c)\n",
+ "\n",
+ "def rem():\n",
+ " c = a % b\n",
+ " print \"\\nRemainder : %d\"%(c)\n",
+ "\n",
+ "def larger():\n",
+ " if a > b:\n",
+ " print \"\\n%d (a) is larger than %d (b)\"%(a,b)\n",
+ " else:\n",
+ " if b > a:\n",
+ " print \"\\n%d (b) is larger than %d (a)\"%(b,a)\n",
+ " else:\n",
+ " print \"\\n%d (a) & %d (b) are same\"%(a,b)\n",
+ "\n",
+ "def ex():\n",
+ " print \"\\nTerminated by choice\"\n",
+ " exit\n",
+ "\n",
+ "def default():\n",
+ " print \"\\nInvalid Choice\"\n",
+ "\n",
+ "options = { 1 : add,\n",
+ " 2 : sub,\n",
+ " 3 : mul,\n",
+ " 4 : div,\n",
+ " 5 : rem,\n",
+ " 6 : larger,\n",
+ " 7 : ex,\n",
+ " 0 : default,\n",
+ " 8 : default,\n",
+ " 9 : default\n",
+ "}\n",
+ "\n",
+ "options[ch]()\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "=============================\n",
+ "\n",
+ "\t\tMENU\n",
+ "\n",
+ "=============================\n",
+ "\n",
+ "\t[1] ADDITION\n",
+ "\n",
+ "\t[2] SUBTRACTION\n",
+ "\n",
+ "\t[3] MULTIPLICATION\n",
+ "\n",
+ "\t[4] DIVISION\n",
+ "\n",
+ "\t[5] REMAINDER\n",
+ "\n",
+ "\t[6] LARGER OUT OF TWO\n",
+ "\n",
+ "\t[0] EXIT\n",
+ "\n",
+ "=============================\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "ENTER YOUR CHOICE : 6\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Two Numbers : 9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Two Numbers : 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "9 (a) is larger than 8 (b)\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.22, Page number: 87<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert years into Minutes, Hours, Days, Months and Seconds using switch()\n",
+ "#statement\n",
+ "\n",
+ "\n",
+ "print \"[1] MINUTES\"\n",
+ "print \"[2] HOURS\"\n",
+ "print \"[3] DAYS\"\n",
+ "print \"[4] MONTHS\"\n",
+ "print \"[5] SECONDS\"\n",
+ "print \"[0] EXIT\"\n",
+ "\n",
+ "#Variable initialization\n",
+ "ch = int(raw_input(\"\\nEnter Your Choice : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#dictionary and functions\n",
+ "\n",
+ "if ch > 0 and ch < 6:\n",
+ " yrs = int(raw_input(\"Enter Years : \"))\n",
+ "\n",
+ "#Calculation\n",
+ "#since min is a keyword in python, min1 is used instead.\n",
+ "mon = yrs * 12\n",
+ "ds = mon * 30\n",
+ "hrs = ds * 24\n",
+ "min1 = hrs * 60\n",
+ "se = min1 * 60\n",
+ "\n",
+ "def minute():\n",
+ " print \"\\nMinutes : %ld\"%(min1)\n",
+ "\n",
+ "def hours():\n",
+ " print \"\\nHours : %ld\"%(hrs)\n",
+ "\n",
+ "def days():\n",
+ " print \"\\nDays : %ld\"%(ds)\n",
+ "\n",
+ "def months():\n",
+ " print \"\\nMonths : %ld\"%(mon)\n",
+ "\n",
+ "def seconds():\n",
+ " print \"\\nSeconds : %ld\"%(se)\n",
+ "\n",
+ "def ex():\n",
+ " print \"\\nTerminated by choice\"\n",
+ " exit\n",
+ "\n",
+ "def default():\n",
+ " print \"\\nInvalid Choice\"\n",
+ "\n",
+ "options = { 1 : minute,\n",
+ " 2 : hours,\n",
+ " 3 : days,\n",
+ " 4 : months,\n",
+ " 5 : seconds,\n",
+ " 6 : ex,\n",
+ " 0 : default,\n",
+ " 8 : default,\n",
+ " 9 : default\n",
+ "}\n",
+ "\n",
+ "options[ch]()\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[1] MINUTES\n",
+ "[2] HOURS\n",
+ "[3] DAYS\n",
+ "[4] MONTHS\n",
+ "[5] SECONDS\n",
+ "[0] EXIT\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Your Choice : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Years : 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Months : 24\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.23, Page number: 89<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the names of the days of a week.\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "day = int(raw_input(\"\\nEnter a number between 1 to 7 : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#dictionary and functions\n",
+ "\n",
+ "def first():\n",
+ " print \"\\n1st day of week is Sunday\"\n",
+ "\n",
+ "def second():\n",
+ " print \"\\n2nd day of week is Monday\"\n",
+ "\n",
+ "def third():\n",
+ " print \"\\n3rd day of week is Tuesday\"\n",
+ "\n",
+ "def fourth():\n",
+ " print \"\\n4th day of week is Wednesday\"\n",
+ "\n",
+ "def fifth():\n",
+ " print \"\\n5th day of week is Thursday\"\n",
+ "\n",
+ "def sixth():\n",
+ " print \"\\n6th day of week is Friday\"\n",
+ "\n",
+ "def seventh():\n",
+ " print \"\\n7th day of week is Saturday\"\n",
+ "\n",
+ "def default():\n",
+ " print \"\\nInvalid day\"\n",
+ "\n",
+ "options = { 1 : first,\n",
+ " 2 : second,\n",
+ " 3 : third,\n",
+ " 4 : fourth,\n",
+ " 5 : fifth,\n",
+ " 6 : sixth,\n",
+ " 7 : seventh,\n",
+ " 0 : default,\n",
+ " 8 : default,\n",
+ " 9 : default\n",
+ "}\n",
+ "for i in range(1,day+1):\n",
+ " options[i]()\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter a number between 1 to 7 : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "1st day of week is Sunday\n",
+ "\n",
+ "2nd day of week is Monday\n",
+ "\n",
+ "3rd day of week is Tuesday\n",
+ "\n",
+ "4th day of week is Wednesday\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.24, Page number: 90<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Perform following operations\n",
+ "\n",
+ "#1. Display any numbers or stars on the screen by using for loop\n",
+ "#2. Display the menu containing the following\n",
+ "#a) Whole screen b)Half screen c)Top 3 lines d)Bottom 3 lines\n",
+ "\n",
+ "import os\n",
+ "import sys\n",
+ "import turtle\n",
+ "\n",
+ "\n",
+ "#Print numbers in the whole screen\n",
+ "for i in range(1,700):\n",
+ " sys.stdout.write(\"%d\"%i)\n",
+ "\n",
+ "print \"\\nCLEAR MENU\"\n",
+ "print \"\\t1] Whole Screen\\t2] Half Screen\\t3]Top 3 lines\\t4] Bottom 3 lines\\t5] Exit\"\n",
+ "\n",
+ "#Variable initialization\n",
+ "c = int(raw_input(\"Enter Your Choice : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#dictionary and functions\n",
+ "\n",
+ "def one():\n",
+ " os.system('cls')\n",
+ "\n",
+ "def two():\n",
+ " for i in range(0,190):\n",
+ " turtle.goto(i,1)\n",
+ " sys.stdout.write(\"\\t\")\n",
+ " \n",
+ "def three():\n",
+ " for i in range(1,100):\n",
+ " turtle.goto(i,1)\n",
+ " sys.stdout.write(\"\\t\")\n",
+ "\n",
+ "def four():\n",
+ " for i in range(1,120):\n",
+ " turtle.goto(i,21)\n",
+ " sys.stdout.write(\"\\t\")\n",
+ "\n",
+ "def five():\n",
+ " exit\n",
+ "\n",
+ "\n",
+ "options = { 1 : one,\n",
+ " 2 : two,\n",
+ " 3 : three,\n",
+ " 4 : four,\n",
+ " 5 : five\n",
+ "}\n",
+ "options[c]()\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699\n",
+ "CLEAR MENU\n",
+ "\t1] Whole Screen\t2] Half Screen\t3]Top 3 lines\t4] Bottom 3 lines\t5] Exit\n",
+ "\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t\t"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t\t\t\t"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.25, Page number: 91<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the files of current directory\n",
+ "\n",
+ "import os\n",
+ "\n",
+ "print \"\\nFILE LISTING MENU\"\n",
+ "print \"1] .EXE\"\n",
+ "print \"2] .BAT\"\n",
+ "print \"3] .OBJ\"\n",
+ "print \"4] .BAK\"\n",
+ "#Variable initialization\n",
+ "c = int(raw_input(\"Enter Your Choice -: \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#dictionary and functions\n",
+ "\n",
+ "def one():\n",
+ " os.system('dir *.exe')\n",
+ "\n",
+ "def two():\n",
+ " os.system('dir *.c')\n",
+ "\n",
+ "def three():\n",
+ " os.system('dir *.obj')\n",
+ "\n",
+ "def four():\n",
+ " os.system('dir *.bak')\n",
+ "\n",
+ "options = { 1 : one,\n",
+ " 2 : two,\n",
+ " 3 : three,\n",
+ " 4 : four\n",
+ "}\n",
+ "options[c]()\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "FILE LISTING MENU\n",
+ "1] .EXE\n",
+ "2] .BAT\n",
+ "3] .OBJ\n",
+ "4] .BAK\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.26, Page number: 92<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display number of days in calendar format of an entered month of year 2001.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "m = int(raw_input(\"Enter Month No. of Year 2001 : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#else-if ladder.\n",
+ "\n",
+ "print \"\\nMonth - %d - 2001\"%(m)\n",
+ "print \"\\n\\tSUN\\tMON\\tTUE\\tWED\\tTHU\\tFRI\\tSAT\"\n",
+ "\n",
+ "#Find a day any month of 2001\n",
+ "\n",
+ "if m == 1:\n",
+ " a = 2\n",
+ " j = 31\n",
+ "else:\n",
+ " if m == 2:\n",
+ " a = 5\n",
+ " j = 28\n",
+ " else:\n",
+ " if m == 3:\n",
+ " a = 5\n",
+ " j = 31\n",
+ " else:\n",
+ " if m == 4:\n",
+ " a = 1\n",
+ " j = 30\n",
+ " else:\n",
+ " if m == 5:\n",
+ " a = 3\n",
+ " j = 31\n",
+ " else:\n",
+ " if m == 6:\n",
+ " a = 6\n",
+ " j = 30\n",
+ " else:\n",
+ " if m == 7:\n",
+ " a = 1\n",
+ " j = 31\n",
+ " else:\n",
+ " if m == 8:\n",
+ " a = 4\n",
+ " j = 31\n",
+ " else:\n",
+ " if m == 9:\n",
+ " a = 7\n",
+ " j = 30\n",
+ " else:\n",
+ " if m == 10:\n",
+ " a = 2\n",
+ " j = 31\n",
+ " else:\n",
+ " if m == 11:\n",
+ " a = 5\n",
+ " j = 30\n",
+ " else:\n",
+ " if m == 12:\n",
+ " a = 7\n",
+ " j = 31\n",
+ " else:\n",
+ " print \"Invalid Month\"\n",
+ " exit\n",
+ "\n",
+ "#Starting day is to be adjusted under the respective day\n",
+ "#sys.stdout.write() function performs the same task as printf() function\n",
+ " \n",
+ "i = 1\n",
+ "if a == 1:\n",
+ " sys.stdout.write(\"\\t%d\"%(i))\n",
+ "else:\n",
+ " if a == 2:\n",
+ " sys.stdout.write(\"\\t\\t%d\"%(i))\n",
+ " else:\n",
+ " if a == 3:\n",
+ " sys.stdout.write(\"\\t\\t\\t%d\"%(i))\n",
+ " else:\n",
+ " if a == 4:\n",
+ " sys.stdout.write(\"\\t\\t\\t\\t%d\"%(i))\n",
+ " else:\n",
+ " if a == 5:\n",
+ " sys.stdout.write(\"\\t\\t\\t\\t\\t%d\"%(i))\n",
+ " else:\n",
+ " if a == 6:\n",
+ " sys.stdout.write(\"\\t\\t\\t\\t\\t\\t%d\"%(i))\n",
+ " else:\n",
+ " if a == 7:\n",
+ " sys.stdout.write(\"\\t\\t\\t\\t\\t\\t\\t%d\"%(i))\n",
+ "\n",
+ "\n",
+ "h = 8 - a #The starting day is subtracted from 8\n",
+ "for i in range(2,h+1): #to display the first row\n",
+ " sys.stdout.write(\"\\t%d\"%(i))\n",
+ "sys.stdout.write(\"\\n\")\n",
+ "b = 1\n",
+ "for i in range(h+1,j+1): #to continue with second row onwards\n",
+ " if b == 8:\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " b = 1\n",
+ " sys.stdout.write(\"\\t%d\"%(i))\n",
+ " b += 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Month - 1 - 2001\n",
+ "\n",
+ "\tSUN\tMON\tTUE\tWED\tTHU\tFRI\tSAT\n",
+ "\t\t1\t2\t3\t4\t5\t6\n",
+ "\t7\t8\t9\t10\t11\t12\t13\n",
+ "\t14\t15\t16\t17\t18\t19\t20\n",
+ "\t21\t22\t23\t24\t25\t26\t27\n",
+ "\t28\t29\t30\t31"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.27, Page number: 95<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert decimal to hexadecimal number.\n",
+ "\n",
+ "import sys\n",
+ "import turtle\n",
+ "\n",
+ "#Variable initialization\n",
+ "x = int(raw_input(\"Enter a number : \"))\n",
+ "y = 30\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#else-if ladder.\n",
+ "\n",
+ "print \"\\nConversion of Decimal to Hexadecimal Number\"\n",
+ "\n",
+ "#for loop without condition is not supported in python. so while loop is used.\n",
+ "\n",
+ "c = 1\n",
+ "z = [0 for i in range(0,15)]\n",
+ "\n",
+ "while x != 0:\n",
+ " z[c] = x % 16\n",
+ " c = c + 1\n",
+ " x = x/16\n",
+ "\n",
+ "\n",
+ "for i in range(c-1,0,-1):\n",
+ " if z[i] == 10:\n",
+ " sys.stdout.write(\"A\")\n",
+ " else:\n",
+ " if z[i] == 11:\n",
+ " sys.stdout.write(\"B\")\n",
+ " else:\n",
+ " if z[i] == 12:\n",
+ " sys.stdout.write(\"C\")\n",
+ " else:\n",
+ " if z[i] == 13:\n",
+ " sys.stdout.write(\"D\")\n",
+ " else:\n",
+ " if z[i] == 14:\n",
+ " sys.stdout.write(\"E\")\n",
+ " else:\n",
+ " if z[i] == 15:\n",
+ " sys.stdout.write(\"F\")\n",
+ " else:\n",
+ " sys.stdout.write(\"%d\"%(z[i]))\n",
+ " \n",
+ " \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 31\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Conversion of Decimal to Hexadecimal Number\n",
+ "1F"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.28, Page number: 97<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect whether the entered number is even or odd. use nested switch-case\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "x = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch case statement in python, an alternative is to use\n",
+ "#else-if ladder.\n",
+ "\n",
+ "if x == 0:\n",
+ " print \"Number is Even\"\n",
+ "else:\n",
+ " if x == 1:\n",
+ " print \"Number is odd\"\n",
+ " else:\n",
+ " y = x % 2\n",
+ " if y == 0:\n",
+ " print \"Number is Even\"\n",
+ " else:\n",
+ " print \"Number is odd\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number is odd\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.29, Page number: 98<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count number of 1s, 0s, blank spaces and others using nested\n",
+ "#switch() statement in a given stream\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "txt = raw_input(\"Enter Numbers : \")\n",
+ "\n",
+ "#Processing\n",
+ "x = 0\n",
+ "s = 0\n",
+ "a = 0\n",
+ "z = 0\n",
+ "o = 0\n",
+ "\n",
+ "while x < len(txt):\n",
+ " if txt[x] == ' ':\n",
+ " s = s + 1\n",
+ " else:\n",
+ " if txt[x] == '1':\n",
+ " a = a + 1\n",
+ " else:\n",
+ " if txt[x] == '0':\n",
+ " z = z + 1\n",
+ " else:\n",
+ " o = o + 1\n",
+ " x = x + 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nTotal Spaces : %d\"%(s))\n",
+ "sys.stdout.write(\"\\nTotal 1s : %d\"%(a))\n",
+ "sys.stdout.write(\"\\nTotal 0s : %d\"%(z))\n",
+ "sys.stdout.write(\"\\nOthers : %d\"%(o))\n",
+ "sys.stdout.write(\"\\nString Length : %d\"%(s+a+z+o))\n",
+ " \n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Numbers : 1110022 222\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Total Spaces : 1\n",
+ "Total 1s : 3\n",
+ "Total 0s : 2\n",
+ "Others : 5\n",
+ "String Length : 11"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.30, Page number: 99<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert integer to character using if condition\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "x = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#ord() function converts the character ASCII to integer\n",
+ "\n",
+ "if x == ord('A'):\n",
+ " print \"%c\"%(x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 65\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.31, Page number: 100<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use nested if..else statements in switch() statement. Also show the effect\n",
+ "#of conversion of integer to character\n",
+ "\n",
+ "\n",
+ "#Variable initialization\n",
+ "i = int(raw_input(\"Enter any ASCII Number : \"))\n",
+ "\n",
+ "#Condition evaluation\n",
+ "#there is no switch..case statement in python. alternative is to use\n",
+ "#if..else and else..if ladder\n",
+ "\n",
+ "if i == ord('A'):\n",
+ " print \"Capital A\"\n",
+ "else:\n",
+ " if i == ord('B'):\n",
+ " print \"Capital B\"\n",
+ " else:\n",
+ " if i == ord('C'):\n",
+ " print \"Capital C\"\n",
+ " else:\n",
+ " if i > 47 and i < 58:\n",
+ " print \"Digit : [%c]\"%(i)\n",
+ " else:\n",
+ " if i >= 58 and i <= 64:\n",
+ " print \"Symbol : [%c]\"%(i)\n",
+ " else:\n",
+ " if i > 64 and i < 91:\n",
+ " print \"Capital : [%c]\"%(i)\n",
+ " else:\n",
+ " if i > 96 and i < 123:\n",
+ " print \"Small : [%c]\"%(i)\n",
+ " else:\n",
+ " print \"Invalid Choice\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter any ASCII Number : 65\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capital A\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter6.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter6.ipynb
new file mode 100755
index 00000000..d9815e79
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter6.ipynb
@@ -0,0 +1,42312 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 6: Loop Control Statements<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.1, Page number: 107<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the first five numbers starting from one together with thier squares\n",
+ "\n",
+ "#Result\n",
+ "#Since range() function starts with 0; to print upto 5, use 5+1 or 6\n",
+ "#range() function creates range or numbers from 1 to 6\n",
+ "\n",
+ "for i in range(1,5+1):\n",
+ " print(\"Number : %d it's Square : %d\"%(i,i*i))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number : 1 it's Square : 1\n",
+ "Number : 2 it's Square : 4\n",
+ "Number : 3 it's Square : 9\n",
+ "Number : 4 it's Square : 16\n",
+ "Number : 5 it's Square : 25\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.2, Page number: 108<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers from 1 to 15 using for loop. Use i++\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#There is no increment operator (++) in python\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for i in range(1,15+1):\n",
+ " sys.stdout.write(\"%5d\"%(i))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.3, Page number: 108<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers from 1 to 15 using for loop. Use i = i + 1\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for i in range(1,15+1):\n",
+ " sys.stdout.write(\"%5d\"%(i))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.4, Page number: 109<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers from 1 to 16. Use incrementation operation in the body of\n",
+ "#the loop for more than once\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "c = 0\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers and the third argument in the range function\n",
+ "#indicates the interval between the numbers.\n",
+ "\n",
+ "for i in range(0,15+1,2):\n",
+ " i += 1\n",
+ " sys.stdout.write(\"%5d\"%(i))\n",
+ " i = i + 1\n",
+ " sys.stdout.write(\"%5d\"%(i))\n",
+ " c += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\nThe Body of the loop is executed for %d times\"%(c))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n",
+ "\n",
+ "The Body of the loop is executed for 8 times"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.5, Page number: 109<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display even numbers from 0 to 14 by declaring the initial counter value before\n",
+ "#the loop statement\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "c = 0\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers and the third argument in the range function\n",
+ "#indicates the interval between the numbers.\n",
+ "\n",
+ "#counter variable initialization before the for loop will not affect much.\n",
+ "\n",
+ "for i in range(0,15+1,2):\n",
+ " sys.stdout.write(\"%5d\"%(i))\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 0 2 4 6 8 10 12 14"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.6, Page number: 110<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers in ascending and descending orders.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers and the third argument in the range function\n",
+ "#indicates the interval between the numbers.\n",
+ "\n",
+ "#counter variable initialization before the for loop will not affect much.\n",
+ "\n",
+ "sys.stdout.write(\"Numbers in Ascending Order : \")\n",
+ "for i in range(1,10+1):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n",
+ " \n",
+ "sys.stdout.write(\"\\nNumbers in Descending Order : \")\n",
+ "for i in range(10,0,-1):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numbers in Ascending Order : 1 2 3 4 5 6 7 8 9 10\n",
+ "Numbers in Descending Order : 10 9 8 7 6 5 4 3 2 1"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.7, Page number: 110<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers upto 10 using infinite for loop. Use goto statement to\n",
+ "#exit from the loop\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers and the third argument in the range function\n",
+ "#indicates the interval between the numbers.\n",
+ "\n",
+ "#counter variable initialization before the for loop will not affect much.\n",
+ "\n",
+ "for i in range(0,15):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n",
+ " i += 1\n",
+ " if i == 11:\n",
+ " break\n",
+ "\n",
+ "#there is no infinite for loop and goto statement in python.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 0 1 2 3 4 5 6 7 8 9 10"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.8, Page number: 111<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count numbers between 1 to 100 not divisible by 2, 3, and 5\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "c = 0\n",
+ "\n",
+ "sys.stdout.write(\"\\nNumbers from 1 to 100 not divisible by 2,3&5\\n\\n\")\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers \n",
+ "\n",
+ "for x in range(0,100+1):\n",
+ " if x%2 != 0 and x%3 != 0 and x%5 != 0:\n",
+ " sys.stdout.write(\"%d\\t\"%(x))\n",
+ " c += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nTotal Numbers : %d\"%(c))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Numbers from 1 to 100 not divisible by 2,3&5\n",
+ "\n",
+ "1\t7\t11\t13\t17\t19\t23\t29\t31\t37\t41\t43\t47\t49\t53\t59\t61\t67\t71\t73\t77\t79\t83\t89\t91\t97\t\n",
+ "Total Numbers : 26"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.9, Page number: 112<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the numbers in increasing and decreasing order using infinite\n",
+ "#for loop\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = int(raw_input(\"Enter a number : \"))\n",
+ "a = b = n\n",
+ "\n",
+ "sys.stdout.write(\"(++) (--)\\n\")\n",
+ "sys.stdout.write(\"===================\")\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "#There is no infinite for loop in python. so separate iteration variable i is used\n",
+ "\n",
+ "for i in range(0,100):\n",
+ " sys.stdout.write(\"\\n%d\\t%d\"%(a,b))\n",
+ " if b == 0:\n",
+ " break\n",
+ " a += 1\n",
+ " b -= 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(++) (--)\n",
+ "===================\n",
+ "5\t5\n",
+ "6\t4\n",
+ "7\t3\n",
+ "8\t2\n",
+ "9\t1\n",
+ "10\t0"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.10, Page number: 113<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Create an infinite loop. Check each value of the for loop. if the value is\n",
+ "#even, display it otherwise continue with interations. Print even numbers from\n",
+ "#1 to 21. Use break statement to terminate the program.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "i = 1\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\t\\tTable of Even numbers from 1 to 20\")\n",
+ "sys.stdout.write(\"\\n\\t\\t==================================\\n\")\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "#There is no infinite for loop in python. so separate iteration variable i is used\n",
+ "\n",
+ "for i in range(1,100):\n",
+ " if i == 20:\n",
+ " break\n",
+ " else:\n",
+ " if i%2 == 0:\n",
+ " sys.stdout.write(\"%d\\t\"%(i))\n",
+ " continue\n",
+ " else:\n",
+ " continue"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\t\tTable of Even numbers from 1 to 20\n",
+ "\t\t==================================\n",
+ "2\t4\t6\t8\t10\t12\t14\t16\t18\t"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.11, Page number: 113<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the sum of first five numbers and their squares. Display their results\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "#since sum is a function in python, sum1 is used instead of variable sum.\n",
+ "\n",
+ "sum1 = 0\n",
+ "sqsum = 0\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for i in range(1,5+1):\n",
+ " sum1 += i\n",
+ " sqsum += i*i\n",
+ " sys.stdout.write(\"\\nNumber : %5d it's Square : %8d\"%(i,i*i))\n",
+ "\n",
+ "sys.stdout.write(\"\\n=================================================\")\n",
+ "sys.stdout.write(\"\\nThe Sum %6d Sum of Squares %9d\"%(sum1,sqsum))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Number : 1 it's Square : 1\n",
+ "Number : 2 it's Square : 4\n",
+ "Number : 3 it's Square : 9\n",
+ "Number : 4 it's Square : 16\n",
+ "Number : 5 it's Square : 25\n",
+ "=================================================\n",
+ "The Sum 15 Sum of Squares 55"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.12, Page number: 114<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers from 1 to 9 and their square roots.\n",
+ "\n",
+ "import math\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for i in range(1,9+1):\n",
+ " a = math.sqrt(i)\n",
+ " sys.stdout.write(\"\\n\\t%d %.2f\"%(i,a))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\t1 1.00\n",
+ "\t2 1.41\n",
+ "\t3 1.73\n",
+ "\t4 2.00\n",
+ "\t5 2.24\n",
+ "\t6 2.45\n",
+ "\t7 2.65\n",
+ "\t8 2.83\n",
+ "\t9 3.00"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.13, Page number: 115<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the number in between 7 and 100 which is exactly divisible by\n",
+ "#4 and if divided by 5 and 6 remainders obtained should be 4.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for x in range(7,100+1):\n",
+ " if x%4 == 0 and x%5 == 4 and x%6 == 4:\n",
+ " sys.stdout.write(\"\\nMinimum Number : %d\"%(x))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Minimum Number : 64"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.14, Page number: 115<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the series given\n",
+ "# x = 1/1 + 1/4 + 1/9 ... 1/n2\n",
+ "# y = 1/1 + 1/8 + 1/27 ... 1/n3\n",
+ "\n",
+ "#Variable declaration\n",
+ "x = 0.0\n",
+ "y = 0.0\n",
+ "n = int(raw_input(\"Enter Value of n : \"))\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for i in range(1,n+1):\n",
+ " x = x + (1.0/pow(i,2))\n",
+ " y = y + (1.0/pow(i,3))\n",
+ "\n",
+ "print(\"Value of x = %f\"%(x))\n",
+ "print(\"\\nValue of y = %f\"%(y))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of n : 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of x = 1.250000\n",
+ "\n",
+ "Value of y = 1.125000\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.15, Page number: 116<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Generate Triangular number\n",
+ "#Note: Triangular number is nothing but summation of 1 to given number.\n",
+ "#For example, when entered number is 5 it's triangular number would be\n",
+ "#(1+2+3+4+5) = 15.\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "tri_num = 0\n",
+ "n = int(raw_input(\"What Triangular number do you want : \"))\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "for j in range(1,n+1):\n",
+ " tri_num = tri_num + j\n",
+ "\n",
+ "print(\"Triangular number of %d is %d\\n\"%(n,tri_num))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "What Triangular number do you want : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Triangular number of 5 is 15\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.16, Page number: 117<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find sum of the following series\n",
+ "# 1 + 2 + 3 + ... n\n",
+ "# 1^2 + 2^2 + 2^3 + ... n^2\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable declaration\n",
+ "#since sum is a function name in python, sum1 is used instead of sum.\n",
+ "\n",
+ "sum1 = 0\n",
+ "ssum = 0\n",
+ "j = int(raw_input(\"Enter Number : \"))\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "sys.stdout.write(\"Numbers : \")\n",
+ "for i in range(1,j+1):\n",
+ " sys.stdout.write(\"%5d\"%(i))\n",
+ "\n",
+ "sys.stdout.write(\"\\nSquares : \")\n",
+ "for i in range(1,j+1):\n",
+ " sys.stdout.write(\"%5d\"%(i*i))\n",
+ " sum1 = sum1 + i\n",
+ " ssum = ssum + i*i\n",
+ "sys.stdout.write(\"\\nSum of Numbers from 1 to %d : %d\"%(j,sum1))\n",
+ "sys.stdout.write(\"\\nSum of Squares of 1 to %d Numbers : %d\"%(j,ssum))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numbers : 1 2 3 4 5\n",
+ "Squares : 1 4 9 16 25\n",
+ "Sum of Numbers from 1 to 5 : 15\n",
+ "Sum of Squares of 1 to 5 Numbers : 55"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.17, Page number: 118<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the perfect squares from 1 to 500.\n",
+ "\n",
+ "import sys\n",
+ "import math\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\n\")\n",
+ "sys.stdout.write(\"Perfect square from 1 to 500 \\n\")\n",
+ "count = 0\n",
+ "\n",
+ "for i in range(1,500+1):\n",
+ " c = math.sqrt(i)\n",
+ " x = math.floor(c) #For rounding up floor() is used\n",
+ " if c == x:\n",
+ " sys.stdout.write(\"\\t%5d\"%(i))\n",
+ " count += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\nTotal Perfect Squares = %d\"%(count))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "Perfect square from 1 to 500 \n",
+ "\t 1\t 4\t 9\t 16\t 25\t 36\t 49\t 64\t 81\t 100\t 121\t 144\t 169\t 196\t 225\t 256\t 289\t 324\t 361\t 400\t 441\t 484\n",
+ "\n",
+ "Total Perfect Squares = 22"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.18, Page number: 119<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect the largest number out of five numbers.\n",
+ "\n",
+ "import sys\n",
+ "import math\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers.\n",
+ "#since sum is a built in function in python, sum1 is used instead of sum.\n",
+ "\n",
+ "a = int(raw_input(\"Enter five numbers : \"))\n",
+ "b = int(raw_input(\"Enter five numbers : \"))\n",
+ "c = int(raw_input(\"Enter five numbers : \"))\n",
+ "d = int(raw_input(\"Enter five numbers : \"))\n",
+ "e = int(raw_input(\"Enter five numbers : \"))\n",
+ "\n",
+ "sum1 = a + b + c + d + e\n",
+ "\n",
+ "for i in range(sum1,1,-1):\n",
+ " if i == a or i == b or i == c or i == d or i == e:\n",
+ " sys.stdout.write(\"The Largest Number : %d\"%(i))\n",
+ " break\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Largest Number : 7"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.19, Page number: 119<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect the smallesst number out of five numbers.\n",
+ "\n",
+ "import sys\n",
+ "import math\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers.\n",
+ "#since sum is a built in function in python, sum1 is used instead of sum.\n",
+ "\n",
+ "a = int(raw_input(\"Enter five numbers : \"))\n",
+ "b = int(raw_input(\"Enter five numbers : \"))\n",
+ "c = int(raw_input(\"Enter five numbers : \"))\n",
+ "d = int(raw_input(\"Enter five numbers : \"))\n",
+ "e = int(raw_input(\"Enter five numbers : \"))\n",
+ "\n",
+ "sum1 = a + b + c + d + e\n",
+ "\n",
+ "for i in range(1,sum1):\n",
+ " if i == a or i == b or i == c or i == d or i == e:\n",
+ " sys.stdout.write(\"The Smallest Number : %d\"%(i))\n",
+ " break\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Smallest Number : 2"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.20, Page number: 120<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read five numbers and print in ascending order\n",
+ "\n",
+ "import sys\n",
+ "import math\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers.\n",
+ "#since sum is a built in function in python, sum1 is used instead of sum.\n",
+ "\n",
+ "#use commas to separate the input values\n",
+ "a = int(raw_input(\"Enter five numbers : \"))\n",
+ "b = int(raw_input(\"Enter five numbers : \"))\n",
+ "c = int(raw_input(\"Enter five numbers : \"))\n",
+ "d = int(raw_input(\"Enter five numbers : \"))\n",
+ "e = int(raw_input(\"Enter five numbers : \"))\n",
+ "\n",
+ "sys.stdout.write(\"Numbers in ascending order : \")\n",
+ "sum1 = a + b + c + d + e\n",
+ "\n",
+ "for i in range(1,sum1):\n",
+ " if i == a or i == b or i == c or i == d or i == e:\n",
+ " sys.stdout.write(\"%3d\"%(i))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter five numbers : 1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numbers in ascending order : 1 4 5 7 8"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.21, Page number: 121<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Perform multiplication of two integers by using negative sign\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#the range() function creates range of numbers and for loop automatically\n",
+ "#iterate through the numbers.\n",
+ "\n",
+ "a = int(raw_input(\"Enter two numbers : \"))\n",
+ "b = int(raw_input(\"Enter two numbers : \"))\n",
+ "\n",
+ "d = 0\n",
+ "for c in range(1,b+1):\n",
+ " d = d - (-a)\n",
+ "\n",
+ "sys.stdout.write(\"Multiplication of %d * %d : %d\"%(a,b,d))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter two numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter two numbers : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Multiplication of 5 * 5 : 25"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.22, Page number: 121<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Perform multiplication of two integers by using repetitive addition\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#in python, infinite for loop is not possible.\n",
+ "\n",
+ "a = int(raw_input(\"Enter two numbers : \"))\n",
+ "b = int(raw_input(\"Enter two numbers : \"))\n",
+ "\n",
+ "d = 0\n",
+ "c = 1\n",
+ "while True:\n",
+ " d = d + a\n",
+ " if c == b:\n",
+ " break\n",
+ " c += 1\n",
+ "\n",
+ "sys.stdout.write(\"Multiplication of %d * %d : %d\"%(a,b,d))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter two numbers : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter two numbers : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Multiplication of 8 * 4 : 32"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.23, Page number: 122<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the marks for five subjects and calculate sum & average of marks.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#use spaces to separate the input values\n",
+ "#since sum is a built-in function in python, sum1 is used as the variable name\n",
+ "\n",
+ "sys.stdout.write(\"Enter The Marks of Five Subjects \")\n",
+ "sum1 = 0\n",
+ "\n",
+ "for i in range(1,5+1):\n",
+ " sys.stdout.write(\"[%d] Student : \"%(i))\n",
+ " #Exception handling\n",
+ " try:\n",
+ " #use space to separate the input characters\n",
+ " v = raw_input(\"\")\n",
+ " a,b,c,d,e = map(int,v.split())\n",
+ " x = 5\n",
+ " except:\n",
+ " x = 0\n",
+ "\n",
+ " if(x == 5):\n",
+ " sum1 = a + b + c + d + e\n",
+ " avg = sum1/5\n",
+ " sys.stdout.write(\"\\nTotal Marks of Student [%d] %d\"%(i,sum1))\n",
+ " sys.stdout.write(\"\\nAverage Marks of Student [%d] %f\"%(i,avg))\n",
+ " else:\n",
+ " sys.stdout.write(\"Type Mismatch\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The Marks of Five Subjects [1] Student : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "58 52 52 56 78\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Total Marks of Student [1] 296\n",
+ "Average Marks of Student [1] 59.000000[2] Student : "
+ ]
+ }
+ ],
+ "prompt_number": "*"
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.24, Page number: 123<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enter a character and display its position in alphabetic order.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = 1\n",
+ "\n",
+ "ch = raw_input(\"Enter a character :\")\n",
+ "ch = ch.upper()\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "#ord() function converts the character ASCII value to integer\n",
+ "for i in range(65,90+1):\n",
+ " if ord(ch) == i:\n",
+ " sys.stdout.write(\"'%c' is %d [st/nd/rd/th] Character in Alphabetic\"%(i,c))\n",
+ " c += 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a character :U\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "'U' is 21 [st/nd/rd/th] Character in Alphabetic"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.25, Page number: 124<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the value of -m^x.\n",
+ "#'m' is a mantissa and 'x' is an exponent\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "number = int(raw_input(\"Enter Number : \"))\n",
+ "power = int(raw_input(\"Enter Power : \"))\n",
+ "\n",
+ "ans = 1\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(1,power+1):\n",
+ " ans *= number\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The Power of %d raised to %d is %ld\"%(number,power,ans))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Power : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Power of 5 raised to 3 is 125"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.26, Page number: 124<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Subtraction of two loop variables using nested for loops.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for a in range(3,0,-1):\n",
+ " for b in range(1,2+1):\n",
+ " sub = a - b\n",
+ " sys.stdout.write(\"a = %d b = %d a - b = %d\\n\"%(a,b,sub))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a = 3 b = 1 a - b = 2\n",
+ "a = 3 b = 2 a - b = 1\n",
+ "a = 2 b = 1 a - b = 1\n",
+ "a = 2 b = 2 a - b = 0\n",
+ "a = 1 b = 1 a - b = 0\n",
+ "a = 1 b = 2 a - b = -1\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.27, Page number: 125<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Illustrate an example based on nested for loops\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for i in range(1,3+1): #outer loop\n",
+ " for j in range(1,2+1): #inner loop\n",
+ " sys.stdout.write(\"\\ni * j : %d\"%(i*j))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "i * j : 1\n",
+ "i * j : 2\n",
+ "i * j : 2\n",
+ "i * j : 4\n",
+ "i * j : 3\n",
+ "i * j : 6"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.28, Page number: 126<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print values and messages when any loop ends using nested for loops.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for a in range(1,2+1): #outer loop\n",
+ " for b in range(1,2+1): #middle loop\n",
+ " for c in range(1,2+1): #inner loop\n",
+ " sys.stdout.write(\"\\na = %d + b = %d + c = %d : %d\"%(a,b,c,a+b+c))\n",
+ " sys.stdout.write(\"\\nInner Loop Over.\")\n",
+ " sys.stdout.write(\"\\nMiddle Loop Over.\")\n",
+ "sys.stdout.write(\"\\nOuter Loop Over.\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "a = 1 + b = 1 + c = 1 : 3\n",
+ "a = 1 + b = 1 + c = 2 : 4\n",
+ "Inner Loop Over.\n",
+ "a = 1 + b = 2 + c = 1 : 4\n",
+ "a = 1 + b = 2 + c = 2 : 5\n",
+ "Inner Loop Over.\n",
+ "Middle Loop Over.\n",
+ "a = 2 + b = 1 + c = 1 : 4\n",
+ "a = 2 + b = 1 + c = 2 : 5\n",
+ "Inner Loop Over.\n",
+ "a = 2 + b = 2 + c = 1 : 5\n",
+ "a = 2 + b = 2 + c = 2 : 6\n",
+ "Inner Loop Over.\n",
+ "Middle Loop Over.\n",
+ "Outer Loop Over."
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.29, Page number: 127<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display perfect cubes up to given number.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "k = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for i in range(1,k+1):\n",
+ " for j in range(1,i+1): \n",
+ " if i == pow(j,3):\n",
+ " sys.stdout.write(\"\\nNumber : %d & it's Cube : %d\"%(j,i))\n",
+ " \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 100\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Number : 1 & it's Cube : 1\n",
+ "Number : 2 & it's Cube : 8\n",
+ "Number : 3 & it's Cube : 27\n",
+ "Number : 4 & it's Cube : 64"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.30, Page number: 128<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display numbers 1 to 100 using ASCII values from 48 to 57. Use nested loops.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "j = 0\n",
+ "k = -9\n",
+ "\n",
+ "sys.stdout.write(\"\\tTable of 1 to 100 Numbers Using ASCII Values\\n\")\n",
+ "sys.stdout.write(\"\\t===== == = == === ======= ===== ===== ======\\n\")\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for i in range(48,57+1):\n",
+ " for j in range(48,57+1): \n",
+ " sys.stdout.write(\"\\t%c%c\"%(i,j))\n",
+ " #if k != 1:\n",
+ " # sys.stdout.write(\"%c\"%(i+1))\n",
+ " #if k == 0:\n",
+ " # sys.stdout.write(\"\\b\\b%d\"%(k+1))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " k += 1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\tTable of 1 to 100 Numbers Using ASCII Values\n",
+ "\t===== == = == === ======= ===== ===== ======\n",
+ "\t00\t01\t02\t03\t04\t05\t06\t07\t08\t09\n",
+ "\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\n",
+ "\t20\t21\t22\t23\t24\t25\t26\t27\t28\t29\n",
+ "\t30\t31\t32\t33\t34\t35\t36\t37\t38\t39\n",
+ "\t40\t41\t42\t43\t44\t45\t46\t47\t48\t49\n",
+ "\t50\t51\t52\t53\t54\t55\t56\t57\t58\t59\n",
+ "\t60\t61\t62\t63\t64\t65\t66\t67\t68\t69\n",
+ "\t70\t71\t72\t73\t74\t75\t76\t77\t78\t79\n",
+ "\t80\t81\t82\t83\t84\t85\t86\t87\t88\t89\n",
+ "\t90\t91\t92\t93\t94\t95\t96\t97\t98\t99\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.31, Page number: 129<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count number of votes secured by 'A' & 'B'. Assume three voters are\n",
+ "#voting them. Also count the invalid votes.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization & Calculation\n",
+ "a = 0\n",
+ "b = 0\n",
+ "o = 0\n",
+ "sys.stdout.write(\"Press A or B\\n\")\n",
+ "for i in range(1,3+1):\n",
+ " sys.stdout.write(\"\\nVoter no. %d\"%(i))\n",
+ " sys.stdout.write(\" Enter Vote : \")\n",
+ " v = raw_input(\"\")\n",
+ " v = v.upper()\n",
+ " if v == 'A':\n",
+ " a += 1\n",
+ " else:\n",
+ " if v == 'B':\n",
+ " b += 1\n",
+ " else:\n",
+ " o += 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nStatus of vote(s)\\n\")\n",
+ "sys.stdout.write(\"\\nA secures %d vote(s).\"%(a))\n",
+ "sys.stdout.write(\"\\nB secures %d vote(s).\"%(b))\n",
+ "sys.stdout.write(\"\\nInvalid vote(s) %d.\"%(o))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press A or B\n",
+ "\n",
+ "Voter no. 1 Enter Vote : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Voter no. 2 Enter Vote : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Voter no. 3 Enter Vote : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "X\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Status of vote(s)\n",
+ "\n",
+ "A secures 1 vote(s).\n",
+ "B secures 1 vote(s).\n",
+ "Invalid vote(s) 1."
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.32, Page number: 130<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Simulate a digital clock\n",
+ "\n",
+ "import sys\n",
+ "import os\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"hh mm ss\\n\")\n",
+ "for h in range(1,12):\n",
+ " for m in range(1,59):\n",
+ " for s in range(1,59):\n",
+ " sys.stdout.write(\"\\r%d %d %d\"%(h,m,s))\n",
+ " \n",
+ "#Displays the last value"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hh mm ss\n",
+ "\r",
+ "1 1 1\r",
+ "1 1 2\r",
+ "1 1 3\r",
+ "1 1 4\r",
+ "1 1 5\r",
+ "1 1 6\r",
+ "1 1 7\r",
+ "1 1 8\r",
+ "1 1 9\r",
+ "1 1 10\r",
+ "1 1 11\r",
+ "1 1 12\r",
+ "1 1 13\r",
+ "1 1 14\r",
+ "1 1 15\r",
+ "1 1 16\r",
+ "1 1 17\r",
+ "1 1 18\r",
+ "1 1 19\r",
+ "1 1 20\r",
+ "1 1 21\r",
+ "1 1 22\r",
+ "1 1 23\r",
+ "1 1 24\r",
+ "1 1 25\r",
+ "1 1 26\r",
+ "1 1 27\r",
+ "1 1 28\r",
+ "1 1 29\r",
+ "1 1 30\r",
+ "1 1 31\r",
+ "1 1 32\r",
+ "1 1 33\r",
+ "1 1 34\r",
+ "1 1 35\r",
+ "1 1 36\r",
+ "1 1 37\r",
+ "1 1 38\r",
+ "1 1 39\r",
+ "1 1 40\r",
+ "1 1 41\r",
+ "1 1 42\r",
+ "1 1 43\r",
+ "1 1 44\r",
+ "1 1 45\r",
+ "1 1 46\r",
+ "1 1 47\r",
+ "1 1 48\r",
+ "1 1 49\r",
+ "1 1 50\r",
+ "1 1 51\r",
+ "1 1 52\r",
+ "1 1 53\r",
+ "1 1 54\r",
+ "1 1 55\r",
+ "1 1 56\r",
+ "1 1 57\r",
+ "1 1 58\r",
+ "1 2 1\r",
+ "1 2 2\r",
+ "1 2 3\r",
+ "1 2 4\r",
+ "1 2 5\r",
+ "1 2 6\r",
+ "1 2 7\r",
+ "1 2 8\r",
+ "1 2 9\r",
+ "1 2 10\r",
+ "1 2 11\r",
+ "1 2 12\r",
+ "1 2 13\r",
+ "1 2 14\r",
+ "1 2 15\r",
+ "1 2 16\r",
+ "1 2 17\r",
+ "1 2 18\r",
+ "1 2 19\r",
+ "1 2 20\r",
+ "1 2 21\r",
+ "1 2 22\r",
+ "1 2 23\r",
+ "1 2 24\r",
+ "1 2 25\r",
+ "1 2 26\r",
+ "1 2 27\r",
+ "1 2 28\r",
+ "1 2 29\r",
+ "1 2 30\r",
+ "1 2 31\r",
+ "1 2 32\r",
+ "1 2 33\r",
+ "1 2 34\r",
+ "1 2 35\r",
+ "1 2 36\r",
+ "1 2 37\r",
+ "1 2 38\r",
+ "1 2 39\r",
+ "1 2 40\r",
+ "1 2 41\r",
+ "1 2 42\r",
+ "1 2 43\r",
+ "1 2 44\r",
+ "1 2 45\r",
+ "1 2 46\r",
+ "1 2 47\r",
+ "1 2 48\r",
+ "1 2 49\r",
+ "1 2 50\r",
+ "1 2 51\r",
+ "1 2 52\r",
+ "1 2 53\r",
+ "1 2 54\r",
+ "1 2 55\r",
+ "1 2 56\r",
+ "1 2 57\r",
+ "1 2 58\r",
+ "1 3 1\r",
+ "1 3 2\r",
+ "1 3 3\r",
+ "1 3 4\r",
+ "1 3 5\r",
+ "1 3 6\r",
+ "1 3 7\r",
+ "1 3 8\r",
+ "1 3 9\r",
+ "1 3 10\r",
+ "1 3 11\r",
+ "1 3 12\r",
+ "1 3 13\r",
+ "1 3 14\r",
+ "1 3 15\r",
+ "1 3 16\r",
+ "1 3 17\r",
+ "1 3 18\r",
+ "1 3 19\r",
+ "1 3 20\r",
+ "1 3 21\r",
+ "1 3 22\r",
+ "1 3 23\r",
+ "1 3 24\r",
+ "1 3 25\r",
+ "1 3 26\r",
+ "1 3 27\r",
+ "1 3 28\r",
+ "1 3 29\r",
+ "1 3 30\r",
+ "1 3 31\r",
+ "1 3 32\r",
+ "1 3 33\r",
+ "1 3 34\r",
+ "1 3 35\r",
+ "1 3 36\r",
+ "1 3 37\r",
+ "1 3 38\r",
+ "1 3 39\r",
+ "1 3 40\r",
+ "1 3 41\r",
+ "1 3 42\r",
+ "1 3 43\r",
+ "1 3 44\r",
+ "1 3 45\r",
+ "1 3 46\r",
+ "1 3 47\r",
+ "1 3 48\r",
+ "1 3 49\r",
+ "1 3 50\r",
+ "1 3 51\r",
+ "1 3 52\r",
+ "1 3 53\r",
+ "1 3 54\r",
+ "1 3 55\r",
+ "1 3 56\r",
+ "1 3 57\r",
+ "1 3 58\r",
+ "1 4 1\r",
+ "1 4 2\r",
+ "1 4 3\r",
+ "1 4 4\r",
+ "1 4 5\r",
+ "1 4 6\r",
+ "1 4 7\r",
+ "1 4 8\r",
+ "1 4 9\r",
+ "1 4 10\r",
+ "1 4 11\r",
+ "1 4 12\r",
+ "1 4 13\r",
+ "1 4 14\r",
+ "1 4 15\r",
+ "1 4 16\r",
+ "1 4 17\r",
+ "1 4 18\r",
+ "1 4 19\r",
+ "1 4 20\r",
+ "1 4 21\r",
+ "1 4 22\r",
+ "1 4 23\r",
+ "1 4 24\r",
+ "1 4 25\r",
+ "1 4 26\r",
+ "1 4 27\r",
+ "1 4 28\r",
+ "1 4 29\r",
+ "1 4 30\r",
+ "1 4 31\r",
+ "1 4 32\r",
+ "1 4 33\r",
+ "1 4 34\r",
+ "1 4 35\r",
+ "1 4 36\r",
+ "1 4 37\r",
+ "1 4 38\r",
+ "1 4 39\r",
+ "1 4 40\r",
+ "1 4 41\r",
+ "1 4 42\r",
+ "1 4 43\r",
+ "1 4 44\r",
+ "1 4 45\r",
+ "1 4 46\r",
+ "1 4 47\r",
+ "1 4 48\r",
+ "1 4 49\r",
+ "1 4 50\r",
+ "1 4 51\r",
+ "1 4 52\r",
+ "1 4 53\r",
+ "1 4 54\r",
+ "1 4 55\r",
+ "1 4 56\r",
+ "1 4 57\r",
+ "1 4 58\r",
+ "1 5 1\r",
+ "1 5 2\r",
+ "1 5 3\r",
+ "1 5 4\r",
+ "1 5 5\r",
+ "1 5 6\r",
+ "1 5 7\r",
+ "1 5 8\r",
+ "1 5 9\r",
+ "1 5 10\r",
+ "1 5 11\r",
+ "1 5 12\r",
+ "1 5 13\r",
+ "1 5 14\r",
+ "1 5 15\r",
+ "1 5 16\r",
+ "1 5 17\r",
+ "1 5 18\r",
+ "1 5 19\r",
+ "1 5 20\r",
+ "1 5 21\r",
+ "1 5 22\r",
+ "1 5 23\r",
+ "1 5 24\r",
+ "1 5 25\r",
+ "1 5 26\r",
+ "1 5 27\r",
+ "1 5 28\r",
+ "1 5 29\r",
+ "1 5 30\r",
+ "1 5 31\r",
+ "1 5 32\r",
+ "1 5 33\r",
+ "1 5 34\r",
+ "1 5 35\r",
+ "1 5 36\r",
+ "1 5 37\r",
+ "1 5 38\r",
+ "1 5 39\r",
+ "1 5 40\r",
+ "1 5 41\r",
+ "1 5 42\r",
+ "1 5 43\r",
+ "1 5 44\r",
+ "1 5 45\r",
+ "1 5 46\r",
+ "1 5 47\r",
+ "1 5 48\r",
+ "1 5 49\r",
+ "1 5 50\r",
+ "1 5 51\r",
+ "1 5 52\r",
+ "1 5 53\r",
+ "1 5 54\r",
+ "1 5 55\r",
+ "1 5 56\r",
+ "1 5 57\r",
+ "1 5 58\r",
+ "1 6 1\r",
+ "1 6 2\r",
+ "1 6 3\r",
+ "1 6 4\r",
+ "1 6 5\r",
+ "1 6 6\r",
+ "1 6 7\r",
+ "1 6 8\r",
+ "1 6 9\r",
+ "1 6 10\r",
+ "1 6 11\r",
+ "1 6 12\r",
+ "1 6 13\r",
+ "1 6 14\r",
+ "1 6 15\r",
+ "1 6 16\r",
+ "1 6 17\r",
+ "1 6 18\r",
+ "1 6 19\r",
+ "1 6 20\r",
+ "1 6 21\r",
+ "1 6 22\r",
+ "1 6 23\r",
+ "1 6 24\r",
+ "1 6 25\r",
+ "1 6 26\r",
+ "1 6 27\r",
+ "1 6 28\r",
+ "1 6 29\r",
+ "1 6 30\r",
+ "1 6 31\r",
+ "1 6 32\r",
+ "1 6 33\r",
+ "1 6 34\r",
+ "1 6 35\r",
+ "1 6 36\r",
+ "1 6 37\r",
+ "1 6 38\r",
+ "1 6 39\r",
+ "1 6 40\r",
+ "1 6 41\r",
+ "1 6 42\r",
+ "1 6 43\r",
+ "1 6 44\r",
+ "1 6 45\r",
+ "1 6 46\r",
+ "1 6 47\r",
+ "1 6 48\r",
+ "1 6 49\r",
+ "1 6 50\r",
+ "1 6 51\r",
+ "1 6 52\r",
+ "1 6 53\r",
+ "1 6 54\r",
+ "1 6 55\r",
+ "1 6 56\r",
+ "1 6 57\r",
+ "1 6 58\r",
+ "1 7 1\r",
+ "1 7 2\r",
+ "1 7 3\r",
+ "1 7 4\r",
+ "1 7 5\r",
+ "1 7 6\r",
+ "1 7 7\r",
+ "1 7 8\r",
+ "1 7 9\r",
+ "1 7 10\r",
+ "1 7 11\r",
+ "1 7 12\r",
+ "1 7 13\r",
+ "1 7 14\r",
+ "1 7 15\r",
+ "1 7 16\r",
+ "1 7 17\r",
+ "1 7 18\r",
+ "1 7 19\r",
+ "1 7 20\r",
+ "1 7 21\r",
+ "1 7 22\r",
+ "1 7 23\r",
+ "1 7 24\r",
+ "1 7 25\r",
+ "1 7 26\r",
+ "1 7 27\r",
+ "1 7 28\r",
+ "1 7 29\r",
+ "1 7 30\r",
+ "1 7 31\r",
+ "1 7 32\r",
+ "1 7 33\r",
+ "1 7 34\r",
+ "1 7 35\r",
+ "1 7 36\r",
+ "1 7 37\r",
+ "1 7 38\r",
+ "1 7 39\r",
+ "1 7 40\r",
+ "1 7 41\r",
+ "1 7 42\r",
+ "1 7 43\r",
+ "1 7 44\r",
+ "1 7 45\r",
+ "1 7 46\r",
+ "1 7 47\r",
+ "1 7 48\r",
+ "1 7 49\r",
+ "1 7 50\r",
+ "1 7 51\r",
+ "1 7 52\r",
+ "1 7 53\r",
+ "1 7 54\r",
+ "1 7 55\r",
+ "1 7 56\r",
+ "1 7 57\r",
+ "1 7 58\r",
+ "1 8 1\r",
+ "1 8 2\r",
+ "1 8 3\r",
+ "1 8 4\r",
+ "1 8 5\r",
+ "1 8 6\r",
+ "1 8 7\r",
+ "1 8 8\r",
+ "1 8 9\r",
+ "1 8 10\r",
+ "1 8 11\r",
+ "1 8 12\r",
+ "1 8 13\r",
+ "1 8 14\r",
+ "1 8 15\r",
+ "1 8 16\r",
+ "1 8 17\r",
+ "1 8 18\r",
+ "1 8 19\r",
+ "1 8 20\r",
+ "1 8 21\r",
+ "1 8 22\r",
+ "1 8 23\r",
+ "1 8 24\r",
+ "1 8 25\r",
+ "1 8 26\r",
+ "1 8 27\r",
+ "1 8 28\r",
+ "1 8 29\r",
+ "1 8 30\r",
+ "1 8 31\r",
+ "1 8 32\r",
+ "1 8 33\r",
+ "1 8 34\r",
+ "1 8 35\r",
+ "1 8 36\r",
+ "1 8 37\r",
+ "1 8 38\r",
+ "1 8 39\r",
+ "1 8 40\r",
+ "1 8 41\r",
+ "1 8 42\r",
+ "1 8 43\r",
+ "1 8 44\r",
+ "1 8 45\r",
+ "1 8 46\r",
+ "1 8 47\r",
+ "1 8 48\r",
+ "1 8 49\r",
+ "1 8 50\r",
+ "1 8 51\r",
+ "1 8 52\r",
+ "1 8 53\r",
+ "1 8 54\r",
+ "1 8 55\r",
+ "1 8 56\r",
+ "1 8 57\r",
+ "1 8 58\r",
+ "1 9 1\r",
+ "1 9 2\r",
+ "1 9 3\r",
+ "1 9 4\r",
+ "1 9 5\r",
+ "1 9 6\r",
+ "1 9 7\r",
+ "1 9 8\r",
+ "1 9 9\r",
+ "1 9 10\r",
+ "1 9 11\r",
+ "1 9 12\r",
+ "1 9 13\r",
+ "1 9 14\r",
+ "1 9 15\r",
+ "1 9 16\r",
+ "1 9 17\r",
+ "1 9 18\r",
+ "1 9 19\r",
+ "1 9 20\r",
+ "1 9 21\r",
+ "1 9 22\r",
+ "1 9 23\r",
+ "1 9 24\r",
+ "1 9 25\r",
+ "1 9 26\r",
+ "1 9 27\r",
+ "1 9 28\r",
+ "1 9 29\r",
+ "1 9 30\r",
+ "1 9 31\r",
+ "1 9 32\r",
+ "1 9 33\r",
+ "1 9 34\r",
+ "1 9 35\r",
+ "1 9 36\r",
+ "1 9 37\r",
+ "1 9 38\r",
+ "1 9 39\r",
+ "1 9 40\r",
+ "1 9 41\r",
+ "1 9 42\r",
+ "1 9 43\r",
+ "1 9 44\r",
+ "1 9 45\r",
+ "1 9 46\r",
+ "1 9 47\r",
+ "1 9 48\r",
+ "1 9 49\r",
+ "1 9 50\r",
+ "1 9 51\r",
+ "1 9 52\r",
+ "1 9 53\r",
+ "1 9 54\r",
+ "1 9 55\r",
+ "1 9 56\r",
+ "1 9 57\r",
+ "1 9 58\r",
+ "1 10 1\r",
+ "1 10 2\r",
+ "1 10 3\r",
+ "1 10 4\r",
+ "1 10 5\r",
+ "1 10 6\r",
+ "1 10 7\r",
+ "1 10 8\r",
+ "1 10 9\r",
+ "1 10 10\r",
+ "1 10 11\r",
+ "1 10 12\r",
+ "1 10 13\r",
+ "1 10 14\r",
+ "1 10 15\r",
+ "1 10 16\r",
+ "1 10 17\r",
+ "1 10 18\r",
+ "1 10 19\r",
+ "1 10 20\r",
+ "1 10 21\r",
+ "1 10 22\r",
+ "1 10 23\r",
+ "1 10 24\r",
+ "1 10 25\r",
+ "1 10 26\r",
+ "1 10 27\r",
+ "1 10 28\r",
+ "1 10 29\r",
+ "1 10 30\r",
+ "1 10 31\r",
+ "1 10 32\r",
+ "1 10 33\r",
+ "1 10 34\r",
+ "1 10 35\r",
+ "1 10 36\r",
+ "1 10 37\r",
+ "1 10 38\r",
+ "1 10 39\r",
+ "1 10 40\r",
+ "1 10 41\r",
+ "1 10 42\r",
+ "1 10 43\r",
+ "1 10 44\r",
+ "1 10 45\r",
+ "1 10 46\r",
+ "1 10 47\r",
+ "1 10 48\r",
+ "1 10 49\r",
+ "1 10 50\r",
+ "1 10 51\r",
+ "1 10 52\r",
+ "1 10 53\r",
+ "1 10 54\r",
+ "1 10 55\r",
+ "1 10 56\r",
+ "1 10 57\r",
+ "1 10 58\r",
+ "1 11 1\r",
+ "1 11 2\r",
+ "1 11 3\r",
+ "1 11 4\r",
+ "1 11 5\r",
+ "1 11 6\r",
+ "1 11 7\r",
+ "1 11 8\r",
+ "1 11 9\r",
+ "1 11 10\r",
+ "1 11 11\r",
+ "1 11 12\r",
+ "1 11 13\r",
+ "1 11 14\r",
+ "1 11 15\r",
+ "1 11 16\r",
+ "1 11 17\r",
+ "1 11 18\r",
+ "1 11 19\r",
+ "1 11 20\r",
+ "1 11 21\r",
+ "1 11 22\r",
+ "1 11 23\r",
+ "1 11 24\r",
+ "1 11 25\r",
+ "1 11 26\r",
+ "1 11 27\r",
+ "1 11 28\r",
+ "1 11 29\r",
+ "1 11 30\r",
+ "1 11 31\r",
+ "1 11 32\r",
+ "1 11 33\r",
+ "1 11 34\r",
+ "1 11 35\r",
+ "1 11 36\r",
+ "1 11 37\r",
+ "1 11 38\r",
+ "1 11 39\r",
+ "1 11 40\r",
+ "1 11 41\r",
+ "1 11 42\r",
+ "1 11 43\r",
+ "1 11 44\r",
+ "1 11 45\r",
+ "1 11 46\r",
+ "1 11 47\r",
+ "1 11 48\r",
+ "1 11 49\r",
+ "1 11 50\r",
+ "1 11 51\r",
+ "1 11 52\r",
+ "1 11 53\r",
+ "1 11 54\r",
+ "1 11 55\r",
+ "1 11 56\r",
+ "1 11 57\r",
+ "1 11 58\r",
+ "1 12 1\r",
+ "1 12 2\r",
+ "1 12 3\r",
+ "1 12 4\r",
+ "1 12 5\r",
+ "1 12 6\r",
+ "1 12 7\r",
+ "1 12 8\r",
+ "1 12 9\r",
+ "1 12 10\r",
+ "1 12 11\r",
+ "1 12 12\r",
+ "1 12 13\r",
+ "1 12 14\r",
+ "1 12 15\r",
+ "1 12 16\r",
+ "1 12 17\r",
+ "1 12 18\r",
+ "1 12 19\r",
+ "1 12 20\r",
+ "1 12 21\r",
+ "1 12 22\r",
+ "1 12 23\r",
+ "1 12 24\r",
+ "1 12 25\r",
+ "1 12 26\r",
+ "1 12 27\r",
+ "1 12 28\r",
+ "1 12 29\r",
+ "1 12 30\r",
+ "1 12 31\r",
+ "1 12 32\r",
+ "1 12 33\r",
+ "1 12 34\r",
+ "1 12 35\r",
+ "1 12 36\r",
+ "1 12 37\r",
+ "1 12 38\r",
+ "1 12 39\r",
+ "1 12 40\r",
+ "1 12 41\r",
+ "1 12 42\r",
+ "1 12 43\r",
+ "1 12 44\r",
+ "1 12 45\r",
+ "1 12 46\r",
+ "1 12 47\r",
+ "1 12 48\r",
+ "1 12 49\r",
+ "1 12 50\r",
+ "1 12 51\r",
+ "1 12 52\r",
+ "1 12 53\r",
+ "1 12 54\r",
+ "1 12 55\r",
+ "1 12 56\r",
+ "1 12 57\r",
+ "1 12 58\r",
+ "1 13 1\r",
+ "1 13 2\r",
+ "1 13 3\r",
+ "1 13 4\r",
+ "1 13 5\r",
+ "1 13 6\r",
+ "1 13 7\r",
+ "1 13 8\r",
+ "1 13 9\r",
+ "1 13 10\r",
+ "1 13 11\r",
+ "1 13 12\r",
+ "1 13 13\r",
+ "1 13 14\r",
+ "1 13 15\r",
+ "1 13 16\r",
+ "1 13 17\r",
+ "1 13 18\r",
+ "1 13 19\r",
+ "1 13 20\r",
+ "1 13 21\r",
+ "1 13 22\r",
+ "1 13 23\r",
+ "1 13 24\r",
+ "1 13 25\r",
+ "1 13 26\r",
+ "1 13 27\r",
+ "1 13 28\r",
+ "1 13 29\r",
+ "1 13 30\r",
+ "1 13 31\r",
+ "1 13 32\r",
+ "1 13 33\r",
+ "1 13 34\r",
+ "1 13 35\r",
+ "1 13 36\r",
+ "1 13 37\r",
+ "1 13 38\r",
+ "1 13 39\r",
+ "1 13 40\r",
+ "1 13 41\r",
+ "1 13 42\r",
+ "1 13 43\r",
+ "1 13 44\r",
+ "1 13 45\r",
+ "1 13 46\r",
+ "1 13 47\r",
+ "1 13 48\r",
+ "1 13 49\r",
+ "1 13 50\r",
+ "1 13 51\r",
+ "1 13 52\r",
+ "1 13 53\r",
+ "1 13 54\r",
+ "1 13 55\r",
+ "1 13 56\r",
+ "1 13 57\r",
+ "1 13 58\r",
+ "1 14 1\r",
+ "1 14 2\r",
+ "1 14 3\r",
+ "1 14 4\r",
+ "1 14 5\r",
+ "1 14 6\r",
+ "1 14 7\r",
+ "1 14 8\r",
+ "1 14 9\r",
+ "1 14 10\r",
+ "1 14 11\r",
+ "1 14 12\r",
+ "1 14 13\r",
+ "1 14 14\r",
+ "1 14 15\r",
+ "1 14 16\r",
+ "1 14 17\r",
+ "1 14 18\r",
+ "1 14 19\r",
+ "1 14 20\r",
+ "1 14 21\r",
+ "1 14 22\r",
+ "1 14 23\r",
+ "1 14 24\r",
+ "1 14 25\r",
+ "1 14 26\r",
+ "1 14 27\r",
+ "1 14 28\r",
+ "1 14 29\r",
+ "1 14 30\r",
+ "1 14 31\r",
+ "1 14 32\r",
+ "1 14 33\r",
+ "1 14 34\r",
+ "1 14 35\r",
+ "1 14 36\r",
+ "1 14 37\r",
+ "1 14 38\r",
+ "1 14 39\r",
+ "1 14 40\r",
+ "1 14 41\r",
+ "1 14 42\r",
+ "1 14 43\r",
+ "1 14 44\r",
+ "1 14 45\r",
+ "1 14 46\r",
+ "1 14 47\r",
+ "1 14 48\r",
+ "1 14 49\r",
+ "1 14 50\r",
+ "1 14 51\r",
+ "1 14 52\r",
+ "1 14 53\r",
+ "1 14 54\r",
+ "1 14 55\r",
+ "1 14 56\r",
+ "1 14 57\r",
+ "1 14 58\r",
+ "1 15 1\r",
+ "1 15 2\r",
+ "1 15 3\r",
+ "1 15 4\r",
+ "1 15 5\r",
+ "1 15 6\r",
+ "1 15 7\r",
+ "1 15 8\r",
+ "1 15 9\r",
+ "1 15 10\r",
+ "1 15 11\r",
+ "1 15 12\r",
+ "1 15 13\r",
+ "1 15 14\r",
+ "1 15 15\r",
+ "1 15 16\r",
+ "1 15 17\r",
+ "1 15 18\r",
+ "1 15 19\r",
+ "1 15 20\r",
+ "1 15 21\r",
+ "1 15 22\r",
+ "1 15 23\r",
+ "1 15 24\r",
+ "1 15 25\r",
+ "1 15 26\r",
+ "1 15 27\r",
+ "1 15 28\r",
+ "1 15 29\r",
+ "1 15 30\r",
+ "1 15 31\r",
+ "1 15 32\r",
+ "1 15 33\r",
+ "1 15 34\r",
+ "1 15 35\r",
+ "1 15 36\r",
+ "1 15 37\r",
+ "1 15 38\r",
+ "1 15 39\r",
+ "1 15 40\r",
+ "1 15 41\r",
+ "1 15 42\r",
+ "1 15 43\r",
+ "1 15 44\r",
+ "1 15 45\r",
+ "1 15 46\r",
+ "1 15 47\r",
+ "1 15 48\r",
+ "1 15 49\r",
+ "1 15 50\r",
+ "1 15 51\r",
+ "1 15 52\r",
+ "1 15 53\r",
+ "1 15 54\r",
+ "1 15 55\r",
+ "1 15 56\r",
+ "1 15 57\r",
+ "1 15 58\r",
+ "1 16 1\r",
+ "1 16 2\r",
+ "1 16 3\r",
+ "1 16 4\r",
+ "1 16 5\r",
+ "1 16 6\r",
+ "1 16 7\r",
+ "1 16 8\r",
+ "1 16 9\r",
+ "1 16 10\r",
+ "1 16 11\r",
+ "1 16 12\r",
+ "1 16 13\r",
+ "1 16 14\r",
+ "1 16 15\r",
+ "1 16 16\r",
+ "1 16 17\r",
+ "1 16 18\r",
+ "1 16 19\r",
+ "1 16 20\r",
+ "1 16 21\r",
+ "1 16 22\r",
+ "1 16 23\r",
+ "1 16 24\r",
+ "1 16 25\r",
+ "1 16 26\r",
+ "1 16 27\r",
+ "1 16 28\r",
+ "1 16 29\r",
+ "1 16 30\r",
+ "1 16 31\r",
+ "1 16 32\r",
+ "1 16 33\r",
+ "1 16 34\r",
+ "1 16 35\r",
+ "1 16 36\r",
+ "1 16 37\r",
+ "1 16 38\r",
+ "1 16 39\r",
+ "1 16 40\r",
+ "1 16 41\r",
+ "1 16 42\r",
+ "1 16 43\r",
+ "1 16 44\r",
+ "1 16 45\r",
+ "1 16 46\r",
+ "1 16 47\r",
+ "1 16 48\r",
+ "1 16 49\r",
+ "1 16 50\r",
+ "1 16 51\r",
+ "1 16 52\r",
+ "1 16 53\r",
+ "1 16 54\r",
+ "1 16 55\r",
+ "1 16 56\r",
+ "1 16 57\r",
+ "1 16 58\r",
+ "1 17 1\r",
+ "1 17 2\r",
+ "1 17 3\r",
+ "1 17 4\r",
+ "1 17 5\r",
+ "1 17 6\r",
+ "1 17 7\r",
+ "1 17 8\r",
+ "1 17 9\r",
+ "1 17 10\r",
+ "1 17 11\r",
+ "1 17 12\r",
+ "1 17 13\r",
+ "1 17 14\r",
+ "1 17 15\r",
+ "1 17 16\r",
+ "1 17 17\r",
+ "1 17 18\r",
+ "1 17 19\r",
+ "1 17 20\r",
+ "1 17 21\r",
+ "1 17 22\r",
+ "1 17 23\r",
+ "1 17 24\r",
+ "1 17 25\r",
+ "1 17 26\r",
+ "1 17 27\r",
+ "1 17 28\r",
+ "1 17 29\r",
+ "1 17 30\r",
+ "1 17 31\r",
+ "1 17 32\r",
+ "1 17 33\r",
+ "1 17 34\r",
+ "1 17 35\r",
+ "1 17 36\r",
+ "1 17 37\r",
+ "1 17 38\r",
+ "1 17 39\r",
+ "1 17 40\r",
+ "1 17 41\r",
+ "1 17 42\r",
+ "1 17 43\r",
+ "1 17 44\r",
+ "1 17 45\r",
+ "1 17 46\r",
+ "1 17 47\r",
+ "1 17 48\r",
+ "1 17 49\r",
+ "1 17 50\r",
+ "1 17 51\r",
+ "1 17 52\r",
+ "1 17 53\r",
+ "1 17 54\r",
+ "1 17 55\r",
+ "1 17 56\r",
+ "1 17 57\r",
+ "1 17 58\r",
+ "1 18 1\r",
+ "1 18 2\r",
+ "1 18 3\r",
+ "1 18 4\r",
+ "1 18 5\r",
+ "1 18 6\r",
+ "1 18 7\r",
+ "1 18 8\r",
+ "1 18 9\r",
+ "1 18 10\r",
+ "1 18 11\r",
+ "1 18 12\r",
+ "1 18 13\r",
+ "1 18 14\r",
+ "1 18 15\r",
+ "1 18 16\r",
+ "1 18 17\r",
+ "1 18 18\r",
+ "1 18 19\r",
+ "1 18 20\r",
+ "1 18 21\r",
+ "1 18 22\r",
+ "1 18 23\r",
+ "1 18 24\r",
+ "1 18 25\r",
+ "1 18 26\r",
+ "1 18 27\r",
+ "1 18 28\r",
+ "1 18 29\r",
+ "1 18 30\r",
+ "1 18 31\r",
+ "1 18 32\r",
+ "1 18 33\r",
+ "1 18 34\r",
+ "1 18 35\r",
+ "1 18 36\r",
+ "1 18 37\r",
+ "1 18 38\r",
+ "1 18 39\r",
+ "1 18 40\r",
+ "1 18 41\r",
+ "1 18 42\r",
+ "1 18 43\r",
+ "1 18 44\r",
+ "1 18 45\r",
+ "1 18 46\r",
+ "1 18 47\r",
+ "1 18 48\r",
+ "1 18 49\r",
+ "1 18 50\r",
+ "1 18 51\r",
+ "1 18 52\r",
+ "1 18 53\r",
+ "1 18 54\r",
+ "1 18 55\r",
+ "1 18 56\r",
+ "1 18 57\r",
+ "1 18 58\r",
+ "1 19 1\r",
+ "1 19 2\r",
+ "1 19 3\r",
+ "1 19 4\r",
+ "1 19 5\r",
+ "1 19 6\r",
+ "1 19 7\r",
+ "1 19 8\r",
+ "1 19 9\r",
+ "1 19 10\r",
+ "1 19 11\r",
+ "1 19 12\r",
+ "1 19 13\r",
+ "1 19 14\r",
+ "1 19 15\r",
+ "1 19 16\r",
+ "1 19 17\r",
+ "1 19 18\r",
+ "1 19 19\r",
+ "1 19 20\r",
+ "1 19 21\r",
+ "1 19 22\r",
+ "1 19 23\r",
+ "1 19 24\r",
+ "1 19 25\r",
+ "1 19 26\r",
+ "1 19 27\r",
+ "1 19 28\r",
+ "1 19 29\r",
+ "1 19 30\r",
+ "1 19 31\r",
+ "1 19 32\r",
+ "1 19 33\r",
+ "1 19 34\r",
+ "1 19 35\r",
+ "1 19 36\r",
+ "1 19 37\r",
+ "1 19 38\r",
+ "1 19 39\r",
+ "1 19 40\r",
+ "1 19 41\r",
+ "1 19 42\r",
+ "1 19 43\r",
+ "1 19 44\r",
+ "1 19 45\r",
+ "1 19 46\r",
+ "1 19 47\r",
+ "1 19 48\r",
+ "1 19 49\r",
+ "1 19 50\r",
+ "1 19 51\r",
+ "1 19 52\r",
+ "1 19 53\r",
+ "1 19 54\r",
+ "1 19 55\r",
+ "1 19 56\r",
+ "1 19 57\r",
+ "1 19 58\r",
+ "1 20 1\r",
+ "1 20 2\r",
+ "1 20 3\r",
+ "1 20 4\r",
+ "1 20 5\r",
+ "1 20 6\r",
+ "1 20 7\r",
+ "1 20 8\r",
+ "1 20 9\r",
+ "1 20 10\r",
+ "1 20 11\r",
+ "1 20 12\r",
+ "1 20 13\r",
+ "1 20 14\r",
+ "1 20 15\r",
+ "1 20 16\r",
+ "1 20 17\r",
+ "1 20 18\r",
+ "1 20 19\r",
+ "1 20 20\r",
+ "1 20 21\r",
+ "1 20 22\r",
+ "1 20 23\r",
+ "1 20 24\r",
+ "1 20 25\r",
+ "1 20 26\r",
+ "1 20 27\r",
+ "1 20 28\r",
+ "1 20 29\r",
+ "1 20 30\r",
+ "1 20 31\r",
+ "1 20 32\r",
+ "1 20 33\r",
+ "1 20 34\r",
+ "1 20 35\r",
+ "1 20 36\r",
+ "1 20 37\r",
+ "1 20 38\r",
+ "1 20 39\r",
+ "1 20 40\r",
+ "1 20 41\r",
+ "1 20 42\r",
+ "1 20 43\r",
+ "1 20 44\r",
+ "1 20 45\r",
+ "1 20 46\r",
+ "1 20 47\r",
+ "1 20 48\r",
+ "1 20 49\r",
+ "1 20 50\r",
+ "1 20 51\r",
+ "1 20 52\r",
+ "1 20 53\r",
+ "1 20 54\r",
+ "1 20 55\r",
+ "1 20 56\r",
+ "1 20 57\r",
+ "1 20 58\r",
+ "1 21 1\r",
+ "1 21 2\r",
+ "1 21 3\r",
+ "1 21 4\r",
+ "1 21 5\r",
+ "1 21 6\r",
+ "1 21 7\r",
+ "1 21 8\r",
+ "1 21 9\r",
+ "1 21 10\r",
+ "1 21 11\r",
+ "1 21 12\r",
+ "1 21 13\r",
+ "1 21 14\r",
+ "1 21 15\r",
+ "1 21 16\r",
+ "1 21 17\r",
+ "1 21 18\r",
+ "1 21 19\r",
+ "1 21 20\r",
+ "1 21 21\r",
+ "1 21 22\r",
+ "1 21 23\r",
+ "1 21 24\r",
+ "1 21 25\r",
+ "1 21 26\r",
+ "1 21 27\r",
+ "1 21 28\r",
+ "1 21 29\r",
+ "1 21 30\r",
+ "1 21 31\r",
+ "1 21 32\r",
+ "1 21 33\r",
+ "1 21 34\r",
+ "1 21 35\r",
+ "1 21 36\r",
+ "1 21 37\r",
+ "1 21 38\r",
+ "1 21 39\r",
+ "1 21 40\r",
+ "1 21 41\r",
+ "1 21 42\r",
+ "1 21 43\r",
+ "1 21 44\r",
+ "1 21 45\r",
+ "1 21 46\r",
+ "1 21 47\r",
+ "1 21 48\r",
+ "1 21 49\r",
+ "1 21 50\r",
+ "1 21 51\r",
+ "1 21 52\r",
+ "1 21 53\r",
+ "1 21 54\r",
+ "1 21 55\r",
+ "1 21 56\r",
+ "1 21 57\r",
+ "1 21 58\r",
+ "1 22 1\r",
+ "1 22 2\r",
+ "1 22 3\r",
+ "1 22 4\r",
+ "1 22 5\r",
+ "1 22 6\r",
+ "1 22 7\r",
+ "1 22 8\r",
+ "1 22 9\r",
+ "1 22 10\r",
+ "1 22 11\r",
+ "1 22 12\r",
+ "1 22 13\r",
+ "1 22 14\r",
+ "1 22 15\r",
+ "1 22 16\r",
+ "1 22 17\r",
+ "1 22 18\r",
+ "1 22 19\r",
+ "1 22 20\r",
+ "1 22 21\r",
+ "1 22 22\r",
+ "1 22 23\r",
+ "1 22 24\r",
+ "1 22 25\r",
+ "1 22 26\r",
+ "1 22 27\r",
+ "1 22 28\r",
+ "1 22 29\r",
+ "1 22 30\r",
+ "1 22 31\r",
+ "1 22 32\r",
+ "1 22 33\r",
+ "1 22 34\r",
+ "1 22 35\r",
+ "1 22 36\r",
+ "1 22 37\r",
+ "1 22 38\r",
+ "1 22 39\r",
+ "1 22 40\r",
+ "1 22 41\r",
+ "1 22 42\r",
+ "1 22 43\r",
+ "1 22 44\r",
+ "1 22 45\r",
+ "1 22 46\r",
+ "1 22 47\r",
+ "1 22 48\r",
+ "1 22 49\r",
+ "1 22 50\r",
+ "1 22 51\r",
+ "1 22 52\r",
+ "1 22 53\r",
+ "1 22 54\r",
+ "1 22 55\r",
+ "1 22 56\r",
+ "1 22 57\r",
+ "1 22 58\r",
+ "1 23 1\r",
+ "1 23 2\r",
+ "1 23 3\r",
+ "1 23 4\r",
+ "1 23 5\r",
+ "1 23 6\r",
+ "1 23 7\r",
+ "1 23 8\r",
+ "1 23 9\r",
+ "1 23 10\r",
+ "1 23 11\r",
+ "1 23 12\r",
+ "1 23 13\r",
+ "1 23 14\r",
+ "1 23 15\r",
+ "1 23 16\r",
+ "1 23 17\r",
+ "1 23 18\r",
+ "1 23 19\r",
+ "1 23 20\r",
+ "1 23 21\r",
+ "1 23 22\r",
+ "1 23 23\r",
+ "1 23 24\r",
+ "1 23 25\r",
+ "1 23 26\r",
+ "1 23 27\r",
+ "1 23 28\r",
+ "1 23 29\r",
+ "1 23 30\r",
+ "1 23 31\r",
+ "1 23 32\r",
+ "1 23 33\r",
+ "1 23 34\r",
+ "1 23 35\r",
+ "1 23 36\r",
+ "1 23 37\r",
+ "1 23 38\r",
+ "1 23 39\r",
+ "1 23 40\r",
+ "1 23 41\r",
+ "1 23 42\r",
+ "1 23 43\r",
+ "1 23 44\r",
+ "1 23 45\r",
+ "1 23 46\r",
+ "1 23 47\r",
+ "1 23 48\r",
+ "1 23 49\r",
+ "1 23 50\r",
+ "1 23 51\r",
+ "1 23 52\r",
+ "1 23 53\r",
+ "1 23 54\r",
+ "1 23 55\r",
+ "1 23 56\r",
+ "1 23 57\r",
+ "1 23 58\r",
+ "1 24 1\r",
+ "1 24 2\r",
+ "1 24 3\r",
+ "1 24 4\r",
+ "1 24 5\r",
+ "1 24 6\r",
+ "1 24 7\r",
+ "1 24 8\r",
+ "1 24 9\r",
+ "1 24 10\r",
+ "1 24 11\r",
+ "1 24 12\r",
+ "1 24 13\r",
+ "1 24 14\r",
+ "1 24 15\r",
+ "1 24 16\r",
+ "1 24 17\r",
+ "1 24 18\r",
+ "1 24 19\r",
+ "1 24 20\r",
+ "1 24 21\r",
+ "1 24 22\r",
+ "1 24 23\r",
+ "1 24 24\r",
+ "1 24 25\r",
+ "1 24 26\r",
+ "1 24 27\r",
+ "1 24 28\r",
+ "1 24 29\r",
+ "1 24 30\r",
+ "1 24 31\r",
+ "1 24 32\r",
+ "1 24 33\r",
+ "1 24 34\r",
+ "1 24 35\r",
+ "1 24 36\r",
+ "1 24 37\r",
+ "1 24 38\r",
+ "1 24 39\r",
+ "1 24 40\r",
+ "1 24 41\r",
+ "1 24 42\r",
+ "1 24 43\r",
+ "1 24 44\r",
+ "1 24 45\r",
+ "1 24 46\r",
+ "1 24 47\r",
+ "1 24 48\r",
+ "1 24 49\r",
+ "1 24 50\r",
+ "1 24 51\r",
+ "1 24 52\r",
+ "1 24 53\r",
+ "1 24 54\r",
+ "1 24 55\r",
+ "1 24 56\r",
+ "1 24 57\r",
+ "1 24 58\r",
+ "1 25 1\r",
+ "1 25 2\r",
+ "1 25 3\r",
+ "1 25 4\r",
+ "1 25 5\r",
+ "1 25 6\r",
+ "1 25 7\r",
+ "1 25 8\r",
+ "1 25 9\r",
+ "1 25 10\r",
+ "1 25 11\r",
+ "1 25 12\r",
+ "1 25 13\r",
+ "1 25 14\r",
+ "1 25 15\r",
+ "1 25 16\r",
+ "1 25 17\r",
+ "1 25 18\r",
+ "1 25 19\r",
+ "1 25 20\r",
+ "1 25 21\r",
+ "1 25 22\r",
+ "1 25 23\r",
+ "1 25 24\r",
+ "1 25 25\r",
+ "1 25 26\r",
+ "1 25 27\r",
+ "1 25 28\r",
+ "1 25 29\r",
+ "1 25 30\r",
+ "1 25 31\r",
+ "1 25 32\r",
+ "1 25 33\r",
+ "1 25 34\r",
+ "1 25 35\r",
+ "1 25 36\r",
+ "1 25 37\r",
+ "1 25 38\r",
+ "1 25 39\r",
+ "1 25 40\r",
+ "1 25 41\r",
+ "1 25 42\r",
+ "1 25 43\r",
+ "1 25 44\r",
+ "1 25 45\r",
+ "1 25 46\r",
+ "1 25 47\r",
+ "1 25 48\r",
+ "1 25 49\r",
+ "1 25 50\r",
+ "1 25 51\r",
+ "1 25 52\r",
+ "1 25 53\r",
+ "1 25 54\r",
+ "1 25 55\r",
+ "1 25 56\r",
+ "1 25 57\r",
+ "1 25 58\r",
+ "1 26 1\r",
+ "1 26 2\r",
+ "1 26 3\r",
+ "1 26 4\r",
+ "1 26 5\r",
+ "1 26 6\r",
+ "1 26 7\r",
+ "1 26 8\r",
+ "1 26 9\r",
+ "1 26 10\r",
+ "1 26 11\r",
+ "1 26 12\r",
+ "1 26 13\r",
+ "1 26 14\r",
+ "1 26 15\r",
+ "1 26 16\r",
+ "1 26 17\r",
+ "1 26 18\r",
+ "1 26 19\r",
+ "1 26 20\r",
+ "1 26 21\r",
+ "1 26 22\r",
+ "1 26 23\r",
+ "1 26 24\r",
+ "1 26 25\r",
+ "1 26 26\r",
+ "1 26 27\r",
+ "1 26 28\r",
+ "1 26 29\r",
+ "1 26 30\r",
+ "1 26 31\r",
+ "1 26 32\r",
+ "1 26 33\r",
+ "1 26 34\r",
+ "1 26 35\r",
+ "1 26 36\r",
+ "1 26 37\r",
+ "1 26 38\r",
+ "1 26 39\r",
+ "1 26 40\r",
+ "1 26 41\r",
+ "1 26 42\r",
+ "1 26 43\r",
+ "1 26 44\r",
+ "1 26 45\r",
+ "1 26 46\r",
+ "1 26 47\r",
+ "1 26 48\r",
+ "1 26 49\r",
+ "1 26 50\r",
+ "1 26 51\r",
+ "1 26 52\r",
+ "1 26 53\r",
+ "1 26 54\r",
+ "1 26 55\r",
+ "1 26 56\r",
+ "1 26 57\r",
+ "1 26 58\r",
+ "1 27 1\r",
+ "1 27 2\r",
+ "1 27 3\r",
+ "1 27 4\r",
+ "1 27 5\r",
+ "1 27 6\r",
+ "1 27 7\r",
+ "1 27 8\r",
+ "1 27 9\r",
+ "1 27 10\r",
+ "1 27 11\r",
+ "1 27 12\r",
+ "1 27 13\r",
+ "1 27 14\r",
+ "1 27 15\r",
+ "1 27 16\r",
+ "1 27 17\r",
+ "1 27 18\r",
+ "1 27 19\r",
+ "1 27 20\r",
+ "1 27 21\r",
+ "1 27 22\r",
+ "1 27 23\r",
+ "1 27 24\r",
+ "1 27 25\r",
+ "1 27 26\r",
+ "1 27 27\r",
+ "1 27 28\r",
+ "1 27 29\r",
+ "1 27 30\r",
+ "1 27 31\r",
+ "1 27 32\r",
+ "1 27 33\r",
+ "1 27 34\r",
+ "1 27 35\r",
+ "1 27 36\r",
+ "1 27 37\r",
+ "1 27 38\r",
+ "1 27 39\r",
+ "1 27 40\r",
+ "1 27 41\r",
+ "1 27 42\r",
+ "1 27 43\r",
+ "1 27 44\r",
+ "1 27 45\r",
+ "1 27 46\r",
+ "1 27 47\r",
+ "1 27 48\r",
+ "1 27 49\r",
+ "1 27 50\r",
+ "1 27 51\r",
+ "1 27 52\r",
+ "1 27 53\r",
+ "1 27 54\r",
+ "1 27 55\r",
+ "1 27 56\r",
+ "1 27 57\r",
+ "1 27 58\r",
+ "1 28 1\r",
+ "1 28 2\r",
+ "1 28 3\r",
+ "1 28 4\r",
+ "1 28 5\r",
+ "1 28 6\r",
+ "1 28 7\r",
+ "1 28 8\r",
+ "1 28 9\r",
+ "1 28 10\r",
+ "1 28 11\r",
+ "1 28 12\r",
+ "1 28 13\r",
+ "1 28 14\r",
+ "1 28 15\r",
+ "1 28 16\r",
+ "1 28 17\r",
+ "1 28 18\r",
+ "1 28 19\r",
+ "1 28 20\r",
+ "1 28 21\r",
+ "1 28 22\r",
+ "1 28 23\r",
+ "1 28 24\r",
+ "1 28 25\r",
+ "1 28 26\r",
+ "1 28 27\r",
+ "1 28 28\r",
+ "1 28 29\r",
+ "1 28 30\r",
+ "1 28 31\r",
+ "1 28 32\r",
+ "1 28 33\r",
+ "1 28 34\r",
+ "1 28 35\r",
+ "1 28 36\r",
+ "1 28 37\r",
+ "1 28 38\r",
+ "1 28 39\r",
+ "1 28 40\r",
+ "1 28 41\r",
+ "1 28 42\r",
+ "1 28 43\r",
+ "1 28 44\r",
+ "1 28 45\r",
+ "1 28 46\r",
+ "1 28 47\r",
+ "1 28 48\r",
+ "1 28 49\r",
+ "1 28 50\r",
+ "1 28 51\r",
+ "1 28 52\r",
+ "1 28 53\r",
+ "1 28 54\r",
+ "1 28 55\r",
+ "1 28 56\r",
+ "1 28 57\r",
+ "1 28 58\r",
+ "1 29 1\r",
+ "1 29 2\r",
+ "1 29 3\r",
+ "1 29 4\r",
+ "1 29 5\r",
+ "1 29 6\r",
+ "1 29 7\r",
+ "1 29 8\r",
+ "1 29 9\r",
+ "1 29 10\r",
+ "1 29 11\r",
+ "1 29 12\r",
+ "1 29 13\r",
+ "1 29 14\r",
+ "1 29 15\r",
+ "1 29 16\r",
+ "1 29 17\r",
+ "1 29 18\r",
+ "1 29 19\r",
+ "1 29 20\r",
+ "1 29 21\r",
+ "1 29 22\r",
+ "1 29 23\r",
+ "1 29 24\r",
+ "1 29 25\r",
+ "1 29 26\r",
+ "1 29 27\r",
+ "1 29 28\r",
+ "1 29 29\r",
+ "1 29 30\r",
+ "1 29 31\r",
+ "1 29 32\r",
+ "1 29 33\r",
+ "1 29 34\r",
+ "1 29 35\r",
+ "1 29 36\r",
+ "1 29 37\r",
+ "1 29 38\r",
+ "1 29 39\r",
+ "1 29 40\r",
+ "1 29 41\r",
+ "1 29 42\r",
+ "1 29 43\r",
+ "1 29 44\r",
+ "1 29 45\r",
+ "1 29 46\r",
+ "1 29 47\r",
+ "1 29 48\r",
+ "1 29 49\r",
+ "1 29 50\r",
+ "1 29 51\r",
+ "1 29 52\r",
+ "1 29 53\r",
+ "1 29 54\r",
+ "1 29 55\r",
+ "1 29 56\r",
+ "1 29 57\r",
+ "1 29 58\r",
+ "1 30 1\r",
+ "1 30 2\r",
+ "1 30 3\r",
+ "1 30 4\r",
+ "1 30 5\r",
+ "1 30 6\r",
+ "1 30 7\r",
+ "1 30 8\r",
+ "1 30 9\r",
+ "1 30 10\r",
+ "1 30 11\r",
+ "1 30 12\r",
+ "1 30 13\r",
+ "1 30 14\r",
+ "1 30 15\r",
+ "1 30 16\r",
+ "1 30 17\r",
+ "1 30 18\r",
+ "1 30 19\r",
+ "1 30 20\r",
+ "1 30 21\r",
+ "1 30 22\r",
+ "1 30 23\r",
+ "1 30 24\r",
+ "1 30 25\r",
+ "1 30 26\r",
+ "1 30 27\r",
+ "1 30 28\r",
+ "1 30 29\r",
+ "1 30 30\r",
+ "1 30 31\r",
+ "1 30 32\r",
+ "1 30 33\r",
+ "1 30 34\r",
+ "1 30 35\r",
+ "1 30 36\r",
+ "1 30 37\r",
+ "1 30 38\r",
+ "1 30 39\r",
+ "1 30 40\r",
+ "1 30 41\r",
+ "1 30 42\r",
+ "1 30 43\r",
+ "1 30 44\r",
+ "1 30 45\r",
+ "1 30 46\r",
+ "1 30 47\r",
+ "1 30 48\r",
+ "1 30 49\r",
+ "1 30 50\r",
+ "1 30 51\r",
+ "1 30 52\r",
+ "1 30 53\r",
+ "1 30 54\r",
+ "1 30 55\r",
+ "1 30 56\r",
+ "1 30 57\r",
+ "1 30 58\r",
+ "1 31 1\r",
+ "1 31 2\r",
+ "1 31 3\r",
+ "1 31 4\r",
+ "1 31 5\r",
+ "1 31 6\r",
+ "1 31 7\r",
+ "1 31 8\r",
+ "1 31 9\r",
+ "1 31 10\r",
+ "1 31 11\r",
+ "1 31 12\r",
+ "1 31 13\r",
+ "1 31 14\r",
+ "1 31 15\r",
+ "1 31 16\r",
+ "1 31 17\r",
+ "1 31 18\r",
+ "1 31 19\r",
+ "1 31 20\r",
+ "1 31 21\r",
+ "1 31 22\r",
+ "1 31 23\r",
+ "1 31 24\r",
+ "1 31 25\r",
+ "1 31 26\r",
+ "1 31 27\r",
+ "1 31 28\r",
+ "1 31 29\r",
+ "1 31 30\r",
+ "1 31 31\r",
+ "1 31 32\r",
+ "1 31 33\r",
+ "1 31 34\r",
+ "1 31 35\r",
+ "1 31 36\r",
+ "1 31 37\r",
+ "1 31 38\r",
+ "1 31 39\r",
+ "1 31 40\r",
+ "1 31 41\r",
+ "1 31 42\r",
+ "1 31 43\r",
+ "1 31 44\r",
+ "1 31 45\r",
+ "1 31 46\r",
+ "1 31 47\r",
+ "1 31 48\r",
+ "1 31 49\r",
+ "1 31 50\r",
+ "1 31 51\r",
+ "1 31 52\r",
+ "1 31 53\r",
+ "1 31 54\r",
+ "1 31 55\r",
+ "1 31 56\r",
+ "1 31 57\r",
+ "1 31 58\r",
+ "1 32 1\r",
+ "1 32 2\r",
+ "1 32 3\r",
+ "1 32 4\r",
+ "1 32 5\r",
+ "1 32 6\r",
+ "1 32 7\r",
+ "1 32 8\r",
+ "1 32 9\r",
+ "1 32 10\r",
+ "1 32 11\r",
+ "1 32 12\r",
+ "1 32 13\r",
+ "1 32 14\r",
+ "1 32 15\r",
+ "1 32 16\r",
+ "1 32 17\r",
+ "1 32 18\r",
+ "1 32 19\r",
+ "1 32 20\r",
+ "1 32 21\r",
+ "1 32 22\r",
+ "1 32 23\r",
+ "1 32 24\r",
+ "1 32 25\r",
+ "1 32 26\r",
+ "1 32 27\r",
+ "1 32 28\r",
+ "1 32 29\r",
+ "1 32 30\r",
+ "1 32 31\r",
+ "1 32 32\r",
+ "1 32 33\r",
+ "1 32 34\r",
+ "1 32 35\r",
+ "1 32 36\r",
+ "1 32 37\r",
+ "1 32 38\r",
+ "1 32 39\r",
+ "1 32 40\r",
+ "1 32 41\r",
+ "1 32 42\r",
+ "1 32 43\r",
+ "1 32 44\r",
+ "1 32 45\r",
+ "1 32 46\r",
+ "1 32 47\r",
+ "1 32 48\r",
+ "1 32 49\r",
+ "1 32 50\r",
+ "1 32 51\r",
+ "1 32 52\r",
+ "1 32 53\r",
+ "1 32 54\r",
+ "1 32 55\r",
+ "1 32 56\r",
+ "1 32 57\r",
+ "1 32 58\r",
+ "1 33 1\r",
+ "1 33 2\r",
+ "1 33 3\r",
+ "1 33 4\r",
+ "1 33 5\r",
+ "1 33 6\r",
+ "1 33 7\r",
+ "1 33 8\r",
+ "1 33 9\r",
+ "1 33 10\r",
+ "1 33 11\r",
+ "1 33 12\r",
+ "1 33 13\r",
+ "1 33 14\r",
+ "1 33 15\r",
+ "1 33 16\r",
+ "1 33 17\r",
+ "1 33 18\r",
+ "1 33 19\r",
+ "1 33 20\r",
+ "1 33 21\r",
+ "1 33 22\r",
+ "1 33 23\r",
+ "1 33 24\r",
+ "1 33 25\r",
+ "1 33 26\r",
+ "1 33 27\r",
+ "1 33 28\r",
+ "1 33 29\r",
+ "1 33 30\r",
+ "1 33 31\r",
+ "1 33 32\r",
+ "1 33 33\r",
+ "1 33 34\r",
+ "1 33 35\r",
+ "1 33 36\r",
+ "1 33 37\r",
+ "1 33 38\r",
+ "1 33 39\r",
+ "1 33 40\r",
+ "1 33 41\r",
+ "1 33 42\r",
+ "1 33 43\r",
+ "1 33 44\r",
+ "1 33 45\r",
+ "1 33 46\r",
+ "1 33 47\r",
+ "1 33 48\r",
+ "1 33 49\r",
+ "1 33 50\r",
+ "1 33 51\r",
+ "1 33 52\r",
+ "1 33 53\r",
+ "1 33 54\r",
+ "1 33 55\r",
+ "1 33 56\r",
+ "1 33 57\r",
+ "1 33 58\r",
+ "1 34 1\r",
+ "1 34 2\r",
+ "1 34 3\r",
+ "1 34 4\r",
+ "1 34 5\r",
+ "1 34 6\r",
+ "1 34 7\r",
+ "1 34 8\r",
+ "1 34 9\r",
+ "1 34 10\r",
+ "1 34 11\r",
+ "1 34 12\r",
+ "1 34 13\r",
+ "1 34 14\r",
+ "1 34 15\r",
+ "1 34 16\r",
+ "1 34 17\r",
+ "1 34 18\r",
+ "1 34 19\r",
+ "1 34 20\r",
+ "1 34 21\r",
+ "1 34 22\r",
+ "1 34 23\r",
+ "1 34 24\r",
+ "1 34 25\r",
+ "1 34 26\r",
+ "1 34 27\r",
+ "1 34 28\r",
+ "1 34 29\r",
+ "1 34 30\r",
+ "1 34 31\r",
+ "1 34 32\r",
+ "1 34 33\r",
+ "1 34 34\r",
+ "1 34 35\r",
+ "1 34 36\r",
+ "1 34 37\r",
+ "1 34 38\r",
+ "1 34 39\r",
+ "1 34 40\r",
+ "1 34 41\r",
+ "1 34 42\r",
+ "1 34 43\r",
+ "1 34 44\r",
+ "1 34 45\r",
+ "1 34 46\r",
+ "1 34 47\r",
+ "1 34 48\r",
+ "1 34 49\r",
+ "1 34 50\r",
+ "1 34 51\r",
+ "1 34 52\r",
+ "1 34 53\r",
+ "1 34 54\r",
+ "1 34 55\r",
+ "1 34 56\r",
+ "1 34 57\r",
+ "1 34 58\r",
+ "1 35 1\r",
+ "1 35 2\r",
+ "1 35 3\r",
+ "1 35 4\r",
+ "1 35 5\r",
+ "1 35 6\r",
+ "1 35 7\r",
+ "1 35 8\r",
+ "1 35 9\r",
+ "1 35 10\r",
+ "1 35 11\r",
+ "1 35 12\r",
+ "1 35 13\r",
+ "1 35 14\r",
+ "1 35 15\r",
+ "1 35 16\r",
+ "1 35 17\r",
+ "1 35 18\r",
+ "1 35 19\r",
+ "1 35 20\r",
+ "1 35 21\r",
+ "1 35 22\r",
+ "1 35 23\r",
+ "1 35 24\r",
+ "1 35 25\r",
+ "1 35 26\r",
+ "1 35 27\r",
+ "1 35 28\r",
+ "1 35 29\r",
+ "1 35 30\r",
+ "1 35 31\r",
+ "1 35 32\r",
+ "1 35 33\r",
+ "1 35 34\r",
+ "1 35 35\r",
+ "1 35 36\r",
+ "1 35 37\r",
+ "1 35 38\r",
+ "1 35 39\r",
+ "1 35 40\r",
+ "1 35 41\r",
+ "1 35 42\r",
+ "1 35 43\r",
+ "1 35 44\r",
+ "1 35 45\r",
+ "1 35 46\r",
+ "1 35 47\r",
+ "1 35 48\r",
+ "1 35 49\r",
+ "1 35 50\r",
+ "1 35 51\r",
+ "1 35 52\r",
+ "1 35 53\r",
+ "1 35 54\r",
+ "1 35 55\r",
+ "1 35 56\r",
+ "1 35 57\r",
+ "1 35 58\r",
+ "1 36 1\r",
+ "1 36 2\r",
+ "1 36 3\r",
+ "1 36 4\r",
+ "1 36 5\r",
+ "1 36 6\r",
+ "1 36 7\r",
+ "1 36 8\r",
+ "1 36 9\r",
+ "1 36 10\r",
+ "1 36 11\r",
+ "1 36 12\r",
+ "1 36 13\r",
+ "1 36 14\r",
+ "1 36 15\r",
+ "1 36 16\r",
+ "1 36 17\r",
+ "1 36 18\r",
+ "1 36 19\r",
+ "1 36 20\r",
+ "1 36 21\r",
+ "1 36 22\r",
+ "1 36 23\r",
+ "1 36 24\r",
+ "1 36 25\r",
+ "1 36 26\r",
+ "1 36 27\r",
+ "1 36 28\r",
+ "1 36 29\r",
+ "1 36 30\r",
+ "1 36 31\r",
+ "1 36 32\r",
+ "1 36 33\r",
+ "1 36 34\r",
+ "1 36 35\r",
+ "1 36 36\r",
+ "1 36 37\r",
+ "1 36 38\r",
+ "1 36 39\r",
+ "1 36 40\r",
+ "1 36 41\r",
+ "1 36 42\r",
+ "1 36 43\r",
+ "1 36 44\r",
+ "1 36 45\r",
+ "1 36 46\r",
+ "1 36 47\r",
+ "1 36 48\r",
+ "1 36 49\r",
+ "1 36 50\r",
+ "1 36 51\r",
+ "1 36 52\r",
+ "1 36 53\r",
+ "1 36 54\r",
+ "1 36 55\r",
+ "1 36 56\r",
+ "1 36 57\r",
+ "1 36 58\r",
+ "1 37 1\r",
+ "1 37 2\r",
+ "1 37 3\r",
+ "1 37 4\r",
+ "1 37 5\r",
+ "1 37 6\r",
+ "1 37 7\r",
+ "1 37 8\r",
+ "1 37 9\r",
+ "1 37 10\r",
+ "1 37 11\r",
+ "1 37 12\r",
+ "1 37 13\r",
+ "1 37 14\r",
+ "1 37 15\r",
+ "1 37 16\r",
+ "1 37 17\r",
+ "1 37 18\r",
+ "1 37 19\r",
+ "1 37 20\r",
+ "1 37 21\r",
+ "1 37 22\r",
+ "1 37 23\r",
+ "1 37 24\r",
+ "1 37 25\r",
+ "1 37 26\r",
+ "1 37 27\r",
+ "1 37 28\r",
+ "1 37 29\r",
+ "1 37 30\r",
+ "1 37 31\r",
+ "1 37 32\r",
+ "1 37 33\r",
+ "1 37 34\r",
+ "1 37 35\r",
+ "1 37 36\r",
+ "1 37 37\r",
+ "1 37 38\r",
+ "1 37 39\r",
+ "1 37 40\r",
+ "1 37 41\r",
+ "1 37 42\r",
+ "1 37 43\r",
+ "1 37 44\r",
+ "1 37 45\r",
+ "1 37 46\r",
+ "1 37 47\r",
+ "1 37 48\r",
+ "1 37 49\r",
+ "1 37 50\r",
+ "1 37 51\r",
+ "1 37 52\r",
+ "1 37 53\r",
+ "1 37 54\r",
+ "1 37 55\r",
+ "1 37 56\r",
+ "1 37 57\r",
+ "1 37 58\r",
+ "1 38 1\r",
+ "1 38 2\r",
+ "1 38 3\r",
+ "1 38 4\r",
+ "1 38 5\r",
+ "1 38 6\r",
+ "1 38 7\r",
+ "1 38 8\r",
+ "1 38 9\r",
+ "1 38 10\r",
+ "1 38 11\r",
+ "1 38 12\r",
+ "1 38 13\r",
+ "1 38 14\r",
+ "1 38 15\r",
+ "1 38 16\r",
+ "1 38 17\r",
+ "1 38 18\r",
+ "1 38 19\r",
+ "1 38 20\r",
+ "1 38 21\r",
+ "1 38 22\r",
+ "1 38 23\r",
+ "1 38 24\r",
+ "1 38 25\r",
+ "1 38 26\r",
+ "1 38 27\r",
+ "1 38 28\r",
+ "1 38 29\r",
+ "1 38 30\r",
+ "1 38 31\r",
+ "1 38 32\r",
+ "1 38 33\r",
+ "1 38 34\r",
+ "1 38 35\r",
+ "1 38 36\r",
+ "1 38 37\r",
+ "1 38 38\r",
+ "1 38 39\r",
+ "1 38 40\r",
+ "1 38 41\r",
+ "1 38 42\r",
+ "1 38 43\r",
+ "1 38 44\r",
+ "1 38 45\r",
+ "1 38 46\r",
+ "1 38 47\r",
+ "1 38 48\r",
+ "1 38 49\r",
+ "1 38 50\r",
+ "1 38 51\r",
+ "1 38 52\r",
+ "1 38 53\r",
+ "1 38 54\r",
+ "1 38 55\r",
+ "1 38 56\r",
+ "1 38 57\r",
+ "1 38 58\r",
+ "1 39 1\r",
+ "1 39 2\r",
+ "1 39 3\r",
+ "1 39 4\r",
+ "1 39 5\r",
+ "1 39 6\r",
+ "1 39 7\r",
+ "1 39 8\r",
+ "1 39 9\r",
+ "1 39 10\r",
+ "1 39 11\r",
+ "1 39 12\r",
+ "1 39 13\r",
+ "1 39 14\r",
+ "1 39 15\r",
+ "1 39 16\r",
+ "1 39 17\r",
+ "1 39 18\r",
+ "1 39 19\r",
+ "1 39 20\r",
+ "1 39 21\r",
+ "1 39 22\r",
+ "1 39 23\r",
+ "1 39 24\r",
+ "1 39 25\r",
+ "1 39 26\r",
+ "1 39 27\r",
+ "1 39 28\r",
+ "1 39 29\r",
+ "1 39 30\r",
+ "1 39 31\r",
+ "1 39 32\r",
+ "1 39 33\r",
+ "1 39 34\r",
+ "1 39 35\r",
+ "1 39 36\r",
+ "1 39 37\r",
+ "1 39 38\r",
+ "1 39 39\r",
+ "1 39 40\r",
+ "1 39 41\r",
+ "1 39 42\r",
+ "1 39 43\r",
+ "1 39 44\r",
+ "1 39 45\r",
+ "1 39 46\r",
+ "1 39 47\r",
+ "1 39 48\r",
+ "1 39 49\r",
+ "1 39 50\r",
+ "1 39 51\r",
+ "1 39 52\r",
+ "1 39 53\r",
+ "1 39 54\r",
+ "1 39 55\r",
+ "1 39 56\r",
+ "1 39 57\r",
+ "1 39 58\r",
+ "1 40 1\r",
+ "1 40 2\r",
+ "1 40 3\r",
+ "1 40 4\r",
+ "1 40 5\r",
+ "1 40 6\r",
+ "1 40 7\r",
+ "1 40 8\r",
+ "1 40 9\r",
+ "1 40 10\r",
+ "1 40 11\r",
+ "1 40 12\r",
+ "1 40 13\r",
+ "1 40 14\r",
+ "1 40 15\r",
+ "1 40 16\r",
+ "1 40 17\r",
+ "1 40 18\r",
+ "1 40 19\r",
+ "1 40 20\r",
+ "1 40 21\r",
+ "1 40 22\r",
+ "1 40 23\r",
+ "1 40 24\r",
+ "1 40 25\r",
+ "1 40 26\r",
+ "1 40 27\r",
+ "1 40 28\r",
+ "1 40 29\r",
+ "1 40 30\r",
+ "1 40 31\r",
+ "1 40 32\r",
+ "1 40 33\r",
+ "1 40 34\r",
+ "1 40 35\r",
+ "1 40 36\r",
+ "1 40 37\r",
+ "1 40 38\r",
+ "1 40 39\r",
+ "1 40 40\r",
+ "1 40 41\r",
+ "1 40 42\r",
+ "1 40 43\r",
+ "1 40 44\r",
+ "1 40 45\r",
+ "1 40 46\r",
+ "1 40 47\r",
+ "1 40 48\r",
+ "1 40 49\r",
+ "1 40 50\r",
+ "1 40 51\r",
+ "1 40 52\r",
+ "1 40 53\r",
+ "1 40 54\r",
+ "1 40 55\r",
+ "1 40 56\r",
+ "1 40 57\r",
+ "1 40 58\r",
+ "1 41 1\r",
+ "1 41 2\r",
+ "1 41 3\r",
+ "1 41 4\r",
+ "1 41 5\r",
+ "1 41 6\r",
+ "1 41 7\r",
+ "1 41 8\r",
+ "1 41 9\r",
+ "1 41 10\r",
+ "1 41 11\r",
+ "1 41 12\r",
+ "1 41 13\r",
+ "1 41 14\r",
+ "1 41 15\r",
+ "1 41 16\r",
+ "1 41 17\r",
+ "1 41 18\r",
+ "1 41 19\r",
+ "1 41 20\r",
+ "1 41 21\r",
+ "1 41 22\r",
+ "1 41 23\r",
+ "1 41 24\r",
+ "1 41 25\r",
+ "1 41 26\r",
+ "1 41 27\r",
+ "1 41 28\r",
+ "1 41 29\r",
+ "1 41 30\r",
+ "1 41 31\r",
+ "1 41 32\r",
+ "1 41 33\r",
+ "1 41 34\r",
+ "1 41 35\r",
+ "1 41 36\r",
+ "1 41 37\r",
+ "1 41 38\r",
+ "1 41 39\r",
+ "1 41 40\r",
+ "1 41 41\r",
+ "1 41 42\r",
+ "1 41 43\r",
+ "1 41 44\r",
+ "1 41 45\r",
+ "1 41 46\r",
+ "1 41 47\r",
+ "1 41 48\r",
+ "1 41 49\r",
+ "1 41 50\r",
+ "1 41 51\r",
+ "1 41 52\r",
+ "1 41 53\r",
+ "1 41 54\r",
+ "1 41 55\r",
+ "1 41 56\r",
+ "1 41 57\r",
+ "1 41 58\r",
+ "1 42 1\r",
+ "1 42 2\r",
+ "1 42 3\r",
+ "1 42 4\r",
+ "1 42 5\r",
+ "1 42 6\r",
+ "1 42 7\r",
+ "1 42 8\r",
+ "1 42 9\r",
+ "1 42 10\r",
+ "1 42 11\r",
+ "1 42 12\r",
+ "1 42 13\r",
+ "1 42 14\r",
+ "1 42 15\r",
+ "1 42 16\r",
+ "1 42 17\r",
+ "1 42 18\r",
+ "1 42 19\r",
+ "1 42 20\r",
+ "1 42 21\r",
+ "1 42 22\r",
+ "1 42 23\r",
+ "1 42 24\r",
+ "1 42 25\r",
+ "1 42 26\r",
+ "1 42 27\r",
+ "1 42 28\r",
+ "1 42 29\r",
+ "1 42 30\r",
+ "1 42 31\r",
+ "1 42 32\r",
+ "1 42 33\r",
+ "1 42 34\r",
+ "1 42 35\r",
+ "1 42 36\r",
+ "1 42 37\r",
+ "1 42 38\r",
+ "1 42 39\r",
+ "1 42 40\r",
+ "1 42 41\r",
+ "1 42 42\r",
+ "1 42 43\r",
+ "1 42 44\r",
+ "1 42 45\r",
+ "1 42 46\r",
+ "1 42 47\r",
+ "1 42 48\r",
+ "1 42 49\r",
+ "1 42 50\r",
+ "1 42 51\r",
+ "1 42 52\r",
+ "1 42 53\r",
+ "1 42 54\r",
+ "1 42 55\r",
+ "1 42 56\r",
+ "1 42 57\r",
+ "1 42 58\r",
+ "1 43 1\r",
+ "1 43 2\r",
+ "1 43 3\r",
+ "1 43 4\r",
+ "1 43 5\r",
+ "1 43 6\r",
+ "1 43 7\r",
+ "1 43 8\r",
+ "1 43 9\r",
+ "1 43 10\r",
+ "1 43 11\r",
+ "1 43 12\r",
+ "1 43 13\r",
+ "1 43 14\r",
+ "1 43 15\r",
+ "1 43 16\r",
+ "1 43 17\r",
+ "1 43 18\r",
+ "1 43 19\r",
+ "1 43 20\r",
+ "1 43 21\r",
+ "1 43 22\r",
+ "1 43 23\r",
+ "1 43 24\r",
+ "1 43 25\r",
+ "1 43 26\r",
+ "1 43 27\r",
+ "1 43 28\r",
+ "1 43 29\r",
+ "1 43 30\r",
+ "1 43 31\r",
+ "1 43 32\r",
+ "1 43 33\r",
+ "1 43 34\r",
+ "1 43 35\r",
+ "1 43 36\r",
+ "1 43 37\r",
+ "1 43 38\r",
+ "1 43 39\r",
+ "1 43 40\r",
+ "1 43 41\r",
+ "1 43 42\r",
+ "1 43 43\r",
+ "1 43 44\r",
+ "1 43 45\r",
+ "1 43 46\r",
+ "1 43 47\r",
+ "1 43 48\r",
+ "1 43 49\r",
+ "1 43 50\r",
+ "1 43 51\r",
+ "1 43 52\r",
+ "1 43 53\r",
+ "1 43 54\r",
+ "1 43 55\r",
+ "1 43 56\r",
+ "1 43 57\r",
+ "1 43 58\r",
+ "1 44 1\r",
+ "1 44 2\r",
+ "1 44 3\r",
+ "1 44 4\r",
+ "1 44 5\r",
+ "1 44 6\r",
+ "1 44 7\r",
+ "1 44 8\r",
+ "1 44 9\r",
+ "1 44 10\r",
+ "1 44 11\r",
+ "1 44 12\r",
+ "1 44 13\r",
+ "1 44 14\r",
+ "1 44 15\r",
+ "1 44 16\r",
+ "1 44 17\r",
+ "1 44 18\r",
+ "1 44 19\r",
+ "1 44 20\r",
+ "1 44 21\r",
+ "1 44 22\r",
+ "1 44 23\r",
+ "1 44 24\r",
+ "1 44 25\r",
+ "1 44 26\r",
+ "1 44 27\r",
+ "1 44 28\r",
+ "1 44 29\r",
+ "1 44 30\r",
+ "1 44 31\r",
+ "1 44 32\r",
+ "1 44 33\r",
+ "1 44 34\r",
+ "1 44 35\r",
+ "1 44 36\r",
+ "1 44 37\r",
+ "1 44 38\r",
+ "1 44 39\r",
+ "1 44 40\r",
+ "1 44 41\r",
+ "1 44 42\r",
+ "1 44 43\r",
+ "1 44 44\r",
+ "1 44 45\r",
+ "1 44 46\r",
+ "1 44 47\r",
+ "1 44 48\r",
+ "1 44 49\r",
+ "1 44 50\r",
+ "1 44 51\r",
+ "1 44 52\r",
+ "1 44 53\r",
+ "1 44 54\r",
+ "1 44 55\r",
+ "1 44 56\r",
+ "1 44 57\r",
+ "1 44 58\r",
+ "1 45 1\r",
+ "1 45 2\r",
+ "1 45 3\r",
+ "1 45 4\r",
+ "1 45 5\r",
+ "1 45 6\r",
+ "1 45 7\r",
+ "1 45 8\r",
+ "1 45 9\r",
+ "1 45 10\r",
+ "1 45 11\r",
+ "1 45 12\r",
+ "1 45 13\r",
+ "1 45 14\r",
+ "1 45 15\r",
+ "1 45 16\r",
+ "1 45 17\r",
+ "1 45 18\r",
+ "1 45 19\r",
+ "1 45 20\r",
+ "1 45 21\r",
+ "1 45 22\r",
+ "1 45 23\r",
+ "1 45 24\r",
+ "1 45 25\r",
+ "1 45 26\r",
+ "1 45 27\r",
+ "1 45 28\r",
+ "1 45 29\r",
+ "1 45 30\r",
+ "1 45 31\r",
+ "1 45 32\r",
+ "1 45 33\r",
+ "1 45 34\r",
+ "1 45 35\r",
+ "1 45 36\r",
+ "1 45 37\r",
+ "1 45 38\r",
+ "1 45 39\r",
+ "1 45 40\r",
+ "1 45 41\r",
+ "1 45 42\r",
+ "1 45 43\r",
+ "1 45 44\r",
+ "1 45 45\r",
+ "1 45 46\r",
+ "1 45 47\r",
+ "1 45 48\r",
+ "1 45 49\r",
+ "1 45 50\r",
+ "1 45 51\r",
+ "1 45 52\r",
+ "1 45 53\r",
+ "1 45 54\r",
+ "1 45 55\r",
+ "1 45 56\r",
+ "1 45 57\r",
+ "1 45 58\r",
+ "1 46 1\r",
+ "1 46 2\r",
+ "1 46 3\r",
+ "1 46 4\r",
+ "1 46 5\r",
+ "1 46 6\r",
+ "1 46 7\r",
+ "1 46 8\r",
+ "1 46 9\r",
+ "1 46 10\r",
+ "1 46 11\r",
+ "1 46 12\r",
+ "1 46 13\r",
+ "1 46 14\r",
+ "1 46 15\r",
+ "1 46 16\r",
+ "1 46 17\r",
+ "1 46 18\r",
+ "1 46 19\r",
+ "1 46 20\r",
+ "1 46 21\r",
+ "1 46 22\r",
+ "1 46 23\r",
+ "1 46 24\r",
+ "1 46 25\r",
+ "1 46 26\r",
+ "1 46 27\r",
+ "1 46 28\r",
+ "1 46 29\r",
+ "1 46 30\r",
+ "1 46 31\r",
+ "1 46 32\r",
+ "1 46 33\r",
+ "1 46 34\r",
+ "1 46 35\r",
+ "1 46 36\r",
+ "1 46 37\r",
+ "1 46 38\r",
+ "1 46 39\r",
+ "1 46 40\r",
+ "1 46 41\r",
+ "1 46 42\r",
+ "1 46 43\r",
+ "1 46 44\r",
+ "1 46 45\r",
+ "1 46 46\r",
+ "1 46 47\r",
+ "1 46 48\r",
+ "1 46 49\r",
+ "1 46 50\r",
+ "1 46 51\r",
+ "1 46 52\r",
+ "1 46 53\r",
+ "1 46 54\r",
+ "1 46 55\r",
+ "1 46 56\r",
+ "1 46 57\r",
+ "1 46 58\r",
+ "1 47 1\r",
+ "1 47 2\r",
+ "1 47 3\r",
+ "1 47 4\r",
+ "1 47 5\r",
+ "1 47 6\r",
+ "1 47 7\r",
+ "1 47 8\r",
+ "1 47 9\r",
+ "1 47 10\r",
+ "1 47 11\r",
+ "1 47 12\r",
+ "1 47 13\r",
+ "1 47 14\r",
+ "1 47 15\r",
+ "1 47 16\r",
+ "1 47 17\r",
+ "1 47 18\r",
+ "1 47 19\r",
+ "1 47 20\r",
+ "1 47 21\r",
+ "1 47 22\r",
+ "1 47 23\r",
+ "1 47 24\r",
+ "1 47 25\r",
+ "1 47 26\r",
+ "1 47 27\r",
+ "1 47 28\r",
+ "1 47 29\r",
+ "1 47 30\r",
+ "1 47 31\r",
+ "1 47 32\r",
+ "1 47 33\r",
+ "1 47 34\r",
+ "1 47 35\r",
+ "1 47 36\r",
+ "1 47 37\r",
+ "1 47 38\r",
+ "1 47 39\r",
+ "1 47 40\r",
+ "1 47 41\r",
+ "1 47 42\r",
+ "1 47 43\r",
+ "1 47 44\r",
+ "1 47 45\r",
+ "1 47 46\r",
+ "1 47 47\r",
+ "1 47 48\r",
+ "1 47 49\r",
+ "1 47 50\r",
+ "1 47 51\r",
+ "1 47 52\r",
+ "1 47 53\r",
+ "1 47 54\r",
+ "1 47 55\r",
+ "1 47 56\r",
+ "1 47 57\r",
+ "1 47 58\r",
+ "1 48 1\r",
+ "1 48 2"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "1 48 3\r",
+ "1 48 4\r",
+ "1 48 5\r",
+ "1 48 6\r",
+ "1 48 7\r",
+ "1 48 8\r",
+ "1 48 9\r",
+ "1 48 10\r",
+ "1 48 11\r",
+ "1 48 12\r",
+ "1 48 13\r",
+ "1 48 14\r",
+ "1 48 15\r",
+ "1 48 16\r",
+ "1 48 17\r",
+ "1 48 18\r",
+ "1 48 19\r",
+ "1 48 20\r",
+ "1 48 21\r",
+ "1 48 22\r",
+ "1 48 23\r",
+ "1 48 24\r",
+ "1 48 25\r",
+ "1 48 26\r",
+ "1 48 27\r",
+ "1 48 28\r",
+ "1 48 29\r",
+ "1 48 30\r",
+ "1 48 31\r",
+ "1 48 32\r",
+ "1 48 33\r",
+ "1 48 34\r",
+ "1 48 35\r",
+ "1 48 36\r",
+ "1 48 37\r",
+ "1 48 38\r",
+ "1 48 39\r",
+ "1 48 40\r",
+ "1 48 41\r",
+ "1 48 42\r",
+ "1 48 43\r",
+ "1 48 44\r",
+ "1 48 45\r",
+ "1 48 46\r",
+ "1 48 47\r",
+ "1 48 48\r",
+ "1 48 49\r",
+ "1 48 50\r",
+ "1 48 51\r",
+ "1 48 52\r",
+ "1 48 53\r",
+ "1 48 54\r",
+ "1 48 55\r",
+ "1 48 56\r",
+ "1 48 57\r",
+ "1 48 58\r",
+ "1 49 1\r",
+ "1 49 2\r",
+ "1 49 3\r",
+ "1 49 4\r",
+ "1 49 5\r",
+ "1 49 6\r",
+ "1 49 7\r",
+ "1 49 8\r",
+ "1 49 9\r",
+ "1 49 10\r",
+ "1 49 11\r",
+ "1 49 12\r",
+ "1 49 13\r",
+ "1 49 14\r",
+ "1 49 15\r",
+ "1 49 16\r",
+ "1 49 17\r",
+ "1 49 18\r",
+ "1 49 19\r",
+ "1 49 20\r",
+ "1 49 21\r",
+ "1 49 22\r",
+ "1 49 23\r",
+ "1 49 24\r",
+ "1 49 25\r",
+ "1 49 26\r",
+ "1 49 27\r",
+ "1 49 28\r",
+ "1 49 29\r",
+ "1 49 30\r",
+ "1 49 31\r",
+ "1 49 32\r",
+ "1 49 33\r",
+ "1 49 34\r",
+ "1 49 35\r",
+ "1 49 36\r",
+ "1 49 37\r",
+ "1 49 38\r",
+ "1 49 39\r",
+ "1 49 40\r",
+ "1 49 41\r",
+ "1 49 42\r",
+ "1 49 43\r",
+ "1 49 44\r",
+ "1 49 45\r",
+ "1 49 46\r",
+ "1 49 47\r",
+ "1 49 48\r",
+ "1 49 49\r",
+ "1 49 50\r",
+ "1 49 51\r",
+ "1 49 52\r",
+ "1 49 53\r",
+ "1 49 54\r",
+ "1 49 55\r",
+ "1 49 56\r",
+ "1 49 57\r",
+ "1 49 58\r",
+ "1 50 1\r",
+ "1 50 2\r",
+ "1 50 3\r",
+ "1 50 4\r",
+ "1 50 5\r",
+ "1 50 6\r",
+ "1 50 7\r",
+ "1 50 8\r",
+ "1 50 9\r",
+ "1 50 10\r",
+ "1 50 11\r",
+ "1 50 12\r",
+ "1 50 13\r",
+ "1 50 14\r",
+ "1 50 15\r",
+ "1 50 16\r",
+ "1 50 17\r",
+ "1 50 18\r",
+ "1 50 19\r",
+ "1 50 20\r",
+ "1 50 21\r",
+ "1 50 22\r",
+ "1 50 23\r",
+ "1 50 24\r",
+ "1 50 25\r",
+ "1 50 26\r",
+ "1 50 27\r",
+ "1 50 28\r",
+ "1 50 29\r",
+ "1 50 30\r",
+ "1 50 31\r",
+ "1 50 32\r",
+ "1 50 33\r",
+ "1 50 34\r",
+ "1 50 35\r",
+ "1 50 36\r",
+ "1 50 37\r",
+ "1 50 38\r",
+ "1 50 39\r",
+ "1 50 40\r",
+ "1 50 41\r",
+ "1 50 42\r",
+ "1 50 43\r",
+ "1 50 44\r",
+ "1 50 45\r",
+ "1 50 46\r",
+ "1 50 47\r",
+ "1 50 48\r",
+ "1 50 49\r",
+ "1 50 50\r",
+ "1 50 51\r",
+ "1 50 52\r",
+ "1 50 53\r",
+ "1 50 54\r",
+ "1 50 55\r",
+ "1 50 56\r",
+ "1 50 57\r",
+ "1 50 58\r",
+ "1 51 1\r",
+ "1 51 2\r",
+ "1 51 3\r",
+ "1 51 4\r",
+ "1 51 5\r",
+ "1 51 6\r",
+ "1 51 7\r",
+ "1 51 8\r",
+ "1 51 9\r",
+ "1 51 10\r",
+ "1 51 11\r",
+ "1 51 12\r",
+ "1 51 13\r",
+ "1 51 14\r",
+ "1 51 15\r",
+ "1 51 16\r",
+ "1 51 17\r",
+ "1 51 18\r",
+ "1 51 19\r",
+ "1 51 20\r",
+ "1 51 21\r",
+ "1 51 22\r",
+ "1 51 23\r",
+ "1 51 24\r",
+ "1 51 25\r",
+ "1 51 26\r",
+ "1 51 27\r",
+ "1 51 28\r",
+ "1 51 29\r",
+ "1 51 30\r",
+ "1 51 31\r",
+ "1 51 32\r",
+ "1 51 33\r",
+ "1 51 34\r",
+ "1 51 35\r",
+ "1 51 36\r",
+ "1 51 37\r",
+ "1 51 38\r",
+ "1 51 39\r",
+ "1 51 40\r",
+ "1 51 41\r",
+ "1 51 42\r",
+ "1 51 43\r",
+ "1 51 44\r",
+ "1 51 45\r",
+ "1 51 46\r",
+ "1 51 47\r",
+ "1 51 48\r",
+ "1 51 49\r",
+ "1 51 50\r",
+ "1 51 51\r",
+ "1 51 52\r",
+ "1 51 53\r",
+ "1 51 54\r",
+ "1 51 55\r",
+ "1 51 56\r",
+ "1 51 57\r",
+ "1 51 58\r",
+ "1 52 1\r",
+ "1 52 2\r",
+ "1 52 3\r",
+ "1 52 4\r",
+ "1 52 5\r",
+ "1 52 6\r",
+ "1 52 7\r",
+ "1 52 8\r",
+ "1 52 9\r",
+ "1 52 10\r",
+ "1 52 11\r",
+ "1 52 12\r",
+ "1 52 13\r",
+ "1 52 14\r",
+ "1 52 15\r",
+ "1 52 16\r",
+ "1 52 17\r",
+ "1 52 18\r",
+ "1 52 19\r",
+ "1 52 20\r",
+ "1 52 21\r",
+ "1 52 22\r",
+ "1 52 23\r",
+ "1 52 24\r",
+ "1 52 25\r",
+ "1 52 26\r",
+ "1 52 27\r",
+ "1 52 28\r",
+ "1 52 29\r",
+ "1 52 30\r",
+ "1 52 31\r",
+ "1 52 32\r",
+ "1 52 33\r",
+ "1 52 34\r",
+ "1 52 35\r",
+ "1 52 36\r",
+ "1 52 37\r",
+ "1 52 38\r",
+ "1 52 39\r",
+ "1 52 40\r",
+ "1 52 41\r",
+ "1 52 42\r",
+ "1 52 43\r",
+ "1 52 44\r",
+ "1 52 45\r",
+ "1 52 46\r",
+ "1 52 47\r",
+ "1 52 48\r",
+ "1 52 49\r",
+ "1 52 50\r",
+ "1 52 51\r",
+ "1 52 52\r",
+ "1 52 53\r",
+ "1 52 54\r",
+ "1 52 55\r",
+ "1 52 56\r",
+ "1 52 57\r",
+ "1 52 58\r",
+ "1 53 1\r",
+ "1 53 2\r",
+ "1 53 3\r",
+ "1 53 4\r",
+ "1 53 5\r",
+ "1 53 6\r",
+ "1 53 7\r",
+ "1 53 8\r",
+ "1 53 9\r",
+ "1 53 10\r",
+ "1 53 11\r",
+ "1 53 12\r",
+ "1 53 13\r",
+ "1 53 14\r",
+ "1 53 15\r",
+ "1 53 16\r",
+ "1 53 17\r",
+ "1 53 18\r",
+ "1 53 19\r",
+ "1 53 20\r",
+ "1 53 21\r",
+ "1 53 22\r",
+ "1 53 23\r",
+ "1 53 24\r",
+ "1 53 25\r",
+ "1 53 26\r",
+ "1 53 27\r",
+ "1 53 28\r",
+ "1 53 29\r",
+ "1 53 30\r",
+ "1 53 31\r",
+ "1 53 32\r",
+ "1 53 33\r",
+ "1 53 34\r",
+ "1 53 35\r",
+ "1 53 36\r",
+ "1 53 37\r",
+ "1 53 38\r",
+ "1 53 39\r",
+ "1 53 40\r",
+ "1 53 41\r",
+ "1 53 42\r",
+ "1 53 43\r",
+ "1 53 44\r",
+ "1 53 45\r",
+ "1 53 46\r",
+ "1 53 47\r",
+ "1 53 48\r",
+ "1 53 49\r",
+ "1 53 50\r",
+ "1 53 51\r",
+ "1 53 52\r",
+ "1 53 53\r",
+ "1 53 54\r",
+ "1 53 55\r",
+ "1 53 56\r",
+ "1 53 57\r",
+ "1 53 58\r",
+ "1 54 1\r",
+ "1 54 2\r",
+ "1 54 3\r",
+ "1 54 4\r",
+ "1 54 5\r",
+ "1 54 6\r",
+ "1 54 7\r",
+ "1 54 8\r",
+ "1 54 9\r",
+ "1 54 10\r",
+ "1 54 11\r",
+ "1 54 12\r",
+ "1 54 13\r",
+ "1 54 14\r",
+ "1 54 15\r",
+ "1 54 16\r",
+ "1 54 17\r",
+ "1 54 18\r",
+ "1 54 19\r",
+ "1 54 20\r",
+ "1 54 21\r",
+ "1 54 22\r",
+ "1 54 23\r",
+ "1 54 24\r",
+ "1 54 25\r",
+ "1 54 26\r",
+ "1 54 27\r",
+ "1 54 28\r",
+ "1 54 29\r",
+ "1 54 30\r",
+ "1 54 31\r",
+ "1 54 32\r",
+ "1 54 33\r",
+ "1 54 34\r",
+ "1 54 35\r",
+ "1 54 36\r",
+ "1 54 37\r",
+ "1 54 38\r",
+ "1 54 39\r",
+ "1 54 40\r",
+ "1 54 41\r",
+ "1 54 42\r",
+ "1 54 43\r",
+ "1 54 44\r",
+ "1 54 45\r",
+ "1 54 46\r",
+ "1 54 47\r",
+ "1 54 48\r",
+ "1 54 49\r",
+ "1 54 50\r",
+ "1 54 51\r",
+ "1 54 52\r",
+ "1 54 53\r",
+ "1 54 54\r",
+ "1 54 55\r",
+ "1 54 56\r",
+ "1 54 57\r",
+ "1 54 58\r",
+ "1 55 1\r",
+ "1 55 2\r",
+ "1 55 3\r",
+ "1 55 4\r",
+ "1 55 5\r",
+ "1 55 6\r",
+ "1 55 7\r",
+ "1 55 8\r",
+ "1 55 9\r",
+ "1 55 10\r",
+ "1 55 11\r",
+ "1 55 12\r",
+ "1 55 13\r",
+ "1 55 14\r",
+ "1 55 15\r",
+ "1 55 16\r",
+ "1 55 17\r",
+ "1 55 18\r",
+ "1 55 19\r",
+ "1 55 20\r",
+ "1 55 21\r",
+ "1 55 22\r",
+ "1 55 23\r",
+ "1 55 24\r",
+ "1 55 25\r",
+ "1 55 26\r",
+ "1 55 27\r",
+ "1 55 28\r",
+ "1 55 29\r",
+ "1 55 30\r",
+ "1 55 31\r",
+ "1 55 32\r",
+ "1 55 33\r",
+ "1 55 34\r",
+ "1 55 35\r",
+ "1 55 36\r",
+ "1 55 37\r",
+ "1 55 38\r",
+ "1 55 39\r",
+ "1 55 40\r",
+ "1 55 41\r",
+ "1 55 42\r",
+ "1 55 43\r",
+ "1 55 44\r",
+ "1 55 45\r",
+ "1 55 46\r",
+ "1 55 47\r",
+ "1 55 48\r",
+ "1 55 49\r",
+ "1 55 50\r",
+ "1 55 51\r",
+ "1 55 52\r",
+ "1 55 53\r",
+ "1 55 54\r",
+ "1 55 55\r",
+ "1 55 56\r",
+ "1 55 57\r",
+ "1 55 58\r",
+ "1 56 1\r",
+ "1 56 2\r",
+ "1 56 3\r",
+ "1 56 4\r",
+ "1 56 5\r",
+ "1 56 6\r",
+ "1 56 7\r",
+ "1 56 8\r",
+ "1 56 9\r",
+ "1 56 10\r",
+ "1 56 11\r",
+ "1 56 12\r",
+ "1 56 13\r",
+ "1 56 14\r",
+ "1 56 15\r",
+ "1 56 16\r",
+ "1 56 17\r",
+ "1 56 18\r",
+ "1 56 19\r",
+ "1 56 20\r",
+ "1 56 21\r",
+ "1 56 22\r",
+ "1 56 23\r",
+ "1 56 24\r",
+ "1 56 25\r",
+ "1 56 26\r",
+ "1 56 27\r",
+ "1 56 28\r",
+ "1 56 29\r",
+ "1 56 30\r",
+ "1 56 31\r",
+ "1 56 32\r",
+ "1 56 33\r",
+ "1 56 34\r",
+ "1 56 35\r",
+ "1 56 36\r",
+ "1 56 37\r",
+ "1 56 38\r",
+ "1 56 39\r",
+ "1 56 40\r",
+ "1 56 41\r",
+ "1 56 42\r",
+ "1 56 43\r",
+ "1 56 44\r",
+ "1 56 45\r",
+ "1 56 46\r",
+ "1 56 47\r",
+ "1 56 48\r",
+ "1 56 49\r",
+ "1 56 50\r",
+ "1 56 51\r",
+ "1 56 52\r",
+ "1 56 53\r",
+ "1 56 54\r",
+ "1 56 55\r",
+ "1 56 56\r",
+ "1 56 57\r",
+ "1 56 58\r",
+ "1 57 1\r",
+ "1 57 2\r",
+ "1 57 3\r",
+ "1 57 4\r",
+ "1 57 5\r",
+ "1 57 6\r",
+ "1 57 7\r",
+ "1 57 8\r",
+ "1 57 9\r",
+ "1 57 10\r",
+ "1 57 11\r",
+ "1 57 12\r",
+ "1 57 13\r",
+ "1 57 14\r",
+ "1 57 15\r",
+ "1 57 16\r",
+ "1 57 17\r",
+ "1 57 18\r",
+ "1 57 19\r",
+ "1 57 20\r",
+ "1 57 21\r",
+ "1 57 22\r",
+ "1 57 23\r",
+ "1 57 24\r",
+ "1 57 25\r",
+ "1 57 26\r",
+ "1 57 27\r",
+ "1 57 28\r",
+ "1 57 29\r",
+ "1 57 30\r",
+ "1 57 31\r",
+ "1 57 32\r",
+ "1 57 33\r",
+ "1 57 34\r",
+ "1 57 35\r",
+ "1 57 36\r",
+ "1 57 37\r",
+ "1 57 38\r",
+ "1 57 39\r",
+ "1 57 40\r",
+ "1 57 41\r",
+ "1 57 42\r",
+ "1 57 43\r",
+ "1 57 44\r",
+ "1 57 45\r",
+ "1 57 46\r",
+ "1 57 47\r",
+ "1 57 48\r",
+ "1 57 49\r",
+ "1 57 50\r",
+ "1 57 51\r",
+ "1 57 52\r",
+ "1 57 53\r",
+ "1 57 54\r",
+ "1 57 55\r",
+ "1 57 56\r",
+ "1 57 57\r",
+ "1 57 58\r",
+ "1 58 1\r",
+ "1 58 2\r",
+ "1 58 3\r",
+ "1 58 4\r",
+ "1 58 5\r",
+ "1 58 6\r",
+ "1 58 7\r",
+ "1 58 8\r",
+ "1 58 9\r",
+ "1 58 10\r",
+ "1 58 11\r",
+ "1 58 12\r",
+ "1 58 13\r",
+ "1 58 14\r",
+ "1 58 15\r",
+ "1 58 16\r",
+ "1 58 17\r",
+ "1 58 18\r",
+ "1 58 19\r",
+ "1 58 20\r",
+ "1 58 21\r",
+ "1 58 22\r",
+ "1 58 23\r",
+ "1 58 24\r",
+ "1 58 25\r",
+ "1 58 26\r",
+ "1 58 27\r",
+ "1 58 28\r",
+ "1 58 29\r",
+ "1 58 30\r",
+ "1 58 31\r",
+ "1 58 32\r",
+ "1 58 33\r",
+ "1 58 34\r",
+ "1 58 35\r",
+ "1 58 36\r",
+ "1 58 37\r",
+ "1 58 38\r",
+ "1 58 39\r",
+ "1 58 40\r",
+ "1 58 41\r",
+ "1 58 42\r",
+ "1 58 43\r",
+ "1 58 44\r",
+ "1 58 45\r",
+ "1 58 46\r",
+ "1 58 47\r",
+ "1 58 48\r",
+ "1 58 49\r",
+ "1 58 50\r",
+ "1 58 51\r",
+ "1 58 52\r",
+ "1 58 53\r",
+ "1 58 54\r",
+ "1 58 55\r",
+ "1 58 56\r",
+ "1 58 57\r",
+ "1 58 58\r",
+ "2 1 1\r",
+ "2 1 2\r",
+ "2 1 3\r",
+ "2 1 4\r",
+ "2 1 5\r",
+ "2 1 6\r",
+ "2 1 7\r",
+ "2 1 8\r",
+ "2 1 9\r",
+ "2 1 10\r",
+ "2 1 11\r",
+ "2 1 12\r",
+ "2 1 13\r",
+ "2 1 14\r",
+ "2 1 15\r",
+ "2 1 16\r",
+ "2 1 17\r",
+ "2 1 18\r",
+ "2 1 19\r",
+ "2 1 20\r",
+ "2 1 21\r",
+ "2 1 22\r",
+ "2 1 23\r",
+ "2 1 24\r",
+ "2 1 25\r",
+ "2 1 26\r",
+ "2 1 27\r",
+ "2 1 28\r",
+ "2 1 29\r",
+ "2 1 30\r",
+ "2 1 31\r",
+ "2 1 32\r",
+ "2 1 33\r",
+ "2 1 34\r",
+ "2 1 35\r",
+ "2 1 36\r",
+ "2 1 37\r",
+ "2 1 38\r",
+ "2 1 39\r",
+ "2 1 40\r",
+ "2 1 41\r",
+ "2 1 42\r",
+ "2 1 43\r",
+ "2 1 44\r",
+ "2 1 45\r",
+ "2 1 46\r",
+ "2 1 47\r",
+ "2 1 48\r",
+ "2 1 49\r",
+ "2 1 50\r",
+ "2 1 51\r",
+ "2 1 52\r",
+ "2 1 53\r",
+ "2 1 54\r",
+ "2 1 55\r",
+ "2 1 56\r",
+ "2 1 57\r",
+ "2 1 58\r",
+ "2 2 1\r",
+ "2 2 2\r",
+ "2 2 3\r",
+ "2 2 4\r",
+ "2 2 5\r",
+ "2 2 6\r",
+ "2 2 7\r",
+ "2 2 8\r",
+ "2 2 9\r",
+ "2 2 10\r",
+ "2 2 11\r",
+ "2 2 12\r",
+ "2 2 13\r",
+ "2 2 14\r",
+ "2 2 15\r",
+ "2 2 16\r",
+ "2 2 17\r",
+ "2 2 18\r",
+ "2 2 19\r",
+ "2 2 20\r",
+ "2 2 21\r",
+ "2 2 22\r",
+ "2 2 23\r",
+ "2 2 24\r",
+ "2 2 25\r",
+ "2 2 26\r",
+ "2 2 27\r",
+ "2 2 28\r",
+ "2 2 29\r",
+ "2 2 30\r",
+ "2 2 31\r",
+ "2 2 32\r",
+ "2 2 33\r",
+ "2 2 34\r",
+ "2 2 35\r",
+ "2 2 36\r",
+ "2 2 37\r",
+ "2 2 38\r",
+ "2 2 39\r",
+ "2 2 40\r",
+ "2 2 41\r",
+ "2 2 42\r",
+ "2 2 43\r",
+ "2 2 44\r",
+ "2 2 45\r",
+ "2 2 46\r",
+ "2 2 47\r",
+ "2 2 48\r",
+ "2 2 49\r",
+ "2 2 50\r",
+ "2 2 51\r",
+ "2 2 52\r",
+ "2 2 53\r",
+ "2 2 54\r",
+ "2 2 55\r",
+ "2 2 56\r",
+ "2 2 57\r",
+ "2 2 58\r",
+ "2 3 1\r",
+ "2 3 2\r",
+ "2 3 3\r",
+ "2 3 4\r",
+ "2 3 5\r",
+ "2 3 6\r",
+ "2 3 7\r",
+ "2 3 8\r",
+ "2 3 9\r",
+ "2 3 10\r",
+ "2 3 11\r",
+ "2 3 12\r",
+ "2 3 13\r",
+ "2 3 14\r",
+ "2 3 15\r",
+ "2 3 16\r",
+ "2 3 17\r",
+ "2 3 18\r",
+ "2 3 19\r",
+ "2 3 20\r",
+ "2 3 21\r",
+ "2 3 22\r",
+ "2 3 23\r",
+ "2 3 24\r",
+ "2 3 25\r",
+ "2 3 26\r",
+ "2 3 27\r",
+ "2 3 28\r",
+ "2 3 29\r",
+ "2 3 30\r",
+ "2 3 31\r",
+ "2 3 32\r",
+ "2 3 33\r",
+ "2 3 34\r",
+ "2 3 35\r",
+ "2 3 36\r",
+ "2 3 37\r",
+ "2 3 38\r",
+ "2 3 39\r",
+ "2 3 40\r",
+ "2 3 41\r",
+ "2 3 42\r",
+ "2 3 43\r",
+ "2 3 44\r",
+ "2 3 45\r",
+ "2 3 46\r",
+ "2 3 47\r",
+ "2 3 48\r",
+ "2 3 49\r",
+ "2 3 50\r",
+ "2 3 51\r",
+ "2 3 52\r",
+ "2 3 53\r",
+ "2 3 54\r",
+ "2 3 55\r",
+ "2 3 56\r",
+ "2 3 57\r",
+ "2 3 58\r",
+ "2 4 1\r",
+ "2 4 2\r",
+ "2 4 3\r",
+ "2 4 4\r",
+ "2 4 5\r",
+ "2 4 6\r",
+ "2 4 7\r",
+ "2 4 8\r",
+ "2 4 9\r",
+ "2 4 10\r",
+ "2 4 11\r",
+ "2 4 12\r",
+ "2 4 13\r",
+ "2 4 14\r",
+ "2 4 15\r",
+ "2 4 16\r",
+ "2 4 17\r",
+ "2 4 18\r",
+ "2 4 19\r",
+ "2 4 20\r",
+ "2 4 21\r",
+ "2 4 22\r",
+ "2 4 23\r",
+ "2 4 24\r",
+ "2 4 25\r",
+ "2 4 26\r",
+ "2 4 27\r",
+ "2 4 28\r",
+ "2 4 29\r",
+ "2 4 30\r",
+ "2 4 31\r",
+ "2 4 32\r",
+ "2 4 33\r",
+ "2 4 34\r",
+ "2 4 35\r",
+ "2 4 36\r",
+ "2 4 37\r",
+ "2 4 38\r",
+ "2 4 39\r",
+ "2 4 40\r",
+ "2 4 41\r",
+ "2 4 42\r",
+ "2 4 43\r",
+ "2 4 44\r",
+ "2 4 45\r",
+ "2 4 46\r",
+ "2 4 47\r",
+ "2 4 48\r",
+ "2 4 49\r",
+ "2 4 50\r",
+ "2 4 51\r",
+ "2 4 52\r",
+ "2 4 53\r",
+ "2 4 54\r",
+ "2 4 55\r",
+ "2 4 56\r",
+ "2 4 57\r",
+ "2 4 58\r",
+ "2 5 1\r",
+ "2 5 2\r",
+ "2 5 3\r",
+ "2 5 4\r",
+ "2 5 5\r",
+ "2 5 6\r",
+ "2 5 7\r",
+ "2 5 8\r",
+ "2 5 9\r",
+ "2 5 10\r",
+ "2 5 11\r",
+ "2 5 12\r",
+ "2 5 13\r",
+ "2 5 14\r",
+ "2 5 15\r",
+ "2 5 16\r",
+ "2 5 17\r",
+ "2 5 18\r",
+ "2 5 19\r",
+ "2 5 20\r",
+ "2 5 21\r",
+ "2 5 22\r",
+ "2 5 23\r",
+ "2 5 24\r",
+ "2 5 25\r",
+ "2 5 26\r",
+ "2 5 27\r",
+ "2 5 28\r",
+ "2 5 29\r",
+ "2 5 30\r",
+ "2 5 31\r",
+ "2 5 32\r",
+ "2 5 33\r",
+ "2 5 34\r",
+ "2 5 35\r",
+ "2 5 36\r",
+ "2 5 37\r",
+ "2 5 38\r",
+ "2 5 39\r",
+ "2 5 40\r",
+ "2 5 41\r",
+ "2 5 42\r",
+ "2 5 43\r",
+ "2 5 44\r",
+ "2 5 45\r",
+ "2 5 46\r",
+ "2 5 47\r",
+ "2 5 48\r",
+ "2 5 49\r",
+ "2 5 50\r",
+ "2 5 51\r",
+ "2 5 52\r",
+ "2 5 53\r",
+ "2 5 54\r",
+ "2 5 55\r",
+ "2 5 56\r",
+ "2 5 57\r",
+ "2 5 58\r",
+ "2 6 1\r",
+ "2 6 2\r",
+ "2 6 3\r",
+ "2 6 4\r",
+ "2 6 5\r",
+ "2 6 6\r",
+ "2 6 7\r",
+ "2 6 8\r",
+ "2 6 9\r",
+ "2 6 10\r",
+ "2 6 11\r",
+ "2 6 12\r",
+ "2 6 13\r",
+ "2 6 14\r",
+ "2 6 15\r",
+ "2 6 16\r",
+ "2 6 17\r",
+ "2 6 18\r",
+ "2 6 19\r",
+ "2 6 20\r",
+ "2 6 21\r",
+ "2 6 22\r",
+ "2 6 23\r",
+ "2 6 24\r",
+ "2 6 25\r",
+ "2 6 26\r",
+ "2 6 27\r",
+ "2 6 28\r",
+ "2 6 29\r",
+ "2 6 30\r",
+ "2 6 31\r",
+ "2 6 32\r",
+ "2 6 33\r",
+ "2 6 34\r",
+ "2 6 35\r",
+ "2 6 36\r",
+ "2 6 37\r",
+ "2 6 38\r",
+ "2 6 39\r",
+ "2 6 40\r",
+ "2 6 41\r",
+ "2 6 42\r",
+ "2 6 43\r",
+ "2 6 44\r",
+ "2 6 45\r",
+ "2 6 46\r",
+ "2 6 47\r",
+ "2 6 48\r",
+ "2 6 49\r",
+ "2 6 50\r",
+ "2 6 51\r",
+ "2 6 52\r",
+ "2 6 53\r",
+ "2 6 54\r",
+ "2 6 55\r",
+ "2 6 56\r",
+ "2 6 57\r",
+ "2 6 58\r",
+ "2 7 1\r",
+ "2 7 2\r",
+ "2 7 3\r",
+ "2 7 4\r",
+ "2 7 5\r",
+ "2 7 6\r",
+ "2 7 7\r",
+ "2 7 8\r",
+ "2 7 9\r",
+ "2 7 10\r",
+ "2 7 11\r",
+ "2 7 12\r",
+ "2 7 13\r",
+ "2 7 14\r",
+ "2 7 15\r",
+ "2 7 16\r",
+ "2 7 17\r",
+ "2 7 18\r",
+ "2 7 19\r",
+ "2 7 20\r",
+ "2 7 21\r",
+ "2 7 22\r",
+ "2 7 23\r",
+ "2 7 24\r",
+ "2 7 25\r",
+ "2 7 26\r",
+ "2 7 27\r",
+ "2 7 28\r",
+ "2 7 29\r",
+ "2 7 30\r",
+ "2 7 31\r",
+ "2 7 32\r",
+ "2 7 33\r",
+ "2 7 34\r",
+ "2 7 35\r",
+ "2 7 36\r",
+ "2 7 37\r",
+ "2 7 38\r",
+ "2 7 39\r",
+ "2 7 40\r",
+ "2 7 41\r",
+ "2 7 42\r",
+ "2 7 43\r",
+ "2 7 44\r",
+ "2 7 45\r",
+ "2 7 46\r",
+ "2 7 47\r",
+ "2 7 48\r",
+ "2 7 49\r",
+ "2 7 50\r",
+ "2 7 51\r",
+ "2 7 52\r",
+ "2 7 53\r",
+ "2 7 54\r",
+ "2 7 55\r",
+ "2 7 56\r",
+ "2 7 57\r",
+ "2 7 58\r",
+ "2 8 1\r",
+ "2 8 2\r",
+ "2 8 3\r",
+ "2 8 4\r",
+ "2 8 5\r",
+ "2 8 6\r",
+ "2 8 7\r",
+ "2 8 8\r",
+ "2 8 9\r",
+ "2 8 10\r",
+ "2 8 11\r",
+ "2 8 12\r",
+ "2 8 13\r",
+ "2 8 14\r",
+ "2 8 15\r",
+ "2 8 16\r",
+ "2 8 17\r",
+ "2 8 18\r",
+ "2 8 19\r",
+ "2 8 20\r",
+ "2 8 21\r",
+ "2 8 22\r",
+ "2 8 23\r",
+ "2 8 24\r",
+ "2 8 25\r",
+ "2 8 26\r",
+ "2 8 27\r",
+ "2 8 28\r",
+ "2 8 29\r",
+ "2 8 30\r",
+ "2 8 31\r",
+ "2 8 32\r",
+ "2 8 33\r",
+ "2 8 34\r",
+ "2 8 35\r",
+ "2 8 36\r",
+ "2 8 37\r",
+ "2 8 38\r",
+ "2 8 39\r",
+ "2 8 40\r",
+ "2 8 41\r",
+ "2 8 42\r",
+ "2 8 43\r",
+ "2 8 44\r",
+ "2 8 45\r",
+ "2 8 46\r",
+ "2 8 47\r",
+ "2 8 48\r",
+ "2 8 49\r",
+ "2 8 50\r",
+ "2 8 51\r",
+ "2 8 52\r",
+ "2 8 53\r",
+ "2 8 54\r",
+ "2 8 55\r",
+ "2 8 56\r",
+ "2 8 57\r",
+ "2 8 58\r",
+ "2 9 1\r",
+ "2 9 2\r",
+ "2 9 3\r",
+ "2 9 4\r",
+ "2 9 5\r",
+ "2 9 6\r",
+ "2 9 7\r",
+ "2 9 8\r",
+ "2 9 9\r",
+ "2 9 10\r",
+ "2 9 11\r",
+ "2 9 12\r",
+ "2 9 13\r",
+ "2 9 14\r",
+ "2 9 15\r",
+ "2 9 16\r",
+ "2 9 17\r",
+ "2 9 18\r",
+ "2 9 19\r",
+ "2 9 20\r",
+ "2 9 21\r",
+ "2 9 22\r",
+ "2 9 23\r",
+ "2 9 24\r",
+ "2 9 25\r",
+ "2 9 26\r",
+ "2 9 27\r",
+ "2 9 28\r",
+ "2 9 29\r",
+ "2 9 30\r",
+ "2 9 31\r",
+ "2 9 32\r",
+ "2 9 33\r",
+ "2 9 34\r",
+ "2 9 35\r",
+ "2 9 36\r",
+ "2 9 37\r",
+ "2 9 38\r",
+ "2 9 39\r",
+ "2 9 40\r",
+ "2 9 41\r",
+ "2 9 42\r",
+ "2 9 43\r",
+ "2 9 44\r",
+ "2 9 45\r",
+ "2 9 46\r",
+ "2 9 47\r",
+ "2 9 48\r",
+ "2 9 49\r",
+ "2 9 50\r",
+ "2 9 51\r",
+ "2 9 52\r",
+ "2 9 53\r",
+ "2 9 54\r",
+ "2 9 55\r",
+ "2 9 56\r",
+ "2 9 57\r",
+ "2 9 58\r",
+ "2 10 1\r",
+ "2 10 2\r",
+ "2 10 3\r",
+ "2 10 4\r",
+ "2 10 5\r",
+ "2 10 6\r",
+ "2 10 7\r",
+ "2 10 8\r",
+ "2 10 9\r",
+ "2 10 10\r",
+ "2 10 11\r",
+ "2 10 12\r",
+ "2 10 13\r",
+ "2 10 14\r",
+ "2 10 15\r",
+ "2 10 16\r",
+ "2 10 17\r",
+ "2 10 18\r",
+ "2 10 19\r",
+ "2 10 20\r",
+ "2 10 21\r",
+ "2 10 22\r",
+ "2 10 23\r",
+ "2 10 24\r",
+ "2 10 25\r",
+ "2 10 26\r",
+ "2 10 27\r",
+ "2 10 28\r",
+ "2 10 29\r",
+ "2 10 30\r",
+ "2 10 31\r",
+ "2 10 32\r",
+ "2 10 33\r",
+ "2 10 34\r",
+ "2 10 35\r",
+ "2 10 36\r",
+ "2 10 37\r",
+ "2 10 38\r",
+ "2 10 39\r",
+ "2 10 40\r",
+ "2 10 41\r",
+ "2 10 42\r",
+ "2 10 43\r",
+ "2 10 44\r",
+ "2 10 45\r",
+ "2 10 46\r",
+ "2 10 47\r",
+ "2 10 48\r",
+ "2 10 49\r",
+ "2 10 50\r",
+ "2 10 51\r",
+ "2 10 52\r",
+ "2 10 53\r",
+ "2 10 54\r",
+ "2 10 55\r",
+ "2 10 56\r",
+ "2 10 57\r",
+ "2 10 58\r",
+ "2 11 1\r",
+ "2 11 2\r",
+ "2 11 3\r",
+ "2 11 4\r",
+ "2 11 5\r",
+ "2 11 6\r",
+ "2 11 7\r",
+ "2 11 8\r",
+ "2 11 9\r",
+ "2 11 10\r",
+ "2 11 11\r",
+ "2 11 12\r",
+ "2 11 13\r",
+ "2 11 14\r",
+ "2 11 15\r",
+ "2 11 16\r",
+ "2 11 17\r",
+ "2 11 18\r",
+ "2 11 19\r",
+ "2 11 20\r",
+ "2 11 21\r",
+ "2 11 22\r",
+ "2 11 23\r",
+ "2 11 24\r",
+ "2 11 25\r",
+ "2 11 26\r",
+ "2 11 27\r",
+ "2 11 28\r",
+ "2 11 29\r",
+ "2 11 30\r",
+ "2 11 31\r",
+ "2 11 32\r",
+ "2 11 33\r",
+ "2 11 34\r",
+ "2 11 35\r",
+ "2 11 36\r",
+ "2 11 37\r",
+ "2 11 38\r",
+ "2 11 39\r",
+ "2 11 40\r",
+ "2 11 41\r",
+ "2 11 42\r",
+ "2 11 43\r",
+ "2 11 44\r",
+ "2 11 45\r",
+ "2 11 46\r",
+ "2 11 47\r",
+ "2 11 48\r",
+ "2 11 49\r",
+ "2 11 50\r",
+ "2 11 51\r",
+ "2 11 52\r",
+ "2 11 53\r",
+ "2 11 54\r",
+ "2 11 55\r",
+ "2 11 56\r",
+ "2 11 57\r",
+ "2 11 58\r",
+ "2 12 1\r",
+ "2 12 2\r",
+ "2 12 3\r",
+ "2 12 4\r",
+ "2 12 5\r",
+ "2 12 6\r",
+ "2 12 7\r",
+ "2 12 8\r",
+ "2 12 9\r",
+ "2 12 10\r",
+ "2 12 11\r",
+ "2 12 12\r",
+ "2 12 13\r",
+ "2 12 14\r",
+ "2 12 15\r",
+ "2 12 16\r",
+ "2 12 17\r",
+ "2 12 18\r",
+ "2 12 19\r",
+ "2 12 20\r",
+ "2 12 21\r",
+ "2 12 22\r",
+ "2 12 23\r",
+ "2 12 24\r",
+ "2 12 25\r",
+ "2 12 26\r",
+ "2 12 27\r",
+ "2 12 28\r",
+ "2 12 29\r",
+ "2 12 30\r",
+ "2 12 31\r",
+ "2 12 32\r",
+ "2 12 33\r",
+ "2 12 34\r",
+ "2 12 35\r",
+ "2 12 36\r",
+ "2 12 37\r",
+ "2 12 38\r",
+ "2 12 39\r",
+ "2 12 40\r",
+ "2 12 41\r",
+ "2 12 42\r",
+ "2 12 43\r",
+ "2 12 44\r",
+ "2 12 45\r",
+ "2 12 46\r",
+ "2 12 47\r",
+ "2 12 48\r",
+ "2 12 49\r",
+ "2 12 50\r",
+ "2 12 51\r",
+ "2 12 52\r",
+ "2 12 53\r",
+ "2 12 54\r",
+ "2 12 55\r",
+ "2 12 56\r",
+ "2 12 57\r",
+ "2 12 58\r",
+ "2 13 1\r",
+ "2 13 2\r",
+ "2 13 3\r",
+ "2 13 4\r",
+ "2 13 5\r",
+ "2 13 6\r",
+ "2 13 7\r",
+ "2 13 8\r",
+ "2 13 9\r",
+ "2 13 10\r",
+ "2 13 11\r",
+ "2 13 12\r",
+ "2 13 13\r",
+ "2 13 14\r",
+ "2 13 15\r",
+ "2 13 16\r",
+ "2 13 17\r",
+ "2 13 18\r",
+ "2 13 19\r",
+ "2 13 20\r",
+ "2 13 21\r",
+ "2 13 22\r",
+ "2 13 23\r",
+ "2 13 24\r",
+ "2 13 25\r",
+ "2 13 26\r",
+ "2 13 27\r",
+ "2 13 28\r",
+ "2 13 29\r",
+ "2 13 30\r",
+ "2 13 31\r",
+ "2 13 32\r",
+ "2 13 33\r",
+ "2 13 34\r",
+ "2 13 35\r",
+ "2 13 36\r",
+ "2 13 37\r",
+ "2 13 38\r",
+ "2 13 39\r",
+ "2 13 40\r",
+ "2 13 41\r",
+ "2 13 42\r",
+ "2 13 43\r",
+ "2 13 44\r",
+ "2 13 45\r",
+ "2 13 46\r",
+ "2 13 47\r",
+ "2 13 48\r",
+ "2 13 49\r",
+ "2 13 50\r",
+ "2 13 51\r",
+ "2 13 52\r",
+ "2 13 53\r",
+ "2 13 54\r",
+ "2 13 55\r",
+ "2 13 56\r",
+ "2 13 57\r",
+ "2 13 58\r",
+ "2 14 1\r",
+ "2 14 2\r",
+ "2 14 3\r",
+ "2 14 4\r",
+ "2 14 5\r",
+ "2 14 6\r",
+ "2 14 7\r",
+ "2 14 8\r",
+ "2 14 9\r",
+ "2 14 10\r",
+ "2 14 11\r",
+ "2 14 12\r",
+ "2 14 13\r",
+ "2 14 14\r",
+ "2 14 15\r",
+ "2 14 16\r",
+ "2 14 17\r",
+ "2 14 18\r",
+ "2 14 19\r",
+ "2 14 20\r",
+ "2 14 21\r",
+ "2 14 22\r",
+ "2 14 23\r",
+ "2 14 24\r",
+ "2 14 25\r",
+ "2 14 26\r",
+ "2 14 27\r",
+ "2 14 28\r",
+ "2 14 29\r",
+ "2 14 30\r",
+ "2 14 31\r",
+ "2 14 32\r",
+ "2 14 33\r",
+ "2 14 34\r",
+ "2 14 35\r",
+ "2 14 36\r",
+ "2 14 37\r",
+ "2 14 38\r",
+ "2 14 39\r",
+ "2 14 40\r",
+ "2 14 41\r",
+ "2 14 42\r",
+ "2 14 43\r",
+ "2 14 44\r",
+ "2 14 45\r",
+ "2 14 46\r",
+ "2 14 47\r",
+ "2 14 48\r",
+ "2 14 49\r",
+ "2 14 50\r",
+ "2 14 51\r",
+ "2 14 52\r",
+ "2 14 53\r",
+ "2 14 54\r",
+ "2 14 55\r",
+ "2 14 56\r",
+ "2 14 57\r",
+ "2 14 58\r",
+ "2 15 1\r",
+ "2 15 2\r",
+ "2 15 3\r",
+ "2 15 4\r",
+ "2 15 5\r",
+ "2 15 6\r",
+ "2 15 7\r",
+ "2 15 8\r",
+ "2 15 9\r",
+ "2 15 10\r",
+ "2 15 11\r",
+ "2 15 12\r",
+ "2 15 13\r",
+ "2 15 14\r",
+ "2 15 15\r",
+ "2 15 16\r",
+ "2 15 17\r",
+ "2 15 18\r",
+ "2 15 19\r",
+ "2 15 20\r",
+ "2 15 21\r",
+ "2 15 22\r",
+ "2 15 23\r",
+ "2 15 24\r",
+ "2 15 25\r",
+ "2 15 26\r",
+ "2 15 27\r",
+ "2 15 28\r",
+ "2 15 29\r",
+ "2 15 30\r",
+ "2 15 31\r",
+ "2 15 32\r",
+ "2 15 33\r",
+ "2 15 34\r",
+ "2 15 35\r",
+ "2 15 36\r",
+ "2 15 37\r",
+ "2 15 38\r",
+ "2 15 39\r",
+ "2 15 40\r",
+ "2 15 41\r",
+ "2 15 42\r",
+ "2 15 43\r",
+ "2 15 44\r",
+ "2 15 45\r",
+ "2 15 46\r",
+ "2 15 47\r",
+ "2 15 48\r",
+ "2 15 49\r",
+ "2 15 50\r",
+ "2 15 51\r",
+ "2 15 52\r",
+ "2 15 53\r",
+ "2 15 54\r",
+ "2 15 55\r",
+ "2 15 56\r",
+ "2 15 57\r",
+ "2 15 58\r",
+ "2 16 1\r",
+ "2 16 2\r",
+ "2 16 3\r",
+ "2 16 4\r",
+ "2 16 5\r",
+ "2 16 6\r",
+ "2 16 7\r",
+ "2 16 8\r",
+ "2 16 9\r",
+ "2 16 10\r",
+ "2 16 11\r",
+ "2 16 12\r",
+ "2 16 13\r",
+ "2 16 14\r",
+ "2 16 15\r",
+ "2 16 16\r",
+ "2 16 17\r",
+ "2 16 18\r",
+ "2 16 19\r",
+ "2 16 20\r",
+ "2 16 21\r",
+ "2 16 22\r",
+ "2 16 23\r",
+ "2 16 24\r",
+ "2 16 25\r",
+ "2 16 26\r",
+ "2 16 27\r",
+ "2 16 28\r",
+ "2 16 29\r",
+ "2 16 30\r",
+ "2 16 31\r",
+ "2 16 32\r",
+ "2 16 33\r",
+ "2 16 34\r",
+ "2 16 35\r",
+ "2 16 36\r",
+ "2 16 37\r",
+ "2 16 38\r",
+ "2 16 39\r",
+ "2 16 40\r",
+ "2 16 41\r",
+ "2 16 42\r",
+ "2 16 43\r",
+ "2 16 44\r",
+ "2 16 45\r",
+ "2 16 46\r",
+ "2 16 47\r",
+ "2 16 48\r",
+ "2 16 49\r",
+ "2 16 50\r",
+ "2 16 51\r",
+ "2 16 52\r",
+ "2 16 53\r",
+ "2 16 54\r",
+ "2 16 55\r",
+ "2 16 56\r",
+ "2 16 57\r",
+ "2 16 58\r",
+ "2 17 1\r",
+ "2 17 2\r",
+ "2 17 3\r",
+ "2 17 4\r",
+ "2 17 5\r",
+ "2 17 6\r",
+ "2 17 7\r",
+ "2 17 8\r",
+ "2 17 9\r",
+ "2 17 10\r",
+ "2 17 11\r",
+ "2 17 12\r",
+ "2 17 13\r",
+ "2 17 14\r",
+ "2 17 15\r",
+ "2 17 16\r",
+ "2 17 17\r",
+ "2 17 18\r",
+ "2 17 19\r",
+ "2 17 20\r",
+ "2 17 21\r",
+ "2 17 22\r",
+ "2 17 23\r",
+ "2 17 24\r",
+ "2 17 25\r",
+ "2 17 26\r",
+ "2 17 27\r",
+ "2 17 28\r",
+ "2 17 29\r",
+ "2 17 30\r",
+ "2 17 31\r",
+ "2 17 32\r",
+ "2 17 33\r",
+ "2 17 34\r",
+ "2 17 35\r",
+ "2 17 36\r",
+ "2 17 37\r",
+ "2 17 38\r",
+ "2 17 39\r",
+ "2 17 40\r",
+ "2 17 41\r",
+ "2 17 42\r",
+ "2 17 43\r",
+ "2 17 44\r",
+ "2 17 45\r",
+ "2 17 46\r",
+ "2 17 47\r",
+ "2 17 48\r",
+ "2 17 49\r",
+ "2 17 50\r",
+ "2 17 51\r",
+ "2 17 52\r",
+ "2 17 53\r",
+ "2 17 54\r",
+ "2 17 55\r",
+ "2 17 56\r",
+ "2 17 57\r",
+ "2 17 58\r",
+ "2 18 1\r",
+ "2 18 2\r",
+ "2 18 3\r",
+ "2 18 4\r",
+ "2 18 5\r",
+ "2 18 6\r",
+ "2 18 7\r",
+ "2 18 8\r",
+ "2 18 9\r",
+ "2 18 10\r",
+ "2 18 11\r",
+ "2 18 12\r",
+ "2 18 13\r",
+ "2 18 14\r",
+ "2 18 15\r",
+ "2 18 16\r",
+ "2 18 17\r",
+ "2 18 18\r",
+ "2 18 19\r",
+ "2 18 20\r",
+ "2 18 21\r",
+ "2 18 22\r",
+ "2 18 23\r",
+ "2 18 24\r",
+ "2 18 25\r",
+ "2 18 26\r",
+ "2 18 27\r",
+ "2 18 28\r",
+ "2 18 29\r",
+ "2 18 30\r",
+ "2 18 31\r",
+ "2 18 32\r",
+ "2 18 33\r",
+ "2 18 34\r",
+ "2 18 35\r",
+ "2 18 36\r",
+ "2 18 37\r",
+ "2 18 38\r",
+ "2 18 39\r",
+ "2 18 40\r",
+ "2 18 41\r",
+ "2 18 42\r",
+ "2 18 43\r",
+ "2 18 44\r",
+ "2 18 45\r",
+ "2 18 46\r",
+ "2 18 47\r",
+ "2 18 48\r",
+ "2 18 49\r",
+ "2 18 50\r",
+ "2 18 51\r",
+ "2 18 52\r",
+ "2 18 53\r",
+ "2 18 54\r",
+ "2 18 55\r",
+ "2 18 56\r",
+ "2 18 57\r",
+ "2 18 58\r",
+ "2 19 1\r",
+ "2 19 2\r",
+ "2 19 3\r",
+ "2 19 4\r",
+ "2 19 5\r",
+ "2 19 6\r",
+ "2 19 7\r",
+ "2 19 8\r",
+ "2 19 9\r",
+ "2 19 10\r",
+ "2 19 11\r",
+ "2 19 12\r",
+ "2 19 13\r",
+ "2 19 14\r",
+ "2 19 15\r",
+ "2 19 16\r",
+ "2 19 17\r",
+ "2 19 18\r",
+ "2 19 19\r",
+ "2 19 20\r",
+ "2 19 21\r",
+ "2 19 22\r",
+ "2 19 23\r",
+ "2 19 24\r",
+ "2 19 25\r",
+ "2 19 26\r",
+ "2 19 27\r",
+ "2 19 28\r",
+ "2 19 29\r",
+ "2 19 30\r",
+ "2 19 31\r",
+ "2 19 32\r",
+ "2 19 33\r",
+ "2 19 34\r",
+ "2 19 35\r",
+ "2 19 36\r",
+ "2 19 37\r",
+ "2 19 38\r",
+ "2 19 39\r",
+ "2 19 40\r",
+ "2 19 41\r",
+ "2 19 42\r",
+ "2 19 43\r",
+ "2 19 44\r",
+ "2 19 45\r",
+ "2 19 46\r",
+ "2 19 47\r",
+ "2 19 48\r",
+ "2 19 49\r",
+ "2 19 50\r",
+ "2 19 51\r",
+ "2 19 52\r",
+ "2 19 53\r",
+ "2 19 54\r",
+ "2 19 55\r",
+ "2 19 56\r",
+ "2 19 57\r",
+ "2 19 58\r",
+ "2 20 1\r",
+ "2 20 2\r",
+ "2 20 3\r",
+ "2 20 4\r",
+ "2 20 5\r",
+ "2 20 6\r",
+ "2 20 7\r",
+ "2 20 8\r",
+ "2 20 9\r",
+ "2 20 10\r",
+ "2 20 11\r",
+ "2 20 12\r",
+ "2 20 13\r",
+ "2 20 14\r",
+ "2 20 15\r",
+ "2 20 16\r",
+ "2 20 17\r",
+ "2 20 18\r",
+ "2 20 19\r",
+ "2 20 20\r",
+ "2 20 21\r",
+ "2 20 22\r",
+ "2 20 23\r",
+ "2 20 24\r",
+ "2 20 25\r",
+ "2 20 26\r",
+ "2 20 27\r",
+ "2 20 28\r",
+ "2 20 29\r",
+ "2 20 30\r",
+ "2 20 31\r",
+ "2 20 32\r",
+ "2 20 33\r",
+ "2 20 34\r",
+ "2 20 35\r",
+ "2 20 36\r",
+ "2 20 37\r",
+ "2 20 38\r",
+ "2 20 39\r",
+ "2 20 40\r",
+ "2 20 41\r",
+ "2 20 42\r",
+ "2 20 43\r",
+ "2 20 44\r",
+ "2 20 45\r",
+ "2 20 46\r",
+ "2 20 47\r",
+ "2 20 48\r",
+ "2 20 49\r",
+ "2 20 50\r",
+ "2 20 51\r",
+ "2 20 52\r",
+ "2 20 53\r",
+ "2 20 54\r",
+ "2 20 55\r",
+ "2 20 56\r",
+ "2 20 57\r",
+ "2 20 58\r",
+ "2 21 1\r",
+ "2 21 2\r",
+ "2 21 3\r",
+ "2 21 4\r",
+ "2 21 5\r",
+ "2 21 6\r",
+ "2 21 7\r",
+ "2 21 8\r",
+ "2 21 9\r",
+ "2 21 10\r",
+ "2 21 11\r",
+ "2 21 12\r",
+ "2 21 13\r",
+ "2 21 14\r",
+ "2 21 15\r",
+ "2 21 16\r",
+ "2 21 17\r",
+ "2 21 18\r",
+ "2 21 19\r",
+ "2 21 20\r",
+ "2 21 21\r",
+ "2 21 22\r",
+ "2 21 23\r",
+ "2 21 24\r",
+ "2 21 25\r",
+ "2 21 26\r",
+ "2 21 27\r",
+ "2 21 28\r",
+ "2 21 29\r",
+ "2 21 30\r",
+ "2 21 31\r",
+ "2 21 32\r",
+ "2 21 33\r",
+ "2 21 34\r",
+ "2 21 35\r",
+ "2 21 36\r",
+ "2 21 37\r",
+ "2 21 38\r",
+ "2 21 39\r",
+ "2 21 40\r",
+ "2 21 41\r",
+ "2 21 42\r",
+ "2 21 43\r",
+ "2 21 44\r",
+ "2 21 45\r",
+ "2 21 46\r",
+ "2 21 47\r",
+ "2 21 48\r",
+ "2 21 49\r",
+ "2 21 50\r",
+ "2 21 51\r",
+ "2 21 52\r",
+ "2 21 53\r",
+ "2 21 54\r",
+ "2 21 55\r",
+ "2 21 56\r",
+ "2 21 57\r",
+ "2 21 58\r",
+ "2 22 1\r",
+ "2 22 2\r",
+ "2 22 3\r",
+ "2 22 4\r",
+ "2 22 5\r",
+ "2 22 6\r",
+ "2 22 7\r",
+ "2 22 8\r",
+ "2 22 9\r",
+ "2 22 10\r",
+ "2 22 11\r",
+ "2 22 12\r",
+ "2 22 13\r",
+ "2 22 14\r",
+ "2 22 15\r",
+ "2 22 16\r",
+ "2 22 17\r",
+ "2 22 18\r",
+ "2 22 19\r",
+ "2 22 20\r",
+ "2 22 21\r",
+ "2 22 22\r",
+ "2 22 23\r",
+ "2 22 24\r",
+ "2 22 25\r",
+ "2 22 26\r",
+ "2 22 27\r",
+ "2 22 28\r",
+ "2 22 29\r",
+ "2 22 30\r",
+ "2 22 31\r",
+ "2 22 32\r",
+ "2 22 33\r",
+ "2 22 34\r",
+ "2 22 35\r",
+ "2 22 36\r",
+ "2 22 37\r",
+ "2 22 38\r",
+ "2 22 39\r",
+ "2 22 40\r",
+ "2 22 41\r",
+ "2 22 42\r",
+ "2 22 43\r",
+ "2 22 44\r",
+ "2 22 45\r",
+ "2 22 46\r",
+ "2 22 47\r",
+ "2 22 48\r",
+ "2 22 49\r",
+ "2 22 50\r",
+ "2 22 51\r",
+ "2 22 52\r",
+ "2 22 53\r",
+ "2 22 54\r",
+ "2 22 55\r",
+ "2 22 56\r",
+ "2 22 57\r",
+ "2 22 58\r",
+ "2 23 1\r",
+ "2 23 2\r",
+ "2 23 3\r",
+ "2 23 4\r",
+ "2 23 5\r",
+ "2 23 6\r",
+ "2 23 7\r",
+ "2 23 8\r",
+ "2 23 9\r",
+ "2 23 10\r",
+ "2 23 11\r",
+ "2 23 12\r",
+ "2 23 13\r",
+ "2 23 14\r",
+ "2 23 15\r",
+ "2 23 16\r",
+ "2 23 17\r",
+ "2 23 18\r",
+ "2 23 19\r",
+ "2 23 20\r",
+ "2 23 21\r",
+ "2 23 22\r",
+ "2 23 23\r",
+ "2 23 24\r",
+ "2 23 25\r",
+ "2 23 26\r",
+ "2 23 27\r",
+ "2 23 28\r",
+ "2 23 29\r",
+ "2 23 30\r",
+ "2 23 31\r",
+ "2 23 32\r",
+ "2 23 33\r",
+ "2 23 34\r",
+ "2 23 35\r",
+ "2 23 36\r",
+ "2 23 37\r",
+ "2 23 38\r",
+ "2 23 39\r",
+ "2 23 40\r",
+ "2 23 41\r",
+ "2 23 42\r",
+ "2 23 43\r",
+ "2 23 44\r",
+ "2 23 45\r",
+ "2 23 46\r",
+ "2 23 47\r",
+ "2 23 48\r",
+ "2 23 49\r",
+ "2 23 50\r",
+ "2 23 51\r",
+ "2 23 52\r",
+ "2 23 53\r",
+ "2 23 54\r",
+ "2 23 55\r",
+ "2 23 56\r",
+ "2 23 57\r",
+ "2 23 58\r",
+ "2 24 1\r",
+ "2 24 2\r",
+ "2 24 3\r",
+ "2 24 4\r",
+ "2 24 5\r",
+ "2 24 6\r",
+ "2 24 7\r",
+ "2 24 8\r",
+ "2 24 9\r",
+ "2 24 10\r",
+ "2 24 11\r",
+ "2 24 12\r",
+ "2 24 13\r",
+ "2 24 14\r",
+ "2 24 15\r",
+ "2 24 16\r",
+ "2 24 17\r",
+ "2 24 18\r",
+ "2 24 19\r",
+ "2 24 20\r",
+ "2 24 21\r",
+ "2 24 22\r",
+ "2 24 23\r",
+ "2 24 24\r",
+ "2 24 25\r",
+ "2 24 26\r",
+ "2 24 27\r",
+ "2 24 28\r",
+ "2 24 29\r",
+ "2 24 30\r",
+ "2 24 31\r",
+ "2 24 32\r",
+ "2 24 33\r",
+ "2 24 34\r",
+ "2 24 35\r",
+ "2 24 36\r",
+ "2 24 37\r",
+ "2 24 38\r",
+ "2 24 39\r",
+ "2 24 40\r",
+ "2 24 41\r",
+ "2 24 42\r",
+ "2 24 43\r",
+ "2 24 44\r",
+ "2 24 45\r",
+ "2 24 46\r",
+ "2 24 47\r",
+ "2 24 48\r",
+ "2 24 49\r",
+ "2 24 50\r",
+ "2 24 51\r",
+ "2 24 52\r",
+ "2 24 53\r",
+ "2 24 54\r",
+ "2 24 55\r",
+ "2 24 56\r",
+ "2 24 57\r",
+ "2 24 58\r",
+ "2 25 1\r",
+ "2 25 2\r",
+ "2 25 3\r",
+ "2 25 4\r",
+ "2 25 5\r",
+ "2 25 6\r",
+ "2 25 7\r",
+ "2 25 8\r",
+ "2 25 9\r",
+ "2 25 10\r",
+ "2 25 11\r",
+ "2 25 12\r",
+ "2 25 13\r",
+ "2 25 14\r",
+ "2 25 15\r",
+ "2 25 16\r",
+ "2 25 17\r",
+ "2 25 18\r",
+ "2 25 19\r",
+ "2 25 20\r",
+ "2 25 21\r",
+ "2 25 22\r",
+ "2 25 23\r",
+ "2 25 24\r",
+ "2 25 25\r",
+ "2 25 26\r",
+ "2 25 27\r",
+ "2 25 28\r",
+ "2 25 29\r",
+ "2 25 30\r",
+ "2 25 31\r",
+ "2 25 32\r",
+ "2 25 33\r",
+ "2 25 34\r",
+ "2 25 35\r",
+ "2 25 36\r",
+ "2 25 37\r",
+ "2 25 38\r",
+ "2 25 39\r",
+ "2 25 40\r",
+ "2 25 41\r",
+ "2 25 42\r",
+ "2 25 43\r",
+ "2 25 44\r",
+ "2 25 45\r",
+ "2 25 46\r",
+ "2 25 47\r",
+ "2 25 48\r",
+ "2 25 49\r",
+ "2 25 50\r",
+ "2 25 51\r",
+ "2 25 52\r",
+ "2 25 53\r",
+ "2 25 54\r",
+ "2 25 55\r",
+ "2 25 56\r",
+ "2 25 57\r",
+ "2 25 58\r",
+ "2 26 1\r",
+ "2 26 2\r",
+ "2 26 3\r",
+ "2 26 4\r",
+ "2 26 5\r",
+ "2 26 6\r",
+ "2 26 7\r",
+ "2 26 8\r",
+ "2 26 9\r",
+ "2 26 10\r",
+ "2 26 11\r",
+ "2 26 12\r",
+ "2 26 13\r",
+ "2 26 14\r",
+ "2 26 15\r",
+ "2 26 16\r",
+ "2 26 17\r",
+ "2 26 18\r",
+ "2 26 19\r",
+ "2 26 20\r",
+ "2 26 21\r",
+ "2 26 22\r",
+ "2 26 23\r",
+ "2 26 24\r",
+ "2 26 25\r",
+ "2 26 26\r",
+ "2 26 27\r",
+ "2 26 28\r",
+ "2 26 29\r",
+ "2 26 30\r",
+ "2 26 31\r",
+ "2 26 32\r",
+ "2 26 33\r",
+ "2 26 34\r",
+ "2 26 35\r",
+ "2 26 36\r",
+ "2 26 37\r",
+ "2 26 38\r",
+ "2 26 39\r",
+ "2 26 40\r",
+ "2 26 41\r",
+ "2 26 42\r",
+ "2 26 43\r",
+ "2 26 44\r",
+ "2 26 45\r",
+ "2 26 46\r",
+ "2 26 47\r",
+ "2 26 48\r",
+ "2 26 49\r",
+ "2 26 50\r",
+ "2 26 51\r",
+ "2 26 52\r",
+ "2 26 53\r",
+ "2 26 54\r",
+ "2 26 55\r",
+ "2 26 56\r",
+ "2 26 57\r",
+ "2 26 58\r",
+ "2 27 1\r",
+ "2 27 2\r",
+ "2 27 3\r",
+ "2 27 4\r",
+ "2 27 5\r",
+ "2 27 6\r",
+ "2 27 7\r",
+ "2 27 8\r",
+ "2 27 9\r",
+ "2 27 10\r",
+ "2 27 11\r",
+ "2 27 12\r",
+ "2 27 13\r",
+ "2 27 14\r",
+ "2 27 15\r",
+ "2 27 16\r",
+ "2 27 17\r",
+ "2 27 18\r",
+ "2 27 19\r",
+ "2 27 20\r",
+ "2 27 21\r",
+ "2 27 22\r",
+ "2 27 23\r",
+ "2 27 24\r",
+ "2 27 25\r",
+ "2 27 26\r",
+ "2 27 27\r",
+ "2 27 28\r",
+ "2 27 29\r",
+ "2 27 30\r",
+ "2 27 31\r",
+ "2 27 32\r",
+ "2 27 33\r",
+ "2 27 34\r",
+ "2 27 35\r",
+ "2 27 36\r",
+ "2 27 37\r",
+ "2 27 38\r",
+ "2 27 39\r",
+ "2 27 40\r",
+ "2 27 41\r",
+ "2 27 42\r",
+ "2 27 43\r",
+ "2 27 44\r",
+ "2 27 45\r",
+ "2 27 46\r",
+ "2 27 47\r",
+ "2 27 48\r",
+ "2 27 49\r",
+ "2 27 50\r",
+ "2 27 51\r",
+ "2 27 52\r",
+ "2 27 53\r",
+ "2 27 54\r",
+ "2 27 55\r",
+ "2 27 56\r",
+ "2 27 57\r",
+ "2 27 58\r",
+ "2 28 1\r",
+ "2 28 2\r",
+ "2 28 3\r",
+ "2 28 4\r",
+ "2 28 5\r",
+ "2 28 6\r",
+ "2 28 7\r",
+ "2 28 8\r",
+ "2 28 9\r",
+ "2 28 10\r",
+ "2 28 11\r",
+ "2 28 12\r",
+ "2 28 13\r",
+ "2 28 14\r",
+ "2 28 15\r",
+ "2 28 16\r",
+ "2 28 17\r",
+ "2 28 18\r",
+ "2 28 19\r",
+ "2 28 20\r",
+ "2 28 21\r",
+ "2 28 22\r",
+ "2 28 23\r",
+ "2 28 24\r",
+ "2 28 25\r",
+ "2 28 26\r",
+ "2 28 27\r",
+ "2 28 28\r",
+ "2 28 29\r",
+ "2 28 30\r",
+ "2 28 31\r",
+ "2 28 32\r",
+ "2 28 33\r",
+ "2 28 34\r",
+ "2 28 35\r",
+ "2 28 36\r",
+ "2 28 37\r",
+ "2 28 38\r",
+ "2 28 39\r",
+ "2 28 40\r",
+ "2 28 41\r",
+ "2 28 42\r",
+ "2 28 43\r",
+ "2 28 44\r",
+ "2 28 45\r",
+ "2 28 46\r",
+ "2 28 47\r",
+ "2 28 48\r",
+ "2 28 49\r",
+ "2 28 50\r",
+ "2 28 51\r",
+ "2 28 52\r",
+ "2 28 53\r",
+ "2 28 54\r",
+ "2 28 55\r",
+ "2 28 56\r",
+ "2 28 57\r",
+ "2 28 58\r",
+ "2 29 1\r",
+ "2 29 2\r",
+ "2 29 3\r",
+ "2 29 4\r",
+ "2 29 5\r",
+ "2 29 6\r",
+ "2 29 7\r",
+ "2 29 8\r",
+ "2 29 9\r",
+ "2 29 10\r",
+ "2 29 11\r",
+ "2 29 12\r",
+ "2 29 13\r",
+ "2 29 14\r",
+ "2 29 15\r",
+ "2 29 16\r",
+ "2 29 17\r",
+ "2 29 18\r",
+ "2 29 19\r",
+ "2 29 20\r",
+ "2 29 21\r",
+ "2 29 22\r",
+ "2 29 23\r",
+ "2 29 24\r",
+ "2 29 25\r",
+ "2 29 26\r",
+ "2 29 27\r",
+ "2 29 28\r",
+ "2 29 29\r",
+ "2 29 30\r",
+ "2 29 31\r",
+ "2 29 32\r",
+ "2 29 33\r",
+ "2 29 34\r",
+ "2 29 35\r",
+ "2 29 36\r",
+ "2 29 37\r",
+ "2 29 38\r",
+ "2 29 39\r",
+ "2 29 40\r",
+ "2 29 41\r",
+ "2 29 42\r",
+ "2 29 43\r",
+ "2 29 44\r",
+ "2 29 45\r",
+ "2 29 46\r",
+ "2 29 47\r",
+ "2 29 48\r",
+ "2 29 49\r",
+ "2 29 50\r",
+ "2 29 51\r",
+ "2 29 52\r",
+ "2 29 53\r",
+ "2 29 54\r",
+ "2 29 55\r",
+ "2 29 56\r",
+ "2 29 57\r",
+ "2 29 58\r",
+ "2 30 1\r",
+ "2 30 2\r",
+ "2 30 3\r",
+ "2 30 4\r",
+ "2 30 5\r",
+ "2 30 6\r",
+ "2 30 7\r",
+ "2 30 8\r",
+ "2 30 9\r",
+ "2 30 10\r",
+ "2 30 11\r",
+ "2 30 12\r",
+ "2 30 13\r",
+ "2 30 14\r",
+ "2 30 15\r",
+ "2 30 16\r",
+ "2 30 17\r",
+ "2 30 18\r",
+ "2 30 19\r",
+ "2 30 20\r",
+ "2 30 21\r",
+ "2 30 22\r",
+ "2 30 23\r",
+ "2 30 24\r",
+ "2 30 25\r",
+ "2 30 26\r",
+ "2 30 27\r",
+ "2 30 28\r",
+ "2 30 29\r",
+ "2 30 30\r",
+ "2 30 31\r",
+ "2 30 32\r",
+ "2 30 33\r",
+ "2 30 34\r",
+ "2 30 35\r",
+ "2 30 36\r",
+ "2 30 37\r",
+ "2 30 38\r",
+ "2 30 39\r",
+ "2 30 40\r",
+ "2 30 41\r",
+ "2 30 42\r",
+ "2 30 43\r",
+ "2 30 44\r",
+ "2 30 45\r",
+ "2 30 46\r",
+ "2 30 47\r",
+ "2 30 48\r",
+ "2 30 49\r",
+ "2 30 50\r",
+ "2 30 51\r",
+ "2 30 52\r",
+ "2 30 53\r",
+ "2 30 54\r",
+ "2 30 55\r",
+ "2 30 56\r",
+ "2 30 57\r",
+ "2 30 58\r",
+ "2 31 1\r",
+ "2 31 2\r",
+ "2 31 3\r",
+ "2 31 4\r",
+ "2 31 5\r",
+ "2 31 6\r",
+ "2 31 7\r",
+ "2 31 8\r",
+ "2 31 9\r",
+ "2 31 10\r",
+ "2 31 11\r",
+ "2 31 12\r",
+ "2 31 13\r",
+ "2 31 14\r",
+ "2 31 15\r",
+ "2 31 16\r",
+ "2 31 17\r",
+ "2 31 18\r",
+ "2 31 19\r",
+ "2 31 20\r",
+ "2 31 21\r",
+ "2 31 22\r",
+ "2 31 23\r",
+ "2 31 24\r",
+ "2 31 25\r",
+ "2 31 26\r",
+ "2 31 27\r",
+ "2 31 28\r",
+ "2 31 29\r",
+ "2 31 30\r",
+ "2 31 31\r",
+ "2 31 32\r",
+ "2 31 33\r",
+ "2 31 34\r",
+ "2 31 35\r",
+ "2 31 36\r",
+ "2 31 37\r",
+ "2 31 38\r",
+ "2 31 39\r",
+ "2 31 40\r",
+ "2 31 41\r",
+ "2 31 42\r",
+ "2 31 43\r",
+ "2 31 44\r",
+ "2 31 45\r",
+ "2 31 46\r",
+ "2 31 47\r",
+ "2 31 48\r",
+ "2 31 49\r",
+ "2 31 50\r",
+ "2 31 51\r",
+ "2 31 52\r",
+ "2 31 53\r",
+ "2 31 54\r",
+ "2 31 55\r",
+ "2 31 56\r",
+ "2 31 57\r",
+ "2 31 58\r",
+ "2 32 1\r",
+ "2 32 2\r",
+ "2 32 3\r",
+ "2 32 4\r",
+ "2 32 5\r",
+ "2 32 6\r",
+ "2 32 7\r",
+ "2 32 8\r",
+ "2 32 9\r",
+ "2 32 10\r",
+ "2 32 11\r",
+ "2 32 12\r",
+ "2 32 13\r",
+ "2 32 14\r",
+ "2 32 15\r",
+ "2 32 16\r",
+ "2 32 17\r",
+ "2 32 18\r",
+ "2 32 19\r",
+ "2 32 20\r",
+ "2 32 21\r",
+ "2 32 22\r",
+ "2 32 23\r",
+ "2 32 24\r",
+ "2 32 25\r",
+ "2 32 26\r",
+ "2 32 27\r",
+ "2 32 28\r",
+ "2 32 29\r",
+ "2 32 30\r",
+ "2 32 31\r",
+ "2 32 32\r",
+ "2 32 33\r",
+ "2 32 34\r",
+ "2 32 35\r",
+ "2 32 36\r",
+ "2 32 37\r",
+ "2 32 38\r",
+ "2 32 39\r",
+ "2 32 40\r",
+ "2 32 41\r",
+ "2 32 42\r",
+ "2 32 43\r",
+ "2 32 44\r",
+ "2 32 45\r",
+ "2 32 46\r",
+ "2 32 47\r",
+ "2 32 48\r",
+ "2 32 49\r",
+ "2 32 50\r",
+ "2 32 51\r",
+ "2 32 52\r",
+ "2 32 53\r",
+ "2 32 54\r",
+ "2 32 55\r",
+ "2 32 56\r",
+ "2 32 57\r",
+ "2 32 58\r",
+ "2 33 1\r",
+ "2 33 2\r",
+ "2 33 3\r",
+ "2 33 4\r",
+ "2 33 5\r",
+ "2 33 6\r",
+ "2 33 7\r",
+ "2 33 8\r",
+ "2 33 9\r",
+ "2 33 10\r",
+ "2 33 11\r",
+ "2 33 12\r",
+ "2 33 13\r",
+ "2 33 14\r",
+ "2 33 15\r",
+ "2 33 16\r",
+ "2 33 17\r",
+ "2 33 18\r",
+ "2 33 19\r",
+ "2 33 20\r",
+ "2 33 21\r",
+ "2 33 22\r",
+ "2 33 23\r",
+ "2 33 24\r",
+ "2 33 25\r",
+ "2 33 26\r",
+ "2 33 27\r",
+ "2 33 28\r",
+ "2 33 29\r",
+ "2 33 30\r",
+ "2 33 31\r",
+ "2 33 32\r",
+ "2 33 33\r",
+ "2 33 34\r",
+ "2 33 35\r",
+ "2 33 36\r",
+ "2 33 37\r",
+ "2 33 38\r",
+ "2 33 39\r",
+ "2 33 40\r",
+ "2 33 41\r",
+ "2 33 42\r",
+ "2 33 43\r",
+ "2 33 44\r",
+ "2 33 45\r",
+ "2 33 46\r",
+ "2 33 47\r",
+ "2 33 48\r",
+ "2 33 49\r",
+ "2 33 50\r",
+ "2 33 51\r",
+ "2 33 52\r",
+ "2 33 53\r",
+ "2 33 54\r",
+ "2 33 55\r",
+ "2 33 56\r",
+ "2 33 57\r",
+ "2 33 58\r",
+ "2 34 1\r",
+ "2 34 2\r",
+ "2 34 3\r",
+ "2 34 4\r",
+ "2 34 5\r",
+ "2 34 6\r",
+ "2 34 7\r",
+ "2 34 8\r",
+ "2 34 9\r",
+ "2 34 10\r",
+ "2 34 11\r",
+ "2 34 12\r",
+ "2 34 13\r",
+ "2 34 14\r",
+ "2 34 15\r",
+ "2 34 16\r",
+ "2 34 17\r",
+ "2 34 18\r",
+ "2 34 19\r",
+ "2 34 20\r",
+ "2 34 21\r",
+ "2 34 22\r",
+ "2 34 23\r",
+ "2 34 24\r",
+ "2 34 25\r",
+ "2 34 26\r",
+ "2 34 27\r",
+ "2 34 28\r",
+ "2 34 29\r",
+ "2 34 30\r",
+ "2 34 31\r",
+ "2 34 32\r",
+ "2 34 33\r",
+ "2 34 34\r",
+ "2 34 35\r",
+ "2 34 36\r",
+ "2 34 37\r",
+ "2 34 38\r",
+ "2 34 39\r",
+ "2 34 40\r",
+ "2 34 41\r",
+ "2 34 42\r",
+ "2 34 43\r",
+ "2 34 44\r",
+ "2 34 45\r",
+ "2 34 46\r",
+ "2 34 47\r",
+ "2 34 48\r",
+ "2 34 49\r",
+ "2 34 50\r",
+ "2 34 51\r",
+ "2 34 52\r",
+ "2 34 53\r",
+ "2 34 54"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "2 34 55\r",
+ "2 34 56\r",
+ "2 34 57\r",
+ "2 34 58\r",
+ "2 35 1\r",
+ "2 35 2\r",
+ "2 35 3\r",
+ "2 35 4\r",
+ "2 35 5\r",
+ "2 35 6\r",
+ "2 35 7\r",
+ "2 35 8\r",
+ "2 35 9\r",
+ "2 35 10\r",
+ "2 35 11\r",
+ "2 35 12\r",
+ "2 35 13\r",
+ "2 35 14\r",
+ "2 35 15\r",
+ "2 35 16\r",
+ "2 35 17\r",
+ "2 35 18\r",
+ "2 35 19\r",
+ "2 35 20\r",
+ "2 35 21\r",
+ "2 35 22\r",
+ "2 35 23\r",
+ "2 35 24\r",
+ "2 35 25\r",
+ "2 35 26\r",
+ "2 35 27\r",
+ "2 35 28\r",
+ "2 35 29\r",
+ "2 35 30\r",
+ "2 35 31\r",
+ "2 35 32\r",
+ "2 35 33\r",
+ "2 35 34\r",
+ "2 35 35\r",
+ "2 35 36\r",
+ "2 35 37\r",
+ "2 35 38\r",
+ "2 35 39\r",
+ "2 35 40\r",
+ "2 35 41\r",
+ "2 35 42\r",
+ "2 35 43\r",
+ "2 35 44\r",
+ "2 35 45\r",
+ "2 35 46\r",
+ "2 35 47\r",
+ "2 35 48\r",
+ "2 35 49\r",
+ "2 35 50\r",
+ "2 35 51\r",
+ "2 35 52\r",
+ "2 35 53\r",
+ "2 35 54\r",
+ "2 35 55\r",
+ "2 35 56\r",
+ "2 35 57\r",
+ "2 35 58\r",
+ "2 36 1\r",
+ "2 36 2\r",
+ "2 36 3\r",
+ "2 36 4\r",
+ "2 36 5\r",
+ "2 36 6\r",
+ "2 36 7\r",
+ "2 36 8\r",
+ "2 36 9\r",
+ "2 36 10\r",
+ "2 36 11\r",
+ "2 36 12\r",
+ "2 36 13\r",
+ "2 36 14\r",
+ "2 36 15\r",
+ "2 36 16\r",
+ "2 36 17\r",
+ "2 36 18\r",
+ "2 36 19\r",
+ "2 36 20\r",
+ "2 36 21\r",
+ "2 36 22\r",
+ "2 36 23\r",
+ "2 36 24\r",
+ "2 36 25\r",
+ "2 36 26\r",
+ "2 36 27\r",
+ "2 36 28\r",
+ "2 36 29\r",
+ "2 36 30\r",
+ "2 36 31\r",
+ "2 36 32\r",
+ "2 36 33\r",
+ "2 36 34\r",
+ "2 36 35\r",
+ "2 36 36\r",
+ "2 36 37\r",
+ "2 36 38\r",
+ "2 36 39\r",
+ "2 36 40\r",
+ "2 36 41\r",
+ "2 36 42\r",
+ "2 36 43\r",
+ "2 36 44\r",
+ "2 36 45\r",
+ "2 36 46\r",
+ "2 36 47\r",
+ "2 36 48\r",
+ "2 36 49\r",
+ "2 36 50\r",
+ "2 36 51\r",
+ "2 36 52\r",
+ "2 36 53\r",
+ "2 36 54\r",
+ "2 36 55\r",
+ "2 36 56\r",
+ "2 36 57\r",
+ "2 36 58\r",
+ "2 37 1\r",
+ "2 37 2\r",
+ "2 37 3\r",
+ "2 37 4\r",
+ "2 37 5\r",
+ "2 37 6\r",
+ "2 37 7\r",
+ "2 37 8\r",
+ "2 37 9\r",
+ "2 37 10\r",
+ "2 37 11\r",
+ "2 37 12\r",
+ "2 37 13\r",
+ "2 37 14\r",
+ "2 37 15\r",
+ "2 37 16\r",
+ "2 37 17\r",
+ "2 37 18\r",
+ "2 37 19\r",
+ "2 37 20\r",
+ "2 37 21\r",
+ "2 37 22\r",
+ "2 37 23\r",
+ "2 37 24\r",
+ "2 37 25\r",
+ "2 37 26\r",
+ "2 37 27\r",
+ "2 37 28\r",
+ "2 37 29\r",
+ "2 37 30\r",
+ "2 37 31\r",
+ "2 37 32\r",
+ "2 37 33\r",
+ "2 37 34\r",
+ "2 37 35\r",
+ "2 37 36\r",
+ "2 37 37\r",
+ "2 37 38\r",
+ "2 37 39\r",
+ "2 37 40\r",
+ "2 37 41\r",
+ "2 37 42\r",
+ "2 37 43\r",
+ "2 37 44\r",
+ "2 37 45\r",
+ "2 37 46\r",
+ "2 37 47\r",
+ "2 37 48\r",
+ "2 37 49\r",
+ "2 37 50\r",
+ "2 37 51\r",
+ "2 37 52\r",
+ "2 37 53\r",
+ "2 37 54\r",
+ "2 37 55\r",
+ "2 37 56\r",
+ "2 37 57\r",
+ "2 37 58\r",
+ "2 38 1\r",
+ "2 38 2\r",
+ "2 38 3\r",
+ "2 38 4\r",
+ "2 38 5\r",
+ "2 38 6\r",
+ "2 38 7\r",
+ "2 38 8\r",
+ "2 38 9\r",
+ "2 38 10\r",
+ "2 38 11\r",
+ "2 38 12\r",
+ "2 38 13\r",
+ "2 38 14\r",
+ "2 38 15\r",
+ "2 38 16\r",
+ "2 38 17\r",
+ "2 38 18\r",
+ "2 38 19\r",
+ "2 38 20\r",
+ "2 38 21\r",
+ "2 38 22\r",
+ "2 38 23\r",
+ "2 38 24\r",
+ "2 38 25\r",
+ "2 38 26\r",
+ "2 38 27\r",
+ "2 38 28\r",
+ "2 38 29\r",
+ "2 38 30\r",
+ "2 38 31\r",
+ "2 38 32\r",
+ "2 38 33\r",
+ "2 38 34\r",
+ "2 38 35\r",
+ "2 38 36\r",
+ "2 38 37\r",
+ "2 38 38\r",
+ "2 38 39\r",
+ "2 38 40\r",
+ "2 38 41\r",
+ "2 38 42\r",
+ "2 38 43\r",
+ "2 38 44\r",
+ "2 38 45\r",
+ "2 38 46\r",
+ "2 38 47\r",
+ "2 38 48\r",
+ "2 38 49\r",
+ "2 38 50\r",
+ "2 38 51\r",
+ "2 38 52\r",
+ "2 38 53\r",
+ "2 38 54\r",
+ "2 38 55\r",
+ "2 38 56\r",
+ "2 38 57\r",
+ "2 38 58\r",
+ "2 39 1\r",
+ "2 39 2\r",
+ "2 39 3\r",
+ "2 39 4\r",
+ "2 39 5\r",
+ "2 39 6\r",
+ "2 39 7\r",
+ "2 39 8\r",
+ "2 39 9\r",
+ "2 39 10\r",
+ "2 39 11\r",
+ "2 39 12\r",
+ "2 39 13\r",
+ "2 39 14\r",
+ "2 39 15\r",
+ "2 39 16\r",
+ "2 39 17\r",
+ "2 39 18\r",
+ "2 39 19\r",
+ "2 39 20\r",
+ "2 39 21\r",
+ "2 39 22\r",
+ "2 39 23\r",
+ "2 39 24\r",
+ "2 39 25\r",
+ "2 39 26\r",
+ "2 39 27\r",
+ "2 39 28\r",
+ "2 39 29\r",
+ "2 39 30\r",
+ "2 39 31\r",
+ "2 39 32\r",
+ "2 39 33\r",
+ "2 39 34\r",
+ "2 39 35\r",
+ "2 39 36\r",
+ "2 39 37\r",
+ "2 39 38\r",
+ "2 39 39\r",
+ "2 39 40\r",
+ "2 39 41\r",
+ "2 39 42\r",
+ "2 39 43\r",
+ "2 39 44\r",
+ "2 39 45\r",
+ "2 39 46\r",
+ "2 39 47\r",
+ "2 39 48\r",
+ "2 39 49\r",
+ "2 39 50\r",
+ "2 39 51\r",
+ "2 39 52\r",
+ "2 39 53\r",
+ "2 39 54\r",
+ "2 39 55\r",
+ "2 39 56\r",
+ "2 39 57\r",
+ "2 39 58\r",
+ "2 40 1\r",
+ "2 40 2\r",
+ "2 40 3\r",
+ "2 40 4\r",
+ "2 40 5\r",
+ "2 40 6\r",
+ "2 40 7\r",
+ "2 40 8\r",
+ "2 40 9\r",
+ "2 40 10\r",
+ "2 40 11\r",
+ "2 40 12\r",
+ "2 40 13\r",
+ "2 40 14\r",
+ "2 40 15\r",
+ "2 40 16\r",
+ "2 40 17\r",
+ "2 40 18\r",
+ "2 40 19\r",
+ "2 40 20\r",
+ "2 40 21\r",
+ "2 40 22\r",
+ "2 40 23\r",
+ "2 40 24\r",
+ "2 40 25\r",
+ "2 40 26\r",
+ "2 40 27\r",
+ "2 40 28\r",
+ "2 40 29\r",
+ "2 40 30\r",
+ "2 40 31\r",
+ "2 40 32\r",
+ "2 40 33\r",
+ "2 40 34\r",
+ "2 40 35\r",
+ "2 40 36\r",
+ "2 40 37\r",
+ "2 40 38\r",
+ "2 40 39\r",
+ "2 40 40\r",
+ "2 40 41\r",
+ "2 40 42\r",
+ "2 40 43\r",
+ "2 40 44\r",
+ "2 40 45\r",
+ "2 40 46\r",
+ "2 40 47\r",
+ "2 40 48\r",
+ "2 40 49\r",
+ "2 40 50\r",
+ "2 40 51\r",
+ "2 40 52\r",
+ "2 40 53\r",
+ "2 40 54\r",
+ "2 40 55\r",
+ "2 40 56\r",
+ "2 40 57\r",
+ "2 40 58\r",
+ "2 41 1\r",
+ "2 41 2\r",
+ "2 41 3\r",
+ "2 41 4\r",
+ "2 41 5\r",
+ "2 41 6\r",
+ "2 41 7\r",
+ "2 41 8\r",
+ "2 41 9\r",
+ "2 41 10\r",
+ "2 41 11\r",
+ "2 41 12\r",
+ "2 41 13\r",
+ "2 41 14\r",
+ "2 41 15\r",
+ "2 41 16\r",
+ "2 41 17\r",
+ "2 41 18\r",
+ "2 41 19\r",
+ "2 41 20\r",
+ "2 41 21\r",
+ "2 41 22\r",
+ "2 41 23\r",
+ "2 41 24\r",
+ "2 41 25\r",
+ "2 41 26\r",
+ "2 41 27\r",
+ "2 41 28\r",
+ "2 41 29\r",
+ "2 41 30\r",
+ "2 41 31\r",
+ "2 41 32\r",
+ "2 41 33\r",
+ "2 41 34\r",
+ "2 41 35\r",
+ "2 41 36\r",
+ "2 41 37\r",
+ "2 41 38\r",
+ "2 41 39\r",
+ "2 41 40\r",
+ "2 41 41\r",
+ "2 41 42\r",
+ "2 41 43\r",
+ "2 41 44\r",
+ "2 41 45\r",
+ "2 41 46\r",
+ "2 41 47\r",
+ "2 41 48\r",
+ "2 41 49\r",
+ "2 41 50\r",
+ "2 41 51\r",
+ "2 41 52\r",
+ "2 41 53\r",
+ "2 41 54\r",
+ "2 41 55\r",
+ "2 41 56\r",
+ "2 41 57\r",
+ "2 41 58\r",
+ "2 42 1\r",
+ "2 42 2\r",
+ "2 42 3\r",
+ "2 42 4\r",
+ "2 42 5\r",
+ "2 42 6\r",
+ "2 42 7\r",
+ "2 42 8\r",
+ "2 42 9\r",
+ "2 42 10\r",
+ "2 42 11\r",
+ "2 42 12\r",
+ "2 42 13\r",
+ "2 42 14\r",
+ "2 42 15\r",
+ "2 42 16\r",
+ "2 42 17\r",
+ "2 42 18\r",
+ "2 42 19\r",
+ "2 42 20\r",
+ "2 42 21\r",
+ "2 42 22\r",
+ "2 42 23\r",
+ "2 42 24\r",
+ "2 42 25\r",
+ "2 42 26\r",
+ "2 42 27\r",
+ "2 42 28\r",
+ "2 42 29\r",
+ "2 42 30\r",
+ "2 42 31\r",
+ "2 42 32\r",
+ "2 42 33\r",
+ "2 42 34\r",
+ "2 42 35\r",
+ "2 42 36\r",
+ "2 42 37\r",
+ "2 42 38\r",
+ "2 42 39\r",
+ "2 42 40\r",
+ "2 42 41\r",
+ "2 42 42\r",
+ "2 42 43\r",
+ "2 42 44\r",
+ "2 42 45\r",
+ "2 42 46\r",
+ "2 42 47\r",
+ "2 42 48\r",
+ "2 42 49\r",
+ "2 42 50\r",
+ "2 42 51\r",
+ "2 42 52\r",
+ "2 42 53\r",
+ "2 42 54\r",
+ "2 42 55\r",
+ "2 42 56\r",
+ "2 42 57\r",
+ "2 42 58\r",
+ "2 43 1\r",
+ "2 43 2\r",
+ "2 43 3\r",
+ "2 43 4\r",
+ "2 43 5\r",
+ "2 43 6\r",
+ "2 43 7\r",
+ "2 43 8\r",
+ "2 43 9\r",
+ "2 43 10\r",
+ "2 43 11\r",
+ "2 43 12\r",
+ "2 43 13\r",
+ "2 43 14\r",
+ "2 43 15\r",
+ "2 43 16\r",
+ "2 43 17\r",
+ "2 43 18\r",
+ "2 43 19\r",
+ "2 43 20\r",
+ "2 43 21\r",
+ "2 43 22\r",
+ "2 43 23\r",
+ "2 43 24\r",
+ "2 43 25\r",
+ "2 43 26\r",
+ "2 43 27\r",
+ "2 43 28\r",
+ "2 43 29\r",
+ "2 43 30\r",
+ "2 43 31\r",
+ "2 43 32\r",
+ "2 43 33\r",
+ "2 43 34\r",
+ "2 43 35\r",
+ "2 43 36\r",
+ "2 43 37\r",
+ "2 43 38\r",
+ "2 43 39\r",
+ "2 43 40\r",
+ "2 43 41\r",
+ "2 43 42\r",
+ "2 43 43\r",
+ "2 43 44\r",
+ "2 43 45\r",
+ "2 43 46\r",
+ "2 43 47\r",
+ "2 43 48\r",
+ "2 43 49\r",
+ "2 43 50\r",
+ "2 43 51\r",
+ "2 43 52\r",
+ "2 43 53\r",
+ "2 43 54\r",
+ "2 43 55\r",
+ "2 43 56\r",
+ "2 43 57\r",
+ "2 43 58\r",
+ "2 44 1\r",
+ "2 44 2\r",
+ "2 44 3\r",
+ "2 44 4\r",
+ "2 44 5\r",
+ "2 44 6\r",
+ "2 44 7\r",
+ "2 44 8\r",
+ "2 44 9\r",
+ "2 44 10\r",
+ "2 44 11\r",
+ "2 44 12\r",
+ "2 44 13\r",
+ "2 44 14\r",
+ "2 44 15\r",
+ "2 44 16\r",
+ "2 44 17\r",
+ "2 44 18\r",
+ "2 44 19\r",
+ "2 44 20\r",
+ "2 44 21\r",
+ "2 44 22\r",
+ "2 44 23\r",
+ "2 44 24\r",
+ "2 44 25\r",
+ "2 44 26\r",
+ "2 44 27\r",
+ "2 44 28\r",
+ "2 44 29\r",
+ "2 44 30\r",
+ "2 44 31\r",
+ "2 44 32\r",
+ "2 44 33\r",
+ "2 44 34\r",
+ "2 44 35\r",
+ "2 44 36\r",
+ "2 44 37\r",
+ "2 44 38\r",
+ "2 44 39\r",
+ "2 44 40\r",
+ "2 44 41\r",
+ "2 44 42\r",
+ "2 44 43\r",
+ "2 44 44\r",
+ "2 44 45\r",
+ "2 44 46\r",
+ "2 44 47\r",
+ "2 44 48\r",
+ "2 44 49\r",
+ "2 44 50\r",
+ "2 44 51\r",
+ "2 44 52\r",
+ "2 44 53\r",
+ "2 44 54\r",
+ "2 44 55\r",
+ "2 44 56\r",
+ "2 44 57\r",
+ "2 44 58\r",
+ "2 45 1\r",
+ "2 45 2\r",
+ "2 45 3\r",
+ "2 45 4\r",
+ "2 45 5\r",
+ "2 45 6\r",
+ "2 45 7\r",
+ "2 45 8\r",
+ "2 45 9\r",
+ "2 45 10\r",
+ "2 45 11\r",
+ "2 45 12\r",
+ "2 45 13\r",
+ "2 45 14\r",
+ "2 45 15\r",
+ "2 45 16\r",
+ "2 45 17\r",
+ "2 45 18\r",
+ "2 45 19\r",
+ "2 45 20\r",
+ "2 45 21\r",
+ "2 45 22\r",
+ "2 45 23\r",
+ "2 45 24\r",
+ "2 45 25\r",
+ "2 45 26\r",
+ "2 45 27\r",
+ "2 45 28\r",
+ "2 45 29\r",
+ "2 45 30\r",
+ "2 45 31\r",
+ "2 45 32\r",
+ "2 45 33\r",
+ "2 45 34\r",
+ "2 45 35\r",
+ "2 45 36\r",
+ "2 45 37\r",
+ "2 45 38\r",
+ "2 45 39\r",
+ "2 45 40\r",
+ "2 45 41\r",
+ "2 45 42\r",
+ "2 45 43\r",
+ "2 45 44\r",
+ "2 45 45\r",
+ "2 45 46\r",
+ "2 45 47\r",
+ "2 45 48\r",
+ "2 45 49\r",
+ "2 45 50\r",
+ "2 45 51\r",
+ "2 45 52\r",
+ "2 45 53\r",
+ "2 45 54\r",
+ "2 45 55\r",
+ "2 45 56\r",
+ "2 45 57\r",
+ "2 45 58\r",
+ "2 46 1\r",
+ "2 46 2\r",
+ "2 46 3\r",
+ "2 46 4\r",
+ "2 46 5\r",
+ "2 46 6\r",
+ "2 46 7\r",
+ "2 46 8\r",
+ "2 46 9\r",
+ "2 46 10\r",
+ "2 46 11\r",
+ "2 46 12\r",
+ "2 46 13\r",
+ "2 46 14\r",
+ "2 46 15\r",
+ "2 46 16\r",
+ "2 46 17\r",
+ "2 46 18\r",
+ "2 46 19\r",
+ "2 46 20\r",
+ "2 46 21\r",
+ "2 46 22\r",
+ "2 46 23\r",
+ "2 46 24\r",
+ "2 46 25\r",
+ "2 46 26\r",
+ "2 46 27\r",
+ "2 46 28\r",
+ "2 46 29\r",
+ "2 46 30\r",
+ "2 46 31\r",
+ "2 46 32\r",
+ "2 46 33\r",
+ "2 46 34\r",
+ "2 46 35\r",
+ "2 46 36\r",
+ "2 46 37\r",
+ "2 46 38\r",
+ "2 46 39\r",
+ "2 46 40\r",
+ "2 46 41\r",
+ "2 46 42\r",
+ "2 46 43\r",
+ "2 46 44\r",
+ "2 46 45\r",
+ "2 46 46\r",
+ "2 46 47\r",
+ "2 46 48\r",
+ "2 46 49\r",
+ "2 46 50\r",
+ "2 46 51\r",
+ "2 46 52\r",
+ "2 46 53\r",
+ "2 46 54\r",
+ "2 46 55\r",
+ "2 46 56\r",
+ "2 46 57\r",
+ "2 46 58\r",
+ "2 47 1\r",
+ "2 47 2\r",
+ "2 47 3\r",
+ "2 47 4\r",
+ "2 47 5\r",
+ "2 47 6\r",
+ "2 47 7\r",
+ "2 47 8\r",
+ "2 47 9\r",
+ "2 47 10\r",
+ "2 47 11\r",
+ "2 47 12\r",
+ "2 47 13\r",
+ "2 47 14\r",
+ "2 47 15\r",
+ "2 47 16\r",
+ "2 47 17\r",
+ "2 47 18\r",
+ "2 47 19\r",
+ "2 47 20\r",
+ "2 47 21\r",
+ "2 47 22\r",
+ "2 47 23\r",
+ "2 47 24\r",
+ "2 47 25\r",
+ "2 47 26\r",
+ "2 47 27\r",
+ "2 47 28\r",
+ "2 47 29\r",
+ "2 47 30\r",
+ "2 47 31\r",
+ "2 47 32\r",
+ "2 47 33\r",
+ "2 47 34\r",
+ "2 47 35\r",
+ "2 47 36\r",
+ "2 47 37\r",
+ "2 47 38\r",
+ "2 47 39\r",
+ "2 47 40\r",
+ "2 47 41\r",
+ "2 47 42\r",
+ "2 47 43\r",
+ "2 47 44\r",
+ "2 47 45\r",
+ "2 47 46\r",
+ "2 47 47\r",
+ "2 47 48\r",
+ "2 47 49\r",
+ "2 47 50\r",
+ "2 47 51\r",
+ "2 47 52\r",
+ "2 47 53\r",
+ "2 47 54\r",
+ "2 47 55\r",
+ "2 47 56\r",
+ "2 47 57\r",
+ "2 47 58\r",
+ "2 48 1\r",
+ "2 48 2\r",
+ "2 48 3\r",
+ "2 48 4\r",
+ "2 48 5\r",
+ "2 48 6\r",
+ "2 48 7\r",
+ "2 48 8\r",
+ "2 48 9\r",
+ "2 48 10\r",
+ "2 48 11\r",
+ "2 48 12\r",
+ "2 48 13\r",
+ "2 48 14\r",
+ "2 48 15\r",
+ "2 48 16\r",
+ "2 48 17\r",
+ "2 48 18\r",
+ "2 48 19\r",
+ "2 48 20\r",
+ "2 48 21\r",
+ "2 48 22\r",
+ "2 48 23\r",
+ "2 48 24\r",
+ "2 48 25\r",
+ "2 48 26\r",
+ "2 48 27\r",
+ "2 48 28\r",
+ "2 48 29\r",
+ "2 48 30\r",
+ "2 48 31\r",
+ "2 48 32\r",
+ "2 48 33\r",
+ "2 48 34\r",
+ "2 48 35\r",
+ "2 48 36\r",
+ "2 48 37\r",
+ "2 48 38\r",
+ "2 48 39\r",
+ "2 48 40\r",
+ "2 48 41\r",
+ "2 48 42\r",
+ "2 48 43\r",
+ "2 48 44\r",
+ "2 48 45\r",
+ "2 48 46\r",
+ "2 48 47\r",
+ "2 48 48\r",
+ "2 48 49\r",
+ "2 48 50\r",
+ "2 48 51\r",
+ "2 48 52\r",
+ "2 48 53\r",
+ "2 48 54\r",
+ "2 48 55\r",
+ "2 48 56\r",
+ "2 48 57\r",
+ "2 48 58\r",
+ "2 49 1\r",
+ "2 49 2\r",
+ "2 49 3\r",
+ "2 49 4\r",
+ "2 49 5\r",
+ "2 49 6\r",
+ "2 49 7\r",
+ "2 49 8\r",
+ "2 49 9\r",
+ "2 49 10\r",
+ "2 49 11\r",
+ "2 49 12\r",
+ "2 49 13\r",
+ "2 49 14\r",
+ "2 49 15\r",
+ "2 49 16\r",
+ "2 49 17\r",
+ "2 49 18\r",
+ "2 49 19\r",
+ "2 49 20\r",
+ "2 49 21\r",
+ "2 49 22\r",
+ "2 49 23\r",
+ "2 49 24\r",
+ "2 49 25\r",
+ "2 49 26\r",
+ "2 49 27\r",
+ "2 49 28\r",
+ "2 49 29\r",
+ "2 49 30\r",
+ "2 49 31\r",
+ "2 49 32\r",
+ "2 49 33\r",
+ "2 49 34\r",
+ "2 49 35\r",
+ "2 49 36\r",
+ "2 49 37\r",
+ "2 49 38\r",
+ "2 49 39\r",
+ "2 49 40\r",
+ "2 49 41\r",
+ "2 49 42\r",
+ "2 49 43\r",
+ "2 49 44\r",
+ "2 49 45\r",
+ "2 49 46\r",
+ "2 49 47\r",
+ "2 49 48\r",
+ "2 49 49\r",
+ "2 49 50\r",
+ "2 49 51\r",
+ "2 49 52\r",
+ "2 49 53\r",
+ "2 49 54\r",
+ "2 49 55\r",
+ "2 49 56\r",
+ "2 49 57\r",
+ "2 49 58\r",
+ "2 50 1\r",
+ "2 50 2\r",
+ "2 50 3\r",
+ "2 50 4\r",
+ "2 50 5\r",
+ "2 50 6\r",
+ "2 50 7\r",
+ "2 50 8\r",
+ "2 50 9\r",
+ "2 50 10\r",
+ "2 50 11\r",
+ "2 50 12\r",
+ "2 50 13\r",
+ "2 50 14\r",
+ "2 50 15\r",
+ "2 50 16\r",
+ "2 50 17\r",
+ "2 50 18\r",
+ "2 50 19\r",
+ "2 50 20\r",
+ "2 50 21\r",
+ "2 50 22\r",
+ "2 50 23\r",
+ "2 50 24\r",
+ "2 50 25\r",
+ "2 50 26\r",
+ "2 50 27\r",
+ "2 50 28\r",
+ "2 50 29\r",
+ "2 50 30\r",
+ "2 50 31\r",
+ "2 50 32\r",
+ "2 50 33\r",
+ "2 50 34\r",
+ "2 50 35\r",
+ "2 50 36\r",
+ "2 50 37\r",
+ "2 50 38\r",
+ "2 50 39\r",
+ "2 50 40\r",
+ "2 50 41\r",
+ "2 50 42\r",
+ "2 50 43\r",
+ "2 50 44\r",
+ "2 50 45\r",
+ "2 50 46\r",
+ "2 50 47\r",
+ "2 50 48\r",
+ "2 50 49\r",
+ "2 50 50\r",
+ "2 50 51\r",
+ "2 50 52\r",
+ "2 50 53\r",
+ "2 50 54\r",
+ "2 50 55\r",
+ "2 50 56\r",
+ "2 50 57\r",
+ "2 50 58\r",
+ "2 51 1\r",
+ "2 51 2\r",
+ "2 51 3\r",
+ "2 51 4\r",
+ "2 51 5\r",
+ "2 51 6\r",
+ "2 51 7\r",
+ "2 51 8\r",
+ "2 51 9\r",
+ "2 51 10\r",
+ "2 51 11\r",
+ "2 51 12\r",
+ "2 51 13\r",
+ "2 51 14\r",
+ "2 51 15\r",
+ "2 51 16\r",
+ "2 51 17\r",
+ "2 51 18\r",
+ "2 51 19\r",
+ "2 51 20\r",
+ "2 51 21\r",
+ "2 51 22\r",
+ "2 51 23\r",
+ "2 51 24\r",
+ "2 51 25\r",
+ "2 51 26\r",
+ "2 51 27\r",
+ "2 51 28\r",
+ "2 51 29\r",
+ "2 51 30\r",
+ "2 51 31\r",
+ "2 51 32\r",
+ "2 51 33\r",
+ "2 51 34\r",
+ "2 51 35\r",
+ "2 51 36\r",
+ "2 51 37\r",
+ "2 51 38\r",
+ "2 51 39\r",
+ "2 51 40\r",
+ "2 51 41\r",
+ "2 51 42\r",
+ "2 51 43\r",
+ "2 51 44\r",
+ "2 51 45\r",
+ "2 51 46\r",
+ "2 51 47\r",
+ "2 51 48\r",
+ "2 51 49\r",
+ "2 51 50\r",
+ "2 51 51\r",
+ "2 51 52\r",
+ "2 51 53\r",
+ "2 51 54\r",
+ "2 51 55\r",
+ "2 51 56\r",
+ "2 51 57\r",
+ "2 51 58\r",
+ "2 52 1\r",
+ "2 52 2\r",
+ "2 52 3\r",
+ "2 52 4\r",
+ "2 52 5\r",
+ "2 52 6\r",
+ "2 52 7\r",
+ "2 52 8\r",
+ "2 52 9\r",
+ "2 52 10\r",
+ "2 52 11\r",
+ "2 52 12\r",
+ "2 52 13\r",
+ "2 52 14\r",
+ "2 52 15\r",
+ "2 52 16\r",
+ "2 52 17\r",
+ "2 52 18\r",
+ "2 52 19\r",
+ "2 52 20\r",
+ "2 52 21\r",
+ "2 52 22\r",
+ "2 52 23\r",
+ "2 52 24\r",
+ "2 52 25\r",
+ "2 52 26\r",
+ "2 52 27\r",
+ "2 52 28\r",
+ "2 52 29\r",
+ "2 52 30\r",
+ "2 52 31\r",
+ "2 52 32\r",
+ "2 52 33\r",
+ "2 52 34\r",
+ "2 52 35\r",
+ "2 52 36\r",
+ "2 52 37\r",
+ "2 52 38\r",
+ "2 52 39\r",
+ "2 52 40\r",
+ "2 52 41\r",
+ "2 52 42\r",
+ "2 52 43\r",
+ "2 52 44\r",
+ "2 52 45\r",
+ "2 52 46\r",
+ "2 52 47\r",
+ "2 52 48\r",
+ "2 52 49\r",
+ "2 52 50\r",
+ "2 52 51\r",
+ "2 52 52\r",
+ "2 52 53\r",
+ "2 52 54\r",
+ "2 52 55\r",
+ "2 52 56\r",
+ "2 52 57\r",
+ "2 52 58\r",
+ "2 53 1\r",
+ "2 53 2\r",
+ "2 53 3\r",
+ "2 53 4\r",
+ "2 53 5\r",
+ "2 53 6\r",
+ "2 53 7\r",
+ "2 53 8\r",
+ "2 53 9\r",
+ "2 53 10\r",
+ "2 53 11\r",
+ "2 53 12\r",
+ "2 53 13\r",
+ "2 53 14\r",
+ "2 53 15\r",
+ "2 53 16\r",
+ "2 53 17\r",
+ "2 53 18\r",
+ "2 53 19\r",
+ "2 53 20\r",
+ "2 53 21\r",
+ "2 53 22\r",
+ "2 53 23\r",
+ "2 53 24\r",
+ "2 53 25\r",
+ "2 53 26\r",
+ "2 53 27\r",
+ "2 53 28\r",
+ "2 53 29\r",
+ "2 53 30\r",
+ "2 53 31\r",
+ "2 53 32\r",
+ "2 53 33\r",
+ "2 53 34\r",
+ "2 53 35\r",
+ "2 53 36\r",
+ "2 53 37\r",
+ "2 53 38\r",
+ "2 53 39\r",
+ "2 53 40\r",
+ "2 53 41\r",
+ "2 53 42\r",
+ "2 53 43\r",
+ "2 53 44\r",
+ "2 53 45\r",
+ "2 53 46\r",
+ "2 53 47\r",
+ "2 53 48\r",
+ "2 53 49\r",
+ "2 53 50\r",
+ "2 53 51\r",
+ "2 53 52\r",
+ "2 53 53\r",
+ "2 53 54\r",
+ "2 53 55\r",
+ "2 53 56\r",
+ "2 53 57\r",
+ "2 53 58\r",
+ "2 54 1\r",
+ "2 54 2\r",
+ "2 54 3\r",
+ "2 54 4\r",
+ "2 54 5\r",
+ "2 54 6\r",
+ "2 54 7\r",
+ "2 54 8\r",
+ "2 54 9\r",
+ "2 54 10\r",
+ "2 54 11\r",
+ "2 54 12\r",
+ "2 54 13\r",
+ "2 54 14\r",
+ "2 54 15\r",
+ "2 54 16\r",
+ "2 54 17\r",
+ "2 54 18\r",
+ "2 54 19\r",
+ "2 54 20\r",
+ "2 54 21\r",
+ "2 54 22\r",
+ "2 54 23\r",
+ "2 54 24\r",
+ "2 54 25\r",
+ "2 54 26\r",
+ "2 54 27\r",
+ "2 54 28\r",
+ "2 54 29\r",
+ "2 54 30\r",
+ "2 54 31\r",
+ "2 54 32\r",
+ "2 54 33\r",
+ "2 54 34\r",
+ "2 54 35\r",
+ "2 54 36\r",
+ "2 54 37\r",
+ "2 54 38\r",
+ "2 54 39\r",
+ "2 54 40\r",
+ "2 54 41\r",
+ "2 54 42\r",
+ "2 54 43\r",
+ "2 54 44\r",
+ "2 54 45\r",
+ "2 54 46\r",
+ "2 54 47\r",
+ "2 54 48\r",
+ "2 54 49\r",
+ "2 54 50\r",
+ "2 54 51\r",
+ "2 54 52\r",
+ "2 54 53\r",
+ "2 54 54\r",
+ "2 54 55\r",
+ "2 54 56\r",
+ "2 54 57\r",
+ "2 54 58\r",
+ "2 55 1\r",
+ "2 55 2\r",
+ "2 55 3\r",
+ "2 55 4\r",
+ "2 55 5\r",
+ "2 55 6\r",
+ "2 55 7\r",
+ "2 55 8\r",
+ "2 55 9\r",
+ "2 55 10\r",
+ "2 55 11\r",
+ "2 55 12\r",
+ "2 55 13\r",
+ "2 55 14\r",
+ "2 55 15\r",
+ "2 55 16\r",
+ "2 55 17\r",
+ "2 55 18\r",
+ "2 55 19\r",
+ "2 55 20\r",
+ "2 55 21\r",
+ "2 55 22\r",
+ "2 55 23\r",
+ "2 55 24\r",
+ "2 55 25\r",
+ "2 55 26\r",
+ "2 55 27\r",
+ "2 55 28\r",
+ "2 55 29\r",
+ "2 55 30\r",
+ "2 55 31\r",
+ "2 55 32\r",
+ "2 55 33\r",
+ "2 55 34\r",
+ "2 55 35\r",
+ "2 55 36\r",
+ "2 55 37\r",
+ "2 55 38\r",
+ "2 55 39\r",
+ "2 55 40\r",
+ "2 55 41\r",
+ "2 55 42\r",
+ "2 55 43\r",
+ "2 55 44\r",
+ "2 55 45\r",
+ "2 55 46\r",
+ "2 55 47\r",
+ "2 55 48\r",
+ "2 55 49\r",
+ "2 55 50\r",
+ "2 55 51\r",
+ "2 55 52\r",
+ "2 55 53\r",
+ "2 55 54\r",
+ "2 55 55\r",
+ "2 55 56\r",
+ "2 55 57\r",
+ "2 55 58\r",
+ "2 56 1\r",
+ "2 56 2\r",
+ "2 56 3\r",
+ "2 56 4\r",
+ "2 56 5\r",
+ "2 56 6\r",
+ "2 56 7\r",
+ "2 56 8\r",
+ "2 56 9\r",
+ "2 56 10\r",
+ "2 56 11\r",
+ "2 56 12\r",
+ "2 56 13\r",
+ "2 56 14\r",
+ "2 56 15\r",
+ "2 56 16\r",
+ "2 56 17\r",
+ "2 56 18\r",
+ "2 56 19\r",
+ "2 56 20\r",
+ "2 56 21\r",
+ "2 56 22\r",
+ "2 56 23\r",
+ "2 56 24\r",
+ "2 56 25\r",
+ "2 56 26\r",
+ "2 56 27\r",
+ "2 56 28\r",
+ "2 56 29\r",
+ "2 56 30\r",
+ "2 56 31\r",
+ "2 56 32\r",
+ "2 56 33\r",
+ "2 56 34\r",
+ "2 56 35\r",
+ "2 56 36\r",
+ "2 56 37\r",
+ "2 56 38\r",
+ "2 56 39\r",
+ "2 56 40\r",
+ "2 56 41\r",
+ "2 56 42\r",
+ "2 56 43\r",
+ "2 56 44\r",
+ "2 56 45\r",
+ "2 56 46\r",
+ "2 56 47\r",
+ "2 56 48\r",
+ "2 56 49\r",
+ "2 56 50\r",
+ "2 56 51\r",
+ "2 56 52\r",
+ "2 56 53\r",
+ "2 56 54\r",
+ "2 56 55\r",
+ "2 56 56\r",
+ "2 56 57\r",
+ "2 56 58\r",
+ "2 57 1\r",
+ "2 57 2\r",
+ "2 57 3\r",
+ "2 57 4\r",
+ "2 57 5\r",
+ "2 57 6\r",
+ "2 57 7\r",
+ "2 57 8\r",
+ "2 57 9\r",
+ "2 57 10\r",
+ "2 57 11\r",
+ "2 57 12\r",
+ "2 57 13\r",
+ "2 57 14\r",
+ "2 57 15\r",
+ "2 57 16\r",
+ "2 57 17\r",
+ "2 57 18\r",
+ "2 57 19\r",
+ "2 57 20\r",
+ "2 57 21\r",
+ "2 57 22\r",
+ "2 57 23\r",
+ "2 57 24\r",
+ "2 57 25\r",
+ "2 57 26\r",
+ "2 57 27\r",
+ "2 57 28\r",
+ "2 57 29\r",
+ "2 57 30\r",
+ "2 57 31\r",
+ "2 57 32\r",
+ "2 57 33\r",
+ "2 57 34\r",
+ "2 57 35\r",
+ "2 57 36\r",
+ "2 57 37\r",
+ "2 57 38\r",
+ "2 57 39\r",
+ "2 57 40\r",
+ "2 57 41\r",
+ "2 57 42\r",
+ "2 57 43\r",
+ "2 57 44\r",
+ "2 57 45\r",
+ "2 57 46\r",
+ "2 57 47\r",
+ "2 57 48\r",
+ "2 57 49\r",
+ "2 57 50\r",
+ "2 57 51\r",
+ "2 57 52\r",
+ "2 57 53\r",
+ "2 57 54\r",
+ "2 57 55\r",
+ "2 57 56\r",
+ "2 57 57\r",
+ "2 57 58\r",
+ "2 58 1\r",
+ "2 58 2\r",
+ "2 58 3\r",
+ "2 58 4\r",
+ "2 58 5\r",
+ "2 58 6\r",
+ "2 58 7\r",
+ "2 58 8\r",
+ "2 58 9\r",
+ "2 58 10\r",
+ "2 58 11\r",
+ "2 58 12\r",
+ "2 58 13\r",
+ "2 58 14\r",
+ "2 58 15\r",
+ "2 58 16\r",
+ "2 58 17\r",
+ "2 58 18\r",
+ "2 58 19\r",
+ "2 58 20\r",
+ "2 58 21\r",
+ "2 58 22\r",
+ "2 58 23\r",
+ "2 58 24\r",
+ "2 58 25\r",
+ "2 58 26\r",
+ "2 58 27\r",
+ "2 58 28\r",
+ "2 58 29\r",
+ "2 58 30\r",
+ "2 58 31\r",
+ "2 58 32\r",
+ "2 58 33\r",
+ "2 58 34\r",
+ "2 58 35\r",
+ "2 58 36\r",
+ "2 58 37\r",
+ "2 58 38\r",
+ "2 58 39\r",
+ "2 58 40\r",
+ "2 58 41\r",
+ "2 58 42\r",
+ "2 58 43\r",
+ "2 58 44\r",
+ "2 58 45\r",
+ "2 58 46\r",
+ "2 58 47\r",
+ "2 58 48\r",
+ "2 58 49\r",
+ "2 58 50\r",
+ "2 58 51\r",
+ "2 58 52\r",
+ "2 58 53\r",
+ "2 58 54\r",
+ "2 58 55\r",
+ "2 58 56\r",
+ "2 58 57\r",
+ "2 58 58\r",
+ "3 1 1\r",
+ "3 1 2\r",
+ "3 1 3\r",
+ "3 1 4\r",
+ "3 1 5\r",
+ "3 1 6\r",
+ "3 1 7\r",
+ "3 1 8\r",
+ "3 1 9\r",
+ "3 1 10\r",
+ "3 1 11\r",
+ "3 1 12\r",
+ "3 1 13\r",
+ "3 1 14\r",
+ "3 1 15\r",
+ "3 1 16\r",
+ "3 1 17\r",
+ "3 1 18\r",
+ "3 1 19\r",
+ "3 1 20\r",
+ "3 1 21\r",
+ "3 1 22\r",
+ "3 1 23\r",
+ "3 1 24\r",
+ "3 1 25\r",
+ "3 1 26\r",
+ "3 1 27\r",
+ "3 1 28\r",
+ "3 1 29\r",
+ "3 1 30\r",
+ "3 1 31\r",
+ "3 1 32\r",
+ "3 1 33\r",
+ "3 1 34\r",
+ "3 1 35\r",
+ "3 1 36\r",
+ "3 1 37\r",
+ "3 1 38\r",
+ "3 1 39\r",
+ "3 1 40\r",
+ "3 1 41\r",
+ "3 1 42\r",
+ "3 1 43\r",
+ "3 1 44\r",
+ "3 1 45\r",
+ "3 1 46\r",
+ "3 1 47\r",
+ "3 1 48\r",
+ "3 1 49\r",
+ "3 1 50\r",
+ "3 1 51\r",
+ "3 1 52\r",
+ "3 1 53\r",
+ "3 1 54\r",
+ "3 1 55\r",
+ "3 1 56\r",
+ "3 1 57\r",
+ "3 1 58\r",
+ "3 2 1\r",
+ "3 2 2\r",
+ "3 2 3\r",
+ "3 2 4\r",
+ "3 2 5\r",
+ "3 2 6\r",
+ "3 2 7\r",
+ "3 2 8\r",
+ "3 2 9\r",
+ "3 2 10\r",
+ "3 2 11\r",
+ "3 2 12\r",
+ "3 2 13\r",
+ "3 2 14\r",
+ "3 2 15\r",
+ "3 2 16\r",
+ "3 2 17\r",
+ "3 2 18\r",
+ "3 2 19\r",
+ "3 2 20\r",
+ "3 2 21\r",
+ "3 2 22\r",
+ "3 2 23\r",
+ "3 2 24\r",
+ "3 2 25\r",
+ "3 2 26\r",
+ "3 2 27\r",
+ "3 2 28\r",
+ "3 2 29\r",
+ "3 2 30\r",
+ "3 2 31\r",
+ "3 2 32\r",
+ "3 2 33\r",
+ "3 2 34\r",
+ "3 2 35\r",
+ "3 2 36\r",
+ "3 2 37\r",
+ "3 2 38\r",
+ "3 2 39\r",
+ "3 2 40\r",
+ "3 2 41\r",
+ "3 2 42\r",
+ "3 2 43\r",
+ "3 2 44\r",
+ "3 2 45\r",
+ "3 2 46\r",
+ "3 2 47\r",
+ "3 2 48\r",
+ "3 2 49\r",
+ "3 2 50\r",
+ "3 2 51\r",
+ "3 2 52\r",
+ "3 2 53\r",
+ "3 2 54\r",
+ "3 2 55\r",
+ "3 2 56\r",
+ "3 2 57\r",
+ "3 2 58\r",
+ "3 3 1\r",
+ "3 3 2\r",
+ "3 3 3\r",
+ "3 3 4\r",
+ "3 3 5\r",
+ "3 3 6\r",
+ "3 3 7\r",
+ "3 3 8\r",
+ "3 3 9\r",
+ "3 3 10\r",
+ "3 3 11\r",
+ "3 3 12\r",
+ "3 3 13\r",
+ "3 3 14\r",
+ "3 3 15\r",
+ "3 3 16\r",
+ "3 3 17\r",
+ "3 3 18\r",
+ "3 3 19\r",
+ "3 3 20\r",
+ "3 3 21\r",
+ "3 3 22\r",
+ "3 3 23\r",
+ "3 3 24\r",
+ "3 3 25\r",
+ "3 3 26\r",
+ "3 3 27\r",
+ "3 3 28\r",
+ "3 3 29\r",
+ "3 3 30\r",
+ "3 3 31\r",
+ "3 3 32\r",
+ "3 3 33\r",
+ "3 3 34\r",
+ "3 3 35\r",
+ "3 3 36\r",
+ "3 3 37\r",
+ "3 3 38\r",
+ "3 3 39\r",
+ "3 3 40\r",
+ "3 3 41\r",
+ "3 3 42\r",
+ "3 3 43\r",
+ "3 3 44\r",
+ "3 3 45\r",
+ "3 3 46\r",
+ "3 3 47\r",
+ "3 3 48\r",
+ "3 3 49\r",
+ "3 3 50\r",
+ "3 3 51\r",
+ "3 3 52\r",
+ "3 3 53\r",
+ "3 3 54\r",
+ "3 3 55\r",
+ "3 3 56\r",
+ "3 3 57\r",
+ "3 3 58\r",
+ "3 4 1\r",
+ "3 4 2\r",
+ "3 4 3\r",
+ "3 4 4\r",
+ "3 4 5\r",
+ "3 4 6\r",
+ "3 4 7\r",
+ "3 4 8\r",
+ "3 4 9\r",
+ "3 4 10\r",
+ "3 4 11\r",
+ "3 4 12\r",
+ "3 4 13\r",
+ "3 4 14\r",
+ "3 4 15\r",
+ "3 4 16\r",
+ "3 4 17\r",
+ "3 4 18\r",
+ "3 4 19\r",
+ "3 4 20\r",
+ "3 4 21\r",
+ "3 4 22\r",
+ "3 4 23\r",
+ "3 4 24\r",
+ "3 4 25\r",
+ "3 4 26\r",
+ "3 4 27\r",
+ "3 4 28\r",
+ "3 4 29\r",
+ "3 4 30\r",
+ "3 4 31\r",
+ "3 4 32\r",
+ "3 4 33\r",
+ "3 4 34\r",
+ "3 4 35\r",
+ "3 4 36\r",
+ "3 4 37\r",
+ "3 4 38\r",
+ "3 4 39\r",
+ "3 4 40\r",
+ "3 4 41\r",
+ "3 4 42\r",
+ "3 4 43\r",
+ "3 4 44\r",
+ "3 4 45\r",
+ "3 4 46\r",
+ "3 4 47\r",
+ "3 4 48\r",
+ "3 4 49\r",
+ "3 4 50\r",
+ "3 4 51\r",
+ "3 4 52\r",
+ "3 4 53\r",
+ "3 4 54\r",
+ "3 4 55\r",
+ "3 4 56\r",
+ "3 4 57\r",
+ "3 4 58\r",
+ "3 5 1\r",
+ "3 5 2\r",
+ "3 5 3\r",
+ "3 5 4\r",
+ "3 5 5\r",
+ "3 5 6\r",
+ "3 5 7\r",
+ "3 5 8\r",
+ "3 5 9\r",
+ "3 5 10\r",
+ "3 5 11\r",
+ "3 5 12\r",
+ "3 5 13\r",
+ "3 5 14\r",
+ "3 5 15\r",
+ "3 5 16\r",
+ "3 5 17\r",
+ "3 5 18\r",
+ "3 5 19\r",
+ "3 5 20\r",
+ "3 5 21\r",
+ "3 5 22\r",
+ "3 5 23\r",
+ "3 5 24\r",
+ "3 5 25\r",
+ "3 5 26\r",
+ "3 5 27\r",
+ "3 5 28\r",
+ "3 5 29\r",
+ "3 5 30\r",
+ "3 5 31\r",
+ "3 5 32\r",
+ "3 5 33\r",
+ "3 5 34\r",
+ "3 5 35\r",
+ "3 5 36\r",
+ "3 5 37\r",
+ "3 5 38\r",
+ "3 5 39\r",
+ "3 5 40\r",
+ "3 5 41\r",
+ "3 5 42\r",
+ "3 5 43\r",
+ "3 5 44\r",
+ "3 5 45\r",
+ "3 5 46\r",
+ "3 5 47\r",
+ "3 5 48\r",
+ "3 5 49\r",
+ "3 5 50\r",
+ "3 5 51\r",
+ "3 5 52\r",
+ "3 5 53\r",
+ "3 5 54\r",
+ "3 5 55\r",
+ "3 5 56\r",
+ "3 5 57\r",
+ "3 5 58\r",
+ "3 6 1\r",
+ "3 6 2\r",
+ "3 6 3\r",
+ "3 6 4\r",
+ "3 6 5\r",
+ "3 6 6\r",
+ "3 6 7\r",
+ "3 6 8\r",
+ "3 6 9\r",
+ "3 6 10\r",
+ "3 6 11\r",
+ "3 6 12\r",
+ "3 6 13\r",
+ "3 6 14\r",
+ "3 6 15\r",
+ "3 6 16\r",
+ "3 6 17\r",
+ "3 6 18\r",
+ "3 6 19\r",
+ "3 6 20\r",
+ "3 6 21\r",
+ "3 6 22\r",
+ "3 6 23\r",
+ "3 6 24\r",
+ "3 6 25\r",
+ "3 6 26\r",
+ "3 6 27\r",
+ "3 6 28\r",
+ "3 6 29\r",
+ "3 6 30\r",
+ "3 6 31\r",
+ "3 6 32\r",
+ "3 6 33\r",
+ "3 6 34\r",
+ "3 6 35\r",
+ "3 6 36\r",
+ "3 6 37\r",
+ "3 6 38\r",
+ "3 6 39\r",
+ "3 6 40\r",
+ "3 6 41\r",
+ "3 6 42\r",
+ "3 6 43\r",
+ "3 6 44\r",
+ "3 6 45\r",
+ "3 6 46\r",
+ "3 6 47\r",
+ "3 6 48\r",
+ "3 6 49\r",
+ "3 6 50\r",
+ "3 6 51\r",
+ "3 6 52\r",
+ "3 6 53\r",
+ "3 6 54\r",
+ "3 6 55\r",
+ "3 6 56\r",
+ "3 6 57\r",
+ "3 6 58\r",
+ "3 7 1\r",
+ "3 7 2\r",
+ "3 7 3\r",
+ "3 7 4\r",
+ "3 7 5\r",
+ "3 7 6"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "3 7 7\r",
+ "3 7 8\r",
+ "3 7 9\r",
+ "3 7 10\r",
+ "3 7 11\r",
+ "3 7 12\r",
+ "3 7 13\r",
+ "3 7 14\r",
+ "3 7 15\r",
+ "3 7 16\r",
+ "3 7 17\r",
+ "3 7 18\r",
+ "3 7 19\r",
+ "3 7 20\r",
+ "3 7 21\r",
+ "3 7 22\r",
+ "3 7 23\r",
+ "3 7 24\r",
+ "3 7 25\r",
+ "3 7 26\r",
+ "3 7 27\r",
+ "3 7 28\r",
+ "3 7 29\r",
+ "3 7 30\r",
+ "3 7 31\r",
+ "3 7 32\r",
+ "3 7 33\r",
+ "3 7 34\r",
+ "3 7 35\r",
+ "3 7 36\r",
+ "3 7 37\r",
+ "3 7 38\r",
+ "3 7 39\r",
+ "3 7 40\r",
+ "3 7 41\r",
+ "3 7 42\r",
+ "3 7 43\r",
+ "3 7 44\r",
+ "3 7 45\r",
+ "3 7 46\r",
+ "3 7 47\r",
+ "3 7 48\r",
+ "3 7 49\r",
+ "3 7 50\r",
+ "3 7 51\r",
+ "3 7 52\r",
+ "3 7 53\r",
+ "3 7 54\r",
+ "3 7 55\r",
+ "3 7 56\r",
+ "3 7 57\r",
+ "3 7 58\r",
+ "3 8 1\r",
+ "3 8 2\r",
+ "3 8 3\r",
+ "3 8 4\r",
+ "3 8 5\r",
+ "3 8 6\r",
+ "3 8 7\r",
+ "3 8 8\r",
+ "3 8 9\r",
+ "3 8 10\r",
+ "3 8 11\r",
+ "3 8 12\r",
+ "3 8 13\r",
+ "3 8 14\r",
+ "3 8 15\r",
+ "3 8 16\r",
+ "3 8 17\r",
+ "3 8 18\r",
+ "3 8 19\r",
+ "3 8 20\r",
+ "3 8 21\r",
+ "3 8 22\r",
+ "3 8 23\r",
+ "3 8 24\r",
+ "3 8 25\r",
+ "3 8 26\r",
+ "3 8 27\r",
+ "3 8 28\r",
+ "3 8 29\r",
+ "3 8 30\r",
+ "3 8 31\r",
+ "3 8 32\r",
+ "3 8 33\r",
+ "3 8 34\r",
+ "3 8 35\r",
+ "3 8 36\r",
+ "3 8 37\r",
+ "3 8 38\r",
+ "3 8 39\r",
+ "3 8 40\r",
+ "3 8 41\r",
+ "3 8 42\r",
+ "3 8 43\r",
+ "3 8 44\r",
+ "3 8 45\r",
+ "3 8 46\r",
+ "3 8 47\r",
+ "3 8 48\r",
+ "3 8 49\r",
+ "3 8 50\r",
+ "3 8 51\r",
+ "3 8 52\r",
+ "3 8 53\r",
+ "3 8 54\r",
+ "3 8 55\r",
+ "3 8 56\r",
+ "3 8 57\r",
+ "3 8 58\r",
+ "3 9 1\r",
+ "3 9 2\r",
+ "3 9 3\r",
+ "3 9 4\r",
+ "3 9 5\r",
+ "3 9 6\r",
+ "3 9 7\r",
+ "3 9 8\r",
+ "3 9 9\r",
+ "3 9 10\r",
+ "3 9 11\r",
+ "3 9 12\r",
+ "3 9 13\r",
+ "3 9 14\r",
+ "3 9 15\r",
+ "3 9 16\r",
+ "3 9 17\r",
+ "3 9 18\r",
+ "3 9 19\r",
+ "3 9 20\r",
+ "3 9 21\r",
+ "3 9 22\r",
+ "3 9 23\r",
+ "3 9 24\r",
+ "3 9 25\r",
+ "3 9 26\r",
+ "3 9 27\r",
+ "3 9 28\r",
+ "3 9 29\r",
+ "3 9 30\r",
+ "3 9 31\r",
+ "3 9 32\r",
+ "3 9 33\r",
+ "3 9 34\r",
+ "3 9 35\r",
+ "3 9 36\r",
+ "3 9 37\r",
+ "3 9 38\r",
+ "3 9 39\r",
+ "3 9 40\r",
+ "3 9 41\r",
+ "3 9 42\r",
+ "3 9 43\r",
+ "3 9 44\r",
+ "3 9 45\r",
+ "3 9 46\r",
+ "3 9 47\r",
+ "3 9 48\r",
+ "3 9 49\r",
+ "3 9 50\r",
+ "3 9 51\r",
+ "3 9 52\r",
+ "3 9 53\r",
+ "3 9 54\r",
+ "3 9 55\r",
+ "3 9 56\r",
+ "3 9 57\r",
+ "3 9 58\r",
+ "3 10 1\r",
+ "3 10 2\r",
+ "3 10 3\r",
+ "3 10 4\r",
+ "3 10 5\r",
+ "3 10 6\r",
+ "3 10 7\r",
+ "3 10 8\r",
+ "3 10 9\r",
+ "3 10 10\r",
+ "3 10 11\r",
+ "3 10 12\r",
+ "3 10 13\r",
+ "3 10 14\r",
+ "3 10 15\r",
+ "3 10 16\r",
+ "3 10 17\r",
+ "3 10 18\r",
+ "3 10 19\r",
+ "3 10 20\r",
+ "3 10 21\r",
+ "3 10 22\r",
+ "3 10 23\r",
+ "3 10 24\r",
+ "3 10 25\r",
+ "3 10 26\r",
+ "3 10 27\r",
+ "3 10 28\r",
+ "3 10 29\r",
+ "3 10 30\r",
+ "3 10 31\r",
+ "3 10 32\r",
+ "3 10 33\r",
+ "3 10 34\r",
+ "3 10 35\r",
+ "3 10 36\r",
+ "3 10 37\r",
+ "3 10 38\r",
+ "3 10 39\r",
+ "3 10 40\r",
+ "3 10 41\r",
+ "3 10 42\r",
+ "3 10 43\r",
+ "3 10 44\r",
+ "3 10 45\r",
+ "3 10 46\r",
+ "3 10 47\r",
+ "3 10 48\r",
+ "3 10 49\r",
+ "3 10 50\r",
+ "3 10 51\r",
+ "3 10 52\r",
+ "3 10 53\r",
+ "3 10 54\r",
+ "3 10 55\r",
+ "3 10 56\r",
+ "3 10 57\r",
+ "3 10 58\r",
+ "3 11 1\r",
+ "3 11 2\r",
+ "3 11 3\r",
+ "3 11 4\r",
+ "3 11 5\r",
+ "3 11 6\r",
+ "3 11 7\r",
+ "3 11 8\r",
+ "3 11 9\r",
+ "3 11 10\r",
+ "3 11 11\r",
+ "3 11 12\r",
+ "3 11 13\r",
+ "3 11 14\r",
+ "3 11 15\r",
+ "3 11 16\r",
+ "3 11 17\r",
+ "3 11 18\r",
+ "3 11 19\r",
+ "3 11 20\r",
+ "3 11 21\r",
+ "3 11 22\r",
+ "3 11 23\r",
+ "3 11 24\r",
+ "3 11 25\r",
+ "3 11 26\r",
+ "3 11 27\r",
+ "3 11 28\r",
+ "3 11 29\r",
+ "3 11 30\r",
+ "3 11 31\r",
+ "3 11 32\r",
+ "3 11 33\r",
+ "3 11 34\r",
+ "3 11 35\r",
+ "3 11 36\r",
+ "3 11 37\r",
+ "3 11 38\r",
+ "3 11 39\r",
+ "3 11 40\r",
+ "3 11 41\r",
+ "3 11 42\r",
+ "3 11 43\r",
+ "3 11 44\r",
+ "3 11 45\r",
+ "3 11 46\r",
+ "3 11 47\r",
+ "3 11 48\r",
+ "3 11 49\r",
+ "3 11 50\r",
+ "3 11 51\r",
+ "3 11 52\r",
+ "3 11 53\r",
+ "3 11 54\r",
+ "3 11 55\r",
+ "3 11 56\r",
+ "3 11 57\r",
+ "3 11 58\r",
+ "3 12 1\r",
+ "3 12 2\r",
+ "3 12 3\r",
+ "3 12 4\r",
+ "3 12 5\r",
+ "3 12 6\r",
+ "3 12 7\r",
+ "3 12 8\r",
+ "3 12 9\r",
+ "3 12 10\r",
+ "3 12 11\r",
+ "3 12 12\r",
+ "3 12 13\r",
+ "3 12 14\r",
+ "3 12 15\r",
+ "3 12 16\r",
+ "3 12 17\r",
+ "3 12 18\r",
+ "3 12 19\r",
+ "3 12 20\r",
+ "3 12 21\r",
+ "3 12 22\r",
+ "3 12 23\r",
+ "3 12 24\r",
+ "3 12 25\r",
+ "3 12 26\r",
+ "3 12 27\r",
+ "3 12 28\r",
+ "3 12 29\r",
+ "3 12 30\r",
+ "3 12 31\r",
+ "3 12 32\r",
+ "3 12 33\r",
+ "3 12 34\r",
+ "3 12 35\r",
+ "3 12 36\r",
+ "3 12 37\r",
+ "3 12 38\r",
+ "3 12 39\r",
+ "3 12 40\r",
+ "3 12 41\r",
+ "3 12 42\r",
+ "3 12 43\r",
+ "3 12 44\r",
+ "3 12 45\r",
+ "3 12 46\r",
+ "3 12 47\r",
+ "3 12 48\r",
+ "3 12 49\r",
+ "3 12 50\r",
+ "3 12 51\r",
+ "3 12 52\r",
+ "3 12 53\r",
+ "3 12 54\r",
+ "3 12 55\r",
+ "3 12 56\r",
+ "3 12 57\r",
+ "3 12 58\r",
+ "3 13 1\r",
+ "3 13 2\r",
+ "3 13 3\r",
+ "3 13 4\r",
+ "3 13 5\r",
+ "3 13 6\r",
+ "3 13 7\r",
+ "3 13 8\r",
+ "3 13 9\r",
+ "3 13 10\r",
+ "3 13 11\r",
+ "3 13 12\r",
+ "3 13 13\r",
+ "3 13 14\r",
+ "3 13 15\r",
+ "3 13 16\r",
+ "3 13 17\r",
+ "3 13 18\r",
+ "3 13 19\r",
+ "3 13 20\r",
+ "3 13 21\r",
+ "3 13 22\r",
+ "3 13 23\r",
+ "3 13 24\r",
+ "3 13 25\r",
+ "3 13 26\r",
+ "3 13 27\r",
+ "3 13 28\r",
+ "3 13 29\r",
+ "3 13 30\r",
+ "3 13 31\r",
+ "3 13 32\r",
+ "3 13 33\r",
+ "3 13 34\r",
+ "3 13 35\r",
+ "3 13 36\r",
+ "3 13 37\r",
+ "3 13 38\r",
+ "3 13 39\r",
+ "3 13 40\r",
+ "3 13 41\r",
+ "3 13 42\r",
+ "3 13 43\r",
+ "3 13 44\r",
+ "3 13 45\r",
+ "3 13 46\r",
+ "3 13 47\r",
+ "3 13 48\r",
+ "3 13 49\r",
+ "3 13 50\r",
+ "3 13 51\r",
+ "3 13 52\r",
+ "3 13 53\r",
+ "3 13 54\r",
+ "3 13 55\r",
+ "3 13 56\r",
+ "3 13 57\r",
+ "3 13 58\r",
+ "3 14 1\r",
+ "3 14 2\r",
+ "3 14 3\r",
+ "3 14 4\r",
+ "3 14 5\r",
+ "3 14 6\r",
+ "3 14 7\r",
+ "3 14 8\r",
+ "3 14 9\r",
+ "3 14 10\r",
+ "3 14 11\r",
+ "3 14 12\r",
+ "3 14 13\r",
+ "3 14 14\r",
+ "3 14 15\r",
+ "3 14 16\r",
+ "3 14 17\r",
+ "3 14 18\r",
+ "3 14 19\r",
+ "3 14 20\r",
+ "3 14 21\r",
+ "3 14 22\r",
+ "3 14 23\r",
+ "3 14 24\r",
+ "3 14 25\r",
+ "3 14 26\r",
+ "3 14 27\r",
+ "3 14 28\r",
+ "3 14 29\r",
+ "3 14 30\r",
+ "3 14 31\r",
+ "3 14 32\r",
+ "3 14 33\r",
+ "3 14 34\r",
+ "3 14 35\r",
+ "3 14 36\r",
+ "3 14 37\r",
+ "3 14 38\r",
+ "3 14 39\r",
+ "3 14 40\r",
+ "3 14 41\r",
+ "3 14 42\r",
+ "3 14 43\r",
+ "3 14 44\r",
+ "3 14 45\r",
+ "3 14 46\r",
+ "3 14 47\r",
+ "3 14 48\r",
+ "3 14 49\r",
+ "3 14 50\r",
+ "3 14 51\r",
+ "3 14 52\r",
+ "3 14 53\r",
+ "3 14 54\r",
+ "3 14 55\r",
+ "3 14 56\r",
+ "3 14 57\r",
+ "3 14 58\r",
+ "3 15 1\r",
+ "3 15 2\r",
+ "3 15 3\r",
+ "3 15 4\r",
+ "3 15 5\r",
+ "3 15 6\r",
+ "3 15 7\r",
+ "3 15 8\r",
+ "3 15 9\r",
+ "3 15 10\r",
+ "3 15 11\r",
+ "3 15 12\r",
+ "3 15 13\r",
+ "3 15 14\r",
+ "3 15 15\r",
+ "3 15 16\r",
+ "3 15 17\r",
+ "3 15 18\r",
+ "3 15 19\r",
+ "3 15 20\r",
+ "3 15 21\r",
+ "3 15 22\r",
+ "3 15 23\r",
+ "3 15 24\r",
+ "3 15 25\r",
+ "3 15 26\r",
+ "3 15 27\r",
+ "3 15 28\r",
+ "3 15 29\r",
+ "3 15 30\r",
+ "3 15 31\r",
+ "3 15 32\r",
+ "3 15 33\r",
+ "3 15 34\r",
+ "3 15 35\r",
+ "3 15 36\r",
+ "3 15 37\r",
+ "3 15 38\r",
+ "3 15 39\r",
+ "3 15 40\r",
+ "3 15 41\r",
+ "3 15 42\r",
+ "3 15 43\r",
+ "3 15 44\r",
+ "3 15 45\r",
+ "3 15 46\r",
+ "3 15 47\r",
+ "3 15 48\r",
+ "3 15 49\r",
+ "3 15 50\r",
+ "3 15 51\r",
+ "3 15 52\r",
+ "3 15 53\r",
+ "3 15 54\r",
+ "3 15 55\r",
+ "3 15 56\r",
+ "3 15 57\r",
+ "3 15 58\r",
+ "3 16 1\r",
+ "3 16 2\r",
+ "3 16 3\r",
+ "3 16 4\r",
+ "3 16 5\r",
+ "3 16 6\r",
+ "3 16 7\r",
+ "3 16 8\r",
+ "3 16 9\r",
+ "3 16 10\r",
+ "3 16 11\r",
+ "3 16 12\r",
+ "3 16 13\r",
+ "3 16 14\r",
+ "3 16 15\r",
+ "3 16 16\r",
+ "3 16 17\r",
+ "3 16 18\r",
+ "3 16 19\r",
+ "3 16 20\r",
+ "3 16 21\r",
+ "3 16 22\r",
+ "3 16 23\r",
+ "3 16 24\r",
+ "3 16 25\r",
+ "3 16 26\r",
+ "3 16 27\r",
+ "3 16 28\r",
+ "3 16 29\r",
+ "3 16 30\r",
+ "3 16 31\r",
+ "3 16 32\r",
+ "3 16 33\r",
+ "3 16 34\r",
+ "3 16 35\r",
+ "3 16 36\r",
+ "3 16 37\r",
+ "3 16 38\r",
+ "3 16 39\r",
+ "3 16 40\r",
+ "3 16 41\r",
+ "3 16 42\r",
+ "3 16 43\r",
+ "3 16 44\r",
+ "3 16 45\r",
+ "3 16 46\r",
+ "3 16 47\r",
+ "3 16 48\r",
+ "3 16 49\r",
+ "3 16 50\r",
+ "3 16 51\r",
+ "3 16 52\r",
+ "3 16 53\r",
+ "3 16 54\r",
+ "3 16 55\r",
+ "3 16 56\r",
+ "3 16 57\r",
+ "3 16 58\r",
+ "3 17 1\r",
+ "3 17 2\r",
+ "3 17 3\r",
+ "3 17 4\r",
+ "3 17 5\r",
+ "3 17 6\r",
+ "3 17 7\r",
+ "3 17 8\r",
+ "3 17 9\r",
+ "3 17 10\r",
+ "3 17 11\r",
+ "3 17 12\r",
+ "3 17 13\r",
+ "3 17 14\r",
+ "3 17 15\r",
+ "3 17 16\r",
+ "3 17 17\r",
+ "3 17 18\r",
+ "3 17 19\r",
+ "3 17 20\r",
+ "3 17 21\r",
+ "3 17 22\r",
+ "3 17 23\r",
+ "3 17 24\r",
+ "3 17 25\r",
+ "3 17 26\r",
+ "3 17 27\r",
+ "3 17 28\r",
+ "3 17 29\r",
+ "3 17 30\r",
+ "3 17 31\r",
+ "3 17 32\r",
+ "3 17 33\r",
+ "3 17 34\r",
+ "3 17 35\r",
+ "3 17 36\r",
+ "3 17 37\r",
+ "3 17 38\r",
+ "3 17 39\r",
+ "3 17 40\r",
+ "3 17 41\r",
+ "3 17 42\r",
+ "3 17 43\r",
+ "3 17 44\r",
+ "3 17 45\r",
+ "3 17 46\r",
+ "3 17 47\r",
+ "3 17 48\r",
+ "3 17 49\r",
+ "3 17 50\r",
+ "3 17 51\r",
+ "3 17 52\r",
+ "3 17 53\r",
+ "3 17 54\r",
+ "3 17 55\r",
+ "3 17 56\r",
+ "3 17 57\r",
+ "3 17 58\r",
+ "3 18 1\r",
+ "3 18 2\r",
+ "3 18 3\r",
+ "3 18 4\r",
+ "3 18 5\r",
+ "3 18 6\r",
+ "3 18 7\r",
+ "3 18 8\r",
+ "3 18 9\r",
+ "3 18 10\r",
+ "3 18 11\r",
+ "3 18 12\r",
+ "3 18 13\r",
+ "3 18 14\r",
+ "3 18 15\r",
+ "3 18 16\r",
+ "3 18 17\r",
+ "3 18 18\r",
+ "3 18 19\r",
+ "3 18 20\r",
+ "3 18 21\r",
+ "3 18 22\r",
+ "3 18 23\r",
+ "3 18 24\r",
+ "3 18 25\r",
+ "3 18 26\r",
+ "3 18 27\r",
+ "3 18 28\r",
+ "3 18 29\r",
+ "3 18 30\r",
+ "3 18 31\r",
+ "3 18 32\r",
+ "3 18 33\r",
+ "3 18 34\r",
+ "3 18 35\r",
+ "3 18 36\r",
+ "3 18 37\r",
+ "3 18 38\r",
+ "3 18 39\r",
+ "3 18 40\r",
+ "3 18 41\r",
+ "3 18 42\r",
+ "3 18 43\r",
+ "3 18 44\r",
+ "3 18 45\r",
+ "3 18 46\r",
+ "3 18 47\r",
+ "3 18 48\r",
+ "3 18 49\r",
+ "3 18 50\r",
+ "3 18 51\r",
+ "3 18 52\r",
+ "3 18 53\r",
+ "3 18 54\r",
+ "3 18 55\r",
+ "3 18 56\r",
+ "3 18 57\r",
+ "3 18 58\r",
+ "3 19 1\r",
+ "3 19 2\r",
+ "3 19 3\r",
+ "3 19 4\r",
+ "3 19 5\r",
+ "3 19 6\r",
+ "3 19 7\r",
+ "3 19 8\r",
+ "3 19 9\r",
+ "3 19 10\r",
+ "3 19 11\r",
+ "3 19 12\r",
+ "3 19 13\r",
+ "3 19 14\r",
+ "3 19 15\r",
+ "3 19 16\r",
+ "3 19 17\r",
+ "3 19 18\r",
+ "3 19 19\r",
+ "3 19 20\r",
+ "3 19 21\r",
+ "3 19 22\r",
+ "3 19 23\r",
+ "3 19 24\r",
+ "3 19 25\r",
+ "3 19 26\r",
+ "3 19 27\r",
+ "3 19 28\r",
+ "3 19 29\r",
+ "3 19 30\r",
+ "3 19 31\r",
+ "3 19 32\r",
+ "3 19 33\r",
+ "3 19 34\r",
+ "3 19 35\r",
+ "3 19 36\r",
+ "3 19 37\r",
+ "3 19 38\r",
+ "3 19 39\r",
+ "3 19 40\r",
+ "3 19 41\r",
+ "3 19 42\r",
+ "3 19 43\r",
+ "3 19 44\r",
+ "3 19 45\r",
+ "3 19 46\r",
+ "3 19 47\r",
+ "3 19 48\r",
+ "3 19 49\r",
+ "3 19 50\r",
+ "3 19 51\r",
+ "3 19 52\r",
+ "3 19 53\r",
+ "3 19 54\r",
+ "3 19 55\r",
+ "3 19 56\r",
+ "3 19 57\r",
+ "3 19 58\r",
+ "3 20 1\r",
+ "3 20 2\r",
+ "3 20 3\r",
+ "3 20 4\r",
+ "3 20 5\r",
+ "3 20 6\r",
+ "3 20 7\r",
+ "3 20 8\r",
+ "3 20 9\r",
+ "3 20 10\r",
+ "3 20 11\r",
+ "3 20 12\r",
+ "3 20 13\r",
+ "3 20 14\r",
+ "3 20 15\r",
+ "3 20 16\r",
+ "3 20 17\r",
+ "3 20 18\r",
+ "3 20 19\r",
+ "3 20 20\r",
+ "3 20 21\r",
+ "3 20 22\r",
+ "3 20 23\r",
+ "3 20 24\r",
+ "3 20 25\r",
+ "3 20 26\r",
+ "3 20 27\r",
+ "3 20 28\r",
+ "3 20 29\r",
+ "3 20 30\r",
+ "3 20 31\r",
+ "3 20 32\r",
+ "3 20 33\r",
+ "3 20 34\r",
+ "3 20 35\r",
+ "3 20 36\r",
+ "3 20 37\r",
+ "3 20 38\r",
+ "3 20 39\r",
+ "3 20 40\r",
+ "3 20 41\r",
+ "3 20 42\r",
+ "3 20 43\r",
+ "3 20 44\r",
+ "3 20 45\r",
+ "3 20 46\r",
+ "3 20 47\r",
+ "3 20 48\r",
+ "3 20 49\r",
+ "3 20 50\r",
+ "3 20 51\r",
+ "3 20 52\r",
+ "3 20 53\r",
+ "3 20 54\r",
+ "3 20 55\r",
+ "3 20 56\r",
+ "3 20 57\r",
+ "3 20 58\r",
+ "3 21 1\r",
+ "3 21 2\r",
+ "3 21 3\r",
+ "3 21 4\r",
+ "3 21 5\r",
+ "3 21 6\r",
+ "3 21 7\r",
+ "3 21 8\r",
+ "3 21 9\r",
+ "3 21 10\r",
+ "3 21 11\r",
+ "3 21 12\r",
+ "3 21 13\r",
+ "3 21 14\r",
+ "3 21 15\r",
+ "3 21 16\r",
+ "3 21 17\r",
+ "3 21 18\r",
+ "3 21 19\r",
+ "3 21 20\r",
+ "3 21 21\r",
+ "3 21 22\r",
+ "3 21 23\r",
+ "3 21 24\r",
+ "3 21 25\r",
+ "3 21 26\r",
+ "3 21 27\r",
+ "3 21 28\r",
+ "3 21 29\r",
+ "3 21 30\r",
+ "3 21 31\r",
+ "3 21 32\r",
+ "3 21 33\r",
+ "3 21 34\r",
+ "3 21 35\r",
+ "3 21 36\r",
+ "3 21 37\r",
+ "3 21 38\r",
+ "3 21 39\r",
+ "3 21 40\r",
+ "3 21 41\r",
+ "3 21 42\r",
+ "3 21 43\r",
+ "3 21 44\r",
+ "3 21 45\r",
+ "3 21 46\r",
+ "3 21 47\r",
+ "3 21 48\r",
+ "3 21 49\r",
+ "3 21 50\r",
+ "3 21 51\r",
+ "3 21 52\r",
+ "3 21 53\r",
+ "3 21 54\r",
+ "3 21 55\r",
+ "3 21 56\r",
+ "3 21 57\r",
+ "3 21 58\r",
+ "3 22 1\r",
+ "3 22 2\r",
+ "3 22 3\r",
+ "3 22 4\r",
+ "3 22 5\r",
+ "3 22 6\r",
+ "3 22 7\r",
+ "3 22 8\r",
+ "3 22 9\r",
+ "3 22 10\r",
+ "3 22 11\r",
+ "3 22 12\r",
+ "3 22 13\r",
+ "3 22 14\r",
+ "3 22 15\r",
+ "3 22 16\r",
+ "3 22 17\r",
+ "3 22 18\r",
+ "3 22 19\r",
+ "3 22 20\r",
+ "3 22 21\r",
+ "3 22 22\r",
+ "3 22 23\r",
+ "3 22 24\r",
+ "3 22 25\r",
+ "3 22 26\r",
+ "3 22 27\r",
+ "3 22 28\r",
+ "3 22 29\r",
+ "3 22 30\r",
+ "3 22 31\r",
+ "3 22 32\r",
+ "3 22 33\r",
+ "3 22 34\r",
+ "3 22 35\r",
+ "3 22 36\r",
+ "3 22 37\r",
+ "3 22 38\r",
+ "3 22 39\r",
+ "3 22 40\r",
+ "3 22 41\r",
+ "3 22 42\r",
+ "3 22 43\r",
+ "3 22 44\r",
+ "3 22 45\r",
+ "3 22 46\r",
+ "3 22 47\r",
+ "3 22 48\r",
+ "3 22 49\r",
+ "3 22 50\r",
+ "3 22 51\r",
+ "3 22 52\r",
+ "3 22 53\r",
+ "3 22 54\r",
+ "3 22 55\r",
+ "3 22 56\r",
+ "3 22 57\r",
+ "3 22 58\r",
+ "3 23 1\r",
+ "3 23 2\r",
+ "3 23 3\r",
+ "3 23 4\r",
+ "3 23 5\r",
+ "3 23 6\r",
+ "3 23 7\r",
+ "3 23 8\r",
+ "3 23 9\r",
+ "3 23 10\r",
+ "3 23 11\r",
+ "3 23 12\r",
+ "3 23 13\r",
+ "3 23 14\r",
+ "3 23 15\r",
+ "3 23 16\r",
+ "3 23 17\r",
+ "3 23 18\r",
+ "3 23 19\r",
+ "3 23 20\r",
+ "3 23 21\r",
+ "3 23 22\r",
+ "3 23 23\r",
+ "3 23 24\r",
+ "3 23 25\r",
+ "3 23 26\r",
+ "3 23 27\r",
+ "3 23 28\r",
+ "3 23 29\r",
+ "3 23 30\r",
+ "3 23 31\r",
+ "3 23 32\r",
+ "3 23 33\r",
+ "3 23 34\r",
+ "3 23 35\r",
+ "3 23 36\r",
+ "3 23 37\r",
+ "3 23 38\r",
+ "3 23 39\r",
+ "3 23 40\r",
+ "3 23 41\r",
+ "3 23 42\r",
+ "3 23 43\r",
+ "3 23 44\r",
+ "3 23 45\r",
+ "3 23 46\r",
+ "3 23 47\r",
+ "3 23 48\r",
+ "3 23 49\r",
+ "3 23 50\r",
+ "3 23 51\r",
+ "3 23 52\r",
+ "3 23 53\r",
+ "3 23 54\r",
+ "3 23 55\r",
+ "3 23 56\r",
+ "3 23 57\r",
+ "3 23 58\r",
+ "3 24 1\r",
+ "3 24 2\r",
+ "3 24 3\r",
+ "3 24 4\r",
+ "3 24 5\r",
+ "3 24 6\r",
+ "3 24 7\r",
+ "3 24 8\r",
+ "3 24 9\r",
+ "3 24 10\r",
+ "3 24 11\r",
+ "3 24 12\r",
+ "3 24 13\r",
+ "3 24 14\r",
+ "3 24 15\r",
+ "3 24 16\r",
+ "3 24 17\r",
+ "3 24 18\r",
+ "3 24 19\r",
+ "3 24 20\r",
+ "3 24 21\r",
+ "3 24 22\r",
+ "3 24 23\r",
+ "3 24 24\r",
+ "3 24 25\r",
+ "3 24 26\r",
+ "3 24 27\r",
+ "3 24 28\r",
+ "3 24 29\r",
+ "3 24 30\r",
+ "3 24 31\r",
+ "3 24 32\r",
+ "3 24 33\r",
+ "3 24 34\r",
+ "3 24 35\r",
+ "3 24 36\r",
+ "3 24 37\r",
+ "3 24 38\r",
+ "3 24 39\r",
+ "3 24 40\r",
+ "3 24 41\r",
+ "3 24 42\r",
+ "3 24 43\r",
+ "3 24 44\r",
+ "3 24 45\r",
+ "3 24 46\r",
+ "3 24 47\r",
+ "3 24 48\r",
+ "3 24 49\r",
+ "3 24 50\r",
+ "3 24 51\r",
+ "3 24 52\r",
+ "3 24 53\r",
+ "3 24 54\r",
+ "3 24 55\r",
+ "3 24 56\r",
+ "3 24 57\r",
+ "3 24 58\r",
+ "3 25 1\r",
+ "3 25 2\r",
+ "3 25 3\r",
+ "3 25 4\r",
+ "3 25 5\r",
+ "3 25 6\r",
+ "3 25 7\r",
+ "3 25 8\r",
+ "3 25 9\r",
+ "3 25 10\r",
+ "3 25 11\r",
+ "3 25 12\r",
+ "3 25 13\r",
+ "3 25 14\r",
+ "3 25 15\r",
+ "3 25 16\r",
+ "3 25 17\r",
+ "3 25 18\r",
+ "3 25 19\r",
+ "3 25 20\r",
+ "3 25 21\r",
+ "3 25 22\r",
+ "3 25 23\r",
+ "3 25 24\r",
+ "3 25 25\r",
+ "3 25 26\r",
+ "3 25 27\r",
+ "3 25 28\r",
+ "3 25 29\r",
+ "3 25 30\r",
+ "3 25 31\r",
+ "3 25 32\r",
+ "3 25 33\r",
+ "3 25 34\r",
+ "3 25 35\r",
+ "3 25 36\r",
+ "3 25 37\r",
+ "3 25 38\r",
+ "3 25 39\r",
+ "3 25 40\r",
+ "3 25 41\r",
+ "3 25 42\r",
+ "3 25 43\r",
+ "3 25 44\r",
+ "3 25 45\r",
+ "3 25 46\r",
+ "3 25 47\r",
+ "3 25 48\r",
+ "3 25 49\r",
+ "3 25 50\r",
+ "3 25 51\r",
+ "3 25 52\r",
+ "3 25 53\r",
+ "3 25 54\r",
+ "3 25 55\r",
+ "3 25 56\r",
+ "3 25 57\r",
+ "3 25 58\r",
+ "3 26 1\r",
+ "3 26 2\r",
+ "3 26 3\r",
+ "3 26 4\r",
+ "3 26 5\r",
+ "3 26 6\r",
+ "3 26 7\r",
+ "3 26 8\r",
+ "3 26 9\r",
+ "3 26 10\r",
+ "3 26 11\r",
+ "3 26 12\r",
+ "3 26 13\r",
+ "3 26 14\r",
+ "3 26 15\r",
+ "3 26 16\r",
+ "3 26 17\r",
+ "3 26 18\r",
+ "3 26 19\r",
+ "3 26 20\r",
+ "3 26 21\r",
+ "3 26 22\r",
+ "3 26 23\r",
+ "3 26 24\r",
+ "3 26 25\r",
+ "3 26 26\r",
+ "3 26 27\r",
+ "3 26 28\r",
+ "3 26 29\r",
+ "3 26 30\r",
+ "3 26 31\r",
+ "3 26 32\r",
+ "3 26 33\r",
+ "3 26 34\r",
+ "3 26 35\r",
+ "3 26 36\r",
+ "3 26 37\r",
+ "3 26 38\r",
+ "3 26 39\r",
+ "3 26 40\r",
+ "3 26 41\r",
+ "3 26 42\r",
+ "3 26 43\r",
+ "3 26 44\r",
+ "3 26 45\r",
+ "3 26 46\r",
+ "3 26 47\r",
+ "3 26 48\r",
+ "3 26 49\r",
+ "3 26 50\r",
+ "3 26 51\r",
+ "3 26 52\r",
+ "3 26 53\r",
+ "3 26 54\r",
+ "3 26 55\r",
+ "3 26 56\r",
+ "3 26 57\r",
+ "3 26 58\r",
+ "3 27 1\r",
+ "3 27 2\r",
+ "3 27 3\r",
+ "3 27 4\r",
+ "3 27 5\r",
+ "3 27 6\r",
+ "3 27 7\r",
+ "3 27 8\r",
+ "3 27 9\r",
+ "3 27 10\r",
+ "3 27 11\r",
+ "3 27 12\r",
+ "3 27 13\r",
+ "3 27 14\r",
+ "3 27 15\r",
+ "3 27 16\r",
+ "3 27 17\r",
+ "3 27 18\r",
+ "3 27 19\r",
+ "3 27 20\r",
+ "3 27 21\r",
+ "3 27 22\r",
+ "3 27 23\r",
+ "3 27 24\r",
+ "3 27 25\r",
+ "3 27 26\r",
+ "3 27 27\r",
+ "3 27 28\r",
+ "3 27 29\r",
+ "3 27 30\r",
+ "3 27 31\r",
+ "3 27 32\r",
+ "3 27 33\r",
+ "3 27 34\r",
+ "3 27 35\r",
+ "3 27 36\r",
+ "3 27 37\r",
+ "3 27 38\r",
+ "3 27 39\r",
+ "3 27 40\r",
+ "3 27 41\r",
+ "3 27 42\r",
+ "3 27 43\r",
+ "3 27 44\r",
+ "3 27 45\r",
+ "3 27 46\r",
+ "3 27 47\r",
+ "3 27 48\r",
+ "3 27 49\r",
+ "3 27 50\r",
+ "3 27 51\r",
+ "3 27 52\r",
+ "3 27 53\r",
+ "3 27 54\r",
+ "3 27 55\r",
+ "3 27 56\r",
+ "3 27 57\r",
+ "3 27 58\r",
+ "3 28 1\r",
+ "3 28 2\r",
+ "3 28 3\r",
+ "3 28 4\r",
+ "3 28 5\r",
+ "3 28 6\r",
+ "3 28 7\r",
+ "3 28 8\r",
+ "3 28 9\r",
+ "3 28 10\r",
+ "3 28 11\r",
+ "3 28 12\r",
+ "3 28 13\r",
+ "3 28 14\r",
+ "3 28 15\r",
+ "3 28 16\r",
+ "3 28 17\r",
+ "3 28 18\r",
+ "3 28 19\r",
+ "3 28 20\r",
+ "3 28 21\r",
+ "3 28 22\r",
+ "3 28 23\r",
+ "3 28 24\r",
+ "3 28 25\r",
+ "3 28 26\r",
+ "3 28 27\r",
+ "3 28 28\r",
+ "3 28 29\r",
+ "3 28 30\r",
+ "3 28 31\r",
+ "3 28 32\r",
+ "3 28 33\r",
+ "3 28 34\r",
+ "3 28 35\r",
+ "3 28 36\r",
+ "3 28 37\r",
+ "3 28 38\r",
+ "3 28 39\r",
+ "3 28 40\r",
+ "3 28 41\r",
+ "3 28 42\r",
+ "3 28 43\r",
+ "3 28 44\r",
+ "3 28 45\r",
+ "3 28 46\r",
+ "3 28 47\r",
+ "3 28 48\r",
+ "3 28 49\r",
+ "3 28 50\r",
+ "3 28 51\r",
+ "3 28 52\r",
+ "3 28 53\r",
+ "3 28 54\r",
+ "3 28 55\r",
+ "3 28 56\r",
+ "3 28 57\r",
+ "3 28 58\r",
+ "3 29 1\r",
+ "3 29 2\r",
+ "3 29 3\r",
+ "3 29 4\r",
+ "3 29 5\r",
+ "3 29 6\r",
+ "3 29 7\r",
+ "3 29 8\r",
+ "3 29 9\r",
+ "3 29 10\r",
+ "3 29 11\r",
+ "3 29 12\r",
+ "3 29 13\r",
+ "3 29 14\r",
+ "3 29 15\r",
+ "3 29 16\r",
+ "3 29 17\r",
+ "3 29 18\r",
+ "3 29 19\r",
+ "3 29 20\r",
+ "3 29 21\r",
+ "3 29 22\r",
+ "3 29 23\r",
+ "3 29 24\r",
+ "3 29 25\r",
+ "3 29 26\r",
+ "3 29 27\r",
+ "3 29 28\r",
+ "3 29 29\r",
+ "3 29 30\r",
+ "3 29 31\r",
+ "3 29 32\r",
+ "3 29 33\r",
+ "3 29 34\r",
+ "3 29 35\r",
+ "3 29 36\r",
+ "3 29 37\r",
+ "3 29 38\r",
+ "3 29 39\r",
+ "3 29 40\r",
+ "3 29 41\r",
+ "3 29 42\r",
+ "3 29 43\r",
+ "3 29 44\r",
+ "3 29 45\r",
+ "3 29 46\r",
+ "3 29 47\r",
+ "3 29 48\r",
+ "3 29 49\r",
+ "3 29 50\r",
+ "3 29 51\r",
+ "3 29 52\r",
+ "3 29 53\r",
+ "3 29 54\r",
+ "3 29 55\r",
+ "3 29 56\r",
+ "3 29 57\r",
+ "3 29 58\r",
+ "3 30 1\r",
+ "3 30 2\r",
+ "3 30 3\r",
+ "3 30 4\r",
+ "3 30 5\r",
+ "3 30 6\r",
+ "3 30 7\r",
+ "3 30 8\r",
+ "3 30 9\r",
+ "3 30 10\r",
+ "3 30 11\r",
+ "3 30 12\r",
+ "3 30 13\r",
+ "3 30 14\r",
+ "3 30 15\r",
+ "3 30 16\r",
+ "3 30 17\r",
+ "3 30 18\r",
+ "3 30 19\r",
+ "3 30 20\r",
+ "3 30 21\r",
+ "3 30 22\r",
+ "3 30 23\r",
+ "3 30 24\r",
+ "3 30 25\r",
+ "3 30 26\r",
+ "3 30 27\r",
+ "3 30 28\r",
+ "3 30 29\r",
+ "3 30 30\r",
+ "3 30 31\r",
+ "3 30 32\r",
+ "3 30 33\r",
+ "3 30 34\r",
+ "3 30 35\r",
+ "3 30 36\r",
+ "3 30 37\r",
+ "3 30 38\r",
+ "3 30 39\r",
+ "3 30 40\r",
+ "3 30 41\r",
+ "3 30 42\r",
+ "3 30 43\r",
+ "3 30 44\r",
+ "3 30 45\r",
+ "3 30 46\r",
+ "3 30 47\r",
+ "3 30 48\r",
+ "3 30 49\r",
+ "3 30 50\r",
+ "3 30 51\r",
+ "3 30 52\r",
+ "3 30 53\r",
+ "3 30 54\r",
+ "3 30 55\r",
+ "3 30 56\r",
+ "3 30 57\r",
+ "3 30 58\r",
+ "3 31 1\r",
+ "3 31 2\r",
+ "3 31 3\r",
+ "3 31 4\r",
+ "3 31 5\r",
+ "3 31 6\r",
+ "3 31 7\r",
+ "3 31 8\r",
+ "3 31 9\r",
+ "3 31 10\r",
+ "3 31 11\r",
+ "3 31 12\r",
+ "3 31 13\r",
+ "3 31 14\r",
+ "3 31 15\r",
+ "3 31 16\r",
+ "3 31 17\r",
+ "3 31 18\r",
+ "3 31 19\r",
+ "3 31 20\r",
+ "3 31 21\r",
+ "3 31 22\r",
+ "3 31 23\r",
+ "3 31 24\r",
+ "3 31 25\r",
+ "3 31 26\r",
+ "3 31 27\r",
+ "3 31 28\r",
+ "3 31 29\r",
+ "3 31 30\r",
+ "3 31 31\r",
+ "3 31 32\r",
+ "3 31 33\r",
+ "3 31 34\r",
+ "3 31 35\r",
+ "3 31 36\r",
+ "3 31 37\r",
+ "3 31 38\r",
+ "3 31 39\r",
+ "3 31 40\r",
+ "3 31 41\r",
+ "3 31 42\r",
+ "3 31 43\r",
+ "3 31 44\r",
+ "3 31 45\r",
+ "3 31 46\r",
+ "3 31 47\r",
+ "3 31 48\r",
+ "3 31 49\r",
+ "3 31 50\r",
+ "3 31 51\r",
+ "3 31 52\r",
+ "3 31 53\r",
+ "3 31 54\r",
+ "3 31 55\r",
+ "3 31 56\r",
+ "3 31 57\r",
+ "3 31 58\r",
+ "3 32 1\r",
+ "3 32 2\r",
+ "3 32 3\r",
+ "3 32 4\r",
+ "3 32 5\r",
+ "3 32 6\r",
+ "3 32 7\r",
+ "3 32 8\r",
+ "3 32 9\r",
+ "3 32 10\r",
+ "3 32 11\r",
+ "3 32 12\r",
+ "3 32 13\r",
+ "3 32 14\r",
+ "3 32 15\r",
+ "3 32 16\r",
+ "3 32 17\r",
+ "3 32 18\r",
+ "3 32 19\r",
+ "3 32 20\r",
+ "3 32 21\r",
+ "3 32 22\r",
+ "3 32 23\r",
+ "3 32 24\r",
+ "3 32 25\r",
+ "3 32 26\r",
+ "3 32 27\r",
+ "3 32 28\r",
+ "3 32 29\r",
+ "3 32 30\r",
+ "3 32 31\r",
+ "3 32 32\r",
+ "3 32 33\r",
+ "3 32 34\r",
+ "3 32 35\r",
+ "3 32 36\r",
+ "3 32 37\r",
+ "3 32 38\r",
+ "3 32 39\r",
+ "3 32 40\r",
+ "3 32 41\r",
+ "3 32 42\r",
+ "3 32 43\r",
+ "3 32 44\r",
+ "3 32 45\r",
+ "3 32 46\r",
+ "3 32 47\r",
+ "3 32 48\r",
+ "3 32 49\r",
+ "3 32 50\r",
+ "3 32 51\r",
+ "3 32 52\r",
+ "3 32 53\r",
+ "3 32 54\r",
+ "3 32 55\r",
+ "3 32 56\r",
+ "3 32 57\r",
+ "3 32 58\r",
+ "3 33 1\r",
+ "3 33 2\r",
+ "3 33 3\r",
+ "3 33 4\r",
+ "3 33 5\r",
+ "3 33 6\r",
+ "3 33 7\r",
+ "3 33 8\r",
+ "3 33 9\r",
+ "3 33 10\r",
+ "3 33 11\r",
+ "3 33 12\r",
+ "3 33 13\r",
+ "3 33 14\r",
+ "3 33 15\r",
+ "3 33 16\r",
+ "3 33 17\r",
+ "3 33 18\r",
+ "3 33 19\r",
+ "3 33 20\r",
+ "3 33 21\r",
+ "3 33 22\r",
+ "3 33 23\r",
+ "3 33 24\r",
+ "3 33 25\r",
+ "3 33 26\r",
+ "3 33 27\r",
+ "3 33 28\r",
+ "3 33 29\r",
+ "3 33 30\r",
+ "3 33 31\r",
+ "3 33 32\r",
+ "3 33 33\r",
+ "3 33 34\r",
+ "3 33 35\r",
+ "3 33 36\r",
+ "3 33 37\r",
+ "3 33 38\r",
+ "3 33 39\r",
+ "3 33 40\r",
+ "3 33 41\r",
+ "3 33 42\r",
+ "3 33 43\r",
+ "3 33 44\r",
+ "3 33 45\r",
+ "3 33 46\r",
+ "3 33 47\r",
+ "3 33 48\r",
+ "3 33 49\r",
+ "3 33 50\r",
+ "3 33 51\r",
+ "3 33 52\r",
+ "3 33 53\r",
+ "3 33 54\r",
+ "3 33 55\r",
+ "3 33 56\r",
+ "3 33 57\r",
+ "3 33 58\r",
+ "3 34 1\r",
+ "3 34 2\r",
+ "3 34 3\r",
+ "3 34 4\r",
+ "3 34 5\r",
+ "3 34 6\r",
+ "3 34 7\r",
+ "3 34 8\r",
+ "3 34 9\r",
+ "3 34 10\r",
+ "3 34 11\r",
+ "3 34 12\r",
+ "3 34 13\r",
+ "3 34 14\r",
+ "3 34 15\r",
+ "3 34 16\r",
+ "3 34 17\r",
+ "3 34 18\r",
+ "3 34 19\r",
+ "3 34 20\r",
+ "3 34 21\r",
+ "3 34 22\r",
+ "3 34 23\r",
+ "3 34 24\r",
+ "3 34 25\r",
+ "3 34 26\r",
+ "3 34 27\r",
+ "3 34 28\r",
+ "3 34 29\r",
+ "3 34 30\r",
+ "3 34 31\r",
+ "3 34 32\r",
+ "3 34 33\r",
+ "3 34 34\r",
+ "3 34 35\r",
+ "3 34 36\r",
+ "3 34 37\r",
+ "3 34 38\r",
+ "3 34 39\r",
+ "3 34 40\r",
+ "3 34 41\r",
+ "3 34 42\r",
+ "3 34 43\r",
+ "3 34 44\r",
+ "3 34 45\r",
+ "3 34 46\r",
+ "3 34 47\r",
+ "3 34 48\r",
+ "3 34 49\r",
+ "3 34 50\r",
+ "3 34 51\r",
+ "3 34 52\r",
+ "3 34 53\r",
+ "3 34 54\r",
+ "3 34 55\r",
+ "3 34 56\r",
+ "3 34 57\r",
+ "3 34 58\r",
+ "3 35 1\r",
+ "3 35 2\r",
+ "3 35 3\r",
+ "3 35 4\r",
+ "3 35 5\r",
+ "3 35 6\r",
+ "3 35 7\r",
+ "3 35 8\r",
+ "3 35 9\r",
+ "3 35 10\r",
+ "3 35 11\r",
+ "3 35 12\r",
+ "3 35 13\r",
+ "3 35 14\r",
+ "3 35 15\r",
+ "3 35 16\r",
+ "3 35 17\r",
+ "3 35 18\r",
+ "3 35 19\r",
+ "3 35 20\r",
+ "3 35 21\r",
+ "3 35 22\r",
+ "3 35 23\r",
+ "3 35 24\r",
+ "3 35 25\r",
+ "3 35 26\r",
+ "3 35 27\r",
+ "3 35 28\r",
+ "3 35 29\r",
+ "3 35 30\r",
+ "3 35 31\r",
+ "3 35 32\r",
+ "3 35 33\r",
+ "3 35 34\r",
+ "3 35 35\r",
+ "3 35 36\r",
+ "3 35 37\r",
+ "3 35 38\r",
+ "3 35 39\r",
+ "3 35 40\r",
+ "3 35 41\r",
+ "3 35 42\r",
+ "3 35 43\r",
+ "3 35 44\r",
+ "3 35 45\r",
+ "3 35 46\r",
+ "3 35 47\r",
+ "3 35 48\r",
+ "3 35 49\r",
+ "3 35 50\r",
+ "3 35 51\r",
+ "3 35 52\r",
+ "3 35 53\r",
+ "3 35 54\r",
+ "3 35 55\r",
+ "3 35 56\r",
+ "3 35 57\r",
+ "3 35 58\r",
+ "3 36 1\r",
+ "3 36 2\r",
+ "3 36 3\r",
+ "3 36 4\r",
+ "3 36 5\r",
+ "3 36 6\r",
+ "3 36 7\r",
+ "3 36 8\r",
+ "3 36 9\r",
+ "3 36 10\r",
+ "3 36 11\r",
+ "3 36 12\r",
+ "3 36 13\r",
+ "3 36 14\r",
+ "3 36 15\r",
+ "3 36 16\r",
+ "3 36 17\r",
+ "3 36 18\r",
+ "3 36 19\r",
+ "3 36 20\r",
+ "3 36 21\r",
+ "3 36 22\r",
+ "3 36 23\r",
+ "3 36 24\r",
+ "3 36 25\r",
+ "3 36 26\r",
+ "3 36 27\r",
+ "3 36 28\r",
+ "3 36 29\r",
+ "3 36 30\r",
+ "3 36 31\r",
+ "3 36 32\r",
+ "3 36 33\r",
+ "3 36 34\r",
+ "3 36 35\r",
+ "3 36 36\r",
+ "3 36 37\r",
+ "3 36 38\r",
+ "3 36 39\r",
+ "3 36 40\r",
+ "3 36 41\r",
+ "3 36 42\r",
+ "3 36 43\r",
+ "3 36 44\r",
+ "3 36 45\r",
+ "3 36 46\r",
+ "3 36 47\r",
+ "3 36 48\r",
+ "3 36 49\r",
+ "3 36 50\r",
+ "3 36 51\r",
+ "3 36 52\r",
+ "3 36 53\r",
+ "3 36 54\r",
+ "3 36 55\r",
+ "3 36 56\r",
+ "3 36 57\r",
+ "3 36 58\r",
+ "3 37 1\r",
+ "3 37 2\r",
+ "3 37 3\r",
+ "3 37 4\r",
+ "3 37 5\r",
+ "3 37 6\r",
+ "3 37 7\r",
+ "3 37 8\r",
+ "3 37 9\r",
+ "3 37 10\r",
+ "3 37 11\r",
+ "3 37 12\r",
+ "3 37 13\r",
+ "3 37 14\r",
+ "3 37 15\r",
+ "3 37 16\r",
+ "3 37 17\r",
+ "3 37 18\r",
+ "3 37 19\r",
+ "3 37 20\r",
+ "3 37 21\r",
+ "3 37 22\r",
+ "3 37 23\r",
+ "3 37 24\r",
+ "3 37 25\r",
+ "3 37 26\r",
+ "3 37 27\r",
+ "3 37 28\r",
+ "3 37 29\r",
+ "3 37 30\r",
+ "3 37 31\r",
+ "3 37 32\r",
+ "3 37 33\r",
+ "3 37 34\r",
+ "3 37 35\r",
+ "3 37 36\r",
+ "3 37 37\r",
+ "3 37 38\r",
+ "3 37 39\r",
+ "3 37 40\r",
+ "3 37 41\r",
+ "3 37 42\r",
+ "3 37 43\r",
+ "3 37 44\r",
+ "3 37 45\r",
+ "3 37 46\r",
+ "3 37 47\r",
+ "3 37 48\r",
+ "3 37 49\r",
+ "3 37 50\r",
+ "3 37 51\r",
+ "3 37 52\r",
+ "3 37 53\r",
+ "3 37 54\r",
+ "3 37 55\r",
+ "3 37 56\r",
+ "3 37 57\r",
+ "3 37 58\r",
+ "3 38 1\r",
+ "3 38 2\r",
+ "3 38 3\r",
+ "3 38 4\r",
+ "3 38 5\r",
+ "3 38 6\r",
+ "3 38 7\r",
+ "3 38 8\r",
+ "3 38 9\r",
+ "3 38 10\r",
+ "3 38 11\r",
+ "3 38 12\r",
+ "3 38 13\r",
+ "3 38 14\r",
+ "3 38 15\r",
+ "3 38 16\r",
+ "3 38 17\r",
+ "3 38 18\r",
+ "3 38 19\r",
+ "3 38 20\r",
+ "3 38 21\r",
+ "3 38 22\r",
+ "3 38 23\r",
+ "3 38 24\r",
+ "3 38 25\r",
+ "3 38 26\r",
+ "3 38 27\r",
+ "3 38 28\r",
+ "3 38 29\r",
+ "3 38 30\r",
+ "3 38 31\r",
+ "3 38 32\r",
+ "3 38 33\r",
+ "3 38 34\r",
+ "3 38 35\r",
+ "3 38 36\r",
+ "3 38 37\r",
+ "3 38 38\r",
+ "3 38 39\r",
+ "3 38 40\r",
+ "3 38 41\r",
+ "3 38 42\r",
+ "3 38 43\r",
+ "3 38 44\r",
+ "3 38 45\r",
+ "3 38 46\r",
+ "3 38 47\r",
+ "3 38 48\r",
+ "3 38 49\r",
+ "3 38 50\r",
+ "3 38 51\r",
+ "3 38 52\r",
+ "3 38 53\r",
+ "3 38 54\r",
+ "3 38 55\r",
+ "3 38 56\r",
+ "3 38 57\r",
+ "3 38 58\r",
+ "3 39 1\r",
+ "3 39 2\r",
+ "3 39 3\r",
+ "3 39 4\r",
+ "3 39 5\r",
+ "3 39 6\r",
+ "3 39 7\r",
+ "3 39 8\r",
+ "3 39 9\r",
+ "3 39 10\r",
+ "3 39 11\r",
+ "3 39 12\r",
+ "3 39 13\r",
+ "3 39 14\r",
+ "3 39 15\r",
+ "3 39 16\r",
+ "3 39 17\r",
+ "3 39 18\r",
+ "3 39 19\r",
+ "3 39 20\r",
+ "3 39 21\r",
+ "3 39 22\r",
+ "3 39 23\r",
+ "3 39 24\r",
+ "3 39 25\r",
+ "3 39 26\r",
+ "3 39 27\r",
+ "3 39 28\r",
+ "3 39 29\r",
+ "3 39 30\r",
+ "3 39 31\r",
+ "3 39 32\r",
+ "3 39 33\r",
+ "3 39 34\r",
+ "3 39 35\r",
+ "3 39 36\r",
+ "3 39 37\r",
+ "3 39 38\r",
+ "3 39 39\r",
+ "3 39 40\r",
+ "3 39 41\r",
+ "3 39 42\r",
+ "3 39 43\r",
+ "3 39 44\r",
+ "3 39 45\r",
+ "3 39 46\r",
+ "3 39 47\r",
+ "3 39 48\r",
+ "3 39 49\r",
+ "3 39 50\r",
+ "3 39 51\r",
+ "3 39 52\r",
+ "3 39 53\r",
+ "3 39 54\r",
+ "3 39 55\r",
+ "3 39 56\r",
+ "3 39 57\r",
+ "3 39 58\r",
+ "3 40 1\r",
+ "3 40 2\r",
+ "3 40 3\r",
+ "3 40 4\r",
+ "3 40 5\r",
+ "3 40 6\r",
+ "3 40 7\r",
+ "3 40 8\r",
+ "3 40 9\r",
+ "3 40 10\r",
+ "3 40 11\r",
+ "3 40 12\r",
+ "3 40 13\r",
+ "3 40 14\r",
+ "3 40 15\r",
+ "3 40 16\r",
+ "3 40 17\r",
+ "3 40 18\r",
+ "3 40 19\r",
+ "3 40 20\r",
+ "3 40 21\r",
+ "3 40 22\r",
+ "3 40 23\r",
+ "3 40 24\r",
+ "3 40 25\r",
+ "3 40 26\r",
+ "3 40 27\r",
+ "3 40 28\r",
+ "3 40 29\r",
+ "3 40 30\r",
+ "3 40 31\r",
+ "3 40 32\r",
+ "3 40 33\r",
+ "3 40 34\r",
+ "3 40 35\r",
+ "3 40 36\r",
+ "3 40 37\r",
+ "3 40 38\r",
+ "3 40 39\r",
+ "3 40 40\r",
+ "3 40 41\r",
+ "3 40 42\r",
+ "3 40 43\r",
+ "3 40 44\r",
+ "3 40 45\r",
+ "3 40 46\r",
+ "3 40 47\r",
+ "3 40 48\r",
+ "3 40 49\r",
+ "3 40 50\r",
+ "3 40 51\r",
+ "3 40 52\r",
+ "3 40 53\r",
+ "3 40 54\r",
+ "3 40 55\r",
+ "3 40 56\r",
+ "3 40 57\r",
+ "3 40 58\r",
+ "3 41 1\r",
+ "3 41 2\r",
+ "3 41 3\r",
+ "3 41 4\r",
+ "3 41 5\r",
+ "3 41 6\r",
+ "3 41 7\r",
+ "3 41 8\r",
+ "3 41 9\r",
+ "3 41 10\r",
+ "3 41 11\r",
+ "3 41 12\r",
+ "3 41 13\r",
+ "3 41 14\r",
+ "3 41 15\r",
+ "3 41 16\r",
+ "3 41 17\r",
+ "3 41 18\r",
+ "3 41 19\r",
+ "3 41 20\r",
+ "3 41 21\r",
+ "3 41 22\r",
+ "3 41 23\r",
+ "3 41 24\r",
+ "3 41 25\r",
+ "3 41 26\r",
+ "3 41 27\r",
+ "3 41 28\r",
+ "3 41 29\r",
+ "3 41 30\r",
+ "3 41 31\r",
+ "3 41 32\r",
+ "3 41 33\r",
+ "3 41 34\r",
+ "3 41 35\r",
+ "3 41 36\r",
+ "3 41 37\r",
+ "3 41 38\r",
+ "3 41 39\r",
+ "3 41 40\r",
+ "3 41 41\r",
+ "3 41 42\r",
+ "3 41 43\r",
+ "3 41 44\r",
+ "3 41 45\r",
+ "3 41 46\r",
+ "3 41 47\r",
+ "3 41 48\r",
+ "3 41 49\r",
+ "3 41 50\r",
+ "3 41 51\r",
+ "3 41 52\r",
+ "3 41 53\r",
+ "3 41 54\r",
+ "3 41 55\r",
+ "3 41 56\r",
+ "3 41 57\r",
+ "3 41 58\r",
+ "3 42 1\r",
+ "3 42 2\r",
+ "3 42 3\r",
+ "3 42 4\r",
+ "3 42 5\r",
+ "3 42 6\r",
+ "3 42 7\r",
+ "3 42 8\r",
+ "3 42 9\r",
+ "3 42 10\r",
+ "3 42 11\r",
+ "3 42 12\r",
+ "3 42 13\r",
+ "3 42 14\r",
+ "3 42 15\r",
+ "3 42 16\r",
+ "3 42 17\r",
+ "3 42 18\r",
+ "3 42 19\r",
+ "3 42 20\r",
+ "3 42 21\r",
+ "3 42 22\r",
+ "3 42 23\r",
+ "3 42 24\r",
+ "3 42 25\r",
+ "3 42 26\r",
+ "3 42 27\r",
+ "3 42 28\r",
+ "3 42 29\r",
+ "3 42 30\r",
+ "3 42 31\r",
+ "3 42 32\r",
+ "3 42 33\r",
+ "3 42 34\r",
+ "3 42 35\r",
+ "3 42 36\r",
+ "3 42 37\r",
+ "3 42 38\r",
+ "3 42 39\r",
+ "3 42 40\r",
+ "3 42 41\r",
+ "3 42 42\r",
+ "3 42 43\r",
+ "3 42 44\r",
+ "3 42 45\r",
+ "3 42 46\r",
+ "3 42 47\r",
+ "3 42 48\r",
+ "3 42 49\r",
+ "3 42 50\r",
+ "3 42 51\r",
+ "3 42 52\r",
+ "3 42 53\r",
+ "3 42 54\r",
+ "3 42 55\r",
+ "3 42 56\r",
+ "3 42 57\r",
+ "3 42 58\r",
+ "3 43 1\r",
+ "3 43 2\r",
+ "3 43 3\r",
+ "3 43 4\r",
+ "3 43 5\r",
+ "3 43 6\r",
+ "3 43 7\r",
+ "3 43 8\r",
+ "3 43 9\r",
+ "3 43 10\r",
+ "3 43 11\r",
+ "3 43 12\r",
+ "3 43 13\r",
+ "3 43 14\r",
+ "3 43 15\r",
+ "3 43 16\r",
+ "3 43 17\r",
+ "3 43 18\r",
+ "3 43 19\r",
+ "3 43 20\r",
+ "3 43 21\r",
+ "3 43 22\r",
+ "3 43 23\r",
+ "3 43 24\r",
+ "3 43 25\r",
+ "3 43 26\r",
+ "3 43 27\r",
+ "3 43 28\r",
+ "3 43 29\r",
+ "3 43 30\r",
+ "3 43 31\r",
+ "3 43 32\r",
+ "3 43 33\r",
+ "3 43 34\r",
+ "3 43 35\r",
+ "3 43 36\r",
+ "3 43 37\r",
+ "3 43 38\r",
+ "3 43 39\r",
+ "3 43 40\r",
+ "3 43 41\r",
+ "3 43 42\r",
+ "3 43 43\r",
+ "3 43 44\r",
+ "3 43 45\r",
+ "3 43 46\r",
+ "3 43 47\r",
+ "3 43 48\r",
+ "3 43 49\r",
+ "3 43 50\r",
+ "3 43 51\r",
+ "3 43 52\r",
+ "3 43 53\r",
+ "3 43 54\r",
+ "3 43 55\r",
+ "3 43 56\r",
+ "3 43 57\r",
+ "3 43 58\r",
+ "3 44 1\r",
+ "3 44 2\r",
+ "3 44 3\r",
+ "3 44 4\r",
+ "3 44 5\r",
+ "3 44 6\r",
+ "3 44 7\r",
+ "3 44 8\r",
+ "3 44 9\r",
+ "3 44 10\r",
+ "3 44 11\r",
+ "3 44 12\r",
+ "3 44 13\r",
+ "3 44 14\r",
+ "3 44 15\r",
+ "3 44 16\r",
+ "3 44 17\r",
+ "3 44 18\r",
+ "3 44 19\r",
+ "3 44 20\r",
+ "3 44 21\r",
+ "3 44 22\r",
+ "3 44 23\r",
+ "3 44 24\r",
+ "3 44 25\r",
+ "3 44 26\r",
+ "3 44 27\r",
+ "3 44 28\r",
+ "3 44 29\r",
+ "3 44 30\r",
+ "3 44 31\r",
+ "3 44 32\r",
+ "3 44 33\r",
+ "3 44 34\r",
+ "3 44 35\r",
+ "3 44 36\r",
+ "3 44 37\r",
+ "3 44 38\r",
+ "3 44 39\r",
+ "3 44 40\r",
+ "3 44 41\r",
+ "3 44 42\r",
+ "3 44 43\r",
+ "3 44 44\r",
+ "3 44 45\r",
+ "3 44 46\r",
+ "3 44 47\r",
+ "3 44 48\r",
+ "3 44 49\r",
+ "3 44 50\r",
+ "3 44 51\r",
+ "3 44 52\r",
+ "3 44 53\r",
+ "3 44 54\r",
+ "3 44 55\r",
+ "3 44 56\r",
+ "3 44 57\r",
+ "3 44 58\r",
+ "3 45 1\r",
+ "3 45 2\r",
+ "3 45 3\r",
+ "3 45 4\r",
+ "3 45 5\r",
+ "3 45 6\r",
+ "3 45 7\r",
+ "3 45 8\r",
+ "3 45 9\r",
+ "3 45 10\r",
+ "3 45 11\r",
+ "3 45 12\r",
+ "3 45 13\r",
+ "3 45 14\r",
+ "3 45 15\r",
+ "3 45 16\r",
+ "3 45 17\r",
+ "3 45 18\r",
+ "3 45 19\r",
+ "3 45 20\r",
+ "3 45 21\r",
+ "3 45 22\r",
+ "3 45 23\r",
+ "3 45 24\r",
+ "3 45 25\r",
+ "3 45 26\r",
+ "3 45 27\r",
+ "3 45 28\r",
+ "3 45 29\r",
+ "3 45 30\r",
+ "3 45 31\r",
+ "3 45 32\r",
+ "3 45 33\r",
+ "3 45 34\r",
+ "3 45 35\r",
+ "3 45 36\r",
+ "3 45 37\r",
+ "3 45 38\r",
+ "3 45 39\r",
+ "3 45 40\r",
+ "3 45 41\r",
+ "3 45 42\r",
+ "3 45 43\r",
+ "3 45 44\r",
+ "3 45 45\r",
+ "3 45 46\r",
+ "3 45 47\r",
+ "3 45 48\r",
+ "3 45 49\r",
+ "3 45 50\r",
+ "3 45 51\r",
+ "3 45 52\r",
+ "3 45 53\r",
+ "3 45 54\r",
+ "3 45 55\r",
+ "3 45 56\r",
+ "3 45 57\r",
+ "3 45 58\r",
+ "3 46 1\r",
+ "3 46 2\r",
+ "3 46 3\r",
+ "3 46 4\r",
+ "3 46 5\r",
+ "3 46 6\r",
+ "3 46 7\r",
+ "3 46 8\r",
+ "3 46 9\r",
+ "3 46 10\r",
+ "3 46 11\r",
+ "3 46 12\r",
+ "3 46 13\r",
+ "3 46 14\r",
+ "3 46 15\r",
+ "3 46 16\r",
+ "3 46 17\r",
+ "3 46 18\r",
+ "3 46 19\r",
+ "3 46 20\r",
+ "3 46 21\r",
+ "3 46 22\r",
+ "3 46 23\r",
+ "3 46 24\r",
+ "3 46 25\r",
+ "3 46 26\r",
+ "3 46 27\r",
+ "3 46 28\r",
+ "3 46 29\r",
+ "3 46 30\r",
+ "3 46 31\r",
+ "3 46 32\r",
+ "3 46 33\r",
+ "3 46 34\r",
+ "3 46 35\r",
+ "3 46 36\r",
+ "3 46 37\r",
+ "3 46 38\r",
+ "3 46 39\r",
+ "3 46 40\r",
+ "3 46 41\r",
+ "3 46 42\r",
+ "3 46 43\r",
+ "3 46 44\r",
+ "3 46 45\r",
+ "3 46 46\r",
+ "3 46 47\r",
+ "3 46 48\r",
+ "3 46 49\r",
+ "3 46 50\r",
+ "3 46 51\r",
+ "3 46 52\r",
+ "3 46 53\r",
+ "3 46 54\r",
+ "3 46 55\r",
+ "3 46 56\r",
+ "3 46 57\r",
+ "3 46 58\r",
+ "3 47 1\r",
+ "3 47 2\r",
+ "3 47 3\r",
+ "3 47 4\r",
+ "3 47 5\r",
+ "3 47 6\r",
+ "3 47 7\r",
+ "3 47 8\r",
+ "3 47 9\r",
+ "3 47 10\r",
+ "3 47 11\r",
+ "3 47 12\r",
+ "3 47 13\r",
+ "3 47 14\r",
+ "3 47 15\r",
+ "3 47 16\r",
+ "3 47 17\r",
+ "3 47 18\r",
+ "3 47 19\r",
+ "3 47 20\r",
+ "3 47 21\r",
+ "3 47 22\r",
+ "3 47 23\r",
+ "3 47 24\r",
+ "3 47 25\r",
+ "3 47 26\r",
+ "3 47 27\r",
+ "3 47 28\r",
+ "3 47 29\r",
+ "3 47 30\r",
+ "3 47 31\r",
+ "3 47 32\r",
+ "3 47 33\r",
+ "3 47 34\r",
+ "3 47 35\r",
+ "3 47 36\r",
+ "3 47 37\r",
+ "3 47 38\r",
+ "3 47 39\r",
+ "3 47 40\r",
+ "3 47 41\r",
+ "3 47 42\r",
+ "3 47 43\r",
+ "3 47 44\r",
+ "3 47 45\r",
+ "3 47 46\r",
+ "3 47 47\r",
+ "3 47 48\r",
+ "3 47 49\r",
+ "3 47 50\r",
+ "3 47 51\r",
+ "3 47 52\r",
+ "3 47 53\r",
+ "3 47 54\r",
+ "3 47 55\r",
+ "3 47 56\r",
+ "3 47 57\r",
+ "3 47 58\r",
+ "3 48 1\r",
+ "3 48 2\r",
+ "3 48 3\r",
+ "3 48 4\r",
+ "3 48 5\r",
+ "3 48 6\r",
+ "3 48 7\r",
+ "3 48 8\r",
+ "3 48 9\r",
+ "3 48 10\r",
+ "3 48 11\r",
+ "3 48 12\r",
+ "3 48 13\r",
+ "3 48 14\r",
+ "3 48 15\r",
+ "3 48 16\r",
+ "3 48 17\r",
+ "3 48 18\r",
+ "3 48 19\r",
+ "3 48 20\r",
+ "3 48 21\r",
+ "3 48 22\r",
+ "3 48 23\r",
+ "3 48 24\r",
+ "3 48 25\r",
+ "3 48 26\r",
+ "3 48 27\r",
+ "3 48 28\r",
+ "3 48 29\r",
+ "3 48 30\r",
+ "3 48 31\r",
+ "3 48 32\r",
+ "3 48 33\r",
+ "3 48 34\r",
+ "3 48 35\r",
+ "3 48 36\r",
+ "3 48 37\r",
+ "3 48 38\r",
+ "3 48 39\r",
+ "3 48 40\r",
+ "3 48 41\r",
+ "3 48 42\r",
+ "3 48 43\r",
+ "3 48 44\r",
+ "3 48 45\r",
+ "3 48 46\r",
+ "3 48 47\r",
+ "3 48 48\r",
+ "3 48 49\r",
+ "3 48 50\r",
+ "3 48 51\r",
+ "3 48 52\r",
+ "3 48 53\r",
+ "3 48 54\r",
+ "3 48 55\r",
+ "3 48 56\r",
+ "3 48 57\r",
+ "3 48 58\r",
+ "3 49 1\r",
+ "3 49 2\r",
+ "3 49 3\r",
+ "3 49 4\r",
+ "3 49 5\r",
+ "3 49 6\r",
+ "3 49 7\r",
+ "3 49 8\r",
+ "3 49 9\r",
+ "3 49 10\r",
+ "3 49 11\r",
+ "3 49 12\r",
+ "3 49 13\r",
+ "3 49 14\r",
+ "3 49 15\r",
+ "3 49 16\r",
+ "3 49 17\r",
+ "3 49 18\r",
+ "3 49 19\r",
+ "3 49 20\r",
+ "3 49 21\r",
+ "3 49 22\r",
+ "3 49 23\r",
+ "3 49 24\r",
+ "3 49 25\r",
+ "3 49 26\r",
+ "3 49 27\r",
+ "3 49 28\r",
+ "3 49 29\r",
+ "3 49 30\r",
+ "3 49 31\r",
+ "3 49 32\r",
+ "3 49 33\r",
+ "3 49 34\r",
+ "3 49 35\r",
+ "3 49 36\r",
+ "3 49 37\r",
+ "3 49 38\r",
+ "3 49 39\r",
+ "3 49 40\r",
+ "3 49 41\r",
+ "3 49 42\r",
+ "3 49 43\r",
+ "3 49 44\r",
+ "3 49 45\r",
+ "3 49 46\r",
+ "3 49 47\r",
+ "3 49 48\r",
+ "3 49 49\r",
+ "3 49 50\r",
+ "3 49 51\r",
+ "3 49 52\r",
+ "3 49 53\r",
+ "3 49 54\r",
+ "3 49 55\r",
+ "3 49 56\r",
+ "3 49 57\r",
+ "3 49 58\r",
+ "3 50 1\r",
+ "3 50 2\r",
+ "3 50 3\r",
+ "3 50 4\r",
+ "3 50 5\r",
+ "3 50 6\r",
+ "3 50 7\r",
+ "3 50 8\r",
+ "3 50 9\r",
+ "3 50 10\r",
+ "3 50 11\r",
+ "3 50 12\r",
+ "3 50 13\r",
+ "3 50 14\r",
+ "3 50 15\r",
+ "3 50 16\r",
+ "3 50 17\r",
+ "3 50 18\r",
+ "3 50 19\r",
+ "3 50 20\r",
+ "3 50 21\r",
+ "3 50 22\r",
+ "3 50 23\r",
+ "3 50 24\r",
+ "3 50 25\r",
+ "3 50 26\r",
+ "3 50 27\r",
+ "3 50 28\r",
+ "3 50 29\r",
+ "3 50 30\r",
+ "3 50 31\r",
+ "3 50 32\r",
+ "3 50 33\r",
+ "3 50 34\r",
+ "3 50 35\r",
+ "3 50 36\r",
+ "3 50 37\r",
+ "3 50 38\r",
+ "3 50 39\r",
+ "3 50 40\r",
+ "3 50 41\r",
+ "3 50 42\r",
+ "3 50 43"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "3 50 44\r",
+ "3 50 45\r",
+ "3 50 46\r",
+ "3 50 47\r",
+ "3 50 48\r",
+ "3 50 49\r",
+ "3 50 50\r",
+ "3 50 51\r",
+ "3 50 52\r",
+ "3 50 53\r",
+ "3 50 54\r",
+ "3 50 55\r",
+ "3 50 56\r",
+ "3 50 57\r",
+ "3 50 58\r",
+ "3 51 1\r",
+ "3 51 2\r",
+ "3 51 3\r",
+ "3 51 4\r",
+ "3 51 5\r",
+ "3 51 6\r",
+ "3 51 7\r",
+ "3 51 8\r",
+ "3 51 9\r",
+ "3 51 10\r",
+ "3 51 11\r",
+ "3 51 12\r",
+ "3 51 13\r",
+ "3 51 14\r",
+ "3 51 15\r",
+ "3 51 16\r",
+ "3 51 17\r",
+ "3 51 18\r",
+ "3 51 19\r",
+ "3 51 20\r",
+ "3 51 21\r",
+ "3 51 22\r",
+ "3 51 23\r",
+ "3 51 24\r",
+ "3 51 25\r",
+ "3 51 26\r",
+ "3 51 27\r",
+ "3 51 28\r",
+ "3 51 29\r",
+ "3 51 30\r",
+ "3 51 31\r",
+ "3 51 32\r",
+ "3 51 33\r",
+ "3 51 34\r",
+ "3 51 35\r",
+ "3 51 36\r",
+ "3 51 37\r",
+ "3 51 38\r",
+ "3 51 39\r",
+ "3 51 40\r",
+ "3 51 41\r",
+ "3 51 42\r",
+ "3 51 43\r",
+ "3 51 44\r",
+ "3 51 45\r",
+ "3 51 46\r",
+ "3 51 47\r",
+ "3 51 48\r",
+ "3 51 49\r",
+ "3 51 50\r",
+ "3 51 51\r",
+ "3 51 52\r",
+ "3 51 53\r",
+ "3 51 54\r",
+ "3 51 55\r",
+ "3 51 56\r",
+ "3 51 57\r",
+ "3 51 58\r",
+ "3 52 1\r",
+ "3 52 2\r",
+ "3 52 3\r",
+ "3 52 4\r",
+ "3 52 5\r",
+ "3 52 6\r",
+ "3 52 7\r",
+ "3 52 8\r",
+ "3 52 9\r",
+ "3 52 10\r",
+ "3 52 11\r",
+ "3 52 12\r",
+ "3 52 13\r",
+ "3 52 14\r",
+ "3 52 15\r",
+ "3 52 16\r",
+ "3 52 17\r",
+ "3 52 18\r",
+ "3 52 19\r",
+ "3 52 20\r",
+ "3 52 21\r",
+ "3 52 22\r",
+ "3 52 23\r",
+ "3 52 24\r",
+ "3 52 25\r",
+ "3 52 26\r",
+ "3 52 27\r",
+ "3 52 28\r",
+ "3 52 29\r",
+ "3 52 30\r",
+ "3 52 31\r",
+ "3 52 32\r",
+ "3 52 33\r",
+ "3 52 34\r",
+ "3 52 35\r",
+ "3 52 36\r",
+ "3 52 37\r",
+ "3 52 38\r",
+ "3 52 39\r",
+ "3 52 40\r",
+ "3 52 41\r",
+ "3 52 42\r",
+ "3 52 43\r",
+ "3 52 44\r",
+ "3 52 45\r",
+ "3 52 46\r",
+ "3 52 47\r",
+ "3 52 48\r",
+ "3 52 49\r",
+ "3 52 50\r",
+ "3 52 51\r",
+ "3 52 52\r",
+ "3 52 53\r",
+ "3 52 54\r",
+ "3 52 55\r",
+ "3 52 56\r",
+ "3 52 57\r",
+ "3 52 58\r",
+ "3 53 1\r",
+ "3 53 2\r",
+ "3 53 3\r",
+ "3 53 4\r",
+ "3 53 5\r",
+ "3 53 6\r",
+ "3 53 7\r",
+ "3 53 8\r",
+ "3 53 9\r",
+ "3 53 10\r",
+ "3 53 11\r",
+ "3 53 12\r",
+ "3 53 13\r",
+ "3 53 14\r",
+ "3 53 15\r",
+ "3 53 16\r",
+ "3 53 17\r",
+ "3 53 18\r",
+ "3 53 19\r",
+ "3 53 20\r",
+ "3 53 21\r",
+ "3 53 22\r",
+ "3 53 23\r",
+ "3 53 24\r",
+ "3 53 25\r",
+ "3 53 26\r",
+ "3 53 27\r",
+ "3 53 28\r",
+ "3 53 29\r",
+ "3 53 30\r",
+ "3 53 31\r",
+ "3 53 32\r",
+ "3 53 33\r",
+ "3 53 34\r",
+ "3 53 35\r",
+ "3 53 36\r",
+ "3 53 37\r",
+ "3 53 38\r",
+ "3 53 39\r",
+ "3 53 40\r",
+ "3 53 41\r",
+ "3 53 42\r",
+ "3 53 43\r",
+ "3 53 44\r",
+ "3 53 45\r",
+ "3 53 46\r",
+ "3 53 47\r",
+ "3 53 48\r",
+ "3 53 49\r",
+ "3 53 50\r",
+ "3 53 51\r",
+ "3 53 52\r",
+ "3 53 53\r",
+ "3 53 54\r",
+ "3 53 55\r",
+ "3 53 56\r",
+ "3 53 57\r",
+ "3 53 58\r",
+ "3 54 1\r",
+ "3 54 2\r",
+ "3 54 3\r",
+ "3 54 4\r",
+ "3 54 5\r",
+ "3 54 6\r",
+ "3 54 7\r",
+ "3 54 8\r",
+ "3 54 9\r",
+ "3 54 10\r",
+ "3 54 11\r",
+ "3 54 12\r",
+ "3 54 13\r",
+ "3 54 14\r",
+ "3 54 15\r",
+ "3 54 16\r",
+ "3 54 17\r",
+ "3 54 18\r",
+ "3 54 19\r",
+ "3 54 20\r",
+ "3 54 21\r",
+ "3 54 22\r",
+ "3 54 23\r",
+ "3 54 24\r",
+ "3 54 25\r",
+ "3 54 26\r",
+ "3 54 27\r",
+ "3 54 28\r",
+ "3 54 29\r",
+ "3 54 30\r",
+ "3 54 31\r",
+ "3 54 32\r",
+ "3 54 33\r",
+ "3 54 34\r",
+ "3 54 35\r",
+ "3 54 36\r",
+ "3 54 37\r",
+ "3 54 38\r",
+ "3 54 39\r",
+ "3 54 40\r",
+ "3 54 41\r",
+ "3 54 42\r",
+ "3 54 43\r",
+ "3 54 44\r",
+ "3 54 45\r",
+ "3 54 46\r",
+ "3 54 47\r",
+ "3 54 48\r",
+ "3 54 49\r",
+ "3 54 50\r",
+ "3 54 51\r",
+ "3 54 52\r",
+ "3 54 53\r",
+ "3 54 54\r",
+ "3 54 55\r",
+ "3 54 56\r",
+ "3 54 57\r",
+ "3 54 58\r",
+ "3 55 1\r",
+ "3 55 2\r",
+ "3 55 3\r",
+ "3 55 4\r",
+ "3 55 5\r",
+ "3 55 6\r",
+ "3 55 7\r",
+ "3 55 8\r",
+ "3 55 9\r",
+ "3 55 10\r",
+ "3 55 11\r",
+ "3 55 12\r",
+ "3 55 13\r",
+ "3 55 14\r",
+ "3 55 15\r",
+ "3 55 16\r",
+ "3 55 17\r",
+ "3 55 18\r",
+ "3 55 19\r",
+ "3 55 20\r",
+ "3 55 21\r",
+ "3 55 22\r",
+ "3 55 23\r",
+ "3 55 24\r",
+ "3 55 25\r",
+ "3 55 26\r",
+ "3 55 27\r",
+ "3 55 28\r",
+ "3 55 29\r",
+ "3 55 30\r",
+ "3 55 31\r",
+ "3 55 32\r",
+ "3 55 33\r",
+ "3 55 34\r",
+ "3 55 35\r",
+ "3 55 36\r",
+ "3 55 37\r",
+ "3 55 38\r",
+ "3 55 39\r",
+ "3 55 40\r",
+ "3 55 41\r",
+ "3 55 42\r",
+ "3 55 43\r",
+ "3 55 44\r",
+ "3 55 45\r",
+ "3 55 46\r",
+ "3 55 47\r",
+ "3 55 48\r",
+ "3 55 49\r",
+ "3 55 50\r",
+ "3 55 51\r",
+ "3 55 52\r",
+ "3 55 53\r",
+ "3 55 54\r",
+ "3 55 55\r",
+ "3 55 56\r",
+ "3 55 57\r",
+ "3 55 58\r",
+ "3 56 1\r",
+ "3 56 2\r",
+ "3 56 3\r",
+ "3 56 4\r",
+ "3 56 5\r",
+ "3 56 6\r",
+ "3 56 7\r",
+ "3 56 8\r",
+ "3 56 9\r",
+ "3 56 10\r",
+ "3 56 11\r",
+ "3 56 12\r",
+ "3 56 13\r",
+ "3 56 14\r",
+ "3 56 15\r",
+ "3 56 16\r",
+ "3 56 17\r",
+ "3 56 18\r",
+ "3 56 19\r",
+ "3 56 20\r",
+ "3 56 21\r",
+ "3 56 22\r",
+ "3 56 23\r",
+ "3 56 24\r",
+ "3 56 25\r",
+ "3 56 26\r",
+ "3 56 27\r",
+ "3 56 28\r",
+ "3 56 29\r",
+ "3 56 30\r",
+ "3 56 31\r",
+ "3 56 32\r",
+ "3 56 33\r",
+ "3 56 34\r",
+ "3 56 35\r",
+ "3 56 36\r",
+ "3 56 37\r",
+ "3 56 38\r",
+ "3 56 39\r",
+ "3 56 40\r",
+ "3 56 41\r",
+ "3 56 42\r",
+ "3 56 43\r",
+ "3 56 44\r",
+ "3 56 45\r",
+ "3 56 46\r",
+ "3 56 47\r",
+ "3 56 48\r",
+ "3 56 49\r",
+ "3 56 50\r",
+ "3 56 51\r",
+ "3 56 52\r",
+ "3 56 53\r",
+ "3 56 54\r",
+ "3 56 55\r",
+ "3 56 56\r",
+ "3 56 57\r",
+ "3 56 58\r",
+ "3 57 1\r",
+ "3 57 2\r",
+ "3 57 3\r",
+ "3 57 4\r",
+ "3 57 5\r",
+ "3 57 6\r",
+ "3 57 7\r",
+ "3 57 8\r",
+ "3 57 9\r",
+ "3 57 10\r",
+ "3 57 11\r",
+ "3 57 12\r",
+ "3 57 13\r",
+ "3 57 14\r",
+ "3 57 15\r",
+ "3 57 16\r",
+ "3 57 17\r",
+ "3 57 18\r",
+ "3 57 19\r",
+ "3 57 20\r",
+ "3 57 21\r",
+ "3 57 22\r",
+ "3 57 23\r",
+ "3 57 24\r",
+ "3 57 25\r",
+ "3 57 26\r",
+ "3 57 27\r",
+ "3 57 28\r",
+ "3 57 29\r",
+ "3 57 30\r",
+ "3 57 31\r",
+ "3 57 32\r",
+ "3 57 33\r",
+ "3 57 34\r",
+ "3 57 35\r",
+ "3 57 36\r",
+ "3 57 37\r",
+ "3 57 38\r",
+ "3 57 39\r",
+ "3 57 40\r",
+ "3 57 41\r",
+ "3 57 42\r",
+ "3 57 43\r",
+ "3 57 44\r",
+ "3 57 45\r",
+ "3 57 46\r",
+ "3 57 47\r",
+ "3 57 48\r",
+ "3 57 49\r",
+ "3 57 50\r",
+ "3 57 51\r",
+ "3 57 52\r",
+ "3 57 53\r",
+ "3 57 54\r",
+ "3 57 55\r",
+ "3 57 56\r",
+ "3 57 57\r",
+ "3 57 58\r",
+ "3 58 1\r",
+ "3 58 2\r",
+ "3 58 3\r",
+ "3 58 4\r",
+ "3 58 5\r",
+ "3 58 6\r",
+ "3 58 7\r",
+ "3 58 8\r",
+ "3 58 9\r",
+ "3 58 10\r",
+ "3 58 11\r",
+ "3 58 12\r",
+ "3 58 13\r",
+ "3 58 14\r",
+ "3 58 15\r",
+ "3 58 16\r",
+ "3 58 17\r",
+ "3 58 18\r",
+ "3 58 19\r",
+ "3 58 20\r",
+ "3 58 21\r",
+ "3 58 22\r",
+ "3 58 23\r",
+ "3 58 24\r",
+ "3 58 25\r",
+ "3 58 26\r",
+ "3 58 27\r",
+ "3 58 28\r",
+ "3 58 29\r",
+ "3 58 30\r",
+ "3 58 31\r",
+ "3 58 32\r",
+ "3 58 33\r",
+ "3 58 34\r",
+ "3 58 35\r",
+ "3 58 36\r",
+ "3 58 37\r",
+ "3 58 38\r",
+ "3 58 39\r",
+ "3 58 40\r",
+ "3 58 41\r",
+ "3 58 42\r",
+ "3 58 43\r",
+ "3 58 44\r",
+ "3 58 45\r",
+ "3 58 46\r",
+ "3 58 47\r",
+ "3 58 48\r",
+ "3 58 49\r",
+ "3 58 50\r",
+ "3 58 51\r",
+ "3 58 52\r",
+ "3 58 53\r",
+ "3 58 54\r",
+ "3 58 55\r",
+ "3 58 56\r",
+ "3 58 57\r",
+ "3 58 58\r",
+ "4 1 1\r",
+ "4 1 2\r",
+ "4 1 3\r",
+ "4 1 4\r",
+ "4 1 5\r",
+ "4 1 6\r",
+ "4 1 7\r",
+ "4 1 8\r",
+ "4 1 9\r",
+ "4 1 10\r",
+ "4 1 11\r",
+ "4 1 12\r",
+ "4 1 13\r",
+ "4 1 14\r",
+ "4 1 15\r",
+ "4 1 16\r",
+ "4 1 17\r",
+ "4 1 18\r",
+ "4 1 19\r",
+ "4 1 20\r",
+ "4 1 21\r",
+ "4 1 22\r",
+ "4 1 23\r",
+ "4 1 24\r",
+ "4 1 25\r",
+ "4 1 26\r",
+ "4 1 27\r",
+ "4 1 28\r",
+ "4 1 29\r",
+ "4 1 30\r",
+ "4 1 31\r",
+ "4 1 32\r",
+ "4 1 33\r",
+ "4 1 34\r",
+ "4 1 35\r",
+ "4 1 36\r",
+ "4 1 37\r",
+ "4 1 38\r",
+ "4 1 39\r",
+ "4 1 40\r",
+ "4 1 41\r",
+ "4 1 42\r",
+ "4 1 43\r",
+ "4 1 44\r",
+ "4 1 45\r",
+ "4 1 46\r",
+ "4 1 47\r",
+ "4 1 48\r",
+ "4 1 49\r",
+ "4 1 50\r",
+ "4 1 51\r",
+ "4 1 52\r",
+ "4 1 53\r",
+ "4 1 54\r",
+ "4 1 55\r",
+ "4 1 56\r",
+ "4 1 57\r",
+ "4 1 58\r",
+ "4 2 1\r",
+ "4 2 2\r",
+ "4 2 3\r",
+ "4 2 4\r",
+ "4 2 5\r",
+ "4 2 6\r",
+ "4 2 7\r",
+ "4 2 8\r",
+ "4 2 9\r",
+ "4 2 10\r",
+ "4 2 11\r",
+ "4 2 12\r",
+ "4 2 13\r",
+ "4 2 14\r",
+ "4 2 15\r",
+ "4 2 16\r",
+ "4 2 17\r",
+ "4 2 18\r",
+ "4 2 19\r",
+ "4 2 20\r",
+ "4 2 21\r",
+ "4 2 22\r",
+ "4 2 23\r",
+ "4 2 24\r",
+ "4 2 25\r",
+ "4 2 26\r",
+ "4 2 27\r",
+ "4 2 28\r",
+ "4 2 29\r",
+ "4 2 30\r",
+ "4 2 31\r",
+ "4 2 32\r",
+ "4 2 33\r",
+ "4 2 34\r",
+ "4 2 35\r",
+ "4 2 36\r",
+ "4 2 37\r",
+ "4 2 38\r",
+ "4 2 39\r",
+ "4 2 40\r",
+ "4 2 41\r",
+ "4 2 42\r",
+ "4 2 43\r",
+ "4 2 44\r",
+ "4 2 45\r",
+ "4 2 46\r",
+ "4 2 47\r",
+ "4 2 48\r",
+ "4 2 49\r",
+ "4 2 50\r",
+ "4 2 51\r",
+ "4 2 52\r",
+ "4 2 53\r",
+ "4 2 54\r",
+ "4 2 55\r",
+ "4 2 56\r",
+ "4 2 57\r",
+ "4 2 58\r",
+ "4 3 1\r",
+ "4 3 2\r",
+ "4 3 3\r",
+ "4 3 4\r",
+ "4 3 5\r",
+ "4 3 6\r",
+ "4 3 7\r",
+ "4 3 8\r",
+ "4 3 9\r",
+ "4 3 10\r",
+ "4 3 11\r",
+ "4 3 12\r",
+ "4 3 13\r",
+ "4 3 14\r",
+ "4 3 15\r",
+ "4 3 16\r",
+ "4 3 17\r",
+ "4 3 18\r",
+ "4 3 19\r",
+ "4 3 20\r",
+ "4 3 21\r",
+ "4 3 22\r",
+ "4 3 23\r",
+ "4 3 24\r",
+ "4 3 25\r",
+ "4 3 26\r",
+ "4 3 27\r",
+ "4 3 28\r",
+ "4 3 29\r",
+ "4 3 30\r",
+ "4 3 31\r",
+ "4 3 32\r",
+ "4 3 33\r",
+ "4 3 34\r",
+ "4 3 35\r",
+ "4 3 36\r",
+ "4 3 37\r",
+ "4 3 38\r",
+ "4 3 39\r",
+ "4 3 40\r",
+ "4 3 41\r",
+ "4 3 42\r",
+ "4 3 43\r",
+ "4 3 44\r",
+ "4 3 45\r",
+ "4 3 46\r",
+ "4 3 47\r",
+ "4 3 48\r",
+ "4 3 49\r",
+ "4 3 50\r",
+ "4 3 51\r",
+ "4 3 52\r",
+ "4 3 53\r",
+ "4 3 54\r",
+ "4 3 55\r",
+ "4 3 56\r",
+ "4 3 57\r",
+ "4 3 58\r",
+ "4 4 1\r",
+ "4 4 2\r",
+ "4 4 3\r",
+ "4 4 4\r",
+ "4 4 5\r",
+ "4 4 6\r",
+ "4 4 7\r",
+ "4 4 8\r",
+ "4 4 9\r",
+ "4 4 10\r",
+ "4 4 11\r",
+ "4 4 12\r",
+ "4 4 13\r",
+ "4 4 14\r",
+ "4 4 15\r",
+ "4 4 16\r",
+ "4 4 17\r",
+ "4 4 18\r",
+ "4 4 19\r",
+ "4 4 20\r",
+ "4 4 21\r",
+ "4 4 22\r",
+ "4 4 23\r",
+ "4 4 24\r",
+ "4 4 25\r",
+ "4 4 26\r",
+ "4 4 27\r",
+ "4 4 28\r",
+ "4 4 29\r",
+ "4 4 30\r",
+ "4 4 31\r",
+ "4 4 32\r",
+ "4 4 33\r",
+ "4 4 34\r",
+ "4 4 35\r",
+ "4 4 36\r",
+ "4 4 37\r",
+ "4 4 38\r",
+ "4 4 39\r",
+ "4 4 40\r",
+ "4 4 41\r",
+ "4 4 42\r",
+ "4 4 43\r",
+ "4 4 44\r",
+ "4 4 45\r",
+ "4 4 46\r",
+ "4 4 47\r",
+ "4 4 48\r",
+ "4 4 49\r",
+ "4 4 50\r",
+ "4 4 51\r",
+ "4 4 52\r",
+ "4 4 53\r",
+ "4 4 54\r",
+ "4 4 55\r",
+ "4 4 56\r",
+ "4 4 57\r",
+ "4 4 58\r",
+ "4 5 1\r",
+ "4 5 2\r",
+ "4 5 3\r",
+ "4 5 4\r",
+ "4 5 5\r",
+ "4 5 6\r",
+ "4 5 7\r",
+ "4 5 8\r",
+ "4 5 9\r",
+ "4 5 10\r",
+ "4 5 11\r",
+ "4 5 12\r",
+ "4 5 13\r",
+ "4 5 14\r",
+ "4 5 15\r",
+ "4 5 16\r",
+ "4 5 17\r",
+ "4 5 18\r",
+ "4 5 19\r",
+ "4 5 20\r",
+ "4 5 21\r",
+ "4 5 22\r",
+ "4 5 23\r",
+ "4 5 24\r",
+ "4 5 25\r",
+ "4 5 26\r",
+ "4 5 27\r",
+ "4 5 28\r",
+ "4 5 29\r",
+ "4 5 30\r",
+ "4 5 31\r",
+ "4 5 32\r",
+ "4 5 33\r",
+ "4 5 34\r",
+ "4 5 35\r",
+ "4 5 36\r",
+ "4 5 37\r",
+ "4 5 38\r",
+ "4 5 39\r",
+ "4 5 40\r",
+ "4 5 41\r",
+ "4 5 42\r",
+ "4 5 43\r",
+ "4 5 44\r",
+ "4 5 45\r",
+ "4 5 46\r",
+ "4 5 47\r",
+ "4 5 48\r",
+ "4 5 49\r",
+ "4 5 50\r",
+ "4 5 51\r",
+ "4 5 52\r",
+ "4 5 53\r",
+ "4 5 54\r",
+ "4 5 55\r",
+ "4 5 56\r",
+ "4 5 57\r",
+ "4 5 58\r",
+ "4 6 1\r",
+ "4 6 2\r",
+ "4 6 3\r",
+ "4 6 4\r",
+ "4 6 5\r",
+ "4 6 6\r",
+ "4 6 7\r",
+ "4 6 8\r",
+ "4 6 9\r",
+ "4 6 10\r",
+ "4 6 11\r",
+ "4 6 12\r",
+ "4 6 13\r",
+ "4 6 14\r",
+ "4 6 15\r",
+ "4 6 16\r",
+ "4 6 17\r",
+ "4 6 18\r",
+ "4 6 19\r",
+ "4 6 20\r",
+ "4 6 21\r",
+ "4 6 22\r",
+ "4 6 23\r",
+ "4 6 24\r",
+ "4 6 25\r",
+ "4 6 26\r",
+ "4 6 27\r",
+ "4 6 28\r",
+ "4 6 29\r",
+ "4 6 30\r",
+ "4 6 31\r",
+ "4 6 32\r",
+ "4 6 33\r",
+ "4 6 34\r",
+ "4 6 35\r",
+ "4 6 36\r",
+ "4 6 37\r",
+ "4 6 38\r",
+ "4 6 39\r",
+ "4 6 40\r",
+ "4 6 41\r",
+ "4 6 42\r",
+ "4 6 43\r",
+ "4 6 44\r",
+ "4 6 45\r",
+ "4 6 46\r",
+ "4 6 47\r",
+ "4 6 48\r",
+ "4 6 49\r",
+ "4 6 50\r",
+ "4 6 51\r",
+ "4 6 52\r",
+ "4 6 53\r",
+ "4 6 54\r",
+ "4 6 55\r",
+ "4 6 56\r",
+ "4 6 57\r",
+ "4 6 58\r",
+ "4 7 1\r",
+ "4 7 2\r",
+ "4 7 3\r",
+ "4 7 4\r",
+ "4 7 5\r",
+ "4 7 6\r",
+ "4 7 7\r",
+ "4 7 8\r",
+ "4 7 9\r",
+ "4 7 10\r",
+ "4 7 11\r",
+ "4 7 12\r",
+ "4 7 13\r",
+ "4 7 14\r",
+ "4 7 15\r",
+ "4 7 16\r",
+ "4 7 17\r",
+ "4 7 18\r",
+ "4 7 19\r",
+ "4 7 20\r",
+ "4 7 21\r",
+ "4 7 22\r",
+ "4 7 23\r",
+ "4 7 24\r",
+ "4 7 25\r",
+ "4 7 26\r",
+ "4 7 27\r",
+ "4 7 28\r",
+ "4 7 29\r",
+ "4 7 30\r",
+ "4 7 31\r",
+ "4 7 32\r",
+ "4 7 33\r",
+ "4 7 34\r",
+ "4 7 35\r",
+ "4 7 36\r",
+ "4 7 37\r",
+ "4 7 38\r",
+ "4 7 39\r",
+ "4 7 40\r",
+ "4 7 41\r",
+ "4 7 42\r",
+ "4 7 43\r",
+ "4 7 44\r",
+ "4 7 45\r",
+ "4 7 46\r",
+ "4 7 47\r",
+ "4 7 48\r",
+ "4 7 49\r",
+ "4 7 50\r",
+ "4 7 51\r",
+ "4 7 52\r",
+ "4 7 53\r",
+ "4 7 54\r",
+ "4 7 55\r",
+ "4 7 56\r",
+ "4 7 57\r",
+ "4 7 58\r",
+ "4 8 1\r",
+ "4 8 2\r",
+ "4 8 3\r",
+ "4 8 4\r",
+ "4 8 5\r",
+ "4 8 6\r",
+ "4 8 7\r",
+ "4 8 8\r",
+ "4 8 9\r",
+ "4 8 10\r",
+ "4 8 11\r",
+ "4 8 12\r",
+ "4 8 13\r",
+ "4 8 14\r",
+ "4 8 15\r",
+ "4 8 16\r",
+ "4 8 17\r",
+ "4 8 18\r",
+ "4 8 19\r",
+ "4 8 20\r",
+ "4 8 21\r",
+ "4 8 22\r",
+ "4 8 23\r",
+ "4 8 24\r",
+ "4 8 25\r",
+ "4 8 26\r",
+ "4 8 27\r",
+ "4 8 28\r",
+ "4 8 29\r",
+ "4 8 30\r",
+ "4 8 31\r",
+ "4 8 32\r",
+ "4 8 33\r",
+ "4 8 34\r",
+ "4 8 35\r",
+ "4 8 36\r",
+ "4 8 37\r",
+ "4 8 38\r",
+ "4 8 39\r",
+ "4 8 40\r",
+ "4 8 41\r",
+ "4 8 42\r",
+ "4 8 43\r",
+ "4 8 44\r",
+ "4 8 45\r",
+ "4 8 46\r",
+ "4 8 47\r",
+ "4 8 48\r",
+ "4 8 49\r",
+ "4 8 50\r",
+ "4 8 51\r",
+ "4 8 52\r",
+ "4 8 53\r",
+ "4 8 54\r",
+ "4 8 55\r",
+ "4 8 56\r",
+ "4 8 57\r",
+ "4 8 58\r",
+ "4 9 1\r",
+ "4 9 2\r",
+ "4 9 3\r",
+ "4 9 4\r",
+ "4 9 5\r",
+ "4 9 6\r",
+ "4 9 7\r",
+ "4 9 8\r",
+ "4 9 9\r",
+ "4 9 10\r",
+ "4 9 11\r",
+ "4 9 12\r",
+ "4 9 13\r",
+ "4 9 14\r",
+ "4 9 15\r",
+ "4 9 16\r",
+ "4 9 17\r",
+ "4 9 18\r",
+ "4 9 19\r",
+ "4 9 20\r",
+ "4 9 21\r",
+ "4 9 22\r",
+ "4 9 23\r",
+ "4 9 24\r",
+ "4 9 25\r",
+ "4 9 26\r",
+ "4 9 27\r",
+ "4 9 28\r",
+ "4 9 29\r",
+ "4 9 30\r",
+ "4 9 31\r",
+ "4 9 32\r",
+ "4 9 33\r",
+ "4 9 34\r",
+ "4 9 35\r",
+ "4 9 36\r",
+ "4 9 37\r",
+ "4 9 38\r",
+ "4 9 39\r",
+ "4 9 40\r",
+ "4 9 41\r",
+ "4 9 42\r",
+ "4 9 43\r",
+ "4 9 44\r",
+ "4 9 45\r",
+ "4 9 46\r",
+ "4 9 47\r",
+ "4 9 48\r",
+ "4 9 49\r",
+ "4 9 50\r",
+ "4 9 51\r",
+ "4 9 52\r",
+ "4 9 53\r",
+ "4 9 54\r",
+ "4 9 55\r",
+ "4 9 56\r",
+ "4 9 57\r",
+ "4 9 58\r",
+ "4 10 1\r",
+ "4 10 2\r",
+ "4 10 3\r",
+ "4 10 4\r",
+ "4 10 5\r",
+ "4 10 6\r",
+ "4 10 7\r",
+ "4 10 8\r",
+ "4 10 9\r",
+ "4 10 10\r",
+ "4 10 11\r",
+ "4 10 12\r",
+ "4 10 13\r",
+ "4 10 14\r",
+ "4 10 15\r",
+ "4 10 16\r",
+ "4 10 17\r",
+ "4 10 18\r",
+ "4 10 19\r",
+ "4 10 20\r",
+ "4 10 21\r",
+ "4 10 22\r",
+ "4 10 23\r",
+ "4 10 24\r",
+ "4 10 25\r",
+ "4 10 26\r",
+ "4 10 27\r",
+ "4 10 28\r",
+ "4 10 29\r",
+ "4 10 30\r",
+ "4 10 31\r",
+ "4 10 32\r",
+ "4 10 33\r",
+ "4 10 34\r",
+ "4 10 35\r",
+ "4 10 36\r",
+ "4 10 37\r",
+ "4 10 38\r",
+ "4 10 39\r",
+ "4 10 40\r",
+ "4 10 41\r",
+ "4 10 42\r",
+ "4 10 43\r",
+ "4 10 44\r",
+ "4 10 45\r",
+ "4 10 46\r",
+ "4 10 47\r",
+ "4 10 48\r",
+ "4 10 49\r",
+ "4 10 50\r",
+ "4 10 51\r",
+ "4 10 52\r",
+ "4 10 53\r",
+ "4 10 54\r",
+ "4 10 55\r",
+ "4 10 56\r",
+ "4 10 57\r",
+ "4 10 58\r",
+ "4 11 1\r",
+ "4 11 2\r",
+ "4 11 3\r",
+ "4 11 4\r",
+ "4 11 5\r",
+ "4 11 6\r",
+ "4 11 7\r",
+ "4 11 8\r",
+ "4 11 9\r",
+ "4 11 10\r",
+ "4 11 11\r",
+ "4 11 12\r",
+ "4 11 13\r",
+ "4 11 14\r",
+ "4 11 15\r",
+ "4 11 16\r",
+ "4 11 17\r",
+ "4 11 18\r",
+ "4 11 19\r",
+ "4 11 20\r",
+ "4 11 21\r",
+ "4 11 22\r",
+ "4 11 23\r",
+ "4 11 24\r",
+ "4 11 25\r",
+ "4 11 26\r",
+ "4 11 27\r",
+ "4 11 28\r",
+ "4 11 29\r",
+ "4 11 30\r",
+ "4 11 31\r",
+ "4 11 32\r",
+ "4 11 33\r",
+ "4 11 34\r",
+ "4 11 35\r",
+ "4 11 36\r",
+ "4 11 37\r",
+ "4 11 38\r",
+ "4 11 39\r",
+ "4 11 40\r",
+ "4 11 41\r",
+ "4 11 42\r",
+ "4 11 43\r",
+ "4 11 44\r",
+ "4 11 45\r",
+ "4 11 46\r",
+ "4 11 47\r",
+ "4 11 48\r",
+ "4 11 49\r",
+ "4 11 50\r",
+ "4 11 51\r",
+ "4 11 52\r",
+ "4 11 53\r",
+ "4 11 54\r",
+ "4 11 55\r",
+ "4 11 56\r",
+ "4 11 57\r",
+ "4 11 58\r",
+ "4 12 1\r",
+ "4 12 2\r",
+ "4 12 3\r",
+ "4 12 4\r",
+ "4 12 5\r",
+ "4 12 6\r",
+ "4 12 7\r",
+ "4 12 8\r",
+ "4 12 9\r",
+ "4 12 10\r",
+ "4 12 11\r",
+ "4 12 12\r",
+ "4 12 13\r",
+ "4 12 14\r",
+ "4 12 15\r",
+ "4 12 16\r",
+ "4 12 17\r",
+ "4 12 18\r",
+ "4 12 19\r",
+ "4 12 20\r",
+ "4 12 21\r",
+ "4 12 22\r",
+ "4 12 23\r",
+ "4 12 24\r",
+ "4 12 25\r",
+ "4 12 26\r",
+ "4 12 27\r",
+ "4 12 28\r",
+ "4 12 29\r",
+ "4 12 30\r",
+ "4 12 31\r",
+ "4 12 32\r",
+ "4 12 33\r",
+ "4 12 34\r",
+ "4 12 35\r",
+ "4 12 36\r",
+ "4 12 37\r",
+ "4 12 38\r",
+ "4 12 39\r",
+ "4 12 40\r",
+ "4 12 41\r",
+ "4 12 42\r",
+ "4 12 43\r",
+ "4 12 44\r",
+ "4 12 45\r",
+ "4 12 46\r",
+ "4 12 47\r",
+ "4 12 48\r",
+ "4 12 49\r",
+ "4 12 50\r",
+ "4 12 51\r",
+ "4 12 52\r",
+ "4 12 53\r",
+ "4 12 54\r",
+ "4 12 55\r",
+ "4 12 56\r",
+ "4 12 57\r",
+ "4 12 58\r",
+ "4 13 1\r",
+ "4 13 2\r",
+ "4 13 3\r",
+ "4 13 4\r",
+ "4 13 5\r",
+ "4 13 6\r",
+ "4 13 7\r",
+ "4 13 8\r",
+ "4 13 9\r",
+ "4 13 10\r",
+ "4 13 11\r",
+ "4 13 12\r",
+ "4 13 13\r",
+ "4 13 14\r",
+ "4 13 15\r",
+ "4 13 16\r",
+ "4 13 17\r",
+ "4 13 18\r",
+ "4 13 19\r",
+ "4 13 20\r",
+ "4 13 21\r",
+ "4 13 22\r",
+ "4 13 23\r",
+ "4 13 24\r",
+ "4 13 25\r",
+ "4 13 26\r",
+ "4 13 27\r",
+ "4 13 28\r",
+ "4 13 29\r",
+ "4 13 30\r",
+ "4 13 31\r",
+ "4 13 32\r",
+ "4 13 33\r",
+ "4 13 34\r",
+ "4 13 35\r",
+ "4 13 36\r",
+ "4 13 37\r",
+ "4 13 38\r",
+ "4 13 39\r",
+ "4 13 40\r",
+ "4 13 41\r",
+ "4 13 42\r",
+ "4 13 43\r",
+ "4 13 44\r",
+ "4 13 45\r",
+ "4 13 46\r",
+ "4 13 47\r",
+ "4 13 48\r",
+ "4 13 49\r",
+ "4 13 50\r",
+ "4 13 51\r",
+ "4 13 52\r",
+ "4 13 53\r",
+ "4 13 54\r",
+ "4 13 55\r",
+ "4 13 56\r",
+ "4 13 57\r",
+ "4 13 58\r",
+ "4 14 1\r",
+ "4 14 2\r",
+ "4 14 3\r",
+ "4 14 4\r",
+ "4 14 5\r",
+ "4 14 6\r",
+ "4 14 7\r",
+ "4 14 8\r",
+ "4 14 9\r",
+ "4 14 10\r",
+ "4 14 11\r",
+ "4 14 12\r",
+ "4 14 13\r",
+ "4 14 14\r",
+ "4 14 15\r",
+ "4 14 16\r",
+ "4 14 17\r",
+ "4 14 18\r",
+ "4 14 19\r",
+ "4 14 20\r",
+ "4 14 21\r",
+ "4 14 22\r",
+ "4 14 23\r",
+ "4 14 24\r",
+ "4 14 25\r",
+ "4 14 26\r",
+ "4 14 27\r",
+ "4 14 28\r",
+ "4 14 29\r",
+ "4 14 30\r",
+ "4 14 31\r",
+ "4 14 32\r",
+ "4 14 33\r",
+ "4 14 34\r",
+ "4 14 35\r",
+ "4 14 36\r",
+ "4 14 37\r",
+ "4 14 38\r",
+ "4 14 39\r",
+ "4 14 40\r",
+ "4 14 41\r",
+ "4 14 42\r",
+ "4 14 43\r",
+ "4 14 44\r",
+ "4 14 45\r",
+ "4 14 46\r",
+ "4 14 47\r",
+ "4 14 48\r",
+ "4 14 49\r",
+ "4 14 50\r",
+ "4 14 51\r",
+ "4 14 52\r",
+ "4 14 53\r",
+ "4 14 54\r",
+ "4 14 55\r",
+ "4 14 56\r",
+ "4 14 57\r",
+ "4 14 58\r",
+ "4 15 1\r",
+ "4 15 2\r",
+ "4 15 3\r",
+ "4 15 4\r",
+ "4 15 5\r",
+ "4 15 6\r",
+ "4 15 7\r",
+ "4 15 8\r",
+ "4 15 9\r",
+ "4 15 10\r",
+ "4 15 11\r",
+ "4 15 12\r",
+ "4 15 13\r",
+ "4 15 14\r",
+ "4 15 15\r",
+ "4 15 16\r",
+ "4 15 17\r",
+ "4 15 18\r",
+ "4 15 19\r",
+ "4 15 20\r",
+ "4 15 21\r",
+ "4 15 22\r",
+ "4 15 23\r",
+ "4 15 24\r",
+ "4 15 25\r",
+ "4 15 26\r",
+ "4 15 27\r",
+ "4 15 28\r",
+ "4 15 29\r",
+ "4 15 30\r",
+ "4 15 31\r",
+ "4 15 32\r",
+ "4 15 33\r",
+ "4 15 34\r",
+ "4 15 35\r",
+ "4 15 36\r",
+ "4 15 37\r",
+ "4 15 38\r",
+ "4 15 39\r",
+ "4 15 40\r",
+ "4 15 41\r",
+ "4 15 42\r",
+ "4 15 43\r",
+ "4 15 44\r",
+ "4 15 45\r",
+ "4 15 46\r",
+ "4 15 47\r",
+ "4 15 48\r",
+ "4 15 49\r",
+ "4 15 50\r",
+ "4 15 51\r",
+ "4 15 52\r",
+ "4 15 53\r",
+ "4 15 54\r",
+ "4 15 55\r",
+ "4 15 56\r",
+ "4 15 57\r",
+ "4 15 58\r",
+ "4 16 1\r",
+ "4 16 2\r",
+ "4 16 3\r",
+ "4 16 4\r",
+ "4 16 5\r",
+ "4 16 6\r",
+ "4 16 7\r",
+ "4 16 8\r",
+ "4 16 9\r",
+ "4 16 10\r",
+ "4 16 11\r",
+ "4 16 12\r",
+ "4 16 13\r",
+ "4 16 14\r",
+ "4 16 15\r",
+ "4 16 16\r",
+ "4 16 17\r",
+ "4 16 18\r",
+ "4 16 19\r",
+ "4 16 20\r",
+ "4 16 21\r",
+ "4 16 22\r",
+ "4 16 23\r",
+ "4 16 24\r",
+ "4 16 25\r",
+ "4 16 26\r",
+ "4 16 27\r",
+ "4 16 28\r",
+ "4 16 29\r",
+ "4 16 30\r",
+ "4 16 31\r",
+ "4 16 32\r",
+ "4 16 33\r",
+ "4 16 34\r",
+ "4 16 35\r",
+ "4 16 36\r",
+ "4 16 37\r",
+ "4 16 38\r",
+ "4 16 39\r",
+ "4 16 40\r",
+ "4 16 41\r",
+ "4 16 42\r",
+ "4 16 43\r",
+ "4 16 44\r",
+ "4 16 45\r",
+ "4 16 46\r",
+ "4 16 47\r",
+ "4 16 48\r",
+ "4 16 49\r",
+ "4 16 50\r",
+ "4 16 51\r",
+ "4 16 52\r",
+ "4 16 53\r",
+ "4 16 54\r",
+ "4 16 55\r",
+ "4 16 56\r",
+ "4 16 57\r",
+ "4 16 58\r",
+ "4 17 1\r",
+ "4 17 2\r",
+ "4 17 3\r",
+ "4 17 4\r",
+ "4 17 5\r",
+ "4 17 6\r",
+ "4 17 7\r",
+ "4 17 8\r",
+ "4 17 9\r",
+ "4 17 10\r",
+ "4 17 11\r",
+ "4 17 12\r",
+ "4 17 13\r",
+ "4 17 14\r",
+ "4 17 15\r",
+ "4 17 16\r",
+ "4 17 17\r",
+ "4 17 18\r",
+ "4 17 19\r",
+ "4 17 20\r",
+ "4 17 21\r",
+ "4 17 22\r",
+ "4 17 23\r",
+ "4 17 24\r",
+ "4 17 25\r",
+ "4 17 26\r",
+ "4 17 27\r",
+ "4 17 28\r",
+ "4 17 29\r",
+ "4 17 30\r",
+ "4 17 31\r",
+ "4 17 32\r",
+ "4 17 33\r",
+ "4 17 34\r",
+ "4 17 35\r",
+ "4 17 36\r",
+ "4 17 37\r",
+ "4 17 38\r",
+ "4 17 39\r",
+ "4 17 40\r",
+ "4 17 41\r",
+ "4 17 42\r",
+ "4 17 43\r",
+ "4 17 44\r",
+ "4 17 45\r",
+ "4 17 46\r",
+ "4 17 47\r",
+ "4 17 48\r",
+ "4 17 49\r",
+ "4 17 50\r",
+ "4 17 51\r",
+ "4 17 52\r",
+ "4 17 53\r",
+ "4 17 54\r",
+ "4 17 55\r",
+ "4 17 56\r",
+ "4 17 57\r",
+ "4 17 58\r",
+ "4 18 1\r",
+ "4 18 2\r",
+ "4 18 3\r",
+ "4 18 4\r",
+ "4 18 5\r",
+ "4 18 6\r",
+ "4 18 7\r",
+ "4 18 8\r",
+ "4 18 9\r",
+ "4 18 10\r",
+ "4 18 11\r",
+ "4 18 12\r",
+ "4 18 13\r",
+ "4 18 14\r",
+ "4 18 15\r",
+ "4 18 16\r",
+ "4 18 17\r",
+ "4 18 18\r",
+ "4 18 19\r",
+ "4 18 20\r",
+ "4 18 21\r",
+ "4 18 22\r",
+ "4 18 23\r",
+ "4 18 24\r",
+ "4 18 25\r",
+ "4 18 26\r",
+ "4 18 27\r",
+ "4 18 28\r",
+ "4 18 29\r",
+ "4 18 30\r",
+ "4 18 31\r",
+ "4 18 32\r",
+ "4 18 33\r",
+ "4 18 34\r",
+ "4 18 35\r",
+ "4 18 36\r",
+ "4 18 37\r",
+ "4 18 38\r",
+ "4 18 39\r",
+ "4 18 40\r",
+ "4 18 41\r",
+ "4 18 42\r",
+ "4 18 43\r",
+ "4 18 44\r",
+ "4 18 45\r",
+ "4 18 46\r",
+ "4 18 47\r",
+ "4 18 48\r",
+ "4 18 49\r",
+ "4 18 50\r",
+ "4 18 51\r",
+ "4 18 52\r",
+ "4 18 53\r",
+ "4 18 54\r",
+ "4 18 55\r",
+ "4 18 56\r",
+ "4 18 57\r",
+ "4 18 58\r",
+ "4 19 1\r",
+ "4 19 2\r",
+ "4 19 3\r",
+ "4 19 4\r",
+ "4 19 5\r",
+ "4 19 6\r",
+ "4 19 7\r",
+ "4 19 8\r",
+ "4 19 9\r",
+ "4 19 10\r",
+ "4 19 11\r",
+ "4 19 12\r",
+ "4 19 13\r",
+ "4 19 14\r",
+ "4 19 15\r",
+ "4 19 16\r",
+ "4 19 17\r",
+ "4 19 18\r",
+ "4 19 19\r",
+ "4 19 20\r",
+ "4 19 21\r",
+ "4 19 22\r",
+ "4 19 23\r",
+ "4 19 24\r",
+ "4 19 25\r",
+ "4 19 26\r",
+ "4 19 27\r",
+ "4 19 28\r",
+ "4 19 29\r",
+ "4 19 30\r",
+ "4 19 31\r",
+ "4 19 32\r",
+ "4 19 33\r",
+ "4 19 34\r",
+ "4 19 35\r",
+ "4 19 36\r",
+ "4 19 37\r",
+ "4 19 38\r",
+ "4 19 39\r",
+ "4 19 40\r",
+ "4 19 41\r",
+ "4 19 42\r",
+ "4 19 43\r",
+ "4 19 44\r",
+ "4 19 45\r",
+ "4 19 46\r",
+ "4 19 47\r",
+ "4 19 48\r",
+ "4 19 49\r",
+ "4 19 50\r",
+ "4 19 51\r",
+ "4 19 52\r",
+ "4 19 53\r",
+ "4 19 54\r",
+ "4 19 55\r",
+ "4 19 56\r",
+ "4 19 57\r",
+ "4 19 58\r",
+ "4 20 1\r",
+ "4 20 2\r",
+ "4 20 3\r",
+ "4 20 4\r",
+ "4 20 5\r",
+ "4 20 6\r",
+ "4 20 7\r",
+ "4 20 8\r",
+ "4 20 9\r",
+ "4 20 10\r",
+ "4 20 11\r",
+ "4 20 12\r",
+ "4 20 13\r",
+ "4 20 14\r",
+ "4 20 15\r",
+ "4 20 16\r",
+ "4 20 17\r",
+ "4 20 18\r",
+ "4 20 19\r",
+ "4 20 20\r",
+ "4 20 21\r",
+ "4 20 22\r",
+ "4 20 23\r",
+ "4 20 24\r",
+ "4 20 25\r",
+ "4 20 26\r",
+ "4 20 27\r",
+ "4 20 28\r",
+ "4 20 29\r",
+ "4 20 30\r",
+ "4 20 31\r",
+ "4 20 32\r",
+ "4 20 33\r",
+ "4 20 34\r",
+ "4 20 35\r",
+ "4 20 36\r",
+ "4 20 37\r",
+ "4 20 38\r",
+ "4 20 39\r",
+ "4 20 40\r",
+ "4 20 41\r",
+ "4 20 42\r",
+ "4 20 43\r",
+ "4 20 44\r",
+ "4 20 45\r",
+ "4 20 46\r",
+ "4 20 47\r",
+ "4 20 48\r",
+ "4 20 49\r",
+ "4 20 50\r",
+ "4 20 51\r",
+ "4 20 52\r",
+ "4 20 53\r",
+ "4 20 54\r",
+ "4 20 55\r",
+ "4 20 56\r",
+ "4 20 57\r",
+ "4 20 58\r",
+ "4 21 1\r",
+ "4 21 2\r",
+ "4 21 3\r",
+ "4 21 4\r",
+ "4 21 5\r",
+ "4 21 6\r",
+ "4 21 7\r",
+ "4 21 8\r",
+ "4 21 9\r",
+ "4 21 10\r",
+ "4 21 11\r",
+ "4 21 12\r",
+ "4 21 13\r",
+ "4 21 14\r",
+ "4 21 15\r",
+ "4 21 16\r",
+ "4 21 17\r",
+ "4 21 18\r",
+ "4 21 19\r",
+ "4 21 20\r",
+ "4 21 21\r",
+ "4 21 22\r",
+ "4 21 23\r",
+ "4 21 24\r",
+ "4 21 25\r",
+ "4 21 26\r",
+ "4 21 27\r",
+ "4 21 28\r",
+ "4 21 29\r",
+ "4 21 30\r",
+ "4 21 31\r",
+ "4 21 32\r",
+ "4 21 33\r",
+ "4 21 34\r",
+ "4 21 35\r",
+ "4 21 36\r",
+ "4 21 37\r",
+ "4 21 38\r",
+ "4 21 39\r",
+ "4 21 40\r",
+ "4 21 41\r",
+ "4 21 42\r",
+ "4 21 43\r",
+ "4 21 44\r",
+ "4 21 45\r",
+ "4 21 46\r",
+ "4 21 47\r",
+ "4 21 48\r",
+ "4 21 49\r",
+ "4 21 50\r",
+ "4 21 51\r",
+ "4 21 52\r",
+ "4 21 53\r",
+ "4 21 54\r",
+ "4 21 55\r",
+ "4 21 56\r",
+ "4 21 57\r",
+ "4 21 58\r",
+ "4 22 1\r",
+ "4 22 2\r",
+ "4 22 3\r",
+ "4 22 4\r",
+ "4 22 5\r",
+ "4 22 6\r",
+ "4 22 7\r",
+ "4 22 8\r",
+ "4 22 9\r",
+ "4 22 10\r",
+ "4 22 11\r",
+ "4 22 12\r",
+ "4 22 13\r",
+ "4 22 14\r",
+ "4 22 15\r",
+ "4 22 16\r",
+ "4 22 17\r",
+ "4 22 18\r",
+ "4 22 19\r",
+ "4 22 20\r",
+ "4 22 21\r",
+ "4 22 22\r",
+ "4 22 23\r",
+ "4 22 24\r",
+ "4 22 25\r",
+ "4 22 26\r",
+ "4 22 27\r",
+ "4 22 28\r",
+ "4 22 29\r",
+ "4 22 30\r",
+ "4 22 31\r",
+ "4 22 32\r",
+ "4 22 33\r",
+ "4 22 34\r",
+ "4 22 35\r",
+ "4 22 36\r",
+ "4 22 37\r",
+ "4 22 38\r",
+ "4 22 39\r",
+ "4 22 40\r",
+ "4 22 41\r",
+ "4 22 42\r",
+ "4 22 43\r",
+ "4 22 44\r",
+ "4 22 45\r",
+ "4 22 46\r",
+ "4 22 47\r",
+ "4 22 48\r",
+ "4 22 49\r",
+ "4 22 50\r",
+ "4 22 51\r",
+ "4 22 52\r",
+ "4 22 53\r",
+ "4 22 54\r",
+ "4 22 55\r",
+ "4 22 56\r",
+ "4 22 57\r",
+ "4 22 58\r",
+ "4 23 1\r",
+ "4 23 2\r",
+ "4 23 3\r",
+ "4 23 4\r",
+ "4 23 5\r",
+ "4 23 6\r",
+ "4 23 7\r",
+ "4 23 8\r",
+ "4 23 9\r",
+ "4 23 10\r",
+ "4 23 11\r",
+ "4 23 12\r",
+ "4 23 13\r",
+ "4 23 14\r",
+ "4 23 15\r",
+ "4 23 16\r",
+ "4 23 17\r",
+ "4 23 18\r",
+ "4 23 19\r",
+ "4 23 20\r",
+ "4 23 21\r",
+ "4 23 22\r",
+ "4 23 23\r",
+ "4 23 24\r",
+ "4 23 25\r",
+ "4 23 26\r",
+ "4 23 27\r",
+ "4 23 28\r",
+ "4 23 29\r",
+ "4 23 30\r",
+ "4 23 31\r",
+ "4 23 32\r",
+ "4 23 33\r",
+ "4 23 34\r",
+ "4 23 35\r",
+ "4 23 36\r",
+ "4 23 37\r",
+ "4 23 38\r",
+ "4 23 39\r",
+ "4 23 40\r",
+ "4 23 41\r",
+ "4 23 42\r",
+ "4 23 43\r",
+ "4 23 44\r",
+ "4 23 45\r",
+ "4 23 46\r",
+ "4 23 47\r",
+ "4 23 48\r",
+ "4 23 49\r",
+ "4 23 50\r",
+ "4 23 51\r",
+ "4 23 52\r",
+ "4 23 53\r",
+ "4 23 54\r",
+ "4 23 55\r",
+ "4 23 56\r",
+ "4 23 57\r",
+ "4 23 58\r",
+ "4 24 1\r",
+ "4 24 2\r",
+ "4 24 3\r",
+ "4 24 4\r",
+ "4 24 5\r",
+ "4 24 6\r",
+ "4 24 7\r",
+ "4 24 8\r",
+ "4 24 9\r",
+ "4 24 10\r",
+ "4 24 11\r",
+ "4 24 12\r",
+ "4 24 13\r",
+ "4 24 14\r",
+ "4 24 15\r",
+ "4 24 16\r",
+ "4 24 17\r",
+ "4 24 18\r",
+ "4 24 19\r",
+ "4 24 20\r",
+ "4 24 21\r",
+ "4 24 22\r",
+ "4 24 23\r",
+ "4 24 24\r",
+ "4 24 25\r",
+ "4 24 26\r",
+ "4 24 27\r",
+ "4 24 28\r",
+ "4 24 29\r",
+ "4 24 30\r",
+ "4 24 31\r",
+ "4 24 32\r",
+ "4 24 33\r",
+ "4 24 34\r",
+ "4 24 35\r",
+ "4 24 36\r",
+ "4 24 37\r",
+ "4 24 38\r",
+ "4 24 39\r",
+ "4 24 40\r",
+ "4 24 41\r",
+ "4 24 42\r",
+ "4 24 43\r",
+ "4 24 44\r",
+ "4 24 45\r",
+ "4 24 46\r",
+ "4 24 47\r",
+ "4 24 48\r",
+ "4 24 49\r",
+ "4 24 50\r",
+ "4 24 51\r",
+ "4 24 52\r",
+ "4 24 53\r",
+ "4 24 54\r",
+ "4 24 55\r",
+ "4 24 56\r",
+ "4 24 57\r",
+ "4 24 58\r",
+ "4 25 1\r",
+ "4 25 2\r",
+ "4 25 3\r",
+ "4 25 4\r",
+ "4 25 5\r",
+ "4 25 6\r",
+ "4 25 7\r",
+ "4 25 8\r",
+ "4 25 9\r",
+ "4 25 10\r",
+ "4 25 11\r",
+ "4 25 12\r",
+ "4 25 13\r",
+ "4 25 14\r",
+ "4 25 15\r",
+ "4 25 16\r",
+ "4 25 17\r",
+ "4 25 18\r",
+ "4 25 19\r",
+ "4 25 20\r",
+ "4 25 21\r",
+ "4 25 22\r",
+ "4 25 23\r",
+ "4 25 24\r",
+ "4 25 25\r",
+ "4 25 26\r",
+ "4 25 27\r",
+ "4 25 28\r",
+ "4 25 29\r",
+ "4 25 30\r",
+ "4 25 31\r",
+ "4 25 32\r",
+ "4 25 33\r",
+ "4 25 34\r",
+ "4 25 35\r",
+ "4 25 36\r",
+ "4 25 37\r",
+ "4 25 38\r",
+ "4 25 39\r",
+ "4 25 40\r",
+ "4 25 41\r",
+ "4 25 42\r",
+ "4 25 43\r",
+ "4 25 44\r",
+ "4 25 45\r",
+ "4 25 46\r",
+ "4 25 47\r",
+ "4 25 48\r",
+ "4 25 49\r",
+ "4 25 50\r",
+ "4 25 51\r",
+ "4 25 52\r",
+ "4 25 53\r",
+ "4 25 54\r",
+ "4 25 55\r",
+ "4 25 56\r",
+ "4 25 57\r",
+ "4 25 58\r",
+ "4 26 1\r",
+ "4 26 2\r",
+ "4 26 3\r",
+ "4 26 4\r",
+ "4 26 5\r",
+ "4 26 6\r",
+ "4 26 7\r",
+ "4 26 8\r",
+ "4 26 9\r",
+ "4 26 10\r",
+ "4 26 11\r",
+ "4 26 12\r",
+ "4 26 13\r",
+ "4 26 14\r",
+ "4 26 15\r",
+ "4 26 16\r",
+ "4 26 17\r",
+ "4 26 18\r",
+ "4 26 19\r",
+ "4 26 20\r",
+ "4 26 21\r",
+ "4 26 22\r",
+ "4 26 23\r",
+ "4 26 24\r",
+ "4 26 25\r",
+ "4 26 26\r",
+ "4 26 27\r",
+ "4 26 28\r",
+ "4 26 29\r",
+ "4 26 30\r",
+ "4 26 31\r",
+ "4 26 32\r",
+ "4 26 33\r",
+ "4 26 34\r",
+ "4 26 35\r",
+ "4 26 36\r",
+ "4 26 37\r",
+ "4 26 38\r",
+ "4 26 39\r",
+ "4 26 40\r",
+ "4 26 41\r",
+ "4 26 42\r",
+ "4 26 43\r",
+ "4 26 44\r",
+ "4 26 45\r",
+ "4 26 46\r",
+ "4 26 47\r",
+ "4 26 48\r",
+ "4 26 49\r",
+ "4 26 50\r",
+ "4 26 51\r",
+ "4 26 52\r",
+ "4 26 53\r",
+ "4 26 54\r",
+ "4 26 55\r",
+ "4 26 56\r",
+ "4 26 57\r",
+ "4 26 58\r",
+ "4 27 1\r",
+ "4 27 2\r",
+ "4 27 3\r",
+ "4 27 4\r",
+ "4 27 5\r",
+ "4 27 6\r",
+ "4 27 7\r",
+ "4 27 8\r",
+ "4 27 9\r",
+ "4 27 10\r",
+ "4 27 11\r",
+ "4 27 12\r",
+ "4 27 13\r",
+ "4 27 14\r",
+ "4 27 15\r",
+ "4 27 16\r",
+ "4 27 17\r",
+ "4 27 18\r",
+ "4 27 19\r",
+ "4 27 20\r",
+ "4 27 21\r",
+ "4 27 22\r",
+ "4 27 23\r",
+ "4 27 24\r",
+ "4 27 25\r",
+ "4 27 26\r",
+ "4 27 27\r",
+ "4 27 28\r",
+ "4 27 29\r",
+ "4 27 30\r",
+ "4 27 31\r",
+ "4 27 32\r",
+ "4 27 33\r",
+ "4 27 34\r",
+ "4 27 35\r",
+ "4 27 36\r",
+ "4 27 37\r",
+ "4 27 38\r",
+ "4 27 39\r",
+ "4 27 40\r",
+ "4 27 41\r",
+ "4 27 42\r",
+ "4 27 43\r",
+ "4 27 44\r",
+ "4 27 45\r",
+ "4 27 46\r",
+ "4 27 47\r",
+ "4 27 48\r",
+ "4 27 49\r",
+ "4 27 50\r",
+ "4 27 51\r",
+ "4 27 52\r",
+ "4 27 53\r",
+ "4 27 54\r",
+ "4 27 55\r",
+ "4 27 56\r",
+ "4 27 57\r",
+ "4 27 58\r",
+ "4 28 1\r",
+ "4 28 2\r",
+ "4 28 3\r",
+ "4 28 4\r",
+ "4 28 5\r",
+ "4 28 6\r",
+ "4 28 7\r",
+ "4 28 8\r",
+ "4 28 9\r",
+ "4 28 10\r",
+ "4 28 11\r",
+ "4 28 12\r",
+ "4 28 13\r",
+ "4 28 14\r",
+ "4 28 15\r",
+ "4 28 16\r",
+ "4 28 17\r",
+ "4 28 18\r",
+ "4 28 19\r",
+ "4 28 20\r",
+ "4 28 21\r",
+ "4 28 22\r",
+ "4 28 23\r",
+ "4 28 24\r",
+ "4 28 25\r",
+ "4 28 26\r",
+ "4 28 27\r",
+ "4 28 28\r",
+ "4 28 29\r",
+ "4 28 30\r",
+ "4 28 31\r",
+ "4 28 32\r",
+ "4 28 33\r",
+ "4 28 34\r",
+ "4 28 35\r",
+ "4 28 36\r",
+ "4 28 37\r",
+ "4 28 38\r",
+ "4 28 39\r",
+ "4 28 40\r",
+ "4 28 41\r",
+ "4 28 42\r",
+ "4 28 43\r",
+ "4 28 44\r",
+ "4 28 45\r",
+ "4 28 46\r",
+ "4 28 47\r",
+ "4 28 48\r",
+ "4 28 49\r",
+ "4 28 50\r",
+ "4 28 51\r",
+ "4 28 52\r",
+ "4 28 53\r",
+ "4 28 54\r",
+ "4 28 55\r",
+ "4 28 56\r",
+ "4 28 57\r",
+ "4 28 58\r",
+ "4 29 1\r",
+ "4 29 2\r",
+ "4 29 3\r",
+ "4 29 4\r",
+ "4 29 5\r",
+ "4 29 6\r",
+ "4 29 7\r",
+ "4 29 8\r",
+ "4 29 9\r",
+ "4 29 10\r",
+ "4 29 11\r",
+ "4 29 12\r",
+ "4 29 13\r",
+ "4 29 14\r",
+ "4 29 15\r",
+ "4 29 16\r",
+ "4 29 17\r",
+ "4 29 18\r",
+ "4 29 19\r",
+ "4 29 20\r",
+ "4 29 21\r",
+ "4 29 22\r",
+ "4 29 23\r",
+ "4 29 24\r",
+ "4 29 25\r",
+ "4 29 26\r",
+ "4 29 27\r",
+ "4 29 28\r",
+ "4 29 29\r",
+ "4 29 30\r",
+ "4 29 31\r",
+ "4 29 32\r",
+ "4 29 33\r",
+ "4 29 34\r",
+ "4 29 35\r",
+ "4 29 36\r",
+ "4 29 37\r",
+ "4 29 38\r",
+ "4 29 39\r",
+ "4 29 40\r",
+ "4 29 41\r",
+ "4 29 42\r",
+ "4 29 43\r",
+ "4 29 44\r",
+ "4 29 45\r",
+ "4 29 46\r",
+ "4 29 47\r",
+ "4 29 48\r",
+ "4 29 49\r",
+ "4 29 50\r",
+ "4 29 51\r",
+ "4 29 52\r",
+ "4 29 53\r",
+ "4 29 54\r",
+ "4 29 55\r",
+ "4 29 56\r",
+ "4 29 57\r",
+ "4 29 58\r",
+ "4 30 1\r",
+ "4 30 2\r",
+ "4 30 3\r",
+ "4 30 4\r",
+ "4 30 5\r",
+ "4 30 6\r",
+ "4 30 7\r",
+ "4 30 8\r",
+ "4 30 9\r",
+ "4 30 10\r",
+ "4 30 11\r",
+ "4 30 12\r",
+ "4 30 13\r",
+ "4 30 14\r",
+ "4 30 15\r",
+ "4 30 16\r",
+ "4 30 17\r",
+ "4 30 18\r",
+ "4 30 19\r",
+ "4 30 20\r",
+ "4 30 21\r",
+ "4 30 22\r",
+ "4 30 23\r",
+ "4 30 24\r",
+ "4 30 25\r",
+ "4 30 26\r",
+ "4 30 27\r",
+ "4 30 28\r",
+ "4 30 29\r",
+ "4 30 30\r",
+ "4 30 31\r",
+ "4 30 32\r",
+ "4 30 33\r",
+ "4 30 34\r",
+ "4 30 35\r",
+ "4 30 36\r",
+ "4 30 37\r",
+ "4 30 38\r",
+ "4 30 39\r",
+ "4 30 40\r",
+ "4 30 41\r",
+ "4 30 42\r",
+ "4 30 43\r",
+ "4 30 44\r",
+ "4 30 45\r",
+ "4 30 46\r",
+ "4 30 47\r",
+ "4 30 48\r",
+ "4 30 49\r",
+ "4 30 50\r",
+ "4 30 51\r",
+ "4 30 52\r",
+ "4 30 53\r",
+ "4 30 54\r",
+ "4 30 55\r",
+ "4 30 56\r",
+ "4 30 57\r",
+ "4 30 58\r",
+ "4 31 1\r",
+ "4 31 2\r",
+ "4 31 3\r",
+ "4 31 4\r",
+ "4 31 5\r",
+ "4 31 6\r",
+ "4 31 7\r",
+ "4 31 8\r",
+ "4 31 9\r",
+ "4 31 10\r",
+ "4 31 11\r",
+ "4 31 12\r",
+ "4 31 13\r",
+ "4 31 14\r",
+ "4 31 15\r",
+ "4 31 16\r",
+ "4 31 17\r",
+ "4 31 18\r",
+ "4 31 19\r",
+ "4 31 20\r",
+ "4 31 21\r",
+ "4 31 22\r",
+ "4 31 23\r",
+ "4 31 24\r",
+ "4 31 25\r",
+ "4 31 26\r",
+ "4 31 27\r",
+ "4 31 28\r",
+ "4 31 29\r",
+ "4 31 30\r",
+ "4 31 31\r",
+ "4 31 32\r",
+ "4 31 33\r",
+ "4 31 34\r",
+ "4 31 35\r",
+ "4 31 36\r",
+ "4 31 37\r",
+ "4 31 38\r",
+ "4 31 39\r",
+ "4 31 40\r",
+ "4 31 41\r",
+ "4 31 42\r",
+ "4 31 43\r",
+ "4 31 44\r",
+ "4 31 45\r",
+ "4 31 46\r",
+ "4 31 47\r",
+ "4 31 48\r",
+ "4 31 49\r",
+ "4 31 50\r",
+ "4 31 51\r",
+ "4 31 52\r",
+ "4 31 53\r",
+ "4 31 54\r",
+ "4 31 55\r",
+ "4 31 56\r",
+ "4 31 57\r",
+ "4 31 58\r",
+ "4 32 1\r",
+ "4 32 2\r",
+ "4 32 3\r",
+ "4 32 4\r",
+ "4 32 5\r",
+ "4 32 6\r",
+ "4 32 7\r",
+ "4 32 8\r",
+ "4 32 9\r",
+ "4 32 10\r",
+ "4 32 11\r",
+ "4 32 12\r",
+ "4 32 13\r",
+ "4 32 14\r",
+ "4 32 15\r",
+ "4 32 16\r",
+ "4 32 17\r",
+ "4 32 18\r",
+ "4 32 19\r",
+ "4 32 20\r",
+ "4 32 21\r",
+ "4 32 22\r",
+ "4 32 23\r",
+ "4 32 24\r",
+ "4 32 25\r",
+ "4 32 26\r",
+ "4 32 27\r",
+ "4 32 28\r",
+ "4 32 29\r",
+ "4 32 30\r",
+ "4 32 31\r",
+ "4 32 32\r",
+ "4 32 33\r",
+ "4 32 34\r",
+ "4 32 35\r",
+ "4 32 36\r",
+ "4 32 37\r",
+ "4 32 38\r",
+ "4 32 39\r",
+ "4 32 40\r",
+ "4 32 41\r",
+ "4 32 42\r",
+ "4 32 43\r",
+ "4 32 44\r",
+ "4 32 45\r",
+ "4 32 46\r",
+ "4 32 47\r",
+ "4 32 48\r",
+ "4 32 49\r",
+ "4 32 50\r",
+ "4 32 51\r",
+ "4 32 52\r",
+ "4 32 53\r",
+ "4 32 54\r",
+ "4 32 55\r",
+ "4 32 56\r",
+ "4 32 57\r",
+ "4 32 58\r",
+ "4 33 1\r",
+ "4 33 2\r",
+ "4 33 3\r",
+ "4 33 4\r",
+ "4 33 5\r",
+ "4 33 6\r",
+ "4 33 7\r",
+ "4 33 8\r",
+ "4 33 9\r",
+ "4 33 10\r",
+ "4 33 11\r",
+ "4 33 12\r",
+ "4 33 13\r",
+ "4 33 14\r",
+ "4 33 15\r",
+ "4 33 16\r",
+ "4 33 17\r",
+ "4 33 18\r",
+ "4 33 19\r",
+ "4 33 20\r",
+ "4 33 21\r",
+ "4 33 22\r",
+ "4 33 23\r",
+ "4 33 24\r",
+ "4 33 25\r",
+ "4 33 26\r",
+ "4 33 27\r",
+ "4 33 28\r",
+ "4 33 29\r",
+ "4 33 30\r",
+ "4 33 31\r",
+ "4 33 32\r",
+ "4 33 33\r",
+ "4 33 34\r",
+ "4 33 35\r",
+ "4 33 36\r",
+ "4 33 37\r",
+ "4 33 38\r",
+ "4 33 39\r",
+ "4 33 40\r",
+ "4 33 41\r",
+ "4 33 42\r",
+ "4 33 43\r",
+ "4 33 44\r",
+ "4 33 45\r",
+ "4 33 46\r",
+ "4 33 47\r",
+ "4 33 48\r",
+ "4 33 49\r",
+ "4 33 50\r",
+ "4 33 51\r",
+ "4 33 52\r",
+ "4 33 53\r",
+ "4 33 54\r",
+ "4 33 55\r",
+ "4 33 56\r",
+ "4 33 57\r",
+ "4 33 58\r",
+ "4 34 1\r",
+ "4 34 2\r",
+ "4 34 3\r",
+ "4 34 4\r",
+ "4 34 5\r",
+ "4 34 6\r",
+ "4 34 7\r",
+ "4 34 8\r",
+ "4 34 9\r",
+ "4 34 10\r",
+ "4 34 11\r",
+ "4 34 12\r",
+ "4 34 13\r",
+ "4 34 14\r",
+ "4 34 15\r",
+ "4 34 16\r",
+ "4 34 17\r",
+ "4 34 18\r",
+ "4 34 19\r",
+ "4 34 20\r",
+ "4 34 21\r",
+ "4 34 22\r",
+ "4 34 23\r",
+ "4 34 24\r",
+ "4 34 25\r",
+ "4 34 26\r",
+ "4 34 27\r",
+ "4 34 28\r",
+ "4 34 29\r",
+ "4 34 30\r",
+ "4 34 31\r",
+ "4 34 32\r",
+ "4 34 33\r",
+ "4 34 34\r",
+ "4 34 35\r",
+ "4 34 36\r",
+ "4 34 37\r",
+ "4 34 38\r",
+ "4 34 39\r",
+ "4 34 40\r",
+ "4 34 41\r",
+ "4 34 42\r",
+ "4 34 43\r",
+ "4 34 44\r",
+ "4 34 45\r",
+ "4 34 46\r",
+ "4 34 47\r",
+ "4 34 48\r",
+ "4 34 49\r",
+ "4 34 50\r",
+ "4 34 51\r",
+ "4 34 52\r",
+ "4 34 53\r",
+ "4 34 54\r",
+ "4 34 55\r",
+ "4 34 56\r",
+ "4 34 57\r",
+ "4 34 58\r",
+ "4 35 1\r",
+ "4 35 2\r",
+ "4 35 3\r",
+ "4 35 4\r",
+ "4 35 5\r",
+ "4 35 6\r",
+ "4 35 7\r",
+ "4 35 8\r",
+ "4 35 9\r",
+ "4 35 10\r",
+ "4 35 11\r",
+ "4 35 12\r",
+ "4 35 13\r",
+ "4 35 14\r",
+ "4 35 15\r",
+ "4 35 16\r",
+ "4 35 17\r",
+ "4 35 18\r",
+ "4 35 19\r",
+ "4 35 20\r",
+ "4 35 21\r",
+ "4 35 22\r",
+ "4 35 23\r",
+ "4 35 24\r",
+ "4 35 25\r",
+ "4 35 26\r",
+ "4 35 27\r",
+ "4 35 28\r",
+ "4 35 29\r",
+ "4 35 30\r",
+ "4 35 31\r",
+ "4 35 32\r",
+ "4 35 33\r",
+ "4 35 34\r",
+ "4 35 35\r",
+ "4 35 36\r",
+ "4 35 37\r",
+ "4 35 38\r",
+ "4 35 39\r",
+ "4 35 40\r",
+ "4 35 41\r",
+ "4 35 42\r",
+ "4 35 43\r",
+ "4 35 44\r",
+ "4 35 45\r",
+ "4 35 46\r",
+ "4 35 47\r",
+ "4 35 48\r",
+ "4 35 49\r",
+ "4 35 50\r",
+ "4 35 51\r",
+ "4 35 52\r",
+ "4 35 53\r",
+ "4 35 54\r",
+ "4 35 55\r",
+ "4 35 56\r",
+ "4 35 57\r",
+ "4 35 58\r",
+ "4 36 1"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "4 36 2\r",
+ "4 36 3\r",
+ "4 36 4\r",
+ "4 36 5\r",
+ "4 36 6\r",
+ "4 36 7\r",
+ "4 36 8\r",
+ "4 36 9\r",
+ "4 36 10\r",
+ "4 36 11\r",
+ "4 36 12\r",
+ "4 36 13\r",
+ "4 36 14\r",
+ "4 36 15\r",
+ "4 36 16\r",
+ "4 36 17\r",
+ "4 36 18\r",
+ "4 36 19\r",
+ "4 36 20\r",
+ "4 36 21\r",
+ "4 36 22\r",
+ "4 36 23\r",
+ "4 36 24\r",
+ "4 36 25\r",
+ "4 36 26\r",
+ "4 36 27\r",
+ "4 36 28\r",
+ "4 36 29\r",
+ "4 36 30\r",
+ "4 36 31\r",
+ "4 36 32\r",
+ "4 36 33\r",
+ "4 36 34\r",
+ "4 36 35\r",
+ "4 36 36\r",
+ "4 36 37\r",
+ "4 36 38\r",
+ "4 36 39\r",
+ "4 36 40\r",
+ "4 36 41\r",
+ "4 36 42\r",
+ "4 36 43\r",
+ "4 36 44\r",
+ "4 36 45\r",
+ "4 36 46\r",
+ "4 36 47\r",
+ "4 36 48\r",
+ "4 36 49\r",
+ "4 36 50\r",
+ "4 36 51\r",
+ "4 36 52\r",
+ "4 36 53\r",
+ "4 36 54\r",
+ "4 36 55\r",
+ "4 36 56\r",
+ "4 36 57\r",
+ "4 36 58\r",
+ "4 37 1\r",
+ "4 37 2\r",
+ "4 37 3\r",
+ "4 37 4\r",
+ "4 37 5\r",
+ "4 37 6\r",
+ "4 37 7\r",
+ "4 37 8\r",
+ "4 37 9\r",
+ "4 37 10\r",
+ "4 37 11\r",
+ "4 37 12\r",
+ "4 37 13\r",
+ "4 37 14\r",
+ "4 37 15\r",
+ "4 37 16\r",
+ "4 37 17\r",
+ "4 37 18\r",
+ "4 37 19\r",
+ "4 37 20\r",
+ "4 37 21\r",
+ "4 37 22\r",
+ "4 37 23\r",
+ "4 37 24\r",
+ "4 37 25\r",
+ "4 37 26\r",
+ "4 37 27\r",
+ "4 37 28\r",
+ "4 37 29\r",
+ "4 37 30\r",
+ "4 37 31\r",
+ "4 37 32\r",
+ "4 37 33\r",
+ "4 37 34\r",
+ "4 37 35\r",
+ "4 37 36\r",
+ "4 37 37\r",
+ "4 37 38\r",
+ "4 37 39\r",
+ "4 37 40\r",
+ "4 37 41\r",
+ "4 37 42\r",
+ "4 37 43\r",
+ "4 37 44\r",
+ "4 37 45\r",
+ "4 37 46\r",
+ "4 37 47\r",
+ "4 37 48\r",
+ "4 37 49\r",
+ "4 37 50\r",
+ "4 37 51\r",
+ "4 37 52\r",
+ "4 37 53\r",
+ "4 37 54\r",
+ "4 37 55\r",
+ "4 37 56\r",
+ "4 37 57\r",
+ "4 37 58\r",
+ "4 38 1\r",
+ "4 38 2\r",
+ "4 38 3\r",
+ "4 38 4\r",
+ "4 38 5\r",
+ "4 38 6\r",
+ "4 38 7\r",
+ "4 38 8\r",
+ "4 38 9\r",
+ "4 38 10\r",
+ "4 38 11\r",
+ "4 38 12\r",
+ "4 38 13\r",
+ "4 38 14\r",
+ "4 38 15\r",
+ "4 38 16\r",
+ "4 38 17\r",
+ "4 38 18\r",
+ "4 38 19\r",
+ "4 38 20\r",
+ "4 38 21\r",
+ "4 38 22\r",
+ "4 38 23\r",
+ "4 38 24\r",
+ "4 38 25\r",
+ "4 38 26\r",
+ "4 38 27\r",
+ "4 38 28\r",
+ "4 38 29\r",
+ "4 38 30\r",
+ "4 38 31\r",
+ "4 38 32\r",
+ "4 38 33\r",
+ "4 38 34\r",
+ "4 38 35\r",
+ "4 38 36\r",
+ "4 38 37\r",
+ "4 38 38\r",
+ "4 38 39\r",
+ "4 38 40\r",
+ "4 38 41\r",
+ "4 38 42\r",
+ "4 38 43\r",
+ "4 38 44\r",
+ "4 38 45\r",
+ "4 38 46\r",
+ "4 38 47\r",
+ "4 38 48\r",
+ "4 38 49\r",
+ "4 38 50\r",
+ "4 38 51\r",
+ "4 38 52\r",
+ "4 38 53\r",
+ "4 38 54\r",
+ "4 38 55\r",
+ "4 38 56\r",
+ "4 38 57\r",
+ "4 38 58\r",
+ "4 39 1\r",
+ "4 39 2\r",
+ "4 39 3\r",
+ "4 39 4\r",
+ "4 39 5\r",
+ "4 39 6\r",
+ "4 39 7\r",
+ "4 39 8\r",
+ "4 39 9\r",
+ "4 39 10\r",
+ "4 39 11\r",
+ "4 39 12\r",
+ "4 39 13\r",
+ "4 39 14\r",
+ "4 39 15\r",
+ "4 39 16\r",
+ "4 39 17\r",
+ "4 39 18\r",
+ "4 39 19\r",
+ "4 39 20\r",
+ "4 39 21\r",
+ "4 39 22\r",
+ "4 39 23\r",
+ "4 39 24\r",
+ "4 39 25\r",
+ "4 39 26\r",
+ "4 39 27\r",
+ "4 39 28\r",
+ "4 39 29\r",
+ "4 39 30\r",
+ "4 39 31\r",
+ "4 39 32\r",
+ "4 39 33\r",
+ "4 39 34\r",
+ "4 39 35\r",
+ "4 39 36\r",
+ "4 39 37\r",
+ "4 39 38\r",
+ "4 39 39\r",
+ "4 39 40\r",
+ "4 39 41\r",
+ "4 39 42\r",
+ "4 39 43\r",
+ "4 39 44\r",
+ "4 39 45\r",
+ "4 39 46\r",
+ "4 39 47\r",
+ "4 39 48\r",
+ "4 39 49\r",
+ "4 39 50\r",
+ "4 39 51\r",
+ "4 39 52\r",
+ "4 39 53\r",
+ "4 39 54\r",
+ "4 39 55\r",
+ "4 39 56\r",
+ "4 39 57\r",
+ "4 39 58\r",
+ "4 40 1\r",
+ "4 40 2\r",
+ "4 40 3\r",
+ "4 40 4\r",
+ "4 40 5\r",
+ "4 40 6\r",
+ "4 40 7\r",
+ "4 40 8\r",
+ "4 40 9\r",
+ "4 40 10\r",
+ "4 40 11\r",
+ "4 40 12\r",
+ "4 40 13\r",
+ "4 40 14\r",
+ "4 40 15\r",
+ "4 40 16\r",
+ "4 40 17\r",
+ "4 40 18\r",
+ "4 40 19\r",
+ "4 40 20\r",
+ "4 40 21\r",
+ "4 40 22\r",
+ "4 40 23\r",
+ "4 40 24\r",
+ "4 40 25\r",
+ "4 40 26\r",
+ "4 40 27\r",
+ "4 40 28\r",
+ "4 40 29\r",
+ "4 40 30\r",
+ "4 40 31\r",
+ "4 40 32\r",
+ "4 40 33\r",
+ "4 40 34\r",
+ "4 40 35\r",
+ "4 40 36\r",
+ "4 40 37\r",
+ "4 40 38\r",
+ "4 40 39\r",
+ "4 40 40\r",
+ "4 40 41\r",
+ "4 40 42\r",
+ "4 40 43\r",
+ "4 40 44\r",
+ "4 40 45\r",
+ "4 40 46\r",
+ "4 40 47\r",
+ "4 40 48\r",
+ "4 40 49\r",
+ "4 40 50\r",
+ "4 40 51\r",
+ "4 40 52\r",
+ "4 40 53\r",
+ "4 40 54\r",
+ "4 40 55\r",
+ "4 40 56\r",
+ "4 40 57\r",
+ "4 40 58\r",
+ "4 41 1\r",
+ "4 41 2\r",
+ "4 41 3\r",
+ "4 41 4\r",
+ "4 41 5\r",
+ "4 41 6\r",
+ "4 41 7\r",
+ "4 41 8\r",
+ "4 41 9\r",
+ "4 41 10\r",
+ "4 41 11\r",
+ "4 41 12\r",
+ "4 41 13\r",
+ "4 41 14\r",
+ "4 41 15\r",
+ "4 41 16\r",
+ "4 41 17\r",
+ "4 41 18\r",
+ "4 41 19\r",
+ "4 41 20\r",
+ "4 41 21\r",
+ "4 41 22\r",
+ "4 41 23\r",
+ "4 41 24\r",
+ "4 41 25\r",
+ "4 41 26\r",
+ "4 41 27\r",
+ "4 41 28\r",
+ "4 41 29\r",
+ "4 41 30\r",
+ "4 41 31\r",
+ "4 41 32\r",
+ "4 41 33\r",
+ "4 41 34\r",
+ "4 41 35\r",
+ "4 41 36\r",
+ "4 41 37\r",
+ "4 41 38\r",
+ "4 41 39\r",
+ "4 41 40\r",
+ "4 41 41\r",
+ "4 41 42\r",
+ "4 41 43\r",
+ "4 41 44\r",
+ "4 41 45\r",
+ "4 41 46\r",
+ "4 41 47\r",
+ "4 41 48\r",
+ "4 41 49\r",
+ "4 41 50\r",
+ "4 41 51\r",
+ "4 41 52\r",
+ "4 41 53\r",
+ "4 41 54\r",
+ "4 41 55\r",
+ "4 41 56\r",
+ "4 41 57\r",
+ "4 41 58\r",
+ "4 42 1\r",
+ "4 42 2\r",
+ "4 42 3\r",
+ "4 42 4\r",
+ "4 42 5\r",
+ "4 42 6\r",
+ "4 42 7\r",
+ "4 42 8\r",
+ "4 42 9\r",
+ "4 42 10\r",
+ "4 42 11\r",
+ "4 42 12\r",
+ "4 42 13\r",
+ "4 42 14\r",
+ "4 42 15\r",
+ "4 42 16\r",
+ "4 42 17\r",
+ "4 42 18\r",
+ "4 42 19\r",
+ "4 42 20\r",
+ "4 42 21\r",
+ "4 42 22\r",
+ "4 42 23\r",
+ "4 42 24\r",
+ "4 42 25\r",
+ "4 42 26\r",
+ "4 42 27\r",
+ "4 42 28\r",
+ "4 42 29\r",
+ "4 42 30\r",
+ "4 42 31\r",
+ "4 42 32\r",
+ "4 42 33\r",
+ "4 42 34\r",
+ "4 42 35\r",
+ "4 42 36\r",
+ "4 42 37\r",
+ "4 42 38\r",
+ "4 42 39\r",
+ "4 42 40\r",
+ "4 42 41\r",
+ "4 42 42\r",
+ "4 42 43\r",
+ "4 42 44\r",
+ "4 42 45\r",
+ "4 42 46\r",
+ "4 42 47\r",
+ "4 42 48\r",
+ "4 42 49\r",
+ "4 42 50\r",
+ "4 42 51\r",
+ "4 42 52\r",
+ "4 42 53\r",
+ "4 42 54\r",
+ "4 42 55\r",
+ "4 42 56\r",
+ "4 42 57\r",
+ "4 42 58\r",
+ "4 43 1\r",
+ "4 43 2\r",
+ "4 43 3\r",
+ "4 43 4\r",
+ "4 43 5\r",
+ "4 43 6\r",
+ "4 43 7\r",
+ "4 43 8\r",
+ "4 43 9\r",
+ "4 43 10\r",
+ "4 43 11\r",
+ "4 43 12\r",
+ "4 43 13\r",
+ "4 43 14\r",
+ "4 43 15\r",
+ "4 43 16\r",
+ "4 43 17\r",
+ "4 43 18\r",
+ "4 43 19\r",
+ "4 43 20\r",
+ "4 43 21\r",
+ "4 43 22\r",
+ "4 43 23\r",
+ "4 43 24\r",
+ "4 43 25\r",
+ "4 43 26\r",
+ "4 43 27\r",
+ "4 43 28\r",
+ "4 43 29\r",
+ "4 43 30\r",
+ "4 43 31\r",
+ "4 43 32\r",
+ "4 43 33\r",
+ "4 43 34\r",
+ "4 43 35\r",
+ "4 43 36\r",
+ "4 43 37\r",
+ "4 43 38\r",
+ "4 43 39\r",
+ "4 43 40\r",
+ "4 43 41\r",
+ "4 43 42\r",
+ "4 43 43\r",
+ "4 43 44\r",
+ "4 43 45\r",
+ "4 43 46\r",
+ "4 43 47\r",
+ "4 43 48\r",
+ "4 43 49\r",
+ "4 43 50\r",
+ "4 43 51\r",
+ "4 43 52\r",
+ "4 43 53\r",
+ "4 43 54\r",
+ "4 43 55\r",
+ "4 43 56\r",
+ "4 43 57\r",
+ "4 43 58\r",
+ "4 44 1\r",
+ "4 44 2\r",
+ "4 44 3\r",
+ "4 44 4\r",
+ "4 44 5\r",
+ "4 44 6\r",
+ "4 44 7\r",
+ "4 44 8\r",
+ "4 44 9\r",
+ "4 44 10\r",
+ "4 44 11\r",
+ "4 44 12\r",
+ "4 44 13\r",
+ "4 44 14\r",
+ "4 44 15\r",
+ "4 44 16\r",
+ "4 44 17\r",
+ "4 44 18\r",
+ "4 44 19\r",
+ "4 44 20\r",
+ "4 44 21\r",
+ "4 44 22\r",
+ "4 44 23\r",
+ "4 44 24\r",
+ "4 44 25\r",
+ "4 44 26\r",
+ "4 44 27\r",
+ "4 44 28\r",
+ "4 44 29\r",
+ "4 44 30\r",
+ "4 44 31\r",
+ "4 44 32\r",
+ "4 44 33\r",
+ "4 44 34\r",
+ "4 44 35\r",
+ "4 44 36\r",
+ "4 44 37\r",
+ "4 44 38\r",
+ "4 44 39\r",
+ "4 44 40\r",
+ "4 44 41\r",
+ "4 44 42\r",
+ "4 44 43\r",
+ "4 44 44\r",
+ "4 44 45\r",
+ "4 44 46\r",
+ "4 44 47\r",
+ "4 44 48\r",
+ "4 44 49\r",
+ "4 44 50\r",
+ "4 44 51\r",
+ "4 44 52\r",
+ "4 44 53\r",
+ "4 44 54\r",
+ "4 44 55\r",
+ "4 44 56\r",
+ "4 44 57\r",
+ "4 44 58\r",
+ "4 45 1\r",
+ "4 45 2\r",
+ "4 45 3\r",
+ "4 45 4\r",
+ "4 45 5\r",
+ "4 45 6\r",
+ "4 45 7\r",
+ "4 45 8\r",
+ "4 45 9\r",
+ "4 45 10\r",
+ "4 45 11\r",
+ "4 45 12\r",
+ "4 45 13\r",
+ "4 45 14\r",
+ "4 45 15\r",
+ "4 45 16\r",
+ "4 45 17\r",
+ "4 45 18\r",
+ "4 45 19\r",
+ "4 45 20\r",
+ "4 45 21\r",
+ "4 45 22\r",
+ "4 45 23\r",
+ "4 45 24\r",
+ "4 45 25\r",
+ "4 45 26\r",
+ "4 45 27\r",
+ "4 45 28\r",
+ "4 45 29\r",
+ "4 45 30\r",
+ "4 45 31\r",
+ "4 45 32\r",
+ "4 45 33\r",
+ "4 45 34\r",
+ "4 45 35\r",
+ "4 45 36\r",
+ "4 45 37\r",
+ "4 45 38\r",
+ "4 45 39\r",
+ "4 45 40\r",
+ "4 45 41\r",
+ "4 45 42\r",
+ "4 45 43\r",
+ "4 45 44\r",
+ "4 45 45\r",
+ "4 45 46\r",
+ "4 45 47\r",
+ "4 45 48\r",
+ "4 45 49\r",
+ "4 45 50\r",
+ "4 45 51\r",
+ "4 45 52\r",
+ "4 45 53\r",
+ "4 45 54\r",
+ "4 45 55\r",
+ "4 45 56\r",
+ "4 45 57\r",
+ "4 45 58\r",
+ "4 46 1\r",
+ "4 46 2\r",
+ "4 46 3\r",
+ "4 46 4\r",
+ "4 46 5\r",
+ "4 46 6\r",
+ "4 46 7\r",
+ "4 46 8\r",
+ "4 46 9\r",
+ "4 46 10\r",
+ "4 46 11\r",
+ "4 46 12\r",
+ "4 46 13\r",
+ "4 46 14\r",
+ "4 46 15\r",
+ "4 46 16\r",
+ "4 46 17\r",
+ "4 46 18\r",
+ "4 46 19\r",
+ "4 46 20\r",
+ "4 46 21\r",
+ "4 46 22\r",
+ "4 46 23\r",
+ "4 46 24\r",
+ "4 46 25\r",
+ "4 46 26\r",
+ "4 46 27\r",
+ "4 46 28\r",
+ "4 46 29\r",
+ "4 46 30\r",
+ "4 46 31\r",
+ "4 46 32\r",
+ "4 46 33\r",
+ "4 46 34\r",
+ "4 46 35\r",
+ "4 46 36\r",
+ "4 46 37\r",
+ "4 46 38\r",
+ "4 46 39\r",
+ "4 46 40\r",
+ "4 46 41\r",
+ "4 46 42\r",
+ "4 46 43\r",
+ "4 46 44\r",
+ "4 46 45\r",
+ "4 46 46\r",
+ "4 46 47\r",
+ "4 46 48\r",
+ "4 46 49\r",
+ "4 46 50\r",
+ "4 46 51\r",
+ "4 46 52\r",
+ "4 46 53\r",
+ "4 46 54\r",
+ "4 46 55\r",
+ "4 46 56\r",
+ "4 46 57\r",
+ "4 46 58\r",
+ "4 47 1\r",
+ "4 47 2\r",
+ "4 47 3\r",
+ "4 47 4\r",
+ "4 47 5\r",
+ "4 47 6\r",
+ "4 47 7\r",
+ "4 47 8\r",
+ "4 47 9\r",
+ "4 47 10\r",
+ "4 47 11\r",
+ "4 47 12\r",
+ "4 47 13\r",
+ "4 47 14\r",
+ "4 47 15\r",
+ "4 47 16\r",
+ "4 47 17\r",
+ "4 47 18\r",
+ "4 47 19\r",
+ "4 47 20\r",
+ "4 47 21\r",
+ "4 47 22\r",
+ "4 47 23\r",
+ "4 47 24\r",
+ "4 47 25\r",
+ "4 47 26\r",
+ "4 47 27\r",
+ "4 47 28\r",
+ "4 47 29\r",
+ "4 47 30\r",
+ "4 47 31\r",
+ "4 47 32\r",
+ "4 47 33\r",
+ "4 47 34\r",
+ "4 47 35\r",
+ "4 47 36\r",
+ "4 47 37\r",
+ "4 47 38\r",
+ "4 47 39\r",
+ "4 47 40\r",
+ "4 47 41\r",
+ "4 47 42\r",
+ "4 47 43\r",
+ "4 47 44\r",
+ "4 47 45\r",
+ "4 47 46\r",
+ "4 47 47\r",
+ "4 47 48\r",
+ "4 47 49\r",
+ "4 47 50\r",
+ "4 47 51\r",
+ "4 47 52\r",
+ "4 47 53\r",
+ "4 47 54\r",
+ "4 47 55\r",
+ "4 47 56\r",
+ "4 47 57\r",
+ "4 47 58\r",
+ "4 48 1\r",
+ "4 48 2\r",
+ "4 48 3\r",
+ "4 48 4\r",
+ "4 48 5\r",
+ "4 48 6\r",
+ "4 48 7\r",
+ "4 48 8\r",
+ "4 48 9\r",
+ "4 48 10\r",
+ "4 48 11\r",
+ "4 48 12\r",
+ "4 48 13\r",
+ "4 48 14\r",
+ "4 48 15\r",
+ "4 48 16\r",
+ "4 48 17\r",
+ "4 48 18\r",
+ "4 48 19\r",
+ "4 48 20\r",
+ "4 48 21\r",
+ "4 48 22\r",
+ "4 48 23\r",
+ "4 48 24\r",
+ "4 48 25\r",
+ "4 48 26\r",
+ "4 48 27\r",
+ "4 48 28\r",
+ "4 48 29\r",
+ "4 48 30\r",
+ "4 48 31\r",
+ "4 48 32\r",
+ "4 48 33\r",
+ "4 48 34\r",
+ "4 48 35\r",
+ "4 48 36\r",
+ "4 48 37\r",
+ "4 48 38\r",
+ "4 48 39\r",
+ "4 48 40\r",
+ "4 48 41\r",
+ "4 48 42\r",
+ "4 48 43\r",
+ "4 48 44\r",
+ "4 48 45\r",
+ "4 48 46\r",
+ "4 48 47\r",
+ "4 48 48\r",
+ "4 48 49\r",
+ "4 48 50\r",
+ "4 48 51\r",
+ "4 48 52\r",
+ "4 48 53\r",
+ "4 48 54\r",
+ "4 48 55\r",
+ "4 48 56\r",
+ "4 48 57\r",
+ "4 48 58\r",
+ "4 49 1\r",
+ "4 49 2\r",
+ "4 49 3\r",
+ "4 49 4\r",
+ "4 49 5\r",
+ "4 49 6\r",
+ "4 49 7\r",
+ "4 49 8\r",
+ "4 49 9\r",
+ "4 49 10\r",
+ "4 49 11\r",
+ "4 49 12\r",
+ "4 49 13\r",
+ "4 49 14\r",
+ "4 49 15\r",
+ "4 49 16\r",
+ "4 49 17\r",
+ "4 49 18\r",
+ "4 49 19\r",
+ "4 49 20\r",
+ "4 49 21\r",
+ "4 49 22\r",
+ "4 49 23\r",
+ "4 49 24\r",
+ "4 49 25\r",
+ "4 49 26\r",
+ "4 49 27\r",
+ "4 49 28\r",
+ "4 49 29\r",
+ "4 49 30\r",
+ "4 49 31\r",
+ "4 49 32\r",
+ "4 49 33"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "4 49 34\r",
+ "4 49 35\r",
+ "4 49 36\r",
+ "4 49 37\r",
+ "4 49 38\r",
+ "4 49 39\r",
+ "4 49 40\r",
+ "4 49 41\r",
+ "4 49 42\r",
+ "4 49 43\r",
+ "4 49 44\r",
+ "4 49 45\r",
+ "4 49 46\r",
+ "4 49 47\r",
+ "4 49 48\r",
+ "4 49 49\r",
+ "4 49 50\r",
+ "4 49 51\r",
+ "4 49 52\r",
+ "4 49 53\r",
+ "4 49 54\r",
+ "4 49 55\r",
+ "4 49 56\r",
+ "4 49 57\r",
+ "4 49 58\r",
+ "4 50 1\r",
+ "4 50 2\r",
+ "4 50 3\r",
+ "4 50 4\r",
+ "4 50 5\r",
+ "4 50 6\r",
+ "4 50 7\r",
+ "4 50 8\r",
+ "4 50 9\r",
+ "4 50 10\r",
+ "4 50 11\r",
+ "4 50 12\r",
+ "4 50 13\r",
+ "4 50 14\r",
+ "4 50 15\r",
+ "4 50 16\r",
+ "4 50 17\r",
+ "4 50 18\r",
+ "4 50 19\r",
+ "4 50 20\r",
+ "4 50 21\r",
+ "4 50 22\r",
+ "4 50 23\r",
+ "4 50 24\r",
+ "4 50 25\r",
+ "4 50 26\r",
+ "4 50 27\r",
+ "4 50 28\r",
+ "4 50 29\r",
+ "4 50 30\r",
+ "4 50 31\r",
+ "4 50 32\r",
+ "4 50 33\r",
+ "4 50 34\r",
+ "4 50 35\r",
+ "4 50 36\r",
+ "4 50 37\r",
+ "4 50 38\r",
+ "4 50 39\r",
+ "4 50 40\r",
+ "4 50 41\r",
+ "4 50 42\r",
+ "4 50 43\r",
+ "4 50 44\r",
+ "4 50 45\r",
+ "4 50 46\r",
+ "4 50 47\r",
+ "4 50 48\r",
+ "4 50 49\r",
+ "4 50 50\r",
+ "4 50 51\r",
+ "4 50 52\r",
+ "4 50 53\r",
+ "4 50 54\r",
+ "4 50 55\r",
+ "4 50 56\r",
+ "4 50 57\r",
+ "4 50 58\r",
+ "4 51 1\r",
+ "4 51 2\r",
+ "4 51 3\r",
+ "4 51 4\r",
+ "4 51 5\r",
+ "4 51 6\r",
+ "4 51 7\r",
+ "4 51 8\r",
+ "4 51 9\r",
+ "4 51 10\r",
+ "4 51 11\r",
+ "4 51 12\r",
+ "4 51 13\r",
+ "4 51 14\r",
+ "4 51 15\r",
+ "4 51 16\r",
+ "4 51 17\r",
+ "4 51 18\r",
+ "4 51 19\r",
+ "4 51 20\r",
+ "4 51 21\r",
+ "4 51 22\r",
+ "4 51 23\r",
+ "4 51 24\r",
+ "4 51 25\r",
+ "4 51 26\r",
+ "4 51 27\r",
+ "4 51 28\r",
+ "4 51 29\r",
+ "4 51 30\r",
+ "4 51 31\r",
+ "4 51 32\r",
+ "4 51 33\r",
+ "4 51 34\r",
+ "4 51 35\r",
+ "4 51 36\r",
+ "4 51 37\r",
+ "4 51 38\r",
+ "4 51 39\r",
+ "4 51 40\r",
+ "4 51 41\r",
+ "4 51 42\r",
+ "4 51 43\r",
+ "4 51 44\r",
+ "4 51 45\r",
+ "4 51 46\r",
+ "4 51 47\r",
+ "4 51 48\r",
+ "4 51 49\r",
+ "4 51 50\r",
+ "4 51 51\r",
+ "4 51 52\r",
+ "4 51 53\r",
+ "4 51 54\r",
+ "4 51 55\r",
+ "4 51 56\r",
+ "4 51 57\r",
+ "4 51 58\r",
+ "4 52 1\r",
+ "4 52 2\r",
+ "4 52 3\r",
+ "4 52 4\r",
+ "4 52 5\r",
+ "4 52 6\r",
+ "4 52 7\r",
+ "4 52 8\r",
+ "4 52 9\r",
+ "4 52 10\r",
+ "4 52 11\r",
+ "4 52 12\r",
+ "4 52 13\r",
+ "4 52 14\r",
+ "4 52 15\r",
+ "4 52 16\r",
+ "4 52 17\r",
+ "4 52 18\r",
+ "4 52 19\r",
+ "4 52 20\r",
+ "4 52 21\r",
+ "4 52 22\r",
+ "4 52 23\r",
+ "4 52 24\r",
+ "4 52 25\r",
+ "4 52 26\r",
+ "4 52 27\r",
+ "4 52 28\r",
+ "4 52 29\r",
+ "4 52 30\r",
+ "4 52 31\r",
+ "4 52 32\r",
+ "4 52 33\r",
+ "4 52 34\r",
+ "4 52 35\r",
+ "4 52 36\r",
+ "4 52 37\r",
+ "4 52 38\r",
+ "4 52 39\r",
+ "4 52 40\r",
+ "4 52 41\r",
+ "4 52 42\r",
+ "4 52 43\r",
+ "4 52 44\r",
+ "4 52 45\r",
+ "4 52 46\r",
+ "4 52 47\r",
+ "4 52 48\r",
+ "4 52 49\r",
+ "4 52 50\r",
+ "4 52 51\r",
+ "4 52 52\r",
+ "4 52 53\r",
+ "4 52 54\r",
+ "4 52 55\r",
+ "4 52 56\r",
+ "4 52 57\r",
+ "4 52 58\r",
+ "4 53 1\r",
+ "4 53 2\r",
+ "4 53 3\r",
+ "4 53 4\r",
+ "4 53 5\r",
+ "4 53 6\r",
+ "4 53 7\r",
+ "4 53 8\r",
+ "4 53 9\r",
+ "4 53 10\r",
+ "4 53 11\r",
+ "4 53 12\r",
+ "4 53 13\r",
+ "4 53 14\r",
+ "4 53 15\r",
+ "4 53 16\r",
+ "4 53 17\r",
+ "4 53 18\r",
+ "4 53 19\r",
+ "4 53 20\r",
+ "4 53 21\r",
+ "4 53 22\r",
+ "4 53 23\r",
+ "4 53 24\r",
+ "4 53 25\r",
+ "4 53 26\r",
+ "4 53 27\r",
+ "4 53 28\r",
+ "4 53 29\r",
+ "4 53 30\r",
+ "4 53 31\r",
+ "4 53 32\r",
+ "4 53 33\r",
+ "4 53 34\r",
+ "4 53 35\r",
+ "4 53 36\r",
+ "4 53 37\r",
+ "4 53 38\r",
+ "4 53 39\r",
+ "4 53 40\r",
+ "4 53 41\r",
+ "4 53 42\r",
+ "4 53 43\r",
+ "4 53 44\r",
+ "4 53 45\r",
+ "4 53 46\r",
+ "4 53 47\r",
+ "4 53 48\r",
+ "4 53 49\r",
+ "4 53 50\r",
+ "4 53 51\r",
+ "4 53 52\r",
+ "4 53 53\r",
+ "4 53 54\r",
+ "4 53 55\r",
+ "4 53 56\r",
+ "4 53 57\r",
+ "4 53 58\r",
+ "4 54 1\r",
+ "4 54 2\r",
+ "4 54 3\r",
+ "4 54 4\r",
+ "4 54 5\r",
+ "4 54 6\r",
+ "4 54 7\r",
+ "4 54 8\r",
+ "4 54 9\r",
+ "4 54 10\r",
+ "4 54 11\r",
+ "4 54 12\r",
+ "4 54 13\r",
+ "4 54 14\r",
+ "4 54 15\r",
+ "4 54 16\r",
+ "4 54 17\r",
+ "4 54 18\r",
+ "4 54 19\r",
+ "4 54 20\r",
+ "4 54 21\r",
+ "4 54 22\r",
+ "4 54 23\r",
+ "4 54 24\r",
+ "4 54 25\r",
+ "4 54 26\r",
+ "4 54 27\r",
+ "4 54 28\r",
+ "4 54 29\r",
+ "4 54 30\r",
+ "4 54 31\r",
+ "4 54 32\r",
+ "4 54 33\r",
+ "4 54 34\r",
+ "4 54 35\r",
+ "4 54 36\r",
+ "4 54 37\r",
+ "4 54 38\r",
+ "4 54 39\r",
+ "4 54 40\r",
+ "4 54 41\r",
+ "4 54 42\r",
+ "4 54 43\r",
+ "4 54 44\r",
+ "4 54 45\r",
+ "4 54 46\r",
+ "4 54 47\r",
+ "4 54 48\r",
+ "4 54 49\r",
+ "4 54 50\r",
+ "4 54 51\r",
+ "4 54 52\r",
+ "4 54 53\r",
+ "4 54 54\r",
+ "4 54 55\r",
+ "4 54 56\r",
+ "4 54 57\r",
+ "4 54 58\r",
+ "4 55 1\r",
+ "4 55 2\r",
+ "4 55 3\r",
+ "4 55 4\r",
+ "4 55 5\r",
+ "4 55 6\r",
+ "4 55 7\r",
+ "4 55 8\r",
+ "4 55 9\r",
+ "4 55 10\r",
+ "4 55 11\r",
+ "4 55 12\r",
+ "4 55 13\r",
+ "4 55 14\r",
+ "4 55 15\r",
+ "4 55 16\r",
+ "4 55 17\r",
+ "4 55 18\r",
+ "4 55 19\r",
+ "4 55 20\r",
+ "4 55 21\r",
+ "4 55 22\r",
+ "4 55 23\r",
+ "4 55 24\r",
+ "4 55 25\r",
+ "4 55 26\r",
+ "4 55 27\r",
+ "4 55 28\r",
+ "4 55 29\r",
+ "4 55 30\r",
+ "4 55 31\r",
+ "4 55 32\r",
+ "4 55 33\r",
+ "4 55 34\r",
+ "4 55 35\r",
+ "4 55 36\r",
+ "4 55 37\r",
+ "4 55 38\r",
+ "4 55 39\r",
+ "4 55 40\r",
+ "4 55 41\r",
+ "4 55 42\r",
+ "4 55 43\r",
+ "4 55 44\r",
+ "4 55 45\r",
+ "4 55 46\r",
+ "4 55 47\r",
+ "4 55 48\r",
+ "4 55 49\r",
+ "4 55 50\r",
+ "4 55 51\r",
+ "4 55 52\r",
+ "4 55 53\r",
+ "4 55 54\r",
+ "4 55 55\r",
+ "4 55 56\r",
+ "4 55 57\r",
+ "4 55 58\r",
+ "4 56 1\r",
+ "4 56 2\r",
+ "4 56 3\r",
+ "4 56 4\r",
+ "4 56 5\r",
+ "4 56 6\r",
+ "4 56 7\r",
+ "4 56 8\r",
+ "4 56 9\r",
+ "4 56 10\r",
+ "4 56 11\r",
+ "4 56 12\r",
+ "4 56 13\r",
+ "4 56 14\r",
+ "4 56 15\r",
+ "4 56 16\r",
+ "4 56 17\r",
+ "4 56 18\r",
+ "4 56 19\r",
+ "4 56 20\r",
+ "4 56 21\r",
+ "4 56 22\r",
+ "4 56 23\r",
+ "4 56 24\r",
+ "4 56 25\r",
+ "4 56 26\r",
+ "4 56 27\r",
+ "4 56 28\r",
+ "4 56 29\r",
+ "4 56 30\r",
+ "4 56 31\r",
+ "4 56 32\r",
+ "4 56 33\r",
+ "4 56 34\r",
+ "4 56 35\r",
+ "4 56 36\r",
+ "4 56 37\r",
+ "4 56 38\r",
+ "4 56 39\r",
+ "4 56 40\r",
+ "4 56 41\r",
+ "4 56 42\r",
+ "4 56 43\r",
+ "4 56 44\r",
+ "4 56 45\r",
+ "4 56 46\r",
+ "4 56 47\r",
+ "4 56 48\r",
+ "4 56 49\r",
+ "4 56 50\r",
+ "4 56 51\r",
+ "4 56 52\r",
+ "4 56 53\r",
+ "4 56 54\r",
+ "4 56 55\r",
+ "4 56 56\r",
+ "4 56 57\r",
+ "4 56 58\r",
+ "4 57 1\r",
+ "4 57 2\r",
+ "4 57 3\r",
+ "4 57 4\r",
+ "4 57 5\r",
+ "4 57 6\r",
+ "4 57 7\r",
+ "4 57 8\r",
+ "4 57 9\r",
+ "4 57 10\r",
+ "4 57 11\r",
+ "4 57 12\r",
+ "4 57 13\r",
+ "4 57 14\r",
+ "4 57 15\r",
+ "4 57 16\r",
+ "4 57 17\r",
+ "4 57 18\r",
+ "4 57 19\r",
+ "4 57 20\r",
+ "4 57 21\r",
+ "4 57 22\r",
+ "4 57 23\r",
+ "4 57 24\r",
+ "4 57 25\r",
+ "4 57 26\r",
+ "4 57 27\r",
+ "4 57 28\r",
+ "4 57 29\r",
+ "4 57 30\r",
+ "4 57 31\r",
+ "4 57 32\r",
+ "4 57 33\r",
+ "4 57 34\r",
+ "4 57 35\r",
+ "4 57 36\r",
+ "4 57 37\r",
+ "4 57 38\r",
+ "4 57 39\r",
+ "4 57 40\r",
+ "4 57 41\r",
+ "4 57 42\r",
+ "4 57 43\r",
+ "4 57 44\r",
+ "4 57 45\r",
+ "4 57 46\r",
+ "4 57 47\r",
+ "4 57 48\r",
+ "4 57 49\r",
+ "4 57 50\r",
+ "4 57 51\r",
+ "4 57 52\r",
+ "4 57 53\r",
+ "4 57 54\r",
+ "4 57 55\r",
+ "4 57 56\r",
+ "4 57 57\r",
+ "4 57 58\r",
+ "4 58 1\r",
+ "4 58 2\r",
+ "4 58 3\r",
+ "4 58 4\r",
+ "4 58 5\r",
+ "4 58 6\r",
+ "4 58 7\r",
+ "4 58 8\r",
+ "4 58 9\r",
+ "4 58 10\r",
+ "4 58 11\r",
+ "4 58 12\r",
+ "4 58 13\r",
+ "4 58 14\r",
+ "4 58 15\r",
+ "4 58 16\r",
+ "4 58 17\r",
+ "4 58 18\r",
+ "4 58 19\r",
+ "4 58 20\r",
+ "4 58 21\r",
+ "4 58 22\r",
+ "4 58 23\r",
+ "4 58 24\r",
+ "4 58 25\r",
+ "4 58 26\r",
+ "4 58 27\r",
+ "4 58 28\r",
+ "4 58 29\r",
+ "4 58 30\r",
+ "4 58 31\r",
+ "4 58 32\r",
+ "4 58 33\r",
+ "4 58 34\r",
+ "4 58 35\r",
+ "4 58 36\r",
+ "4 58 37\r",
+ "4 58 38\r",
+ "4 58 39\r",
+ "4 58 40\r",
+ "4 58 41\r",
+ "4 58 42\r",
+ "4 58 43\r",
+ "4 58 44\r",
+ "4 58 45\r",
+ "4 58 46\r",
+ "4 58 47\r",
+ "4 58 48\r",
+ "4 58 49\r",
+ "4 58 50\r",
+ "4 58 51\r",
+ "4 58 52\r",
+ "4 58 53\r",
+ "4 58 54\r",
+ "4 58 55\r",
+ "4 58 56\r",
+ "4 58 57\r",
+ "4 58 58\r",
+ "5 1 1\r",
+ "5 1 2\r",
+ "5 1 3\r",
+ "5 1 4\r",
+ "5 1 5\r",
+ "5 1 6\r",
+ "5 1 7\r",
+ "5 1 8\r",
+ "5 1 9\r",
+ "5 1 10\r",
+ "5 1 11\r",
+ "5 1 12\r",
+ "5 1 13\r",
+ "5 1 14\r",
+ "5 1 15\r",
+ "5 1 16\r",
+ "5 1 17\r",
+ "5 1 18\r",
+ "5 1 19\r",
+ "5 1 20\r",
+ "5 1 21\r",
+ "5 1 22\r",
+ "5 1 23\r",
+ "5 1 24\r",
+ "5 1 25\r",
+ "5 1 26\r",
+ "5 1 27\r",
+ "5 1 28\r",
+ "5 1 29\r",
+ "5 1 30\r",
+ "5 1 31\r",
+ "5 1 32\r",
+ "5 1 33\r",
+ "5 1 34\r",
+ "5 1 35\r",
+ "5 1 36\r",
+ "5 1 37\r",
+ "5 1 38\r",
+ "5 1 39\r",
+ "5 1 40\r",
+ "5 1 41\r",
+ "5 1 42\r",
+ "5 1 43\r",
+ "5 1 44\r",
+ "5 1 45\r",
+ "5 1 46\r",
+ "5 1 47\r",
+ "5 1 48\r",
+ "5 1 49\r",
+ "5 1 50\r",
+ "5 1 51\r",
+ "5 1 52\r",
+ "5 1 53\r",
+ "5 1 54\r",
+ "5 1 55\r",
+ "5 1 56\r",
+ "5 1 57\r",
+ "5 1 58\r",
+ "5 2 1\r",
+ "5 2 2\r",
+ "5 2 3\r",
+ "5 2 4\r",
+ "5 2 5\r",
+ "5 2 6\r",
+ "5 2 7\r",
+ "5 2 8\r",
+ "5 2 9\r",
+ "5 2 10\r",
+ "5 2 11\r",
+ "5 2 12\r",
+ "5 2 13\r",
+ "5 2 14\r",
+ "5 2 15\r",
+ "5 2 16\r",
+ "5 2 17\r",
+ "5 2 18\r",
+ "5 2 19\r",
+ "5 2 20\r",
+ "5 2 21\r",
+ "5 2 22\r",
+ "5 2 23\r",
+ "5 2 24\r",
+ "5 2 25\r",
+ "5 2 26\r",
+ "5 2 27\r",
+ "5 2 28\r",
+ "5 2 29\r",
+ "5 2 30\r",
+ "5 2 31\r",
+ "5 2 32\r",
+ "5 2 33\r",
+ "5 2 34\r",
+ "5 2 35\r",
+ "5 2 36\r",
+ "5 2 37\r",
+ "5 2 38\r",
+ "5 2 39\r",
+ "5 2 40\r",
+ "5 2 41\r",
+ "5 2 42\r",
+ "5 2 43\r",
+ "5 2 44\r",
+ "5 2 45\r",
+ "5 2 46\r",
+ "5 2 47\r",
+ "5 2 48\r",
+ "5 2 49\r",
+ "5 2 50\r",
+ "5 2 51\r",
+ "5 2 52\r",
+ "5 2 53\r",
+ "5 2 54\r",
+ "5 2 55\r",
+ "5 2 56\r",
+ "5 2 57\r",
+ "5 2 58\r",
+ "5 3 1\r",
+ "5 3 2\r",
+ "5 3 3\r",
+ "5 3 4\r",
+ "5 3 5\r",
+ "5 3 6\r",
+ "5 3 7\r",
+ "5 3 8\r",
+ "5 3 9\r",
+ "5 3 10\r",
+ "5 3 11\r",
+ "5 3 12\r",
+ "5 3 13\r",
+ "5 3 14\r",
+ "5 3 15\r",
+ "5 3 16\r",
+ "5 3 17\r",
+ "5 3 18\r",
+ "5 3 19\r",
+ "5 3 20\r",
+ "5 3 21\r",
+ "5 3 22\r",
+ "5 3 23\r",
+ "5 3 24\r",
+ "5 3 25\r",
+ "5 3 26\r",
+ "5 3 27\r",
+ "5 3 28\r",
+ "5 3 29\r",
+ "5 3 30\r",
+ "5 3 31\r",
+ "5 3 32\r",
+ "5 3 33\r",
+ "5 3 34\r",
+ "5 3 35\r",
+ "5 3 36\r",
+ "5 3 37\r",
+ "5 3 38\r",
+ "5 3 39\r",
+ "5 3 40\r",
+ "5 3 41\r",
+ "5 3 42\r",
+ "5 3 43\r",
+ "5 3 44\r",
+ "5 3 45\r",
+ "5 3 46\r",
+ "5 3 47\r",
+ "5 3 48\r",
+ "5 3 49\r",
+ "5 3 50\r",
+ "5 3 51\r",
+ "5 3 52\r",
+ "5 3 53\r",
+ "5 3 54\r",
+ "5 3 55\r",
+ "5 3 56\r",
+ "5 3 57\r",
+ "5 3 58"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "5 4 1\r",
+ "5 4 2\r",
+ "5 4 3\r",
+ "5 4 4\r",
+ "5 4 5\r",
+ "5 4 6\r",
+ "5 4 7\r",
+ "5 4 8\r",
+ "5 4 9\r",
+ "5 4 10\r",
+ "5 4 11\r",
+ "5 4 12\r",
+ "5 4 13\r",
+ "5 4 14\r",
+ "5 4 15\r",
+ "5 4 16\r",
+ "5 4 17\r",
+ "5 4 18\r",
+ "5 4 19\r",
+ "5 4 20\r",
+ "5 4 21\r",
+ "5 4 22\r",
+ "5 4 23\r",
+ "5 4 24\r",
+ "5 4 25\r",
+ "5 4 26\r",
+ "5 4 27\r",
+ "5 4 28\r",
+ "5 4 29\r",
+ "5 4 30\r",
+ "5 4 31\r",
+ "5 4 32\r",
+ "5 4 33\r",
+ "5 4 34\r",
+ "5 4 35\r",
+ "5 4 36\r",
+ "5 4 37\r",
+ "5 4 38\r",
+ "5 4 39\r",
+ "5 4 40\r",
+ "5 4 41\r",
+ "5 4 42\r",
+ "5 4 43\r",
+ "5 4 44\r",
+ "5 4 45\r",
+ "5 4 46\r",
+ "5 4 47\r",
+ "5 4 48\r",
+ "5 4 49\r",
+ "5 4 50\r",
+ "5 4 51\r",
+ "5 4 52\r",
+ "5 4 53\r",
+ "5 4 54\r",
+ "5 4 55\r",
+ "5 4 56\r",
+ "5 4 57\r",
+ "5 4 58\r",
+ "5 5 1\r",
+ "5 5 2\r",
+ "5 5 3\r",
+ "5 5 4\r",
+ "5 5 5\r",
+ "5 5 6\r",
+ "5 5 7\r",
+ "5 5 8\r",
+ "5 5 9\r",
+ "5 5 10\r",
+ "5 5 11\r",
+ "5 5 12\r",
+ "5 5 13\r",
+ "5 5 14\r",
+ "5 5 15\r",
+ "5 5 16\r",
+ "5 5 17\r",
+ "5 5 18\r",
+ "5 5 19\r",
+ "5 5 20\r",
+ "5 5 21\r",
+ "5 5 22\r",
+ "5 5 23\r",
+ "5 5 24\r",
+ "5 5 25\r",
+ "5 5 26\r",
+ "5 5 27\r",
+ "5 5 28\r",
+ "5 5 29\r",
+ "5 5 30\r",
+ "5 5 31\r",
+ "5 5 32\r",
+ "5 5 33\r",
+ "5 5 34\r",
+ "5 5 35\r",
+ "5 5 36\r",
+ "5 5 37\r",
+ "5 5 38\r",
+ "5 5 39\r",
+ "5 5 40\r",
+ "5 5 41\r",
+ "5 5 42\r",
+ "5 5 43\r",
+ "5 5 44\r",
+ "5 5 45\r",
+ "5 5 46\r",
+ "5 5 47\r",
+ "5 5 48\r",
+ "5 5 49\r",
+ "5 5 50\r",
+ "5 5 51\r",
+ "5 5 52\r",
+ "5 5 53\r",
+ "5 5 54\r",
+ "5 5 55\r",
+ "5 5 56\r",
+ "5 5 57\r",
+ "5 5 58\r",
+ "5 6 1\r",
+ "5 6 2\r",
+ "5 6 3\r",
+ "5 6 4\r",
+ "5 6 5\r",
+ "5 6 6\r",
+ "5 6 7\r",
+ "5 6 8\r",
+ "5 6 9\r",
+ "5 6 10\r",
+ "5 6 11\r",
+ "5 6 12\r",
+ "5 6 13\r",
+ "5 6 14\r",
+ "5 6 15\r",
+ "5 6 16\r",
+ "5 6 17\r",
+ "5 6 18\r",
+ "5 6 19\r",
+ "5 6 20\r",
+ "5 6 21\r",
+ "5 6 22\r",
+ "5 6 23\r",
+ "5 6 24\r",
+ "5 6 25\r",
+ "5 6 26\r",
+ "5 6 27\r",
+ "5 6 28\r",
+ "5 6 29\r",
+ "5 6 30\r",
+ "5 6 31\r",
+ "5 6 32\r",
+ "5 6 33\r",
+ "5 6 34\r",
+ "5 6 35\r",
+ "5 6 36\r",
+ "5 6 37\r",
+ "5 6 38\r",
+ "5 6 39\r",
+ "5 6 40\r",
+ "5 6 41\r",
+ "5 6 42\r",
+ "5 6 43\r",
+ "5 6 44\r",
+ "5 6 45\r",
+ "5 6 46\r",
+ "5 6 47\r",
+ "5 6 48\r",
+ "5 6 49\r",
+ "5 6 50\r",
+ "5 6 51\r",
+ "5 6 52\r",
+ "5 6 53\r",
+ "5 6 54\r",
+ "5 6 55\r",
+ "5 6 56\r",
+ "5 6 57\r",
+ "5 6 58\r",
+ "5 7 1\r",
+ "5 7 2\r",
+ "5 7 3\r",
+ "5 7 4\r",
+ "5 7 5\r",
+ "5 7 6\r",
+ "5 7 7\r",
+ "5 7 8\r",
+ "5 7 9\r",
+ "5 7 10\r",
+ "5 7 11\r",
+ "5 7 12\r",
+ "5 7 13\r",
+ "5 7 14\r",
+ "5 7 15\r",
+ "5 7 16\r",
+ "5 7 17\r",
+ "5 7 18\r",
+ "5 7 19\r",
+ "5 7 20\r",
+ "5 7 21\r",
+ "5 7 22\r",
+ "5 7 23\r",
+ "5 7 24\r",
+ "5 7 25\r",
+ "5 7 26\r",
+ "5 7 27\r",
+ "5 7 28\r",
+ "5 7 29\r",
+ "5 7 30\r",
+ "5 7 31\r",
+ "5 7 32\r",
+ "5 7 33\r",
+ "5 7 34\r",
+ "5 7 35\r",
+ "5 7 36\r",
+ "5 7 37\r",
+ "5 7 38\r",
+ "5 7 39\r",
+ "5 7 40\r",
+ "5 7 41\r",
+ "5 7 42\r",
+ "5 7 43\r",
+ "5 7 44\r",
+ "5 7 45\r",
+ "5 7 46\r",
+ "5 7 47\r",
+ "5 7 48\r",
+ "5 7 49\r",
+ "5 7 50\r",
+ "5 7 51\r",
+ "5 7 52\r",
+ "5 7 53\r",
+ "5 7 54\r",
+ "5 7 55\r",
+ "5 7 56\r",
+ "5 7 57\r",
+ "5 7 58\r",
+ "5 8 1\r",
+ "5 8 2\r",
+ "5 8 3\r",
+ "5 8 4\r",
+ "5 8 5\r",
+ "5 8 6\r",
+ "5 8 7\r",
+ "5 8 8\r",
+ "5 8 9\r",
+ "5 8 10\r",
+ "5 8 11\r",
+ "5 8 12\r",
+ "5 8 13\r",
+ "5 8 14\r",
+ "5 8 15\r",
+ "5 8 16\r",
+ "5 8 17\r",
+ "5 8 18\r",
+ "5 8 19\r",
+ "5 8 20\r",
+ "5 8 21\r",
+ "5 8 22\r",
+ "5 8 23\r",
+ "5 8 24\r",
+ "5 8 25\r",
+ "5 8 26\r",
+ "5 8 27\r",
+ "5 8 28\r",
+ "5 8 29\r",
+ "5 8 30\r",
+ "5 8 31\r",
+ "5 8 32\r",
+ "5 8 33\r",
+ "5 8 34\r",
+ "5 8 35\r",
+ "5 8 36\r",
+ "5 8 37\r",
+ "5 8 38\r",
+ "5 8 39\r",
+ "5 8 40\r",
+ "5 8 41\r",
+ "5 8 42\r",
+ "5 8 43\r",
+ "5 8 44\r",
+ "5 8 45\r",
+ "5 8 46\r",
+ "5 8 47\r",
+ "5 8 48\r",
+ "5 8 49\r",
+ "5 8 50\r",
+ "5 8 51\r",
+ "5 8 52\r",
+ "5 8 53\r",
+ "5 8 54\r",
+ "5 8 55\r",
+ "5 8 56\r",
+ "5 8 57\r",
+ "5 8 58\r",
+ "5 9 1\r",
+ "5 9 2\r",
+ "5 9 3\r",
+ "5 9 4\r",
+ "5 9 5\r",
+ "5 9 6\r",
+ "5 9 7\r",
+ "5 9 8\r",
+ "5 9 9\r",
+ "5 9 10\r",
+ "5 9 11\r",
+ "5 9 12\r",
+ "5 9 13\r",
+ "5 9 14\r",
+ "5 9 15\r",
+ "5 9 16\r",
+ "5 9 17\r",
+ "5 9 18\r",
+ "5 9 19\r",
+ "5 9 20\r",
+ "5 9 21\r",
+ "5 9 22\r",
+ "5 9 23\r",
+ "5 9 24\r",
+ "5 9 25\r",
+ "5 9 26\r",
+ "5 9 27\r",
+ "5 9 28\r",
+ "5 9 29\r",
+ "5 9 30\r",
+ "5 9 31\r",
+ "5 9 32\r",
+ "5 9 33\r",
+ "5 9 34\r",
+ "5 9 35\r",
+ "5 9 36\r",
+ "5 9 37\r",
+ "5 9 38\r",
+ "5 9 39\r",
+ "5 9 40\r",
+ "5 9 41\r",
+ "5 9 42\r",
+ "5 9 43\r",
+ "5 9 44\r",
+ "5 9 45\r",
+ "5 9 46\r",
+ "5 9 47\r",
+ "5 9 48\r",
+ "5 9 49\r",
+ "5 9 50\r",
+ "5 9 51\r",
+ "5 9 52\r",
+ "5 9 53\r",
+ "5 9 54\r",
+ "5 9 55\r",
+ "5 9 56\r",
+ "5 9 57\r",
+ "5 9 58\r",
+ "5 10 1\r",
+ "5 10 2\r",
+ "5 10 3\r",
+ "5 10 4\r",
+ "5 10 5\r",
+ "5 10 6\r",
+ "5 10 7\r",
+ "5 10 8\r",
+ "5 10 9\r",
+ "5 10 10\r",
+ "5 10 11\r",
+ "5 10 12\r",
+ "5 10 13\r",
+ "5 10 14\r",
+ "5 10 15\r",
+ "5 10 16\r",
+ "5 10 17\r",
+ "5 10 18\r",
+ "5 10 19\r",
+ "5 10 20\r",
+ "5 10 21\r",
+ "5 10 22\r",
+ "5 10 23\r",
+ "5 10 24\r",
+ "5 10 25\r",
+ "5 10 26\r",
+ "5 10 27\r",
+ "5 10 28\r",
+ "5 10 29\r",
+ "5 10 30\r",
+ "5 10 31\r",
+ "5 10 32\r",
+ "5 10 33\r",
+ "5 10 34\r",
+ "5 10 35\r",
+ "5 10 36\r",
+ "5 10 37\r",
+ "5 10 38\r",
+ "5 10 39\r",
+ "5 10 40\r",
+ "5 10 41\r",
+ "5 10 42\r",
+ "5 10 43\r",
+ "5 10 44\r",
+ "5 10 45\r",
+ "5 10 46\r",
+ "5 10 47\r",
+ "5 10 48\r",
+ "5 10 49\r",
+ "5 10 50\r",
+ "5 10 51\r",
+ "5 10 52\r",
+ "5 10 53\r",
+ "5 10 54\r",
+ "5 10 55\r",
+ "5 10 56\r",
+ "5 10 57\r",
+ "5 10 58\r",
+ "5 11 1\r",
+ "5 11 2\r",
+ "5 11 3\r",
+ "5 11 4\r",
+ "5 11 5\r",
+ "5 11 6\r",
+ "5 11 7\r",
+ "5 11 8\r",
+ "5 11 9\r",
+ "5 11 10\r",
+ "5 11 11\r",
+ "5 11 12\r",
+ "5 11 13\r",
+ "5 11 14\r",
+ "5 11 15\r",
+ "5 11 16\r",
+ "5 11 17\r",
+ "5 11 18\r",
+ "5 11 19\r",
+ "5 11 20\r",
+ "5 11 21\r",
+ "5 11 22\r",
+ "5 11 23\r",
+ "5 11 24\r",
+ "5 11 25\r",
+ "5 11 26\r",
+ "5 11 27\r",
+ "5 11 28\r",
+ "5 11 29\r",
+ "5 11 30\r",
+ "5 11 31\r",
+ "5 11 32\r",
+ "5 11 33\r",
+ "5 11 34\r",
+ "5 11 35\r",
+ "5 11 36\r",
+ "5 11 37\r",
+ "5 11 38\r",
+ "5 11 39\r",
+ "5 11 40\r",
+ "5 11 41\r",
+ "5 11 42\r",
+ "5 11 43\r",
+ "5 11 44\r",
+ "5 11 45\r",
+ "5 11 46\r",
+ "5 11 47\r",
+ "5 11 48\r",
+ "5 11 49\r",
+ "5 11 50\r",
+ "5 11 51\r",
+ "5 11 52\r",
+ "5 11 53\r",
+ "5 11 54\r",
+ "5 11 55\r",
+ "5 11 56\r",
+ "5 11 57\r",
+ "5 11 58\r",
+ "5 12 1\r",
+ "5 12 2\r",
+ "5 12 3\r",
+ "5 12 4\r",
+ "5 12 5\r",
+ "5 12 6\r",
+ "5 12 7\r",
+ "5 12 8\r",
+ "5 12 9\r",
+ "5 12 10\r",
+ "5 12 11\r",
+ "5 12 12\r",
+ "5 12 13\r",
+ "5 12 14\r",
+ "5 12 15\r",
+ "5 12 16\r",
+ "5 12 17\r",
+ "5 12 18\r",
+ "5 12 19\r",
+ "5 12 20\r",
+ "5 12 21\r",
+ "5 12 22\r",
+ "5 12 23\r",
+ "5 12 24\r",
+ "5 12 25\r",
+ "5 12 26\r",
+ "5 12 27\r",
+ "5 12 28\r",
+ "5 12 29\r",
+ "5 12 30\r",
+ "5 12 31\r",
+ "5 12 32\r",
+ "5 12 33\r",
+ "5 12 34\r",
+ "5 12 35\r",
+ "5 12 36\r",
+ "5 12 37\r",
+ "5 12 38\r",
+ "5 12 39\r",
+ "5 12 40\r",
+ "5 12 41\r",
+ "5 12 42\r",
+ "5 12 43\r",
+ "5 12 44\r",
+ "5 12 45\r",
+ "5 12 46\r",
+ "5 12 47\r",
+ "5 12 48\r",
+ "5 12 49\r",
+ "5 12 50\r",
+ "5 12 51\r",
+ "5 12 52\r",
+ "5 12 53\r",
+ "5 12 54\r",
+ "5 12 55\r",
+ "5 12 56\r",
+ "5 12 57\r",
+ "5 12 58\r",
+ "5 13 1\r",
+ "5 13 2\r",
+ "5 13 3\r",
+ "5 13 4\r",
+ "5 13 5\r",
+ "5 13 6\r",
+ "5 13 7\r",
+ "5 13 8\r",
+ "5 13 9\r",
+ "5 13 10\r",
+ "5 13 11\r",
+ "5 13 12\r",
+ "5 13 13\r",
+ "5 13 14\r",
+ "5 13 15\r",
+ "5 13 16\r",
+ "5 13 17\r",
+ "5 13 18\r",
+ "5 13 19\r",
+ "5 13 20\r",
+ "5 13 21\r",
+ "5 13 22\r",
+ "5 13 23\r",
+ "5 13 24\r",
+ "5 13 25\r",
+ "5 13 26\r",
+ "5 13 27\r",
+ "5 13 28\r",
+ "5 13 29\r",
+ "5 13 30\r",
+ "5 13 31\r",
+ "5 13 32\r",
+ "5 13 33\r",
+ "5 13 34\r",
+ "5 13 35\r",
+ "5 13 36\r",
+ "5 13 37\r",
+ "5 13 38\r",
+ "5 13 39\r",
+ "5 13 40\r",
+ "5 13 41\r",
+ "5 13 42\r",
+ "5 13 43\r",
+ "5 13 44\r",
+ "5 13 45\r",
+ "5 13 46\r",
+ "5 13 47\r",
+ "5 13 48\r",
+ "5 13 49\r",
+ "5 13 50\r",
+ "5 13 51\r",
+ "5 13 52\r",
+ "5 13 53\r",
+ "5 13 54\r",
+ "5 13 55\r",
+ "5 13 56\r",
+ "5 13 57\r",
+ "5 13 58\r",
+ "5 14 1\r",
+ "5 14 2\r",
+ "5 14 3\r",
+ "5 14 4\r",
+ "5 14 5\r",
+ "5 14 6\r",
+ "5 14 7\r",
+ "5 14 8\r",
+ "5 14 9\r",
+ "5 14 10\r",
+ "5 14 11\r",
+ "5 14 12\r",
+ "5 14 13\r",
+ "5 14 14\r",
+ "5 14 15\r",
+ "5 14 16\r",
+ "5 14 17\r",
+ "5 14 18\r",
+ "5 14 19\r",
+ "5 14 20\r",
+ "5 14 21\r",
+ "5 14 22\r",
+ "5 14 23\r",
+ "5 14 24\r",
+ "5 14 25\r",
+ "5 14 26\r",
+ "5 14 27\r",
+ "5 14 28\r",
+ "5 14 29\r",
+ "5 14 30\r",
+ "5 14 31\r",
+ "5 14 32\r",
+ "5 14 33\r",
+ "5 14 34\r",
+ "5 14 35\r",
+ "5 14 36\r",
+ "5 14 37\r",
+ "5 14 38\r",
+ "5 14 39\r",
+ "5 14 40\r",
+ "5 14 41\r",
+ "5 14 42\r",
+ "5 14 43\r",
+ "5 14 44\r",
+ "5 14 45\r",
+ "5 14 46\r",
+ "5 14 47\r",
+ "5 14 48\r",
+ "5 14 49\r",
+ "5 14 50\r",
+ "5 14 51\r",
+ "5 14 52\r",
+ "5 14 53\r",
+ "5 14 54\r",
+ "5 14 55\r",
+ "5 14 56\r",
+ "5 14 57\r",
+ "5 14 58\r",
+ "5 15 1\r",
+ "5 15 2\r",
+ "5 15 3\r",
+ "5 15 4\r",
+ "5 15 5\r",
+ "5 15 6\r",
+ "5 15 7\r",
+ "5 15 8\r",
+ "5 15 9\r",
+ "5 15 10\r",
+ "5 15 11\r",
+ "5 15 12\r",
+ "5 15 13\r",
+ "5 15 14\r",
+ "5 15 15\r",
+ "5 15 16\r",
+ "5 15 17\r",
+ "5 15 18\r",
+ "5 15 19\r",
+ "5 15 20\r",
+ "5 15 21\r",
+ "5 15 22\r",
+ "5 15 23\r",
+ "5 15 24\r",
+ "5 15 25\r",
+ "5 15 26\r",
+ "5 15 27\r",
+ "5 15 28\r",
+ "5 15 29\r",
+ "5 15 30\r",
+ "5 15 31\r",
+ "5 15 32\r",
+ "5 15 33\r",
+ "5 15 34\r",
+ "5 15 35\r",
+ "5 15 36\r",
+ "5 15 37\r",
+ "5 15 38\r",
+ "5 15 39\r",
+ "5 15 40\r",
+ "5 15 41\r",
+ "5 15 42\r",
+ "5 15 43\r",
+ "5 15 44\r",
+ "5 15 45\r",
+ "5 15 46\r",
+ "5 15 47\r",
+ "5 15 48\r",
+ "5 15 49\r",
+ "5 15 50\r",
+ "5 15 51\r",
+ "5 15 52\r",
+ "5 15 53\r",
+ "5 15 54\r",
+ "5 15 55\r",
+ "5 15 56\r",
+ "5 15 57\r",
+ "5 15 58\r",
+ "5 16 1\r",
+ "5 16 2\r",
+ "5 16 3\r",
+ "5 16 4\r",
+ "5 16 5\r",
+ "5 16 6\r",
+ "5 16 7\r",
+ "5 16 8\r",
+ "5 16 9\r",
+ "5 16 10\r",
+ "5 16 11\r",
+ "5 16 12\r",
+ "5 16 13\r",
+ "5 16 14\r",
+ "5 16 15\r",
+ "5 16 16\r",
+ "5 16 17\r",
+ "5 16 18\r",
+ "5 16 19\r",
+ "5 16 20\r",
+ "5 16 21\r",
+ "5 16 22\r",
+ "5 16 23\r",
+ "5 16 24\r",
+ "5 16 25\r",
+ "5 16 26\r",
+ "5 16 27\r",
+ "5 16 28\r",
+ "5 16 29\r",
+ "5 16 30\r",
+ "5 16 31\r",
+ "5 16 32\r",
+ "5 16 33\r",
+ "5 16 34\r",
+ "5 16 35\r",
+ "5 16 36\r",
+ "5 16 37\r",
+ "5 16 38\r",
+ "5 16 39\r",
+ "5 16 40\r",
+ "5 16 41\r",
+ "5 16 42\r",
+ "5 16 43\r",
+ "5 16 44\r",
+ "5 16 45\r",
+ "5 16 46\r",
+ "5 16 47\r",
+ "5 16 48\r",
+ "5 16 49\r",
+ "5 16 50\r",
+ "5 16 51\r",
+ "5 16 52\r",
+ "5 16 53\r",
+ "5 16 54\r",
+ "5 16 55\r",
+ "5 16 56\r",
+ "5 16 57\r",
+ "5 16 58\r",
+ "5 17 1\r",
+ "5 17 2\r",
+ "5 17 3\r",
+ "5 17 4\r",
+ "5 17 5\r",
+ "5 17 6\r",
+ "5 17 7\r",
+ "5 17 8\r",
+ "5 17 9\r",
+ "5 17 10\r",
+ "5 17 11\r",
+ "5 17 12\r",
+ "5 17 13\r",
+ "5 17 14\r",
+ "5 17 15\r",
+ "5 17 16\r",
+ "5 17 17\r",
+ "5 17 18\r",
+ "5 17 19\r",
+ "5 17 20\r",
+ "5 17 21\r",
+ "5 17 22\r",
+ "5 17 23\r",
+ "5 17 24\r",
+ "5 17 25\r",
+ "5 17 26\r",
+ "5 17 27\r",
+ "5 17 28\r",
+ "5 17 29\r",
+ "5 17 30\r",
+ "5 17 31\r",
+ "5 17 32\r",
+ "5 17 33\r",
+ "5 17 34\r",
+ "5 17 35\r",
+ "5 17 36\r",
+ "5 17 37\r",
+ "5 17 38\r",
+ "5 17 39\r",
+ "5 17 40\r",
+ "5 17 41\r",
+ "5 17 42\r",
+ "5 17 43\r",
+ "5 17 44\r",
+ "5 17 45\r",
+ "5 17 46\r",
+ "5 17 47\r",
+ "5 17 48\r",
+ "5 17 49\r",
+ "5 17 50\r",
+ "5 17 51\r",
+ "5 17 52\r",
+ "5 17 53\r",
+ "5 17 54\r",
+ "5 17 55\r",
+ "5 17 56\r",
+ "5 17 57\r",
+ "5 17 58\r",
+ "5 18 1\r",
+ "5 18 2\r",
+ "5 18 3\r",
+ "5 18 4\r",
+ "5 18 5\r",
+ "5 18 6\r",
+ "5 18 7\r",
+ "5 18 8\r",
+ "5 18 9\r",
+ "5 18 10\r",
+ "5 18 11\r",
+ "5 18 12\r",
+ "5 18 13\r",
+ "5 18 14\r",
+ "5 18 15\r",
+ "5 18 16\r",
+ "5 18 17\r",
+ "5 18 18\r",
+ "5 18 19\r",
+ "5 18 20\r",
+ "5 18 21\r",
+ "5 18 22\r",
+ "5 18 23\r",
+ "5 18 24\r",
+ "5 18 25\r",
+ "5 18 26\r",
+ "5 18 27\r",
+ "5 18 28\r",
+ "5 18 29\r",
+ "5 18 30\r",
+ "5 18 31\r",
+ "5 18 32\r",
+ "5 18 33\r",
+ "5 18 34\r",
+ "5 18 35\r",
+ "5 18 36\r",
+ "5 18 37\r",
+ "5 18 38\r",
+ "5 18 39\r",
+ "5 18 40\r",
+ "5 18 41\r",
+ "5 18 42\r",
+ "5 18 43\r",
+ "5 18 44\r",
+ "5 18 45\r",
+ "5 18 46\r",
+ "5 18 47\r",
+ "5 18 48\r",
+ "5 18 49\r",
+ "5 18 50\r",
+ "5 18 51\r",
+ "5 18 52\r",
+ "5 18 53\r",
+ "5 18 54\r",
+ "5 18 55\r",
+ "5 18 56\r",
+ "5 18 57\r",
+ "5 18 58\r",
+ "5 19 1\r",
+ "5 19 2\r",
+ "5 19 3\r",
+ "5 19 4\r",
+ "5 19 5\r",
+ "5 19 6\r",
+ "5 19 7\r",
+ "5 19 8\r",
+ "5 19 9\r",
+ "5 19 10\r",
+ "5 19 11\r",
+ "5 19 12\r",
+ "5 19 13\r",
+ "5 19 14\r",
+ "5 19 15\r",
+ "5 19 16\r",
+ "5 19 17\r",
+ "5 19 18\r",
+ "5 19 19\r",
+ "5 19 20\r",
+ "5 19 21\r",
+ "5 19 22\r",
+ "5 19 23\r",
+ "5 19 24\r",
+ "5 19 25\r",
+ "5 19 26\r",
+ "5 19 27\r",
+ "5 19 28\r",
+ "5 19 29\r",
+ "5 19 30\r",
+ "5 19 31\r",
+ "5 19 32\r",
+ "5 19 33\r",
+ "5 19 34\r",
+ "5 19 35\r",
+ "5 19 36\r",
+ "5 19 37\r",
+ "5 19 38\r",
+ "5 19 39\r",
+ "5 19 40\r",
+ "5 19 41\r",
+ "5 19 42\r",
+ "5 19 43\r",
+ "5 19 44\r",
+ "5 19 45\r",
+ "5 19 46\r",
+ "5 19 47\r",
+ "5 19 48\r",
+ "5 19 49\r",
+ "5 19 50\r",
+ "5 19 51\r",
+ "5 19 52\r",
+ "5 19 53\r",
+ "5 19 54\r",
+ "5 19 55\r",
+ "5 19 56\r",
+ "5 19 57\r",
+ "5 19 58\r",
+ "5 20 1\r",
+ "5 20 2\r",
+ "5 20 3\r",
+ "5 20 4\r",
+ "5 20 5\r",
+ "5 20 6\r",
+ "5 20 7\r",
+ "5 20 8\r",
+ "5 20 9\r",
+ "5 20 10\r",
+ "5 20 11\r",
+ "5 20 12\r",
+ "5 20 13\r",
+ "5 20 14\r",
+ "5 20 15\r",
+ "5 20 16\r",
+ "5 20 17\r",
+ "5 20 18\r",
+ "5 20 19\r",
+ "5 20 20\r",
+ "5 20 21\r",
+ "5 20 22\r",
+ "5 20 23\r",
+ "5 20 24\r",
+ "5 20 25\r",
+ "5 20 26\r",
+ "5 20 27\r",
+ "5 20 28\r",
+ "5 20 29\r",
+ "5 20 30\r",
+ "5 20 31\r",
+ "5 20 32\r",
+ "5 20 33\r",
+ "5 20 34\r",
+ "5 20 35\r",
+ "5 20 36\r",
+ "5 20 37\r",
+ "5 20 38\r",
+ "5 20 39\r",
+ "5 20 40\r",
+ "5 20 41\r",
+ "5 20 42\r",
+ "5 20 43\r",
+ "5 20 44\r",
+ "5 20 45\r",
+ "5 20 46\r",
+ "5 20 47\r",
+ "5 20 48\r",
+ "5 20 49\r",
+ "5 20 50\r",
+ "5 20 51\r",
+ "5 20 52\r",
+ "5 20 53\r",
+ "5 20 54\r",
+ "5 20 55\r",
+ "5 20 56\r",
+ "5 20 57\r",
+ "5 20 58\r",
+ "5 21 1\r",
+ "5 21 2\r",
+ "5 21 3\r",
+ "5 21 4\r",
+ "5 21 5\r",
+ "5 21 6\r",
+ "5 21 7\r",
+ "5 21 8\r",
+ "5 21 9\r",
+ "5 21 10\r",
+ "5 21 11\r",
+ "5 21 12\r",
+ "5 21 13\r",
+ "5 21 14\r",
+ "5 21 15\r",
+ "5 21 16\r",
+ "5 21 17\r",
+ "5 21 18\r",
+ "5 21 19\r",
+ "5 21 20\r",
+ "5 21 21\r",
+ "5 21 22\r",
+ "5 21 23\r",
+ "5 21 24\r",
+ "5 21 25\r",
+ "5 21 26\r",
+ "5 21 27\r",
+ "5 21 28\r",
+ "5 21 29\r",
+ "5 21 30\r",
+ "5 21 31\r",
+ "5 21 32\r",
+ "5 21 33\r",
+ "5 21 34\r",
+ "5 21 35\r",
+ "5 21 36\r",
+ "5 21 37\r",
+ "5 21 38\r",
+ "5 21 39\r",
+ "5 21 40\r",
+ "5 21 41\r",
+ "5 21 42\r",
+ "5 21 43\r",
+ "5 21 44\r",
+ "5 21 45\r",
+ "5 21 46\r",
+ "5 21 47\r",
+ "5 21 48\r",
+ "5 21 49\r",
+ "5 21 50\r",
+ "5 21 51\r",
+ "5 21 52\r",
+ "5 21 53\r",
+ "5 21 54\r",
+ "5 21 55\r",
+ "5 21 56\r",
+ "5 21 57\r",
+ "5 21 58\r",
+ "5 22 1\r",
+ "5 22 2\r",
+ "5 22 3\r",
+ "5 22 4\r",
+ "5 22 5\r",
+ "5 22 6\r",
+ "5 22 7\r",
+ "5 22 8\r",
+ "5 22 9\r",
+ "5 22 10\r",
+ "5 22 11\r",
+ "5 22 12\r",
+ "5 22 13\r",
+ "5 22 14\r",
+ "5 22 15\r",
+ "5 22 16\r",
+ "5 22 17\r",
+ "5 22 18\r",
+ "5 22 19\r",
+ "5 22 20\r",
+ "5 22 21\r",
+ "5 22 22\r",
+ "5 22 23\r",
+ "5 22 24\r",
+ "5 22 25\r",
+ "5 22 26\r",
+ "5 22 27\r",
+ "5 22 28\r",
+ "5 22 29\r",
+ "5 22 30\r",
+ "5 22 31\r",
+ "5 22 32\r",
+ "5 22 33\r",
+ "5 22 34\r",
+ "5 22 35\r",
+ "5 22 36\r",
+ "5 22 37\r",
+ "5 22 38\r",
+ "5 22 39\r",
+ "5 22 40\r",
+ "5 22 41\r",
+ "5 22 42\r",
+ "5 22 43\r",
+ "5 22 44\r",
+ "5 22 45\r",
+ "5 22 46\r",
+ "5 22 47\r",
+ "5 22 48\r",
+ "5 22 49\r",
+ "5 22 50\r",
+ "5 22 51\r",
+ "5 22 52\r",
+ "5 22 53\r",
+ "5 22 54\r",
+ "5 22 55\r",
+ "5 22 56\r",
+ "5 22 57\r",
+ "5 22 58\r",
+ "5 23 1\r",
+ "5 23 2\r",
+ "5 23 3\r",
+ "5 23 4\r",
+ "5 23 5\r",
+ "5 23 6\r",
+ "5 23 7\r",
+ "5 23 8\r",
+ "5 23 9\r",
+ "5 23 10\r",
+ "5 23 11\r",
+ "5 23 12\r",
+ "5 23 13\r",
+ "5 23 14\r",
+ "5 23 15\r",
+ "5 23 16\r",
+ "5 23 17\r",
+ "5 23 18\r",
+ "5 23 19\r",
+ "5 23 20\r",
+ "5 23 21\r",
+ "5 23 22\r",
+ "5 23 23\r",
+ "5 23 24\r",
+ "5 23 25\r",
+ "5 23 26\r",
+ "5 23 27\r",
+ "5 23 28\r",
+ "5 23 29\r",
+ "5 23 30\r",
+ "5 23 31\r",
+ "5 23 32\r",
+ "5 23 33\r",
+ "5 23 34\r",
+ "5 23 35\r",
+ "5 23 36\r",
+ "5 23 37\r",
+ "5 23 38\r",
+ "5 23 39\r",
+ "5 23 40\r",
+ "5 23 41\r",
+ "5 23 42\r",
+ "5 23 43\r",
+ "5 23 44\r",
+ "5 23 45\r",
+ "5 23 46\r",
+ "5 23 47\r",
+ "5 23 48\r",
+ "5 23 49\r",
+ "5 23 50\r",
+ "5 23 51\r",
+ "5 23 52\r",
+ "5 23 53\r",
+ "5 23 54\r",
+ "5 23 55\r",
+ "5 23 56\r",
+ "5 23 57\r",
+ "5 23 58\r",
+ "5 24 1\r",
+ "5 24 2\r",
+ "5 24 3\r",
+ "5 24 4\r",
+ "5 24 5\r",
+ "5 24 6\r",
+ "5 24 7\r",
+ "5 24 8\r",
+ "5 24 9\r",
+ "5 24 10\r",
+ "5 24 11\r",
+ "5 24 12\r",
+ "5 24 13\r",
+ "5 24 14\r",
+ "5 24 15\r",
+ "5 24 16\r",
+ "5 24 17\r",
+ "5 24 18\r",
+ "5 24 19\r",
+ "5 24 20\r",
+ "5 24 21\r",
+ "5 24 22\r",
+ "5 24 23\r",
+ "5 24 24\r",
+ "5 24 25\r",
+ "5 24 26\r",
+ "5 24 27\r",
+ "5 24 28\r",
+ "5 24 29\r",
+ "5 24 30\r",
+ "5 24 31\r",
+ "5 24 32\r",
+ "5 24 33\r",
+ "5 24 34\r",
+ "5 24 35\r",
+ "5 24 36\r",
+ "5 24 37\r",
+ "5 24 38\r",
+ "5 24 39\r",
+ "5 24 40\r",
+ "5 24 41\r",
+ "5 24 42\r",
+ "5 24 43\r",
+ "5 24 44\r",
+ "5 24 45\r",
+ "5 24 46\r",
+ "5 24 47\r",
+ "5 24 48\r",
+ "5 24 49\r",
+ "5 24 50\r",
+ "5 24 51\r",
+ "5 24 52\r",
+ "5 24 53\r",
+ "5 24 54\r",
+ "5 24 55\r",
+ "5 24 56\r",
+ "5 24 57\r",
+ "5 24 58\r",
+ "5 25 1\r",
+ "5 25 2\r",
+ "5 25 3\r",
+ "5 25 4\r",
+ "5 25 5\r",
+ "5 25 6\r",
+ "5 25 7\r",
+ "5 25 8\r",
+ "5 25 9\r",
+ "5 25 10\r",
+ "5 25 11\r",
+ "5 25 12\r",
+ "5 25 13\r",
+ "5 25 14\r",
+ "5 25 15\r",
+ "5 25 16\r",
+ "5 25 17\r",
+ "5 25 18\r",
+ "5 25 19\r",
+ "5 25 20\r",
+ "5 25 21\r",
+ "5 25 22\r",
+ "5 25 23\r",
+ "5 25 24\r",
+ "5 25 25\r",
+ "5 25 26\r",
+ "5 25 27\r",
+ "5 25 28\r",
+ "5 25 29\r",
+ "5 25 30\r",
+ "5 25 31\r",
+ "5 25 32\r",
+ "5 25 33\r",
+ "5 25 34\r",
+ "5 25 35\r",
+ "5 25 36\r",
+ "5 25 37\r",
+ "5 25 38\r",
+ "5 25 39\r",
+ "5 25 40\r",
+ "5 25 41\r",
+ "5 25 42\r",
+ "5 25 43\r",
+ "5 25 44\r",
+ "5 25 45\r",
+ "5 25 46\r",
+ "5 25 47\r",
+ "5 25 48\r",
+ "5 25 49\r",
+ "5 25 50\r",
+ "5 25 51\r",
+ "5 25 52\r",
+ "5 25 53\r",
+ "5 25 54\r",
+ "5 25 55\r",
+ "5 25 56\r",
+ "5 25 57\r",
+ "5 25 58\r",
+ "5 26 1\r",
+ "5 26 2\r",
+ "5 26 3\r",
+ "5 26 4\r",
+ "5 26 5\r",
+ "5 26 6\r",
+ "5 26 7\r",
+ "5 26 8\r",
+ "5 26 9\r",
+ "5 26 10\r",
+ "5 26 11\r",
+ "5 26 12\r",
+ "5 26 13\r",
+ "5 26 14\r",
+ "5 26 15\r",
+ "5 26 16\r",
+ "5 26 17\r",
+ "5 26 18\r",
+ "5 26 19\r",
+ "5 26 20\r",
+ "5 26 21\r",
+ "5 26 22\r",
+ "5 26 23\r",
+ "5 26 24\r",
+ "5 26 25\r",
+ "5 26 26\r",
+ "5 26 27\r",
+ "5 26 28\r",
+ "5 26 29\r",
+ "5 26 30\r",
+ "5 26 31\r",
+ "5 26 32\r",
+ "5 26 33\r",
+ "5 26 34\r",
+ "5 26 35\r",
+ "5 26 36\r",
+ "5 26 37\r",
+ "5 26 38\r",
+ "5 26 39\r",
+ "5 26 40\r",
+ "5 26 41\r",
+ "5 26 42\r",
+ "5 26 43\r",
+ "5 26 44\r",
+ "5 26 45\r",
+ "5 26 46\r",
+ "5 26 47\r",
+ "5 26 48\r",
+ "5 26 49\r",
+ "5 26 50\r",
+ "5 26 51\r",
+ "5 26 52\r",
+ "5 26 53\r",
+ "5 26 54\r",
+ "5 26 55\r",
+ "5 26 56\r",
+ "5 26 57\r",
+ "5 26 58\r",
+ "5 27 1\r",
+ "5 27 2\r",
+ "5 27 3\r",
+ "5 27 4\r",
+ "5 27 5\r",
+ "5 27 6\r",
+ "5 27 7\r",
+ "5 27 8\r",
+ "5 27 9\r",
+ "5 27 10\r",
+ "5 27 11\r",
+ "5 27 12\r",
+ "5 27 13\r",
+ "5 27 14\r",
+ "5 27 15\r",
+ "5 27 16\r",
+ "5 27 17\r",
+ "5 27 18\r",
+ "5 27 19\r",
+ "5 27 20\r",
+ "5 27 21\r",
+ "5 27 22\r",
+ "5 27 23\r",
+ "5 27 24\r",
+ "5 27 25\r",
+ "5 27 26\r",
+ "5 27 27\r",
+ "5 27 28\r",
+ "5 27 29\r",
+ "5 27 30\r",
+ "5 27 31\r",
+ "5 27 32\r",
+ "5 27 33\r",
+ "5 27 34\r",
+ "5 27 35\r",
+ "5 27 36\r",
+ "5 27 37\r",
+ "5 27 38\r",
+ "5 27 39\r",
+ "5 27 40\r",
+ "5 27 41\r",
+ "5 27 42\r",
+ "5 27 43\r",
+ "5 27 44\r",
+ "5 27 45\r",
+ "5 27 46\r",
+ "5 27 47\r",
+ "5 27 48\r",
+ "5 27 49\r",
+ "5 27 50\r",
+ "5 27 51\r",
+ "5 27 52\r",
+ "5 27 53\r",
+ "5 27 54\r",
+ "5 27 55\r",
+ "5 27 56\r",
+ "5 27 57\r",
+ "5 27 58\r",
+ "5 28 1\r",
+ "5 28 2\r",
+ "5 28 3\r",
+ "5 28 4\r",
+ "5 28 5\r",
+ "5 28 6\r",
+ "5 28 7\r",
+ "5 28 8\r",
+ "5 28 9\r",
+ "5 28 10\r",
+ "5 28 11\r",
+ "5 28 12\r",
+ "5 28 13\r",
+ "5 28 14\r",
+ "5 28 15\r",
+ "5 28 16\r",
+ "5 28 17\r",
+ "5 28 18\r",
+ "5 28 19\r",
+ "5 28 20\r",
+ "5 28 21\r",
+ "5 28 22\r",
+ "5 28 23\r",
+ "5 28 24\r",
+ "5 28 25\r",
+ "5 28 26\r",
+ "5 28 27\r",
+ "5 28 28\r",
+ "5 28 29\r",
+ "5 28 30\r",
+ "5 28 31\r",
+ "5 28 32\r",
+ "5 28 33\r",
+ "5 28 34\r",
+ "5 28 35\r",
+ "5 28 36\r",
+ "5 28 37\r",
+ "5 28 38\r",
+ "5 28 39\r",
+ "5 28 40\r",
+ "5 28 41\r",
+ "5 28 42\r",
+ "5 28 43\r",
+ "5 28 44\r",
+ "5 28 45\r",
+ "5 28 46\r",
+ "5 28 47\r",
+ "5 28 48\r",
+ "5 28 49\r",
+ "5 28 50\r",
+ "5 28 51\r",
+ "5 28 52\r",
+ "5 28 53\r",
+ "5 28 54\r",
+ "5 28 55\r",
+ "5 28 56\r",
+ "5 28 57\r",
+ "5 28 58\r",
+ "5 29 1\r",
+ "5 29 2\r",
+ "5 29 3\r",
+ "5 29 4\r",
+ "5 29 5\r",
+ "5 29 6\r",
+ "5 29 7\r",
+ "5 29 8\r",
+ "5 29 9\r",
+ "5 29 10\r",
+ "5 29 11\r",
+ "5 29 12\r",
+ "5 29 13\r",
+ "5 29 14\r",
+ "5 29 15\r",
+ "5 29 16\r",
+ "5 29 17\r",
+ "5 29 18\r",
+ "5 29 19\r",
+ "5 29 20\r",
+ "5 29 21\r",
+ "5 29 22\r",
+ "5 29 23\r",
+ "5 29 24\r",
+ "5 29 25\r",
+ "5 29 26\r",
+ "5 29 27\r",
+ "5 29 28\r",
+ "5 29 29\r",
+ "5 29 30\r",
+ "5 29 31\r",
+ "5 29 32\r",
+ "5 29 33\r",
+ "5 29 34\r",
+ "5 29 35\r",
+ "5 29 36\r",
+ "5 29 37\r",
+ "5 29 38\r",
+ "5 29 39\r",
+ "5 29 40\r",
+ "5 29 41\r",
+ "5 29 42\r",
+ "5 29 43\r",
+ "5 29 44\r",
+ "5 29 45\r",
+ "5 29 46\r",
+ "5 29 47\r",
+ "5 29 48\r",
+ "5 29 49\r",
+ "5 29 50\r",
+ "5 29 51\r",
+ "5 29 52\r",
+ "5 29 53\r",
+ "5 29 54\r",
+ "5 29 55\r",
+ "5 29 56\r",
+ "5 29 57\r",
+ "5 29 58\r",
+ "5 30 1\r",
+ "5 30 2\r",
+ "5 30 3\r",
+ "5 30 4\r",
+ "5 30 5\r",
+ "5 30 6\r",
+ "5 30 7\r",
+ "5 30 8\r",
+ "5 30 9\r",
+ "5 30 10\r",
+ "5 30 11\r",
+ "5 30 12\r",
+ "5 30 13\r",
+ "5 30 14\r",
+ "5 30 15\r",
+ "5 30 16\r",
+ "5 30 17\r",
+ "5 30 18\r",
+ "5 30 19\r",
+ "5 30 20\r",
+ "5 30 21\r",
+ "5 30 22\r",
+ "5 30 23\r",
+ "5 30 24\r",
+ "5 30 25\r",
+ "5 30 26\r",
+ "5 30 27\r",
+ "5 30 28\r",
+ "5 30 29\r",
+ "5 30 30\r",
+ "5 30 31\r",
+ "5 30 32\r",
+ "5 30 33\r",
+ "5 30 34\r",
+ "5 30 35\r",
+ "5 30 36\r",
+ "5 30 37\r",
+ "5 30 38\r",
+ "5 30 39\r",
+ "5 30 40\r",
+ "5 30 41\r",
+ "5 30 42\r",
+ "5 30 43\r",
+ "5 30 44\r",
+ "5 30 45\r",
+ "5 30 46\r",
+ "5 30 47\r",
+ "5 30 48\r",
+ "5 30 49\r",
+ "5 30 50\r",
+ "5 30 51\r",
+ "5 30 52\r",
+ "5 30 53\r",
+ "5 30 54\r",
+ "5 30 55\r",
+ "5 30 56\r",
+ "5 30 57\r",
+ "5 30 58\r",
+ "5 31 1\r",
+ "5 31 2\r",
+ "5 31 3\r",
+ "5 31 4\r",
+ "5 31 5\r",
+ "5 31 6\r",
+ "5 31 7\r",
+ "5 31 8\r",
+ "5 31 9\r",
+ "5 31 10\r",
+ "5 31 11\r",
+ "5 31 12\r",
+ "5 31 13\r",
+ "5 31 14\r",
+ "5 31 15\r",
+ "5 31 16\r",
+ "5 31 17\r",
+ "5 31 18\r",
+ "5 31 19\r",
+ "5 31 20\r",
+ "5 31 21\r",
+ "5 31 22\r",
+ "5 31 23\r",
+ "5 31 24\r",
+ "5 31 25\r",
+ "5 31 26\r",
+ "5 31 27\r",
+ "5 31 28\r",
+ "5 31 29\r",
+ "5 31 30\r",
+ "5 31 31\r",
+ "5 31 32\r",
+ "5 31 33\r",
+ "5 31 34\r",
+ "5 31 35\r",
+ "5 31 36\r",
+ "5 31 37\r",
+ "5 31 38\r",
+ "5 31 39\r",
+ "5 31 40\r",
+ "5 31 41\r",
+ "5 31 42\r",
+ "5 31 43\r",
+ "5 31 44\r",
+ "5 31 45\r",
+ "5 31 46\r",
+ "5 31 47\r",
+ "5 31 48\r",
+ "5 31 49\r",
+ "5 31 50\r",
+ "5 31 51\r",
+ "5 31 52\r",
+ "5 31 53\r",
+ "5 31 54\r",
+ "5 31 55\r",
+ "5 31 56\r",
+ "5 31 57\r",
+ "5 31 58\r",
+ "5 32 1\r",
+ "5 32 2\r",
+ "5 32 3\r",
+ "5 32 4\r",
+ "5 32 5\r",
+ "5 32 6\r",
+ "5 32 7\r",
+ "5 32 8\r",
+ "5 32 9\r",
+ "5 32 10\r",
+ "5 32 11\r",
+ "5 32 12\r",
+ "5 32 13\r",
+ "5 32 14\r",
+ "5 32 15\r",
+ "5 32 16\r",
+ "5 32 17\r",
+ "5 32 18\r",
+ "5 32 19\r",
+ "5 32 20\r",
+ "5 32 21\r",
+ "5 32 22\r",
+ "5 32 23\r",
+ "5 32 24\r",
+ "5 32 25\r",
+ "5 32 26\r",
+ "5 32 27\r",
+ "5 32 28\r",
+ "5 32 29\r",
+ "5 32 30\r",
+ "5 32 31\r",
+ "5 32 32\r",
+ "5 32 33\r",
+ "5 32 34\r",
+ "5 32 35\r",
+ "5 32 36\r",
+ "5 32 37\r",
+ "5 32 38\r",
+ "5 32 39\r",
+ "5 32 40\r",
+ "5 32 41\r",
+ "5 32 42\r",
+ "5 32 43\r",
+ "5 32 44\r",
+ "5 32 45\r",
+ "5 32 46\r",
+ "5 32 47\r",
+ "5 32 48\r",
+ "5 32 49\r",
+ "5 32 50\r",
+ "5 32 51\r",
+ "5 32 52\r",
+ "5 32 53\r",
+ "5 32 54\r",
+ "5 32 55\r",
+ "5 32 56\r",
+ "5 32 57\r",
+ "5 32 58\r",
+ "5 33 1\r",
+ "5 33 2\r",
+ "5 33 3\r",
+ "5 33 4\r",
+ "5 33 5\r",
+ "5 33 6\r",
+ "5 33 7\r",
+ "5 33 8\r",
+ "5 33 9\r",
+ "5 33 10\r",
+ "5 33 11\r",
+ "5 33 12\r",
+ "5 33 13\r",
+ "5 33 14\r",
+ "5 33 15\r",
+ "5 33 16\r",
+ "5 33 17\r",
+ "5 33 18\r",
+ "5 33 19\r",
+ "5 33 20\r",
+ "5 33 21\r",
+ "5 33 22\r",
+ "5 33 23\r",
+ "5 33 24\r",
+ "5 33 25\r",
+ "5 33 26\r",
+ "5 33 27\r",
+ "5 33 28\r",
+ "5 33 29\r",
+ "5 33 30\r",
+ "5 33 31\r",
+ "5 33 32\r",
+ "5 33 33\r",
+ "5 33 34\r",
+ "5 33 35\r",
+ "5 33 36\r",
+ "5 33 37\r",
+ "5 33 38\r",
+ "5 33 39\r",
+ "5 33 40\r",
+ "5 33 41\r",
+ "5 33 42\r",
+ "5 33 43\r",
+ "5 33 44\r",
+ "5 33 45\r",
+ "5 33 46\r",
+ "5 33 47\r",
+ "5 33 48\r",
+ "5 33 49\r",
+ "5 33 50\r",
+ "5 33 51\r",
+ "5 33 52\r",
+ "5 33 53\r",
+ "5 33 54\r",
+ "5 33 55\r",
+ "5 33 56\r",
+ "5 33 57\r",
+ "5 33 58\r",
+ "5 34 1\r",
+ "5 34 2\r",
+ "5 34 3\r",
+ "5 34 4\r",
+ "5 34 5\r",
+ "5 34 6\r",
+ "5 34 7\r",
+ "5 34 8\r",
+ "5 34 9\r",
+ "5 34 10\r",
+ "5 34 11\r",
+ "5 34 12\r",
+ "5 34 13\r",
+ "5 34 14\r",
+ "5 34 15\r",
+ "5 34 16\r",
+ "5 34 17\r",
+ "5 34 18\r",
+ "5 34 19\r",
+ "5 34 20\r",
+ "5 34 21\r",
+ "5 34 22\r",
+ "5 34 23\r",
+ "5 34 24\r",
+ "5 34 25\r",
+ "5 34 26\r",
+ "5 34 27\r",
+ "5 34 28\r",
+ "5 34 29\r",
+ "5 34 30\r",
+ "5 34 31\r",
+ "5 34 32\r",
+ "5 34 33\r",
+ "5 34 34\r",
+ "5 34 35\r",
+ "5 34 36\r",
+ "5 34 37\r",
+ "5 34 38\r",
+ "5 34 39\r",
+ "5 34 40\r",
+ "5 34 41\r",
+ "5 34 42\r",
+ "5 34 43\r",
+ "5 34 44\r",
+ "5 34 45\r",
+ "5 34 46\r",
+ "5 34 47\r",
+ "5 34 48\r",
+ "5 34 49\r",
+ "5 34 50\r",
+ "5 34 51\r",
+ "5 34 52\r",
+ "5 34 53\r",
+ "5 34 54\r",
+ "5 34 55\r",
+ "5 34 56\r",
+ "5 34 57\r",
+ "5 34 58\r",
+ "5 35 1\r",
+ "5 35 2\r",
+ "5 35 3\r",
+ "5 35 4\r",
+ "5 35 5\r",
+ "5 35 6\r",
+ "5 35 7\r",
+ "5 35 8\r",
+ "5 35 9\r",
+ "5 35 10\r",
+ "5 35 11\r",
+ "5 35 12\r",
+ "5 35 13\r",
+ "5 35 14\r",
+ "5 35 15\r",
+ "5 35 16\r",
+ "5 35 17\r",
+ "5 35 18\r",
+ "5 35 19\r",
+ "5 35 20\r",
+ "5 35 21\r",
+ "5 35 22\r",
+ "5 35 23\r",
+ "5 35 24\r",
+ "5 35 25\r",
+ "5 35 26\r",
+ "5 35 27\r",
+ "5 35 28\r",
+ "5 35 29\r",
+ "5 35 30\r",
+ "5 35 31\r",
+ "5 35 32\r",
+ "5 35 33\r",
+ "5 35 34\r",
+ "5 35 35\r",
+ "5 35 36\r",
+ "5 35 37\r",
+ "5 35 38\r",
+ "5 35 39\r",
+ "5 35 40\r",
+ "5 35 41\r",
+ "5 35 42\r",
+ "5 35 43\r",
+ "5 35 44\r",
+ "5 35 45\r",
+ "5 35 46\r",
+ "5 35 47\r",
+ "5 35 48\r",
+ "5 35 49\r",
+ "5 35 50\r",
+ "5 35 51\r",
+ "5 35 52\r",
+ "5 35 53\r",
+ "5 35 54\r",
+ "5 35 55\r",
+ "5 35 56\r",
+ "5 35 57\r",
+ "5 35 58\r",
+ "5 36 1\r",
+ "5 36 2\r",
+ "5 36 3\r",
+ "5 36 4\r",
+ "5 36 5\r",
+ "5 36 6\r",
+ "5 36 7\r",
+ "5 36 8\r",
+ "5 36 9\r",
+ "5 36 10\r",
+ "5 36 11\r",
+ "5 36 12\r",
+ "5 36 13\r",
+ "5 36 14\r",
+ "5 36 15\r",
+ "5 36 16\r",
+ "5 36 17\r",
+ "5 36 18\r",
+ "5 36 19\r",
+ "5 36 20\r",
+ "5 36 21\r",
+ "5 36 22\r",
+ "5 36 23\r",
+ "5 36 24\r",
+ "5 36 25\r",
+ "5 36 26\r",
+ "5 36 27\r",
+ "5 36 28\r",
+ "5 36 29\r",
+ "5 36 30\r",
+ "5 36 31\r",
+ "5 36 32\r",
+ "5 36 33\r",
+ "5 36 34\r",
+ "5 36 35\r",
+ "5 36 36\r",
+ "5 36 37\r",
+ "5 36 38\r",
+ "5 36 39\r",
+ "5 36 40\r",
+ "5 36 41\r",
+ "5 36 42\r",
+ "5 36 43\r",
+ "5 36 44\r",
+ "5 36 45\r",
+ "5 36 46\r",
+ "5 36 47\r",
+ "5 36 48\r",
+ "5 36 49\r",
+ "5 36 50\r",
+ "5 36 51\r",
+ "5 36 52\r",
+ "5 36 53\r",
+ "5 36 54\r",
+ "5 36 55\r",
+ "5 36 56\r",
+ "5 36 57\r",
+ "5 36 58\r",
+ "5 37 1\r",
+ "5 37 2\r",
+ "5 37 3\r",
+ "5 37 4\r",
+ "5 37 5\r",
+ "5 37 6\r",
+ "5 37 7\r",
+ "5 37 8\r",
+ "5 37 9\r",
+ "5 37 10\r",
+ "5 37 11\r",
+ "5 37 12\r",
+ "5 37 13\r",
+ "5 37 14\r",
+ "5 37 15\r",
+ "5 37 16\r",
+ "5 37 17\r",
+ "5 37 18\r",
+ "5 37 19\r",
+ "5 37 20\r",
+ "5 37 21\r",
+ "5 37 22\r",
+ "5 37 23\r",
+ "5 37 24\r",
+ "5 37 25\r",
+ "5 37 26\r",
+ "5 37 27\r",
+ "5 37 28\r",
+ "5 37 29\r",
+ "5 37 30\r",
+ "5 37 31\r",
+ "5 37 32\r",
+ "5 37 33\r",
+ "5 37 34\r",
+ "5 37 35\r",
+ "5 37 36\r",
+ "5 37 37\r",
+ "5 37 38\r",
+ "5 37 39\r",
+ "5 37 40\r",
+ "5 37 41\r",
+ "5 37 42\r",
+ "5 37 43\r",
+ "5 37 44\r",
+ "5 37 45\r",
+ "5 37 46\r",
+ "5 37 47\r",
+ "5 37 48\r",
+ "5 37 49\r",
+ "5 37 50\r",
+ "5 37 51\r",
+ "5 37 52\r",
+ "5 37 53\r",
+ "5 37 54\r",
+ "5 37 55\r",
+ "5 37 56\r",
+ "5 37 57\r",
+ "5 37 58\r",
+ "5 38 1\r",
+ "5 38 2\r",
+ "5 38 3\r",
+ "5 38 4\r",
+ "5 38 5\r",
+ "5 38 6\r",
+ "5 38 7\r",
+ "5 38 8\r",
+ "5 38 9\r",
+ "5 38 10\r",
+ "5 38 11\r",
+ "5 38 12\r",
+ "5 38 13\r",
+ "5 38 14\r",
+ "5 38 15\r",
+ "5 38 16\r",
+ "5 38 17\r",
+ "5 38 18\r",
+ "5 38 19\r",
+ "5 38 20\r",
+ "5 38 21\r",
+ "5 38 22\r",
+ "5 38 23\r",
+ "5 38 24\r",
+ "5 38 25\r",
+ "5 38 26\r",
+ "5 38 27\r",
+ "5 38 28\r",
+ "5 38 29\r",
+ "5 38 30\r",
+ "5 38 31\r",
+ "5 38 32\r",
+ "5 38 33\r",
+ "5 38 34\r",
+ "5 38 35\r",
+ "5 38 36\r",
+ "5 38 37\r",
+ "5 38 38\r",
+ "5 38 39\r",
+ "5 38 40\r",
+ "5 38 41\r",
+ "5 38 42\r",
+ "5 38 43\r",
+ "5 38 44\r",
+ "5 38 45\r",
+ "5 38 46\r",
+ "5 38 47\r",
+ "5 38 48\r",
+ "5 38 49\r",
+ "5 38 50\r",
+ "5 38 51\r",
+ "5 38 52\r",
+ "5 38 53\r",
+ "5 38 54\r",
+ "5 38 55\r",
+ "5 38 56\r",
+ "5 38 57\r",
+ "5 38 58\r",
+ "5 39 1\r",
+ "5 39 2\r",
+ "5 39 3\r",
+ "5 39 4\r",
+ "5 39 5\r",
+ "5 39 6\r",
+ "5 39 7\r",
+ "5 39 8\r",
+ "5 39 9\r",
+ "5 39 10\r",
+ "5 39 11\r",
+ "5 39 12\r",
+ "5 39 13\r",
+ "5 39 14\r",
+ "5 39 15\r",
+ "5 39 16\r",
+ "5 39 17\r",
+ "5 39 18\r",
+ "5 39 19\r",
+ "5 39 20\r",
+ "5 39 21\r",
+ "5 39 22\r",
+ "5 39 23\r",
+ "5 39 24\r",
+ "5 39 25\r",
+ "5 39 26\r",
+ "5 39 27\r",
+ "5 39 28\r",
+ "5 39 29\r",
+ "5 39 30\r",
+ "5 39 31\r",
+ "5 39 32\r",
+ "5 39 33\r",
+ "5 39 34\r",
+ "5 39 35\r",
+ "5 39 36\r",
+ "5 39 37\r",
+ "5 39 38\r",
+ "5 39 39\r",
+ "5 39 40\r",
+ "5 39 41\r",
+ "5 39 42\r",
+ "5 39 43\r",
+ "5 39 44\r",
+ "5 39 45\r",
+ "5 39 46\r",
+ "5 39 47\r",
+ "5 39 48\r",
+ "5 39 49\r",
+ "5 39 50\r",
+ "5 39 51\r",
+ "5 39 52\r",
+ "5 39 53\r",
+ "5 39 54\r",
+ "5 39 55\r",
+ "5 39 56\r",
+ "5 39 57\r",
+ "5 39 58\r",
+ "5 40 1\r",
+ "5 40 2\r",
+ "5 40 3\r",
+ "5 40 4\r",
+ "5 40 5\r",
+ "5 40 6\r",
+ "5 40 7\r",
+ "5 40 8\r",
+ "5 40 9\r",
+ "5 40 10\r",
+ "5 40 11\r",
+ "5 40 12\r",
+ "5 40 13\r",
+ "5 40 14\r",
+ "5 40 15\r",
+ "5 40 16\r",
+ "5 40 17\r",
+ "5 40 18\r",
+ "5 40 19\r",
+ "5 40 20\r",
+ "5 40 21\r",
+ "5 40 22\r",
+ "5 40 23\r",
+ "5 40 24\r",
+ "5 40 25\r",
+ "5 40 26\r",
+ "5 40 27\r",
+ "5 40 28\r",
+ "5 40 29\r",
+ "5 40 30\r",
+ "5 40 31\r",
+ "5 40 32\r",
+ "5 40 33\r",
+ "5 40 34\r",
+ "5 40 35\r",
+ "5 40 36\r",
+ "5 40 37\r",
+ "5 40 38\r",
+ "5 40 39\r",
+ "5 40 40\r",
+ "5 40 41\r",
+ "5 40 42\r",
+ "5 40 43\r",
+ "5 40 44\r",
+ "5 40 45\r",
+ "5 40 46\r",
+ "5 40 47\r",
+ "5 40 48\r",
+ "5 40 49\r",
+ "5 40 50\r",
+ "5 40 51\r",
+ "5 40 52\r",
+ "5 40 53\r",
+ "5 40 54\r",
+ "5 40 55\r",
+ "5 40 56\r",
+ "5 40 57\r",
+ "5 40 58\r",
+ "5 41 1\r",
+ "5 41 2\r",
+ "5 41 3\r",
+ "5 41 4\r",
+ "5 41 5\r",
+ "5 41 6\r",
+ "5 41 7\r",
+ "5 41 8\r",
+ "5 41 9\r",
+ "5 41 10\r",
+ "5 41 11\r",
+ "5 41 12\r",
+ "5 41 13\r",
+ "5 41 14\r",
+ "5 41 15\r",
+ "5 41 16\r",
+ "5 41 17\r",
+ "5 41 18\r",
+ "5 41 19\r",
+ "5 41 20\r",
+ "5 41 21\r",
+ "5 41 22\r",
+ "5 41 23\r",
+ "5 41 24\r",
+ "5 41 25\r",
+ "5 41 26\r",
+ "5 41 27\r",
+ "5 41 28\r",
+ "5 41 29\r",
+ "5 41 30\r",
+ "5 41 31\r",
+ "5 41 32\r",
+ "5 41 33\r",
+ "5 41 34\r",
+ "5 41 35\r",
+ "5 41 36\r",
+ "5 41 37\r",
+ "5 41 38\r",
+ "5 41 39\r",
+ "5 41 40\r",
+ "5 41 41\r",
+ "5 41 42\r",
+ "5 41 43\r",
+ "5 41 44\r",
+ "5 41 45\r",
+ "5 41 46\r",
+ "5 41 47\r",
+ "5 41 48\r",
+ "5 41 49\r",
+ "5 41 50\r",
+ "5 41 51\r",
+ "5 41 52\r",
+ "5 41 53\r",
+ "5 41 54\r",
+ "5 41 55\r",
+ "5 41 56\r",
+ "5 41 57\r",
+ "5 41 58\r",
+ "5 42 1\r",
+ "5 42 2\r",
+ "5 42 3\r",
+ "5 42 4\r",
+ "5 42 5\r",
+ "5 42 6\r",
+ "5 42 7\r",
+ "5 42 8\r",
+ "5 42 9\r",
+ "5 42 10\r",
+ "5 42 11\r",
+ "5 42 12\r",
+ "5 42 13\r",
+ "5 42 14\r",
+ "5 42 15\r",
+ "5 42 16\r",
+ "5 42 17\r",
+ "5 42 18\r",
+ "5 42 19\r",
+ "5 42 20\r",
+ "5 42 21\r",
+ "5 42 22\r",
+ "5 42 23\r",
+ "5 42 24\r",
+ "5 42 25\r",
+ "5 42 26\r",
+ "5 42 27\r",
+ "5 42 28\r",
+ "5 42 29\r",
+ "5 42 30\r",
+ "5 42 31\r",
+ "5 42 32\r",
+ "5 42 33\r",
+ "5 42 34\r",
+ "5 42 35\r",
+ "5 42 36\r",
+ "5 42 37\r",
+ "5 42 38\r",
+ "5 42 39\r",
+ "5 42 40\r",
+ "5 42 41\r",
+ "5 42 42\r",
+ "5 42 43\r",
+ "5 42 44\r",
+ "5 42 45\r",
+ "5 42 46\r",
+ "5 42 47\r",
+ "5 42 48\r",
+ "5 42 49\r",
+ "5 42 50\r",
+ "5 42 51\r",
+ "5 42 52\r",
+ "5 42 53\r",
+ "5 42 54\r",
+ "5 42 55\r",
+ "5 42 56\r",
+ "5 42 57\r",
+ "5 42 58\r",
+ "5 43 1\r",
+ "5 43 2\r",
+ "5 43 3\r",
+ "5 43 4\r",
+ "5 43 5\r",
+ "5 43 6\r",
+ "5 43 7\r",
+ "5 43 8\r",
+ "5 43 9\r",
+ "5 43 10\r",
+ "5 43 11\r",
+ "5 43 12\r",
+ "5 43 13\r",
+ "5 43 14\r",
+ "5 43 15\r",
+ "5 43 16\r",
+ "5 43 17\r",
+ "5 43 18\r",
+ "5 43 19\r",
+ "5 43 20\r",
+ "5 43 21\r",
+ "5 43 22\r",
+ "5 43 23\r",
+ "5 43 24\r",
+ "5 43 25\r",
+ "5 43 26\r",
+ "5 43 27\r",
+ "5 43 28\r",
+ "5 43 29\r",
+ "5 43 30\r",
+ "5 43 31\r",
+ "5 43 32\r",
+ "5 43 33\r",
+ "5 43 34\r",
+ "5 43 35\r",
+ "5 43 36\r",
+ "5 43 37\r",
+ "5 43 38\r",
+ "5 43 39\r",
+ "5 43 40\r",
+ "5 43 41\r",
+ "5 43 42\r",
+ "5 43 43\r",
+ "5 43 44\r",
+ "5 43 45\r",
+ "5 43 46\r",
+ "5 43 47\r",
+ "5 43 48\r",
+ "5 43 49\r",
+ "5 43 50\r",
+ "5 43 51\r",
+ "5 43 52\r",
+ "5 43 53\r",
+ "5 43 54\r",
+ "5 43 55\r",
+ "5 43 56\r",
+ "5 43 57\r",
+ "5 43 58\r",
+ "5 44 1\r",
+ "5 44 2\r",
+ "5 44 3\r",
+ "5 44 4\r",
+ "5 44 5\r",
+ "5 44 6\r",
+ "5 44 7\r",
+ "5 44 8\r",
+ "5 44 9\r",
+ "5 44 10\r",
+ "5 44 11\r",
+ "5 44 12\r",
+ "5 44 13\r",
+ "5 44 14\r",
+ "5 44 15\r",
+ "5 44 16\r",
+ "5 44 17\r",
+ "5 44 18\r",
+ "5 44 19\r",
+ "5 44 20\r",
+ "5 44 21\r",
+ "5 44 22\r",
+ "5 44 23\r",
+ "5 44 24\r",
+ "5 44 25\r",
+ "5 44 26\r",
+ "5 44 27\r",
+ "5 44 28\r",
+ "5 44 29\r",
+ "5 44 30\r",
+ "5 44 31\r",
+ "5 44 32\r",
+ "5 44 33\r",
+ "5 44 34\r",
+ "5 44 35\r",
+ "5 44 36\r",
+ "5 44 37\r",
+ "5 44 38\r",
+ "5 44 39\r",
+ "5 44 40\r",
+ "5 44 41\r",
+ "5 44 42\r",
+ "5 44 43\r",
+ "5 44 44\r",
+ "5 44 45\r",
+ "5 44 46\r",
+ "5 44 47\r",
+ "5 44 48\r",
+ "5 44 49\r",
+ "5 44 50\r",
+ "5 44 51\r",
+ "5 44 52\r",
+ "5 44 53\r",
+ "5 44 54\r",
+ "5 44 55\r",
+ "5 44 56\r",
+ "5 44 57\r",
+ "5 44 58\r",
+ "5 45 1\r",
+ "5 45 2\r",
+ "5 45 3\r",
+ "5 45 4\r",
+ "5 45 5\r",
+ "5 45 6\r",
+ "5 45 7\r",
+ "5 45 8\r",
+ "5 45 9\r",
+ "5 45 10\r",
+ "5 45 11\r",
+ "5 45 12\r",
+ "5 45 13\r",
+ "5 45 14\r",
+ "5 45 15\r",
+ "5 45 16\r",
+ "5 45 17\r",
+ "5 45 18\r",
+ "5 45 19\r",
+ "5 45 20\r",
+ "5 45 21\r",
+ "5 45 22\r",
+ "5 45 23\r",
+ "5 45 24\r",
+ "5 45 25\r",
+ "5 45 26\r",
+ "5 45 27\r",
+ "5 45 28\r",
+ "5 45 29\r",
+ "5 45 30\r",
+ "5 45 31\r",
+ "5 45 32\r",
+ "5 45 33\r",
+ "5 45 34\r",
+ "5 45 35\r",
+ "5 45 36\r",
+ "5 45 37\r",
+ "5 45 38\r",
+ "5 45 39\r",
+ "5 45 40\r",
+ "5 45 41\r",
+ "5 45 42\r",
+ "5 45 43\r",
+ "5 45 44\r",
+ "5 45 45\r",
+ "5 45 46\r",
+ "5 45 47\r",
+ "5 45 48\r",
+ "5 45 49\r",
+ "5 45 50\r",
+ "5 45 51\r",
+ "5 45 52\r",
+ "5 45 53\r",
+ "5 45 54\r",
+ "5 45 55\r",
+ "5 45 56\r",
+ "5 45 57\r",
+ "5 45 58\r",
+ "5 46 1\r",
+ "5 46 2\r",
+ "5 46 3\r",
+ "5 46 4\r",
+ "5 46 5\r",
+ "5 46 6\r",
+ "5 46 7\r",
+ "5 46 8\r",
+ "5 46 9\r",
+ "5 46 10\r",
+ "5 46 11\r",
+ "5 46 12\r",
+ "5 46 13\r",
+ "5 46 14\r",
+ "5 46 15\r",
+ "5 46 16\r",
+ "5 46 17\r",
+ "5 46 18\r",
+ "5 46 19\r",
+ "5 46 20\r",
+ "5 46 21\r",
+ "5 46 22\r",
+ "5 46 23\r",
+ "5 46 24\r",
+ "5 46 25\r",
+ "5 46 26\r",
+ "5 46 27\r",
+ "5 46 28\r",
+ "5 46 29\r",
+ "5 46 30\r",
+ "5 46 31\r",
+ "5 46 32\r",
+ "5 46 33\r",
+ "5 46 34\r",
+ "5 46 35\r",
+ "5 46 36\r",
+ "5 46 37\r",
+ "5 46 38\r",
+ "5 46 39\r",
+ "5 46 40\r",
+ "5 46 41\r",
+ "5 46 42\r",
+ "5 46 43\r",
+ "5 46 44\r",
+ "5 46 45\r",
+ "5 46 46\r",
+ "5 46 47\r",
+ "5 46 48\r",
+ "5 46 49\r",
+ "5 46 50\r",
+ "5 46 51\r",
+ "5 46 52\r",
+ "5 46 53\r",
+ "5 46 54\r",
+ "5 46 55\r",
+ "5 46 56\r",
+ "5 46 57\r",
+ "5 46 58\r",
+ "5 47 1\r",
+ "5 47 2\r",
+ "5 47 3\r",
+ "5 47 4\r",
+ "5 47 5\r",
+ "5 47 6\r",
+ "5 47 7\r",
+ "5 47 8\r",
+ "5 47 9\r",
+ "5 47 10\r",
+ "5 47 11\r",
+ "5 47 12\r",
+ "5 47 13\r",
+ "5 47 14\r",
+ "5 47 15\r",
+ "5 47 16\r",
+ "5 47 17\r",
+ "5 47 18\r",
+ "5 47 19\r",
+ "5 47 20\r",
+ "5 47 21\r",
+ "5 47 22\r",
+ "5 47 23\r",
+ "5 47 24\r",
+ "5 47 25\r",
+ "5 47 26\r",
+ "5 47 27\r",
+ "5 47 28\r",
+ "5 47 29\r",
+ "5 47 30\r",
+ "5 47 31\r",
+ "5 47 32\r",
+ "5 47 33\r",
+ "5 47 34\r",
+ "5 47 35\r",
+ "5 47 36\r",
+ "5 47 37\r",
+ "5 47 38\r",
+ "5 47 39\r",
+ "5 47 40\r",
+ "5 47 41\r",
+ "5 47 42\r",
+ "5 47 43\r",
+ "5 47 44\r",
+ "5 47 45\r",
+ "5 47 46\r",
+ "5 47 47\r",
+ "5 47 48\r",
+ "5 47 49\r",
+ "5 47 50\r",
+ "5 47 51\r",
+ "5 47 52\r",
+ "5 47 53\r",
+ "5 47 54\r",
+ "5 47 55\r",
+ "5 47 56\r",
+ "5 47 57\r",
+ "5 47 58\r",
+ "5 48 1\r",
+ "5 48 2\r",
+ "5 48 3\r",
+ "5 48 4\r",
+ "5 48 5\r",
+ "5 48 6\r",
+ "5 48 7\r",
+ "5 48 8\r",
+ "5 48 9\r",
+ "5 48 10\r",
+ "5 48 11\r",
+ "5 48 12\r",
+ "5 48 13\r",
+ "5 48 14\r",
+ "5 48 15\r",
+ "5 48 16\r",
+ "5 48 17\r",
+ "5 48 18\r",
+ "5 48 19\r",
+ "5 48 20\r",
+ "5 48 21\r",
+ "5 48 22\r",
+ "5 48 23\r",
+ "5 48 24\r",
+ "5 48 25\r",
+ "5 48 26\r",
+ "5 48 27\r",
+ "5 48 28\r",
+ "5 48 29\r",
+ "5 48 30\r",
+ "5 48 31\r",
+ "5 48 32\r",
+ "5 48 33\r",
+ "5 48 34\r",
+ "5 48 35\r",
+ "5 48 36\r",
+ "5 48 37\r",
+ "5 48 38\r",
+ "5 48 39\r",
+ "5 48 40\r",
+ "5 48 41\r",
+ "5 48 42\r",
+ "5 48 43\r",
+ "5 48 44\r",
+ "5 48 45\r",
+ "5 48 46\r",
+ "5 48 47\r",
+ "5 48 48\r",
+ "5 48 49\r",
+ "5 48 50\r",
+ "5 48 51\r",
+ "5 48 52\r",
+ "5 48 53\r",
+ "5 48 54\r",
+ "5 48 55\r",
+ "5 48 56\r",
+ "5 48 57\r",
+ "5 48 58\r",
+ "5 49 1\r",
+ "5 49 2\r",
+ "5 49 3\r",
+ "5 49 4\r",
+ "5 49 5\r",
+ "5 49 6\r",
+ "5 49 7\r",
+ "5 49 8\r",
+ "5 49 9\r",
+ "5 49 10\r",
+ "5 49 11\r",
+ "5 49 12\r",
+ "5 49 13\r",
+ "5 49 14\r",
+ "5 49 15\r",
+ "5 49 16\r",
+ "5 49 17\r",
+ "5 49 18\r",
+ "5 49 19\r",
+ "5 49 20\r",
+ "5 49 21\r",
+ "5 49 22\r",
+ "5 49 23\r",
+ "5 49 24\r",
+ "5 49 25\r",
+ "5 49 26\r",
+ "5 49 27\r",
+ "5 49 28\r",
+ "5 49 29\r",
+ "5 49 30\r",
+ "5 49 31\r",
+ "5 49 32\r",
+ "5 49 33\r",
+ "5 49 34\r",
+ "5 49 35\r",
+ "5 49 36\r",
+ "5 49 37\r",
+ "5 49 38\r",
+ "5 49 39\r",
+ "5 49 40\r",
+ "5 49 41\r",
+ "5 49 42\r",
+ "5 49 43\r",
+ "5 49 44\r",
+ "5 49 45\r",
+ "5 49 46\r",
+ "5 49 47\r",
+ "5 49 48\r",
+ "5 49 49\r",
+ "5 49 50\r",
+ "5 49 51\r",
+ "5 49 52\r",
+ "5 49 53\r",
+ "5 49 54\r",
+ "5 49 55\r",
+ "5 49 56\r",
+ "5 49 57\r",
+ "5 49 58\r",
+ "5 50 1\r",
+ "5 50 2\r",
+ "5 50 3\r",
+ "5 50 4\r",
+ "5 50 5\r",
+ "5 50 6\r",
+ "5 50 7\r",
+ "5 50 8\r",
+ "5 50 9\r",
+ "5 50 10\r",
+ "5 50 11\r",
+ "5 50 12\r",
+ "5 50 13\r",
+ "5 50 14\r",
+ "5 50 15\r",
+ "5 50 16\r",
+ "5 50 17\r",
+ "5 50 18\r",
+ "5 50 19"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "5 50 20\r",
+ "5 50 21\r",
+ "5 50 22\r",
+ "5 50 23\r",
+ "5 50 24\r",
+ "5 50 25\r",
+ "5 50 26\r",
+ "5 50 27\r",
+ "5 50 28\r",
+ "5 50 29\r",
+ "5 50 30\r",
+ "5 50 31\r",
+ "5 50 32\r",
+ "5 50 33\r",
+ "5 50 34\r",
+ "5 50 35\r",
+ "5 50 36\r",
+ "5 50 37\r",
+ "5 50 38\r",
+ "5 50 39\r",
+ "5 50 40\r",
+ "5 50 41\r",
+ "5 50 42\r",
+ "5 50 43\r",
+ "5 50 44\r",
+ "5 50 45\r",
+ "5 50 46\r",
+ "5 50 47\r",
+ "5 50 48\r",
+ "5 50 49\r",
+ "5 50 50\r",
+ "5 50 51\r",
+ "5 50 52\r",
+ "5 50 53\r",
+ "5 50 54\r",
+ "5 50 55\r",
+ "5 50 56\r",
+ "5 50 57\r",
+ "5 50 58\r",
+ "5 51 1\r",
+ "5 51 2\r",
+ "5 51 3\r",
+ "5 51 4\r",
+ "5 51 5\r",
+ "5 51 6\r",
+ "5 51 7\r",
+ "5 51 8\r",
+ "5 51 9\r",
+ "5 51 10\r",
+ "5 51 11\r",
+ "5 51 12\r",
+ "5 51 13\r",
+ "5 51 14\r",
+ "5 51 15\r",
+ "5 51 16\r",
+ "5 51 17\r",
+ "5 51 18\r",
+ "5 51 19\r",
+ "5 51 20\r",
+ "5 51 21\r",
+ "5 51 22\r",
+ "5 51 23\r",
+ "5 51 24\r",
+ "5 51 25\r",
+ "5 51 26\r",
+ "5 51 27\r",
+ "5 51 28\r",
+ "5 51 29\r",
+ "5 51 30\r",
+ "5 51 31\r",
+ "5 51 32\r",
+ "5 51 33\r",
+ "5 51 34\r",
+ "5 51 35\r",
+ "5 51 36\r",
+ "5 51 37\r",
+ "5 51 38\r",
+ "5 51 39\r",
+ "5 51 40\r",
+ "5 51 41\r",
+ "5 51 42\r",
+ "5 51 43\r",
+ "5 51 44\r",
+ "5 51 45\r",
+ "5 51 46\r",
+ "5 51 47\r",
+ "5 51 48\r",
+ "5 51 49\r",
+ "5 51 50\r",
+ "5 51 51\r",
+ "5 51 52\r",
+ "5 51 53\r",
+ "5 51 54\r",
+ "5 51 55\r",
+ "5 51 56\r",
+ "5 51 57\r",
+ "5 51 58\r",
+ "5 52 1\r",
+ "5 52 2\r",
+ "5 52 3\r",
+ "5 52 4\r",
+ "5 52 5\r",
+ "5 52 6\r",
+ "5 52 7\r",
+ "5 52 8\r",
+ "5 52 9\r",
+ "5 52 10\r",
+ "5 52 11\r",
+ "5 52 12\r",
+ "5 52 13\r",
+ "5 52 14\r",
+ "5 52 15\r",
+ "5 52 16\r",
+ "5 52 17\r",
+ "5 52 18\r",
+ "5 52 19\r",
+ "5 52 20\r",
+ "5 52 21\r",
+ "5 52 22\r",
+ "5 52 23\r",
+ "5 52 24\r",
+ "5 52 25\r",
+ "5 52 26\r",
+ "5 52 27\r",
+ "5 52 28\r",
+ "5 52 29\r",
+ "5 52 30\r",
+ "5 52 31\r",
+ "5 52 32\r",
+ "5 52 33\r",
+ "5 52 34\r",
+ "5 52 35\r",
+ "5 52 36\r",
+ "5 52 37\r",
+ "5 52 38\r",
+ "5 52 39\r",
+ "5 52 40\r",
+ "5 52 41\r",
+ "5 52 42\r",
+ "5 52 43\r",
+ "5 52 44\r",
+ "5 52 45\r",
+ "5 52 46\r",
+ "5 52 47\r",
+ "5 52 48\r",
+ "5 52 49\r",
+ "5 52 50\r",
+ "5 52 51\r",
+ "5 52 52\r",
+ "5 52 53\r",
+ "5 52 54\r",
+ "5 52 55\r",
+ "5 52 56\r",
+ "5 52 57\r",
+ "5 52 58\r",
+ "5 53 1\r",
+ "5 53 2\r",
+ "5 53 3\r",
+ "5 53 4\r",
+ "5 53 5\r",
+ "5 53 6\r",
+ "5 53 7\r",
+ "5 53 8\r",
+ "5 53 9\r",
+ "5 53 10\r",
+ "5 53 11\r",
+ "5 53 12\r",
+ "5 53 13\r",
+ "5 53 14\r",
+ "5 53 15\r",
+ "5 53 16\r",
+ "5 53 17\r",
+ "5 53 18\r",
+ "5 53 19\r",
+ "5 53 20\r",
+ "5 53 21\r",
+ "5 53 22\r",
+ "5 53 23\r",
+ "5 53 24\r",
+ "5 53 25\r",
+ "5 53 26\r",
+ "5 53 27\r",
+ "5 53 28\r",
+ "5 53 29\r",
+ "5 53 30\r",
+ "5 53 31\r",
+ "5 53 32\r",
+ "5 53 33\r",
+ "5 53 34\r",
+ "5 53 35\r",
+ "5 53 36\r",
+ "5 53 37\r",
+ "5 53 38\r",
+ "5 53 39\r",
+ "5 53 40\r",
+ "5 53 41\r",
+ "5 53 42\r",
+ "5 53 43\r",
+ "5 53 44\r",
+ "5 53 45\r",
+ "5 53 46\r",
+ "5 53 47\r",
+ "5 53 48\r",
+ "5 53 49\r",
+ "5 53 50\r",
+ "5 53 51\r",
+ "5 53 52\r",
+ "5 53 53\r",
+ "5 53 54\r",
+ "5 53 55\r",
+ "5 53 56\r",
+ "5 53 57\r",
+ "5 53 58\r",
+ "5 54 1\r",
+ "5 54 2\r",
+ "5 54 3\r",
+ "5 54 4\r",
+ "5 54 5\r",
+ "5 54 6\r",
+ "5 54 7\r",
+ "5 54 8\r",
+ "5 54 9\r",
+ "5 54 10\r",
+ "5 54 11\r",
+ "5 54 12\r",
+ "5 54 13\r",
+ "5 54 14\r",
+ "5 54 15\r",
+ "5 54 16\r",
+ "5 54 17\r",
+ "5 54 18\r",
+ "5 54 19\r",
+ "5 54 20\r",
+ "5 54 21\r",
+ "5 54 22\r",
+ "5 54 23\r",
+ "5 54 24\r",
+ "5 54 25\r",
+ "5 54 26\r",
+ "5 54 27\r",
+ "5 54 28\r",
+ "5 54 29\r",
+ "5 54 30\r",
+ "5 54 31\r",
+ "5 54 32\r",
+ "5 54 33\r",
+ "5 54 34\r",
+ "5 54 35\r",
+ "5 54 36\r",
+ "5 54 37\r",
+ "5 54 38\r",
+ "5 54 39\r",
+ "5 54 40\r",
+ "5 54 41\r",
+ "5 54 42\r",
+ "5 54 43\r",
+ "5 54 44\r",
+ "5 54 45\r",
+ "5 54 46\r",
+ "5 54 47\r",
+ "5 54 48\r",
+ "5 54 49\r",
+ "5 54 50\r",
+ "5 54 51\r",
+ "5 54 52\r",
+ "5 54 53\r",
+ "5 54 54\r",
+ "5 54 55\r",
+ "5 54 56\r",
+ "5 54 57\r",
+ "5 54 58\r",
+ "5 55 1\r",
+ "5 55 2\r",
+ "5 55 3\r",
+ "5 55 4\r",
+ "5 55 5\r",
+ "5 55 6\r",
+ "5 55 7\r",
+ "5 55 8\r",
+ "5 55 9\r",
+ "5 55 10\r",
+ "5 55 11\r",
+ "5 55 12\r",
+ "5 55 13\r",
+ "5 55 14\r",
+ "5 55 15\r",
+ "5 55 16\r",
+ "5 55 17\r",
+ "5 55 18\r",
+ "5 55 19\r",
+ "5 55 20\r",
+ "5 55 21\r",
+ "5 55 22\r",
+ "5 55 23\r",
+ "5 55 24\r",
+ "5 55 25\r",
+ "5 55 26\r",
+ "5 55 27\r",
+ "5 55 28\r",
+ "5 55 29\r",
+ "5 55 30\r",
+ "5 55 31\r",
+ "5 55 32\r",
+ "5 55 33\r",
+ "5 55 34\r",
+ "5 55 35\r",
+ "5 55 36\r",
+ "5 55 37\r",
+ "5 55 38\r",
+ "5 55 39\r",
+ "5 55 40\r",
+ "5 55 41\r",
+ "5 55 42\r",
+ "5 55 43\r",
+ "5 55 44\r",
+ "5 55 45\r",
+ "5 55 46\r",
+ "5 55 47\r",
+ "5 55 48\r",
+ "5 55 49\r",
+ "5 55 50\r",
+ "5 55 51\r",
+ "5 55 52\r",
+ "5 55 53\r",
+ "5 55 54\r",
+ "5 55 55\r",
+ "5 55 56\r",
+ "5 55 57\r",
+ "5 55 58\r",
+ "5 56 1\r",
+ "5 56 2\r",
+ "5 56 3\r",
+ "5 56 4\r",
+ "5 56 5\r",
+ "5 56 6\r",
+ "5 56 7\r",
+ "5 56 8\r",
+ "5 56 9\r",
+ "5 56 10\r",
+ "5 56 11\r",
+ "5 56 12\r",
+ "5 56 13\r",
+ "5 56 14\r",
+ "5 56 15\r",
+ "5 56 16\r",
+ "5 56 17\r",
+ "5 56 18\r",
+ "5 56 19\r",
+ "5 56 20\r",
+ "5 56 21\r",
+ "5 56 22\r",
+ "5 56 23\r",
+ "5 56 24\r",
+ "5 56 25\r",
+ "5 56 26\r",
+ "5 56 27\r",
+ "5 56 28\r",
+ "5 56 29\r",
+ "5 56 30\r",
+ "5 56 31\r",
+ "5 56 32\r",
+ "5 56 33\r",
+ "5 56 34\r",
+ "5 56 35\r",
+ "5 56 36\r",
+ "5 56 37\r",
+ "5 56 38\r",
+ "5 56 39\r",
+ "5 56 40\r",
+ "5 56 41\r",
+ "5 56 42\r",
+ "5 56 43\r",
+ "5 56 44\r",
+ "5 56 45\r",
+ "5 56 46\r",
+ "5 56 47\r",
+ "5 56 48\r",
+ "5 56 49\r",
+ "5 56 50\r",
+ "5 56 51\r",
+ "5 56 52\r",
+ "5 56 53\r",
+ "5 56 54\r",
+ "5 56 55\r",
+ "5 56 56\r",
+ "5 56 57\r",
+ "5 56 58\r",
+ "5 57 1\r",
+ "5 57 2\r",
+ "5 57 3\r",
+ "5 57 4\r",
+ "5 57 5\r",
+ "5 57 6\r",
+ "5 57 7\r",
+ "5 57 8\r",
+ "5 57 9\r",
+ "5 57 10\r",
+ "5 57 11\r",
+ "5 57 12\r",
+ "5 57 13\r",
+ "5 57 14\r",
+ "5 57 15\r",
+ "5 57 16\r",
+ "5 57 17\r",
+ "5 57 18\r",
+ "5 57 19\r",
+ "5 57 20\r",
+ "5 57 21\r",
+ "5 57 22\r",
+ "5 57 23\r",
+ "5 57 24\r",
+ "5 57 25\r",
+ "5 57 26\r",
+ "5 57 27\r",
+ "5 57 28\r",
+ "5 57 29\r",
+ "5 57 30\r",
+ "5 57 31\r",
+ "5 57 32\r",
+ "5 57 33\r",
+ "5 57 34\r",
+ "5 57 35\r",
+ "5 57 36\r",
+ "5 57 37\r",
+ "5 57 38\r",
+ "5 57 39\r",
+ "5 57 40\r",
+ "5 57 41\r",
+ "5 57 42\r",
+ "5 57 43\r",
+ "5 57 44\r",
+ "5 57 45\r",
+ "5 57 46\r",
+ "5 57 47\r",
+ "5 57 48\r",
+ "5 57 49\r",
+ "5 57 50\r",
+ "5 57 51\r",
+ "5 57 52\r",
+ "5 57 53\r",
+ "5 57 54\r",
+ "5 57 55\r",
+ "5 57 56\r",
+ "5 57 57\r",
+ "5 57 58\r",
+ "5 58 1\r",
+ "5 58 2\r",
+ "5 58 3\r",
+ "5 58 4\r",
+ "5 58 5\r",
+ "5 58 6\r",
+ "5 58 7\r",
+ "5 58 8\r",
+ "5 58 9\r",
+ "5 58 10\r",
+ "5 58 11\r",
+ "5 58 12\r",
+ "5 58 13\r",
+ "5 58 14\r",
+ "5 58 15\r",
+ "5 58 16\r",
+ "5 58 17\r",
+ "5 58 18\r",
+ "5 58 19\r",
+ "5 58 20\r",
+ "5 58 21\r",
+ "5 58 22\r",
+ "5 58 23\r",
+ "5 58 24\r",
+ "5 58 25\r",
+ "5 58 26\r",
+ "5 58 27\r",
+ "5 58 28\r",
+ "5 58 29\r",
+ "5 58 30\r",
+ "5 58 31\r",
+ "5 58 32\r",
+ "5 58 33\r",
+ "5 58 34\r",
+ "5 58 35\r",
+ "5 58 36\r",
+ "5 58 37\r",
+ "5 58 38\r",
+ "5 58 39\r",
+ "5 58 40\r",
+ "5 58 41\r",
+ "5 58 42\r",
+ "5 58 43\r",
+ "5 58 44\r",
+ "5 58 45\r",
+ "5 58 46\r",
+ "5 58 47\r",
+ "5 58 48\r",
+ "5 58 49\r",
+ "5 58 50\r",
+ "5 58 51\r",
+ "5 58 52\r",
+ "5 58 53\r",
+ "5 58 54\r",
+ "5 58 55\r",
+ "5 58 56\r",
+ "5 58 57\r",
+ "5 58 58\r",
+ "6 1 1\r",
+ "6 1 2\r",
+ "6 1 3\r",
+ "6 1 4\r",
+ "6 1 5\r",
+ "6 1 6\r",
+ "6 1 7\r",
+ "6 1 8\r",
+ "6 1 9\r",
+ "6 1 10\r",
+ "6 1 11\r",
+ "6 1 12\r",
+ "6 1 13\r",
+ "6 1 14\r",
+ "6 1 15\r",
+ "6 1 16\r",
+ "6 1 17\r",
+ "6 1 18\r",
+ "6 1 19\r",
+ "6 1 20\r",
+ "6 1 21\r",
+ "6 1 22\r",
+ "6 1 23\r",
+ "6 1 24\r",
+ "6 1 25\r",
+ "6 1 26\r",
+ "6 1 27\r",
+ "6 1 28\r",
+ "6 1 29\r",
+ "6 1 30\r",
+ "6 1 31\r",
+ "6 1 32\r",
+ "6 1 33\r",
+ "6 1 34\r",
+ "6 1 35\r",
+ "6 1 36\r",
+ "6 1 37\r",
+ "6 1 38\r",
+ "6 1 39\r",
+ "6 1 40\r",
+ "6 1 41\r",
+ "6 1 42\r",
+ "6 1 43\r",
+ "6 1 44\r",
+ "6 1 45\r",
+ "6 1 46\r",
+ "6 1 47\r",
+ "6 1 48\r",
+ "6 1 49\r",
+ "6 1 50\r",
+ "6 1 51\r",
+ "6 1 52\r",
+ "6 1 53\r",
+ "6 1 54\r",
+ "6 1 55\r",
+ "6 1 56\r",
+ "6 1 57\r",
+ "6 1 58\r",
+ "6 2 1\r",
+ "6 2 2\r",
+ "6 2 3\r",
+ "6 2 4\r",
+ "6 2 5\r",
+ "6 2 6\r",
+ "6 2 7\r",
+ "6 2 8\r",
+ "6 2 9\r",
+ "6 2 10\r",
+ "6 2 11\r",
+ "6 2 12\r",
+ "6 2 13\r",
+ "6 2 14\r",
+ "6 2 15\r",
+ "6 2 16\r",
+ "6 2 17\r",
+ "6 2 18\r",
+ "6 2 19\r",
+ "6 2 20\r",
+ "6 2 21\r",
+ "6 2 22\r",
+ "6 2 23\r",
+ "6 2 24\r",
+ "6 2 25\r",
+ "6 2 26\r",
+ "6 2 27\r",
+ "6 2 28\r",
+ "6 2 29\r",
+ "6 2 30\r",
+ "6 2 31\r",
+ "6 2 32\r",
+ "6 2 33\r",
+ "6 2 34\r",
+ "6 2 35\r",
+ "6 2 36\r",
+ "6 2 37\r",
+ "6 2 38\r",
+ "6 2 39\r",
+ "6 2 40\r",
+ "6 2 41\r",
+ "6 2 42\r",
+ "6 2 43\r",
+ "6 2 44\r",
+ "6 2 45\r",
+ "6 2 46\r",
+ "6 2 47\r",
+ "6 2 48\r",
+ "6 2 49\r",
+ "6 2 50\r",
+ "6 2 51\r",
+ "6 2 52\r",
+ "6 2 53\r",
+ "6 2 54\r",
+ "6 2 55\r",
+ "6 2 56\r",
+ "6 2 57\r",
+ "6 2 58\r",
+ "6 3 1\r",
+ "6 3 2\r",
+ "6 3 3\r",
+ "6 3 4\r",
+ "6 3 5\r",
+ "6 3 6\r",
+ "6 3 7\r",
+ "6 3 8\r",
+ "6 3 9\r",
+ "6 3 10\r",
+ "6 3 11\r",
+ "6 3 12\r",
+ "6 3 13\r",
+ "6 3 14\r",
+ "6 3 15\r",
+ "6 3 16\r",
+ "6 3 17\r",
+ "6 3 18\r",
+ "6 3 19\r",
+ "6 3 20\r",
+ "6 3 21\r",
+ "6 3 22\r",
+ "6 3 23\r",
+ "6 3 24\r",
+ "6 3 25\r",
+ "6 3 26\r",
+ "6 3 27\r",
+ "6 3 28\r",
+ "6 3 29\r",
+ "6 3 30\r",
+ "6 3 31\r",
+ "6 3 32\r",
+ "6 3 33\r",
+ "6 3 34\r",
+ "6 3 35\r",
+ "6 3 36\r",
+ "6 3 37\r",
+ "6 3 38\r",
+ "6 3 39\r",
+ "6 3 40\r",
+ "6 3 41\r",
+ "6 3 42\r",
+ "6 3 43\r",
+ "6 3 44\r",
+ "6 3 45\r",
+ "6 3 46\r",
+ "6 3 47\r",
+ "6 3 48\r",
+ "6 3 49\r",
+ "6 3 50\r",
+ "6 3 51\r",
+ "6 3 52\r",
+ "6 3 53\r",
+ "6 3 54\r",
+ "6 3 55\r",
+ "6 3 56\r",
+ "6 3 57\r",
+ "6 3 58\r",
+ "6 4 1\r",
+ "6 4 2\r",
+ "6 4 3\r",
+ "6 4 4\r",
+ "6 4 5\r",
+ "6 4 6\r",
+ "6 4 7\r",
+ "6 4 8\r",
+ "6 4 9\r",
+ "6 4 10\r",
+ "6 4 11\r",
+ "6 4 12\r",
+ "6 4 13\r",
+ "6 4 14\r",
+ "6 4 15\r",
+ "6 4 16\r",
+ "6 4 17\r",
+ "6 4 18\r",
+ "6 4 19\r",
+ "6 4 20\r",
+ "6 4 21\r",
+ "6 4 22\r",
+ "6 4 23\r",
+ "6 4 24\r",
+ "6 4 25\r",
+ "6 4 26\r",
+ "6 4 27\r",
+ "6 4 28\r",
+ "6 4 29\r",
+ "6 4 30\r",
+ "6 4 31\r",
+ "6 4 32\r",
+ "6 4 33\r",
+ "6 4 34\r",
+ "6 4 35\r",
+ "6 4 36\r",
+ "6 4 37\r",
+ "6 4 38\r",
+ "6 4 39\r",
+ "6 4 40\r",
+ "6 4 41\r",
+ "6 4 42\r",
+ "6 4 43\r",
+ "6 4 44\r",
+ "6 4 45\r",
+ "6 4 46\r",
+ "6 4 47\r",
+ "6 4 48\r",
+ "6 4 49\r",
+ "6 4 50\r",
+ "6 4 51\r",
+ "6 4 52\r",
+ "6 4 53\r",
+ "6 4 54\r",
+ "6 4 55\r",
+ "6 4 56\r",
+ "6 4 57\r",
+ "6 4 58\r",
+ "6 5 1\r",
+ "6 5 2\r",
+ "6 5 3\r",
+ "6 5 4\r",
+ "6 5 5\r",
+ "6 5 6\r",
+ "6 5 7\r",
+ "6 5 8\r",
+ "6 5 9\r",
+ "6 5 10\r",
+ "6 5 11\r",
+ "6 5 12\r",
+ "6 5 13\r",
+ "6 5 14\r",
+ "6 5 15\r",
+ "6 5 16\r",
+ "6 5 17\r",
+ "6 5 18\r",
+ "6 5 19\r",
+ "6 5 20\r",
+ "6 5 21\r",
+ "6 5 22\r",
+ "6 5 23\r",
+ "6 5 24\r",
+ "6 5 25\r",
+ "6 5 26\r",
+ "6 5 27\r",
+ "6 5 28\r",
+ "6 5 29\r",
+ "6 5 30\r",
+ "6 5 31\r",
+ "6 5 32\r",
+ "6 5 33\r",
+ "6 5 34\r",
+ "6 5 35\r",
+ "6 5 36\r",
+ "6 5 37\r",
+ "6 5 38\r",
+ "6 5 39\r",
+ "6 5 40\r",
+ "6 5 41\r",
+ "6 5 42\r",
+ "6 5 43\r",
+ "6 5 44\r",
+ "6 5 45\r",
+ "6 5 46\r",
+ "6 5 47\r",
+ "6 5 48\r",
+ "6 5 49\r",
+ "6 5 50\r",
+ "6 5 51\r",
+ "6 5 52\r",
+ "6 5 53\r",
+ "6 5 54\r",
+ "6 5 55\r",
+ "6 5 56\r",
+ "6 5 57\r",
+ "6 5 58\r",
+ "6 6 1\r",
+ "6 6 2\r",
+ "6 6 3\r",
+ "6 6 4\r",
+ "6 6 5\r",
+ "6 6 6\r",
+ "6 6 7\r",
+ "6 6 8\r",
+ "6 6 9\r",
+ "6 6 10\r",
+ "6 6 11\r",
+ "6 6 12\r",
+ "6 6 13\r",
+ "6 6 14\r",
+ "6 6 15\r",
+ "6 6 16\r",
+ "6 6 17\r",
+ "6 6 18\r",
+ "6 6 19\r",
+ "6 6 20\r",
+ "6 6 21\r",
+ "6 6 22\r",
+ "6 6 23\r",
+ "6 6 24\r",
+ "6 6 25\r",
+ "6 6 26\r",
+ "6 6 27\r",
+ "6 6 28\r",
+ "6 6 29\r",
+ "6 6 30\r",
+ "6 6 31\r",
+ "6 6 32\r",
+ "6 6 33\r",
+ "6 6 34\r",
+ "6 6 35\r",
+ "6 6 36\r",
+ "6 6 37\r",
+ "6 6 38\r",
+ "6 6 39\r",
+ "6 6 40\r",
+ "6 6 41\r",
+ "6 6 42\r",
+ "6 6 43\r",
+ "6 6 44\r",
+ "6 6 45\r",
+ "6 6 46\r",
+ "6 6 47\r",
+ "6 6 48\r",
+ "6 6 49\r",
+ "6 6 50\r",
+ "6 6 51\r",
+ "6 6 52\r",
+ "6 6 53\r",
+ "6 6 54\r",
+ "6 6 55\r",
+ "6 6 56\r",
+ "6 6 57\r",
+ "6 6 58\r",
+ "6 7 1\r",
+ "6 7 2\r",
+ "6 7 3\r",
+ "6 7 4\r",
+ "6 7 5\r",
+ "6 7 6\r",
+ "6 7 7\r",
+ "6 7 8\r",
+ "6 7 9\r",
+ "6 7 10\r",
+ "6 7 11\r",
+ "6 7 12\r",
+ "6 7 13\r",
+ "6 7 14\r",
+ "6 7 15\r",
+ "6 7 16\r",
+ "6 7 17\r",
+ "6 7 18\r",
+ "6 7 19\r",
+ "6 7 20\r",
+ "6 7 21\r",
+ "6 7 22\r",
+ "6 7 23\r",
+ "6 7 24\r",
+ "6 7 25\r",
+ "6 7 26\r",
+ "6 7 27\r",
+ "6 7 28\r",
+ "6 7 29\r",
+ "6 7 30\r",
+ "6 7 31\r",
+ "6 7 32\r",
+ "6 7 33\r",
+ "6 7 34\r",
+ "6 7 35\r",
+ "6 7 36\r",
+ "6 7 37\r",
+ "6 7 38\r",
+ "6 7 39\r",
+ "6 7 40\r",
+ "6 7 41\r",
+ "6 7 42\r",
+ "6 7 43\r",
+ "6 7 44\r",
+ "6 7 45\r",
+ "6 7 46\r",
+ "6 7 47\r",
+ "6 7 48\r",
+ "6 7 49\r",
+ "6 7 50\r",
+ "6 7 51\r",
+ "6 7 52\r",
+ "6 7 53\r",
+ "6 7 54\r",
+ "6 7 55\r",
+ "6 7 56\r",
+ "6 7 57\r",
+ "6 7 58\r",
+ "6 8 1\r",
+ "6 8 2\r",
+ "6 8 3\r",
+ "6 8 4\r",
+ "6 8 5\r",
+ "6 8 6\r",
+ "6 8 7\r",
+ "6 8 8\r",
+ "6 8 9\r",
+ "6 8 10\r",
+ "6 8 11\r",
+ "6 8 12\r",
+ "6 8 13\r",
+ "6 8 14\r",
+ "6 8 15\r",
+ "6 8 16\r",
+ "6 8 17\r",
+ "6 8 18\r",
+ "6 8 19\r",
+ "6 8 20\r",
+ "6 8 21\r",
+ "6 8 22\r",
+ "6 8 23\r",
+ "6 8 24\r",
+ "6 8 25\r",
+ "6 8 26\r",
+ "6 8 27\r",
+ "6 8 28\r",
+ "6 8 29\r",
+ "6 8 30\r",
+ "6 8 31\r",
+ "6 8 32\r",
+ "6 8 33\r",
+ "6 8 34\r",
+ "6 8 35\r",
+ "6 8 36\r",
+ "6 8 37\r",
+ "6 8 38\r",
+ "6 8 39\r",
+ "6 8 40\r",
+ "6 8 41\r",
+ "6 8 42\r",
+ "6 8 43\r",
+ "6 8 44\r",
+ "6 8 45\r",
+ "6 8 46\r",
+ "6 8 47\r",
+ "6 8 48\r",
+ "6 8 49\r",
+ "6 8 50\r",
+ "6 8 51\r",
+ "6 8 52\r",
+ "6 8 53\r",
+ "6 8 54\r",
+ "6 8 55\r",
+ "6 8 56\r",
+ "6 8 57\r",
+ "6 8 58\r",
+ "6 9 1\r",
+ "6 9 2\r",
+ "6 9 3\r",
+ "6 9 4\r",
+ "6 9 5\r",
+ "6 9 6\r",
+ "6 9 7\r",
+ "6 9 8\r",
+ "6 9 9\r",
+ "6 9 10\r",
+ "6 9 11\r",
+ "6 9 12\r",
+ "6 9 13\r",
+ "6 9 14\r",
+ "6 9 15\r",
+ "6 9 16\r",
+ "6 9 17\r",
+ "6 9 18\r",
+ "6 9 19\r",
+ "6 9 20\r",
+ "6 9 21\r",
+ "6 9 22\r",
+ "6 9 23\r",
+ "6 9 24\r",
+ "6 9 25\r",
+ "6 9 26\r",
+ "6 9 27\r",
+ "6 9 28\r",
+ "6 9 29\r",
+ "6 9 30\r",
+ "6 9 31\r",
+ "6 9 32\r",
+ "6 9 33\r",
+ "6 9 34\r",
+ "6 9 35\r",
+ "6 9 36\r",
+ "6 9 37\r",
+ "6 9 38\r",
+ "6 9 39\r",
+ "6 9 40\r",
+ "6 9 41\r",
+ "6 9 42\r",
+ "6 9 43\r",
+ "6 9 44\r",
+ "6 9 45\r",
+ "6 9 46\r",
+ "6 9 47\r",
+ "6 9 48\r",
+ "6 9 49\r",
+ "6 9 50\r",
+ "6 9 51\r",
+ "6 9 52\r",
+ "6 9 53\r",
+ "6 9 54\r",
+ "6 9 55\r",
+ "6 9 56\r",
+ "6 9 57\r",
+ "6 9 58\r",
+ "6 10 1\r",
+ "6 10 2\r",
+ "6 10 3\r",
+ "6 10 4\r",
+ "6 10 5\r",
+ "6 10 6\r",
+ "6 10 7\r",
+ "6 10 8\r",
+ "6 10 9\r",
+ "6 10 10\r",
+ "6 10 11\r",
+ "6 10 12\r",
+ "6 10 13\r",
+ "6 10 14\r",
+ "6 10 15\r",
+ "6 10 16\r",
+ "6 10 17\r",
+ "6 10 18\r",
+ "6 10 19\r",
+ "6 10 20\r",
+ "6 10 21\r",
+ "6 10 22\r",
+ "6 10 23\r",
+ "6 10 24\r",
+ "6 10 25\r",
+ "6 10 26\r",
+ "6 10 27\r",
+ "6 10 28\r",
+ "6 10 29\r",
+ "6 10 30\r",
+ "6 10 31\r",
+ "6 10 32\r",
+ "6 10 33\r",
+ "6 10 34\r",
+ "6 10 35\r",
+ "6 10 36\r",
+ "6 10 37\r",
+ "6 10 38\r",
+ "6 10 39\r",
+ "6 10 40\r",
+ "6 10 41\r",
+ "6 10 42\r",
+ "6 10 43\r",
+ "6 10 44\r",
+ "6 10 45\r",
+ "6 10 46\r",
+ "6 10 47\r",
+ "6 10 48\r",
+ "6 10 49\r",
+ "6 10 50\r",
+ "6 10 51\r",
+ "6 10 52\r",
+ "6 10 53\r",
+ "6 10 54\r",
+ "6 10 55\r",
+ "6 10 56\r",
+ "6 10 57\r",
+ "6 10 58\r",
+ "6 11 1\r",
+ "6 11 2\r",
+ "6 11 3\r",
+ "6 11 4\r",
+ "6 11 5\r",
+ "6 11 6\r",
+ "6 11 7\r",
+ "6 11 8\r",
+ "6 11 9\r",
+ "6 11 10\r",
+ "6 11 11\r",
+ "6 11 12\r",
+ "6 11 13\r",
+ "6 11 14\r",
+ "6 11 15\r",
+ "6 11 16\r",
+ "6 11 17\r",
+ "6 11 18\r",
+ "6 11 19\r",
+ "6 11 20\r",
+ "6 11 21\r",
+ "6 11 22\r",
+ "6 11 23\r",
+ "6 11 24\r",
+ "6 11 25\r",
+ "6 11 26\r",
+ "6 11 27\r",
+ "6 11 28\r",
+ "6 11 29\r",
+ "6 11 30\r",
+ "6 11 31\r",
+ "6 11 32\r",
+ "6 11 33\r",
+ "6 11 34\r",
+ "6 11 35\r",
+ "6 11 36\r",
+ "6 11 37\r",
+ "6 11 38\r",
+ "6 11 39\r",
+ "6 11 40\r",
+ "6 11 41\r",
+ "6 11 42\r",
+ "6 11 43\r",
+ "6 11 44\r",
+ "6 11 45\r",
+ "6 11 46\r",
+ "6 11 47\r",
+ "6 11 48\r",
+ "6 11 49\r",
+ "6 11 50\r",
+ "6 11 51\r",
+ "6 11 52\r",
+ "6 11 53\r",
+ "6 11 54\r",
+ "6 11 55\r",
+ "6 11 56\r",
+ "6 11 57\r",
+ "6 11 58\r",
+ "6 12 1\r",
+ "6 12 2\r",
+ "6 12 3\r",
+ "6 12 4\r",
+ "6 12 5\r",
+ "6 12 6\r",
+ "6 12 7\r",
+ "6 12 8\r",
+ "6 12 9\r",
+ "6 12 10\r",
+ "6 12 11\r",
+ "6 12 12\r",
+ "6 12 13\r",
+ "6 12 14\r",
+ "6 12 15\r",
+ "6 12 16\r",
+ "6 12 17\r",
+ "6 12 18\r",
+ "6 12 19\r",
+ "6 12 20\r",
+ "6 12 21\r",
+ "6 12 22\r",
+ "6 12 23\r",
+ "6 12 24\r",
+ "6 12 25\r",
+ "6 12 26\r",
+ "6 12 27\r",
+ "6 12 28\r",
+ "6 12 29\r",
+ "6 12 30\r",
+ "6 12 31\r",
+ "6 12 32\r",
+ "6 12 33\r",
+ "6 12 34\r",
+ "6 12 35\r",
+ "6 12 36\r",
+ "6 12 37\r",
+ "6 12 38\r",
+ "6 12 39\r",
+ "6 12 40\r",
+ "6 12 41\r",
+ "6 12 42\r",
+ "6 12 43\r",
+ "6 12 44\r",
+ "6 12 45\r",
+ "6 12 46\r",
+ "6 12 47\r",
+ "6 12 48\r",
+ "6 12 49\r",
+ "6 12 50\r",
+ "6 12 51\r",
+ "6 12 52\r",
+ "6 12 53\r",
+ "6 12 54\r",
+ "6 12 55\r",
+ "6 12 56\r",
+ "6 12 57\r",
+ "6 12 58\r",
+ "6 13 1\r",
+ "6 13 2\r",
+ "6 13 3\r",
+ "6 13 4\r",
+ "6 13 5\r",
+ "6 13 6\r",
+ "6 13 7\r",
+ "6 13 8\r",
+ "6 13 9\r",
+ "6 13 10\r",
+ "6 13 11\r",
+ "6 13 12\r",
+ "6 13 13\r",
+ "6 13 14\r",
+ "6 13 15\r",
+ "6 13 16\r",
+ "6 13 17\r",
+ "6 13 18\r",
+ "6 13 19\r",
+ "6 13 20\r",
+ "6 13 21\r",
+ "6 13 22\r",
+ "6 13 23\r",
+ "6 13 24\r",
+ "6 13 25\r",
+ "6 13 26\r",
+ "6 13 27\r",
+ "6 13 28\r",
+ "6 13 29\r",
+ "6 13 30\r",
+ "6 13 31\r",
+ "6 13 32\r",
+ "6 13 33\r",
+ "6 13 34\r",
+ "6 13 35\r",
+ "6 13 36\r",
+ "6 13 37\r",
+ "6 13 38\r",
+ "6 13 39\r",
+ "6 13 40\r",
+ "6 13 41\r",
+ "6 13 42\r",
+ "6 13 43\r",
+ "6 13 44\r",
+ "6 13 45\r",
+ "6 13 46\r",
+ "6 13 47\r",
+ "6 13 48\r",
+ "6 13 49\r",
+ "6 13 50\r",
+ "6 13 51\r",
+ "6 13 52\r",
+ "6 13 53\r",
+ "6 13 54\r",
+ "6 13 55\r",
+ "6 13 56\r",
+ "6 13 57\r",
+ "6 13 58\r",
+ "6 14 1\r",
+ "6 14 2\r",
+ "6 14 3\r",
+ "6 14 4\r",
+ "6 14 5\r",
+ "6 14 6\r",
+ "6 14 7\r",
+ "6 14 8\r",
+ "6 14 9\r",
+ "6 14 10\r",
+ "6 14 11\r",
+ "6 14 12\r",
+ "6 14 13\r",
+ "6 14 14\r",
+ "6 14 15\r",
+ "6 14 16\r",
+ "6 14 17\r",
+ "6 14 18\r",
+ "6 14 19\r",
+ "6 14 20\r",
+ "6 14 21\r",
+ "6 14 22\r",
+ "6 14 23\r",
+ "6 14 24\r",
+ "6 14 25\r",
+ "6 14 26\r",
+ "6 14 27\r",
+ "6 14 28\r",
+ "6 14 29\r",
+ "6 14 30\r",
+ "6 14 31\r",
+ "6 14 32\r",
+ "6 14 33\r",
+ "6 14 34\r",
+ "6 14 35\r",
+ "6 14 36\r",
+ "6 14 37\r",
+ "6 14 38\r",
+ "6 14 39\r",
+ "6 14 40\r",
+ "6 14 41\r",
+ "6 14 42\r",
+ "6 14 43\r",
+ "6 14 44\r",
+ "6 14 45\r",
+ "6 14 46\r",
+ "6 14 47\r",
+ "6 14 48\r",
+ "6 14 49\r",
+ "6 14 50\r",
+ "6 14 51\r",
+ "6 14 52\r",
+ "6 14 53\r",
+ "6 14 54\r",
+ "6 14 55\r",
+ "6 14 56\r",
+ "6 14 57\r",
+ "6 14 58\r",
+ "6 15 1\r",
+ "6 15 2\r",
+ "6 15 3\r",
+ "6 15 4\r",
+ "6 15 5\r",
+ "6 15 6\r",
+ "6 15 7\r",
+ "6 15 8\r",
+ "6 15 9\r",
+ "6 15 10\r",
+ "6 15 11\r",
+ "6 15 12\r",
+ "6 15 13\r",
+ "6 15 14\r",
+ "6 15 15\r",
+ "6 15 16\r",
+ "6 15 17\r",
+ "6 15 18\r",
+ "6 15 19\r",
+ "6 15 20\r",
+ "6 15 21\r",
+ "6 15 22\r",
+ "6 15 23\r",
+ "6 15 24\r",
+ "6 15 25\r",
+ "6 15 26\r",
+ "6 15 27\r",
+ "6 15 28\r",
+ "6 15 29\r",
+ "6 15 30\r",
+ "6 15 31\r",
+ "6 15 32\r",
+ "6 15 33\r",
+ "6 15 34\r",
+ "6 15 35\r",
+ "6 15 36\r",
+ "6 15 37\r",
+ "6 15 38\r",
+ "6 15 39\r",
+ "6 15 40\r",
+ "6 15 41\r",
+ "6 15 42\r",
+ "6 15 43\r",
+ "6 15 44\r",
+ "6 15 45\r",
+ "6 15 46\r",
+ "6 15 47\r",
+ "6 15 48\r",
+ "6 15 49\r",
+ "6 15 50\r",
+ "6 15 51\r",
+ "6 15 52\r",
+ "6 15 53\r",
+ "6 15 54\r",
+ "6 15 55\r",
+ "6 15 56\r",
+ "6 15 57\r",
+ "6 15 58\r",
+ "6 16 1\r",
+ "6 16 2\r",
+ "6 16 3\r",
+ "6 16 4\r",
+ "6 16 5\r",
+ "6 16 6\r",
+ "6 16 7\r",
+ "6 16 8\r",
+ "6 16 9\r",
+ "6 16 10\r",
+ "6 16 11\r",
+ "6 16 12\r",
+ "6 16 13\r",
+ "6 16 14\r",
+ "6 16 15\r",
+ "6 16 16\r",
+ "6 16 17\r",
+ "6 16 18\r",
+ "6 16 19\r",
+ "6 16 20\r",
+ "6 16 21\r",
+ "6 16 22\r",
+ "6 16 23\r",
+ "6 16 24\r",
+ "6 16 25\r",
+ "6 16 26\r",
+ "6 16 27\r",
+ "6 16 28\r",
+ "6 16 29\r",
+ "6 16 30\r",
+ "6 16 31\r",
+ "6 16 32\r",
+ "6 16 33\r",
+ "6 16 34\r",
+ "6 16 35\r",
+ "6 16 36\r",
+ "6 16 37\r",
+ "6 16 38\r",
+ "6 16 39\r",
+ "6 16 40\r",
+ "6 16 41\r",
+ "6 16 42\r",
+ "6 16 43\r",
+ "6 16 44\r",
+ "6 16 45\r",
+ "6 16 46\r",
+ "6 16 47\r",
+ "6 16 48\r",
+ "6 16 49\r",
+ "6 16 50\r",
+ "6 16 51\r",
+ "6 16 52\r",
+ "6 16 53\r",
+ "6 16 54\r",
+ "6 16 55\r",
+ "6 16 56\r",
+ "6 16 57\r",
+ "6 16 58\r",
+ "6 17 1\r",
+ "6 17 2\r",
+ "6 17 3\r",
+ "6 17 4\r",
+ "6 17 5\r",
+ "6 17 6\r",
+ "6 17 7\r",
+ "6 17 8\r",
+ "6 17 9\r",
+ "6 17 10\r",
+ "6 17 11\r",
+ "6 17 12\r",
+ "6 17 13\r",
+ "6 17 14\r",
+ "6 17 15\r",
+ "6 17 16\r",
+ "6 17 17\r",
+ "6 17 18\r",
+ "6 17 19\r",
+ "6 17 20\r",
+ "6 17 21\r",
+ "6 17 22\r",
+ "6 17 23\r",
+ "6 17 24\r",
+ "6 17 25\r",
+ "6 17 26\r",
+ "6 17 27\r",
+ "6 17 28\r",
+ "6 17 29\r",
+ "6 17 30\r",
+ "6 17 31\r",
+ "6 17 32\r",
+ "6 17 33\r",
+ "6 17 34\r",
+ "6 17 35\r",
+ "6 17 36\r",
+ "6 17 37\r",
+ "6 17 38\r",
+ "6 17 39\r",
+ "6 17 40\r",
+ "6 17 41\r",
+ "6 17 42\r",
+ "6 17 43\r",
+ "6 17 44\r",
+ "6 17 45\r",
+ "6 17 46\r",
+ "6 17 47\r",
+ "6 17 48\r",
+ "6 17 49\r",
+ "6 17 50\r",
+ "6 17 51\r",
+ "6 17 52\r",
+ "6 17 53\r",
+ "6 17 54\r",
+ "6 17 55\r",
+ "6 17 56\r",
+ "6 17 57\r",
+ "6 17 58\r",
+ "6 18 1\r",
+ "6 18 2\r",
+ "6 18 3\r",
+ "6 18 4\r",
+ "6 18 5\r",
+ "6 18 6\r",
+ "6 18 7\r",
+ "6 18 8\r",
+ "6 18 9\r",
+ "6 18 10\r",
+ "6 18 11\r",
+ "6 18 12\r",
+ "6 18 13\r",
+ "6 18 14\r",
+ "6 18 15\r",
+ "6 18 16\r",
+ "6 18 17\r",
+ "6 18 18\r",
+ "6 18 19\r",
+ "6 18 20\r",
+ "6 18 21\r",
+ "6 18 22\r",
+ "6 18 23\r",
+ "6 18 24\r",
+ "6 18 25\r",
+ "6 18 26\r",
+ "6 18 27\r",
+ "6 18 28\r",
+ "6 18 29\r",
+ "6 18 30\r",
+ "6 18 31\r",
+ "6 18 32\r",
+ "6 18 33\r",
+ "6 18 34\r",
+ "6 18 35\r",
+ "6 18 36\r",
+ "6 18 37\r",
+ "6 18 38\r",
+ "6 18 39\r",
+ "6 18 40\r",
+ "6 18 41\r",
+ "6 18 42\r",
+ "6 18 43\r",
+ "6 18 44\r",
+ "6 18 45\r",
+ "6 18 46\r",
+ "6 18 47\r",
+ "6 18 48\r",
+ "6 18 49\r",
+ "6 18 50\r",
+ "6 18 51\r",
+ "6 18 52\r",
+ "6 18 53\r",
+ "6 18 54\r",
+ "6 18 55\r",
+ "6 18 56\r",
+ "6 18 57\r",
+ "6 18 58\r",
+ "6 19 1\r",
+ "6 19 2\r",
+ "6 19 3\r",
+ "6 19 4\r",
+ "6 19 5\r",
+ "6 19 6\r",
+ "6 19 7\r",
+ "6 19 8\r",
+ "6 19 9\r",
+ "6 19 10\r",
+ "6 19 11\r",
+ "6 19 12\r",
+ "6 19 13\r",
+ "6 19 14\r",
+ "6 19 15\r",
+ "6 19 16\r",
+ "6 19 17\r",
+ "6 19 18\r",
+ "6 19 19\r",
+ "6 19 20\r",
+ "6 19 21\r",
+ "6 19 22\r",
+ "6 19 23\r",
+ "6 19 24\r",
+ "6 19 25\r",
+ "6 19 26\r",
+ "6 19 27\r",
+ "6 19 28\r",
+ "6 19 29\r",
+ "6 19 30\r",
+ "6 19 31\r",
+ "6 19 32\r",
+ "6 19 33\r",
+ "6 19 34\r",
+ "6 19 35\r",
+ "6 19 36\r",
+ "6 19 37\r",
+ "6 19 38\r",
+ "6 19 39\r",
+ "6 19 40\r",
+ "6 19 41\r",
+ "6 19 42\r",
+ "6 19 43\r",
+ "6 19 44\r",
+ "6 19 45\r",
+ "6 19 46\r",
+ "6 19 47\r",
+ "6 19 48\r",
+ "6 19 49\r",
+ "6 19 50\r",
+ "6 19 51\r",
+ "6 19 52\r",
+ "6 19 53\r",
+ "6 19 54\r",
+ "6 19 55\r",
+ "6 19 56\r",
+ "6 19 57\r",
+ "6 19 58\r",
+ "6 20 1\r",
+ "6 20 2\r",
+ "6 20 3\r",
+ "6 20 4\r",
+ "6 20 5\r",
+ "6 20 6\r",
+ "6 20 7\r",
+ "6 20 8\r",
+ "6 20 9\r",
+ "6 20 10\r",
+ "6 20 11\r",
+ "6 20 12\r",
+ "6 20 13\r",
+ "6 20 14\r",
+ "6 20 15\r",
+ "6 20 16\r",
+ "6 20 17\r",
+ "6 20 18\r",
+ "6 20 19\r",
+ "6 20 20\r",
+ "6 20 21\r",
+ "6 20 22\r",
+ "6 20 23\r",
+ "6 20 24\r",
+ "6 20 25\r",
+ "6 20 26\r",
+ "6 20 27\r",
+ "6 20 28\r",
+ "6 20 29\r",
+ "6 20 30\r",
+ "6 20 31\r",
+ "6 20 32\r",
+ "6 20 33\r",
+ "6 20 34\r",
+ "6 20 35\r",
+ "6 20 36\r",
+ "6 20 37\r",
+ "6 20 38\r",
+ "6 20 39\r",
+ "6 20 40\r",
+ "6 20 41\r",
+ "6 20 42\r",
+ "6 20 43\r",
+ "6 20 44\r",
+ "6 20 45\r",
+ "6 20 46\r",
+ "6 20 47\r",
+ "6 20 48\r",
+ "6 20 49\r",
+ "6 20 50\r",
+ "6 20 51\r",
+ "6 20 52\r",
+ "6 20 53\r",
+ "6 20 54\r",
+ "6 20 55\r",
+ "6 20 56\r",
+ "6 20 57\r",
+ "6 20 58\r",
+ "6 21 1\r",
+ "6 21 2\r",
+ "6 21 3\r",
+ "6 21 4\r",
+ "6 21 5\r",
+ "6 21 6\r",
+ "6 21 7\r",
+ "6 21 8\r",
+ "6 21 9\r",
+ "6 21 10\r",
+ "6 21 11\r",
+ "6 21 12\r",
+ "6 21 13\r",
+ "6 21 14\r",
+ "6 21 15\r",
+ "6 21 16\r",
+ "6 21 17\r",
+ "6 21 18\r",
+ "6 21 19\r",
+ "6 21 20\r",
+ "6 21 21\r",
+ "6 21 22\r",
+ "6 21 23\r",
+ "6 21 24\r",
+ "6 21 25\r",
+ "6 21 26\r",
+ "6 21 27\r",
+ "6 21 28\r",
+ "6 21 29\r",
+ "6 21 30\r",
+ "6 21 31\r",
+ "6 21 32\r",
+ "6 21 33\r",
+ "6 21 34\r",
+ "6 21 35\r",
+ "6 21 36\r",
+ "6 21 37\r",
+ "6 21 38\r",
+ "6 21 39\r",
+ "6 21 40\r",
+ "6 21 41\r",
+ "6 21 42\r",
+ "6 21 43\r",
+ "6 21 44\r",
+ "6 21 45\r",
+ "6 21 46\r",
+ "6 21 47\r",
+ "6 21 48\r",
+ "6 21 49\r",
+ "6 21 50\r",
+ "6 21 51\r",
+ "6 21 52\r",
+ "6 21 53\r",
+ "6 21 54\r",
+ "6 21 55\r",
+ "6 21 56\r",
+ "6 21 57\r",
+ "6 21 58\r",
+ "6 22 1\r",
+ "6 22 2\r",
+ "6 22 3\r",
+ "6 22 4\r",
+ "6 22 5\r",
+ "6 22 6\r",
+ "6 22 7\r",
+ "6 22 8\r",
+ "6 22 9\r",
+ "6 22 10\r",
+ "6 22 11\r",
+ "6 22 12\r",
+ "6 22 13\r",
+ "6 22 14\r",
+ "6 22 15\r",
+ "6 22 16\r",
+ "6 22 17\r",
+ "6 22 18\r",
+ "6 22 19\r",
+ "6 22 20\r",
+ "6 22 21\r",
+ "6 22 22\r",
+ "6 22 23\r",
+ "6 22 24\r",
+ "6 22 25\r",
+ "6 22 26\r",
+ "6 22 27\r",
+ "6 22 28\r",
+ "6 22 29\r",
+ "6 22 30\r",
+ "6 22 31\r",
+ "6 22 32\r",
+ "6 22 33\r",
+ "6 22 34\r",
+ "6 22 35\r",
+ "6 22 36\r",
+ "6 22 37\r",
+ "6 22 38\r",
+ "6 22 39\r",
+ "6 22 40\r",
+ "6 22 41\r",
+ "6 22 42\r",
+ "6 22 43\r",
+ "6 22 44\r",
+ "6 22 45\r",
+ "6 22 46\r",
+ "6 22 47\r",
+ "6 22 48\r",
+ "6 22 49\r",
+ "6 22 50\r",
+ "6 22 51\r",
+ "6 22 52\r",
+ "6 22 53\r",
+ "6 22 54\r",
+ "6 22 55\r",
+ "6 22 56\r",
+ "6 22 57\r",
+ "6 22 58\r",
+ "6 23 1\r",
+ "6 23 2\r",
+ "6 23 3\r",
+ "6 23 4\r",
+ "6 23 5\r",
+ "6 23 6\r",
+ "6 23 7\r",
+ "6 23 8\r",
+ "6 23 9\r",
+ "6 23 10\r",
+ "6 23 11\r",
+ "6 23 12\r",
+ "6 23 13\r",
+ "6 23 14\r",
+ "6 23 15\r",
+ "6 23 16\r",
+ "6 23 17\r",
+ "6 23 18\r",
+ "6 23 19\r",
+ "6 23 20\r",
+ "6 23 21\r",
+ "6 23 22\r",
+ "6 23 23\r",
+ "6 23 24\r",
+ "6 23 25\r",
+ "6 23 26\r",
+ "6 23 27\r",
+ "6 23 28\r",
+ "6 23 29\r",
+ "6 23 30\r",
+ "6 23 31\r",
+ "6 23 32\r",
+ "6 23 33\r",
+ "6 23 34\r",
+ "6 23 35\r",
+ "6 23 36\r",
+ "6 23 37\r",
+ "6 23 38\r",
+ "6 23 39\r",
+ "6 23 40\r",
+ "6 23 41\r",
+ "6 23 42\r",
+ "6 23 43\r",
+ "6 23 44\r",
+ "6 23 45\r",
+ "6 23 46\r",
+ "6 23 47\r",
+ "6 23 48\r",
+ "6 23 49\r",
+ "6 23 50\r",
+ "6 23 51\r",
+ "6 23 52\r",
+ "6 23 53\r",
+ "6 23 54\r",
+ "6 23 55\r",
+ "6 23 56\r",
+ "6 23 57\r",
+ "6 23 58\r",
+ "6 24 1\r",
+ "6 24 2\r",
+ "6 24 3\r",
+ "6 24 4\r",
+ "6 24 5\r",
+ "6 24 6\r",
+ "6 24 7\r",
+ "6 24 8\r",
+ "6 24 9\r",
+ "6 24 10\r",
+ "6 24 11\r",
+ "6 24 12\r",
+ "6 24 13\r",
+ "6 24 14\r",
+ "6 24 15\r",
+ "6 24 16\r",
+ "6 24 17\r",
+ "6 24 18\r",
+ "6 24 19\r",
+ "6 24 20\r",
+ "6 24 21\r",
+ "6 24 22\r",
+ "6 24 23\r",
+ "6 24 24\r",
+ "6 24 25\r",
+ "6 24 26\r",
+ "6 24 27\r",
+ "6 24 28\r",
+ "6 24 29\r",
+ "6 24 30\r",
+ "6 24 31\r",
+ "6 24 32\r",
+ "6 24 33\r",
+ "6 24 34\r",
+ "6 24 35\r",
+ "6 24 36\r",
+ "6 24 37\r",
+ "6 24 38\r",
+ "6 24 39\r",
+ "6 24 40\r",
+ "6 24 41\r",
+ "6 24 42\r",
+ "6 24 43\r",
+ "6 24 44\r",
+ "6 24 45\r",
+ "6 24 46\r",
+ "6 24 47\r",
+ "6 24 48\r",
+ "6 24 49\r",
+ "6 24 50\r",
+ "6 24 51\r",
+ "6 24 52\r",
+ "6 24 53\r",
+ "6 24 54\r",
+ "6 24 55\r",
+ "6 24 56\r",
+ "6 24 57\r",
+ "6 24 58\r",
+ "6 25 1\r",
+ "6 25 2\r",
+ "6 25 3\r",
+ "6 25 4\r",
+ "6 25 5\r",
+ "6 25 6\r",
+ "6 25 7\r",
+ "6 25 8\r",
+ "6 25 9\r",
+ "6 25 10\r",
+ "6 25 11\r",
+ "6 25 12\r",
+ "6 25 13\r",
+ "6 25 14\r",
+ "6 25 15\r",
+ "6 25 16\r",
+ "6 25 17\r",
+ "6 25 18\r",
+ "6 25 19\r",
+ "6 25 20\r",
+ "6 25 21\r",
+ "6 25 22\r",
+ "6 25 23\r",
+ "6 25 24\r",
+ "6 25 25\r",
+ "6 25 26\r",
+ "6 25 27\r",
+ "6 25 28\r",
+ "6 25 29\r",
+ "6 25 30\r",
+ "6 25 31\r",
+ "6 25 32\r",
+ "6 25 33\r",
+ "6 25 34\r",
+ "6 25 35\r",
+ "6 25 36\r",
+ "6 25 37\r",
+ "6 25 38\r",
+ "6 25 39\r",
+ "6 25 40\r",
+ "6 25 41\r",
+ "6 25 42\r",
+ "6 25 43\r",
+ "6 25 44\r",
+ "6 25 45\r",
+ "6 25 46\r",
+ "6 25 47\r",
+ "6 25 48\r",
+ "6 25 49\r",
+ "6 25 50\r",
+ "6 25 51\r",
+ "6 25 52\r",
+ "6 25 53\r",
+ "6 25 54\r",
+ "6 25 55\r",
+ "6 25 56\r",
+ "6 25 57\r",
+ "6 25 58\r",
+ "6 26 1\r",
+ "6 26 2\r",
+ "6 26 3\r",
+ "6 26 4\r",
+ "6 26 5\r",
+ "6 26 6\r",
+ "6 26 7\r",
+ "6 26 8\r",
+ "6 26 9\r",
+ "6 26 10\r",
+ "6 26 11\r",
+ "6 26 12\r",
+ "6 26 13\r",
+ "6 26 14\r",
+ "6 26 15\r",
+ "6 26 16\r",
+ "6 26 17\r",
+ "6 26 18\r",
+ "6 26 19\r",
+ "6 26 20\r",
+ "6 26 21\r",
+ "6 26 22\r",
+ "6 26 23\r",
+ "6 26 24\r",
+ "6 26 25\r",
+ "6 26 26\r",
+ "6 26 27\r",
+ "6 26 28\r",
+ "6 26 29\r",
+ "6 26 30\r",
+ "6 26 31\r",
+ "6 26 32\r",
+ "6 26 33\r",
+ "6 26 34\r",
+ "6 26 35\r",
+ "6 26 36\r",
+ "6 26 37\r",
+ "6 26 38\r",
+ "6 26 39\r",
+ "6 26 40\r",
+ "6 26 41\r",
+ "6 26 42\r",
+ "6 26 43\r",
+ "6 26 44\r",
+ "6 26 45\r",
+ "6 26 46\r",
+ "6 26 47\r",
+ "6 26 48\r",
+ "6 26 49\r",
+ "6 26 50\r",
+ "6 26 51\r",
+ "6 26 52\r",
+ "6 26 53\r",
+ "6 26 54\r",
+ "6 26 55\r",
+ "6 26 56\r",
+ "6 26 57\r",
+ "6 26 58\r",
+ "6 27 1\r",
+ "6 27 2\r",
+ "6 27 3\r",
+ "6 27 4\r",
+ "6 27 5\r",
+ "6 27 6\r",
+ "6 27 7\r",
+ "6 27 8\r",
+ "6 27 9\r",
+ "6 27 10\r",
+ "6 27 11\r",
+ "6 27 12\r",
+ "6 27 13\r",
+ "6 27 14\r",
+ "6 27 15\r",
+ "6 27 16\r",
+ "6 27 17\r",
+ "6 27 18\r",
+ "6 27 19\r",
+ "6 27 20\r",
+ "6 27 21\r",
+ "6 27 22\r",
+ "6 27 23\r",
+ "6 27 24\r",
+ "6 27 25\r",
+ "6 27 26\r",
+ "6 27 27\r",
+ "6 27 28\r",
+ "6 27 29\r",
+ "6 27 30\r",
+ "6 27 31\r",
+ "6 27 32\r",
+ "6 27 33\r",
+ "6 27 34\r",
+ "6 27 35\r",
+ "6 27 36\r",
+ "6 27 37\r",
+ "6 27 38\r",
+ "6 27 39\r",
+ "6 27 40\r",
+ "6 27 41\r",
+ "6 27 42\r",
+ "6 27 43\r",
+ "6 27 44\r",
+ "6 27 45\r",
+ "6 27 46\r",
+ "6 27 47\r",
+ "6 27 48\r",
+ "6 27 49\r",
+ "6 27 50\r",
+ "6 27 51\r",
+ "6 27 52\r",
+ "6 27 53\r",
+ "6 27 54\r",
+ "6 27 55\r",
+ "6 27 56\r",
+ "6 27 57\r",
+ "6 27 58\r",
+ "6 28 1\r",
+ "6 28 2\r",
+ "6 28 3\r",
+ "6 28 4\r",
+ "6 28 5\r",
+ "6 28 6\r",
+ "6 28 7\r",
+ "6 28 8\r",
+ "6 28 9\r",
+ "6 28 10\r",
+ "6 28 11\r",
+ "6 28 12\r",
+ "6 28 13\r",
+ "6 28 14\r",
+ "6 28 15\r",
+ "6 28 16\r",
+ "6 28 17\r",
+ "6 28 18\r",
+ "6 28 19\r",
+ "6 28 20\r",
+ "6 28 21\r",
+ "6 28 22\r",
+ "6 28 23\r",
+ "6 28 24\r",
+ "6 28 25\r",
+ "6 28 26\r",
+ "6 28 27\r",
+ "6 28 28\r",
+ "6 28 29\r",
+ "6 28 30\r",
+ "6 28 31\r",
+ "6 28 32\r",
+ "6 28 33\r",
+ "6 28 34\r",
+ "6 28 35\r",
+ "6 28 36\r",
+ "6 28 37\r",
+ "6 28 38\r",
+ "6 28 39\r",
+ "6 28 40\r",
+ "6 28 41\r",
+ "6 28 42\r",
+ "6 28 43\r",
+ "6 28 44\r",
+ "6 28 45\r",
+ "6 28 46\r",
+ "6 28 47\r",
+ "6 28 48\r",
+ "6 28 49\r",
+ "6 28 50\r",
+ "6 28 51\r",
+ "6 28 52\r",
+ "6 28 53\r",
+ "6 28 54\r",
+ "6 28 55\r",
+ "6 28 56\r",
+ "6 28 57\r",
+ "6 28 58\r",
+ "6 29 1\r",
+ "6 29 2\r",
+ "6 29 3\r",
+ "6 29 4\r",
+ "6 29 5\r",
+ "6 29 6\r",
+ "6 29 7\r",
+ "6 29 8\r",
+ "6 29 9\r",
+ "6 29 10\r",
+ "6 29 11\r",
+ "6 29 12"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "6 29 13\r",
+ "6 29 14\r",
+ "6 29 15\r",
+ "6 29 16\r",
+ "6 29 17\r",
+ "6 29 18\r",
+ "6 29 19\r",
+ "6 29 20\r",
+ "6 29 21\r",
+ "6 29 22\r",
+ "6 29 23\r",
+ "6 29 24\r",
+ "6 29 25\r",
+ "6 29 26\r",
+ "6 29 27\r",
+ "6 29 28\r",
+ "6 29 29\r",
+ "6 29 30\r",
+ "6 29 31\r",
+ "6 29 32\r",
+ "6 29 33\r",
+ "6 29 34\r",
+ "6 29 35\r",
+ "6 29 36\r",
+ "6 29 37\r",
+ "6 29 38\r",
+ "6 29 39\r",
+ "6 29 40\r",
+ "6 29 41\r",
+ "6 29 42\r",
+ "6 29 43\r",
+ "6 29 44\r",
+ "6 29 45\r",
+ "6 29 46\r",
+ "6 29 47\r",
+ "6 29 48\r",
+ "6 29 49\r",
+ "6 29 50\r",
+ "6 29 51\r",
+ "6 29 52\r",
+ "6 29 53\r",
+ "6 29 54\r",
+ "6 29 55\r",
+ "6 29 56\r",
+ "6 29 57\r",
+ "6 29 58\r",
+ "6 30 1\r",
+ "6 30 2\r",
+ "6 30 3\r",
+ "6 30 4\r",
+ "6 30 5\r",
+ "6 30 6\r",
+ "6 30 7\r",
+ "6 30 8\r",
+ "6 30 9\r",
+ "6 30 10\r",
+ "6 30 11\r",
+ "6 30 12\r",
+ "6 30 13\r",
+ "6 30 14\r",
+ "6 30 15\r",
+ "6 30 16\r",
+ "6 30 17\r",
+ "6 30 18\r",
+ "6 30 19\r",
+ "6 30 20\r",
+ "6 30 21\r",
+ "6 30 22\r",
+ "6 30 23\r",
+ "6 30 24\r",
+ "6 30 25\r",
+ "6 30 26\r",
+ "6 30 27\r",
+ "6 30 28\r",
+ "6 30 29\r",
+ "6 30 30\r",
+ "6 30 31\r",
+ "6 30 32\r",
+ "6 30 33\r",
+ "6 30 34\r",
+ "6 30 35\r",
+ "6 30 36\r",
+ "6 30 37\r",
+ "6 30 38\r",
+ "6 30 39\r",
+ "6 30 40\r",
+ "6 30 41\r",
+ "6 30 42\r",
+ "6 30 43\r",
+ "6 30 44\r",
+ "6 30 45\r",
+ "6 30 46\r",
+ "6 30 47\r",
+ "6 30 48\r",
+ "6 30 49\r",
+ "6 30 50\r",
+ "6 30 51\r",
+ "6 30 52\r",
+ "6 30 53\r",
+ "6 30 54\r",
+ "6 30 55\r",
+ "6 30 56\r",
+ "6 30 57\r",
+ "6 30 58\r",
+ "6 31 1\r",
+ "6 31 2\r",
+ "6 31 3\r",
+ "6 31 4\r",
+ "6 31 5\r",
+ "6 31 6\r",
+ "6 31 7\r",
+ "6 31 8\r",
+ "6 31 9\r",
+ "6 31 10\r",
+ "6 31 11\r",
+ "6 31 12\r",
+ "6 31 13\r",
+ "6 31 14\r",
+ "6 31 15\r",
+ "6 31 16\r",
+ "6 31 17\r",
+ "6 31 18\r",
+ "6 31 19\r",
+ "6 31 20\r",
+ "6 31 21\r",
+ "6 31 22\r",
+ "6 31 23\r",
+ "6 31 24\r",
+ "6 31 25\r",
+ "6 31 26\r",
+ "6 31 27\r",
+ "6 31 28\r",
+ "6 31 29\r",
+ "6 31 30\r",
+ "6 31 31\r",
+ "6 31 32\r",
+ "6 31 33\r",
+ "6 31 34\r",
+ "6 31 35\r",
+ "6 31 36\r",
+ "6 31 37\r",
+ "6 31 38\r",
+ "6 31 39\r",
+ "6 31 40\r",
+ "6 31 41\r",
+ "6 31 42\r",
+ "6 31 43\r",
+ "6 31 44\r",
+ "6 31 45\r",
+ "6 31 46\r",
+ "6 31 47\r",
+ "6 31 48\r",
+ "6 31 49\r",
+ "6 31 50\r",
+ "6 31 51\r",
+ "6 31 52\r",
+ "6 31 53\r",
+ "6 31 54\r",
+ "6 31 55\r",
+ "6 31 56\r",
+ "6 31 57\r",
+ "6 31 58\r",
+ "6 32 1\r",
+ "6 32 2\r",
+ "6 32 3\r",
+ "6 32 4\r",
+ "6 32 5\r",
+ "6 32 6\r",
+ "6 32 7\r",
+ "6 32 8\r",
+ "6 32 9\r",
+ "6 32 10\r",
+ "6 32 11\r",
+ "6 32 12\r",
+ "6 32 13\r",
+ "6 32 14\r",
+ "6 32 15\r",
+ "6 32 16\r",
+ "6 32 17\r",
+ "6 32 18\r",
+ "6 32 19\r",
+ "6 32 20\r",
+ "6 32 21\r",
+ "6 32 22\r",
+ "6 32 23\r",
+ "6 32 24\r",
+ "6 32 25\r",
+ "6 32 26\r",
+ "6 32 27\r",
+ "6 32 28\r",
+ "6 32 29\r",
+ "6 32 30\r",
+ "6 32 31\r",
+ "6 32 32\r",
+ "6 32 33\r",
+ "6 32 34\r",
+ "6 32 35\r",
+ "6 32 36\r",
+ "6 32 37\r",
+ "6 32 38\r",
+ "6 32 39\r",
+ "6 32 40\r",
+ "6 32 41\r",
+ "6 32 42\r",
+ "6 32 43\r",
+ "6 32 44\r",
+ "6 32 45\r",
+ "6 32 46\r",
+ "6 32 47\r",
+ "6 32 48\r",
+ "6 32 49\r",
+ "6 32 50\r",
+ "6 32 51\r",
+ "6 32 52\r",
+ "6 32 53\r",
+ "6 32 54\r",
+ "6 32 55\r",
+ "6 32 56\r",
+ "6 32 57\r",
+ "6 32 58\r",
+ "6 33 1\r",
+ "6 33 2\r",
+ "6 33 3\r",
+ "6 33 4\r",
+ "6 33 5\r",
+ "6 33 6\r",
+ "6 33 7\r",
+ "6 33 8\r",
+ "6 33 9\r",
+ "6 33 10\r",
+ "6 33 11\r",
+ "6 33 12\r",
+ "6 33 13\r",
+ "6 33 14\r",
+ "6 33 15\r",
+ "6 33 16\r",
+ "6 33 17\r",
+ "6 33 18\r",
+ "6 33 19\r",
+ "6 33 20\r",
+ "6 33 21\r",
+ "6 33 22\r",
+ "6 33 23\r",
+ "6 33 24\r",
+ "6 33 25\r",
+ "6 33 26\r",
+ "6 33 27\r",
+ "6 33 28\r",
+ "6 33 29\r",
+ "6 33 30\r",
+ "6 33 31\r",
+ "6 33 32\r",
+ "6 33 33\r",
+ "6 33 34\r",
+ "6 33 35\r",
+ "6 33 36\r",
+ "6 33 37\r",
+ "6 33 38\r",
+ "6 33 39\r",
+ "6 33 40\r",
+ "6 33 41\r",
+ "6 33 42\r",
+ "6 33 43\r",
+ "6 33 44\r",
+ "6 33 45\r",
+ "6 33 46\r",
+ "6 33 47\r",
+ "6 33 48\r",
+ "6 33 49\r",
+ "6 33 50\r",
+ "6 33 51\r",
+ "6 33 52\r",
+ "6 33 53\r",
+ "6 33 54\r",
+ "6 33 55\r",
+ "6 33 56\r",
+ "6 33 57\r",
+ "6 33 58\r",
+ "6 34 1\r",
+ "6 34 2\r",
+ "6 34 3\r",
+ "6 34 4\r",
+ "6 34 5\r",
+ "6 34 6\r",
+ "6 34 7\r",
+ "6 34 8\r",
+ "6 34 9\r",
+ "6 34 10\r",
+ "6 34 11\r",
+ "6 34 12\r",
+ "6 34 13\r",
+ "6 34 14\r",
+ "6 34 15\r",
+ "6 34 16\r",
+ "6 34 17\r",
+ "6 34 18\r",
+ "6 34 19\r",
+ "6 34 20\r",
+ "6 34 21\r",
+ "6 34 22\r",
+ "6 34 23\r",
+ "6 34 24\r",
+ "6 34 25\r",
+ "6 34 26\r",
+ "6 34 27\r",
+ "6 34 28\r",
+ "6 34 29\r",
+ "6 34 30\r",
+ "6 34 31\r",
+ "6 34 32\r",
+ "6 34 33\r",
+ "6 34 34\r",
+ "6 34 35\r",
+ "6 34 36\r",
+ "6 34 37\r",
+ "6 34 38\r",
+ "6 34 39\r",
+ "6 34 40\r",
+ "6 34 41\r",
+ "6 34 42\r",
+ "6 34 43\r",
+ "6 34 44\r",
+ "6 34 45\r",
+ "6 34 46\r",
+ "6 34 47\r",
+ "6 34 48\r",
+ "6 34 49\r",
+ "6 34 50\r",
+ "6 34 51\r",
+ "6 34 52\r",
+ "6 34 53\r",
+ "6 34 54\r",
+ "6 34 55\r",
+ "6 34 56\r",
+ "6 34 57\r",
+ "6 34 58\r",
+ "6 35 1\r",
+ "6 35 2\r",
+ "6 35 3\r",
+ "6 35 4\r",
+ "6 35 5\r",
+ "6 35 6\r",
+ "6 35 7\r",
+ "6 35 8\r",
+ "6 35 9\r",
+ "6 35 10\r",
+ "6 35 11\r",
+ "6 35 12\r",
+ "6 35 13\r",
+ "6 35 14\r",
+ "6 35 15\r",
+ "6 35 16\r",
+ "6 35 17\r",
+ "6 35 18\r",
+ "6 35 19\r",
+ "6 35 20\r",
+ "6 35 21\r",
+ "6 35 22\r",
+ "6 35 23\r",
+ "6 35 24\r",
+ "6 35 25\r",
+ "6 35 26\r",
+ "6 35 27\r",
+ "6 35 28\r",
+ "6 35 29\r",
+ "6 35 30\r",
+ "6 35 31\r",
+ "6 35 32\r",
+ "6 35 33\r",
+ "6 35 34\r",
+ "6 35 35\r",
+ "6 35 36\r",
+ "6 35 37\r",
+ "6 35 38\r",
+ "6 35 39\r",
+ "6 35 40\r",
+ "6 35 41\r",
+ "6 35 42\r",
+ "6 35 43\r",
+ "6 35 44\r",
+ "6 35 45\r",
+ "6 35 46\r",
+ "6 35 47\r",
+ "6 35 48\r",
+ "6 35 49\r",
+ "6 35 50\r",
+ "6 35 51\r",
+ "6 35 52\r",
+ "6 35 53\r",
+ "6 35 54\r",
+ "6 35 55\r",
+ "6 35 56\r",
+ "6 35 57\r",
+ "6 35 58\r",
+ "6 36 1\r",
+ "6 36 2\r",
+ "6 36 3\r",
+ "6 36 4\r",
+ "6 36 5\r",
+ "6 36 6\r",
+ "6 36 7\r",
+ "6 36 8\r",
+ "6 36 9\r",
+ "6 36 10\r",
+ "6 36 11\r",
+ "6 36 12\r",
+ "6 36 13\r",
+ "6 36 14\r",
+ "6 36 15\r",
+ "6 36 16\r",
+ "6 36 17\r",
+ "6 36 18\r",
+ "6 36 19\r",
+ "6 36 20\r",
+ "6 36 21\r",
+ "6 36 22\r",
+ "6 36 23\r",
+ "6 36 24\r",
+ "6 36 25\r",
+ "6 36 26\r",
+ "6 36 27\r",
+ "6 36 28\r",
+ "6 36 29\r",
+ "6 36 30\r",
+ "6 36 31\r",
+ "6 36 32\r",
+ "6 36 33\r",
+ "6 36 34\r",
+ "6 36 35\r",
+ "6 36 36\r",
+ "6 36 37\r",
+ "6 36 38\r",
+ "6 36 39\r",
+ "6 36 40\r",
+ "6 36 41\r",
+ "6 36 42\r",
+ "6 36 43\r",
+ "6 36 44\r",
+ "6 36 45\r",
+ "6 36 46\r",
+ "6 36 47\r",
+ "6 36 48\r",
+ "6 36 49\r",
+ "6 36 50\r",
+ "6 36 51\r",
+ "6 36 52\r",
+ "6 36 53\r",
+ "6 36 54\r",
+ "6 36 55\r",
+ "6 36 56\r",
+ "6 36 57\r",
+ "6 36 58\r",
+ "6 37 1\r",
+ "6 37 2\r",
+ "6 37 3\r",
+ "6 37 4\r",
+ "6 37 5\r",
+ "6 37 6\r",
+ "6 37 7\r",
+ "6 37 8\r",
+ "6 37 9\r",
+ "6 37 10\r",
+ "6 37 11\r",
+ "6 37 12\r",
+ "6 37 13\r",
+ "6 37 14\r",
+ "6 37 15\r",
+ "6 37 16\r",
+ "6 37 17\r",
+ "6 37 18\r",
+ "6 37 19\r",
+ "6 37 20\r",
+ "6 37 21\r",
+ "6 37 22\r",
+ "6 37 23\r",
+ "6 37 24\r",
+ "6 37 25\r",
+ "6 37 26\r",
+ "6 37 27\r",
+ "6 37 28\r",
+ "6 37 29\r",
+ "6 37 30\r",
+ "6 37 31\r",
+ "6 37 32\r",
+ "6 37 33\r",
+ "6 37 34\r",
+ "6 37 35\r",
+ "6 37 36\r",
+ "6 37 37\r",
+ "6 37 38\r",
+ "6 37 39\r",
+ "6 37 40\r",
+ "6 37 41\r",
+ "6 37 42\r",
+ "6 37 43\r",
+ "6 37 44\r",
+ "6 37 45\r",
+ "6 37 46\r",
+ "6 37 47\r",
+ "6 37 48\r",
+ "6 37 49\r",
+ "6 37 50\r",
+ "6 37 51\r",
+ "6 37 52\r",
+ "6 37 53\r",
+ "6 37 54\r",
+ "6 37 55\r",
+ "6 37 56\r",
+ "6 37 57\r",
+ "6 37 58\r",
+ "6 38 1\r",
+ "6 38 2\r",
+ "6 38 3\r",
+ "6 38 4\r",
+ "6 38 5\r",
+ "6 38 6\r",
+ "6 38 7\r",
+ "6 38 8\r",
+ "6 38 9\r",
+ "6 38 10\r",
+ "6 38 11\r",
+ "6 38 12\r",
+ "6 38 13\r",
+ "6 38 14\r",
+ "6 38 15\r",
+ "6 38 16\r",
+ "6 38 17\r",
+ "6 38 18\r",
+ "6 38 19\r",
+ "6 38 20\r",
+ "6 38 21\r",
+ "6 38 22\r",
+ "6 38 23\r",
+ "6 38 24\r",
+ "6 38 25\r",
+ "6 38 26\r",
+ "6 38 27\r",
+ "6 38 28\r",
+ "6 38 29\r",
+ "6 38 30\r",
+ "6 38 31\r",
+ "6 38 32\r",
+ "6 38 33\r",
+ "6 38 34\r",
+ "6 38 35\r",
+ "6 38 36\r",
+ "6 38 37\r",
+ "6 38 38\r",
+ "6 38 39\r",
+ "6 38 40\r",
+ "6 38 41\r",
+ "6 38 42\r",
+ "6 38 43\r",
+ "6 38 44\r",
+ "6 38 45\r",
+ "6 38 46\r",
+ "6 38 47\r",
+ "6 38 48\r",
+ "6 38 49\r",
+ "6 38 50\r",
+ "6 38 51\r",
+ "6 38 52\r",
+ "6 38 53\r",
+ "6 38 54\r",
+ "6 38 55\r",
+ "6 38 56\r",
+ "6 38 57\r",
+ "6 38 58\r",
+ "6 39 1\r",
+ "6 39 2\r",
+ "6 39 3\r",
+ "6 39 4\r",
+ "6 39 5\r",
+ "6 39 6\r",
+ "6 39 7\r",
+ "6 39 8\r",
+ "6 39 9\r",
+ "6 39 10\r",
+ "6 39 11\r",
+ "6 39 12\r",
+ "6 39 13\r",
+ "6 39 14\r",
+ "6 39 15\r",
+ "6 39 16\r",
+ "6 39 17\r",
+ "6 39 18\r",
+ "6 39 19\r",
+ "6 39 20\r",
+ "6 39 21\r",
+ "6 39 22\r",
+ "6 39 23\r",
+ "6 39 24\r",
+ "6 39 25\r",
+ "6 39 26\r",
+ "6 39 27\r",
+ "6 39 28\r",
+ "6 39 29\r",
+ "6 39 30\r",
+ "6 39 31\r",
+ "6 39 32\r",
+ "6 39 33\r",
+ "6 39 34\r",
+ "6 39 35\r",
+ "6 39 36\r",
+ "6 39 37\r",
+ "6 39 38\r",
+ "6 39 39\r",
+ "6 39 40\r",
+ "6 39 41\r",
+ "6 39 42\r",
+ "6 39 43\r",
+ "6 39 44\r",
+ "6 39 45\r",
+ "6 39 46\r",
+ "6 39 47\r",
+ "6 39 48\r",
+ "6 39 49\r",
+ "6 39 50\r",
+ "6 39 51\r",
+ "6 39 52\r",
+ "6 39 53\r",
+ "6 39 54\r",
+ "6 39 55\r",
+ "6 39 56\r",
+ "6 39 57\r",
+ "6 39 58\r",
+ "6 40 1\r",
+ "6 40 2\r",
+ "6 40 3\r",
+ "6 40 4\r",
+ "6 40 5\r",
+ "6 40 6\r",
+ "6 40 7\r",
+ "6 40 8\r",
+ "6 40 9\r",
+ "6 40 10\r",
+ "6 40 11\r",
+ "6 40 12\r",
+ "6 40 13\r",
+ "6 40 14\r",
+ "6 40 15\r",
+ "6 40 16\r",
+ "6 40 17\r",
+ "6 40 18\r",
+ "6 40 19\r",
+ "6 40 20\r",
+ "6 40 21\r",
+ "6 40 22\r",
+ "6 40 23\r",
+ "6 40 24\r",
+ "6 40 25\r",
+ "6 40 26\r",
+ "6 40 27\r",
+ "6 40 28\r",
+ "6 40 29\r",
+ "6 40 30\r",
+ "6 40 31\r",
+ "6 40 32\r",
+ "6 40 33\r",
+ "6 40 34\r",
+ "6 40 35\r",
+ "6 40 36\r",
+ "6 40 37\r",
+ "6 40 38\r",
+ "6 40 39\r",
+ "6 40 40\r",
+ "6 40 41\r",
+ "6 40 42\r",
+ "6 40 43\r",
+ "6 40 44\r",
+ "6 40 45\r",
+ "6 40 46\r",
+ "6 40 47\r",
+ "6 40 48\r",
+ "6 40 49\r",
+ "6 40 50\r",
+ "6 40 51\r",
+ "6 40 52\r",
+ "6 40 53\r",
+ "6 40 54\r",
+ "6 40 55\r",
+ "6 40 56\r",
+ "6 40 57\r",
+ "6 40 58\r",
+ "6 41 1\r",
+ "6 41 2\r",
+ "6 41 3\r",
+ "6 41 4\r",
+ "6 41 5\r",
+ "6 41 6\r",
+ "6 41 7\r",
+ "6 41 8\r",
+ "6 41 9\r",
+ "6 41 10\r",
+ "6 41 11\r",
+ "6 41 12\r",
+ "6 41 13\r",
+ "6 41 14\r",
+ "6 41 15\r",
+ "6 41 16\r",
+ "6 41 17\r",
+ "6 41 18\r",
+ "6 41 19\r",
+ "6 41 20\r",
+ "6 41 21\r",
+ "6 41 22\r",
+ "6 41 23\r",
+ "6 41 24\r",
+ "6 41 25\r",
+ "6 41 26\r",
+ "6 41 27\r",
+ "6 41 28\r",
+ "6 41 29\r",
+ "6 41 30\r",
+ "6 41 31\r",
+ "6 41 32\r",
+ "6 41 33\r",
+ "6 41 34\r",
+ "6 41 35\r",
+ "6 41 36\r",
+ "6 41 37\r",
+ "6 41 38\r",
+ "6 41 39\r",
+ "6 41 40\r",
+ "6 41 41\r",
+ "6 41 42\r",
+ "6 41 43\r",
+ "6 41 44\r",
+ "6 41 45\r",
+ "6 41 46\r",
+ "6 41 47\r",
+ "6 41 48\r",
+ "6 41 49\r",
+ "6 41 50\r",
+ "6 41 51\r",
+ "6 41 52\r",
+ "6 41 53\r",
+ "6 41 54\r",
+ "6 41 55\r",
+ "6 41 56\r",
+ "6 41 57\r",
+ "6 41 58\r",
+ "6 42 1\r",
+ "6 42 2\r",
+ "6 42 3\r",
+ "6 42 4\r",
+ "6 42 5\r",
+ "6 42 6\r",
+ "6 42 7\r",
+ "6 42 8\r",
+ "6 42 9\r",
+ "6 42 10\r",
+ "6 42 11\r",
+ "6 42 12\r",
+ "6 42 13\r",
+ "6 42 14\r",
+ "6 42 15\r",
+ "6 42 16\r",
+ "6 42 17\r",
+ "6 42 18\r",
+ "6 42 19\r",
+ "6 42 20\r",
+ "6 42 21\r",
+ "6 42 22\r",
+ "6 42 23\r",
+ "6 42 24\r",
+ "6 42 25\r",
+ "6 42 26\r",
+ "6 42 27\r",
+ "6 42 28\r",
+ "6 42 29\r",
+ "6 42 30\r",
+ "6 42 31\r",
+ "6 42 32\r",
+ "6 42 33\r",
+ "6 42 34\r",
+ "6 42 35\r",
+ "6 42 36\r",
+ "6 42 37\r",
+ "6 42 38\r",
+ "6 42 39\r",
+ "6 42 40\r",
+ "6 42 41\r",
+ "6 42 42\r",
+ "6 42 43\r",
+ "6 42 44\r",
+ "6 42 45\r",
+ "6 42 46\r",
+ "6 42 47\r",
+ "6 42 48\r",
+ "6 42 49\r",
+ "6 42 50\r",
+ "6 42 51\r",
+ "6 42 52\r",
+ "6 42 53\r",
+ "6 42 54\r",
+ "6 42 55\r",
+ "6 42 56\r",
+ "6 42 57\r",
+ "6 42 58\r",
+ "6 43 1\r",
+ "6 43 2\r",
+ "6 43 3\r",
+ "6 43 4\r",
+ "6 43 5\r",
+ "6 43 6\r",
+ "6 43 7\r",
+ "6 43 8\r",
+ "6 43 9\r",
+ "6 43 10\r",
+ "6 43 11\r",
+ "6 43 12\r",
+ "6 43 13\r",
+ "6 43 14\r",
+ "6 43 15\r",
+ "6 43 16\r",
+ "6 43 17\r",
+ "6 43 18\r",
+ "6 43 19\r",
+ "6 43 20\r",
+ "6 43 21\r",
+ "6 43 22\r",
+ "6 43 23\r",
+ "6 43 24\r",
+ "6 43 25\r",
+ "6 43 26\r",
+ "6 43 27\r",
+ "6 43 28\r",
+ "6 43 29\r",
+ "6 43 30\r",
+ "6 43 31\r",
+ "6 43 32\r",
+ "6 43 33\r",
+ "6 43 34\r",
+ "6 43 35\r",
+ "6 43 36\r",
+ "6 43 37\r",
+ "6 43 38\r",
+ "6 43 39\r",
+ "6 43 40\r",
+ "6 43 41\r",
+ "6 43 42\r",
+ "6 43 43\r",
+ "6 43 44\r",
+ "6 43 45\r",
+ "6 43 46\r",
+ "6 43 47\r",
+ "6 43 48\r",
+ "6 43 49\r",
+ "6 43 50\r",
+ "6 43 51\r",
+ "6 43 52\r",
+ "6 43 53\r",
+ "6 43 54\r",
+ "6 43 55\r",
+ "6 43 56\r",
+ "6 43 57\r",
+ "6 43 58\r",
+ "6 44 1\r",
+ "6 44 2\r",
+ "6 44 3\r",
+ "6 44 4\r",
+ "6 44 5\r",
+ "6 44 6\r",
+ "6 44 7\r",
+ "6 44 8\r",
+ "6 44 9\r",
+ "6 44 10\r",
+ "6 44 11\r",
+ "6 44 12\r",
+ "6 44 13\r",
+ "6 44 14\r",
+ "6 44 15\r",
+ "6 44 16\r",
+ "6 44 17\r",
+ "6 44 18\r",
+ "6 44 19\r",
+ "6 44 20\r",
+ "6 44 21\r",
+ "6 44 22\r",
+ "6 44 23\r",
+ "6 44 24\r",
+ "6 44 25\r",
+ "6 44 26\r",
+ "6 44 27\r",
+ "6 44 28\r",
+ "6 44 29\r",
+ "6 44 30\r",
+ "6 44 31\r",
+ "6 44 32\r",
+ "6 44 33\r",
+ "6 44 34\r",
+ "6 44 35\r",
+ "6 44 36\r",
+ "6 44 37\r",
+ "6 44 38\r",
+ "6 44 39\r",
+ "6 44 40\r",
+ "6 44 41\r",
+ "6 44 42\r",
+ "6 44 43\r",
+ "6 44 44\r",
+ "6 44 45\r",
+ "6 44 46\r",
+ "6 44 47\r",
+ "6 44 48\r",
+ "6 44 49\r",
+ "6 44 50\r",
+ "6 44 51\r",
+ "6 44 52\r",
+ "6 44 53\r",
+ "6 44 54\r",
+ "6 44 55\r",
+ "6 44 56\r",
+ "6 44 57\r",
+ "6 44 58\r",
+ "6 45 1\r",
+ "6 45 2\r",
+ "6 45 3\r",
+ "6 45 4\r",
+ "6 45 5\r",
+ "6 45 6\r",
+ "6 45 7\r",
+ "6 45 8\r",
+ "6 45 9\r",
+ "6 45 10\r",
+ "6 45 11\r",
+ "6 45 12\r",
+ "6 45 13\r",
+ "6 45 14\r",
+ "6 45 15\r",
+ "6 45 16\r",
+ "6 45 17\r",
+ "6 45 18\r",
+ "6 45 19\r",
+ "6 45 20\r",
+ "6 45 21\r",
+ "6 45 22\r",
+ "6 45 23\r",
+ "6 45 24\r",
+ "6 45 25\r",
+ "6 45 26\r",
+ "6 45 27\r",
+ "6 45 28\r",
+ "6 45 29\r",
+ "6 45 30\r",
+ "6 45 31\r",
+ "6 45 32\r",
+ "6 45 33\r",
+ "6 45 34\r",
+ "6 45 35\r",
+ "6 45 36\r",
+ "6 45 37\r",
+ "6 45 38\r",
+ "6 45 39\r",
+ "6 45 40\r",
+ "6 45 41\r",
+ "6 45 42\r",
+ "6 45 43\r",
+ "6 45 44\r",
+ "6 45 45\r",
+ "6 45 46\r",
+ "6 45 47\r",
+ "6 45 48\r",
+ "6 45 49\r",
+ "6 45 50\r",
+ "6 45 51\r",
+ "6 45 52\r",
+ "6 45 53\r",
+ "6 45 54\r",
+ "6 45 55\r",
+ "6 45 56\r",
+ "6 45 57\r",
+ "6 45 58\r",
+ "6 46 1\r",
+ "6 46 2\r",
+ "6 46 3\r",
+ "6 46 4\r",
+ "6 46 5\r",
+ "6 46 6\r",
+ "6 46 7\r",
+ "6 46 8\r",
+ "6 46 9\r",
+ "6 46 10\r",
+ "6 46 11\r",
+ "6 46 12\r",
+ "6 46 13\r",
+ "6 46 14\r",
+ "6 46 15\r",
+ "6 46 16\r",
+ "6 46 17\r",
+ "6 46 18\r",
+ "6 46 19\r",
+ "6 46 20\r",
+ "6 46 21\r",
+ "6 46 22\r",
+ "6 46 23\r",
+ "6 46 24\r",
+ "6 46 25\r",
+ "6 46 26\r",
+ "6 46 27\r",
+ "6 46 28\r",
+ "6 46 29\r",
+ "6 46 30\r",
+ "6 46 31\r",
+ "6 46 32\r",
+ "6 46 33\r",
+ "6 46 34\r",
+ "6 46 35\r",
+ "6 46 36\r",
+ "6 46 37\r",
+ "6 46 38\r",
+ "6 46 39\r",
+ "6 46 40\r",
+ "6 46 41\r",
+ "6 46 42\r",
+ "6 46 43\r",
+ "6 46 44\r",
+ "6 46 45\r",
+ "6 46 46\r",
+ "6 46 47\r",
+ "6 46 48\r",
+ "6 46 49\r",
+ "6 46 50\r",
+ "6 46 51\r",
+ "6 46 52\r",
+ "6 46 53\r",
+ "6 46 54\r",
+ "6 46 55\r",
+ "6 46 56\r",
+ "6 46 57\r",
+ "6 46 58\r",
+ "6 47 1\r",
+ "6 47 2\r",
+ "6 47 3\r",
+ "6 47 4\r",
+ "6 47 5\r",
+ "6 47 6\r",
+ "6 47 7\r",
+ "6 47 8\r",
+ "6 47 9\r",
+ "6 47 10\r",
+ "6 47 11\r",
+ "6 47 12\r",
+ "6 47 13\r",
+ "6 47 14\r",
+ "6 47 15\r",
+ "6 47 16\r",
+ "6 47 17\r",
+ "6 47 18\r",
+ "6 47 19\r",
+ "6 47 20\r",
+ "6 47 21\r",
+ "6 47 22\r",
+ "6 47 23\r",
+ "6 47 24\r",
+ "6 47 25\r",
+ "6 47 26\r",
+ "6 47 27\r",
+ "6 47 28\r",
+ "6 47 29\r",
+ "6 47 30\r",
+ "6 47 31\r",
+ "6 47 32\r",
+ "6 47 33\r",
+ "6 47 34\r",
+ "6 47 35\r",
+ "6 47 36\r",
+ "6 47 37\r",
+ "6 47 38\r",
+ "6 47 39\r",
+ "6 47 40\r",
+ "6 47 41\r",
+ "6 47 42\r",
+ "6 47 43\r",
+ "6 47 44\r",
+ "6 47 45\r",
+ "6 47 46\r",
+ "6 47 47\r",
+ "6 47 48\r",
+ "6 47 49\r",
+ "6 47 50\r",
+ "6 47 51\r",
+ "6 47 52\r",
+ "6 47 53\r",
+ "6 47 54\r",
+ "6 47 55\r",
+ "6 47 56\r",
+ "6 47 57\r",
+ "6 47 58\r",
+ "6 48 1\r",
+ "6 48 2\r",
+ "6 48 3\r",
+ "6 48 4\r",
+ "6 48 5\r",
+ "6 48 6\r",
+ "6 48 7\r",
+ "6 48 8\r",
+ "6 48 9\r",
+ "6 48 10\r",
+ "6 48 11\r",
+ "6 48 12\r",
+ "6 48 13\r",
+ "6 48 14\r",
+ "6 48 15\r",
+ "6 48 16\r",
+ "6 48 17\r",
+ "6 48 18\r",
+ "6 48 19\r",
+ "6 48 20\r",
+ "6 48 21\r",
+ "6 48 22\r",
+ "6 48 23\r",
+ "6 48 24\r",
+ "6 48 25\r",
+ "6 48 26\r",
+ "6 48 27\r",
+ "6 48 28\r",
+ "6 48 29\r",
+ "6 48 30\r",
+ "6 48 31\r",
+ "6 48 32\r",
+ "6 48 33\r",
+ "6 48 34\r",
+ "6 48 35\r",
+ "6 48 36\r",
+ "6 48 37\r",
+ "6 48 38\r",
+ "6 48 39\r",
+ "6 48 40\r",
+ "6 48 41\r",
+ "6 48 42\r",
+ "6 48 43\r",
+ "6 48 44\r",
+ "6 48 45\r",
+ "6 48 46\r",
+ "6 48 47\r",
+ "6 48 48\r",
+ "6 48 49\r",
+ "6 48 50\r",
+ "6 48 51\r",
+ "6 48 52\r",
+ "6 48 53\r",
+ "6 48 54\r",
+ "6 48 55\r",
+ "6 48 56\r",
+ "6 48 57\r",
+ "6 48 58\r",
+ "6 49 1\r",
+ "6 49 2\r",
+ "6 49 3\r",
+ "6 49 4\r",
+ "6 49 5\r",
+ "6 49 6\r",
+ "6 49 7\r",
+ "6 49 8\r",
+ "6 49 9\r",
+ "6 49 10\r",
+ "6 49 11\r",
+ "6 49 12\r",
+ "6 49 13\r",
+ "6 49 14\r",
+ "6 49 15\r",
+ "6 49 16\r",
+ "6 49 17\r",
+ "6 49 18\r",
+ "6 49 19\r",
+ "6 49 20\r",
+ "6 49 21\r",
+ "6 49 22\r",
+ "6 49 23\r",
+ "6 49 24\r",
+ "6 49 25\r",
+ "6 49 26\r",
+ "6 49 27\r",
+ "6 49 28\r",
+ "6 49 29\r",
+ "6 49 30\r",
+ "6 49 31\r",
+ "6 49 32\r",
+ "6 49 33\r",
+ "6 49 34\r",
+ "6 49 35\r",
+ "6 49 36\r",
+ "6 49 37\r",
+ "6 49 38\r",
+ "6 49 39\r",
+ "6 49 40\r",
+ "6 49 41\r",
+ "6 49 42\r",
+ "6 49 43\r",
+ "6 49 44\r",
+ "6 49 45\r",
+ "6 49 46\r",
+ "6 49 47\r",
+ "6 49 48\r",
+ "6 49 49\r",
+ "6 49 50\r",
+ "6 49 51\r",
+ "6 49 52\r",
+ "6 49 53\r",
+ "6 49 54\r",
+ "6 49 55\r",
+ "6 49 56\r",
+ "6 49 57\r",
+ "6 49 58\r",
+ "6 50 1\r",
+ "6 50 2\r",
+ "6 50 3\r",
+ "6 50 4\r",
+ "6 50 5\r",
+ "6 50 6\r",
+ "6 50 7\r",
+ "6 50 8\r",
+ "6 50 9\r",
+ "6 50 10\r",
+ "6 50 11\r",
+ "6 50 12\r",
+ "6 50 13\r",
+ "6 50 14\r",
+ "6 50 15\r",
+ "6 50 16\r",
+ "6 50 17\r",
+ "6 50 18\r",
+ "6 50 19\r",
+ "6 50 20\r",
+ "6 50 21\r",
+ "6 50 22\r",
+ "6 50 23\r",
+ "6 50 24\r",
+ "6 50 25\r",
+ "6 50 26\r",
+ "6 50 27\r",
+ "6 50 28\r",
+ "6 50 29\r",
+ "6 50 30\r",
+ "6 50 31\r",
+ "6 50 32\r",
+ "6 50 33\r",
+ "6 50 34\r",
+ "6 50 35\r",
+ "6 50 36\r",
+ "6 50 37\r",
+ "6 50 38\r",
+ "6 50 39\r",
+ "6 50 40\r",
+ "6 50 41\r",
+ "6 50 42\r",
+ "6 50 43\r",
+ "6 50 44\r",
+ "6 50 45\r",
+ "6 50 46\r",
+ "6 50 47\r",
+ "6 50 48\r",
+ "6 50 49\r",
+ "6 50 50\r",
+ "6 50 51\r",
+ "6 50 52\r",
+ "6 50 53\r",
+ "6 50 54\r",
+ "6 50 55\r",
+ "6 50 56\r",
+ "6 50 57\r",
+ "6 50 58\r",
+ "6 51 1\r",
+ "6 51 2\r",
+ "6 51 3\r",
+ "6 51 4\r",
+ "6 51 5\r",
+ "6 51 6\r",
+ "6 51 7\r",
+ "6 51 8\r",
+ "6 51 9\r",
+ "6 51 10\r",
+ "6 51 11\r",
+ "6 51 12\r",
+ "6 51 13\r",
+ "6 51 14\r",
+ "6 51 15\r",
+ "6 51 16\r",
+ "6 51 17\r",
+ "6 51 18\r",
+ "6 51 19\r",
+ "6 51 20\r",
+ "6 51 21\r",
+ "6 51 22\r",
+ "6 51 23\r",
+ "6 51 24\r",
+ "6 51 25\r",
+ "6 51 26\r",
+ "6 51 27\r",
+ "6 51 28\r",
+ "6 51 29\r",
+ "6 51 30\r",
+ "6 51 31\r",
+ "6 51 32\r",
+ "6 51 33\r",
+ "6 51 34\r",
+ "6 51 35\r",
+ "6 51 36\r",
+ "6 51 37\r",
+ "6 51 38\r",
+ "6 51 39\r",
+ "6 51 40\r",
+ "6 51 41\r",
+ "6 51 42\r",
+ "6 51 43\r",
+ "6 51 44\r",
+ "6 51 45\r",
+ "6 51 46\r",
+ "6 51 47\r",
+ "6 51 48\r",
+ "6 51 49\r",
+ "6 51 50\r",
+ "6 51 51\r",
+ "6 51 52\r",
+ "6 51 53\r",
+ "6 51 54\r",
+ "6 51 55\r",
+ "6 51 56\r",
+ "6 51 57\r",
+ "6 51 58\r",
+ "6 52 1\r",
+ "6 52 2\r",
+ "6 52 3\r",
+ "6 52 4\r",
+ "6 52 5\r",
+ "6 52 6\r",
+ "6 52 7\r",
+ "6 52 8\r",
+ "6 52 9\r",
+ "6 52 10\r",
+ "6 52 11\r",
+ "6 52 12\r",
+ "6 52 13\r",
+ "6 52 14\r",
+ "6 52 15\r",
+ "6 52 16\r",
+ "6 52 17\r",
+ "6 52 18\r",
+ "6 52 19\r",
+ "6 52 20\r",
+ "6 52 21\r",
+ "6 52 22\r",
+ "6 52 23\r",
+ "6 52 24\r",
+ "6 52 25\r",
+ "6 52 26\r",
+ "6 52 27\r",
+ "6 52 28\r",
+ "6 52 29\r",
+ "6 52 30\r",
+ "6 52 31\r",
+ "6 52 32\r",
+ "6 52 33\r",
+ "6 52 34\r",
+ "6 52 35\r",
+ "6 52 36\r",
+ "6 52 37\r",
+ "6 52 38\r",
+ "6 52 39\r",
+ "6 52 40\r",
+ "6 52 41\r",
+ "6 52 42\r",
+ "6 52 43\r",
+ "6 52 44\r",
+ "6 52 45\r",
+ "6 52 46\r",
+ "6 52 47\r",
+ "6 52 48\r",
+ "6 52 49\r",
+ "6 52 50\r",
+ "6 52 51\r",
+ "6 52 52\r",
+ "6 52 53\r",
+ "6 52 54\r",
+ "6 52 55\r",
+ "6 52 56\r",
+ "6 52 57\r",
+ "6 52 58\r",
+ "6 53 1\r",
+ "6 53 2\r",
+ "6 53 3\r",
+ "6 53 4\r",
+ "6 53 5\r",
+ "6 53 6\r",
+ "6 53 7\r",
+ "6 53 8\r",
+ "6 53 9\r",
+ "6 53 10\r",
+ "6 53 11\r",
+ "6 53 12\r",
+ "6 53 13\r",
+ "6 53 14\r",
+ "6 53 15\r",
+ "6 53 16\r",
+ "6 53 17\r",
+ "6 53 18\r",
+ "6 53 19\r",
+ "6 53 20\r",
+ "6 53 21\r",
+ "6 53 22\r",
+ "6 53 23\r",
+ "6 53 24\r",
+ "6 53 25\r",
+ "6 53 26\r",
+ "6 53 27\r",
+ "6 53 28\r",
+ "6 53 29\r",
+ "6 53 30\r",
+ "6 53 31\r",
+ "6 53 32\r",
+ "6 53 33\r",
+ "6 53 34\r",
+ "6 53 35\r",
+ "6 53 36\r",
+ "6 53 37\r",
+ "6 53 38\r",
+ "6 53 39\r",
+ "6 53 40\r",
+ "6 53 41\r",
+ "6 53 42\r",
+ "6 53 43\r",
+ "6 53 44\r",
+ "6 53 45\r",
+ "6 53 46\r",
+ "6 53 47\r",
+ "6 53 48\r",
+ "6 53 49\r",
+ "6 53 50\r",
+ "6 53 51\r",
+ "6 53 52\r",
+ "6 53 53\r",
+ "6 53 54\r",
+ "6 53 55\r",
+ "6 53 56\r",
+ "6 53 57\r",
+ "6 53 58\r",
+ "6 54 1\r",
+ "6 54 2\r",
+ "6 54 3\r",
+ "6 54 4\r",
+ "6 54 5\r",
+ "6 54 6\r",
+ "6 54 7\r",
+ "6 54 8\r",
+ "6 54 9\r",
+ "6 54 10\r",
+ "6 54 11\r",
+ "6 54 12\r",
+ "6 54 13\r",
+ "6 54 14\r",
+ "6 54 15\r",
+ "6 54 16\r",
+ "6 54 17\r",
+ "6 54 18\r",
+ "6 54 19\r",
+ "6 54 20\r",
+ "6 54 21\r",
+ "6 54 22\r",
+ "6 54 23\r",
+ "6 54 24\r",
+ "6 54 25\r",
+ "6 54 26\r",
+ "6 54 27\r",
+ "6 54 28\r",
+ "6 54 29\r",
+ "6 54 30\r",
+ "6 54 31\r",
+ "6 54 32\r",
+ "6 54 33\r",
+ "6 54 34\r",
+ "6 54 35\r",
+ "6 54 36\r",
+ "6 54 37\r",
+ "6 54 38\r",
+ "6 54 39\r",
+ "6 54 40\r",
+ "6 54 41\r",
+ "6 54 42\r",
+ "6 54 43\r",
+ "6 54 44\r",
+ "6 54 45\r",
+ "6 54 46\r",
+ "6 54 47\r",
+ "6 54 48\r",
+ "6 54 49\r",
+ "6 54 50\r",
+ "6 54 51\r",
+ "6 54 52\r",
+ "6 54 53\r",
+ "6 54 54\r",
+ "6 54 55\r",
+ "6 54 56\r",
+ "6 54 57\r",
+ "6 54 58\r",
+ "6 55 1\r",
+ "6 55 2\r",
+ "6 55 3\r",
+ "6 55 4\r",
+ "6 55 5\r",
+ "6 55 6\r",
+ "6 55 7\r",
+ "6 55 8\r",
+ "6 55 9\r",
+ "6 55 10\r",
+ "6 55 11\r",
+ "6 55 12\r",
+ "6 55 13\r",
+ "6 55 14\r",
+ "6 55 15\r",
+ "6 55 16\r",
+ "6 55 17\r",
+ "6 55 18\r",
+ "6 55 19\r",
+ "6 55 20\r",
+ "6 55 21\r",
+ "6 55 22\r",
+ "6 55 23\r",
+ "6 55 24\r",
+ "6 55 25\r",
+ "6 55 26\r",
+ "6 55 27\r",
+ "6 55 28\r",
+ "6 55 29\r",
+ "6 55 30\r",
+ "6 55 31\r",
+ "6 55 32\r",
+ "6 55 33\r",
+ "6 55 34\r",
+ "6 55 35\r",
+ "6 55 36\r",
+ "6 55 37\r",
+ "6 55 38\r",
+ "6 55 39\r",
+ "6 55 40\r",
+ "6 55 41\r",
+ "6 55 42\r",
+ "6 55 43\r",
+ "6 55 44\r",
+ "6 55 45\r",
+ "6 55 46\r",
+ "6 55 47\r",
+ "6 55 48\r",
+ "6 55 49\r",
+ "6 55 50\r",
+ "6 55 51\r",
+ "6 55 52\r",
+ "6 55 53\r",
+ "6 55 54\r",
+ "6 55 55\r",
+ "6 55 56\r",
+ "6 55 57\r",
+ "6 55 58\r",
+ "6 56 1\r",
+ "6 56 2\r",
+ "6 56 3\r",
+ "6 56 4\r",
+ "6 56 5\r",
+ "6 56 6\r",
+ "6 56 7\r",
+ "6 56 8\r",
+ "6 56 9\r",
+ "6 56 10\r",
+ "6 56 11\r",
+ "6 56 12\r",
+ "6 56 13\r",
+ "6 56 14\r",
+ "6 56 15\r",
+ "6 56 16\r",
+ "6 56 17\r",
+ "6 56 18\r",
+ "6 56 19\r",
+ "6 56 20\r",
+ "6 56 21\r",
+ "6 56 22\r",
+ "6 56 23\r",
+ "6 56 24\r",
+ "6 56 25\r",
+ "6 56 26\r",
+ "6 56 27\r",
+ "6 56 28\r",
+ "6 56 29\r",
+ "6 56 30\r",
+ "6 56 31\r",
+ "6 56 32\r",
+ "6 56 33\r",
+ "6 56 34\r",
+ "6 56 35\r",
+ "6 56 36\r",
+ "6 56 37\r",
+ "6 56 38\r",
+ "6 56 39\r",
+ "6 56 40\r",
+ "6 56 41\r",
+ "6 56 42\r",
+ "6 56 43\r",
+ "6 56 44\r",
+ "6 56 45\r",
+ "6 56 46\r",
+ "6 56 47\r",
+ "6 56 48\r",
+ "6 56 49\r",
+ "6 56 50\r",
+ "6 56 51\r",
+ "6 56 52\r",
+ "6 56 53\r",
+ "6 56 54\r",
+ "6 56 55\r",
+ "6 56 56\r",
+ "6 56 57\r",
+ "6 56 58\r",
+ "6 57 1\r",
+ "6 57 2\r",
+ "6 57 3\r",
+ "6 57 4\r",
+ "6 57 5\r",
+ "6 57 6\r",
+ "6 57 7\r",
+ "6 57 8\r",
+ "6 57 9\r",
+ "6 57 10\r",
+ "6 57 11\r",
+ "6 57 12\r",
+ "6 57 13\r",
+ "6 57 14\r",
+ "6 57 15\r",
+ "6 57 16\r",
+ "6 57 17\r",
+ "6 57 18\r",
+ "6 57 19\r",
+ "6 57 20\r",
+ "6 57 21\r",
+ "6 57 22\r",
+ "6 57 23\r",
+ "6 57 24\r",
+ "6 57 25\r",
+ "6 57 26\r",
+ "6 57 27\r",
+ "6 57 28\r",
+ "6 57 29\r",
+ "6 57 30\r",
+ "6 57 31\r",
+ "6 57 32\r",
+ "6 57 33\r",
+ "6 57 34\r",
+ "6 57 35\r",
+ "6 57 36\r",
+ "6 57 37\r",
+ "6 57 38\r",
+ "6 57 39\r",
+ "6 57 40\r",
+ "6 57 41\r",
+ "6 57 42\r",
+ "6 57 43\r",
+ "6 57 44\r",
+ "6 57 45\r",
+ "6 57 46\r",
+ "6 57 47\r",
+ "6 57 48\r",
+ "6 57 49\r",
+ "6 57 50\r",
+ "6 57 51\r",
+ "6 57 52\r",
+ "6 57 53\r",
+ "6 57 54\r",
+ "6 57 55\r",
+ "6 57 56\r",
+ "6 57 57\r",
+ "6 57 58\r",
+ "6 58 1\r",
+ "6 58 2\r",
+ "6 58 3\r",
+ "6 58 4\r",
+ "6 58 5\r",
+ "6 58 6\r",
+ "6 58 7\r",
+ "6 58 8\r",
+ "6 58 9\r",
+ "6 58 10\r",
+ "6 58 11\r",
+ "6 58 12\r",
+ "6 58 13\r",
+ "6 58 14\r",
+ "6 58 15\r",
+ "6 58 16\r",
+ "6 58 17\r",
+ "6 58 18\r",
+ "6 58 19\r",
+ "6 58 20\r",
+ "6 58 21\r",
+ "6 58 22\r",
+ "6 58 23\r",
+ "6 58 24\r",
+ "6 58 25\r",
+ "6 58 26\r",
+ "6 58 27\r",
+ "6 58 28\r",
+ "6 58 29\r",
+ "6 58 30\r",
+ "6 58 31\r",
+ "6 58 32\r",
+ "6 58 33\r",
+ "6 58 34\r",
+ "6 58 35\r",
+ "6 58 36\r",
+ "6 58 37\r",
+ "6 58 38\r",
+ "6 58 39\r",
+ "6 58 40\r",
+ "6 58 41\r",
+ "6 58 42\r",
+ "6 58 43\r",
+ "6 58 44\r",
+ "6 58 45\r",
+ "6 58 46\r",
+ "6 58 47\r",
+ "6 58 48\r",
+ "6 58 49\r",
+ "6 58 50\r",
+ "6 58 51\r",
+ "6 58 52\r",
+ "6 58 53\r",
+ "6 58 54\r",
+ "6 58 55\r",
+ "6 58 56\r",
+ "6 58 57\r",
+ "6 58 58\r",
+ "7 1 1\r",
+ "7 1 2\r",
+ "7 1 3\r",
+ "7 1 4\r",
+ "7 1 5\r",
+ "7 1 6\r",
+ "7 1 7\r",
+ "7 1 8\r",
+ "7 1 9\r",
+ "7 1 10\r",
+ "7 1 11\r",
+ "7 1 12\r",
+ "7 1 13\r",
+ "7 1 14\r",
+ "7 1 15\r",
+ "7 1 16\r",
+ "7 1 17\r",
+ "7 1 18\r",
+ "7 1 19\r",
+ "7 1 20\r",
+ "7 1 21\r",
+ "7 1 22\r",
+ "7 1 23\r",
+ "7 1 24\r",
+ "7 1 25\r",
+ "7 1 26\r",
+ "7 1 27\r",
+ "7 1 28\r",
+ "7 1 29\r",
+ "7 1 30\r",
+ "7 1 31\r",
+ "7 1 32\r",
+ "7 1 33\r",
+ "7 1 34\r",
+ "7 1 35\r",
+ "7 1 36\r",
+ "7 1 37\r",
+ "7 1 38\r",
+ "7 1 39\r",
+ "7 1 40\r",
+ "7 1 41\r",
+ "7 1 42\r",
+ "7 1 43\r",
+ "7 1 44\r",
+ "7 1 45\r",
+ "7 1 46\r",
+ "7 1 47\r",
+ "7 1 48\r",
+ "7 1 49\r",
+ "7 1 50\r",
+ "7 1 51\r",
+ "7 1 52\r",
+ "7 1 53\r",
+ "7 1 54\r",
+ "7 1 55\r",
+ "7 1 56\r",
+ "7 1 57\r",
+ "7 1 58\r",
+ "7 2 1\r",
+ "7 2 2\r",
+ "7 2 3\r",
+ "7 2 4\r",
+ "7 2 5\r",
+ "7 2 6\r",
+ "7 2 7\r",
+ "7 2 8\r",
+ "7 2 9\r",
+ "7 2 10\r",
+ "7 2 11\r",
+ "7 2 12\r",
+ "7 2 13\r",
+ "7 2 14\r",
+ "7 2 15\r",
+ "7 2 16\r",
+ "7 2 17\r",
+ "7 2 18\r",
+ "7 2 19\r",
+ "7 2 20\r",
+ "7 2 21\r",
+ "7 2 22\r",
+ "7 2 23\r",
+ "7 2 24\r",
+ "7 2 25\r",
+ "7 2 26\r",
+ "7 2 27\r",
+ "7 2 28\r",
+ "7 2 29\r",
+ "7 2 30\r",
+ "7 2 31\r",
+ "7 2 32\r",
+ "7 2 33\r",
+ "7 2 34\r",
+ "7 2 35\r",
+ "7 2 36\r",
+ "7 2 37\r",
+ "7 2 38\r",
+ "7 2 39\r",
+ "7 2 40\r",
+ "7 2 41\r",
+ "7 2 42\r",
+ "7 2 43\r",
+ "7 2 44\r",
+ "7 2 45\r",
+ "7 2 46\r",
+ "7 2 47\r",
+ "7 2 48\r",
+ "7 2 49\r",
+ "7 2 50\r",
+ "7 2 51\r",
+ "7 2 52\r",
+ "7 2 53\r",
+ "7 2 54\r",
+ "7 2 55\r",
+ "7 2 56\r",
+ "7 2 57\r",
+ "7 2 58\r",
+ "7 3 1\r",
+ "7 3 2\r",
+ "7 3 3\r",
+ "7 3 4\r",
+ "7 3 5\r",
+ "7 3 6\r",
+ "7 3 7\r",
+ "7 3 8\r",
+ "7 3 9\r",
+ "7 3 10\r",
+ "7 3 11\r",
+ "7 3 12\r",
+ "7 3 13\r",
+ "7 3 14\r",
+ "7 3 15\r",
+ "7 3 16\r",
+ "7 3 17\r",
+ "7 3 18\r",
+ "7 3 19\r",
+ "7 3 20\r",
+ "7 3 21\r",
+ "7 3 22\r",
+ "7 3 23\r",
+ "7 3 24\r",
+ "7 3 25\r",
+ "7 3 26\r",
+ "7 3 27\r",
+ "7 3 28\r",
+ "7 3 29\r",
+ "7 3 30\r",
+ "7 3 31\r",
+ "7 3 32\r",
+ "7 3 33\r",
+ "7 3 34\r",
+ "7 3 35\r",
+ "7 3 36\r",
+ "7 3 37\r",
+ "7 3 38\r",
+ "7 3 39\r",
+ "7 3 40\r",
+ "7 3 41\r",
+ "7 3 42\r",
+ "7 3 43\r",
+ "7 3 44\r",
+ "7 3 45\r",
+ "7 3 46\r",
+ "7 3 47\r",
+ "7 3 48\r",
+ "7 3 49\r",
+ "7 3 50\r",
+ "7 3 51\r",
+ "7 3 52\r",
+ "7 3 53\r",
+ "7 3 54\r",
+ "7 3 55\r",
+ "7 3 56\r",
+ "7 3 57\r",
+ "7 3 58\r",
+ "7 4 1\r",
+ "7 4 2\r",
+ "7 4 3\r",
+ "7 4 4\r",
+ "7 4 5\r",
+ "7 4 6\r",
+ "7 4 7\r",
+ "7 4 8\r",
+ "7 4 9\r",
+ "7 4 10\r",
+ "7 4 11\r",
+ "7 4 12\r",
+ "7 4 13\r",
+ "7 4 14\r",
+ "7 4 15\r",
+ "7 4 16\r",
+ "7 4 17\r",
+ "7 4 18\r",
+ "7 4 19\r",
+ "7 4 20\r",
+ "7 4 21\r",
+ "7 4 22\r",
+ "7 4 23\r",
+ "7 4 24\r",
+ "7 4 25\r",
+ "7 4 26\r",
+ "7 4 27\r",
+ "7 4 28\r",
+ "7 4 29\r",
+ "7 4 30\r",
+ "7 4 31\r",
+ "7 4 32\r",
+ "7 4 33\r",
+ "7 4 34\r",
+ "7 4 35\r",
+ "7 4 36\r",
+ "7 4 37\r",
+ "7 4 38\r",
+ "7 4 39\r",
+ "7 4 40\r",
+ "7 4 41\r",
+ "7 4 42\r",
+ "7 4 43\r",
+ "7 4 44\r",
+ "7 4 45\r",
+ "7 4 46\r",
+ "7 4 47\r",
+ "7 4 48\r",
+ "7 4 49\r",
+ "7 4 50\r",
+ "7 4 51\r",
+ "7 4 52\r",
+ "7 4 53\r",
+ "7 4 54\r",
+ "7 4 55\r",
+ "7 4 56\r",
+ "7 4 57\r",
+ "7 4 58\r",
+ "7 5 1\r",
+ "7 5 2\r",
+ "7 5 3\r",
+ "7 5 4\r",
+ "7 5 5\r",
+ "7 5 6\r",
+ "7 5 7\r",
+ "7 5 8\r",
+ "7 5 9\r",
+ "7 5 10\r",
+ "7 5 11\r",
+ "7 5 12\r",
+ "7 5 13\r",
+ "7 5 14\r",
+ "7 5 15\r",
+ "7 5 16\r",
+ "7 5 17\r",
+ "7 5 18\r",
+ "7 5 19\r",
+ "7 5 20\r",
+ "7 5 21\r",
+ "7 5 22\r",
+ "7 5 23\r",
+ "7 5 24\r",
+ "7 5 25\r",
+ "7 5 26\r",
+ "7 5 27\r",
+ "7 5 28\r",
+ "7 5 29\r",
+ "7 5 30\r",
+ "7 5 31\r",
+ "7 5 32\r",
+ "7 5 33\r",
+ "7 5 34\r",
+ "7 5 35\r",
+ "7 5 36\r",
+ "7 5 37\r",
+ "7 5 38\r",
+ "7 5 39\r",
+ "7 5 40\r",
+ "7 5 41\r",
+ "7 5 42\r",
+ "7 5 43\r",
+ "7 5 44\r",
+ "7 5 45\r",
+ "7 5 46\r",
+ "7 5 47\r",
+ "7 5 48\r",
+ "7 5 49\r",
+ "7 5 50\r",
+ "7 5 51\r",
+ "7 5 52\r",
+ "7 5 53\r",
+ "7 5 54\r",
+ "7 5 55\r",
+ "7 5 56\r",
+ "7 5 57\r",
+ "7 5 58\r",
+ "7 6 1\r",
+ "7 6 2\r",
+ "7 6 3\r",
+ "7 6 4\r",
+ "7 6 5\r",
+ "7 6 6\r",
+ "7 6 7\r",
+ "7 6 8\r",
+ "7 6 9\r",
+ "7 6 10\r",
+ "7 6 11\r",
+ "7 6 12\r",
+ "7 6 13\r",
+ "7 6 14\r",
+ "7 6 15\r",
+ "7 6 16\r",
+ "7 6 17\r",
+ "7 6 18\r",
+ "7 6 19\r",
+ "7 6 20\r",
+ "7 6 21\r",
+ "7 6 22\r",
+ "7 6 23\r",
+ "7 6 24\r",
+ "7 6 25\r",
+ "7 6 26\r",
+ "7 6 27\r",
+ "7 6 28\r",
+ "7 6 29\r",
+ "7 6 30\r",
+ "7 6 31\r",
+ "7 6 32\r",
+ "7 6 33\r",
+ "7 6 34\r",
+ "7 6 35\r",
+ "7 6 36\r",
+ "7 6 37\r",
+ "7 6 38\r",
+ "7 6 39\r",
+ "7 6 40\r",
+ "7 6 41\r",
+ "7 6 42\r",
+ "7 6 43\r",
+ "7 6 44\r",
+ "7 6 45\r",
+ "7 6 46\r",
+ "7 6 47\r",
+ "7 6 48\r",
+ "7 6 49\r",
+ "7 6 50\r",
+ "7 6 51\r",
+ "7 6 52\r",
+ "7 6 53\r",
+ "7 6 54\r",
+ "7 6 55\r",
+ "7 6 56\r",
+ "7 6 57\r",
+ "7 6 58\r",
+ "7 7 1\r",
+ "7 7 2\r",
+ "7 7 3\r",
+ "7 7 4\r",
+ "7 7 5\r",
+ "7 7 6\r",
+ "7 7 7\r",
+ "7 7 8\r",
+ "7 7 9\r",
+ "7 7 10\r",
+ "7 7 11\r",
+ "7 7 12\r",
+ "7 7 13\r",
+ "7 7 14\r",
+ "7 7 15\r",
+ "7 7 16\r",
+ "7 7 17\r",
+ "7 7 18\r",
+ "7 7 19\r",
+ "7 7 20\r",
+ "7 7 21\r",
+ "7 7 22\r",
+ "7 7 23\r",
+ "7 7 24\r",
+ "7 7 25\r",
+ "7 7 26\r",
+ "7 7 27\r",
+ "7 7 28\r",
+ "7 7 29\r",
+ "7 7 30\r",
+ "7 7 31\r",
+ "7 7 32\r",
+ "7 7 33\r",
+ "7 7 34\r",
+ "7 7 35\r",
+ "7 7 36\r",
+ "7 7 37\r",
+ "7 7 38\r",
+ "7 7 39\r",
+ "7 7 40\r",
+ "7 7 41\r",
+ "7 7 42\r",
+ "7 7 43\r",
+ "7 7 44\r",
+ "7 7 45\r",
+ "7 7 46\r",
+ "7 7 47\r",
+ "7 7 48\r",
+ "7 7 49\r",
+ "7 7 50\r",
+ "7 7 51\r",
+ "7 7 52\r",
+ "7 7 53\r",
+ "7 7 54\r",
+ "7 7 55\r",
+ "7 7 56\r",
+ "7 7 57\r",
+ "7 7 58\r",
+ "7 8 1\r",
+ "7 8 2\r",
+ "7 8 3\r",
+ "7 8 4\r",
+ "7 8 5\r",
+ "7 8 6\r",
+ "7 8 7\r",
+ "7 8 8\r",
+ "7 8 9\r",
+ "7 8 10\r",
+ "7 8 11\r",
+ "7 8 12\r",
+ "7 8 13\r",
+ "7 8 14\r",
+ "7 8 15\r",
+ "7 8 16\r",
+ "7 8 17\r",
+ "7 8 18\r",
+ "7 8 19\r",
+ "7 8 20\r",
+ "7 8 21\r",
+ "7 8 22\r",
+ "7 8 23\r",
+ "7 8 24\r",
+ "7 8 25\r",
+ "7 8 26\r",
+ "7 8 27\r",
+ "7 8 28\r",
+ "7 8 29\r",
+ "7 8 30\r",
+ "7 8 31\r",
+ "7 8 32\r",
+ "7 8 33\r",
+ "7 8 34\r",
+ "7 8 35\r",
+ "7 8 36\r",
+ "7 8 37\r",
+ "7 8 38\r",
+ "7 8 39\r",
+ "7 8 40\r",
+ "7 8 41\r",
+ "7 8 42\r",
+ "7 8 43\r",
+ "7 8 44\r",
+ "7 8 45\r",
+ "7 8 46\r",
+ "7 8 47\r",
+ "7 8 48\r",
+ "7 8 49\r",
+ "7 8 50\r",
+ "7 8 51\r",
+ "7 8 52\r",
+ "7 8 53\r",
+ "7 8 54\r",
+ "7 8 55\r",
+ "7 8 56\r",
+ "7 8 57\r",
+ "7 8 58\r",
+ "7 9 1\r",
+ "7 9 2\r",
+ "7 9 3\r",
+ "7 9 4\r",
+ "7 9 5\r",
+ "7 9 6\r",
+ "7 9 7\r",
+ "7 9 8\r",
+ "7 9 9\r",
+ "7 9 10\r",
+ "7 9 11\r",
+ "7 9 12\r",
+ "7 9 13\r",
+ "7 9 14\r",
+ "7 9 15\r",
+ "7 9 16\r",
+ "7 9 17\r",
+ "7 9 18\r",
+ "7 9 19\r",
+ "7 9 20\r",
+ "7 9 21\r",
+ "7 9 22\r",
+ "7 9 23\r",
+ "7 9 24\r",
+ "7 9 25\r",
+ "7 9 26\r",
+ "7 9 27\r",
+ "7 9 28\r",
+ "7 9 29\r",
+ "7 9 30\r",
+ "7 9 31\r",
+ "7 9 32\r",
+ "7 9 33\r",
+ "7 9 34\r",
+ "7 9 35\r",
+ "7 9 36\r",
+ "7 9 37\r",
+ "7 9 38\r",
+ "7 9 39\r",
+ "7 9 40\r",
+ "7 9 41\r",
+ "7 9 42\r",
+ "7 9 43\r",
+ "7 9 44\r",
+ "7 9 45\r",
+ "7 9 46\r",
+ "7 9 47\r",
+ "7 9 48\r",
+ "7 9 49\r",
+ "7 9 50\r",
+ "7 9 51\r",
+ "7 9 52\r",
+ "7 9 53\r",
+ "7 9 54\r",
+ "7 9 55\r",
+ "7 9 56\r",
+ "7 9 57\r",
+ "7 9 58\r",
+ "7 10 1\r",
+ "7 10 2\r",
+ "7 10 3\r",
+ "7 10 4\r",
+ "7 10 5\r",
+ "7 10 6\r",
+ "7 10 7\r",
+ "7 10 8\r",
+ "7 10 9\r",
+ "7 10 10\r",
+ "7 10 11\r",
+ "7 10 12\r",
+ "7 10 13\r",
+ "7 10 14\r",
+ "7 10 15\r",
+ "7 10 16\r",
+ "7 10 17\r",
+ "7 10 18\r",
+ "7 10 19\r",
+ "7 10 20\r",
+ "7 10 21\r",
+ "7 10 22\r",
+ "7 10 23\r",
+ "7 10 24\r",
+ "7 10 25\r",
+ "7 10 26\r",
+ "7 10 27"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "7 10 28\r",
+ "7 10 29\r",
+ "7 10 30\r",
+ "7 10 31\r",
+ "7 10 32\r",
+ "7 10 33\r",
+ "7 10 34\r",
+ "7 10 35\r",
+ "7 10 36\r",
+ "7 10 37\r",
+ "7 10 38\r",
+ "7 10 39\r",
+ "7 10 40\r",
+ "7 10 41\r",
+ "7 10 42\r",
+ "7 10 43\r",
+ "7 10 44\r",
+ "7 10 45\r",
+ "7 10 46\r",
+ "7 10 47\r",
+ "7 10 48\r",
+ "7 10 49\r",
+ "7 10 50\r",
+ "7 10 51\r",
+ "7 10 52\r",
+ "7 10 53\r",
+ "7 10 54\r",
+ "7 10 55\r",
+ "7 10 56\r",
+ "7 10 57\r",
+ "7 10 58\r",
+ "7 11 1\r",
+ "7 11 2\r",
+ "7 11 3\r",
+ "7 11 4\r",
+ "7 11 5\r",
+ "7 11 6\r",
+ "7 11 7\r",
+ "7 11 8\r",
+ "7 11 9\r",
+ "7 11 10\r",
+ "7 11 11\r",
+ "7 11 12\r",
+ "7 11 13\r",
+ "7 11 14\r",
+ "7 11 15\r",
+ "7 11 16\r",
+ "7 11 17\r",
+ "7 11 18\r",
+ "7 11 19\r",
+ "7 11 20\r",
+ "7 11 21\r",
+ "7 11 22\r",
+ "7 11 23\r",
+ "7 11 24\r",
+ "7 11 25\r",
+ "7 11 26\r",
+ "7 11 27\r",
+ "7 11 28\r",
+ "7 11 29\r",
+ "7 11 30\r",
+ "7 11 31\r",
+ "7 11 32\r",
+ "7 11 33\r",
+ "7 11 34\r",
+ "7 11 35\r",
+ "7 11 36\r",
+ "7 11 37\r",
+ "7 11 38\r",
+ "7 11 39\r",
+ "7 11 40\r",
+ "7 11 41\r",
+ "7 11 42\r",
+ "7 11 43\r",
+ "7 11 44\r",
+ "7 11 45\r",
+ "7 11 46\r",
+ "7 11 47\r",
+ "7 11 48\r",
+ "7 11 49\r",
+ "7 11 50\r",
+ "7 11 51\r",
+ "7 11 52\r",
+ "7 11 53\r",
+ "7 11 54\r",
+ "7 11 55\r",
+ "7 11 56\r",
+ "7 11 57\r",
+ "7 11 58\r",
+ "7 12 1\r",
+ "7 12 2\r",
+ "7 12 3\r",
+ "7 12 4\r",
+ "7 12 5\r",
+ "7 12 6\r",
+ "7 12 7\r",
+ "7 12 8\r",
+ "7 12 9\r",
+ "7 12 10\r",
+ "7 12 11\r",
+ "7 12 12\r",
+ "7 12 13\r",
+ "7 12 14\r",
+ "7 12 15\r",
+ "7 12 16\r",
+ "7 12 17\r",
+ "7 12 18\r",
+ "7 12 19\r",
+ "7 12 20\r",
+ "7 12 21\r",
+ "7 12 22\r",
+ "7 12 23\r",
+ "7 12 24\r",
+ "7 12 25\r",
+ "7 12 26\r",
+ "7 12 27\r",
+ "7 12 28\r",
+ "7 12 29\r",
+ "7 12 30\r",
+ "7 12 31\r",
+ "7 12 32\r",
+ "7 12 33\r",
+ "7 12 34\r",
+ "7 12 35\r",
+ "7 12 36\r",
+ "7 12 37\r",
+ "7 12 38\r",
+ "7 12 39\r",
+ "7 12 40\r",
+ "7 12 41\r",
+ "7 12 42\r",
+ "7 12 43\r",
+ "7 12 44\r",
+ "7 12 45\r",
+ "7 12 46\r",
+ "7 12 47\r",
+ "7 12 48\r",
+ "7 12 49\r",
+ "7 12 50\r",
+ "7 12 51\r",
+ "7 12 52\r",
+ "7 12 53\r",
+ "7 12 54\r",
+ "7 12 55\r",
+ "7 12 56\r",
+ "7 12 57\r",
+ "7 12 58\r",
+ "7 13 1\r",
+ "7 13 2\r",
+ "7 13 3\r",
+ "7 13 4\r",
+ "7 13 5\r",
+ "7 13 6\r",
+ "7 13 7\r",
+ "7 13 8\r",
+ "7 13 9\r",
+ "7 13 10\r",
+ "7 13 11\r",
+ "7 13 12\r",
+ "7 13 13\r",
+ "7 13 14\r",
+ "7 13 15\r",
+ "7 13 16\r",
+ "7 13 17\r",
+ "7 13 18\r",
+ "7 13 19\r",
+ "7 13 20\r",
+ "7 13 21\r",
+ "7 13 22\r",
+ "7 13 23\r",
+ "7 13 24\r",
+ "7 13 25\r",
+ "7 13 26\r",
+ "7 13 27\r",
+ "7 13 28\r",
+ "7 13 29\r",
+ "7 13 30\r",
+ "7 13 31\r",
+ "7 13 32\r",
+ "7 13 33\r",
+ "7 13 34\r",
+ "7 13 35\r",
+ "7 13 36\r",
+ "7 13 37\r",
+ "7 13 38\r",
+ "7 13 39\r",
+ "7 13 40\r",
+ "7 13 41\r",
+ "7 13 42\r",
+ "7 13 43\r",
+ "7 13 44\r",
+ "7 13 45\r",
+ "7 13 46\r",
+ "7 13 47\r",
+ "7 13 48\r",
+ "7 13 49\r",
+ "7 13 50\r",
+ "7 13 51\r",
+ "7 13 52\r",
+ "7 13 53\r",
+ "7 13 54\r",
+ "7 13 55\r",
+ "7 13 56\r",
+ "7 13 57\r",
+ "7 13 58\r",
+ "7 14 1\r",
+ "7 14 2\r",
+ "7 14 3\r",
+ "7 14 4\r",
+ "7 14 5\r",
+ "7 14 6\r",
+ "7 14 7\r",
+ "7 14 8\r",
+ "7 14 9\r",
+ "7 14 10\r",
+ "7 14 11\r",
+ "7 14 12\r",
+ "7 14 13\r",
+ "7 14 14\r",
+ "7 14 15\r",
+ "7 14 16\r",
+ "7 14 17\r",
+ "7 14 18\r",
+ "7 14 19\r",
+ "7 14 20\r",
+ "7 14 21\r",
+ "7 14 22\r",
+ "7 14 23\r",
+ "7 14 24\r",
+ "7 14 25\r",
+ "7 14 26\r",
+ "7 14 27\r",
+ "7 14 28\r",
+ "7 14 29\r",
+ "7 14 30\r",
+ "7 14 31\r",
+ "7 14 32\r",
+ "7 14 33\r",
+ "7 14 34\r",
+ "7 14 35\r",
+ "7 14 36\r",
+ "7 14 37\r",
+ "7 14 38\r",
+ "7 14 39\r",
+ "7 14 40\r",
+ "7 14 41\r",
+ "7 14 42\r",
+ "7 14 43\r",
+ "7 14 44\r",
+ "7 14 45\r",
+ "7 14 46\r",
+ "7 14 47\r",
+ "7 14 48\r",
+ "7 14 49\r",
+ "7 14 50\r",
+ "7 14 51\r",
+ "7 14 52\r",
+ "7 14 53\r",
+ "7 14 54\r",
+ "7 14 55\r",
+ "7 14 56\r",
+ "7 14 57\r",
+ "7 14 58\r",
+ "7 15 1\r",
+ "7 15 2\r",
+ "7 15 3\r",
+ "7 15 4\r",
+ "7 15 5\r",
+ "7 15 6\r",
+ "7 15 7\r",
+ "7 15 8\r",
+ "7 15 9\r",
+ "7 15 10\r",
+ "7 15 11\r",
+ "7 15 12\r",
+ "7 15 13\r",
+ "7 15 14\r",
+ "7 15 15\r",
+ "7 15 16\r",
+ "7 15 17\r",
+ "7 15 18\r",
+ "7 15 19\r",
+ "7 15 20\r",
+ "7 15 21\r",
+ "7 15 22\r",
+ "7 15 23\r",
+ "7 15 24\r",
+ "7 15 25\r",
+ "7 15 26\r",
+ "7 15 27\r",
+ "7 15 28\r",
+ "7 15 29\r",
+ "7 15 30\r",
+ "7 15 31\r",
+ "7 15 32\r",
+ "7 15 33\r",
+ "7 15 34\r",
+ "7 15 35\r",
+ "7 15 36\r",
+ "7 15 37\r",
+ "7 15 38\r",
+ "7 15 39\r",
+ "7 15 40\r",
+ "7 15 41\r",
+ "7 15 42\r",
+ "7 15 43\r",
+ "7 15 44\r",
+ "7 15 45\r",
+ "7 15 46\r",
+ "7 15 47\r",
+ "7 15 48\r",
+ "7 15 49\r",
+ "7 15 50\r",
+ "7 15 51\r",
+ "7 15 52\r",
+ "7 15 53\r",
+ "7 15 54\r",
+ "7 15 55\r",
+ "7 15 56\r",
+ "7 15 57\r",
+ "7 15 58\r",
+ "7 16 1\r",
+ "7 16 2\r",
+ "7 16 3\r",
+ "7 16 4\r",
+ "7 16 5\r",
+ "7 16 6\r",
+ "7 16 7\r",
+ "7 16 8\r",
+ "7 16 9\r",
+ "7 16 10\r",
+ "7 16 11\r",
+ "7 16 12\r",
+ "7 16 13\r",
+ "7 16 14\r",
+ "7 16 15\r",
+ "7 16 16\r",
+ "7 16 17\r",
+ "7 16 18\r",
+ "7 16 19\r",
+ "7 16 20\r",
+ "7 16 21\r",
+ "7 16 22\r",
+ "7 16 23\r",
+ "7 16 24\r",
+ "7 16 25\r",
+ "7 16 26\r",
+ "7 16 27\r",
+ "7 16 28\r",
+ "7 16 29\r",
+ "7 16 30\r",
+ "7 16 31\r",
+ "7 16 32\r",
+ "7 16 33\r",
+ "7 16 34\r",
+ "7 16 35\r",
+ "7 16 36\r",
+ "7 16 37\r",
+ "7 16 38\r",
+ "7 16 39\r",
+ "7 16 40\r",
+ "7 16 41\r",
+ "7 16 42\r",
+ "7 16 43\r",
+ "7 16 44\r",
+ "7 16 45\r",
+ "7 16 46\r",
+ "7 16 47\r",
+ "7 16 48\r",
+ "7 16 49\r",
+ "7 16 50\r",
+ "7 16 51\r",
+ "7 16 52\r",
+ "7 16 53\r",
+ "7 16 54\r",
+ "7 16 55\r",
+ "7 16 56\r",
+ "7 16 57\r",
+ "7 16 58\r",
+ "7 17 1\r",
+ "7 17 2\r",
+ "7 17 3\r",
+ "7 17 4\r",
+ "7 17 5\r",
+ "7 17 6\r",
+ "7 17 7\r",
+ "7 17 8\r",
+ "7 17 9\r",
+ "7 17 10\r",
+ "7 17 11\r",
+ "7 17 12\r",
+ "7 17 13\r",
+ "7 17 14\r",
+ "7 17 15\r",
+ "7 17 16\r",
+ "7 17 17\r",
+ "7 17 18\r",
+ "7 17 19\r",
+ "7 17 20\r",
+ "7 17 21\r",
+ "7 17 22\r",
+ "7 17 23\r",
+ "7 17 24\r",
+ "7 17 25\r",
+ "7 17 26\r",
+ "7 17 27\r",
+ "7 17 28\r",
+ "7 17 29\r",
+ "7 17 30\r",
+ "7 17 31\r",
+ "7 17 32\r",
+ "7 17 33\r",
+ "7 17 34\r",
+ "7 17 35\r",
+ "7 17 36\r",
+ "7 17 37\r",
+ "7 17 38\r",
+ "7 17 39\r",
+ "7 17 40\r",
+ "7 17 41\r",
+ "7 17 42\r",
+ "7 17 43\r",
+ "7 17 44\r",
+ "7 17 45\r",
+ "7 17 46\r",
+ "7 17 47\r",
+ "7 17 48\r",
+ "7 17 49\r",
+ "7 17 50\r",
+ "7 17 51\r",
+ "7 17 52\r",
+ "7 17 53\r",
+ "7 17 54\r",
+ "7 17 55\r",
+ "7 17 56\r",
+ "7 17 57\r",
+ "7 17 58\r",
+ "7 18 1\r",
+ "7 18 2\r",
+ "7 18 3\r",
+ "7 18 4\r",
+ "7 18 5\r",
+ "7 18 6\r",
+ "7 18 7\r",
+ "7 18 8\r",
+ "7 18 9\r",
+ "7 18 10\r",
+ "7 18 11\r",
+ "7 18 12\r",
+ "7 18 13\r",
+ "7 18 14\r",
+ "7 18 15\r",
+ "7 18 16\r",
+ "7 18 17\r",
+ "7 18 18\r",
+ "7 18 19\r",
+ "7 18 20\r",
+ "7 18 21\r",
+ "7 18 22\r",
+ "7 18 23\r",
+ "7 18 24\r",
+ "7 18 25\r",
+ "7 18 26\r",
+ "7 18 27\r",
+ "7 18 28\r",
+ "7 18 29\r",
+ "7 18 30\r",
+ "7 18 31\r",
+ "7 18 32\r",
+ "7 18 33\r",
+ "7 18 34\r",
+ "7 18 35\r",
+ "7 18 36\r",
+ "7 18 37\r",
+ "7 18 38\r",
+ "7 18 39\r",
+ "7 18 40\r",
+ "7 18 41\r",
+ "7 18 42\r",
+ "7 18 43\r",
+ "7 18 44\r",
+ "7 18 45\r",
+ "7 18 46\r",
+ "7 18 47\r",
+ "7 18 48\r",
+ "7 18 49\r",
+ "7 18 50\r",
+ "7 18 51\r",
+ "7 18 52\r",
+ "7 18 53\r",
+ "7 18 54\r",
+ "7 18 55\r",
+ "7 18 56\r",
+ "7 18 57\r",
+ "7 18 58\r",
+ "7 19 1\r",
+ "7 19 2\r",
+ "7 19 3\r",
+ "7 19 4\r",
+ "7 19 5\r",
+ "7 19 6\r",
+ "7 19 7\r",
+ "7 19 8\r",
+ "7 19 9\r",
+ "7 19 10\r",
+ "7 19 11\r",
+ "7 19 12\r",
+ "7 19 13\r",
+ "7 19 14\r",
+ "7 19 15\r",
+ "7 19 16\r",
+ "7 19 17\r",
+ "7 19 18\r",
+ "7 19 19\r",
+ "7 19 20\r",
+ "7 19 21\r",
+ "7 19 22\r",
+ "7 19 23\r",
+ "7 19 24\r",
+ "7 19 25\r",
+ "7 19 26\r",
+ "7 19 27\r",
+ "7 19 28\r",
+ "7 19 29\r",
+ "7 19 30\r",
+ "7 19 31\r",
+ "7 19 32\r",
+ "7 19 33\r",
+ "7 19 34\r",
+ "7 19 35\r",
+ "7 19 36\r",
+ "7 19 37\r",
+ "7 19 38\r",
+ "7 19 39\r",
+ "7 19 40\r",
+ "7 19 41\r",
+ "7 19 42\r",
+ "7 19 43\r",
+ "7 19 44\r",
+ "7 19 45\r",
+ "7 19 46\r",
+ "7 19 47\r",
+ "7 19 48\r",
+ "7 19 49\r",
+ "7 19 50\r",
+ "7 19 51\r",
+ "7 19 52\r",
+ "7 19 53\r",
+ "7 19 54\r",
+ "7 19 55\r",
+ "7 19 56\r",
+ "7 19 57\r",
+ "7 19 58\r",
+ "7 20 1\r",
+ "7 20 2\r",
+ "7 20 3\r",
+ "7 20 4\r",
+ "7 20 5\r",
+ "7 20 6\r",
+ "7 20 7\r",
+ "7 20 8\r",
+ "7 20 9\r",
+ "7 20 10\r",
+ "7 20 11\r",
+ "7 20 12\r",
+ "7 20 13\r",
+ "7 20 14\r",
+ "7 20 15\r",
+ "7 20 16\r",
+ "7 20 17\r",
+ "7 20 18\r",
+ "7 20 19\r",
+ "7 20 20\r",
+ "7 20 21\r",
+ "7 20 22\r",
+ "7 20 23\r",
+ "7 20 24\r",
+ "7 20 25\r",
+ "7 20 26\r",
+ "7 20 27\r",
+ "7 20 28\r",
+ "7 20 29\r",
+ "7 20 30\r",
+ "7 20 31\r",
+ "7 20 32\r",
+ "7 20 33\r",
+ "7 20 34\r",
+ "7 20 35\r",
+ "7 20 36\r",
+ "7 20 37\r",
+ "7 20 38\r",
+ "7 20 39\r",
+ "7 20 40\r",
+ "7 20 41\r",
+ "7 20 42\r",
+ "7 20 43\r",
+ "7 20 44\r",
+ "7 20 45\r",
+ "7 20 46\r",
+ "7 20 47\r",
+ "7 20 48\r",
+ "7 20 49\r",
+ "7 20 50\r",
+ "7 20 51\r",
+ "7 20 52\r",
+ "7 20 53\r",
+ "7 20 54\r",
+ "7 20 55\r",
+ "7 20 56\r",
+ "7 20 57\r",
+ "7 20 58\r",
+ "7 21 1\r",
+ "7 21 2\r",
+ "7 21 3\r",
+ "7 21 4\r",
+ "7 21 5\r",
+ "7 21 6\r",
+ "7 21 7\r",
+ "7 21 8\r",
+ "7 21 9\r",
+ "7 21 10\r",
+ "7 21 11\r",
+ "7 21 12\r",
+ "7 21 13\r",
+ "7 21 14\r",
+ "7 21 15\r",
+ "7 21 16\r",
+ "7 21 17\r",
+ "7 21 18\r",
+ "7 21 19\r",
+ "7 21 20\r",
+ "7 21 21\r",
+ "7 21 22\r",
+ "7 21 23\r",
+ "7 21 24\r",
+ "7 21 25\r",
+ "7 21 26\r",
+ "7 21 27\r",
+ "7 21 28\r",
+ "7 21 29\r",
+ "7 21 30\r",
+ "7 21 31\r",
+ "7 21 32\r",
+ "7 21 33\r",
+ "7 21 34\r",
+ "7 21 35\r",
+ "7 21 36\r",
+ "7 21 37\r",
+ "7 21 38\r",
+ "7 21 39\r",
+ "7 21 40\r",
+ "7 21 41\r",
+ "7 21 42\r",
+ "7 21 43\r",
+ "7 21 44\r",
+ "7 21 45\r",
+ "7 21 46\r",
+ "7 21 47\r",
+ "7 21 48\r",
+ "7 21 49\r",
+ "7 21 50\r",
+ "7 21 51\r",
+ "7 21 52\r",
+ "7 21 53\r",
+ "7 21 54\r",
+ "7 21 55\r",
+ "7 21 56\r",
+ "7 21 57\r",
+ "7 21 58\r",
+ "7 22 1\r",
+ "7 22 2\r",
+ "7 22 3\r",
+ "7 22 4\r",
+ "7 22 5\r",
+ "7 22 6\r",
+ "7 22 7\r",
+ "7 22 8\r",
+ "7 22 9\r",
+ "7 22 10\r",
+ "7 22 11\r",
+ "7 22 12\r",
+ "7 22 13\r",
+ "7 22 14\r",
+ "7 22 15\r",
+ "7 22 16\r",
+ "7 22 17\r",
+ "7 22 18\r",
+ "7 22 19\r",
+ "7 22 20\r",
+ "7 22 21\r",
+ "7 22 22\r",
+ "7 22 23\r",
+ "7 22 24\r",
+ "7 22 25\r",
+ "7 22 26\r",
+ "7 22 27\r",
+ "7 22 28\r",
+ "7 22 29\r",
+ "7 22 30\r",
+ "7 22 31\r",
+ "7 22 32\r",
+ "7 22 33\r",
+ "7 22 34\r",
+ "7 22 35\r",
+ "7 22 36\r",
+ "7 22 37\r",
+ "7 22 38\r",
+ "7 22 39\r",
+ "7 22 40\r",
+ "7 22 41\r",
+ "7 22 42\r",
+ "7 22 43\r",
+ "7 22 44\r",
+ "7 22 45\r",
+ "7 22 46\r",
+ "7 22 47\r",
+ "7 22 48\r",
+ "7 22 49\r",
+ "7 22 50\r",
+ "7 22 51\r",
+ "7 22 52\r",
+ "7 22 53\r",
+ "7 22 54\r",
+ "7 22 55\r",
+ "7 22 56\r",
+ "7 22 57\r",
+ "7 22 58\r",
+ "7 23 1\r",
+ "7 23 2\r",
+ "7 23 3\r",
+ "7 23 4\r",
+ "7 23 5\r",
+ "7 23 6\r",
+ "7 23 7\r",
+ "7 23 8\r",
+ "7 23 9\r",
+ "7 23 10\r",
+ "7 23 11\r",
+ "7 23 12\r",
+ "7 23 13\r",
+ "7 23 14\r",
+ "7 23 15\r",
+ "7 23 16\r",
+ "7 23 17\r",
+ "7 23 18\r",
+ "7 23 19\r",
+ "7 23 20\r",
+ "7 23 21\r",
+ "7 23 22\r",
+ "7 23 23\r",
+ "7 23 24\r",
+ "7 23 25\r",
+ "7 23 26\r",
+ "7 23 27\r",
+ "7 23 28\r",
+ "7 23 29\r",
+ "7 23 30\r",
+ "7 23 31\r",
+ "7 23 32\r",
+ "7 23 33\r",
+ "7 23 34\r",
+ "7 23 35\r",
+ "7 23 36\r",
+ "7 23 37\r",
+ "7 23 38\r",
+ "7 23 39\r",
+ "7 23 40\r",
+ "7 23 41\r",
+ "7 23 42\r",
+ "7 23 43\r",
+ "7 23 44\r",
+ "7 23 45\r",
+ "7 23 46\r",
+ "7 23 47\r",
+ "7 23 48\r",
+ "7 23 49\r",
+ "7 23 50\r",
+ "7 23 51\r",
+ "7 23 52\r",
+ "7 23 53\r",
+ "7 23 54\r",
+ "7 23 55\r",
+ "7 23 56\r",
+ "7 23 57\r",
+ "7 23 58\r",
+ "7 24 1\r",
+ "7 24 2\r",
+ "7 24 3\r",
+ "7 24 4\r",
+ "7 24 5\r",
+ "7 24 6\r",
+ "7 24 7\r",
+ "7 24 8\r",
+ "7 24 9\r",
+ "7 24 10\r",
+ "7 24 11\r",
+ "7 24 12\r",
+ "7 24 13\r",
+ "7 24 14\r",
+ "7 24 15\r",
+ "7 24 16\r",
+ "7 24 17\r",
+ "7 24 18\r",
+ "7 24 19\r",
+ "7 24 20\r",
+ "7 24 21\r",
+ "7 24 22\r",
+ "7 24 23\r",
+ "7 24 24\r",
+ "7 24 25\r",
+ "7 24 26\r",
+ "7 24 27\r",
+ "7 24 28\r",
+ "7 24 29\r",
+ "7 24 30\r",
+ "7 24 31\r",
+ "7 24 32\r",
+ "7 24 33\r",
+ "7 24 34\r",
+ "7 24 35\r",
+ "7 24 36\r",
+ "7 24 37\r",
+ "7 24 38\r",
+ "7 24 39\r",
+ "7 24 40\r",
+ "7 24 41\r",
+ "7 24 42\r",
+ "7 24 43\r",
+ "7 24 44\r",
+ "7 24 45\r",
+ "7 24 46\r",
+ "7 24 47\r",
+ "7 24 48\r",
+ "7 24 49\r",
+ "7 24 50\r",
+ "7 24 51\r",
+ "7 24 52\r",
+ "7 24 53\r",
+ "7 24 54\r",
+ "7 24 55\r",
+ "7 24 56\r",
+ "7 24 57\r",
+ "7 24 58\r",
+ "7 25 1\r",
+ "7 25 2\r",
+ "7 25 3\r",
+ "7 25 4\r",
+ "7 25 5\r",
+ "7 25 6\r",
+ "7 25 7\r",
+ "7 25 8\r",
+ "7 25 9\r",
+ "7 25 10\r",
+ "7 25 11\r",
+ "7 25 12\r",
+ "7 25 13\r",
+ "7 25 14\r",
+ "7 25 15\r",
+ "7 25 16\r",
+ "7 25 17\r",
+ "7 25 18\r",
+ "7 25 19\r",
+ "7 25 20\r",
+ "7 25 21\r",
+ "7 25 22\r",
+ "7 25 23\r",
+ "7 25 24\r",
+ "7 25 25\r",
+ "7 25 26\r",
+ "7 25 27\r",
+ "7 25 28\r",
+ "7 25 29\r",
+ "7 25 30\r",
+ "7 25 31\r",
+ "7 25 32\r",
+ "7 25 33\r",
+ "7 25 34\r",
+ "7 25 35\r",
+ "7 25 36\r",
+ "7 25 37\r",
+ "7 25 38\r",
+ "7 25 39\r",
+ "7 25 40\r",
+ "7 25 41\r",
+ "7 25 42\r",
+ "7 25 43\r",
+ "7 25 44\r",
+ "7 25 45\r",
+ "7 25 46\r",
+ "7 25 47\r",
+ "7 25 48\r",
+ "7 25 49\r",
+ "7 25 50\r",
+ "7 25 51\r",
+ "7 25 52\r",
+ "7 25 53\r",
+ "7 25 54\r",
+ "7 25 55\r",
+ "7 25 56\r",
+ "7 25 57\r",
+ "7 25 58\r",
+ "7 26 1\r",
+ "7 26 2\r",
+ "7 26 3\r",
+ "7 26 4\r",
+ "7 26 5\r",
+ "7 26 6\r",
+ "7 26 7\r",
+ "7 26 8\r",
+ "7 26 9\r",
+ "7 26 10\r",
+ "7 26 11\r",
+ "7 26 12\r",
+ "7 26 13\r",
+ "7 26 14\r",
+ "7 26 15\r",
+ "7 26 16\r",
+ "7 26 17\r",
+ "7 26 18\r",
+ "7 26 19\r",
+ "7 26 20\r",
+ "7 26 21\r",
+ "7 26 22\r",
+ "7 26 23\r",
+ "7 26 24\r",
+ "7 26 25\r",
+ "7 26 26\r",
+ "7 26 27\r",
+ "7 26 28\r",
+ "7 26 29\r",
+ "7 26 30\r",
+ "7 26 31\r",
+ "7 26 32\r",
+ "7 26 33\r",
+ "7 26 34\r",
+ "7 26 35\r",
+ "7 26 36\r",
+ "7 26 37\r",
+ "7 26 38\r",
+ "7 26 39\r",
+ "7 26 40\r",
+ "7 26 41\r",
+ "7 26 42\r",
+ "7 26 43\r",
+ "7 26 44\r",
+ "7 26 45\r",
+ "7 26 46\r",
+ "7 26 47\r",
+ "7 26 48\r",
+ "7 26 49\r",
+ "7 26 50\r",
+ "7 26 51\r",
+ "7 26 52\r",
+ "7 26 53\r",
+ "7 26 54\r",
+ "7 26 55\r",
+ "7 26 56\r",
+ "7 26 57\r",
+ "7 26 58\r",
+ "7 27 1\r",
+ "7 27 2\r",
+ "7 27 3\r",
+ "7 27 4\r",
+ "7 27 5\r",
+ "7 27 6\r",
+ "7 27 7\r",
+ "7 27 8\r",
+ "7 27 9\r",
+ "7 27 10\r",
+ "7 27 11\r",
+ "7 27 12\r",
+ "7 27 13\r",
+ "7 27 14\r",
+ "7 27 15\r",
+ "7 27 16\r",
+ "7 27 17\r",
+ "7 27 18\r",
+ "7 27 19\r",
+ "7 27 20\r",
+ "7 27 21\r",
+ "7 27 22\r",
+ "7 27 23\r",
+ "7 27 24\r",
+ "7 27 25\r",
+ "7 27 26\r",
+ "7 27 27\r",
+ "7 27 28\r",
+ "7 27 29\r",
+ "7 27 30\r",
+ "7 27 31\r",
+ "7 27 32\r",
+ "7 27 33\r",
+ "7 27 34\r",
+ "7 27 35\r",
+ "7 27 36\r",
+ "7 27 37\r",
+ "7 27 38\r",
+ "7 27 39\r",
+ "7 27 40\r",
+ "7 27 41\r",
+ "7 27 42\r",
+ "7 27 43\r",
+ "7 27 44\r",
+ "7 27 45\r",
+ "7 27 46\r",
+ "7 27 47\r",
+ "7 27 48\r",
+ "7 27 49\r",
+ "7 27 50\r",
+ "7 27 51\r",
+ "7 27 52\r",
+ "7 27 53\r",
+ "7 27 54\r",
+ "7 27 55\r",
+ "7 27 56\r",
+ "7 27 57\r",
+ "7 27 58\r",
+ "7 28 1\r",
+ "7 28 2\r",
+ "7 28 3\r",
+ "7 28 4\r",
+ "7 28 5\r",
+ "7 28 6\r",
+ "7 28 7\r",
+ "7 28 8\r",
+ "7 28 9\r",
+ "7 28 10\r",
+ "7 28 11\r",
+ "7 28 12\r",
+ "7 28 13\r",
+ "7 28 14\r",
+ "7 28 15\r",
+ "7 28 16\r",
+ "7 28 17\r",
+ "7 28 18\r",
+ "7 28 19\r",
+ "7 28 20\r",
+ "7 28 21\r",
+ "7 28 22\r",
+ "7 28 23\r",
+ "7 28 24\r",
+ "7 28 25\r",
+ "7 28 26\r",
+ "7 28 27\r",
+ "7 28 28\r",
+ "7 28 29\r",
+ "7 28 30\r",
+ "7 28 31\r",
+ "7 28 32\r",
+ "7 28 33\r",
+ "7 28 34\r",
+ "7 28 35\r",
+ "7 28 36\r",
+ "7 28 37\r",
+ "7 28 38\r",
+ "7 28 39\r",
+ "7 28 40\r",
+ "7 28 41\r",
+ "7 28 42\r",
+ "7 28 43\r",
+ "7 28 44\r",
+ "7 28 45\r",
+ "7 28 46\r",
+ "7 28 47\r",
+ "7 28 48\r",
+ "7 28 49\r",
+ "7 28 50\r",
+ "7 28 51\r",
+ "7 28 52\r",
+ "7 28 53\r",
+ "7 28 54\r",
+ "7 28 55\r",
+ "7 28 56\r",
+ "7 28 57\r",
+ "7 28 58\r",
+ "7 29 1\r",
+ "7 29 2\r",
+ "7 29 3\r",
+ "7 29 4\r",
+ "7 29 5\r",
+ "7 29 6\r",
+ "7 29 7\r",
+ "7 29 8\r",
+ "7 29 9\r",
+ "7 29 10\r",
+ "7 29 11\r",
+ "7 29 12\r",
+ "7 29 13\r",
+ "7 29 14\r",
+ "7 29 15\r",
+ "7 29 16\r",
+ "7 29 17\r",
+ "7 29 18\r",
+ "7 29 19\r",
+ "7 29 20\r",
+ "7 29 21\r",
+ "7 29 22\r",
+ "7 29 23\r",
+ "7 29 24\r",
+ "7 29 25\r",
+ "7 29 26\r",
+ "7 29 27\r",
+ "7 29 28\r",
+ "7 29 29\r",
+ "7 29 30\r",
+ "7 29 31\r",
+ "7 29 32\r",
+ "7 29 33\r",
+ "7 29 34\r",
+ "7 29 35\r",
+ "7 29 36\r",
+ "7 29 37\r",
+ "7 29 38\r",
+ "7 29 39\r",
+ "7 29 40\r",
+ "7 29 41\r",
+ "7 29 42\r",
+ "7 29 43\r",
+ "7 29 44\r",
+ "7 29 45\r",
+ "7 29 46\r",
+ "7 29 47\r",
+ "7 29 48\r",
+ "7 29 49\r",
+ "7 29 50\r",
+ "7 29 51\r",
+ "7 29 52\r",
+ "7 29 53\r",
+ "7 29 54\r",
+ "7 29 55\r",
+ "7 29 56\r",
+ "7 29 57\r",
+ "7 29 58\r",
+ "7 30 1\r",
+ "7 30 2\r",
+ "7 30 3\r",
+ "7 30 4\r",
+ "7 30 5\r",
+ "7 30 6\r",
+ "7 30 7\r",
+ "7 30 8\r",
+ "7 30 9\r",
+ "7 30 10\r",
+ "7 30 11\r",
+ "7 30 12\r",
+ "7 30 13\r",
+ "7 30 14\r",
+ "7 30 15\r",
+ "7 30 16\r",
+ "7 30 17\r",
+ "7 30 18\r",
+ "7 30 19\r",
+ "7 30 20\r",
+ "7 30 21\r",
+ "7 30 22\r",
+ "7 30 23\r",
+ "7 30 24\r",
+ "7 30 25\r",
+ "7 30 26\r",
+ "7 30 27\r",
+ "7 30 28\r",
+ "7 30 29\r",
+ "7 30 30\r",
+ "7 30 31\r",
+ "7 30 32\r",
+ "7 30 33\r",
+ "7 30 34\r",
+ "7 30 35\r",
+ "7 30 36\r",
+ "7 30 37\r",
+ "7 30 38\r",
+ "7 30 39\r",
+ "7 30 40\r",
+ "7 30 41\r",
+ "7 30 42\r",
+ "7 30 43\r",
+ "7 30 44\r",
+ "7 30 45\r",
+ "7 30 46\r",
+ "7 30 47\r",
+ "7 30 48\r",
+ "7 30 49\r",
+ "7 30 50\r",
+ "7 30 51\r",
+ "7 30 52\r",
+ "7 30 53\r",
+ "7 30 54\r",
+ "7 30 55\r",
+ "7 30 56\r",
+ "7 30 57\r",
+ "7 30 58\r",
+ "7 31 1\r",
+ "7 31 2\r",
+ "7 31 3\r",
+ "7 31 4\r",
+ "7 31 5\r",
+ "7 31 6\r",
+ "7 31 7\r",
+ "7 31 8\r",
+ "7 31 9\r",
+ "7 31 10\r",
+ "7 31 11\r",
+ "7 31 12\r",
+ "7 31 13\r",
+ "7 31 14\r",
+ "7 31 15\r",
+ "7 31 16\r",
+ "7 31 17\r",
+ "7 31 18\r",
+ "7 31 19\r",
+ "7 31 20\r",
+ "7 31 21\r",
+ "7 31 22\r",
+ "7 31 23\r",
+ "7 31 24\r",
+ "7 31 25\r",
+ "7 31 26\r",
+ "7 31 27\r",
+ "7 31 28\r",
+ "7 31 29\r",
+ "7 31 30\r",
+ "7 31 31\r",
+ "7 31 32\r",
+ "7 31 33\r",
+ "7 31 34\r",
+ "7 31 35\r",
+ "7 31 36\r",
+ "7 31 37\r",
+ "7 31 38\r",
+ "7 31 39\r",
+ "7 31 40\r",
+ "7 31 41\r",
+ "7 31 42\r",
+ "7 31 43\r",
+ "7 31 44\r",
+ "7 31 45\r",
+ "7 31 46\r",
+ "7 31 47\r",
+ "7 31 48\r",
+ "7 31 49\r",
+ "7 31 50\r",
+ "7 31 51\r",
+ "7 31 52\r",
+ "7 31 53\r",
+ "7 31 54\r",
+ "7 31 55\r",
+ "7 31 56\r",
+ "7 31 57\r",
+ "7 31 58\r",
+ "7 32 1\r",
+ "7 32 2\r",
+ "7 32 3\r",
+ "7 32 4\r",
+ "7 32 5\r",
+ "7 32 6\r",
+ "7 32 7\r",
+ "7 32 8\r",
+ "7 32 9\r",
+ "7 32 10\r",
+ "7 32 11\r",
+ "7 32 12\r",
+ "7 32 13\r",
+ "7 32 14\r",
+ "7 32 15\r",
+ "7 32 16\r",
+ "7 32 17\r",
+ "7 32 18\r",
+ "7 32 19\r",
+ "7 32 20\r",
+ "7 32 21\r",
+ "7 32 22\r",
+ "7 32 23\r",
+ "7 32 24\r",
+ "7 32 25\r",
+ "7 32 26\r",
+ "7 32 27\r",
+ "7 32 28\r",
+ "7 32 29\r",
+ "7 32 30\r",
+ "7 32 31\r",
+ "7 32 32\r",
+ "7 32 33\r",
+ "7 32 34\r",
+ "7 32 35\r",
+ "7 32 36\r",
+ "7 32 37\r",
+ "7 32 38\r",
+ "7 32 39\r",
+ "7 32 40\r",
+ "7 32 41\r",
+ "7 32 42\r",
+ "7 32 43\r",
+ "7 32 44\r",
+ "7 32 45\r",
+ "7 32 46\r",
+ "7 32 47\r",
+ "7 32 48\r",
+ "7 32 49\r",
+ "7 32 50\r",
+ "7 32 51\r",
+ "7 32 52\r",
+ "7 32 53\r",
+ "7 32 54\r",
+ "7 32 55\r",
+ "7 32 56\r",
+ "7 32 57\r",
+ "7 32 58\r",
+ "7 33 1\r",
+ "7 33 2\r",
+ "7 33 3\r",
+ "7 33 4\r",
+ "7 33 5\r",
+ "7 33 6\r",
+ "7 33 7\r",
+ "7 33 8\r",
+ "7 33 9\r",
+ "7 33 10\r",
+ "7 33 11\r",
+ "7 33 12\r",
+ "7 33 13\r",
+ "7 33 14\r",
+ "7 33 15\r",
+ "7 33 16\r",
+ "7 33 17\r",
+ "7 33 18\r",
+ "7 33 19\r",
+ "7 33 20\r",
+ "7 33 21\r",
+ "7 33 22\r",
+ "7 33 23\r",
+ "7 33 24\r",
+ "7 33 25\r",
+ "7 33 26\r",
+ "7 33 27\r",
+ "7 33 28\r",
+ "7 33 29\r",
+ "7 33 30\r",
+ "7 33 31\r",
+ "7 33 32\r",
+ "7 33 33\r",
+ "7 33 34\r",
+ "7 33 35\r",
+ "7 33 36\r",
+ "7 33 37\r",
+ "7 33 38\r",
+ "7 33 39\r",
+ "7 33 40\r",
+ "7 33 41\r",
+ "7 33 42\r",
+ "7 33 43\r",
+ "7 33 44\r",
+ "7 33 45\r",
+ "7 33 46\r",
+ "7 33 47\r",
+ "7 33 48\r",
+ "7 33 49\r",
+ "7 33 50\r",
+ "7 33 51\r",
+ "7 33 52\r",
+ "7 33 53\r",
+ "7 33 54\r",
+ "7 33 55\r",
+ "7 33 56\r",
+ "7 33 57\r",
+ "7 33 58\r",
+ "7 34 1\r",
+ "7 34 2\r",
+ "7 34 3\r",
+ "7 34 4\r",
+ "7 34 5\r",
+ "7 34 6\r",
+ "7 34 7\r",
+ "7 34 8\r",
+ "7 34 9\r",
+ "7 34 10\r",
+ "7 34 11\r",
+ "7 34 12\r",
+ "7 34 13\r",
+ "7 34 14\r",
+ "7 34 15\r",
+ "7 34 16\r",
+ "7 34 17\r",
+ "7 34 18\r",
+ "7 34 19\r",
+ "7 34 20\r",
+ "7 34 21\r",
+ "7 34 22\r",
+ "7 34 23\r",
+ "7 34 24\r",
+ "7 34 25\r",
+ "7 34 26\r",
+ "7 34 27\r",
+ "7 34 28\r",
+ "7 34 29\r",
+ "7 34 30\r",
+ "7 34 31\r",
+ "7 34 32\r",
+ "7 34 33\r",
+ "7 34 34\r",
+ "7 34 35\r",
+ "7 34 36\r",
+ "7 34 37\r",
+ "7 34 38\r",
+ "7 34 39\r",
+ "7 34 40\r",
+ "7 34 41\r",
+ "7 34 42\r",
+ "7 34 43\r",
+ "7 34 44\r",
+ "7 34 45\r",
+ "7 34 46\r",
+ "7 34 47\r",
+ "7 34 48\r",
+ "7 34 49\r",
+ "7 34 50\r",
+ "7 34 51\r",
+ "7 34 52\r",
+ "7 34 53\r",
+ "7 34 54\r",
+ "7 34 55\r",
+ "7 34 56\r",
+ "7 34 57\r",
+ "7 34 58\r",
+ "7 35 1\r",
+ "7 35 2\r",
+ "7 35 3\r",
+ "7 35 4\r",
+ "7 35 5\r",
+ "7 35 6\r",
+ "7 35 7\r",
+ "7 35 8\r",
+ "7 35 9\r",
+ "7 35 10\r",
+ "7 35 11\r",
+ "7 35 12\r",
+ "7 35 13\r",
+ "7 35 14\r",
+ "7 35 15\r",
+ "7 35 16\r",
+ "7 35 17\r",
+ "7 35 18\r",
+ "7 35 19\r",
+ "7 35 20\r",
+ "7 35 21\r",
+ "7 35 22\r",
+ "7 35 23\r",
+ "7 35 24\r",
+ "7 35 25\r",
+ "7 35 26\r",
+ "7 35 27\r",
+ "7 35 28\r",
+ "7 35 29\r",
+ "7 35 30\r",
+ "7 35 31\r",
+ "7 35 32\r",
+ "7 35 33\r",
+ "7 35 34\r",
+ "7 35 35\r",
+ "7 35 36\r",
+ "7 35 37\r",
+ "7 35 38\r",
+ "7 35 39\r",
+ "7 35 40\r",
+ "7 35 41\r",
+ "7 35 42\r",
+ "7 35 43\r",
+ "7 35 44\r",
+ "7 35 45\r",
+ "7 35 46\r",
+ "7 35 47\r",
+ "7 35 48\r",
+ "7 35 49\r",
+ "7 35 50\r",
+ "7 35 51\r",
+ "7 35 52\r",
+ "7 35 53\r",
+ "7 35 54\r",
+ "7 35 55\r",
+ "7 35 56\r",
+ "7 35 57\r",
+ "7 35 58\r",
+ "7 36 1\r",
+ "7 36 2\r",
+ "7 36 3\r",
+ "7 36 4\r",
+ "7 36 5\r",
+ "7 36 6\r",
+ "7 36 7\r",
+ "7 36 8\r",
+ "7 36 9\r",
+ "7 36 10\r",
+ "7 36 11\r",
+ "7 36 12\r",
+ "7 36 13\r",
+ "7 36 14\r",
+ "7 36 15\r",
+ "7 36 16\r",
+ "7 36 17\r",
+ "7 36 18\r",
+ "7 36 19\r",
+ "7 36 20\r",
+ "7 36 21\r",
+ "7 36 22\r",
+ "7 36 23\r",
+ "7 36 24\r",
+ "7 36 25\r",
+ "7 36 26\r",
+ "7 36 27\r",
+ "7 36 28\r",
+ "7 36 29\r",
+ "7 36 30\r",
+ "7 36 31\r",
+ "7 36 32\r",
+ "7 36 33\r",
+ "7 36 34\r",
+ "7 36 35\r",
+ "7 36 36\r",
+ "7 36 37\r",
+ "7 36 38\r",
+ "7 36 39\r",
+ "7 36 40\r",
+ "7 36 41\r",
+ "7 36 42\r",
+ "7 36 43\r",
+ "7 36 44\r",
+ "7 36 45\r",
+ "7 36 46\r",
+ "7 36 47\r",
+ "7 36 48\r",
+ "7 36 49\r",
+ "7 36 50\r",
+ "7 36 51\r",
+ "7 36 52\r",
+ "7 36 53\r",
+ "7 36 54\r",
+ "7 36 55\r",
+ "7 36 56\r",
+ "7 36 57\r",
+ "7 36 58\r",
+ "7 37 1\r",
+ "7 37 2\r",
+ "7 37 3\r",
+ "7 37 4\r",
+ "7 37 5\r",
+ "7 37 6\r",
+ "7 37 7\r",
+ "7 37 8\r",
+ "7 37 9\r",
+ "7 37 10\r",
+ "7 37 11\r",
+ "7 37 12\r",
+ "7 37 13\r",
+ "7 37 14\r",
+ "7 37 15\r",
+ "7 37 16\r",
+ "7 37 17\r",
+ "7 37 18\r",
+ "7 37 19\r",
+ "7 37 20\r",
+ "7 37 21\r",
+ "7 37 22\r",
+ "7 37 23\r",
+ "7 37 24\r",
+ "7 37 25\r",
+ "7 37 26\r",
+ "7 37 27\r",
+ "7 37 28\r",
+ "7 37 29\r",
+ "7 37 30\r",
+ "7 37 31\r",
+ "7 37 32\r",
+ "7 37 33\r",
+ "7 37 34\r",
+ "7 37 35\r",
+ "7 37 36\r",
+ "7 37 37\r",
+ "7 37 38\r",
+ "7 37 39\r",
+ "7 37 40\r",
+ "7 37 41\r",
+ "7 37 42\r",
+ "7 37 43\r",
+ "7 37 44\r",
+ "7 37 45\r",
+ "7 37 46\r",
+ "7 37 47\r",
+ "7 37 48\r",
+ "7 37 49\r",
+ "7 37 50\r",
+ "7 37 51\r",
+ "7 37 52\r",
+ "7 37 53\r",
+ "7 37 54\r",
+ "7 37 55\r",
+ "7 37 56\r",
+ "7 37 57\r",
+ "7 37 58\r",
+ "7 38 1\r",
+ "7 38 2\r",
+ "7 38 3\r",
+ "7 38 4\r",
+ "7 38 5\r",
+ "7 38 6\r",
+ "7 38 7\r",
+ "7 38 8\r",
+ "7 38 9\r",
+ "7 38 10\r",
+ "7 38 11\r",
+ "7 38 12\r",
+ "7 38 13\r",
+ "7 38 14\r",
+ "7 38 15\r",
+ "7 38 16\r",
+ "7 38 17\r",
+ "7 38 18\r",
+ "7 38 19\r",
+ "7 38 20\r",
+ "7 38 21\r",
+ "7 38 22\r",
+ "7 38 23\r",
+ "7 38 24\r",
+ "7 38 25\r",
+ "7 38 26\r",
+ "7 38 27\r",
+ "7 38 28\r",
+ "7 38 29\r",
+ "7 38 30\r",
+ "7 38 31\r",
+ "7 38 32\r",
+ "7 38 33\r",
+ "7 38 34\r",
+ "7 38 35\r",
+ "7 38 36\r",
+ "7 38 37\r",
+ "7 38 38\r",
+ "7 38 39\r",
+ "7 38 40\r",
+ "7 38 41\r",
+ "7 38 42\r",
+ "7 38 43\r",
+ "7 38 44\r",
+ "7 38 45\r",
+ "7 38 46\r",
+ "7 38 47\r",
+ "7 38 48\r",
+ "7 38 49\r",
+ "7 38 50\r",
+ "7 38 51\r",
+ "7 38 52\r",
+ "7 38 53\r",
+ "7 38 54\r",
+ "7 38 55\r",
+ "7 38 56\r",
+ "7 38 57\r",
+ "7 38 58\r",
+ "7 39 1\r",
+ "7 39 2\r",
+ "7 39 3\r",
+ "7 39 4\r",
+ "7 39 5\r",
+ "7 39 6\r",
+ "7 39 7\r",
+ "7 39 8\r",
+ "7 39 9\r",
+ "7 39 10\r",
+ "7 39 11\r",
+ "7 39 12\r",
+ "7 39 13\r",
+ "7 39 14\r",
+ "7 39 15\r",
+ "7 39 16\r",
+ "7 39 17\r",
+ "7 39 18\r",
+ "7 39 19\r",
+ "7 39 20\r",
+ "7 39 21\r",
+ "7 39 22\r",
+ "7 39 23\r",
+ "7 39 24\r",
+ "7 39 25\r",
+ "7 39 26\r",
+ "7 39 27\r",
+ "7 39 28\r",
+ "7 39 29\r",
+ "7 39 30\r",
+ "7 39 31\r",
+ "7 39 32\r",
+ "7 39 33\r",
+ "7 39 34\r",
+ "7 39 35\r",
+ "7 39 36\r",
+ "7 39 37\r",
+ "7 39 38\r",
+ "7 39 39\r",
+ "7 39 40\r",
+ "7 39 41\r",
+ "7 39 42\r",
+ "7 39 43\r",
+ "7 39 44\r",
+ "7 39 45\r",
+ "7 39 46\r",
+ "7 39 47\r",
+ "7 39 48\r",
+ "7 39 49\r",
+ "7 39 50\r",
+ "7 39 51\r",
+ "7 39 52\r",
+ "7 39 53\r",
+ "7 39 54\r",
+ "7 39 55\r",
+ "7 39 56\r",
+ "7 39 57\r",
+ "7 39 58\r",
+ "7 40 1\r",
+ "7 40 2\r",
+ "7 40 3\r",
+ "7 40 4\r",
+ "7 40 5\r",
+ "7 40 6\r",
+ "7 40 7\r",
+ "7 40 8\r",
+ "7 40 9\r",
+ "7 40 10\r",
+ "7 40 11\r",
+ "7 40 12\r",
+ "7 40 13\r",
+ "7 40 14\r",
+ "7 40 15\r",
+ "7 40 16\r",
+ "7 40 17\r",
+ "7 40 18\r",
+ "7 40 19\r",
+ "7 40 20\r",
+ "7 40 21\r",
+ "7 40 22\r",
+ "7 40 23\r",
+ "7 40 24\r",
+ "7 40 25\r",
+ "7 40 26\r",
+ "7 40 27\r",
+ "7 40 28\r",
+ "7 40 29\r",
+ "7 40 30\r",
+ "7 40 31\r",
+ "7 40 32\r",
+ "7 40 33\r",
+ "7 40 34\r",
+ "7 40 35\r",
+ "7 40 36\r",
+ "7 40 37\r",
+ "7 40 38\r",
+ "7 40 39\r",
+ "7 40 40\r",
+ "7 40 41\r",
+ "7 40 42\r",
+ "7 40 43\r",
+ "7 40 44\r",
+ "7 40 45\r",
+ "7 40 46\r",
+ "7 40 47\r",
+ "7 40 48\r",
+ "7 40 49\r",
+ "7 40 50\r",
+ "7 40 51\r",
+ "7 40 52\r",
+ "7 40 53\r",
+ "7 40 54\r",
+ "7 40 55\r",
+ "7 40 56\r",
+ "7 40 57\r",
+ "7 40 58\r",
+ "7 41 1\r",
+ "7 41 2\r",
+ "7 41 3\r",
+ "7 41 4\r",
+ "7 41 5\r",
+ "7 41 6\r",
+ "7 41 7\r",
+ "7 41 8\r",
+ "7 41 9\r",
+ "7 41 10\r",
+ "7 41 11\r",
+ "7 41 12\r",
+ "7 41 13\r",
+ "7 41 14\r",
+ "7 41 15\r",
+ "7 41 16\r",
+ "7 41 17\r",
+ "7 41 18\r",
+ "7 41 19\r",
+ "7 41 20\r",
+ "7 41 21\r",
+ "7 41 22\r",
+ "7 41 23\r",
+ "7 41 24\r",
+ "7 41 25\r",
+ "7 41 26\r",
+ "7 41 27\r",
+ "7 41 28\r",
+ "7 41 29\r",
+ "7 41 30\r",
+ "7 41 31\r",
+ "7 41 32\r",
+ "7 41 33\r",
+ "7 41 34\r",
+ "7 41 35\r",
+ "7 41 36\r",
+ "7 41 37\r",
+ "7 41 38\r",
+ "7 41 39\r",
+ "7 41 40\r",
+ "7 41 41\r",
+ "7 41 42\r",
+ "7 41 43\r",
+ "7 41 44\r",
+ "7 41 45\r",
+ "7 41 46\r",
+ "7 41 47\r",
+ "7 41 48\r",
+ "7 41 49\r",
+ "7 41 50\r",
+ "7 41 51\r",
+ "7 41 52\r",
+ "7 41 53\r",
+ "7 41 54\r",
+ "7 41 55\r",
+ "7 41 56\r",
+ "7 41 57\r",
+ "7 41 58\r",
+ "7 42 1\r",
+ "7 42 2\r",
+ "7 42 3\r",
+ "7 42 4\r",
+ "7 42 5\r",
+ "7 42 6\r",
+ "7 42 7\r",
+ "7 42 8\r",
+ "7 42 9\r",
+ "7 42 10\r",
+ "7 42 11\r",
+ "7 42 12\r",
+ "7 42 13\r",
+ "7 42 14\r",
+ "7 42 15\r",
+ "7 42 16\r",
+ "7 42 17\r",
+ "7 42 18\r",
+ "7 42 19\r",
+ "7 42 20\r",
+ "7 42 21\r",
+ "7 42 22\r",
+ "7 42 23\r",
+ "7 42 24\r",
+ "7 42 25\r",
+ "7 42 26\r",
+ "7 42 27\r",
+ "7 42 28\r",
+ "7 42 29\r",
+ "7 42 30\r",
+ "7 42 31\r",
+ "7 42 32\r",
+ "7 42 33\r",
+ "7 42 34\r",
+ "7 42 35\r",
+ "7 42 36\r",
+ "7 42 37\r",
+ "7 42 38\r",
+ "7 42 39\r",
+ "7 42 40\r",
+ "7 42 41\r",
+ "7 42 42\r",
+ "7 42 43\r",
+ "7 42 44\r",
+ "7 42 45\r",
+ "7 42 46\r",
+ "7 42 47\r",
+ "7 42 48\r",
+ "7 42 49\r",
+ "7 42 50\r",
+ "7 42 51\r",
+ "7 42 52\r",
+ "7 42 53\r",
+ "7 42 54\r",
+ "7 42 55\r",
+ "7 42 56\r",
+ "7 42 57\r",
+ "7 42 58\r",
+ "7 43 1\r",
+ "7 43 2\r",
+ "7 43 3\r",
+ "7 43 4\r",
+ "7 43 5\r",
+ "7 43 6\r",
+ "7 43 7\r",
+ "7 43 8\r",
+ "7 43 9\r",
+ "7 43 10\r",
+ "7 43 11\r",
+ "7 43 12\r",
+ "7 43 13\r",
+ "7 43 14\r",
+ "7 43 15\r",
+ "7 43 16\r",
+ "7 43 17\r",
+ "7 43 18\r",
+ "7 43 19\r",
+ "7 43 20\r",
+ "7 43 21\r",
+ "7 43 22\r",
+ "7 43 23\r",
+ "7 43 24\r",
+ "7 43 25\r",
+ "7 43 26\r",
+ "7 43 27\r",
+ "7 43 28\r",
+ "7 43 29\r",
+ "7 43 30\r",
+ "7 43 31\r",
+ "7 43 32\r",
+ "7 43 33\r",
+ "7 43 34\r",
+ "7 43 35\r",
+ "7 43 36\r",
+ "7 43 37\r",
+ "7 43 38\r",
+ "7 43 39\r",
+ "7 43 40\r",
+ "7 43 41\r",
+ "7 43 42\r",
+ "7 43 43\r",
+ "7 43 44\r",
+ "7 43 45\r",
+ "7 43 46\r",
+ "7 43 47\r",
+ "7 43 48\r",
+ "7 43 49\r",
+ "7 43 50\r",
+ "7 43 51\r",
+ "7 43 52\r",
+ "7 43 53\r",
+ "7 43 54\r",
+ "7 43 55\r",
+ "7 43 56\r",
+ "7 43 57\r",
+ "7 43 58\r",
+ "7 44 1\r",
+ "7 44 2\r",
+ "7 44 3\r",
+ "7 44 4\r",
+ "7 44 5\r",
+ "7 44 6\r",
+ "7 44 7\r",
+ "7 44 8\r",
+ "7 44 9\r",
+ "7 44 10\r",
+ "7 44 11\r",
+ "7 44 12\r",
+ "7 44 13\r",
+ "7 44 14\r",
+ "7 44 15\r",
+ "7 44 16\r",
+ "7 44 17\r",
+ "7 44 18\r",
+ "7 44 19\r",
+ "7 44 20\r",
+ "7 44 21\r",
+ "7 44 22\r",
+ "7 44 23\r",
+ "7 44 24\r",
+ "7 44 25\r",
+ "7 44 26\r",
+ "7 44 27\r",
+ "7 44 28\r",
+ "7 44 29\r",
+ "7 44 30\r",
+ "7 44 31\r",
+ "7 44 32\r",
+ "7 44 33\r",
+ "7 44 34\r",
+ "7 44 35\r",
+ "7 44 36\r",
+ "7 44 37\r",
+ "7 44 38\r",
+ "7 44 39\r",
+ "7 44 40\r",
+ "7 44 41\r",
+ "7 44 42\r",
+ "7 44 43\r",
+ "7 44 44\r",
+ "7 44 45\r",
+ "7 44 46\r",
+ "7 44 47\r",
+ "7 44 48\r",
+ "7 44 49\r",
+ "7 44 50\r",
+ "7 44 51\r",
+ "7 44 52\r",
+ "7 44 53\r",
+ "7 44 54\r",
+ "7 44 55\r",
+ "7 44 56\r",
+ "7 44 57\r",
+ "7 44 58\r",
+ "7 45 1\r",
+ "7 45 2\r",
+ "7 45 3\r",
+ "7 45 4\r",
+ "7 45 5\r",
+ "7 45 6\r",
+ "7 45 7\r",
+ "7 45 8\r",
+ "7 45 9\r",
+ "7 45 10\r",
+ "7 45 11\r",
+ "7 45 12\r",
+ "7 45 13\r",
+ "7 45 14\r",
+ "7 45 15\r",
+ "7 45 16\r",
+ "7 45 17\r",
+ "7 45 18\r",
+ "7 45 19\r",
+ "7 45 20\r",
+ "7 45 21\r",
+ "7 45 22\r",
+ "7 45 23\r",
+ "7 45 24\r",
+ "7 45 25\r",
+ "7 45 26\r",
+ "7 45 27\r",
+ "7 45 28\r",
+ "7 45 29\r",
+ "7 45 30\r",
+ "7 45 31\r",
+ "7 45 32\r",
+ "7 45 33\r",
+ "7 45 34\r",
+ "7 45 35\r",
+ "7 45 36\r",
+ "7 45 37\r",
+ "7 45 38\r",
+ "7 45 39\r",
+ "7 45 40\r",
+ "7 45 41\r",
+ "7 45 42\r",
+ "7 45 43\r",
+ "7 45 44\r",
+ "7 45 45\r",
+ "7 45 46\r",
+ "7 45 47\r",
+ "7 45 48\r",
+ "7 45 49\r",
+ "7 45 50\r",
+ "7 45 51\r",
+ "7 45 52\r",
+ "7 45 53\r",
+ "7 45 54\r",
+ "7 45 55\r",
+ "7 45 56\r",
+ "7 45 57\r",
+ "7 45 58\r",
+ "7 46 1\r",
+ "7 46 2\r",
+ "7 46 3\r",
+ "7 46 4\r",
+ "7 46 5\r",
+ "7 46 6\r",
+ "7 46 7\r",
+ "7 46 8\r",
+ "7 46 9\r",
+ "7 46 10\r",
+ "7 46 11\r",
+ "7 46 12\r",
+ "7 46 13\r",
+ "7 46 14\r",
+ "7 46 15\r",
+ "7 46 16\r",
+ "7 46 17\r",
+ "7 46 18\r",
+ "7 46 19\r",
+ "7 46 20\r",
+ "7 46 21\r",
+ "7 46 22\r",
+ "7 46 23\r",
+ "7 46 24\r",
+ "7 46 25\r",
+ "7 46 26\r",
+ "7 46 27\r",
+ "7 46 28\r",
+ "7 46 29\r",
+ "7 46 30\r",
+ "7 46 31\r",
+ "7 46 32\r",
+ "7 46 33\r",
+ "7 46 34\r",
+ "7 46 35\r",
+ "7 46 36\r",
+ "7 46 37\r",
+ "7 46 38\r",
+ "7 46 39\r",
+ "7 46 40\r",
+ "7 46 41\r",
+ "7 46 42\r",
+ "7 46 43\r",
+ "7 46 44\r",
+ "7 46 45\r",
+ "7 46 46\r",
+ "7 46 47\r",
+ "7 46 48\r",
+ "7 46 49\r",
+ "7 46 50\r",
+ "7 46 51\r",
+ "7 46 52\r",
+ "7 46 53\r",
+ "7 46 54\r",
+ "7 46 55\r",
+ "7 46 56\r",
+ "7 46 57\r",
+ "7 46 58\r",
+ "7 47 1\r",
+ "7 47 2\r",
+ "7 47 3\r",
+ "7 47 4\r",
+ "7 47 5\r",
+ "7 47 6\r",
+ "7 47 7\r",
+ "7 47 8\r",
+ "7 47 9\r",
+ "7 47 10\r",
+ "7 47 11\r",
+ "7 47 12\r",
+ "7 47 13\r",
+ "7 47 14\r",
+ "7 47 15\r",
+ "7 47 16\r",
+ "7 47 17\r",
+ "7 47 18\r",
+ "7 47 19\r",
+ "7 47 20\r",
+ "7 47 21\r",
+ "7 47 22\r",
+ "7 47 23\r",
+ "7 47 24\r",
+ "7 47 25\r",
+ "7 47 26\r",
+ "7 47 27\r",
+ "7 47 28\r",
+ "7 47 29\r",
+ "7 47 30\r",
+ "7 47 31\r",
+ "7 47 32\r",
+ "7 47 33\r",
+ "7 47 34\r",
+ "7 47 35\r",
+ "7 47 36\r",
+ "7 47 37\r",
+ "7 47 38\r",
+ "7 47 39\r",
+ "7 47 40\r",
+ "7 47 41\r",
+ "7 47 42\r",
+ "7 47 43\r",
+ "7 47 44\r",
+ "7 47 45\r",
+ "7 47 46\r",
+ "7 47 47\r",
+ "7 47 48\r",
+ "7 47 49\r",
+ "7 47 50\r",
+ "7 47 51\r",
+ "7 47 52\r",
+ "7 47 53\r",
+ "7 47 54\r",
+ "7 47 55\r",
+ "7 47 56\r",
+ "7 47 57\r",
+ "7 47 58\r",
+ "7 48 1\r",
+ "7 48 2\r",
+ "7 48 3\r",
+ "7 48 4\r",
+ "7 48 5\r",
+ "7 48 6\r",
+ "7 48 7\r",
+ "7 48 8\r",
+ "7 48 9\r",
+ "7 48 10\r",
+ "7 48 11\r",
+ "7 48 12\r",
+ "7 48 13\r",
+ "7 48 14\r",
+ "7 48 15\r",
+ "7 48 16\r",
+ "7 48 17\r",
+ "7 48 18\r",
+ "7 48 19\r",
+ "7 48 20\r",
+ "7 48 21\r",
+ "7 48 22\r",
+ "7 48 23\r",
+ "7 48 24\r",
+ "7 48 25\r",
+ "7 48 26\r",
+ "7 48 27\r",
+ "7 48 28\r",
+ "7 48 29\r",
+ "7 48 30\r",
+ "7 48 31\r",
+ "7 48 32\r",
+ "7 48 33\r",
+ "7 48 34\r",
+ "7 48 35\r",
+ "7 48 36\r",
+ "7 48 37\r",
+ "7 48 38\r",
+ "7 48 39\r",
+ "7 48 40\r",
+ "7 48 41\r",
+ "7 48 42\r",
+ "7 48 43\r",
+ "7 48 44\r",
+ "7 48 45\r",
+ "7 48 46\r",
+ "7 48 47\r",
+ "7 48 48\r",
+ "7 48 49\r",
+ "7 48 50\r",
+ "7 48 51\r",
+ "7 48 52\r",
+ "7 48 53\r",
+ "7 48 54\r",
+ "7 48 55\r",
+ "7 48 56\r",
+ "7 48 57\r",
+ "7 48 58\r",
+ "7 49 1\r",
+ "7 49 2\r",
+ "7 49 3\r",
+ "7 49 4\r",
+ "7 49 5\r",
+ "7 49 6\r",
+ "7 49 7\r",
+ "7 49 8\r",
+ "7 49 9\r",
+ "7 49 10\r",
+ "7 49 11\r",
+ "7 49 12\r",
+ "7 49 13\r",
+ "7 49 14\r",
+ "7 49 15\r",
+ "7 49 16\r",
+ "7 49 17\r",
+ "7 49 18\r",
+ "7 49 19\r",
+ "7 49 20\r",
+ "7 49 21\r",
+ "7 49 22\r",
+ "7 49 23\r",
+ "7 49 24\r",
+ "7 49 25\r",
+ "7 49 26\r",
+ "7 49 27\r",
+ "7 49 28\r",
+ "7 49 29\r",
+ "7 49 30\r",
+ "7 49 31\r",
+ "7 49 32\r",
+ "7 49 33\r",
+ "7 49 34\r",
+ "7 49 35\r",
+ "7 49 36\r",
+ "7 49 37\r",
+ "7 49 38\r",
+ "7 49 39\r",
+ "7 49 40\r",
+ "7 49 41\r",
+ "7 49 42\r",
+ "7 49 43\r",
+ "7 49 44\r",
+ "7 49 45\r",
+ "7 49 46\r",
+ "7 49 47\r",
+ "7 49 48\r",
+ "7 49 49\r",
+ "7 49 50\r",
+ "7 49 51\r",
+ "7 49 52\r",
+ "7 49 53\r",
+ "7 49 54\r",
+ "7 49 55\r",
+ "7 49 56\r",
+ "7 49 57\r",
+ "7 49 58\r",
+ "7 50 1\r",
+ "7 50 2\r",
+ "7 50 3\r",
+ "7 50 4\r",
+ "7 50 5\r",
+ "7 50 6\r",
+ "7 50 7\r",
+ "7 50 8\r",
+ "7 50 9\r",
+ "7 50 10\r",
+ "7 50 11\r",
+ "7 50 12\r",
+ "7 50 13\r",
+ "7 50 14\r",
+ "7 50 15\r",
+ "7 50 16\r",
+ "7 50 17\r",
+ "7 50 18\r",
+ "7 50 19\r",
+ "7 50 20\r",
+ "7 50 21\r",
+ "7 50 22\r",
+ "7 50 23\r",
+ "7 50 24\r",
+ "7 50 25\r",
+ "7 50 26\r",
+ "7 50 27\r",
+ "7 50 28\r",
+ "7 50 29\r",
+ "7 50 30\r",
+ "7 50 31\r",
+ "7 50 32\r",
+ "7 50 33\r",
+ "7 50 34\r",
+ "7 50 35\r",
+ "7 50 36\r",
+ "7 50 37\r",
+ "7 50 38\r",
+ "7 50 39\r",
+ "7 50 40\r",
+ "7 50 41\r",
+ "7 50 42\r",
+ "7 50 43\r",
+ "7 50 44\r",
+ "7 50 45\r",
+ "7 50 46\r",
+ "7 50 47\r",
+ "7 50 48\r",
+ "7 50 49\r",
+ "7 50 50\r",
+ "7 50 51\r",
+ "7 50 52\r",
+ "7 50 53\r",
+ "7 50 54\r",
+ "7 50 55\r",
+ "7 50 56\r",
+ "7 50 57\r",
+ "7 50 58\r",
+ "7 51 1\r",
+ "7 51 2\r",
+ "7 51 3\r",
+ "7 51 4\r",
+ "7 51 5\r",
+ "7 51 6\r",
+ "7 51 7\r",
+ "7 51 8\r",
+ "7 51 9\r",
+ "7 51 10\r",
+ "7 51 11\r",
+ "7 51 12\r",
+ "7 51 13\r",
+ "7 51 14\r",
+ "7 51 15\r",
+ "7 51 16\r",
+ "7 51 17\r",
+ "7 51 18\r",
+ "7 51 19\r",
+ "7 51 20\r",
+ "7 51 21\r",
+ "7 51 22\r",
+ "7 51 23\r",
+ "7 51 24\r",
+ "7 51 25\r",
+ "7 51 26\r",
+ "7 51 27\r",
+ "7 51 28\r",
+ "7 51 29\r",
+ "7 51 30\r",
+ "7 51 31\r",
+ "7 51 32\r",
+ "7 51 33\r",
+ "7 51 34\r",
+ "7 51 35\r",
+ "7 51 36\r",
+ "7 51 37\r",
+ "7 51 38\r",
+ "7 51 39\r",
+ "7 51 40\r",
+ "7 51 41\r",
+ "7 51 42\r",
+ "7 51 43\r",
+ "7 51 44\r",
+ "7 51 45\r",
+ "7 51 46\r",
+ "7 51 47\r",
+ "7 51 48\r",
+ "7 51 49\r",
+ "7 51 50\r",
+ "7 51 51\r",
+ "7 51 52\r",
+ "7 51 53\r",
+ "7 51 54\r",
+ "7 51 55\r",
+ "7 51 56\r",
+ "7 51 57\r",
+ "7 51 58\r",
+ "7 52 1\r",
+ "7 52 2\r",
+ "7 52 3\r",
+ "7 52 4\r",
+ "7 52 5\r",
+ "7 52 6\r",
+ "7 52 7\r",
+ "7 52 8\r",
+ "7 52 9\r",
+ "7 52 10\r",
+ "7 52 11\r",
+ "7 52 12\r",
+ "7 52 13\r",
+ "7 52 14\r",
+ "7 52 15\r",
+ "7 52 16\r",
+ "7 52 17\r",
+ "7 52 18\r",
+ "7 52 19\r",
+ "7 52 20\r",
+ "7 52 21\r",
+ "7 52 22\r",
+ "7 52 23\r",
+ "7 52 24\r",
+ "7 52 25\r",
+ "7 52 26\r",
+ "7 52 27\r",
+ "7 52 28\r",
+ "7 52 29\r",
+ "7 52 30\r",
+ "7 52 31\r",
+ "7 52 32\r",
+ "7 52 33\r",
+ "7 52 34\r",
+ "7 52 35\r",
+ "7 52 36\r",
+ "7 52 37\r",
+ "7 52 38\r",
+ "7 52 39\r",
+ "7 52 40\r",
+ "7 52 41\r",
+ "7 52 42\r",
+ "7 52 43\r",
+ "7 52 44\r",
+ "7 52 45\r",
+ "7 52 46\r",
+ "7 52 47\r",
+ "7 52 48\r",
+ "7 52 49\r",
+ "7 52 50\r",
+ "7 52 51\r",
+ "7 52 52\r",
+ "7 52 53\r",
+ "7 52 54\r",
+ "7 52 55\r",
+ "7 52 56\r",
+ "7 52 57\r",
+ "7 52 58\r",
+ "7 53 1\r",
+ "7 53 2\r",
+ "7 53 3\r",
+ "7 53 4\r",
+ "7 53 5\r",
+ "7 53 6\r",
+ "7 53 7\r",
+ "7 53 8\r",
+ "7 53 9\r",
+ "7 53 10\r",
+ "7 53 11\r",
+ "7 53 12\r",
+ "7 53 13\r",
+ "7 53 14\r",
+ "7 53 15\r",
+ "7 53 16\r",
+ "7 53 17\r",
+ "7 53 18\r",
+ "7 53 19\r",
+ "7 53 20\r",
+ "7 53 21\r",
+ "7 53 22\r",
+ "7 53 23\r",
+ "7 53 24\r",
+ "7 53 25\r",
+ "7 53 26\r",
+ "7 53 27\r",
+ "7 53 28\r",
+ "7 53 29\r",
+ "7 53 30\r",
+ "7 53 31\r",
+ "7 53 32\r",
+ "7 53 33\r",
+ "7 53 34\r",
+ "7 53 35\r",
+ "7 53 36\r",
+ "7 53 37\r",
+ "7 53 38\r",
+ "7 53 39\r",
+ "7 53 40\r",
+ "7 53 41\r",
+ "7 53 42\r",
+ "7 53 43\r",
+ "7 53 44\r",
+ "7 53 45\r",
+ "7 53 46\r",
+ "7 53 47\r",
+ "7 53 48\r",
+ "7 53 49\r",
+ "7 53 50\r",
+ "7 53 51\r",
+ "7 53 52\r",
+ "7 53 53\r",
+ "7 53 54\r",
+ "7 53 55\r",
+ "7 53 56\r",
+ "7 53 57\r",
+ "7 53 58\r",
+ "7 54 1\r",
+ "7 54 2\r",
+ "7 54 3\r",
+ "7 54 4\r",
+ "7 54 5\r",
+ "7 54 6\r",
+ "7 54 7\r",
+ "7 54 8\r",
+ "7 54 9\r",
+ "7 54 10\r",
+ "7 54 11\r",
+ "7 54 12\r",
+ "7 54 13\r",
+ "7 54 14\r",
+ "7 54 15\r",
+ "7 54 16\r",
+ "7 54 17\r",
+ "7 54 18\r",
+ "7 54 19\r",
+ "7 54 20\r",
+ "7 54 21\r",
+ "7 54 22\r",
+ "7 54 23\r",
+ "7 54 24\r",
+ "7 54 25\r",
+ "7 54 26\r",
+ "7 54 27\r",
+ "7 54 28\r",
+ "7 54 29\r",
+ "7 54 30\r",
+ "7 54 31\r",
+ "7 54 32\r",
+ "7 54 33\r",
+ "7 54 34\r",
+ "7 54 35\r",
+ "7 54 36\r",
+ "7 54 37\r",
+ "7 54 38\r",
+ "7 54 39\r",
+ "7 54 40\r",
+ "7 54 41\r",
+ "7 54 42\r",
+ "7 54 43\r",
+ "7 54 44\r",
+ "7 54 45\r",
+ "7 54 46\r",
+ "7 54 47\r",
+ "7 54 48\r",
+ "7 54 49\r",
+ "7 54 50\r",
+ "7 54 51\r",
+ "7 54 52\r",
+ "7 54 53\r",
+ "7 54 54\r",
+ "7 54 55\r",
+ "7 54 56\r",
+ "7 54 57\r",
+ "7 54 58\r",
+ "7 55 1\r",
+ "7 55 2\r",
+ "7 55 3\r",
+ "7 55 4\r",
+ "7 55 5\r",
+ "7 55 6\r",
+ "7 55 7\r",
+ "7 55 8\r",
+ "7 55 9\r",
+ "7 55 10\r",
+ "7 55 11\r",
+ "7 55 12\r",
+ "7 55 13\r",
+ "7 55 14\r",
+ "7 55 15\r",
+ "7 55 16\r",
+ "7 55 17\r",
+ "7 55 18\r",
+ "7 55 19\r",
+ "7 55 20\r",
+ "7 55 21\r",
+ "7 55 22\r",
+ "7 55 23\r",
+ "7 55 24\r",
+ "7 55 25\r",
+ "7 55 26\r",
+ "7 55 27\r",
+ "7 55 28\r",
+ "7 55 29\r",
+ "7 55 30\r",
+ "7 55 31\r",
+ "7 55 32\r",
+ "7 55 33\r",
+ "7 55 34\r",
+ "7 55 35\r",
+ "7 55 36\r",
+ "7 55 37\r",
+ "7 55 38\r",
+ "7 55 39\r",
+ "7 55 40\r",
+ "7 55 41\r",
+ "7 55 42\r",
+ "7 55 43\r",
+ "7 55 44\r",
+ "7 55 45\r",
+ "7 55 46\r",
+ "7 55 47\r",
+ "7 55 48\r",
+ "7 55 49\r",
+ "7 55 50\r",
+ "7 55 51\r",
+ "7 55 52\r",
+ "7 55 53\r",
+ "7 55 54\r",
+ "7 55 55\r",
+ "7 55 56\r",
+ "7 55 57\r",
+ "7 55 58\r",
+ "7 56 1\r",
+ "7 56 2\r",
+ "7 56 3\r",
+ "7 56 4\r",
+ "7 56 5\r",
+ "7 56 6\r",
+ "7 56 7\r",
+ "7 56 8\r",
+ "7 56 9\r",
+ "7 56 10\r",
+ "7 56 11\r",
+ "7 56 12\r",
+ "7 56 13\r",
+ "7 56 14\r",
+ "7 56 15\r",
+ "7 56 16\r",
+ "7 56 17\r",
+ "7 56 18\r",
+ "7 56 19\r",
+ "7 56 20\r",
+ "7 56 21\r",
+ "7 56 22\r",
+ "7 56 23\r",
+ "7 56 24\r",
+ "7 56 25\r",
+ "7 56 26\r",
+ "7 56 27\r",
+ "7 56 28\r",
+ "7 56 29\r",
+ "7 56 30\r",
+ "7 56 31\r",
+ "7 56 32\r",
+ "7 56 33\r",
+ "7 56 34\r",
+ "7 56 35\r",
+ "7 56 36\r",
+ "7 56 37\r",
+ "7 56 38\r",
+ "7 56 39\r",
+ "7 56 40\r",
+ "7 56 41\r",
+ "7 56 42\r",
+ "7 56 43"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "7 56 44\r",
+ "7 56 45\r",
+ "7 56 46\r",
+ "7 56 47\r",
+ "7 56 48\r",
+ "7 56 49\r",
+ "7 56 50\r",
+ "7 56 51\r",
+ "7 56 52\r",
+ "7 56 53\r",
+ "7 56 54\r",
+ "7 56 55\r",
+ "7 56 56\r",
+ "7 56 57\r",
+ "7 56 58\r",
+ "7 57 1\r",
+ "7 57 2\r",
+ "7 57 3\r",
+ "7 57 4\r",
+ "7 57 5\r",
+ "7 57 6\r",
+ "7 57 7\r",
+ "7 57 8\r",
+ "7 57 9\r",
+ "7 57 10\r",
+ "7 57 11\r",
+ "7 57 12\r",
+ "7 57 13\r",
+ "7 57 14\r",
+ "7 57 15\r",
+ "7 57 16\r",
+ "7 57 17\r",
+ "7 57 18\r",
+ "7 57 19\r",
+ "7 57 20\r",
+ "7 57 21\r",
+ "7 57 22\r",
+ "7 57 23\r",
+ "7 57 24\r",
+ "7 57 25\r",
+ "7 57 26\r",
+ "7 57 27\r",
+ "7 57 28\r",
+ "7 57 29\r",
+ "7 57 30\r",
+ "7 57 31\r",
+ "7 57 32\r",
+ "7 57 33\r",
+ "7 57 34\r",
+ "7 57 35\r",
+ "7 57 36\r",
+ "7 57 37\r",
+ "7 57 38\r",
+ "7 57 39\r",
+ "7 57 40\r",
+ "7 57 41\r",
+ "7 57 42\r",
+ "7 57 43\r",
+ "7 57 44\r",
+ "7 57 45\r",
+ "7 57 46\r",
+ "7 57 47\r",
+ "7 57 48\r",
+ "7 57 49\r",
+ "7 57 50\r",
+ "7 57 51\r",
+ "7 57 52\r",
+ "7 57 53\r",
+ "7 57 54\r",
+ "7 57 55\r",
+ "7 57 56\r",
+ "7 57 57\r",
+ "7 57 58\r",
+ "7 58 1\r",
+ "7 58 2\r",
+ "7 58 3\r",
+ "7 58 4\r",
+ "7 58 5\r",
+ "7 58 6\r",
+ "7 58 7\r",
+ "7 58 8\r",
+ "7 58 9\r",
+ "7 58 10\r",
+ "7 58 11\r",
+ "7 58 12\r",
+ "7 58 13\r",
+ "7 58 14\r",
+ "7 58 15\r",
+ "7 58 16\r",
+ "7 58 17\r",
+ "7 58 18\r",
+ "7 58 19\r",
+ "7 58 20\r",
+ "7 58 21\r",
+ "7 58 22\r",
+ "7 58 23\r",
+ "7 58 24\r",
+ "7 58 25\r",
+ "7 58 26\r",
+ "7 58 27\r",
+ "7 58 28\r",
+ "7 58 29\r",
+ "7 58 30\r",
+ "7 58 31\r",
+ "7 58 32\r",
+ "7 58 33\r",
+ "7 58 34\r",
+ "7 58 35\r",
+ "7 58 36\r",
+ "7 58 37\r",
+ "7 58 38\r",
+ "7 58 39\r",
+ "7 58 40\r",
+ "7 58 41\r",
+ "7 58 42\r",
+ "7 58 43\r",
+ "7 58 44\r",
+ "7 58 45\r",
+ "7 58 46\r",
+ "7 58 47\r",
+ "7 58 48\r",
+ "7 58 49\r",
+ "7 58 50\r",
+ "7 58 51\r",
+ "7 58 52\r",
+ "7 58 53\r",
+ "7 58 54\r",
+ "7 58 55\r",
+ "7 58 56\r",
+ "7 58 57\r",
+ "7 58 58\r",
+ "8 1 1\r",
+ "8 1 2\r",
+ "8 1 3\r",
+ "8 1 4\r",
+ "8 1 5\r",
+ "8 1 6\r",
+ "8 1 7\r",
+ "8 1 8\r",
+ "8 1 9\r",
+ "8 1 10\r",
+ "8 1 11\r",
+ "8 1 12\r",
+ "8 1 13\r",
+ "8 1 14\r",
+ "8 1 15\r",
+ "8 1 16\r",
+ "8 1 17\r",
+ "8 1 18\r",
+ "8 1 19\r",
+ "8 1 20\r",
+ "8 1 21\r",
+ "8 1 22\r",
+ "8 1 23\r",
+ "8 1 24\r",
+ "8 1 25\r",
+ "8 1 26\r",
+ "8 1 27\r",
+ "8 1 28\r",
+ "8 1 29\r",
+ "8 1 30\r",
+ "8 1 31\r",
+ "8 1 32\r",
+ "8 1 33\r",
+ "8 1 34\r",
+ "8 1 35\r",
+ "8 1 36\r",
+ "8 1 37\r",
+ "8 1 38\r",
+ "8 1 39\r",
+ "8 1 40\r",
+ "8 1 41\r",
+ "8 1 42\r",
+ "8 1 43\r",
+ "8 1 44\r",
+ "8 1 45\r",
+ "8 1 46\r",
+ "8 1 47\r",
+ "8 1 48\r",
+ "8 1 49\r",
+ "8 1 50\r",
+ "8 1 51\r",
+ "8 1 52\r",
+ "8 1 53\r",
+ "8 1 54\r",
+ "8 1 55\r",
+ "8 1 56\r",
+ "8 1 57\r",
+ "8 1 58\r",
+ "8 2 1\r",
+ "8 2 2\r",
+ "8 2 3\r",
+ "8 2 4\r",
+ "8 2 5\r",
+ "8 2 6\r",
+ "8 2 7\r",
+ "8 2 8\r",
+ "8 2 9\r",
+ "8 2 10\r",
+ "8 2 11\r",
+ "8 2 12\r",
+ "8 2 13\r",
+ "8 2 14\r",
+ "8 2 15\r",
+ "8 2 16\r",
+ "8 2 17\r",
+ "8 2 18\r",
+ "8 2 19\r",
+ "8 2 20\r",
+ "8 2 21\r",
+ "8 2 22\r",
+ "8 2 23\r",
+ "8 2 24\r",
+ "8 2 25\r",
+ "8 2 26\r",
+ "8 2 27\r",
+ "8 2 28\r",
+ "8 2 29\r",
+ "8 2 30\r",
+ "8 2 31\r",
+ "8 2 32\r",
+ "8 2 33\r",
+ "8 2 34\r",
+ "8 2 35\r",
+ "8 2 36\r",
+ "8 2 37\r",
+ "8 2 38\r",
+ "8 2 39\r",
+ "8 2 40\r",
+ "8 2 41\r",
+ "8 2 42\r",
+ "8 2 43\r",
+ "8 2 44\r",
+ "8 2 45\r",
+ "8 2 46\r",
+ "8 2 47\r",
+ "8 2 48\r",
+ "8 2 49\r",
+ "8 2 50\r",
+ "8 2 51\r",
+ "8 2 52\r",
+ "8 2 53\r",
+ "8 2 54\r",
+ "8 2 55\r",
+ "8 2 56\r",
+ "8 2 57\r",
+ "8 2 58\r",
+ "8 3 1\r",
+ "8 3 2\r",
+ "8 3 3\r",
+ "8 3 4\r",
+ "8 3 5\r",
+ "8 3 6\r",
+ "8 3 7\r",
+ "8 3 8\r",
+ "8 3 9\r",
+ "8 3 10\r",
+ "8 3 11\r",
+ "8 3 12\r",
+ "8 3 13\r",
+ "8 3 14\r",
+ "8 3 15\r",
+ "8 3 16\r",
+ "8 3 17\r",
+ "8 3 18\r",
+ "8 3 19\r",
+ "8 3 20\r",
+ "8 3 21\r",
+ "8 3 22\r",
+ "8 3 23\r",
+ "8 3 24\r",
+ "8 3 25\r",
+ "8 3 26\r",
+ "8 3 27\r",
+ "8 3 28\r",
+ "8 3 29\r",
+ "8 3 30\r",
+ "8 3 31\r",
+ "8 3 32\r",
+ "8 3 33\r",
+ "8 3 34\r",
+ "8 3 35\r",
+ "8 3 36\r",
+ "8 3 37\r",
+ "8 3 38\r",
+ "8 3 39\r",
+ "8 3 40\r",
+ "8 3 41\r",
+ "8 3 42\r",
+ "8 3 43\r",
+ "8 3 44\r",
+ "8 3 45\r",
+ "8 3 46\r",
+ "8 3 47\r",
+ "8 3 48\r",
+ "8 3 49\r",
+ "8 3 50\r",
+ "8 3 51\r",
+ "8 3 52\r",
+ "8 3 53\r",
+ "8 3 54\r",
+ "8 3 55\r",
+ "8 3 56\r",
+ "8 3 57\r",
+ "8 3 58\r",
+ "8 4 1\r",
+ "8 4 2\r",
+ "8 4 3\r",
+ "8 4 4\r",
+ "8 4 5\r",
+ "8 4 6\r",
+ "8 4 7\r",
+ "8 4 8\r",
+ "8 4 9\r",
+ "8 4 10\r",
+ "8 4 11\r",
+ "8 4 12\r",
+ "8 4 13\r",
+ "8 4 14\r",
+ "8 4 15\r",
+ "8 4 16\r",
+ "8 4 17\r",
+ "8 4 18\r",
+ "8 4 19\r",
+ "8 4 20\r",
+ "8 4 21\r",
+ "8 4 22\r",
+ "8 4 23\r",
+ "8 4 24\r",
+ "8 4 25\r",
+ "8 4 26\r",
+ "8 4 27\r",
+ "8 4 28\r",
+ "8 4 29\r",
+ "8 4 30\r",
+ "8 4 31\r",
+ "8 4 32\r",
+ "8 4 33\r",
+ "8 4 34\r",
+ "8 4 35\r",
+ "8 4 36\r",
+ "8 4 37\r",
+ "8 4 38\r",
+ "8 4 39\r",
+ "8 4 40\r",
+ "8 4 41\r",
+ "8 4 42\r",
+ "8 4 43\r",
+ "8 4 44\r",
+ "8 4 45\r",
+ "8 4 46\r",
+ "8 4 47\r",
+ "8 4 48\r",
+ "8 4 49\r",
+ "8 4 50\r",
+ "8 4 51\r",
+ "8 4 52\r",
+ "8 4 53\r",
+ "8 4 54\r",
+ "8 4 55\r",
+ "8 4 56\r",
+ "8 4 57\r",
+ "8 4 58\r",
+ "8 5 1\r",
+ "8 5 2\r",
+ "8 5 3\r",
+ "8 5 4\r",
+ "8 5 5\r",
+ "8 5 6\r",
+ "8 5 7\r",
+ "8 5 8\r",
+ "8 5 9\r",
+ "8 5 10\r",
+ "8 5 11\r",
+ "8 5 12\r",
+ "8 5 13\r",
+ "8 5 14\r",
+ "8 5 15\r",
+ "8 5 16\r",
+ "8 5 17\r",
+ "8 5 18\r",
+ "8 5 19\r",
+ "8 5 20\r",
+ "8 5 21\r",
+ "8 5 22\r",
+ "8 5 23\r",
+ "8 5 24\r",
+ "8 5 25\r",
+ "8 5 26\r",
+ "8 5 27\r",
+ "8 5 28\r",
+ "8 5 29\r",
+ "8 5 30\r",
+ "8 5 31\r",
+ "8 5 32\r",
+ "8 5 33\r",
+ "8 5 34\r",
+ "8 5 35\r",
+ "8 5 36\r",
+ "8 5 37\r",
+ "8 5 38\r",
+ "8 5 39\r",
+ "8 5 40\r",
+ "8 5 41\r",
+ "8 5 42\r",
+ "8 5 43\r",
+ "8 5 44\r",
+ "8 5 45\r",
+ "8 5 46\r",
+ "8 5 47\r",
+ "8 5 48\r",
+ "8 5 49\r",
+ "8 5 50\r",
+ "8 5 51\r",
+ "8 5 52\r",
+ "8 5 53\r",
+ "8 5 54\r",
+ "8 5 55\r",
+ "8 5 56\r",
+ "8 5 57\r",
+ "8 5 58\r",
+ "8 6 1\r",
+ "8 6 2\r",
+ "8 6 3\r",
+ "8 6 4\r",
+ "8 6 5\r",
+ "8 6 6\r",
+ "8 6 7\r",
+ "8 6 8\r",
+ "8 6 9\r",
+ "8 6 10\r",
+ "8 6 11\r",
+ "8 6 12\r",
+ "8 6 13\r",
+ "8 6 14\r",
+ "8 6 15\r",
+ "8 6 16\r",
+ "8 6 17\r",
+ "8 6 18\r",
+ "8 6 19\r",
+ "8 6 20\r",
+ "8 6 21\r",
+ "8 6 22\r",
+ "8 6 23\r",
+ "8 6 24\r",
+ "8 6 25\r",
+ "8 6 26\r",
+ "8 6 27\r",
+ "8 6 28\r",
+ "8 6 29\r",
+ "8 6 30\r",
+ "8 6 31\r",
+ "8 6 32\r",
+ "8 6 33\r",
+ "8 6 34\r",
+ "8 6 35\r",
+ "8 6 36\r",
+ "8 6 37\r",
+ "8 6 38\r",
+ "8 6 39\r",
+ "8 6 40\r",
+ "8 6 41\r",
+ "8 6 42\r",
+ "8 6 43\r",
+ "8 6 44\r",
+ "8 6 45\r",
+ "8 6 46\r",
+ "8 6 47\r",
+ "8 6 48\r",
+ "8 6 49\r",
+ "8 6 50\r",
+ "8 6 51\r",
+ "8 6 52\r",
+ "8 6 53\r",
+ "8 6 54\r",
+ "8 6 55\r",
+ "8 6 56\r",
+ "8 6 57\r",
+ "8 6 58\r",
+ "8 7 1\r",
+ "8 7 2\r",
+ "8 7 3\r",
+ "8 7 4\r",
+ "8 7 5\r",
+ "8 7 6\r",
+ "8 7 7\r",
+ "8 7 8\r",
+ "8 7 9\r",
+ "8 7 10\r",
+ "8 7 11\r",
+ "8 7 12\r",
+ "8 7 13\r",
+ "8 7 14\r",
+ "8 7 15\r",
+ "8 7 16\r",
+ "8 7 17\r",
+ "8 7 18\r",
+ "8 7 19\r",
+ "8 7 20\r",
+ "8 7 21\r",
+ "8 7 22\r",
+ "8 7 23\r",
+ "8 7 24\r",
+ "8 7 25\r",
+ "8 7 26\r",
+ "8 7 27\r",
+ "8 7 28\r",
+ "8 7 29\r",
+ "8 7 30\r",
+ "8 7 31\r",
+ "8 7 32\r",
+ "8 7 33\r",
+ "8 7 34\r",
+ "8 7 35\r",
+ "8 7 36\r",
+ "8 7 37\r",
+ "8 7 38\r",
+ "8 7 39\r",
+ "8 7 40\r",
+ "8 7 41\r",
+ "8 7 42\r",
+ "8 7 43\r",
+ "8 7 44\r",
+ "8 7 45\r",
+ "8 7 46\r",
+ "8 7 47\r",
+ "8 7 48\r",
+ "8 7 49\r",
+ "8 7 50\r",
+ "8 7 51\r",
+ "8 7 52\r",
+ "8 7 53\r",
+ "8 7 54\r",
+ "8 7 55\r",
+ "8 7 56\r",
+ "8 7 57\r",
+ "8 7 58\r",
+ "8 8 1\r",
+ "8 8 2\r",
+ "8 8 3\r",
+ "8 8 4\r",
+ "8 8 5\r",
+ "8 8 6\r",
+ "8 8 7\r",
+ "8 8 8\r",
+ "8 8 9\r",
+ "8 8 10\r",
+ "8 8 11\r",
+ "8 8 12\r",
+ "8 8 13\r",
+ "8 8 14\r",
+ "8 8 15\r",
+ "8 8 16\r",
+ "8 8 17\r",
+ "8 8 18\r",
+ "8 8 19\r",
+ "8 8 20\r",
+ "8 8 21\r",
+ "8 8 22\r",
+ "8 8 23\r",
+ "8 8 24\r",
+ "8 8 25\r",
+ "8 8 26\r",
+ "8 8 27\r",
+ "8 8 28\r",
+ "8 8 29\r",
+ "8 8 30\r",
+ "8 8 31\r",
+ "8 8 32\r",
+ "8 8 33\r",
+ "8 8 34\r",
+ "8 8 35\r",
+ "8 8 36\r",
+ "8 8 37\r",
+ "8 8 38\r",
+ "8 8 39\r",
+ "8 8 40\r",
+ "8 8 41\r",
+ "8 8 42\r",
+ "8 8 43\r",
+ "8 8 44\r",
+ "8 8 45\r",
+ "8 8 46\r",
+ "8 8 47\r",
+ "8 8 48\r",
+ "8 8 49\r",
+ "8 8 50\r",
+ "8 8 51\r",
+ "8 8 52\r",
+ "8 8 53\r",
+ "8 8 54\r",
+ "8 8 55\r",
+ "8 8 56\r",
+ "8 8 57\r",
+ "8 8 58\r",
+ "8 9 1\r",
+ "8 9 2\r",
+ "8 9 3\r",
+ "8 9 4\r",
+ "8 9 5\r",
+ "8 9 6\r",
+ "8 9 7\r",
+ "8 9 8\r",
+ "8 9 9\r",
+ "8 9 10\r",
+ "8 9 11\r",
+ "8 9 12\r",
+ "8 9 13\r",
+ "8 9 14\r",
+ "8 9 15\r",
+ "8 9 16\r",
+ "8 9 17\r",
+ "8 9 18\r",
+ "8 9 19\r",
+ "8 9 20\r",
+ "8 9 21\r",
+ "8 9 22\r",
+ "8 9 23\r",
+ "8 9 24\r",
+ "8 9 25\r",
+ "8 9 26\r",
+ "8 9 27\r",
+ "8 9 28\r",
+ "8 9 29\r",
+ "8 9 30\r",
+ "8 9 31\r",
+ "8 9 32\r",
+ "8 9 33\r",
+ "8 9 34\r",
+ "8 9 35\r",
+ "8 9 36\r",
+ "8 9 37\r",
+ "8 9 38\r",
+ "8 9 39\r",
+ "8 9 40\r",
+ "8 9 41\r",
+ "8 9 42\r",
+ "8 9 43\r",
+ "8 9 44\r",
+ "8 9 45\r",
+ "8 9 46\r",
+ "8 9 47\r",
+ "8 9 48\r",
+ "8 9 49\r",
+ "8 9 50\r",
+ "8 9 51\r",
+ "8 9 52\r",
+ "8 9 53\r",
+ "8 9 54\r",
+ "8 9 55\r",
+ "8 9 56\r",
+ "8 9 57\r",
+ "8 9 58\r",
+ "8 10 1\r",
+ "8 10 2\r",
+ "8 10 3\r",
+ "8 10 4\r",
+ "8 10 5\r",
+ "8 10 6\r",
+ "8 10 7\r",
+ "8 10 8\r",
+ "8 10 9\r",
+ "8 10 10\r",
+ "8 10 11\r",
+ "8 10 12\r",
+ "8 10 13\r",
+ "8 10 14\r",
+ "8 10 15\r",
+ "8 10 16\r",
+ "8 10 17\r",
+ "8 10 18\r",
+ "8 10 19\r",
+ "8 10 20\r",
+ "8 10 21\r",
+ "8 10 22\r",
+ "8 10 23\r",
+ "8 10 24\r",
+ "8 10 25\r",
+ "8 10 26\r",
+ "8 10 27\r",
+ "8 10 28\r",
+ "8 10 29\r",
+ "8 10 30\r",
+ "8 10 31\r",
+ "8 10 32\r",
+ "8 10 33\r",
+ "8 10 34\r",
+ "8 10 35\r",
+ "8 10 36\r",
+ "8 10 37\r",
+ "8 10 38\r",
+ "8 10 39\r",
+ "8 10 40\r",
+ "8 10 41\r",
+ "8 10 42\r",
+ "8 10 43\r",
+ "8 10 44\r",
+ "8 10 45\r",
+ "8 10 46\r",
+ "8 10 47\r",
+ "8 10 48\r",
+ "8 10 49\r",
+ "8 10 50\r",
+ "8 10 51\r",
+ "8 10 52\r",
+ "8 10 53\r",
+ "8 10 54\r",
+ "8 10 55\r",
+ "8 10 56\r",
+ "8 10 57\r",
+ "8 10 58\r",
+ "8 11 1\r",
+ "8 11 2\r",
+ "8 11 3\r",
+ "8 11 4\r",
+ "8 11 5\r",
+ "8 11 6\r",
+ "8 11 7\r",
+ "8 11 8\r",
+ "8 11 9\r",
+ "8 11 10\r",
+ "8 11 11\r",
+ "8 11 12\r",
+ "8 11 13\r",
+ "8 11 14\r",
+ "8 11 15\r",
+ "8 11 16\r",
+ "8 11 17\r",
+ "8 11 18\r",
+ "8 11 19\r",
+ "8 11 20\r",
+ "8 11 21\r",
+ "8 11 22\r",
+ "8 11 23\r",
+ "8 11 24\r",
+ "8 11 25\r",
+ "8 11 26\r",
+ "8 11 27\r",
+ "8 11 28\r",
+ "8 11 29\r",
+ "8 11 30\r",
+ "8 11 31\r",
+ "8 11 32\r",
+ "8 11 33\r",
+ "8 11 34\r",
+ "8 11 35\r",
+ "8 11 36\r",
+ "8 11 37\r",
+ "8 11 38\r",
+ "8 11 39\r",
+ "8 11 40\r",
+ "8 11 41\r",
+ "8 11 42\r",
+ "8 11 43\r",
+ "8 11 44\r",
+ "8 11 45\r",
+ "8 11 46\r",
+ "8 11 47\r",
+ "8 11 48\r",
+ "8 11 49\r",
+ "8 11 50\r",
+ "8 11 51\r",
+ "8 11 52\r",
+ "8 11 53\r",
+ "8 11 54\r",
+ "8 11 55\r",
+ "8 11 56\r",
+ "8 11 57\r",
+ "8 11 58\r",
+ "8 12 1\r",
+ "8 12 2\r",
+ "8 12 3\r",
+ "8 12 4\r",
+ "8 12 5\r",
+ "8 12 6\r",
+ "8 12 7\r",
+ "8 12 8\r",
+ "8 12 9\r",
+ "8 12 10\r",
+ "8 12 11\r",
+ "8 12 12\r",
+ "8 12 13\r",
+ "8 12 14\r",
+ "8 12 15\r",
+ "8 12 16\r",
+ "8 12 17\r",
+ "8 12 18\r",
+ "8 12 19\r",
+ "8 12 20\r",
+ "8 12 21\r",
+ "8 12 22\r",
+ "8 12 23\r",
+ "8 12 24\r",
+ "8 12 25\r",
+ "8 12 26\r",
+ "8 12 27\r",
+ "8 12 28\r",
+ "8 12 29\r",
+ "8 12 30\r",
+ "8 12 31\r",
+ "8 12 32\r",
+ "8 12 33\r",
+ "8 12 34\r",
+ "8 12 35\r",
+ "8 12 36\r",
+ "8 12 37\r",
+ "8 12 38\r",
+ "8 12 39\r",
+ "8 12 40\r",
+ "8 12 41\r",
+ "8 12 42\r",
+ "8 12 43\r",
+ "8 12 44\r",
+ "8 12 45\r",
+ "8 12 46\r",
+ "8 12 47\r",
+ "8 12 48\r",
+ "8 12 49\r",
+ "8 12 50\r",
+ "8 12 51\r",
+ "8 12 52\r",
+ "8 12 53\r",
+ "8 12 54\r",
+ "8 12 55\r",
+ "8 12 56\r",
+ "8 12 57\r",
+ "8 12 58\r",
+ "8 13 1\r",
+ "8 13 2\r",
+ "8 13 3\r",
+ "8 13 4\r",
+ "8 13 5\r",
+ "8 13 6\r",
+ "8 13 7\r",
+ "8 13 8\r",
+ "8 13 9\r",
+ "8 13 10\r",
+ "8 13 11\r",
+ "8 13 12\r",
+ "8 13 13\r",
+ "8 13 14\r",
+ "8 13 15\r",
+ "8 13 16\r",
+ "8 13 17\r",
+ "8 13 18\r",
+ "8 13 19\r",
+ "8 13 20\r",
+ "8 13 21\r",
+ "8 13 22\r",
+ "8 13 23\r",
+ "8 13 24\r",
+ "8 13 25\r",
+ "8 13 26\r",
+ "8 13 27\r",
+ "8 13 28\r",
+ "8 13 29\r",
+ "8 13 30\r",
+ "8 13 31\r",
+ "8 13 32\r",
+ "8 13 33\r",
+ "8 13 34\r",
+ "8 13 35\r",
+ "8 13 36\r",
+ "8 13 37\r",
+ "8 13 38\r",
+ "8 13 39\r",
+ "8 13 40\r",
+ "8 13 41\r",
+ "8 13 42\r",
+ "8 13 43\r",
+ "8 13 44\r",
+ "8 13 45\r",
+ "8 13 46\r",
+ "8 13 47\r",
+ "8 13 48\r",
+ "8 13 49\r",
+ "8 13 50\r",
+ "8 13 51\r",
+ "8 13 52\r",
+ "8 13 53\r",
+ "8 13 54\r",
+ "8 13 55\r",
+ "8 13 56\r",
+ "8 13 57\r",
+ "8 13 58\r",
+ "8 14 1\r",
+ "8 14 2\r",
+ "8 14 3\r",
+ "8 14 4\r",
+ "8 14 5\r",
+ "8 14 6\r",
+ "8 14 7\r",
+ "8 14 8\r",
+ "8 14 9\r",
+ "8 14 10\r",
+ "8 14 11\r",
+ "8 14 12\r",
+ "8 14 13\r",
+ "8 14 14\r",
+ "8 14 15\r",
+ "8 14 16\r",
+ "8 14 17\r",
+ "8 14 18\r",
+ "8 14 19\r",
+ "8 14 20\r",
+ "8 14 21\r",
+ "8 14 22\r",
+ "8 14 23\r",
+ "8 14 24\r",
+ "8 14 25\r",
+ "8 14 26\r",
+ "8 14 27\r",
+ "8 14 28\r",
+ "8 14 29\r",
+ "8 14 30\r",
+ "8 14 31\r",
+ "8 14 32\r",
+ "8 14 33\r",
+ "8 14 34\r",
+ "8 14 35\r",
+ "8 14 36\r",
+ "8 14 37\r",
+ "8 14 38\r",
+ "8 14 39\r",
+ "8 14 40\r",
+ "8 14 41\r",
+ "8 14 42\r",
+ "8 14 43\r",
+ "8 14 44\r",
+ "8 14 45\r",
+ "8 14 46\r",
+ "8 14 47\r",
+ "8 14 48\r",
+ "8 14 49\r",
+ "8 14 50\r",
+ "8 14 51\r",
+ "8 14 52\r",
+ "8 14 53\r",
+ "8 14 54\r",
+ "8 14 55\r",
+ "8 14 56\r",
+ "8 14 57\r",
+ "8 14 58\r",
+ "8 15 1\r",
+ "8 15 2\r",
+ "8 15 3\r",
+ "8 15 4\r",
+ "8 15 5\r",
+ "8 15 6\r",
+ "8 15 7\r",
+ "8 15 8\r",
+ "8 15 9\r",
+ "8 15 10\r",
+ "8 15 11\r",
+ "8 15 12\r",
+ "8 15 13\r",
+ "8 15 14\r",
+ "8 15 15\r",
+ "8 15 16\r",
+ "8 15 17\r",
+ "8 15 18\r",
+ "8 15 19\r",
+ "8 15 20\r",
+ "8 15 21\r",
+ "8 15 22\r",
+ "8 15 23\r",
+ "8 15 24\r",
+ "8 15 25\r",
+ "8 15 26\r",
+ "8 15 27\r",
+ "8 15 28\r",
+ "8 15 29\r",
+ "8 15 30\r",
+ "8 15 31\r",
+ "8 15 32\r",
+ "8 15 33\r",
+ "8 15 34\r",
+ "8 15 35\r",
+ "8 15 36\r",
+ "8 15 37\r",
+ "8 15 38\r",
+ "8 15 39\r",
+ "8 15 40\r",
+ "8 15 41\r",
+ "8 15 42\r",
+ "8 15 43\r",
+ "8 15 44\r",
+ "8 15 45\r",
+ "8 15 46\r",
+ "8 15 47\r",
+ "8 15 48\r",
+ "8 15 49\r",
+ "8 15 50\r",
+ "8 15 51\r",
+ "8 15 52\r",
+ "8 15 53\r",
+ "8 15 54\r",
+ "8 15 55\r",
+ "8 15 56\r",
+ "8 15 57\r",
+ "8 15 58\r",
+ "8 16 1\r",
+ "8 16 2\r",
+ "8 16 3\r",
+ "8 16 4\r",
+ "8 16 5\r",
+ "8 16 6\r",
+ "8 16 7\r",
+ "8 16 8\r",
+ "8 16 9\r",
+ "8 16 10\r",
+ "8 16 11\r",
+ "8 16 12\r",
+ "8 16 13\r",
+ "8 16 14\r",
+ "8 16 15\r",
+ "8 16 16\r",
+ "8 16 17\r",
+ "8 16 18\r",
+ "8 16 19\r",
+ "8 16 20\r",
+ "8 16 21\r",
+ "8 16 22\r",
+ "8 16 23\r",
+ "8 16 24\r",
+ "8 16 25\r",
+ "8 16 26\r",
+ "8 16 27\r",
+ "8 16 28\r",
+ "8 16 29\r",
+ "8 16 30\r",
+ "8 16 31\r",
+ "8 16 32\r",
+ "8 16 33\r",
+ "8 16 34\r",
+ "8 16 35\r",
+ "8 16 36\r",
+ "8 16 37\r",
+ "8 16 38\r",
+ "8 16 39\r",
+ "8 16 40\r",
+ "8 16 41\r",
+ "8 16 42\r",
+ "8 16 43\r",
+ "8 16 44\r",
+ "8 16 45\r",
+ "8 16 46\r",
+ "8 16 47\r",
+ "8 16 48\r",
+ "8 16 49\r",
+ "8 16 50\r",
+ "8 16 51\r",
+ "8 16 52\r",
+ "8 16 53\r",
+ "8 16 54\r",
+ "8 16 55\r",
+ "8 16 56\r",
+ "8 16 57\r",
+ "8 16 58\r",
+ "8 17 1\r",
+ "8 17 2\r",
+ "8 17 3\r",
+ "8 17 4\r",
+ "8 17 5\r",
+ "8 17 6\r",
+ "8 17 7\r",
+ "8 17 8\r",
+ "8 17 9\r",
+ "8 17 10\r",
+ "8 17 11\r",
+ "8 17 12\r",
+ "8 17 13\r",
+ "8 17 14\r",
+ "8 17 15\r",
+ "8 17 16\r",
+ "8 17 17\r",
+ "8 17 18\r",
+ "8 17 19\r",
+ "8 17 20\r",
+ "8 17 21\r",
+ "8 17 22\r",
+ "8 17 23\r",
+ "8 17 24\r",
+ "8 17 25\r",
+ "8 17 26\r",
+ "8 17 27\r",
+ "8 17 28\r",
+ "8 17 29\r",
+ "8 17 30\r",
+ "8 17 31\r",
+ "8 17 32\r",
+ "8 17 33\r",
+ "8 17 34\r",
+ "8 17 35\r",
+ "8 17 36\r",
+ "8 17 37\r",
+ "8 17 38\r",
+ "8 17 39\r",
+ "8 17 40\r",
+ "8 17 41\r",
+ "8 17 42\r",
+ "8 17 43\r",
+ "8 17 44\r",
+ "8 17 45\r",
+ "8 17 46\r",
+ "8 17 47\r",
+ "8 17 48\r",
+ "8 17 49\r",
+ "8 17 50\r",
+ "8 17 51\r",
+ "8 17 52\r",
+ "8 17 53\r",
+ "8 17 54\r",
+ "8 17 55\r",
+ "8 17 56\r",
+ "8 17 57\r",
+ "8 17 58\r",
+ "8 18 1\r",
+ "8 18 2\r",
+ "8 18 3\r",
+ "8 18 4\r",
+ "8 18 5\r",
+ "8 18 6\r",
+ "8 18 7\r",
+ "8 18 8\r",
+ "8 18 9\r",
+ "8 18 10\r",
+ "8 18 11\r",
+ "8 18 12\r",
+ "8 18 13\r",
+ "8 18 14\r",
+ "8 18 15\r",
+ "8 18 16\r",
+ "8 18 17\r",
+ "8 18 18\r",
+ "8 18 19\r",
+ "8 18 20\r",
+ "8 18 21\r",
+ "8 18 22\r",
+ "8 18 23\r",
+ "8 18 24\r",
+ "8 18 25\r",
+ "8 18 26\r",
+ "8 18 27\r",
+ "8 18 28\r",
+ "8 18 29\r",
+ "8 18 30\r",
+ "8 18 31\r",
+ "8 18 32\r",
+ "8 18 33\r",
+ "8 18 34\r",
+ "8 18 35\r",
+ "8 18 36\r",
+ "8 18 37\r",
+ "8 18 38\r",
+ "8 18 39\r",
+ "8 18 40\r",
+ "8 18 41\r",
+ "8 18 42\r",
+ "8 18 43\r",
+ "8 18 44\r",
+ "8 18 45\r",
+ "8 18 46\r",
+ "8 18 47\r",
+ "8 18 48\r",
+ "8 18 49\r",
+ "8 18 50\r",
+ "8 18 51\r",
+ "8 18 52\r",
+ "8 18 53\r",
+ "8 18 54\r",
+ "8 18 55\r",
+ "8 18 56\r",
+ "8 18 57\r",
+ "8 18 58\r",
+ "8 19 1\r",
+ "8 19 2\r",
+ "8 19 3\r",
+ "8 19 4\r",
+ "8 19 5\r",
+ "8 19 6\r",
+ "8 19 7\r",
+ "8 19 8\r",
+ "8 19 9\r",
+ "8 19 10\r",
+ "8 19 11\r",
+ "8 19 12\r",
+ "8 19 13\r",
+ "8 19 14\r",
+ "8 19 15\r",
+ "8 19 16\r",
+ "8 19 17\r",
+ "8 19 18\r",
+ "8 19 19\r",
+ "8 19 20\r",
+ "8 19 21\r",
+ "8 19 22\r",
+ "8 19 23\r",
+ "8 19 24\r",
+ "8 19 25\r",
+ "8 19 26\r",
+ "8 19 27\r",
+ "8 19 28\r",
+ "8 19 29\r",
+ "8 19 30\r",
+ "8 19 31\r",
+ "8 19 32\r",
+ "8 19 33\r",
+ "8 19 34\r",
+ "8 19 35\r",
+ "8 19 36\r",
+ "8 19 37\r",
+ "8 19 38\r",
+ "8 19 39\r",
+ "8 19 40\r",
+ "8 19 41\r",
+ "8 19 42\r",
+ "8 19 43\r",
+ "8 19 44\r",
+ "8 19 45\r",
+ "8 19 46\r",
+ "8 19 47\r",
+ "8 19 48\r",
+ "8 19 49\r",
+ "8 19 50\r",
+ "8 19 51\r",
+ "8 19 52\r",
+ "8 19 53\r",
+ "8 19 54\r",
+ "8 19 55\r",
+ "8 19 56\r",
+ "8 19 57\r",
+ "8 19 58\r",
+ "8 20 1\r",
+ "8 20 2\r",
+ "8 20 3\r",
+ "8 20 4\r",
+ "8 20 5\r",
+ "8 20 6\r",
+ "8 20 7\r",
+ "8 20 8\r",
+ "8 20 9\r",
+ "8 20 10\r",
+ "8 20 11\r",
+ "8 20 12\r",
+ "8 20 13\r",
+ "8 20 14\r",
+ "8 20 15\r",
+ "8 20 16\r",
+ "8 20 17\r",
+ "8 20 18\r",
+ "8 20 19\r",
+ "8 20 20\r",
+ "8 20 21\r",
+ "8 20 22\r",
+ "8 20 23\r",
+ "8 20 24\r",
+ "8 20 25\r",
+ "8 20 26\r",
+ "8 20 27\r",
+ "8 20 28\r",
+ "8 20 29\r",
+ "8 20 30\r",
+ "8 20 31\r",
+ "8 20 32\r",
+ "8 20 33\r",
+ "8 20 34\r",
+ "8 20 35\r",
+ "8 20 36\r",
+ "8 20 37\r",
+ "8 20 38\r",
+ "8 20 39\r",
+ "8 20 40\r",
+ "8 20 41\r",
+ "8 20 42\r",
+ "8 20 43\r",
+ "8 20 44\r",
+ "8 20 45\r",
+ "8 20 46\r",
+ "8 20 47\r",
+ "8 20 48\r",
+ "8 20 49\r",
+ "8 20 50\r",
+ "8 20 51\r",
+ "8 20 52\r",
+ "8 20 53\r",
+ "8 20 54\r",
+ "8 20 55\r",
+ "8 20 56\r",
+ "8 20 57\r",
+ "8 20 58\r",
+ "8 21 1\r",
+ "8 21 2\r",
+ "8 21 3\r",
+ "8 21 4\r",
+ "8 21 5\r",
+ "8 21 6\r",
+ "8 21 7\r",
+ "8 21 8\r",
+ "8 21 9\r",
+ "8 21 10\r",
+ "8 21 11\r",
+ "8 21 12\r",
+ "8 21 13\r",
+ "8 21 14\r",
+ "8 21 15\r",
+ "8 21 16\r",
+ "8 21 17\r",
+ "8 21 18\r",
+ "8 21 19\r",
+ "8 21 20\r",
+ "8 21 21\r",
+ "8 21 22\r",
+ "8 21 23\r",
+ "8 21 24\r",
+ "8 21 25\r",
+ "8 21 26\r",
+ "8 21 27\r",
+ "8 21 28\r",
+ "8 21 29\r",
+ "8 21 30\r",
+ "8 21 31\r",
+ "8 21 32\r",
+ "8 21 33\r",
+ "8 21 34\r",
+ "8 21 35\r",
+ "8 21 36\r",
+ "8 21 37\r",
+ "8 21 38\r",
+ "8 21 39\r",
+ "8 21 40\r",
+ "8 21 41\r",
+ "8 21 42\r",
+ "8 21 43\r",
+ "8 21 44\r",
+ "8 21 45\r",
+ "8 21 46\r",
+ "8 21 47\r",
+ "8 21 48\r",
+ "8 21 49\r",
+ "8 21 50\r",
+ "8 21 51\r",
+ "8 21 52\r",
+ "8 21 53\r",
+ "8 21 54\r",
+ "8 21 55\r",
+ "8 21 56\r",
+ "8 21 57\r",
+ "8 21 58\r",
+ "8 22 1\r",
+ "8 22 2\r",
+ "8 22 3\r",
+ "8 22 4\r",
+ "8 22 5\r",
+ "8 22 6\r",
+ "8 22 7\r",
+ "8 22 8\r",
+ "8 22 9\r",
+ "8 22 10\r",
+ "8 22 11\r",
+ "8 22 12\r",
+ "8 22 13\r",
+ "8 22 14\r",
+ "8 22 15\r",
+ "8 22 16\r",
+ "8 22 17\r",
+ "8 22 18\r",
+ "8 22 19\r",
+ "8 22 20\r",
+ "8 22 21\r",
+ "8 22 22\r",
+ "8 22 23\r",
+ "8 22 24\r",
+ "8 22 25\r",
+ "8 22 26\r",
+ "8 22 27\r",
+ "8 22 28\r",
+ "8 22 29\r",
+ "8 22 30\r",
+ "8 22 31\r",
+ "8 22 32\r",
+ "8 22 33\r",
+ "8 22 34\r",
+ "8 22 35\r",
+ "8 22 36\r",
+ "8 22 37\r",
+ "8 22 38\r",
+ "8 22 39\r",
+ "8 22 40\r",
+ "8 22 41\r",
+ "8 22 42\r",
+ "8 22 43\r",
+ "8 22 44\r",
+ "8 22 45\r",
+ "8 22 46\r",
+ "8 22 47\r",
+ "8 22 48\r",
+ "8 22 49\r",
+ "8 22 50\r",
+ "8 22 51\r",
+ "8 22 52\r",
+ "8 22 53\r",
+ "8 22 54\r",
+ "8 22 55\r",
+ "8 22 56\r",
+ "8 22 57\r",
+ "8 22 58\r",
+ "8 23 1\r",
+ "8 23 2\r",
+ "8 23 3\r",
+ "8 23 4\r",
+ "8 23 5\r",
+ "8 23 6\r",
+ "8 23 7\r",
+ "8 23 8\r",
+ "8 23 9\r",
+ "8 23 10\r",
+ "8 23 11\r",
+ "8 23 12\r",
+ "8 23 13\r",
+ "8 23 14\r",
+ "8 23 15\r",
+ "8 23 16\r",
+ "8 23 17\r",
+ "8 23 18\r",
+ "8 23 19\r",
+ "8 23 20\r",
+ "8 23 21\r",
+ "8 23 22\r",
+ "8 23 23\r",
+ "8 23 24\r",
+ "8 23 25\r",
+ "8 23 26\r",
+ "8 23 27\r",
+ "8 23 28\r",
+ "8 23 29\r",
+ "8 23 30\r",
+ "8 23 31\r",
+ "8 23 32\r",
+ "8 23 33\r",
+ "8 23 34\r",
+ "8 23 35\r",
+ "8 23 36\r",
+ "8 23 37\r",
+ "8 23 38\r",
+ "8 23 39\r",
+ "8 23 40\r",
+ "8 23 41\r",
+ "8 23 42\r",
+ "8 23 43\r",
+ "8 23 44\r",
+ "8 23 45\r",
+ "8 23 46\r",
+ "8 23 47\r",
+ "8 23 48\r",
+ "8 23 49\r",
+ "8 23 50\r",
+ "8 23 51\r",
+ "8 23 52\r",
+ "8 23 53\r",
+ "8 23 54\r",
+ "8 23 55\r",
+ "8 23 56\r",
+ "8 23 57\r",
+ "8 23 58\r",
+ "8 24 1\r",
+ "8 24 2\r",
+ "8 24 3\r",
+ "8 24 4\r",
+ "8 24 5\r",
+ "8 24 6\r",
+ "8 24 7\r",
+ "8 24 8\r",
+ "8 24 9\r",
+ "8 24 10\r",
+ "8 24 11\r",
+ "8 24 12\r",
+ "8 24 13\r",
+ "8 24 14\r",
+ "8 24 15\r",
+ "8 24 16\r",
+ "8 24 17\r",
+ "8 24 18\r",
+ "8 24 19\r",
+ "8 24 20\r",
+ "8 24 21\r",
+ "8 24 22\r",
+ "8 24 23\r",
+ "8 24 24\r",
+ "8 24 25\r",
+ "8 24 26\r",
+ "8 24 27\r",
+ "8 24 28\r",
+ "8 24 29\r",
+ "8 24 30\r",
+ "8 24 31\r",
+ "8 24 32\r",
+ "8 24 33\r",
+ "8 24 34\r",
+ "8 24 35\r",
+ "8 24 36\r",
+ "8 24 37\r",
+ "8 24 38\r",
+ "8 24 39\r",
+ "8 24 40\r",
+ "8 24 41\r",
+ "8 24 42\r",
+ "8 24 43\r",
+ "8 24 44\r",
+ "8 24 45\r",
+ "8 24 46\r",
+ "8 24 47\r",
+ "8 24 48\r",
+ "8 24 49\r",
+ "8 24 50\r",
+ "8 24 51\r",
+ "8 24 52\r",
+ "8 24 53\r",
+ "8 24 54\r",
+ "8 24 55\r",
+ "8 24 56\r",
+ "8 24 57\r",
+ "8 24 58\r",
+ "8 25 1\r",
+ "8 25 2\r",
+ "8 25 3\r",
+ "8 25 4\r",
+ "8 25 5\r",
+ "8 25 6\r",
+ "8 25 7\r",
+ "8 25 8\r",
+ "8 25 9\r",
+ "8 25 10\r",
+ "8 25 11\r",
+ "8 25 12\r",
+ "8 25 13\r",
+ "8 25 14\r",
+ "8 25 15\r",
+ "8 25 16\r",
+ "8 25 17\r",
+ "8 25 18\r",
+ "8 25 19\r",
+ "8 25 20\r",
+ "8 25 21\r",
+ "8 25 22\r",
+ "8 25 23\r",
+ "8 25 24\r",
+ "8 25 25\r",
+ "8 25 26\r",
+ "8 25 27\r",
+ "8 25 28\r",
+ "8 25 29\r",
+ "8 25 30\r",
+ "8 25 31\r",
+ "8 25 32\r",
+ "8 25 33\r",
+ "8 25 34\r",
+ "8 25 35\r",
+ "8 25 36\r",
+ "8 25 37\r",
+ "8 25 38\r",
+ "8 25 39\r",
+ "8 25 40\r",
+ "8 25 41\r",
+ "8 25 42\r",
+ "8 25 43\r",
+ "8 25 44\r",
+ "8 25 45\r",
+ "8 25 46\r",
+ "8 25 47\r",
+ "8 25 48\r",
+ "8 25 49\r",
+ "8 25 50\r",
+ "8 25 51\r",
+ "8 25 52\r",
+ "8 25 53\r",
+ "8 25 54\r",
+ "8 25 55\r",
+ "8 25 56\r",
+ "8 25 57\r",
+ "8 25 58\r",
+ "8 26 1\r",
+ "8 26 2\r",
+ "8 26 3\r",
+ "8 26 4\r",
+ "8 26 5\r",
+ "8 26 6\r",
+ "8 26 7\r",
+ "8 26 8\r",
+ "8 26 9\r",
+ "8 26 10\r",
+ "8 26 11\r",
+ "8 26 12\r",
+ "8 26 13\r",
+ "8 26 14\r",
+ "8 26 15\r",
+ "8 26 16\r",
+ "8 26 17\r",
+ "8 26 18\r",
+ "8 26 19\r",
+ "8 26 20\r",
+ "8 26 21\r",
+ "8 26 22\r",
+ "8 26 23\r",
+ "8 26 24\r",
+ "8 26 25\r",
+ "8 26 26\r",
+ "8 26 27\r",
+ "8 26 28\r",
+ "8 26 29\r",
+ "8 26 30\r",
+ "8 26 31\r",
+ "8 26 32\r",
+ "8 26 33\r",
+ "8 26 34\r",
+ "8 26 35\r",
+ "8 26 36\r",
+ "8 26 37\r",
+ "8 26 38\r",
+ "8 26 39\r",
+ "8 26 40\r",
+ "8 26 41\r",
+ "8 26 42\r",
+ "8 26 43\r",
+ "8 26 44\r",
+ "8 26 45\r",
+ "8 26 46\r",
+ "8 26 47\r",
+ "8 26 48\r",
+ "8 26 49\r",
+ "8 26 50\r",
+ "8 26 51\r",
+ "8 26 52\r",
+ "8 26 53\r",
+ "8 26 54\r",
+ "8 26 55\r",
+ "8 26 56\r",
+ "8 26 57\r",
+ "8 26 58\r",
+ "8 27 1\r",
+ "8 27 2\r",
+ "8 27 3\r",
+ "8 27 4\r",
+ "8 27 5\r",
+ "8 27 6\r",
+ "8 27 7\r",
+ "8 27 8\r",
+ "8 27 9\r",
+ "8 27 10\r",
+ "8 27 11\r",
+ "8 27 12\r",
+ "8 27 13\r",
+ "8 27 14\r",
+ "8 27 15\r",
+ "8 27 16\r",
+ "8 27 17\r",
+ "8 27 18\r",
+ "8 27 19\r",
+ "8 27 20\r",
+ "8 27 21\r",
+ "8 27 22\r",
+ "8 27 23\r",
+ "8 27 24\r",
+ "8 27 25\r",
+ "8 27 26\r",
+ "8 27 27\r",
+ "8 27 28\r",
+ "8 27 29\r",
+ "8 27 30\r",
+ "8 27 31\r",
+ "8 27 32\r",
+ "8 27 33\r",
+ "8 27 34\r",
+ "8 27 35\r",
+ "8 27 36\r",
+ "8 27 37\r",
+ "8 27 38\r",
+ "8 27 39\r",
+ "8 27 40\r",
+ "8 27 41\r",
+ "8 27 42\r",
+ "8 27 43\r",
+ "8 27 44\r",
+ "8 27 45\r",
+ "8 27 46\r",
+ "8 27 47\r",
+ "8 27 48\r",
+ "8 27 49\r",
+ "8 27 50\r",
+ "8 27 51\r",
+ "8 27 52\r",
+ "8 27 53\r",
+ "8 27 54\r",
+ "8 27 55\r",
+ "8 27 56\r",
+ "8 27 57\r",
+ "8 27 58\r",
+ "8 28 1\r",
+ "8 28 2\r",
+ "8 28 3\r",
+ "8 28 4\r",
+ "8 28 5\r",
+ "8 28 6\r",
+ "8 28 7\r",
+ "8 28 8\r",
+ "8 28 9\r",
+ "8 28 10\r",
+ "8 28 11\r",
+ "8 28 12\r",
+ "8 28 13\r",
+ "8 28 14\r",
+ "8 28 15\r",
+ "8 28 16\r",
+ "8 28 17\r",
+ "8 28 18\r",
+ "8 28 19\r",
+ "8 28 20\r",
+ "8 28 21\r",
+ "8 28 22\r",
+ "8 28 23\r",
+ "8 28 24\r",
+ "8 28 25\r",
+ "8 28 26\r",
+ "8 28 27\r",
+ "8 28 28\r",
+ "8 28 29\r",
+ "8 28 30\r",
+ "8 28 31\r",
+ "8 28 32\r",
+ "8 28 33\r",
+ "8 28 34\r",
+ "8 28 35\r",
+ "8 28 36\r",
+ "8 28 37\r",
+ "8 28 38\r",
+ "8 28 39\r",
+ "8 28 40\r",
+ "8 28 41\r",
+ "8 28 42\r",
+ "8 28 43\r",
+ "8 28 44\r",
+ "8 28 45\r",
+ "8 28 46\r",
+ "8 28 47\r",
+ "8 28 48\r",
+ "8 28 49\r",
+ "8 28 50\r",
+ "8 28 51\r",
+ "8 28 52\r",
+ "8 28 53\r",
+ "8 28 54\r",
+ "8 28 55\r",
+ "8 28 56\r",
+ "8 28 57\r",
+ "8 28 58\r",
+ "8 29 1\r",
+ "8 29 2\r",
+ "8 29 3\r",
+ "8 29 4\r",
+ "8 29 5\r",
+ "8 29 6\r",
+ "8 29 7\r",
+ "8 29 8\r",
+ "8 29 9\r",
+ "8 29 10\r",
+ "8 29 11\r",
+ "8 29 12\r",
+ "8 29 13\r",
+ "8 29 14\r",
+ "8 29 15\r",
+ "8 29 16\r",
+ "8 29 17\r",
+ "8 29 18\r",
+ "8 29 19\r",
+ "8 29 20\r",
+ "8 29 21\r",
+ "8 29 22\r",
+ "8 29 23\r",
+ "8 29 24\r",
+ "8 29 25\r",
+ "8 29 26\r",
+ "8 29 27\r",
+ "8 29 28\r",
+ "8 29 29\r",
+ "8 29 30\r",
+ "8 29 31\r",
+ "8 29 32\r",
+ "8 29 33\r",
+ "8 29 34\r",
+ "8 29 35\r",
+ "8 29 36\r",
+ "8 29 37\r",
+ "8 29 38\r",
+ "8 29 39\r",
+ "8 29 40\r",
+ "8 29 41\r",
+ "8 29 42\r",
+ "8 29 43\r",
+ "8 29 44\r",
+ "8 29 45\r",
+ "8 29 46\r",
+ "8 29 47\r",
+ "8 29 48\r",
+ "8 29 49\r",
+ "8 29 50\r",
+ "8 29 51\r",
+ "8 29 52\r",
+ "8 29 53\r",
+ "8 29 54\r",
+ "8 29 55\r",
+ "8 29 56\r",
+ "8 29 57\r",
+ "8 29 58\r",
+ "8 30 1\r",
+ "8 30 2\r",
+ "8 30 3\r",
+ "8 30 4\r",
+ "8 30 5\r",
+ "8 30 6\r",
+ "8 30 7\r",
+ "8 30 8\r",
+ "8 30 9\r",
+ "8 30 10\r",
+ "8 30 11\r",
+ "8 30 12\r",
+ "8 30 13\r",
+ "8 30 14\r",
+ "8 30 15\r",
+ "8 30 16\r",
+ "8 30 17\r",
+ "8 30 18\r",
+ "8 30 19\r",
+ "8 30 20\r",
+ "8 30 21\r",
+ "8 30 22\r",
+ "8 30 23\r",
+ "8 30 24\r",
+ "8 30 25\r",
+ "8 30 26\r",
+ "8 30 27\r",
+ "8 30 28\r",
+ "8 30 29\r",
+ "8 30 30\r",
+ "8 30 31\r",
+ "8 30 32\r",
+ "8 30 33\r",
+ "8 30 34\r",
+ "8 30 35\r",
+ "8 30 36\r",
+ "8 30 37\r",
+ "8 30 38\r",
+ "8 30 39\r",
+ "8 30 40\r",
+ "8 30 41\r",
+ "8 30 42\r",
+ "8 30 43\r",
+ "8 30 44\r",
+ "8 30 45\r",
+ "8 30 46\r",
+ "8 30 47\r",
+ "8 30 48\r",
+ "8 30 49\r",
+ "8 30 50\r",
+ "8 30 51\r",
+ "8 30 52\r",
+ "8 30 53\r",
+ "8 30 54\r",
+ "8 30 55\r",
+ "8 30 56\r",
+ "8 30 57\r",
+ "8 30 58\r",
+ "8 31 1\r",
+ "8 31 2\r",
+ "8 31 3\r",
+ "8 31 4\r",
+ "8 31 5\r",
+ "8 31 6\r",
+ "8 31 7\r",
+ "8 31 8\r",
+ "8 31 9\r",
+ "8 31 10\r",
+ "8 31 11\r",
+ "8 31 12\r",
+ "8 31 13\r",
+ "8 31 14\r",
+ "8 31 15\r",
+ "8 31 16\r",
+ "8 31 17\r",
+ "8 31 18\r",
+ "8 31 19\r",
+ "8 31 20\r",
+ "8 31 21\r",
+ "8 31 22\r",
+ "8 31 23\r",
+ "8 31 24\r",
+ "8 31 25\r",
+ "8 31 26\r",
+ "8 31 27\r",
+ "8 31 28\r",
+ "8 31 29\r",
+ "8 31 30\r",
+ "8 31 31\r",
+ "8 31 32\r",
+ "8 31 33\r",
+ "8 31 34\r",
+ "8 31 35\r",
+ "8 31 36\r",
+ "8 31 37\r",
+ "8 31 38\r",
+ "8 31 39\r",
+ "8 31 40\r",
+ "8 31 41\r",
+ "8 31 42\r",
+ "8 31 43\r",
+ "8 31 44\r",
+ "8 31 45\r",
+ "8 31 46\r",
+ "8 31 47\r",
+ "8 31 48\r",
+ "8 31 49\r",
+ "8 31 50\r",
+ "8 31 51\r",
+ "8 31 52\r",
+ "8 31 53\r",
+ "8 31 54\r",
+ "8 31 55\r",
+ "8 31 56\r",
+ "8 31 57\r",
+ "8 31 58\r",
+ "8 32 1\r",
+ "8 32 2\r",
+ "8 32 3\r",
+ "8 32 4\r",
+ "8 32 5\r",
+ "8 32 6\r",
+ "8 32 7\r",
+ "8 32 8\r",
+ "8 32 9\r",
+ "8 32 10\r",
+ "8 32 11\r",
+ "8 32 12\r",
+ "8 32 13\r",
+ "8 32 14\r",
+ "8 32 15\r",
+ "8 32 16\r",
+ "8 32 17\r",
+ "8 32 18\r",
+ "8 32 19\r",
+ "8 32 20\r",
+ "8 32 21\r",
+ "8 32 22\r",
+ "8 32 23\r",
+ "8 32 24\r",
+ "8 32 25\r",
+ "8 32 26\r",
+ "8 32 27\r",
+ "8 32 28\r",
+ "8 32 29\r",
+ "8 32 30\r",
+ "8 32 31\r",
+ "8 32 32\r",
+ "8 32 33\r",
+ "8 32 34\r",
+ "8 32 35\r",
+ "8 32 36\r",
+ "8 32 37\r",
+ "8 32 38\r",
+ "8 32 39\r",
+ "8 32 40\r",
+ "8 32 41\r",
+ "8 32 42\r",
+ "8 32 43\r",
+ "8 32 44\r",
+ "8 32 45\r",
+ "8 32 46\r",
+ "8 32 47\r",
+ "8 32 48\r",
+ "8 32 49\r",
+ "8 32 50\r",
+ "8 32 51\r",
+ "8 32 52\r",
+ "8 32 53\r",
+ "8 32 54\r",
+ "8 32 55\r",
+ "8 32 56\r",
+ "8 32 57\r",
+ "8 32 58\r",
+ "8 33 1\r",
+ "8 33 2\r",
+ "8 33 3\r",
+ "8 33 4\r",
+ "8 33 5\r",
+ "8 33 6\r",
+ "8 33 7\r",
+ "8 33 8\r",
+ "8 33 9\r",
+ "8 33 10\r",
+ "8 33 11\r",
+ "8 33 12\r",
+ "8 33 13\r",
+ "8 33 14\r",
+ "8 33 15\r",
+ "8 33 16\r",
+ "8 33 17\r",
+ "8 33 18\r",
+ "8 33 19\r",
+ "8 33 20\r",
+ "8 33 21\r",
+ "8 33 22\r",
+ "8 33 23\r",
+ "8 33 24\r",
+ "8 33 25\r",
+ "8 33 26\r",
+ "8 33 27\r",
+ "8 33 28\r",
+ "8 33 29\r",
+ "8 33 30\r",
+ "8 33 31\r",
+ "8 33 32\r",
+ "8 33 33\r",
+ "8 33 34\r",
+ "8 33 35\r",
+ "8 33 36\r",
+ "8 33 37\r",
+ "8 33 38\r",
+ "8 33 39\r",
+ "8 33 40\r",
+ "8 33 41\r",
+ "8 33 42\r",
+ "8 33 43\r",
+ "8 33 44\r",
+ "8 33 45\r",
+ "8 33 46\r",
+ "8 33 47\r",
+ "8 33 48\r",
+ "8 33 49\r",
+ "8 33 50\r",
+ "8 33 51\r",
+ "8 33 52\r",
+ "8 33 53\r",
+ "8 33 54\r",
+ "8 33 55\r",
+ "8 33 56\r",
+ "8 33 57\r",
+ "8 33 58\r",
+ "8 34 1\r",
+ "8 34 2\r",
+ "8 34 3\r",
+ "8 34 4\r",
+ "8 34 5\r",
+ "8 34 6\r",
+ "8 34 7\r",
+ "8 34 8\r",
+ "8 34 9\r",
+ "8 34 10\r",
+ "8 34 11\r",
+ "8 34 12\r",
+ "8 34 13\r",
+ "8 34 14\r",
+ "8 34 15\r",
+ "8 34 16\r",
+ "8 34 17\r",
+ "8 34 18\r",
+ "8 34 19\r",
+ "8 34 20\r",
+ "8 34 21\r",
+ "8 34 22\r",
+ "8 34 23\r",
+ "8 34 24\r",
+ "8 34 25\r",
+ "8 34 26\r",
+ "8 34 27\r",
+ "8 34 28\r",
+ "8 34 29\r",
+ "8 34 30\r",
+ "8 34 31\r",
+ "8 34 32\r",
+ "8 34 33\r",
+ "8 34 34\r",
+ "8 34 35\r",
+ "8 34 36\r",
+ "8 34 37\r",
+ "8 34 38\r",
+ "8 34 39\r",
+ "8 34 40\r",
+ "8 34 41\r",
+ "8 34 42\r",
+ "8 34 43\r",
+ "8 34 44\r",
+ "8 34 45\r",
+ "8 34 46\r",
+ "8 34 47\r",
+ "8 34 48\r",
+ "8 34 49\r",
+ "8 34 50\r",
+ "8 34 51\r",
+ "8 34 52\r",
+ "8 34 53\r",
+ "8 34 54\r",
+ "8 34 55\r",
+ "8 34 56\r",
+ "8 34 57\r",
+ "8 34 58\r",
+ "8 35 1\r",
+ "8 35 2\r",
+ "8 35 3\r",
+ "8 35 4\r",
+ "8 35 5\r",
+ "8 35 6\r",
+ "8 35 7\r",
+ "8 35 8\r",
+ "8 35 9\r",
+ "8 35 10\r",
+ "8 35 11\r",
+ "8 35 12\r",
+ "8 35 13\r",
+ "8 35 14\r",
+ "8 35 15\r",
+ "8 35 16\r",
+ "8 35 17\r",
+ "8 35 18\r",
+ "8 35 19\r",
+ "8 35 20\r",
+ "8 35 21\r",
+ "8 35 22\r",
+ "8 35 23\r",
+ "8 35 24\r",
+ "8 35 25\r",
+ "8 35 26\r",
+ "8 35 27\r",
+ "8 35 28\r",
+ "8 35 29\r",
+ "8 35 30\r",
+ "8 35 31\r",
+ "8 35 32\r",
+ "8 35 33\r",
+ "8 35 34\r",
+ "8 35 35\r",
+ "8 35 36\r",
+ "8 35 37\r",
+ "8 35 38\r",
+ "8 35 39\r",
+ "8 35 40\r",
+ "8 35 41\r",
+ "8 35 42\r",
+ "8 35 43\r",
+ "8 35 44\r",
+ "8 35 45\r",
+ "8 35 46\r",
+ "8 35 47\r",
+ "8 35 48\r",
+ "8 35 49\r",
+ "8 35 50\r",
+ "8 35 51\r",
+ "8 35 52\r",
+ "8 35 53\r",
+ "8 35 54\r",
+ "8 35 55\r",
+ "8 35 56\r",
+ "8 35 57\r",
+ "8 35 58\r",
+ "8 36 1\r",
+ "8 36 2\r",
+ "8 36 3\r",
+ "8 36 4\r",
+ "8 36 5\r",
+ "8 36 6\r",
+ "8 36 7\r",
+ "8 36 8\r",
+ "8 36 9\r",
+ "8 36 10\r",
+ "8 36 11\r",
+ "8 36 12\r",
+ "8 36 13\r",
+ "8 36 14\r",
+ "8 36 15\r",
+ "8 36 16\r",
+ "8 36 17\r",
+ "8 36 18\r",
+ "8 36 19\r",
+ "8 36 20\r",
+ "8 36 21\r",
+ "8 36 22\r",
+ "8 36 23\r",
+ "8 36 24\r",
+ "8 36 25\r",
+ "8 36 26\r",
+ "8 36 27\r",
+ "8 36 28\r",
+ "8 36 29\r",
+ "8 36 30\r",
+ "8 36 31\r",
+ "8 36 32\r",
+ "8 36 33\r",
+ "8 36 34\r",
+ "8 36 35\r",
+ "8 36 36\r",
+ "8 36 37\r",
+ "8 36 38\r",
+ "8 36 39\r",
+ "8 36 40\r",
+ "8 36 41\r",
+ "8 36 42\r",
+ "8 36 43\r",
+ "8 36 44\r",
+ "8 36 45\r",
+ "8 36 46\r",
+ "8 36 47\r",
+ "8 36 48\r",
+ "8 36 49\r",
+ "8 36 50\r",
+ "8 36 51\r",
+ "8 36 52\r",
+ "8 36 53\r",
+ "8 36 54\r",
+ "8 36 55\r",
+ "8 36 56\r",
+ "8 36 57\r",
+ "8 36 58\r",
+ "8 37 1\r",
+ "8 37 2\r",
+ "8 37 3\r",
+ "8 37 4\r",
+ "8 37 5\r",
+ "8 37 6\r",
+ "8 37 7\r",
+ "8 37 8\r",
+ "8 37 9\r",
+ "8 37 10\r",
+ "8 37 11\r",
+ "8 37 12\r",
+ "8 37 13\r",
+ "8 37 14\r",
+ "8 37 15\r",
+ "8 37 16\r",
+ "8 37 17\r",
+ "8 37 18\r",
+ "8 37 19\r",
+ "8 37 20\r",
+ "8 37 21\r",
+ "8 37 22\r",
+ "8 37 23\r",
+ "8 37 24\r",
+ "8 37 25\r",
+ "8 37 26\r",
+ "8 37 27\r",
+ "8 37 28\r",
+ "8 37 29\r",
+ "8 37 30\r",
+ "8 37 31\r",
+ "8 37 32\r",
+ "8 37 33\r",
+ "8 37 34\r",
+ "8 37 35\r",
+ "8 37 36\r",
+ "8 37 37\r",
+ "8 37 38\r",
+ "8 37 39\r",
+ "8 37 40\r",
+ "8 37 41\r",
+ "8 37 42\r",
+ "8 37 43\r",
+ "8 37 44\r",
+ "8 37 45\r",
+ "8 37 46\r",
+ "8 37 47\r",
+ "8 37 48\r",
+ "8 37 49\r",
+ "8 37 50\r",
+ "8 37 51\r",
+ "8 37 52\r",
+ "8 37 53\r",
+ "8 37 54\r",
+ "8 37 55\r",
+ "8 37 56\r",
+ "8 37 57\r",
+ "8 37 58\r",
+ "8 38 1\r",
+ "8 38 2\r",
+ "8 38 3\r",
+ "8 38 4\r",
+ "8 38 5\r",
+ "8 38 6\r",
+ "8 38 7\r",
+ "8 38 8\r",
+ "8 38 9\r",
+ "8 38 10\r",
+ "8 38 11\r",
+ "8 38 12\r",
+ "8 38 13\r",
+ "8 38 14\r",
+ "8 38 15\r",
+ "8 38 16\r",
+ "8 38 17\r",
+ "8 38 18\r",
+ "8 38 19\r",
+ "8 38 20\r",
+ "8 38 21\r",
+ "8 38 22\r",
+ "8 38 23\r",
+ "8 38 24\r",
+ "8 38 25\r",
+ "8 38 26\r",
+ "8 38 27\r",
+ "8 38 28\r",
+ "8 38 29\r",
+ "8 38 30\r",
+ "8 38 31\r",
+ "8 38 32\r",
+ "8 38 33\r",
+ "8 38 34\r",
+ "8 38 35\r",
+ "8 38 36\r",
+ "8 38 37\r",
+ "8 38 38\r",
+ "8 38 39\r",
+ "8 38 40\r",
+ "8 38 41\r",
+ "8 38 42\r",
+ "8 38 43\r",
+ "8 38 44\r",
+ "8 38 45\r",
+ "8 38 46\r",
+ "8 38 47\r",
+ "8 38 48\r",
+ "8 38 49\r",
+ "8 38 50\r",
+ "8 38 51\r",
+ "8 38 52\r",
+ "8 38 53\r",
+ "8 38 54\r",
+ "8 38 55\r",
+ "8 38 56\r",
+ "8 38 57\r",
+ "8 38 58\r",
+ "8 39 1\r",
+ "8 39 2\r",
+ "8 39 3\r",
+ "8 39 4\r",
+ "8 39 5\r",
+ "8 39 6\r",
+ "8 39 7\r",
+ "8 39 8\r",
+ "8 39 9\r",
+ "8 39 10\r",
+ "8 39 11\r",
+ "8 39 12\r",
+ "8 39 13\r",
+ "8 39 14\r",
+ "8 39 15\r",
+ "8 39 16\r",
+ "8 39 17\r",
+ "8 39 18\r",
+ "8 39 19\r",
+ "8 39 20\r",
+ "8 39 21\r",
+ "8 39 22\r",
+ "8 39 23\r",
+ "8 39 24\r",
+ "8 39 25\r",
+ "8 39 26\r",
+ "8 39 27\r",
+ "8 39 28\r",
+ "8 39 29\r",
+ "8 39 30\r",
+ "8 39 31\r",
+ "8 39 32\r",
+ "8 39 33\r",
+ "8 39 34\r",
+ "8 39 35\r",
+ "8 39 36\r",
+ "8 39 37\r",
+ "8 39 38\r",
+ "8 39 39\r",
+ "8 39 40\r",
+ "8 39 41\r",
+ "8 39 42\r",
+ "8 39 43\r",
+ "8 39 44\r",
+ "8 39 45\r",
+ "8 39 46\r",
+ "8 39 47\r",
+ "8 39 48\r",
+ "8 39 49\r",
+ "8 39 50\r",
+ "8 39 51\r",
+ "8 39 52\r",
+ "8 39 53\r",
+ "8 39 54\r",
+ "8 39 55\r",
+ "8 39 56\r",
+ "8 39 57\r",
+ "8 39 58\r",
+ "8 40 1\r",
+ "8 40 2\r",
+ "8 40 3\r",
+ "8 40 4\r",
+ "8 40 5\r",
+ "8 40 6\r",
+ "8 40 7\r",
+ "8 40 8\r",
+ "8 40 9\r",
+ "8 40 10\r",
+ "8 40 11\r",
+ "8 40 12\r",
+ "8 40 13\r",
+ "8 40 14\r",
+ "8 40 15\r",
+ "8 40 16\r",
+ "8 40 17\r",
+ "8 40 18\r",
+ "8 40 19\r",
+ "8 40 20\r",
+ "8 40 21\r",
+ "8 40 22\r",
+ "8 40 23\r",
+ "8 40 24\r",
+ "8 40 25\r",
+ "8 40 26\r",
+ "8 40 27\r",
+ "8 40 28\r",
+ "8 40 29\r",
+ "8 40 30\r",
+ "8 40 31\r",
+ "8 40 32\r",
+ "8 40 33\r",
+ "8 40 34\r",
+ "8 40 35\r",
+ "8 40 36\r",
+ "8 40 37\r",
+ "8 40 38\r",
+ "8 40 39\r",
+ "8 40 40\r",
+ "8 40 41\r",
+ "8 40 42\r",
+ "8 40 43\r",
+ "8 40 44\r",
+ "8 40 45\r",
+ "8 40 46\r",
+ "8 40 47\r",
+ "8 40 48\r",
+ "8 40 49\r",
+ "8 40 50\r",
+ "8 40 51\r",
+ "8 40 52\r",
+ "8 40 53\r",
+ "8 40 54\r",
+ "8 40 55\r",
+ "8 40 56\r",
+ "8 40 57\r",
+ "8 40 58\r",
+ "8 41 1\r",
+ "8 41 2\r",
+ "8 41 3\r",
+ "8 41 4\r",
+ "8 41 5\r",
+ "8 41 6\r",
+ "8 41 7\r",
+ "8 41 8\r",
+ "8 41 9\r",
+ "8 41 10\r",
+ "8 41 11\r",
+ "8 41 12\r",
+ "8 41 13\r",
+ "8 41 14\r",
+ "8 41 15\r",
+ "8 41 16\r",
+ "8 41 17\r",
+ "8 41 18\r",
+ "8 41 19\r",
+ "8 41 20\r",
+ "8 41 21\r",
+ "8 41 22\r",
+ "8 41 23\r",
+ "8 41 24\r",
+ "8 41 25\r",
+ "8 41 26\r",
+ "8 41 27\r",
+ "8 41 28\r",
+ "8 41 29\r",
+ "8 41 30\r",
+ "8 41 31\r",
+ "8 41 32\r",
+ "8 41 33\r",
+ "8 41 34\r",
+ "8 41 35\r",
+ "8 41 36\r",
+ "8 41 37\r",
+ "8 41 38\r",
+ "8 41 39\r",
+ "8 41 40\r",
+ "8 41 41\r",
+ "8 41 42\r",
+ "8 41 43\r",
+ "8 41 44\r",
+ "8 41 45\r",
+ "8 41 46\r",
+ "8 41 47\r",
+ "8 41 48\r",
+ "8 41 49\r",
+ "8 41 50\r",
+ "8 41 51\r",
+ "8 41 52\r",
+ "8 41 53\r",
+ "8 41 54\r",
+ "8 41 55\r",
+ "8 41 56\r",
+ "8 41 57\r",
+ "8 41 58\r",
+ "8 42 1\r",
+ "8 42 2\r",
+ "8 42 3\r",
+ "8 42 4\r",
+ "8 42 5\r",
+ "8 42 6\r",
+ "8 42 7\r",
+ "8 42 8\r",
+ "8 42 9\r",
+ "8 42 10\r",
+ "8 42 11\r",
+ "8 42 12\r",
+ "8 42 13\r",
+ "8 42 14\r",
+ "8 42 15\r",
+ "8 42 16\r",
+ "8 42 17\r",
+ "8 42 18\r",
+ "8 42 19\r",
+ "8 42 20\r",
+ "8 42 21\r",
+ "8 42 22\r",
+ "8 42 23\r",
+ "8 42 24\r",
+ "8 42 25\r",
+ "8 42 26\r",
+ "8 42 27\r",
+ "8 42 28\r",
+ "8 42 29\r",
+ "8 42 30\r",
+ "8 42 31\r",
+ "8 42 32\r",
+ "8 42 33\r",
+ "8 42 34\r",
+ "8 42 35\r",
+ "8 42 36\r",
+ "8 42 37\r",
+ "8 42 38\r",
+ "8 42 39\r",
+ "8 42 40\r",
+ "8 42 41\r",
+ "8 42 42\r",
+ "8 42 43\r",
+ "8 42 44\r",
+ "8 42 45\r",
+ "8 42 46\r",
+ "8 42 47\r",
+ "8 42 48\r",
+ "8 42 49\r",
+ "8 42 50\r",
+ "8 42 51\r",
+ "8 42 52\r",
+ "8 42 53\r",
+ "8 42 54\r",
+ "8 42 55\r",
+ "8 42 56\r",
+ "8 42 57\r",
+ "8 42 58\r",
+ "8 43 1\r",
+ "8 43 2\r",
+ "8 43 3\r",
+ "8 43 4\r",
+ "8 43 5\r",
+ "8 43 6\r",
+ "8 43 7\r",
+ "8 43 8\r",
+ "8 43 9\r",
+ "8 43 10\r",
+ "8 43 11\r",
+ "8 43 12\r",
+ "8 43 13\r",
+ "8 43 14\r",
+ "8 43 15\r",
+ "8 43 16\r",
+ "8 43 17\r",
+ "8 43 18\r",
+ "8 43 19\r",
+ "8 43 20\r",
+ "8 43 21\r",
+ "8 43 22\r",
+ "8 43 23\r",
+ "8 43 24\r",
+ "8 43 25\r",
+ "8 43 26\r",
+ "8 43 27\r",
+ "8 43 28\r",
+ "8 43 29\r",
+ "8 43 30\r",
+ "8 43 31\r",
+ "8 43 32\r",
+ "8 43 33\r",
+ "8 43 34\r",
+ "8 43 35\r",
+ "8 43 36\r",
+ "8 43 37\r",
+ "8 43 38\r",
+ "8 43 39\r",
+ "8 43 40\r",
+ "8 43 41\r",
+ "8 43 42\r",
+ "8 43 43\r",
+ "8 43 44\r",
+ "8 43 45\r",
+ "8 43 46\r",
+ "8 43 47\r",
+ "8 43 48\r",
+ "8 43 49\r",
+ "8 43 50\r",
+ "8 43 51\r",
+ "8 43 52\r",
+ "8 43 53\r",
+ "8 43 54\r",
+ "8 43 55\r",
+ "8 43 56\r",
+ "8 43 57\r",
+ "8 43 58\r",
+ "8 44 1\r",
+ "8 44 2\r",
+ "8 44 3\r",
+ "8 44 4\r",
+ "8 44 5\r",
+ "8 44 6\r",
+ "8 44 7\r",
+ "8 44 8\r",
+ "8 44 9\r",
+ "8 44 10\r",
+ "8 44 11\r",
+ "8 44 12\r",
+ "8 44 13\r",
+ "8 44 14\r",
+ "8 44 15\r",
+ "8 44 16\r",
+ "8 44 17\r",
+ "8 44 18\r",
+ "8 44 19\r",
+ "8 44 20\r",
+ "8 44 21\r",
+ "8 44 22\r",
+ "8 44 23\r",
+ "8 44 24\r",
+ "8 44 25\r",
+ "8 44 26\r",
+ "8 44 27\r",
+ "8 44 28\r",
+ "8 44 29\r",
+ "8 44 30\r",
+ "8 44 31\r",
+ "8 44 32\r",
+ "8 44 33\r",
+ "8 44 34\r",
+ "8 44 35\r",
+ "8 44 36\r",
+ "8 44 37\r",
+ "8 44 38\r",
+ "8 44 39\r",
+ "8 44 40\r",
+ "8 44 41\r",
+ "8 44 42\r",
+ "8 44 43\r",
+ "8 44 44\r",
+ "8 44 45\r",
+ "8 44 46\r",
+ "8 44 47\r",
+ "8 44 48\r",
+ "8 44 49\r",
+ "8 44 50\r",
+ "8 44 51\r",
+ "8 44 52\r",
+ "8 44 53\r",
+ "8 44 54\r",
+ "8 44 55\r",
+ "8 44 56\r",
+ "8 44 57\r",
+ "8 44 58\r",
+ "8 45 1\r",
+ "8 45 2\r",
+ "8 45 3\r",
+ "8 45 4\r",
+ "8 45 5\r",
+ "8 45 6\r",
+ "8 45 7\r",
+ "8 45 8\r",
+ "8 45 9"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "8 45 10\r",
+ "8 45 11\r",
+ "8 45 12\r",
+ "8 45 13\r",
+ "8 45 14\r",
+ "8 45 15\r",
+ "8 45 16\r",
+ "8 45 17\r",
+ "8 45 18\r",
+ "8 45 19\r",
+ "8 45 20\r",
+ "8 45 21\r",
+ "8 45 22\r",
+ "8 45 23\r",
+ "8 45 24\r",
+ "8 45 25\r",
+ "8 45 26\r",
+ "8 45 27\r",
+ "8 45 28\r",
+ "8 45 29\r",
+ "8 45 30\r",
+ "8 45 31\r",
+ "8 45 32\r",
+ "8 45 33\r",
+ "8 45 34\r",
+ "8 45 35\r",
+ "8 45 36\r",
+ "8 45 37\r",
+ "8 45 38\r",
+ "8 45 39\r",
+ "8 45 40\r",
+ "8 45 41\r",
+ "8 45 42\r",
+ "8 45 43\r",
+ "8 45 44\r",
+ "8 45 45\r",
+ "8 45 46\r",
+ "8 45 47\r",
+ "8 45 48\r",
+ "8 45 49\r",
+ "8 45 50\r",
+ "8 45 51\r",
+ "8 45 52\r",
+ "8 45 53\r",
+ "8 45 54\r",
+ "8 45 55\r",
+ "8 45 56\r",
+ "8 45 57\r",
+ "8 45 58\r",
+ "8 46 1\r",
+ "8 46 2\r",
+ "8 46 3\r",
+ "8 46 4\r",
+ "8 46 5\r",
+ "8 46 6\r",
+ "8 46 7\r",
+ "8 46 8\r",
+ "8 46 9\r",
+ "8 46 10\r",
+ "8 46 11\r",
+ "8 46 12\r",
+ "8 46 13\r",
+ "8 46 14\r",
+ "8 46 15\r",
+ "8 46 16\r",
+ "8 46 17\r",
+ "8 46 18\r",
+ "8 46 19\r",
+ "8 46 20\r",
+ "8 46 21\r",
+ "8 46 22\r",
+ "8 46 23\r",
+ "8 46 24\r",
+ "8 46 25\r",
+ "8 46 26\r",
+ "8 46 27\r",
+ "8 46 28\r",
+ "8 46 29\r",
+ "8 46 30\r",
+ "8 46 31\r",
+ "8 46 32\r",
+ "8 46 33\r",
+ "8 46 34\r",
+ "8 46 35\r",
+ "8 46 36\r",
+ "8 46 37\r",
+ "8 46 38\r",
+ "8 46 39\r",
+ "8 46 40\r",
+ "8 46 41\r",
+ "8 46 42\r",
+ "8 46 43\r",
+ "8 46 44\r",
+ "8 46 45\r",
+ "8 46 46\r",
+ "8 46 47\r",
+ "8 46 48\r",
+ "8 46 49\r",
+ "8 46 50\r",
+ "8 46 51\r",
+ "8 46 52\r",
+ "8 46 53\r",
+ "8 46 54\r",
+ "8 46 55\r",
+ "8 46 56\r",
+ "8 46 57\r",
+ "8 46 58\r",
+ "8 47 1\r",
+ "8 47 2\r",
+ "8 47 3\r",
+ "8 47 4\r",
+ "8 47 5\r",
+ "8 47 6\r",
+ "8 47 7\r",
+ "8 47 8\r",
+ "8 47 9\r",
+ "8 47 10\r",
+ "8 47 11\r",
+ "8 47 12\r",
+ "8 47 13\r",
+ "8 47 14\r",
+ "8 47 15\r",
+ "8 47 16\r",
+ "8 47 17\r",
+ "8 47 18\r",
+ "8 47 19\r",
+ "8 47 20\r",
+ "8 47 21\r",
+ "8 47 22\r",
+ "8 47 23\r",
+ "8 47 24\r",
+ "8 47 25\r",
+ "8 47 26\r",
+ "8 47 27\r",
+ "8 47 28\r",
+ "8 47 29\r",
+ "8 47 30\r",
+ "8 47 31\r",
+ "8 47 32\r",
+ "8 47 33\r",
+ "8 47 34\r",
+ "8 47 35\r",
+ "8 47 36\r",
+ "8 47 37\r",
+ "8 47 38\r",
+ "8 47 39\r",
+ "8 47 40\r",
+ "8 47 41\r",
+ "8 47 42\r",
+ "8 47 43\r",
+ "8 47 44\r",
+ "8 47 45\r",
+ "8 47 46\r",
+ "8 47 47\r",
+ "8 47 48\r",
+ "8 47 49\r",
+ "8 47 50\r",
+ "8 47 51\r",
+ "8 47 52\r",
+ "8 47 53\r",
+ "8 47 54\r",
+ "8 47 55\r",
+ "8 47 56\r",
+ "8 47 57\r",
+ "8 47 58\r",
+ "8 48 1\r",
+ "8 48 2\r",
+ "8 48 3\r",
+ "8 48 4\r",
+ "8 48 5\r",
+ "8 48 6\r",
+ "8 48 7\r",
+ "8 48 8\r",
+ "8 48 9\r",
+ "8 48 10\r",
+ "8 48 11\r",
+ "8 48 12\r",
+ "8 48 13\r",
+ "8 48 14\r",
+ "8 48 15\r",
+ "8 48 16\r",
+ "8 48 17\r",
+ "8 48 18\r",
+ "8 48 19\r",
+ "8 48 20\r",
+ "8 48 21\r",
+ "8 48 22\r",
+ "8 48 23\r",
+ "8 48 24\r",
+ "8 48 25\r",
+ "8 48 26\r",
+ "8 48 27\r",
+ "8 48 28\r",
+ "8 48 29\r",
+ "8 48 30\r",
+ "8 48 31\r",
+ "8 48 32\r",
+ "8 48 33\r",
+ "8 48 34\r",
+ "8 48 35\r",
+ "8 48 36\r",
+ "8 48 37\r",
+ "8 48 38\r",
+ "8 48 39\r",
+ "8 48 40\r",
+ "8 48 41\r",
+ "8 48 42\r",
+ "8 48 43\r",
+ "8 48 44\r",
+ "8 48 45\r",
+ "8 48 46\r",
+ "8 48 47\r",
+ "8 48 48\r",
+ "8 48 49\r",
+ "8 48 50\r",
+ "8 48 51\r",
+ "8 48 52\r",
+ "8 48 53\r",
+ "8 48 54\r",
+ "8 48 55\r",
+ "8 48 56\r",
+ "8 48 57\r",
+ "8 48 58\r",
+ "8 49 1\r",
+ "8 49 2\r",
+ "8 49 3\r",
+ "8 49 4\r",
+ "8 49 5\r",
+ "8 49 6\r",
+ "8 49 7\r",
+ "8 49 8\r",
+ "8 49 9\r",
+ "8 49 10\r",
+ "8 49 11\r",
+ "8 49 12\r",
+ "8 49 13\r",
+ "8 49 14\r",
+ "8 49 15\r",
+ "8 49 16\r",
+ "8 49 17\r",
+ "8 49 18\r",
+ "8 49 19\r",
+ "8 49 20\r",
+ "8 49 21\r",
+ "8 49 22\r",
+ "8 49 23\r",
+ "8 49 24\r",
+ "8 49 25\r",
+ "8 49 26\r",
+ "8 49 27\r",
+ "8 49 28\r",
+ "8 49 29\r",
+ "8 49 30\r",
+ "8 49 31\r",
+ "8 49 32\r",
+ "8 49 33\r",
+ "8 49 34\r",
+ "8 49 35\r",
+ "8 49 36\r",
+ "8 49 37\r",
+ "8 49 38\r",
+ "8 49 39\r",
+ "8 49 40\r",
+ "8 49 41\r",
+ "8 49 42\r",
+ "8 49 43\r",
+ "8 49 44\r",
+ "8 49 45\r",
+ "8 49 46\r",
+ "8 49 47\r",
+ "8 49 48\r",
+ "8 49 49\r",
+ "8 49 50\r",
+ "8 49 51\r",
+ "8 49 52\r",
+ "8 49 53\r",
+ "8 49 54\r",
+ "8 49 55\r",
+ "8 49 56\r",
+ "8 49 57\r",
+ "8 49 58\r",
+ "8 50 1\r",
+ "8 50 2\r",
+ "8 50 3\r",
+ "8 50 4\r",
+ "8 50 5\r",
+ "8 50 6\r",
+ "8 50 7\r",
+ "8 50 8\r",
+ "8 50 9\r",
+ "8 50 10\r",
+ "8 50 11\r",
+ "8 50 12\r",
+ "8 50 13\r",
+ "8 50 14\r",
+ "8 50 15\r",
+ "8 50 16\r",
+ "8 50 17\r",
+ "8 50 18\r",
+ "8 50 19\r",
+ "8 50 20\r",
+ "8 50 21\r",
+ "8 50 22\r",
+ "8 50 23\r",
+ "8 50 24\r",
+ "8 50 25\r",
+ "8 50 26\r",
+ "8 50 27\r",
+ "8 50 28\r",
+ "8 50 29\r",
+ "8 50 30\r",
+ "8 50 31\r",
+ "8 50 32\r",
+ "8 50 33\r",
+ "8 50 34\r",
+ "8 50 35\r",
+ "8 50 36\r",
+ "8 50 37\r",
+ "8 50 38\r",
+ "8 50 39\r",
+ "8 50 40\r",
+ "8 50 41\r",
+ "8 50 42\r",
+ "8 50 43\r",
+ "8 50 44\r",
+ "8 50 45\r",
+ "8 50 46\r",
+ "8 50 47\r",
+ "8 50 48\r",
+ "8 50 49\r",
+ "8 50 50\r",
+ "8 50 51\r",
+ "8 50 52\r",
+ "8 50 53\r",
+ "8 50 54\r",
+ "8 50 55\r",
+ "8 50 56\r",
+ "8 50 57\r",
+ "8 50 58\r",
+ "8 51 1\r",
+ "8 51 2\r",
+ "8 51 3\r",
+ "8 51 4\r",
+ "8 51 5\r",
+ "8 51 6\r",
+ "8 51 7\r",
+ "8 51 8\r",
+ "8 51 9\r",
+ "8 51 10\r",
+ "8 51 11\r",
+ "8 51 12\r",
+ "8 51 13\r",
+ "8 51 14\r",
+ "8 51 15\r",
+ "8 51 16\r",
+ "8 51 17\r",
+ "8 51 18\r",
+ "8 51 19\r",
+ "8 51 20\r",
+ "8 51 21\r",
+ "8 51 22\r",
+ "8 51 23\r",
+ "8 51 24\r",
+ "8 51 25\r",
+ "8 51 26\r",
+ "8 51 27\r",
+ "8 51 28\r",
+ "8 51 29\r",
+ "8 51 30\r",
+ "8 51 31\r",
+ "8 51 32\r",
+ "8 51 33\r",
+ "8 51 34\r",
+ "8 51 35\r",
+ "8 51 36\r",
+ "8 51 37\r",
+ "8 51 38\r",
+ "8 51 39\r",
+ "8 51 40\r",
+ "8 51 41\r",
+ "8 51 42\r",
+ "8 51 43\r",
+ "8 51 44\r",
+ "8 51 45\r",
+ "8 51 46\r",
+ "8 51 47\r",
+ "8 51 48\r",
+ "8 51 49\r",
+ "8 51 50\r",
+ "8 51 51\r",
+ "8 51 52\r",
+ "8 51 53\r",
+ "8 51 54\r",
+ "8 51 55\r",
+ "8 51 56\r",
+ "8 51 57\r",
+ "8 51 58\r",
+ "8 52 1\r",
+ "8 52 2\r",
+ "8 52 3\r",
+ "8 52 4\r",
+ "8 52 5\r",
+ "8 52 6\r",
+ "8 52 7\r",
+ "8 52 8\r",
+ "8 52 9\r",
+ "8 52 10\r",
+ "8 52 11\r",
+ "8 52 12\r",
+ "8 52 13\r",
+ "8 52 14\r",
+ "8 52 15\r",
+ "8 52 16\r",
+ "8 52 17\r",
+ "8 52 18\r",
+ "8 52 19\r",
+ "8 52 20\r",
+ "8 52 21\r",
+ "8 52 22\r",
+ "8 52 23\r",
+ "8 52 24\r",
+ "8 52 25\r",
+ "8 52 26\r",
+ "8 52 27\r",
+ "8 52 28\r",
+ "8 52 29\r",
+ "8 52 30\r",
+ "8 52 31\r",
+ "8 52 32\r",
+ "8 52 33\r",
+ "8 52 34\r",
+ "8 52 35\r",
+ "8 52 36\r",
+ "8 52 37\r",
+ "8 52 38\r",
+ "8 52 39\r",
+ "8 52 40\r",
+ "8 52 41\r",
+ "8 52 42\r",
+ "8 52 43\r",
+ "8 52 44\r",
+ "8 52 45\r",
+ "8 52 46\r",
+ "8 52 47\r",
+ "8 52 48\r",
+ "8 52 49\r",
+ "8 52 50\r",
+ "8 52 51\r",
+ "8 52 52\r",
+ "8 52 53\r",
+ "8 52 54\r",
+ "8 52 55\r",
+ "8 52 56\r",
+ "8 52 57\r",
+ "8 52 58\r",
+ "8 53 1\r",
+ "8 53 2\r",
+ "8 53 3\r",
+ "8 53 4\r",
+ "8 53 5\r",
+ "8 53 6\r",
+ "8 53 7\r",
+ "8 53 8\r",
+ "8 53 9\r",
+ "8 53 10\r",
+ "8 53 11\r",
+ "8 53 12\r",
+ "8 53 13\r",
+ "8 53 14\r",
+ "8 53 15\r",
+ "8 53 16\r",
+ "8 53 17\r",
+ "8 53 18\r",
+ "8 53 19\r",
+ "8 53 20\r",
+ "8 53 21\r",
+ "8 53 22\r",
+ "8 53 23\r",
+ "8 53 24\r",
+ "8 53 25\r",
+ "8 53 26\r",
+ "8 53 27\r",
+ "8 53 28\r",
+ "8 53 29\r",
+ "8 53 30\r",
+ "8 53 31\r",
+ "8 53 32\r",
+ "8 53 33\r",
+ "8 53 34\r",
+ "8 53 35\r",
+ "8 53 36\r",
+ "8 53 37\r",
+ "8 53 38\r",
+ "8 53 39\r",
+ "8 53 40\r",
+ "8 53 41\r",
+ "8 53 42\r",
+ "8 53 43\r",
+ "8 53 44\r",
+ "8 53 45\r",
+ "8 53 46\r",
+ "8 53 47\r",
+ "8 53 48\r",
+ "8 53 49\r",
+ "8 53 50\r",
+ "8 53 51\r",
+ "8 53 52\r",
+ "8 53 53\r",
+ "8 53 54\r",
+ "8 53 55\r",
+ "8 53 56\r",
+ "8 53 57\r",
+ "8 53 58\r",
+ "8 54 1\r",
+ "8 54 2\r",
+ "8 54 3\r",
+ "8 54 4\r",
+ "8 54 5\r",
+ "8 54 6\r",
+ "8 54 7\r",
+ "8 54 8\r",
+ "8 54 9\r",
+ "8 54 10\r",
+ "8 54 11\r",
+ "8 54 12\r",
+ "8 54 13\r",
+ "8 54 14\r",
+ "8 54 15\r",
+ "8 54 16\r",
+ "8 54 17\r",
+ "8 54 18\r",
+ "8 54 19\r",
+ "8 54 20\r",
+ "8 54 21\r",
+ "8 54 22\r",
+ "8 54 23\r",
+ "8 54 24\r",
+ "8 54 25\r",
+ "8 54 26\r",
+ "8 54 27\r",
+ "8 54 28\r",
+ "8 54 29\r",
+ "8 54 30\r",
+ "8 54 31\r",
+ "8 54 32\r",
+ "8 54 33\r",
+ "8 54 34\r",
+ "8 54 35\r",
+ "8 54 36\r",
+ "8 54 37\r",
+ "8 54 38\r",
+ "8 54 39\r",
+ "8 54 40\r",
+ "8 54 41\r",
+ "8 54 42\r",
+ "8 54 43\r",
+ "8 54 44\r",
+ "8 54 45\r",
+ "8 54 46\r",
+ "8 54 47\r",
+ "8 54 48\r",
+ "8 54 49\r",
+ "8 54 50\r",
+ "8 54 51\r",
+ "8 54 52\r",
+ "8 54 53\r",
+ "8 54 54\r",
+ "8 54 55\r",
+ "8 54 56\r",
+ "8 54 57\r",
+ "8 54 58\r",
+ "8 55 1\r",
+ "8 55 2\r",
+ "8 55 3\r",
+ "8 55 4\r",
+ "8 55 5\r",
+ "8 55 6\r",
+ "8 55 7\r",
+ "8 55 8\r",
+ "8 55 9\r",
+ "8 55 10\r",
+ "8 55 11\r",
+ "8 55 12\r",
+ "8 55 13\r",
+ "8 55 14\r",
+ "8 55 15\r",
+ "8 55 16\r",
+ "8 55 17\r",
+ "8 55 18\r",
+ "8 55 19\r",
+ "8 55 20\r",
+ "8 55 21\r",
+ "8 55 22\r",
+ "8 55 23\r",
+ "8 55 24\r",
+ "8 55 25\r",
+ "8 55 26\r",
+ "8 55 27\r",
+ "8 55 28\r",
+ "8 55 29\r",
+ "8 55 30\r",
+ "8 55 31\r",
+ "8 55 32\r",
+ "8 55 33\r",
+ "8 55 34\r",
+ "8 55 35\r",
+ "8 55 36\r",
+ "8 55 37\r",
+ "8 55 38\r",
+ "8 55 39\r",
+ "8 55 40\r",
+ "8 55 41\r",
+ "8 55 42\r",
+ "8 55 43\r",
+ "8 55 44\r",
+ "8 55 45\r",
+ "8 55 46\r",
+ "8 55 47\r",
+ "8 55 48\r",
+ "8 55 49\r",
+ "8 55 50\r",
+ "8 55 51\r",
+ "8 55 52\r",
+ "8 55 53\r",
+ "8 55 54\r",
+ "8 55 55\r",
+ "8 55 56\r",
+ "8 55 57\r",
+ "8 55 58\r",
+ "8 56 1\r",
+ "8 56 2\r",
+ "8 56 3\r",
+ "8 56 4\r",
+ "8 56 5\r",
+ "8 56 6\r",
+ "8 56 7\r",
+ "8 56 8\r",
+ "8 56 9\r",
+ "8 56 10\r",
+ "8 56 11\r",
+ "8 56 12\r",
+ "8 56 13\r",
+ "8 56 14\r",
+ "8 56 15\r",
+ "8 56 16\r",
+ "8 56 17\r",
+ "8 56 18\r",
+ "8 56 19\r",
+ "8 56 20\r",
+ "8 56 21\r",
+ "8 56 22\r",
+ "8 56 23\r",
+ "8 56 24\r",
+ "8 56 25\r",
+ "8 56 26\r",
+ "8 56 27\r",
+ "8 56 28\r",
+ "8 56 29\r",
+ "8 56 30\r",
+ "8 56 31\r",
+ "8 56 32\r",
+ "8 56 33\r",
+ "8 56 34\r",
+ "8 56 35\r",
+ "8 56 36\r",
+ "8 56 37\r",
+ "8 56 38\r",
+ "8 56 39\r",
+ "8 56 40\r",
+ "8 56 41\r",
+ "8 56 42\r",
+ "8 56 43\r",
+ "8 56 44\r",
+ "8 56 45\r",
+ "8 56 46\r",
+ "8 56 47\r",
+ "8 56 48\r",
+ "8 56 49\r",
+ "8 56 50\r",
+ "8 56 51\r",
+ "8 56 52\r",
+ "8 56 53\r",
+ "8 56 54\r",
+ "8 56 55\r",
+ "8 56 56\r",
+ "8 56 57\r",
+ "8 56 58\r",
+ "8 57 1\r",
+ "8 57 2\r",
+ "8 57 3\r",
+ "8 57 4\r",
+ "8 57 5\r",
+ "8 57 6\r",
+ "8 57 7\r",
+ "8 57 8\r",
+ "8 57 9\r",
+ "8 57 10\r",
+ "8 57 11\r",
+ "8 57 12\r",
+ "8 57 13\r",
+ "8 57 14\r",
+ "8 57 15\r",
+ "8 57 16\r",
+ "8 57 17\r",
+ "8 57 18\r",
+ "8 57 19\r",
+ "8 57 20\r",
+ "8 57 21\r",
+ "8 57 22\r",
+ "8 57 23\r",
+ "8 57 24\r",
+ "8 57 25\r",
+ "8 57 26\r",
+ "8 57 27\r",
+ "8 57 28\r",
+ "8 57 29\r",
+ "8 57 30\r",
+ "8 57 31\r",
+ "8 57 32\r",
+ "8 57 33\r",
+ "8 57 34\r",
+ "8 57 35\r",
+ "8 57 36\r",
+ "8 57 37\r",
+ "8 57 38\r",
+ "8 57 39\r",
+ "8 57 40\r",
+ "8 57 41\r",
+ "8 57 42\r",
+ "8 57 43\r",
+ "8 57 44\r",
+ "8 57 45\r",
+ "8 57 46\r",
+ "8 57 47\r",
+ "8 57 48\r",
+ "8 57 49\r",
+ "8 57 50\r",
+ "8 57 51\r",
+ "8 57 52\r",
+ "8 57 53\r",
+ "8 57 54\r",
+ "8 57 55\r",
+ "8 57 56\r",
+ "8 57 57\r",
+ "8 57 58\r",
+ "8 58 1\r",
+ "8 58 2\r",
+ "8 58 3\r",
+ "8 58 4\r",
+ "8 58 5\r",
+ "8 58 6\r",
+ "8 58 7\r",
+ "8 58 8\r",
+ "8 58 9\r",
+ "8 58 10\r",
+ "8 58 11\r",
+ "8 58 12\r",
+ "8 58 13\r",
+ "8 58 14\r",
+ "8 58 15\r",
+ "8 58 16\r",
+ "8 58 17\r",
+ "8 58 18\r",
+ "8 58 19\r",
+ "8 58 20\r",
+ "8 58 21\r",
+ "8 58 22\r",
+ "8 58 23\r",
+ "8 58 24\r",
+ "8 58 25\r",
+ "8 58 26\r",
+ "8 58 27\r",
+ "8 58 28\r",
+ "8 58 29\r",
+ "8 58 30\r",
+ "8 58 31\r",
+ "8 58 32\r",
+ "8 58 33\r",
+ "8 58 34\r",
+ "8 58 35\r",
+ "8 58 36\r",
+ "8 58 37\r",
+ "8 58 38\r",
+ "8 58 39\r",
+ "8 58 40\r",
+ "8 58 41\r",
+ "8 58 42\r",
+ "8 58 43\r",
+ "8 58 44\r",
+ "8 58 45\r",
+ "8 58 46\r",
+ "8 58 47\r",
+ "8 58 48\r",
+ "8 58 49\r",
+ "8 58 50\r",
+ "8 58 51\r",
+ "8 58 52\r",
+ "8 58 53\r",
+ "8 58 54\r",
+ "8 58 55\r",
+ "8 58 56\r",
+ "8 58 57\r",
+ "8 58 58\r",
+ "9 1 1\r",
+ "9 1 2\r",
+ "9 1 3\r",
+ "9 1 4\r",
+ "9 1 5\r",
+ "9 1 6\r",
+ "9 1 7\r",
+ "9 1 8\r",
+ "9 1 9\r",
+ "9 1 10\r",
+ "9 1 11\r",
+ "9 1 12\r",
+ "9 1 13\r",
+ "9 1 14\r",
+ "9 1 15\r",
+ "9 1 16\r",
+ "9 1 17\r",
+ "9 1 18\r",
+ "9 1 19\r",
+ "9 1 20\r",
+ "9 1 21\r",
+ "9 1 22\r",
+ "9 1 23\r",
+ "9 1 24\r",
+ "9 1 25\r",
+ "9 1 26\r",
+ "9 1 27\r",
+ "9 1 28\r",
+ "9 1 29\r",
+ "9 1 30\r",
+ "9 1 31\r",
+ "9 1 32\r",
+ "9 1 33\r",
+ "9 1 34\r",
+ "9 1 35\r",
+ "9 1 36\r",
+ "9 1 37\r",
+ "9 1 38\r",
+ "9 1 39\r",
+ "9 1 40\r",
+ "9 1 41\r",
+ "9 1 42\r",
+ "9 1 43\r",
+ "9 1 44\r",
+ "9 1 45\r",
+ "9 1 46\r",
+ "9 1 47\r",
+ "9 1 48\r",
+ "9 1 49\r",
+ "9 1 50\r",
+ "9 1 51\r",
+ "9 1 52\r",
+ "9 1 53\r",
+ "9 1 54\r",
+ "9 1 55\r",
+ "9 1 56\r",
+ "9 1 57\r",
+ "9 1 58\r",
+ "9 2 1\r",
+ "9 2 2\r",
+ "9 2 3\r",
+ "9 2 4\r",
+ "9 2 5\r",
+ "9 2 6\r",
+ "9 2 7\r",
+ "9 2 8\r",
+ "9 2 9\r",
+ "9 2 10\r",
+ "9 2 11\r",
+ "9 2 12\r",
+ "9 2 13\r",
+ "9 2 14\r",
+ "9 2 15\r",
+ "9 2 16\r",
+ "9 2 17\r",
+ "9 2 18\r",
+ "9 2 19\r",
+ "9 2 20\r",
+ "9 2 21\r",
+ "9 2 22\r",
+ "9 2 23\r",
+ "9 2 24\r",
+ "9 2 25\r",
+ "9 2 26\r",
+ "9 2 27\r",
+ "9 2 28\r",
+ "9 2 29\r",
+ "9 2 30\r",
+ "9 2 31\r",
+ "9 2 32\r",
+ "9 2 33\r",
+ "9 2 34\r",
+ "9 2 35\r",
+ "9 2 36\r",
+ "9 2 37\r",
+ "9 2 38\r",
+ "9 2 39\r",
+ "9 2 40\r",
+ "9 2 41\r",
+ "9 2 42\r",
+ "9 2 43\r",
+ "9 2 44\r",
+ "9 2 45\r",
+ "9 2 46\r",
+ "9 2 47\r",
+ "9 2 48\r",
+ "9 2 49\r",
+ "9 2 50\r",
+ "9 2 51\r",
+ "9 2 52\r",
+ "9 2 53\r",
+ "9 2 54\r",
+ "9 2 55\r",
+ "9 2 56\r",
+ "9 2 57\r",
+ "9 2 58\r",
+ "9 3 1\r",
+ "9 3 2\r",
+ "9 3 3\r",
+ "9 3 4\r",
+ "9 3 5\r",
+ "9 3 6\r",
+ "9 3 7\r",
+ "9 3 8\r",
+ "9 3 9\r",
+ "9 3 10\r",
+ "9 3 11\r",
+ "9 3 12\r",
+ "9 3 13\r",
+ "9 3 14\r",
+ "9 3 15\r",
+ "9 3 16\r",
+ "9 3 17\r",
+ "9 3 18\r",
+ "9 3 19\r",
+ "9 3 20\r",
+ "9 3 21\r",
+ "9 3 22\r",
+ "9 3 23\r",
+ "9 3 24\r",
+ "9 3 25\r",
+ "9 3 26\r",
+ "9 3 27\r",
+ "9 3 28\r",
+ "9 3 29\r",
+ "9 3 30\r",
+ "9 3 31\r",
+ "9 3 32\r",
+ "9 3 33\r",
+ "9 3 34\r",
+ "9 3 35\r",
+ "9 3 36\r",
+ "9 3 37\r",
+ "9 3 38\r",
+ "9 3 39\r",
+ "9 3 40\r",
+ "9 3 41\r",
+ "9 3 42\r",
+ "9 3 43\r",
+ "9 3 44\r",
+ "9 3 45\r",
+ "9 3 46\r",
+ "9 3 47\r",
+ "9 3 48\r",
+ "9 3 49\r",
+ "9 3 50\r",
+ "9 3 51\r",
+ "9 3 52\r",
+ "9 3 53\r",
+ "9 3 54\r",
+ "9 3 55\r",
+ "9 3 56\r",
+ "9 3 57\r",
+ "9 3 58\r",
+ "9 4 1\r",
+ "9 4 2\r",
+ "9 4 3\r",
+ "9 4 4\r",
+ "9 4 5\r",
+ "9 4 6\r",
+ "9 4 7\r",
+ "9 4 8\r",
+ "9 4 9\r",
+ "9 4 10\r",
+ "9 4 11\r",
+ "9 4 12\r",
+ "9 4 13\r",
+ "9 4 14\r",
+ "9 4 15\r",
+ "9 4 16\r",
+ "9 4 17\r",
+ "9 4 18\r",
+ "9 4 19\r",
+ "9 4 20\r",
+ "9 4 21\r",
+ "9 4 22\r",
+ "9 4 23\r",
+ "9 4 24\r",
+ "9 4 25\r",
+ "9 4 26\r",
+ "9 4 27\r",
+ "9 4 28\r",
+ "9 4 29\r",
+ "9 4 30\r",
+ "9 4 31\r",
+ "9 4 32\r",
+ "9 4 33\r",
+ "9 4 34\r",
+ "9 4 35\r",
+ "9 4 36\r",
+ "9 4 37\r",
+ "9 4 38\r",
+ "9 4 39\r",
+ "9 4 40\r",
+ "9 4 41\r",
+ "9 4 42\r",
+ "9 4 43\r",
+ "9 4 44\r",
+ "9 4 45\r",
+ "9 4 46\r",
+ "9 4 47\r",
+ "9 4 48\r",
+ "9 4 49\r",
+ "9 4 50\r",
+ "9 4 51\r",
+ "9 4 52\r",
+ "9 4 53\r",
+ "9 4 54\r",
+ "9 4 55\r",
+ "9 4 56\r",
+ "9 4 57\r",
+ "9 4 58\r",
+ "9 5 1\r",
+ "9 5 2\r",
+ "9 5 3\r",
+ "9 5 4\r",
+ "9 5 5\r",
+ "9 5 6\r",
+ "9 5 7\r",
+ "9 5 8\r",
+ "9 5 9\r",
+ "9 5 10\r",
+ "9 5 11\r",
+ "9 5 12\r",
+ "9 5 13\r",
+ "9 5 14\r",
+ "9 5 15\r",
+ "9 5 16\r",
+ "9 5 17\r",
+ "9 5 18\r",
+ "9 5 19\r",
+ "9 5 20\r",
+ "9 5 21\r",
+ "9 5 22\r",
+ "9 5 23\r",
+ "9 5 24\r",
+ "9 5 25\r",
+ "9 5 26\r",
+ "9 5 27\r",
+ "9 5 28\r",
+ "9 5 29\r",
+ "9 5 30\r",
+ "9 5 31\r",
+ "9 5 32\r",
+ "9 5 33\r",
+ "9 5 34\r",
+ "9 5 35\r",
+ "9 5 36\r",
+ "9 5 37\r",
+ "9 5 38\r",
+ "9 5 39\r",
+ "9 5 40\r",
+ "9 5 41\r",
+ "9 5 42\r",
+ "9 5 43\r",
+ "9 5 44\r",
+ "9 5 45\r",
+ "9 5 46\r",
+ "9 5 47\r",
+ "9 5 48\r",
+ "9 5 49\r",
+ "9 5 50\r",
+ "9 5 51\r",
+ "9 5 52\r",
+ "9 5 53\r",
+ "9 5 54\r",
+ "9 5 55\r",
+ "9 5 56\r",
+ "9 5 57\r",
+ "9 5 58\r",
+ "9 6 1\r",
+ "9 6 2\r",
+ "9 6 3\r",
+ "9 6 4\r",
+ "9 6 5\r",
+ "9 6 6\r",
+ "9 6 7\r",
+ "9 6 8\r",
+ "9 6 9\r",
+ "9 6 10\r",
+ "9 6 11\r",
+ "9 6 12\r",
+ "9 6 13\r",
+ "9 6 14\r",
+ "9 6 15\r",
+ "9 6 16\r",
+ "9 6 17\r",
+ "9 6 18\r",
+ "9 6 19\r",
+ "9 6 20\r",
+ "9 6 21\r",
+ "9 6 22\r",
+ "9 6 23\r",
+ "9 6 24\r",
+ "9 6 25\r",
+ "9 6 26\r",
+ "9 6 27\r",
+ "9 6 28\r",
+ "9 6 29\r",
+ "9 6 30\r",
+ "9 6 31\r",
+ "9 6 32\r",
+ "9 6 33\r",
+ "9 6 34\r",
+ "9 6 35\r",
+ "9 6 36\r",
+ "9 6 37\r",
+ "9 6 38\r",
+ "9 6 39\r",
+ "9 6 40\r",
+ "9 6 41\r",
+ "9 6 42\r",
+ "9 6 43\r",
+ "9 6 44\r",
+ "9 6 45\r",
+ "9 6 46\r",
+ "9 6 47\r",
+ "9 6 48\r",
+ "9 6 49\r",
+ "9 6 50\r",
+ "9 6 51\r",
+ "9 6 52\r",
+ "9 6 53\r",
+ "9 6 54\r",
+ "9 6 55\r",
+ "9 6 56\r",
+ "9 6 57\r",
+ "9 6 58\r",
+ "9 7 1\r",
+ "9 7 2\r",
+ "9 7 3\r",
+ "9 7 4\r",
+ "9 7 5\r",
+ "9 7 6\r",
+ "9 7 7\r",
+ "9 7 8\r",
+ "9 7 9\r",
+ "9 7 10\r",
+ "9 7 11\r",
+ "9 7 12\r",
+ "9 7 13\r",
+ "9 7 14\r",
+ "9 7 15\r",
+ "9 7 16\r",
+ "9 7 17\r",
+ "9 7 18\r",
+ "9 7 19\r",
+ "9 7 20\r",
+ "9 7 21\r",
+ "9 7 22\r",
+ "9 7 23\r",
+ "9 7 24\r",
+ "9 7 25\r",
+ "9 7 26\r",
+ "9 7 27\r",
+ "9 7 28\r",
+ "9 7 29\r",
+ "9 7 30\r",
+ "9 7 31\r",
+ "9 7 32\r",
+ "9 7 33\r",
+ "9 7 34\r",
+ "9 7 35\r",
+ "9 7 36\r",
+ "9 7 37\r",
+ "9 7 38\r",
+ "9 7 39\r",
+ "9 7 40\r",
+ "9 7 41\r",
+ "9 7 42\r",
+ "9 7 43\r",
+ "9 7 44\r",
+ "9 7 45\r",
+ "9 7 46\r",
+ "9 7 47\r",
+ "9 7 48\r",
+ "9 7 49\r",
+ "9 7 50\r",
+ "9 7 51\r",
+ "9 7 52\r",
+ "9 7 53\r",
+ "9 7 54\r",
+ "9 7 55\r",
+ "9 7 56\r",
+ "9 7 57\r",
+ "9 7 58\r",
+ "9 8 1\r",
+ "9 8 2\r",
+ "9 8 3\r",
+ "9 8 4\r",
+ "9 8 5\r",
+ "9 8 6\r",
+ "9 8 7\r",
+ "9 8 8\r",
+ "9 8 9\r",
+ "9 8 10\r",
+ "9 8 11\r",
+ "9 8 12\r",
+ "9 8 13\r",
+ "9 8 14\r",
+ "9 8 15\r",
+ "9 8 16\r",
+ "9 8 17\r",
+ "9 8 18\r",
+ "9 8 19\r",
+ "9 8 20\r",
+ "9 8 21\r",
+ "9 8 22\r",
+ "9 8 23\r",
+ "9 8 24\r",
+ "9 8 25\r",
+ "9 8 26\r",
+ "9 8 27\r",
+ "9 8 28\r",
+ "9 8 29\r",
+ "9 8 30\r",
+ "9 8 31\r",
+ "9 8 32\r",
+ "9 8 33\r",
+ "9 8 34\r",
+ "9 8 35\r",
+ "9 8 36\r",
+ "9 8 37\r",
+ "9 8 38\r",
+ "9 8 39\r",
+ "9 8 40\r",
+ "9 8 41\r",
+ "9 8 42\r",
+ "9 8 43\r",
+ "9 8 44\r",
+ "9 8 45\r",
+ "9 8 46\r",
+ "9 8 47\r",
+ "9 8 48\r",
+ "9 8 49\r",
+ "9 8 50\r",
+ "9 8 51\r",
+ "9 8 52\r",
+ "9 8 53\r",
+ "9 8 54\r",
+ "9 8 55\r",
+ "9 8 56\r",
+ "9 8 57\r",
+ "9 8 58\r",
+ "9 9 1\r",
+ "9 9 2\r",
+ "9 9 3\r",
+ "9 9 4\r",
+ "9 9 5\r",
+ "9 9 6\r",
+ "9 9 7\r",
+ "9 9 8\r",
+ "9 9 9\r",
+ "9 9 10\r",
+ "9 9 11\r",
+ "9 9 12\r",
+ "9 9 13\r",
+ "9 9 14\r",
+ "9 9 15\r",
+ "9 9 16\r",
+ "9 9 17\r",
+ "9 9 18\r",
+ "9 9 19\r",
+ "9 9 20\r",
+ "9 9 21\r",
+ "9 9 22\r",
+ "9 9 23\r",
+ "9 9 24\r",
+ "9 9 25\r",
+ "9 9 26\r",
+ "9 9 27\r",
+ "9 9 28\r",
+ "9 9 29\r",
+ "9 9 30\r",
+ "9 9 31\r",
+ "9 9 32\r",
+ "9 9 33\r",
+ "9 9 34\r",
+ "9 9 35\r",
+ "9 9 36\r",
+ "9 9 37\r",
+ "9 9 38\r",
+ "9 9 39\r",
+ "9 9 40\r",
+ "9 9 41\r",
+ "9 9 42\r",
+ "9 9 43\r",
+ "9 9 44\r",
+ "9 9 45\r",
+ "9 9 46\r",
+ "9 9 47\r",
+ "9 9 48\r",
+ "9 9 49\r",
+ "9 9 50\r",
+ "9 9 51\r",
+ "9 9 52\r",
+ "9 9 53\r",
+ "9 9 54\r",
+ "9 9 55\r",
+ "9 9 56\r",
+ "9 9 57\r",
+ "9 9 58\r",
+ "9 10 1\r",
+ "9 10 2\r",
+ "9 10 3\r",
+ "9 10 4\r",
+ "9 10 5\r",
+ "9 10 6\r",
+ "9 10 7\r",
+ "9 10 8\r",
+ "9 10 9\r",
+ "9 10 10\r",
+ "9 10 11\r",
+ "9 10 12\r",
+ "9 10 13\r",
+ "9 10 14\r",
+ "9 10 15\r",
+ "9 10 16\r",
+ "9 10 17\r",
+ "9 10 18\r",
+ "9 10 19\r",
+ "9 10 20\r",
+ "9 10 21\r",
+ "9 10 22\r",
+ "9 10 23\r",
+ "9 10 24\r",
+ "9 10 25\r",
+ "9 10 26\r",
+ "9 10 27\r",
+ "9 10 28\r",
+ "9 10 29\r",
+ "9 10 30\r",
+ "9 10 31\r",
+ "9 10 32\r",
+ "9 10 33\r",
+ "9 10 34\r",
+ "9 10 35\r",
+ "9 10 36\r",
+ "9 10 37\r",
+ "9 10 38\r",
+ "9 10 39\r",
+ "9 10 40\r",
+ "9 10 41\r",
+ "9 10 42\r",
+ "9 10 43\r",
+ "9 10 44\r",
+ "9 10 45\r",
+ "9 10 46\r",
+ "9 10 47\r",
+ "9 10 48\r",
+ "9 10 49\r",
+ "9 10 50\r",
+ "9 10 51\r",
+ "9 10 52\r",
+ "9 10 53\r",
+ "9 10 54\r",
+ "9 10 55\r",
+ "9 10 56\r",
+ "9 10 57\r",
+ "9 10 58\r",
+ "9 11 1\r",
+ "9 11 2\r",
+ "9 11 3\r",
+ "9 11 4\r",
+ "9 11 5\r",
+ "9 11 6\r",
+ "9 11 7\r",
+ "9 11 8\r",
+ "9 11 9\r",
+ "9 11 10\r",
+ "9 11 11\r",
+ "9 11 12\r",
+ "9 11 13\r",
+ "9 11 14\r",
+ "9 11 15\r",
+ "9 11 16\r",
+ "9 11 17\r",
+ "9 11 18\r",
+ "9 11 19\r",
+ "9 11 20\r",
+ "9 11 21\r",
+ "9 11 22\r",
+ "9 11 23\r",
+ "9 11 24\r",
+ "9 11 25\r",
+ "9 11 26\r",
+ "9 11 27\r",
+ "9 11 28\r",
+ "9 11 29\r",
+ "9 11 30\r",
+ "9 11 31\r",
+ "9 11 32\r",
+ "9 11 33\r",
+ "9 11 34\r",
+ "9 11 35\r",
+ "9 11 36\r",
+ "9 11 37\r",
+ "9 11 38\r",
+ "9 11 39\r",
+ "9 11 40\r",
+ "9 11 41\r",
+ "9 11 42\r",
+ "9 11 43\r",
+ "9 11 44\r",
+ "9 11 45\r",
+ "9 11 46\r",
+ "9 11 47\r",
+ "9 11 48\r",
+ "9 11 49\r",
+ "9 11 50\r",
+ "9 11 51\r",
+ "9 11 52\r",
+ "9 11 53\r",
+ "9 11 54\r",
+ "9 11 55\r",
+ "9 11 56\r",
+ "9 11 57\r",
+ "9 11 58\r",
+ "9 12 1\r",
+ "9 12 2\r",
+ "9 12 3\r",
+ "9 12 4\r",
+ "9 12 5\r",
+ "9 12 6\r",
+ "9 12 7\r",
+ "9 12 8\r",
+ "9 12 9\r",
+ "9 12 10\r",
+ "9 12 11\r",
+ "9 12 12\r",
+ "9 12 13\r",
+ "9 12 14\r",
+ "9 12 15\r",
+ "9 12 16\r",
+ "9 12 17\r",
+ "9 12 18\r",
+ "9 12 19\r",
+ "9 12 20\r",
+ "9 12 21\r",
+ "9 12 22\r",
+ "9 12 23\r",
+ "9 12 24\r",
+ "9 12 25\r",
+ "9 12 26\r",
+ "9 12 27\r",
+ "9 12 28\r",
+ "9 12 29\r",
+ "9 12 30\r",
+ "9 12 31\r",
+ "9 12 32\r",
+ "9 12 33\r",
+ "9 12 34\r",
+ "9 12 35\r",
+ "9 12 36\r",
+ "9 12 37\r",
+ "9 12 38\r",
+ "9 12 39\r",
+ "9 12 40\r",
+ "9 12 41\r",
+ "9 12 42\r",
+ "9 12 43\r",
+ "9 12 44\r",
+ "9 12 45\r",
+ "9 12 46\r",
+ "9 12 47\r",
+ "9 12 48\r",
+ "9 12 49\r",
+ "9 12 50\r",
+ "9 12 51\r",
+ "9 12 52\r",
+ "9 12 53\r",
+ "9 12 54\r",
+ "9 12 55\r",
+ "9 12 56\r",
+ "9 12 57\r",
+ "9 12 58\r",
+ "9 13 1\r",
+ "9 13 2\r",
+ "9 13 3\r",
+ "9 13 4\r",
+ "9 13 5\r",
+ "9 13 6\r",
+ "9 13 7\r",
+ "9 13 8\r",
+ "9 13 9\r",
+ "9 13 10\r",
+ "9 13 11\r",
+ "9 13 12\r",
+ "9 13 13\r",
+ "9 13 14\r",
+ "9 13 15\r",
+ "9 13 16\r",
+ "9 13 17\r",
+ "9 13 18\r",
+ "9 13 19\r",
+ "9 13 20\r",
+ "9 13 21\r",
+ "9 13 22\r",
+ "9 13 23\r",
+ "9 13 24\r",
+ "9 13 25\r",
+ "9 13 26\r",
+ "9 13 27\r",
+ "9 13 28\r",
+ "9 13 29\r",
+ "9 13 30\r",
+ "9 13 31\r",
+ "9 13 32\r",
+ "9 13 33\r",
+ "9 13 34\r",
+ "9 13 35\r",
+ "9 13 36\r",
+ "9 13 37\r",
+ "9 13 38\r",
+ "9 13 39\r",
+ "9 13 40\r",
+ "9 13 41\r",
+ "9 13 42\r",
+ "9 13 43\r",
+ "9 13 44\r",
+ "9 13 45\r",
+ "9 13 46\r",
+ "9 13 47\r",
+ "9 13 48\r",
+ "9 13 49\r",
+ "9 13 50\r",
+ "9 13 51\r",
+ "9 13 52\r",
+ "9 13 53\r",
+ "9 13 54\r",
+ "9 13 55\r",
+ "9 13 56\r",
+ "9 13 57\r",
+ "9 13 58\r",
+ "9 14 1\r",
+ "9 14 2\r",
+ "9 14 3\r",
+ "9 14 4\r",
+ "9 14 5\r",
+ "9 14 6\r",
+ "9 14 7\r",
+ "9 14 8\r",
+ "9 14 9\r",
+ "9 14 10\r",
+ "9 14 11\r",
+ "9 14 12\r",
+ "9 14 13\r",
+ "9 14 14\r",
+ "9 14 15\r",
+ "9 14 16\r",
+ "9 14 17\r",
+ "9 14 18\r",
+ "9 14 19\r",
+ "9 14 20\r",
+ "9 14 21\r",
+ "9 14 22\r",
+ "9 14 23\r",
+ "9 14 24\r",
+ "9 14 25\r",
+ "9 14 26\r",
+ "9 14 27\r",
+ "9 14 28\r",
+ "9 14 29\r",
+ "9 14 30\r",
+ "9 14 31\r",
+ "9 14 32\r",
+ "9 14 33\r",
+ "9 14 34\r",
+ "9 14 35\r",
+ "9 14 36\r",
+ "9 14 37\r",
+ "9 14 38\r",
+ "9 14 39\r",
+ "9 14 40\r",
+ "9 14 41\r",
+ "9 14 42\r",
+ "9 14 43\r",
+ "9 14 44\r",
+ "9 14 45\r",
+ "9 14 46\r",
+ "9 14 47\r",
+ "9 14 48\r",
+ "9 14 49\r",
+ "9 14 50\r",
+ "9 14 51\r",
+ "9 14 52\r",
+ "9 14 53\r",
+ "9 14 54\r",
+ "9 14 55\r",
+ "9 14 56\r",
+ "9 14 57\r",
+ "9 14 58\r",
+ "9 15 1\r",
+ "9 15 2\r",
+ "9 15 3\r",
+ "9 15 4\r",
+ "9 15 5\r",
+ "9 15 6\r",
+ "9 15 7\r",
+ "9 15 8\r",
+ "9 15 9\r",
+ "9 15 10\r",
+ "9 15 11\r",
+ "9 15 12\r",
+ "9 15 13\r",
+ "9 15 14\r",
+ "9 15 15\r",
+ "9 15 16\r",
+ "9 15 17\r",
+ "9 15 18\r",
+ "9 15 19\r",
+ "9 15 20\r",
+ "9 15 21\r",
+ "9 15 22\r",
+ "9 15 23\r",
+ "9 15 24\r",
+ "9 15 25\r",
+ "9 15 26\r",
+ "9 15 27\r",
+ "9 15 28\r",
+ "9 15 29\r",
+ "9 15 30\r",
+ "9 15 31\r",
+ "9 15 32\r",
+ "9 15 33\r",
+ "9 15 34\r",
+ "9 15 35\r",
+ "9 15 36\r",
+ "9 15 37\r",
+ "9 15 38\r",
+ "9 15 39\r",
+ "9 15 40\r",
+ "9 15 41\r",
+ "9 15 42\r",
+ "9 15 43\r",
+ "9 15 44\r",
+ "9 15 45\r",
+ "9 15 46\r",
+ "9 15 47\r",
+ "9 15 48\r",
+ "9 15 49\r",
+ "9 15 50\r",
+ "9 15 51\r",
+ "9 15 52\r",
+ "9 15 53\r",
+ "9 15 54\r",
+ "9 15 55\r",
+ "9 15 56\r",
+ "9 15 57\r",
+ "9 15 58\r",
+ "9 16 1\r",
+ "9 16 2\r",
+ "9 16 3\r",
+ "9 16 4\r",
+ "9 16 5\r",
+ "9 16 6\r",
+ "9 16 7\r",
+ "9 16 8\r",
+ "9 16 9\r",
+ "9 16 10\r",
+ "9 16 11\r",
+ "9 16 12\r",
+ "9 16 13\r",
+ "9 16 14\r",
+ "9 16 15\r",
+ "9 16 16\r",
+ "9 16 17\r",
+ "9 16 18\r",
+ "9 16 19\r",
+ "9 16 20\r",
+ "9 16 21\r",
+ "9 16 22\r",
+ "9 16 23\r",
+ "9 16 24\r",
+ "9 16 25\r",
+ "9 16 26\r",
+ "9 16 27\r",
+ "9 16 28\r",
+ "9 16 29\r",
+ "9 16 30\r",
+ "9 16 31\r",
+ "9 16 32\r",
+ "9 16 33\r",
+ "9 16 34\r",
+ "9 16 35\r",
+ "9 16 36\r",
+ "9 16 37\r",
+ "9 16 38\r",
+ "9 16 39\r",
+ "9 16 40\r",
+ "9 16 41\r",
+ "9 16 42\r",
+ "9 16 43\r",
+ "9 16 44\r",
+ "9 16 45\r",
+ "9 16 46\r",
+ "9 16 47\r",
+ "9 16 48\r",
+ "9 16 49\r",
+ "9 16 50\r",
+ "9 16 51\r",
+ "9 16 52\r",
+ "9 16 53\r",
+ "9 16 54\r",
+ "9 16 55\r",
+ "9 16 56\r",
+ "9 16 57\r",
+ "9 16 58\r",
+ "9 17 1\r",
+ "9 17 2\r",
+ "9 17 3\r",
+ "9 17 4\r",
+ "9 17 5\r",
+ "9 17 6\r",
+ "9 17 7\r",
+ "9 17 8\r",
+ "9 17 9\r",
+ "9 17 10\r",
+ "9 17 11\r",
+ "9 17 12\r",
+ "9 17 13\r",
+ "9 17 14\r",
+ "9 17 15\r",
+ "9 17 16\r",
+ "9 17 17\r",
+ "9 17 18\r",
+ "9 17 19\r",
+ "9 17 20\r",
+ "9 17 21\r",
+ "9 17 22\r",
+ "9 17 23\r",
+ "9 17 24\r",
+ "9 17 25\r",
+ "9 17 26\r",
+ "9 17 27\r",
+ "9 17 28\r",
+ "9 17 29\r",
+ "9 17 30\r",
+ "9 17 31\r",
+ "9 17 32\r",
+ "9 17 33\r",
+ "9 17 34\r",
+ "9 17 35\r",
+ "9 17 36\r",
+ "9 17 37\r",
+ "9 17 38\r",
+ "9 17 39\r",
+ "9 17 40\r",
+ "9 17 41\r",
+ "9 17 42\r",
+ "9 17 43\r",
+ "9 17 44\r",
+ "9 17 45\r",
+ "9 17 46\r",
+ "9 17 47\r",
+ "9 17 48\r",
+ "9 17 49\r",
+ "9 17 50\r",
+ "9 17 51\r",
+ "9 17 52\r",
+ "9 17 53\r",
+ "9 17 54\r",
+ "9 17 55\r",
+ "9 17 56\r",
+ "9 17 57\r",
+ "9 17 58\r",
+ "9 18 1\r",
+ "9 18 2\r",
+ "9 18 3\r",
+ "9 18 4\r",
+ "9 18 5\r",
+ "9 18 6\r",
+ "9 18 7\r",
+ "9 18 8\r",
+ "9 18 9\r",
+ "9 18 10\r",
+ "9 18 11\r",
+ "9 18 12\r",
+ "9 18 13\r",
+ "9 18 14\r",
+ "9 18 15\r",
+ "9 18 16\r",
+ "9 18 17\r",
+ "9 18 18\r",
+ "9 18 19\r",
+ "9 18 20\r",
+ "9 18 21\r",
+ "9 18 22\r",
+ "9 18 23\r",
+ "9 18 24\r",
+ "9 18 25\r",
+ "9 18 26\r",
+ "9 18 27\r",
+ "9 18 28\r",
+ "9 18 29\r",
+ "9 18 30\r",
+ "9 18 31\r",
+ "9 18 32\r",
+ "9 18 33\r",
+ "9 18 34\r",
+ "9 18 35\r",
+ "9 18 36\r",
+ "9 18 37\r",
+ "9 18 38\r",
+ "9 18 39\r",
+ "9 18 40\r",
+ "9 18 41\r",
+ "9 18 42\r",
+ "9 18 43\r",
+ "9 18 44\r",
+ "9 18 45\r",
+ "9 18 46\r",
+ "9 18 47\r",
+ "9 18 48\r",
+ "9 18 49\r",
+ "9 18 50\r",
+ "9 18 51\r",
+ "9 18 52\r",
+ "9 18 53\r",
+ "9 18 54\r",
+ "9 18 55\r",
+ "9 18 56\r",
+ "9 18 57\r",
+ "9 18 58\r",
+ "9 19 1\r",
+ "9 19 2\r",
+ "9 19 3\r",
+ "9 19 4\r",
+ "9 19 5\r",
+ "9 19 6\r",
+ "9 19 7\r",
+ "9 19 8\r",
+ "9 19 9\r",
+ "9 19 10\r",
+ "9 19 11\r",
+ "9 19 12\r",
+ "9 19 13\r",
+ "9 19 14\r",
+ "9 19 15\r",
+ "9 19 16\r",
+ "9 19 17\r",
+ "9 19 18\r",
+ "9 19 19\r",
+ "9 19 20\r",
+ "9 19 21\r",
+ "9 19 22\r",
+ "9 19 23\r",
+ "9 19 24\r",
+ "9 19 25\r",
+ "9 19 26\r",
+ "9 19 27\r",
+ "9 19 28\r",
+ "9 19 29\r",
+ "9 19 30\r",
+ "9 19 31\r",
+ "9 19 32\r",
+ "9 19 33\r",
+ "9 19 34\r",
+ "9 19 35\r",
+ "9 19 36\r",
+ "9 19 37\r",
+ "9 19 38\r",
+ "9 19 39\r",
+ "9 19 40\r",
+ "9 19 41\r",
+ "9 19 42\r",
+ "9 19 43\r",
+ "9 19 44\r",
+ "9 19 45\r",
+ "9 19 46\r",
+ "9 19 47\r",
+ "9 19 48\r",
+ "9 19 49\r",
+ "9 19 50\r",
+ "9 19 51\r",
+ "9 19 52\r",
+ "9 19 53\r",
+ "9 19 54\r",
+ "9 19 55\r",
+ "9 19 56\r",
+ "9 19 57\r",
+ "9 19 58\r",
+ "9 20 1\r",
+ "9 20 2\r",
+ "9 20 3\r",
+ "9 20 4\r",
+ "9 20 5\r",
+ "9 20 6\r",
+ "9 20 7\r",
+ "9 20 8\r",
+ "9 20 9\r",
+ "9 20 10\r",
+ "9 20 11\r",
+ "9 20 12\r",
+ "9 20 13\r",
+ "9 20 14\r",
+ "9 20 15\r",
+ "9 20 16\r",
+ "9 20 17\r",
+ "9 20 18\r",
+ "9 20 19\r",
+ "9 20 20\r",
+ "9 20 21\r",
+ "9 20 22\r",
+ "9 20 23\r",
+ "9 20 24\r",
+ "9 20 25\r",
+ "9 20 26\r",
+ "9 20 27\r",
+ "9 20 28\r",
+ "9 20 29\r",
+ "9 20 30\r",
+ "9 20 31\r",
+ "9 20 32\r",
+ "9 20 33\r",
+ "9 20 34\r",
+ "9 20 35\r",
+ "9 20 36\r",
+ "9 20 37\r",
+ "9 20 38\r",
+ "9 20 39\r",
+ "9 20 40\r",
+ "9 20 41\r",
+ "9 20 42\r",
+ "9 20 43\r",
+ "9 20 44\r",
+ "9 20 45\r",
+ "9 20 46\r",
+ "9 20 47\r",
+ "9 20 48\r",
+ "9 20 49\r",
+ "9 20 50\r",
+ "9 20 51\r",
+ "9 20 52\r",
+ "9 20 53\r",
+ "9 20 54\r",
+ "9 20 55\r",
+ "9 20 56\r",
+ "9 20 57\r",
+ "9 20 58\r",
+ "9 21 1\r",
+ "9 21 2\r",
+ "9 21 3\r",
+ "9 21 4\r",
+ "9 21 5\r",
+ "9 21 6\r",
+ "9 21 7\r",
+ "9 21 8\r",
+ "9 21 9\r",
+ "9 21 10\r",
+ "9 21 11\r",
+ "9 21 12\r",
+ "9 21 13\r",
+ "9 21 14\r",
+ "9 21 15\r",
+ "9 21 16\r",
+ "9 21 17\r",
+ "9 21 18\r",
+ "9 21 19\r",
+ "9 21 20\r",
+ "9 21 21\r",
+ "9 21 22\r",
+ "9 21 23\r",
+ "9 21 24\r",
+ "9 21 25\r",
+ "9 21 26\r",
+ "9 21 27\r",
+ "9 21 28\r",
+ "9 21 29\r",
+ "9 21 30\r",
+ "9 21 31\r",
+ "9 21 32\r",
+ "9 21 33\r",
+ "9 21 34\r",
+ "9 21 35\r",
+ "9 21 36\r",
+ "9 21 37\r",
+ "9 21 38\r",
+ "9 21 39\r",
+ "9 21 40\r",
+ "9 21 41\r",
+ "9 21 42\r",
+ "9 21 43\r",
+ "9 21 44\r",
+ "9 21 45\r",
+ "9 21 46\r",
+ "9 21 47\r",
+ "9 21 48\r",
+ "9 21 49\r",
+ "9 21 50\r",
+ "9 21 51\r",
+ "9 21 52\r",
+ "9 21 53\r",
+ "9 21 54\r",
+ "9 21 55\r",
+ "9 21 56\r",
+ "9 21 57\r",
+ "9 21 58\r",
+ "9 22 1\r",
+ "9 22 2\r",
+ "9 22 3\r",
+ "9 22 4\r",
+ "9 22 5\r",
+ "9 22 6\r",
+ "9 22 7\r",
+ "9 22 8\r",
+ "9 22 9\r",
+ "9 22 10\r",
+ "9 22 11\r",
+ "9 22 12\r",
+ "9 22 13\r",
+ "9 22 14\r",
+ "9 22 15\r",
+ "9 22 16\r",
+ "9 22 17\r",
+ "9 22 18\r",
+ "9 22 19\r",
+ "9 22 20\r",
+ "9 22 21\r",
+ "9 22 22\r",
+ "9 22 23\r",
+ "9 22 24\r",
+ "9 22 25\r",
+ "9 22 26\r",
+ "9 22 27\r",
+ "9 22 28\r",
+ "9 22 29\r",
+ "9 22 30\r",
+ "9 22 31\r",
+ "9 22 32\r",
+ "9 22 33\r",
+ "9 22 34\r",
+ "9 22 35\r",
+ "9 22 36\r",
+ "9 22 37\r",
+ "9 22 38\r",
+ "9 22 39\r",
+ "9 22 40\r",
+ "9 22 41\r",
+ "9 22 42\r",
+ "9 22 43\r",
+ "9 22 44\r",
+ "9 22 45\r",
+ "9 22 46\r",
+ "9 22 47\r",
+ "9 22 48\r",
+ "9 22 49\r",
+ "9 22 50\r",
+ "9 22 51\r",
+ "9 22 52\r",
+ "9 22 53\r",
+ "9 22 54\r",
+ "9 22 55\r",
+ "9 22 56\r",
+ "9 22 57\r",
+ "9 22 58\r",
+ "9 23 1\r",
+ "9 23 2\r",
+ "9 23 3\r",
+ "9 23 4\r",
+ "9 23 5\r",
+ "9 23 6\r",
+ "9 23 7\r",
+ "9 23 8\r",
+ "9 23 9\r",
+ "9 23 10\r",
+ "9 23 11\r",
+ "9 23 12\r",
+ "9 23 13\r",
+ "9 23 14\r",
+ "9 23 15\r",
+ "9 23 16\r",
+ "9 23 17\r",
+ "9 23 18\r",
+ "9 23 19\r",
+ "9 23 20\r",
+ "9 23 21\r",
+ "9 23 22\r",
+ "9 23 23\r",
+ "9 23 24\r",
+ "9 23 25\r",
+ "9 23 26\r",
+ "9 23 27\r",
+ "9 23 28\r",
+ "9 23 29\r",
+ "9 23 30\r",
+ "9 23 31\r",
+ "9 23 32\r",
+ "9 23 33\r",
+ "9 23 34\r",
+ "9 23 35\r",
+ "9 23 36\r",
+ "9 23 37\r",
+ "9 23 38\r",
+ "9 23 39\r",
+ "9 23 40\r",
+ "9 23 41\r",
+ "9 23 42\r",
+ "9 23 43\r",
+ "9 23 44\r",
+ "9 23 45\r",
+ "9 23 46\r",
+ "9 23 47\r",
+ "9 23 48\r",
+ "9 23 49\r",
+ "9 23 50\r",
+ "9 23 51\r",
+ "9 23 52\r",
+ "9 23 53\r",
+ "9 23 54\r",
+ "9 23 55\r",
+ "9 23 56\r",
+ "9 23 57\r",
+ "9 23 58\r",
+ "9 24 1\r",
+ "9 24 2\r",
+ "9 24 3\r",
+ "9 24 4\r",
+ "9 24 5\r",
+ "9 24 6\r",
+ "9 24 7\r",
+ "9 24 8\r",
+ "9 24 9\r",
+ "9 24 10\r",
+ "9 24 11\r",
+ "9 24 12\r",
+ "9 24 13\r",
+ "9 24 14\r",
+ "9 24 15\r",
+ "9 24 16\r",
+ "9 24 17\r",
+ "9 24 18\r",
+ "9 24 19\r",
+ "9 24 20\r",
+ "9 24 21\r",
+ "9 24 22\r",
+ "9 24 23\r",
+ "9 24 24\r",
+ "9 24 25\r",
+ "9 24 26\r",
+ "9 24 27\r",
+ "9 24 28\r",
+ "9 24 29\r",
+ "9 24 30\r",
+ "9 24 31\r",
+ "9 24 32\r",
+ "9 24 33\r",
+ "9 24 34\r",
+ "9 24 35\r",
+ "9 24 36\r",
+ "9 24 37\r",
+ "9 24 38\r",
+ "9 24 39\r",
+ "9 24 40\r",
+ "9 24 41\r",
+ "9 24 42\r",
+ "9 24 43\r",
+ "9 24 44\r",
+ "9 24 45\r",
+ "9 24 46\r",
+ "9 24 47\r",
+ "9 24 48\r",
+ "9 24 49\r",
+ "9 24 50\r",
+ "9 24 51\r",
+ "9 24 52\r",
+ "9 24 53\r",
+ "9 24 54\r",
+ "9 24 55\r",
+ "9 24 56\r",
+ "9 24 57\r",
+ "9 24 58\r",
+ "9 25 1\r",
+ "9 25 2\r",
+ "9 25 3\r",
+ "9 25 4\r",
+ "9 25 5\r",
+ "9 25 6\r",
+ "9 25 7\r",
+ "9 25 8\r",
+ "9 25 9\r",
+ "9 25 10\r",
+ "9 25 11\r",
+ "9 25 12\r",
+ "9 25 13\r",
+ "9 25 14\r",
+ "9 25 15\r",
+ "9 25 16\r",
+ "9 25 17\r",
+ "9 25 18\r",
+ "9 25 19\r",
+ "9 25 20\r",
+ "9 25 21\r",
+ "9 25 22\r",
+ "9 25 23\r",
+ "9 25 24\r",
+ "9 25 25\r",
+ "9 25 26\r",
+ "9 25 27\r",
+ "9 25 28\r",
+ "9 25 29\r",
+ "9 25 30\r",
+ "9 25 31\r",
+ "9 25 32\r",
+ "9 25 33\r",
+ "9 25 34\r",
+ "9 25 35\r",
+ "9 25 36\r",
+ "9 25 37\r",
+ "9 25 38\r",
+ "9 25 39\r",
+ "9 25 40\r",
+ "9 25 41\r",
+ "9 25 42\r",
+ "9 25 43\r",
+ "9 25 44\r",
+ "9 25 45\r",
+ "9 25 46\r",
+ "9 25 47\r",
+ "9 25 48\r",
+ "9 25 49\r",
+ "9 25 50\r",
+ "9 25 51\r",
+ "9 25 52\r",
+ "9 25 53\r",
+ "9 25 54\r",
+ "9 25 55\r",
+ "9 25 56\r",
+ "9 25 57\r",
+ "9 25 58\r",
+ "9 26 1\r",
+ "9 26 2\r",
+ "9 26 3\r",
+ "9 26 4\r",
+ "9 26 5\r",
+ "9 26 6\r",
+ "9 26 7\r",
+ "9 26 8\r",
+ "9 26 9\r",
+ "9 26 10\r",
+ "9 26 11\r",
+ "9 26 12\r",
+ "9 26 13\r",
+ "9 26 14\r",
+ "9 26 15\r",
+ "9 26 16\r",
+ "9 26 17\r",
+ "9 26 18\r",
+ "9 26 19\r",
+ "9 26 20\r",
+ "9 26 21\r",
+ "9 26 22\r",
+ "9 26 23\r",
+ "9 26 24\r",
+ "9 26 25\r",
+ "9 26 26\r",
+ "9 26 27\r",
+ "9 26 28\r",
+ "9 26 29\r",
+ "9 26 30\r",
+ "9 26 31\r",
+ "9 26 32\r",
+ "9 26 33\r",
+ "9 26 34\r",
+ "9 26 35\r",
+ "9 26 36\r",
+ "9 26 37\r",
+ "9 26 38\r",
+ "9 26 39\r",
+ "9 26 40\r",
+ "9 26 41\r",
+ "9 26 42\r",
+ "9 26 43\r",
+ "9 26 44\r",
+ "9 26 45\r",
+ "9 26 46\r",
+ "9 26 47\r",
+ "9 26 48\r",
+ "9 26 49\r",
+ "9 26 50\r",
+ "9 26 51\r",
+ "9 26 52\r",
+ "9 26 53\r",
+ "9 26 54\r",
+ "9 26 55\r",
+ "9 26 56\r",
+ "9 26 57\r",
+ "9 26 58\r",
+ "9 27 1\r",
+ "9 27 2\r",
+ "9 27 3\r",
+ "9 27 4\r",
+ "9 27 5\r",
+ "9 27 6\r",
+ "9 27 7\r",
+ "9 27 8\r",
+ "9 27 9\r",
+ "9 27 10\r",
+ "9 27 11\r",
+ "9 27 12\r",
+ "9 27 13\r",
+ "9 27 14\r",
+ "9 27 15\r",
+ "9 27 16\r",
+ "9 27 17\r",
+ "9 27 18\r",
+ "9 27 19\r",
+ "9 27 20\r",
+ "9 27 21\r",
+ "9 27 22\r",
+ "9 27 23\r",
+ "9 27 24\r",
+ "9 27 25\r",
+ "9 27 26\r",
+ "9 27 27\r",
+ "9 27 28\r",
+ "9 27 29\r",
+ "9 27 30\r",
+ "9 27 31\r",
+ "9 27 32\r",
+ "9 27 33\r",
+ "9 27 34\r",
+ "9 27 35\r",
+ "9 27 36\r",
+ "9 27 37\r",
+ "9 27 38\r",
+ "9 27 39\r",
+ "9 27 40\r",
+ "9 27 41\r",
+ "9 27 42\r",
+ "9 27 43\r",
+ "9 27 44\r",
+ "9 27 45\r",
+ "9 27 46\r",
+ "9 27 47\r",
+ "9 27 48\r",
+ "9 27 49\r",
+ "9 27 50\r",
+ "9 27 51\r",
+ "9 27 52\r",
+ "9 27 53\r",
+ "9 27 54\r",
+ "9 27 55\r",
+ "9 27 56\r",
+ "9 27 57\r",
+ "9 27 58\r",
+ "9 28 1\r",
+ "9 28 2\r",
+ "9 28 3\r",
+ "9 28 4\r",
+ "9 28 5\r",
+ "9 28 6\r",
+ "9 28 7\r",
+ "9 28 8\r",
+ "9 28 9\r",
+ "9 28 10\r",
+ "9 28 11\r",
+ "9 28 12\r",
+ "9 28 13\r",
+ "9 28 14\r",
+ "9 28 15\r",
+ "9 28 16\r",
+ "9 28 17\r",
+ "9 28 18\r",
+ "9 28 19\r",
+ "9 28 20\r",
+ "9 28 21\r",
+ "9 28 22\r",
+ "9 28 23\r",
+ "9 28 24\r",
+ "9 28 25\r",
+ "9 28 26\r",
+ "9 28 27\r",
+ "9 28 28\r",
+ "9 28 29\r",
+ "9 28 30\r",
+ "9 28 31\r",
+ "9 28 32\r",
+ "9 28 33\r",
+ "9 28 34\r",
+ "9 28 35\r",
+ "9 28 36\r",
+ "9 28 37\r",
+ "9 28 38\r",
+ "9 28 39\r",
+ "9 28 40\r",
+ "9 28 41\r",
+ "9 28 42\r",
+ "9 28 43\r",
+ "9 28 44\r",
+ "9 28 45\r",
+ "9 28 46\r",
+ "9 28 47\r",
+ "9 28 48\r",
+ "9 28 49\r",
+ "9 28 50\r",
+ "9 28 51\r",
+ "9 28 52\r",
+ "9 28 53\r",
+ "9 28 54\r",
+ "9 28 55\r",
+ "9 28 56\r",
+ "9 28 57\r",
+ "9 28 58\r",
+ "9 29 1\r",
+ "9 29 2\r",
+ "9 29 3\r",
+ "9 29 4\r",
+ "9 29 5\r",
+ "9 29 6\r",
+ "9 29 7\r",
+ "9 29 8\r",
+ "9 29 9\r",
+ "9 29 10\r",
+ "9 29 11\r",
+ "9 29 12\r",
+ "9 29 13\r",
+ "9 29 14\r",
+ "9 29 15\r",
+ "9 29 16\r",
+ "9 29 17\r",
+ "9 29 18\r",
+ "9 29 19\r",
+ "9 29 20\r",
+ "9 29 21\r",
+ "9 29 22\r",
+ "9 29 23\r",
+ "9 29 24\r",
+ "9 29 25\r",
+ "9 29 26\r",
+ "9 29 27\r",
+ "9 29 28\r",
+ "9 29 29\r",
+ "9 29 30\r",
+ "9 29 31\r",
+ "9 29 32\r",
+ "9 29 33\r",
+ "9 29 34\r",
+ "9 29 35\r",
+ "9 29 36\r",
+ "9 29 37\r",
+ "9 29 38\r",
+ "9 29 39\r",
+ "9 29 40\r",
+ "9 29 41\r",
+ "9 29 42\r",
+ "9 29 43\r",
+ "9 29 44\r",
+ "9 29 45\r",
+ "9 29 46\r",
+ "9 29 47\r",
+ "9 29 48\r",
+ "9 29 49\r",
+ "9 29 50\r",
+ "9 29 51\r",
+ "9 29 52\r",
+ "9 29 53\r",
+ "9 29 54\r",
+ "9 29 55\r",
+ "9 29 56\r",
+ "9 29 57\r",
+ "9 29 58\r",
+ "9 30 1\r",
+ "9 30 2\r",
+ "9 30 3\r",
+ "9 30 4\r",
+ "9 30 5\r",
+ "9 30 6\r",
+ "9 30 7\r",
+ "9 30 8\r",
+ "9 30 9\r",
+ "9 30 10\r",
+ "9 30 11\r",
+ "9 30 12\r",
+ "9 30 13\r",
+ "9 30 14\r",
+ "9 30 15\r",
+ "9 30 16\r",
+ "9 30 17\r",
+ "9 30 18\r",
+ "9 30 19\r",
+ "9 30 20\r",
+ "9 30 21\r",
+ "9 30 22\r",
+ "9 30 23\r",
+ "9 30 24\r",
+ "9 30 25\r",
+ "9 30 26\r",
+ "9 30 27\r",
+ "9 30 28\r",
+ "9 30 29\r",
+ "9 30 30\r",
+ "9 30 31\r",
+ "9 30 32\r",
+ "9 30 33\r",
+ "9 30 34\r",
+ "9 30 35\r",
+ "9 30 36\r",
+ "9 30 37\r",
+ "9 30 38\r",
+ "9 30 39\r",
+ "9 30 40\r",
+ "9 30 41\r",
+ "9 30 42\r",
+ "9 30 43\r",
+ "9 30 44\r",
+ "9 30 45\r",
+ "9 30 46\r",
+ "9 30 47\r",
+ "9 30 48\r",
+ "9 30 49\r",
+ "9 30 50\r",
+ "9 30 51\r",
+ "9 30 52\r",
+ "9 30 53\r",
+ "9 30 54\r",
+ "9 30 55\r",
+ "9 30 56\r",
+ "9 30 57\r",
+ "9 30 58\r",
+ "9 31 1\r",
+ "9 31 2\r",
+ "9 31 3\r",
+ "9 31 4\r",
+ "9 31 5\r",
+ "9 31 6\r",
+ "9 31 7\r",
+ "9 31 8\r",
+ "9 31 9\r",
+ "9 31 10\r",
+ "9 31 11\r",
+ "9 31 12\r",
+ "9 31 13\r",
+ "9 31 14\r",
+ "9 31 15\r",
+ "9 31 16\r",
+ "9 31 17\r",
+ "9 31 18\r",
+ "9 31 19\r",
+ "9 31 20\r",
+ "9 31 21\r",
+ "9 31 22\r",
+ "9 31 23\r",
+ "9 31 24\r",
+ "9 31 25\r",
+ "9 31 26\r",
+ "9 31 27\r",
+ "9 31 28\r",
+ "9 31 29\r",
+ "9 31 30\r",
+ "9 31 31\r",
+ "9 31 32\r",
+ "9 31 33\r",
+ "9 31 34\r",
+ "9 31 35\r",
+ "9 31 36\r",
+ "9 31 37\r",
+ "9 31 38\r",
+ "9 31 39\r",
+ "9 31 40\r",
+ "9 31 41\r",
+ "9 31 42\r",
+ "9 31 43\r",
+ "9 31 44\r",
+ "9 31 45\r",
+ "9 31 46\r",
+ "9 31 47\r",
+ "9 31 48\r",
+ "9 31 49\r",
+ "9 31 50\r",
+ "9 31 51\r",
+ "9 31 52\r",
+ "9 31 53\r",
+ "9 31 54\r",
+ "9 31 55\r",
+ "9 31 56\r",
+ "9 31 57\r",
+ "9 31 58\r",
+ "9 32 1\r",
+ "9 32 2\r",
+ "9 32 3\r",
+ "9 32 4\r",
+ "9 32 5\r",
+ "9 32 6\r",
+ "9 32 7\r",
+ "9 32 8\r",
+ "9 32 9\r",
+ "9 32 10\r",
+ "9 32 11\r",
+ "9 32 12\r",
+ "9 32 13\r",
+ "9 32 14\r",
+ "9 32 15\r",
+ "9 32 16\r",
+ "9 32 17\r",
+ "9 32 18\r",
+ "9 32 19\r",
+ "9 32 20\r",
+ "9 32 21\r",
+ "9 32 22\r",
+ "9 32 23\r",
+ "9 32 24\r",
+ "9 32 25\r",
+ "9 32 26\r",
+ "9 32 27\r",
+ "9 32 28\r",
+ "9 32 29\r",
+ "9 32 30\r",
+ "9 32 31\r",
+ "9 32 32\r",
+ "9 32 33\r",
+ "9 32 34\r",
+ "9 32 35\r",
+ "9 32 36\r",
+ "9 32 37\r",
+ "9 32 38\r",
+ "9 32 39\r",
+ "9 32 40\r",
+ "9 32 41\r",
+ "9 32 42\r",
+ "9 32 43\r",
+ "9 32 44\r",
+ "9 32 45\r",
+ "9 32 46\r",
+ "9 32 47\r",
+ "9 32 48\r",
+ "9 32 49\r",
+ "9 32 50\r",
+ "9 32 51\r",
+ "9 32 52\r",
+ "9 32 53\r",
+ "9 32 54\r",
+ "9 32 55\r",
+ "9 32 56\r",
+ "9 32 57\r",
+ "9 32 58\r",
+ "9 33 1\r",
+ "9 33 2\r",
+ "9 33 3\r",
+ "9 33 4\r",
+ "9 33 5\r",
+ "9 33 6\r",
+ "9 33 7\r",
+ "9 33 8"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "9 33 9\r",
+ "9 33 10\r",
+ "9 33 11\r",
+ "9 33 12\r",
+ "9 33 13\r",
+ "9 33 14\r",
+ "9 33 15\r",
+ "9 33 16\r",
+ "9 33 17\r",
+ "9 33 18\r",
+ "9 33 19\r",
+ "9 33 20\r",
+ "9 33 21\r",
+ "9 33 22\r",
+ "9 33 23\r",
+ "9 33 24\r",
+ "9 33 25\r",
+ "9 33 26\r",
+ "9 33 27\r",
+ "9 33 28\r",
+ "9 33 29\r",
+ "9 33 30\r",
+ "9 33 31\r",
+ "9 33 32\r",
+ "9 33 33\r",
+ "9 33 34\r",
+ "9 33 35\r",
+ "9 33 36\r",
+ "9 33 37\r",
+ "9 33 38\r",
+ "9 33 39\r",
+ "9 33 40\r",
+ "9 33 41\r",
+ "9 33 42\r",
+ "9 33 43\r",
+ "9 33 44\r",
+ "9 33 45\r",
+ "9 33 46\r",
+ "9 33 47\r",
+ "9 33 48\r",
+ "9 33 49\r",
+ "9 33 50\r",
+ "9 33 51\r",
+ "9 33 52\r",
+ "9 33 53\r",
+ "9 33 54\r",
+ "9 33 55\r",
+ "9 33 56\r",
+ "9 33 57\r",
+ "9 33 58\r",
+ "9 34 1\r",
+ "9 34 2\r",
+ "9 34 3\r",
+ "9 34 4\r",
+ "9 34 5\r",
+ "9 34 6\r",
+ "9 34 7\r",
+ "9 34 8\r",
+ "9 34 9\r",
+ "9 34 10\r",
+ "9 34 11\r",
+ "9 34 12\r",
+ "9 34 13\r",
+ "9 34 14\r",
+ "9 34 15\r",
+ "9 34 16\r",
+ "9 34 17\r",
+ "9 34 18\r",
+ "9 34 19\r",
+ "9 34 20\r",
+ "9 34 21\r",
+ "9 34 22\r",
+ "9 34 23\r",
+ "9 34 24\r",
+ "9 34 25\r",
+ "9 34 26\r",
+ "9 34 27\r",
+ "9 34 28\r",
+ "9 34 29\r",
+ "9 34 30\r",
+ "9 34 31\r",
+ "9 34 32\r",
+ "9 34 33\r",
+ "9 34 34\r",
+ "9 34 35\r",
+ "9 34 36\r",
+ "9 34 37\r",
+ "9 34 38\r",
+ "9 34 39\r",
+ "9 34 40\r",
+ "9 34 41\r",
+ "9 34 42\r",
+ "9 34 43\r",
+ "9 34 44\r",
+ "9 34 45\r",
+ "9 34 46\r",
+ "9 34 47\r",
+ "9 34 48\r",
+ "9 34 49\r",
+ "9 34 50\r",
+ "9 34 51\r",
+ "9 34 52\r",
+ "9 34 53\r",
+ "9 34 54\r",
+ "9 34 55\r",
+ "9 34 56\r",
+ "9 34 57\r",
+ "9 34 58\r",
+ "9 35 1\r",
+ "9 35 2\r",
+ "9 35 3\r",
+ "9 35 4\r",
+ "9 35 5\r",
+ "9 35 6\r",
+ "9 35 7\r",
+ "9 35 8\r",
+ "9 35 9\r",
+ "9 35 10\r",
+ "9 35 11\r",
+ "9 35 12\r",
+ "9 35 13\r",
+ "9 35 14\r",
+ "9 35 15\r",
+ "9 35 16\r",
+ "9 35 17\r",
+ "9 35 18\r",
+ "9 35 19\r",
+ "9 35 20\r",
+ "9 35 21\r",
+ "9 35 22\r",
+ "9 35 23\r",
+ "9 35 24\r",
+ "9 35 25\r",
+ "9 35 26\r",
+ "9 35 27\r",
+ "9 35 28\r",
+ "9 35 29\r",
+ "9 35 30\r",
+ "9 35 31\r",
+ "9 35 32\r",
+ "9 35 33\r",
+ "9 35 34\r",
+ "9 35 35\r",
+ "9 35 36\r",
+ "9 35 37\r",
+ "9 35 38\r",
+ "9 35 39\r",
+ "9 35 40\r",
+ "9 35 41\r",
+ "9 35 42\r",
+ "9 35 43\r",
+ "9 35 44\r",
+ "9 35 45\r",
+ "9 35 46\r",
+ "9 35 47\r",
+ "9 35 48\r",
+ "9 35 49\r",
+ "9 35 50\r",
+ "9 35 51\r",
+ "9 35 52\r",
+ "9 35 53\r",
+ "9 35 54\r",
+ "9 35 55\r",
+ "9 35 56\r",
+ "9 35 57\r",
+ "9 35 58\r",
+ "9 36 1\r",
+ "9 36 2\r",
+ "9 36 3\r",
+ "9 36 4\r",
+ "9 36 5\r",
+ "9 36 6\r",
+ "9 36 7\r",
+ "9 36 8\r",
+ "9 36 9\r",
+ "9 36 10\r",
+ "9 36 11\r",
+ "9 36 12\r",
+ "9 36 13\r",
+ "9 36 14\r",
+ "9 36 15\r",
+ "9 36 16\r",
+ "9 36 17\r",
+ "9 36 18\r",
+ "9 36 19\r",
+ "9 36 20\r",
+ "9 36 21\r",
+ "9 36 22\r",
+ "9 36 23\r",
+ "9 36 24\r",
+ "9 36 25\r",
+ "9 36 26\r",
+ "9 36 27\r",
+ "9 36 28\r",
+ "9 36 29\r",
+ "9 36 30\r",
+ "9 36 31\r",
+ "9 36 32\r",
+ "9 36 33\r",
+ "9 36 34\r",
+ "9 36 35\r",
+ "9 36 36\r",
+ "9 36 37\r",
+ "9 36 38\r",
+ "9 36 39\r",
+ "9 36 40\r",
+ "9 36 41\r",
+ "9 36 42\r",
+ "9 36 43\r",
+ "9 36 44\r",
+ "9 36 45\r",
+ "9 36 46\r",
+ "9 36 47\r",
+ "9 36 48\r",
+ "9 36 49\r",
+ "9 36 50\r",
+ "9 36 51\r",
+ "9 36 52\r",
+ "9 36 53\r",
+ "9 36 54\r",
+ "9 36 55\r",
+ "9 36 56\r",
+ "9 36 57\r",
+ "9 36 58\r",
+ "9 37 1\r",
+ "9 37 2\r",
+ "9 37 3\r",
+ "9 37 4\r",
+ "9 37 5\r",
+ "9 37 6\r",
+ "9 37 7\r",
+ "9 37 8\r",
+ "9 37 9\r",
+ "9 37 10\r",
+ "9 37 11\r",
+ "9 37 12\r",
+ "9 37 13\r",
+ "9 37 14\r",
+ "9 37 15\r",
+ "9 37 16\r",
+ "9 37 17\r",
+ "9 37 18\r",
+ "9 37 19\r",
+ "9 37 20\r",
+ "9 37 21\r",
+ "9 37 22\r",
+ "9 37 23\r",
+ "9 37 24\r",
+ "9 37 25\r",
+ "9 37 26\r",
+ "9 37 27\r",
+ "9 37 28\r",
+ "9 37 29\r",
+ "9 37 30\r",
+ "9 37 31\r",
+ "9 37 32\r",
+ "9 37 33\r",
+ "9 37 34\r",
+ "9 37 35\r",
+ "9 37 36\r",
+ "9 37 37\r",
+ "9 37 38\r",
+ "9 37 39\r",
+ "9 37 40\r",
+ "9 37 41\r",
+ "9 37 42\r",
+ "9 37 43\r",
+ "9 37 44\r",
+ "9 37 45\r",
+ "9 37 46\r",
+ "9 37 47\r",
+ "9 37 48\r",
+ "9 37 49\r",
+ "9 37 50\r",
+ "9 37 51\r",
+ "9 37 52\r",
+ "9 37 53\r",
+ "9 37 54\r",
+ "9 37 55\r",
+ "9 37 56\r",
+ "9 37 57\r",
+ "9 37 58\r",
+ "9 38 1\r",
+ "9 38 2\r",
+ "9 38 3\r",
+ "9 38 4\r",
+ "9 38 5\r",
+ "9 38 6\r",
+ "9 38 7\r",
+ "9 38 8\r",
+ "9 38 9\r",
+ "9 38 10\r",
+ "9 38 11\r",
+ "9 38 12\r",
+ "9 38 13\r",
+ "9 38 14\r",
+ "9 38 15\r",
+ "9 38 16\r",
+ "9 38 17\r",
+ "9 38 18\r",
+ "9 38 19\r",
+ "9 38 20\r",
+ "9 38 21\r",
+ "9 38 22\r",
+ "9 38 23\r",
+ "9 38 24\r",
+ "9 38 25\r",
+ "9 38 26\r",
+ "9 38 27\r",
+ "9 38 28\r",
+ "9 38 29\r",
+ "9 38 30\r",
+ "9 38 31\r",
+ "9 38 32\r",
+ "9 38 33\r",
+ "9 38 34\r",
+ "9 38 35\r",
+ "9 38 36\r",
+ "9 38 37\r",
+ "9 38 38\r",
+ "9 38 39\r",
+ "9 38 40\r",
+ "9 38 41\r",
+ "9 38 42\r",
+ "9 38 43\r",
+ "9 38 44\r",
+ "9 38 45\r",
+ "9 38 46\r",
+ "9 38 47\r",
+ "9 38 48\r",
+ "9 38 49\r",
+ "9 38 50\r",
+ "9 38 51\r",
+ "9 38 52\r",
+ "9 38 53\r",
+ "9 38 54\r",
+ "9 38 55\r",
+ "9 38 56\r",
+ "9 38 57\r",
+ "9 38 58\r",
+ "9 39 1\r",
+ "9 39 2\r",
+ "9 39 3\r",
+ "9 39 4\r",
+ "9 39 5\r",
+ "9 39 6\r",
+ "9 39 7\r",
+ "9 39 8\r",
+ "9 39 9\r",
+ "9 39 10\r",
+ "9 39 11\r",
+ "9 39 12\r",
+ "9 39 13\r",
+ "9 39 14\r",
+ "9 39 15\r",
+ "9 39 16\r",
+ "9 39 17\r",
+ "9 39 18\r",
+ "9 39 19\r",
+ "9 39 20\r",
+ "9 39 21\r",
+ "9 39 22\r",
+ "9 39 23\r",
+ "9 39 24\r",
+ "9 39 25\r",
+ "9 39 26\r",
+ "9 39 27\r",
+ "9 39 28\r",
+ "9 39 29\r",
+ "9 39 30\r",
+ "9 39 31\r",
+ "9 39 32\r",
+ "9 39 33\r",
+ "9 39 34\r",
+ "9 39 35\r",
+ "9 39 36\r",
+ "9 39 37\r",
+ "9 39 38\r",
+ "9 39 39\r",
+ "9 39 40\r",
+ "9 39 41\r",
+ "9 39 42\r",
+ "9 39 43\r",
+ "9 39 44\r",
+ "9 39 45\r",
+ "9 39 46\r",
+ "9 39 47\r",
+ "9 39 48\r",
+ "9 39 49\r",
+ "9 39 50\r",
+ "9 39 51\r",
+ "9 39 52\r",
+ "9 39 53\r",
+ "9 39 54\r",
+ "9 39 55\r",
+ "9 39 56\r",
+ "9 39 57\r",
+ "9 39 58\r",
+ "9 40 1\r",
+ "9 40 2\r",
+ "9 40 3\r",
+ "9 40 4\r",
+ "9 40 5\r",
+ "9 40 6\r",
+ "9 40 7\r",
+ "9 40 8\r",
+ "9 40 9\r",
+ "9 40 10\r",
+ "9 40 11\r",
+ "9 40 12\r",
+ "9 40 13\r",
+ "9 40 14\r",
+ "9 40 15\r",
+ "9 40 16\r",
+ "9 40 17\r",
+ "9 40 18\r",
+ "9 40 19\r",
+ "9 40 20\r",
+ "9 40 21\r",
+ "9 40 22\r",
+ "9 40 23\r",
+ "9 40 24\r",
+ "9 40 25\r",
+ "9 40 26\r",
+ "9 40 27\r",
+ "9 40 28\r",
+ "9 40 29\r",
+ "9 40 30\r",
+ "9 40 31\r",
+ "9 40 32\r",
+ "9 40 33\r",
+ "9 40 34\r",
+ "9 40 35\r",
+ "9 40 36\r",
+ "9 40 37\r",
+ "9 40 38\r",
+ "9 40 39\r",
+ "9 40 40\r",
+ "9 40 41\r",
+ "9 40 42\r",
+ "9 40 43\r",
+ "9 40 44\r",
+ "9 40 45\r",
+ "9 40 46\r",
+ "9 40 47\r",
+ "9 40 48\r",
+ "9 40 49\r",
+ "9 40 50\r",
+ "9 40 51\r",
+ "9 40 52\r",
+ "9 40 53\r",
+ "9 40 54\r",
+ "9 40 55\r",
+ "9 40 56\r",
+ "9 40 57\r",
+ "9 40 58\r",
+ "9 41 1\r",
+ "9 41 2\r",
+ "9 41 3\r",
+ "9 41 4\r",
+ "9 41 5\r",
+ "9 41 6\r",
+ "9 41 7\r",
+ "9 41 8\r",
+ "9 41 9\r",
+ "9 41 10\r",
+ "9 41 11\r",
+ "9 41 12\r",
+ "9 41 13\r",
+ "9 41 14\r",
+ "9 41 15\r",
+ "9 41 16\r",
+ "9 41 17\r",
+ "9 41 18\r",
+ "9 41 19\r",
+ "9 41 20\r",
+ "9 41 21\r",
+ "9 41 22\r",
+ "9 41 23\r",
+ "9 41 24\r",
+ "9 41 25\r",
+ "9 41 26\r",
+ "9 41 27\r",
+ "9 41 28\r",
+ "9 41 29\r",
+ "9 41 30\r",
+ "9 41 31\r",
+ "9 41 32\r",
+ "9 41 33\r",
+ "9 41 34\r",
+ "9 41 35\r",
+ "9 41 36\r",
+ "9 41 37\r",
+ "9 41 38\r",
+ "9 41 39\r",
+ "9 41 40\r",
+ "9 41 41\r",
+ "9 41 42\r",
+ "9 41 43\r",
+ "9 41 44\r",
+ "9 41 45\r",
+ "9 41 46\r",
+ "9 41 47\r",
+ "9 41 48\r",
+ "9 41 49\r",
+ "9 41 50\r",
+ "9 41 51\r",
+ "9 41 52\r",
+ "9 41 53\r",
+ "9 41 54\r",
+ "9 41 55\r",
+ "9 41 56\r",
+ "9 41 57\r",
+ "9 41 58\r",
+ "9 42 1\r",
+ "9 42 2\r",
+ "9 42 3\r",
+ "9 42 4\r",
+ "9 42 5\r",
+ "9 42 6\r",
+ "9 42 7\r",
+ "9 42 8\r",
+ "9 42 9\r",
+ "9 42 10\r",
+ "9 42 11\r",
+ "9 42 12\r",
+ "9 42 13\r",
+ "9 42 14\r",
+ "9 42 15\r",
+ "9 42 16\r",
+ "9 42 17\r",
+ "9 42 18\r",
+ "9 42 19\r",
+ "9 42 20\r",
+ "9 42 21\r",
+ "9 42 22\r",
+ "9 42 23\r",
+ "9 42 24\r",
+ "9 42 25\r",
+ "9 42 26\r",
+ "9 42 27\r",
+ "9 42 28\r",
+ "9 42 29\r",
+ "9 42 30\r",
+ "9 42 31\r",
+ "9 42 32\r",
+ "9 42 33\r",
+ "9 42 34\r",
+ "9 42 35\r",
+ "9 42 36\r",
+ "9 42 37\r",
+ "9 42 38\r",
+ "9 42 39\r",
+ "9 42 40\r",
+ "9 42 41\r",
+ "9 42 42\r",
+ "9 42 43\r",
+ "9 42 44\r",
+ "9 42 45\r",
+ "9 42 46\r",
+ "9 42 47\r",
+ "9 42 48\r",
+ "9 42 49\r",
+ "9 42 50\r",
+ "9 42 51\r",
+ "9 42 52\r",
+ "9 42 53\r",
+ "9 42 54\r",
+ "9 42 55\r",
+ "9 42 56\r",
+ "9 42 57\r",
+ "9 42 58\r",
+ "9 43 1\r",
+ "9 43 2\r",
+ "9 43 3\r",
+ "9 43 4\r",
+ "9 43 5\r",
+ "9 43 6\r",
+ "9 43 7\r",
+ "9 43 8\r",
+ "9 43 9\r",
+ "9 43 10\r",
+ "9 43 11\r",
+ "9 43 12\r",
+ "9 43 13\r",
+ "9 43 14\r",
+ "9 43 15\r",
+ "9 43 16\r",
+ "9 43 17\r",
+ "9 43 18\r",
+ "9 43 19\r",
+ "9 43 20\r",
+ "9 43 21\r",
+ "9 43 22\r",
+ "9 43 23\r",
+ "9 43 24\r",
+ "9 43 25\r",
+ "9 43 26\r",
+ "9 43 27\r",
+ "9 43 28\r",
+ "9 43 29\r",
+ "9 43 30\r",
+ "9 43 31\r",
+ "9 43 32\r",
+ "9 43 33\r",
+ "9 43 34\r",
+ "9 43 35\r",
+ "9 43 36\r",
+ "9 43 37\r",
+ "9 43 38\r",
+ "9 43 39\r",
+ "9 43 40\r",
+ "9 43 41\r",
+ "9 43 42\r",
+ "9 43 43\r",
+ "9 43 44\r",
+ "9 43 45\r",
+ "9 43 46\r",
+ "9 43 47\r",
+ "9 43 48\r",
+ "9 43 49\r",
+ "9 43 50\r",
+ "9 43 51\r",
+ "9 43 52\r",
+ "9 43 53\r",
+ "9 43 54\r",
+ "9 43 55\r",
+ "9 43 56\r",
+ "9 43 57\r",
+ "9 43 58\r",
+ "9 44 1\r",
+ "9 44 2\r",
+ "9 44 3\r",
+ "9 44 4\r",
+ "9 44 5\r",
+ "9 44 6\r",
+ "9 44 7\r",
+ "9 44 8\r",
+ "9 44 9\r",
+ "9 44 10\r",
+ "9 44 11\r",
+ "9 44 12\r",
+ "9 44 13\r",
+ "9 44 14\r",
+ "9 44 15\r",
+ "9 44 16\r",
+ "9 44 17\r",
+ "9 44 18\r",
+ "9 44 19\r",
+ "9 44 20\r",
+ "9 44 21\r",
+ "9 44 22\r",
+ "9 44 23\r",
+ "9 44 24\r",
+ "9 44 25\r",
+ "9 44 26\r",
+ "9 44 27\r",
+ "9 44 28\r",
+ "9 44 29\r",
+ "9 44 30\r",
+ "9 44 31\r",
+ "9 44 32\r",
+ "9 44 33\r",
+ "9 44 34\r",
+ "9 44 35\r",
+ "9 44 36\r",
+ "9 44 37\r",
+ "9 44 38\r",
+ "9 44 39\r",
+ "9 44 40\r",
+ "9 44 41\r",
+ "9 44 42\r",
+ "9 44 43\r",
+ "9 44 44\r",
+ "9 44 45\r",
+ "9 44 46\r",
+ "9 44 47\r",
+ "9 44 48\r",
+ "9 44 49\r",
+ "9 44 50\r",
+ "9 44 51\r",
+ "9 44 52\r",
+ "9 44 53\r",
+ "9 44 54\r",
+ "9 44 55\r",
+ "9 44 56\r",
+ "9 44 57\r",
+ "9 44 58\r",
+ "9 45 1\r",
+ "9 45 2\r",
+ "9 45 3\r",
+ "9 45 4\r",
+ "9 45 5\r",
+ "9 45 6\r",
+ "9 45 7\r",
+ "9 45 8\r",
+ "9 45 9\r",
+ "9 45 10\r",
+ "9 45 11\r",
+ "9 45 12\r",
+ "9 45 13\r",
+ "9 45 14\r",
+ "9 45 15\r",
+ "9 45 16\r",
+ "9 45 17\r",
+ "9 45 18\r",
+ "9 45 19\r",
+ "9 45 20\r",
+ "9 45 21\r",
+ "9 45 22\r",
+ "9 45 23\r",
+ "9 45 24\r",
+ "9 45 25\r",
+ "9 45 26\r",
+ "9 45 27\r",
+ "9 45 28\r",
+ "9 45 29\r",
+ "9 45 30\r",
+ "9 45 31\r",
+ "9 45 32\r",
+ "9 45 33\r",
+ "9 45 34\r",
+ "9 45 35\r",
+ "9 45 36\r",
+ "9 45 37\r",
+ "9 45 38\r",
+ "9 45 39\r",
+ "9 45 40\r",
+ "9 45 41\r",
+ "9 45 42\r",
+ "9 45 43\r",
+ "9 45 44\r",
+ "9 45 45\r",
+ "9 45 46\r",
+ "9 45 47\r",
+ "9 45 48\r",
+ "9 45 49\r",
+ "9 45 50\r",
+ "9 45 51\r",
+ "9 45 52\r",
+ "9 45 53\r",
+ "9 45 54\r",
+ "9 45 55\r",
+ "9 45 56\r",
+ "9 45 57\r",
+ "9 45 58\r",
+ "9 46 1\r",
+ "9 46 2\r",
+ "9 46 3\r",
+ "9 46 4\r",
+ "9 46 5\r",
+ "9 46 6\r",
+ "9 46 7\r",
+ "9 46 8\r",
+ "9 46 9\r",
+ "9 46 10\r",
+ "9 46 11\r",
+ "9 46 12\r",
+ "9 46 13\r",
+ "9 46 14\r",
+ "9 46 15\r",
+ "9 46 16\r",
+ "9 46 17\r",
+ "9 46 18\r",
+ "9 46 19\r",
+ "9 46 20\r",
+ "9 46 21\r",
+ "9 46 22\r",
+ "9 46 23\r",
+ "9 46 24\r",
+ "9 46 25\r",
+ "9 46 26\r",
+ "9 46 27\r",
+ "9 46 28\r",
+ "9 46 29\r",
+ "9 46 30\r",
+ "9 46 31\r",
+ "9 46 32\r",
+ "9 46 33\r",
+ "9 46 34\r",
+ "9 46 35\r",
+ "9 46 36\r",
+ "9 46 37\r",
+ "9 46 38\r",
+ "9 46 39\r",
+ "9 46 40\r",
+ "9 46 41\r",
+ "9 46 42\r",
+ "9 46 43\r",
+ "9 46 44\r",
+ "9 46 45\r",
+ "9 46 46\r",
+ "9 46 47\r",
+ "9 46 48\r",
+ "9 46 49\r",
+ "9 46 50\r",
+ "9 46 51\r",
+ "9 46 52\r",
+ "9 46 53\r",
+ "9 46 54\r",
+ "9 46 55\r",
+ "9 46 56\r",
+ "9 46 57\r",
+ "9 46 58\r",
+ "9 47 1\r",
+ "9 47 2\r",
+ "9 47 3\r",
+ "9 47 4\r",
+ "9 47 5\r",
+ "9 47 6\r",
+ "9 47 7\r",
+ "9 47 8\r",
+ "9 47 9\r",
+ "9 47 10\r",
+ "9 47 11\r",
+ "9 47 12\r",
+ "9 47 13\r",
+ "9 47 14\r",
+ "9 47 15\r",
+ "9 47 16\r",
+ "9 47 17\r",
+ "9 47 18\r",
+ "9 47 19\r",
+ "9 47 20\r",
+ "9 47 21\r",
+ "9 47 22\r",
+ "9 47 23\r",
+ "9 47 24\r",
+ "9 47 25\r",
+ "9 47 26\r",
+ "9 47 27\r",
+ "9 47 28\r",
+ "9 47 29\r",
+ "9 47 30\r",
+ "9 47 31\r",
+ "9 47 32\r",
+ "9 47 33\r",
+ "9 47 34\r",
+ "9 47 35\r",
+ "9 47 36\r",
+ "9 47 37\r",
+ "9 47 38\r",
+ "9 47 39\r",
+ "9 47 40\r",
+ "9 47 41\r",
+ "9 47 42\r",
+ "9 47 43\r",
+ "9 47 44\r",
+ "9 47 45\r",
+ "9 47 46\r",
+ "9 47 47\r",
+ "9 47 48\r",
+ "9 47 49\r",
+ "9 47 50\r",
+ "9 47 51\r",
+ "9 47 52\r",
+ "9 47 53\r",
+ "9 47 54\r",
+ "9 47 55\r",
+ "9 47 56\r",
+ "9 47 57\r",
+ "9 47 58\r",
+ "9 48 1\r",
+ "9 48 2\r",
+ "9 48 3\r",
+ "9 48 4\r",
+ "9 48 5\r",
+ "9 48 6\r",
+ "9 48 7\r",
+ "9 48 8\r",
+ "9 48 9\r",
+ "9 48 10\r",
+ "9 48 11\r",
+ "9 48 12\r",
+ "9 48 13\r",
+ "9 48 14\r",
+ "9 48 15\r",
+ "9 48 16\r",
+ "9 48 17\r",
+ "9 48 18\r",
+ "9 48 19\r",
+ "9 48 20\r",
+ "9 48 21\r",
+ "9 48 22\r",
+ "9 48 23\r",
+ "9 48 24\r",
+ "9 48 25\r",
+ "9 48 26\r",
+ "9 48 27\r",
+ "9 48 28\r",
+ "9 48 29\r",
+ "9 48 30\r",
+ "9 48 31\r",
+ "9 48 32\r",
+ "9 48 33\r",
+ "9 48 34\r",
+ "9 48 35\r",
+ "9 48 36\r",
+ "9 48 37\r",
+ "9 48 38\r",
+ "9 48 39\r",
+ "9 48 40\r",
+ "9 48 41\r",
+ "9 48 42\r",
+ "9 48 43\r",
+ "9 48 44\r",
+ "9 48 45\r",
+ "9 48 46\r",
+ "9 48 47\r",
+ "9 48 48\r",
+ "9 48 49\r",
+ "9 48 50\r",
+ "9 48 51\r",
+ "9 48 52\r",
+ "9 48 53\r",
+ "9 48 54\r",
+ "9 48 55\r",
+ "9 48 56\r",
+ "9 48 57\r",
+ "9 48 58\r",
+ "9 49 1\r",
+ "9 49 2\r",
+ "9 49 3\r",
+ "9 49 4\r",
+ "9 49 5\r",
+ "9 49 6\r",
+ "9 49 7\r",
+ "9 49 8\r",
+ "9 49 9\r",
+ "9 49 10\r",
+ "9 49 11\r",
+ "9 49 12\r",
+ "9 49 13\r",
+ "9 49 14\r",
+ "9 49 15\r",
+ "9 49 16\r",
+ "9 49 17\r",
+ "9 49 18\r",
+ "9 49 19\r",
+ "9 49 20\r",
+ "9 49 21\r",
+ "9 49 22\r",
+ "9 49 23\r",
+ "9 49 24\r",
+ "9 49 25\r",
+ "9 49 26\r",
+ "9 49 27\r",
+ "9 49 28\r",
+ "9 49 29\r",
+ "9 49 30\r",
+ "9 49 31\r",
+ "9 49 32\r",
+ "9 49 33\r",
+ "9 49 34\r",
+ "9 49 35\r",
+ "9 49 36\r",
+ "9 49 37\r",
+ "9 49 38\r",
+ "9 49 39\r",
+ "9 49 40\r",
+ "9 49 41\r",
+ "9 49 42\r",
+ "9 49 43\r",
+ "9 49 44\r",
+ "9 49 45\r",
+ "9 49 46\r",
+ "9 49 47\r",
+ "9 49 48\r",
+ "9 49 49\r",
+ "9 49 50\r",
+ "9 49 51\r",
+ "9 49 52\r",
+ "9 49 53\r",
+ "9 49 54\r",
+ "9 49 55\r",
+ "9 49 56\r",
+ "9 49 57\r",
+ "9 49 58\r",
+ "9 50 1\r",
+ "9 50 2\r",
+ "9 50 3\r",
+ "9 50 4\r",
+ "9 50 5\r",
+ "9 50 6\r",
+ "9 50 7\r",
+ "9 50 8\r",
+ "9 50 9\r",
+ "9 50 10\r",
+ "9 50 11\r",
+ "9 50 12\r",
+ "9 50 13\r",
+ "9 50 14\r",
+ "9 50 15\r",
+ "9 50 16\r",
+ "9 50 17\r",
+ "9 50 18\r",
+ "9 50 19\r",
+ "9 50 20\r",
+ "9 50 21\r",
+ "9 50 22\r",
+ "9 50 23\r",
+ "9 50 24\r",
+ "9 50 25\r",
+ "9 50 26\r",
+ "9 50 27\r",
+ "9 50 28\r",
+ "9 50 29\r",
+ "9 50 30\r",
+ "9 50 31\r",
+ "9 50 32\r",
+ "9 50 33\r",
+ "9 50 34\r",
+ "9 50 35\r",
+ "9 50 36\r",
+ "9 50 37\r",
+ "9 50 38\r",
+ "9 50 39\r",
+ "9 50 40\r",
+ "9 50 41\r",
+ "9 50 42\r",
+ "9 50 43\r",
+ "9 50 44\r",
+ "9 50 45\r",
+ "9 50 46\r",
+ "9 50 47\r",
+ "9 50 48\r",
+ "9 50 49\r",
+ "9 50 50\r",
+ "9 50 51\r",
+ "9 50 52\r",
+ "9 50 53\r",
+ "9 50 54\r",
+ "9 50 55\r",
+ "9 50 56\r",
+ "9 50 57\r",
+ "9 50 58\r",
+ "9 51 1\r",
+ "9 51 2\r",
+ "9 51 3\r",
+ "9 51 4\r",
+ "9 51 5\r",
+ "9 51 6\r",
+ "9 51 7\r",
+ "9 51 8\r",
+ "9 51 9\r",
+ "9 51 10\r",
+ "9 51 11\r",
+ "9 51 12\r",
+ "9 51 13\r",
+ "9 51 14\r",
+ "9 51 15\r",
+ "9 51 16\r",
+ "9 51 17\r",
+ "9 51 18\r",
+ "9 51 19\r",
+ "9 51 20\r",
+ "9 51 21\r",
+ "9 51 22\r",
+ "9 51 23\r",
+ "9 51 24\r",
+ "9 51 25\r",
+ "9 51 26\r",
+ "9 51 27\r",
+ "9 51 28\r",
+ "9 51 29\r",
+ "9 51 30\r",
+ "9 51 31\r",
+ "9 51 32\r",
+ "9 51 33\r",
+ "9 51 34\r",
+ "9 51 35\r",
+ "9 51 36\r",
+ "9 51 37\r",
+ "9 51 38\r",
+ "9 51 39\r",
+ "9 51 40\r",
+ "9 51 41\r",
+ "9 51 42\r",
+ "9 51 43\r",
+ "9 51 44\r",
+ "9 51 45\r",
+ "9 51 46\r",
+ "9 51 47\r",
+ "9 51 48\r",
+ "9 51 49\r",
+ "9 51 50\r",
+ "9 51 51\r",
+ "9 51 52\r",
+ "9 51 53\r",
+ "9 51 54\r",
+ "9 51 55\r",
+ "9 51 56\r",
+ "9 51 57\r",
+ "9 51 58\r",
+ "9 52 1\r",
+ "9 52 2\r",
+ "9 52 3\r",
+ "9 52 4\r",
+ "9 52 5\r",
+ "9 52 6\r",
+ "9 52 7\r",
+ "9 52 8\r",
+ "9 52 9\r",
+ "9 52 10\r",
+ "9 52 11\r",
+ "9 52 12\r",
+ "9 52 13\r",
+ "9 52 14\r",
+ "9 52 15\r",
+ "9 52 16\r",
+ "9 52 17\r",
+ "9 52 18\r",
+ "9 52 19\r",
+ "9 52 20\r",
+ "9 52 21\r",
+ "9 52 22\r",
+ "9 52 23\r",
+ "9 52 24\r",
+ "9 52 25\r",
+ "9 52 26\r",
+ "9 52 27\r",
+ "9 52 28\r",
+ "9 52 29\r",
+ "9 52 30\r",
+ "9 52 31\r",
+ "9 52 32\r",
+ "9 52 33\r",
+ "9 52 34\r",
+ "9 52 35\r",
+ "9 52 36\r",
+ "9 52 37\r",
+ "9 52 38\r",
+ "9 52 39\r",
+ "9 52 40\r",
+ "9 52 41\r",
+ "9 52 42\r",
+ "9 52 43\r",
+ "9 52 44\r",
+ "9 52 45\r",
+ "9 52 46\r",
+ "9 52 47\r",
+ "9 52 48\r",
+ "9 52 49\r",
+ "9 52 50\r",
+ "9 52 51\r",
+ "9 52 52\r",
+ "9 52 53\r",
+ "9 52 54\r",
+ "9 52 55\r",
+ "9 52 56\r",
+ "9 52 57\r",
+ "9 52 58\r",
+ "9 53 1\r",
+ "9 53 2\r",
+ "9 53 3\r",
+ "9 53 4\r",
+ "9 53 5\r",
+ "9 53 6\r",
+ "9 53 7\r",
+ "9 53 8\r",
+ "9 53 9\r",
+ "9 53 10\r",
+ "9 53 11\r",
+ "9 53 12\r",
+ "9 53 13\r",
+ "9 53 14\r",
+ "9 53 15\r",
+ "9 53 16\r",
+ "9 53 17\r",
+ "9 53 18\r",
+ "9 53 19\r",
+ "9 53 20\r",
+ "9 53 21\r",
+ "9 53 22\r",
+ "9 53 23\r",
+ "9 53 24\r",
+ "9 53 25\r",
+ "9 53 26\r",
+ "9 53 27\r",
+ "9 53 28\r",
+ "9 53 29\r",
+ "9 53 30\r",
+ "9 53 31\r",
+ "9 53 32\r",
+ "9 53 33\r",
+ "9 53 34\r",
+ "9 53 35\r",
+ "9 53 36\r",
+ "9 53 37\r",
+ "9 53 38\r",
+ "9 53 39\r",
+ "9 53 40\r",
+ "9 53 41\r",
+ "9 53 42\r",
+ "9 53 43\r",
+ "9 53 44\r",
+ "9 53 45\r",
+ "9 53 46\r",
+ "9 53 47\r",
+ "9 53 48\r",
+ "9 53 49\r",
+ "9 53 50\r",
+ "9 53 51\r",
+ "9 53 52\r",
+ "9 53 53\r",
+ "9 53 54\r",
+ "9 53 55\r",
+ "9 53 56\r",
+ "9 53 57\r",
+ "9 53 58\r",
+ "9 54 1\r",
+ "9 54 2\r",
+ "9 54 3\r",
+ "9 54 4\r",
+ "9 54 5\r",
+ "9 54 6\r",
+ "9 54 7\r",
+ "9 54 8\r",
+ "9 54 9\r",
+ "9 54 10\r",
+ "9 54 11\r",
+ "9 54 12\r",
+ "9 54 13\r",
+ "9 54 14\r",
+ "9 54 15\r",
+ "9 54 16\r",
+ "9 54 17\r",
+ "9 54 18\r",
+ "9 54 19\r",
+ "9 54 20\r",
+ "9 54 21\r",
+ "9 54 22\r",
+ "9 54 23\r",
+ "9 54 24\r",
+ "9 54 25\r",
+ "9 54 26\r",
+ "9 54 27\r",
+ "9 54 28\r",
+ "9 54 29\r",
+ "9 54 30\r",
+ "9 54 31\r",
+ "9 54 32\r",
+ "9 54 33\r",
+ "9 54 34\r",
+ "9 54 35\r",
+ "9 54 36\r",
+ "9 54 37\r",
+ "9 54 38\r",
+ "9 54 39\r",
+ "9 54 40\r",
+ "9 54 41\r",
+ "9 54 42\r",
+ "9 54 43\r",
+ "9 54 44\r",
+ "9 54 45\r",
+ "9 54 46\r",
+ "9 54 47\r",
+ "9 54 48\r",
+ "9 54 49\r",
+ "9 54 50\r",
+ "9 54 51\r",
+ "9 54 52\r",
+ "9 54 53\r",
+ "9 54 54\r",
+ "9 54 55\r",
+ "9 54 56\r",
+ "9 54 57\r",
+ "9 54 58\r",
+ "9 55 1\r",
+ "9 55 2\r",
+ "9 55 3\r",
+ "9 55 4\r",
+ "9 55 5\r",
+ "9 55 6\r",
+ "9 55 7\r",
+ "9 55 8\r",
+ "9 55 9\r",
+ "9 55 10\r",
+ "9 55 11\r",
+ "9 55 12\r",
+ "9 55 13\r",
+ "9 55 14\r",
+ "9 55 15\r",
+ "9 55 16\r",
+ "9 55 17\r",
+ "9 55 18\r",
+ "9 55 19\r",
+ "9 55 20\r",
+ "9 55 21\r",
+ "9 55 22\r",
+ "9 55 23\r",
+ "9 55 24\r",
+ "9 55 25\r",
+ "9 55 26\r",
+ "9 55 27\r",
+ "9 55 28\r",
+ "9 55 29\r",
+ "9 55 30\r",
+ "9 55 31\r",
+ "9 55 32\r",
+ "9 55 33\r",
+ "9 55 34\r",
+ "9 55 35\r",
+ "9 55 36\r",
+ "9 55 37\r",
+ "9 55 38\r",
+ "9 55 39\r",
+ "9 55 40\r",
+ "9 55 41\r",
+ "9 55 42\r",
+ "9 55 43\r",
+ "9 55 44\r",
+ "9 55 45\r",
+ "9 55 46\r",
+ "9 55 47\r",
+ "9 55 48\r",
+ "9 55 49\r",
+ "9 55 50\r",
+ "9 55 51\r",
+ "9 55 52\r",
+ "9 55 53\r",
+ "9 55 54\r",
+ "9 55 55\r",
+ "9 55 56\r",
+ "9 55 57\r",
+ "9 55 58\r",
+ "9 56 1\r",
+ "9 56 2\r",
+ "9 56 3\r",
+ "9 56 4\r",
+ "9 56 5\r",
+ "9 56 6\r",
+ "9 56 7\r",
+ "9 56 8\r",
+ "9 56 9\r",
+ "9 56 10\r",
+ "9 56 11\r",
+ "9 56 12\r",
+ "9 56 13\r",
+ "9 56 14\r",
+ "9 56 15\r",
+ "9 56 16\r",
+ "9 56 17\r",
+ "9 56 18\r",
+ "9 56 19\r",
+ "9 56 20\r",
+ "9 56 21\r",
+ "9 56 22\r",
+ "9 56 23\r",
+ "9 56 24\r",
+ "9 56 25\r",
+ "9 56 26\r",
+ "9 56 27\r",
+ "9 56 28\r",
+ "9 56 29\r",
+ "9 56 30\r",
+ "9 56 31\r",
+ "9 56 32\r",
+ "9 56 33\r",
+ "9 56 34\r",
+ "9 56 35\r",
+ "9 56 36\r",
+ "9 56 37\r",
+ "9 56 38\r",
+ "9 56 39\r",
+ "9 56 40\r",
+ "9 56 41\r",
+ "9 56 42\r",
+ "9 56 43\r",
+ "9 56 44\r",
+ "9 56 45\r",
+ "9 56 46\r",
+ "9 56 47\r",
+ "9 56 48\r",
+ "9 56 49\r",
+ "9 56 50\r",
+ "9 56 51\r",
+ "9 56 52\r",
+ "9 56 53\r",
+ "9 56 54\r",
+ "9 56 55\r",
+ "9 56 56\r",
+ "9 56 57\r",
+ "9 56 58\r",
+ "9 57 1\r",
+ "9 57 2\r",
+ "9 57 3\r",
+ "9 57 4\r",
+ "9 57 5\r",
+ "9 57 6\r",
+ "9 57 7\r",
+ "9 57 8\r",
+ "9 57 9\r",
+ "9 57 10\r",
+ "9 57 11\r",
+ "9 57 12\r",
+ "9 57 13\r",
+ "9 57 14\r",
+ "9 57 15\r",
+ "9 57 16\r",
+ "9 57 17\r",
+ "9 57 18\r",
+ "9 57 19\r",
+ "9 57 20\r",
+ "9 57 21\r",
+ "9 57 22\r",
+ "9 57 23\r",
+ "9 57 24\r",
+ "9 57 25\r",
+ "9 57 26\r",
+ "9 57 27\r",
+ "9 57 28\r",
+ "9 57 29\r",
+ "9 57 30\r",
+ "9 57 31\r",
+ "9 57 32\r",
+ "9 57 33\r",
+ "9 57 34\r",
+ "9 57 35\r",
+ "9 57 36\r",
+ "9 57 37\r",
+ "9 57 38\r",
+ "9 57 39\r",
+ "9 57 40\r",
+ "9 57 41\r",
+ "9 57 42\r",
+ "9 57 43\r",
+ "9 57 44\r",
+ "9 57 45\r",
+ "9 57 46\r",
+ "9 57 47\r",
+ "9 57 48\r",
+ "9 57 49\r",
+ "9 57 50\r",
+ "9 57 51\r",
+ "9 57 52\r",
+ "9 57 53\r",
+ "9 57 54\r",
+ "9 57 55\r",
+ "9 57 56\r",
+ "9 57 57\r",
+ "9 57 58\r",
+ "9 58 1\r",
+ "9 58 2\r",
+ "9 58 3\r",
+ "9 58 4\r",
+ "9 58 5\r",
+ "9 58 6\r",
+ "9 58 7\r",
+ "9 58 8\r",
+ "9 58 9\r",
+ "9 58 10\r",
+ "9 58 11\r",
+ "9 58 12\r",
+ "9 58 13\r",
+ "9 58 14\r",
+ "9 58 15\r",
+ "9 58 16\r",
+ "9 58 17\r",
+ "9 58 18\r",
+ "9 58 19\r",
+ "9 58 20\r",
+ "9 58 21\r",
+ "9 58 22\r",
+ "9 58 23\r",
+ "9 58 24\r",
+ "9 58 25\r",
+ "9 58 26\r",
+ "9 58 27\r",
+ "9 58 28\r",
+ "9 58 29\r",
+ "9 58 30\r",
+ "9 58 31\r",
+ "9 58 32\r",
+ "9 58 33\r",
+ "9 58 34\r",
+ "9 58 35\r",
+ "9 58 36\r",
+ "9 58 37\r",
+ "9 58 38\r",
+ "9 58 39\r",
+ "9 58 40\r",
+ "9 58 41\r",
+ "9 58 42\r",
+ "9 58 43\r",
+ "9 58 44\r",
+ "9 58 45\r",
+ "9 58 46\r",
+ "9 58 47\r",
+ "9 58 48\r",
+ "9 58 49\r",
+ "9 58 50\r",
+ "9 58 51\r",
+ "9 58 52\r",
+ "9 58 53\r",
+ "9 58 54\r",
+ "9 58 55\r",
+ "9 58 56\r",
+ "9 58 57\r",
+ "9 58 58\r",
+ "10 1 1\r",
+ "10 1 2\r",
+ "10 1 3\r",
+ "10 1 4\r",
+ "10 1 5\r",
+ "10 1 6\r",
+ "10 1 7\r",
+ "10 1 8\r",
+ "10 1 9\r",
+ "10 1 10\r",
+ "10 1 11\r",
+ "10 1 12\r",
+ "10 1 13\r",
+ "10 1 14\r",
+ "10 1 15\r",
+ "10 1 16\r",
+ "10 1 17\r",
+ "10 1 18\r",
+ "10 1 19\r",
+ "10 1 20\r",
+ "10 1 21\r",
+ "10 1 22\r",
+ "10 1 23\r",
+ "10 1 24\r",
+ "10 1 25\r",
+ "10 1 26\r",
+ "10 1 27\r",
+ "10 1 28\r",
+ "10 1 29\r",
+ "10 1 30\r",
+ "10 1 31\r",
+ "10 1 32\r",
+ "10 1 33\r",
+ "10 1 34\r",
+ "10 1 35\r",
+ "10 1 36\r",
+ "10 1 37\r",
+ "10 1 38\r",
+ "10 1 39\r",
+ "10 1 40\r",
+ "10 1 41\r",
+ "10 1 42\r",
+ "10 1 43\r",
+ "10 1 44\r",
+ "10 1 45\r",
+ "10 1 46\r",
+ "10 1 47\r",
+ "10 1 48\r",
+ "10 1 49\r",
+ "10 1 50\r",
+ "10 1 51\r",
+ "10 1 52\r",
+ "10 1 53\r",
+ "10 1 54\r",
+ "10 1 55\r",
+ "10 1 56\r",
+ "10 1 57\r",
+ "10 1 58\r",
+ "10 2 1\r",
+ "10 2 2\r",
+ "10 2 3\r",
+ "10 2 4\r",
+ "10 2 5\r",
+ "10 2 6\r",
+ "10 2 7\r",
+ "10 2 8\r",
+ "10 2 9\r",
+ "10 2 10\r",
+ "10 2 11\r",
+ "10 2 12\r",
+ "10 2 13\r",
+ "10 2 14\r",
+ "10 2 15\r",
+ "10 2 16\r",
+ "10 2 17\r",
+ "10 2 18\r",
+ "10 2 19\r",
+ "10 2 20\r",
+ "10 2 21\r",
+ "10 2 22\r",
+ "10 2 23\r",
+ "10 2 24\r",
+ "10 2 25\r",
+ "10 2 26\r",
+ "10 2 27\r",
+ "10 2 28\r",
+ "10 2 29\r",
+ "10 2 30\r",
+ "10 2 31\r",
+ "10 2 32\r",
+ "10 2 33\r",
+ "10 2 34\r",
+ "10 2 35\r",
+ "10 2 36\r",
+ "10 2 37\r",
+ "10 2 38\r",
+ "10 2 39\r",
+ "10 2 40\r",
+ "10 2 41\r",
+ "10 2 42\r",
+ "10 2 43\r",
+ "10 2 44\r",
+ "10 2 45\r",
+ "10 2 46\r",
+ "10 2 47\r",
+ "10 2 48\r",
+ "10 2 49\r",
+ "10 2 50\r",
+ "10 2 51\r",
+ "10 2 52\r",
+ "10 2 53\r",
+ "10 2 54\r",
+ "10 2 55\r",
+ "10 2 56\r",
+ "10 2 57\r",
+ "10 2 58\r",
+ "10 3 1\r",
+ "10 3 2\r",
+ "10 3 3\r",
+ "10 3 4\r",
+ "10 3 5\r",
+ "10 3 6\r",
+ "10 3 7\r",
+ "10 3 8\r",
+ "10 3 9\r",
+ "10 3 10\r",
+ "10 3 11\r",
+ "10 3 12\r",
+ "10 3 13\r",
+ "10 3 14\r",
+ "10 3 15\r",
+ "10 3 16\r",
+ "10 3 17\r",
+ "10 3 18\r",
+ "10 3 19\r",
+ "10 3 20\r",
+ "10 3 21\r",
+ "10 3 22\r",
+ "10 3 23\r",
+ "10 3 24\r",
+ "10 3 25\r",
+ "10 3 26\r",
+ "10 3 27\r",
+ "10 3 28\r",
+ "10 3 29\r",
+ "10 3 30\r",
+ "10 3 31\r",
+ "10 3 32\r",
+ "10 3 33\r",
+ "10 3 34\r",
+ "10 3 35\r",
+ "10 3 36\r",
+ "10 3 37\r",
+ "10 3 38\r",
+ "10 3 39\r",
+ "10 3 40\r",
+ "10 3 41\r",
+ "10 3 42\r",
+ "10 3 43\r",
+ "10 3 44\r",
+ "10 3 45\r",
+ "10 3 46\r",
+ "10 3 47\r",
+ "10 3 48\r",
+ "10 3 49\r",
+ "10 3 50\r",
+ "10 3 51\r",
+ "10 3 52\r",
+ "10 3 53\r",
+ "10 3 54\r",
+ "10 3 55\r",
+ "10 3 56\r",
+ "10 3 57\r",
+ "10 3 58\r",
+ "10 4 1\r",
+ "10 4 2\r",
+ "10 4 3\r",
+ "10 4 4\r",
+ "10 4 5\r",
+ "10 4 6\r",
+ "10 4 7\r",
+ "10 4 8\r",
+ "10 4 9\r",
+ "10 4 10\r",
+ "10 4 11\r",
+ "10 4 12\r",
+ "10 4 13\r",
+ "10 4 14\r",
+ "10 4 15\r",
+ "10 4 16\r",
+ "10 4 17\r",
+ "10 4 18\r",
+ "10 4 19\r",
+ "10 4 20\r",
+ "10 4 21\r",
+ "10 4 22\r",
+ "10 4 23\r",
+ "10 4 24\r",
+ "10 4 25\r",
+ "10 4 26\r",
+ "10 4 27\r",
+ "10 4 28\r",
+ "10 4 29\r",
+ "10 4 30\r",
+ "10 4 31\r",
+ "10 4 32\r",
+ "10 4 33\r",
+ "10 4 34\r",
+ "10 4 35\r",
+ "10 4 36\r",
+ "10 4 37\r",
+ "10 4 38\r",
+ "10 4 39\r",
+ "10 4 40\r",
+ "10 4 41\r",
+ "10 4 42\r",
+ "10 4 43\r",
+ "10 4 44\r",
+ "10 4 45\r",
+ "10 4 46\r",
+ "10 4 47\r",
+ "10 4 48\r",
+ "10 4 49\r",
+ "10 4 50\r",
+ "10 4 51\r",
+ "10 4 52\r",
+ "10 4 53\r",
+ "10 4 54\r",
+ "10 4 55\r",
+ "10 4 56\r",
+ "10 4 57\r",
+ "10 4 58\r",
+ "10 5 1\r",
+ "10 5 2\r",
+ "10 5 3\r",
+ "10 5 4\r",
+ "10 5 5\r",
+ "10 5 6\r",
+ "10 5 7\r",
+ "10 5 8\r",
+ "10 5 9\r",
+ "10 5 10\r",
+ "10 5 11\r",
+ "10 5 12\r",
+ "10 5 13\r",
+ "10 5 14\r",
+ "10 5 15\r",
+ "10 5 16\r",
+ "10 5 17\r",
+ "10 5 18\r",
+ "10 5 19\r",
+ "10 5 20\r",
+ "10 5 21\r",
+ "10 5 22\r",
+ "10 5 23\r",
+ "10 5 24\r",
+ "10 5 25\r",
+ "10 5 26\r",
+ "10 5 27\r",
+ "10 5 28\r",
+ "10 5 29\r",
+ "10 5 30\r",
+ "10 5 31\r",
+ "10 5 32\r",
+ "10 5 33\r",
+ "10 5 34\r",
+ "10 5 35\r",
+ "10 5 36\r",
+ "10 5 37\r",
+ "10 5 38\r",
+ "10 5 39\r",
+ "10 5 40\r",
+ "10 5 41\r",
+ "10 5 42\r",
+ "10 5 43\r",
+ "10 5 44\r",
+ "10 5 45\r",
+ "10 5 46\r",
+ "10 5 47\r",
+ "10 5 48\r",
+ "10 5 49\r",
+ "10 5 50\r",
+ "10 5 51\r",
+ "10 5 52\r",
+ "10 5 53\r",
+ "10 5 54\r",
+ "10 5 55\r",
+ "10 5 56\r",
+ "10 5 57\r",
+ "10 5 58\r",
+ "10 6 1\r",
+ "10 6 2\r",
+ "10 6 3\r",
+ "10 6 4\r",
+ "10 6 5\r",
+ "10 6 6\r",
+ "10 6 7\r",
+ "10 6 8\r",
+ "10 6 9\r",
+ "10 6 10\r",
+ "10 6 11\r",
+ "10 6 12\r",
+ "10 6 13\r",
+ "10 6 14\r",
+ "10 6 15\r",
+ "10 6 16\r",
+ "10 6 17\r",
+ "10 6 18\r",
+ "10 6 19\r",
+ "10 6 20\r",
+ "10 6 21\r",
+ "10 6 22\r",
+ "10 6 23\r",
+ "10 6 24\r",
+ "10 6 25\r",
+ "10 6 26\r",
+ "10 6 27\r",
+ "10 6 28\r",
+ "10 6 29\r",
+ "10 6 30\r",
+ "10 6 31\r",
+ "10 6 32\r",
+ "10 6 33\r",
+ "10 6 34\r",
+ "10 6 35\r",
+ "10 6 36\r",
+ "10 6 37\r",
+ "10 6 38\r",
+ "10 6 39\r",
+ "10 6 40\r",
+ "10 6 41\r",
+ "10 6 42\r",
+ "10 6 43\r",
+ "10 6 44\r",
+ "10 6 45\r",
+ "10 6 46\r",
+ "10 6 47\r",
+ "10 6 48\r",
+ "10 6 49\r",
+ "10 6 50\r",
+ "10 6 51\r",
+ "10 6 52\r",
+ "10 6 53\r",
+ "10 6 54\r",
+ "10 6 55\r",
+ "10 6 56\r",
+ "10 6 57\r",
+ "10 6 58\r",
+ "10 7 1\r",
+ "10 7 2\r",
+ "10 7 3\r",
+ "10 7 4\r",
+ "10 7 5\r",
+ "10 7 6\r",
+ "10 7 7\r",
+ "10 7 8\r",
+ "10 7 9\r",
+ "10 7 10\r",
+ "10 7 11\r",
+ "10 7 12\r",
+ "10 7 13\r",
+ "10 7 14\r",
+ "10 7 15\r",
+ "10 7 16\r",
+ "10 7 17\r",
+ "10 7 18\r",
+ "10 7 19\r",
+ "10 7 20\r",
+ "10 7 21\r",
+ "10 7 22\r",
+ "10 7 23\r",
+ "10 7 24\r",
+ "10 7 25\r",
+ "10 7 26\r",
+ "10 7 27\r",
+ "10 7 28\r",
+ "10 7 29\r",
+ "10 7 30\r",
+ "10 7 31\r",
+ "10 7 32\r",
+ "10 7 33\r",
+ "10 7 34\r",
+ "10 7 35\r",
+ "10 7 36\r",
+ "10 7 37\r",
+ "10 7 38\r",
+ "10 7 39\r",
+ "10 7 40\r",
+ "10 7 41\r",
+ "10 7 42\r",
+ "10 7 43\r",
+ "10 7 44\r",
+ "10 7 45\r",
+ "10 7 46\r",
+ "10 7 47\r",
+ "10 7 48\r",
+ "10 7 49\r",
+ "10 7 50\r",
+ "10 7 51\r",
+ "10 7 52\r",
+ "10 7 53\r",
+ "10 7 54\r",
+ "10 7 55\r",
+ "10 7 56\r",
+ "10 7 57\r",
+ "10 7 58\r",
+ "10 8 1\r",
+ "10 8 2\r",
+ "10 8 3\r",
+ "10 8 4\r",
+ "10 8 5\r",
+ "10 8 6\r",
+ "10 8 7\r",
+ "10 8 8\r",
+ "10 8 9\r",
+ "10 8 10\r",
+ "10 8 11\r",
+ "10 8 12\r",
+ "10 8 13\r",
+ "10 8 14\r",
+ "10 8 15\r",
+ "10 8 16\r",
+ "10 8 17\r",
+ "10 8 18\r",
+ "10 8 19\r",
+ "10 8 20\r",
+ "10 8 21\r",
+ "10 8 22\r",
+ "10 8 23\r",
+ "10 8 24\r",
+ "10 8 25\r",
+ "10 8 26\r",
+ "10 8 27\r",
+ "10 8 28\r",
+ "10 8 29\r",
+ "10 8 30\r",
+ "10 8 31\r",
+ "10 8 32\r",
+ "10 8 33\r",
+ "10 8 34\r",
+ "10 8 35\r",
+ "10 8 36\r",
+ "10 8 37\r",
+ "10 8 38\r",
+ "10 8 39\r",
+ "10 8 40\r",
+ "10 8 41\r",
+ "10 8 42\r",
+ "10 8 43\r",
+ "10 8 44\r",
+ "10 8 45\r",
+ "10 8 46\r",
+ "10 8 47\r",
+ "10 8 48\r",
+ "10 8 49\r",
+ "10 8 50\r",
+ "10 8 51\r",
+ "10 8 52\r",
+ "10 8 53\r",
+ "10 8 54\r",
+ "10 8 55\r",
+ "10 8 56\r",
+ "10 8 57\r",
+ "10 8 58\r",
+ "10 9 1\r",
+ "10 9 2\r",
+ "10 9 3\r",
+ "10 9 4\r",
+ "10 9 5\r",
+ "10 9 6\r",
+ "10 9 7\r",
+ "10 9 8\r",
+ "10 9 9\r",
+ "10 9 10\r",
+ "10 9 11\r",
+ "10 9 12\r",
+ "10 9 13\r",
+ "10 9 14\r",
+ "10 9 15\r",
+ "10 9 16\r",
+ "10 9 17\r",
+ "10 9 18\r",
+ "10 9 19\r",
+ "10 9 20\r",
+ "10 9 21\r",
+ "10 9 22\r",
+ "10 9 23\r",
+ "10 9 24\r",
+ "10 9 25\r",
+ "10 9 26\r",
+ "10 9 27\r",
+ "10 9 28\r",
+ "10 9 29\r",
+ "10 9 30\r",
+ "10 9 31\r",
+ "10 9 32\r",
+ "10 9 33\r",
+ "10 9 34\r",
+ "10 9 35\r",
+ "10 9 36\r",
+ "10 9 37\r",
+ "10 9 38\r",
+ "10 9 39\r",
+ "10 9 40\r",
+ "10 9 41\r",
+ "10 9 42\r",
+ "10 9 43\r",
+ "10 9 44\r",
+ "10 9 45\r",
+ "10 9 46\r",
+ "10 9 47\r",
+ "10 9 48\r",
+ "10 9 49\r",
+ "10 9 50\r",
+ "10 9 51\r",
+ "10 9 52\r",
+ "10 9 53\r",
+ "10 9 54\r",
+ "10 9 55\r",
+ "10 9 56\r",
+ "10 9 57\r",
+ "10 9 58\r",
+ "10 10 1\r",
+ "10 10 2\r",
+ "10 10 3\r",
+ "10 10 4\r",
+ "10 10 5\r",
+ "10 10 6\r",
+ "10 10 7\r",
+ "10 10 8\r",
+ "10 10 9\r",
+ "10 10 10\r",
+ "10 10 11\r",
+ "10 10 12\r",
+ "10 10 13\r",
+ "10 10 14\r",
+ "10 10 15\r",
+ "10 10 16\r",
+ "10 10 17\r",
+ "10 10 18\r",
+ "10 10 19\r",
+ "10 10 20\r",
+ "10 10 21\r",
+ "10 10 22\r",
+ "10 10 23\r",
+ "10 10 24\r",
+ "10 10 25\r",
+ "10 10 26\r",
+ "10 10 27\r",
+ "10 10 28\r",
+ "10 10 29\r",
+ "10 10 30\r",
+ "10 10 31\r",
+ "10 10 32\r",
+ "10 10 33\r",
+ "10 10 34\r",
+ "10 10 35\r",
+ "10 10 36\r",
+ "10 10 37\r",
+ "10 10 38\r",
+ "10 10 39\r",
+ "10 10 40\r",
+ "10 10 41\r",
+ "10 10 42\r",
+ "10 10 43\r",
+ "10 10 44\r",
+ "10 10 45\r",
+ "10 10 46\r",
+ "10 10 47\r",
+ "10 10 48\r",
+ "10 10 49\r",
+ "10 10 50\r",
+ "10 10 51\r",
+ "10 10 52\r",
+ "10 10 53\r",
+ "10 10 54\r",
+ "10 10 55\r",
+ "10 10 56\r",
+ "10 10 57\r",
+ "10 10 58\r",
+ "10 11 1\r",
+ "10 11 2\r",
+ "10 11 3\r",
+ "10 11 4\r",
+ "10 11 5\r",
+ "10 11 6\r",
+ "10 11 7\r",
+ "10 11 8\r",
+ "10 11 9\r",
+ "10 11 10\r",
+ "10 11 11\r",
+ "10 11 12\r",
+ "10 11 13\r",
+ "10 11 14\r",
+ "10 11 15\r",
+ "10 11 16\r",
+ "10 11 17\r",
+ "10 11 18\r",
+ "10 11 19\r",
+ "10 11 20\r",
+ "10 11 21\r",
+ "10 11 22\r",
+ "10 11 23\r",
+ "10 11 24\r",
+ "10 11 25\r",
+ "10 11 26\r",
+ "10 11 27\r",
+ "10 11 28\r",
+ "10 11 29\r",
+ "10 11 30\r",
+ "10 11 31\r",
+ "10 11 32\r",
+ "10 11 33\r",
+ "10 11 34\r",
+ "10 11 35\r",
+ "10 11 36\r",
+ "10 11 37\r",
+ "10 11 38\r",
+ "10 11 39\r",
+ "10 11 40\r",
+ "10 11 41\r",
+ "10 11 42\r",
+ "10 11 43\r",
+ "10 11 44\r",
+ "10 11 45\r",
+ "10 11 46\r",
+ "10 11 47\r",
+ "10 11 48\r",
+ "10 11 49\r",
+ "10 11 50\r",
+ "10 11 51\r",
+ "10 11 52\r",
+ "10 11 53\r",
+ "10 11 54\r",
+ "10 11 55\r",
+ "10 11 56\r",
+ "10 11 57\r",
+ "10 11 58\r",
+ "10 12 1\r",
+ "10 12 2\r",
+ "10 12 3\r",
+ "10 12 4\r",
+ "10 12 5\r",
+ "10 12 6\r",
+ "10 12 7\r",
+ "10 12 8\r",
+ "10 12 9\r",
+ "10 12 10\r",
+ "10 12 11\r",
+ "10 12 12\r",
+ "10 12 13\r",
+ "10 12 14\r",
+ "10 12 15\r",
+ "10 12 16\r",
+ "10 12 17\r",
+ "10 12 18\r",
+ "10 12 19\r",
+ "10 12 20\r",
+ "10 12 21\r",
+ "10 12 22\r",
+ "10 12 23\r",
+ "10 12 24\r",
+ "10 12 25\r",
+ "10 12 26\r",
+ "10 12 27\r",
+ "10 12 28\r",
+ "10 12 29\r",
+ "10 12 30\r",
+ "10 12 31\r",
+ "10 12 32\r",
+ "10 12 33\r",
+ "10 12 34\r",
+ "10 12 35\r",
+ "10 12 36\r",
+ "10 12 37\r",
+ "10 12 38\r",
+ "10 12 39\r",
+ "10 12 40\r",
+ "10 12 41\r",
+ "10 12 42\r",
+ "10 12 43\r",
+ "10 12 44\r",
+ "10 12 45\r",
+ "10 12 46\r",
+ "10 12 47\r",
+ "10 12 48\r",
+ "10 12 49\r",
+ "10 12 50\r",
+ "10 12 51\r",
+ "10 12 52\r",
+ "10 12 53\r",
+ "10 12 54\r",
+ "10 12 55\r",
+ "10 12 56\r",
+ "10 12 57\r",
+ "10 12 58\r",
+ "10 13 1\r",
+ "10 13 2\r",
+ "10 13 3\r",
+ "10 13 4\r",
+ "10 13 5\r",
+ "10 13 6\r",
+ "10 13 7\r",
+ "10 13 8\r",
+ "10 13 9\r",
+ "10 13 10\r",
+ "10 13 11\r",
+ "10 13 12\r",
+ "10 13 13\r",
+ "10 13 14\r",
+ "10 13 15\r",
+ "10 13 16\r",
+ "10 13 17\r",
+ "10 13 18\r",
+ "10 13 19\r",
+ "10 13 20\r",
+ "10 13 21\r",
+ "10 13 22\r",
+ "10 13 23\r",
+ "10 13 24\r",
+ "10 13 25\r",
+ "10 13 26\r",
+ "10 13 27\r",
+ "10 13 28\r",
+ "10 13 29\r",
+ "10 13 30\r",
+ "10 13 31\r",
+ "10 13 32\r",
+ "10 13 33\r",
+ "10 13 34\r",
+ "10 13 35\r",
+ "10 13 36\r",
+ "10 13 37\r",
+ "10 13 38\r",
+ "10 13 39\r",
+ "10 13 40\r",
+ "10 13 41\r",
+ "10 13 42\r",
+ "10 13 43\r",
+ "10 13 44\r",
+ "10 13 45\r",
+ "10 13 46\r",
+ "10 13 47\r",
+ "10 13 48\r",
+ "10 13 49\r",
+ "10 13 50\r",
+ "10 13 51\r",
+ "10 13 52\r",
+ "10 13 53\r",
+ "10 13 54\r",
+ "10 13 55\r",
+ "10 13 56\r",
+ "10 13 57\r",
+ "10 13 58\r",
+ "10 14 1\r",
+ "10 14 2\r",
+ "10 14 3\r",
+ "10 14 4\r",
+ "10 14 5\r",
+ "10 14 6\r",
+ "10 14 7\r",
+ "10 14 8\r",
+ "10 14 9\r",
+ "10 14 10\r",
+ "10 14 11\r",
+ "10 14 12\r",
+ "10 14 13\r",
+ "10 14 14\r",
+ "10 14 15\r",
+ "10 14 16\r",
+ "10 14 17\r",
+ "10 14 18\r",
+ "10 14 19\r",
+ "10 14 20\r",
+ "10 14 21\r",
+ "10 14 22\r",
+ "10 14 23\r",
+ "10 14 24\r",
+ "10 14 25\r",
+ "10 14 26\r",
+ "10 14 27\r",
+ "10 14 28\r",
+ "10 14 29\r",
+ "10 14 30\r",
+ "10 14 31\r",
+ "10 14 32\r",
+ "10 14 33\r",
+ "10 14 34\r",
+ "10 14 35\r",
+ "10 14 36\r",
+ "10 14 37\r",
+ "10 14 38\r",
+ "10 14 39\r",
+ "10 14 40\r",
+ "10 14 41\r",
+ "10 14 42\r",
+ "10 14 43\r",
+ "10 14 44\r",
+ "10 14 45\r",
+ "10 14 46\r",
+ "10 14 47\r",
+ "10 14 48\r",
+ "10 14 49\r",
+ "10 14 50\r",
+ "10 14 51\r",
+ "10 14 52\r",
+ "10 14 53\r",
+ "10 14 54\r",
+ "10 14 55\r",
+ "10 14 56\r",
+ "10 14 57\r",
+ "10 14 58\r",
+ "10 15 1\r",
+ "10 15 2\r",
+ "10 15 3\r",
+ "10 15 4\r",
+ "10 15 5\r",
+ "10 15 6\r",
+ "10 15 7\r",
+ "10 15 8\r",
+ "10 15 9\r",
+ "10 15 10\r",
+ "10 15 11\r",
+ "10 15 12\r",
+ "10 15 13\r",
+ "10 15 14\r",
+ "10 15 15\r",
+ "10 15 16\r",
+ "10 15 17\r",
+ "10 15 18\r",
+ "10 15 19\r",
+ "10 15 20\r",
+ "10 15 21\r",
+ "10 15 22\r",
+ "10 15 23\r",
+ "10 15 24\r",
+ "10 15 25\r",
+ "10 15 26\r",
+ "10 15 27\r",
+ "10 15 28\r",
+ "10 15 29\r",
+ "10 15 30\r",
+ "10 15 31\r",
+ "10 15 32\r",
+ "10 15 33\r",
+ "10 15 34\r",
+ "10 15 35\r",
+ "10 15 36\r",
+ "10 15 37\r",
+ "10 15 38\r",
+ "10 15 39\r",
+ "10 15 40\r",
+ "10 15 41\r",
+ "10 15 42\r",
+ "10 15 43\r",
+ "10 15 44\r",
+ "10 15 45\r",
+ "10 15 46\r",
+ "10 15 47\r",
+ "10 15 48\r",
+ "10 15 49\r",
+ "10 15 50\r",
+ "10 15 51\r",
+ "10 15 52\r",
+ "10 15 53\r",
+ "10 15 54\r",
+ "10 15 55\r",
+ "10 15 56\r",
+ "10 15 57\r",
+ "10 15 58\r",
+ "10 16 1\r",
+ "10 16 2\r",
+ "10 16 3\r",
+ "10 16 4\r",
+ "10 16 5\r",
+ "10 16 6\r",
+ "10 16 7\r",
+ "10 16 8\r",
+ "10 16 9\r",
+ "10 16 10\r",
+ "10 16 11\r",
+ "10 16 12\r",
+ "10 16 13\r",
+ "10 16 14\r",
+ "10 16 15\r",
+ "10 16 16\r",
+ "10 16 17\r",
+ "10 16 18\r",
+ "10 16 19\r",
+ "10 16 20\r",
+ "10 16 21\r",
+ "10 16 22\r",
+ "10 16 23\r",
+ "10 16 24\r",
+ "10 16 25\r",
+ "10 16 26\r",
+ "10 16 27\r",
+ "10 16 28\r",
+ "10 16 29\r",
+ "10 16 30\r",
+ "10 16 31\r",
+ "10 16 32\r",
+ "10 16 33\r",
+ "10 16 34\r",
+ "10 16 35\r",
+ "10 16 36\r",
+ "10 16 37\r",
+ "10 16 38\r",
+ "10 16 39\r",
+ "10 16 40\r",
+ "10 16 41\r",
+ "10 16 42\r",
+ "10 16 43\r",
+ "10 16 44\r",
+ "10 16 45\r",
+ "10 16 46\r",
+ "10 16 47\r",
+ "10 16 48\r",
+ "10 16 49\r",
+ "10 16 50\r",
+ "10 16 51\r",
+ "10 16 52\r",
+ "10 16 53\r",
+ "10 16 54\r",
+ "10 16 55\r",
+ "10 16 56\r",
+ "10 16 57\r",
+ "10 16 58\r",
+ "10 17 1\r",
+ "10 17 2\r",
+ "10 17 3\r",
+ "10 17 4\r",
+ "10 17 5\r",
+ "10 17 6\r",
+ "10 17 7\r",
+ "10 17 8\r",
+ "10 17 9\r",
+ "10 17 10\r",
+ "10 17 11\r",
+ "10 17 12\r",
+ "10 17 13\r",
+ "10 17 14\r",
+ "10 17 15\r",
+ "10 17 16\r",
+ "10 17 17\r",
+ "10 17 18\r",
+ "10 17 19\r",
+ "10 17 20\r",
+ "10 17 21\r",
+ "10 17 22\r",
+ "10 17 23\r",
+ "10 17 24\r",
+ "10 17 25\r",
+ "10 17 26\r",
+ "10 17 27\r",
+ "10 17 28\r",
+ "10 17 29\r",
+ "10 17 30\r",
+ "10 17 31\r",
+ "10 17 32\r",
+ "10 17 33\r",
+ "10 17 34\r",
+ "10 17 35\r",
+ "10 17 36\r",
+ "10 17 37\r",
+ "10 17 38\r",
+ "10 17 39\r",
+ "10 17 40\r",
+ "10 17 41\r",
+ "10 17 42\r",
+ "10 17 43\r",
+ "10 17 44\r",
+ "10 17 45\r",
+ "10 17 46\r",
+ "10 17 47\r",
+ "10 17 48\r",
+ "10 17 49\r",
+ "10 17 50\r",
+ "10 17 51\r",
+ "10 17 52\r",
+ "10 17 53\r",
+ "10 17 54\r",
+ "10 17 55\r",
+ "10 17 56\r",
+ "10 17 57\r",
+ "10 17 58\r",
+ "10 18 1\r",
+ "10 18 2\r",
+ "10 18 3\r",
+ "10 18 4\r",
+ "10 18 5\r",
+ "10 18 6\r",
+ "10 18 7\r",
+ "10 18 8\r",
+ "10 18 9\r",
+ "10 18 10\r",
+ "10 18 11\r",
+ "10 18 12\r",
+ "10 18 13\r",
+ "10 18 14\r",
+ "10 18 15\r",
+ "10 18 16\r",
+ "10 18 17\r",
+ "10 18 18\r",
+ "10 18 19\r",
+ "10 18 20\r",
+ "10 18 21\r",
+ "10 18 22\r",
+ "10 18 23\r",
+ "10 18 24\r",
+ "10 18 25\r",
+ "10 18 26\r",
+ "10 18 27\r",
+ "10 18 28\r",
+ "10 18 29\r",
+ "10 18 30\r",
+ "10 18 31\r",
+ "10 18 32\r",
+ "10 18 33\r",
+ "10 18 34\r",
+ "10 18 35\r",
+ "10 18 36\r",
+ "10 18 37\r",
+ "10 18 38\r",
+ "10 18 39\r",
+ "10 18 40\r",
+ "10 18 41\r",
+ "10 18 42\r",
+ "10 18 43\r",
+ "10 18 44\r",
+ "10 18 45\r",
+ "10 18 46\r",
+ "10 18 47\r",
+ "10 18 48\r",
+ "10 18 49\r",
+ "10 18 50\r",
+ "10 18 51\r",
+ "10 18 52\r",
+ "10 18 53\r",
+ "10 18 54\r",
+ "10 18 55\r",
+ "10 18 56\r",
+ "10 18 57\r",
+ "10 18 58\r",
+ "10 19 1\r",
+ "10 19 2\r",
+ "10 19 3\r",
+ "10 19 4\r",
+ "10 19 5\r",
+ "10 19 6\r",
+ "10 19 7\r",
+ "10 19 8\r",
+ "10 19 9\r",
+ "10 19 10\r",
+ "10 19 11\r",
+ "10 19 12\r",
+ "10 19 13\r",
+ "10 19 14\r",
+ "10 19 15\r",
+ "10 19 16\r",
+ "10 19 17\r",
+ "10 19 18\r",
+ "10 19 19\r",
+ "10 19 20\r",
+ "10 19 21\r",
+ "10 19 22\r",
+ "10 19 23\r",
+ "10 19 24\r",
+ "10 19 25\r",
+ "10 19 26\r",
+ "10 19 27\r",
+ "10 19 28\r",
+ "10 19 29\r",
+ "10 19 30\r",
+ "10 19 31\r",
+ "10 19 32\r",
+ "10 19 33\r",
+ "10 19 34\r",
+ "10 19 35\r",
+ "10 19 36\r",
+ "10 19 37\r",
+ "10 19 38\r",
+ "10 19 39\r",
+ "10 19 40\r",
+ "10 19 41\r",
+ "10 19 42\r",
+ "10 19 43\r",
+ "10 19 44\r",
+ "10 19 45\r",
+ "10 19 46\r",
+ "10 19 47\r",
+ "10 19 48\r",
+ "10 19 49\r",
+ "10 19 50\r",
+ "10 19 51\r",
+ "10 19 52\r",
+ "10 19 53\r",
+ "10 19 54\r",
+ "10 19 55\r",
+ "10 19 56\r",
+ "10 19 57\r",
+ "10 19 58\r",
+ "10 20 1\r",
+ "10 20 2\r",
+ "10 20 3\r",
+ "10 20 4\r",
+ "10 20 5\r",
+ "10 20 6\r",
+ "10 20 7\r",
+ "10 20 8\r",
+ "10 20 9\r",
+ "10 20 10\r",
+ "10 20 11\r",
+ "10 20 12\r",
+ "10 20 13\r",
+ "10 20 14\r",
+ "10 20 15\r",
+ "10 20 16\r",
+ "10 20 17\r",
+ "10 20 18\r",
+ "10 20 19\r",
+ "10 20 20\r",
+ "10 20 21\r",
+ "10 20 22\r",
+ "10 20 23\r",
+ "10 20 24\r",
+ "10 20 25\r",
+ "10 20 26\r",
+ "10 20 27\r",
+ "10 20 28\r",
+ "10 20 29\r",
+ "10 20 30\r",
+ "10 20 31"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "10 20 32\r",
+ "10 20 33\r",
+ "10 20 34\r",
+ "10 20 35\r",
+ "10 20 36\r",
+ "10 20 37\r",
+ "10 20 38\r",
+ "10 20 39\r",
+ "10 20 40\r",
+ "10 20 41\r",
+ "10 20 42\r",
+ "10 20 43\r",
+ "10 20 44\r",
+ "10 20 45\r",
+ "10 20 46\r",
+ "10 20 47\r",
+ "10 20 48\r",
+ "10 20 49\r",
+ "10 20 50\r",
+ "10 20 51\r",
+ "10 20 52\r",
+ "10 20 53\r",
+ "10 20 54\r",
+ "10 20 55\r",
+ "10 20 56\r",
+ "10 20 57\r",
+ "10 20 58\r",
+ "10 21 1\r",
+ "10 21 2\r",
+ "10 21 3\r",
+ "10 21 4\r",
+ "10 21 5\r",
+ "10 21 6\r",
+ "10 21 7\r",
+ "10 21 8\r",
+ "10 21 9\r",
+ "10 21 10\r",
+ "10 21 11\r",
+ "10 21 12\r",
+ "10 21 13\r",
+ "10 21 14\r",
+ "10 21 15\r",
+ "10 21 16\r",
+ "10 21 17\r",
+ "10 21 18\r",
+ "10 21 19\r",
+ "10 21 20\r",
+ "10 21 21\r",
+ "10 21 22\r",
+ "10 21 23\r",
+ "10 21 24\r",
+ "10 21 25\r",
+ "10 21 26\r",
+ "10 21 27\r",
+ "10 21 28\r",
+ "10 21 29\r",
+ "10 21 30\r",
+ "10 21 31\r",
+ "10 21 32\r",
+ "10 21 33\r",
+ "10 21 34\r",
+ "10 21 35\r",
+ "10 21 36\r",
+ "10 21 37\r",
+ "10 21 38\r",
+ "10 21 39\r",
+ "10 21 40\r",
+ "10 21 41\r",
+ "10 21 42\r",
+ "10 21 43\r",
+ "10 21 44\r",
+ "10 21 45\r",
+ "10 21 46\r",
+ "10 21 47\r",
+ "10 21 48\r",
+ "10 21 49\r",
+ "10 21 50\r",
+ "10 21 51\r",
+ "10 21 52\r",
+ "10 21 53\r",
+ "10 21 54\r",
+ "10 21 55\r",
+ "10 21 56\r",
+ "10 21 57\r",
+ "10 21 58\r",
+ "10 22 1\r",
+ "10 22 2\r",
+ "10 22 3\r",
+ "10 22 4\r",
+ "10 22 5\r",
+ "10 22 6\r",
+ "10 22 7\r",
+ "10 22 8\r",
+ "10 22 9\r",
+ "10 22 10\r",
+ "10 22 11\r",
+ "10 22 12\r",
+ "10 22 13\r",
+ "10 22 14\r",
+ "10 22 15\r",
+ "10 22 16\r",
+ "10 22 17\r",
+ "10 22 18\r",
+ "10 22 19\r",
+ "10 22 20\r",
+ "10 22 21\r",
+ "10 22 22\r",
+ "10 22 23\r",
+ "10 22 24\r",
+ "10 22 25\r",
+ "10 22 26\r",
+ "10 22 27\r",
+ "10 22 28\r",
+ "10 22 29\r",
+ "10 22 30\r",
+ "10 22 31\r",
+ "10 22 32\r",
+ "10 22 33\r",
+ "10 22 34\r",
+ "10 22 35\r",
+ "10 22 36\r",
+ "10 22 37\r",
+ "10 22 38\r",
+ "10 22 39\r",
+ "10 22 40\r",
+ "10 22 41\r",
+ "10 22 42\r",
+ "10 22 43\r",
+ "10 22 44\r",
+ "10 22 45\r",
+ "10 22 46\r",
+ "10 22 47\r",
+ "10 22 48\r",
+ "10 22 49\r",
+ "10 22 50\r",
+ "10 22 51\r",
+ "10 22 52\r",
+ "10 22 53\r",
+ "10 22 54\r",
+ "10 22 55\r",
+ "10 22 56\r",
+ "10 22 57\r",
+ "10 22 58\r",
+ "10 23 1\r",
+ "10 23 2\r",
+ "10 23 3\r",
+ "10 23 4\r",
+ "10 23 5\r",
+ "10 23 6\r",
+ "10 23 7\r",
+ "10 23 8\r",
+ "10 23 9\r",
+ "10 23 10\r",
+ "10 23 11\r",
+ "10 23 12\r",
+ "10 23 13\r",
+ "10 23 14\r",
+ "10 23 15\r",
+ "10 23 16\r",
+ "10 23 17\r",
+ "10 23 18\r",
+ "10 23 19\r",
+ "10 23 20\r",
+ "10 23 21\r",
+ "10 23 22\r",
+ "10 23 23\r",
+ "10 23 24\r",
+ "10 23 25\r",
+ "10 23 26\r",
+ "10 23 27\r",
+ "10 23 28\r",
+ "10 23 29\r",
+ "10 23 30\r",
+ "10 23 31\r",
+ "10 23 32\r",
+ "10 23 33\r",
+ "10 23 34\r",
+ "10 23 35\r",
+ "10 23 36\r",
+ "10 23 37\r",
+ "10 23 38\r",
+ "10 23 39\r",
+ "10 23 40\r",
+ "10 23 41\r",
+ "10 23 42\r",
+ "10 23 43\r",
+ "10 23 44\r",
+ "10 23 45\r",
+ "10 23 46\r",
+ "10 23 47\r",
+ "10 23 48\r",
+ "10 23 49\r",
+ "10 23 50\r",
+ "10 23 51\r",
+ "10 23 52\r",
+ "10 23 53\r",
+ "10 23 54\r",
+ "10 23 55\r",
+ "10 23 56\r",
+ "10 23 57\r",
+ "10 23 58\r",
+ "10 24 1\r",
+ "10 24 2\r",
+ "10 24 3\r",
+ "10 24 4\r",
+ "10 24 5\r",
+ "10 24 6\r",
+ "10 24 7\r",
+ "10 24 8\r",
+ "10 24 9\r",
+ "10 24 10\r",
+ "10 24 11\r",
+ "10 24 12\r",
+ "10 24 13\r",
+ "10 24 14\r",
+ "10 24 15\r",
+ "10 24 16\r",
+ "10 24 17\r",
+ "10 24 18\r",
+ "10 24 19\r",
+ "10 24 20\r",
+ "10 24 21\r",
+ "10 24 22\r",
+ "10 24 23\r",
+ "10 24 24\r",
+ "10 24 25\r",
+ "10 24 26\r",
+ "10 24 27\r",
+ "10 24 28\r",
+ "10 24 29\r",
+ "10 24 30\r",
+ "10 24 31\r",
+ "10 24 32\r",
+ "10 24 33\r",
+ "10 24 34\r",
+ "10 24 35\r",
+ "10 24 36\r",
+ "10 24 37\r",
+ "10 24 38\r",
+ "10 24 39\r",
+ "10 24 40\r",
+ "10 24 41\r",
+ "10 24 42\r",
+ "10 24 43\r",
+ "10 24 44\r",
+ "10 24 45\r",
+ "10 24 46\r",
+ "10 24 47\r",
+ "10 24 48\r",
+ "10 24 49\r",
+ "10 24 50\r",
+ "10 24 51\r",
+ "10 24 52\r",
+ "10 24 53\r",
+ "10 24 54\r",
+ "10 24 55\r",
+ "10 24 56\r",
+ "10 24 57\r",
+ "10 24 58\r",
+ "10 25 1\r",
+ "10 25 2\r",
+ "10 25 3\r",
+ "10 25 4\r",
+ "10 25 5\r",
+ "10 25 6\r",
+ "10 25 7\r",
+ "10 25 8\r",
+ "10 25 9\r",
+ "10 25 10\r",
+ "10 25 11\r",
+ "10 25 12\r",
+ "10 25 13\r",
+ "10 25 14\r",
+ "10 25 15\r",
+ "10 25 16\r",
+ "10 25 17\r",
+ "10 25 18\r",
+ "10 25 19\r",
+ "10 25 20\r",
+ "10 25 21\r",
+ "10 25 22\r",
+ "10 25 23\r",
+ "10 25 24\r",
+ "10 25 25\r",
+ "10 25 26\r",
+ "10 25 27\r",
+ "10 25 28\r",
+ "10 25 29\r",
+ "10 25 30\r",
+ "10 25 31\r",
+ "10 25 32\r",
+ "10 25 33\r",
+ "10 25 34\r",
+ "10 25 35\r",
+ "10 25 36\r",
+ "10 25 37\r",
+ "10 25 38\r",
+ "10 25 39\r",
+ "10 25 40\r",
+ "10 25 41\r",
+ "10 25 42\r",
+ "10 25 43\r",
+ "10 25 44\r",
+ "10 25 45\r",
+ "10 25 46\r",
+ "10 25 47\r",
+ "10 25 48\r",
+ "10 25 49\r",
+ "10 25 50\r",
+ "10 25 51\r",
+ "10 25 52\r",
+ "10 25 53\r",
+ "10 25 54\r",
+ "10 25 55\r",
+ "10 25 56\r",
+ "10 25 57\r",
+ "10 25 58\r",
+ "10 26 1\r",
+ "10 26 2\r",
+ "10 26 3\r",
+ "10 26 4\r",
+ "10 26 5\r",
+ "10 26 6\r",
+ "10 26 7\r",
+ "10 26 8\r",
+ "10 26 9\r",
+ "10 26 10\r",
+ "10 26 11\r",
+ "10 26 12\r",
+ "10 26 13\r",
+ "10 26 14\r",
+ "10 26 15\r",
+ "10 26 16\r",
+ "10 26 17\r",
+ "10 26 18\r",
+ "10 26 19\r",
+ "10 26 20\r",
+ "10 26 21\r",
+ "10 26 22\r",
+ "10 26 23\r",
+ "10 26 24\r",
+ "10 26 25\r",
+ "10 26 26\r",
+ "10 26 27\r",
+ "10 26 28\r",
+ "10 26 29\r",
+ "10 26 30\r",
+ "10 26 31\r",
+ "10 26 32\r",
+ "10 26 33\r",
+ "10 26 34\r",
+ "10 26 35\r",
+ "10 26 36\r",
+ "10 26 37\r",
+ "10 26 38\r",
+ "10 26 39\r",
+ "10 26 40\r",
+ "10 26 41\r",
+ "10 26 42\r",
+ "10 26 43\r",
+ "10 26 44\r",
+ "10 26 45\r",
+ "10 26 46\r",
+ "10 26 47\r",
+ "10 26 48\r",
+ "10 26 49\r",
+ "10 26 50\r",
+ "10 26 51\r",
+ "10 26 52\r",
+ "10 26 53\r",
+ "10 26 54\r",
+ "10 26 55\r",
+ "10 26 56\r",
+ "10 26 57\r",
+ "10 26 58\r",
+ "10 27 1\r",
+ "10 27 2\r",
+ "10 27 3\r",
+ "10 27 4\r",
+ "10 27 5\r",
+ "10 27 6\r",
+ "10 27 7\r",
+ "10 27 8\r",
+ "10 27 9\r",
+ "10 27 10\r",
+ "10 27 11\r",
+ "10 27 12\r",
+ "10 27 13\r",
+ "10 27 14\r",
+ "10 27 15\r",
+ "10 27 16\r",
+ "10 27 17\r",
+ "10 27 18\r",
+ "10 27 19\r",
+ "10 27 20\r",
+ "10 27 21\r",
+ "10 27 22\r",
+ "10 27 23\r",
+ "10 27 24\r",
+ "10 27 25\r",
+ "10 27 26\r",
+ "10 27 27\r",
+ "10 27 28\r",
+ "10 27 29\r",
+ "10 27 30\r",
+ "10 27 31\r",
+ "10 27 32\r",
+ "10 27 33\r",
+ "10 27 34\r",
+ "10 27 35\r",
+ "10 27 36\r",
+ "10 27 37\r",
+ "10 27 38\r",
+ "10 27 39\r",
+ "10 27 40\r",
+ "10 27 41\r",
+ "10 27 42\r",
+ "10 27 43\r",
+ "10 27 44\r",
+ "10 27 45\r",
+ "10 27 46\r",
+ "10 27 47\r",
+ "10 27 48\r",
+ "10 27 49\r",
+ "10 27 50\r",
+ "10 27 51\r",
+ "10 27 52\r",
+ "10 27 53\r",
+ "10 27 54\r",
+ "10 27 55\r",
+ "10 27 56\r",
+ "10 27 57\r",
+ "10 27 58\r",
+ "10 28 1\r",
+ "10 28 2\r",
+ "10 28 3\r",
+ "10 28 4\r",
+ "10 28 5\r",
+ "10 28 6\r",
+ "10 28 7\r",
+ "10 28 8\r",
+ "10 28 9\r",
+ "10 28 10\r",
+ "10 28 11\r",
+ "10 28 12\r",
+ "10 28 13\r",
+ "10 28 14\r",
+ "10 28 15\r",
+ "10 28 16\r",
+ "10 28 17\r",
+ "10 28 18\r",
+ "10 28 19\r",
+ "10 28 20\r",
+ "10 28 21\r",
+ "10 28 22\r",
+ "10 28 23\r",
+ "10 28 24\r",
+ "10 28 25\r",
+ "10 28 26\r",
+ "10 28 27\r",
+ "10 28 28\r",
+ "10 28 29\r",
+ "10 28 30\r",
+ "10 28 31\r",
+ "10 28 32\r",
+ "10 28 33\r",
+ "10 28 34\r",
+ "10 28 35\r",
+ "10 28 36\r",
+ "10 28 37\r",
+ "10 28 38\r",
+ "10 28 39\r",
+ "10 28 40\r",
+ "10 28 41\r",
+ "10 28 42\r",
+ "10 28 43\r",
+ "10 28 44\r",
+ "10 28 45\r",
+ "10 28 46\r",
+ "10 28 47\r",
+ "10 28 48\r",
+ "10 28 49\r",
+ "10 28 50\r",
+ "10 28 51\r",
+ "10 28 52\r",
+ "10 28 53\r",
+ "10 28 54\r",
+ "10 28 55\r",
+ "10 28 56\r",
+ "10 28 57\r",
+ "10 28 58\r",
+ "10 29 1\r",
+ "10 29 2\r",
+ "10 29 3\r",
+ "10 29 4\r",
+ "10 29 5\r",
+ "10 29 6\r",
+ "10 29 7\r",
+ "10 29 8\r",
+ "10 29 9\r",
+ "10 29 10\r",
+ "10 29 11\r",
+ "10 29 12\r",
+ "10 29 13\r",
+ "10 29 14\r",
+ "10 29 15\r",
+ "10 29 16\r",
+ "10 29 17\r",
+ "10 29 18\r",
+ "10 29 19\r",
+ "10 29 20\r",
+ "10 29 21\r",
+ "10 29 22\r",
+ "10 29 23\r",
+ "10 29 24\r",
+ "10 29 25\r",
+ "10 29 26\r",
+ "10 29 27\r",
+ "10 29 28\r",
+ "10 29 29\r",
+ "10 29 30\r",
+ "10 29 31\r",
+ "10 29 32\r",
+ "10 29 33\r",
+ "10 29 34\r",
+ "10 29 35\r",
+ "10 29 36\r",
+ "10 29 37\r",
+ "10 29 38\r",
+ "10 29 39\r",
+ "10 29 40\r",
+ "10 29 41\r",
+ "10 29 42\r",
+ "10 29 43\r",
+ "10 29 44\r",
+ "10 29 45\r",
+ "10 29 46\r",
+ "10 29 47\r",
+ "10 29 48\r",
+ "10 29 49\r",
+ "10 29 50\r",
+ "10 29 51\r",
+ "10 29 52\r",
+ "10 29 53\r",
+ "10 29 54\r",
+ "10 29 55\r",
+ "10 29 56\r",
+ "10 29 57\r",
+ "10 29 58\r",
+ "10 30 1\r",
+ "10 30 2\r",
+ "10 30 3\r",
+ "10 30 4\r",
+ "10 30 5\r",
+ "10 30 6\r",
+ "10 30 7\r",
+ "10 30 8\r",
+ "10 30 9\r",
+ "10 30 10\r",
+ "10 30 11\r",
+ "10 30 12\r",
+ "10 30 13\r",
+ "10 30 14\r",
+ "10 30 15\r",
+ "10 30 16\r",
+ "10 30 17\r",
+ "10 30 18\r",
+ "10 30 19\r",
+ "10 30 20\r",
+ "10 30 21\r",
+ "10 30 22\r",
+ "10 30 23\r",
+ "10 30 24\r",
+ "10 30 25\r",
+ "10 30 26\r",
+ "10 30 27\r",
+ "10 30 28\r",
+ "10 30 29\r",
+ "10 30 30\r",
+ "10 30 31\r",
+ "10 30 32\r",
+ "10 30 33\r",
+ "10 30 34\r",
+ "10 30 35\r",
+ "10 30 36\r",
+ "10 30 37\r",
+ "10 30 38\r",
+ "10 30 39\r",
+ "10 30 40\r",
+ "10 30 41\r",
+ "10 30 42\r",
+ "10 30 43\r",
+ "10 30 44\r",
+ "10 30 45\r",
+ "10 30 46\r",
+ "10 30 47\r",
+ "10 30 48\r",
+ "10 30 49\r",
+ "10 30 50\r",
+ "10 30 51\r",
+ "10 30 52\r",
+ "10 30 53\r",
+ "10 30 54\r",
+ "10 30 55\r",
+ "10 30 56\r",
+ "10 30 57\r",
+ "10 30 58\r",
+ "10 31 1\r",
+ "10 31 2\r",
+ "10 31 3\r",
+ "10 31 4\r",
+ "10 31 5\r",
+ "10 31 6\r",
+ "10 31 7\r",
+ "10 31 8\r",
+ "10 31 9\r",
+ "10 31 10\r",
+ "10 31 11\r",
+ "10 31 12\r",
+ "10 31 13\r",
+ "10 31 14\r",
+ "10 31 15\r",
+ "10 31 16\r",
+ "10 31 17\r",
+ "10 31 18\r",
+ "10 31 19\r",
+ "10 31 20\r",
+ "10 31 21\r",
+ "10 31 22\r",
+ "10 31 23\r",
+ "10 31 24\r",
+ "10 31 25\r",
+ "10 31 26\r",
+ "10 31 27\r",
+ "10 31 28\r",
+ "10 31 29\r",
+ "10 31 30\r",
+ "10 31 31\r",
+ "10 31 32\r",
+ "10 31 33\r",
+ "10 31 34\r",
+ "10 31 35\r",
+ "10 31 36\r",
+ "10 31 37\r",
+ "10 31 38\r",
+ "10 31 39\r",
+ "10 31 40\r",
+ "10 31 41\r",
+ "10 31 42\r",
+ "10 31 43\r",
+ "10 31 44\r",
+ "10 31 45\r",
+ "10 31 46\r",
+ "10 31 47\r",
+ "10 31 48\r",
+ "10 31 49\r",
+ "10 31 50\r",
+ "10 31 51\r",
+ "10 31 52\r",
+ "10 31 53\r",
+ "10 31 54\r",
+ "10 31 55\r",
+ "10 31 56\r",
+ "10 31 57\r",
+ "10 31 58\r",
+ "10 32 1\r",
+ "10 32 2\r",
+ "10 32 3\r",
+ "10 32 4\r",
+ "10 32 5\r",
+ "10 32 6\r",
+ "10 32 7\r",
+ "10 32 8\r",
+ "10 32 9\r",
+ "10 32 10\r",
+ "10 32 11\r",
+ "10 32 12\r",
+ "10 32 13\r",
+ "10 32 14\r",
+ "10 32 15\r",
+ "10 32 16\r",
+ "10 32 17\r",
+ "10 32 18\r",
+ "10 32 19\r",
+ "10 32 20\r",
+ "10 32 21\r",
+ "10 32 22\r",
+ "10 32 23\r",
+ "10 32 24\r",
+ "10 32 25\r",
+ "10 32 26\r",
+ "10 32 27\r",
+ "10 32 28\r",
+ "10 32 29\r",
+ "10 32 30\r",
+ "10 32 31\r",
+ "10 32 32\r",
+ "10 32 33\r",
+ "10 32 34\r",
+ "10 32 35\r",
+ "10 32 36\r",
+ "10 32 37\r",
+ "10 32 38\r",
+ "10 32 39\r",
+ "10 32 40\r",
+ "10 32 41\r",
+ "10 32 42\r",
+ "10 32 43\r",
+ "10 32 44\r",
+ "10 32 45\r",
+ "10 32 46\r",
+ "10 32 47\r",
+ "10 32 48\r",
+ "10 32 49\r",
+ "10 32 50\r",
+ "10 32 51\r",
+ "10 32 52\r",
+ "10 32 53\r",
+ "10 32 54\r",
+ "10 32 55\r",
+ "10 32 56\r",
+ "10 32 57\r",
+ "10 32 58\r",
+ "10 33 1\r",
+ "10 33 2\r",
+ "10 33 3\r",
+ "10 33 4\r",
+ "10 33 5\r",
+ "10 33 6\r",
+ "10 33 7\r",
+ "10 33 8\r",
+ "10 33 9\r",
+ "10 33 10\r",
+ "10 33 11\r",
+ "10 33 12\r",
+ "10 33 13\r",
+ "10 33 14\r",
+ "10 33 15\r",
+ "10 33 16\r",
+ "10 33 17\r",
+ "10 33 18\r",
+ "10 33 19\r",
+ "10 33 20\r",
+ "10 33 21\r",
+ "10 33 22\r",
+ "10 33 23\r",
+ "10 33 24\r",
+ "10 33 25\r",
+ "10 33 26\r",
+ "10 33 27\r",
+ "10 33 28\r",
+ "10 33 29\r",
+ "10 33 30\r",
+ "10 33 31\r",
+ "10 33 32\r",
+ "10 33 33\r",
+ "10 33 34\r",
+ "10 33 35\r",
+ "10 33 36\r",
+ "10 33 37\r",
+ "10 33 38\r",
+ "10 33 39\r",
+ "10 33 40\r",
+ "10 33 41\r",
+ "10 33 42\r",
+ "10 33 43\r",
+ "10 33 44\r",
+ "10 33 45\r",
+ "10 33 46\r",
+ "10 33 47\r",
+ "10 33 48\r",
+ "10 33 49\r",
+ "10 33 50\r",
+ "10 33 51\r",
+ "10 33 52\r",
+ "10 33 53\r",
+ "10 33 54\r",
+ "10 33 55\r",
+ "10 33 56\r",
+ "10 33 57\r",
+ "10 33 58\r",
+ "10 34 1\r",
+ "10 34 2\r",
+ "10 34 3\r",
+ "10 34 4\r",
+ "10 34 5\r",
+ "10 34 6\r",
+ "10 34 7\r",
+ "10 34 8\r",
+ "10 34 9\r",
+ "10 34 10\r",
+ "10 34 11\r",
+ "10 34 12\r",
+ "10 34 13\r",
+ "10 34 14\r",
+ "10 34 15\r",
+ "10 34 16\r",
+ "10 34 17\r",
+ "10 34 18\r",
+ "10 34 19\r",
+ "10 34 20\r",
+ "10 34 21\r",
+ "10 34 22\r",
+ "10 34 23\r",
+ "10 34 24\r",
+ "10 34 25\r",
+ "10 34 26\r",
+ "10 34 27\r",
+ "10 34 28\r",
+ "10 34 29\r",
+ "10 34 30\r",
+ "10 34 31\r",
+ "10 34 32\r",
+ "10 34 33\r",
+ "10 34 34\r",
+ "10 34 35\r",
+ "10 34 36\r",
+ "10 34 37\r",
+ "10 34 38\r",
+ "10 34 39\r",
+ "10 34 40\r",
+ "10 34 41\r",
+ "10 34 42\r",
+ "10 34 43\r",
+ "10 34 44\r",
+ "10 34 45\r",
+ "10 34 46\r",
+ "10 34 47\r",
+ "10 34 48\r",
+ "10 34 49\r",
+ "10 34 50\r",
+ "10 34 51\r",
+ "10 34 52\r",
+ "10 34 53\r",
+ "10 34 54\r",
+ "10 34 55\r",
+ "10 34 56\r",
+ "10 34 57\r",
+ "10 34 58\r",
+ "10 35 1\r",
+ "10 35 2\r",
+ "10 35 3\r",
+ "10 35 4\r",
+ "10 35 5\r",
+ "10 35 6\r",
+ "10 35 7\r",
+ "10 35 8\r",
+ "10 35 9\r",
+ "10 35 10\r",
+ "10 35 11\r",
+ "10 35 12\r",
+ "10 35 13\r",
+ "10 35 14\r",
+ "10 35 15\r",
+ "10 35 16\r",
+ "10 35 17\r",
+ "10 35 18\r",
+ "10 35 19\r",
+ "10 35 20\r",
+ "10 35 21\r",
+ "10 35 22\r",
+ "10 35 23\r",
+ "10 35 24\r",
+ "10 35 25\r",
+ "10 35 26\r",
+ "10 35 27\r",
+ "10 35 28\r",
+ "10 35 29\r",
+ "10 35 30\r",
+ "10 35 31\r",
+ "10 35 32\r",
+ "10 35 33\r",
+ "10 35 34\r",
+ "10 35 35\r",
+ "10 35 36\r",
+ "10 35 37\r",
+ "10 35 38\r",
+ "10 35 39\r",
+ "10 35 40\r",
+ "10 35 41\r",
+ "10 35 42\r",
+ "10 35 43\r",
+ "10 35 44\r",
+ "10 35 45\r",
+ "10 35 46\r",
+ "10 35 47\r",
+ "10 35 48\r",
+ "10 35 49\r",
+ "10 35 50\r",
+ "10 35 51\r",
+ "10 35 52\r",
+ "10 35 53\r",
+ "10 35 54\r",
+ "10 35 55\r",
+ "10 35 56\r",
+ "10 35 57\r",
+ "10 35 58\r",
+ "10 36 1\r",
+ "10 36 2\r",
+ "10 36 3\r",
+ "10 36 4\r",
+ "10 36 5\r",
+ "10 36 6\r",
+ "10 36 7\r",
+ "10 36 8\r",
+ "10 36 9\r",
+ "10 36 10\r",
+ "10 36 11\r",
+ "10 36 12\r",
+ "10 36 13\r",
+ "10 36 14\r",
+ "10 36 15\r",
+ "10 36 16\r",
+ "10 36 17\r",
+ "10 36 18\r",
+ "10 36 19\r",
+ "10 36 20\r",
+ "10 36 21\r",
+ "10 36 22\r",
+ "10 36 23\r",
+ "10 36 24\r",
+ "10 36 25\r",
+ "10 36 26\r",
+ "10 36 27\r",
+ "10 36 28\r",
+ "10 36 29\r",
+ "10 36 30\r",
+ "10 36 31\r",
+ "10 36 32\r",
+ "10 36 33\r",
+ "10 36 34\r",
+ "10 36 35\r",
+ "10 36 36\r",
+ "10 36 37\r",
+ "10 36 38\r",
+ "10 36 39\r",
+ "10 36 40\r",
+ "10 36 41\r",
+ "10 36 42\r",
+ "10 36 43\r",
+ "10 36 44\r",
+ "10 36 45\r",
+ "10 36 46\r",
+ "10 36 47\r",
+ "10 36 48\r",
+ "10 36 49\r",
+ "10 36 50\r",
+ "10 36 51\r",
+ "10 36 52\r",
+ "10 36 53\r",
+ "10 36 54\r",
+ "10 36 55\r",
+ "10 36 56\r",
+ "10 36 57\r",
+ "10 36 58\r",
+ "10 37 1\r",
+ "10 37 2\r",
+ "10 37 3\r",
+ "10 37 4\r",
+ "10 37 5\r",
+ "10 37 6\r",
+ "10 37 7\r",
+ "10 37 8\r",
+ "10 37 9\r",
+ "10 37 10\r",
+ "10 37 11\r",
+ "10 37 12\r",
+ "10 37 13\r",
+ "10 37 14\r",
+ "10 37 15\r",
+ "10 37 16\r",
+ "10 37 17\r",
+ "10 37 18\r",
+ "10 37 19\r",
+ "10 37 20\r",
+ "10 37 21\r",
+ "10 37 22\r",
+ "10 37 23\r",
+ "10 37 24\r",
+ "10 37 25\r",
+ "10 37 26\r",
+ "10 37 27\r",
+ "10 37 28\r",
+ "10 37 29\r",
+ "10 37 30\r",
+ "10 37 31\r",
+ "10 37 32\r",
+ "10 37 33\r",
+ "10 37 34\r",
+ "10 37 35\r",
+ "10 37 36\r",
+ "10 37 37\r",
+ "10 37 38\r",
+ "10 37 39\r",
+ "10 37 40\r",
+ "10 37 41\r",
+ "10 37 42\r",
+ "10 37 43\r",
+ "10 37 44\r",
+ "10 37 45\r",
+ "10 37 46\r",
+ "10 37 47\r",
+ "10 37 48\r",
+ "10 37 49\r",
+ "10 37 50\r",
+ "10 37 51\r",
+ "10 37 52\r",
+ "10 37 53\r",
+ "10 37 54\r",
+ "10 37 55\r",
+ "10 37 56\r",
+ "10 37 57\r",
+ "10 37 58\r",
+ "10 38 1\r",
+ "10 38 2\r",
+ "10 38 3\r",
+ "10 38 4\r",
+ "10 38 5\r",
+ "10 38 6\r",
+ "10 38 7\r",
+ "10 38 8\r",
+ "10 38 9\r",
+ "10 38 10\r",
+ "10 38 11\r",
+ "10 38 12\r",
+ "10 38 13\r",
+ "10 38 14\r",
+ "10 38 15\r",
+ "10 38 16\r",
+ "10 38 17\r",
+ "10 38 18\r",
+ "10 38 19\r",
+ "10 38 20\r",
+ "10 38 21\r",
+ "10 38 22\r",
+ "10 38 23\r",
+ "10 38 24\r",
+ "10 38 25\r",
+ "10 38 26\r",
+ "10 38 27\r",
+ "10 38 28\r",
+ "10 38 29\r",
+ "10 38 30\r",
+ "10 38 31\r",
+ "10 38 32\r",
+ "10 38 33\r",
+ "10 38 34\r",
+ "10 38 35\r",
+ "10 38 36\r",
+ "10 38 37\r",
+ "10 38 38\r",
+ "10 38 39\r",
+ "10 38 40\r",
+ "10 38 41\r",
+ "10 38 42\r",
+ "10 38 43\r",
+ "10 38 44\r",
+ "10 38 45\r",
+ "10 38 46\r",
+ "10 38 47\r",
+ "10 38 48\r",
+ "10 38 49\r",
+ "10 38 50\r",
+ "10 38 51\r",
+ "10 38 52\r",
+ "10 38 53\r",
+ "10 38 54\r",
+ "10 38 55\r",
+ "10 38 56\r",
+ "10 38 57\r",
+ "10 38 58\r",
+ "10 39 1\r",
+ "10 39 2\r",
+ "10 39 3\r",
+ "10 39 4\r",
+ "10 39 5\r",
+ "10 39 6\r",
+ "10 39 7\r",
+ "10 39 8\r",
+ "10 39 9\r",
+ "10 39 10\r",
+ "10 39 11\r",
+ "10 39 12\r",
+ "10 39 13\r",
+ "10 39 14\r",
+ "10 39 15\r",
+ "10 39 16\r",
+ "10 39 17\r",
+ "10 39 18\r",
+ "10 39 19\r",
+ "10 39 20\r",
+ "10 39 21\r",
+ "10 39 22\r",
+ "10 39 23\r",
+ "10 39 24\r",
+ "10 39 25\r",
+ "10 39 26\r",
+ "10 39 27\r",
+ "10 39 28\r",
+ "10 39 29\r",
+ "10 39 30\r",
+ "10 39 31\r",
+ "10 39 32\r",
+ "10 39 33\r",
+ "10 39 34\r",
+ "10 39 35\r",
+ "10 39 36\r",
+ "10 39 37\r",
+ "10 39 38\r",
+ "10 39 39\r",
+ "10 39 40\r",
+ "10 39 41\r",
+ "10 39 42\r",
+ "10 39 43\r",
+ "10 39 44\r",
+ "10 39 45\r",
+ "10 39 46\r",
+ "10 39 47\r",
+ "10 39 48\r",
+ "10 39 49\r",
+ "10 39 50\r",
+ "10 39 51\r",
+ "10 39 52\r",
+ "10 39 53\r",
+ "10 39 54\r",
+ "10 39 55\r",
+ "10 39 56\r",
+ "10 39 57\r",
+ "10 39 58\r",
+ "10 40 1\r",
+ "10 40 2\r",
+ "10 40 3\r",
+ "10 40 4\r",
+ "10 40 5\r",
+ "10 40 6\r",
+ "10 40 7\r",
+ "10 40 8\r",
+ "10 40 9\r",
+ "10 40 10\r",
+ "10 40 11\r",
+ "10 40 12\r",
+ "10 40 13\r",
+ "10 40 14\r",
+ "10 40 15\r",
+ "10 40 16\r",
+ "10 40 17\r",
+ "10 40 18\r",
+ "10 40 19\r",
+ "10 40 20\r",
+ "10 40 21\r",
+ "10 40 22\r",
+ "10 40 23\r",
+ "10 40 24\r",
+ "10 40 25\r",
+ "10 40 26\r",
+ "10 40 27\r",
+ "10 40 28\r",
+ "10 40 29\r",
+ "10 40 30\r",
+ "10 40 31\r",
+ "10 40 32\r",
+ "10 40 33\r",
+ "10 40 34\r",
+ "10 40 35\r",
+ "10 40 36\r",
+ "10 40 37\r",
+ "10 40 38\r",
+ "10 40 39\r",
+ "10 40 40\r",
+ "10 40 41\r",
+ "10 40 42\r",
+ "10 40 43\r",
+ "10 40 44\r",
+ "10 40 45\r",
+ "10 40 46\r",
+ "10 40 47\r",
+ "10 40 48\r",
+ "10 40 49\r",
+ "10 40 50\r",
+ "10 40 51\r",
+ "10 40 52\r",
+ "10 40 53\r",
+ "10 40 54\r",
+ "10 40 55\r",
+ "10 40 56\r",
+ "10 40 57\r",
+ "10 40 58\r",
+ "10 41 1\r",
+ "10 41 2\r",
+ "10 41 3\r",
+ "10 41 4\r",
+ "10 41 5\r",
+ "10 41 6\r",
+ "10 41 7\r",
+ "10 41 8\r",
+ "10 41 9\r",
+ "10 41 10\r",
+ "10 41 11\r",
+ "10 41 12\r",
+ "10 41 13\r",
+ "10 41 14\r",
+ "10 41 15\r",
+ "10 41 16\r",
+ "10 41 17\r",
+ "10 41 18\r",
+ "10 41 19\r",
+ "10 41 20\r",
+ "10 41 21\r",
+ "10 41 22\r",
+ "10 41 23\r",
+ "10 41 24\r",
+ "10 41 25\r",
+ "10 41 26\r",
+ "10 41 27\r",
+ "10 41 28\r",
+ "10 41 29\r",
+ "10 41 30\r",
+ "10 41 31\r",
+ "10 41 32\r",
+ "10 41 33\r",
+ "10 41 34\r",
+ "10 41 35\r",
+ "10 41 36\r",
+ "10 41 37\r",
+ "10 41 38\r",
+ "10 41 39\r",
+ "10 41 40\r",
+ "10 41 41\r",
+ "10 41 42\r",
+ "10 41 43\r",
+ "10 41 44\r",
+ "10 41 45\r",
+ "10 41 46\r",
+ "10 41 47\r",
+ "10 41 48\r",
+ "10 41 49\r",
+ "10 41 50\r",
+ "10 41 51\r",
+ "10 41 52\r",
+ "10 41 53\r",
+ "10 41 54\r",
+ "10 41 55\r",
+ "10 41 56\r",
+ "10 41 57\r",
+ "10 41 58\r",
+ "10 42 1\r",
+ "10 42 2\r",
+ "10 42 3\r",
+ "10 42 4\r",
+ "10 42 5\r",
+ "10 42 6\r",
+ "10 42 7\r",
+ "10 42 8\r",
+ "10 42 9\r",
+ "10 42 10\r",
+ "10 42 11\r",
+ "10 42 12\r",
+ "10 42 13\r",
+ "10 42 14\r",
+ "10 42 15\r",
+ "10 42 16\r",
+ "10 42 17\r",
+ "10 42 18\r",
+ "10 42 19\r",
+ "10 42 20\r",
+ "10 42 21\r",
+ "10 42 22\r",
+ "10 42 23\r",
+ "10 42 24\r",
+ "10 42 25\r",
+ "10 42 26\r",
+ "10 42 27\r",
+ "10 42 28\r",
+ "10 42 29\r",
+ "10 42 30\r",
+ "10 42 31\r",
+ "10 42 32\r",
+ "10 42 33\r",
+ "10 42 34\r",
+ "10 42 35\r",
+ "10 42 36\r",
+ "10 42 37\r",
+ "10 42 38\r",
+ "10 42 39\r",
+ "10 42 40\r",
+ "10 42 41\r",
+ "10 42 42\r",
+ "10 42 43\r",
+ "10 42 44\r",
+ "10 42 45\r",
+ "10 42 46\r",
+ "10 42 47\r",
+ "10 42 48\r",
+ "10 42 49\r",
+ "10 42 50\r",
+ "10 42 51\r",
+ "10 42 52\r",
+ "10 42 53\r",
+ "10 42 54\r",
+ "10 42 55\r",
+ "10 42 56\r",
+ "10 42 57\r",
+ "10 42 58\r",
+ "10 43 1\r",
+ "10 43 2\r",
+ "10 43 3\r",
+ "10 43 4\r",
+ "10 43 5\r",
+ "10 43 6\r",
+ "10 43 7\r",
+ "10 43 8\r",
+ "10 43 9\r",
+ "10 43 10\r",
+ "10 43 11\r",
+ "10 43 12\r",
+ "10 43 13\r",
+ "10 43 14\r",
+ "10 43 15\r",
+ "10 43 16\r",
+ "10 43 17\r",
+ "10 43 18\r",
+ "10 43 19\r",
+ "10 43 20\r",
+ "10 43 21\r",
+ "10 43 22\r",
+ "10 43 23\r",
+ "10 43 24\r",
+ "10 43 25\r",
+ "10 43 26\r",
+ "10 43 27\r",
+ "10 43 28\r",
+ "10 43 29\r",
+ "10 43 30\r",
+ "10 43 31\r",
+ "10 43 32\r",
+ "10 43 33\r",
+ "10 43 34\r",
+ "10 43 35\r",
+ "10 43 36\r",
+ "10 43 37\r",
+ "10 43 38\r",
+ "10 43 39\r",
+ "10 43 40\r",
+ "10 43 41\r",
+ "10 43 42\r",
+ "10 43 43\r",
+ "10 43 44\r",
+ "10 43 45\r",
+ "10 43 46\r",
+ "10 43 47\r",
+ "10 43 48\r",
+ "10 43 49\r",
+ "10 43 50\r",
+ "10 43 51\r",
+ "10 43 52\r",
+ "10 43 53\r",
+ "10 43 54\r",
+ "10 43 55\r",
+ "10 43 56\r",
+ "10 43 57\r",
+ "10 43 58\r",
+ "10 44 1\r",
+ "10 44 2\r",
+ "10 44 3\r",
+ "10 44 4\r",
+ "10 44 5\r",
+ "10 44 6\r",
+ "10 44 7\r",
+ "10 44 8\r",
+ "10 44 9\r",
+ "10 44 10\r",
+ "10 44 11\r",
+ "10 44 12\r",
+ "10 44 13\r",
+ "10 44 14\r",
+ "10 44 15\r",
+ "10 44 16\r",
+ "10 44 17\r",
+ "10 44 18\r",
+ "10 44 19\r",
+ "10 44 20\r",
+ "10 44 21\r",
+ "10 44 22\r",
+ "10 44 23\r",
+ "10 44 24\r",
+ "10 44 25\r",
+ "10 44 26\r",
+ "10 44 27\r",
+ "10 44 28\r",
+ "10 44 29\r",
+ "10 44 30\r",
+ "10 44 31\r",
+ "10 44 32\r",
+ "10 44 33\r",
+ "10 44 34\r",
+ "10 44 35\r",
+ "10 44 36\r",
+ "10 44 37\r",
+ "10 44 38\r",
+ "10 44 39\r",
+ "10 44 40\r",
+ "10 44 41\r",
+ "10 44 42\r",
+ "10 44 43\r",
+ "10 44 44\r",
+ "10 44 45\r",
+ "10 44 46\r",
+ "10 44 47\r",
+ "10 44 48\r",
+ "10 44 49\r",
+ "10 44 50\r",
+ "10 44 51\r",
+ "10 44 52\r",
+ "10 44 53\r",
+ "10 44 54\r",
+ "10 44 55\r",
+ "10 44 56\r",
+ "10 44 57\r",
+ "10 44 58\r",
+ "10 45 1\r",
+ "10 45 2\r",
+ "10 45 3\r",
+ "10 45 4\r",
+ "10 45 5\r",
+ "10 45 6\r",
+ "10 45 7\r",
+ "10 45 8\r",
+ "10 45 9\r",
+ "10 45 10\r",
+ "10 45 11\r",
+ "10 45 12\r",
+ "10 45 13\r",
+ "10 45 14\r",
+ "10 45 15\r",
+ "10 45 16\r",
+ "10 45 17\r",
+ "10 45 18\r",
+ "10 45 19\r",
+ "10 45 20\r",
+ "10 45 21\r",
+ "10 45 22\r",
+ "10 45 23\r",
+ "10 45 24\r",
+ "10 45 25\r",
+ "10 45 26\r",
+ "10 45 27\r",
+ "10 45 28\r",
+ "10 45 29\r",
+ "10 45 30\r",
+ "10 45 31\r",
+ "10 45 32\r",
+ "10 45 33\r",
+ "10 45 34\r",
+ "10 45 35\r",
+ "10 45 36\r",
+ "10 45 37\r",
+ "10 45 38\r",
+ "10 45 39\r",
+ "10 45 40\r",
+ "10 45 41\r",
+ "10 45 42\r",
+ "10 45 43\r",
+ "10 45 44\r",
+ "10 45 45\r",
+ "10 45 46\r",
+ "10 45 47\r",
+ "10 45 48\r",
+ "10 45 49\r",
+ "10 45 50\r",
+ "10 45 51\r",
+ "10 45 52\r",
+ "10 45 53\r",
+ "10 45 54\r",
+ "10 45 55\r",
+ "10 45 56\r",
+ "10 45 57\r",
+ "10 45 58\r",
+ "10 46 1\r",
+ "10 46 2\r",
+ "10 46 3\r",
+ "10 46 4\r",
+ "10 46 5\r",
+ "10 46 6\r",
+ "10 46 7\r",
+ "10 46 8\r",
+ "10 46 9\r",
+ "10 46 10\r",
+ "10 46 11\r",
+ "10 46 12\r",
+ "10 46 13\r",
+ "10 46 14\r",
+ "10 46 15\r",
+ "10 46 16\r",
+ "10 46 17\r",
+ "10 46 18\r",
+ "10 46 19\r",
+ "10 46 20\r",
+ "10 46 21\r",
+ "10 46 22\r",
+ "10 46 23\r",
+ "10 46 24\r",
+ "10 46 25\r",
+ "10 46 26\r",
+ "10 46 27\r",
+ "10 46 28\r",
+ "10 46 29\r",
+ "10 46 30\r",
+ "10 46 31\r",
+ "10 46 32\r",
+ "10 46 33\r",
+ "10 46 34\r",
+ "10 46 35\r",
+ "10 46 36\r",
+ "10 46 37\r",
+ "10 46 38\r",
+ "10 46 39\r",
+ "10 46 40\r",
+ "10 46 41\r",
+ "10 46 42\r",
+ "10 46 43\r",
+ "10 46 44\r",
+ "10 46 45\r",
+ "10 46 46\r",
+ "10 46 47\r",
+ "10 46 48\r",
+ "10 46 49\r",
+ "10 46 50\r",
+ "10 46 51\r",
+ "10 46 52\r",
+ "10 46 53\r",
+ "10 46 54\r",
+ "10 46 55\r",
+ "10 46 56\r",
+ "10 46 57\r",
+ "10 46 58\r",
+ "10 47 1\r",
+ "10 47 2\r",
+ "10 47 3\r",
+ "10 47 4\r",
+ "10 47 5\r",
+ "10 47 6\r",
+ "10 47 7\r",
+ "10 47 8\r",
+ "10 47 9\r",
+ "10 47 10\r",
+ "10 47 11\r",
+ "10 47 12\r",
+ "10 47 13\r",
+ "10 47 14\r",
+ "10 47 15\r",
+ "10 47 16\r",
+ "10 47 17\r",
+ "10 47 18\r",
+ "10 47 19\r",
+ "10 47 20\r",
+ "10 47 21\r",
+ "10 47 22\r",
+ "10 47 23\r",
+ "10 47 24\r",
+ "10 47 25\r",
+ "10 47 26\r",
+ "10 47 27\r",
+ "10 47 28\r",
+ "10 47 29\r",
+ "10 47 30\r",
+ "10 47 31\r",
+ "10 47 32\r",
+ "10 47 33\r",
+ "10 47 34\r",
+ "10 47 35\r",
+ "10 47 36\r",
+ "10 47 37\r",
+ "10 47 38\r",
+ "10 47 39\r",
+ "10 47 40\r",
+ "10 47 41\r",
+ "10 47 42\r",
+ "10 47 43\r",
+ "10 47 44\r",
+ "10 47 45\r",
+ "10 47 46\r",
+ "10 47 47\r",
+ "10 47 48\r",
+ "10 47 49\r",
+ "10 47 50\r",
+ "10 47 51\r",
+ "10 47 52\r",
+ "10 47 53\r",
+ "10 47 54\r",
+ "10 47 55\r",
+ "10 47 56\r",
+ "10 47 57\r",
+ "10 47 58\r",
+ "10 48 1\r",
+ "10 48 2\r",
+ "10 48 3\r",
+ "10 48 4\r",
+ "10 48 5\r",
+ "10 48 6\r",
+ "10 48 7\r",
+ "10 48 8\r",
+ "10 48 9\r",
+ "10 48 10\r",
+ "10 48 11\r",
+ "10 48 12\r",
+ "10 48 13\r",
+ "10 48 14\r",
+ "10 48 15\r",
+ "10 48 16\r",
+ "10 48 17\r",
+ "10 48 18\r",
+ "10 48 19\r",
+ "10 48 20\r",
+ "10 48 21\r",
+ "10 48 22\r",
+ "10 48 23\r",
+ "10 48 24\r",
+ "10 48 25\r",
+ "10 48 26\r",
+ "10 48 27\r",
+ "10 48 28\r",
+ "10 48 29\r",
+ "10 48 30\r",
+ "10 48 31\r",
+ "10 48 32\r",
+ "10 48 33\r",
+ "10 48 34\r",
+ "10 48 35\r",
+ "10 48 36\r",
+ "10 48 37\r",
+ "10 48 38\r",
+ "10 48 39\r",
+ "10 48 40\r",
+ "10 48 41\r",
+ "10 48 42\r",
+ "10 48 43\r",
+ "10 48 44\r",
+ "10 48 45\r",
+ "10 48 46\r",
+ "10 48 47\r",
+ "10 48 48\r",
+ "10 48 49\r",
+ "10 48 50\r",
+ "10 48 51\r",
+ "10 48 52\r",
+ "10 48 53\r",
+ "10 48 54\r",
+ "10 48 55\r",
+ "10 48 56\r",
+ "10 48 57\r",
+ "10 48 58\r",
+ "10 49 1\r",
+ "10 49 2\r",
+ "10 49 3\r",
+ "10 49 4\r",
+ "10 49 5\r",
+ "10 49 6\r",
+ "10 49 7\r",
+ "10 49 8\r",
+ "10 49 9\r",
+ "10 49 10\r",
+ "10 49 11\r",
+ "10 49 12\r",
+ "10 49 13\r",
+ "10 49 14\r",
+ "10 49 15\r",
+ "10 49 16\r",
+ "10 49 17\r",
+ "10 49 18\r",
+ "10 49 19\r",
+ "10 49 20\r",
+ "10 49 21\r",
+ "10 49 22\r",
+ "10 49 23\r",
+ "10 49 24\r",
+ "10 49 25\r",
+ "10 49 26\r",
+ "10 49 27\r",
+ "10 49 28\r",
+ "10 49 29\r",
+ "10 49 30\r",
+ "10 49 31\r",
+ "10 49 32\r",
+ "10 49 33\r",
+ "10 49 34\r",
+ "10 49 35\r",
+ "10 49 36\r",
+ "10 49 37\r",
+ "10 49 38\r",
+ "10 49 39\r",
+ "10 49 40\r",
+ "10 49 41\r",
+ "10 49 42\r",
+ "10 49 43\r",
+ "10 49 44\r",
+ "10 49 45\r",
+ "10 49 46\r",
+ "10 49 47\r",
+ "10 49 48\r",
+ "10 49 49\r",
+ "10 49 50\r",
+ "10 49 51\r",
+ "10 49 52\r",
+ "10 49 53\r",
+ "10 49 54\r",
+ "10 49 55\r",
+ "10 49 56\r",
+ "10 49 57\r",
+ "10 49 58\r",
+ "10 50 1\r",
+ "10 50 2\r",
+ "10 50 3\r",
+ "10 50 4\r",
+ "10 50 5\r",
+ "10 50 6\r",
+ "10 50 7\r",
+ "10 50 8\r",
+ "10 50 9\r",
+ "10 50 10\r",
+ "10 50 11\r",
+ "10 50 12\r",
+ "10 50 13\r",
+ "10 50 14\r",
+ "10 50 15\r",
+ "10 50 16\r",
+ "10 50 17\r",
+ "10 50 18\r",
+ "10 50 19\r",
+ "10 50 20\r",
+ "10 50 21\r",
+ "10 50 22\r",
+ "10 50 23\r",
+ "10 50 24\r",
+ "10 50 25\r",
+ "10 50 26\r",
+ "10 50 27\r",
+ "10 50 28\r",
+ "10 50 29\r",
+ "10 50 30\r",
+ "10 50 31\r",
+ "10 50 32\r",
+ "10 50 33\r",
+ "10 50 34\r",
+ "10 50 35\r",
+ "10 50 36\r",
+ "10 50 37\r",
+ "10 50 38\r",
+ "10 50 39\r",
+ "10 50 40\r",
+ "10 50 41\r",
+ "10 50 42\r",
+ "10 50 43\r",
+ "10 50 44\r",
+ "10 50 45\r",
+ "10 50 46\r",
+ "10 50 47\r",
+ "10 50 48\r",
+ "10 50 49\r",
+ "10 50 50\r",
+ "10 50 51\r",
+ "10 50 52\r",
+ "10 50 53\r",
+ "10 50 54\r",
+ "10 50 55\r",
+ "10 50 56\r",
+ "10 50 57\r",
+ "10 50 58\r",
+ "10 51 1\r",
+ "10 51 2\r",
+ "10 51 3\r",
+ "10 51 4\r",
+ "10 51 5\r",
+ "10 51 6\r",
+ "10 51 7\r",
+ "10 51 8\r",
+ "10 51 9\r",
+ "10 51 10\r",
+ "10 51 11\r",
+ "10 51 12\r",
+ "10 51 13\r",
+ "10 51 14\r",
+ "10 51 15\r",
+ "10 51 16\r",
+ "10 51 17\r",
+ "10 51 18\r",
+ "10 51 19\r",
+ "10 51 20\r",
+ "10 51 21\r",
+ "10 51 22\r",
+ "10 51 23\r",
+ "10 51 24\r",
+ "10 51 25\r",
+ "10 51 26\r",
+ "10 51 27\r",
+ "10 51 28\r",
+ "10 51 29\r",
+ "10 51 30\r",
+ "10 51 31\r",
+ "10 51 32\r",
+ "10 51 33\r",
+ "10 51 34\r",
+ "10 51 35\r",
+ "10 51 36\r",
+ "10 51 37\r",
+ "10 51 38\r",
+ "10 51 39\r",
+ "10 51 40\r",
+ "10 51 41\r",
+ "10 51 42\r",
+ "10 51 43\r",
+ "10 51 44\r",
+ "10 51 45\r",
+ "10 51 46\r",
+ "10 51 47\r",
+ "10 51 48\r",
+ "10 51 49\r",
+ "10 51 50\r",
+ "10 51 51\r",
+ "10 51 52\r",
+ "10 51 53\r",
+ "10 51 54\r",
+ "10 51 55\r",
+ "10 51 56\r",
+ "10 51 57\r",
+ "10 51 58\r",
+ "10 52 1\r",
+ "10 52 2\r",
+ "10 52 3\r",
+ "10 52 4\r",
+ "10 52 5\r",
+ "10 52 6\r",
+ "10 52 7\r",
+ "10 52 8\r",
+ "10 52 9\r",
+ "10 52 10\r",
+ "10 52 11\r",
+ "10 52 12\r",
+ "10 52 13\r",
+ "10 52 14\r",
+ "10 52 15\r",
+ "10 52 16\r",
+ "10 52 17\r",
+ "10 52 18\r",
+ "10 52 19\r",
+ "10 52 20\r",
+ "10 52 21\r",
+ "10 52 22\r",
+ "10 52 23\r",
+ "10 52 24\r",
+ "10 52 25\r",
+ "10 52 26\r",
+ "10 52 27\r",
+ "10 52 28\r",
+ "10 52 29\r",
+ "10 52 30\r",
+ "10 52 31\r",
+ "10 52 32\r",
+ "10 52 33\r",
+ "10 52 34\r",
+ "10 52 35\r",
+ "10 52 36\r",
+ "10 52 37\r",
+ "10 52 38\r",
+ "10 52 39\r",
+ "10 52 40\r",
+ "10 52 41\r",
+ "10 52 42\r",
+ "10 52 43\r",
+ "10 52 44\r",
+ "10 52 45\r",
+ "10 52 46\r",
+ "10 52 47\r",
+ "10 52 48\r",
+ "10 52 49\r",
+ "10 52 50\r",
+ "10 52 51\r",
+ "10 52 52\r",
+ "10 52 53\r",
+ "10 52 54\r",
+ "10 52 55\r",
+ "10 52 56\r",
+ "10 52 57\r",
+ "10 52 58\r",
+ "10 53 1\r",
+ "10 53 2\r",
+ "10 53 3\r",
+ "10 53 4\r",
+ "10 53 5\r",
+ "10 53 6\r",
+ "10 53 7\r",
+ "10 53 8\r",
+ "10 53 9\r",
+ "10 53 10\r",
+ "10 53 11\r",
+ "10 53 12\r",
+ "10 53 13\r",
+ "10 53 14\r",
+ "10 53 15\r",
+ "10 53 16\r",
+ "10 53 17\r",
+ "10 53 18\r",
+ "10 53 19\r",
+ "10 53 20\r",
+ "10 53 21\r",
+ "10 53 22\r",
+ "10 53 23\r",
+ "10 53 24\r",
+ "10 53 25\r",
+ "10 53 26\r",
+ "10 53 27\r",
+ "10 53 28\r",
+ "10 53 29\r",
+ "10 53 30\r",
+ "10 53 31\r",
+ "10 53 32\r",
+ "10 53 33\r",
+ "10 53 34\r",
+ "10 53 35\r",
+ "10 53 36\r",
+ "10 53 37\r",
+ "10 53 38\r",
+ "10 53 39\r",
+ "10 53 40\r",
+ "10 53 41\r",
+ "10 53 42\r",
+ "10 53 43\r",
+ "10 53 44\r",
+ "10 53 45\r",
+ "10 53 46\r",
+ "10 53 47\r",
+ "10 53 48\r",
+ "10 53 49\r",
+ "10 53 50\r",
+ "10 53 51\r",
+ "10 53 52\r",
+ "10 53 53\r",
+ "10 53 54\r",
+ "10 53 55\r",
+ "10 53 56\r",
+ "10 53 57\r",
+ "10 53 58\r",
+ "10 54 1\r",
+ "10 54 2\r",
+ "10 54 3\r",
+ "10 54 4\r",
+ "10 54 5\r",
+ "10 54 6\r",
+ "10 54 7\r",
+ "10 54 8\r",
+ "10 54 9\r",
+ "10 54 10\r",
+ "10 54 11\r",
+ "10 54 12\r",
+ "10 54 13\r",
+ "10 54 14\r",
+ "10 54 15\r",
+ "10 54 16\r",
+ "10 54 17\r",
+ "10 54 18\r",
+ "10 54 19\r",
+ "10 54 20\r",
+ "10 54 21\r",
+ "10 54 22\r",
+ "10 54 23\r",
+ "10 54 24\r",
+ "10 54 25\r",
+ "10 54 26\r",
+ "10 54 27\r",
+ "10 54 28\r",
+ "10 54 29\r",
+ "10 54 30\r",
+ "10 54 31\r",
+ "10 54 32\r",
+ "10 54 33\r",
+ "10 54 34\r",
+ "10 54 35\r",
+ "10 54 36\r",
+ "10 54 37\r",
+ "10 54 38\r",
+ "10 54 39\r",
+ "10 54 40\r",
+ "10 54 41\r",
+ "10 54 42\r",
+ "10 54 43\r",
+ "10 54 44\r",
+ "10 54 45\r",
+ "10 54 46\r",
+ "10 54 47\r",
+ "10 54 48\r",
+ "10 54 49\r",
+ "10 54 50\r",
+ "10 54 51\r",
+ "10 54 52\r",
+ "10 54 53\r",
+ "10 54 54\r",
+ "10 54 55\r",
+ "10 54 56\r",
+ "10 54 57\r",
+ "10 54 58\r",
+ "10 55 1\r",
+ "10 55 2\r",
+ "10 55 3\r",
+ "10 55 4\r",
+ "10 55 5\r",
+ "10 55 6\r",
+ "10 55 7\r",
+ "10 55 8\r",
+ "10 55 9\r",
+ "10 55 10\r",
+ "10 55 11\r",
+ "10 55 12\r",
+ "10 55 13\r",
+ "10 55 14\r",
+ "10 55 15\r",
+ "10 55 16\r",
+ "10 55 17\r",
+ "10 55 18\r",
+ "10 55 19\r",
+ "10 55 20\r",
+ "10 55 21\r",
+ "10 55 22\r",
+ "10 55 23\r",
+ "10 55 24\r",
+ "10 55 25\r",
+ "10 55 26\r",
+ "10 55 27\r",
+ "10 55 28\r",
+ "10 55 29\r",
+ "10 55 30\r",
+ "10 55 31\r",
+ "10 55 32\r",
+ "10 55 33\r",
+ "10 55 34\r",
+ "10 55 35\r",
+ "10 55 36\r",
+ "10 55 37\r",
+ "10 55 38\r",
+ "10 55 39\r",
+ "10 55 40\r",
+ "10 55 41\r",
+ "10 55 42\r",
+ "10 55 43\r",
+ "10 55 44\r",
+ "10 55 45\r",
+ "10 55 46\r",
+ "10 55 47\r",
+ "10 55 48\r",
+ "10 55 49\r",
+ "10 55 50\r",
+ "10 55 51\r",
+ "10 55 52\r",
+ "10 55 53\r",
+ "10 55 54\r",
+ "10 55 55\r",
+ "10 55 56\r",
+ "10 55 57\r",
+ "10 55 58\r",
+ "10 56 1\r",
+ "10 56 2\r",
+ "10 56 3\r",
+ "10 56 4\r",
+ "10 56 5\r",
+ "10 56 6\r",
+ "10 56 7\r",
+ "10 56 8\r",
+ "10 56 9\r",
+ "10 56 10\r",
+ "10 56 11\r",
+ "10 56 12\r",
+ "10 56 13\r",
+ "10 56 14\r",
+ "10 56 15\r",
+ "10 56 16\r",
+ "10 56 17\r",
+ "10 56 18\r",
+ "10 56 19\r",
+ "10 56 20\r",
+ "10 56 21\r",
+ "10 56 22\r",
+ "10 56 23\r",
+ "10 56 24\r",
+ "10 56 25\r",
+ "10 56 26\r",
+ "10 56 27\r",
+ "10 56 28\r",
+ "10 56 29\r",
+ "10 56 30\r",
+ "10 56 31\r",
+ "10 56 32\r",
+ "10 56 33\r",
+ "10 56 34\r",
+ "10 56 35\r",
+ "10 56 36\r",
+ "10 56 37\r",
+ "10 56 38\r",
+ "10 56 39\r",
+ "10 56 40\r",
+ "10 56 41\r",
+ "10 56 42\r",
+ "10 56 43\r",
+ "10 56 44\r",
+ "10 56 45\r",
+ "10 56 46\r",
+ "10 56 47\r",
+ "10 56 48\r",
+ "10 56 49\r",
+ "10 56 50\r",
+ "10 56 51\r",
+ "10 56 52\r",
+ "10 56 53\r",
+ "10 56 54\r",
+ "10 56 55\r",
+ "10 56 56\r",
+ "10 56 57\r",
+ "10 56 58\r",
+ "10 57 1\r",
+ "10 57 2\r",
+ "10 57 3\r",
+ "10 57 4\r",
+ "10 57 5\r",
+ "10 57 6\r",
+ "10 57 7\r",
+ "10 57 8\r",
+ "10 57 9\r",
+ "10 57 10\r",
+ "10 57 11\r",
+ "10 57 12\r",
+ "10 57 13\r",
+ "10 57 14\r",
+ "10 57 15\r",
+ "10 57 16\r",
+ "10 57 17\r",
+ "10 57 18\r",
+ "10 57 19\r",
+ "10 57 20\r",
+ "10 57 21\r",
+ "10 57 22\r",
+ "10 57 23\r",
+ "10 57 24\r",
+ "10 57 25\r",
+ "10 57 26\r",
+ "10 57 27\r",
+ "10 57 28\r",
+ "10 57 29\r",
+ "10 57 30\r",
+ "10 57 31\r",
+ "10 57 32\r",
+ "10 57 33\r",
+ "10 57 34\r",
+ "10 57 35\r",
+ "10 57 36\r",
+ "10 57 37\r",
+ "10 57 38\r",
+ "10 57 39\r",
+ "10 57 40\r",
+ "10 57 41\r",
+ "10 57 42\r",
+ "10 57 43\r",
+ "10 57 44\r",
+ "10 57 45\r",
+ "10 57 46\r",
+ "10 57 47\r",
+ "10 57 48\r",
+ "10 57 49\r",
+ "10 57 50\r",
+ "10 57 51\r",
+ "10 57 52\r",
+ "10 57 53\r",
+ "10 57 54\r",
+ "10 57 55\r",
+ "10 57 56\r",
+ "10 57 57\r",
+ "10 57 58\r",
+ "10 58 1\r",
+ "10 58 2\r",
+ "10 58 3\r",
+ "10 58 4\r",
+ "10 58 5\r",
+ "10 58 6\r",
+ "10 58 7\r",
+ "10 58 8\r",
+ "10 58 9\r",
+ "10 58 10\r",
+ "10 58 11\r",
+ "10 58 12\r",
+ "10 58 13\r",
+ "10 58 14\r",
+ "10 58 15\r",
+ "10 58 16\r",
+ "10 58 17\r",
+ "10 58 18\r",
+ "10 58 19\r",
+ "10 58 20\r",
+ "10 58 21\r",
+ "10 58 22\r",
+ "10 58 23\r",
+ "10 58 24\r",
+ "10 58 25\r",
+ "10 58 26\r",
+ "10 58 27\r",
+ "10 58 28\r",
+ "10 58 29\r",
+ "10 58 30\r",
+ "10 58 31\r",
+ "10 58 32\r",
+ "10 58 33\r",
+ "10 58 34\r",
+ "10 58 35\r",
+ "10 58 36\r",
+ "10 58 37\r",
+ "10 58 38\r",
+ "10 58 39\r",
+ "10 58 40\r",
+ "10 58 41\r",
+ "10 58 42\r",
+ "10 58 43\r",
+ "10 58 44\r",
+ "10 58 45\r",
+ "10 58 46\r",
+ "10 58 47\r",
+ "10 58 48\r",
+ "10 58 49\r",
+ "10 58 50\r",
+ "10 58 51\r",
+ "10 58 52\r",
+ "10 58 53\r",
+ "10 58 54\r",
+ "10 58 55\r",
+ "10 58 56\r",
+ "10 58 57\r",
+ "10 58 58\r",
+ "11 1 1\r",
+ "11 1 2\r",
+ "11 1 3\r",
+ "11 1 4\r",
+ "11 1 5\r",
+ "11 1 6\r",
+ "11 1 7\r",
+ "11 1 8\r",
+ "11 1 9\r",
+ "11 1 10\r",
+ "11 1 11\r",
+ "11 1 12\r",
+ "11 1 13\r",
+ "11 1 14\r",
+ "11 1 15\r",
+ "11 1 16\r",
+ "11 1 17\r",
+ "11 1 18\r",
+ "11 1 19\r",
+ "11 1 20\r",
+ "11 1 21\r",
+ "11 1 22\r",
+ "11 1 23\r",
+ "11 1 24\r",
+ "11 1 25\r",
+ "11 1 26\r",
+ "11 1 27\r",
+ "11 1 28\r",
+ "11 1 29\r",
+ "11 1 30\r",
+ "11 1 31\r",
+ "11 1 32\r",
+ "11 1 33\r",
+ "11 1 34\r",
+ "11 1 35\r",
+ "11 1 36\r",
+ "11 1 37\r",
+ "11 1 38\r",
+ "11 1 39\r",
+ "11 1 40\r",
+ "11 1 41\r",
+ "11 1 42\r",
+ "11 1 43\r",
+ "11 1 44\r",
+ "11 1 45\r",
+ "11 1 46\r",
+ "11 1 47\r",
+ "11 1 48\r",
+ "11 1 49\r",
+ "11 1 50\r",
+ "11 1 51\r",
+ "11 1 52\r",
+ "11 1 53\r",
+ "11 1 54\r",
+ "11 1 55\r",
+ "11 1 56\r",
+ "11 1 57\r",
+ "11 1 58\r",
+ "11 2 1\r",
+ "11 2 2\r",
+ "11 2 3\r",
+ "11 2 4\r",
+ "11 2 5\r",
+ "11 2 6\r",
+ "11 2 7\r",
+ "11 2 8\r",
+ "11 2 9\r",
+ "11 2 10\r",
+ "11 2 11\r",
+ "11 2 12\r",
+ "11 2 13\r",
+ "11 2 14\r",
+ "11 2 15\r",
+ "11 2 16\r",
+ "11 2 17\r",
+ "11 2 18\r",
+ "11 2 19\r",
+ "11 2 20\r",
+ "11 2 21\r",
+ "11 2 22\r",
+ "11 2 23\r",
+ "11 2 24\r",
+ "11 2 25\r",
+ "11 2 26\r",
+ "11 2 27\r",
+ "11 2 28\r",
+ "11 2 29\r",
+ "11 2 30\r",
+ "11 2 31\r",
+ "11 2 32\r",
+ "11 2 33\r",
+ "11 2 34\r",
+ "11 2 35\r",
+ "11 2 36\r",
+ "11 2 37\r",
+ "11 2 38\r",
+ "11 2 39\r",
+ "11 2 40\r",
+ "11 2 41\r",
+ "11 2 42\r",
+ "11 2 43\r",
+ "11 2 44\r",
+ "11 2 45\r",
+ "11 2 46\r",
+ "11 2 47\r",
+ "11 2 48\r",
+ "11 2 49\r",
+ "11 2 50\r",
+ "11 2 51\r",
+ "11 2 52\r",
+ "11 2 53\r",
+ "11 2 54\r",
+ "11 2 55\r",
+ "11 2 56\r",
+ "11 2 57\r",
+ "11 2 58\r",
+ "11 3 1\r",
+ "11 3 2\r",
+ "11 3 3\r",
+ "11 3 4\r",
+ "11 3 5\r",
+ "11 3 6\r",
+ "11 3 7\r",
+ "11 3 8\r",
+ "11 3 9\r",
+ "11 3 10\r",
+ "11 3 11\r",
+ "11 3 12\r",
+ "11 3 13\r",
+ "11 3 14\r",
+ "11 3 15\r",
+ "11 3 16\r",
+ "11 3 17\r",
+ "11 3 18\r",
+ "11 3 19\r",
+ "11 3 20\r",
+ "11 3 21\r",
+ "11 3 22\r",
+ "11 3 23\r",
+ "11 3 24\r",
+ "11 3 25\r",
+ "11 3 26\r",
+ "11 3 27\r",
+ "11 3 28\r",
+ "11 3 29\r",
+ "11 3 30\r",
+ "11 3 31\r",
+ "11 3 32\r",
+ "11 3 33\r",
+ "11 3 34\r",
+ "11 3 35\r",
+ "11 3 36\r",
+ "11 3 37\r",
+ "11 3 38\r",
+ "11 3 39\r",
+ "11 3 40\r",
+ "11 3 41\r",
+ "11 3 42\r",
+ "11 3 43\r",
+ "11 3 44\r",
+ "11 3 45\r",
+ "11 3 46\r",
+ "11 3 47\r",
+ "11 3 48\r",
+ "11 3 49\r",
+ "11 3 50\r",
+ "11 3 51\r",
+ "11 3 52\r",
+ "11 3 53\r",
+ "11 3 54\r",
+ "11 3 55\r",
+ "11 3 56\r",
+ "11 3 57\r",
+ "11 3 58\r",
+ "11 4 1\r",
+ "11 4 2\r",
+ "11 4 3\r",
+ "11 4 4\r",
+ "11 4 5\r",
+ "11 4 6\r",
+ "11 4 7\r",
+ "11 4 8\r",
+ "11 4 9\r",
+ "11 4 10\r",
+ "11 4 11\r",
+ "11 4 12\r",
+ "11 4 13\r",
+ "11 4 14\r",
+ "11 4 15\r",
+ "11 4 16\r",
+ "11 4 17\r",
+ "11 4 18\r",
+ "11 4 19\r",
+ "11 4 20\r",
+ "11 4 21\r",
+ "11 4 22\r",
+ "11 4 23\r",
+ "11 4 24\r",
+ "11 4 25\r",
+ "11 4 26\r",
+ "11 4 27\r",
+ "11 4 28\r",
+ "11 4 29\r",
+ "11 4 30\r",
+ "11 4 31\r",
+ "11 4 32\r",
+ "11 4 33\r",
+ "11 4 34\r",
+ "11 4 35\r",
+ "11 4 36\r",
+ "11 4 37\r",
+ "11 4 38\r",
+ "11 4 39\r",
+ "11 4 40\r",
+ "11 4 41\r",
+ "11 4 42\r",
+ "11 4 43\r",
+ "11 4 44\r",
+ "11 4 45\r",
+ "11 4 46\r",
+ "11 4 47\r",
+ "11 4 48\r",
+ "11 4 49\r",
+ "11 4 50\r",
+ "11 4 51\r",
+ "11 4 52\r",
+ "11 4 53\r",
+ "11 4 54\r",
+ "11 4 55\r",
+ "11 4 56\r",
+ "11 4 57\r",
+ "11 4 58\r",
+ "11 5 1\r",
+ "11 5 2\r",
+ "11 5 3\r",
+ "11 5 4\r",
+ "11 5 5\r",
+ "11 5 6\r",
+ "11 5 7\r",
+ "11 5 8\r",
+ "11 5 9\r",
+ "11 5 10\r",
+ "11 5 11\r",
+ "11 5 12\r",
+ "11 5 13\r",
+ "11 5 14\r",
+ "11 5 15\r",
+ "11 5 16\r",
+ "11 5 17\r",
+ "11 5 18\r",
+ "11 5 19\r",
+ "11 5 20\r",
+ "11 5 21\r",
+ "11 5 22\r",
+ "11 5 23\r",
+ "11 5 24\r",
+ "11 5 25\r",
+ "11 5 26\r",
+ "11 5 27\r",
+ "11 5 28\r",
+ "11 5 29\r",
+ "11 5 30\r",
+ "11 5 31\r",
+ "11 5 32\r",
+ "11 5 33\r",
+ "11 5 34\r",
+ "11 5 35\r",
+ "11 5 36\r",
+ "11 5 37\r",
+ "11 5 38\r",
+ "11 5 39\r",
+ "11 5 40\r",
+ "11 5 41\r",
+ "11 5 42\r",
+ "11 5 43\r",
+ "11 5 44\r",
+ "11 5 45\r",
+ "11 5 46\r",
+ "11 5 47\r",
+ "11 5 48\r",
+ "11 5 49\r",
+ "11 5 50\r",
+ "11 5 51\r",
+ "11 5 52\r",
+ "11 5 53\r",
+ "11 5 54\r",
+ "11 5 55\r",
+ "11 5 56\r",
+ "11 5 57\r",
+ "11 5 58\r",
+ "11 6 1\r",
+ "11 6 2\r",
+ "11 6 3\r",
+ "11 6 4\r",
+ "11 6 5\r",
+ "11 6 6\r",
+ "11 6 7\r",
+ "11 6 8\r",
+ "11 6 9\r",
+ "11 6 10\r",
+ "11 6 11\r",
+ "11 6 12\r",
+ "11 6 13\r",
+ "11 6 14\r",
+ "11 6 15\r",
+ "11 6 16\r",
+ "11 6 17\r",
+ "11 6 18\r",
+ "11 6 19\r",
+ "11 6 20\r",
+ "11 6 21\r",
+ "11 6 22\r",
+ "11 6 23\r",
+ "11 6 24\r",
+ "11 6 25\r",
+ "11 6 26\r",
+ "11 6 27\r",
+ "11 6 28\r",
+ "11 6 29\r",
+ "11 6 30\r",
+ "11 6 31\r",
+ "11 6 32\r",
+ "11 6 33\r",
+ "11 6 34\r",
+ "11 6 35\r",
+ "11 6 36\r",
+ "11 6 37\r",
+ "11 6 38\r",
+ "11 6 39\r",
+ "11 6 40\r",
+ "11 6 41\r",
+ "11 6 42\r",
+ "11 6 43\r",
+ "11 6 44\r",
+ "11 6 45\r",
+ "11 6 46\r",
+ "11 6 47\r",
+ "11 6 48\r",
+ "11 6 49\r",
+ "11 6 50\r",
+ "11 6 51\r",
+ "11 6 52\r",
+ "11 6 53\r",
+ "11 6 54\r",
+ "11 6 55\r",
+ "11 6 56\r",
+ "11 6 57\r",
+ "11 6 58\r",
+ "11 7 1\r",
+ "11 7 2\r",
+ "11 7 3\r",
+ "11 7 4\r",
+ "11 7 5\r",
+ "11 7 6\r",
+ "11 7 7\r",
+ "11 7 8\r",
+ "11 7 9\r",
+ "11 7 10\r",
+ "11 7 11\r",
+ "11 7 12\r",
+ "11 7 13\r",
+ "11 7 14\r",
+ "11 7 15\r",
+ "11 7 16\r",
+ "11 7 17\r",
+ "11 7 18\r",
+ "11 7 19\r",
+ "11 7 20\r",
+ "11 7 21\r",
+ "11 7 22\r",
+ "11 7 23\r",
+ "11 7 24\r",
+ "11 7 25\r",
+ "11 7 26\r",
+ "11 7 27\r",
+ "11 7 28\r",
+ "11 7 29\r",
+ "11 7 30\r",
+ "11 7 31\r",
+ "11 7 32\r",
+ "11 7 33\r",
+ "11 7 34\r",
+ "11 7 35\r",
+ "11 7 36\r",
+ "11 7 37\r",
+ "11 7 38\r",
+ "11 7 39\r",
+ "11 7 40\r",
+ "11 7 41\r",
+ "11 7 42\r",
+ "11 7 43\r",
+ "11 7 44\r",
+ "11 7 45\r",
+ "11 7 46\r",
+ "11 7 47\r",
+ "11 7 48\r",
+ "11 7 49\r",
+ "11 7 50\r",
+ "11 7 51\r",
+ "11 7 52\r",
+ "11 7 53\r",
+ "11 7 54\r",
+ "11 7 55\r",
+ "11 7 56\r",
+ "11 7 57\r",
+ "11 7 58\r",
+ "11 8 1\r",
+ "11 8 2\r",
+ "11 8 3\r",
+ "11 8 4\r",
+ "11 8 5\r",
+ "11 8 6\r",
+ "11 8 7\r",
+ "11 8 8\r",
+ "11 8 9\r",
+ "11 8 10\r",
+ "11 8 11\r",
+ "11 8 12\r",
+ "11 8 13\r",
+ "11 8 14\r",
+ "11 8 15\r",
+ "11 8 16\r",
+ "11 8 17\r",
+ "11 8 18\r",
+ "11 8 19\r",
+ "11 8 20\r",
+ "11 8 21\r",
+ "11 8 22\r",
+ "11 8 23\r",
+ "11 8 24\r",
+ "11 8 25\r",
+ "11 8 26\r",
+ "11 8 27\r",
+ "11 8 28\r",
+ "11 8 29\r",
+ "11 8 30\r",
+ "11 8 31\r",
+ "11 8 32\r",
+ "11 8 33\r",
+ "11 8 34\r",
+ "11 8 35\r",
+ "11 8 36\r",
+ "11 8 37\r",
+ "11 8 38\r",
+ "11 8 39\r",
+ "11 8 40\r",
+ "11 8 41\r",
+ "11 8 42\r",
+ "11 8 43\r",
+ "11 8 44\r",
+ "11 8 45\r",
+ "11 8 46\r",
+ "11 8 47\r",
+ "11 8 48\r",
+ "11 8 49\r",
+ "11 8 50\r",
+ "11 8 51\r",
+ "11 8 52\r",
+ "11 8 53\r",
+ "11 8 54\r",
+ "11 8 55\r",
+ "11 8 56\r",
+ "11 8 57\r",
+ "11 8 58\r",
+ "11 9 1\r",
+ "11 9 2\r",
+ "11 9 3\r",
+ "11 9 4\r",
+ "11 9 5\r",
+ "11 9 6\r",
+ "11 9 7\r",
+ "11 9 8\r",
+ "11 9 9\r",
+ "11 9 10\r",
+ "11 9 11\r",
+ "11 9 12\r",
+ "11 9 13\r",
+ "11 9 14\r",
+ "11 9 15\r",
+ "11 9 16\r",
+ "11 9 17\r",
+ "11 9 18\r",
+ "11 9 19\r",
+ "11 9 20\r",
+ "11 9 21\r",
+ "11 9 22\r",
+ "11 9 23\r",
+ "11 9 24"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "11 9 25\r",
+ "11 9 26\r",
+ "11 9 27\r",
+ "11 9 28\r",
+ "11 9 29\r",
+ "11 9 30\r",
+ "11 9 31\r",
+ "11 9 32\r",
+ "11 9 33\r",
+ "11 9 34\r",
+ "11 9 35\r",
+ "11 9 36\r",
+ "11 9 37\r",
+ "11 9 38\r",
+ "11 9 39\r",
+ "11 9 40\r",
+ "11 9 41\r",
+ "11 9 42\r",
+ "11 9 43\r",
+ "11 9 44\r",
+ "11 9 45\r",
+ "11 9 46\r",
+ "11 9 47\r",
+ "11 9 48\r",
+ "11 9 49\r",
+ "11 9 50\r",
+ "11 9 51\r",
+ "11 9 52\r",
+ "11 9 53\r",
+ "11 9 54\r",
+ "11 9 55\r",
+ "11 9 56\r",
+ "11 9 57\r",
+ "11 9 58\r",
+ "11 10 1\r",
+ "11 10 2\r",
+ "11 10 3\r",
+ "11 10 4\r",
+ "11 10 5\r",
+ "11 10 6\r",
+ "11 10 7\r",
+ "11 10 8\r",
+ "11 10 9\r",
+ "11 10 10\r",
+ "11 10 11\r",
+ "11 10 12\r",
+ "11 10 13\r",
+ "11 10 14\r",
+ "11 10 15\r",
+ "11 10 16\r",
+ "11 10 17\r",
+ "11 10 18\r",
+ "11 10 19\r",
+ "11 10 20\r",
+ "11 10 21\r",
+ "11 10 22\r",
+ "11 10 23\r",
+ "11 10 24\r",
+ "11 10 25\r",
+ "11 10 26\r",
+ "11 10 27\r",
+ "11 10 28\r",
+ "11 10 29\r",
+ "11 10 30\r",
+ "11 10 31\r",
+ "11 10 32\r",
+ "11 10 33\r",
+ "11 10 34\r",
+ "11 10 35\r",
+ "11 10 36\r",
+ "11 10 37\r",
+ "11 10 38\r",
+ "11 10 39\r",
+ "11 10 40\r",
+ "11 10 41\r",
+ "11 10 42\r",
+ "11 10 43\r",
+ "11 10 44\r",
+ "11 10 45\r",
+ "11 10 46\r",
+ "11 10 47\r",
+ "11 10 48\r",
+ "11 10 49\r",
+ "11 10 50\r",
+ "11 10 51\r",
+ "11 10 52\r",
+ "11 10 53\r",
+ "11 10 54\r",
+ "11 10 55\r",
+ "11 10 56\r",
+ "11 10 57\r",
+ "11 10 58\r",
+ "11 11 1\r",
+ "11 11 2\r",
+ "11 11 3\r",
+ "11 11 4\r",
+ "11 11 5\r",
+ "11 11 6\r",
+ "11 11 7\r",
+ "11 11 8\r",
+ "11 11 9\r",
+ "11 11 10\r",
+ "11 11 11\r",
+ "11 11 12\r",
+ "11 11 13\r",
+ "11 11 14\r",
+ "11 11 15\r",
+ "11 11 16\r",
+ "11 11 17\r",
+ "11 11 18\r",
+ "11 11 19\r",
+ "11 11 20\r",
+ "11 11 21\r",
+ "11 11 22\r",
+ "11 11 23\r",
+ "11 11 24\r",
+ "11 11 25\r",
+ "11 11 26\r",
+ "11 11 27\r",
+ "11 11 28\r",
+ "11 11 29\r",
+ "11 11 30\r",
+ "11 11 31\r",
+ "11 11 32\r",
+ "11 11 33\r",
+ "11 11 34\r",
+ "11 11 35\r",
+ "11 11 36\r",
+ "11 11 37\r",
+ "11 11 38\r",
+ "11 11 39\r",
+ "11 11 40\r",
+ "11 11 41\r",
+ "11 11 42\r",
+ "11 11 43\r",
+ "11 11 44\r",
+ "11 11 45\r",
+ "11 11 46\r",
+ "11 11 47\r",
+ "11 11 48\r",
+ "11 11 49\r",
+ "11 11 50\r",
+ "11 11 51\r",
+ "11 11 52\r",
+ "11 11 53\r",
+ "11 11 54\r",
+ "11 11 55\r",
+ "11 11 56\r",
+ "11 11 57\r",
+ "11 11 58\r",
+ "11 12 1\r",
+ "11 12 2\r",
+ "11 12 3\r",
+ "11 12 4\r",
+ "11 12 5\r",
+ "11 12 6\r",
+ "11 12 7\r",
+ "11 12 8\r",
+ "11 12 9\r",
+ "11 12 10\r",
+ "11 12 11\r",
+ "11 12 12\r",
+ "11 12 13\r",
+ "11 12 14\r",
+ "11 12 15\r",
+ "11 12 16\r",
+ "11 12 17\r",
+ "11 12 18\r",
+ "11 12 19\r",
+ "11 12 20\r",
+ "11 12 21\r",
+ "11 12 22\r",
+ "11 12 23\r",
+ "11 12 24\r",
+ "11 12 25\r",
+ "11 12 26\r",
+ "11 12 27\r",
+ "11 12 28\r",
+ "11 12 29\r",
+ "11 12 30\r",
+ "11 12 31\r",
+ "11 12 32\r",
+ "11 12 33\r",
+ "11 12 34\r",
+ "11 12 35\r",
+ "11 12 36\r",
+ "11 12 37\r",
+ "11 12 38\r",
+ "11 12 39\r",
+ "11 12 40\r",
+ "11 12 41\r",
+ "11 12 42\r",
+ "11 12 43\r",
+ "11 12 44\r",
+ "11 12 45\r",
+ "11 12 46\r",
+ "11 12 47\r",
+ "11 12 48\r",
+ "11 12 49\r",
+ "11 12 50\r",
+ "11 12 51\r",
+ "11 12 52\r",
+ "11 12 53\r",
+ "11 12 54\r",
+ "11 12 55\r",
+ "11 12 56\r",
+ "11 12 57\r",
+ "11 12 58\r",
+ "11 13 1\r",
+ "11 13 2\r",
+ "11 13 3\r",
+ "11 13 4\r",
+ "11 13 5\r",
+ "11 13 6\r",
+ "11 13 7\r",
+ "11 13 8\r",
+ "11 13 9\r",
+ "11 13 10\r",
+ "11 13 11\r",
+ "11 13 12\r",
+ "11 13 13\r",
+ "11 13 14\r",
+ "11 13 15\r",
+ "11 13 16\r",
+ "11 13 17\r",
+ "11 13 18\r",
+ "11 13 19\r",
+ "11 13 20\r",
+ "11 13 21\r",
+ "11 13 22\r",
+ "11 13 23\r",
+ "11 13 24\r",
+ "11 13 25\r",
+ "11 13 26\r",
+ "11 13 27\r",
+ "11 13 28\r",
+ "11 13 29\r",
+ "11 13 30\r",
+ "11 13 31\r",
+ "11 13 32\r",
+ "11 13 33\r",
+ "11 13 34\r",
+ "11 13 35\r",
+ "11 13 36\r",
+ "11 13 37\r",
+ "11 13 38\r",
+ "11 13 39\r",
+ "11 13 40\r",
+ "11 13 41\r",
+ "11 13 42\r",
+ "11 13 43\r",
+ "11 13 44\r",
+ "11 13 45\r",
+ "11 13 46\r",
+ "11 13 47\r",
+ "11 13 48\r",
+ "11 13 49\r",
+ "11 13 50\r",
+ "11 13 51\r",
+ "11 13 52\r",
+ "11 13 53\r",
+ "11 13 54\r",
+ "11 13 55\r",
+ "11 13 56\r",
+ "11 13 57\r",
+ "11 13 58\r",
+ "11 14 1\r",
+ "11 14 2\r",
+ "11 14 3\r",
+ "11 14 4\r",
+ "11 14 5\r",
+ "11 14 6\r",
+ "11 14 7\r",
+ "11 14 8\r",
+ "11 14 9\r",
+ "11 14 10\r",
+ "11 14 11\r",
+ "11 14 12\r",
+ "11 14 13\r",
+ "11 14 14\r",
+ "11 14 15\r",
+ "11 14 16\r",
+ "11 14 17\r",
+ "11 14 18\r",
+ "11 14 19\r",
+ "11 14 20\r",
+ "11 14 21\r",
+ "11 14 22\r",
+ "11 14 23\r",
+ "11 14 24\r",
+ "11 14 25\r",
+ "11 14 26\r",
+ "11 14 27\r",
+ "11 14 28\r",
+ "11 14 29\r",
+ "11 14 30\r",
+ "11 14 31\r",
+ "11 14 32\r",
+ "11 14 33\r",
+ "11 14 34\r",
+ "11 14 35\r",
+ "11 14 36\r",
+ "11 14 37\r",
+ "11 14 38\r",
+ "11 14 39\r",
+ "11 14 40\r",
+ "11 14 41\r",
+ "11 14 42\r",
+ "11 14 43\r",
+ "11 14 44\r",
+ "11 14 45\r",
+ "11 14 46\r",
+ "11 14 47\r",
+ "11 14 48\r",
+ "11 14 49\r",
+ "11 14 50\r",
+ "11 14 51\r",
+ "11 14 52\r",
+ "11 14 53\r",
+ "11 14 54\r",
+ "11 14 55\r",
+ "11 14 56\r",
+ "11 14 57\r",
+ "11 14 58\r",
+ "11 15 1\r",
+ "11 15 2\r",
+ "11 15 3\r",
+ "11 15 4\r",
+ "11 15 5\r",
+ "11 15 6\r",
+ "11 15 7\r",
+ "11 15 8\r",
+ "11 15 9\r",
+ "11 15 10\r",
+ "11 15 11\r",
+ "11 15 12\r",
+ "11 15 13\r",
+ "11 15 14\r",
+ "11 15 15\r",
+ "11 15 16\r",
+ "11 15 17\r",
+ "11 15 18\r",
+ "11 15 19\r",
+ "11 15 20\r",
+ "11 15 21\r",
+ "11 15 22\r",
+ "11 15 23\r",
+ "11 15 24\r",
+ "11 15 25\r",
+ "11 15 26\r",
+ "11 15 27\r",
+ "11 15 28\r",
+ "11 15 29\r",
+ "11 15 30\r",
+ "11 15 31\r",
+ "11 15 32\r",
+ "11 15 33\r",
+ "11 15 34\r",
+ "11 15 35\r",
+ "11 15 36\r",
+ "11 15 37\r",
+ "11 15 38\r",
+ "11 15 39\r",
+ "11 15 40\r",
+ "11 15 41\r",
+ "11 15 42\r",
+ "11 15 43\r",
+ "11 15 44\r",
+ "11 15 45\r",
+ "11 15 46\r",
+ "11 15 47\r",
+ "11 15 48\r",
+ "11 15 49\r",
+ "11 15 50\r",
+ "11 15 51\r",
+ "11 15 52\r",
+ "11 15 53\r",
+ "11 15 54\r",
+ "11 15 55\r",
+ "11 15 56\r",
+ "11 15 57\r",
+ "11 15 58\r",
+ "11 16 1\r",
+ "11 16 2\r",
+ "11 16 3\r",
+ "11 16 4\r",
+ "11 16 5\r",
+ "11 16 6\r",
+ "11 16 7\r",
+ "11 16 8\r",
+ "11 16 9\r",
+ "11 16 10\r",
+ "11 16 11\r",
+ "11 16 12\r",
+ "11 16 13\r",
+ "11 16 14\r",
+ "11 16 15\r",
+ "11 16 16\r",
+ "11 16 17\r",
+ "11 16 18\r",
+ "11 16 19\r",
+ "11 16 20\r",
+ "11 16 21\r",
+ "11 16 22\r",
+ "11 16 23\r",
+ "11 16 24\r",
+ "11 16 25\r",
+ "11 16 26\r",
+ "11 16 27\r",
+ "11 16 28\r",
+ "11 16 29\r",
+ "11 16 30\r",
+ "11 16 31\r",
+ "11 16 32\r",
+ "11 16 33\r",
+ "11 16 34\r",
+ "11 16 35\r",
+ "11 16 36\r",
+ "11 16 37\r",
+ "11 16 38\r",
+ "11 16 39\r",
+ "11 16 40\r",
+ "11 16 41\r",
+ "11 16 42\r",
+ "11 16 43\r",
+ "11 16 44\r",
+ "11 16 45\r",
+ "11 16 46\r",
+ "11 16 47\r",
+ "11 16 48\r",
+ "11 16 49\r",
+ "11 16 50\r",
+ "11 16 51\r",
+ "11 16 52\r",
+ "11 16 53\r",
+ "11 16 54\r",
+ "11 16 55\r",
+ "11 16 56\r",
+ "11 16 57\r",
+ "11 16 58\r",
+ "11 17 1\r",
+ "11 17 2\r",
+ "11 17 3\r",
+ "11 17 4\r",
+ "11 17 5\r",
+ "11 17 6\r",
+ "11 17 7\r",
+ "11 17 8\r",
+ "11 17 9\r",
+ "11 17 10\r",
+ "11 17 11\r",
+ "11 17 12\r",
+ "11 17 13\r",
+ "11 17 14\r",
+ "11 17 15\r",
+ "11 17 16\r",
+ "11 17 17\r",
+ "11 17 18\r",
+ "11 17 19\r",
+ "11 17 20\r",
+ "11 17 21\r",
+ "11 17 22\r",
+ "11 17 23\r",
+ "11 17 24\r",
+ "11 17 25\r",
+ "11 17 26\r",
+ "11 17 27\r",
+ "11 17 28\r",
+ "11 17 29\r",
+ "11 17 30\r",
+ "11 17 31\r",
+ "11 17 32\r",
+ "11 17 33\r",
+ "11 17 34\r",
+ "11 17 35\r",
+ "11 17 36\r",
+ "11 17 37\r",
+ "11 17 38\r",
+ "11 17 39\r",
+ "11 17 40\r",
+ "11 17 41\r",
+ "11 17 42\r",
+ "11 17 43\r",
+ "11 17 44\r",
+ "11 17 45\r",
+ "11 17 46\r",
+ "11 17 47\r",
+ "11 17 48\r",
+ "11 17 49\r",
+ "11 17 50\r",
+ "11 17 51\r",
+ "11 17 52\r",
+ "11 17 53\r",
+ "11 17 54\r",
+ "11 17 55\r",
+ "11 17 56\r",
+ "11 17 57\r",
+ "11 17 58\r",
+ "11 18 1\r",
+ "11 18 2\r",
+ "11 18 3\r",
+ "11 18 4\r",
+ "11 18 5\r",
+ "11 18 6\r",
+ "11 18 7\r",
+ "11 18 8\r",
+ "11 18 9\r",
+ "11 18 10\r",
+ "11 18 11\r",
+ "11 18 12\r",
+ "11 18 13\r",
+ "11 18 14\r",
+ "11 18 15\r",
+ "11 18 16\r",
+ "11 18 17\r",
+ "11 18 18\r",
+ "11 18 19\r",
+ "11 18 20\r",
+ "11 18 21\r",
+ "11 18 22\r",
+ "11 18 23\r",
+ "11 18 24\r",
+ "11 18 25\r",
+ "11 18 26\r",
+ "11 18 27\r",
+ "11 18 28\r",
+ "11 18 29\r",
+ "11 18 30\r",
+ "11 18 31\r",
+ "11 18 32\r",
+ "11 18 33\r",
+ "11 18 34\r",
+ "11 18 35\r",
+ "11 18 36\r",
+ "11 18 37\r",
+ "11 18 38\r",
+ "11 18 39\r",
+ "11 18 40\r",
+ "11 18 41\r",
+ "11 18 42\r",
+ "11 18 43\r",
+ "11 18 44\r",
+ "11 18 45\r",
+ "11 18 46\r",
+ "11 18 47\r",
+ "11 18 48\r",
+ "11 18 49\r",
+ "11 18 50\r",
+ "11 18 51\r",
+ "11 18 52\r",
+ "11 18 53\r",
+ "11 18 54\r",
+ "11 18 55\r",
+ "11 18 56\r",
+ "11 18 57\r",
+ "11 18 58\r",
+ "11 19 1\r",
+ "11 19 2\r",
+ "11 19 3\r",
+ "11 19 4\r",
+ "11 19 5\r",
+ "11 19 6\r",
+ "11 19 7\r",
+ "11 19 8\r",
+ "11 19 9\r",
+ "11 19 10\r",
+ "11 19 11\r",
+ "11 19 12\r",
+ "11 19 13\r",
+ "11 19 14\r",
+ "11 19 15\r",
+ "11 19 16\r",
+ "11 19 17\r",
+ "11 19 18\r",
+ "11 19 19\r",
+ "11 19 20\r",
+ "11 19 21\r",
+ "11 19 22\r",
+ "11 19 23\r",
+ "11 19 24\r",
+ "11 19 25\r",
+ "11 19 26\r",
+ "11 19 27\r",
+ "11 19 28\r",
+ "11 19 29\r",
+ "11 19 30\r",
+ "11 19 31\r",
+ "11 19 32\r",
+ "11 19 33\r",
+ "11 19 34\r",
+ "11 19 35\r",
+ "11 19 36\r",
+ "11 19 37\r",
+ "11 19 38\r",
+ "11 19 39\r",
+ "11 19 40\r",
+ "11 19 41\r",
+ "11 19 42\r",
+ "11 19 43\r",
+ "11 19 44\r",
+ "11 19 45\r",
+ "11 19 46\r",
+ "11 19 47\r",
+ "11 19 48\r",
+ "11 19 49\r",
+ "11 19 50\r",
+ "11 19 51\r",
+ "11 19 52\r",
+ "11 19 53\r",
+ "11 19 54\r",
+ "11 19 55\r",
+ "11 19 56\r",
+ "11 19 57\r",
+ "11 19 58\r",
+ "11 20 1\r",
+ "11 20 2\r",
+ "11 20 3\r",
+ "11 20 4\r",
+ "11 20 5\r",
+ "11 20 6\r",
+ "11 20 7\r",
+ "11 20 8\r",
+ "11 20 9\r",
+ "11 20 10\r",
+ "11 20 11\r",
+ "11 20 12\r",
+ "11 20 13\r",
+ "11 20 14\r",
+ "11 20 15\r",
+ "11 20 16\r",
+ "11 20 17\r",
+ "11 20 18\r",
+ "11 20 19\r",
+ "11 20 20\r",
+ "11 20 21\r",
+ "11 20 22\r",
+ "11 20 23\r",
+ "11 20 24\r",
+ "11 20 25\r",
+ "11 20 26\r",
+ "11 20 27\r",
+ "11 20 28\r",
+ "11 20 29\r",
+ "11 20 30\r",
+ "11 20 31\r",
+ "11 20 32\r",
+ "11 20 33\r",
+ "11 20 34\r",
+ "11 20 35\r",
+ "11 20 36\r",
+ "11 20 37\r",
+ "11 20 38\r",
+ "11 20 39\r",
+ "11 20 40\r",
+ "11 20 41\r",
+ "11 20 42\r",
+ "11 20 43\r",
+ "11 20 44\r",
+ "11 20 45\r",
+ "11 20 46\r",
+ "11 20 47\r",
+ "11 20 48\r",
+ "11 20 49\r",
+ "11 20 50\r",
+ "11 20 51\r",
+ "11 20 52\r",
+ "11 20 53\r",
+ "11 20 54\r",
+ "11 20 55\r",
+ "11 20 56\r",
+ "11 20 57\r",
+ "11 20 58\r",
+ "11 21 1\r",
+ "11 21 2\r",
+ "11 21 3\r",
+ "11 21 4\r",
+ "11 21 5\r",
+ "11 21 6\r",
+ "11 21 7\r",
+ "11 21 8\r",
+ "11 21 9\r",
+ "11 21 10\r",
+ "11 21 11\r",
+ "11 21 12\r",
+ "11 21 13\r",
+ "11 21 14\r",
+ "11 21 15\r",
+ "11 21 16\r",
+ "11 21 17\r",
+ "11 21 18\r",
+ "11 21 19\r",
+ "11 21 20\r",
+ "11 21 21\r",
+ "11 21 22\r",
+ "11 21 23\r",
+ "11 21 24\r",
+ "11 21 25\r",
+ "11 21 26\r",
+ "11 21 27\r",
+ "11 21 28\r",
+ "11 21 29\r",
+ "11 21 30\r",
+ "11 21 31\r",
+ "11 21 32\r",
+ "11 21 33\r",
+ "11 21 34\r",
+ "11 21 35\r",
+ "11 21 36\r",
+ "11 21 37\r",
+ "11 21 38\r",
+ "11 21 39\r",
+ "11 21 40\r",
+ "11 21 41\r",
+ "11 21 42\r",
+ "11 21 43\r",
+ "11 21 44\r",
+ "11 21 45\r",
+ "11 21 46\r",
+ "11 21 47\r",
+ "11 21 48\r",
+ "11 21 49\r",
+ "11 21 50\r",
+ "11 21 51\r",
+ "11 21 52\r",
+ "11 21 53\r",
+ "11 21 54\r",
+ "11 21 55\r",
+ "11 21 56\r",
+ "11 21 57\r",
+ "11 21 58\r",
+ "11 22 1\r",
+ "11 22 2\r",
+ "11 22 3\r",
+ "11 22 4\r",
+ "11 22 5\r",
+ "11 22 6\r",
+ "11 22 7\r",
+ "11 22 8\r",
+ "11 22 9\r",
+ "11 22 10\r",
+ "11 22 11\r",
+ "11 22 12\r",
+ "11 22 13\r",
+ "11 22 14\r",
+ "11 22 15\r",
+ "11 22 16\r",
+ "11 22 17\r",
+ "11 22 18\r",
+ "11 22 19\r",
+ "11 22 20\r",
+ "11 22 21\r",
+ "11 22 22\r",
+ "11 22 23\r",
+ "11 22 24\r",
+ "11 22 25\r",
+ "11 22 26\r",
+ "11 22 27\r",
+ "11 22 28\r",
+ "11 22 29\r",
+ "11 22 30\r",
+ "11 22 31\r",
+ "11 22 32\r",
+ "11 22 33\r",
+ "11 22 34\r",
+ "11 22 35\r",
+ "11 22 36\r",
+ "11 22 37\r",
+ "11 22 38\r",
+ "11 22 39\r",
+ "11 22 40\r",
+ "11 22 41\r",
+ "11 22 42\r",
+ "11 22 43\r",
+ "11 22 44\r",
+ "11 22 45\r",
+ "11 22 46\r",
+ "11 22 47\r",
+ "11 22 48\r",
+ "11 22 49\r",
+ "11 22 50\r",
+ "11 22 51\r",
+ "11 22 52\r",
+ "11 22 53\r",
+ "11 22 54\r",
+ "11 22 55\r",
+ "11 22 56\r",
+ "11 22 57\r",
+ "11 22 58\r",
+ "11 23 1\r",
+ "11 23 2\r",
+ "11 23 3\r",
+ "11 23 4\r",
+ "11 23 5\r",
+ "11 23 6\r",
+ "11 23 7\r",
+ "11 23 8\r",
+ "11 23 9\r",
+ "11 23 10\r",
+ "11 23 11\r",
+ "11 23 12\r",
+ "11 23 13\r",
+ "11 23 14\r",
+ "11 23 15\r",
+ "11 23 16\r",
+ "11 23 17\r",
+ "11 23 18\r",
+ "11 23 19\r",
+ "11 23 20\r",
+ "11 23 21\r",
+ "11 23 22\r",
+ "11 23 23\r",
+ "11 23 24\r",
+ "11 23 25\r",
+ "11 23 26\r",
+ "11 23 27\r",
+ "11 23 28\r",
+ "11 23 29\r",
+ "11 23 30\r",
+ "11 23 31\r",
+ "11 23 32\r",
+ "11 23 33\r",
+ "11 23 34\r",
+ "11 23 35\r",
+ "11 23 36\r",
+ "11 23 37\r",
+ "11 23 38\r",
+ "11 23 39\r",
+ "11 23 40\r",
+ "11 23 41\r",
+ "11 23 42\r",
+ "11 23 43\r",
+ "11 23 44\r",
+ "11 23 45\r",
+ "11 23 46\r",
+ "11 23 47\r",
+ "11 23 48\r",
+ "11 23 49\r",
+ "11 23 50\r",
+ "11 23 51\r",
+ "11 23 52\r",
+ "11 23 53\r",
+ "11 23 54\r",
+ "11 23 55\r",
+ "11 23 56\r",
+ "11 23 57\r",
+ "11 23 58\r",
+ "11 24 1\r",
+ "11 24 2\r",
+ "11 24 3\r",
+ "11 24 4\r",
+ "11 24 5\r",
+ "11 24 6\r",
+ "11 24 7\r",
+ "11 24 8\r",
+ "11 24 9\r",
+ "11 24 10\r",
+ "11 24 11\r",
+ "11 24 12\r",
+ "11 24 13\r",
+ "11 24 14\r",
+ "11 24 15\r",
+ "11 24 16\r",
+ "11 24 17\r",
+ "11 24 18\r",
+ "11 24 19\r",
+ "11 24 20\r",
+ "11 24 21\r",
+ "11 24 22\r",
+ "11 24 23\r",
+ "11 24 24\r",
+ "11 24 25\r",
+ "11 24 26\r",
+ "11 24 27\r",
+ "11 24 28\r",
+ "11 24 29\r",
+ "11 24 30\r",
+ "11 24 31\r",
+ "11 24 32\r",
+ "11 24 33\r",
+ "11 24 34\r",
+ "11 24 35\r",
+ "11 24 36\r",
+ "11 24 37\r",
+ "11 24 38\r",
+ "11 24 39\r",
+ "11 24 40\r",
+ "11 24 41\r",
+ "11 24 42\r",
+ "11 24 43\r",
+ "11 24 44\r",
+ "11 24 45\r",
+ "11 24 46\r",
+ "11 24 47\r",
+ "11 24 48\r",
+ "11 24 49\r",
+ "11 24 50\r",
+ "11 24 51\r",
+ "11 24 52\r",
+ "11 24 53\r",
+ "11 24 54\r",
+ "11 24 55\r",
+ "11 24 56\r",
+ "11 24 57\r",
+ "11 24 58\r",
+ "11 25 1\r",
+ "11 25 2\r",
+ "11 25 3\r",
+ "11 25 4\r",
+ "11 25 5\r",
+ "11 25 6\r",
+ "11 25 7\r",
+ "11 25 8\r",
+ "11 25 9\r",
+ "11 25 10\r",
+ "11 25 11\r",
+ "11 25 12\r",
+ "11 25 13\r",
+ "11 25 14\r",
+ "11 25 15\r",
+ "11 25 16\r",
+ "11 25 17\r",
+ "11 25 18\r",
+ "11 25 19\r",
+ "11 25 20\r",
+ "11 25 21\r",
+ "11 25 22\r",
+ "11 25 23\r",
+ "11 25 24\r",
+ "11 25 25\r",
+ "11 25 26\r",
+ "11 25 27\r",
+ "11 25 28\r",
+ "11 25 29\r",
+ "11 25 30\r",
+ "11 25 31\r",
+ "11 25 32\r",
+ "11 25 33\r",
+ "11 25 34\r",
+ "11 25 35\r",
+ "11 25 36\r",
+ "11 25 37\r",
+ "11 25 38\r",
+ "11 25 39\r",
+ "11 25 40\r",
+ "11 25 41\r",
+ "11 25 42\r",
+ "11 25 43\r",
+ "11 25 44\r",
+ "11 25 45\r",
+ "11 25 46\r",
+ "11 25 47\r",
+ "11 25 48\r",
+ "11 25 49\r",
+ "11 25 50\r",
+ "11 25 51\r",
+ "11 25 52\r",
+ "11 25 53\r",
+ "11 25 54\r",
+ "11 25 55\r",
+ "11 25 56\r",
+ "11 25 57\r",
+ "11 25 58\r",
+ "11 26 1\r",
+ "11 26 2\r",
+ "11 26 3\r",
+ "11 26 4\r",
+ "11 26 5\r",
+ "11 26 6\r",
+ "11 26 7\r",
+ "11 26 8\r",
+ "11 26 9\r",
+ "11 26 10\r",
+ "11 26 11\r",
+ "11 26 12\r",
+ "11 26 13\r",
+ "11 26 14\r",
+ "11 26 15\r",
+ "11 26 16\r",
+ "11 26 17\r",
+ "11 26 18\r",
+ "11 26 19\r",
+ "11 26 20\r",
+ "11 26 21\r",
+ "11 26 22\r",
+ "11 26 23\r",
+ "11 26 24\r",
+ "11 26 25\r",
+ "11 26 26\r",
+ "11 26 27\r",
+ "11 26 28\r",
+ "11 26 29\r",
+ "11 26 30\r",
+ "11 26 31\r",
+ "11 26 32\r",
+ "11 26 33\r",
+ "11 26 34\r",
+ "11 26 35\r",
+ "11 26 36\r",
+ "11 26 37\r",
+ "11 26 38\r",
+ "11 26 39\r",
+ "11 26 40\r",
+ "11 26 41\r",
+ "11 26 42\r",
+ "11 26 43\r",
+ "11 26 44\r",
+ "11 26 45\r",
+ "11 26 46\r",
+ "11 26 47\r",
+ "11 26 48\r",
+ "11 26 49\r",
+ "11 26 50\r",
+ "11 26 51\r",
+ "11 26 52\r",
+ "11 26 53\r",
+ "11 26 54\r",
+ "11 26 55\r",
+ "11 26 56\r",
+ "11 26 57\r",
+ "11 26 58\r",
+ "11 27 1\r",
+ "11 27 2\r",
+ "11 27 3\r",
+ "11 27 4\r",
+ "11 27 5\r",
+ "11 27 6\r",
+ "11 27 7\r",
+ "11 27 8\r",
+ "11 27 9\r",
+ "11 27 10\r",
+ "11 27 11\r",
+ "11 27 12\r",
+ "11 27 13\r",
+ "11 27 14\r",
+ "11 27 15\r",
+ "11 27 16\r",
+ "11 27 17\r",
+ "11 27 18\r",
+ "11 27 19\r",
+ "11 27 20\r",
+ "11 27 21\r",
+ "11 27 22\r",
+ "11 27 23\r",
+ "11 27 24\r",
+ "11 27 25\r",
+ "11 27 26\r",
+ "11 27 27\r",
+ "11 27 28\r",
+ "11 27 29\r",
+ "11 27 30\r",
+ "11 27 31\r",
+ "11 27 32\r",
+ "11 27 33\r",
+ "11 27 34\r",
+ "11 27 35\r",
+ "11 27 36\r",
+ "11 27 37\r",
+ "11 27 38\r",
+ "11 27 39\r",
+ "11 27 40\r",
+ "11 27 41\r",
+ "11 27 42\r",
+ "11 27 43\r",
+ "11 27 44\r",
+ "11 27 45\r",
+ "11 27 46\r",
+ "11 27 47\r",
+ "11 27 48\r",
+ "11 27 49\r",
+ "11 27 50\r",
+ "11 27 51\r",
+ "11 27 52\r",
+ "11 27 53\r",
+ "11 27 54\r",
+ "11 27 55\r",
+ "11 27 56\r",
+ "11 27 57\r",
+ "11 27 58\r",
+ "11 28 1\r",
+ "11 28 2\r",
+ "11 28 3\r",
+ "11 28 4\r",
+ "11 28 5\r",
+ "11 28 6\r",
+ "11 28 7\r",
+ "11 28 8\r",
+ "11 28 9\r",
+ "11 28 10\r",
+ "11 28 11\r",
+ "11 28 12\r",
+ "11 28 13\r",
+ "11 28 14\r",
+ "11 28 15\r",
+ "11 28 16\r",
+ "11 28 17\r",
+ "11 28 18\r",
+ "11 28 19\r",
+ "11 28 20\r",
+ "11 28 21\r",
+ "11 28 22\r",
+ "11 28 23\r",
+ "11 28 24\r",
+ "11 28 25\r",
+ "11 28 26\r",
+ "11 28 27\r",
+ "11 28 28\r",
+ "11 28 29\r",
+ "11 28 30\r",
+ "11 28 31\r",
+ "11 28 32\r",
+ "11 28 33\r",
+ "11 28 34\r",
+ "11 28 35\r",
+ "11 28 36\r",
+ "11 28 37\r",
+ "11 28 38\r",
+ "11 28 39\r",
+ "11 28 40\r",
+ "11 28 41\r",
+ "11 28 42\r",
+ "11 28 43\r",
+ "11 28 44\r",
+ "11 28 45\r",
+ "11 28 46\r",
+ "11 28 47\r",
+ "11 28 48\r",
+ "11 28 49\r",
+ "11 28 50\r",
+ "11 28 51\r",
+ "11 28 52\r",
+ "11 28 53\r",
+ "11 28 54\r",
+ "11 28 55\r",
+ "11 28 56\r",
+ "11 28 57\r",
+ "11 28 58\r",
+ "11 29 1\r",
+ "11 29 2\r",
+ "11 29 3\r",
+ "11 29 4\r",
+ "11 29 5\r",
+ "11 29 6\r",
+ "11 29 7\r",
+ "11 29 8\r",
+ "11 29 9\r",
+ "11 29 10\r",
+ "11 29 11\r",
+ "11 29 12\r",
+ "11 29 13\r",
+ "11 29 14\r",
+ "11 29 15\r",
+ "11 29 16\r",
+ "11 29 17\r",
+ "11 29 18\r",
+ "11 29 19\r",
+ "11 29 20\r",
+ "11 29 21\r",
+ "11 29 22\r",
+ "11 29 23\r",
+ "11 29 24\r",
+ "11 29 25\r",
+ "11 29 26\r",
+ "11 29 27\r",
+ "11 29 28\r",
+ "11 29 29\r",
+ "11 29 30\r",
+ "11 29 31\r",
+ "11 29 32\r",
+ "11 29 33\r",
+ "11 29 34\r",
+ "11 29 35\r",
+ "11 29 36\r",
+ "11 29 37\r",
+ "11 29 38\r",
+ "11 29 39\r",
+ "11 29 40\r",
+ "11 29 41\r",
+ "11 29 42\r",
+ "11 29 43\r",
+ "11 29 44\r",
+ "11 29 45\r",
+ "11 29 46\r",
+ "11 29 47\r",
+ "11 29 48\r",
+ "11 29 49\r",
+ "11 29 50\r",
+ "11 29 51\r",
+ "11 29 52\r",
+ "11 29 53\r",
+ "11 29 54\r",
+ "11 29 55\r",
+ "11 29 56\r",
+ "11 29 57\r",
+ "11 29 58\r",
+ "11 30 1\r",
+ "11 30 2\r",
+ "11 30 3\r",
+ "11 30 4\r",
+ "11 30 5\r",
+ "11 30 6\r",
+ "11 30 7\r",
+ "11 30 8\r",
+ "11 30 9\r",
+ "11 30 10\r",
+ "11 30 11\r",
+ "11 30 12\r",
+ "11 30 13\r",
+ "11 30 14\r",
+ "11 30 15\r",
+ "11 30 16\r",
+ "11 30 17\r",
+ "11 30 18\r",
+ "11 30 19\r",
+ "11 30 20\r",
+ "11 30 21\r",
+ "11 30 22\r",
+ "11 30 23\r",
+ "11 30 24\r",
+ "11 30 25\r",
+ "11 30 26\r",
+ "11 30 27\r",
+ "11 30 28\r",
+ "11 30 29\r",
+ "11 30 30\r",
+ "11 30 31\r",
+ "11 30 32\r",
+ "11 30 33\r",
+ "11 30 34\r",
+ "11 30 35\r",
+ "11 30 36\r",
+ "11 30 37\r",
+ "11 30 38\r",
+ "11 30 39\r",
+ "11 30 40\r",
+ "11 30 41\r",
+ "11 30 42\r",
+ "11 30 43\r",
+ "11 30 44\r",
+ "11 30 45\r",
+ "11 30 46\r",
+ "11 30 47\r",
+ "11 30 48\r",
+ "11 30 49\r",
+ "11 30 50\r",
+ "11 30 51\r",
+ "11 30 52\r",
+ "11 30 53\r",
+ "11 30 54\r",
+ "11 30 55\r",
+ "11 30 56\r",
+ "11 30 57\r",
+ "11 30 58\r",
+ "11 31 1\r",
+ "11 31 2\r",
+ "11 31 3\r",
+ "11 31 4\r",
+ "11 31 5\r",
+ "11 31 6\r",
+ "11 31 7\r",
+ "11 31 8\r",
+ "11 31 9\r",
+ "11 31 10\r",
+ "11 31 11\r",
+ "11 31 12\r",
+ "11 31 13\r",
+ "11 31 14\r",
+ "11 31 15\r",
+ "11 31 16\r",
+ "11 31 17\r",
+ "11 31 18\r",
+ "11 31 19\r",
+ "11 31 20\r",
+ "11 31 21\r",
+ "11 31 22\r",
+ "11 31 23\r",
+ "11 31 24\r",
+ "11 31 25\r",
+ "11 31 26\r",
+ "11 31 27\r",
+ "11 31 28\r",
+ "11 31 29\r",
+ "11 31 30\r",
+ "11 31 31\r",
+ "11 31 32\r",
+ "11 31 33\r",
+ "11 31 34\r",
+ "11 31 35\r",
+ "11 31 36\r",
+ "11 31 37\r",
+ "11 31 38\r",
+ "11 31 39\r",
+ "11 31 40\r",
+ "11 31 41\r",
+ "11 31 42\r",
+ "11 31 43\r",
+ "11 31 44\r",
+ "11 31 45\r",
+ "11 31 46\r",
+ "11 31 47\r",
+ "11 31 48\r",
+ "11 31 49\r",
+ "11 31 50\r",
+ "11 31 51\r",
+ "11 31 52\r",
+ "11 31 53\r",
+ "11 31 54\r",
+ "11 31 55\r",
+ "11 31 56\r",
+ "11 31 57\r",
+ "11 31 58\r",
+ "11 32 1\r",
+ "11 32 2\r",
+ "11 32 3\r",
+ "11 32 4\r",
+ "11 32 5\r",
+ "11 32 6\r",
+ "11 32 7\r",
+ "11 32 8\r",
+ "11 32 9\r",
+ "11 32 10\r",
+ "11 32 11\r",
+ "11 32 12\r",
+ "11 32 13\r",
+ "11 32 14\r",
+ "11 32 15\r",
+ "11 32 16\r",
+ "11 32 17\r",
+ "11 32 18\r",
+ "11 32 19\r",
+ "11 32 20\r",
+ "11 32 21\r",
+ "11 32 22\r",
+ "11 32 23\r",
+ "11 32 24\r",
+ "11 32 25\r",
+ "11 32 26\r",
+ "11 32 27\r",
+ "11 32 28\r",
+ "11 32 29\r",
+ "11 32 30\r",
+ "11 32 31\r",
+ "11 32 32\r",
+ "11 32 33\r",
+ "11 32 34\r",
+ "11 32 35\r",
+ "11 32 36\r",
+ "11 32 37\r",
+ "11 32 38\r",
+ "11 32 39\r",
+ "11 32 40\r",
+ "11 32 41\r",
+ "11 32 42\r",
+ "11 32 43\r",
+ "11 32 44\r",
+ "11 32 45\r",
+ "11 32 46\r",
+ "11 32 47\r",
+ "11 32 48\r",
+ "11 32 49\r",
+ "11 32 50\r",
+ "11 32 51\r",
+ "11 32 52\r",
+ "11 32 53\r",
+ "11 32 54\r",
+ "11 32 55\r",
+ "11 32 56\r",
+ "11 32 57\r",
+ "11 32 58\r",
+ "11 33 1\r",
+ "11 33 2\r",
+ "11 33 3\r",
+ "11 33 4\r",
+ "11 33 5\r",
+ "11 33 6\r",
+ "11 33 7\r",
+ "11 33 8\r",
+ "11 33 9\r",
+ "11 33 10\r",
+ "11 33 11\r",
+ "11 33 12\r",
+ "11 33 13\r",
+ "11 33 14\r",
+ "11 33 15\r",
+ "11 33 16\r",
+ "11 33 17\r",
+ "11 33 18\r",
+ "11 33 19\r",
+ "11 33 20\r",
+ "11 33 21\r",
+ "11 33 22\r",
+ "11 33 23\r",
+ "11 33 24\r",
+ "11 33 25\r",
+ "11 33 26\r",
+ "11 33 27\r",
+ "11 33 28\r",
+ "11 33 29\r",
+ "11 33 30\r",
+ "11 33 31\r",
+ "11 33 32\r",
+ "11 33 33\r",
+ "11 33 34\r",
+ "11 33 35\r",
+ "11 33 36\r",
+ "11 33 37\r",
+ "11 33 38\r",
+ "11 33 39\r",
+ "11 33 40\r",
+ "11 33 41\r",
+ "11 33 42\r",
+ "11 33 43\r",
+ "11 33 44\r",
+ "11 33 45\r",
+ "11 33 46\r",
+ "11 33 47\r",
+ "11 33 48\r",
+ "11 33 49\r",
+ "11 33 50\r",
+ "11 33 51\r",
+ "11 33 52\r",
+ "11 33 53\r",
+ "11 33 54\r",
+ "11 33 55\r",
+ "11 33 56\r",
+ "11 33 57\r",
+ "11 33 58\r",
+ "11 34 1\r",
+ "11 34 2\r",
+ "11 34 3\r",
+ "11 34 4\r",
+ "11 34 5\r",
+ "11 34 6\r",
+ "11 34 7\r",
+ "11 34 8\r",
+ "11 34 9\r",
+ "11 34 10\r",
+ "11 34 11\r",
+ "11 34 12\r",
+ "11 34 13\r",
+ "11 34 14\r",
+ "11 34 15\r",
+ "11 34 16\r",
+ "11 34 17\r",
+ "11 34 18\r",
+ "11 34 19\r",
+ "11 34 20\r",
+ "11 34 21\r",
+ "11 34 22\r",
+ "11 34 23\r",
+ "11 34 24\r",
+ "11 34 25\r",
+ "11 34 26\r",
+ "11 34 27\r",
+ "11 34 28\r",
+ "11 34 29\r",
+ "11 34 30\r",
+ "11 34 31\r",
+ "11 34 32\r",
+ "11 34 33\r",
+ "11 34 34\r",
+ "11 34 35\r",
+ "11 34 36\r",
+ "11 34 37\r",
+ "11 34 38\r",
+ "11 34 39\r",
+ "11 34 40\r",
+ "11 34 41\r",
+ "11 34 42\r",
+ "11 34 43\r",
+ "11 34 44\r",
+ "11 34 45\r",
+ "11 34 46\r",
+ "11 34 47\r",
+ "11 34 48\r",
+ "11 34 49\r",
+ "11 34 50\r",
+ "11 34 51\r",
+ "11 34 52\r",
+ "11 34 53\r",
+ "11 34 54\r",
+ "11 34 55\r",
+ "11 34 56\r",
+ "11 34 57\r",
+ "11 34 58\r",
+ "11 35 1\r",
+ "11 35 2\r",
+ "11 35 3\r",
+ "11 35 4\r",
+ "11 35 5\r",
+ "11 35 6\r",
+ "11 35 7\r",
+ "11 35 8\r",
+ "11 35 9\r",
+ "11 35 10\r",
+ "11 35 11\r",
+ "11 35 12\r",
+ "11 35 13\r",
+ "11 35 14\r",
+ "11 35 15\r",
+ "11 35 16\r",
+ "11 35 17\r",
+ "11 35 18\r",
+ "11 35 19\r",
+ "11 35 20\r",
+ "11 35 21\r",
+ "11 35 22\r",
+ "11 35 23\r",
+ "11 35 24\r",
+ "11 35 25\r",
+ "11 35 26\r",
+ "11 35 27\r",
+ "11 35 28\r",
+ "11 35 29\r",
+ "11 35 30\r",
+ "11 35 31\r",
+ "11 35 32\r",
+ "11 35 33\r",
+ "11 35 34\r",
+ "11 35 35\r",
+ "11 35 36\r",
+ "11 35 37\r",
+ "11 35 38\r",
+ "11 35 39\r",
+ "11 35 40\r",
+ "11 35 41\r",
+ "11 35 42\r",
+ "11 35 43\r",
+ "11 35 44\r",
+ "11 35 45\r",
+ "11 35 46\r",
+ "11 35 47\r",
+ "11 35 48\r",
+ "11 35 49\r",
+ "11 35 50\r",
+ "11 35 51\r",
+ "11 35 52\r",
+ "11 35 53\r",
+ "11 35 54\r",
+ "11 35 55\r",
+ "11 35 56\r",
+ "11 35 57\r",
+ "11 35 58\r",
+ "11 36 1\r",
+ "11 36 2\r",
+ "11 36 3\r",
+ "11 36 4\r",
+ "11 36 5\r",
+ "11 36 6\r",
+ "11 36 7\r",
+ "11 36 8\r",
+ "11 36 9\r",
+ "11 36 10\r",
+ "11 36 11\r",
+ "11 36 12\r",
+ "11 36 13\r",
+ "11 36 14\r",
+ "11 36 15\r",
+ "11 36 16\r",
+ "11 36 17\r",
+ "11 36 18\r",
+ "11 36 19\r",
+ "11 36 20\r",
+ "11 36 21\r",
+ "11 36 22\r",
+ "11 36 23\r",
+ "11 36 24\r",
+ "11 36 25\r",
+ "11 36 26\r",
+ "11 36 27\r",
+ "11 36 28\r",
+ "11 36 29\r",
+ "11 36 30\r",
+ "11 36 31\r",
+ "11 36 32\r",
+ "11 36 33\r",
+ "11 36 34\r",
+ "11 36 35\r",
+ "11 36 36\r",
+ "11 36 37\r",
+ "11 36 38\r",
+ "11 36 39\r",
+ "11 36 40\r",
+ "11 36 41\r",
+ "11 36 42\r",
+ "11 36 43\r",
+ "11 36 44\r",
+ "11 36 45\r",
+ "11 36 46\r",
+ "11 36 47\r",
+ "11 36 48\r",
+ "11 36 49\r",
+ "11 36 50\r",
+ "11 36 51\r",
+ "11 36 52\r",
+ "11 36 53\r",
+ "11 36 54\r",
+ "11 36 55\r",
+ "11 36 56\r",
+ "11 36 57\r",
+ "11 36 58\r",
+ "11 37 1\r",
+ "11 37 2\r",
+ "11 37 3\r",
+ "11 37 4\r",
+ "11 37 5\r",
+ "11 37 6\r",
+ "11 37 7\r",
+ "11 37 8\r",
+ "11 37 9\r",
+ "11 37 10\r",
+ "11 37 11\r",
+ "11 37 12\r",
+ "11 37 13\r",
+ "11 37 14\r",
+ "11 37 15\r",
+ "11 37 16\r",
+ "11 37 17\r",
+ "11 37 18\r",
+ "11 37 19\r",
+ "11 37 20\r",
+ "11 37 21\r",
+ "11 37 22\r",
+ "11 37 23\r",
+ "11 37 24\r",
+ "11 37 25\r",
+ "11 37 26\r",
+ "11 37 27\r",
+ "11 37 28\r",
+ "11 37 29\r",
+ "11 37 30\r",
+ "11 37 31\r",
+ "11 37 32\r",
+ "11 37 33\r",
+ "11 37 34\r",
+ "11 37 35\r",
+ "11 37 36\r",
+ "11 37 37\r",
+ "11 37 38\r",
+ "11 37 39\r",
+ "11 37 40\r",
+ "11 37 41\r",
+ "11 37 42\r",
+ "11 37 43\r",
+ "11 37 44\r",
+ "11 37 45\r",
+ "11 37 46\r",
+ "11 37 47\r",
+ "11 37 48\r",
+ "11 37 49\r",
+ "11 37 50\r",
+ "11 37 51\r",
+ "11 37 52\r",
+ "11 37 53\r",
+ "11 37 54\r",
+ "11 37 55\r",
+ "11 37 56\r",
+ "11 37 57\r",
+ "11 37 58\r",
+ "11 38 1\r",
+ "11 38 2\r",
+ "11 38 3\r",
+ "11 38 4\r",
+ "11 38 5\r",
+ "11 38 6\r",
+ "11 38 7\r",
+ "11 38 8\r",
+ "11 38 9\r",
+ "11 38 10\r",
+ "11 38 11\r",
+ "11 38 12\r",
+ "11 38 13\r",
+ "11 38 14\r",
+ "11 38 15\r",
+ "11 38 16\r",
+ "11 38 17\r",
+ "11 38 18\r",
+ "11 38 19\r",
+ "11 38 20\r",
+ "11 38 21\r",
+ "11 38 22\r",
+ "11 38 23\r",
+ "11 38 24\r",
+ "11 38 25\r",
+ "11 38 26\r",
+ "11 38 27\r",
+ "11 38 28\r",
+ "11 38 29\r",
+ "11 38 30\r",
+ "11 38 31\r",
+ "11 38 32\r",
+ "11 38 33\r",
+ "11 38 34\r",
+ "11 38 35\r",
+ "11 38 36\r",
+ "11 38 37\r",
+ "11 38 38\r",
+ "11 38 39\r",
+ "11 38 40\r",
+ "11 38 41\r",
+ "11 38 42\r",
+ "11 38 43\r",
+ "11 38 44\r",
+ "11 38 45\r",
+ "11 38 46\r",
+ "11 38 47\r",
+ "11 38 48\r",
+ "11 38 49\r",
+ "11 38 50\r",
+ "11 38 51\r",
+ "11 38 52\r",
+ "11 38 53\r",
+ "11 38 54\r",
+ "11 38 55\r",
+ "11 38 56\r",
+ "11 38 57\r",
+ "11 38 58\r",
+ "11 39 1\r",
+ "11 39 2\r",
+ "11 39 3\r",
+ "11 39 4\r",
+ "11 39 5\r",
+ "11 39 6\r",
+ "11 39 7\r",
+ "11 39 8\r",
+ "11 39 9\r",
+ "11 39 10\r",
+ "11 39 11\r",
+ "11 39 12\r",
+ "11 39 13\r",
+ "11 39 14\r",
+ "11 39 15\r",
+ "11 39 16\r",
+ "11 39 17\r",
+ "11 39 18\r",
+ "11 39 19\r",
+ "11 39 20\r",
+ "11 39 21\r",
+ "11 39 22\r",
+ "11 39 23\r",
+ "11 39 24\r",
+ "11 39 25\r",
+ "11 39 26\r",
+ "11 39 27\r",
+ "11 39 28\r",
+ "11 39 29\r",
+ "11 39 30\r",
+ "11 39 31\r",
+ "11 39 32\r",
+ "11 39 33\r",
+ "11 39 34\r",
+ "11 39 35\r",
+ "11 39 36\r",
+ "11 39 37\r",
+ "11 39 38\r",
+ "11 39 39\r",
+ "11 39 40\r",
+ "11 39 41\r",
+ "11 39 42\r",
+ "11 39 43\r",
+ "11 39 44\r",
+ "11 39 45\r",
+ "11 39 46\r",
+ "11 39 47\r",
+ "11 39 48\r",
+ "11 39 49\r",
+ "11 39 50\r",
+ "11 39 51\r",
+ "11 39 52\r",
+ "11 39 53\r",
+ "11 39 54\r",
+ "11 39 55\r",
+ "11 39 56\r",
+ "11 39 57\r",
+ "11 39 58\r",
+ "11 40 1\r",
+ "11 40 2\r",
+ "11 40 3\r",
+ "11 40 4\r",
+ "11 40 5\r",
+ "11 40 6\r",
+ "11 40 7\r",
+ "11 40 8\r",
+ "11 40 9\r",
+ "11 40 10\r",
+ "11 40 11\r",
+ "11 40 12\r",
+ "11 40 13\r",
+ "11 40 14\r",
+ "11 40 15\r",
+ "11 40 16\r",
+ "11 40 17\r",
+ "11 40 18\r",
+ "11 40 19\r",
+ "11 40 20\r",
+ "11 40 21\r",
+ "11 40 22\r",
+ "11 40 23\r",
+ "11 40 24\r",
+ "11 40 25\r",
+ "11 40 26\r",
+ "11 40 27\r",
+ "11 40 28\r",
+ "11 40 29\r",
+ "11 40 30\r",
+ "11 40 31\r",
+ "11 40 32\r",
+ "11 40 33\r",
+ "11 40 34\r",
+ "11 40 35\r",
+ "11 40 36\r",
+ "11 40 37\r",
+ "11 40 38\r",
+ "11 40 39\r",
+ "11 40 40\r",
+ "11 40 41\r",
+ "11 40 42\r",
+ "11 40 43\r",
+ "11 40 44\r",
+ "11 40 45\r",
+ "11 40 46\r",
+ "11 40 47\r",
+ "11 40 48\r",
+ "11 40 49\r",
+ "11 40 50\r",
+ "11 40 51\r",
+ "11 40 52\r",
+ "11 40 53\r",
+ "11 40 54\r",
+ "11 40 55\r",
+ "11 40 56\r",
+ "11 40 57\r",
+ "11 40 58\r",
+ "11 41 1\r",
+ "11 41 2\r",
+ "11 41 3\r",
+ "11 41 4\r",
+ "11 41 5\r",
+ "11 41 6\r",
+ "11 41 7\r",
+ "11 41 8\r",
+ "11 41 9\r",
+ "11 41 10\r",
+ "11 41 11\r",
+ "11 41 12\r",
+ "11 41 13\r",
+ "11 41 14\r",
+ "11 41 15\r",
+ "11 41 16\r",
+ "11 41 17\r",
+ "11 41 18\r",
+ "11 41 19\r",
+ "11 41 20\r",
+ "11 41 21\r",
+ "11 41 22\r",
+ "11 41 23\r",
+ "11 41 24\r",
+ "11 41 25\r",
+ "11 41 26\r",
+ "11 41 27\r",
+ "11 41 28\r",
+ "11 41 29\r",
+ "11 41 30\r",
+ "11 41 31\r",
+ "11 41 32\r",
+ "11 41 33\r",
+ "11 41 34\r",
+ "11 41 35\r",
+ "11 41 36\r",
+ "11 41 37\r",
+ "11 41 38\r",
+ "11 41 39\r",
+ "11 41 40\r",
+ "11 41 41\r",
+ "11 41 42\r",
+ "11 41 43\r",
+ "11 41 44\r",
+ "11 41 45\r",
+ "11 41 46\r",
+ "11 41 47\r",
+ "11 41 48\r",
+ "11 41 49\r",
+ "11 41 50\r",
+ "11 41 51\r",
+ "11 41 52\r",
+ "11 41 53\r",
+ "11 41 54\r",
+ "11 41 55\r",
+ "11 41 56\r",
+ "11 41 57\r",
+ "11 41 58\r",
+ "11 42 1\r",
+ "11 42 2\r",
+ "11 42 3\r",
+ "11 42 4\r",
+ "11 42 5\r",
+ "11 42 6\r",
+ "11 42 7\r",
+ "11 42 8\r",
+ "11 42 9\r",
+ "11 42 10\r",
+ "11 42 11\r",
+ "11 42 12\r",
+ "11 42 13\r",
+ "11 42 14\r",
+ "11 42 15\r",
+ "11 42 16\r",
+ "11 42 17\r",
+ "11 42 18\r",
+ "11 42 19\r",
+ "11 42 20\r",
+ "11 42 21\r",
+ "11 42 22\r",
+ "11 42 23\r",
+ "11 42 24\r",
+ "11 42 25\r",
+ "11 42 26\r",
+ "11 42 27\r",
+ "11 42 28\r",
+ "11 42 29\r",
+ "11 42 30\r",
+ "11 42 31\r",
+ "11 42 32\r",
+ "11 42 33\r",
+ "11 42 34\r",
+ "11 42 35\r",
+ "11 42 36\r",
+ "11 42 37\r",
+ "11 42 38\r",
+ "11 42 39\r",
+ "11 42 40\r",
+ "11 42 41\r",
+ "11 42 42\r",
+ "11 42 43\r",
+ "11 42 44\r",
+ "11 42 45\r",
+ "11 42 46\r",
+ "11 42 47\r",
+ "11 42 48\r",
+ "11 42 49\r",
+ "11 42 50\r",
+ "11 42 51\r",
+ "11 42 52\r",
+ "11 42 53\r",
+ "11 42 54\r",
+ "11 42 55\r",
+ "11 42 56\r",
+ "11 42 57\r",
+ "11 42 58\r",
+ "11 43 1\r",
+ "11 43 2\r",
+ "11 43 3\r",
+ "11 43 4\r",
+ "11 43 5\r",
+ "11 43 6\r",
+ "11 43 7\r",
+ "11 43 8\r",
+ "11 43 9\r",
+ "11 43 10\r",
+ "11 43 11\r",
+ "11 43 12\r",
+ "11 43 13\r",
+ "11 43 14\r",
+ "11 43 15\r",
+ "11 43 16\r",
+ "11 43 17\r",
+ "11 43 18\r",
+ "11 43 19\r",
+ "11 43 20\r",
+ "11 43 21\r",
+ "11 43 22\r",
+ "11 43 23\r",
+ "11 43 24\r",
+ "11 43 25\r",
+ "11 43 26\r",
+ "11 43 27\r",
+ "11 43 28\r",
+ "11 43 29\r",
+ "11 43 30\r",
+ "11 43 31\r",
+ "11 43 32\r",
+ "11 43 33\r",
+ "11 43 34\r",
+ "11 43 35\r",
+ "11 43 36\r",
+ "11 43 37\r",
+ "11 43 38\r",
+ "11 43 39\r",
+ "11 43 40\r",
+ "11 43 41\r",
+ "11 43 42\r",
+ "11 43 43\r",
+ "11 43 44\r",
+ "11 43 45\r",
+ "11 43 46\r",
+ "11 43 47\r",
+ "11 43 48\r",
+ "11 43 49\r",
+ "11 43 50\r",
+ "11 43 51\r",
+ "11 43 52\r",
+ "11 43 53\r",
+ "11 43 54\r",
+ "11 43 55\r",
+ "11 43 56\r",
+ "11 43 57\r",
+ "11 43 58\r",
+ "11 44 1\r",
+ "11 44 2\r",
+ "11 44 3\r",
+ "11 44 4\r",
+ "11 44 5\r",
+ "11 44 6\r",
+ "11 44 7\r",
+ "11 44 8\r",
+ "11 44 9\r",
+ "11 44 10\r",
+ "11 44 11\r",
+ "11 44 12\r",
+ "11 44 13\r",
+ "11 44 14\r",
+ "11 44 15\r",
+ "11 44 16\r",
+ "11 44 17\r",
+ "11 44 18\r",
+ "11 44 19\r",
+ "11 44 20\r",
+ "11 44 21\r",
+ "11 44 22\r",
+ "11 44 23\r",
+ "11 44 24\r",
+ "11 44 25\r",
+ "11 44 26\r",
+ "11 44 27\r",
+ "11 44 28\r",
+ "11 44 29\r",
+ "11 44 30\r",
+ "11 44 31\r",
+ "11 44 32\r",
+ "11 44 33\r",
+ "11 44 34\r",
+ "11 44 35\r",
+ "11 44 36\r",
+ "11 44 37\r",
+ "11 44 38\r",
+ "11 44 39\r",
+ "11 44 40\r",
+ "11 44 41\r",
+ "11 44 42\r",
+ "11 44 43\r",
+ "11 44 44\r",
+ "11 44 45\r",
+ "11 44 46\r",
+ "11 44 47\r",
+ "11 44 48\r",
+ "11 44 49\r",
+ "11 44 50\r",
+ "11 44 51\r",
+ "11 44 52\r",
+ "11 44 53\r",
+ "11 44 54\r",
+ "11 44 55\r",
+ "11 44 56\r",
+ "11 44 57\r",
+ "11 44 58\r",
+ "11 45 1\r",
+ "11 45 2\r",
+ "11 45 3\r",
+ "11 45 4\r",
+ "11 45 5\r",
+ "11 45 6\r",
+ "11 45 7\r",
+ "11 45 8\r",
+ "11 45 9\r",
+ "11 45 10\r",
+ "11 45 11\r",
+ "11 45 12\r",
+ "11 45 13\r",
+ "11 45 14\r",
+ "11 45 15\r",
+ "11 45 16\r",
+ "11 45 17\r",
+ "11 45 18\r",
+ "11 45 19\r",
+ "11 45 20\r",
+ "11 45 21\r",
+ "11 45 22\r",
+ "11 45 23\r",
+ "11 45 24\r",
+ "11 45 25\r",
+ "11 45 26\r",
+ "11 45 27\r",
+ "11 45 28\r",
+ "11 45 29\r",
+ "11 45 30\r",
+ "11 45 31\r",
+ "11 45 32\r",
+ "11 45 33\r",
+ "11 45 34\r",
+ "11 45 35\r",
+ "11 45 36\r",
+ "11 45 37\r",
+ "11 45 38\r",
+ "11 45 39\r",
+ "11 45 40\r",
+ "11 45 41\r",
+ "11 45 42\r",
+ "11 45 43\r",
+ "11 45 44\r",
+ "11 45 45\r",
+ "11 45 46\r",
+ "11 45 47\r",
+ "11 45 48\r",
+ "11 45 49\r",
+ "11 45 50\r",
+ "11 45 51\r",
+ "11 45 52\r",
+ "11 45 53\r",
+ "11 45 54\r",
+ "11 45 55\r",
+ "11 45 56\r",
+ "11 45 57\r",
+ "11 45 58\r",
+ "11 46 1\r",
+ "11 46 2\r",
+ "11 46 3\r",
+ "11 46 4\r",
+ "11 46 5\r",
+ "11 46 6\r",
+ "11 46 7\r",
+ "11 46 8\r",
+ "11 46 9\r",
+ "11 46 10\r",
+ "11 46 11\r",
+ "11 46 12\r",
+ "11 46 13\r",
+ "11 46 14\r",
+ "11 46 15\r",
+ "11 46 16\r",
+ "11 46 17\r",
+ "11 46 18\r",
+ "11 46 19\r",
+ "11 46 20\r",
+ "11 46 21\r",
+ "11 46 22\r",
+ "11 46 23\r",
+ "11 46 24\r",
+ "11 46 25\r",
+ "11 46 26\r",
+ "11 46 27\r",
+ "11 46 28\r",
+ "11 46 29\r",
+ "11 46 30\r",
+ "11 46 31\r",
+ "11 46 32\r",
+ "11 46 33\r",
+ "11 46 34\r",
+ "11 46 35\r",
+ "11 46 36\r",
+ "11 46 37\r",
+ "11 46 38\r",
+ "11 46 39\r",
+ "11 46 40\r",
+ "11 46 41\r",
+ "11 46 42\r",
+ "11 46 43\r",
+ "11 46 44\r",
+ "11 46 45\r",
+ "11 46 46\r",
+ "11 46 47\r",
+ "11 46 48\r",
+ "11 46 49\r",
+ "11 46 50\r",
+ "11 46 51\r",
+ "11 46 52\r",
+ "11 46 53\r",
+ "11 46 54\r",
+ "11 46 55\r",
+ "11 46 56\r",
+ "11 46 57\r",
+ "11 46 58\r",
+ "11 47 1\r",
+ "11 47 2\r",
+ "11 47 3\r",
+ "11 47 4\r",
+ "11 47 5\r",
+ "11 47 6\r",
+ "11 47 7\r",
+ "11 47 8\r",
+ "11 47 9\r",
+ "11 47 10\r",
+ "11 47 11\r",
+ "11 47 12\r",
+ "11 47 13\r",
+ "11 47 14\r",
+ "11 47 15\r",
+ "11 47 16\r",
+ "11 47 17\r",
+ "11 47 18\r",
+ "11 47 19\r",
+ "11 47 20\r",
+ "11 47 21\r",
+ "11 47 22\r",
+ "11 47 23\r",
+ "11 47 24\r",
+ "11 47 25\r",
+ "11 47 26\r",
+ "11 47 27\r",
+ "11 47 28\r",
+ "11 47 29\r",
+ "11 47 30\r",
+ "11 47 31\r",
+ "11 47 32\r",
+ "11 47 33\r",
+ "11 47 34\r",
+ "11 47 35\r",
+ "11 47 36\r",
+ "11 47 37\r",
+ "11 47 38\r",
+ "11 47 39\r",
+ "11 47 40\r",
+ "11 47 41\r",
+ "11 47 42\r",
+ "11 47 43\r",
+ "11 47 44\r",
+ "11 47 45\r",
+ "11 47 46\r",
+ "11 47 47\r",
+ "11 47 48\r",
+ "11 47 49\r",
+ "11 47 50\r",
+ "11 47 51\r",
+ "11 47 52\r",
+ "11 47 53\r",
+ "11 47 54\r",
+ "11 47 55\r",
+ "11 47 56\r",
+ "11 47 57\r",
+ "11 47 58\r",
+ "11 48 1\r",
+ "11 48 2\r",
+ "11 48 3\r",
+ "11 48 4\r",
+ "11 48 5\r",
+ "11 48 6\r",
+ "11 48 7\r",
+ "11 48 8\r",
+ "11 48 9\r",
+ "11 48 10\r",
+ "11 48 11\r",
+ "11 48 12\r",
+ "11 48 13\r",
+ "11 48 14\r",
+ "11 48 15\r",
+ "11 48 16\r",
+ "11 48 17\r",
+ "11 48 18\r",
+ "11 48 19\r",
+ "11 48 20\r",
+ "11 48 21\r",
+ "11 48 22\r",
+ "11 48 23\r",
+ "11 48 24\r",
+ "11 48 25\r",
+ "11 48 26\r",
+ "11 48 27\r",
+ "11 48 28\r",
+ "11 48 29\r",
+ "11 48 30\r",
+ "11 48 31\r",
+ "11 48 32\r",
+ "11 48 33\r",
+ "11 48 34\r",
+ "11 48 35\r",
+ "11 48 36\r",
+ "11 48 37\r",
+ "11 48 38\r",
+ "11 48 39\r",
+ "11 48 40\r",
+ "11 48 41\r",
+ "11 48 42\r",
+ "11 48 43\r",
+ "11 48 44\r",
+ "11 48 45\r",
+ "11 48 46\r",
+ "11 48 47\r",
+ "11 48 48\r",
+ "11 48 49\r",
+ "11 48 50\r",
+ "11 48 51\r",
+ "11 48 52\r",
+ "11 48 53\r",
+ "11 48 54\r",
+ "11 48 55\r",
+ "11 48 56\r",
+ "11 48 57\r",
+ "11 48 58\r",
+ "11 49 1\r",
+ "11 49 2\r",
+ "11 49 3\r",
+ "11 49 4\r",
+ "11 49 5\r",
+ "11 49 6\r",
+ "11 49 7\r",
+ "11 49 8\r",
+ "11 49 9\r",
+ "11 49 10\r",
+ "11 49 11\r",
+ "11 49 12\r",
+ "11 49 13\r",
+ "11 49 14\r",
+ "11 49 15\r",
+ "11 49 16\r",
+ "11 49 17\r",
+ "11 49 18\r",
+ "11 49 19\r",
+ "11 49 20\r",
+ "11 49 21\r",
+ "11 49 22\r",
+ "11 49 23\r",
+ "11 49 24\r",
+ "11 49 25\r",
+ "11 49 26\r",
+ "11 49 27\r",
+ "11 49 28\r",
+ "11 49 29\r",
+ "11 49 30\r",
+ "11 49 31\r",
+ "11 49 32\r",
+ "11 49 33\r",
+ "11 49 34\r",
+ "11 49 35\r",
+ "11 49 36\r",
+ "11 49 37\r",
+ "11 49 38\r",
+ "11 49 39\r",
+ "11 49 40\r",
+ "11 49 41\r",
+ "11 49 42\r",
+ "11 49 43\r",
+ "11 49 44\r",
+ "11 49 45\r",
+ "11 49 46\r",
+ "11 49 47\r",
+ "11 49 48\r",
+ "11 49 49\r",
+ "11 49 50\r",
+ "11 49 51\r",
+ "11 49 52\r",
+ "11 49 53\r",
+ "11 49 54\r",
+ "11 49 55\r",
+ "11 49 56\r",
+ "11 49 57\r",
+ "11 49 58\r",
+ "11 50 1\r",
+ "11 50 2\r",
+ "11 50 3\r",
+ "11 50 4\r",
+ "11 50 5\r",
+ "11 50 6\r",
+ "11 50 7\r",
+ "11 50 8\r",
+ "11 50 9\r",
+ "11 50 10\r",
+ "11 50 11\r",
+ "11 50 12\r",
+ "11 50 13\r",
+ "11 50 14\r",
+ "11 50 15\r",
+ "11 50 16\r",
+ "11 50 17\r",
+ "11 50 18\r",
+ "11 50 19\r",
+ "11 50 20\r",
+ "11 50 21\r",
+ "11 50 22\r",
+ "11 50 23\r",
+ "11 50 24\r",
+ "11 50 25\r",
+ "11 50 26\r",
+ "11 50 27\r",
+ "11 50 28\r",
+ "11 50 29\r",
+ "11 50 30\r",
+ "11 50 31\r",
+ "11 50 32\r",
+ "11 50 33\r",
+ "11 50 34\r",
+ "11 50 35\r",
+ "11 50 36\r",
+ "11 50 37\r",
+ "11 50 38\r",
+ "11 50 39\r",
+ "11 50 40\r",
+ "11 50 41\r",
+ "11 50 42\r",
+ "11 50 43\r",
+ "11 50 44\r",
+ "11 50 45\r",
+ "11 50 46\r",
+ "11 50 47\r",
+ "11 50 48\r",
+ "11 50 49\r",
+ "11 50 50\r",
+ "11 50 51\r",
+ "11 50 52\r",
+ "11 50 53\r",
+ "11 50 54\r",
+ "11 50 55\r",
+ "11 50 56\r",
+ "11 50 57\r",
+ "11 50 58\r",
+ "11 51 1\r",
+ "11 51 2\r",
+ "11 51 3\r",
+ "11 51 4\r",
+ "11 51 5\r",
+ "11 51 6\r",
+ "11 51 7\r",
+ "11 51 8\r",
+ "11 51 9\r",
+ "11 51 10\r",
+ "11 51 11\r",
+ "11 51 12\r",
+ "11 51 13\r",
+ "11 51 14\r",
+ "11 51 15\r",
+ "11 51 16\r",
+ "11 51 17\r",
+ "11 51 18\r",
+ "11 51 19\r",
+ "11 51 20\r",
+ "11 51 21\r",
+ "11 51 22\r",
+ "11 51 23\r",
+ "11 51 24\r",
+ "11 51 25\r",
+ "11 51 26\r",
+ "11 51 27\r",
+ "11 51 28\r",
+ "11 51 29\r",
+ "11 51 30\r",
+ "11 51 31\r",
+ "11 51 32\r",
+ "11 51 33\r",
+ "11 51 34\r",
+ "11 51 35\r",
+ "11 51 36\r",
+ "11 51 37\r",
+ "11 51 38\r",
+ "11 51 39\r",
+ "11 51 40\r",
+ "11 51 41\r",
+ "11 51 42\r",
+ "11 51 43\r",
+ "11 51 44\r",
+ "11 51 45\r",
+ "11 51 46\r",
+ "11 51 47\r",
+ "11 51 48\r",
+ "11 51 49\r",
+ "11 51 50\r",
+ "11 51 51\r",
+ "11 51 52\r",
+ "11 51 53\r",
+ "11 51 54\r",
+ "11 51 55\r",
+ "11 51 56\r",
+ "11 51 57\r",
+ "11 51 58\r",
+ "11 52 1\r",
+ "11 52 2\r",
+ "11 52 3\r",
+ "11 52 4\r",
+ "11 52 5\r",
+ "11 52 6\r",
+ "11 52 7\r",
+ "11 52 8\r",
+ "11 52 9\r",
+ "11 52 10\r",
+ "11 52 11\r",
+ "11 52 12\r",
+ "11 52 13\r",
+ "11 52 14\r",
+ "11 52 15\r",
+ "11 52 16\r",
+ "11 52 17\r",
+ "11 52 18\r",
+ "11 52 19\r",
+ "11 52 20\r",
+ "11 52 21\r",
+ "11 52 22\r",
+ "11 52 23\r",
+ "11 52 24\r",
+ "11 52 25\r",
+ "11 52 26\r",
+ "11 52 27\r",
+ "11 52 28\r",
+ "11 52 29\r",
+ "11 52 30\r",
+ "11 52 31\r",
+ "11 52 32\r",
+ "11 52 33\r",
+ "11 52 34\r",
+ "11 52 35\r",
+ "11 52 36\r",
+ "11 52 37\r",
+ "11 52 38\r",
+ "11 52 39\r",
+ "11 52 40\r",
+ "11 52 41\r",
+ "11 52 42\r",
+ "11 52 43\r",
+ "11 52 44"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\r",
+ "11 52 45\r",
+ "11 52 46\r",
+ "11 52 47\r",
+ "11 52 48\r",
+ "11 52 49\r",
+ "11 52 50\r",
+ "11 52 51\r",
+ "11 52 52\r",
+ "11 52 53\r",
+ "11 52 54\r",
+ "11 52 55\r",
+ "11 52 56\r",
+ "11 52 57\r",
+ "11 52 58\r",
+ "11 53 1\r",
+ "11 53 2\r",
+ "11 53 3\r",
+ "11 53 4\r",
+ "11 53 5\r",
+ "11 53 6\r",
+ "11 53 7\r",
+ "11 53 8\r",
+ "11 53 9\r",
+ "11 53 10\r",
+ "11 53 11\r",
+ "11 53 12\r",
+ "11 53 13\r",
+ "11 53 14\r",
+ "11 53 15\r",
+ "11 53 16\r",
+ "11 53 17\r",
+ "11 53 18\r",
+ "11 53 19\r",
+ "11 53 20\r",
+ "11 53 21\r",
+ "11 53 22\r",
+ "11 53 23\r",
+ "11 53 24\r",
+ "11 53 25\r",
+ "11 53 26\r",
+ "11 53 27\r",
+ "11 53 28\r",
+ "11 53 29\r",
+ "11 53 30\r",
+ "11 53 31\r",
+ "11 53 32\r",
+ "11 53 33\r",
+ "11 53 34\r",
+ "11 53 35\r",
+ "11 53 36\r",
+ "11 53 37\r",
+ "11 53 38\r",
+ "11 53 39\r",
+ "11 53 40\r",
+ "11 53 41\r",
+ "11 53 42\r",
+ "11 53 43\r",
+ "11 53 44\r",
+ "11 53 45\r",
+ "11 53 46\r",
+ "11 53 47\r",
+ "11 53 48\r",
+ "11 53 49\r",
+ "11 53 50\r",
+ "11 53 51\r",
+ "11 53 52\r",
+ "11 53 53\r",
+ "11 53 54\r",
+ "11 53 55\r",
+ "11 53 56\r",
+ "11 53 57\r",
+ "11 53 58\r",
+ "11 54 1\r",
+ "11 54 2\r",
+ "11 54 3\r",
+ "11 54 4\r",
+ "11 54 5\r",
+ "11 54 6\r",
+ "11 54 7\r",
+ "11 54 8\r",
+ "11 54 9\r",
+ "11 54 10\r",
+ "11 54 11\r",
+ "11 54 12\r",
+ "11 54 13\r",
+ "11 54 14\r",
+ "11 54 15\r",
+ "11 54 16\r",
+ "11 54 17\r",
+ "11 54 18\r",
+ "11 54 19\r",
+ "11 54 20\r",
+ "11 54 21\r",
+ "11 54 22\r",
+ "11 54 23\r",
+ "11 54 24\r",
+ "11 54 25\r",
+ "11 54 26\r",
+ "11 54 27\r",
+ "11 54 28\r",
+ "11 54 29\r",
+ "11 54 30\r",
+ "11 54 31\r",
+ "11 54 32\r",
+ "11 54 33\r",
+ "11 54 34\r",
+ "11 54 35\r",
+ "11 54 36\r",
+ "11 54 37\r",
+ "11 54 38\r",
+ "11 54 39\r",
+ "11 54 40\r",
+ "11 54 41\r",
+ "11 54 42\r",
+ "11 54 43\r",
+ "11 54 44\r",
+ "11 54 45\r",
+ "11 54 46\r",
+ "11 54 47\r",
+ "11 54 48\r",
+ "11 54 49\r",
+ "11 54 50\r",
+ "11 54 51\r",
+ "11 54 52\r",
+ "11 54 53\r",
+ "11 54 54\r",
+ "11 54 55\r",
+ "11 54 56\r",
+ "11 54 57\r",
+ "11 54 58\r",
+ "11 55 1\r",
+ "11 55 2\r",
+ "11 55 3\r",
+ "11 55 4\r",
+ "11 55 5\r",
+ "11 55 6\r",
+ "11 55 7\r",
+ "11 55 8\r",
+ "11 55 9\r",
+ "11 55 10\r",
+ "11 55 11\r",
+ "11 55 12\r",
+ "11 55 13\r",
+ "11 55 14\r",
+ "11 55 15\r",
+ "11 55 16\r",
+ "11 55 17\r",
+ "11 55 18\r",
+ "11 55 19\r",
+ "11 55 20\r",
+ "11 55 21\r",
+ "11 55 22\r",
+ "11 55 23\r",
+ "11 55 24\r",
+ "11 55 25\r",
+ "11 55 26\r",
+ "11 55 27\r",
+ "11 55 28\r",
+ "11 55 29\r",
+ "11 55 30\r",
+ "11 55 31\r",
+ "11 55 32\r",
+ "11 55 33\r",
+ "11 55 34\r",
+ "11 55 35\r",
+ "11 55 36\r",
+ "11 55 37\r",
+ "11 55 38\r",
+ "11 55 39\r",
+ "11 55 40\r",
+ "11 55 41\r",
+ "11 55 42\r",
+ "11 55 43\r",
+ "11 55 44\r",
+ "11 55 45\r",
+ "11 55 46\r",
+ "11 55 47\r",
+ "11 55 48\r",
+ "11 55 49\r",
+ "11 55 50\r",
+ "11 55 51\r",
+ "11 55 52\r",
+ "11 55 53\r",
+ "11 55 54\r",
+ "11 55 55\r",
+ "11 55 56\r",
+ "11 55 57\r",
+ "11 55 58\r",
+ "11 56 1\r",
+ "11 56 2\r",
+ "11 56 3\r",
+ "11 56 4\r",
+ "11 56 5\r",
+ "11 56 6\r",
+ "11 56 7\r",
+ "11 56 8\r",
+ "11 56 9\r",
+ "11 56 10\r",
+ "11 56 11\r",
+ "11 56 12\r",
+ "11 56 13\r",
+ "11 56 14\r",
+ "11 56 15\r",
+ "11 56 16\r",
+ "11 56 17\r",
+ "11 56 18\r",
+ "11 56 19\r",
+ "11 56 20\r",
+ "11 56 21\r",
+ "11 56 22\r",
+ "11 56 23\r",
+ "11 56 24\r",
+ "11 56 25\r",
+ "11 56 26\r",
+ "11 56 27\r",
+ "11 56 28\r",
+ "11 56 29\r",
+ "11 56 30\r",
+ "11 56 31\r",
+ "11 56 32\r",
+ "11 56 33\r",
+ "11 56 34\r",
+ "11 56 35\r",
+ "11 56 36\r",
+ "11 56 37\r",
+ "11 56 38\r",
+ "11 56 39\r",
+ "11 56 40\r",
+ "11 56 41\r",
+ "11 56 42\r",
+ "11 56 43\r",
+ "11 56 44\r",
+ "11 56 45\r",
+ "11 56 46\r",
+ "11 56 47\r",
+ "11 56 48\r",
+ "11 56 49\r",
+ "11 56 50\r",
+ "11 56 51\r",
+ "11 56 52\r",
+ "11 56 53\r",
+ "11 56 54\r",
+ "11 56 55\r",
+ "11 56 56\r",
+ "11 56 57\r",
+ "11 56 58\r",
+ "11 57 1\r",
+ "11 57 2\r",
+ "11 57 3\r",
+ "11 57 4\r",
+ "11 57 5\r",
+ "11 57 6\r",
+ "11 57 7\r",
+ "11 57 8\r",
+ "11 57 9\r",
+ "11 57 10\r",
+ "11 57 11\r",
+ "11 57 12\r",
+ "11 57 13\r",
+ "11 57 14\r",
+ "11 57 15\r",
+ "11 57 16\r",
+ "11 57 17\r",
+ "11 57 18\r",
+ "11 57 19\r",
+ "11 57 20\r",
+ "11 57 21\r",
+ "11 57 22\r",
+ "11 57 23\r",
+ "11 57 24\r",
+ "11 57 25\r",
+ "11 57 26\r",
+ "11 57 27\r",
+ "11 57 28\r",
+ "11 57 29\r",
+ "11 57 30\r",
+ "11 57 31\r",
+ "11 57 32\r",
+ "11 57 33\r",
+ "11 57 34\r",
+ "11 57 35\r",
+ "11 57 36\r",
+ "11 57 37\r",
+ "11 57 38\r",
+ "11 57 39\r",
+ "11 57 40\r",
+ "11 57 41\r",
+ "11 57 42\r",
+ "11 57 43\r",
+ "11 57 44\r",
+ "11 57 45\r",
+ "11 57 46\r",
+ "11 57 47\r",
+ "11 57 48\r",
+ "11 57 49\r",
+ "11 57 50\r",
+ "11 57 51\r",
+ "11 57 52\r",
+ "11 57 53\r",
+ "11 57 54\r",
+ "11 57 55\r",
+ "11 57 56\r",
+ "11 57 57\r",
+ "11 57 58\r",
+ "11 58 1\r",
+ "11 58 2\r",
+ "11 58 3\r",
+ "11 58 4\r",
+ "11 58 5\r",
+ "11 58 6\r",
+ "11 58 7\r",
+ "11 58 8\r",
+ "11 58 9\r",
+ "11 58 10\r",
+ "11 58 11\r",
+ "11 58 12\r",
+ "11 58 13\r",
+ "11 58 14\r",
+ "11 58 15\r",
+ "11 58 16\r",
+ "11 58 17\r",
+ "11 58 18\r",
+ "11 58 19\r",
+ "11 58 20\r",
+ "11 58 21\r",
+ "11 58 22\r",
+ "11 58 23\r",
+ "11 58 24\r",
+ "11 58 25\r",
+ "11 58 26\r",
+ "11 58 27\r",
+ "11 58 28\r",
+ "11 58 29\r",
+ "11 58 30\r",
+ "11 58 31\r",
+ "11 58 32\r",
+ "11 58 33\r",
+ "11 58 34\r",
+ "11 58 35\r",
+ "11 58 36\r",
+ "11 58 37\r",
+ "11 58 38\r",
+ "11 58 39\r",
+ "11 58 40\r",
+ "11 58 41\r",
+ "11 58 42\r",
+ "11 58 43\r",
+ "11 58 44\r",
+ "11 58 45\r",
+ "11 58 46\r",
+ "11 58 47\r",
+ "11 58 48\r",
+ "11 58 49\r",
+ "11 58 50\r",
+ "11 58 51\r",
+ "11 58 52\r",
+ "11 58 53\r",
+ "11 58 54\r",
+ "11 58 55\r",
+ "11 58 56\r",
+ "11 58 57\r",
+ "11 58 58"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.33, Page number: 131<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count occurrence of 0 to 9 digits between 1 and given decimal number\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "n = int(raw_input(\"Enter a Decimal Number : \"))\n",
+ "st = [0 for x in range(10)] #10 array elements initialized as 0\n",
+ "\n",
+ "#Calculation\n",
+ "for l in range(1,n+1):\n",
+ " t = l\n",
+ " while t != 0:\n",
+ " k = t % 10\n",
+ " t = t / 10\n",
+ " st[k] += 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nOccurrence of 0-9 digits between 1 to %d Numbers.\"%(n))\n",
+ "sys.stdout.write(\"\\n========== == === ====== ======= = == == ========\")\n",
+ "\n",
+ "for i in range(0,10):\n",
+ " if st[i] > 0:\n",
+ " sys.stdout.write(\"\\n%d Occurs %8d Times.\"%(i,st[i]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Decimal Number : 15\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Occurrence of 0-9 digits between 1 to 15 Numbers.\n",
+ "========== == === ====== ======= = == == ========\n",
+ "0 Occurs 1 Times.\n",
+ "1 Occurs 8 Times.\n",
+ "2 Occurs 2 Times.\n",
+ "3 Occurs 2 Times.\n",
+ "4 Occurs 2 Times.\n",
+ "5 Occurs 2 Times.\n",
+ "6 Occurs 1 Times.\n",
+ "7 Occurs 1 Times.\n",
+ "8 Occurs 1 Times.\n",
+ "9 Occurs 1 Times."
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.34, Page number: 132<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display sum of digits of a given number\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "s = 0\n",
+ "n = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "\n",
+ "sys.stdout.write(\"\\nSum of Digits till a single digit\\n %d\"%(n))\n",
+ "\n",
+ "while n != 0:\n",
+ " s = s + n%10\n",
+ " n = n/10\n",
+ " if n == 0 and s > 9:\n",
+ " sys.stdout.write(\"\\n %2d\"%(s))\n",
+ " n = s\n",
+ " s = 0\n",
+ "\n",
+ "sys.stdout.write(\"\\n %2d\"%(s))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 4687\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of Digits till a single digit\n",
+ " 4687\n",
+ " 25\n",
+ " 7"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.35, Page number: 133<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display octal numbers in binary. Attach a parity bit with \"1\"\n",
+ "#if number of 1s are even otherwise \"0\".\n",
+ "# OR\n",
+ "#Generate odd parity to octal numbers 0 to 7. Express each number in binary\n",
+ "#and attach the parity bit\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = 0\n",
+ "j = 12\n",
+ "k = 2\n",
+ "\n",
+ "#Calculation & Result\n",
+ "\n",
+ "sys.stdout.write(\"\\nBinary Bits Parity Bits\")\n",
+ "sys.stdout.write(\"\\n============= ==============\\n\")\n",
+ "\n",
+ "for x in range(0,8):\n",
+ " k += 1\n",
+ " j = 12\n",
+ " y = x\n",
+ " for a in range(0,3):\n",
+ " b = y % 2\n",
+ " #gotoxy\n",
+ " sys.stdout.write(\"\\t%d\"%(b))\n",
+ " y = y / 2\n",
+ " if b == 1:\n",
+ " c += 1\n",
+ " if c%2 == 0:\n",
+ " #gotoxy\n",
+ " sys.stdout.write(\"\\t1\")\n",
+ " else:\n",
+ " #gotosy\n",
+ " sys.stdout.write(\"\\t0\\n\")\n",
+ " c = 0\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Binary Bits Parity Bits\n",
+ "============= ==============\n",
+ "\t0\t0\t0\t1\t1\t0\t0\t0\n",
+ "\t0\t1\t0\t0\n",
+ "\t1\t1\t0\t1\t0\t0\t1\t0\n",
+ "\t1\t0\t1\t1\t0\t1\t1\t1\t1\t1\t1\t0\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.36, Page number: 135<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the series x - x^3/3! + x^5/5! - .... x^n/n!\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = 3.0\n",
+ "f = 1.0\n",
+ "\n",
+ "#Give x as float value and n as int value\n",
+ "\n",
+ "x = float(raw_input(\"Enter x & n : \")) #use commas to input values\n",
+ "n = int(raw_input(\"Enter x & n : \")) \n",
+ "\n",
+ "sum1 = x #since sum is built-in function in python,\n",
+ " #sum1 is used instead of sum\n",
+ "\n",
+ "#Calculation & Result\n",
+ "\n",
+ "for i in range(3,n+1,2):\n",
+ " f = 1\n",
+ " if c%2 != 0:\n",
+ " for l in range(1,i+1):\n",
+ " f = f * l\n",
+ " sum1 = sum1 - pow(x,i)/ f\n",
+ " else:\n",
+ " for l in range(1,i+1):\n",
+ " f = f * l\n",
+ " sum1 = sum1 + pow(x,i)/ f\n",
+ " c += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nSum of series Numbers : %f\"%(sum1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter x & n : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter x & n : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of series Numbers : 0.933333"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.37, Page number: 136<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the series x + x^2/2! + x^4/4! + .... x^n/n!\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "f = 1.0\n",
+ "\n",
+ "#Give x as float value and y as int value\n",
+ "\n",
+ "x = float(raw_input(\"Enter x & y : \")) #use commas to input values\n",
+ "y = int(raw_input(\"Enter x & y : \")) \n",
+ "\n",
+ "sum1 = x #since sum is built-in function in python,\n",
+ " #sum1 is used instead of sum\n",
+ "\n",
+ "#Calculation & Result\n",
+ "\n",
+ "for i in range(2,y+1,2):\n",
+ " f = 1\n",
+ " for l in range(1,i+1):\n",
+ " f = f * l\n",
+ " sum1 = sum1 + pow(x,i)/ f\n",
+ "\n",
+ "sys.stdout.write(\"\\nSum of Series : %f\"%(sum1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter x & y : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter x & y : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of Series : 22.666667"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.38, Page number: 136<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the series 1 - 1/1! + 2/2! - 3/3! .... n/n!\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = 3\n",
+ "\n",
+ "n = int(raw_input(\"Enter value of n : \"))\n",
+ "\n",
+ "sum1 = 1.0 #since sum is built-in function in python,\n",
+ " #sum1 is used instead of sum\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "for i in range(1,n+1):\n",
+ " f = 1.0\n",
+ " if c%2 != 0:\n",
+ " for l in range(1,i+1):\n",
+ " f = f * l\n",
+ " k = float(i / f)\n",
+ " sum1 = sum1 - k\n",
+ " else:\n",
+ " for l in range(1,i+1):\n",
+ " f = f * l\n",
+ " sum1 = sum1 + float(i/f)\n",
+ " c += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSum of series Numbers : %f\"%(sum1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of n : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of series Numbers : 0.500000"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.39, Page number: 137<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the Armstrong numbers in three digits from 100 to 999. If sum of cubes of each digits\n",
+ "#of the number is equal to number itself, then the number is called as an Armstrong number.\n",
+ "#(For eg. 153 = 1^3 + 5^3 + 3^3 = 153)\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "cube = 0\n",
+ "\n",
+ "sys.stdout.write(\"The Following Numbers are Armstrong numbers.\")\n",
+ "\n",
+ "#Calculation & Result\n",
+ "\n",
+ "for k in range(100,999+1):\n",
+ " cube = 0\n",
+ " x = 1\n",
+ " d = 3\n",
+ " n = k\n",
+ " while x <= d:\n",
+ " i = n % 10\n",
+ " cube = cube + pow(i,3)\n",
+ " n = n / 10\n",
+ " x += 1\n",
+ " if cube == k:\n",
+ " sys.stdout.write(\"\\n\\t%d\"%(k))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Following Numbers are Armstrong numbers.\n",
+ "\t153\n",
+ "\t370\n",
+ "\t371\n",
+ "\t407"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.40, Page number: 138<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 6.40.py\n",
+ "#Program to display the stars as shown below\n",
+ "#*\n",
+ "#**\n",
+ "#***\n",
+ "#****\n",
+ "#*****\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "x = int(raw_input(\"How many lines stars (*) should be printed ? \"))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "for i in range(1,x+1):\n",
+ " for j in range(1,i+1):\n",
+ " sys.stdout.write(\"*\")\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many lines stars (*) should be printed ? 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "*\n",
+ "**\n",
+ "***\n",
+ "****\n",
+ "*****\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.41, Page number: 139<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Generate the given pattern\n",
+ "#6 5 4 3 2 1 0\n",
+ "#5 4 3 2 1 0\n",
+ "#4 3 2 1 0\n",
+ "#3 2 1 0\n",
+ "#2 1 0\n",
+ "#1 0\n",
+ "#0\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "while i >= 0:\n",
+ " c = i\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " while True:\n",
+ " sys.stdout.write(\"%3d\"%(c))\n",
+ " if c == 0:\n",
+ " break\n",
+ " c -= 1\n",
+ " i -= 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 6\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " 6 5 4 3 2 1 0\n",
+ " 5 4 3 2 1 0\n",
+ " 4 3 2 1 0\n",
+ " 3 2 1 0\n",
+ " 2 1 0\n",
+ " 1 0\n",
+ " 0"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.42, Page number: 140<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the series of numbers as given below\n",
+ "#1\n",
+ "#1 2\n",
+ "#1 2 3\n",
+ "#1 2 3 4\n",
+ "\n",
+ "#4 3 2 1\n",
+ "#3 2 1\n",
+ "#2 1\n",
+ "#1\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter value of x : \"))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "for j in range(1,x+1):\n",
+ " for i in range(1,j+1):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ "\n",
+ "sys.stdout.write(\"\\n\")\n",
+ "\n",
+ "for j in range(x,0,-1):\n",
+ " for i in range(j,0,-1):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of x : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1\n",
+ " 1 2\n",
+ " 1 2 3\n",
+ " 1 2 3 4\n",
+ "\n",
+ " 4 3 2 1\n",
+ " 3 2 1\n",
+ " 2 1\n",
+ " 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.43, Page number: 142<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to display the series of numbers as given below\n",
+ "#1\n",
+ "#2 1\n",
+ "#3 2 1\n",
+ "#4 3 2 1\n",
+ "\n",
+ "#4 3 2 1\n",
+ "#3 2 1\n",
+ "#2 1\n",
+ "#1\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter value of x : \"))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "for j in range(1,x+1):\n",
+ " for i in range(j,0,-1):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ "\n",
+ "sys.stdout.write(\"\\n\")\n",
+ "\n",
+ "for j in range(x,0,-1):\n",
+ " for i in range(j,0,-1):\n",
+ " sys.stdout.write(\"%3d\"%(i))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of x : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1\n",
+ " 2 1\n",
+ " 3 2 1\n",
+ " 4 3 2 1\n",
+ "\n",
+ " 4 3 2 1\n",
+ " 3 2 1\n",
+ " 2 1\n",
+ " 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.44, Page number: 143<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Generate the pyramid structure using numberical\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter a number : \"))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "for j in range(0,x+1):\n",
+ " for i in range(0-j,j+1):\n",
+ " sys.stdout.write(\"%3d\"%(abs(i)))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 0\n",
+ " 1 0 1\n",
+ " 2 1 0 1 2\n",
+ " 3 2 1 0 1 2 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.45, Page number: 143<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert binary to decimal number\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = [1 for i in range(1,5+1)] #defines the array x and initializes the elements with 0\n",
+ "y = x[0]\n",
+ "\n",
+ "sys.stdout.write(\"\\nValues in different Iterations\")\n",
+ "sys.stdout.write(\"\\n====== == ========= ==========\\n\")\n",
+ "\n",
+ "for i in range(0,4):\n",
+ " y = y * 2 + x[i+1]\n",
+ " sys.stdout.write(\"[%d] %d\\t\"%(i+1,y))\n",
+ "\n",
+ "sys.stdout.write(\"\\nEquivalent of [\")\n",
+ "\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"%d\"%(x[i]))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"] in Decimal Number is : \")\n",
+ "sys.stdout.write(\"%d\\t\"%(y))\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Values in different Iterations\n",
+ "====== == ========= ==========\n",
+ "[1] 3\t[2] 7\t[3] 15\t[4] 31\t\n",
+ "Equivalent of [11111] in Decimal Number is : 31\t"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.46, Page number: 144<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to add a parity bit with four binary bits such that the total\n",
+ "#number of one's should be even\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "bit = [0 for i in range(0,5)] #defines the array bit and initializes the elements with 0\n",
+ "c = 0\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter four bits : \")\n",
+ "\n",
+ "for j in range(0,4):\n",
+ " x = int(raw_input(\" \"))\n",
+ " bit[j] = x\n",
+ " if bit[j] == 1:\n",
+ " c += 1\n",
+ " else:\n",
+ " if bit[j] > 1 or bit[j] < 0:\n",
+ " j -= 1\n",
+ " continue\n",
+ " if c%2 == 0:\n",
+ " bit[j] = 0\n",
+ " else:\n",
+ " bit[j] = 1 \n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nMessage bits together with parity bit : \")\n",
+ "for j in range(0,5):\n",
+ " sys.stdout.write(\"%d\"%(bit[j]))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter four bits : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Message bits together with parity bit : 11110"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.47, Page number: 145<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert binary to decimal number. Enter the binary bits by using for loop\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "z = [0 for i in range(0,10)] #defines the array z and initializes the elements with 0\n",
+ "\n",
+ "sys.stdout.write(\"Enter the number of bits :- \")\n",
+ "b = int(raw_input(\"\"))\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter the binary bits : \")\n",
+ "for i in range(0,b):\n",
+ " z[i] = int(raw_input(\"\"))\n",
+ "\n",
+ "a = z[0]\n",
+ "\n",
+ "for i in range(0,b-1):\n",
+ " a = a * 2 + z[i+1]\n",
+ " sys.stdout.write(\"\\n%d\"%(a))\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nDecimal Number is : %d \"%(a))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the number of bits :- "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter the binary bits : "
+ ]
+ },
+ {
+ "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": [
+ "0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "2\n",
+ "4\n",
+ "8\n",
+ "17\n",
+ "Decimal Number is : 17 "
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.48, Page number: 147<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Verify the truth table of AND gate. Assume AND gate has two\n",
+ "#input bits A & B and one output bit C.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "a = [0 for i in range(0,4)] #defines the array a,b & c and initializes the elements with 0\n",
+ "b = [0 for i in range(0,4)]\n",
+ "c = [0 for i in range(0,4)]\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter Four Bits : \")\n",
+ "for x in range(0,4):\n",
+ " a[x] = int(raw_input(\"\"))\n",
+ " \n",
+ " if a[x] > 1 or a[x] < 0:\n",
+ " x -= 1\n",
+ " continue\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter Four Bits : \")\n",
+ "for x in range(0,4):\n",
+ " b[x] = int(raw_input(\"\"))\n",
+ " \n",
+ " if b[x] > 1 or b[x] < 0:\n",
+ " x -= 1\n",
+ " continue\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nA B C\")\n",
+ "for x in range(0,4):\n",
+ " if a[x] == 1 and b[x] == 1:\n",
+ " c[x] = 1\n",
+ " else:\n",
+ " c[x] = 0\n",
+ " sys.stdout.write(\"\\n%d %d %d\"%(a[x],b[x],c[x]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Four Bits : "
+ ]
+ },
+ {
+ "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": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Four Bits : "
+ ]
+ },
+ {
+ "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": [
+ "0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "A B C\n",
+ "1 1 1\n",
+ "0 0 0\n",
+ "1 0 0\n",
+ "0 1 0"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.49, Page number: 148<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Verify the truth table of OR gate. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "a = [0 for i in range(0,4)] #defines the array a,b & c and initializes the elements with 0\n",
+ "b = [0 for i in range(0,4)]\n",
+ "c = [0 for i in range(0,4)]\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter Four Bits : \")\n",
+ "for x in range(0,4):\n",
+ " a[x] = int(raw_input(\"\"))\n",
+ " \n",
+ " if a[x] > 1 or a[x] < 0:\n",
+ " x -= 1\n",
+ " continue\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter Four Bits : \")\n",
+ "for x in range(0,4):\n",
+ " b[x] = int(raw_input(\"\"))\n",
+ " \n",
+ " if b[x] > 1 or b[x] < 0:\n",
+ " x -= 1\n",
+ " continue\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nA B C\")\n",
+ "for x in range(0,4):\n",
+ " if a[x] == 0 and b[x] == 0:\n",
+ " c[x] = 0\n",
+ " else:\n",
+ " c[x] = 1\n",
+ " sys.stdout.write(\"\\n%d %d %d\"%(a[x],b[x],c[x]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Four Bits : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Four Bits : "
+ ]
+ },
+ {
+ "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": [
+ "0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "A B C\n",
+ "1 1 1\n",
+ "1 0 1\n",
+ "1 0 1\n",
+ "0 0 0"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.50, Page number: 149<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Verify the truth table of EX-OR gate. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "a = [0 for i in range(0,4)] #defines the array a,b & c and initializes the elements with 0\n",
+ "b = [0 for i in range(0,4)]\n",
+ "c = [0 for i in range(0,4)]\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter Four Bits : \")\n",
+ "for x in range(0,4):\n",
+ " a[x] = int(raw_input(\"\"))\n",
+ " \n",
+ " if a[x] > 1 or a[x] < 0:\n",
+ " x -= 1\n",
+ " continue\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter Four Bits : \")\n",
+ "for x in range(0,4):\n",
+ " b[x] = int(raw_input(\"\"))\n",
+ " \n",
+ " if b[x] > 1 or b[x] < 0:\n",
+ " x -= 1\n",
+ " continue\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nA B C\")\n",
+ "for x in range(0,4):\n",
+ " if a[x] == 0 and b[x] == 1:\n",
+ " c[x] = 1\n",
+ " else:\n",
+ " if a[x] == 1 and b[x] == 0:\n",
+ " c[x] = 1\n",
+ " else:\n",
+ " c[x] = 0\n",
+ " sys.stdout.write(\"\\n%d %d %d\"%(a[x],b[x],c[x]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Four Bits : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Four Bits : "
+ ]
+ },
+ {
+ "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": [
+ "0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "A B C\n",
+ "1 1 0\n",
+ "1 0 1\n",
+ "1 0 1\n",
+ "0 0 0"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.51, Page number: 151<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the Hamming code for the entered binary code. Assume the binary code of four bits in length.\n",
+ "#The hamming code should be seven bits.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "#defines the array a,b & c and initializes the elements with 0\n",
+ "b = [0 for i in range(0,4)]\n",
+ "c = [0 for i in range(0,7)]\n",
+ "\n",
+ "sys.stdout.write(\"\\nRead the Binary Numbers : \")\n",
+ "for x in range(0,4):\n",
+ " b[x] = int(raw_input(\"\"))\n",
+ "\n",
+ "#Piece copy operation\n",
+ "c[0] = b[0]\n",
+ "c[1] = b[1]\n",
+ "c[2] = b[2]\n",
+ "c[4] = b[3]\n",
+ "\n",
+ "sys.stdout.write(\"\\nBefore xOR operation : \")\n",
+ " \n",
+ "for x in range(0,7):\n",
+ " sys.stdout.write(\"%3d\"%(c[x]))\n",
+ "\n",
+ "c[6] = c[0] ^ c[2] ^ c[4]\n",
+ "c[5] = c[0] ^ c[1] ^ c[4]\n",
+ "c[3] = c[0] ^ c[1] ^ c[2]\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nHamming code after XOR operation : \")\n",
+ "for x in range(0,7):\n",
+ " sys.stdout.write(\"%3d\"%(c[x]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Read the Binary Numbers : "
+ ]
+ },
+ {
+ "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": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Before xOR operation : 1 0 1 0 0 0 0\n",
+ "Hamming code after XOR operation : 1 0 1 0 0 1 0"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.52, Page number: 152<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the results of students appear in six subjects. The result declared should be as per the \n",
+ "#following table.\n",
+ "#TOTAL MARKS RESULT\n",
+ "#>= 420 Distinction\n",
+ "#>= 360 First Division\n",
+ "#>= 240 Second Division\n",
+ "#Otherwise Fail\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "DISTINCTION = 420\n",
+ "FIRST = 360\n",
+ "SECOND = 240\n",
+ "\n",
+ "number = int(raw_input(\"Enter number of Students : \"))\n",
+ "\n",
+ "#Read the values and calculation\n",
+ "for i in range(1,number+1):\n",
+ " roll_no = int(raw_input(\"Enter Roll Number : \"))\n",
+ " total = 0\n",
+ " sys.stdout.write(\"\\nEnter Marks of 6 Subjects for Roll no %d : \"%(roll_no))\n",
+ " for j in range(1,6+1):\n",
+ " marks = int(raw_input(\"\"))\n",
+ " total = total + marks\n",
+ " sys.stdout.write(\"\\nTOTAL MARKS = %d\"%(total))\n",
+ " if total >= DISTINCTION:\n",
+ " sys.stdout.write(\"\\n(Distinction)\\n\\n\")\n",
+ " else:\n",
+ " if total >= FIRST:\n",
+ " sys.stdout.write(\"\\n(First Division)\\n\\n\")\n",
+ " else:\n",
+ " if total >= SECOND:\n",
+ " sys.stdout.write(\"\\n(Second Division)\\n\\n\")\n",
+ " else:\n",
+ " sys.stdout.write(\"\\n(***Fail***)\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter number of Students : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Roll Number : 1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Marks of 6 Subjects for Roll no 1 : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "42\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "52\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "62\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "72\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "82\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "92\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "TOTAL MARKS = 402\n",
+ "(First Division)\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.53, Page number: 154<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the string \"You have learnt C program\" 9 times using while loop\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 1\n",
+ "\n",
+ "#Result\n",
+ "while x < 10:\n",
+ " sys.stdout.write(\"\\nYou have learnt C program\")\n",
+ " x += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program\n",
+ "You have learnt C program"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.54, Page number: 155<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Add 10 consecutive numbers starting from 1 using while loop.\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 1\n",
+ "sum1 = 0 #since sum is a builtin function in python, sum1 is used instead of sum\n",
+ "\n",
+ "#Calculation\n",
+ "while a <= 10:\n",
+ " sys.stdout.write(\"%3d\"%(a))\n",
+ " sum1 = sum1 + a\n",
+ " a += 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSum of 10 numbers : %d\"%(sum1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 2 3 4 5 6 7 8 9 10\n",
+ "Sum of 10 numbers : 55"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.55, Page number: 155<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate factorial of a given number using while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "fact = 1\n",
+ "\n",
+ "a = int(raw_input(\"Enter The Number : \"))\n",
+ "\n",
+ "#Calculation\n",
+ "while a >= 1:\n",
+ " sys.stdout.write(\" %d * \"%(a))\n",
+ " fact = fact * a\n",
+ " a -= 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\" = %d\"%(fact))\n",
+ "sys.stdout.write(\"\\nFactorial of Given number is %d\"%(fact))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 5 * 4 * 3 * 2 * 1 * = 120\n",
+ "Factorial of Given number is 120"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.56, Page number: 156<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate factorial of a given number using while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "fact = 1\n",
+ "b = 1\n",
+ "\n",
+ "a = int(raw_input(\"Enter The Number : \"))\n",
+ "\n",
+ "#Calculation\n",
+ "while b <= a:\n",
+ " sys.stdout.write(\" %d * \"%(b))\n",
+ " fact = fact * b\n",
+ " b += 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\" = %d\"%(fact))\n",
+ "sys.stdout.write(\"\\nFactorial of %d is %d\"%(b-1,fact))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The Number : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 * 2 * 3 * 4 * = 24\n",
+ "Factorial of 4 is 24"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.57, Page number: 157<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert decimal number to binary number\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "y = 40\n",
+ "rev = [0 for i in range(1,10)]\n",
+ "c = 1\n",
+ "\n",
+ "x = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "#since gotoxy() function is not available in python, the reminders are stored in an array and displayed in reverse order\n",
+ "\n",
+ "sys.stdout.write(\"\\nBinary Number : \")\n",
+ "while x != 0:\n",
+ " rev[c] = x % 2\n",
+ " x = x / 2\n",
+ " c += 1\n",
+ "\n",
+ "for i in range(c-1,0,-1):\n",
+ " sys.stdout.write(\"%d\"%(rev[i]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 25\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Binary Number : 11001"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.58, Page number: 157<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert decimal number to user defined number system. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "y = 35\n",
+ "rev = 0\n",
+ "c = 1\n",
+ "rev = [0 for i in range(1,10)]\n",
+ "\n",
+ "m = int(raw_input(\"Enter the Decimal Number : \"))\n",
+ "b = int(raw_input(\"Enter base of number system : \"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "sys.stdout.write(\"\\nThe Number Obtained : \")\n",
+ "\n",
+ "#since gotoxy() function is not available in python, the reminders are stored in an array and displayed in reverse order\n",
+ "while m != 0:\n",
+ " rev[c] = m % b\n",
+ " c += 1\n",
+ " m = m / b\n",
+ "\n",
+ "for i in range(c-1,0,-1):\n",
+ " sys.stdout.write(\"%d\"%rev[i])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the Decimal Number : 50\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter base of number system : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Number Obtained : 200"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.59, Page number: 158<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert binary number to equivalent decimal number\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "y = 0\n",
+ "p = 0\n",
+ "\n",
+ "n = int(raw_input(\"Enter a Binary Number : \"))\n",
+ "\n",
+ "#Calculation\n",
+ "while n != 0:\n",
+ " x = n % 10\n",
+ " if x > 1 or x < 0:\n",
+ " sys.stdout.write(\"\\nInvalid Digit\")\n",
+ " break\n",
+ " else:\n",
+ " y = y + x * pow(2,p)\n",
+ " n = n / 10\n",
+ " p += 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nEquivalent Decimal Number is %d.\"%(y))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Binary Number : 1111\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Equivalent Decimal Number is 15."
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.60, Page number: 159<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read a positive integer number 'n' and generate the numbers in the following way.\n",
+ "#If entered number is 5 the output will be as follows.\n",
+ "#OUTPUT : 5 4 3 2 1 0 1 2 3 4 5\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "k = 0\n",
+ "\n",
+ "n = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "i = n + 1\n",
+ "k = k - n\n",
+ "\n",
+ "while i != k:\n",
+ " sys.stdout.write(\"%3d\"%(abs(k)))\n",
+ " k += 1\n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 3 2 1 0 1 2 3"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.61, Page number: 160<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enter a number through keyboard and find the sum of the digits.\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "k = 1\n",
+ "sum1 = 0 #since sum is a built-in function in python, sum1 used instead of sum\n",
+ "\n",
+ "n = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Calculation \n",
+ "while n != 0:\n",
+ " k = n % 10\n",
+ " sum1 = sum1 + k\n",
+ " k = n / 10\n",
+ " n = k\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Sum of digits %d\"%(sum1))\n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 842\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sum of digits 14"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.62, Page number: 161<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Enter few numbers and count the positive and negative numbers together\n",
+ "#with their sums. When 0 is entered program should be terminated.\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "p = 0\n",
+ "n = 0\n",
+ "j = 1\n",
+ "s = 0\n",
+ "ns = 0\n",
+ "\n",
+ "#Calculation \n",
+ "sys.stdout.write(\"Enter Numbers (0) Exit : \")\n",
+ "while j != 0:\n",
+ " j = int(raw_input(\"\"))\n",
+ " if j > 0:\n",
+ " p += 1\n",
+ " s = s + j\n",
+ " else:\n",
+ " if j < 0:\n",
+ " n += 1\n",
+ " ns = ns + j\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nTotal Positive Numbers : %d\"%(p))\n",
+ "sys.stdout.write(\"\\nTotal Negative Numbers : %d\"%(n))\n",
+ "sys.stdout.write(\"\\nSum of Positive Numbers : %d\"%(s))\n",
+ "sys.stdout.write(\"\\nSum of Negative Numbers : %d\"%(ns))\n",
+ "\n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Numbers (0) Exit : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Total Positive Numbers : 5\n",
+ "Total Negative Numbers : 3\n",
+ "Sum of Positive Numbers : 15\n",
+ "Sum of Negative Numbers : -17"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.63, Page number: 162<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find sum of odd and even numbers separately by sorting the given numbers into\n",
+ "#odd and even numbers\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = 1\n",
+ "odd = 0\n",
+ "even = 0\n",
+ "\n",
+ "a = int(raw_input(\"Enter a Number : \"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "sys.stdout.write(\"ODD EVEN\\n\")\n",
+ "while c <= a:\n",
+ " b = c % 2\n",
+ " while b == 0:\n",
+ " sys.stdout.write(\"\\t%d \"%(c))\n",
+ " even = even + c\n",
+ " b = 1\n",
+ " b = c % 2\n",
+ " while b != 0:\n",
+ " sys.stdout.write(\"\\n%d\"%(c))\n",
+ " odd = odd + c\n",
+ " b = 0\n",
+ " c += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\n==============================\")\n",
+ "sys.stdout.write(\"\\n %d %d\"%(odd,even))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number : 10\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ODD EVEN\n",
+ "\n",
+ "1\t2 \n",
+ "3\t4 \n",
+ "5\t6 \n",
+ "7\t8 \n",
+ "9\t10 \n",
+ "==============================\n",
+ " 25 30"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.64, Page number: 163<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the entered number in reverse order.\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 1\n",
+ "\n",
+ "d = int(raw_input(\"Enter the number of digits : \"))\n",
+ "n = int(raw_input(\"Enter the number which is to be reversed : -\"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "sys.stdout.write(\"\\nThe Reversed Number is :-\")\n",
+ "\n",
+ "while x <= d:\n",
+ " i = n % 10\n",
+ " sys.stdout.write(\"%d\"%(i))\n",
+ " n = n / 10\n",
+ " x += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the number of digits : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the number which is to be reversed : -5428\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Reversed Number is :-8245"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.65, Page number: 163<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Separate capitals, small, symbols and numbers from a statement\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 0\n",
+ "c = 0\n",
+ "s = 0\n",
+ "h = 0\n",
+ "n = 0\n",
+ "\n",
+ "#Array declaration\n",
+ "scan = [0 for i in range(0,40)]\n",
+ "cap = [0 for i in range(0,20)]\n",
+ "small = [0 for i in range(0,20)]\n",
+ "num = [0 for i in range(0,20)]\n",
+ "oth = [0 for i in range(0,20)]\n",
+ "\n",
+ "scan = raw_input(\"Enter Text Here : \")\n",
+ "\n",
+ "i = 0\n",
+ "\n",
+ "while i < len(scan): #There is no null termination character in python.\n",
+ " if scan[i] >= '0' and scan[i] <= '9':\n",
+ " n += 1\n",
+ " num[n] = scan[i]\n",
+ " else:\n",
+ " if scan[i] >= 'A' and scan[i] <= 'Z':\n",
+ " c += 1\n",
+ " cap[c] = scan[i]\n",
+ " else:\n",
+ " if scan[i] >= 'a' and scan[i] <= 'z':\n",
+ " s += 1\n",
+ " small[s] = scan[i]\n",
+ " else:\n",
+ " h += 1\n",
+ " oth[h] = scan[i]\n",
+ " \n",
+ " i += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nCapital Letters : [\")\n",
+ "for i in range(0,20):\n",
+ " sys.stdout.write(\"%c\"%cap[i])\n",
+ "\n",
+ "sys.stdout.write(\"]\\nSmall Letters : [\")\n",
+ "for i in range(0,20):\n",
+ " sys.stdout.write(\"%c\"%(small[i]))\n",
+ " \n",
+ "sys.stdout.write(\"]\\nNumeric Letters : [\")\n",
+ "for i in range(0,20):\n",
+ " sys.stdout.write(\"%c\"%(num[i]))\n",
+ "\n",
+ "sys.stdout.write(\"]\\nOther Letters : [\")\n",
+ "for i in range(0,20):\n",
+ " sys.stdout.write(\"%c\"%(oth[i]))\n",
+ "sys.stdout.write(\"]\")\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Here : HAVE A NICE DAY, contact me on 51606.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Capital Letters : [\u0000HAVEANICEDAY\u0000\u0000\u0000\u0000\u0000\u0000\u0000]\n",
+ "Small Letters : [\u0000contactmeon\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000]\n",
+ "Numeric Letters : [\u000051606\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000]\n",
+ "Other Letters : [\u0000 , .\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000]"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.66, Page number: 165<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort numbers, upper and lower case alphabets\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 48\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\" NUMBERS\\n\")\n",
+ "while i <= 57:\n",
+ " sys.stdout.write(\"%2c\"%(i))\n",
+ " i += 1\n",
+ "\n",
+ "i += 7\n",
+ "\n",
+ "sys.stdout.write(\"\\n CAPITAL ALPHABETS\\n\")\n",
+ "while i <= 90:\n",
+ " sys.stdout.write(\"%2c\"%(i))\n",
+ " i += 1\n",
+ " \n",
+ "i += 6\n",
+ "\n",
+ "sys.stdout.write(\"\\n SMALL ALPHABETS\\n\")\n",
+ "while i <= 122:\n",
+ " sys.stdout.write(\"%2c\"%(i))\n",
+ " i += 1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " NUMBERS\n",
+ " 0 1 2 3 4 5 6 7 8 9\n",
+ " CAPITAL ALPHABETS\n",
+ " A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\n",
+ " SMALL ALPHABETS\n",
+ " a b c d e f g h i j k l m n o p q r s t u v w x y z"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.67, Page number: 165<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort numbers, upper and lower case alphabets\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 48\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Numbers : \")\n",
+ "while i < 124:\n",
+ " if i < 58:\n",
+ " sys.stdout.write(\"%2c\"%(i))\n",
+ " else:\n",
+ " if i == 58:\n",
+ " sys.stdout.write(\"\\nCapital Letters : \")\n",
+ " i += 7\n",
+ " if i > 64 and i < 91:\n",
+ " sys.stdout.write(\"%2c\"%(i))\n",
+ " if i == 90:\n",
+ " sys.stdout.write(\"\\nSmall Letters : \")\n",
+ " i += 7\n",
+ " if i > 96 and i < 123:\n",
+ " sys.stdout.write(\"%2c\"%(i))\n",
+ " i += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numbers : 0 1 2 3 4 5 6 7 8 9\n",
+ "Capital Letters : A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\n",
+ "Small Letters : a b c d e f g h i j k l m n o p q r s t u v w x y z"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.68, Page number: 167<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display all ASCII numbers and their equivalent character, numbers and symbols using while loop. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 64\n",
+ "c = 'Y'\n",
+ "\n",
+ "#Result\n",
+ "while c == 'Y':\n",
+ " sys.stdout.write(\"\\t%c (%d)\"%(i,i))\n",
+ " i += 1\n",
+ " sys.stdout.write(\"\\nPrint (Y/N)\")\n",
+ " c = raw_input(\"\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t@ (64)\n",
+ "Print (Y/N)\tA (65)"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Print (Y/N)\tB (66)"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Print (Y/N)\tC (67)"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Print (Y/N)"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.69, Page number: 168<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert entered character into its opposite case. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n*Enter 'E' to exit\")\n",
+ "sys.stdout.write(\"\\n*Enter only characters\")\n",
+ "\n",
+ "while c != 'E':\n",
+ " sys.stdout.write(\"\\nEnter a character : \")\n",
+ " c = raw_input(\"Enter a character :\")\n",
+ " if c == c.upper():\n",
+ " c = ord(c)\n",
+ " sys.stdout.write(\"\\tIt's Lower Case : %c\"%(chr(c+32)))\n",
+ " else:\n",
+ " c = ord(c)\n",
+ " sys.stdout.write(\"\\tIt's Upper Case : %s\"%(chr(c-32)))\n",
+ " c = chr(c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "*Enter 'E' to exit\n",
+ "*Enter only characters\n",
+ "Enter a character : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a character :s\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\tIt's Upper Case : S\n",
+ "Enter a character : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a character :A\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\tIt's Lower Case : a\n",
+ "Enter a character : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a character :E\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\tIt's Lower Case : e"
+ ]
+ }
+ ],
+ "prompt_number": 73
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.70, Page number: 169<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print numbers after each iteration and messages after termination of each loop using 3 nested while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 1\n",
+ "j = 1\n",
+ "k = 1\n",
+ "\n",
+ "#Result\n",
+ "while i < 4:\n",
+ " while j < 3:\n",
+ " while k < 2:\n",
+ " sys.stdout.write(\"\\n\\ni = %d j = %d k = %d\"%(i,j,k))\n",
+ " k += 1\n",
+ " sys.stdout.write(\"\\nInner Loop (k) Completed.\")\n",
+ " k = 1\n",
+ " j += 1\n",
+ " sys.stdout.write(\"\\nMiddle Loop (j) Completed.\")\n",
+ " j = 1\n",
+ " i += 1\n",
+ "sys.stdout.write(\"\\nOuter Loop (i) Completed.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "i = 1 j = 1 k = 1\n",
+ "Inner Loop (k) Completed.\n",
+ "\n",
+ "i = 1 j = 2 k = 1\n",
+ "Inner Loop (k) Completed.\n",
+ "Middle Loop (j) Completed.\n",
+ "\n",
+ "i = 2 j = 1 k = 1\n",
+ "Inner Loop (k) Completed.\n",
+ "\n",
+ "i = 2 j = 2 k = 1\n",
+ "Inner Loop (k) Completed.\n",
+ "Middle Loop (j) Completed.\n",
+ "\n",
+ "i = 3 j = 1 k = 1\n",
+ "Inner Loop (k) Completed.\n",
+ "\n",
+ "i = 3 j = 2 k = 1\n",
+ "Inner Loop (k) Completed.\n",
+ "Middle Loop (j) Completed.\n",
+ "Outer Loop (i) Completed."
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.71, Page number: 170<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display a message \"This is a program of do while loop\". for 5 times using do while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 1\n",
+ "\n",
+ "#Result\n",
+ "#There is no do..while loop in python\n",
+ "while i <= 5:\n",
+ " sys.stdout.write(\"\\nThis is a program of do while loop.\")\n",
+ " i += 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "This is a program of do while loop.\n",
+ "This is a program of do while loop.\n",
+ "This is a program of do while loop.\n",
+ "This is a program of do while loop.\n",
+ "This is a program of do while loop."
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.72, Page number: 171<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Print the entered number in reverse order and find sum and product of digits using do-while loop. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#since sum is a built-in function in python, sum1 is used instead of sum\n",
+ "x = 1\n",
+ "mul = 1\n",
+ "sum1 = 0\n",
+ "\n",
+ "d = int(raw_input(\"Enter the number of digits : -\"))\n",
+ "n = int(raw_input(\"Enter the number which is to be reversed :-\"))\n",
+ "\n",
+ "#Result\n",
+ "#There is no do..while loop in python\n",
+ "sys.stdout.write(\"\\nReveresed Number :- \")\n",
+ "while x <= d:\n",
+ " i = n % 10\n",
+ " sys.stdout.write(\"%d\"%(i))\n",
+ " sum1 = sum1 + i\n",
+ " mul = mul * i\n",
+ " n = n / 10\n",
+ " x += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nAddition of digits :- %4d\"%(sum1))\n",
+ "sys.stdout.write(\"\\nMultiplication of digits :- %4d\"%(mul))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the number of digits : -4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the number which is to be reversed :-4321\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Reveresed Number :- 1234\n",
+ "Addition of digits :- 10\n",
+ "Multiplication of digits :- 24"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.73, Page number: 172<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Attempt the question 6.72 by considering the false condition i.e. the value of i should\n",
+ "#be initially larger than the value in the while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 7\n",
+ "\n",
+ "#Result\n",
+ "#There is no do-while loop in python\n",
+ "sys.stdout.write(\"\\nThis is a program of do while loop\")\n",
+ "while i <= 5:\n",
+ " sys.stdout.write(\"\\nThis is a program of do while loop\")\n",
+ " i += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "This is a program of do while loop"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.74, Page number: 172<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the cubes of 1 to 10 numbers using do-while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nPrint the numbers and their cubes\\n\")\n",
+ "while x <= 10:\n",
+ " y = pow(x,3)\n",
+ " sys.stdout.write(\"%4d %27d\\n\"%(x,y))\n",
+ " x += 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Print the numbers and their cubes\n",
+ " 1 1\n",
+ " 2 8\n",
+ " 3 27\n",
+ " 4 64\n",
+ " 5 125\n",
+ " 6 216\n",
+ " 7 343\n",
+ " 8 512\n",
+ " 9 729\n",
+ " 10 1000\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.75, Page number: 173<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Check whether the given number is prime or not.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 2\n",
+ "n = int(raw_input(\"Enter The number for testing (prime or not) : \"))\n",
+ "\n",
+ "#Result\n",
+ "#There is no do-while loop in python\n",
+ "while x < n:\n",
+ " if n % x == 0:\n",
+ " sys.stdout.write(\"\\nThe number %d is not prime.\"%(n))\n",
+ " exit(0)\n",
+ " x += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nThe number %d is prime\"%(n))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The number for testing (prime or not) : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The number 5 is prime"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.76, Page number: 174<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count the number of students having age less than 25 and weight less than 50Kg out of five.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "count = 0\n",
+ "x = 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nEnter data of 5 boys\\n\")\n",
+ "sys.stdout.write(\"\\nAge Weight\\n\")\n",
+ "\n",
+ "#There is no do-while loop in python\n",
+ "while x <= 5:\n",
+ " age = int(raw_input(\"\"))\n",
+ " wt = float(raw_input(\"\"))\n",
+ " if age < 25 and wt < 50:\n",
+ " count += 1\n",
+ " x += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nNumber of boys with age < 25\")\n",
+ "sys.stdout.write(\"and weight < 50Kg = %d\\n\"%(count))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter data of 5 boys\n",
+ "\n",
+ "Age Weight\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "24\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "51\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "45\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "51\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "35\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "24\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "54\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Number of boys with age < 25and weight < 50Kg = 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.77, Page number: 175<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compute the factorial of given number using do while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "fact = 1\n",
+ "a = int(raw_input(\"Enter The Number : \"))\n",
+ "sys.stdout.write(\"\\nEnter The Number : %d\\n\"%(a))\n",
+ "\n",
+ "#Calculation\n",
+ "#There is no do-while loop in python\n",
+ "while a >= 1:\n",
+ " sys.stdout.write(\"%d * \"%(a))\n",
+ " fact = fact * a\n",
+ " a -= 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\" = %d\"%(fact))\n",
+ "sys.stdout.write(\"\\nFactorial of Given number is %d\"%(fact))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter The Number : 5\n",
+ "5 * 4 * 3 * 2 * 1 * = 120\n",
+ "Factorial of Given number is 120"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.78, Page number: 175<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the series such as 1+2+3+ .. i. Using do-while loop. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 1\n",
+ "s = 0\n",
+ "\n",
+ "i = int(raw_input(\"Enter a number : \"))\n",
+ "\n",
+ "#Calculation and Result\n",
+ "#There is no do-while loop in python\n",
+ "while a <= i:\n",
+ " sys.stdout.write(\"%d + \"%(a))\n",
+ " s = s + a\n",
+ " a += 1\n",
+ " \n",
+ "sys.stdout.write(\"\\b\\bs = %d\"%(s))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1 + 2 + 3 + 4 + 5 + \b\bs = 15"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.79, Page number: 176<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use while statement in do-while loop and print values from 1 to 5\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = 0\n",
+ "\n",
+ "#There is no do-while loop in python\n",
+ "while x < 5:\n",
+ " x += 1\n",
+ " sys.stdout.write(\"\\t%d\"%(x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t1\t2\t3\t4\t5"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter7.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter7.ipynb
new file mode 100755
index 00000000..ac82414f
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter7.ipynb
@@ -0,0 +1,3644 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 7: Arrays<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.1, Page number: 186<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print size of various data types using arrays.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = [0 for i in range(0,10)]\n",
+ "c = ['0' for i in range(0,10)]\n",
+ "l = [sys.maxint+5 for i in range(0,10)]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The type 'int' requires %d Bytes\"%(sys.getsizeof(int)))\n",
+ "sys.stdout.write(\"\\nThe type 'char' requires %d Bytes\"%(sys.getsizeof(str)))\n",
+ "sys.stdout.write(\"\\nThe type 'long' requires %d Bytes\"%(sys.getsizeof(long)))\n",
+ "sys.stdout.write(\"\\n%d memory locations are reserved for ten 'int' elements\"%(sys.getsizeof(i)))\n",
+ "sys.stdout.write(\"\\n%d memory locations are reserved for ten 'int' elements\"%(sys.getsizeof(c)))\n",
+ "sys.stdout.write(\"\\n%d memory locations are reserved for ten 'int' elements\"%(sys.getsizeof(l)))\n",
+ "\n",
+ "#python data types are different from C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The type 'int' requires 436 Bytes\n",
+ "The type 'char' requires 436 Bytes\n",
+ "The type 'long' requires 436 Bytes\n",
+ "12 memory locations are reserved for ten 'int' elements\n",
+ "100 memory locations are reserved for ten 'int' elements\n",
+ "100 memory locations are reserved for ten 'int' elements"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.2, Page number: 187<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display character array with their address.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "name = ['A','R','R','A','Y']\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nCharacter Memory Location\\n\")\n",
+ "while i < len(name):\n",
+ " sys.stdout.write(\"\\n[%c]\\t\\t[%d]\"%(name[i],id(name[i])))\n",
+ " i += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Character Memory Location\n",
+ "\n",
+ "[A]\t\t[31712968]\n",
+ "[R]\t\t[31527832]\n",
+ "[R]\t\t[31527832]\n",
+ "[A]\t\t[31712968]\n",
+ "[Y]\t\t[31712248]"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.3, Page number: 188<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find sum of even and odd numbers from 1 to 10. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "sumo = 0\n",
+ "sume = 0\n",
+ "i = 0\n",
+ "a = -1\n",
+ "b = -1\n",
+ "\n",
+ "odd = [0 for i in range(0,5)]\n",
+ "even = [0 for i in range(0,5)]\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(1,10+1):\n",
+ " if i%2 == 0:\n",
+ " a += 1\n",
+ " even[a] = i\n",
+ " else:\n",
+ " b += 1\n",
+ " odd[b] = i\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n\\tEven \\t\\tOdd\")\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\n\\t %d\\t\\t %d\"%(even[i],odd[i]))\n",
+ " sume = sume + even[i]\n",
+ " sumo = sumo + odd[i]\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\t==========================\\n\")\n",
+ "sys.stdout.write(\"Addition : %d %14d\"%(sume,sumo))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\tEven \t\tOdd\n",
+ "\t 2\t\t 1\n",
+ "\t 4\t\t 3\n",
+ "\t 6\t\t 5\n",
+ "\t 8\t\t 7\n",
+ "\t 10\t\t 9\n",
+ "\t==========================\n",
+ "Addition : 30 25"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.4, Page number: 189<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find sum of even numbers and product of odd numbers from 5 input values.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 0\n",
+ "m = 1\n",
+ "num = [0 for i in range(0,5)]\n",
+ "\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\nEnter Number [%d] : \"%(i+1))\n",
+ " num[i] = int(raw_input(\"\"))\n",
+ "\n",
+ "#Calculation and Result\n",
+ "sys.stdout.write(\"\\n==================================\")\n",
+ "for i in range(0,5):\n",
+ " if num[i]%2 == 0:\n",
+ " sys.stdout.write(\"\\nEven Number : %d\"%(num[i]))\n",
+ " a = a + num[i]\n",
+ " else:\n",
+ " sys.stdout.write(\"\\nOdd Number : %d\"%(num[i]))\n",
+ " m = m * num[i]\n",
+ "\n",
+ "sys.stdout.write(\"\\n==================================\")\n",
+ "sys.stdout.write(\"\\nAddition of Even Numbers : %d\"%(a))\n",
+ "sys.stdout.write(\"\\nProduct of Odd Numbers : %d\"%(m))\n",
+ "sys.stdout.write(\"\\n==================================\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Number [1] : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Number [2] : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Number [3] : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Number [4] : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Number [5] : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "==================================\n",
+ "Odd Number : 1\n",
+ "Even Number : 2\n",
+ "Odd Number : 3\n",
+ "Even Number : 4\n",
+ "Odd Number : 5\n",
+ "==================================\n",
+ "Addition of Even Numbers : 6\n",
+ "Product of Odd Numbers : 15\n",
+ "=================================="
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.5, Page number: 190<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print string in the reverse order.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "s = ['0' for i in range(0,15)]\n",
+ "\n",
+ "s = raw_input(\"Enter a String : \\n\")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Reverse String : \\n\")\n",
+ "\n",
+ "#Since there is no null terminating character for string in python, length of string is taken to give the index range\n",
+ "#index range is given -1 to include the index 0 also.\n",
+ "\n",
+ "for i in range(len(s)-1,-1,-1): \n",
+ " sys.stdout.write(\"%c\"%s[i])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a String : \n",
+ "HELLO\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reverse String : \n",
+ "OLLEH"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.6, Page number: 191<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Detect the occurrence of a character in a given string.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "s = ['0' for i in range(0,15)]\n",
+ "c = 0\n",
+ "\n",
+ "s = raw_input(\"Enter a String : \")\n",
+ "f = raw_input(\"Enter a Character to Find :\")\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(0,len(s)):\n",
+ " if s[i] == f:\n",
+ " c += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"The Character (%c) in a String (%s) occurs %d times.\"%(f,s,c))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a String : programmer\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Character to Find :r\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Character (r) in a String (programmer) occurs 3 times."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.7, Page number: 192<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the elements of two arrays in two separate columns and add their\n",
+ "#corresponding elements and display in the 3rd column.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "num = [24,34,12,44,56,17]\n",
+ "num1 = [12,24,35,78,85,22]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Element of Array 1st - 2nd Array Addition\\n\")\n",
+ "for i in range(0,5+1):\n",
+ " sys.stdout.write(\"\\n\\t\\t%d + %d = %d\"%(num[i],num1[i],num[i]+num1[i]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Element of Array 1st - 2nd Array Addition\n",
+ "\n",
+ "\t\t24 + 12 = 36\n",
+ "\t\t34 + 24 = 58\n",
+ "\t\t12 + 35 = 47\n",
+ "\t\t44 + 78 = 122\n",
+ "\t\t56 + 85 = 141\n",
+ "\t\t17 + 22 = 39"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.8, Page number: 192<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find sum of 3 numbers by entering as character type.\n",
+ "\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "real = [['0' for i in range(0,6)] for i in range(0,6)]\n",
+ "ima = [['0' for i in range(0,6)] for i in range(0,6)]\n",
+ "\n",
+ "for l in range(0,3):\n",
+ " c = int(raw_input(\"Enter Number : \"))\n",
+ " r = c/255\n",
+ " i = c%255\n",
+ " real[l][5] = r\n",
+ " ima[l][5] = i\n",
+ "\n",
+ "c = 0\n",
+ "\n",
+ "for l in range(0,3):\n",
+ " c = c + real[l][5]*255 + ima[l][5]\n",
+ "\n",
+ "sys.stdout.write(\"\\nSum of 3 Numbers : %3ld\"%(c))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of 3 Numbers : 12"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.9, Page number: 193<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Accept any string upto 15 characters. Display the elements of string with their\n",
+ "#element numbers in a separate column.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#name = ['0' for i in range(0,15)]\n",
+ "name = raw_input(\"Enter your name : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Element no. & Character\\n\")\n",
+ "for i in range(0,len(name)): #There is no null termination character for string in python\n",
+ " sys.stdout.write(\"\\n%d \\t %c\"%(i,name[i])) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter your name : amit\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Element no. & Character\n",
+ "\n",
+ "0 \t a\n",
+ "1 \t m\n",
+ "2 \t i\n",
+ "3 \t t"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.10, Page number: 194<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display names of days of a week \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "day = [0 for i in range(0,7)]\n",
+ "\n",
+ "sys.stdout.write(\"Enter numbers between 1 to 7 : \")\n",
+ "for i in range(0,6+1):\n",
+ " day[i] = int(raw_input(\"\"))\n",
+ "\n",
+ "#Result\n",
+ "#There is no switch statement in python. use functions and dictionary or if statement instead.\n",
+ "for i in range(0,6+1):\n",
+ " if day[i] == 1:\n",
+ " sys.stdout.write(\"\\n%dst day of week is Sunday\"%(day[i]))\n",
+ " else:\n",
+ " if day[i] == 2:\n",
+ " sys.stdout.write(\"\\n%dnd day of week is Monday\"%(day[i]))\n",
+ " else:\n",
+ " if day[i] == 3:\n",
+ " sys.stdout.write(\"\\n%drd day of week is Tuesday\"%(day[i]))\n",
+ " else:\n",
+ " if day[i] == 4:\n",
+ " sys.stdout.write(\"\\n%dth day of week is Wednesday\"%(day[i]))\n",
+ " else:\n",
+ " if day[i] == 5:\n",
+ " sys.stdout.write(\"\\n%dth day of week is Thursday\"%(day[i]))\n",
+ " else:\n",
+ " if day[i] == 6:\n",
+ " sys.stdout.write(\"\\n%dth day of week is Friday\"%(day[i]))\n",
+ " else:\n",
+ " if day[i] == 7:\n",
+ " sys.stdout.write(\"\\n%dth day of week is Saturday\"%(day[i]))\n",
+ " else:\n",
+ " sys.stdout.write(\"\\n%dth is invalid day.\"%(day[i]))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers between 1 to 7 : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "1st day of week is Sunday\n",
+ "3rd day of week is Tuesday\n",
+ "2nd day of week is Monday\n",
+ "4th day of week is Wednesday\n",
+ "5th day of week is Thursday\n",
+ "7th day of week is Saturday\n",
+ "8th is invalid day."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.11, Page number: 195<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the contents of two arrays where the 1st array should contain the string and 2nd numerical numbers.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "city = ['N','A','N','D','E','D']\n",
+ "pin = [4,3,1,6,0,3]\n",
+ "\n",
+ "#Result\n",
+ "for i in city:\n",
+ " sys.stdout.write(\"%c\"%(i))\n",
+ "\n",
+ "sys.stdout.write(\" - \")\n",
+ "for i in pin:\n",
+ " sys.stdout.write(\"%d\"%(i))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NANDED - 431603"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.12, Page number: 195<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the number of days of different months of year.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "month = [31,28,31,30,31,30,31,31,30,31,30,31]\n",
+ "\n",
+ "#Result\n",
+ "for i in range(0,11+1):\n",
+ " sys.stdout.write(\"\\nMonth [%d] of a year contains %d days.\"%(i+1,month[i]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Month [1] of a year contains 31 days.\n",
+ "Month [2] of a year contains 28 days.\n",
+ "Month [3] of a year contains 31 days.\n",
+ "Month [4] of a year contains 30 days.\n",
+ "Month [5] of a year contains 31 days.\n",
+ "Month [6] of a year contains 30 days.\n",
+ "Month [7] of a year contains 31 days.\n",
+ "Month [8] of a year contains 31 days.\n",
+ "Month [9] of a year contains 30 days.\n",
+ "Month [10] of a year contains 31 days.\n",
+ "Month [11] of a year contains 30 days.\n",
+ "Month [12] of a year contains 31 days."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.13, Page number: 197<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the number of days of given month of a year.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "month = [1,3,5,7,8,10,12,4,6,9,11,2]\n",
+ "\n",
+ "mn = int(raw_input(\"Enter Number of Month : \"))\n",
+ "\n",
+ "for i in range(0,11+1):\n",
+ " if mn == month[i]: #There is no goto statement in python\n",
+ " if i+1 == 12:\n",
+ " sys.stdout.write(\"Month (%d) Contains 28 days.\"%(month[i]))\n",
+ " if i+1 < 8:\n",
+ " sys.stdout.write(\"Month (%d) Contains 31 days.\"%(month[i]))\n",
+ " if i+1 > 7 and i+1 != 12:\n",
+ " sys.stdout.write(\"Month (%d) Contains 30 days.\"%(month[i]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number of Month : 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Month (2) Contains 28 days."
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.14, Page number: 198<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the average sales of an item out of 12 months sale.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#Since sum is a built in function in python, sum1 is used instead of sum.\n",
+ "sum1 = 0\n",
+ "avg = 0\n",
+ "\n",
+ "sys.stdout.write(\"Enter Month No.- Sale of an Item/month\\n\")\n",
+ "\n",
+ "item = [0 for i in range(0,11+1)]\n",
+ "for sale in range(0,11+1):\n",
+ " item[sale] = int(raw_input(\"\\t%d = \"%(sale+1)))\n",
+ "\n",
+ "#Calculation\n",
+ "for sale in range(0,11+1):\n",
+ " sum1 = sum1 + item[sale]\n",
+ "\n",
+ "avg = sum1/12.0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAverage Sale if an item/month = %f\"%(avg))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Month No.- Sale of an Item/month\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t1 = 125\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t2 = 225\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t3 = 325\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t4 = 425\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t5 = 525\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t6 = 625\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t7 = 725\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t8 = 825\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t9 = 925\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t10 = 500\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t11 = 600\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t12 = 700\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Average Sale if an item/month = 543.750000"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.15, Page number: 199<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the similar elements in an array and find the occurrence of similar\n",
+ "#numbers for number of times.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "k = 0\n",
+ "j = 1\n",
+ "\n",
+ "item = [0 for i in range(0,4+1)]\n",
+ "sys.stdout.write(\"\\nEnter Numbers.\\n\")\n",
+ "for i in range(0,4+1):\n",
+ " item[i] = int(raw_input(\"%d = \"%(i)))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for j in range(0,4+1):\n",
+ " for i in range(j+1,4+1):\n",
+ " if item[j] == item[i]:\n",
+ " sys.stdout.write(\"\\n%d %d Elements are same.\"%(j,i))\n",
+ " k += 1\n",
+ "\n",
+ "if k == 10:\n",
+ " sys.stdout.write(\"\\nAll elements are same\")\n",
+ "else:\n",
+ " if k == 0:\n",
+ " sys.stdout.write(\"\\nNo Elements are same.\")\n",
+ " else:\n",
+ " sys.stdout.write(\"\\nElements Contains Double Numbers.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Enter Numbers.\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0 = 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1 = 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2 = 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3 = 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4 = 9\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "0 3 Elements are same.\n",
+ "Elements Contains Double Numbers."
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.16, Page number: 200<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate and display total cost of 4 models of Pentium PCs.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "pccode = [1,2,3,4]\n",
+ "t = 0\n",
+ "price = [25000,30000,35000,40000]\n",
+ "stock = [25,20,15,20]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nStock & Total Cost Details\")\n",
+ "sys.stdout.write(\"\\n========================================================\")\n",
+ "sys.stdout.write(\"\\nModel\\t\\tQty.\\tRate(Rs.)\\tTotal Value\")\n",
+ "sys.stdout.write(\"\\n========================================================\")\n",
+ "\n",
+ "for i in range(0,3+1):\n",
+ " sys.stdout.write(\"\\nPentium%d\\t%d\\t%8ld %15ld\"%(pccode[i],stock[i],price[i],price[i]*stock[i]))\n",
+ " t = t + price[i] * stock[i]\n",
+ "\n",
+ "sys.stdout.write(\"\\n========================================================\")\n",
+ "sys.stdout.write(\"\\nTotal Value of All PCs in Rs. %ld\"%(t))\n",
+ "sys.stdout.write(\"\\n========================================================\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Stock & Total Cost Details\n",
+ "========================================================\n",
+ "Model\t\tQty.\tRate(Rs.)\tTotal Value\n",
+ "========================================================\n",
+ "Pentium1\t25\t 25000 625000\n",
+ "Pentium2\t20\t 30000 600000\n",
+ "Pentium3\t15\t 35000 525000\n",
+ "Pentium4\t20\t 40000 800000\n",
+ "========================================================\n",
+ "Total Value of All PCs in Rs. 2550000\n",
+ "========================================================"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.17, Page number: 201<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the given message by using putc() and stdout() functions.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "msg = \"C is Easy\"\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "#There is no putc function and null termination in python.\n",
+ "while i < len(msg):\n",
+ " sys.stdout.write(\"%c\"%(msg[i]))\n",
+ " i += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C is Easy"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.18, Page number: 202<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the text through keyboard and display it by using\n",
+ "#stdin and stdout streams.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "ch = raw_input(\"Input a Text : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The Text Entered was\\n\")\n",
+ "\n",
+ "for i in ch:\n",
+ " sys.stdout.write(\"%c\"%(i))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input a Text : Hello World\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Text Entered was\n",
+ "Hello World"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.19, Page number: 202<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort the given strings alphabetically.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = raw_input(\"Enter Text Below : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Sorted Text Below : \\n\")\n",
+ "for i in range(65,90+1):\n",
+ " for j in range(0,len(text)):\n",
+ " if text[j] == chr(i).upper() or text[j] == chr(i).lower():\n",
+ " sys.stdout.write(\"%c\"%(text[j]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Below : Hello\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sorted Text Below : \n",
+ "eHllo"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.20, Page number: 203<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Arrange the numbers in increasing and decreasing order\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "sys.stdout.write(\"Enter ten numbers : \")\n",
+ "a = [0 for i in range(0,10)]\n",
+ "\n",
+ "for i in range(0,10):\n",
+ " a[i] = int(raw_input(\"\"))\n",
+ "sum1 = 0\n",
+ "\n",
+ "#Calculation\n",
+ "sum1 = sum(a)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Numbers In Ascending Order : \")\n",
+ "for i in range(0,sum1):\n",
+ " for j in range(0,10):\n",
+ " if i == a[j]:\n",
+ " sys.stdout.write(\"%3d\"%(a[j]))\n",
+ " \n",
+ "sys.stdout.write(\"\\nNumbers In Descending Order : \")\n",
+ "for i in range(sum1,0,-1):\n",
+ " for j in range(0,10):\n",
+ " if i == a[j]:\n",
+ " sys.stdout.write(\"%3d\"%(a[j]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter ten numbers : "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "10\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "12\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numbers In Ascending Order : 1 2 3 4 5 7 9 9 10 12\n",
+ "Numbers In Descending Order : 12 10 9 9 7 5 4 3 2 1"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.21, Page number: 205<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sorting in ascending order by comparison method.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "n = int(raw_input(\"Enter how many numbers to sort : \"))\n",
+ "\n",
+ "num = [0 for i in range(0,n)]\n",
+ "for i in range(0,n):\n",
+ " num[i] = int(raw_input(\"Enter numbers # %2d : \"%(i+1)))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The Numbers Entered through keyboard\\n\")\n",
+ "for i in range(0,n):\n",
+ " sys.stdout.write(\"%4d\"%(num[i]))\n",
+ "for i in range(0,n-1):\n",
+ " for j in range(i+1,n):\n",
+ " if num[i] > num[j]:\n",
+ " temp = num[i]\n",
+ " num[i] = num[j]\n",
+ " num[j] = temp\n",
+ "\n",
+ "sys.stdout.write(\"\\nThe Numbers in ascending order\\n\")\n",
+ "for i in num:\n",
+ " sys.stdout.write(\"%4d\"%(i))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter how many numbers to sort : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers # 1 : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers # 2 : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers # 3 : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers # 4 : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter numbers # 5 : 9\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Numbers Entered through keyboard\n",
+ " 8 3 2 1 9\n",
+ "The Numbers in ascending order\n",
+ " 1 2 3 8 9"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.22, Page number: 206<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Evaluate the series contains sum of square of\n",
+ "#numbers from 1 to n. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "s = 0\n",
+ "sqr = [0 for i in range(0,15)]\n",
+ "\n",
+ "n = int(raw_input(\"Enter value of n : \"))\n",
+ "\n",
+ "for i in range(0,n):\n",
+ " sqr[i] = pow(i+1,2)\n",
+ " \n",
+ "for i in range(0,n):\n",
+ " sys.stdout.write(\"%d\\n\"%(sqr[i]))\n",
+ " s = s + sqr[i]\n",
+ " \n",
+ "sys.stdout.write(\"Sum of square : %d\"%(s))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter value of n : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1\n",
+ "4\n",
+ "9\n",
+ "16\n",
+ "Sum of square : 30"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.23, Page number: 207<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display two dimensional array elements together with their addresses\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[0 for i in range(0,3)]for i in range(0,3)]\n",
+ "c = 1\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " a[i][j] = c\n",
+ " c += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"Array Elements and addresses.\\n\")\n",
+ "sys.stdout.write(\" Col-0 Col-1 Col-2\\n\")\n",
+ "sys.stdout.write(\"========================================================\")\n",
+ "sys.stdout.write(\"\\nRow0\")\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " sys.stdout.write(\" %d [%5d]\"%(a[i][j],id(a[i][j])))\n",
+ " sys.stdout.write(\"\\nRow%d\"%(i+1))\n",
+ "\n",
+ "sys.stdout.write(\"\\r\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Array Elements and addresses.\n",
+ " Col-0 Col-1 Col-2\n",
+ "========================================================\n",
+ "Row0 1 [6215912] 2 [6215900] 3 [6215888]\n",
+ "Row1 4 [6215876] 5 [6215864] 6 [6215852]\n",
+ "Row2 7 [6215840] 8 [6215828] 9 [6215816]\n",
+ "Row3\r"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.24, Page number: 208<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the elements of two-dimensional array.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[1,2,3],[4,5,6],[7,8,9]]\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"Elements of An Array.\\n\")\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " sys.stdout.write(\"%5d\"%(a[i][j]))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Elements of An Array.\n",
+ " 1 2 3\n",
+ " 4 5 6\n",
+ " 7 8 9\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.25, Page number: 209<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read codenos and balance and count the number of codenos, \n",
+ "#which are having the balance less than 1000.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "j = 0\n",
+ "bal = [[0 for i in range(0,5)]for i in range(0,5)]\n",
+ "\n",
+ "for i in range(0,5):\n",
+ " bal[i][1] = int(raw_input(\"Enter Code No & Balance : \"))\n",
+ " bal[i][2] = int(raw_input(\"Enter Code No & Balance : \"))\n",
+ " \n",
+ "sys.stdout.write(\"Your Entered Data : \")\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\n%d %d\"%(bal[i][1],bal[i][2]))\n",
+ " if bal[i][2] < 1000:\n",
+ " j += 1\n",
+ " \n",
+ "sys.stdout.write(\"\\nBalance Less than 1000 are %d\"%(j))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 900\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 800\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 1200\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 550\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Code No & Balance : 600\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Your Entered Data : \n",
+ "1 900\n",
+ "2 800\n",
+ "3 1200\n",
+ "4 550\n",
+ "5 600\n",
+ "Balance Less than 1000 are 4"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.26, Page number: 210<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Accept three elements in a one dimensional array and compute addition,square\n",
+ "#and cube. Display the results in two dimensional array.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[0 for i in range(0,3)]for i in range(0,3)]\n",
+ "b = [0 for i in range(0,3)]\n",
+ "j = 0\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " b[i] = int(raw_input(\"Enter Three Numbers : \"))\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(0,3):\n",
+ " a[i][j] = b[i]*2\n",
+ " a[i][j+1] = pow(b[i],2)\n",
+ " a[i][j+2] = pow(b[i],3)\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"Number\\tAddition\\tSquare\\t\\tCube\\n\")\n",
+ "for i in range(0,3):\n",
+ " sys.stdout.write(\"\\n%d\"%(b[i]))\n",
+ " for j in range(0,3):\n",
+ " sys.stdout.write(\"\\t%4d\\t\"%(a[i][j]))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 6\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three Numbers : 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number\tAddition\tSquare\t\tCube\n",
+ "\n",
+ "5\t 10\t\t 25\t\t 125\t\n",
+ "\n",
+ "6\t 12\t\t 36\t\t 216\t\n",
+ "\n",
+ "7\t 14\t\t 49\t\t 343\t\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.27, Page number: 211<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read and display matrix\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "row = int(raw_input(\"Enter Order of matrix upto (10x10) A : \"))\n",
+ "col = int(raw_input(\"Enter Order of matrix upto (10x10) A : \"))\n",
+ "\n",
+ "for i in range(0,row):\n",
+ " for j in range(0,col):\n",
+ " a[i][j] = int(raw_input(\"Enter Elements of matrix A : \"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nThe Matrix is : \\n\")\n",
+ "for i in range(0,row):\n",
+ " for j in range(0,col):\n",
+ " sys.stdout.write(\"%6d\"%(a[i][j]))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of matrix upto (10x10) A : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of matrix upto (10x10) A : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Matrix is : \n",
+ " 3 5 8\n",
+ " 4 8 5\n",
+ " 8 5 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.28, Page number: 212<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Transpose of matrix\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "b = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "row1 = int(raw_input(\"Enter Order of matrix upto (10x10) A : \"))\n",
+ "col1 = int(raw_input(\"Enter Order of matrix upto (10x10) A : \"))\n",
+ "\n",
+ "for i in range(0,row1):\n",
+ " for j in range(0,col1):\n",
+ " a[i][j] = int(raw_input(\"Enter Elements of matrix A : \"))\n",
+ "row2 = col1\n",
+ "col2 = row1\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(0,row1):\n",
+ " for j in range(0,col1):\n",
+ " b[j][i] = a[i][j]\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nThe Matrix is : \\n\")\n",
+ "for i in range(0,row2):\n",
+ " for j in range(0,col2):\n",
+ " sys.stdout.write(\"%4d\"%(b[i][j]))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of matrix upto (10x10) A : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of matrix upto (10x10) A : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix A : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Matrix is : \n",
+ " 3 4 8\n",
+ " 5 8 5\n",
+ " 8 5 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.29, Page number: 213<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Transpose of 3x3 matrix\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "mat = [[0 for i in range(0,3)]for i in range(0,3)]\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " mat[i][j] = int(raw_input(\"Enter Elements of matrix \"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Transpose of the matrix\\n\")\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " sys.stdout.write(\"\\t%d\"%(mat[j][i]))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of matrix 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Transpose of the matrix\n",
+ "\t5\t2\t7\n",
+ "\t8\t5\t5\n",
+ "\t9\t4\t2\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.30, Page number: 214<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Addition and subtraction of two matrices \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "b = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "\n",
+ "r1 = int(raw_input(\"Enter Order of Matrix A & B upto 10x10\"))\n",
+ "c1 = int(raw_input(\"Enter Order of Matrix A & B upto 10x10\"))\n",
+ "\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " a[i][j] = int(raw_input(\"Enter Elements of Matrix A:\"))\n",
+ "\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " b[i][j] = int(raw_input(\"Enter Elements of Matrix B:\"))\n",
+ "\n",
+ "#Calculation and Result\n",
+ "sys.stdout.write(\"\\nMatrix Addition\\n\")\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " sys.stdout.write(\"%5d\"%(a[i][j]+b[i][j]))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ "\n",
+ "sys.stdout.write(\"\\nMatrix Subtraction\\n\")\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " sys.stdout.write(\"%5d\"%(a[i][j]-b[i][j]))\n",
+ " sys.stdout.write(\"\\n\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of Matrix A & B upto 10x103\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of Matrix A & B upto 10x103\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:6\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Matrix Addition\n",
+ " 5 8 13\n",
+ " 2 14 12\n",
+ " 8 16 6\n",
+ "\n",
+ "Matrix Subtraction\n",
+ " 3 2 3\n",
+ " 2 4 4\n",
+ " -4 2 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.31, Page number: 216<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Multiplication of two matrices \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "b = [[0 for i in range(0,10)]for i in range(0,10)]\n",
+ "\n",
+ "r1 = int(raw_input(\"Enter Order of Matrix A & B upto 10x10\"))\n",
+ "c1 = int(raw_input(\"Enter Order of Matrix A & B upto 10x10\"))\n",
+ "\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " a[i][j] = int(raw_input(\"Enter Elements of Matrix A:\"))\n",
+ "\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " b[i][j] = int(raw_input(\"Enter Elements of Matrix B:\"))\n",
+ "\n",
+ "#Calculation and Result\n",
+ "sys.stdout.write(\"\\nMultiplication of corresponding elements\\n\")\n",
+ "for i in range(0,r1):\n",
+ " for j in range(0,c1):\n",
+ " sys.stdout.write(\"%5d\"%(a[i][j]*b[i][j]))\n",
+ " sys.stdout.write(\"\\n\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of Matrix A & B upto 10x103\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Order of Matrix A & B upto 10x103\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:9\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix A:4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:6\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Elements of Matrix B:2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Multiplication of corresponding elements\n",
+ " 4 15 40\n",
+ " 0 45 32\n",
+ " 12 63 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.32, Page number: 217<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the Quantity & Price of various Pentium models using an array and\n",
+ "#Compute the total cost of all models.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "pc = [[0 for i in range(0,4)]for i in range(0,4)]\n",
+ "t = 0\n",
+ "\n",
+ "for i in range(0,4):\n",
+ " for j in range(0,2):\n",
+ " pc[i][j] = int(raw_input(\"Enter Qty. & Price for Pentium %d : \"%(i+1)))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"=====================================================\")\n",
+ "sys.stdout.write(\"\\nModel\\tQty.\\tRate(Rs.)\\tTotal Value\")\n",
+ "sys.stdout.write(\"\\n=====================================================\")\n",
+ "for i in range(0,4):\n",
+ " sys.stdout.write(\"\\nPentium %d %2ld %6ld %15ld\"%(i+1,pc[i][0],pc[i][1],pc[i][0]*pc[i][1]))\n",
+ " t = t + pc[i][0] * pc[i][1]\n",
+ "\n",
+ "sys.stdout.write(\"\\n=====================================================\")\n",
+ "sys.stdout.write(\"\\nTotal Value of All PCs in Rs. %ld\"%(t))\n",
+ "sys.stdout.write(\"\\n=====================================================\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 1 : 25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 1 : 25000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 2 : 20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 2 : 40000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 3 : 15\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 3 : 35000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 4 : 20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Qty. & Price for Pentium 4 : 40000\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "=====================================================\n",
+ "Model\tQty.\tRate(Rs.)\tTotal Value\n",
+ "=====================================================\n",
+ "Pentium 1 25 25000 625000\n",
+ "Pentium 2 20 40000 800000\n",
+ "Pentium 3 15 35000 525000\n",
+ "Pentium 4 20 40000 800000\n",
+ "=====================================================\n",
+ "Total Value of All PCs in Rs. 2750000\n",
+ "====================================================="
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.33, Page number: 218<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the capacity of HD, it's price and quantity available in the form of an array\n",
+ "# and compute the cost of HD\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "hd = [[0 for i in range(0,4)]for i in range(0,4)]\n",
+ "t = 0\n",
+ "\n",
+ "for j in range(0,4):\n",
+ " for i in range(0,3):\n",
+ " hd[i][j] = int(raw_input(\"Enter Capacity, Price & Qty.:\"))\n",
+ " \n",
+ "sys.stdout.write(\"====================================================================\\n\")\n",
+ "sys.stdout.write(\"HD Capacity\\tGB Price Rs.\\tQuantity Total Value Rs.\")\n",
+ "sys.stdout.write(\"\\n====================================================================\\n\")\n",
+ "\n",
+ "for j in range(0,4):\n",
+ " for i in range(0,3):\n",
+ " sys.stdout.write(\"%2ld\"%(hd[i][j]))\n",
+ " sys.stdout.write(\"\\t\\t\")\n",
+ " if i == 2:\n",
+ " sys.stdout.write(\"%5ld\"%(hd[i-1][j]*hd[i][j]))\n",
+ " t = t + hd[i-1][j] * hd[i][j]\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " \n",
+ "sys.stdout.write(\"====================================================================\")\n",
+ "sys.stdout.write(\"\\nTotal Value Rs. %37ld\"%(t))\n",
+ "sys.stdout.write(\"\\n====================================================================\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:10\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:8000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:25\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:12000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:40\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:15000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:15\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:90\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:20000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Capacity, Price & Qty.:10\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "====================================================================\n",
+ "HD Capacity\tGB Price Rs.\tQuantity Total Value Rs.\n",
+ "====================================================================\n",
+ "10\t\t8000\t\t25\t\t200000\n",
+ "20\t\t12000\t\t20\t\t240000\n",
+ "40\t\t15000\t\t15\t\t225000\n",
+ "90\t\t20000\t\t10\t\t200000\n",
+ "====================================================================\n",
+ "Total Value Rs. 865000\n",
+ "===================================================================="
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.34, Page number: 220<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the names of the cities with their base addresses.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "city = [\"Mumbai\",\"Chennai\",\"Kolkata\",\"Pune\",\"Delhi\"]\n",
+ "\n",
+ "#Result\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"Base Address = %u\"%(id(city[i]))) #Memory address will differ in different systems\n",
+ " sys.stdout.write(\"\\tString = %s\\n\"%(city[i]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base Address = 60549024\tString = Mumbai\n",
+ "Base Address = 60550048\tString = Chennai\n",
+ "Base Address = 60550592\tString = Kolkata\n",
+ "Base Address = 60551104\tString = Pune\n",
+ "Base Address = 60550240\tString = Delhi\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.35, Page number: 220<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the binary bits corresponding to Hexadecimal numbers from\n",
+ "#0 to E and attach an odd parity to Hex numbers and display them.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "bin = [[0 for i in range(0,16)]for i in range(0,16)]\n",
+ "a = 0\n",
+ "c = 0\n",
+ "\n",
+ "for x in range(0,16):\n",
+ " y = x\n",
+ " for a in range(0,4):\n",
+ " bin[x][a] = y%2\n",
+ " y = y/2\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nInput Bits\\t Parity Bits\")\n",
+ "sys.stdout.write(\"\\n===================================\")\n",
+ "\n",
+ "for x in range(0,16):\n",
+ " c = 0\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " for y in range(3,0-1,-1):\n",
+ " sys.stdout.write(\"%3d\"%(bin[x][y]))\n",
+ " if bin[x][y] == 1:\n",
+ " c += 1\n",
+ " if c%2 == 0:\n",
+ " sys.stdout.write(\"%7d\"%(1))\n",
+ " else:\n",
+ " sys.stdout.write(\"%7d\"%(0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Input Bits\t Parity Bits\n",
+ "===================================\n",
+ " 0 0 0 0 1\n",
+ " 0 0 0 1 0\n",
+ " 0 0 1 0 0\n",
+ " 0 0 1 1 1\n",
+ " 0 1 0 0 0\n",
+ " 0 1 0 1 1\n",
+ " 0 1 1 0 1\n",
+ " 0 1 1 1 0\n",
+ " 1 0 0 0 0\n",
+ " 1 0 0 1 1\n",
+ " 1 0 1 0 1\n",
+ " 1 0 1 1 0\n",
+ " 1 1 0 0 1\n",
+ " 1 1 0 1 0\n",
+ " 1 1 1 0 0\n",
+ " 1 1 1 1 1"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.36, Page number: 222<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert binary to gray codes.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "bin1 = [[0 for i in range(0,16)]for i in range(0,16)]\n",
+ "a = 0\n",
+ "c = 0\n",
+ "\n",
+ "#Calculation\n",
+ "for x in range(0,16):\n",
+ " y = x\n",
+ " for a in range(0,4):\n",
+ " bin1[x][a] = y%2\n",
+ " y = y/2\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nBinary Bits\\tGray Bits\")\n",
+ "sys.stdout.write(\"\\n==================================\")\n",
+ "\n",
+ "for x in range(0,16):\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " for y in range(3,0-1,-1):\n",
+ " sys.stdout.write(\"%3d\"%(bin1[x][y]))\n",
+ " sys.stdout.write(\"%5d %2d %2d %2d\"%(bin1[x][3],(bin1[x][3]^bin1[x][2]),(bin1[x][2]^bin1[x][1]),(bin1[x][1]^bin1[x][0])))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Binary Bits\tGray Bits\n",
+ "==================================\n",
+ " 0 0 0 0 0 0 0 0\n",
+ " 0 0 0 1 0 0 0 1\n",
+ " 0 0 1 0 0 0 1 1\n",
+ " 0 0 1 1 0 0 1 0\n",
+ " 0 1 0 0 0 1 1 0\n",
+ " 0 1 0 1 0 1 1 1\n",
+ " 0 1 1 0 0 1 0 1\n",
+ " 0 1 1 1 0 1 0 0\n",
+ " 1 0 0 0 1 1 0 0\n",
+ " 1 0 0 1 1 1 0 1\n",
+ " 1 0 1 0 1 1 1 1\n",
+ " 1 0 1 1 1 1 1 0\n",
+ " 1 1 0 0 1 0 1 0\n",
+ " 1 1 0 1 1 0 1 1\n",
+ " 1 1 1 0 1 0 0 1\n",
+ " 1 1 1 1 1 0 0 0"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.37, Page number: 224<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#working of three dimensional array.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "array_3d = [[[0 for i in range(0,3)]for i in range(0,3)]for i in range(0,3)]\n",
+ "\n",
+ "for a in range(0,3):\n",
+ " for b in range(0,3):\n",
+ " for c in range(0,3):\n",
+ " array_3d[a][b][c] = a+b+c\n",
+ "\n",
+ "#Result\n",
+ "for a in range(0,3):\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " for b in range(0,3):\n",
+ " for c in range(0,3):\n",
+ " sys.stdout.write(\"%3d\"%(array_3d[a][b][c]))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " 0 1 2\n",
+ " 1 2 3\n",
+ " 2 3 4\n",
+ "\n",
+ " 1 2 3\n",
+ " 2 3 4\n",
+ " 3 4 5\n",
+ "\n",
+ " 2 3 4\n",
+ " 3 4 5\n",
+ " 4 5 6\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.38, Page number: 225<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#working of four dimensional array\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "array_4d = [[[[0 for i in range(0,2)]for i in range(0,2)]for i in range(0,2)]for i in range(0,2)]\n",
+ "\n",
+ "for a in range(0,2):\n",
+ " for b in range(0,2):\n",
+ " for c in range(0,2):\n",
+ " for d in range(0,2):\n",
+ " array_4d[a][b][c][d] = a+b+c+d\n",
+ " \n",
+ "#Result\n",
+ "for a in range(0,2):\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " for b in range(0,2):\n",
+ " for c in range(0,2):\n",
+ " for d in range(0,2):\n",
+ " sys.stdout.write(\"%3d\"%(array_4d[a][b][c][d]))\n",
+ " sys.stdout.write(\"\\n\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " 0 1\n",
+ " 1 2\n",
+ " 1 2\n",
+ " 2 3\n",
+ "\n",
+ " 1 2\n",
+ " 2 3\n",
+ " 2 3\n",
+ " 3 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.39, Page number: 226<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read the quantity & rate of certain items using multidimensional\n",
+ "#array. Calculate total cost by multiplying quantity & rate and offer 2%\n",
+ "#discount on it & display the net amount.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "m = [[[[0 for i in range(0,2)]for i in range(0,2)]for i in range(0,2)]for i in range(0,2)]\n",
+ "\n",
+ "for a in range(0,2):\n",
+ " for b in range(0,2):\n",
+ " for c in range(0,2):\n",
+ " for d in range(0,1):\n",
+ " if a == 0:\n",
+ " m[a][b][c][d] = int(raw_input(\"Enter Quantity & Rate\\na=%d b=%d c=%d d=%d\"%(a,b,c,d)))\n",
+ " m[a][b][c][d+1] = int(raw_input(\"Enter Quantity & Rate\\na=%d b=%d c=%d d=%d\"%(a,b,c,d)))\n",
+ " else:\n",
+ " m[a][b][c][d] = m[a-1][b][c][d] * m[a-1][b][c][d+1]\n",
+ " m[a][b][c][d+1] = m[a-1][b][c][d] * m[a-1][b][c][d+1] *2/100\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n============================================================\\n\")\n",
+ "sys.stdout.write(\"Quantity\\tRate\\tAmoount\\tDiscount(@2%)\\tNet Amount\\n\")\n",
+ "sys.stdout.write(\"============================================================\\n\")\n",
+ "\n",
+ "for a in range(0,1):\n",
+ " for b in range(0,2):\n",
+ " for c in range(0,2):\n",
+ " for d in range(0,1):\n",
+ " sys.stdout.write(\"\\n%10ld %10ld\"%(m[a][b][c][d],m[a][b][c][d+1]))\n",
+ " sys.stdout.write(\"%8ld.00 %6ld.00 %12ld.00\"%(m[a+1][b][c][d],m[a+1][b][c][d+1],m[a+1][b][c][d] - m[a+1][b][c][d+1]))\n",
+ " \n",
+ "sys.stdout.write(\"\\n============================================================\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=0 c=0 d=025\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=0 c=0 d=050\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=0 c=1 d=030\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=0 c=1 d=060\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=1 c=0 d=035\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=1 c=0 d=070\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=1 c=1 d=040\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Quantity & Rate\n",
+ "a=0 b=1 c=1 d=075\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "============================================================\n",
+ "Quantity\tRate\tAmoount\tDiscount(@2%)\tNet Amount\n",
+ "============================================================\n",
+ "\n",
+ " 25 50 1250.00 25.00 1225.00\n",
+ " 30 60 1800.00 36.00 1764.00\n",
+ " 35 70 2450.00 49.00 2401.00\n",
+ " 40 75 3000.00 60.00 2940.00\n",
+ "============================================================"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.40, Page number: 227<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read string from a character array.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "in1 = raw_input(\"\") #Since in is a keyword in python, in1 is used\n",
+ "\n",
+ "#Result\n",
+ "#There is no sscanf() function in python\n",
+ "out = in1\n",
+ "sys.stdout.write(\"%s\\n\"%(out))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "HELLO\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.41, Page number: 228<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read integers in character array, convert and assign them to integer\n",
+ "#variable.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "in1 = raw_input(\"Enter Integers : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Value of int x : %s\"%(in1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Integers : 123\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of int x : 123"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.42, Page number: 229<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#use of sprintf()\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 10\n",
+ "c = 'C'\n",
+ "p = 3.14\n",
+ "\n",
+ "spf = str(\"%d %c %.2f\"%(a,c,p)) #There is no sprintf() function in python\n",
+ "sys.stdout.write(\"\\n%s\"%(spf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "10 C 3.14"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.43, Page number: 229<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Complete the string by filling the spaces with appropriate characters\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "name = \"Mas er ngA SIC\"\n",
+ "name1 = ['' for i in range(0,20)]\n",
+ "x = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Mastering ANSI C\\n\")\n",
+ "\n",
+ "while x < len(name): #There is no null terminating character in python\n",
+ " if name[x] == ' ':\n",
+ " n = raw_input(\"\")\n",
+ " name1[x] = n\n",
+ " else:\n",
+ " name1[x] = name[x]\n",
+ " x += 1\n",
+ " \n",
+ "sys.stdout.write(\"%s\"%(name1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mastering ANSI C\n",
+ "['M', 'a', 's', 't', 'e', 'r', 'i', 'n', 'g', 'A', 'N', 'S', 'I', 'C', '', '', '', '', '', '']"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter8.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter8.ipynb
new file mode 100755
index 00000000..3243f3f8
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter8.ipynb
@@ -0,0 +1,2750 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 8: Working with Strings & Standard Functions<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.1, Page number: 236<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display string without considering NULL character\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "name1 = 'SANJAY'\n",
+ "#There is no null termination character in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Name1 = %s\"%(name1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name1 = SANJAY"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.2, Page number: 236<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display successive strings\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "name1 = 'SANJAY'\n",
+ "name2 = 'SANJAY'\n",
+ "#There is no null termination character in python\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Name1 = %s\"%name1)\n",
+ "sys.stdout.write(\"\\nName2 = %s\"%(name2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name1 = SANJAY\n",
+ "Name2 = SANJAY"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.3, Page number: 237<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print \"WELCOME\" by using different formats of initialization \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#in python, string initialization can be done using single quotes and double quotes\n",
+ "arr1 = 'WELCOME'\n",
+ "arr2 = \"WELCOME\"\n",
+ "arr3 = 'WELCOME'\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nArray1 = %s\"%(arr1))\n",
+ "sys.stdout.write(\"\\nArray2 = %s\"%(arr2))\n",
+ "sys.stdout.write(\"\\nArray3 = %s\"%(arr3))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Array1 = WELCOME\n",
+ "Array2 = WELCOME\n",
+ "Array3 = WELCOME"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.4, Page number: 238<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the string 'PRABHAKAR' using various format specifications\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = \"PRABHAKAR\"\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"%s\\n\"%(text))\n",
+ "sys.stdout.write(\"%.5s\\n\"%(text))\n",
+ "sys.stdout.write(\"%.8s\\n\"%(text))\n",
+ "sys.stdout.write(\"%.15s\\n\"%(text))\n",
+ "sys.stdout.write(\"%-10.4s\\n\"%(text))\n",
+ "sys.stdout.write(\"%11s\\n\"%(text))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "PRABHAKAR\n",
+ "PRABH\n",
+ "PRABHAKA\n",
+ "PRABHAKAR\n",
+ "PRAB \n",
+ " PRABHAKAR\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.5, Page number: 239<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the elements of the character array using while loop.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = \"HAVE A NICE DAY\"\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "#There is no null character for strings in python\n",
+ "\n",
+ "while i < 15:\n",
+ " sys.stdout.write(\"%c\"%(text[i]))\n",
+ " i += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "HAVE A NICE DAY"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.6, Page number: 239<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the elements of the character array.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = \"HAVE A NICE DAY\"\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "#There is no null character for strings in python\n",
+ "\n",
+ "while i < 15:\n",
+ " sys.stdout.write(\"%c\"%(text[i]))\n",
+ " i += 1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "HAVE A NICE DAY"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.7, Page number: 241<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count the number of characters in a given string\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = raw_input(\"Type Text Below\")\n",
+ "\n",
+ "#Calculation\n",
+ "len1 = len(text) #since len in a built in function in python, len1 is used\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Length of String = %d\"%(len1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Type Text BelowHello\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of String = 5"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.8, Page number: 241<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine the length of the string\n",
+ "#and find its equivalent ASCII codes.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "\n",
+ "#Variable Initialization\n",
+ "name = raw_input(\"Enter your name : \")\n",
+ "l = len(name)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Your Name is %s & \"%(name))\n",
+ "sys.stdout.write(\"it contains %d characters\"%(l))\n",
+ "sys.stdout.write(\"\\n\\nName & it's Ascii Equivalent.\\n\")\n",
+ "sys.stdout.write(\"=====================================\\n\")\n",
+ "\n",
+ "for i in range(0,l):\n",
+ " sys.stdout.write(\"\\n%c\\t\\t%d\"%(name[i],ord(name[i]))) #ord() function is used to get the ASCII value of a character"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter your name : SACHIN\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Your Name is SACHIN & it contains 6 characters\n",
+ "\n",
+ "Name & it's Ascii Equivalent.\n",
+ "=====================================\n",
+ "\n",
+ "S\t\t83\n",
+ "A\t\t65\n",
+ "C\t\t67\n",
+ "H\t\t72\n",
+ "I\t\t73\n",
+ "N\t\t78"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.9, Page number: 242<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Remove the occurrences of 'The' word from entered text\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "j = 0\n",
+ "line = raw_input(\"Enter Text Below.\")\n",
+ "l = len(line)\n",
+ "line2 = ['0' for i in range(0,80)]\n",
+ "i = 0\n",
+ "\n",
+ "#Calculation\n",
+ "while i < l:\n",
+ " if (i >= l-4 or l ==3) and (line[l-4] == ' ' and line[l-3] == 't' and line[l-2] == 'h' and line[l-1] == 'e'):\n",
+ " continue\n",
+ " if line[i] == 't' and line[i+1] == 'h' and line[i+2] == 'e' and line[i+3] == ' ':\n",
+ " i += 3\n",
+ " continue\n",
+ " else:\n",
+ " line2[j] = line[i]\n",
+ " j += 1\n",
+ " i += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nText With 'The' -: %s\"%(line))\n",
+ "sys.stdout.write(\"\\nText Without 'The' -: \")\n",
+ "for l in range(0,j):\n",
+ " sys.stdout.write(\"%c\"%(line2[l]))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Below.Printf write data to the screen.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Text With 'The' -: Printf write data to the screen.\n",
+ "Text Without 'The' -: Printf write data to screen."
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.10, Page number: 243<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Delete all the occurrences of vowels in a given text.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "j = 0\n",
+ "line = raw_input(\"Enter Text Below.\")\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(0,len(line)):\n",
+ " if line[i] == 'a' or line[i] == 'e' or line[i] == 'i' or line[i] == 'o' or line[i] == 'u':\n",
+ " continue\n",
+ " else:\n",
+ " line2[j] = line[i]\n",
+ " j += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"Text With Vowels -: %s\"%(line))\n",
+ "sys.stdout.write(\"\\nText Without Vowels -: \")\n",
+ "for l in range(0,j): #There is no null terminating character in python, so we have to specify length\n",
+ " sys.stdout.write(\"%c\"%(line2[l])) \n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Below.Have a nice day.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Text With Vowels -: Have a nice day.\n",
+ "Text Without Vowels -: Hv nc dy."
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.11, Page number: 244<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the length of characteres in a given string including and excluding spaces.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 0\n",
+ "len1 = 0 #Since len is a built in function in python, len1 is used\n",
+ "ex = 0\n",
+ "\n",
+ "text = raw_input(\"Enter Text Here : \")\n",
+ "\n",
+ "#Calculation\n",
+ "while i != len(text)-1: #There is no null terminating character in python.\n",
+ " if text[i] == ' ':\n",
+ " ex += 1\n",
+ " else:\n",
+ " len1 += 1\n",
+ " i += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nLengh of String Including Spaces : %d\"%(len1+ex))\n",
+ "sys.stdout.write(\"\\nLengh of String Excluding Spaces : %d\"%(len1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Here : Time is Money.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Lengh of String Including Spaces : 13\n",
+ "Lengh of String Excluding Spaces : 11"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.12, Page number: 245<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the length of entered string and display it as per output shown.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "string = raw_input(\"Enter a String\")\n",
+ "ln = len(string)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nLength of Given String : %d\"%(ln))\n",
+ "sys.stdout.write(\"\\nSequence of Characters Displayed on Screen\")\n",
+ "sys.stdout.write(\"\\n======== == ========== ========= == ======\")\n",
+ "sys.stdout.write(\"\\n\\n\")\n",
+ "\n",
+ "for c in range(0,ln-2+1):\n",
+ " d = c + 1\n",
+ " sys.stdout.write(\"\\t%.*s\\n\"%(d,string))\n",
+ "\n",
+ "for c in range(ln,0-1,-1):\n",
+ " d = c + 1\n",
+ " sys.stdout.write(\"\\t%.*s\\n\"%(d,string))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a StringHAPPY\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Length of Given String : 5\n",
+ "Sequence of Characters Displayed on Screen\n",
+ "======== == ========== ========= == ======\n",
+ "\n",
+ "\tH\n",
+ "\tHA\n",
+ "\tHAP\n",
+ "\tHAPP\n",
+ "\tHAPPY\n",
+ "\tHAPPY\n",
+ "\tHAPP\n",
+ "\tHAP\n",
+ "\tHA\n",
+ "\tH\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.13, Page number: 247<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy contents of one string to another string by using strcpy()\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "ori = raw_input(\"Enter Your Name : \")\n",
+ "\n",
+ "#Process\n",
+ "dup = ori #In python, string values can be simply copied using assignment operator\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Original String : %s\"%(ori))\n",
+ "sys.stdout.write(\"\\nDuplicate String : %s\"%(dup))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name : SACHIN\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original String : SACHIN\n",
+ "Duplicate String : SACHIN"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.14, Page number: 247<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy contents of one string to another, without strcpy() function.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "ori = raw_input(\"Enter Your Name : \")\n",
+ "\n",
+ "#Calculation\n",
+ "dup = ori #In python, string values can be simply copied using assignment operator\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"Original String : %s\"%(ori))\n",
+ "sys.stdout.write(\"\\nDuplicate String : %s\"%(dup))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name : SACHIN\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original String : SACHIN\n",
+ "Duplicate String : SACHIN"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.15, Page number: 248<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy source string to destination string upto a specified length.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "str1 = raw_input(\"Enter Source String : \")\n",
+ "str2 = raw_input(\"Enter Destination String : \")\n",
+ "n = int(raw_input(\"Enter Number of Characters to Replace in Destination String :\"))\n",
+ "\n",
+ "#Calculation\n",
+ "str2 = str1[:n] + str2[n:] #Since python strings are not mutable, first and second array elements to be added to make a new one\n",
+ " \n",
+ "sys.stdout.write(\"Source String -: %s\"%(str1))\n",
+ "sys.stdout.write(\"\\nDestination String -: %s\"%(str2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Source String : wonderful\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Destination String : beautiful\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number of Characters to Replace in Destination String :6\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Source String -: wonderful\n",
+ "Destination String -: wonderful"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.16, Page number: 249<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare the two string using stricmp() function. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "sr = raw_input(\"Enter String(1) :\")\n",
+ "tar = raw_input(\"Enter String(2) :\")\n",
+ "\n",
+ "diff = (sr == tar) #in python, relational operators can be used directly\n",
+ "\n",
+ "if diff == 0:\n",
+ " sys.stdout.write(\"The Two Strings are Identical.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"The Tow Strings are Different\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String(1) :HELLO\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String(2) :hello\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Two Strings are Identical."
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.17, Page number: 250<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Perform following.\n",
+ "\n",
+ "# 1. Display the question \"What is the Unit of Traffic?\"\n",
+ "# 2. Accept the Answer.\n",
+ "# 3. If the answer is wrong (other than Earlang) display \"Try again!\" & continues to answer.\n",
+ "# 4. Otherwise, if it is correct \"Earlang\" display the message \"Answer is correct\".\n",
+ "# 5. If the user gives correct anser in first two attempts the program will terminate.\n",
+ "# 6. If the user fails to provide correct answer in three attempts the program itself gives the answer.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Calculation & Result\n",
+ "for i in range(0,3):\n",
+ " ans = raw_input(\"What is the Unit of Traffic ?\")\n",
+ " \n",
+ " if ans == \"Earlang\":\n",
+ " sys.stdout.write(\"\\nAnswer is Correct.\")\n",
+ " else:\n",
+ " if i < 3:\n",
+ " sys.stdout.write(\"\\nTry Again !\\n\")\n",
+ " \n",
+ "if i == 3:\n",
+ " sys.stdout.write(\"\\nUnit of Traffic is Earlang.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "What is the Unit of Traffic ?Earlan\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Try Again !\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "What is the Unit of Traffic ?Earlam\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Try Again !\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "What is the Unit of Traffic ?Earlang\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Answer is Correct."
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.18, Page number: 252<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare two strings upto specified length.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "sr = raw_input(\"Enter String(1):\")\n",
+ "tar = raw_input(\"Enter String(2):\")\n",
+ "n = int(raw_input(\"Enter Lenght upto which comparison is to be made\"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "diff = (sr == tar[:n])\n",
+ "\n",
+ "if diff == 0:\n",
+ " sys.stdout.write(\"The Two Strings are Identical upto %d characters.\"%(n))\n",
+ "else:\n",
+ " sys.stdout.write(\"The Two Strings are Different\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String(1):HELLO\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String(2):HE MAN\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Lenght upto which comparison is to be made2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Two Strings are Identical upto 2 characters."
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.19, Page number: 253<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare two strings and display the position in which it is different.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "diff = 0\n",
+ "sr = raw_input(\"Enter String(1) :\")\n",
+ "tar = raw_input(\"Enter String(2) :\")\n",
+ "\n",
+ "#Checking\n",
+ "for i in range(0,len(sr)):\n",
+ " if sr[i] != tar[i]:\n",
+ " sys.stdout.write(\"%c %c\\n\"%(sr[i],tar[i]))\n",
+ " diff += 1\n",
+ " \n",
+ "#Result\n",
+ "if len(sr) == len(tar) and diff == 0:\n",
+ " sys.stdout.write(\"\\nThe Two Strings are Identical\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nThe Two Strings are Different at %d places.\"%(diff))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String(1) :BEST LUCK\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String(2) :GOOD LUCK\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B G\n",
+ "E O\n",
+ "S O\n",
+ "T D\n",
+ "\n",
+ "The Two Strings are Different at 4 places."
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.20, Page number: 254<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert upper case string to lower case using strlwr().\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "upper = raw_input(\"Enter a string in Upper case :\")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"After strlwr() : %s\"%(upper.lower()))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a string in Upper case :ABCDEFG\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "After strlwr() : abcdefg"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.21, Page number: 254<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Convert Lower case string to upper case using strupr()\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "upper = raw_input(\"Enter a string in Lower Case :\")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"After strupr() : %s\"%(upper.upper()))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a string in Lower Case :abcdefg\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "After strupr() : ABCDEFG"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.22, Page number: 255<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the duplicate string using strdup() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text1 = raw_input(\"Enter Text : \")\n",
+ "\n",
+ "#Result\n",
+ "text2 = text1 #in python, a string can be duplicated by just using the assignment operator\n",
+ "\n",
+ "sys.stdout.write(\"Original String = %s\\nDuplicate String = %s\"%(text1,text2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text : Today is a Good Day.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original String = Today is a Good Day.\n",
+ "Duplicate String = Today is a Good Day."
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.23, Page number: 256<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find first occurrence of a given character in a given string. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "string = raw_input(\"Enter Text Below :\")\n",
+ "ch = raw_input(\"Character to find :\")\n",
+ "\n",
+ "#Result\n",
+ "chp = string.count(ch)\n",
+ "if chp:\n",
+ " sys.stdout.write(\"Character %s found in string\"%(ch))\n",
+ "else:\n",
+ " sys.stdout.write(\"Character %s not found in string\"%(ch))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Below :Hello Begineers.\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Character to find :r\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Character r found in string"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.24, Page number: 257<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find first occurrence of a given character in a given string and display the memory location. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "line1 = raw_input(\"Enter Text :\")\n",
+ "line2 = raw_input(\"Enter Character to find from the text : \")\n",
+ "\n",
+ "for i in range(0,len(line1)):\n",
+ " sys.stdout.write(\"%c %d\\n\"%(line1[i],id(line1[i])))\n",
+ "\n",
+ "chp = line1.count(line2)\n",
+ "if chp:\n",
+ " sys.stdout.write(\"\\nAddress of first %s returned by strchr() is %d\"%(line2,id(line1[chp])))\n",
+ "else:\n",
+ " sys.stdout.write(\"'%s' String is not present in Given String \"%(line2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text :HELLO\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Character to find from the text : L\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H 20382328\n",
+ "E 20384080\n",
+ "L 19678272\n",
+ "L 19678272\n",
+ "O 20198416\n",
+ "\n",
+ "Address of first L returned by strchr() is 19678272"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.25, Page number: 258<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find the occurrence of second string in the first string.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "line1 = raw_input(\"Enter Line1 :\")\n",
+ "line2 = raw_input(\"Enter Line2 :\")\n",
+ "\n",
+ "#Calculation & Result\n",
+ "chp = line1.count(line2)\n",
+ "\n",
+ "if chp:\n",
+ " sys.stdout.write(\"'%s' String is present in Given String.\"%(line2))\n",
+ "else:\n",
+ " sys.stdout.write(\"'%s' String is not present in Given String.\"%(line2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Line1 :INDIA IS MY COUNTRY.\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Line2 :INDIA\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "'INDIA' String is present in Given String."
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.26, Page number: 259<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Append second string at the end of first string using strcat() function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text1 = raw_input(\"Enter Text1 :\")\n",
+ "text2 = raw_input(\"Enter Text2 :\")\n",
+ "\n",
+ "#Calculation and Result\n",
+ "text1 = text1 + \" \" + text2 #in python, '+' operator can also be used for string concatenation\n",
+ "\n",
+ "sys.stdout.write(\"%s\"%(text1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text1 :I Am\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text2 :an Indian\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I Am an Indian"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.27, Page number: 259<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Concatenate two strings without use of standard functions.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "fname = raw_input(\"First Name :\")\n",
+ "sname = raw_input(\"Second Name :\")\n",
+ "lname = raw_input(\"Last Name :\")\n",
+ "\n",
+ "#Calculation\n",
+ "name = fname + \" \" + sname + \" \" + lname\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nComplete Name After Concatenation.\\n\")\n",
+ "sys.stdout.write(\"%s\"%(name))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "First Name :MOHAN\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Second Name :KARAMCHAND\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Last Name :GANDHI\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Complete Name After Concatenation.\n",
+ "MOHAN KARAMCHAND GANDHI"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.28, Page number: 261<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Append second string with specified (n) number of characters at the end of first string.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text1 = raw_input(\"Enter Text1 :\")\n",
+ "text2 = raw_input(\"Enter Text2 :\")\n",
+ "n = int(raw_input(\"Enter Number of Characters to Add :\"))\n",
+ "\n",
+ "#Calculation & Result\n",
+ "text1 = text1 + \" \" + text2[:n]\n",
+ "\n",
+ "sys.stdout.write(\"%s\\n\"%(text1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text1 :MAY I\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text2 :COME IN ?\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number of Characters to Add :4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MAY I COME\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.29, Page number: 261<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Reverse of the given string.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = raw_input(\"Enter String\")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Reverse String\\n\")\n",
+ "text = text[::-1]\n",
+ "#This is extended slice syntax. It works by doing [begin:end:step] \n",
+ "#by leaving begin and end off and specifying a step of -1, it reverses a string.\n",
+ "\n",
+ "sys.stdout.write(\"%s\"%(text))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter StringABCDEFGHI\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reverse String\n",
+ "IHGFEDCBA"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.30, Page number: 262<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Reverse of the given string.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = raw_input(\"Enter String\")\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "while i < len(text):\n",
+ " sys.stdout.write(\"\\n%c is stored at location %d\"%(text[i],id(text[i])))\n",
+ " i += 1\n",
+ " \n",
+ "sys.stdout.write(\"\\nReverse String :- \")\n",
+ "text = text[::-1]\n",
+ "#This is extended slice syntax. It works by doing [begin:end:step] \n",
+ "#by leaving begin and end off and specifying a step of -1, it reverses a string.\n",
+ "\n",
+ "sys.stdout.write(\"%s\"%(text))\n",
+ "\n",
+ "i = 0\n",
+ "while i < len(text):\n",
+ " sys.stdout.write(\"\\n%c is stored at location %d\"%(text[i],id(text[i])))\n",
+ " i += 1\n",
+ "\n",
+ "#Memory address differs in different systems"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter StringABC\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "A is stored at location 20383432\n",
+ "B is stored at location 20198992\n",
+ "C is stored at location 20199040\n",
+ "Reverse String :- CBA\n",
+ "C is stored at location 20199040\n",
+ "B is stored at location 20198992\n",
+ "A is stored at location 20383432"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.31, Page number: 263<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Replace (set) given string with given symbol. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "string = raw_input(\"Enter String :\")\n",
+ "symbol = raw_input(\"Enter Symbol for Replacement : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Before strset(): %s\\n\"%(string))\n",
+ "string = symbol*len(string)\n",
+ "\n",
+ "sys.stdout.write(\"After strset() : %s\"%(string))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String :LEARN C\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Symbol for Replacement : Y\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Before strset(): LEARN C\n",
+ "After strset() : YYYYYYY"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.32, Page number: 264<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Replace (set) given string with given symbol for given number of arguments.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "string = raw_input(\"Enter String :\")\n",
+ "symbol = raw_input(\"Enter Symbol for Replacement : \")\n",
+ "n = int(raw_input(\"How many String Character to be replaced.\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Before strset() : %s\\n\"%(string))\n",
+ "\n",
+ "string = symbol * n + string[n:]\n",
+ "sys.stdout.write(\"After strset() : %s\\n\"%(string))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String :ABCDEFGHIJ\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Symbol for Replacement : +\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many String Character to be replaced.4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Before strset() : ABCDEFGHIJ\n",
+ "After strset() : ++++EFGHIJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.33, Page number: 265<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the position from which the two strings are different.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "stra = raw_input(\"First String : \")\n",
+ "strb = raw_input(\"Second String : \")\n",
+ "\n",
+ "#There is no built in function for python to check upto which position the strings are equal.\n",
+ "for length in range(min(len(stra), len(strb))):\n",
+ " if stra[length] != strb[length]:\n",
+ " break\n",
+ "\n",
+ "sys.stdout.write(\"After %d Characters there is no match.\"%(length))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "First String : GOOD MORNING\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Second String : GOOD BYE\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "After 5 Characters there is no match."
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.34, Page number: 266<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print given string from first occurrence of given character.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text1 = raw_input(\"Enter String : \")\n",
+ "text2 = raw_input(\"Enter Character :\")\n",
+ "\n",
+ "for length in range(0,len(text1)):\n",
+ " if text1[length] == text2[0]:\n",
+ " break\n",
+ " \n",
+ "sys.stdout.write(\"String from given Character : %s\"%(text1[length:]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter String : INDIA IS GREAT\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Character :G\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "String from given Character : GREAT"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.35, Page number: 266<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count a character that appears in a given text\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 0\n",
+ "count = 0\n",
+ "text = raw_input(\"Type Text Below.\")\n",
+ "find = raw_input(\"Type a character to count : \")\n",
+ "\n",
+ "#Calculation\n",
+ "while i < len(text): #There is no null terminating character for python string\n",
+ " if text[i] == find:\n",
+ " count += 1\n",
+ " i += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nCharacter (%s) found in Given String = %d Times.\"%(find,count))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Type Text Below.Programming\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Type a character to count : m\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Character (m) found in Given String = 2 Times."
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.36, Page number: 267<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count the character 'm' in a given string.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "count = 0\n",
+ "text = raw_input(\"\") #it is easy to get string at once in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"%s\"%(text))\n",
+ "\n",
+ "for i in range(0,len(text)):\n",
+ " if text[i] == '\\n':\n",
+ " break\n",
+ " else:\n",
+ " if text[i] == 'm':\n",
+ " count += 1\n",
+ " \n",
+ "sys.stdout.write(\"\\n\\nCharacter 'm' Found in Text = %d times.\"%(count))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Programming is a skill.\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Programming is a skill.\n",
+ "\n",
+ "Character 'm' Found in Text = 2 times."
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.37, Page number: 268<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Count the characters 'm', 'r', and 'o' that appears in a string without using any functions\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "text = \"Programming is good habit\"\n",
+ "m = 0\n",
+ "o = 0\n",
+ "r = 0\n",
+ "\n",
+ "#Calculation\n",
+ "for i in range(0,len(text)):\n",
+ " if text[i] == 'm':\n",
+ " m += 1\n",
+ " if text[i] == 'r':\n",
+ " r += 1\n",
+ " if text[i] == 'o':\n",
+ " o += 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nCharacter 'm' Found in Text = %d times.\\n\"%(m))\n",
+ "sys.stdout.write(\"\\nCharacter 'r' Found in Text = %d times.\\n\"%(r))\n",
+ "sys.stdout.write(\"\\nCharacter 'o' Found in Text = %d times.\"%(o))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Character 'm' Found in Text = 2 times.\n",
+ "\n",
+ "Character 'r' Found in Text = 2 times.\n",
+ "\n",
+ "Character 'o' Found in Text = 3 times."
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.38, Page number: 269<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy contents of one string to another string\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "ori = raw_input(\"Enter Your Name :\")\n",
+ "\n",
+ "#Copying\n",
+ "#Since strings in python are immutable, individual character assignment is not possible.\n",
+ "#but assignment operator simply copies the entire string to another\n",
+ "\n",
+ "dup = ori\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Original String : %s\"%(ori))\n",
+ "sys.stdout.write(\"\\nDuplicate String : %s\"%(dup))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name :SACHIN\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original String : SACHIN\n",
+ "Duplicate String : SACHIN"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.39, Page number: 270<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Palindrome or not.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = 0\n",
+ "str1 = raw_input(\"Enter the word : \") #Since str is a keyword in python, str1 is used\n",
+ "j = len(str1)-1\n",
+ "\n",
+ "#Calculation\n",
+ "while i < j:\n",
+ " if str1[i] == str1[j]:\n",
+ " test = 1\n",
+ " else:\n",
+ " test = 0\n",
+ " break\n",
+ " i += 1\n",
+ " j -= 1\n",
+ " \n",
+ "#Result\n",
+ "if test == 1:\n",
+ " sys.stdout.write(\"Word is palindrome.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nWord is not Palindrome.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the word : ABBA\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Word is palindrome."
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.40, Page number: 271<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare the string using strcmp() function and display their ASCII difference.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a1 = \"NAGPUR\"\n",
+ "a2 = \"NAGPUR\"\n",
+ "a3 = \"PANDHARPUR\"\n",
+ "a4 = \"KOLHAPUR\"\n",
+ "a5 = \"AURANGABAD\"\n",
+ "a6 = \"HYDERABAD\"\n",
+ "\n",
+ "#Calculation\n",
+ "#There is no built in function which returns the ascii value differece of two strings\n",
+ "#ord function gives the ascii value of a character\n",
+ "c1 = ord(a1[0]) - ord(a2[0])\n",
+ "c2 = ord(a3[0]) - ord(a4[0])\n",
+ "c3 = ord(a5[0]) - ord(a6[0])\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAscii Difference between two strings\\n\")\n",
+ "sys.stdout.write(\"Difference between (%s %s) = %d\\n\"%(a1,a2,c1))\n",
+ "sys.stdout.write(\"Difference between (%s %s) = %d\\n\"%(a3,a4,c2))\n",
+ "sys.stdout.write(\"Difference between (%s %s) = %d\\n\"%(a5,a6,c3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Ascii Difference between two strings\n",
+ "Difference between (NAGPUR NAGPUR) = 0\n",
+ "Difference between (PANDHARPUR KOLHAPUR) = 5\n",
+ "Difference between (AURANGABAD HYDERABAD) = -7\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.41, Page number: 272<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort city names alphabetically.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "city = [['0' for i in range(5)]for i in range(20)]\n",
+ "sys.stdout.write(\"Enter Names of Cities. \")\n",
+ "for i in range(5):\n",
+ " city[i] = raw_input(\"\")\n",
+ " \n",
+ "#Sorting & Result\n",
+ "sys.stdout.write(\"Sorted List of Cities.\\n\\n\")\n",
+ "for i in range(65,122+1):\n",
+ " for j in range(0,5):\n",
+ " if ord(city[j][0]) == i:\n",
+ " sys.stdout.write(\"\\n%s\"%(city[j]))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Names of Cities. "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MUMBAI\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NANED\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "BANGLORE\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KANPUR\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "INDORE\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sorted List of Cities.\n",
+ "\n",
+ "\n",
+ "BANGLORE\n",
+ "INDORE\n",
+ "KANPUR\n",
+ "MUMBAI\n",
+ "NANED"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.42, Page number: 273<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort city names alphabetically\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "city = [['0' for i in range(5)]for i in range(20)]\n",
+ "sys.stdout.write(\"Enter Names of Cities. \")\n",
+ "for i in range(5):\n",
+ " city[i] = raw_input(\"\")\n",
+ " \n",
+ "#Sorting & Result\n",
+ "sys.stdout.write(\"Sorted List of Cities.\\n\\n\")\n",
+ "for i in range(0,5):\n",
+ " for j in range(0,5):\n",
+ " if city[j-1] > city[j]:\n",
+ " temp = city[j-1]\n",
+ " city[j-1] = city[j]\n",
+ " city[j] = temp\n",
+ " \n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\n%s\"%(city[i]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Names of Cities. "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MUMBAI\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NANED\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "BANGLORE\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KANPUR\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "INDORE\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sorted List of Cities.\n",
+ "\n",
+ "\n",
+ "BANGLORE\n",
+ "INDORE\n",
+ "KANPUR\n",
+ "MUMBAI\n",
+ "NANED"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.43, Page number: 274<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find number of words in a given statement.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "count = 1 #Counts the starting word\n",
+ "i = 0\n",
+ "text = raw_input(\"Enter The Line of Text\\nGive One Space After Each Word\")\n",
+ "\n",
+ "#Calculation\n",
+ "while i < len(text): #There is no null terminating character in python\n",
+ " if ord(text[i]) == 32:\n",
+ " count += 1\n",
+ " i += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nThe Number of words in line = %d\"%(count))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter The Line of Text\n",
+ "Give One Space After Each WordRead Books\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Number of words in line = 2"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.44, Page number: 275<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find number of words in a given statement.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "count = 0 \n",
+ "i = 0\n",
+ "text = raw_input(\"Enter Text Below :\")\n",
+ "\n",
+ "#Calculation\n",
+ "while i < len(text): #There is no null terminating character in python for strings\n",
+ " if ord(text[i]) >= 97 and ord(text[i]) <= 122 or ord(text[i]) >= 65 and ord(text[i]) <= 90:\n",
+ " i += 1\n",
+ " continue\n",
+ " if ord(text[i]) == 32:\n",
+ " count += 1\n",
+ " i += 1\n",
+ " continue\n",
+ "\n",
+ "if i == len(text):\n",
+ " count += 1\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"The Number of words in line = %d\"%(count))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Text Below :Reading is a good Habit\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Number of words in line = 5"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.45, Page number: 276<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sort the last name of mobile customers alphabetically.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "fname = [['0' for i in range(20)] for i in range(10)]\n",
+ "sname = [['0' for i in range(20)] for i in range(10)]\n",
+ "surname = [['0' for i in range(20)] for i in range(10)]\n",
+ "name = [['0' for i in range(20)] for i in range(20)]\n",
+ "mobile = [['0' for i in range(20)] for i in range(10)]\n",
+ "temp = ['0' for i in range(20)]\n",
+ "\n",
+ "sys.stdout.write(\"Enter First Name, Second Name, surname and Mobile Number \")\n",
+ "for i in range(0,5):\n",
+ " fname[i] = raw_input(\"\")\n",
+ " sname[i] = raw_input(\"\")\n",
+ " surname[i] = raw_input(\"\")\n",
+ " mobile[i] = raw_input(\"\")\n",
+ " \n",
+ " name[i] = surname[i] + \" \" \n",
+ " temp[0] = fname[i][0]\n",
+ " name[i] = name[i] + temp[0] + \".\"\n",
+ " temp[0] = sname[i][0]\n",
+ " name[i] = name[i] + temp[0]\n",
+ " \n",
+ "for i in range(0,5):\n",
+ " for j in range(1,5-i):\n",
+ " if name[j-1] > name[j]:\n",
+ " temp = name[j-1]\n",
+ " name[j-1] = name[j]\n",
+ " name[j] = temp\n",
+ " temp = mobile[j-1]\n",
+ " mobile[j-1] = mobile[j]\n",
+ " mobile[j] = temp\n",
+ " \n",
+ "sys.stdout.write(\"List of Customers in alphanetical Order.\")\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\n%-20s\\t %-10s\\n\"%(name[i],mobile[i]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter First Name, Second Name, surname and Mobile Number "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "K\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "S\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MORE\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "458454\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "J\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "M\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CHATE\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "658963\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "M\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "M\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "GORE\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "660585\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "K\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "JAIN\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "547855\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "J\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "J\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "JOSHI\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "354258\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "List of Customers in alphanetical Order.\n",
+ "CHATE J.M \t 658963 \n",
+ "\n",
+ "GORE M.M \t 660585 \n",
+ "\n",
+ "JAIN L.K \t 547855 \n",
+ "\n",
+ "JOSHI J.J \t 354258 \n",
+ "\n",
+ "MORE K.S \t 458454 \n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter9.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter9.ipynb
new file mode 100755
index 00000000..4da93c8d
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter9.ipynb
@@ -0,0 +1,1999 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 9: Pointers<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.1, Page number: 282<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the address of the variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "num = int(raw_input(\"Enter a Number = \"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Value of num = %d\\n\"%(num))\n",
+ "sys.stdout.write(\"Address of num = %d\\n\"%(id(num)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Number = 20\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of num = 20\n",
+ "Address of num = 19554932\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.2, Page number: 283<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the addresses of different variables together with their values.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = raw_input(\"Enter alphabet\")\n",
+ "i = int(raw_input(\"Enter number\"))\n",
+ "f = float(raw_input(\"Enter float\"))\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAddress of (c) %c = %d\"%(c,id(c)))\n",
+ "sys.stdout.write(\"\\nAddress of (i) %d = %d\"%(i,id(i)))\n",
+ "sys.stdout.write(\"\\nAddress of (f) %.2f = %d\"%(f,id(f)))\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter alphabetC\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter number20\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter float2.5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of (c) C = 48769192\n",
+ "Address of (i) 20 = 19554932\n",
+ "Address of (f) 2.50 = 44777808"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.3, Page number: 284<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Show pointer of any data type that occupies same space\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Result\n",
+ "#Garbage collector module is used for python memory management\n",
+ "sys.stdout.write(\"char %d byte & its pointer %d bytes\\n\"%(sys.getsizeof(chr),sys.getsizeof(id(chr))))\n",
+ "sys.stdout.write(\"int %d byte & its pointer %d bytes\\n\"%(sys.getsizeof(int),sys.getsizeof(id(int))))\n",
+ "sys.stdout.write(\"float %d byte & its pointer %d bytes\\n\"%(sys.getsizeof(float),sys.getsizeof(id(float))))\n",
+ "\n",
+ "#value tagged method is used in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "char 36 byte & its pointer 12 bytes\n",
+ "int 436 byte & its pointer 12 bytes\n",
+ "float 436 byte & its pointer 12 bytes\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.4, Page number: 284<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the value of variable and its location using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#There is no pointer concept in python\n",
+ "v = 10\n",
+ "p = v\n",
+ "#In python, variables of same value are tagged together instead of storing the value in different locations\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAddress of v = %u\"%(id(v)))\n",
+ "sys.stdout.write(\"\\nValue of v = %d\"%(p))\n",
+ "sys.stdout.write(\"\\nAddress of p = %d\"%(id(p)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of v = 29808764\n",
+ "Value of v = 10\n",
+ "Address of p = 29808764"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.5, Page number: 285<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the value of variable by different ways.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = int(raw_input(\"Enter Integer Value\"))\n",
+ "b = float(raw_input(\"Enter float Value\"))\n",
+ "\n",
+ "pa = id(a)\n",
+ "pb = id(b)\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python. content of memory location can't be accessed directly by user.\n",
+ "sys.stdout.write(\"\\nAddress of a = %u\"%(pa))\n",
+ "sys.stdout.write(\"\\nValue of a = %d\"%(a))\n",
+ "sys.stdout.write(\"\\nValue of a = %d\"%(a))\n",
+ "sys.stdout.write(\"\\nValue of a = %d\"%(a))\n",
+ "\n",
+ "sys.stdout.write(\"\\nAddress of b = %u\"%(pb))\n",
+ "sys.stdout.write(\"\\nValue of b = %.2f\"%(b))\n",
+ "sys.stdout.write(\"\\nValue of b = %.2f\"%(b))\n",
+ "sys.stdout.write(\"\\nValue of b = %.2f\"%(b))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Integer Value4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter float Value2.2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of a = 19555124\n",
+ "Value of a = 4\n",
+ "Value of a = 4\n",
+ "Value of a = 4\n",
+ "Address of b = 44777792\n",
+ "Value of b = 2.20\n",
+ "Value of b = 2.20\n",
+ "Value of b = 2.20"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.6, Page number: 286<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print value of variable using different pointer notations.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "v = 10\n",
+ "p = id(v)\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and can't access memory location directly by user\n",
+ "sys.stdout.write(\"\\nv = %d v = %d v = %d\"%(v,v,v))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "v = 10 v = 10 v = 10"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.7, Page number: 287<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print element and its address using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = int(raw_input(\"Enter a number : \"))\n",
+ "k = id(i)\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and can't access memory location directly by user\n",
+ "sys.stdout.write(\"\\nAddress of i is %u\"%(k))\n",
+ "sys.stdout.write(\"\\nValue of i is %d\"%(i))\n",
+ "#The memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 15\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of i is 19554992\n",
+ "Value of i is 15"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.8, Page number: 287<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Add two numbers through variables and their pointers\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = int(raw_input(\"Enter Two Numbers : \"))\n",
+ "b = int(raw_input(\"Enter Two Numbers : \"))\n",
+ "ap = a\n",
+ "bp = b\n",
+ "\n",
+ "#Calculation\n",
+ "c = a + b\n",
+ "d = ap + bp\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and can't access memory location directly by user\n",
+ "sys.stdout.write(\"\\nSum of A & B Using Variable : %d\"%(c))\n",
+ "sys.stdout.write(\"\\nSum of A & B Using Pointer : %d\"%(d))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Two Numbers : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Two Numbers : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of A & B Using Variable : 12\n",
+ "Sum of A & B Using Pointer : 12"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.9, Page number: 288<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Assign pointer value to another variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 5\n",
+ "c = id(a)\n",
+ "b = a\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and can't access memory location directly by user\n",
+ "sys.stdout.write(\"\\nMemory location of 'a' = %u\"%(c))\n",
+ "sys.stdout.write(\"\\nThe value of a = %d & b = %d\"%(a,b))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Memory location of 'a' = 29808824\n",
+ "The value of a = 5 & b = 5"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.10, Page number: 289<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Assign value of 'b' to 'a' through pointers and add the values.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = int(raw_input(\"Enter Value of 'a' & 'b' : \"))\n",
+ "b = int(raw_input(\"Enter Value of 'a' & 'b' : \"))\n",
+ "pa = id(a)\n",
+ "pb = id(b)\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and can't access memory location directly by user\n",
+ "sys.stdout.write(\"\\nValue of a = %d & b = %d\"%(a,b))\n",
+ "sys.stdout.write(\"\\nAddress of a = %u\"%(pa))\n",
+ "sys.stdout.write(\"\\nAddress of b = %u\"%(pb))\n",
+ "sys.stdout.write(\"\\n\\nAddition of 'a' & 'b' : %d\"%(a+b))\n",
+ "\n",
+ "a = b\n",
+ "pa = id(a)\n",
+ "#In python, variables of same value are tagged together instead of storing the value in different locations\n",
+ "\n",
+ "sys.stdout.write(\"\\n*pa = %d *pb = %d\"%(a,b))\n",
+ "sys.stdout.write(\"\\npa = %u pb = %u\"%(pa,pb))\n",
+ "sys.stdout.write(\"\\nAddition of *pa + *pb : %d\"%(a+b))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of 'a' & 'b' : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of 'a' & 'b' : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Value of a = 8 & b = 4\n",
+ "Address of a = 19555076\n",
+ "Address of b = 19555124\n",
+ "\n",
+ "Addition of 'a' & 'b' : 12\n",
+ "*pa = 4 *pb = 4\n",
+ "pa = 19555124 pb = 19555124\n",
+ "Addition of *pa + *pb : 8"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.11, Page number: 290<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#The effect of increment on pointer variables. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = int(raw_input(\"Enter integer Value\"))\n",
+ "y = raw_input(\"Enter Character Value\")\n",
+ "z = float(raw_input(\"Enter float Value\"))\n",
+ "\n",
+ "x1 = id(x)\n",
+ "y1 = id(y)\n",
+ "z1 = id(z)\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and can't access memory location directly by user\n",
+ "\n",
+ "sys.stdout.write(\"\\nAddress of x = %u\\n\"%(x1))\n",
+ "sys.stdout.write(\"\\nAddress of y = %u\\n\"%(y1))\n",
+ "sys.stdout.write(\"\\nAddress of z = %u\\n\"%(z1))\n",
+ "\n",
+ "x1 += 1\n",
+ "y1 += 1\n",
+ "z1 += 1\n",
+ "#In python, variables of same value are tagged together instead of storing the value in different locations\n",
+ "\n",
+ "sys.stdout.write(\"\\nAfter Increment in Pointers\\n\")\n",
+ "sys.stdout.write(\"\\nNow Address of x = %u\\n\"%(x1))\n",
+ "sys.stdout.write(\"Now Address of y = %u\\n\"%(y1))\n",
+ "sys.stdout.write(\"Now Address of z = %u\\n\"%(z1))\n",
+ "\n",
+ "sys.stdout.write(\"\\nSize of Integer : %d\"%(sys.getsizeof(x)))\n",
+ "sys.stdout.write(\"\\nSize of Character : %d\"%(sys.getsizeof(y)))\n",
+ "sys.stdout.write(\"\\nSize of Float : %d\"%(sys.getsizeof(z)))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter integer Value2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Character ValueA\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter float Value2.2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address of x = 19555148\n",
+ "\n",
+ "Address of y = 48769192\n",
+ "\n",
+ "Address of z = 44777728\n",
+ "\n",
+ "After Increment in Pointers\n",
+ "\n",
+ "Now Address of x = 19555149\n",
+ "Now Address of y = 48769193\n",
+ "Now Address of z = 44777729\n",
+ "\n",
+ "Size of Integer : 12\n",
+ "Size of Character : 22\n",
+ "Size of Float : 16"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.12, Page number: 291<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#The effect of increased and decreased operator used as prefix and suffix with pointer variable.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "i = int(raw_input(\"Enter Value of i = \"))\n",
+ "ii = id(i)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Address of i = %u\\n\"%(ii))\n",
+ "#There is no increment or decrement operator and pointer concept in python\n",
+ "ii += 1\n",
+ "sys.stdout.write(\"Address of i = %u\\n\"%(ii))\n",
+ "sys.stdout.write(\"Address of i = %u\\n\"%(ii))\n",
+ "ii += 1\n",
+ "ii -= 1\n",
+ "sys.stdout.write(\"Address of i = %u\\n\"%(ii))\n",
+ "sys.stdout.write(\"Address of i = %u\\n\"%(ii))\n",
+ "ii -= 1\n",
+ "sys.stdout.write(\"Address of i = %u\\n\"%(ii))\n",
+ "\n",
+ "#Memory address differs in different systems"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Value of i = 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Address of i = 19555076\n",
+ "Address of i = 19555077\n",
+ "Address of i = 19555077\n",
+ "Address of i = 19555077\n",
+ "Address of i = 19555077\n",
+ "Address of i = 19555076\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.13, Page number: 292<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Perform different arithmetic operations using pointers\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 25\n",
+ "b = 10\n",
+ "p = id(a)\n",
+ "j = id(b)\n",
+ "\n",
+ "#Result\n",
+ "#There is no pointer concept in python and user can't access memory contents directly\n",
+ "sys.stdout.write(\"\\nAddition a + b = %d\"%(a+b))\n",
+ "sys.stdout.write(\"\\nSubtraction a - b = %d\"%(a-b))\n",
+ "sys.stdout.write(\"\\nProduct a * b = %d\"%(a*b))\n",
+ "sys.stdout.write(\"\\nDivision a / b = %d\"%(a/b))\n",
+ "sys.stdout.write(\"\\na Mod b = %d\"%(a%b))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Addition a + b = 35\n",
+ "Subtraction a - b = 15\n",
+ "Product a * b = 250\n",
+ "Division a / b = 2\n",
+ "a Mod b = 5"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.14, Page number: 293<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare two pointers. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 2\n",
+ "j = id(a)\n",
+ "k = id(a)\n",
+ "\n",
+ "#Result\n",
+ "if j == k:\n",
+ " sys.stdout.write(\"\\nThe Tow Pointers have the same address.\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nThe Pointers have the different address.\")\n",
+ " \n",
+ "sys.stdout.write(\"\\n\\nAddress of a (j) = %u\"%(j))\n",
+ "sys.stdout.write(\"\\nAddress of a (k) = %u\"%(k))\n",
+ "#Memory address differs in different systems"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Tow Pointers have the same address.\n",
+ "\n",
+ "Address of a (j) = 30726364\n",
+ "Address of a (k) = 30726364"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.15, Page number: 294<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display elements of an array. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = [2,4,6,8,10]\n",
+ "k = 1\n",
+ "\n",
+ "#Result\n",
+ "while k <= 5:\n",
+ " sys.stdout.write(\"%3d\"%(x[k-1]))\n",
+ " k += 1\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 2 4 6 8 10"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.16, Page number: 295<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display array element with their addresses using array name as a pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = [2,4,6,8,10]\n",
+ "k = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nElement No.\\tElement\\tAddress\")\n",
+ "\n",
+ "while k < 5:\n",
+ " sys.stdout.write(\"\\nx[%d] \\t%13d %10u\"%(k,x[k],id(x[k])))\n",
+ " k += 1\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Element No.\tElement\tAddress\n",
+ "x[0] \t 2 30726364\n",
+ "x[1] \t 4 30726340\n",
+ "x[2] \t 6 30726316\n",
+ "x[3] \t 8 30726292\n",
+ "x[4] \t 10 30726268"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.17, Page number: 296<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display array elements with their addresses using array name as a pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "num = [10,25,35,45]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nElement\\t Address\\n\")\n",
+ "\n",
+ "for i in range(0,4):\n",
+ " sys.stdout.write(\"num[%d] = %d \"%(i,num[i]))\n",
+ " sys.stdout.write(\"%8u\\n\"%(id(num[i])))\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Element\t Address\n",
+ "num[0] = 10 30726268\n",
+ "num[1] = 25 30726088\n",
+ "num[2] = 35 30725968\n",
+ "num[3] = 45 30725848\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.18, Page number: 296<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Access elements of array through different ways using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "arr = [10,20,30,40,50]\n",
+ "p = 0\n",
+ "\n",
+ "#Result\n",
+ "for p in range(0,5):\n",
+ " sys.stdout.write(\"Value of arr[%d] = \"%(p))\n",
+ " sys.stdout.write(\"%d | \"%(arr[p]))\n",
+ " sys.stdout.write(\"%d | \"%(arr[p]))\n",
+ " sys.stdout.write(\"%d | \"%(arr[p]))\n",
+ " sys.stdout.write(\"%d | \"%(arr[p]))\n",
+ " sys.stdout.write(\"address of arr[%d] = %u\\n\"%(p,id(arr[p])))\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of arr[0] = 10 | 10 | 10 | 10 | address of arr[0] = 30726268\n",
+ "Value of arr[1] = 20 | 20 | 20 | 20 | address of arr[1] = 30726148\n",
+ "Value of arr[2] = 30 | 30 | 30 | 30 | address of arr[2] = 30726028\n",
+ "Value of arr[3] = 40 | 40 | 40 | 40 | address of arr[3] = 30725908\n",
+ "Value of arr[4] = 50 | 50 | 50 | 50 | address of arr[4] = 30725788\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.19, Page number: 297<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Find sum of all the elements of an array.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "sum1 = 0 #Since sum is a built-in function in python, sum1 is used\n",
+ "i = 0\n",
+ "a = [1,2,3,4,5]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Elements Values Address\\n\\n\")\n",
+ "\n",
+ "while i < 5:\n",
+ " sys.stdout.write(\"a[%d]\\t %5d\\t %8u\\n\"%(i,a[i],id(a[i])))\n",
+ " sum1 = sum1 + a[i]\n",
+ " i += 1\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Elements Values Address\n",
+ "\n",
+ "a[0]\t 1\t 30726376\n",
+ "a[1]\t 2\t 30726364\n",
+ "a[2]\t 3\t 30726352\n",
+ "a[3]\t 4\t 30726340\n",
+ "a[4]\t 5\t 30726328\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.20, Page number: 298<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sum of squares and cubes of array elements using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "b = [1,2,3,4,5]\n",
+ "sumsq = 0\n",
+ "sumc = 0\n",
+ "\n",
+ "#Result\n",
+ "for j in range(0,5):\n",
+ " sumsq = sumsq + pow(b[j],2)\n",
+ " sumc = sumc + pow(b[j],3)\n",
+ " \n",
+ "sys.stdout.write(\"\\nSum of Squares of array elements : %d\"%(sumsq))\n",
+ "sys.stdout.write(\"\\nSum of Cubes of array elements : %d\"%(sumc))\n",
+ "\n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of Squares of array elements : 55\n",
+ "Sum of Cubes of array elements : 225"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.21, Page number: 299<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy element of one array to another array using pointers.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "so = [10,20,30,40,50]\n",
+ "ds = [0 for i in range(0,5)]\n",
+ "\n",
+ "#Copying\n",
+ "for i in range(0,5):\n",
+ " ds[i] = so[i]\n",
+ " \n",
+ "sys.stdout.write(\"Original Array Duplicated Array\")\n",
+ "\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\n\\t%d\\t\\t%d\"%(so[i],ds[i]))\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original Array Duplicated Array\n",
+ "\t10\t\t10\n",
+ "\t20\t\t20\n",
+ "\t30\t\t30\n",
+ "\t40\t\t40\n",
+ "\t50\t\t50"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.22, Page number: 299<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Copy one array into another array. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "arr1 = [15,25,35,45,55]\n",
+ "arr2 = [0 for i in range(0,5)]\n",
+ "j = 4\n",
+ "\n",
+ "#Copying & Result\n",
+ "sys.stdout.write(\"\\nOriginal Array Duplicate Array\")\n",
+ "for i in range(0,5):\n",
+ " arr2[i] = arr1[j]\n",
+ " j -= 1\n",
+ " sys.stdout.write(\"\\n\\t%d\\t\\t%d\"%(arr1[i],arr2[i]))\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Original Array Duplicate Array\n",
+ "\t15\t\t55\n",
+ "\t25\t\t45\n",
+ "\t35\t\t35\n",
+ "\t45\t\t25\n",
+ "\t55\t\t15"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.23, Page number: 300<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display array elements and their address using pointers\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[1,2,3],[4,5,6],[7,8,9]]\n",
+ "j = 1\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\tElements of An Array with their addresses\\n\\n\")\n",
+ "\n",
+ "p = id(a[0][0])\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " sys.stdout.write(\"%5d [%5u]\"%(a[i][j],id(a[i][j])))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\tElements of An Array with their addresses\n",
+ "\n",
+ " 1 [30726376] 2 [30726364] 3 [30726352]\n",
+ " 4 [30726340] 5 [30726328] 6 [30726316]\n",
+ " 7 [30726304] 8 [30726292] 9 [30726280]\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.24, Page number: 301<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display array elements and their address. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [[1,2,3],[4,5,6],[7,8,9]]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nElements of An Array with their addresses.\\n\\n\")\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " for j in range(0,3):\n",
+ " sys.stdout.write(\"%5d [%5u]\"%(a[i][j],id(a[i][j])))\n",
+ " sys.stdout.write(\"\\n\")\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Elements of An Array with their addresses.\n",
+ "\n",
+ " 1 [30726376] 2 [30726364] 3 [30726352]\n",
+ " 4 [30726340] 5 [30726328] 6 [30726316]\n",
+ " 7 [30726304] 8 [30726292] 9 [30726280]\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.25, Page number: 302<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Store addresses of different elements of an array using array of pointers\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "arrl = [5,10,15]\n",
+ "arrp = [0 for i in range(0,3)]\n",
+ "\n",
+ "for i in range(0,3):\n",
+ " arrp[i] = id(arrl[i])\n",
+ " \n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nAddress \\tElement\\n\")\n",
+ "\n",
+ "for k in range(0,3):\n",
+ " sys.stdout.write(\"%u\"%(arrp[k]))\n",
+ " sys.stdout.write(\"\\t%7d\\n\"%(arrl[k]))\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Address \tElement\n",
+ "30726328\t 5\n",
+ "30726268\t 10\n",
+ "30726208\t 15\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.26, Page number: 303<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display address of elements and pointers\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [0,1,2,3,4]\n",
+ "p = [0 for i in range(0,5)]\n",
+ "\n",
+ "for i in range(0,5):\n",
+ " p[i] = id(a[i])\n",
+ " \n",
+ "#Result\n",
+ "for i in range(0,5):\n",
+ " sys.stdout.write(\"\\n%d at location\"%(a[i]))\n",
+ " sys.stdout.write(\"\\t%u at location\"%(id(a[i])))\n",
+ " sys.stdout.write(\" %u\"%(id(p[i])))\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "0 at location\t30726388 at location 52456564\n",
+ "1 at location\t30726376 at location 52456360\n",
+ "2 at location\t30726364 at location 52456456\n",
+ "3 at location\t30726352 at location 52456420\n",
+ "4 at location\t30726340 at location 52456468"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.27, Page number: 304<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print value of a variable through pointer and pointer to pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 2\n",
+ "p = id(a)\n",
+ "q = id(p)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n Value of a = %d Address of a = %u\"%(a,id(a)))\n",
+ "sys.stdout.write(\"\\nThrough *p Value of a = %d Address of a = %u\"%(a,p))\n",
+ "sys.stdout.write(\"\\nThrough **q Vallue of a = %d Address of a = %d\"%(a,p))\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Value of a = 2 Address of a = 30726364\n",
+ "Through *p Value of a = 2 Address of a = 30726364\n",
+ "Through **q Vallue of a = 2 Address of a = 30726364"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.28, Page number: 305<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Different levels of array of pointer to pointer and display the elements\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = [1,2,3]\n",
+ "b = [0 for i in range(0,3)]\n",
+ "c = [0 for i in range(0,3)]\n",
+ "d = [0 for i in range(0,3)]\n",
+ "e = [0 for i in range(0,3)]\n",
+ "f = [0 for i in range(0,3)]\n",
+ "\n",
+ "for k in range(0,3):\n",
+ " b[k] = id(a[k])\n",
+ " c[k] = id(b[k])\n",
+ " d[k] = id(c[k])\n",
+ " e[k] = id(d[k])\n",
+ " f[k] = id(e[k])\n",
+ " \n",
+ "#Result\n",
+ "for k in range(0,3):\n",
+ " sys.stdout.write(\"%3d\"%(a[k]))\n",
+ " sys.stdout.write(\"%3d\"%(a[k]))\n",
+ " sys.stdout.write(\"%3d\"%(a[k]))\n",
+ " sys.stdout.write(\"%3d\"%(a[k]))\n",
+ " sys.stdout.write(\"%3d\\n\"%(a[k]))\n",
+ " \n",
+ "#There is no pointer concept in python\n",
+ "#Memory address differs in different systems\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1 1 1 1 1\n",
+ " 2 2 2 2 2\n",
+ " 3 3 3 3 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.29, Page number: 306<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display string using character pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "name = ['K','U','M','A','R']\n",
+ "ch = id(name)\n",
+ "i = 0\n",
+ "\n",
+ "#Result\n",
+ "while i < len(name): #There is no null terminating character in python string\n",
+ " sys.stdout.write(\"%c\"%(name[i]))\n",
+ " i += 1\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KUMAR"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.30, Page number: 307<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Length of a given string including and excluding spaces using pointers\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "p = 0\n",
+ "q = 0\n",
+ "s = 0\n",
+ "str1 = ['P','O','I','N','T','E','R','S',' ','A','R','E',' ','E','A','S','Y']\n",
+ "\n",
+ "#Result\n",
+ "while s < len(str1): #There is no null termination character for python string\n",
+ " sys.stdout.write(\"%c\"%(str1[s]))\n",
+ " p += 1\n",
+ " if ord(str1[s]) == 32:\n",
+ " q += 1\n",
+ " s += 1\n",
+ "\n",
+ "sys.stdout.write(\"\\nLength of String including spaces : %d\"%(p))\n",
+ "sys.stdout.write(\"\\nLength of String excluding spaces : %d\"%(p-q))\n",
+ "\n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "POINTERS ARE EASY\n",
+ "Length of String including spaces : 17\n",
+ "Length of String excluding spaces : 15"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.31, Page number: 308<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Interchange elements of character array using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "names = [\"kapil\",\"manoj\",\"amit\",\"amol\",\"pavan\",\"mahesh\"]\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Original : %s %s\"%(names[3],names[4]))\n",
+ "\n",
+ "tmp = names[3]\n",
+ "names[3] = names[4]\n",
+ "names[4] = tmp\n",
+ "\n",
+ "sys.stdout.write(\"\\nNew : %s %s\"%(names[3],names[4]))\n",
+ "\n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Original : amol pavan\n",
+ "New : pavan amol"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.32, Page number: 308<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#String comparison.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = 0\n",
+ "str1 = raw_input(\"Enter First String : \")\n",
+ "str2 = raw_input(\"Enter Second String : \")\n",
+ "a = 0\n",
+ "l = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nSimilar Characters Found in Both String\")\n",
+ "\n",
+ "while a < len(str1):\n",
+ " if str1[a] == str2[a]:\n",
+ " sys.stdout.write(\"\\n\\t%c\\t%c\"%(str1[a],str2[a]))\n",
+ " l += 1\n",
+ " else:\n",
+ " c += 1\n",
+ " a += 1\n",
+ " \n",
+ "if c == 0:\n",
+ " sys.stdout.write(\"\\nThe Strings are Identical\")\n",
+ "else:\n",
+ " sys.stdout.write(\"\\nThe Strings are different at %d places.\"%(c))\n",
+ " sys.stdout.write(\"\\nThe String Characters are similar at %d places.\"%(l))\n",
+ " \n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter First String : SUNDAY\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Second String : MONDAY\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Similar Characters Found in Both String\n",
+ "\tN\tN\n",
+ "\tD\tD\n",
+ "\tA\tA\n",
+ "\tY\tY\n",
+ "The Strings are different at 2 places.\n",
+ "The String Characters are similar at 4 places."
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.33, Page number: 310<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare three characters using pointers.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "x = raw_input(\"Enter Three Characters\")\n",
+ "y = raw_input(\"Enter Three Characters\")\n",
+ "z = raw_input(\"Enter Three Characters\")\n",
+ "\n",
+ "stat = 0\n",
+ "\n",
+ "stat = y > x\n",
+ "if x == y:\n",
+ " sys.stdout.write(\"\\n1st and 2nd Character are same\\n\")\n",
+ "else:\n",
+ " if stat < 0:\n",
+ " sys.stdout.write(\"\\n2nd Character appears after the 1st Character in Alphabetic\\n\")\n",
+ " else:\n",
+ " sys.stdout.write(\"2nd Character appears before the first Character in Alphabetic\\n\")\n",
+ " \n",
+ "stat = y > z\n",
+ "\n",
+ "if y == z:\n",
+ " sys.stdout.write(\"\\n2nd and 3rd Character are same.\")\n",
+ "else:\n",
+ " if stat > 0:\n",
+ " sys.stdout.write(\"\\n2nd Character appears after the 3rd Character in Alphabetic\")\n",
+ " else:\n",
+ " sys.stdout.write(\"\\n2nd Character appears before the 3rd Character in Alphabetic\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three CharactersC\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three CharactersC\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Three CharactersA\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "1st and 2nd Character are same\n",
+ "\n",
+ "2nd Character appears after the 3rd Character in Alphabetic"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.34, Page number: 311<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Compare two strings irrespective of case. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "buf1 = \"computer\"\n",
+ "buf2 = \"computer\"\n",
+ "\n",
+ "#Comparison\n",
+ "stat = buf1 == buf2\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The Characters upto 4th position are \")\n",
+ "if stat == 0:\n",
+ " sys.stdout.write(\"not \")\n",
+ "sys.stdout.write(\"same\")\n",
+ "\n",
+ "#There is no pointer concept in python and memicmp() function"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Characters upto 4th position are same"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.35, Page number: 311<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Print the string upto the first occurrence of a character\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "\n",
+ "src = raw_input(\"Enter a String : \")\n",
+ "f = raw_input(\"Enter a Character to find in the text : \")\n",
+ "dest = ['0' for i in range(0,len(src))]\n",
+ "ptr = 0\n",
+ "\n",
+ "while ptr < len(src):\n",
+ " if src[ptr] == f:\n",
+ " dest[ptr] = src[ptr]\n",
+ " break\n",
+ " else:\n",
+ " dest[ptr] = src[ptr]\n",
+ " ptr += 1\n",
+ "\n",
+ "if ptr == len(src):\n",
+ " sys.stdout.write(\"The character wasn't found\\n\")\n",
+ "else:\n",
+ " sys.stdout.write(\"String upto that Character : %s\"%(dest[0:ptr+1]))\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a String : FUNCTIONS\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Character to find in the text : T\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "String upto that Character : ['F', 'U', 'N', 'C', 'T']"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.36, Page number: 312<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Replace the contents of second string with the first string. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "src = raw_input(\"Enter a Source String : \")\n",
+ "dest = raw_input(\"Enter a Destination String :\")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\n\\nDestination before memcpy : %s\\n\"%(dest))\n",
+ "dest = src[:len(src)] + dest[len(src):]\n",
+ "\n",
+ "sys.stdout.write(\"Destination after memcpy : %s\\n\"%(dest))\n",
+ "\n",
+ "#There is no pointer concept in python and memcpy function"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Source String : Tomorrow\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a Destination String :Today is Sunday\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "Destination before memcpy : Today is Sunday\n",
+ "Destination after memcpy : Tomorrowis Sunday\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.37, Page number: 313<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the string through their pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "c = \"Central Processing Unit\"\n",
+ "m = \"Math Co- Processor\"\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"'c' is pointing the string '%s'\\n\"%(c))\n",
+ "sys.stdout.write(\"'m' is pointing the string '%s'\\n\"%(m))\n",
+ "\n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "'c' is pointing the string 'Central Processing Unit'\n",
+ "'m' is pointing the string 'Math Co- Processor'\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.38, Page number: 314<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Use void pointer to display the value of different variables.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization & Result\n",
+ "pt = 12\n",
+ "sys.stdout.write(\"\\nP = %d\"%(pt))\n",
+ "pt = 5.4\n",
+ "sys.stdout.write(\"\\nR = %.1f\"%(pt))\n",
+ "pt = 'S'\n",
+ "sys.stdout.write(\"\\nC = %c\"%(pt))\n",
+ "\n",
+ "#There is no pointer concept in python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "P = 12\n",
+ "R = 5.4\n",
+ "C = S"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter_15.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter_15.ipynb
new file mode 100755
index 00000000..0c5ac02f
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter_15.ipynb
@@ -0,0 +1,754 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 15: Additional in 'C'<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.1, Page number: 505<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Allocate memory to pointer variable. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "j = 0\n",
+ "k = int(raw_input(\"How many number : \"))\n",
+ "p = [0 for i in range(0,k)]\n",
+ "\n",
+ "#in python, all variables are allocated using dynamic memory allocation technique and no\n",
+ "#malloc function and pointer concept is available in python.\n",
+ "\n",
+ "#Read the numbers\n",
+ "while j != k:\n",
+ " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n",
+ " j += 1\n",
+ " \n",
+ "j = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The numbers are : \")\n",
+ "while j != k:\n",
+ " sys.stdout.write(\"%d\\t\"%(p[j]))\n",
+ " j += 1\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many number : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 1 = 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 2 = 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 3 = 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 4 = 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The numbers are : 1\t2\t3\t4\t"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.2, Page number: 506<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Memory allocation to pointer variable. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "j = 0\n",
+ "k = int(raw_input(\"How many Number : \"))\n",
+ "p = [0 for i in range(0,k)]\n",
+ "\n",
+ "#in python, all variables are allocated using dynamic memory allocation technique and no\n",
+ "#calloc function and pointer concept is available in python.\n",
+ "\n",
+ "#Read the numbers\n",
+ "while j != k:\n",
+ " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n",
+ " j += 1\n",
+ " \n",
+ "j = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The numbers are : \")\n",
+ "while j != k:\n",
+ " sys.stdout.write(\"%d\\t\"%(p[j]))\n",
+ " j += 1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many Number : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 1 = 45\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 2 = 58\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 3 = 98\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The numbers are : 45\t58\t98\t"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.3, Page number: 507<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Reallocate memory \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "str1 = \"India\"\n",
+ "\n",
+ "#in python, value tagged method is used for data storage instead of memory tagging.\n",
+ "#no realloc function is in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"str = %s\"%(str1))\n",
+ "str1 = \"Hindustan\"\n",
+ "sys.stdout.write(\"\\nNow str = %s\"%(str1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "str = India\n",
+ "Now str = Hindustan"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.4, Page number: 508<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display unused memory \n",
+ "\n",
+ "import psutil\n",
+ "\n",
+ "psutil.phymem_usage()\n",
+ "\n",
+ "#There is no coreleft() function in python. phymem_usage function in the module psutil gives the \n",
+ "#status and usage of physical memory in python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "usage(total=3165270016L, used=987840512L, free=2177429504L, percent=31.2)"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.5, Page number: 510<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Linked list\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialziation\n",
+ "ch = 'y'\n",
+ "p = 0\n",
+ "q = []\n",
+ "\n",
+ "#Function Definitions\n",
+ "def gen_rate(m):\n",
+ " q.append(m)\n",
+ " \n",
+ "def show():\n",
+ " print q\n",
+ " \n",
+ "def addatstart(m):\n",
+ " q.insert(0,m)\n",
+ " \n",
+ "def append(m,po):\n",
+ " q.insert(po,m)\n",
+ "\n",
+ "def erase(d):\n",
+ " q.remove(d)\n",
+ " \n",
+ "def count():\n",
+ " print len(q)\n",
+ " \n",
+ "def descending():\n",
+ " q.sort(reverse=True)\n",
+ " \n",
+ "#Get choice\n",
+ "while ch == 'y':\n",
+ " n = int(raw_input(\"1. Generate\\n2. Add at starting\\n3. Append\\n4. Delete\\n5. Show\\n6.Count\\n7.Descending\\nEnter your choice: \"));\n",
+ " #There is no switch statement in python\n",
+ " if n == 1:\n",
+ " i = int(raw_input(\"How many node you want : \"))\n",
+ " for j in range(0,i):\n",
+ " m = int(raw_input(\"Enter the element : \"))\n",
+ " gen_rate(m)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 2:\n",
+ " m = int(raw_input(\"Enter the element : \"))\n",
+ " addatstart(m)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 3:\n",
+ " m = int(raw_input(\"Enter the element and position \"))\n",
+ " po = int(raw_input(\"Enter the element and position\"))\n",
+ " append(m,po)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 4:\n",
+ " d = int(raw_input(\"Enter the number for deletion : \"))\n",
+ " erase(d)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 5:\n",
+ " show()\n",
+ " else:\n",
+ " if n == 6:\n",
+ " count()\n",
+ " else:\n",
+ " if n == 7:\n",
+ " descending()\n",
+ " show()\n",
+ " else:\n",
+ " sys.stdout.write(\"Enter value between 1 to 7\")\n",
+ " \n",
+ " ch = raw_input(\"Do u wnat to continue (y/n)\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. Generate\n",
+ "2. Add at starting\n",
+ "3. Append\n",
+ "4. Delete\n",
+ "5. Show\n",
+ "6.Count\n",
+ "7.Descending\n",
+ "Enter your choice: 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many node you want : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[1, 5, 4, 7]\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Do u wnat to continue (y/n)n\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.6, Page number: 518<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Draw circle, line and arc using graphics function\n",
+ "\n",
+ "%pylab inline\n",
+ "import pylab\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "#Tkinter package is used for graphics\n",
+ "#Give proportionate sizes to draw\n",
+ "#draw circle\n",
+ "circle2=plt.Circle((.5,.5),.2,color='b')\n",
+ "fig = plt.gcf()\n",
+ "fig.gca().add_artist(circle2)\n",
+ "\n",
+ "\n",
+ "#draw line\n",
+ "figure()\n",
+ "pylab.plot([210,110],[150,150])\n",
+ "\n",
+ "#Draw ellipse\n",
+ "figure()\n",
+ "from matplotlib.patches import Ellipse\n",
+ "e = Ellipse(xy=(35, -50), width=10, height=5, linewidth=2.0, color='g')\n",
+ "fig = plt.gcf()\n",
+ "fig.gca().add_artist(e)\n",
+ "e.set_clip_box(ax.bbox)\n",
+ "e.set_alpha(0.7)\n",
+ "pylab.xlim([20, 50])\n",
+ "pylab.ylim([-65, -35])"
+ ],
+ "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: ['pylab', 'e']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 61,
+ "text": [
+ "(-65, -35)"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGXlJREFUeJzt3X9w1HV+x/HXQjaQREB+2BzsZg5IIgmNBNogclS76Hlg\nnEtbYe5Cb+4UmZhj6ng6bc+rthp0RsE/buqZaxumqFUhhyPOxRlhvUJZ7QhcPFHwgKEBQTfxpAbB\nYICQbL7941MDMbDZJLv73f3s8zGzE5b95LtvPiSvfPL5fr6fr8dxHEcAAKuMcrsAAED8Ee4AYCHC\nHQAsRLgDgIUIdwCwEOEOABYaNNzvvvtu5efn67rrrrtim/vuu0/FxcUqLy/Xe++9F9cCAQBDN2i4\nr1y5UsFg8Iqvb926VUeOHFFLS4vWr1+v1atXx7VAAMDQDRruN954oyZOnHjF11977TXdeeedkqQF\nCxbo9OnTOnHiRPwqBAAM2Yjn3Nva2lRQUND33O/3q7W1daSHBQCMQFxOqH59BwOPxxOPwwIAhilr\npAfw+XwKh8N9z1tbW+Xz+Qa0Kyoq0tGjR0f6dgCQUQoLC3XkyJEhf96IR+5VVVV64YUXJEl79uzR\n1Vdfrfz8/AHtjh49KsdxeDiOHn30UddrSJUHfUFf0BfRH8MdFA86cl+xYoXefPNNtbe3q6CgQGvW\nrFF3d7ckqba2VpWVldq6dauKioqUl5en5557bliFAADiZ9Bwb2xsHPQg9fX1cSkGABAfXKHqgkAg\n4HYJKYO+uIi+uIi+GDmP4zhJuVmHx+NRkt4KAKwx3Oxk5A4AFiLcAcBChDsAWIhwBwALEe4AYCHC\nHQAsRLgDgIUIdwCwEOEOABYi3AHAQoQ7AFiIcAcACxHuAGAhwh0ALES4A4CFCHcAsBDhDgAWItwB\nwEKEOwBYiHAHAAsR7gBgIcIdACxEuAOAhQh3ALAQ4Q4AFiLcAcBChDsAW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+ZM59ixY05XV9egJ1R3795t\n7UnEWPrio48+cgoLC53du3e7VGVyxNIXl7rrrrucLVu2JLHC5IilHw4dOuTccsstTk9Pj9PZ2emU\nlZU5Bw4ccKnixImlLx544AGnrq7OcRzH+fTTTx2fz+ecPHnSjXKT4tixYzGdUI01N+M6cueip4ti\n6YvHHntMp06d6ptn9nq9am5udrPshIilLzJBLP1QUlKipUuXas6cORo1apRqamo0e/ZslyuPv1j6\n4qGHHtLKlStVXl6u3t5ePfXUU5o0aZLLlSfGihUr9Oabb6q9vV0FBQVas2aNuru7JQ0/N7mICQAs\nxG32AMBChDsAWIhwBwALEe4AYCHCHQAsRLgDgIUIdwCwEOEOABb6P0Anxcrjn3WCAAAAAElFTkSu\nQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x707a9f0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF0tJREFUeJzt3XtsU+f9x/GPM8JWljCCBiaKU2JugzR28AK0MKXzr8CA\nomzrZdVcAVUcpIr+tZoxtj+gttZCCIuqNtO2TKIwiXX8g4BpgghP4ACquCdKRqVBWaIkkKVLQ6YR\nKNfn90dVizQ3nDi0yfN+SZYOz3l8zvfblk9OnuNTO4wxRgCAUS3lyy4AADD8CHsAsABhDwAWIOwB\nwAKEPQBYgLAHAAv0G/bBYFBOp1Mejyc+Fg6H5XK55PP55PP5dOjQIUnSp59+qkAgIK/Xq9zcXJWW\nlg5v5QCAh9Zv2BcXF6uqqqrbmMPhUCgUUk1NjWpqarRixQpJ0p49eyRJdXV1OnfunCorK9XU1DRM\nZQMAEtFv2BcWFiojI6PHeG/PYWVmZqqrq0v37t1TV1eXxo4dq/HjxyevUgDAoA1qzb6iokL5+fkq\nKSlRZ2enJGnZsmUaP368MjMzlZOTow0bNmjChAlJLRYAMDg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zdOXKlVGTL731d/Xq1aTlyyP5\nH6G1tbXJ6XRKkpxOZ/zTPFevXpXL5YrPc7lcunLlyqMoadi89957evbZZyWNnv76eohuNPR36dIl\nHTt2TE899ZT8fr/Onj0raXT0JkmlpaVav369Hn/8cW3YsEFbt26VNPL7a2xsVE1NjZ588slRmS8P\n9vegoeTLI/+/XjocDjkcjn73j1RvvfWWxo4dq5dffrnPOSOtv88footEIvEx0889/ZHW3927d3Xt\n2jWdPHlS27dv10svvdTn3JHWmySVlJTo3XffVVNTk95++20Fg8E+546U/q5fv64XXnhB77zzjtLT\n07vtGw35cv36db344ot65513lJaWFh8far48krB3Op3697//LUlqbW3V5MmTJUlZWVlqbm6Oz2tp\naYn/mjnS7Nq1SwcPHtSf//zn+Nho6O/y5ctqbGxUfn6+3G63WlpaVFBQoLa2tlHRn8vl0vPPPy9J\nmj9/vlJSUtTe3j4qepM+u0H73HPPSZJefPHF+K/5I7W/O3fu6IUXXtDq1av14x//WNLoypfP+1u1\nalW8PylJ+TIcNxoefOLWmM9u0JaWlhpjjNm6dWuPGwy3bt0y//rXv8y0adPM/fv3h6OkpPpif4cO\nHTK5ubnmP//5T7d5o6W/B/V2g3Yk9ffF3v7whz+YzZs3G2OM+ec//2mys7ONMSOzN2N69ufz+Uws\nFjPGGPP3v//dzJs3zxgzMvu7f/++Wb16tfnZz37WbXy05Etf/SUrX5Ie9j/96U9NZmamSU1NNS6X\ny7z33nvmk08+MYsXLzYzZ840S5cuNdeuXYvPf+utt8z06dPNd77znfinBr7Kvtjfjh07zIwZM8zj\njz9u5s6da+bOnWvWrVsXnz9S+xs7dmz839+D3G53POyNGVn99dbb7du3zapVq0xeXp757ne/a44e\nPRqfP5J6M6b3v3tnzpwxCxYsMPn5+eapp54y58+fj88faf0dP37cOBwOk5+fH/+7dujQoVGTL731\nd/DgwaTlCw9VAYAF+FpCALAAYQ8AFiDsAcAChD0AWICwBwALEPYAYAHCHgAsQNgDgAX+Hze/zGOH\nVK27AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7349d10>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG+xJREFUeJzt3X1QU2e+B/DvyQtJgCDvCskqCLSIIqR2lbvjbGOVTmd2\naFnb8Y6dup1R94/6z3Zpbx1nR4t3inbtujtdp7rM1umt/af27lwLu1s7Mlsz1O5aFHGtUgUEWt5i\nhcBKgBCSPPcPylkp6EgSCTx+P8MZT56QnN/jo9/zkpNzFCGEABERSUsT6QKIiOj+YtATEUmOQU9E\nJDkGPRGR5Bj0RESSY9ATEUku6KDfvXs3CgoKUFhYiPXr16OjowMA0N7eDpPJBJvNBpvNhh07doSt\nWCIimjkl2PPoBwcHYTabAQCHDh3CP//5T7zzzjtob29HSUkJvvzyy7AWSkREwQl6i34i5AHA7XYj\nOTk5LAUREVF46UJ58a9+9Su8//77iI6OxtmzZ9X2trY22Gw2LFiwAK+//jrWrl0bcqFERBScux66\nKS4uhtPpnNK+b98+lJSUqI/feOMNXLt2De+++y68Xi+GhoaQkJCACxcuoLS0FFeuXJm0B0BERLNI\nhMHXX38tli9fPu1zdrtd1NfXT2nPysoSADhx4sSJ0wymrKysGWd00Mfom5ub1fmqqirYbDYAQG9v\nL/x+PwCgtbUVzc3NWLp06ZTXX79+HUIIaafXXnst4jWwf+zfg9g/mfsmhMD169dnnNdBH6PftWsX\nrl27Bq1Wi6ysLBw5cgQAUFtbiz179kCv10Oj0aCyshLx8fHBLoaIiEIUdND/6U9/mrZ948aN2Lhx\nY9AFERFRePGbsfeJ3W6PdAn3Ffs3v8ncP5n7FqygvzAV8oIVBRFaNBHRvBVMdnKLnohIcgx6IiLJ\nMeiJiCTHoCcikhyDnohIcgx6IiLJMeiJiCTHoCcikhyDnohIcgx6IiLJMeiJiCTHoCcikh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+vUiJydHFBcXi/7+/tkoJ+ym69/H\nH38stmzZIvLz88XKlSvF008/LZxOZ6RLnbFLly4Jm80mCgoKRH5+vjhw4IAQQkgzdnfqnwxj930O\nh0OUlJQIIeQZv9udPn1a7d/zzz8vxfi1traKgoICUVBQIJYvXy727dsnhJj5+PELU0REkuOtBImI\nJMegJyKSHIOeiEhyDHoiIskx6ImIJMegJyKSHIOeiEhyDHoiIsn9P/ox1+CwlWHmAAAAAElFTkSu\nQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x78994d0>"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.7, Page number: 519<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Draw boxes and fill with different designs.\n",
+ "\n",
+ "%pylab\n",
+ "#Tkinter package is used for graphics\n",
+ "from matplotlib.patches import Rectangle\n",
+ "from matplotlib.collections import PatchCollection\n",
+ "\n",
+ "e = Rectangle(xy=(35, -50), width=10, height=5, linewidth=2.0, color='b')\n",
+ "fig = plt.gcf()\n",
+ "fig.gca().add_artist(e)\n",
+ "e.set_clip_box(ax.bbox)\n",
+ "e.set_alpha(0.7)\n",
+ "pylab.xlim([20, 50])\n",
+ "pylab.ylim([-65, -35])\n",
+ "\n",
+ "#There are no different automatic fill styles. user should create the styles."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAErZJREFUeJzt3X9MVff9x/HXuXKbaEoEV3UtN6kILooinNYpf5jsOLlL\nk4WW0YXEpq6J9p/6V0uXOrOIkBRxbizpyDRka5raf+qyxMKW2kBWb2i3uFsQ6w+SggW6C3LNmDZR\nt4Xpzv5ovN8y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Kk1atX69q1aws9nKy7N7+KigpJX/w+oLKyMu3du/e+\nfXv873//W+Xl5Vq9enXqEpWltZtpfpKNtZOkl156ST/96U8VCv3fX3dL6zfT/BzHMbN+juOosrJS\nW7Zs0a9+9StJ6a/fgob+1q1bevrpp/Xaa69N+wKV4zhyHGchh5N1t27d0ve//3299tprevDBB/XC\nCy9oeHhY58+f18MPP6yXX355sYcYSCgU0vnz5zU6Oqru7m6dOXNmyuP3+9r99/xisZiZtfv973+v\nVatWyXXdWc9w7+f1m21+VtZPkv74xz+qr69Pp0+f1i9/+Ut98MEHUx7/Kuu3YKH/17/+paefflq7\nd+9WdXW1pC/+S3Tvm7fj4+NatWrVQg0n6+7N79lnn03Nb9WqValFeP755xWPxxd5lJlZvny5vvvd\n76q3t9fU2t1zb349PT1m1u5Pf/qTOjo6VFhYqF27dun999/X7t27zazfTPP7wQ9+YGb9JOnhhx+W\n9MXvE/ve976neDye9votSOh939fevXtVUlKiF198MbX/ySef1JtvvilJevPNN1OBvN/MNr/x8fHU\n7VOnTqm0tHQxhpeRiYmJ1Nvef/zjH+rq6pLrumbWbrb5fflXf9yvaydJhw8fViKR0PDwsN5++219\n+9vf1ltvvWVm/Waa34kTJ0z83ZO++KDAzZs3JUm3b99WZ2enSktL01+/tL9LG8AHH3zgO47jl5WV\n+eXl5X55ebl/+vRp/29/+5u/c+dOf926dX40GvVv3LixEMPJupnm9+677/q7d+/2S0tL/c2bN/tP\nPfWUn0wmF3uoabtw4YLvuq5fVlbml5aW+kePHvV93zezdrPNz8La/bdYLOZXVVX5vm9n/b7szJkz\nqfk9++yzJtZvaGjILysr88vKyvyNGzf6hw8f9n0//fXjC1MAYBz/K0EAMI7QA4BxhB4AjCP0AGAc\noQcA4wg9ABhH6AHAOEIPAMb9B4rEH5DkLOd4AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7373590>"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.8, Page number: 520<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display text in different size, font, vertically and horizontally \n",
+ "\n",
+ "%pylab\n",
+ "\n",
+ "from pylab import *\n",
+ "\n",
+ "#Tkinter package is used for graphics\n",
+ "# set limits so that it no longer looks on screen to be 45 degrees\n",
+ "xlim([-5,5])\n",
+ "\n",
+ "# Locations to plot text\n",
+ "l1 = array((1,1))\n",
+ "l2 = array((5,5))\n",
+ "\n",
+ "# Rotate angle\n",
+ "angle = 90\n",
+ "trans_angle = gca().transData.transform_angles(array((45,)),\n",
+ " l2.reshape((1,2)))[0]\n",
+ "\n",
+ "# Plot text\n",
+ "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 25)\\n\\n',fontsize=25,\n",
+ " rotation=0)\n",
+ "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 16)',fontsize=16,\n",
+ " rotation=0)\n",
+ "th1 = text(l1[0],l1[1],'Hello(Vertical Text)',fontsize=16,\n",
+ " rotation=angle)\n",
+ "show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using matplotlib backend: module://IPython.kernel.zmq.pylab.backend_inline\n",
+ "Populating the interactive namespace from numpy and matplotlib\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['power', 'draw_if_interactive', 'random', 'fft', 'angle', 'linalg', 'info']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAA5AAAATCCAYAAADLrQlWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XeUFFXC/vGnezIwMMOQBASGLIIoAg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nSyWpRIkSrueB7b+Stmf16tWu57GxsXr//fdVvXp1xcTEXKZW5dzF6lOb/XulC3XVULhAvHnz\nZrVo0UKbNm2yel8P914TaX90795dgwcP1smTJyVJo0aNIkACAH5fdu7cqS+//NJ5XqtWLZUrV+4y\ntujiS0tLU1pa2uVuxmVxpYYsn+XLlys7O9s1zRij+vXra9++fc60kiVLavny5UHLh7t87XK6kvs8\nISFBpUqVilgmVPuvlG3KyspyPS9RooQ6dOhwmVpz/i5Wf9rs36tF/vz5ddddd+n2229XhQoVdOTI\nEc2cOVOvvPKKzpw545T77rvvNHnyZN1///0R63vxxRfDntmUpCJFioScnpycrDZt2ujDDz+UdO7y\n2kWLFkX8re/v+5e4AADHzp07NWTIENWqVUtpaWmKi4tT4cKFVb9+fT333HM6fPjwJWnH4cOHNXr0\naDVv3lzFihVTQkKCkpOTVbFiRfXo0UPz58+PuPzf//531/OuXbtezOaGtWTJEvXp00fXXXedChQo\noPj4eBUtWlSNGzfWc889p4MHD4ZdNtSgRL/88oueeuopValSRXny5HENHhFtkI/A+dEeS5YsCWqT\nMUZz5szRXXfdpfLlyys5OVkJCQkqXry4WrZsqbFjx+rYsWMhtyczMzPkOo4ePaqnn35aVapUUVJS\nklJSUtS8eXN9/vnnYfsk8PeEw4YNCztAU3Z2tqZPn65BgwapWbNmqlSpkgoXLqy4uDglJyerXLly\n6tixo6ZOner6wpabSpQooVKlSrkepUuXDjqbFBsbG1SuVKlSKl68uKTg4ykhIUElSpRQmzZtNGnS\nJP32229B6/773//u6pfY2NigM1ynT59W9erVXeWaNm0qY4zKlCkjr9cb9LvrKVOmnPdAJoH7q1mz\nZkFlSpUq5czPkydP0L7p3r27q45+/fo58yINsuIbzKtp06au+owxSk9Pdy0T7QyMdO6fAx07dlTR\nokWVkJCg8uXLa/DgwTp69KhVX/jzvUb9rySQzv1eM1q7vvnmGz344IOqXr26UlNTnffuOnXq6Mkn\nn4y4b3z72PcYNmyYzp49qzfffFP16tVTgQIFlDdvXtWoUU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/TpEmTVLduXSUnJys+Pl7lypXTwIEDtWbNGtclrOH6KNz0SP37xBNPqEGDBs59PfPm\nzev0xZ/+9Kew22/+/xnaaK+TIkWKaM2aNXrsscdUuXJlJSYmKjk5WZUqVdIf//hHzZgxI0f9Fmld\nPu+++65eeOEFXXfddUpISFCBAgV022236YsvvtDdd9/tKutbf4ECBdS1a9eobQF+7zzG8GthAMDF\nd+utt2rlypXq1q2bpk+ffrmbAwA6c+aMypcvrz179ujJJ5+M+ptPAARIAMAlsmrVKtWrV0+xsbHa\nunWr9W8DAeBimThxou69914VLVpUO3fudEaxBRAeARIAAAAAYIXfQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAK\nARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIk\nAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAA\nAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAA\nACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABW\nCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAg\nAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIA\nAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAA\nAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACw\nQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUA\nCQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIA\nAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAA\nAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACA\nFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsE\nSAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAK\nARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIk\nAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAA\nAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAA\nACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABW\nCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAg\nAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIA\nAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAA\nAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACw\nQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUA\nCQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIA\nAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAA\nAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACA\nFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsE\nSAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAA8P/Yu/cgver6juOfZ3O/SLgnyiUkUiiNXGJoKwq4toNVLgrDRa3EWJCa\ncBEGREp1KNG0A5V2qI46VQyYUrENxtRQEcaWQImkViUhVq3BxAQZIGQwlEsW4ubpHzQLayD5xjH7\nHNjX658s5znJftmZ/c2+93fOeaBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIB\nCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACg\nREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEA\nACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhI\nACrWxdwAACAASURBVAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACU\nCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAA\nACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJ\nAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBE\nQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAA\nKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgA\nAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUC\nEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABA\niYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIA\nAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQ\nAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABK\nBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAA\ngBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAE\nAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAi\nIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAA\nlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQA\nAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIB\nCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACg\nREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEA\nACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhI\nAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAl\nAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAA\nQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREAC\nAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgR\nkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAA\nSgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIA\nAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImA\nBAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQ\nIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAA\nAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQk\nAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIAS\nAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAA\noERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiAB\nAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQI\nSAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAA\nJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkA\nAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERA\nAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAo\nEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAA\nAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQIS\nAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJ\ngAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAA\nUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAA\nAACUC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f7KRAkqTdbmfNmjVZs2ZNp0cBAGCQ2e77QP7d\n3/1d1qxZk0996lMvec5NN92UZ599NpdffnlOPfXU/Od//mduvPHGrFq1yi4J7IDHH388jz/+eF54\nZfnatWvTbrf7foGzbNmyJMmQIUM6MiMAAIPXdgMySbZ3m+Tq1auTJPvss0+SZN999+07LiCh7tpr\nr83s2bP7YrHdbm91GeuW78fXvOY1Az4fAACDWykgd9S2gvOII47I8uXLd8anhVeMF34PvdT305aH\n7DA4HH744X27zwAAnfJrB2RPT0+GDBmSYcOG9e0yPvDAA3nDG96QBx98MEledPdx+fLl293RHAhX\nXnllrrzyyk6P0Qi+Fs/r9Ndi4cKFWbhwYZJk3rx5SZIZM2b0fc+0Wq3sueeeecMb3pBTTz11p87S\n6a9FkzTha+GXBQBAE2w3IP/1X/81P/jBD5I8dy/WF7/4xRx77LE5+OCDM2XKlKxYsSLvfve782d/\n9me5+uqr8/DDD+drX/tajjnmmO2+ETrQ38knn5yTTz45yfMBef3113dyJAAA6LPdp7Bec801ufzy\ny9NqtXLfffflT//0T/Ptb387yfO/EZ8wYUJuuummbNiwIZdeemmmTZuWG264YacODq90GzZsyObN\nm1/y9VWrVg3gNAAAUAjIO+64I5s3b05vb2/fnzNmzMjmzZtz33339Z13yimn5P77709PT08WL17c\n+N3H7u7uTo/QGL4Wz2vS1+KII47I0qVLX/S1L33pS5k6depO/fxN+lp0mq8FAMBzWu0BviGx1Wo1\n4h5IaLqurq4MHTo0f/EXf5GPfvSjSZ57m4+ZM2fmn/7pn9JqtdLb29vhKRko1k4AoAkEJDTU+PHj\n8+ijjyZJjj322HzoQx/KxRdfnLVr1yZJDj30UE80HkSsnQBAEwhIaKhHH300s2bNyoIFC/od7+rq\nyiWXXJJPfOITGT58eIemY6BZOwGAJhCQ0HDveMc7csstt/T990c/+tF84hOf6OBEdIK1EwBogu0+\nRAfojLVr1+a4447rF49J8ld/9Vf54Ac/mKeffrpDkwEAMFjZgYSGGjduXJ544okkyYknnpiLL744\n559/fn74wx8mSSZPnpz777+/kyMygKydAEAT2IGEhnriiScycuTIfPrTn87Xv/71dHd357vf/W5m\nzZqVJFm9enWHJwQAYLCxAwkNdeihh+YrX/lKpkyZstVrixYtytlnn51169Z1YDI6wdoJADSBgISG\neuaZZzJixIiXfP2hhx7Kq1/96gGciE6ydgIATTC00wMAL25LPN577725/fbb89hjj+Xqq6/OmjVr\n0mq1xCMAAAPODiQ02AUXXJDPfOYzSZ773unt7c3RRx+de+65J3Pnzs2MGTM6PCEDxdoJADSBh+hA\nQ11//fV98fhCs2bNSrvdzqJFizowFQAAg5mAhIb63Oc+lyQ544wz+h1/85vfnCRZvnz5gM8EAMDg\n5hJWaKgxY8akp6cn69aty1577dV3CeumTZsyYsSIjB49Ok8++WSnx2SAWDsBgCawAwkNtSUWRo4c\n2e/4mjVrkjwXFAAAMJAEJDTUa1/72rTb7cybN6/v2EMPPZQLLrggSXLggQd2ajQAAAYpAQkN9a53\nvStJct555yV5bkdy3333zW233ZYkOf300zs2GwAAg5N7IKFBZs+enVarlSuuuCI9PT3p7u7Od77z\nna3OO/LII3PXXXdtdXkrr1zWTgCgCQQkNEhXV1ffw3KS5Omnn86nPvWpLFq0KOvWrcv48eNz4okn\n5sILL8yoUaM6PC0DydoJADSBgIQG+dWAhC2snQBAE7gHEgAAgJKhnR4A6K/dbuess84qnTt37tyd\nPA0AADzPJazQIF1d9YsCXOo6uFg7AYAmcAkrvEyJCQAABppLWKFhWq1W5s6du91AbLVaAzQRAAA8\nxyWs0CCewspLsXYCAE3gElYAAABKBCQ0jF0mAACayj2Q0CD//u//7t5GAAAayz2QAC8D1k4AoAlc\nwgoAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJRs9208lixZklmzZuUnP/lJpkyZkuuuuy5Tp07t\nd0673c7FF1+cr3zlK9mwYUMOOOCAzJ49O2ecccZOGxxeif7kT/5kh97GY+7cuTtxGgAA6G+bb+PR\n09OTAw44IGPGjMmll16aOXPmZMSIEVm5cmW6up7fvLz11ltzwgknZNq0aXn/+9+fyy+/PL/85S/z\nxBNPZMiQIf0/oUfRw0t64ffV9rRarfT29u7EaWgSaycA0ATb/Gn11ltvzbp163Luuedm5syZOfvs\ns7N69eosXry433m77rprkuS1r31t/vAP/zC77LJLdtlllx36YRjYMWICAICBts1LWFevXp0k2Wef\nffr9ueX4FkcddVSuuOKKfPzjH88///M/Z+TIkbnlllt26FI8IFm1alWnRwAAgJe03XsgX+ildjy+\n853v5C//8i/zR3/0R5k5c2YuuuiizJgxI//zP/+T0aNHb3X+lVde2fdxd3d3uru7d2hoeKU64IAD\nOj0CDbF48eKtrvYAAOi0bQbk5MmTkyQPPPBAkuTBBx/sO97T05MhQ4Zk2LBhWbx4cXp7ezN9+vS8\n853vzKJFizJ37tz86Ec/yrRp07b6d18YkMC2/eIXv8j999+fjRs3bvXascce24GJGAi/+su12bNn\nd24YAID/t82AfPvb35699947n/vc5zJ27Nh88YtfzKRJk/LmN785Q4cOzZQpU7JixYoccsghSZLP\nfvazeeqpp3LLLbdkxIgRmTRp0oD8T8Ar0aZNm/LBD34w8+bNS7vd3uoKAA/RAQBgoG3zKTcjRozI\n/PnzM3bs2Fx00UWZMGFC5s+f3/dwnC33OJ500kn52Mc+lrVr1+bCCy/MnnvumRtvvDG77777zv8/\ngFeoa665JjfccEM2b978opePe4gOAAADbZtv47FTPqFH0UPJ4YcfnhUrVuSII47IsmXLkiSnnHJK\nvvGNb2TffffN0Ucfneuvv77DUzJQrJ0AQBN4nw1oqPvvvz+tVis333xzkucC4qtf/WpuvvnmrF69\nOu94xzs6PCEAAIONHUhoqOHDh6e3tzfPPPNMRo4cmXa7nSeeeCJdXV0ZPXp03z3IDA7WTgCgCXbo\nbTyAgbPbbrtl/fr12bhxY3bfffesX78+c+bMyZgxY5IkP/3pTzs8IQAAg42AhIaaPHly1q9fnwcf\nfDCvf/3rc/vtt+eqq67qe917RgIAMNDcAwkN9da3vjUHHXRQfvzjH+fDH/5w31OPk+cuZ7ziiis6\nOB0AAIOReyDhZWLJkiWZP39+hg0blpNPPjlvetObOj0SA8jaCQA0gYAEeBmwdgIATeASVmioefPm\n5ayzzsqNN97Y7/g//MM/5Kyzzsq8efM6NBkAAIOVHUhoqGnTpmXZsmW58847c/TRR/cdX7p0ad74\nxjfmsMMOy7Jlyzo4IQPJ2gkANIGAhIbaZZdd8tRTT+WJJ57I6NGj+44/9dRTedWrXpWxY8fmf//3\nfzs4IQPJ2gkANIFLWKGhnn322STJI4880u/4unXrkiS//OUvB3wmAAAGNwEJDbX//vun3W7n0ksv\nzcaNG5MkGzduzGWXXZYk2W+//To5HgAAg5CAhIY64YQTkiQLFizIhAkTcuihh2bChAm5+eabkyTH\nH398J8cDAGAQcg8kNNTDDz+cI444ou+S1RcaP358li1blvHjx3dgMjrB2gkANIEdSGioCRMm5O67\n787b3va2DBkyJEkydOjQvP3tb8/dd98tHgEAGHB2IOFlYOPGjXnsscey++67Z9SoUZ0ehw6wdgIA\nTSAgAV4GrJ0AQBMM7fQAwPMmTZqUVquVVatW9X38Ytrtdt95AAAwUOxAQoN0dXWl1Wqlt7c3XV3b\nvkV5y3kMDtZOAKAJ7EBCg+y///59u47777//Ns99qd1JAADYWexAArwMWDsBgCbwNh7QUF/60pcy\nb968F31t7dq1Wbt27QBPBADAYGcHEhrqhfdD7shrvDJZOwGAJrADCS8zohEAgE7xEB1okOXLl2f5\n8uV9O03tdnury1hXrFiRJBkxYsSAzwcAwOAmIKFBFi5cmNmzZ/c79v73v/9Fz508efIATAQAAM9z\nCSs0SPUet+HDh+eKK67YydMAAEB/HqIDDbJs2bIsW7YsSXLWWWclSa6//vq+75lWq5U999wzU6dO\nzWte85qOzcnAs3YCAE0gIKGhuru702q1cscdd3R6FBrA2gkANIFLWKGBNm7cmLVr12bNmjX58Y9/\n3OlxAAAgiR1IaKxx48blySefzMaNGzN8+PBOj0OHWTsBgCawAwkNddxxx6XdbvfdEwkAAJ1mBxIa\n6u67784pp5yScePGZc6cOZk6dWpGjRrV75z999+/Q9Mx0KydAEATCEhoqK6u/hcItFqtvo/b7XZa\nrVZ6e3sHeiw6xNoJADTB0E4PANT8ajyICQAABpqAhIZ63/vet83XX7gjCQAAA2G7l7AuWbIks2bN\nyk9+8pNMmTIl1113XaZOnbrVeQ888EDOP//8fOtb38qwYcNy4okn5sYbb9z6E7oMC2CHWTsBgCbY\n5lNYe3p6cuqpp+app57Ktddem0ceeSSnnXZaNm/e3O+8drudU045Jf/2b/+Wyy67LJ/85Cez9957\n79TBYTBZt25dfvSjH3V6DAAABrltBuStt96adevW5dxzz83MmTNz9tlnZ/Xq1Vm8eHG/8+644458\n//vfz8UXX5zLLrss55xzTv72b/92Z84Ng8Ldd9+dww8/PBMmTMjrXve6JMm73/3u/MEf/EGWLl3a\n4ekAABhsthmQq1evTpLss88+/f7ccnyLH/7wh0mSm2++OaNHj84uu+yST3/607/xYWEwWbFiRd76\n1rdmxYoV/Y7/zu/8ThYvXpyvfOUrHZoMAIDBaoceovNS998888wzSZLhw4dn4cKF+djHPpaLLroo\nb3vb2/Jbv/VbW51/5ZVX9n3c3d2d7u7uHRkDBoWPf/zj6enpyV577ZVHH3207/g73/nOXHnllbnz\nzjs7OB072+LFi7e62gMAoNO2GZCTJ09O8twDcpLkwQcf7Dve09OTIUOGZNiwYX3nnXDCCTnppJPy\n7W9/OytWrMjPfvaz7QYk8OLuvPPOtFqt3HbbbXn961/fd/zggw9Okvz85z/v1GgMgF/95drs2bM7\nNwwAwP/b5lNYn3nmmUycODGjR4/OpZdemjlz5mTkyJFZuXJlhg4dmilTpmTFihXZuHFjJk2alHHj\nxuUjH/lIrr766jzyyCP56U9/mj333LP/J/QkQSgZPnx4ent709PTkxEjRqTVaqW3tzcbNmzI7rvv\nnuHDh6enp6fTYzJArJ0AQBNs8x7IESNGZP78+Rk7dmwuuuiiTJgwIfPnz09X13N/bcv70I0aNSo3\n33xzRowYkfPPPz9jx47NggULtopHoG6vvfZKkvz3f/93v+Nf+tKXkiTjx48f8JkAABjctvs+kL/x\nT+i36FAyffr0/OM//mMOOOCA/OxnP0uSHHfccfnWt76Vdrud973vfbnhhhs6OiMDx9oJADSBgISG\n+tGPfpRp06a96GWqI0eOzPe+970ccsghHZiMTrB2AgBNsM1LWIHOOeSQQ3L77bf3PTRni4MOOijf\n/OY3xSMAAAPODiQ0SHd3d6ZPn57TTz89u+yyS9/xlStXZt26dRk/fnwOPPDADk5Ip1g7AYAmEJDQ\nIFseUDVy5MiceOKJOfPMM3P88cdn6NAdestWXoGsnQBAEwhIaJAtAflCe+yxR84444yceeaZOeqo\nozowFU1g7QQAmkBAQoN861vfyk033ZQFCxbk8ccf7/daq9XKpEmTcuaZZ+bMM890KesgY+0EAJpA\nQEIDPfvss7n11ltz0003ZdGiRdm4cWO/11utVn73d383S5cu7dCEDDRrJwDQBAISGu6pp57Kv/zL\nv+Smm27K7bffnk2bNiV57nupt7e3w9MxUKydAEATeDIHNNyYMWNy8sknp9VqZcOGDVmyZEmnRwIA\nYJASkNBQmzZtym233ZYvf/nL+frXv56NGzf224GyGwUAwEATkNAg7XY7d955Z7785S/nq1/9an7x\ni19sdc6kSZPy3ve+N9OnT+/AhAAADGYCEhpkv/32y0MPPbTV7uLuu++e008/PdOnT88b3/jGDk0H\nAMBg5yE60CAvfB/IESNG5IQTTsj06dNz/PHHZ9iwYR2cjE6zdgIATWAHEhrmmGOOyfTp03P66adn\n3LhxnR4HAAD6CEhokNWrV2fixImdHgMAAF5U1/ZPAQbKr/O+jqtWrdoJkwAAwNYEJDTIwQcfnDPP\nPDN33XXXds+988478973vje//du/PQCTAQCAh+hAo2x5iE6r1cqrX/3qvOlNb8phhx2WPffcM0ny\n6KOP5r777suSJUvy8MMP930vbd68uWMzMzCsnQBAEwhIaJClS5fmkksuyT333FM6/6ijjsrf/M3f\n5A1veMNOnoxOs3YCAE0gIKGBlixZks9//vO5/fbb88gjj/R7bfz48XnrW9+aD3zgAznmmGM67JKU\ndAAAD19JREFUNCEDzdoJADSBgISGe+CBB/Lwww8neS4e999//w5PRCdYOwGAJhCQAC8D1k4AoAm8\nDyQ03D333JNvfOMbefTRR7P33nvnhBNOyO///u93eiwAAAYhO5DQYDNnzsznP//5fsdarVY++MEP\n5rOf/WyHpqITrJ0AQBMISGioG264IWedddZLvn799ddnxowZAzgRnWTtBACaoKvTAwAvbsvO48SJ\nE3PttddmwYIFufbaazNx4sR+rwMAwECxAwkN9apXvSpPP/10li1blkMPPbTv+A9+8IMcdthhedWr\nXpXHH3+8gxMykKydAEAT2IGEhnr22WeTJPvtt1+/4/vuu2+/1wEAYKAISGio/fbbL+12O5dcckk2\nbNiQJNmwYUM+/OEPJ3k+JAEAYKAISGiok046KclzD8vZY489Mm7cuOyxxx6ZO3duv9cBAGCguAcS\nGmr9+vU58sgjs3bt2q1emzhxYr773e9mjz326MBkdIK1EwBoAjuQ0FB77rlnli5dmrPPPjsTJkzI\nkCFD8prXvCbnnHNOli5dKh4BABhwdiABXgasnQBAE9iBBAAAoGRopwcAntfV1ZVWq7Xd89rtdlqt\nVnp7ewdgKgAAeI6AhIapXqbockYAAAbadgNyyZIlmTVrVn7yk59kypQpue666zJ16tQXPffRRx/N\nIYccksceeyyf/OQnc8kll/zGB4ZXsmOPPbZ8r1tlpxIAAH6TthmQPT09OfXUUzNmzJhce+21mTNn\nTk477bSsXLkyXV1b3z554YUXpqenJ4kfbuHXsXjx4k6PAAAAL2mbD9G59dZbs27dupx77rmZOXNm\nzj777KxevfpFf8j9xje+kVtuuSWXXXbZzpoVAACADtrmDuTq1auTJPvss0+/P7cc3+LJJ5/Mueee\nm6uuuipjxozZGXPCoDB79uwd2r2/4oorduI0AADQ3w49ROel7su6+uqrM3r06Bx33HH52te+liRZ\nv359NmzYkF133XWr86+88sq+j7u7u9Pd3b0jY8Ar1uzZs8vntlotAfkKtnjxYpc0AwCNs82AnDx5\ncpLkgQceSJI8+OCDfcd7enoyZMiQDBs2LD//+c/z4x//OAcffHDf373qqqsyduzY/Pmf//lW/+4L\nAxL49XgK6yvbr/5ybUd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AQAAKBEQAIAAFAiIAEAACgRkAAAAJSUAnLJkiU57LDDMnLkyEybNi33\n3nvvVufcc889eeMb35jddtstu+22W0477bSsX7/+Nz4wAAAAnbHdgOzp6cmpp56ap556Ktdee20e\neeSRnHbaadm8eXO/81auXJm99947f/3Xf53jjz8+CxYsyEc+8pGdNjgAAAADa7sBeeutt2bdunU5\n99xzM3PmzJx99tlZvXp1Fi9e3O+897znPVm4cGHOOeec/P3f/32S5Ic//OFOGRoAAICBt92AXL16\ndZJkn3326ffnluNbDBs2rO/jb37zm0mSY4899jczJQAAAB03dEf/Qrvd3ubrS5YsyVlnnZUjjzwy\nV1555Yue88Lj3d3d6e7u3tExAF7RFi9evNWVHgAAnbbdgJw8eXKS5IEHHkiSPPjgg33He3p60tXV\nleHDhydJ7rrrrpxwwgk56KCDctttt2X06NEv+m++VFgC8Jxf/eXa7NmzOzcMAMD/a7W3s6X4zDPP\nZOLEiRk9enQuvfTSzJkzJyNHjszKlSszdOjQTJkyJStWrMj3v//9HHPMMUmSa665JrvttlvGjh2b\nE088sf8nbLW2u4sJQH/WTgCgCbZ7D+SIESMyf/78jB07NhdddFEmTJiQ+fPnp6vrub/aarWSJPfd\nd182btyYnp6enHfeefnjP/7jfOhDH9q50wMAADBgtrsD+Rv/hH6LDrDDrJ0AQBNsdwcSAAAAEgEJ\nAABAkYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBE\nQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAA\nKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgA\nAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFCy3YBcsmRJDjvssIwcOTLTpk3Lvffe+6Ln\nLVy4MAceeGBGjRqVt7zlLfm/9u4vpOn9j+P4a0tp2R8KigYKm94YJI2cF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2ZjqWEaOjowoEAsa37wAAANhI8raB\nvHbtmmZmZuT3+9e8v+WfqrCwUJKUTCY1PDysrVu3yu12G06VO5nV1uLi4hXP+bQKm5H5LkhLK9Nf\nv37V4cOHDSYyI3OAqbOzU1VVVabjAAAAbBh/dANZUlIiq9X606O3t1ddXV3y+Xz68OGDFhYWlE6n\n/+hrvX5Vi5s3b0qSFhYW1NjYqNHRUQWDQe3Zs8dwYnPy/YCCJL148ULHjx9XaWmprl69ajpOzvX1\n9enNmzc6efKkpqamJEmxWEyfPn0ynAwAAMCsAtMB1lM4HFYymfxpPJFIKB6Py+v1rhjft2+f5ufn\ncxUvp35VC7vdrmQyKY/Hozt37igYDMrj8RhIaE5ZWZkkKRqNStLyNW+Z8XwzNjam2tpaFRUV6f79\n+3l5ivfU1JQ+fvwol8u1PHbr1i3ZbDZdv37dYDIAAACz8nIbjx8/fuju3buyWCxKp9Nqb2/X9+/f\n1d/fr7q6OtPxcu7EiRO6ffu2jh07psbGRqXTaVVXV8vpdJqOlhNzc3NyOBwqKiqSz+eT3++XzWbT\ny5cv8+7GKdFoVFVVVfry5Yv8fr8cDock5d1BhfHxcY2Pj0uSnj17posXL+ro0aPy+/06ePCg4XQA\nAADm5GUD+VelpaX6/Pmzvn37ZjqKEaWlpXr79u3yqZsWi0V9fX06deqU4WS5Ew6H5fV6NTExoYqK\nCgWDQVVWVpqOlXOhUEi1tbXLB1ekpe/D4uKi4WTmjIyMqKamRp2dnbpy5YrpOAAAAEbRQAIAAAAA\n1uSPvokOAAAAAOD3oYEEAAAAAKwJDSQAAAAAYE1oIAEAAAAAa0IDCQAAAABYExpIAAAAAMCa0EAC\nAAAAANbkf1M+pbyPupgkAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x792e430>"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.9, Page number: 521<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display status of mouse button pressed \n",
+ "\n",
+ "from Tkinter import *\n",
+ "from tkFileDialog import askopenfilename\n",
+ "import Image, ImageTk\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " root = Tk()\n",
+ "\n",
+ " #setting up a tkinter canvas with scrollbars\n",
+ " frame = Frame(root, bd=2, relief=SUNKEN)\n",
+ " frame.grid_rowconfigure(0, weight=1)\n",
+ " frame.grid_columnconfigure(0, weight=1)\n",
+ " xscroll = Scrollbar(frame, orient=HORIZONTAL)\n",
+ " xscroll.grid(row=1, column=0, sticky=E+W)\n",
+ " yscroll = Scrollbar(frame)\n",
+ " yscroll.grid(row=0, column=1, sticky=N+S)\n",
+ " canvas = Canvas(frame, bd=0, xscrollcommand=xscroll.set, yscrollcommand=yscroll.set)\n",
+ " canvas.grid(row=0, column=0, sticky=N+S+E+W)\n",
+ " xscroll.config(command=canvas.xview)\n",
+ " yscroll.config(command=canvas.yview)\n",
+ " frame.pack(fill=BOTH,expand=1)\n",
+ "\n",
+ " \n",
+ "\n",
+ " #function to be called when mouse is clicked\n",
+ " def printcoords(event):\n",
+ " #outputting x and y coords to console\n",
+ " print \"Mouse Button pressed\"\n",
+ " print (event.x,event.y)\n",
+ " #mouseclick event\n",
+ " canvas.bind(\"<Button 1>\",printcoords)\n",
+ "\n",
+ " root.mainloop()\n",
+ " \n",
+ "import win32api, win32con\n",
+ "\n",
+ "print \"Current cursor position at \" \n",
+ "print win32api.GetCursorPos()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mouse Button pressed\n",
+ "(207, 115)\n",
+ "Current cursor position at "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(502, 188)\n"
+ ]
+ }
+ ],
+ "prompt_number": 108
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.10, Page number: 523<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Change mouse cursor.\n",
+ "\n",
+ "#Placing the cursor on top of the circle button will change the pointer to circle\n",
+ "# and plus button to plus symbol\n",
+ "\n",
+ "from Tkinter import *\n",
+ "import Tkinter\n",
+ "\n",
+ "top = Tkinter.Tk()\n",
+ "\n",
+ "B1 = Tkinter.Button(top, text =\"circle\", relief=RAISED,\\\n",
+ " cursor=\"circle\")\n",
+ "B2 = Tkinter.Button(top, text =\"plus\", relief=RAISED,\\\n",
+ " cursor=\"plus\")\n",
+ "B1.pack()\n",
+ "B2.pack()\n",
+ "top.mainloop()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 110
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/Chapter_16.ipynb b/Programming_with_ANSI_and_Turbo_C/Chapter_16.ipynb
new file mode 100755
index 00000000..cafb9828
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/Chapter_16.ipynb
@@ -0,0 +1,2160 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 16: Marching Towards C++<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.1, Page number: 537<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Read and display a string\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Initialize variable\n",
+ "name = raw_input(\"Enter Your Name : \")\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Your name is %s\"%(name))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name : Amit\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Your name is Amit"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.2, Page number: 540<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display the value of a variable using reference variable\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "qty = 10\n",
+ "qt = qty\n",
+ "#in python, value tagging method is used for storage. so there is no reference concept\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"qty\\tqt\\n\")\n",
+ "sys.stdout.write(\"%d\\t%d\\n\"%(qty,qt))\n",
+ "qt = qt + 1\n",
+ "qty = qty + 1\n",
+ "sys.stdout.write(\"%d\\t%d\\n\"%(qty,qt))\n",
+ "qty = qty - 1\n",
+ "qt = qt - 1\n",
+ "sys.stdout.write(\"%d\\t%d\\n\"%(qty,qt))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "qty\tqt\n",
+ "10\t10\n",
+ "11\t11\n",
+ "10\t10\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.3, Page number: 541<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to use scope access operator.\n",
+ "#Display the variaous values of the same variable declared at different scope levels.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 10\n",
+ "\n",
+ "def main():\n",
+ " a = 20\n",
+ " sys.stdout.write(\"::a = %d\"%(a))\n",
+ " return\n",
+ "\n",
+ "#There is no scope operator. Intendation is used to define scope/block of statements\n",
+ "main()\n",
+ "sys.stdout.write(\" a = %d\"%(a))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "::a = 20 a = 10"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.4, Page number: 542<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Program to read tow integers through the keyboard.\n",
+ "#Declare the variables in C++ style.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Read Variables\n",
+ "num = int(raw_input(\"Enter Two numbers : \"))\n",
+ "num1 = int(raw_input(\"Enter Two numbers : \"))\n",
+ "#No variable declaration is needed in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Entered Numbers are : %d %d\"%(num,num1))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Two numbers : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Two numbers : 9\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entered Numbers are : 8 9"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.5, Page number: 543<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Length of a string\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#There is no variable declaration is needed in python\n",
+ "#Read string\n",
+ "name = raw_input(\"Enter Your Name : \")\n",
+ "\n",
+ "#Calculation\n",
+ "len1 = len(name)\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The length of the string is : %d\"%(len1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Your Name : Santosh\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the string is : 7"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.6, Page number: 544<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Sum of numbers using function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def sum1(x,y):\n",
+ " return x+y\n",
+ "#Forward function definition is not possible in python.\n",
+ "#Otherwise wrap the function within the main() function\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 20\n",
+ "b = 2.5\n",
+ "\n",
+ "#Function call\n",
+ "sys.stdout.write(\"Sum = %f\"%(sum1(a,b)))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sum = 22.500000"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.7, Page number: 545<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Function with default arguments.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition\n",
+ "def sum1(j,k=10,l=15,m=20):\n",
+ " return j+k+l+m\n",
+ "\n",
+ "#Variable Initialization\n",
+ "a = 2\n",
+ "b = 3\n",
+ "c = 4\n",
+ "d = 5\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Sum = %d\"%(sum1(a,b,c,d)))\n",
+ "sys.stdout.write(\"\\nSum = %d\"%(sum1(a,b,c)))\n",
+ "sys.stdout.write(\"\\nSum = %d\"%(sum1(a,b)))\n",
+ "sys.stdout.write(\"\\nSum = %d\"%(sum1(a)))\n",
+ "sys.stdout.write(\"\\nSum = %d\"%(sum1(b,c,d)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sum = 14\n",
+ "Sum = 29\n",
+ "Sum = 40\n",
+ "Sum = 47\n",
+ "Sum = 32"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.8, Page number: 547<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Square of integer and float number using function overloading\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Function definition/ There is no seperate function definition is needed.\n",
+ "def sqr(s):\n",
+ " return s*s\n",
+ "\n",
+ "#Variable iNitialization\n",
+ "a = 15\n",
+ "b = 2.5\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Square = %d\"%(sqr(a)))\n",
+ "sys.stdout.write(\"\\nSquare = %f\"%(sqr(b)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Square = 225\n",
+ "Square = 6.250000"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.9, Page number: 549<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display private and public member variables of the class.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class num:\n",
+ " def readdata(self,j,k):\n",
+ " self.x = j\n",
+ " self.y = k\n",
+ " \n",
+ " def display(self):\n",
+ " sys.stdout.write(\"x = %d y = %f\"%(self.x,self.y))\n",
+ "\n",
+ "#Object declaration\n",
+ "j = num()\n",
+ "\n",
+ "#Result\n",
+ "j.z = 'C'\n",
+ "j.readdata(10,10.5)\n",
+ "j.display()\n",
+ "sys.stdout.write(\" z = %c\"%(j.z))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x = 10 y = 10.500000 z = C"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.10, Page number: 550<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Private and public data member of a class.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class player:\n",
+ " def __init__(self,name=None,height=0,weight=0):\n",
+ " self.name = name\n",
+ " self.height = height\n",
+ " self.weight = weight\n",
+ " \n",
+ "#Object declaration\n",
+ "a = player()\n",
+ "\n",
+ "#Variable Initialization\n",
+ "#There is no need/concept for private variables in python.\n",
+ "a.name = \"Sanjay\"\n",
+ "a.height = 5.5\n",
+ "a.weight = 38\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"Height : %d\"%(a.height))\n",
+ "sys.stdout.write(\"\\nWeight : %d\"%(a.weight))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Height : 5\n",
+ "Weight : 38"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.11, Page number: 551<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Class with member variables and functions. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class player:\n",
+ " def __init__(self,name=None,height=0,weight=0):\n",
+ " self.name = name\n",
+ " self.height = height\n",
+ " self.weight = weight\n",
+ " \n",
+ " def setdata(self):\n",
+ " self.name = raw_input(\"Enter Name Age Height Weight\")\n",
+ " self.age = int(raw_input(\"Enter Name Age Height Weight\"))\n",
+ " self.height = float(raw_input(\"Enter Name Age Height Weight\"))\n",
+ " self.weight = int(raw_input(\"Enter Name Age Height Weight\"))\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\nName : %s\"%(self.name))\n",
+ " sys.stdout.write(\"\\nAge : %d\"%(self.age))\n",
+ " sys.stdout.write(\"\\nHeight : %f\"%(self.height))\n",
+ " sys.stdout.write(\"\\nWeight : %d\"%(self.weight))\n",
+ " \n",
+ "#Object declaration\n",
+ "a = player()\n",
+ "\n",
+ "#Function call\n",
+ "a.setdata()\n",
+ "a.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height WeightSanjay\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height Weight24\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height Weight5.5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height Weight54\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name : Sanjay\n",
+ "Age : 24\n",
+ "Height : 5.500000\n",
+ "Weight : 54"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.12, Page number: 552<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Class with member variables and functions.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class player:\n",
+ " def __init__(self,name=None,height=0,weight=0):\n",
+ " self.name = name\n",
+ " self.height = height\n",
+ " self.weight = weight\n",
+ " \n",
+ " def setdata(self):\n",
+ " self.name = raw_input(\"Enter Name Age Height Weight\")\n",
+ " self.age = int(raw_input(\"Enter Name Age Height Weight\"))\n",
+ " self.height = float(raw_input(\"Enter Name Age Height Weight\"))\n",
+ " self.weight = int(raw_input(\"Enter Name Age Height Weight\"))\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\nName : %s\"%(self.name))\n",
+ " sys.stdout.write(\"\\nAge : %d\"%(self.age))\n",
+ " sys.stdout.write(\"\\nHeight : %f\"%(self.height))\n",
+ " sys.stdout.write(\"\\nWeight : %d\"%(self.weight))\n",
+ "#In python, member functions should be defined inside the class instance\n",
+ "\n",
+ "#Object declaration\n",
+ "a = player()\n",
+ "\n",
+ "#Function call\n",
+ "a.setdata()\n",
+ "a.show() "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height WeightAjay\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height Weight24\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height Weight5.2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Name Age Height Weight45\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Name : Ajay\n",
+ "Age : 24\n",
+ "Height : 5.200000\n",
+ "Weight : 45"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.13, Page number: 554<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Static data member. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class sumnum:\n",
+ " def __init__(self,num = 0):\n",
+ " self.num = num\n",
+ " \n",
+ " def input1(self,c):\n",
+ " self.num = int(raw_input(\"Enter Number : \"))\n",
+ " c = c + self.num\n",
+ " return c\n",
+ " \n",
+ " def sum1(self,c):\n",
+ " sys.stdout.write(\"The sum of entered numbers is %d\"%(c))\n",
+ " \n",
+ "#Object declaration\n",
+ "a = sumnum()\n",
+ "b = sumnum()\n",
+ "c1 = sumnum()\n",
+ "c = 0\n",
+ "\n",
+ "#Function call\n",
+ "#There is no static variable in python\n",
+ "c = a.input1(c)\n",
+ "c = b.input1(c)\n",
+ "c = c1.input1(c)\n",
+ "\n",
+ "a.sum1(c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number : 5\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The sum of entered numbers is 14"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.14, Page number: 555<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Static member functions \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class bita:\n",
+ " def __initi__(self):\n",
+ " self.c = 0\n",
+ " \n",
+ " @staticmethod \n",
+ " def count(c):\n",
+ " c = c + 1\n",
+ " return c\n",
+ " \n",
+ " @staticmethod\n",
+ " def display(k,c):\n",
+ " k = k + 1\n",
+ " sys.stdout.write(\"\\nCall Number : %d\"%(k))\n",
+ " sys.stdout.write(\"\\nValue of c : %d\"%(c))\n",
+ " return k\n",
+ " \n",
+ "#Object declaration\n",
+ "b = bita()\n",
+ "c1 = bita()\n",
+ "\n",
+ "c = 0\n",
+ "k = 0\n",
+ "\n",
+ "#Function call\n",
+ "k = bita.display(k,c)\n",
+ "c = bita.count(c)\n",
+ "c = b.count(c)\n",
+ "c = c1.count(c)\n",
+ "k = bita.display(k,c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Call Number : 1\n",
+ "Value of c : 0\n",
+ "Call Number : 2\n",
+ "Value of c : 3"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.15, Page number: 557<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Array of objects to maintain records of bank \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class bank:\n",
+ " def __init__(self):\n",
+ " self.city = None\n",
+ " self.bank = None\n",
+ " self.branches = 0\n",
+ " self.no_ac = 0\n",
+ " \n",
+ " def input1(self):\n",
+ " self.city = raw_input(\"City Name : \")\n",
+ " self.bank = raw_input(\"Bank Name : \")\n",
+ " self.branches = int(raw_input(\"Total Branches : \"))\n",
+ " self.no_ac = int(raw_input(\"Number of A/c : \"))\n",
+ " \n",
+ " def console(self):\n",
+ " sys.stdout.write(\"\\n\\nCity Name : %s\"%(self.city))\n",
+ " sys.stdout.write(\"\\nBank Name : %s\"%(self.bank))\n",
+ " sys.stdout.write(\"\\nTotal Branches : %d\"%(self.branches))\n",
+ " sys.stdout.write(\"\\nNumber of A/c : %d\"%(self.no_ac))\n",
+ " \n",
+ "#Object declaration\n",
+ "ms = [bank() for i in range(0,2)]\n",
+ "\n",
+ "#Processing\n",
+ "for k in range(0,2):\n",
+ " ms[k].input1()\n",
+ " \n",
+ "for k in range(0,2):\n",
+ " ms[k].console()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "City Name : Nanded\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bank Name : SNSB\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Branches : 10\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of A/c : 7500\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "City Name : Latur\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bank Name : SNSB\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Branches : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of A/c : 5400\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "City Name : Nanded\n",
+ "Bank Name : SNSB\n",
+ "Total Branches : 10\n",
+ "Number of A/c : 7500\n",
+ "\n",
+ "City Name : Latur\n",
+ "Bank Name : SNSB\n",
+ "Total Branches : 8\n",
+ "Number of A/c : 5400"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.16, Page number: 559<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Accessing private data using non member function\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class ac:\n",
+ " def __init__(self):\n",
+ " self.name = None\n",
+ " self.acno = 0\n",
+ " self.bal = 0\n",
+ " \n",
+ " def read(self):\n",
+ " self.name = raw_input(\"Name : \")\n",
+ " self.acno = int(raw_input(\"A/c No :\"))\n",
+ " self.bal = int(raw_input(\"Balance : \"))\n",
+ " \n",
+ "#Non member function\n",
+ "def showbal(a):\n",
+ " sys.stdout.write(\"\\nBalance of A/c no. %d is Rs. %d\"%(a.acno,a.bal))\n",
+ " \n",
+ "#object declaration\n",
+ "k = ac()\n",
+ "\n",
+ "#Function call\n",
+ "k.read()\n",
+ "showbal(k)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Name : Manoj\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A/c No :474\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Balance : 40000\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Balance of A/c no. 474 is Rs. 40000"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.17, Page number: 561<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Friend function in two classes. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class first:\n",
+ " def __init__(self):\n",
+ " self.f = 0\n",
+ " \n",
+ " def getvalue(self):\n",
+ " self.f = int(raw_input(\"Enter a number : \"))\n",
+ " \n",
+ "class second:\n",
+ " def __init__(self):\n",
+ " self.s = 0\n",
+ " \n",
+ " def getvalue(self):\n",
+ " self.s = int(raw_input(\"Enter a number : \"))\n",
+ " \n",
+ " \n",
+ "#Non member function\n",
+ "def sum1(d,t):\n",
+ " sys.stdout.write(\"\\nSum of two numbers : %d\"%(t.f+d.s))\n",
+ " \n",
+ "#Object declaration\n",
+ "a = first()\n",
+ "b = second()\n",
+ "\n",
+ "#Function call\n",
+ "a.getvalue()\n",
+ "b.getvalue()\n",
+ "sum1(b,a)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 7\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter a number : 8\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Sum of two numbers : 15"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.18, Page number: 562<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#String Replacement\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class fandr:\n",
+ " def __init__(self):\n",
+ " self.str1 = None\n",
+ " self.f = ''\n",
+ " self.r = ''\n",
+ " \n",
+ " def accept(self):\n",
+ " #Since string object does not support item assignment, initialize the string as character array\n",
+ " self.str1 = ['P','r','o','g','r','a','_','e','r']\n",
+ " self.f = raw_input(\"Find what (char) \")\n",
+ " self.r = raw_input(\"Replace with (char) \")\n",
+ " \n",
+ " def display(self,d):\n",
+ " sys.stdout.write(\"%c\"%(self.str1[d]))\n",
+ " \n",
+ " def len1(self):\n",
+ " self.l = len(self.str1)\n",
+ " return self.l\n",
+ " \n",
+ " def find(self,i):\n",
+ " if self.str1[i] == self.f:\n",
+ " self.replace(i)\n",
+ " \n",
+ " def replace(self,k):\n",
+ " self.str1[k] = self.r\n",
+ " \n",
+ "#Object declaration\n",
+ "b = fandr()\n",
+ "\n",
+ "#function call\n",
+ "b.accept()\n",
+ "l = b.len1()\n",
+ "sys.stdout.write(\"\\nReplaced text : \")\n",
+ "\n",
+ "for i in range(0,l):\n",
+ " b.find(i)\n",
+ " b.display(i)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Find what (char) _\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Replace with (char) m\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Replaced text : Programer"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.19, Page number: 564<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Largest out of ten numbers.\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " def __init__(self):\n",
+ " self.number = [0 for i in range(0,10)]\n",
+ " \n",
+ " def input1(self,i):\n",
+ " self.number[i] = int(raw_input(\"Enter Number (%d) : \"%(i+1)))\n",
+ " return self.number[i]\n",
+ " \n",
+ " def large(self,s,m):\n",
+ " if self.number[s] == m:\n",
+ " sys.stdout.write(\"\\nLargest number : %d\"%(self.number[s]))\n",
+ " return 0\n",
+ " else:\n",
+ " return 1\n",
+ " \n",
+ "#Object declaration\n",
+ "b = num()\n",
+ "\n",
+ "sum1 = 0\n",
+ "c = 1\n",
+ "\n",
+ "#Sum\n",
+ "for i in range(0,10):\n",
+ " sum1 = sum1 + b.input1(i)\n",
+ " \n",
+ "#largest\n",
+ "for k in range(sum1,0,-1):\n",
+ " for i in range(0,10):\n",
+ " if c == 1:\n",
+ " c = b.large(i,k)\n",
+ " else:\n",
+ " break"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (1) : 125\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (2) : 654\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (3) : 246\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (4) : 945\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (5) : 258\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (6) : 159\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (7) : 845\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (8) : 940\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (9) : 944\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Number (10) : 485\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Largest number : 945"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.20, Page number: 567<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Constructor to initialize the class member variables \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " #Constructor\n",
+ " def __init__(self):\n",
+ " sys.stdout.write(\"\\nConstructor called\")\n",
+ " self.x = 5\n",
+ " self.a = 0\n",
+ " self.b = 1\n",
+ " self.c = 2\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\nx = %d a = %d b = %d c = %d\"%(self.x,self.a,self.b,self.c))\n",
+ " \n",
+ "#Object declaration\n",
+ "x = num()\n",
+ "\n",
+ "#Function call\n",
+ "x.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Constructor called\n",
+ "x = 5 a = 0 b = 1 c = 2"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.21, Page number: 569<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Constructor with arguments \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " #Constructor\n",
+ " def __init__(self,m,j,k):\n",
+ " self.a = m\n",
+ " self.b = j\n",
+ " self.c = k\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\na = %d b = %d c = %d\"%(self.a,self.b,self.c))\n",
+ " \n",
+ " \n",
+ "#Object declaration\n",
+ "x = num(4,5,7)\n",
+ "y = num(1,2,8)\n",
+ "\n",
+ "#Function call\n",
+ "x.show()\n",
+ "y.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "a = 4 b = 5 c = 7\n",
+ "a = 1 b = 2 c = 8"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.22, Page number: 571<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Constructor overloading\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " def __init__(self,m = None,j = None,k = None):\n",
+ " if m and j and k is not None:\n",
+ " sys.stdout.write(\"Constructor with three arguments\")\n",
+ " self.a = m\n",
+ " self.b = j\n",
+ " self.c = k\n",
+ " \n",
+ " else:\n",
+ " if m and j is not None:\n",
+ " sys.stdout.write(\"Constructor with two arguments\")\n",
+ " self.a = m\n",
+ " self.b = j\n",
+ " self.c = ''\n",
+ " else:\n",
+ " if m == j == k == None:\n",
+ " sys.stdout.write(\"Constructor without arguments\")\n",
+ " self.a = 0\n",
+ " self.b = 0\n",
+ " self.c = ''\n",
+ " \n",
+ " \n",
+ " def show(self): \n",
+ " sys.stdout.write(\"\\na = %d b = %f c = \"%(self.a,self.b))\n",
+ " print self.c\n",
+ " \n",
+ " \n",
+ "#Object declaration\n",
+ "\n",
+ "x = num(4,5.5,'A')\n",
+ "x.show()\n",
+ "\n",
+ "y = num(1,2.2)\n",
+ "y.show()\n",
+ "\n",
+ "z = num()\n",
+ "z.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Constructor with three arguments\n",
+ "a = 4 b = 5.500000 c = A\n",
+ "Constructor with two arguments\n",
+ "a = 1 b = 2.200000 c = \n",
+ "Constructor without arguments\n",
+ "a = 0 b = 0.000000 c = \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.23, Page number: 573<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Default arguments in constructor. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class power:\n",
+ " def __init__(self,n = 9,p = 3):\n",
+ " self.num = n\n",
+ " self.power = p\n",
+ " self.ans = pow(n,p)\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\n%d raise to %d is %d\"%(self.num,self.power,self.ans))\n",
+ " \n",
+ " \n",
+ "#Object declaration\n",
+ "p1 = power()\n",
+ "p2 = power(5)\n",
+ "\n",
+ "#Result\n",
+ "p1.show()\n",
+ "p2.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "9 raise to 3 is 729\n",
+ "5 raise to 3 is 125"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.24, Page number: 575<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Object with reference to constructor. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " #There is no overloading concept in python\n",
+ " def __init__(self,k=None,j=None):\n",
+ " if k is not None:\n",
+ " self.n = k\n",
+ " return\n",
+ " else:\n",
+ " if j is not None:\n",
+ " self.n = j.n\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"%d\"%(self.n))\n",
+ " \n",
+ "#Object creation\n",
+ "J = num(50)\n",
+ "K = num(J.n)\n",
+ "L = num()\n",
+ "L = J\n",
+ "M = num()\n",
+ "M = J\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nObject J Value of n : \")\n",
+ "J.show()\n",
+ "sys.stdout.write(\"\\nObject K Value of n : \")\n",
+ "K.show()\n",
+ "sys.stdout.write(\"\\nObject L Value of n : \")\n",
+ "L.show()\n",
+ "sys.stdout.write(\"\\nObject M Value of n : \")\n",
+ "M.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Object J Value of n : 50\n",
+ "Object K Value of n : 50\n",
+ "Object L Value of n : 50\n",
+ "Object M Value of n : 50"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.25, Page number: 576<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Destructors\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "c = 0\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " def __init__(self,c):\n",
+ " c = c + 1\n",
+ " sys.stdout.write(\"\\nObject Created : Object(%d)\"%(c))\n",
+ " \n",
+ " \n",
+ " def __exit__(self, type, value, traceback,c):\n",
+ " self.package_obj.cleanup()\n",
+ " sys.stdout.write(\"\\nObject Released : Object(%d)\"%(c))\n",
+ " c = c - 1\n",
+ " \n",
+ " \n",
+ "#Object creation\n",
+ "sys.stdout.write(\"\\nIn main()\\n\")\n",
+ "a = num(c)\n",
+ "b = num(c)\n",
+ "\n",
+ "sys.stdout.write(\"\\nIn Block A()\\n\")\n",
+ "c = num(c)\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\nAgain in main()\\n\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In main()\n",
+ "\n",
+ "Object Created : Object(1)\n",
+ "Object Created : Object(1)\n",
+ "In Block A()\n",
+ "\n",
+ "Object Created : Object(1)\n",
+ "\n",
+ "Again in main()\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.26, Page number: 579<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Overload unary ++ operator\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " def input1(self):\n",
+ " self.a = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.b = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.c = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.d = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\nA = %d B = %d C = %d D = %d\"%(self.a,self.b,self.c,self.d))\n",
+ " \n",
+ " def operatorplusplus(self):\n",
+ " self.a = self.a + 1\n",
+ " self.b = self.b + 1\n",
+ " self.c = self.c + 1\n",
+ " self.d = self.d + 1\n",
+ " \n",
+ "#Object creation\n",
+ "X = num()\n",
+ "\n",
+ "X.input1()\n",
+ "sys.stdout.write(\"\\nBefore Overloading X : \")\n",
+ "X.show()\n",
+ "\n",
+ "#There is no operator overloading in python\n",
+ "X.operatorplusplus()\n",
+ "sys.stdout.write(\"\\nAfter Overloading X : \")\n",
+ "X.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 9\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Before Overloading X : \n",
+ "A = 4 B = 5 C = 8 D = 9\n",
+ "After Overloading X : \n",
+ "A = 5 B = 6 C = 9 D = 10"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.27, Page number: 581<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Overload + binary operator\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " def input1(self):\n",
+ " self.a = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.b = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.c = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.d = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"A = %d B = %d C = %d D = %d\"%(self.a,self.b,self.c,self.d))\n",
+ " \n",
+ " def operatorplus(self,t):\n",
+ " tmp = num()\n",
+ " tmp.a = self.a + t.a\n",
+ " tmp.b = self.b + t.b\n",
+ " tmp.c = self.c + t.c\n",
+ " tmp.d = self.d + t.d\n",
+ " return tmp\n",
+ " \n",
+ "#Object creation\n",
+ "X = num()\n",
+ "Y = num()\n",
+ "Z = num()\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"\\nObject X \")\n",
+ "X.input1()\n",
+ "sys.stdout.write(\"\\nObject Y \")\n",
+ "Y.input1()\n",
+ "\n",
+ "Z = X.operatorplus(Y)\n",
+ "\n",
+ "sys.stdout.write(\"\\nX : \")\n",
+ "X.show()\n",
+ "sys.stdout.write(\"\\nY : \")\n",
+ "Y.show()\n",
+ "sys.stdout.write(\"\\nZ : \")\n",
+ "Z.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Object X "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 1\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Object Y "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 2\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "X : A = 1 B = 4 C = 2 D = 1\n",
+ "Y : A = 2 B = 5 C = 4 D = 2\n",
+ "Z : A = 3 B = 9 C = 6 D = 3"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.28, Page number: 583<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Multiplication using an integer and object. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class definition\n",
+ "class num:\n",
+ " def input1(self):\n",
+ " self.a = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.b = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.c = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " self.d = int(raw_input(\"Enter Values for a,b,c and d : \"))\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"A = %d B = %d C = %d D = %d\"%(self.a,self.b,self.c,self.d))\n",
+ " \n",
+ "def operatormul(a,t):\n",
+ " tmp = num()\n",
+ " tmp.a = a * t.a\n",
+ " tmp.b = a * t.b\n",
+ " tmp.c = a * t.c\n",
+ " tmp.d = a * t.d\n",
+ " return tmp\n",
+ "\n",
+ "#Result\n",
+ "X = num()\n",
+ "Z = num()\n",
+ "\n",
+ "sys.stdout.write(\"\\nObject X \")\n",
+ "X.input1()\n",
+ "\n",
+ "Z = operatormul(3,X)\n",
+ "sys.stdout.write(\"\\nX : \")\n",
+ "X.show()\n",
+ "sys.stdout.write(\"\\nZ : \")\n",
+ "Z.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Object X "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter Values for a,b,c and d : 3\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "X : A = 1 B = 2 C = 2 D = 3\n",
+ "Z : A = 3 B = 6 C = 6 D = 9"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.29, Page number: 585<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Inheritance\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Class declaration\n",
+ "class one:\n",
+ " def __init__(self):\n",
+ " self.a = 0\n",
+ " self.b = 0\n",
+ " \n",
+ "class two(one):\n",
+ " def __init__(self):\n",
+ " one.__init__(self)\n",
+ " self.c = 0\n",
+ " self.d = 0\n",
+ " \n",
+ " def input1(self):\n",
+ " self.a = int(raw_input(\"Enter values for a,b,c,d : \"))\n",
+ " self.b = int(raw_input(\"Enter values for a,b,c,d : \"))\n",
+ " self.c = int(raw_input(\"Enter values for a,b,c,d : \"))\n",
+ " self.d = int(raw_input(\"Enter values for a,b,c,d : \"))\n",
+ " \n",
+ " def display(self):\n",
+ " sys.stdout.write(\"\\na = %d b = %d c = %d d = %d\"%(self.a,self.b,self.c,self.d))\n",
+ " \n",
+ "#Object declaration\n",
+ "a = two()\n",
+ "\n",
+ "#Result\n",
+ "a.input1()\n",
+ "a.display()\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter values for a,b,c,d : 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter values for a,b,c,d : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter values for a,b,c,d : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter values for a,b,c,d : 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "a = 2 b = 5 c = 4 d = 7"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16.30, Page number: 586<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Member function using pointer\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#class declaration\n",
+ "class super1:\n",
+ " def display(self):\n",
+ " sys.stdout.write(\"\\nIn function display() class super\")\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\nIn function show() class super\")\n",
+ " \n",
+ "class sub(super1):\n",
+ " def display(self):\n",
+ " sys.stdout.write(\"\\nIn function display() class sub\")\n",
+ " \n",
+ " def show(self):\n",
+ " sys.stdout.write(\"\\nIn function show() class sub\")\n",
+ " \n",
+ "#Object declaration\n",
+ "S = super1()\n",
+ "A = sub()\n",
+ "\n",
+ "#There is no pointer concept in python\n",
+ "S.display()\n",
+ "S.show()\n",
+ "\n",
+ "sys.stdout.write(\"\\n\\nNow Pointer point points to derived class sub\\n\")\n",
+ "A.display()\n",
+ "A.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In function display() class super\n",
+ "In function show() class super\n",
+ "\n",
+ "Now Pointer point points to derived class sub\n",
+ "\n",
+ "In function display() class sub\n",
+ "In function show() class sub"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot1.png b/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot1.png
new file mode 100755
index 00000000..61fbfcd0
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot1.png
Binary files differ
diff --git a/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot2.png b/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot2.png
new file mode 100755
index 00000000..df49d844
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot2.png
Binary files differ
diff --git a/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot3.png b/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot3.png
new file mode 100755
index 00000000..42d9aec9
--- /dev/null
+++ b/Programming_with_ANSI_and_Turbo_C/screenshots/screenshot3.png
Binary files differ
diff --git a/Satellite_Communication/README.txt b/Satellite_Communication/README.txt
index 4ec19377..4ec19377 100644..100755
--- a/Satellite_Communication/README.txt
+++ b/Satellite_Communication/README.txt
diff --git a/Satellite_Communication/chapter_2.ipynb b/Satellite_Communication/chapter_2.ipynb
index 62e9c6de..62e9c6de 100644..100755
--- a/Satellite_Communication/chapter_2.ipynb
+++ b/Satellite_Communication/chapter_2.ipynb
diff --git a/Satellite_Communication/chapter_3.ipynb b/Satellite_Communication/chapter_3.ipynb
index b87a50b4..b87a50b4 100644..100755
--- a/Satellite_Communication/chapter_3.ipynb
+++ b/Satellite_Communication/chapter_3.ipynb
diff --git a/Satellite_Communication/chapter_4.ipynb b/Satellite_Communication/chapter_4.ipynb
index ea3132bc..ea3132bc 100644..100755
--- a/Satellite_Communication/chapter_4.ipynb
+++ b/Satellite_Communication/chapter_4.ipynb
diff --git a/Satellite_Communication/chapter_5.ipynb b/Satellite_Communication/chapter_5.ipynb
index 130c2bfd..130c2bfd 100644..100755
--- a/Satellite_Communication/chapter_5.ipynb
+++ b/Satellite_Communication/chapter_5.ipynb
diff --git a/Satellite_Communication/chapter_6.ipynb b/Satellite_Communication/chapter_6.ipynb
index 22f229fb..22f229fb 100644..100755
--- a/Satellite_Communication/chapter_6.ipynb
+++ b/Satellite_Communication/chapter_6.ipynb
diff --git a/Satellite_Communication/chapter_7.ipynb b/Satellite_Communication/chapter_7.ipynb
index 45cec90e..45cec90e 100644..100755
--- a/Satellite_Communication/chapter_7.ipynb
+++ b/Satellite_Communication/chapter_7.ipynb
diff --git a/Satellite_Communication/screenshots/a.png b/Satellite_Communication/screenshots/a.png
index 32f78334..32f78334 100644..100755
--- a/Satellite_Communication/screenshots/a.png
+++ b/Satellite_Communication/screenshots/a.png
Binary files differ
diff --git a/Satellite_Communication/screenshots/b.png b/Satellite_Communication/screenshots/b.png
index ccec2644..ccec2644 100644..100755
--- a/Satellite_Communication/screenshots/b.png
+++ b/Satellite_Communication/screenshots/b.png
Binary files differ
diff --git a/Satellite_Communication/screenshots/c.png b/Satellite_Communication/screenshots/c.png
index 84eea621..84eea621 100644..100755
--- a/Satellite_Communication/screenshots/c.png
+++ b/Satellite_Communication/screenshots/c.png
Binary files differ
diff --git a/Schaum's_Outlines_-_Programming_with_C++/README.txt b/Schaum's_Outlines_-_Programming_with_C++/README.txt
index 7c6dc038..7c6dc038 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/README.txt
+++ b/Schaum's_Outlines_-_Programming_with_C++/README.txt
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch1.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch1.ipynb
index 5ac1363a..5ac1363a 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch1.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch1.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch10.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch10.ipynb
index 20eeb516..20eeb516 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch10.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch10.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch11.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch11.ipynb
index d65c28e3..d65c28e3 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch11.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch11.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch12.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch12.ipynb
index b4d91452..b4d91452 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch12.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch12.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch13.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch13.ipynb
index cfd875f2..cfd875f2 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch13.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch13.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch14.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch14.ipynb
index 2b06bed6..2b06bed6 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch14.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch14.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch2.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch2.ipynb
index b03e0beb..b03e0beb 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch2.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch2.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch3.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch3.ipynb
index 9a59031c..9a59031c 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch3.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch3.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch4.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch4.ipynb
index 64e8a763..64e8a763 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch4.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch4.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch5.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch5.ipynb
index f2c1f873..f2c1f873 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch5.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch5.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch6.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch6.ipynb
index 0ed8b9bb..0ed8b9bb 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch6.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch6.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch7.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch7.ipynb
index ddb6c93a..ddb6c93a 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch7.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch7.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch8.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch8.ipynb
index 8240c86e..8240c86e 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch8.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch8.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/ch9.ipynb b/Schaum's_Outlines_-_Programming_with_C++/ch9.ipynb
index d8825dca..d8825dca 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/ch9.ipynb
+++ b/Schaum's_Outlines_-_Programming_with_C++/ch9.ipynb
diff --git a/Schaum's_Outlines_-_Programming_with_C++/screenshots/ratio.png b/Schaum's_Outlines_-_Programming_with_C++/screenshots/ratio.png
index 68bb8cd0..68bb8cd0 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/screenshots/ratio.png
+++ b/Schaum's_Outlines_-_Programming_with_C++/screenshots/ratio.png
Binary files differ
diff --git a/Schaum's_Outlines_-_Programming_with_C++/screenshots/swap.png b/Schaum's_Outlines_-_Programming_with_C++/screenshots/swap.png
index 7d707e37..7d707e37 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/screenshots/swap.png
+++ b/Schaum's_Outlines_-_Programming_with_C++/screenshots/swap.png
Binary files differ
diff --git a/Schaum's_Outlines_-_Programming_with_C++/screenshots/vector.png b/Schaum's_Outlines_-_Programming_with_C++/screenshots/vector.png
index b51554ce..b51554ce 100644..100755
--- a/Schaum's_Outlines_-_Programming_with_C++/screenshots/vector.png
+++ b/Schaum's_Outlines_-_Programming_with_C++/screenshots/vector.png
Binary files differ
diff --git a/Solid_state_physics/Chapter_1.ipynb b/Solid_state_physics/Chapter_1.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_1.ipynb
+++ b/Solid_state_physics/Chapter_1.ipynb
diff --git a/Solid_state_physics/Chapter_10.ipynb b/Solid_state_physics/Chapter_10.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_10.ipynb
+++ b/Solid_state_physics/Chapter_10.ipynb
diff --git a/Solid_state_physics/Chapter_10_1.ipynb b/Solid_state_physics/Chapter_10_1.ipynb
new file mode 100755
index 00000000..ac36fbe7
--- /dev/null
+++ b/Solid_state_physics/Chapter_10_1.ipynb
@@ -0,0 +1,181 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1, Page number 10.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Tc = 3.7 #critical temperature(K)\n",
+ "Hc_o = 0.0306 #critical field(T)\n",
+ "T = 2 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc_2 = Hc_o*(1-((T/Tc)**2))\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical field at 2K is\",round(Hc_2,5),\"T\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical field at 2K is 0.02166 T\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2, Page number 10.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 4.2 #temperature(K)\n",
+ "Tc = 7.18 #critical temperature(K)\n",
+ "Ho = 6.5*10**4 #A/m\n",
+ "d = 1*10**-3 #diameter(m)\n",
+ "\n",
+ "#Calculations\n",
+ "Hc = Ho*(1-((T/Tc)**2))\n",
+ "r = d/2\n",
+ "ic = 2*pi*r*Hc\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical current =\",round(ic,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical current = 134.33 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3, Page number 10.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 3.5 #temperature(K)\n",
+ "lamda_t = 750 #penetration depth at T(A)\n",
+ "Tc = 4.12 #K\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_o = lamda_t*math.sqrt((1-((T/Tc)**4)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Penetration depth at 4.12K is\",round(lamda_o,1),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Penetration depth at 4.12K is 519.2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4, Page number 10.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1 = 3 #temperature(K)\n",
+ "lamda_t1 = 396. #penetration depth at T1(A)\n",
+ "T2 = 7.1 #temperature(K)\n",
+ "lamda_t2 = 1730. #penetration depth at T2(A)\n",
+ "\n",
+ "#Calculations\n",
+ "x = lamda_t2**2/lamda_t1**2\n",
+ "Tc = math.sqrt(math.sqrt((-T1**4+(x*(T2**4)))/(x-1)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Critical temperature =\",round(Tc,3),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical temperature = 7.193 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_11.ipynb b/Solid_state_physics/Chapter_11.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_11.ipynb
+++ b/Solid_state_physics/Chapter_11.ipynb
diff --git a/Solid_state_physics/Chapter_11_1.ipynb b/Solid_state_physics/Chapter_11_1.ipynb
new file mode 100755
index 00000000..2ccb0979
--- /dev/null
+++ b/Solid_state_physics/Chapter_11_1.ipynb
@@ -0,0 +1,102 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11:Lasers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1, Page number 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6943.*10**-10 #wavelength(m)\n",
+ "T = 300. #temperature(K)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "c = 3*10**8 #velocity of light(m/s)\n",
+ "K = 8.61*10**-5\n",
+ "\n",
+ "#Calculations\n",
+ "E2_E1 = (h*c)/(lamda*1.6*10**-19) #in eV\n",
+ "N2_N1 = math.exp(-E2_E1/(K*T))\n",
+ "\n",
+ "#Result\n",
+ "print \"The relative population of two states in a ruby laser is\",round((N2_N1/1E-31),2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The relative population of two states in a ruby laser is 8.2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2, Page number 11.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "a1 = 4. #diameter of laser beam for distance first(m)\n",
+ "a2 = 6. # diameter of laser beam from second distance(m)\n",
+ "d1 = 1. #First distance from laser to output beam spot(m)\n",
+ "d2 = 2. #Second distance from laser to output beam spot(m)\n",
+ "\n",
+ "#Calculation\n",
+ "D = (a2-a1)/(2*(d2-d1))\n",
+ "\n",
+ "#Result\n",
+ "print \"Divergence =\",D,\"milliradian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Divergence = 1.0 milliradian\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_12.ipynb b/Solid_state_physics/Chapter_12.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_12.ipynb
+++ b/Solid_state_physics/Chapter_12.ipynb
diff --git a/Solid_state_physics/Chapter_12_1.ipynb b/Solid_state_physics/Chapter_12_1.ipynb
new file mode 100755
index 00000000..2311a687
--- /dev/null
+++ b/Solid_state_physics/Chapter_12_1.ipynb
@@ -0,0 +1,252 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1, Page number 12.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.55 #refractive inde of core\n",
+ "n2 = 1.50 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical Aperture =\",round(NA,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical Aperture = 0.391\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2, Page number 12.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.563 #refractive inde of core\n",
+ "n2 = 1.498 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "alpha_i = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Angle of acceptance =\",round(alpha_i,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of acceptance = 26.49 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3, Page number 12.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA = 0.39 #numerical aperture\n",
+ "delta_n = 0.05 #differnce between refractive indices of core & cladding\n",
+ "\n",
+ "#Calculaations\n",
+ "n1 = NA/math.sqrt(2*delta_n)\n",
+ "\n",
+ "#Result\n",
+ "print \"Refractive index of core =\",round(n1,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of core = 1.2333\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4, Page number 12.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.563 #refractive inde of core\n",
+ "n2 = 1.498 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "delta = (n1-n2)/n1\n",
+ "\n",
+ "#Result\n",
+ "print \"Fractional index change for the given fiber is\",round(delta,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fractional index change for the given fiber is 0.0416\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5, Page number 12.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.48 #refractive inde of core\n",
+ "n2 = 1.45 #refractive index of cladding\n",
+ "\n",
+ "#Calculations\n",
+ "NA = math.sqrt(n1**2-n2**2)\n",
+ "alpha_i = math.degrees(math.asin(NA))\n",
+ "\n",
+ "#Result\n",
+ "print \"Numerical aperture =\",round(NA,4)\n",
+ "print \"Angle of acceptance =\",round(alpha_i,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture = 0.2965\n",
+ "Angle of acceptance = 17.25 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6, Page number 12.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pout = 40. #output power(mW)\n",
+ "Pin = 100. #input power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "A = -10*math.log10(Pout/Pin) #Attenuation(dB)\n",
+ "\n",
+ "#Result \n",
+ "print \"Attenuation =\",round(A,2),\"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Attenuation = 3.98 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_1_1.ipynb b/Solid_state_physics/Chapter_1_1.ipynb
new file mode 100755
index 00000000..32644890
--- /dev/null
+++ b/Solid_state_physics/Chapter_1_1.ipynb
@@ -0,0 +1,200 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declartion\n",
+ "E_a = 502 #first ionization energy of A(kJ/mol)\n",
+ "E_b = -335 #electron affinity for B atom(kJ/mol)\n",
+ "d = 3*10**-10 #inter-ionic seperation(m)\n",
+ "E = 8.85*10**-12 #permittivity of free space(C/N -m)\n",
+ "e = 1.602*10**-19#charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "C_e = (-e**2)/(4*pi*E*d) #Coulumbic attraction energy(J/ion pair)\n",
+ "C_e_kj = C_e *6.022*10**23*10**-3 #Converting C_e to KJ/mol\n",
+ "n_e = E_a + E_b + C_e_kj #Net change in energy per mole\n",
+ "\n",
+ "#Results\n",
+ "print \"Net change in energy is =\",round(n_e,3),\"kJ/mol\"\n",
+ "print \"As the net change in energy is negative, the molecule will be stable\"\n",
+ "print \"\\nThe solution differs because of rounding-off of the digits in the textbook\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net change in energy is = -296.224 kJ/mol\n",
+ "As the net change in energy is negative, the molecule will be stable\n",
+ "\n",
+ "The solution differs because of rounding-off of the digits in the textbook\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi \n",
+ "\n",
+ "#Variable declaration\n",
+ "IP_K = 4.1 #ionization energy of K(eV)\n",
+ "EA_Cl = 3.6 #electron affinity of Cl(eV)\n",
+ "e = 1.602*10**-19 #charge of an electron(C)\n",
+ "Eo = 8.85*10**-12 #permittivity of free space(C/N -m)\n",
+ "\n",
+ "#Calcuations\n",
+ "del_E = IP_K - EA_Cl\n",
+ "#Ec = 0.5 = -e/4*pi*Eo*R\n",
+ "R = e/(4*pi*Eo*del_E)\n",
+ "\n",
+ "#Results\n",
+ "print \"(a) If their total energy is to be zero, then del_E = Ec\"\n",
+ "print \"(b) The seperation between the ion pair is\", round((R/1E-9),2), \"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) If their total energy is to be zero, then del_E = Ec\n",
+ "(b) The seperation between the ion pair is 2.88 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page number 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "ro = 2.36*10**-10 #inter ionic equilibrium distance(m)\n",
+ "IP = 5.14 #ionization energy of Na(eV)\n",
+ "EA = 3.65 #electron affinity of Cl(eV)\n",
+ "e = 1.602*10**-19 #charge of an electron(C)\n",
+ "Eo = 8.85*10**-12 #permittivity of free space(C/N -m)\n",
+ "\n",
+ "#Calculations\n",
+ "Ue = (-e**2)/(4*pi*Eo*ro*e) #Potential energy in eV\n",
+ "Be = -Ue - IP + EA\n",
+ "\n",
+ "#Result\n",
+ "print \"Bond energy for NaCl molecule is\",round(Be,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bond energy for NaCl molecule is 4.61 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page number 1.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "ro = 0.281*10**-9 #equilibrium seperation between the ion pair(m)\n",
+ "IP = 5.14 #ionization energy of Na(eV)\n",
+ "EA = 3.61 #electron affinity of Cl(eV)\n",
+ "A = 1.748 #Madelung constant\n",
+ "n = 9. #born replusive exponent\n",
+ "e = 1.602*10**-19 #charge of an electron(C)\n",
+ "Eo = 8.85*10**-12 #permittivity of free space(C/N -m)\n",
+ "\n",
+ "#Calculations\n",
+ "Ce = (A*(e**2)*(1-(1/n)))/(4*pi*Eo*ro) #joules\n",
+ "Ce_ev = Ce/e #Converting joules to eV\n",
+ "\n",
+ "#Result\n",
+ "print \"The cohesive energy of NaCl molecule is\",round(Ce_ev,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cohesive energy of NaCl molecule is 7.97 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_2.ipynb b/Solid_state_physics/Chapter_2.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_2.ipynb
+++ b/Solid_state_physics/Chapter_2.ipynb
diff --git a/Solid_state_physics/Chapter_2_1.ipynb b/Solid_state_physics/Chapter_2_1.ipynb
new file mode 100755
index 00000000..99284878
--- /dev/null
+++ b/Solid_state_physics/Chapter_2_1.ipynb
@@ -0,0 +1,331 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:64e1fbee0e1d9b8157cae12a98a7773b847a3c5e842a9d3f124a5485fe931875"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Crystal Structure"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page number 2.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt \n",
+ "\n",
+ "#Variable declaration\n",
+ "#Assuming r=1 for simpliciy in calculations\n",
+ "r = 1\n",
+ "\n",
+ "#Calculations\n",
+ "a = (4*r)/sqrt(3)\n",
+ "#Let R be the radius of interstitial sphere that can fit into the void,therefore,\n",
+ "R = (a-2*r)/2 \n",
+ "\n",
+ "#Result\n",
+ "print \"The maximum radius of interstitial sphere is\",round(R,3),\"r\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum radius of interstitial sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page number 2.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1 = 1.258*10**-10 #atomic radius(m)\n",
+ "r2 = 1.292*10**-10 #atomic radius(m)\n",
+ "\n",
+ "#Calculations\n",
+ "#In BCC\n",
+ "a_bcc = (4*r1)/sqrt(3)\n",
+ "v_bcc = a_bcc**3 #volume of unit cell(m^3)\n",
+ "n1 = ((1./8.)*8.)+1\n",
+ "V1 = v_bcc/n1 #volume occupied by 1 atom(m^3)\n",
+ "\n",
+ "#In FCC\n",
+ "a_fcc = 2*sqrt(2)*r2\n",
+ "v_fcc = a_fcc**3 #volume of unit cell(m^3)\n",
+ "n2 = ((1./2.)*6.)+((1./8.)*8.)\n",
+ "V2 = v_fcc/n2 #volume occupied by 1 atom(m^3)\n",
+ "\n",
+ "del_v = ((V1-V2)/V1)*100 #change in volume\n",
+ "\n",
+ "#Result\n",
+ "print \"During the conversion of iron from BCC to FCC, the decrease in volume is\",round(del_v,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "During the conversion of iron from BCC to FCC, the decrease in volume is 0.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page number 2.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.27*10**-9 #nearest neighbour distance(m)\n",
+ "c = 0.494*10**-9 #height of unit cell(m)\n",
+ "M = 65.37 #atomic weight of zinc\n",
+ "N = 6.023*10**26 #Avogadro's number(k/mol)\n",
+ "\n",
+ "#Calculations\n",
+ "V = (3*sqrt(3)*a**2*c)/2 #volume of unit cell\n",
+ "rho = (6*M)/(N*V) #density of crystal\n",
+ "\n",
+ "#Results\n",
+ "print \"Volume of unit cell =\",round((V/1E-29),2),\"*10^29 m^3\"\n",
+ "print \"Density of zinc =\",round(rho),\"kg/m^3\"\n",
+ "print \"\\nThe solution differs because of rounding-off of the digits in the textbook\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume of unit cell = 9.36 *10^29 m^3\n",
+ "Density of zinc = 6960.0 kg/m^3\n",
+ "\n",
+ "The solution differs because of rounding-off of the digits in the textbook\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, Page number 2.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Varaible declaration\n",
+ "#Let r be the radius of atom and R be the radius of sphere\n",
+ "#For simplicity in calculations, let us assume r =1\n",
+ "r = 1\n",
+ "\n",
+ "#Calculations\n",
+ "#For FCC structure\n",
+ "a = (4*r)/sqrt(2)\n",
+ "R = (a/2)-r\n",
+ "\n",
+ "print \"Maximum radius of sphere =\",round(R,3),\"r\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum radius of sphere = 0.414 r\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5, Page number 2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\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 #Avogadro's number(k/mol)\n",
+ "na = 1.77*10**29 #no. of atoms per meter cube\n",
+ "\n",
+ "#Calculations\n",
+ "#Diamond has 2 interpenetrating FCC lattices. Since each FCC unit cell has 4 atoms, the total no. of atoms per unit cell is 8\n",
+ "n = 8/a**3\n",
+ "m = M/N\n",
+ "rho = m*na\n",
+ "\n",
+ "#Result\n",
+ "print \"Number of atoms =\",round((n/1E+29),3),\"*10^29\"\n",
+ "print \"The density of diamond is\",round(rho,1),\"kg/m^3(Calculation mistake in the textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of atoms = 1.773 *10^29\n",
+ "The density of diamond is 3529.4 kg/m^3(Calculation mistake in the textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6, Page number 2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "rho = 2.18 #density of NaCl(gm/cm^3)\n",
+ "N = 6.023*10**23 #Avogadro's number(/mol)\n",
+ "\n",
+ "#Caculations\n",
+ "w = 23+35.5 #molecular weight of NaCl\n",
+ "m = w/N #mass of NaCl molecule\n",
+ "nm = rho/m #no. of molecules per unit volume(molecule/cm^3)\n",
+ "#Since NaCl is diatomic\n",
+ "n = 2*nm\n",
+ "#Let a be the distance between adjacent atoms in NaCl and\n",
+ "# n be the no. of atoms along the edge of the cube\n",
+ "#length of an edge = na\n",
+ "#volume of unit cube = n^3*a^3\n",
+ "a = (1/n)**(1./3.)\n",
+ "\n",
+ "#Result\n",
+ "print \"The distance between two adjacent atoms is\",round((a/1E-8),2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance between two adjacent atoms is 2.81 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7, Page number 2.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declaration\n",
+ "w = 63.5 #atomic weight of copper\n",
+ "r = 1.278*10**-8 #atomic rdius(m)\n",
+ "N = 6.023*10**23 #Avogadro's number(/mol)\n",
+ "\n",
+ "#Calculations\n",
+ "m = w/N #mass of each copper atom(gm)\n",
+ "#Since copper has FCC structure lattice constant\n",
+ "a = (4*r)/sqrt(2) \n",
+ "n = 4 #no. of atoms in unit cell of FCC structure\n",
+ "M = n*m #mass of unit cell\n",
+ "rho = M/a**3 #density\n",
+ "\n",
+ "#Result\n",
+ "print \"Density of copper =\",round(rho,2),\"gm/cm^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of copper = 8.93 gm/cm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_3.ipynb b/Solid_state_physics/Chapter_3.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_3.ipynb
+++ b/Solid_state_physics/Chapter_3.ipynb
diff --git a/Solid_state_physics/Chapter_3_1.ipynb b/Solid_state_physics/Chapter_3_1.ipynb
new file mode 100755
index 00000000..c7c45c55
--- /dev/null
+++ b/Solid_state_physics/Chapter_3_1.ipynb
@@ -0,0 +1,459 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:201c0242c8a2063b9a355e5a7deec7582a5a21b0e1187464be6b9fa32a384889"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:Crystal planes and X-ray diffraction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page number 3.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "'''In a simple cubic structure, there are three types of atomic arrangement\n",
+ "(i)(100)\n",
+ "(ii)(110)\n",
+ "(iii)(111)'''\n",
+ "\n",
+ "#Calculations and results\n",
+ "\n",
+ "#Consider (100) plane\n",
+ "n = (1./4.)*4 #no. of atoms in this plane\n",
+ "#Let a be the lattice constant in mm\n",
+ "a = Symbol('a')\n",
+ "A1 = a**2\n",
+ "nm = n/A1 #no. of atoms per mm^2\n",
+ "print \"The number of atoms per square millimeter for (100) plane is\",nm\n",
+ "\n",
+ "#Consider (110) plane\n",
+ "n2 = 1 \n",
+ "A2 = math.sqrt(2)*a**2\n",
+ "nm2 = n2/A2\n",
+ "print \"The number of atoms per square millimeter for (110) plane is\",nm2\n",
+ "\n",
+ "#Consider (111) plane\n",
+ "n3 = (1./360.)*60*3\n",
+ "EO = a*math.sqrt(2)*math.cos(math.pi/6)\n",
+ "A3 = (a*math.sqrt(2)*EO)/2\n",
+ "nm3 = n3/A3\n",
+ "print \"The number of atoms per square millimeter for (111) plane is\",nm3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of atoms per square millimeter for (100) plane is 1.0/a**2\n",
+ "The number of atoms per square millimeter for (110) plane is 0.707106781186547/a**2\n",
+ "The number of atoms per square millimeter for (111) plane is 0.577350269189626/a**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page number 3.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable declartion\n",
+ "r = 0.1278*10**-9 #atomic radius(m)\n",
+ "\n",
+ "#Calculations\n",
+ "#For FCC structure,\n",
+ "a = (4*r)/sqrt(2)\n",
+ "\n",
+ "#For (110) plane,\n",
+ "h1 = 1\n",
+ "k1 = 1\n",
+ "l1 = 0\n",
+ "d1 = a/((h1**2+k1**2+l1**2)**0.5) \n",
+ "\n",
+ "#For (212) plane,\n",
+ "h2 = 2\n",
+ "k2 = 1\n",
+ "l2 = 2\n",
+ "d2 = a/((h2**2+k2**2+l2**2)**0.5)\n",
+ "\n",
+ "#Results\n",
+ "print \"Interplanar spacing for (110) plane =\",d1/1E-9,\"nm\"\n",
+ "print \"Interplanar spacing for (212) plane =\",round((d2/1E-9),4),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Interplanar spacing for (110) plane = 0.2556 nm\n",
+ "Interplanar spacing for (212) plane = 0.1205 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page number 3.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "#Let a be the lattice constant\n",
+ "#For calculations, let us assume a = 1\n",
+ "a = 1\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#For (100) plane,\n",
+ "h1 = 1\n",
+ "k1 = 0\n",
+ "l1 = 0\n",
+ "d1 = 1/((h1**2+k1**2+l1**2)**0.5) \n",
+ "\n",
+ "#For (110) plane,\n",
+ "h2 = 1\n",
+ "k2 = 1\n",
+ "l2 = 0\n",
+ "d2 = 1/((h2**2+k2**2+l2**2)**0.5)\n",
+ "\n",
+ "#For (111) plane,\n",
+ "h3 = 1\n",
+ "k3 = 1\n",
+ "l3 = 1\n",
+ "d3 = 1/((h3**2+k3**2+l3**2)**0.5)\n",
+ "\n",
+ "#Result\n",
+ "print \"d100:d110:d111 =\",d1,\":\",d2,\":\",d3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "d100:d110:d111 = 1.0 : 0.707106781187 : 0.57735026919\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5, Page number 3.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "#Coefficients of intercepts along three axes\n",
+ "m = 1.\n",
+ "n = 1./2.\n",
+ "p = 3.\n",
+ "\n",
+ "#Calculations\n",
+ "m_inv = 1/m \n",
+ "n_inv = 1/n\n",
+ "p_inv = 1/p\n",
+ "\n",
+ "def gcd(a, b):\n",
+ " while b: \n",
+ " a, b = b, a % b\n",
+ " return a\n",
+ "\n",
+ "def lcm(a, b):\n",
+ " return (a * b)/ gcd(a, b)\n",
+ "\n",
+ "def lcmm(*args): \n",
+ " return reduce(lcm, args)\n",
+ "\n",
+ "mul_fact = lcmm(1,1,3)\n",
+ "m1 = m_inv*mul_fact #Clear the first fraction\n",
+ "m2 = n_inv*mul_fact #Clear the second fraction\n",
+ "m3 = p_inv*mul_fact #Clear the third fraction\n",
+ "print \"The required miller indices are\", m1,m2,m3\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required miller indices are 3.0 6.0 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page number 3.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 0.282*10**-9 #lattice spacing(m)\n",
+ "n = 1 #first order\n",
+ "theta = 8.35 #glancing angle(degrees)\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = (2*d*math.sin(math.radians(theta)))/n\n",
+ "\n",
+ "#For maximum value possible,\n",
+ "theta = 90\n",
+ "n = (2*d)/lamda\n",
+ "\n",
+ "#Results\n",
+ "print \"Wavelength of X-rays =\",round((lamda/1E-9),4),\"nm\"\n",
+ "print \"Maximum order of diffraction possible =\",round(n,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of X-rays = 0.0819 nm\n",
+ "Maximum order of diffraction possible = 6.89\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8, Page number 3.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1.5418*10**-10 #wavelength(m)\n",
+ "theta = 30 #angle(degrees)\n",
+ "n = 1 #first order\n",
+ "#For (111) plane\n",
+ "h = 1\n",
+ "k = 1\n",
+ "l = 1\n",
+ "\n",
+ "#Calculations\n",
+ "d = (n*lamda)/(2*math.sin(math.radians(theta)))\n",
+ "a = d*((h**2+k**2+l**2)**0.5)\n",
+ "\n",
+ "#Result\n",
+ "print \"Interatomic spacing =\",round((a/1E-10),3),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Interatomic spacing = 2.67 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9, Page number 3.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import sqrt, pi \n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 0.28 #lattice spacing\n",
+ "lamda = 0.074*10**-9 #Wavelength(m)\n",
+ "n = 2 #2nd order\n",
+ "\n",
+ "#Calculations\n",
+ "d110 = d/sqrt(2)\n",
+ "theta = math.asin((n*lamda)/(2*d110))*180/pi\n",
+ "\n",
+ "#Result\n",
+ "print \"Glancing angle =\",round(theta/1E-9),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Glancing angle = 21.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10, Page number 3.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.38*10**-9 #lattice constant\n",
+ "h = 1\n",
+ "k = 1\n",
+ "l = 0\n",
+ "\n",
+ "#Calculations\n",
+ "d = a/math.sqrt(h**2+k**2+l**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Distance =\",round((d/1E-9),2),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance = 0.27 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11, Page number 3.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = Symbol('a')\n",
+ "\n",
+ "#Calculations\n",
+ "#For (110) plane\n",
+ "a1 = math.sqrt(2)*a**2 #area of plane\n",
+ "n1 = (1./4 )*4 #no. of atoms in this plane\n",
+ "rho1 = n1/a1\n",
+ "\n",
+ "#For (111) plane\n",
+ "EO = (a*math.sqrt(3))/math.sqrt(2)\n",
+ "a2 = (a*EO)/math.sqrt(2)\n",
+ "n2 = 3*(1./6.)\n",
+ "rho2 = n2/a2\n",
+ "\n",
+ "#Result\n",
+ "print \"Density of lattice points (111) plane:density of lattice points (110) plane =\",rho2,\":\",rho1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of lattice points (111) plane:density of lattice points (110) plane = 0.577350269189626/a**2 : 0.707106781186547/a**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_4.ipynb b/Solid_state_physics/Chapter_4.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_4.ipynb
+++ b/Solid_state_physics/Chapter_4.ipynb
diff --git a/Solid_state_physics/Chapter_4_1.ipynb b/Solid_state_physics/Chapter_4_1.ipynb
new file mode 100755
index 00000000..019aaef9
--- /dev/null
+++ b/Solid_state_physics/Chapter_4_1.ipynb
@@ -0,0 +1,189 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c896524cb6d8dfdd75df5649979d411984ee380fa5c3cbff49f27851e63b1fb4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:Defects in Solids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, Page number 4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k = 1.38*10**-23 #Boltzmann constant(eV/K)\n",
+ "e = 1.6*10**-19 #Electronic charge(C)\n",
+ "T1 = 500 #First temperature for metal(K)\n",
+ "T2 = 1000 #Second temperature for metal(K)\n",
+ "Ev = 1 #Average energy required to create a vacancy in metal(eV)\n",
+ "\n",
+ "#Calculations\n",
+ "x = k/e\n",
+ "#n_500 = N*exp(-Ev/T1*k) ---(1)\n",
+ "#n_1000 = N*exp(-Ev/T2*k) ---(2)\n",
+ "#Dividing (1) by (2), we get the following expression\n",
+ "n = math.exp(Ev/(T2*x))\n",
+ "\n",
+ "#Result\n",
+ "print \"Ratio of vacancies=\",round((n/1E+5),3),\"*10^5\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of vacancies= 1.085 *10^5\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2, Page number 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1_by_N = 1.*10**-10 #frequency of vacancy sites at 500 C\n",
+ "T1 = 500.+273. #K\n",
+ "T2 = 1000.+273. #K\n",
+ "\n",
+ "#Calculations\n",
+ "x = math.exp((T1/T2)*math.log(n1_by_N))\n",
+ "\n",
+ "#Result\n",
+ "print \"Frequency of vacancy sites at 1000 C =\",round((x/1E-7),4),\"*10^-7\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of vacancy sites at 1000 C = 8.467 *10^-7\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3, Page number 4.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "r = 2.82*10**-10 #interionic distance(m)\n",
+ "n = 5*10**11 #density of Schottky defect(per m^3)\n",
+ "T = 25+273 #temperature(K)\n",
+ "k = 8.625*10**-5 #Boltzmann constant(/K)\n",
+ "\n",
+ "#Calculations\n",
+ "v = (2*r)**3 #volume of one unit cell(m^3)\n",
+ "N = 4/v #density of ion pairs\n",
+ "Es = 2*k*T*2.303*math.log10(N/n)\n",
+ "\n",
+ "#Result\n",
+ "print \"The average energy required for creation of one Schottky defect is\",round(Es,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average energy required for creation of one Schottky defect is 1.971 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, Page number 4.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "T1 = 20+273 #K\n",
+ "T2 = 300+273 #K\n",
+ "Ef = 1.4 #average energy for creating a Freknel defect(eV)\n",
+ "k = 8.625*10**-5 #Boltzmann constant(J/K)\n",
+ "N = 1 #For simplicity assume total number of metal ions to be unity\n",
+ "Ni = 1 #For simplicity assume total number of metal ions to be unity\n",
+ "\n",
+ "#Calculations\n",
+ "n1 = (N*Ni)**0.5*math.exp(-Ef/(2*k*T1)) \n",
+ "n2 = (N*Ni)**0.5*math.exp(-Ef/(2*k*T2)) \n",
+ "x = n1/n2\n",
+ "\n",
+ "#Result\n",
+ "print \"The ratio of the number of Frenkel defects is\",round((x/1E-6),2),\"*10^-6 or\",round(((1/x)/1E+5),2),\"*10^5\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of the number of Frenkel defects is 1.32 *10^-6 or 7.56 *10^5\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_5.ipynb b/Solid_state_physics/Chapter_5.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_5.ipynb
+++ b/Solid_state_physics/Chapter_5.ipynb
diff --git a/Solid_state_physics/Chapter_5_1.ipynb b/Solid_state_physics/Chapter_5_1.ipynb
new file mode 100755
index 00000000..42776694
--- /dev/null
+++ b/Solid_state_physics/Chapter_5_1.ipynb
@@ -0,0 +1,498 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cd8528b1343f720ba16c3255f8c2f531a0d8db6500634023001bba60d12d390a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Principles of Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, Page number 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "c = 3*10**8 #velocity of air(m/s)\n",
+ "m = 1.67*10**-27 #mass of proton(kg)\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "\n",
+ "#Calculation\n",
+ "v = c/10. #velocity of proton(m/s)\n",
+ "lamda = h/(m*v)\n",
+ "\n",
+ "#Result\n",
+ "print \"The de Brogile wavelength is\",round((lamda/1E-14),3),\"*10^-14 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Brogile wavelength is 1.323 *10^-14 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, Page number 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "V = 400 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V)\n",
+ "\n",
+ "#Result\n",
+ "print \"The de Brogile wavelength is\",lamda,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Brogile wavelength is 0.613 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3, Page number 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "E = 0.025 #kinetic energy of neutron(eV)\n",
+ "m = 1.674*10**-27 #mass of neutron(kg)\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "\n",
+ "#Calculations\n",
+ "E_j = E*1.6*10**-19 #converting eV to joules\n",
+ "lamda = h/math.sqrt(2*m*E_j)\n",
+ "\n",
+ "#Result\n",
+ "print \"The de Brogile wavelength is\",round((lamda/1E-11),3),\"*10^-11 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Brogile wavelength is 18.106 *10^-11 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page number 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "V = 1600 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V)\n",
+ "\n",
+ "#Result\n",
+ "print \"The de Brogile wavelength is\",lamda,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Brogile wavelength is 0.3065 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5, Page number 5.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1*10**-9 #length of each side of box(m)\n",
+ "#For lowest energy level,\n",
+ "nx = 1\n",
+ "ny = 1\n",
+ "nz = 1\n",
+ "\n",
+ "#Calculations\n",
+ "E1 = (((h**2)*(nx**2+ny**2+nz**2))/(8*m*L**2))/(1.6*10**-19)\n",
+ "\n",
+ "#Result\n",
+ "print \"The lowest energy of electron is\",round(E1,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The lowest energy of electron is 113.08 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6, Page number 5.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1*10**-9 #length of each side of box(m)\n",
+ "#For level next to lowest energy level,\n",
+ "nx = 1\n",
+ "ny = 1\n",
+ "nz = 2\n",
+ "\n",
+ "#Calculations\n",
+ "E1 = (((h**2)*(nx**2+ny**2+nz**2))/(8*m*L**2))/(1.6*10**-19)\n",
+ "\n",
+ "#Result\n",
+ "print \"The lowest energy of electron is\",round(E1,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The lowest energy of electron is 226.15 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7, Page number 5.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "E = 2000. #energy of electron(eV)\n",
+ "\n",
+ "#Calculations\n",
+ "Ej = E*1.6*10**-19 #converting eV to joules\n",
+ "lamda = h/math.sqrt(2*m*Ej)\n",
+ "\n",
+ "#Result\n",
+ "print \"The de Brogile wavelength is\",round((lamda/1E-9),4),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Brogile wavelength is 0.0275 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8, Page number 5.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 4*10**-10 #length of each side of box(m)\n",
+ "#For minimum energy \n",
+ "n = 1\n",
+ "\n",
+ "#Calculations\n",
+ "E1 = ((h**2)*(n**2))/(8*m*L**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Minimum energy =\",round((E1/1E-18),3),\"*10^-18 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum energy = 0.377 *10^-18 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9, Page number 5.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 1*10**-10 #length of each side of box(m)\n",
+ "n1 = 10 #For energy in ground state\n",
+ "n2 = 2 #For energy in first excited state\n",
+ "n3 = 3 #For energy in second excited state\n",
+ "\n",
+ "#Calculations\n",
+ "E1 = ((h**2)*(n1**2))/(8*m*L**2)\n",
+ "E2 = ((h**2)*(n2**2))/(8*m*L**2)\n",
+ "E3 = ((h**2)*(n3**2))/(8*m*L**2)\n",
+ "\n",
+ "#Results\n",
+ "print \"Energy in ground state =\",round((E1/1E-17),4),\"*10^17 J (Calculation mistake in textbook)\"\n",
+ "print \"Energy in first excited state =\",round((E2/1E-17),4),\"*10^17 J\"\n",
+ "print \"Energy in second excited state =\",round((E3/1E-17),4),\"*10^17 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy in ground state = 60.3075 *10^17 J (Calculation mistake in textbook)\n",
+ "Energy in first excited state = 2.4123 *10^17 J\n",
+ "Energy in second excited state = 5.4277 *10^17 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10, Page number 5.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #Planck's constant(J x sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "lamda = 1.66*10**-10 #wavelength(m)\n",
+ "\n",
+ "#Calculations\n",
+ "v = h/(m*lamda)\n",
+ "KE = (m*v**2)/(2*1.6*10**-19) #in joules\n",
+ "\n",
+ "#Result\n",
+ "print \"Velocity of electron =\",round((v/1E+7),4),\"*10^7 m\"\n",
+ "print \"Kinetic energy of electron =\",round(KE,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of electron = 0.4386 *10^7 m\n",
+ "Kinetic energy of electron = 54.71 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11, Page number 5.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "V = 15*10**3 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V)\n",
+ "\n",
+ "#Result\n",
+ "print \"The de Brogile wavelength is\",round(lamda,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Brogile wavelength is 0.1 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12, Page number 5.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Varaible declaration\n",
+ "V = 344 #potential(V)\n",
+ "theta = 60 #glancing angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V)\n",
+ "#For first reflection \n",
+ "n = 1\n",
+ "d = (n*lamda)/(2*math.sin(math.radians(theta)))\n",
+ "\n",
+ "#Result\n",
+ "print \"The interatomic spacing of the crystal is\",round(d,4),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The interatomic spacing of the crystal is 0.3816 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_6.ipynb b/Solid_state_physics/Chapter_6.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_6.ipynb
+++ b/Solid_state_physics/Chapter_6.ipynb
diff --git a/Solid_state_physics/Chapter_6_1.ipynb b/Solid_state_physics/Chapter_6_1.ipynb
new file mode 100755
index 00000000..2b4f9a24
--- /dev/null
+++ b/Solid_state_physics/Chapter_6_1.ipynb
@@ -0,0 +1,386 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:425f92ebc94b7b662d737292c7c739a2d9f7bf01d4a0a5239c1380861a6af3a7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Electron theory of Metals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1, Page number 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "rho_s = 10.5*10**3 #density of silver(kg/m^3)\n",
+ "Na = 6.02*10**26 #Avogadro's number\n",
+ "Ma = 107.9 #atomic weight of silver\n",
+ "sigma = 6.8*10**7 #conductivity(/ohm-m)\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "n = (rho_s*Na)/Ma\n",
+ "u = sigma/(n*e)\n",
+ "\n",
+ "#Results\n",
+ "print \"Density of electrons =\",round((n/1E+28),2),\"*10^28\"\n",
+ "print \"Mobility of electrons =\",round((u/1E-2),3),\"*10^-2 m^2/V-s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of electrons = 5.86 *10^28\n",
+ "Mobility of electrons = 0.725 *10^-2 m^2/V-s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2, Page number 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "den = 8.92*10**3 #density(kg/m^3)\n",
+ "rho = 1.73*10**-8 #resistivity of copper(ohm-m)\n",
+ "Ma = 63.5 #atomic weight\n",
+ "e = 1.6*10**-19 #charge of an electron(C)\n",
+ "Na = 6.02*10**26 #Avogadro's number\n",
+ "m = 9.1*10**-31 #mass of an electron(kg)\n",
+ "\n",
+ "#Calculations\n",
+ "n = (den*Na)/Ma\n",
+ "u = 1/(rho*n*e)\n",
+ "tou = m/(n*e**2*rho)\n",
+ "\n",
+ "#Results\n",
+ "print \"Mobility of electrons =\",round((u/1E-2),3),\"*10^-2 m/V-s\"\n",
+ "print \"Average time of collision of electrons =\",round((tou/1E-14),2),\"*10^-14 s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mobility of electrons = 0.427 *10^-2 m/V-s\n",
+ "Average time of collision of electrons = 2.43 *10^-14 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3, Page number 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "P = 1.54*10**-8 #resistivity(ohm-m)\n",
+ "n = 5.8*10**28 #no. of electrons per m^3\n",
+ "m = 9.108*10**-31 #mass of an elecron(kg)\n",
+ "e = 1.602*10**-19 #charge of an electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "tou = m/(n*e**2*P)\n",
+ "\n",
+ "#Result\n",
+ "print \"The relaxation time of conducton of electrons is\",round((tou/1E-14),2),\"*10^-14 s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The relaxation time of conducton of electrons is 3.97 *10^-14 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "R = 0.06 #resistance(ohms)\n",
+ "D = 5 #length of wire(m)\n",
+ "I = 15 #current(A)\n",
+ "p = 2.7*10**-8 #resistivity of aluminium(ohm-m)\n",
+ "Ma = 26.98 #atomic weight\n",
+ "Na = 6.025*10**26 #Avogadro's number\n",
+ "rho_s = 2.7*10**3 #sensity(kg/m^3)\n",
+ "\n",
+ "#Calculations\n",
+ "#Since each free atom atom contains 3 electrons, therefore,\n",
+ "n = (3*rho_s*Na)/Ma\n",
+ "\n",
+ "#For mobility\n",
+ "u = 1/(n*e*p)\n",
+ "\n",
+ "#For drift velocity\n",
+ "E = (I*R)/D\n",
+ "vd = u*E\n",
+ "\n",
+ "#Results\n",
+ "print \"Free electron concentration =\",round((n/1E+29),4),\"*10^29 electrons/m^2\"\n",
+ "print \"Mobility of electrons =\",round((u/1E-3),3),\"*10^-3 m/V-s\"\n",
+ "print \"Drift velocity of electrons =\",round((vd/1E-3),3),\"*10^-3 m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Free electron concentration = 1.8088 *10^29 electrons/m^2\n",
+ "Mobility of electrons = 1.278 *10^-3 m/V-s\n",
+ "Drift velocity of electrons = 0.23 *10^-3 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5, Page number 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "L = 0.1*10**-9 #length of each side of box(m)\n",
+ "h = 6.62*10**-34 #Planck's constant(J-s)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "#For lowest energy,\n",
+ "nx = 1\n",
+ "ny = 1\n",
+ "nz = 1\n",
+ "\n",
+ "#Calculations\n",
+ "E1 = (((h**2)*(nx**2+ny**2+nz**2))/(8*m*L**2))//(1.6*10**-19)\n",
+ "\n",
+ "#Result\n",
+ "print \"The lowest energy of electron is\",round(E1,2),\"eV\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The lowest energy of electron is 112.0 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exmple 6.6, Page number 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "'''Fermi equation\n",
+ "F(E) = 1\n",
+ " ---------------\n",
+ " 1+exp((E-Ef)/kT)\n",
+ "Given, E-Ef = kT\n",
+ "therefore,\n",
+ "F(E) = 1\n",
+ " --------\n",
+ " 1+exp(1)\n",
+ "'''\n",
+ "\n",
+ "#Calculation\n",
+ "Fe = 1./(1.+math.exp(1.))\n",
+ "\n",
+ "#Result\n",
+ "print \"F(E) =\",round(Fe,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F(E) = 0.269\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7, Page number 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "Fe = 10./100. #probability\n",
+ "Ef = 5.5 #Fermi energy(eV)\n",
+ "k = 1.38*10**-23\n",
+ " \n",
+ "#Calculations\n",
+ "'''Fermi equation\n",
+ "F(E) = 1\n",
+ " ---------------\n",
+ " 1+exp((E-Ef)/kT)\n",
+ "'''\n",
+ "E = Ef+(Ef/100)\n",
+ "E_Ef = (E - Ef)*1.6*10**-19 #(J)\n",
+ "\n",
+ "#Let x be E-Ef/k\n",
+ "x = E_Ef/k\n",
+ "T = x/math.log(-(1-(1/Fe)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Temperature =\",round(T,2),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 290.22 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8, Page number 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "Fe = 1./100. #probability\n",
+ "Ef = 0.5 #Fermi energy(eV)\n",
+ "k = 1.38*10**-23\n",
+ " \n",
+ "#Calculations\n",
+ "'''Fermi equation\n",
+ "F(E) = 1\n",
+ " ---------------\n",
+ " 1+exp((E-Ef)/kT)\n",
+ "'''\n",
+ "\n",
+ "E = Ef+0.5\n",
+ "E_Ef = (E - Ef)*1.6*10**-19 #(J)\n",
+ "\n",
+ "#Let x be E-Ef/k\n",
+ "x = E_Ef/k\n",
+ "T = x/math.log(-(1-(1/Fe)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Temperature =\",round(T),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 1262.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_7.ipynb b/Solid_state_physics/Chapter_7.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_7.ipynb
+++ b/Solid_state_physics/Chapter_7.ipynb
diff --git a/Solid_state_physics/Chapter_7_1.ipynb b/Solid_state_physics/Chapter_7_1.ipynb
new file mode 100755
index 00000000..c3599dfb
--- /dev/null
+++ b/Solid_state_physics/Chapter_7_1.ipynb
@@ -0,0 +1,330 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9ccabd1c0a5d5861a1e63defe760a8b9caed49864d9aebb3ab3b0741ed755b61"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Dielectric Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1, Page number 7.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "C = 2*10**-6 #Capacitance(F)\n",
+ "V = 1000 #voltage(V)\n",
+ "Er = 100 #permittivity\n",
+ "\n",
+ "#Calculations\n",
+ "W = (C*V**2)/2\n",
+ "\n",
+ "Co = C/Er\n",
+ "Wo = (Co*V**2)/2\n",
+ "Wf = W-Wo\n",
+ "\n",
+ "#Result\n",
+ "print \"Energy stored in condenser =\",W,\"J\"\n",
+ "print \"Energy stored in polarizing the dilectric =\",Wf,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy stored in condenser = 1.0 J\n",
+ "Energy stored in polarizing the dilectric = 0.99 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2, Page number 7.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaraion\n",
+ "Er = 4.94 #permittivity\n",
+ "n2 = 2.69 #index of refraction\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "Er - 1 N(ae+ai)\n",
+ "------ = ---------\n",
+ "Er + 2 3*Eo \n",
+ "Sunbstituting the values for Er, we get,\n",
+ "N(ae+ai) \n",
+ "-------- = 0.5677 ------------(1)\n",
+ " 3*ao\n",
+ "'''\n",
+ "x = 0.5677\n",
+ "\n",
+ "'''\n",
+ "Also, Er = n**2\n",
+ "Therefore, n**2-1 N*ae\n",
+ " ------- = -----\n",
+ " n**2+2 3*Eo\n",
+ "Substituting the values for n^2, we get,\n",
+ "N*ae\n",
+ "---- = 0.36034 ---------------(2)\n",
+ "3*Eo\n",
+ "'''\n",
+ "y = 0.36034\n",
+ "#Let z = ai/ae\n",
+ "#Dividing equation (1) by (2), we get,\n",
+ "\n",
+ "z = (x/y)-1\n",
+ "\n",
+ "#Result\n",
+ "print \"Ratio between electronic and ionic probabbility is\",round(z,3) ,\"or\",round((1/z),3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio between electronic and ionic probabbility is 0.575 or 1.738\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3, Page number 7.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Er = 2.56 #permittivity\n",
+ "f = 1*10**6 #frequency(Hz)\n",
+ "A = 8*10**-4 #area(m^2)\n",
+ "d= 0.08*10**-3 #distance of seperation(m)\n",
+ "Eo = 8.85*10**-12\n",
+ "\n",
+ "#Calculations\n",
+ "Er_dash = Er*0.7*10**-4\n",
+ "w = 2*math.pi*f\n",
+ "Rp = d/(w*Eo*Er_dash*A)\n",
+ "\n",
+ "Cp = (A*Eo*Er)/d\n",
+ "\n",
+ "#Results\n",
+ "print \"Parallel loss resistance =\",round((Rp/1E+6),2),\"MOhms\"\n",
+ "print \"Capacitance =\",Cp,\"F(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parallel loss resistance = 10.04 MOhms\n",
+ "Capacitance = 2.2656e-10 F(Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5, Page number 7.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "N = 3.*10**28 #density(atoms/m^3)\n",
+ "ae = 10.**-40 #electronic polarizability(F m^2)\n",
+ "Eo = 8.854*10**-12 #permittivity of free space(F/m)\n",
+ "\n",
+ "#Calculaion\n",
+ "Er = 1+((N*ae)/Eo)\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric constant =\",round(Er,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dielectric constant = 1.339\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5, Page number 7.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Er = 1.0000684 #permittivity of dilectric\n",
+ "Eo = 8.854*10**-12 #permittivity of free space(F/m)\n",
+ "N = 2.7*10**25 #density(atoms/m^3)\n",
+ "\n",
+ "#Calculation\n",
+ "ae = (Eo*(Er-1))/N\n",
+ "\n",
+ "#Result\n",
+ "print \"Electronic polarizability =\",round((ae/1E-41),3),\"*10^-41 Fm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Electronic polarizability = 2.243 *10^-41 Fm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6, Page number 7.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "A = 100*10**-4 #area of parallel capacitor(m^2)\n",
+ "d = 1*10**-2 #separation between plates(m)\n",
+ "Eo = 8.854*10**-12 #permittivity of free space(F/m)\n",
+ "V = 100 #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "C = (Eo*A)/d\n",
+ "Q = C*V\n",
+ "\n",
+ "#Result\n",
+ "print \"Capacitance =\",round((C/1E-12),2),\"pF\"\n",
+ "print \"Charge =\",Q,\"C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance = 8.85 pF\n",
+ "Charge = 8.854e-10 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7, Page number 7.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "N = 6.02*10**26 #Avogadro's number\n",
+ "den = 2050 #density(kg/m^3)\n",
+ "Ma = 32 #atomic weight\n",
+ "Eo = 8.55*10**-12 #permittivity of free space(F/m)\n",
+ "v = 1/3 #internal field constant\n",
+ "Er = 3.75 #dielectric constant of sulphur\n",
+ "\n",
+ "#Calculations\n",
+ "n = (N*den)/Ma #no. of atoms per m^3\n",
+ "ae = ((Er-1)/(Er+2))*((3*Eo)/n)\n",
+ "\n",
+ "#Result\n",
+ "print \"Electronic polarizability =\",round((ae/1E-40),3),\"*10^-41 Fm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Electronic polarizability = 3.181 *10^-41 Fm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_8.ipynb b/Solid_state_physics/Chapter_8.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_8.ipynb
+++ b/Solid_state_physics/Chapter_8.ipynb
diff --git a/Solid_state_physics/Chapter_8_1.ipynb b/Solid_state_physics/Chapter_8_1.ipynb
new file mode 100755
index 00000000..161a8521
--- /dev/null
+++ b/Solid_state_physics/Chapter_8_1.ipynb
@@ -0,0 +1,436 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:fbb68fbb0713029438d419fcf28fa2bcf0bc60f8a093b90691d3e7397e7a942d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8:Magnetic Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1, Page number 8.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "M = 1.4 #value of magnetic field when filled with iron\n",
+ "H = 6.5*10**-4 #value of magnetic field in the interior\n",
+ "\n",
+ "#Calculations\n",
+ "x = M/H\n",
+ "ur = 1+x\n",
+ "\n",
+ "#Result\n",
+ "print \"Relative permeability of iron is\",round(ur,2),\"(Calculation mistake in textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative permeability of iron is 2154.85 (Calculation mistake in textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2, Page number 8.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "M = 3300 #value of magnetic filed(amp/m) \n",
+ "H = 220 #strength of magnetic filed(amp/m)\n",
+ "\n",
+ "#Calculations\n",
+ "x = (M/H)+1\n",
+ "\n",
+ "#Result\n",
+ "print \"Relative permeability of iron is\",round(x,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative permeability of iron is 16.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3, Page number 8.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**6 #magnetic field intensity(amp/m)\n",
+ "x = 1.5*10**-3 #susceptibility\n",
+ "Uo = 4*pi*10**-7 \n",
+ "\n",
+ "#Calculations\n",
+ "M = x*H #magnetization of material\n",
+ "B = Uo*(M+H) #flux density\n",
+ "\n",
+ "#Result\n",
+ "print \"Magnetization =\",round((M/1E+3),1),\"*10^3 A/m\"\n",
+ "print \"Flux density =\",round(B,3),\"T\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetization = 1.5 *10^3 A/m\n",
+ "Flux density = 1.259 T\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4, Page number 8.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**4 #magnetic field intensity(amp/m)\n",
+ "x = 3.7*10**-3 #susceptibility\n",
+ "Uo = 4*pi*10**-7 \n",
+ "\n",
+ "#Calculations\n",
+ "M = x*H #magnetization of material\n",
+ "B = Uo*(M+H) #flux density\n",
+ "\n",
+ "#Result\n",
+ "print \"Magnetization =\",M,\"A/m\"\n",
+ "print \"Flux density =\",round(B,4),\"wb/m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetization = 37.0 A/m\n",
+ "Flux density = 0.0126 wb/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5, Page number 8.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "I = 500*10**-3 #current(A)\n",
+ "d = 10*10**-2 #diameter of loop(m)\n",
+ "\n",
+ "#Calculations\n",
+ "r = d/2 #radius(m)\n",
+ "A = 2*pi*r**2 #area(m^2)\n",
+ "Um = I*A\n",
+ "\n",
+ "#Result\n",
+ "print \"Magnetic moment =\",round((Um/1E-3),3),\"*10^-3 A-m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic moment = 7.854 *10^-3 A-m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6, Page number 8.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "r = 5.29*10**-11 #radius of the orbit(m)\n",
+ "B = 2 #field strength(Tesla)\n",
+ "e = 1.602*10**-19 #charge of an electron(C)\n",
+ "m = 9.108*10**-31 #mass of an electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "Uind = (e**2*r**2*B)/(4*m)\n",
+ "\n",
+ "#Result\n",
+ "print \"Change in magnetic moment =\",round((Uind/1E-29),3),\"*10^-29 A-m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in magnetic moment = 3.943 *10^-29 A-m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7, Page number 8.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Varaible declaration\n",
+ "T1 = 350 #temperature(K)\n",
+ "x1 = 2.8*10**-4 #susceptibility at T1\n",
+ "T2 = 300 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "x2 = (x1*T1)/T2\n",
+ "\n",
+ "#Result\n",
+ "print \"Susceptibility at 300k is\",round((x2/1E-4),3),\"*10^-4\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Susceptibility at 300k is 3.267 *10^-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8, Page number 8.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi \n",
+ "\n",
+ "#Variable declaration\n",
+ "den = 8906 #density of nickel(kg/m^3)\n",
+ "N = 6.025*10**26 #Avogadro's number\n",
+ "Ma = 58.7 #atomic weight\n",
+ "Bs = 0.65 #magnetic induction(wb/m^2)\n",
+ "Uo = 4*pi*10**-7\n",
+ "\n",
+ "#Calculations\n",
+ "n = (den*N)/Ma #no. of nickel atoms per m^3\n",
+ "\n",
+ "#Since x is very large, B = n*Uo*Um\n",
+ "Um = Bs/(n*Uo))\n",
+ "\n",
+ "#Result\n",
+ "print \"Magnetic moment =\",Um,\"A-m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic moment = 5.65850692635e-24 A-m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9, Page number 8.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 2 #magnetic filed intensity(wb/m^2)\n",
+ "U = 9.4*10**-24\n",
+ "k = 1.38*10**-23\n",
+ "\n",
+ "#Calculations\n",
+ "'''\n",
+ "n = c*no*exp(-Eg/kT) #no. of electrons\n",
+ "where Eg = -U*H\n",
+ "For parallel orientation,Eg = -U*H\n",
+ "For antiparallel orientation, Eg = U*H\n",
+ "therefore,\n",
+ "np = c*no*exp(U*H/kT) ---(1)\n",
+ "na = c*no*exp(-U*H/kT) ---(2)\n",
+ "Dividing (1) by (2), we get,'''\n",
+ "\n",
+ "T = (2*U*H)/(math.log(2)*k)\n",
+ "\n",
+ "#Result\n",
+ "print \"T=\",round(T,1),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T= 3.9 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10, Page number 8.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable declaration\n",
+ "Uo = 4*pi*10**-7\n",
+ "Ma = 157.26 #atomic weight og gadolinium\n",
+ "den = 7.8*10**3 #density(kg/m^3)\n",
+ "N = 6.025*10**26 #Avogadro's number\n",
+ "x = 7.1 #Bohr magnetron per atom\n",
+ "Um = 9.27*10**-24\n",
+ "\n",
+ "#Calculations\n",
+ "n = (den*N)/Ma #no. of atoms in 1 kg\n",
+ "n1 = n*10**-3 #no. of atoms in 1 gm\n",
+ "M = n1*x*Um #magnetic moment per gram(a-m^2)\n",
+ "\n",
+ "Bs = n*Uo*Um #saturization magnetization\n",
+ "\n",
+ "#Result\n",
+ "print \"Magnetic moment per gram =\",round(M,3),\"Am^2\"\n",
+ "print \"Saturization magnetization =\",round(Bs,3),\"Wb/m^2(Calculation mistake in textbok)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic moment per gram = 1966.851 Am^2\n",
+ "Saturization magnetization = 0.348 Wb/m^2(Calculation mistake in textbok)\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/Chapter_9.ipynb b/Solid_state_physics/Chapter_9.ipynb
index e69de29b..e69de29b 100644..100755
--- a/Solid_state_physics/Chapter_9.ipynb
+++ b/Solid_state_physics/Chapter_9.ipynb
diff --git a/Solid_state_physics/Chapter_9_1.ipynb b/Solid_state_physics/Chapter_9_1.ipynb
new file mode 100755
index 00000000..70a3843c
--- /dev/null
+++ b/Solid_state_physics/Chapter_9_1.ipynb
@@ -0,0 +1,845 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b86f6f4d444d5177f7a40efe10b2b4ac505571f2f5cf98eeaa6619afa2ee7d22"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1, Page number 9.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.37*10**19 #intrinsic carrier density(m^-3)\n",
+ "ue = 0.38 #electron mobility(m^2/V-s)\n",
+ "uh = 0.18 #hole mobility(m^2/V-s)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "sigma_i = ni*e*(ue+uh) #(1/ohm-m)\n",
+ "p = 1/sigma_i\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistivity =\",round(p,3),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistivity = 0.471 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2, Page number 9.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg = 1.12 #bandgap(eV)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "T = 300 #Temperature(K)\n",
+ "mh = 0.28 #Effective Mass of the hole(kg)\n",
+ "me = 0.12 #Effective Mass of the hole(kg)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "\n",
+ "#Calculation\n",
+ "Ef = (Eg/2)+3/4*k*T*(math.log(mh/me))/e\n",
+ "\n",
+ "#Result \n",
+ "print \"The position of the Fermi level is at\",round(Ef,2),\"from the top of valence band\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The position of the Fermi level is at 0.56 from the top of valence band\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3, Page number 9.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi, exp\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.109*10**-31 #mass of an electron(kg)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "T = 300 #Temperature(K)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "Eg = 0.7 #bandgap(eV)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "\n",
+ "#Calculation\n",
+ "C = (((2*pi*m*k)/h**2)**(3./2.)) \n",
+ "T1 = T**(3./2.)\n",
+ "E = exp((-Eg*e)/(2*k*T))\n",
+ "ni = 2*C*T1*E\n",
+ "\n",
+ "#Result\n",
+ "print \"Concentration of intrinsic charge carriers =\",round((ni/1E+18),2),\"*10**18/m^3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Concentration of intrinsic charge carriers = 33.48 *10**18/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4, Page number "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.4*10**19 #intrinsic carrier density(m^-3)\n",
+ "ue = 0.39 #electron mobility(m^2/V-s)\n",
+ "uh = 0.19 #hole mobility(m^2/V-s)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "\n",
+ "#Calculations\n",
+ "sigma_i = ni*e*(ue+uh) #(1/ohm-m)\n",
+ "p = 1/sigma_i\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistivity =\",round(p,3),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistivity = 0.449 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5, Page number 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.5*10**19 #intrinsic carrier density(m^-3)\n",
+ "ue = 0.39 #electron mobility(m^2/V-s)\n",
+ "uh = 0.19 #hole mobility(m^2/V-s)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "l = 1*10**-2 #length of rod(m)\n",
+ "A = 10**-3*10**-3 #area(m^2)\n",
+ "\n",
+ "#Calculations\n",
+ "sigma = ni*e*(ue+uh) #(1/ohm-m)\n",
+ "R = 1/(sigma*A)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistivity =\",round(R,3),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistivity = 431034.483 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6, Page number 9.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi, exp\n",
+ "\n",
+ "#Variable declaration\n",
+ "ue = 0.48 #electron mobility(m^2/V-s)\n",
+ "uh = 0.013 #hole mobility(m^2/V-s)\n",
+ "Eg = 1.1 #bandgap(eV)\n",
+ "T = 300 #assumption - Temperature(K)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "m = 9.1*10**-31 #mass of an electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "C = 2*(((2*pi*m*k)/h**2))**(3./2.)\n",
+ "ni = C*T**(3./2.)*exp((-Eg*e)/(2*k*T))\n",
+ "sigma_i = ni*e*(ue+uh)\n",
+ "\n",
+ "#Result\n",
+ "print \"Conductivity=\",round((sigma_i/1E-3),3),\"*10^-3/ohm-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conductivity= 1.159 *10^-3/ohm-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7, Page number 9.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi, exp\n",
+ "\n",
+ "#Variable declaration\n",
+ "ue = 0.4 #electron mobility(m^2/V-s)\n",
+ "uh = 0.2 #hole mobility(m^2/V-s)\n",
+ "Eg = 0.7 #bandgap(eV)\n",
+ "T = 300 #assumption - Temperature(K)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "m = 9.1*10**-31 #mass of an electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "C = 2*(((2*pi*m*k)/h**2))**(3./2.)\n",
+ "ni = C*T**(3./2.)*exp((-Eg*e)/(2*k*T))\n",
+ "sigma_i = ni*e*(ue+uh)\n",
+ "\n",
+ "#Result\n",
+ "print \"Intrinsic carrier density =\",round((ni/1E+19),2),\"*10^19 per m^3\"\n",
+ "print \"Conductivity=\",round(sigma_i,2),\"/ohm-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intrinsic carrier density = 3.34 *10^19 per m^3\n",
+ "Conductivity= 3.21 /ohm-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8, Page number 9.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "ue = 0.36 #electron mobility(m^2/V-s)\n",
+ "uh = 0.17 #hole mobility(m^2/V-s)\n",
+ "P = 2.12 #resistivity(ohm-m)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "m = 9.1*10**-31 #mass of an electron(kg)\n",
+ "h = 6.626*10**-34 #Planck's constant\n",
+ "T = 300 #assumption - Temperature(K)\n",
+ "\n",
+ "#Calculations\n",
+ "sigma = 1/P\n",
+ "ni = sigma/(e*(ue+uh))\n",
+ "C = 2*(((2*pi*m*k)/h**2))**(3./2.)\n",
+ "Eg = ((2*k*T)/e)*math.log(C*(T**(3./2.))/ni)\n",
+ "\n",
+ "#Result\n",
+ "print \"Forbidden energy gap =\",round(Eg,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Forbidden energy gap = 0.793 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9, Page number 9.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log10\n",
+ "\n",
+ "#Variable declaration\n",
+ "p1 = 2 #resistivity(ohm-m)\n",
+ "p2 = 4.5 #resistivity(ohm-m)\n",
+ "T1 = 20.+273 #Temperature(K)\n",
+ "T2 = 32.+273 #temperature(K)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "\n",
+ "#Calculations\n",
+ "dy = log10(p2)-log10(p1)\n",
+ "dx = (1/T1)-(1/T2)\n",
+ "dy_by_dx = dy/dx\n",
+ "Eg = (2*k*dy_by_dx)/e\n",
+ "\n",
+ "#Result\n",
+ "print \"Energy band gap =\",round(Eg,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy band gap = 0.452 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10, Page number 9.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration\n",
+ "e = 1.602*10**-19 #charge on electron(C)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "Eg = 1*e #bandgap(J)\n",
+ "\n",
+ "#Calculations\n",
+ "'''At T = 0K\n",
+ "(Ev+0.5)=(Ec+Ev)/2 -----(1)\n",
+ "\n",
+ "Let at temperature T, fermi level be shited by 10%\n",
+ "(Ev+06) = (Ec+Ev)/2 +(3kT*ln(4))/4 ----(2)\n",
+ "\n",
+ "Subtracting (1) from (2), we get the following expression'''\n",
+ "\n",
+ "T = (4*e/10)/(3*k*log(4))\n",
+ "\n",
+ "#Result\n",
+ "print \"Temperature =\",round(T,2),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 1116.52 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.11, Page number 9.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Na = 5*10**23 #no. of atoms of boron\n",
+ "Nd = 3*10**23 #no. of atoms of arsenic\n",
+ "ni = 2*10**16 #intrinsic charge carriers(/m^3)\n",
+ "\n",
+ "#Calculations\n",
+ "p = (2*(Na-Nd))/2 #hole concentration(/m^3)\n",
+ "n = ni**2/p #electron concentration(/m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hole concentration =\",round((p/1E+23),2),\"*10^23 per m^3\"\n",
+ "print \"Electron concentration =\",round((n/1E+9),2),\"*10^9 per m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hole concentration = 2.0 *10^23 per m^3\n",
+ "Electron concentration = 2.0 *10^9 per m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.12, Page number 9.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "ue = 0.13 #electron mobility(m^2/V-s)\n",
+ "uh = 0.05 #hole mobility(m^2/V-s)\n",
+ "e = 1.602*10**-19 #charge on electron(C)\n",
+ "ni = 1.5*10**16 #intrinsic charge carriers(/m^3) \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "sigma = ni*e*(ue+uh) #conductivity(1/ohm-m)\n",
+ "\n",
+ "#Part b\n",
+ "w = 28.1 #atomic weight of Si\n",
+ "den = 2.33*10**3 #density of Si(kg/m^3)\n",
+ "n = (den*6.02*10**26)/w #no. of atoms of silicon\n",
+ "#Since one donor type impurity atom is added in 10^8 Si atoms, \n",
+ "Nd = n/10**8\n",
+ "p = ni**2/Nd\n",
+ "sigma_ex = Nd*e*ue #(per ohm-m)\n",
+ "\n",
+ "#Part c\n",
+ "Na = Nd #Since one acceptor type impurity atom is added in 10^8 Si atoms\n",
+ "n2 = ni**2/Na\n",
+ "sigma_ax = Na*e*uh #(per ohm-m)\n",
+ "\n",
+ "#Results\n",
+ "print \"a)Conductivity =\",round((sigma/1E-3),3),\"*10^-3 per ohm-m\"\n",
+ "print \"b)Conductivity if donor type impurity is added =\",round(sigma_ex,2),\"per ohm-m\"\n",
+ "print \"c)Conductivity if acceptor type impurity is added =\",round(sigma_ax,2),\"per ohm-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Conductivity = 0.433 *10^-3 per ohm-m\n",
+ "b)Conductivity if donor type impurity is added = 10.4 per ohm-m\n",
+ "c)Conductivity if acceptor type impurity is added = 4.0 per ohm-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.13, Page number 9.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable declaration\n",
+ "ue = 0.135 #electron mobility(m^2/V-s)\n",
+ "uh = 0.048 #hole mobility(m^2/V-s)\n",
+ "e = 1.602*10**-19 #charge on electron(C)\n",
+ "ni = 1.5*10**16 #intrinsic charge carriers(atoms/m^3)\n",
+ "k = 1.38*10**-23 #Boltzman constant(J/K)\n",
+ "T = 300 #assumption - Temperature(K)\n",
+ "Nd = 10**23 #doping concentration(atoms/m^3)\n",
+ "\n",
+ "#Calculations\n",
+ "sigma = ni*e*(ue+uh) #conductivity of intrinsic Si\n",
+ "\n",
+ "p = ni**2/Nd #hole concentration\n",
+ "\n",
+ "sigma_ex = Nd*e*ue #conductivity at equilibrium\n",
+ "F = (3*k*T)/(4*e)*log(ue/uh) #position of Fermi level\n",
+ "\n",
+ "#Results\n",
+ "print \"Conductivity of intrinsic Si is\",round((sigma/1E-3),4),\"*10^-3 per ohm-m\"\n",
+ "print \"Hole concentration at equilibrium is\",round((Nd/1E+23)),\"*10^23 per m^3\"\n",
+ "print \"Conductivity at equilibrium is\",round((sigma_ex/1E+3),2),\"*10^3 per m^3\"\n",
+ "print \"Fermi level will be\",round(F,2),\"eV above intrinsic level\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conductivity of intrinsic Si is 0.4397 *10^-3 per ohm-m\n",
+ "Hole concentration at equilibrium is 1.0 *10^23 per m^3\n",
+ "Conductivity at equilibrium is 2.16 *10^3 per m^3\n",
+ "Fermi level will be 0.02 eV above intrinsic level\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.14, Page number 9.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "ue = 0.19 #electron mobility(m^2/V-s)\n",
+ "e = 1.602*10**-19 #charge on electron(C)\n",
+ "T = 300 #Temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "Dn = (ue*k*T)/e\n",
+ "\n",
+ "#Result\n",
+ "print \"Diffusion co-efficient =\",round((Dn/1E-4),2),\"*10^-4 m^2/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diffusion co-efficient = 49.1 *10^-4 m^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.15, Page number 9.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Rh = 3.66*10**-4 #Hall coefficient\n",
+ "I = 10**-2 #current(A)\n",
+ "B = 0.5 #magnetic field intensity(wb/m^2)\n",
+ "t = 1.*10**-3 #thickness of plate(m)\n",
+ "\n",
+ "#Calculations\n",
+ "Vh = (Rh*I*B)/t\n",
+ "\n",
+ "#Result\n",
+ "print \"Hall coefficient =\",(Vh/1E-3),\"mV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall coefficient = 1.83 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.16, Page number 9.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Vy = 37*10**-6 #voltage(V)\n",
+ "t = 10**-3 #thickness of crystal(m)\n",
+ "Bz = 0.5 #magnetic field intensity(Wb/m^2)\n",
+ "Ix = 20*10**-3 #current(A)\n",
+ "\n",
+ "#Calculations\n",
+ "Vh = (Vy*t)/(Ix*Bz)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hall coefficient =\",(Vh/1E-6),\"*10^-6 m^3/C\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall coefficient = 3.7 *10^-6 m^3/C\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.17, Page number 9.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Rh = 7.35*10**-5 #Hall coefficient(m^3/C)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "sigma = 200 #conductivity(/ohm-m)\n",
+ "n = 8.023*10**22 #Avogadro's number\n",
+ "\n",
+ "#Calculations\n",
+ "n = 1/(Rh*e)\n",
+ "\n",
+ "u = sigma/(n*e)\n",
+ "\n",
+ "#Results\n",
+ "print \"Density =\",round((n/1E+22),3),\"*10^22 m^3\"\n",
+ "print \"Conductivity =\",round((u/1E-3),2),\"*10^-3 m^2/V-s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density = 8.503 *10^22 m^3\n",
+ "Conductivity = 14.7 *10^-3 m^2/V-s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.18, Page number 9.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "I = 50 #current(A)\n",
+ "B = 1.5 #magnetic field intensity(T)\n",
+ "n = 8.4*10**28 #free electron concentration in copper(electron/m^3)\n",
+ "t = 0.5*10**-2 #thickness of slab(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Vh = (I*B)/(n*e*t)\n",
+ "\n",
+ "#Result\n",
+ "print \"The magnitude of Hall voltage is\",round((Vh/1E-6),3),\"*10^-6 V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of Hall voltage is 1.116 *10^-6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.19, Page number 9.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "Rh = 3.66*10**-4 #Hall coefficient(m^3/C)\n",
+ "e = 1.6*10**-19 #charge on electron(C)\n",
+ "Pn = 8.93*10**-3 #resistivity(ohm-m)\n",
+ "\n",
+ "#Calculation\n",
+ "n = 1/(Rh*e)\n",
+ "\n",
+ "ue = Rh/Pn\n",
+ "\n",
+ "#Result\n",
+ "print \"n =\",round((n/1E+22),3),\"*10^22/m^3\"\n",
+ "print \"u =\",round(ue,3),\"m^2/V-s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n = 1.708 *10^22/m^3\n",
+ "u = 0.041 m^2/V-s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_state_physics/README.txt b/Solid_state_physics/README.txt
index 8821405d..23a89f36 100644..100755
--- a/Solid_state_physics/README.txt
+++ b/Solid_state_physics/README.txt
@@ -4,7 +4,7 @@ College/Institute/Organization: Anglo Eastern ship management india Pvt. Ltd
Department/Designation: Electrical & Electronics Officer
Book Title: Solid state physics
Author: P. K. Palanisamy
-Publisher: Scitech Publication (India) Pvt. Ltd., Chennai
+Publisher: Scitech Publication (India) Pvt. Ltd., Chennei
Year of publication: 2004
Isbn: 8188429279
Edition: 1st \ No newline at end of file
diff --git a/Solid_state_physics/screenshots/debrogile.png b/Solid_state_physics/screenshots/debrogile.png
new file mode 100755
index 00000000..f67e33ba
--- /dev/null
+++ b/Solid_state_physics/screenshots/debrogile.png
Binary files differ
diff --git a/Solid_state_physics/screenshots/hall.png b/Solid_state_physics/screenshots/hall.png
new file mode 100755
index 00000000..7f284bca
--- /dev/null
+++ b/Solid_state_physics/screenshots/hall.png
Binary files differ
diff --git a/Solid_state_physics/screenshots/lowestenergy.png b/Solid_state_physics/screenshots/lowestenergy.png
new file mode 100755
index 00000000..f7709f4e
--- /dev/null
+++ b/Solid_state_physics/screenshots/lowestenergy.png
Binary files differ
diff --git a/Solid_state_physics/screenshots/muktesh_1.png b/Solid_state_physics/screenshots/muktesh_1.png
index d96a515e..d96a515e 100644..100755
--- a/Solid_state_physics/screenshots/muktesh_1.png
+++ b/Solid_state_physics/screenshots/muktesh_1.png
Binary files differ
diff --git a/Solid_state_physics/screenshots/muktesh_2.png b/Solid_state_physics/screenshots/muktesh_2.png
index b287414f..b287414f 100644..100755
--- a/Solid_state_physics/screenshots/muktesh_2.png
+++ b/Solid_state_physics/screenshots/muktesh_2.png
Binary files differ
diff --git a/Solid_state_physics/screenshots/muktesh_3.png b/Solid_state_physics/screenshots/muktesh_3.png
index 8b14b011..8b14b011 100644..100755
--- a/Solid_state_physics/screenshots/muktesh_3.png
+++ b/Solid_state_physics/screenshots/muktesh_3.png
Binary files differ
diff --git a/Surveying_Volume_3/Chapter_1_.ipynb b/Surveying_Volume_3/Chapter_1_.ipynb
index da68e1c2..da68e1c2 100644..100755
--- a/Surveying_Volume_3/Chapter_1_.ipynb
+++ b/Surveying_Volume_3/Chapter_1_.ipynb
diff --git a/Surveying_Volume_3/Chapter_2.ipynb b/Surveying_Volume_3/Chapter_2.ipynb
index f9526973..f9526973 100644..100755
--- a/Surveying_Volume_3/Chapter_2.ipynb
+++ b/Surveying_Volume_3/Chapter_2.ipynb
diff --git a/Surveying_Volume_3/screenshots/solved_example.png.PNG b/Surveying_Volume_3/screenshots/solved_example.png.PNG
index 830e56f0..830e56f0 100644..100755
--- a/Surveying_Volume_3/screenshots/solved_example.png.PNG
+++ b/Surveying_Volume_3/screenshots/solved_example.png.PNG
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/solved_example_2.png.PNG b/Surveying_Volume_3/screenshots/solved_example_2.png.PNG
index dbcd4f71..dbcd4f71 100644..100755
--- a/Surveying_Volume_3/screenshots/solved_example_2.png.PNG
+++ b/Surveying_Volume_3/screenshots/solved_example_2.png.PNG
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/solved_example_3.png.PNG b/Surveying_Volume_3/screenshots/solved_example_3.png.PNG
index 0622b196..0622b196 100644..100755
--- a/Surveying_Volume_3/screenshots/solved_example_3.png.PNG
+++ b/Surveying_Volume_3/screenshots/solved_example_3.png.PNG
Binary files differ
diff --git a/Thermodynamics:_A_Core_Course/CH2.ipynb b/Thermodynamics:_A_Core_Course/CH2.ipynb
index 1adc4757..1adc4757 100644..100755
--- a/Thermodynamics:_A_Core_Course/CH2.ipynb
+++ b/Thermodynamics:_A_Core_Course/CH2.ipynb
diff --git a/Thermodynamics:_A_Core_Course/CH3.ipynb b/Thermodynamics:_A_Core_Course/CH3.ipynb
index fa64788f..fa64788f 100644..100755
--- a/Thermodynamics:_A_Core_Course/CH3.ipynb
+++ b/Thermodynamics:_A_Core_Course/CH3.ipynb
diff --git a/Thermodynamics:_A_Core_Course/CH4.ipynb b/Thermodynamics:_A_Core_Course/CH4.ipynb
index faa2aabc..faa2aabc 100644..100755
--- a/Thermodynamics:_A_Core_Course/CH4.ipynb
+++ b/Thermodynamics:_A_Core_Course/CH4.ipynb
diff --git a/Thermodynamics:_A_Core_Course/CH5.ipynb b/Thermodynamics:_A_Core_Course/CH5.ipynb
index 2b811195..2b811195 100644..100755
--- a/Thermodynamics:_A_Core_Course/CH5.ipynb
+++ b/Thermodynamics:_A_Core_Course/CH5.ipynb
diff --git a/Thermodynamics:_A_Core_Course/CH6.ipynb b/Thermodynamics:_A_Core_Course/CH6.ipynb
index 4326009b..4326009b 100644..100755
--- a/Thermodynamics:_A_Core_Course/CH6.ipynb
+++ b/Thermodynamics:_A_Core_Course/CH6.ipynb
diff --git a/Thermodynamics:_A_Core_Course/CH7.ipynb b/Thermodynamics:_A_Core_Course/CH7.ipynb
index fdea70a8..fdea70a8 100644..100755
--- a/Thermodynamics:_A_Core_Course/CH7.ipynb
+++ b/Thermodynamics:_A_Core_Course/CH7.ipynb
diff --git a/Thermodynamics:_A_Core_Course/README.txt b/Thermodynamics:_A_Core_Course/README.txt
index c61dc121..c61dc121 100644..100755
--- a/Thermodynamics:_A_Core_Course/README.txt
+++ b/Thermodynamics:_A_Core_Course/README.txt
diff --git a/Thermodynamics:_A_Core_Course/screenshots/deepak-2-1.png b/Thermodynamics:_A_Core_Course/screenshots/deepak-2-1.png
index df57307c..df57307c 100644..100755
--- a/Thermodynamics:_A_Core_Course/screenshots/deepak-2-1.png
+++ b/Thermodynamics:_A_Core_Course/screenshots/deepak-2-1.png
Binary files differ
diff --git a/Thermodynamics:_A_Core_Course/screenshots/deepak-2-2.png b/Thermodynamics:_A_Core_Course/screenshots/deepak-2-2.png
index 785f7970..785f7970 100644..100755
--- a/Thermodynamics:_A_Core_Course/screenshots/deepak-2-2.png
+++ b/Thermodynamics:_A_Core_Course/screenshots/deepak-2-2.png
Binary files differ
diff --git a/Thermodynamics:_A_Core_Course/screenshots/deepak-2-3.png b/Thermodynamics:_A_Core_Course/screenshots/deepak-2-3.png
index a71d57e5..a71d57e5 100644..100755
--- a/Thermodynamics:_A_Core_Course/screenshots/deepak-2-3.png
+++ b/Thermodynamics:_A_Core_Course/screenshots/deepak-2-3.png
Binary files differ
diff --git a/Transport_Phenomena/README.txt b/Transport_Phenomena/README.txt
index 9767f98f..9767f98f 100644..100755
--- a/Transport_Phenomena/README.txt
+++ b/Transport_Phenomena/README.txt
diff --git a/Transport_Phenomena/ch1.ipynb b/Transport_Phenomena/ch1.ipynb
index b9a93390..b9a93390 100644..100755
--- a/Transport_Phenomena/ch1.ipynb
+++ b/Transport_Phenomena/ch1.ipynb
diff --git a/Transport_Phenomena/ch10.ipynb b/Transport_Phenomena/ch10.ipynb
index 52d5c043..52d5c043 100644..100755
--- a/Transport_Phenomena/ch10.ipynb
+++ b/Transport_Phenomena/ch10.ipynb
diff --git a/Transport_Phenomena/ch11.ipynb b/Transport_Phenomena/ch11.ipynb
index aae61613..aae61613 100644..100755
--- a/Transport_Phenomena/ch11.ipynb
+++ b/Transport_Phenomena/ch11.ipynb
diff --git a/Transport_Phenomena/ch12.ipynb b/Transport_Phenomena/ch12.ipynb
index b890667e..b890667e 100644..100755
--- a/Transport_Phenomena/ch12.ipynb
+++ b/Transport_Phenomena/ch12.ipynb
diff --git a/Transport_Phenomena/ch13.ipynb b/Transport_Phenomena/ch13.ipynb
index 54f84e7f..54f84e7f 100644..100755
--- a/Transport_Phenomena/ch13.ipynb
+++ b/Transport_Phenomena/ch13.ipynb
diff --git a/Transport_Phenomena/ch14.ipynb b/Transport_Phenomena/ch14.ipynb
index b34c829a..b34c829a 100644..100755
--- a/Transport_Phenomena/ch14.ipynb
+++ b/Transport_Phenomena/ch14.ipynb
diff --git a/Transport_Phenomena/ch15.ipynb b/Transport_Phenomena/ch15.ipynb
index 7fa822a9..7fa822a9 100644..100755
--- a/Transport_Phenomena/ch15.ipynb
+++ b/Transport_Phenomena/ch15.ipynb
diff --git a/Transport_Phenomena/ch2.ipynb b/Transport_Phenomena/ch2.ipynb
index 6416458f..6416458f 100644..100755
--- a/Transport_Phenomena/ch2.ipynb
+++ b/Transport_Phenomena/ch2.ipynb
diff --git a/Transport_Phenomena/ch3.ipynb b/Transport_Phenomena/ch3.ipynb
index a18887b2..a18887b2 100644..100755
--- a/Transport_Phenomena/ch3.ipynb
+++ b/Transport_Phenomena/ch3.ipynb
diff --git a/Transport_Phenomena/ch4.ipynb b/Transport_Phenomena/ch4.ipynb
index 2114f1f2..2114f1f2 100644..100755
--- a/Transport_Phenomena/ch4.ipynb
+++ b/Transport_Phenomena/ch4.ipynb
diff --git a/Transport_Phenomena/ch5.ipynb b/Transport_Phenomena/ch5.ipynb
index aa62bb82..aa62bb82 100644..100755
--- a/Transport_Phenomena/ch5.ipynb
+++ b/Transport_Phenomena/ch5.ipynb
diff --git a/Transport_Phenomena/ch6.ipynb b/Transport_Phenomena/ch6.ipynb
index 1d8101cc..1d8101cc 100644..100755
--- a/Transport_Phenomena/ch6.ipynb
+++ b/Transport_Phenomena/ch6.ipynb
diff --git a/Transport_Phenomena/ch7.ipynb b/Transport_Phenomena/ch7.ipynb
index 22fcb9f1..22fcb9f1 100644..100755
--- a/Transport_Phenomena/ch7.ipynb
+++ b/Transport_Phenomena/ch7.ipynb
diff --git a/Transport_Phenomena/ch9.ipynb b/Transport_Phenomena/ch9.ipynb
index c5809f8d..c5809f8d 100644..100755
--- a/Transport_Phenomena/ch9.ipynb
+++ b/Transport_Phenomena/ch9.ipynb
diff --git a/Transport_Phenomena/screenshots/pic1.png b/Transport_Phenomena/screenshots/pic1.png
index 8b5f193e..8b5f193e 100644..100755
--- a/Transport_Phenomena/screenshots/pic1.png
+++ b/Transport_Phenomena/screenshots/pic1.png
Binary files differ
diff --git a/Transport_Phenomena/screenshots/pic2.png b/Transport_Phenomena/screenshots/pic2.png
index 559890ec..559890ec 100644..100755
--- a/Transport_Phenomena/screenshots/pic2.png
+++ b/Transport_Phenomena/screenshots/pic2.png
Binary files differ
diff --git a/Transport_Phenomena/screenshots/pic3.png b/Transport_Phenomena/screenshots/pic3.png
index 785eeb05..785eeb05 100644..100755
--- a/Transport_Phenomena/screenshots/pic3.png
+++ b/Transport_Phenomena/screenshots/pic3.png
Binary files differ