From 36a03d6d76bac315dba73b2ba9555c7e3fe0234f Mon Sep 17 00:00:00 2001 From: nice Date: Thu, 9 Oct 2014 18:07:00 +0530 Subject: updated books --- BASIC_ELECTRICAL_ENGINEERING_/Chapter10.ipynb | 1357 + BASIC_ELECTRICAL_ENGINEERING_/Chapter11.ipynb | 929 + BASIC_ELECTRICAL_ENGINEERING_/Chapter12.ipynb | 1251 + BASIC_ELECTRICAL_ENGINEERING_/Chapter13.ipynb | 1498 + BASIC_ELECTRICAL_ENGINEERING_/Chapter14.ipynb | 1213 + BASIC_ELECTRICAL_ENGINEERING_/Chapter15.ipynb | 957 + BASIC_ELECTRICAL_ENGINEERING_/Chapter16.ipynb | 1654 + BASIC_ELECTRICAL_ENGINEERING_/Chapter17.ipynb | 332 + BASIC_ELECTRICAL_ENGINEERING_/Chapter18.ipynb | 542 + BASIC_ELECTRICAL_ENGINEERING_/Chapter2.ipynb | 1532 + BASIC_ELECTRICAL_ENGINEERING_/Chapter3.ipynb | 2116 + BASIC_ELECTRICAL_ENGINEERING_/Chapter4.ipynb | 1114 + BASIC_ELECTRICAL_ENGINEERING_/Chapter5.ipynb | 841 + BASIC_ELECTRICAL_ENGINEERING_/Chapter6.ipynb | 627 + BASIC_ELECTRICAL_ENGINEERING_/Chapter7.ipynb | 975 + BASIC_ELECTRICAL_ENGINEERING_/Chapter8.ipynb | 1188 + BASIC_ELECTRICAL_ENGINEERING_/Chapter9.ipynb | 1092 + BASIC_ELECTRICAL_ENGINEERING_/README.txt | 10 + .../screenshots/Screenshot1.png | Bin 0 -> 102574 bytes .../screenshots/Screenshot2.png | Bin 0 -> 71004 bytes .../screenshots/Screenshot3.png | Bin 0 -> 75482 bytes Basic_Fluid_Mechanics/README.txt | 10 + Basic_Fluid_Mechanics/ch10.ipynb | 353 + Basic_Fluid_Mechanics/ch11.ipynb | 443 + Basic_Fluid_Mechanics/ch12.ipynb | 302 + Basic_Fluid_Mechanics/ch13.ipynb | 185 + Basic_Fluid_Mechanics/ch14.ipynb | 148 + Basic_Fluid_Mechanics/ch2.ipynb | 309 + Basic_Fluid_Mechanics/ch3.ipynb | 160 + Basic_Fluid_Mechanics/ch5.ipynb | 212 + Basic_Fluid_Mechanics/ch6.ipynb | 391 + Basic_Fluid_Mechanics/ch7.ipynb | 523 + Basic_Fluid_Mechanics/ch8.ipynb | 148 + Basic_Fluid_Mechanics/ch9.ipynb | 126 + .../screenshots/Streamlinedbody_curve.png | Bin 0 -> 12270 bytes .../screenshots/VariationsOfEpEhEp+EhwithT.png | Bin 0 -> 19796 bytes .../screenshots/actual_perfomance_curve.png | Bin 0 -> 14179 bytes .../Chapter_1.ipynb | 100 + .../Chapter_10.ipynb | 653 + .../Chapter_11.ipynb | 161 + .../Chapter_12.ipynb | 328 + .../Chapter_13.ipynb | 720 + .../Chapter_2.ipynb | 244 + .../Chapter_3.ipynb | 578 + .../Chapter_4.ipynb | 331 + .../Chapter_5.ipynb | 195 + .../Chapter_6.ipynb | 275 + .../Chapter_7.ipynb | 130 + .../Chapter_8.ipynb | 514 + .../Chapter_9.ipynb | 1874 + .../README.txt | 10 + .../screenshots/Heating.png | Bin 0 -> 15813 bytes .../screenshots/Unit.png | Bin 0 -> 14396 bytes .../screenshots/ex8_8.png | Bin 0 -> 18100 bytes Engineering_Physics_Malik/Chapter_1.ipynb | 0 Engineering_Physics_Malik/Chapter_10.ipynb | 0 Engineering_Physics_Malik/Chapter_11.ipynb | 0 Engineering_Physics_Malik/Chapter_12.ipynb | 0 Engineering_Physics_Malik/Chapter_13.ipynb | 0 Engineering_Physics_Malik/Chapter_14.ipynb | 0 Engineering_Physics_Malik/Chapter_15.ipynb | 0 Engineering_Physics_Malik/Chapter_16.ipynb | 0 Engineering_Physics_Malik/Chapter_17.ipynb | 0 Engineering_Physics_Malik/Chapter_18.ipynb | 0 Engineering_Physics_Malik/Chapter_19.ipynb | 0 Engineering_Physics_Malik/Chapter_2.ipynb | 0 Engineering_Physics_Malik/Chapter_20.ipynb | 0 Engineering_Physics_Malik/Chapter_22.ipynb | 0 Engineering_Physics_Malik/Chapter_3.ipynb | 0 Engineering_Physics_Malik/Chapter_4.ipynb | 0 Engineering_Physics_Malik/Chapter_5.ipynb | 0 Engineering_Physics_Malik/Chapter_6.ipynb | 0 Engineering_Physics_Malik/Chapter_7.ipynb | 0 Engineering_Physics_Malik/Chapter_8.ipynb | 0 Engineering_Physics_Malik/Chapter_9.ipynb | 0 Engineering_Physics_Malik/README.txt | 0 .../screenshots/noofphotons.png | Bin .../screenshots/ref_indices.png | Bin Engineering_Physics_Malik/screenshots/wavelenK.png | Bin .../Chap13.ipynb | 124 + .../Chap2.ipynb | 534 + .../README.txt | 10 + .../chap10.ipynb | 391 + .../chap11.ipynb | 337 + .../chap15.ipynb | 434 + .../chap16.ipynb | 874 + .../chap3.ipynb | 1164 + .../chap4.ipynb | 793 + .../chap9.ipynb | 512 + .../screenshots/2_2.png | Bin 0 -> 44794 bytes .../screenshots/3_9.png | Bin 0 -> 47705 bytes .../screenshots/4_1.png | Bin 0 -> 23676 bytes Hydraulics_Made_Easy/README.txt | 10 + Hydraulics_Made_Easy/ch1.ipynb | 1015 + Hydraulics_Made_Easy/ch10.ipynb | 497 + Hydraulics_Made_Easy/ch2.ipynb | 368 + Hydraulics_Made_Easy/ch3.ipynb | 527 + Hydraulics_Made_Easy/ch4.ipynb | 994 + Hydraulics_Made_Easy/ch5.ipynb | 668 + Hydraulics_Made_Easy/ch6.ipynb | 1557 + Hydraulics_Made_Easy/ch7.ipynb | 755 + Hydraulics_Made_Easy/ch8.ipynb | 554 + Hydraulics_Made_Easy/ch9.ipynb | 241 + .../screenshots/10MiscellaneousProblems.png | Bin 0 -> 135984 bytes .../screenshots/5FlowOfWaterOverWeirs.png | Bin 0 -> 117531 bytes Hydraulics_Made_Easy/screenshots/9ViscousFlow.png | Bin 0 -> 129763 bytes Modern_Electronics_Communication/Chapter1.ipynb | 649 + Modern_Electronics_Communication/Chapter2.ipynb | 384 + Modern_Electronics_Communication/Chapter3.ipynb | 166 + Modern_Electronics_Communication/Chapter4.ipynb | 149 + Modern_Electronics_Communication/Chapter5.ipynb | 360 + Modern_Electronics_Communication/README.txt | 10 + Modern_Electronics_Communication/chapter10.ipynb | 101 + Modern_Electronics_Communication/chapter12.ipynb | 401 + Modern_Electronics_Communication/chapter13.ipynb | 238 + Modern_Electronics_Communication/chapter14.ipynb | 180 + Modern_Electronics_Communication/chapter16.ipynb | 134 + Modern_Electronics_Communication/chapter17.ipynb | 96 + Modern_Electronics_Communication/chapter18.ipynb | 216 + Modern_Electronics_Communication/chapter6.ipynb | 98 + Modern_Electronics_Communication/chapter7.ipynb | 243 + Modern_Electronics_Communication/chapter8.ipynb | 190 + Modern_Electronics_Communication/chapter9.ipynb | 203 + .../screenshots/2_3.png | Bin 0 -> 16284 bytes .../screenshots/3_2.png | Bin 0 -> 20201 bytes .../screenshots/4_2.png | Bin 0 -> 18334 bytes Principles_of_Power_System/README.txt | 0 Principles_of_Power_System/chapter10_1.ipynb | 1146 - Principles_of_Power_System/chapter11_1.ipynb | 1185 - Principles_of_Power_System/chapter13_1.ipynb | 1972 - Principles_of_Power_System/chapter14_1.ipynb | 746 - Principles_of_Power_System/chapter15_1.ipynb | 126 - Principles_of_Power_System/chapter17_1.ipynb | 842 - Principles_of_Power_System/chapter18_1.ipynb | 1223 - Principles_of_Power_System/chapter19_1.ipynb | 212 - Principles_of_Power_System/chapter1_1.ipynb | 68 - Principles_of_Power_System/chapter20_1.ipynb | 64 - Principles_of_Power_System/chapter21_1.ipynb | 69 - Principles_of_Power_System/chapter22_1.ipynb | 338 - Principles_of_Power_System/chapter26_1.ipynb | 224 - Principles_of_Power_System/chapter2_1.ipynb | 857 - Principles_of_Power_System/chapter3_1.ipynb | 1355 - Principles_of_Power_System/chapter4_1.ipynb | 873 - Principles_of_Power_System/chapter5_1.ipynb | 762 - Principles_of_Power_System/chapter6_1.ipynb | 1112 - Principles_of_Power_System/chapter7_1.ipynb | 559 - Principles_of_Power_System/chapter8_1.ipynb | 1455 - Principles_of_Power_System/chapter9_1.ipynb | 740 - Principles_of_Power_System/screenshots/daily_1.png | Bin .../screenshots/dcdistribution_1.png | Bin .../screenshots/unsymmetrical_1.png | Bin Problems_In_Hydraulics/README.txt | 10 + Problems_In_Hydraulics/ch1.ipynb | 466 + Problems_In_Hydraulics/ch10.ipynb | 589 + Problems_In_Hydraulics/ch11.ipynb | 745 + Problems_In_Hydraulics/ch12.ipynb | 294 + Problems_In_Hydraulics/ch13.ipynb | 624 + Problems_In_Hydraulics/ch2.ipynb | 222 + Problems_In_Hydraulics/ch3.ipynb | 251 + Problems_In_Hydraulics/ch4.ipynb | 291 + Problems_In_Hydraulics/ch5.ipynb | 422 + Problems_In_Hydraulics/ch6.ipynb | 757 + Problems_In_Hydraulics/ch7.ipynb | 453 + Problems_In_Hydraulics/ch8.ipynb | 296 + Problems_In_Hydraulics/ch9.ipynb | 323 + .../screenshots/1Hydrostatics.png | Bin 0 -> 124458 bytes .../screenshots/4OrificesAndNotches.png | Bin 0 -> 120873 bytes .../screenshots/7FlowUnderVaryingHead.png | Bin 0 -> 118705 bytes .../KamthaneChapter10.ipynb | 2940 ++ .../KamthaneChapter11.ipynb | 446 + .../KamthaneChapter12.ipynb | 849 + .../KamthaneChapter13.ipynb | 2367 ++ .../KamthaneChapter14.ipynb | 2311 + .../KamthaneChapter15.ipynb | 754 + .../KamthaneChapter16.ipynb | 2160 + .../KamthaneChapter3.ipynb | 1060 + .../KamthaneChapter4.ipynb | 972 + .../KamthaneChapter5.ipynb | 2624 ++ .../KamthaneChapter6.ipynb | 42312 +++++++++++++++++++ .../KamthaneChapter7.ipynb | 3644 ++ .../KamthaneChapter8.ipynb | 2750 ++ .../KamthaneChapter9.ipynb | 1999 + Programming_in_C_using_ANSI_C/README.txt | 10 + .../screenshots/screenshot1.png | Bin 0 -> 124312 bytes .../screenshots/screenshot1_1.png | Bin 0 -> 124312 bytes .../screenshots/screenshot2.png | Bin 0 -> 133043 bytes .../screenshots/screenshot2_1.png | Bin 0 -> 133043 bytes .../screenshots/screenshot3.png | Bin 0 -> 125297 bytes .../screenshots/screenshot3_1.png | Bin 0 -> 125297 bytes Structured_Programing_with_C++/Chapter1.ipynb | 104 + Structured_Programing_with_C++/Chapter2.ipynb | 288 + Structured_Programing_with_C++/Chapter3.ipynb | 540 + Structured_Programing_with_C++/Chapter4.ipynb | 563 + Structured_Programing_with_C++/Chapter5.ipynb | 745 + Structured_Programing_with_C++/Chapter6.ipynb | 549 + Structured_Programing_with_C++/Chapter7.ipynb | 478 + Structured_Programing_with_C++/Chapter8.ipynb | 352 + Structured_Programing_with_C++/Chapter9.ipynb | 274 + Structured_Programing_with_C++/README.txt | 10 + Structured_Programing_with_C++/screenshots/1.png | Bin 0 -> 52546 bytes Structured_Programing_with_C++/screenshots/2.png | Bin 0 -> 50577 bytes Structured_Programing_with_C++/screenshots/3.png | Bin 0 -> 75264 bytes Surveying_Volume_3/Chapter1.ipynb | 1424 +- Surveying_Volume_3/Chapter2.ipynb | 448 + Surveying_Volume_3/README.txt | 16 +- .../screenshots/Finding_Altitude_and_Zenith.png | Bin 0 -> 253091 bytes .../screenshots/Finding_distance.png | Bin 0 -> 178850 bytes .../screenshots/Finding_focal_length.png | Bin 0 -> 130616 bytes 208 files changed, 123537 insertions(+), 15951 deletions(-) create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter10.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter11.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter12.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter13.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter14.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter15.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter16.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter17.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter18.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter2.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter3.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter4.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter5.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter6.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter7.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter8.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/Chapter9.ipynb create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/README.txt create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot1.png create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot2.png create mode 100755 BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot3.png create mode 100755 Basic_Fluid_Mechanics/README.txt create mode 100755 Basic_Fluid_Mechanics/ch10.ipynb create mode 100755 Basic_Fluid_Mechanics/ch11.ipynb create mode 100755 Basic_Fluid_Mechanics/ch12.ipynb create mode 100755 Basic_Fluid_Mechanics/ch13.ipynb create mode 100755 Basic_Fluid_Mechanics/ch14.ipynb create mode 100755 Basic_Fluid_Mechanics/ch2.ipynb create mode 100755 Basic_Fluid_Mechanics/ch3.ipynb create mode 100755 Basic_Fluid_Mechanics/ch5.ipynb create mode 100755 Basic_Fluid_Mechanics/ch6.ipynb create mode 100755 Basic_Fluid_Mechanics/ch7.ipynb create mode 100755 Basic_Fluid_Mechanics/ch8.ipynb create mode 100755 Basic_Fluid_Mechanics/ch9.ipynb create mode 100755 Basic_Fluid_Mechanics/screenshots/Streamlinedbody_curve.png create mode 100755 Basic_Fluid_Mechanics/screenshots/VariationsOfEpEhEp+EhwithT.png create mode 100755 Basic_Fluid_Mechanics/screenshots/actual_perfomance_curve.png create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_1.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_10.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_11.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_12.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_13.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_2.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_3.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_4.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_5.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_6.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_7.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_8.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_9.ipynb create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/README.txt create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/screenshots/Heating.png create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/screenshots/Unit.png create mode 100755 Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/screenshots/ex8_8.png mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_1.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_10.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_11.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_12.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_13.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_14.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_15.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_16.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_17.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_18.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_19.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_2.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_20.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_22.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_3.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_4.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_5.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_6.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_7.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_8.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/Chapter_9.ipynb mode change 100644 => 100755 Engineering_Physics_Malik/README.txt mode change 100644 => 100755 Engineering_Physics_Malik/screenshots/noofphotons.png mode change 100644 => 100755 Engineering_Physics_Malik/screenshots/ref_indices.png mode change 100644 => 100755 Engineering_Physics_Malik/screenshots/wavelenK.png create mode 100755 Fundamental_of_internal_combustion_engines/Chap13.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/Chap2.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/README.txt create mode 100755 Fundamental_of_internal_combustion_engines/chap10.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/chap11.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/chap15.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/chap16.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/chap3.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/chap4.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/chap9.ipynb create mode 100755 Fundamental_of_internal_combustion_engines/screenshots/2_2.png create mode 100755 Fundamental_of_internal_combustion_engines/screenshots/3_9.png create mode 100755 Fundamental_of_internal_combustion_engines/screenshots/4_1.png create mode 100755 Hydraulics_Made_Easy/README.txt create mode 100755 Hydraulics_Made_Easy/ch1.ipynb create mode 100755 Hydraulics_Made_Easy/ch10.ipynb create mode 100755 Hydraulics_Made_Easy/ch2.ipynb create mode 100755 Hydraulics_Made_Easy/ch3.ipynb create mode 100755 Hydraulics_Made_Easy/ch4.ipynb create mode 100755 Hydraulics_Made_Easy/ch5.ipynb create mode 100755 Hydraulics_Made_Easy/ch6.ipynb create mode 100755 Hydraulics_Made_Easy/ch7.ipynb create mode 100755 Hydraulics_Made_Easy/ch8.ipynb create mode 100755 Hydraulics_Made_Easy/ch9.ipynb create mode 100755 Hydraulics_Made_Easy/screenshots/10MiscellaneousProblems.png create mode 100755 Hydraulics_Made_Easy/screenshots/5FlowOfWaterOverWeirs.png create mode 100755 Hydraulics_Made_Easy/screenshots/9ViscousFlow.png create mode 100755 Modern_Electronics_Communication/Chapter1.ipynb create mode 100755 Modern_Electronics_Communication/Chapter2.ipynb create mode 100755 Modern_Electronics_Communication/Chapter3.ipynb create mode 100755 Modern_Electronics_Communication/Chapter4.ipynb create mode 100755 Modern_Electronics_Communication/Chapter5.ipynb create mode 100755 Modern_Electronics_Communication/README.txt create mode 100755 Modern_Electronics_Communication/chapter10.ipynb create mode 100755 Modern_Electronics_Communication/chapter12.ipynb create mode 100755 Modern_Electronics_Communication/chapter13.ipynb create mode 100755 Modern_Electronics_Communication/chapter14.ipynb create mode 100755 Modern_Electronics_Communication/chapter16.ipynb create mode 100755 Modern_Electronics_Communication/chapter17.ipynb create mode 100755 Modern_Electronics_Communication/chapter18.ipynb create mode 100755 Modern_Electronics_Communication/chapter6.ipynb create mode 100755 Modern_Electronics_Communication/chapter7.ipynb create mode 100755 Modern_Electronics_Communication/chapter8.ipynb create mode 100755 Modern_Electronics_Communication/chapter9.ipynb create mode 100755 Modern_Electronics_Communication/screenshots/2_3.png create mode 100755 Modern_Electronics_Communication/screenshots/3_2.png create mode 100755 Modern_Electronics_Communication/screenshots/4_2.png mode change 100644 => 100755 Principles_of_Power_System/README.txt delete mode 100644 Principles_of_Power_System/chapter10_1.ipynb delete mode 100644 Principles_of_Power_System/chapter11_1.ipynb delete mode 100644 Principles_of_Power_System/chapter13_1.ipynb delete mode 100644 Principles_of_Power_System/chapter14_1.ipynb delete mode 100644 Principles_of_Power_System/chapter15_1.ipynb delete mode 100644 Principles_of_Power_System/chapter17_1.ipynb delete mode 100644 Principles_of_Power_System/chapter18_1.ipynb delete mode 100644 Principles_of_Power_System/chapter19_1.ipynb delete mode 100644 Principles_of_Power_System/chapter1_1.ipynb delete mode 100644 Principles_of_Power_System/chapter20_1.ipynb delete mode 100644 Principles_of_Power_System/chapter21_1.ipynb delete mode 100644 Principles_of_Power_System/chapter22_1.ipynb delete mode 100644 Principles_of_Power_System/chapter26_1.ipynb delete mode 100644 Principles_of_Power_System/chapter2_1.ipynb delete mode 100644 Principles_of_Power_System/chapter3_1.ipynb delete mode 100644 Principles_of_Power_System/chapter4_1.ipynb delete mode 100644 Principles_of_Power_System/chapter5_1.ipynb delete mode 100644 Principles_of_Power_System/chapter6_1.ipynb delete mode 100644 Principles_of_Power_System/chapter7_1.ipynb delete mode 100644 Principles_of_Power_System/chapter8_1.ipynb delete mode 100644 Principles_of_Power_System/chapter9_1.ipynb mode change 100644 => 100755 Principles_of_Power_System/screenshots/daily_1.png mode change 100644 => 100755 Principles_of_Power_System/screenshots/dcdistribution_1.png mode change 100644 => 100755 Principles_of_Power_System/screenshots/unsymmetrical_1.png create mode 100755 Problems_In_Hydraulics/README.txt create mode 100755 Problems_In_Hydraulics/ch1.ipynb create mode 100755 Problems_In_Hydraulics/ch10.ipynb create mode 100755 Problems_In_Hydraulics/ch11.ipynb create mode 100755 Problems_In_Hydraulics/ch12.ipynb create mode 100755 Problems_In_Hydraulics/ch13.ipynb create mode 100755 Problems_In_Hydraulics/ch2.ipynb create mode 100755 Problems_In_Hydraulics/ch3.ipynb create mode 100755 Problems_In_Hydraulics/ch4.ipynb create mode 100755 Problems_In_Hydraulics/ch5.ipynb create mode 100755 Problems_In_Hydraulics/ch6.ipynb create mode 100755 Problems_In_Hydraulics/ch7.ipynb create mode 100755 Problems_In_Hydraulics/ch8.ipynb create mode 100755 Problems_In_Hydraulics/ch9.ipynb create mode 100755 Problems_In_Hydraulics/screenshots/1Hydrostatics.png create mode 100755 Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png create mode 100755 Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter16.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter3.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter4.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter5.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter6.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter7.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter8.ipynb create mode 100755 Programming_in_C_using_ANSI_C/KamthaneChapter9.ipynb create mode 100755 Programming_in_C_using_ANSI_C/README.txt create mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot1.png create mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot1_1.png create mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot2.png create mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot2_1.png create mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot3.png create mode 100755 Programming_in_C_using_ANSI_C/screenshots/screenshot3_1.png create mode 100755 Structured_Programing_with_C++/Chapter1.ipynb create mode 100755 Structured_Programing_with_C++/Chapter2.ipynb create mode 100755 Structured_Programing_with_C++/Chapter3.ipynb create mode 100755 Structured_Programing_with_C++/Chapter4.ipynb create mode 100755 Structured_Programing_with_C++/Chapter5.ipynb create mode 100755 Structured_Programing_with_C++/Chapter6.ipynb create mode 100755 Structured_Programing_with_C++/Chapter7.ipynb create mode 100755 Structured_Programing_with_C++/Chapter8.ipynb create mode 100755 Structured_Programing_with_C++/Chapter9.ipynb create mode 100755 Structured_Programing_with_C++/README.txt create mode 100755 Structured_Programing_with_C++/screenshots/1.png create mode 100755 Structured_Programing_with_C++/screenshots/2.png create mode 100755 Structured_Programing_with_C++/screenshots/3.png create mode 100755 Surveying_Volume_3/Chapter2.ipynb create mode 100755 Surveying_Volume_3/screenshots/Finding_Altitude_and_Zenith.png create mode 100755 Surveying_Volume_3/screenshots/Finding_distance.png create mode 100755 Surveying_Volume_3/screenshots/Finding_focal_length.png 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: NsNr\n", + " The number of stator poles is 12. \n", + "\n", + " Case 2: NsI_rated): print(\"The toaster will be damaged as the current is greater than the rated current. \\n\")\n", + "elif(IP_rated): print(\"The rating will be affected as the power consumed is greater than the power rating. \\n\")\n", + "elif(P_consumedI_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"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540cORLbt29v0PtjrDpu\nAJjslZeX48CBAw0eq/3kyZPCiKRA5Z571d67QqGAi4sLzp8/j4iICKxYsaLG6yMjI2FnZ4f//ve/\n2LFjB2bMmIHi4mIQERISEhAbG4v//e9/2LFjB1JSUgBUDjU8dOhQJCYmQqlU4oMPPsDhw4exe/du\nfPDBB8Kye/XqhePHjzfo/TFWHTcATLaKiooQGBgIV1dX3LlzB3PmzGnQ8m7fvg0XFxedj1fdrKRH\njx4aw5ZXOXXqlHBXM29vbzz22GO4cuUKFAoFhgwZAhsbG7Ro0QK+vr7CjY6srKwwbNgwAJWjTgYH\nB0OhUKBbt24af8PV1VVoNBgTCzcATLasra1x6dIl3Lp1CzY2Nvjll18avMzaxkZs0aIFgMrO54qK\nCr1eX3UEUfXa6q+3tLQU5ltYWMDKykr4v/rfICLZ3TCJSR83AEz2rK2tsWrVKixcuLBBd2pq3749\n7t27Z/DrBwwYgB9++AFA5U1Ebty4gW7duoly96g///xTMvcgZuaDGwAmW+p7xAEBAfD29kZsbKzO\n51+7dg2enp7Cv6oO3ir9+/fHr7/+qtff1bY3HhERgdzcXPj6+iIsLAzffvstWrRoofP51d9D9Wn1\n/58/fx4DBw6sMxtj9cH3A2Ds/xERevTogXPnzgmlGKkIDg5GbGysJO9CxeSLjwAY+38KhQKzZ8+W\n3L1pExMT4e3tzRt/Jjo+AmBm5fLlyzVufN+yZUucOXPGRIkYky5uABhjrIniEhBjjDVR3AAwxlgT\nxQ0AY4w1UdwAMMZYE8UNAGOMNVH/B1z6XURJsXa0AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "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_/README.txt b/BASIC_ELECTRICAL_ENGINEERING_/README.txt new file mode 100755 index 00000000..5982dc4d --- /dev/null +++ b/BASIC_ELECTRICAL_ENGINEERING_/README.txt @@ -0,0 +1,10 @@ +Contributed By: Abhiram Padmanabhan +Course: be +College/Institute/Organization: PES University,Bangalore +Department/Designation: Electrical and Electronics +Book Title: BASIC ELECTRICAL ENGINEERING +Author: D C KULSHRESHTHA +Publisher: Tata McGraw Hill Education Private Limited,7 West Patel Nagar,New Delhi-110008. +Year of publication: 2012 +Isbn: 978-0-07-132896-8 +Edition: Revised First \ No newline at end of file diff --git a/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot1.png b/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot1.png new file mode 100755 index 00000000..0d0af695 Binary files /dev/null and b/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot1.png differ diff --git a/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot2.png b/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot2.png new file mode 100755 index 00000000..cb8b214f Binary files /dev/null and b/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot2.png differ diff --git a/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot3.png b/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot3.png new file mode 100755 index 00000000..8fed5b31 Binary files /dev/null and b/BASIC_ELECTRICAL_ENGINEERING_/screenshots/Screenshot3.png differ diff --git a/Basic_Fluid_Mechanics/README.txt b/Basic_Fluid_Mechanics/README.txt new file mode 100755 index 00000000..9fe52d79 --- /dev/null +++ b/Basic_Fluid_Mechanics/README.txt @@ -0,0 +1,10 @@ +Contributed By: Jatin Patel +Course: bca +College/Institute/Organization: Freelancing work +Department/Designation: Freelancer +Book Title: Basic Fluid Mechanics +Author: Peerless +Publisher: Pergamon Press +Year of publication: 1967 +Isbn: 978-0080110981 +Edition: 1 \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch10.ipynb b/Basic_Fluid_Mechanics/ch10.ipynb new file mode 100755 index 00000000..805fdf34 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch10.ipynb @@ -0,0 +1,353 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:deacbf9acb1071d19b96737be4ae4bdcb6a5696a34ffaedecc8c1b87e6d2a62b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : External Flows" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "u= 3.6*10**-5 \t#lbf sec/ft**2 viscosity\n", + "d= 64. \t#lbm/ft**2 density\n", + "l= 20. \t#ft long\n", + "a= 0.5\n", + "\t\n", + "#CALCULATIONS\n", + "sw= u*g/(a*d)\n", + "sw1= u**2*g*l/(2*a*d)\n", + "Re=array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])*10**5\n", + "Vinf=Re*u*g/(d*a)\n", + "Cd= array([1.2, 1.15, 0.94, 0.68, 0.305, 0.31, 0.32, 0.33, 0.34, 0.35])\n", + "cdre=Cd*Re**2\n", + "D=sw1*cdre\n", + "\t\n", + "#RESULTS\n", + "print 'velocity = %.3e ft/sec'%(sw)\n", + "print ' Force = %.3e lbf'%(sw1)\n", + "print \"V (ft/sec) D(lbf)\"\n", + "for i in range(len(D)):\n", + " print \"%6.1f %6d\"%(Vinf[i],D[i])\n", + "\n", + "\n", + "# note : answers are accurate. please check manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "velocity = 3.623e-05 ft/sec\n", + " Force = 1.304e-08 lbf\n", + "V (ft/sec) D(lbf)\n", + " 3.6 156\n", + " 7.2 599\n", + " 10.9 1103\n", + " 14.5 1418\n", + " 18.1 994\n", + " 21.7 1455\n", + " 25.4 2044\n", + " 29.0 2754\n", + " 32.6 3591\n", + " 36.2 4564\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from numpy import *\n", + "from matplotlib.pyplot import *\n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "u= 3.6*10**-5 \t#lbf sec/ft**2\n", + "d= 64. \t#lbm/ft**2 density\n", + "l= 20. \t#ft long\n", + "a= 0.5\n", + "\t\n", + "#CALCULATIONS\n", + "sw= u*g/(a*d)\n", + "sw1= u**2*g*l/(2*a*d)\n", + "Re = array([1 ,2, 3, 4, 5, 6, 7, 8, 9, 10])*10**5\n", + "Vinf=Re*u*g/(d*a)\n", + "Cd = array([1.2, 1.15, 0.94, 0.68, 0.305, 0.31, 0.32, 0.33, 0.34, 0.35])\n", + "cdre=Cd*Re**2\n", + "D=sw1*cdre\n", + "\t\n", + "#RESULTS\n", + "plot(Vinf,D)\n", + "xlabel(\"Vinf, ft/sec\")\n", + "ylabel(\"D, lbf\") \n", + "suptitle(\"Streamlinedbody curve\")\n", + "\n", + "\t#data for curves b,c,d is not given\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEhCAYAAABoTkdHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNXdx/HPJEah4koS4pOkoqBAhgmMQFQKNmExkogs\nUglIrCAtWhfEpS6PNaAW6kIBrQsuQSVUQAWLJkY2I48CAUJYQq0LsmSCQNhkSYCEnOePK1MQokzI\n5M4k3/frlZfhMnfmO7dlfnPOuecchzHGICIicopC7A4gIiLBRYVDRER8osIhIiI+UeEQERGfqHCI\niIhPVDhERMQnKhxSp/7yl7/QqlUr2rVrR7t27Vi2bBkAEydOpLy8vE6zbNy4EZfLBcCKFSsYOXJk\nrTzvm2++yd133w3Arbfeyvvvv1/j50pMTKSgoKBWconUljPsDiANR15eHgsWLKCoqIiwsDD27t1L\nWVkZAJMmTSI9PZ3GjRufcF5VVRUhIf79jtOxY0c6duxY68/rcDhO+/zTfY5TcXQ6V128lgQ/tTik\nzpSWlhIREUFYWBgA5557LlFRUTz//PNs2bKFpKQkunfvDkCTJk144IEH6NixI0uXLuW1116jXbt2\nOJ1Ohg0bRmVlJQC33347nTp14vLLL+fhhx/2vlbz5s353//9X29BWLlyJb169aJ58+a88MILJ2TL\ny8ujd+/eAIwePZphw4bRo0cPLr74Yp577jnv46rLMXnyZFq0aEHnzp1ZvHjxcc89f/58rrrqKlq0\naMHs2bMBKC8vZ9CgQTidTlwuF5988gkAZWVl9OnTB6fTyYABAygvL8cYw5QpUxg1atRxOe67774T\n3scHH3xAfHw8brfbey1Hjx7N+PHjvY9p27YtmzdvZuPGjbRq1Ypbb72V9u3b89RTT/HnP//Z+7hj\nW07VvW9poIxIHfnhhx9M27ZtTevWrc3tt99u5s+f7/275s2bm507d3r/7HA4zKxZs4wxxqxatcqk\npqaayspKY4wxd9xxh3nttde8z2mMMZWVlSYxMdGsWLHC+3yvvvqqMcaYUaNGGZfLZcrLy01paakJ\nDw83xhizYcMG07ZtW2OMMZ9++qm5/vrrjTHGZGRkmC5dupgjR46YHTt2mAsuuMAcOnSo2hybN282\n0dHRZs+ePaaystJ07drV3H333cYYY37/+9+b1NRU7+tFRkaasrIy89e//tX88Y9/NMYY880335io\nqChTXl5uxo4d6z2+bt06c8YZZ5iCggKzf/9+06JFC+9rd+7c2RQVFR13fbds2WKioqKMx+M57tqM\nHj3aPPfcc97HtW3b1mzatMls2LDBhISEeK9ZaWmpadmypfdxvXr1Ml988cXPXn9pmNRVJXXm3HPP\nZdWqVXz22WcsWrSIIUOG8OSTTzJ8+PATHhsaGkrfvn0BmDdvHoWFhd6upPLyciIiIgB44403ePPN\nN3E4HGzZsoWvvvqKDh06AHD99dcD4HK5OHDgAI0aNaJRo0b86le/Ys+ePdXmdDgcpKSkEBISQtOm\nTYmKimLbtm0n5Dh48CAREREsXbqU7t27c9555wHwu9/9jq+//tr7XAMGDACsVlDr1q0pKiriiy++\n4MEHHwSgZcuWXHbZZRQVFfH55597j8fFxREfHw/A2WefTbdu3fjwww9p3bo1FRUVOJ3O43J//vnn\n9OjRg+joaO/1/iUXX3yx93qFh4dz6aWXkp+fT8uWLfnPf/5D586dee6556q9/tIwqXBInQoNDaVb\nt25069YNl8vF66+/ftLC0ahRo+P622+77TaeeOKJ4x7z1Vdf8eKLL7Jq1SqaNGnC0KFDj+t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AwBt\n2rTxriR6qn6pR/iTTz7xLs55zTXXMGTIEF599VXvOMjcuXN5++23cbvdXHXVVezZs4f169ezYMEC\nhg4dSlhYGGCtzCribyoc0uDdcMMNLFiwgMLCQsrKynC73cCJLY4zzzzT+3tt7wOzbNky7z70L7/8\nMk8++STff/89HTp08G7+88orr1BYWEhhYSHr16/nuuuuAwJvhzmp/1Q4pMFr0qQJSUlJDB06lMGD\nB3uP1+QDefbs2Tz66KO/+LjGjRt7u6HWrVtH69atvcVo48aNJCQkkJGRQbNmzdiwYQPJyclMnjyZ\nqqoqADZs2EB5eTk9e/bkzTff5PDhwwDqqpI6oTEOEazuqv79+x83wH10A55j//xLv69fv77a7qJj\nH3fbbbeRlJTEr3/9a1JTU4/bQ2bUqFF89913VFVVkZSURIcOHXC73WzcuBGn08mZZ57JBRdcwIcf\nfkifPn1YtWoV8fHxNG7cmF69ejF27NjTuxgiv0C344rUovT0dCZOnOjTLbXXXnstU6dOpVmzZn5M\nJlJ7VDhERMQnGuMQERGfqHCIiIhPVDhERMQnKhwiIuITFQ4REfGJCoeIiPhEhUNERHzy/xEUA+vK\n3v8VAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "v1= 10. \t#ft/sec\n", + "v2m= 9 \t #ft/sec wide\n", + "a= 1.02\n", + "hbyd= 5.95\n", + "\t\n", + "#CALCULATIONS\n", + "ca= (v1/v2m)**2\n", + "Cd= hbyd*(ca-1+2-2*ca)+2*a*ca\n", + "\t\n", + "#RESULTS\n", + "print 'Drag coeffcieicnt = %.2f'%(Cd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drag coeffcieicnt = 1.12\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "A= 320. \t#ft/**2 area\n", + "w= 18000. \t#lbf weighs\n", + "v= 230. \t#ft/sec normal speed\n", + "ad= 0.0765 \t#lbm/ft**3 density\n", + "p= 5. \t#per cent of the total lift force\n", + "c= 0.055\n", + "n= 1.75 # total drag\n", + "g= 32.2 \t#ft/sec**2\n", + "\t\n", + "#CALCULATIONS\n", + "CL= 2*w*(1-(p/100))*g/(ad*v**2*A)\n", + "D= w*(1-(p/100))*c*n/CL\n", + "\t\n", + "#RESULTS\n", + "print ' lift coefficient = %.2f'%(CL)\n", + "print ' Drag force = %.f'%(D)\n", + "\n", + "# note : answer is accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " lift coefficient = 0.85\n", + " Drag force = 1935\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "bi= 70. \t#degrees outlet angels\n", + "i= 8. \t#degrees incidence angle\n", + "bo= 130. \t#degrees outlet angels\n", + "s= 5. \t#degrees\n", + "vi= 1200. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "a= 0.48\n", + "s1= 1.4 \t#in\n", + "b= 5. \t#in\n", + "Cx= 0.06 # co-efficient \n", + "\t\n", + "#CALCULATIONS\n", + "O= bo-s-bi+i\n", + "Vo= vi*math.sin(math.radians(bi-i))/math.sin(math.radians(bo-s))\n", + "Fy= -a*vi*math.sin(math.radians(bi-i))*(s1/12)*(b/12)*(Vo*math.cos(math.radians(bo-s))-vi*math.cos(math.radians(bi-i)))/g\n", + "dp= a*(Vo**2*(1+Cx)-vi**2)/(2*g)\n", + "\t\n", + "#RESULTS\n", + "print 'Fluid deflection angle = %.f degrees'%(O)\n", + "print ' Vo = %.f ft/sec'%(Vo)\n", + "print ' Force on each blade = %.f lbf'%(Fy)\n", + "print ' Pressure difference = %.f lbf/ft**2'%(dp)\n", + "\n", + "# note : answer is accurate. please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fluid deflection angle = 63 degrees\n", + " Vo = 1293 ft/sec\n", + " Force on each blade = 1002 lbf\n", + " Pressure difference = 2485 lbf/ft**2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "ari= 62. \t#degrees\n", + "aro= 125. \t#degrees\n", + "vri= 1200. \t#ft/sec\n", + "vro= 1294. \t#ft/sec\n", + "vrr= 550. \t#ft/sec velocity\n", + "\t\n", + "#CALCULATIONS\n", + "v1= vri*math.sin(math.radians(ari))\n", + "v2= vrr+vri*math.cos(math.radians(ari))\n", + "vi= math.sqrt(v1**2+v2**2)\n", + "ai= round(math.degrees(math.atan(v1/v2)),1)\n", + "vo= round(vro*math.sin(math.radians(aro)))\n", + "vo1= round(vro*math.cos(math.radians(aro))+vrr)\n", + "vo2= round(math.sqrt(vo**2+vo1**2))\n", + "ao= math.degrees(math.atan(vo/vo1))+180\n", + "\n", + "#RESULTS\n", + "print ' absolute velocity = %.f ft/sec'%(vi)\n", + "print ' direction = %.1f degrees'%(ai)\n", + "print ' absolute velocity = %.f ft/sec'%(vo2)\n", + "print ' direction = %.1f degrees'%(ao)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " absolute velocity = 1537 ft/sec\n", + " direction = 43.6 degrees\n", + " absolute velocity = 1077 ft/sec\n", + " direction = 100.3 degrees\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch11.ipynb b/Basic_Fluid_Mechanics/ch11.ipynb new file mode 100755 index 00000000..1a38341e --- /dev/null +++ b/Basic_Fluid_Mechanics/ch11.ipynb @@ -0,0 +1,443 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d460554b2abe6f6d6700d68291fcbf83cdf7b3bd9d716f5a9395eef88b744934" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Turbomachines:Elementary Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy.functions.elementary.trigonometric import acot\n", + "\n", + "#initialisation of variables\n", + "rt= 1.3 \t#ft\n", + "rr= 0.6 \t#ft\n", + "Q= 75. \t#ft**3 flow rate\n", + "rm= 0.95\n", + "w1= 40. \t#rev/sec \n", + "bim= 153. \t#degrees blade inlet angle\n", + "bom= 147. \t#degrees blade outlet angle\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\t\n", + "#CALCULATIONS\n", + "A= round(math.pi*(rt**2-rr**2),2)\n", + "Va= round(Q/A,2)\n", + "Vbm= rm*w1\n", + "#a= -1/math.degrees(math.atan(-Vbm/Va))\n", + "a = math.degrees(acot(-Vbm/Va))\n", + "im= a-bim\n", + "vwm= Vbm+Va*1/math.tan(math.radians(bom))\n", + "dvwm= rm*vwm\n", + "C= w*Q*dvwm/g\n", + "Cw= C*w1\n", + "dp= Cw/Q\n", + "\n", + "#RESULTS\n", + "print ' Incidence = %.1f degrees'%(im) \n", + "print ' Oulet velocity = %.2f ft/sec'%(vwm)\n", + "print ' Change of whirl at the mean radius = %.2f ft**2/sec'%(dvwm)\n", + "\n", + "print ' Torque = %.f lbf/ft'%(C)\n", + "print ' Rate of working = %.f ft lbf/sec'%(Cw)\n", + "print ' Workdone by the rotor = %.f lbf/ft**2'%(dp)\n", + "\n", + "# note : answer in book is wrong. please check manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Incidence = -178.3 degrees\n", + " Oulet velocity = 10.37 ft/sec\n", + " Change of whirl at the mean radius = 9.86 ft**2/sec\n", + " Torque = 1432 lbf/ft\n", + " Rate of working = 57300 ft lbf/sec\n", + " Workdone by the rotor = 764 lbf/ft**2\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "vbm= 38. \t#ft/sec\n", + "va= 17.94 \t#ft/sec\n", + "a= 147.5 \t#degrees\n", + "vwm= 10.37 \t#ft/sec\n", + "C= 1430. \t#lbf/ft\n", + "P= 763. \t#lbf/ft**2\n", + "\t\n", + "#CALCULATIONS\n", + "vwm1= vbm+va*1/math.tan(math.radians(a))\n", + "p= (vwm-vwm1)/vwm\n", + "C1= C*(1-p)\n", + "P1= P*(1-p)\n", + "\t\n", + "#RESULTS\n", + "print ' Oulet Velocity = %.2f ft/sec'%(vwm1) \n", + "print ' Torque = %.f lbf/ft'%(round(C1,-1))\n", + "print ' Workdone by the rotor = %.f lbf/ft**2'%(P1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Oulet Velocity = 9.84 ft/sec\n", + " Torque = 1360 lbf/ft\n", + " Workdone by the rotor = 724 lbf/ft**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from sympy.functions.elementary.trigonometric import acot\n", + "\t\n", + "#initialisation of variables\n", + "a= 154 \t #degrees\n", + "vbm= 38 \t#ft/sec\n", + "bom= 147 \t#degrees outlet angle\n", + "vwm= -7.78 \t#ft/sec outlet whirl velocity\n", + "w= 62.4 \t#lbf/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "vb= 38 \t#ft/sec velocity\n", + "A= 4.18 \t#ft**2 flow area\n", + "e= 0.95\n", + "\t\n", + "#CALCULATIONS\n", + "vat= (vwm-vb)*math.tan(math.radians(bom))\n", + "Q= vat*A\n", + "#a1= 1/math.tan(math.radians(-vbm/vat))\n", + "a1 = math.degrees(acot(-vbm/vat))\n", + "imt= a1-a\n", + "C= w*Q*vwm*e/g\n", + "\n", + "#RESULTS\n", + "print ' Flow rate = %.1f ft**3'%(Q)\n", + "print ' Incidence angle= %.f degrees'%(imt)\n", + "print ' Torque= %.f lbf ft'%(C)\n", + "#Incorrect value for a1 in textbook. Hence the difference in answers" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Flow rate = 124.3 ft**3\n", + " Incidence angle= -192 degrees\n", + " Torque= -1780 lbf ft\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "\t\n", + "#initialisation of variables\n", + "rt= 0.5 \t#ft radius\n", + "rr= 0.16 \t#ft root radius\n", + "dv1= 88.3 \t#ft/sec\n", + "b= 150. \t#degrees\n", + "r= array([0.16, 0.3, 0.5])\n", + "vw= array([2.5, 5, 7.5])\n", + "vb= array([46.6, 88.3, 132.5])\n", + "vrb= array([44.16, 88.3, 132.5])\n", + "v1= array([-1.154, -0.385])\n", + "\t\n", + "#CALCULATIONS\n", + "A= math.pi*(rt**2-rr**2)\n", + "Va= -dv1*math.tan(math.radians(b))\n", + "Q= Va*A\n", + "ari = degrees((arctan(Va/(vw - vb)))) + 180\n", + "ari = array([ari[0],ari[2]])\n", + "#a= tan(radians(v1))+180\n", + "b = degrees(math.tan(0.577))\n", + "i = ari - 150\n", + "\n", + "#RESULTS\n", + "print ' Velocity = %.2f ft/sec'%(Va)\n", + "print ' Flow rate = %.1f ft**3'%(Q)\n", + "\n", + "print (v1)\n", + "print (ari)\n", + "print (i)\n", + "\n", + "# rounding off error. and for 'i' answer is wrong. please check. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Velocity = 50.98 ft/sec\n", + " Flow rate = 35.9 ft**3\n", + "[-1.154 -0.385]\n", + "[ 130.86126801 157.81238868]\n", + "[-19.13873199 7.81238868]\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "\t\n", + "#initialisation of variables\n", + "rt= 0.5 \t#ft\n", + "rr= 0.16 \t#ft\n", + "dv1= 88.3 \t#ft/sec\n", + "b= 150. \t#degrees\n", + "a= 5. \t#degrees mean radius\n", + "v1= array([-0.933 ,-0.311])\n", + "i= array([1.0, 5.0 ,6.7])\n", + "\t\n", + "#CALCULATIONS\n", + "b1= b+a\n", + "A= math.pi*(rt**2-rr**2)\n", + "Va= -dv1*math.radians(math.tan(b1))\n", + "Q= Va*A\n", + "a1= degrees(tan(v1))+180\n", + "\n", + "\t\n", + "#RESULTS\n", + "print ' Velocity = %.2f ft/sec'%(Va)\n", + "print ' Flow rate = %.1f ft**3/sec'%(Q)\n", + "\n", + "print (v1)\n", + "print (a1)\n", + "print (i)\n", + "#Incorrect calculations in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = -2.76 ft/sec\n", + " Flow rate = -1.9 ft**3/sec\n", + "[-0.933 -0.311]\n", + "[ 102.69071396 161.58339075]\n", + "[ 1. 5. 6.7]\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "r= 1. \t#in\n", + "b= 0.75 \t#in rotor inlet width\n", + "w= 180. \t#rev/sec\n", + "B= 120. \t#degrees blade inlet angle\n", + "Bo= 150. \t#degrees blade outlet angle\n", + "ro= 3. \t#ft\n", + "bo= 0.5 \t#ft\n", + "Vbo= 180. \t#ft/sec\n", + "w1= 62.4 \t#lbf/ft**3 density\n", + "g= 32.2 \t#ft/sec**2\n", + "\t\n", + "#CALCULATIONS\n", + "Q= -2*math.pi*(r/12)**2*(b/12)*w*math.tan(math.radians(B))\n", + "Vfo= Q/(2*math.pi*(ro/12)*(bo/12))\n", + "Vwo= Vbo*(ro/12)+Vfo*1/math.tan(math.radians(Bo))\n", + "C= w1*Q*Vwo*(ro/12)/g\n", + "dp= w1*Vwo*w*(ro/12)/g\n", + "ari= degrees(math.atan((-Q*0.8/(2*math.pi*(r/12)**2*(b/12)*w))))+180\n", + "i1= ari-B\n", + "\n", + "#RESULTS\n", + "print ' Flow rate = %.2f ft**3/sec'%(Q)\n", + "print ' radial velocity= %.2f ft/sec'%(Vfo)\n", + "print ' outlet whirl velocity= %.2f ft/sec'%(Vwo)\n", + "print ' Torque= %.2f lbf ft'%(C)\n", + "print ' Stagnant pressure = %.f lbf/ft**2'%(dp)\n", + "print ' Incidence angle = %.1f degrees'%(i1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Flow rate = 0.85 ft**3/sec\n", + " radial velocity= 12.99 ft/sec\n", + " outlet whirl velocity= 22.50 ft/sec\n", + " Torque= 9.27 lbf ft\n", + " Stagnant pressure = 1962 lbf/ft**2\n", + " Incidence angle = 5.8 degrees\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "r= 1.4\n", + "Mai= 0.5 \t#ft/sec mach number\n", + "T= 582. \t#R temperature\n", + "psi= 3040. \t#lbf/in**2 pressure\n", + "R= 53.3 \t #ft lbf/lbm gas\n", + "g= 32.2 \t#ft/sec**2\n", + "Vwi= 300. \t#ft/sec velocity\n", + "m= 35. \t#lb/sec\n", + "rm= 0.7 \t #ft radius\n", + "rp= 4.25\n", + "w= 1200. \t#rev/sec\n", + "cp= 0.24\n", + "J= 778. \t#lb\n", + "\t\n", + "#CALCULATIONS\n", + "tr= 1+0.5*(r-1)*Mai**2\n", + "Ti= round(T/tr)\n", + "pr= tr**(r/(r-1))\n", + "pi= psi/pr\n", + "ai= pi/(R*Ti)\n", + "Vi= Mai*(r*R*g*Ti)**0.5\n", + "Vai= math.sqrt(Vi**2-Vwi**2)\n", + "h= m/(2*math.pi*ai*rm*Vai)\n", + "pr1= rp**(1./12)\n", + "Vwo= Vwi+(pr1**((r-1)/r)-1)*(cp*J*g*T/(rm*w))\n", + "BO= 1/math.tan(math.radians((Vwo-w*rm)/Vai))\n", + "\n", + "\n", + "#RESULTS\n", + "print ' Absolute air velocity = %.f ft/sec'%(Vi)\n", + "print ' air velocity = %.f ft/sec'%(Vai)\n", + "print ' Blade height = %.3f ft'%(h)\n", + "print ' velocity = %.f ft/sec'%(Vwo)\n", + "print ' outlet balde angle = %.1f degrees'%(BO) #incorrect answer in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Absolute air velocity = 577 ft/sec\n", + " air velocity = 493 ft/sec\n", + " Blade height = 0.186 ft\n", + " velocity = 446 ft/sec\n", + " outlet balde angle = -71.7 degrees\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch12.ipynb b/Basic_Fluid_Mechanics/ch12.ipynb new file mode 100755 index 00000000..61bd9af9 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch12.ipynb @@ -0,0 +1,302 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:747d23d1d49d9ec45297f78a51cc698e8f77e86dac46ee6fa2ac037964e152b9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Turbomachines: Further Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from matplotlib.pyplot import *\n", + "import math \n", + "\t\n", + "#initialisation of variables\n", + "d= 0.0764 \t #lbm/ft**3\n", + "u= 3.74*10**-7 \t #lbf sec/ft**2\n", + "D= 15. \t#in\n", + "g= 32.2 \t #ft/sec**2\n", + "p= 14.7 \t #lb/in**2\n", + "r1= [0.02, 0.04, 0.06, 0.08, 0.1, 1.15]\n", + "r2= [0.0338, 0.0267, 0.0199, 0.0159, 0.0132, 0.0100]\n", + "r3= [0.46, 0.92, 1.38, 1.84, 2.3, 2.64]\n", + "r4= [2.97, 2.35, 1.75, 1.4, 1.16, 0.88]\n", + "r5= [0.0206, 0.0163, 0.0121, 0.0097, 0.0081, 0.0061]\n", + "\t\n", + "#CALCULATIONS\n", + "re= (d/u)*(p*100*2*math.pi/60)*(D/12)**2/g\n", + "\t\n", + "#RESULTS\n", + "print 'Reynolds Number = %.2e '%(re)\n", + "print \"m/qwD**3 g0deltaPe/QW**2D**2 m(lbm/sec) deltap(lbf/ft**2) deltap(lbf/in**2)\"\n", + "for i in range(len(r1)):\n", + " print \"%7.2f %8.4f %7.2f %7.2f %8.4f\"%(r1[i],r2[i],r3[i],r4[i],r5[i])\n", + "\n", + "plot(r3,r5)\n", + "xlabel(\"m lbm/sec\")\n", + "ylabel( \"dPs lbf/ft**2\") \n", + "suptitle(\"Actual perfomance curve\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Reynolds Number = 1.53e+06 \n", + "m/qwD**3 g0deltaPe/QW**2D**2 m(lbm/sec) deltap(lbf/ft**2) deltap(lbf/in**2)\n", + " 0.02 0.0338 0.46 2.97 0.0206\n", + " 0.04 0.0267 0.92 2.35 0.0163\n", + " 0.06 0.0199 1.38 1.75 0.0121\n", + " 0.08 0.0159 1.84 1.40 0.0097\n", + " 0.10 0.0132 2.30 1.16 0.0081\n", + " 1.15 0.0100 2.64 0.88 0.0061\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEhCAYAAABV3CYhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtclGXex/HPIApmB01FiyE1tYzhrEYecMlDBGoesIe0\nSMV23TYzs3ystvLwVJsdttTKTE0r3cqw0kIpU9CydK1Ry9rSXE2GttZDlqnkINfzx10TiCAIwzDw\nfb9evprDdd/zu7h7zW+u+zrZjDEGERGRMxTg6wBERMS/KZGIiEiVKJGIiEiVKJGIiEiVKJGIiEiV\nKJGIiEiVKJFIjXnzzTcJCAjgq6++Om3ZJ598kmPHjp3xZy1atIhbb731jI8vz6uvvsoll1xCnz59\nvHJ+EX+jRCI15uWXX2bAgAG8/PLLpy07c+ZMjh49esafZbPZzvjYshhjKCoqYuHChSxatIg1a9ZU\n+2fUVkVFRb4OQWoxJRKpET///DObNm3iqaee4tVXX/W8XlhYyC233MJll11GdHQ0M2fOZPbs2Xz7\n7bdceeWVnl/9Z599tueYzMxMRo8eDcCKFSuIj48nMjKSXr168Z///KfcOKZOnUp6ejoJCQm0b9+e\np59+2vPe9OnTiYqK4rLLLuPuu+8GYM+ePVx66aWMGjWKmJgYHnzwQTZs2EBGRgaTJ0+moKCA4cOH\n43A4iIyM5J133gGsFtHgwYNJTk6mXbt2PPXUUzz22GN06dKFuLg49u/fD8DcuXO5/PLLcTgcDBw4\nkJ9//hmAUaNGcdttt9GrVy8uuugi/vGPf3jinDZtGpdddhkxMTFMnjwZgK+++oorr7yS6Oho4uPj\n+fzzz0vV/fDhw1x33XU4HA6io6NZtmxZuX/bUaNG8ec//5kePXowadIk2rVrx48//ugp27FjR/bt\n28d3333HgAEDiI6OJiYmhnXr1pV7DaQOMiI1YPHixWbs2LHGGGMSEhLMJ598Yowx5u9//7tJS0vz\nlDt06JAxxpi2bduaAwcOeF4/++yzPY8zMzPNqFGjjDHG/Pjjj57X582bZ8aNG2eMMWbhwoWex8VN\nmTLFxMTEGLfbbX744QcTGhpq9u7da5YvX27+9Kc/GWOMOXHihBkwYIBZvXq12b17twkICDAff/yx\n5xyJiYme+B988EHPcTt37jStW7c2x44dMwsXLjQdOnQwx44dM/v27TPnnnuumT9/vjHGmNtvv908\n+uijpeK/9957zWOPPWaMMWbUqFHmuuuuM8YY88UXX5g2bdoYY4x5/fXXTY8ePczx48dLHN+9e3ez\nc+dOY4wxGzduND169ChV9/Hjx5s777zT8/y3Y8v6244cOdIMHjzY895tt91mFi5c6PmMfv36GWOM\nGTJkiPnggw+MMcZ88803pn379qU+W+q2QF8nMqkfXn75ZW6//XYArr32Wl5++WXi4uJYs2aN53WA\n8847r1Ln/frrr5k4cSIHDhzA7XZz0UUXlVveZrMxaNAgAgMDadq0KX369GHjxo2sW7eOd999l9jY\nWACOHDnCnj176NChA23atKFz586nPN+GDRuYNGkSAB06dKBjx45s374dm83GlVdeSXBwMMHBwTRt\n2pSUlBQAIiMj2bp1KwCbNm3ivvvu49ixYxw+fJi+fft6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r6+fO1A6vPs1ev\nXkRGRnLppZfyyCOPnLKcv17DitTPX69hQUEBXbt2JTY2lksuuYTbb7/9lOUqde2qeT5LjanKhEd/\nUJH65eTkmIEDB/oowqpZv369cTqdJiIi4pTv+/O1M+b09fPna2eMMd9995357LPPjDHGHD582HTs\n2NFs3bq1RBl/voYVqZ8/X8OjR48aY4xxu90mPj7erF27tsT7lb12ftsiqcqER39QkfpBxYZP10YJ\nCQk0a9aszPf9+drB6esH/nvtAFq1auXppzz77LOJiori22+/LVHGn69hReoH/nsNGzduDMDx48c5\nceIErVq1KvF+Za+d3yaSqkx49AcVid1ms/HRRx8RGRlJnz592LZtW02H6TX+fO0qoi5duz179rB5\n82Z69uxZ4vW6cg3Lqp8/X8OioiJiYmJo1aoVV155JeHh4SXer+y189qoLW870wmP/jK3pCJxdu7c\nGZfLRXBwMO+++y6DBw9m9+7dNRBdzfDXa1cRdeXa/fzzz1x77bXMnDmTc845p9T7/n4Ny6ufP1/D\ngIAAtm7dyo8//khSUhK5ubkkJiaWKFOZa+e3LZLKTHj8jcvlwu4nazpXpH5nn302wcHBAFx11VU0\natSI7777rkbj9BZ/vnYVUReundvtJjU1lREjRjB48OBS7/v7NTxd/erCNTzvvPPo378/GzduLPF6\nZa+d3yaS4hMe3W43S5cuJTk5uUSZlJQUlixZAlBiwqM/qEj99u/f73n8ySefcOTIkVNOzvRH/nzt\nKsLfr50xhjFjxhAeHl7mqB9/voYVqZ+/XsMDBw5w+PBhAI4dO8bq1atLjS6s7LXz21tbVZnw6A8q\nUr+XX36Z5557DoBGjRrxj3/8w28mZw4fPpx169axf/9+wsLCmDZtGm63G/D/awenr58/XzuADRs2\nsHjxYqKiooiNjQXgoYceYu/evYD/X8OK1M9fr+G3337LjTfeiDGGgoICRowYQf/+/av03akJiSIi\nUiW1P32KiEitpkQiIiJVokQiIiJVokQiIiJVokQiIiJVokQiIiJVokQiUkW5ubkMHDgQgKlTp/L4\n449X6Xz/+c9/SEpKqo7QRGqEEolINaqO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pEfSQiIlIlSiQiIlIlSiQiIlIlSiQi\nIlIlSiQiIlIlSiQiIlIlSiQiIlIl/w/IbjDGd8tQDQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page No : 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "psif= 10.2 \t#lbf/in**2 pressure\n", + "usit= 3.8*10**-7 \t#lbf sec/ft**2 viscosity\n", + "usif= 3.52*10**-7 \t#lbf sec/ft**2 viscosity\n", + "Tsit= 530. \t#R temperature\n", + "Tsif= 480. #R temperature\n", + "wf= 15000. \t#rev/min speed\n", + "\t\n", + "#CALCULATIONS\n", + "Psit= psif*usit*math.sqrt(Tsit/Tsif)/usif\n", + "wt= wf*math.sqrt(Tsit/Tsif)\n", + "\t\n", + "#RESULTS\n", + "print 'Pressure in the test cell = %.1f lbf/in**2'%(Psit) \n", + "print ' Compressor speed = %.f rev.min'%(wt) \n", + "\n", + "# book answer is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in the test cell = 11.6 lbf/in**2\n", + " Compressor speed = 15762 rev.min\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "w= 62.3 \t#lbf/ft**3 weight\n", + "d= 0.375 \t#in diameter\n", + "ro= 0.75 \t#ft radius\n", + "l= 1.25 \t#ft length\n", + "b= 120. \t#degrees angle\n", + "do= 0.25 \t#in diameter\n", + "p= 750. \t#lbf/in**2\n", + "g= 32.1 \t#ft/sec**2\n", + "f= 0.03 # friction factor\n", + "f1= 0.9\n", + "f2= 0.3\n", + "w1= 60. \t#rad/sec\n", + "\t\n", + "#CALCULATIONS\n", + "Q= math.sqrt(((p/w)+((60*ro)**2/(2*g))+do)*math.pi**2*g*(d/12)**4/((d/do)**4-1+(l*f/(d/12))+f1+f2))*0.353\n", + "Vwo= w1*ro+(4*Q/(math.pi*(do/12)**2))*math.cos(math.radians(b))\n", + "C= w*Q*Vwo*ro/g\n", + "\t\n", + "#RESULTS\n", + "print ' Flow Rate = %.4f ft**3/sec'%(Q) \n", + "print ' Vwo = %.2f ft/sec'%(Vwo) \n", + "print ' Driving Torque = %.3f lbf ft'%(C) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Flow Rate = 0.0160 ft**3/sec\n", + " Vwo = 21.56 ft/sec\n", + " Driving Torque = 0.502 lbf ft\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "W= 38. \t#rev/sec speed\n", + "w= 62.4 \t#lbf/ft**3 density\n", + "m= 2000. \t#lbm/sec flow rate\n", + "g= 32.2 \t#ft/sec**2\n", + "ps= 5000. \t#lbf/ft**2 pressure rise\n", + "S3= 4.6\n", + "e= 0.91\n", + "\t\n", + "#CALCULATIONS\n", + "S1= W*(w*m**2/(g*ps)**3)**0.25\n", + "D= S3*(m**2/(w*g*ps))**0.25\n", + "\t\n", + "#RESULTS\n", + "print ' S1 = %.3f'%(S1) \n", + "print ' Diameter = %.2f ft'%(D) \n", + "print ' efficiency = %.2f '%(e)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " S1 = 0.594\n", + " Diameter = 3.65 ft\n", + " efficiency = 0.91 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No : 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "d= 6. \t#in diameter\n", + "f= 0.25\n", + "l= 1200. \t#ft long\n", + "p= 55. \t#lbm/ft**3\n", + "w= 740. \t#rev/min\n", + "g= 32.2 \t#ft/sec**2\n", + "n= 0.87 # efficiency\n", + "d1= 1.78 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "D= (0.13*math.pi**2*(d/12)**5/(8*f*l*0.012**2))**0.25*d1\n", + "m= 0.012*p*(w*2*math.pi/60)*D**3\n", + "dps= 0.13*p*(w*2*math.pi*D/60)**2/g\n", + "P= m*10*dps/(p*n)\n", + "\t\n", + "#RESULTS\n", + "print ' Diameter = %.2f ft'%(D) \n", + "print ' Mass flow rate = %.1f lbm/sec'%(m) \n", + "print ' pressure rise = %.1f lbf/ft**2'%(round(dps,-1))\n", + "print ' shaft power = %.2e ft lbf/sec'%(P)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Diameter = 1.04 ft\n", + " Mass flow rate = 57.3 lbm/sec\n", + " pressure rise = 1440.0 lbf/ft**2\n", + " shaft power = 1.72e+04 ft lbf/sec\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch13.ipynb b/Basic_Fluid_Mechanics/ch13.ipynb new file mode 100755 index 00000000..6819ab71 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch13.ipynb @@ -0,0 +1,185 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:943d4576ca0c6a409710e5e5dfd3597778d333997c650e03aa4c9f933860e70a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Hydraulic Power Transmission|" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "nop= 0.88\n", + "nom= 0.88 # constant\n", + "Pm= 75. \t#hp\n", + "p= 3000. \t#lb/in**2 pressure\n", + "d= 54.5 \t#lbm/ft**3 density\n", + "u= 1.05*10**-4 # viscosity\n", + "d1= 0.5 \t#in\n", + "g= 32.2 \t#ft/sec**2\n", + "\t\n", + "#CALCULATIONS\n", + "nt= (7./11)*nop*nom\n", + "pp= Pm/nt\n", + "Q= nop*pp*550/(p*144)\n", + "Re= 4*d*Q/(math.pi*u*(d1/12)*g)\n", + "\t\n", + "#RESULTS\n", + "print ' ntrans = %.3f '%(nt)\n", + "print ' Input power = %.f hp'%(pp)\n", + "print ' Flow rate = %.3f ft**3/sec'%(Q)\n", + "print ' Reynolds Number = %.1e '%(Re)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " ntrans = 0.493 \n", + " Input power = 152 hp\n", + " Flow rate = 0.171 ft**3/sec\n", + " Reynolds Number = 8.4e+04 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "lc= 0.25\n", + "a= 90. \t#degrees\n", + "p= 3000. \t#lb/in**2 pressure\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 0.5 \t#in\n", + "Q= 0.171 \t#ft**3/sec\n", + "d= 54.5 \t#lbm/ft**3 density\n", + "n1= 2. \n", + "n2= 6.\n", + "lc1= 0.9\n", + "nop= 0.88\n", + "nom= 0.88\n", + "\t\n", + "#CALCULATIONS\n", + "P1= 4*p*144/11\n", + "P2= 8*d*Q**2*(n1*lc+n2*lc1)/(math.pi**2*(d1/12)**4*g)\n", + "pt= P1+P2\n", + "dpm= (p*144-pt)\n", + "ntrans= nop*nom*dpm/(p*144)\n", + "\t\n", + "#RESULTS\n", + "print ' Frictional pressure drop = %.2e lbf/ft**2'%(P1) \n", + "print ' Extra Frictional pressure drop = %.2e lbf/ft**2'%(P2) \n", + "print ' Total pressure drop = %.2e lbf/ft**2'%(pt)\n", + "print ' Motor pressure drop = %.2e lbf/ft**2'%(dpm)\n", + "print ' Overall transmission coefficiency = %.3f'%(ntrans)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Frictional pressure drop = 1.57e+05 lbf/ft**2\n", + " Extra Frictional pressure drop = 7.85e+04 lbf/ft**2\n", + " Total pressure drop = 2.36e+05 lbf/ft**2\n", + " Motor pressure drop = 1.96e+05 lbf/ft**2\n", + " Overall transmission coefficiency = 0.352\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No : 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "bip= 135. \t#degrees inlet angle\n", + "bop= 150. \t#degrees outlet angle\n", + "bot= 140. \t#degrees turbine outlet angle\n", + "bos= 137. \t#degrees stator blade outlet angle\n", + "r= 1.8 \n", + "r1= 1.8 # ratio b1/b2\n", + "r2= 0.7 # ratio b1/b3\n", + "r3= 0.95 # ratio r3/r1\n", + "\t\n", + "#CALCULATIONS\n", + "Vw2r2byVw1r1 = (1+(1/math.tan(math.radians(bip))/1/math.tan(math.radians(bos))))*r**2-r1*(1/math.tan(math.radians(bop))/1/math.tan(math.radians(bos)))\n", + "Vw3r3byVw1r1 = r2*r3**2*(1+(1/math.tan(math.radians(bip))/1/math.tan(math.radians(bos))))-(1/math.tan(math.radians(bot))/1/math.tan(math.radians(bos)))\n", + "CtbyCp = (Vw2r2byVw1r1-Vw3r3byVw1r1)/(Vw3r3byVw1r1-1)\n", + "\t\n", + "#RESULTS\n", + "print ' R1 = %.2f'%(Vw2r2byVw1r1) \n", + "print ' R2 = %.2f'%(Vw3r3byVw1r1) \n", + "print ' Torque ratio = %.2f'%(CtbyCp)\n", + "\n", + "# rounding off error. please check. instead of cot, have used 1/tan. please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " R1 = 3.37\n", + " R2 = 0.03\n", + " Torque ratio = -3.45\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch14.ipynb b/Basic_Fluid_Mechanics/ch14.ipynb new file mode 100755 index 00000000..9cfe7a00 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch14.ipynb @@ -0,0 +1,148 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bc77360c046c25bc1074d9e1441ee10dd742c14709d1f92baa61c939b8a28b76" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Further Developments" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page No : 532" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from matplotlib.pyplot import *\n", + "\t\n", + "#initialisation of variables\n", + "a= 60.5\n", + "Q= 0.2 \t#ft**3/sec flow rate\n", + "d= 3. \t#in diameter\n", + "u= 0.0325\n", + "g= 32.2 \t#ft/sec**2\n", + "T= [50.0, 60.0, 70.0, 80.0, 90.0, 100.0]\n", + "Ep= [294.5, 188.6, 113.2, 60.4, 37.7, 24.5]\n", + "Eh= [0 ,69.9, 139.8, 209.7, 279.5, 349.4]\n", + "Et= [295, 258, 253, 270, 317, 374]\n", + "\t\n", + "#CALCULATIONS\n", + "re= a*4*Q/(math.pi*(d/12)*u*g)\n", + "\t\n", + "#RESULTS\n", + "print 'Reynolds Number = %.1f '%(re)\n", + "print (T)\n", + "print (Ep)\n", + "print (Eh)\n", + "print (Et)\n", + "plot(T,Ep)\n", + "plot(T,Eh)\n", + "plot(T,Et)\n", + "\n", + "xlabel(\"T (F)\")\n", + "ylabel(\"Eh,Ep,Eh&Ep (kW)\")\n", + "suptitle(\"Variations of Ep, Eh and (Ep+Eh) with T\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Reynolds Number = 58.9 \n", + "[50.0, 60.0, 70.0, 80.0, 90.0, 100.0]\n", + "[294.5, 188.6, 113.2, 60.4, 37.7, 24.5]\n", + "[0, 69.9, 139.8, 209.7, 279.5, 349.4]\n", + "[295, 258, 253, 270, 317, 374]\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xtczvf7wPFXNeccJnIKmTmV0sFhKHKMYma2YRg2xoaS\n44ZNGM2GsNl+9p0xs4PDbLblOMqZME2OI0zlVHKKzr1/f3zWTVRS3d33Xdfz8ejh7u7+fD7XfZf7\nut+n622mlFIIIYQQ2TA3dABCCCGMmyQKIYQQOZJEIYQQIkeSKIQQQuRIEoUQQogcSaIQQgiRI0kU\nJqZjx45s3bo1030LFy7k3XffzfU5pk+fzvbt23N8zLfffsuVK1d03w8fPpxTp049XbAFYPz48TRp\n0oTJkydnun/FihVUrVoVZ2dn3dfp06fzdI0hQ4bw3HPP6c7j5uYGgL+/P/Pnz8/3c3gSW1tb4uLi\nsvxZ586duXv3LgAWFhaZnu8nn3ySr+tevHiRMmXKZDrnqlWrALC0tMzymMWLF/Pdd9/l6Xq///47\nc+f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h07\nkJaWBgBYs2aN8rzZBgYGMDo6qqrtJGhp44yC6F+KdY9qU1MT9u/fP+/zS0tLce/evUSHRbRgWCiI\nEqSjowOFhYXK40gkoiw7HTx4UGkvKipCe3t7MkIk+itceiJKkJGREWg0GuXx6tWr/7j0pNfrMTg4\nuIiREf03nFEQLTIR4W8l0JLCQkGUIJmZmQgGg/P2+/DhAzZv3rwIERElBgsF0b8UazbgdDrR09Mz\nb7+uri7s3r17QWIjWgjcZpwoQZ48eYLm5mY0NDTE7VdcXIy7d+/y8lhaMjijIEqQ4uJi+P1+5Ya7\nP/H5fDCZTCwStKRwRkFERHFxRkFERHGxUBARUVwsFEREFBcLBRERxcVCQUREcbFQEBFRXP8A3miz\npEyyc1UAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page No : 535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "wcb= 2. \t#ton weighing\n", + "wc= 100. \t #ton\n", + "wa= 6.5 \t #% of the weight\n", + "wca= 20. \n", + "r= 0.8\n", + "r1= 1.2\n", + "\t\n", + "#CALCULATIONS\n", + "wca1= wc/wa\n", + "wca2= wcb*(wca1/wca)**1.5\n", + "Wca= wcb*r**(9./4)*(1./r1)**(9./4)*(wca1/wca)**1.5\n", + "\t\n", + "#RESULTS\n", + "print ' Wc/Wa = %.2f '%(wca1)\n", + "print ' Wc,a = %.2f ton'%(wca2)\n", + "print ' Wc,a = %.2f ton'%(Wca)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Wc/Wa = 15.38 \n", + " Wc,a = 1.35 ton\n", + " Wc,a = 0.54 ton\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch2.ipynb b/Basic_Fluid_Mechanics/ch2.ipynb new file mode 100755 index 00000000..eab5eede --- /dev/null +++ b/Basic_Fluid_Mechanics/ch2.ipynb @@ -0,0 +1,309 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:30849a845cb23e6184901c441ceb4a2e2451d5db6a2c0f60dce1b23531e4d077" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Similarity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 4.\n", + "l1= 4 \t#units long axis\n", + "l2= 10 \t#units long axis\n", + "\t\n", + "#CALCULATIONS\n", + "sxy= (4/r)\n", + "sxy1= l1**2\n", + "sxy2= l2**2\n", + "\t\n", + "#RESULTS\n", + "print 'x**2+4*y**2 = %.f '%(sxy)\n", + "print ' x**2+4*y**2 = %.f '%(sxy1)\n", + "print ' x**2+4*y**2 = %.f '%(sxy2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x**2+4*y**2 = 1 \n", + " x**2+4*y**2 = 16 \n", + " x**2+4*y**2 = 100 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "vo= 10 \t#ft/sec\n", + "a= 0.5 \t#ft**-1\n", + "b= 1 \t#ft\n", + "x= -2 \t#ft\n", + "y= 2 \t#ft\n", + "b1= 2\n", + "a1= 3./5 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "Vx= vo/(a*x**2+b)\n", + "Vy= -2*a*b*vo*x*y/(a*x**2+b)**2\n", + "V= math.sqrt(Vx**2+Vy**2)\n", + "fx= -2*a*b**2*vo**2*x/(a*x**2+b)**3\n", + "fy= 2*a*b**2*vo**2*y*(b-a*x**2)/(a*x**2+b)**4\n", + "f= math.sqrt(fx**2+fy**2)\n", + "r= b1**2/a1\n", + "f1= f*r\n", + "\t\n", + "#RESULTS\n", + "print 'Vx = %.2f ft/sec'%(Vx)\n", + "print ' Vy = %.2f ft/sec'%(Vy)\n", + "print ' V = %.2f ft/sec'%(V)\n", + "print ' fx = %.2f ft/sec**2'%(fx)\n", + "print ' fy = %.2f ft/sec**2'%(fy)\n", + "print ' f = %.2f ft/sec**2'%(f)\n", + "print ' r = %.2f in the present case'%(r)\n", + "print ' f1 = %.2f ft/sec**2'%(f1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vx = 3.33 ft/sec\n", + " Vy = 4.44 ft/sec\n", + " V = 5.56 ft/sec\n", + " fx = 7.41 ft/sec**2\n", + " fy = -2.47 ft/sec**2\n", + " f = 7.81 ft/sec**2\n", + " r = 6.67 in the present case\n", + " f1 = 52.05 ft/sec**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 1./5\n", + "b1= 2 \t#ft\n", + "a1= 3./5 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "r= (a1*b1)**2*r\n", + "\t\n", + "#RESULTS\n", + "print 'ratio of resultant forces acting on coorresponding fluid elements = %.3f '%(r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of resultant forces acting on coorresponding fluid elements = 0.288 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "vos= 70. \t#ft/sec\n", + "as1= 78. \t#ft density\n", + "am= 72. \t#ft wind-tunnel\n", + "ls1= 6. \t#ft strut section\n", + "lm= 2. \t#ft length\n", + "um= 386. \t#ft/sec\n", + "us= 372. \t#ft/sec\n", + "dm= 0.4\n", + "\t\n", + "#CALCULATIONS\n", + "vom= vos*as1*ls1*um/(am*lm*us)\n", + "Ds= dm*(am/as1)*(us/um)**2\n", + "\t\n", + "#RESULTS\n", + "print 'Air speed = %.f ft/sec'%(vom)\n", + "print ' Ds = %.3f lbf'%(Ds)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air speed = 236 ft/sec\n", + " Ds = 0.343 lbf\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "vom= 236. \t#ft/sec\n", + "as1= 0.072 \t#ft\n", + "am = 62.4 \t#ft density of water\n", + "ls1= 2. \t#ft\n", + "lm= 8. \t#ft\n", + "um= 248. \t#ft/sec viscosity\n", + "us= 3.86 \t#ft/sec\n", + "Pm= 0.4/3.3\n", + "\t\n", + "#CALCULATIONS\n", + "voh= vom*as1*ls1*um/(am*lm*us)\n", + "Ds= Pm*(as1/am)*(um/us)**2*(ls1/lm)*(lm-ls1)\n", + "\t\n", + "#RESULTS\n", + "print 'Air speed = %.2f ft/sec'%(voh)\n", + "print ' Drag force = %.3f lbf'%(Ds)\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air speed = 4.37 ft/sec\n", + " Drag force = 0.866 lbf\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "To1= 540. \t#R temperature\n", + "po3= 12.6 \t#lbf/in**2\n", + "l3= 3. \t#ft\n", + "po1= 14.7 \t#lbf/in**2 pressure\n", + "l1= 1. \t#ft\n", + "vo1= 500. \t#ft/sec velocity\n", + "r= 0.83\n", + "P1= 1. \t#lbf/in**2 turbine blade\n", + "\t\n", + "#CALCULATIONS\n", + "To3= To1*(po3*l3/(po1*l1))**r\n", + "Vo3= vo1*math.sqrt(To3/To1)\n", + "P3= P1*po3*l3/(po1*l1)\n", + "\t\n", + "#RESULTS\n", + "print 'To3 = %.f R'%(To3)\n", + "print ' Vo3 = %.f ft/sec'%(Vo3)\n", + "print ' P3 = %.2f lbf/ft'%(P3)\n", + "\n", + "# note : book answers are not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To3 = 1183 R\n", + " Vo3 = 740 ft/sec\n", + " P3 = 2.57 lbf/ft\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch3.ipynb b/Basic_Fluid_Mechanics/ch3.ipynb new file mode 100755 index 00000000..cd8562e6 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch3.ipynb @@ -0,0 +1,160 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be8f61b53e434158045726efedae14168d3ad7c750cfe29d070385bb73f71e47" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Dimensional Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "t= 1. \t#hr\n", + "g1= 32.2 \t#ft/sec**2\n", + "g2= 32.2 \t#lbm ft/lbf\n", + "u= 2.4*10**-5 \t#lbf sec/ft**2\n", + "\t\n", + "#CALCULATIONS\n", + "q2= g*(t*60*60)**2\n", + "go= g*(t*60*60)**2\n", + "q3= g/g2\n", + "u1= u/(t*60*60)\n", + "\t\n", + "#RESULTS\n", + "print ' q2 = %.2e lbm ft/lbf hr**2'%(q2)\n", + "print ' go = %.2e lbm ft/lbf hr**2'%(go)\n", + "print ' go = %.f slug ft/lbf sec**2'%(q3)\n", + "print ' viscosity = %.2e lbf hr/ft**2'%(u1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " q2 = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 1 slug ft/lbf sec**2\n", + " viscosity = 6.67e-09 lbf hr/ft**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "m= 1 \t#lb\n", + "\t\n", + "#CALCULATIONS\n", + "m1= g/m\n", + "\t\n", + "#RESULTS\n", + "print '1 lbf/sec ft**2 = %.1f lbm/ft sec'%(m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 lbf/sec ft**2 = 32.2 lbm/ft sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "n1=1.\n", + "n2= 3.\n", + "n3=2.\n", + "\t\n", + "#CALCULATIONS\n", + "a1= -n1\n", + "a2= -n3\n", + "a3= -n1-a2+3*a1\n", + "b1= -n1\n", + "b2= -n1\n", + "b3= n1+3*b1-b2\n", + "\t\n", + "#RESULTS\n", + "print ' a1 = %.f '%(a1)\n", + "print ' a2 = %.f '%(a2)\n", + "print ' a3 = %.f '%(a3)\n", + "print ' b1 = %.f '%(b1)\n", + "print ' b2 = %.f '%(b2)\n", + "print ' b3 = %.f '%(b3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a1 = -1 \n", + " a2 = -2 \n", + " a3 = -2 \n", + " b1 = -1 \n", + " b2 = -1 \n", + " b3 = -1 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch5.ipynb b/Basic_Fluid_Mechanics/ch5.ipynb new file mode 100755 index 00000000..e44fb093 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch5.ipynb @@ -0,0 +1,212 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:925f1eedf50c877ed321461a7c6fe2319e03573a843bd9a8a44c0d22ceada0ec" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Control-Volume Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "w= 20. \t#lbm/sec plant rate\n", + "sh= 0.004\n", + "mw2= 0.12 \t#lbm/sec stream rate\n", + "ma3= 12.2 \t#lbm/sec rates of air\n", + "mw3= 0.130 \t#lbm/sec water rate\n", + "\t\n", + "#CALCULATIONS\n", + "mw1= w/((1/sh)+1)\n", + "ma1= w-mw1\n", + "ma4= ma1-ma3\n", + "mw4= mw1+mw2-mw3\n", + "mr= ma4+mw4\n", + "sh1= mw4/ma4\n", + "\t\n", + "#RESULTS\n", + "print ' mw1 = %.4f lbm/sec'%(mw1)\n", + "print ' ma1 = %.2f lbm/sec'%(ma1)\n", + "print ' ma4 = %.2f lbm/sec'%(ma4)\n", + "print ' mw4 = %.4f lbm/sec'%(mw4)\n", + "print ' mr = %.2f lbm/sec'%(mr)\n", + "print ' specific humidity = %.5f lbm/sec'%(sh1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " mw1 = 0.0797 lbm/sec\n", + " ma1 = 19.92 lbm/sec\n", + " ma4 = 7.72 lbm/sec\n", + " mw4 = 0.0697 lbm/sec\n", + " mr = 7.79 lbm/sec\n", + " specific humidity = 0.00903 lbm/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "w= 62.4 \t#lbf/ft**3 fluid density\n", + "g= 32.2 \t#ft/sec**2 \n", + "v= 86.5 \t#ft/sec velocity\n", + "d2= 3. \t#in\n", + "d1= 6. \t#in\n", + "dp= 50. \t#lbf/in**2 gauge pressure\n", + "\t\n", + "#CALCULATIONS\n", + "Fb= ((math.pi*(w/g)*v**2*(1/d1)**2*(1-(d2/d1)**2)*0.25)-dp*144*(math.pi/4)*(1/d2)**2)\n", + "\t\n", + "#RESULTS\n", + "print 'Load on the bolts = %.f lbf'%(Fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load on the bolts = -391 lbf\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "F1= 237. \t#lb\n", + "dp= 50. \t#lbf/in**2\n", + "D= 6. \t#in diameter\n", + "\t\n", + "#CALCULATIONS\n", + "F2= dp*144*(math.pi/4)*(D/12)**2\n", + "Fb= F1-F2\n", + "\t\n", + "#RESULTS\n", + "\n", + "print 'Load on the bolts = %.f lbf'%(Fb)\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load on the bolts = -1177 lbf\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "w1= 0.0286 \t#lbm/ft**3 density\n", + "v= 2500. \t#ft/sec velocity\n", + "A= 2.5 \t#ft**3 area\n", + "k= 0.015\n", + "p2= 700. \t#lbf/ft**2\n", + "p1= 628. \t#lbf/ft**2 pressure\n", + "v2= 3500. \t#ft/sec outlet\n", + "g= 32.17 \t#ft/sec**2\n", + "\t\n", + "#CALCULATIONS\n", + "ma= w1*v*A\n", + "mf= round(k*ma,2)\n", + "mt= round(ma+mf,1)\n", + "F= (p2-p1)*A+(mt*v2/g)-(ma*v/g)\n", + "\n", + "\n", + "#RESULTS\n", + "print ' air mass flow rate = %.2f lbm/sec'%(ma)\n", + "print ' Fuel flow rate = %.2f lbm/sec'%(mf)\n", + "print ' Fuel flow rate at station 2 = %.2f lbm/sec'%(mt)\n", + "print ' Thrust force = %d lbf'%(round(F,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " air mass flow rate = 178.75 lbm/sec\n", + " Fuel flow rate = 2.68 lbm/sec\n", + " Fuel flow rate at station 2 = 181.40 lbm/sec\n", + " Thrust force = 6020 lbf\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch6.ipynb b/Basic_Fluid_Mechanics/ch6.ipynb new file mode 100755 index 00000000..71c77f3e --- /dev/null +++ b/Basic_Fluid_Mechanics/ch6.ipynb @@ -0,0 +1,391 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:912103c870040cf2e80e26b9450874f8f07874fb3d9db28d3d6ce1077a023edc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Steady, One-Dimensional, Reversible Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2 gravitational acceleration\n", + "h= 4. \t#ft diameter\n", + "d2= 0.16 \t#ft\n", + "d1= 0.3 \t#ft\n", + "dp= 13.6 \t#lbf/in**2 mercury\n", + "\t\n", + "#CALCULATIONS\n", + "Q= (math.pi/4)*math.sqrt(2*g*dp*h/((1/d2**4)-(1/d1**4)))\n", + "\t\n", + "#RESULTS\n", + "print 'Volumetric flow rate = %.2f ft**3/sec'%(Q)\n", + "\n", + "# note: book answer is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric flow rate = 1.24 ft**3/sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "w= 0.0765 \t#lbm/ft**3 density\n", + "v1= 120. \t#ft/sec velocity\n", + "go = 62.4 \t#lmb/ft**3\n", + "\t\n", + "#CALCULATIONS\n", + "dp= (w*v1**2)/(2*go)\n", + "\t\n", + "#RESULTS\n", + "print 'Difference in pressure= %.2f lbf/ft**2'%(dp)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in pressure= 8.83 lbf/ft**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "r=1.4\n", + "g= 32.2 \t#ft/sec**2 gas\n", + "R= 53.3 \t#lbf ft/lbm\n", + "T1= 760. \t#R Temperature\n", + "p2= 2. \t#lbf/in**2\n", + "p1= 3. \t #lbf/in**2\n", + "\t\n", + "#CALCULATIONS\n", + "V2= math.sqrt(2*r*R*g*T1*(1-(p2/p1)**((r-1)/r))/(r-1))\n", + "\t\n", + "#RESULTS\n", + "print 'Velocity in working section = %.f ft/sec'%(V2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in working section = 999 ft/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "y = 1.4\n", + "g = 32.2 \t#ft/sec**2\n", + "R = 53.3 \t#lbf ft/lbm\n", + "T = 32. \t#C air\n", + "T1 = 2000. \t#R air\n", + "y1 = 1.32\n", + "p = 1440. \t#lbf/in**2\n", + "v1 = 1.2306 \t #ft**3/lbm\n", + "v2 = 1.2546 \t #ft**3/lbm\n", + "bm = 3.13*10**5 \t#lbf/in**2\n", + "w = 62.4 \t #lbf/ft**3\n", + "\t\n", + "#CALCULATIONS\n", + "a1= math.sqrt(y*R*(460+T)*g)\n", + "a2= math.sqrt(y1*R*T1*g)\n", + "r2= p/(v1-v2)\n", + "a3= math.sqrt(-g*(v1+v2)**2*0.5**2*r2)\n", + "a4= math.sqrt(bm*144*g/w)\n", + "\t\n", + "#RESULTS\n", + "print ' Acoustic veloctiy in air at 32 F = %.f ft/sec'%(a1)\n", + "print ' Acoustic veloctiy in air at 2000 R = %.f ft/sec'%(a2)\n", + "print ' Acoustic veloctiy in steam at 480 F = %.f ft/sec'%(a3)\n", + "print ' Acoustic veloctiy in water at 60 F = %.f ft/sec'%(a4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Acoustic veloctiy in air at 32 F = 1087 ft/sec\n", + " Acoustic veloctiy in air at 2000 R = 2129 ft/sec\n", + " Acoustic veloctiy in steam at 480 F = 1727 ft/sec\n", + " Acoustic veloctiy in water at 60 F = 4823 ft/sec\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 1.4\n", + "ma2= 2.5 \t#ft/sec\n", + "g= 32.17 \t#ft/sec**2\n", + "p2= 1. \t#lbf/in**2\n", + "ps= 17.08 \t#lbf/in**2\n", + "ps2= 75. \t#lbf/in**2\n", + "Ts= 720. \t#R\n", + "R= 53.3 \t#lbf ft/lbm gas\n", + "A= 4. \t#ft**2 flow area\n", + "ps3= 0.4 \t#lbf/in**2\n", + "A2= 0.685 \t#ft**2\n", + "P= 5. \t#per cent throat area\n", + "\t\n", + "#CALCULATIONS\n", + "R1= (1+0.5*(r-1)*ma2**2)**(r/(r-1))\n", + "R2= (2*(r/(r-1))*(p2/ps)**(2/(r))*(1-(p2/ps)**((r-1)/r)))**0.5\n", + "m2= R2*ps2*144*(g/(R*Ts))**0.5*0.1\n", + "m= m2*A\n", + "At= A*R2/A2\n", + "m1= m*(1-(P/100))\n", + "mrp= (1-(P/100))*R2\n", + "\t\n", + "#RESULTS\n", + "print ' Mass flow rate= %.1f lbm/sec'%(m)\n", + "print ' Area of throat= %.3f ft**2'%(At)\n", + "print ' Mass flow rate= %.1f lbm/sec'%(m1)\n", + "print ' Mass flow rate parameter = %.4f'%(mrp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Mass flow rate= 32.5 lbm/sec\n", + " Area of throat= 1.517 ft**2\n", + " Mass flow rate= 30.9 lbm/sec\n", + " Mass flow rate parameter = 0.2468\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r1= 10. \t#ft point - 1\n", + "r2= 0.2 \t#miles point - 2\n", + "w= 0.0765 \t#lbm/ft**2 density\n", + "g= 32.2 \t#ft/sec**2\n", + "V1= 1. \t#ft/sec velocity\n", + "\t\n", + "#CALCULATIONS\n", + "k= r2*5280*V1 \n", + "dp= w*k**2*10*((1/r1)**2-(1/(5280*r2))**2)/(2*g)\n", + "\t\n", + "#RESULTS\n", + "print 'k = %.f ft**2/sec'%(k)\n", + "print ' pressure difference = %.1f lbf/ft**2'%(dp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 1056 ft**2/sec\n", + " pressure difference = 132.5 lbf/ft**2\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "w= 12. \t#ft wide\n", + "q= 300. \t#ft**3/sec rate\n", + "h= 10. \t#ft depth upstream of the gate\n", + "g= 32.2 \t#ft/sec**2\n", + "R= 2.6\n", + "\t\n", + "#CALCULATIONS\n", + "hc= ((q/12)**2/g)**(1./3)\n", + "r= h/hc\n", + "h1= hc*(((h/hc)+0.5*(hc/h)**2)-0.5*R**2)\n", + "\t\n", + "#RESULTS\n", + "print ' hc = %.2f ft'%(hc)\n", + "print ' stream depth = %.3f ft'%(h1)\n", + "#rounding-off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " hc = 2.69 ft\n", + " stream depth = 1.013 ft\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "Q= 400. \t#ft**3/sec flow rate\n", + "b1= 25. \t#ft channel width\n", + "b2= 20. \t#ft channel width\n", + "h1= 6. \t#ft stream depth\n", + "z1= 2.5 \t#ft elevation of channel bottom\n", + "z2= 3.3 \t#ft elevation of channel bottom\n", + "g= 32.2 \t#ft/sec**2\n", + "\t\n", + "#CALCULATIONS\n", + "hc1= (Q**2/(g*b1**2))**(1./3)\n", + "hc2= (Q**2/(g*b2**2))**(1./3)\n", + "r= (hc1/hc2)*((h1/hc1)+0.5*(hc1/h1)**2)+((z1-z2)/hc2)\n", + "\t\n", + "#RESULTS\n", + "print ' hc1 = %.3f ft'%(hc1)\n", + "print ' hc2 = %.3f ft'%(hc2)\n", + "print ' Ratio = %.3f '%(r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " hc1 = 1.996 ft\n", + " hc2 = 2.316 ft\n", + " Ratio = 2.293 \n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch7.ipynb b/Basic_Fluid_Mechanics/ch7.ipynb new file mode 100755 index 00000000..3818de1b --- /dev/null +++ b/Basic_Fluid_Mechanics/ch7.ipynb @@ -0,0 +1,523 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fb647d6d0a9fd1fab503f1e20b9cd4c1b8f196f963f97a28e2375980e25dde26" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Steady, One-Dimensional, Irreversible Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 1.5\n", + "f= 0.025 # friction factor\n", + "\t\n", + "#CALCULATIONS\n", + "r1= (2/f)*(r**2-1)\n", + "\t\n", + "#RESULTS\n", + "print 'ratio L/D2 = %.f'%(r1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio L/D2 = 100\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\t\n", + "#initialisation of variables\n", + "a= 6. \t#degrees angle\n", + "r= 1.5\n", + "l= 100. \t#ft\n", + "f= 0.025\n", + "K= 0.15\n", + "\t\n", + "#CALCULATIONS\n", + "R= r**4-1\n", + "R1= 1/math.tan(math.radians(a/2))*(1-(1./r))\n", + "p1= f*l\n", + "p2= 2.5*(l-p1)/l\n", + "p3= (1-r**2)**2\n", + "p4= K*p3\n", + "pt= p4+p2\n", + "\t\n", + "#RESULTS\n", + "print ' lowest ratio = %.2f'%(R)\n", + "print ' contribtuion of friction in pipe = %.3f lbf/ft**2'%(p1)\n", + "print ' contribtuion of diffuser in pipe = %.3f lbf/ft**2'%(p2)\n", + "print ' stagnant pressure drop = %.3f lbf/ft**2'%(p3)\n", + "print ' contribtuion of friction in pipe after reduction = %.3f lbf/ft**2'%(pt)\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " lowest ratio = 4.06\n", + " contribtuion of friction in pipe = 2.500 lbf/ft**2\n", + " contribtuion of diffuser in pipe = 2.438 lbf/ft**2\n", + " stagnant pressure drop = 1.562 lbf/ft**2\n", + " contribtuion of friction in pipe after reduction = 2.672 lbf/ft**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "d= 4. \t #in galvanised iron pipe diameter\n", + "q= 0.5 \t #ft**3/sec flow rate\n", + "w= 62.4 \t#lb/ft**3 density\n", + "u= 2.7*10**-5 \t#lbf sec/ft**2 viscosity\n", + "e= 0.0005 \t#ft\n", + "g= 32.1 \t#ft/sec**2 acceleration\n", + "f= 0.0235\n", + "lt= 400. \t#ft long\n", + "\t\n", + "#CALCULATIONS\n", + "V= 4*q/(math.pi*(d/12)**2)\n", + "Re= w*V*(d/12)/(u*g)\n", + "r= e/(d/12)\n", + "dz= (V**2/(2*g))*(1.7+f*lt/(d/12))\n", + "\t\n", + "#RESULTS\n", + "print ' mean flow velocity = %.2f ft/sec'%(V)\n", + "print ' Reynolds number = %.2e'%(Re)\n", + "print ' Relative roughness = %.4f'%(r)\n", + "print ' difference in the levels of water = %.1f ft'%(dz)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " mean flow velocity = 5.73 ft/sec\n", + " Reynolds number = 1.38e+05\n", + " Relative roughness = 0.0015\n", + " difference in the levels of water = 15.3 ft\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "d= 4. \t#in\n", + "v= 6.64 \t#ft/sec\n", + "\t\n", + "#CALCULATIONS\n", + "Q= math.pi*0.25*(d/12)**2*v\n", + "\t\n", + "#RESULTS\n", + "print 'Flow rate= %.3f ft**3/sec'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate= 0.579 ft**3/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "d= 0.366 \t#ft\n", + "i= 12\n", + "\t\n", + "#CALCULATIONS\n", + "pd= d*i\n", + "\t\n", + "#RESULTS\n", + "print 'Required pipe diameter = %.2f in'%(pd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required pipe diameter = 4.39 in\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "Ps1= 1050. \t#lbf/ft**2\n", + "fr= 10.7\n", + "p= 36.6 \t#lbf/ft**2\n", + "p1= 195. \t#lbf/ft**2\n", + "fr1= 16.\n", + "fr2= 1.8\n", + "\t\n", + "#CALCULATIONS\n", + "deltap = (p+957+p1+Ps1)\n", + "p2= round(fr*p)\n", + "dp= Ps1-p2\n", + "lc= round(dp/p)\n", + "sp= Ps1+p1-p*(fr1+fr2)\n", + "lc1= sp/p\n", + "\n", + "#RESULTS\n", + "print ' Pressure = %.f lbf/ft**2'%(round(deltap,-1))\n", + "print ' pressure difference = %.f lbf/ft**2'%(dp)\n", + "print ' Loss coefficient = %.f '%(lc)\n", + "print ' Loss coefficient = %.1f '%(lc1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Pressure = 2240 lbf/ft**2\n", + " pressure difference = 658 lbf/ft**2\n", + " Loss coefficient = 18 \n", + " Loss coefficient = 16.2 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "p1= 50. \t#lbf/in**2 pressure\n", + "R= 96.3 \t#ft lbf/lbm R\n", + "T= 80. \t #F temperature\n", + "p2= 20. \t#lbf/in**2 pressure\n", + "r= 1.31\n", + "u= 2.34*10**-7 \t#lbf sec/ft**2\n", + "e= 0.00005 \t #ft\n", + "m= 5.*10**4 \t#lbm/sec\n", + "d= 1.5 \t #ft\n", + "g= 32.2 \t #ft/sec**2\n", + "f= 0.113\n", + "\t\n", + "#CALCULATIONS\n", + "w1= p1*144/(R*(460+T))\n", + "V1= 4*(m/3600)/(math.pi*w1*d**2)\n", + "Ma1= V1/(r*R*g*(460+T))**0.5\n", + "Re= w1*V1*d/(u*g)\n", + "dx= (((1/(r*Ma1**2))*10*(1-(p2/p1)**2))+math.log(p2/p1))*d/f\n", + "\t\n", + "#RESULTS\n", + "print ' density = %.3f lbm/ft**3'%(w1)\n", + "print ' mean flow velocity = %.1f ft/sec'%(V1)\n", + "print ' Match number = %.4f '%(Ma1)\n", + "print ' Reynolds number = %.2e '%(Re)\n", + "print ' Length of pipe = %.2e ft'%(dx)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " density = 0.138 lbm/ft**3\n", + " mean flow velocity = 56.8 ft/sec\n", + " Match number = 0.0383 \n", + " Reynolds number = 1.56e+06 \n", + " Length of pipe = 5.79e+04 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "r= 1.4\n", + "R= 53.3 \t#ft lbf/lbm R\n", + "g= 32.2 \t#ft/sec**2\n", + "T1= 410. \t#R temperature\n", + "v= 2500. \t#ft/sec steadility\n", + "P1= 628. \t#lbf/in**2 pressure\n", + "\t\n", + "#CALCULATIONS\n", + "v1= int(math.sqrt(r*g*R*T1))\n", + "Ma1= round(v/v1,2)\n", + "Ts1= int(T1*(1+0.5*(r-1)*Ma1**2))\n", + "Ps1= P1*(1+0.5*(r-1)*Ma1**2)**(r/(r-1))\n", + "Ps2= Ps1*((r+1)/(2*r*Ma1**2-r+1))**(1/(r-1))*(0.5*(r+1)*Ma1**2/(1+0.5*(r-1)*Ma1**2))**(r/(r-1))\n", + "\n", + "#RESULTS\n", + "print ' acoustic velocity = %.f ft/sec'%(v1)\n", + "print ' Match number = %.2f '%(Ma1)\n", + "print ' Stagnition temperature = %.f R'%(Ts1)\n", + "print ' Stagnition pressure = %.f lbf/ft**2'%(Ps1)\n", + "print ' Stagnition pressure = %.f lbf/ft**2'%(Ps2)\n", + "\n", + "# note : answer in book is wrong. Please check manually.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " acoustic velocity = 992 ft/sec\n", + " Match number = 2.52 \n", + " Stagnition temperature = 930 R\n", + " Stagnition pressure = 11069 lbf/ft**2\n", + " Stagnition pressure = 5435 lbf/ft**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "p2= 67.2 \t#lbf/in**2 pressure\n", + "p1= 63. \t#lbf/in62 pressure\n", + "r= 1.4\n", + "n= 0.6 # efficiency\n", + "T1= 870. \t#R temperature\n", + "ma1= 0.8 \t#ft/sec mach number\n", + "\n", + "#CALCULATIONS\n", + "dt= (p2/p1)**((r-1)/r)-1\n", + "dt1= dt/n\n", + "T2= T1*(1+dt1)\n", + "Ts1= T1*(1+0.5*(r-1)*ma1**2)\n", + "ps1= p1*(1+0.5*(r-1)*ma1**2)**(r/(r-1))\n", + "ps2= p2*(Ts1/T2)**(r/(r-1))\n", + "dp= ps1-ps2\n", + "\n", + "#RESULTS\n", + "print ' dT = %.5f '%(dt)\n", + "print ' dT1 = %.5f '%(dt1)\n", + "print ' Temperature = %.f R'%(T2)\n", + "print ' Temperature = %.1f R'%(Ts1)\n", + "print ' Pressure = %.1f lbf/in**2'%(ps1)\n", + "print ' Pressure = %.1f lbf/in**2'%(ps2)\n", + "print ' pressure difference = %.1f lbf/in**2'%(dp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " dT = 0.01861 \n", + " dT1 = 0.03102 \n", + " Temperature = 897 R\n", + " Temperature = 981.4 R\n", + " Pressure = 96.0 lbf/in**2\n", + " Pressure = 92.0 lbf/in**2\n", + " pressure difference = 4.0 lbf/in**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page No : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 1.4\n", + "ma3= 3. \t#ft/sec mach number\n", + "ps= 80. \t#lbf/ft**2 pressure\n", + "Ts= 840. \t#R temperature\n", + "r1= 53.3 \t#ft lbm/ft**3\n", + "A3= 2. \t#in**2 flow area\n", + "g= 32.2 \t#ft/sec**2\n", + "ma1= 1.6\n", + "\n", + "#CALCULATIONS\n", + "R= (1+(r-1)*0.5*ma3**2)**(r/(r-1))\n", + "p3= ps/R\n", + "R1= 1+0.5*(r-1)*ma3**2\n", + "T3= Ts/R1\n", + "w3= p3*144/(r1*T3)\n", + "V3= ma3*math.sqrt(r*r1*g*T3)\n", + "m= w3*V3*A3/144\n", + "ra= ((r+1)/(2*r*ma1**2-(r-1)))**(1/(r-1))*(0.5*(r+1)*ma1**2/(1+0.5*(r-1)*ma1**2))**(r/(r-1))\n", + "ps2= ps*ra\n", + "dp= ps-ps2\n", + "\n", + "#RESULTS\n", + "print ' outlet pressure = %.2f lbf/in**2'%(p3)\n", + "print ' outlet temperature = %.f R'%(T3)\n", + "print ' mass flow rate = %.3f lbm/sec'%(m)\n", + "print ' ps2 = %.1f lbf/in**2'%(ps2)\n", + "print ' Stagnation pressure loss = %.1f lbf/in**2'%(dp)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " outlet pressure = 2.18 lbf/in**2\n", + " outlet temperature = 300 R\n", + " mass flow rate = 0.694 lbm/sec\n", + " ps2 = 71.6 lbf/in**2\n", + " Stagnation pressure loss = 8.4 lbf/in**2\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch8.ipynb b/Basic_Fluid_Mechanics/ch8.ipynb new file mode 100755 index 00000000..539707f8 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch8.ipynb @@ -0,0 +1,148 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:64db2287da8cb97edd52d96a1a1d6b51c3497c61118b03ae2e2cf16f97e85bf8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Analysis of Two-Dimensional, Constant-Density, Laminar Flow " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "w= 78.9 \t#lbf.ft**3 weight\n", + "d= 0.01 \t#in bore\n", + "u= 8.67*10**-9 \t#lbf/ hr ft**2 viscosity\n", + "h= 18. \t#ft\n", + "l= 10. \t #ft length\n", + "\t\n", + "#CALCULATIONS\n", + "Q= math.pi*w*(d/12)**4*(h+l)/(l*128*u)\n", + "\t\n", + "#RESULTS\n", + "print 'Flow rate = %.2e ft**3/hr'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 3.02e-04 ft**3/hr\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "x= 0.1 \t#ft\n", + "w= 62.4 \t#lbf/ft**3 fluid density\n", + "v1= 10. \t#ft/sec velocity\n", + "u= 2.4*10**-5 \t#lbf/ft viscosity\n", + "g= 32.2 \t#ft/sec**2\n", + "k= 4.91\n", + "\t\n", + "#CALCULATIONS\n", + "s= k*x*(w*v1*x/(u*g))**-0.5\n", + "Tw= 0.332*w*v1**2*(u*g/(w*x*v1))**0.5/g\n", + "R= 0.332*6*Tw\n", + "\t\n", + "#RESULTS\n", + "print 'Thickness = %.2e*ft'%(s)\n", + "print ' Shear stress = %.3f lbf/ft**2'%(Tw)\n", + "print ' Shear stress = %.3f lbf/ft'%(R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness = 1.73e-03*ft\n", + " Shear stress = 0.226 lbf/ft**2\n", + " Shear stress = 0.451 lbf/ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r = 1\n", + "r1 = 1\n", + "\t\n", + "#CALCULATIONS\n", + "e1= r+r1\n", + "e2= r-r1\n", + "\t\n", + "#RESULTS\n", + "print ' vorticity in a forced vortex = %.f*k'%(e1)\n", + "print ' vorticity in a free vortex = %.f'%(e2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vorticity in a forced vortex = 2*k\n", + " vorticity in a free vortex = 0\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/ch9.ipynb b/Basic_Fluid_Mechanics/ch9.ipynb new file mode 100755 index 00000000..004fdaf6 --- /dev/null +++ b/Basic_Fluid_Mechanics/ch9.ipynb @@ -0,0 +1,126 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cf784c378e9383adb15dcad9ef6ad8b764187d7f185393fb16ff16d5b2a1ed70" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Analysis of Two-Dimensional, Constant-Density, Turbulent Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "n=7.\n", + "w= 62.4 \t#lbf/ft**3 density\n", + "v= 6. \t#ft/sec velocity\n", + "d= 2. \t #in pipe diameter\n", + "u= 2.34*10**-5 \t#lbf/ft**3 viscosity\n", + "f= 0.0178\n", + "g= 32.2 \t#ft/sec**2\n", + "R= 1.224\n", + "R1= 8. \t#ft/sec\n", + "\t\n", + "#CALCULATIONS\n", + "r= (n+1)*(2*n+1)/(2*n**2)\n", + "Red= w*v*(d/12)/(u*g)\n", + "C= (d/Red)**(1./7)*R*(R1/f)**(4./7)\n", + "V = v*math.sqrt(f/8)\n", + "\t\n", + "#RESULTS\n", + "print ' Vmax/V = %.3f'%(r)\n", + "print ' Red = %.2e'%(Red)\n", + "print ' C = %.2f'%(C)\n", + "print ' Velocity = %.3f ft/sec'%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Vmax/V = 1.224\n", + " Red = 8.28e+04\n", + " C = 8.79\n", + " Velocity = 0.283 ft/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "Re= 5.\n", + "g= 32.2 \t#ft/sec**2\n", + "u= 2.34*10**-5 \t#lbf/ft sec\n", + "w= 62.4 \t#lbf/ft**3\n", + "v= 0.283 \t#ft/sec\n", + "Re1= 70.\n", + "v1= 0.0374 \t#ft/sec\n", + "\t\n", + "#CALCULATIONS\n", + "y= Re*u*g/(w*v)\n", + "y1= Re1*u*g/(w*v)\n", + "y2= Re*u*g/(w*v1)\n", + "y3= Re1*u*g/(w*v1)\n", + "\t\n", + "#RESULTS\n", + "print ' y = %.6f ft'%(y)\n", + "print ' y = %.5f ft'%(y1)\n", + "print ' y = %.5f ft'%(y2)\n", + "print ' y = %.4f ft'%(y3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " y = 0.000213 ft\n", + " y = 0.00299 ft\n", + " y = 0.00161 ft\n", + " y = 0.0226 ft\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Basic_Fluid_Mechanics/screenshots/Streamlinedbody_curve.png b/Basic_Fluid_Mechanics/screenshots/Streamlinedbody_curve.png new file mode 100755 index 00000000..0628f98d Binary files /dev/null and b/Basic_Fluid_Mechanics/screenshots/Streamlinedbody_curve.png differ diff --git a/Basic_Fluid_Mechanics/screenshots/VariationsOfEpEhEp+EhwithT.png b/Basic_Fluid_Mechanics/screenshots/VariationsOfEpEhEp+EhwithT.png new file mode 100755 index 00000000..bd0bd566 Binary files /dev/null and b/Basic_Fluid_Mechanics/screenshots/VariationsOfEpEhEp+EhwithT.png differ diff --git a/Basic_Fluid_Mechanics/screenshots/actual_perfomance_curve.png b/Basic_Fluid_Mechanics/screenshots/actual_perfomance_curve.png new file mode 100755 index 00000000..ece48d25 Binary files /dev/null and b/Basic_Fluid_Mechanics/screenshots/actual_perfomance_curve.png differ diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_1.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_1.ipynb new file mode 100755 index 00000000..ccf39a3c --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_1.ipynb @@ -0,0 +1,100 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1:Units & Dimensions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:1.1,Page no:9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# 1 Poise = 1g/cm s = ((1/453.6)lb)/((1/30.48)ft*1s)\n", + "\n", + "#Calculation\n", + "be=30.48/453.6*3600 #be->british engineering unit\n", + "# 1 Poise = 1g/cm s = ((1/1000)kg)/((1/100)m*1s)\n", + "si=100/1000.0 #si->SI units\n", + "\n", + "#Result\n", + "print\" 1 Poise=\",round(be),\"lb/ft h\" \n", + "print\"\\n 1 Poise =\",si,\"N s/m**2 \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1 Poise= 242.0 lb/ft h\n", + "\n", + " 1 Poise = 0.1 N s/m**2 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:1.2,Page no:10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "\n", + "# 1 kW= 103 W = 103 J/s = 10**3 * (1 kg*1 m**2)/1 s**3\n", + "# = (10**3 * (1/0.4536) lb x (1/0.3048)**2 ft**2)/1 s**3\n", + "\n", + "#Calculation\n", + "lfs=(10**3*(1/0.4536)*(1/.3048)**2) #lfs->lb ft**2/s**3\n", + "sfs=lfs/32.2 #sfs->slug ft**2/s**3\n", + "hp=sfs/550.0 \n", + "\n", + "#Result\n", + "print\"\\n 1 kW =\",round(hp,2),\"h.p.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " 1 kW = 1.34 h.p.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_10.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_10.ipynb new file mode 100755 index 00000000..c72a5f6c --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_10.ipynb @@ -0,0 +1,653 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10:Mass Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.1,Page no:580" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "x=1e-3 #Thickness of stagnant air film\n", + "D=1.8e-5 #Difffusivity of ammonia\n", + "R=8314 #Gas constant\n", + "T=295 #Temperature \n", + "P=101.3e3 #Total Pressure\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "#If the subscripts 1 and 2 refer to the two sides of the stagnant layer and \n", + "#the subscripts A and B refer to ammonia and air respectively,\n", + "P_A1=.50*P \n", + "P_A2=0 \n", + "P_B1=P-P_A1 \n", + "P_B2=P-P_A2 \n", + "P_BM=(P-P_A1)/math.log(P/P_A1) \n", + "#Thus, substituting in equation 10.31 gives:\n", + "N_A=(-D/(R*T*x))*(P/P_BM)*(P_A2-P_A1) \n", + "\n", + "#Result\n", + "print\"The rate of diffusion of ammonia through the layer = %.2e\"%N_A,\"kmol/m**2*s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of diffusion of ammonia through the layer = 5.15e-04 kmol/m**2*s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.2,Page no:582" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "import numpy as np\n", + "%pylab inline\n", + "th=np.array([0,0,3,7,22,32,46,55,80,106]) #Time in hours\n", + "tm=np.array([0,26,5,36,16,38,50,25,22,25]) #Time in min\n", + "tim=[0]*10\n", + "#Conversion to kilo seconds\n", + "for i in range(0,10):\n", + " tm[i]=tm[i]*60.0 \n", + " th[i]=th[i]*3600.0 \n", + " tim[i]=(tm[i]+th[i])/1000.0 \n", + "\n", + "L=np.array([0,2.5,12.9,23.2,43.9,54.7,67.0,73.8,90.3,104.8]) #in mm\n", + "Lo=L[0] \n", + "\n", + "#Calculation\n", + "x=L-Lo \n", + "y=[0]*10 \n", + "for j in range(1,10):\n", + " y[j]=tim[j]/(L[j]-Lo) \n", + "plot(x,y,marker='+') \n", + "plt.title('t/(L-L0) vs (L-L0)')\n", + "plt.xlabel('$(L-L0) in mm$')\n", + "plt.ylabel('$t/(L-L0) in ks/mm**2$') \n", + "\n", + "#Calculation of slope\n", + "s=(y[3]-y[2])/(x[3]-x[2])*10**3*10**6 \n", + "Vl=22.4 #Molar volume in litres\n", + "den=1540 #Density in kg/m**3\n", + "T0=273 \n", + "T=321 \n", + "vp=37.6 #vapour pressure in kPa\n", + "P0=101.3 #PRessue in kPa\n", + "M=154 \n", + "Ct=T0/(Vl*T) \n", + "Ca=(vp*Ct)/P0 \n", + "Cb1=Ct \n", + "Cb2=(P0-vp)*Ct/P0 \n", + "Cbm=(Cb1-Cb2)/math.log(Cb1/Cb2) \n", + "#Diffusivity calculation\n", + "D=den*Cbm/(2*M*Ca*Ct*s) \n", + "\n", + "\n", + "#Result\n", + "show()\n", + "print\"\\nSlope is %.1e\"%s,\"s/m**2\"\n", + "print\"\\nDiffusivity is %.2e\"%D,\" m**2/s\"\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": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEfCAYAAAC9CZqZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUVOX6B/DvIKZy8YIKpKMrE5SLykWQMpJBMpWANKnU\njlj6M9SjVkfN0+mmZahHMzVLbeU1T2iRJil6lHSIjnJTkQQvaJKAiJIikFwG2L8/dk4MF50ZmNnM\n8P2sxTrOzJ69n/cs4/F9n/ciEwRBABERkRYspA6AiIhMB5MGERFpjUmDiIi0xqRBRERaY9IgIiKt\nMWkQEZHWmDSIiEhrTBpk8p544gmcOXPGaM9bv349/vnPfxrlWf/9738xfvx4ozwLACorK+Hq6oqi\noiKjPZNMC5MGtVqPPPIIjh492uD96OhovPTSSwCAH374AV26dIGHhwcAYPHixZgyZYpW91coFNi8\neXOjn6Wnp2Po0KGwtraGj4+PRlKaMWMG/vOf/+DmzZu6Nklnb7/9Nt566y31awsLC/z6668P/J5S\nqUSfPn2a/HzRokXo0aMHevTooZEAO3TogGnTpmH58uXNC5zMFpMGtVoymQyNbVhw4MABPPPMMwCA\njRs3aiQJmUym0/0bu76qqgrPPv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Y989fvw4vL29AQBeXl44evQoAOCZZ55hkiCzYyl1AESGduPGDXTq\n1En9OjU1FS+//LJe92rsuzdu3ICVlRUAwNraWn0uQ//+/bF+/XoA4kFGBw4cQK9eveDo6IiYmBgE\nBAQAADIzM/HOO+8gMTER3333HQICAiAIApRKJcaMGaMeBouIiNDqGiJDYk+DzF79ovTJkyfh4+Oj\nfq3LRs/1v1tbW4va2lq0a9cOAFBTU6P+MyCe6geIx4l2795doxgvl8sxfvx4ZGdnA/jrxDS5XI7n\nnnsOGRkZGDFiBEJCQnDq1CmtryEyJPY0yOypVCr1n0tKSgAANjY2AICqqiocPXoUI0aMwK5duxok\nEBsbG7z44ov3/a6DgwP++OMP9TU9e/ZUf//u3bsAgOHDh2PNmjXYsmULbGxssGLFCvj6+uLOnTuw\ntBT/M/T391e/f/fuXXTv3h02NjaIi4uDp6en1tcQGRKTBpm9uv/yT01N1egpfPXVV3juuedgZWWF\nadOm3fc+TX23ffv2SE1NRXBwMFJTUxEUFKS+xsJC7MyXlJRAJpMhIyMDXl5e6tPT4uLiMGrUKJw4\ncQKenp7q99PS0tS1k9jYWCxcuBAZGRlwdnZ+4DVDhgzR+/8rogfh8BSZvXv1hpSUFKxduxalpaX4\n8ssv8cYbb2DPnj3o1q3bA++Rmpra5HdHjhyJmzdvIiYmBjKZDE8//TQAcdjL1tYWgDhsZW9vj8rK\nSmRmZqrrGba2tigsLIRcLtd4/+zZswgMDAQAPPzww0hOTsbgwYO1uobIkHhyH5m9VatWYfr06Vol\nh5Z05swZnD9/Xj28RWQO2NMgszdjxgx8++23Rn/ujz/+iOeff97ozyUyJCYNMntdunSBq6srrl69\narRnZmZmIigoSF3TIDIXHJ4iIiKt8Z9BRESkNSYNIiLSGpMGERFpjUmDiIi0xqRBRERaY9IgIiKt\nMWkQEZHWmDSIiEhr/w+s6BLJVxn5zQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Slope is 3.1e+07 s/m**2\n", + "\n", + "Diffusivity is 9.17e-06 m**2/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.3,Page no:585" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "P=101.3e3 #pressure of the operating column\n", + "T=295.0 #Temperature of the operating column\n", + "P_A=7.0e3 #partial pressure of ammonia\n", + "x=1.0e-3 #=(y1-y2)Thickness of stationary gas film\n", + "D=2.36e-5 #Diffusivity of ammonia\n", + "\n", + "#Calculation\n", + "import math\n", + "C_A=(1.0/22.4)*(273.0/T)*(P_A/P) #=(C_A1-C_A2)Concentration of ammonia gas\n", + "#X=C_T/C_BM\n", + "X=P*math.log(P/(P-P_A))/(P-(P-P_A)) \n", + "#From equation 10.33\n", + "N_A_=(D/x)*X*(C_A) \n", + "\n", + "#Result\n", + "print\"The transfer rate per unit area = %.2e\"%N_A_,\"kmol/m**2*s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transfer rate per unit area = 6.98e-05 kmol/m**2*s\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.4,Page no:606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q=3e-6 #Flow rate of water\n", + "Meu=1e-3 #Viscosity of water\n", + "D=1.5e-9 #diffusivity of carbon dioxide in water\n", + "rho=1e3 #Density of water\n", + "\n", + "#Calculation\n", + "s=(Q*1e2*Meu*3/(rho*9.81))**(1.0/3.0) #Thickness of film\n", + "A=0.95 \n", + "y=s*(1-A)**0.5 #The distance below the free surface\n", + "t=(1.305/1.822)**2\n", + "Us=rho*9.81*s**2/(2*Meu) #surface velocity\n", + "L=Us*t #The maximum lend=gth of column\n", + "\n", + "#Result\n", + "print\"\\n The maximum length of column =\",round(L,2),\" m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The maximum length of column = 0.51 m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.5,Page no:608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N_dot=50 #Initial maas transfer rate\n", + "D=1.8e-9 #Diffusivity of gas in liquid phase\n", + "C_bg=(1/22.4)*(273.0/293.0) #bulk gas concentration\n", + "\n", + "#Calculation\n", + "import math\n", + "N_C=N_dot*C_bg #Initial maas transfer rate in terms of cocentration\n", + "h=N_C/0.04 # Effective Mass transfer coefficient\n", + "R=1/h #Equivalent resistance\n", + "R_l=R*9 #Liquid phase resistance\n", + "h_l=1/R_l #Liquid phase coefficient\n", + "#From equation 10.113 and using liquid phase resistance\n", + "t=R_l**2/(math.pi/D) \n", + "\n", + "#Result\n", + "print\"The required time is =%.2e\"%t,\"s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required time is =1.72e-11 s\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.6,Page no:608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "import math\n", + "#Diffusivity of CO2 in ethanol\n", + "D=4*10**-9 #in m**2/sw\n", + "t=100 #Time in sec\n", + "import sympy\n", + "Cai=sympy.Symbol('x') \n", + "\n", + "#Calculation\n", + "y=[0,10**-3] \n", + "\n", + "mole=[0]*3\n", + "for i in range(0,2):\n", + " mole[i]=((2*math.sqrt(D*t/math.pi)*math.exp(-y[i]**2/(4*D*t)))-(y[i]*math.erfc(y[i]/(2*math.sqrt(D*t))))) \n", + "\n", + "ret=(mole[0]-mole[1])/mole[0] \n", + "\n", + "#Result\n", + "print\"Proportion retained is %d\"%(ret*100),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Proportion retained is 83 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.8,Page no:621" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "L=825.0e-3 #length of the tube\n", + "d=15.0e-3 #diameter of the tube\n", + "P_i=7.5e3 #Partial pressure of ammonia at inlet\n", + "P_o=2.0e3 #Partial pressure of ammonia at inlet\n", + "A_r=2.0e-5 #Air rate\n", + "P=101.3e3 #Atmospheric pressure\n", + "\n", + "#Calculation\n", + "import math\n", + "D_F_m=(P_i-P_o)/math.log(P_i/P_o) #Mean driving force\n", + "A_absorbd=A_r*((P_i/(P-P_i))-(P_o/(P-P_o))) \n", + "A_w=math.pi*d*L #Wetted surface\n", + "K_G=(A_absorbd/(A_w*D_F_m)) #Overall transfer coefficient\n", + "\n", + "#Result\n", + "print\"Overall Transfer coefficient =%.2e\"%K_G,\"kmol/[m**2 s (N/m**2)]\"\n", + "print\"NOTE:Very approx answer in book\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Overall Transfer coefficient =7.40e-09 kmol/[m**2 s (N/m**2)]\n", + "NOTE:Very approx answer in book\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.9,Page no:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "\n", + "z=0.693 \n", + "#Calculation\n", + "import math\n", + "ratio=(math.exp(math.sqrt(z))+math.exp(-math.sqrt(z))-4.0)/(2.0*(1-math.exp(-math.sqrt(z))-math.exp(math.sqrt(z)))) \n", + "\n", + "#Result\n", + "print\"The final ratio is\",round(ratio,1)\n", + "print\"NOTE:Wrong answer in book\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final ratio is 0.4\n", + "NOTE:Wrong answer in book\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.10,Page no:629" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#After denoting the original conditions by subscript 1,\n", + "#The mass transfer rate (moles/unit area and unit time) is given by\n", + "#N_A2=0.83*N_A1\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "n=2*(math.log(0.83/(1.35)**0.5)/math.log(0.8))-1 \n", + "\n", + "#Result\n", + "print\"n =\",round(n,2)\n", + "print\"Thus the reaction is of second order\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 2.01\n", + "Thus the reaction is of second order\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.11,Page no:630" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "k = 2.5*10**-6 #[s**-1] Rate constant\n", + "E = 2.643*10**7 #[J/kmol] Energy of Activation\n", + "R = 8314 #[J/kmol.K] Universal gas contss\n", + "D = 10**-9 #[m**2/s] MOlecular diffuisivity\n", + "L = .01 #[m] Film Thickness\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "#At T =293K\n", + "T = 293 #[K] temperature\n", + "A = k/math.exp(-E/(R*T)) #[s**-1]\n", + "e = math.exp(-2*L*math.sqrt(k/D)) \n", + "N = math.sqrt(k/D)*(1+e)/(1-e) #Consider relative Solubility at 293 K be unity\n", + "#At T =313K\n", + "T2 = 313 #[K] temperature\n", + "k2 = A*math.exp(-E/(R*T2)) #[s**-1]\n", + "e2 = math.exp(-2*L*math.sqrt(k2/D)) \n", + "N2 = .8*math.sqrt(k2/D)*(1+e2)/(1-e2) #Consider relative Solubility at 313 K be .8 wrt that of 293K\n", + "\n", + "Nr = N2/N \n", + "\n", + "#Result\n", + "print'Change in mass transfer rate is given by factor',round(Nr,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in mass transfer rate is given by factor 0.86\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.12,Page no:643" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "k=5e-4 #first order rate constant\n", + "D_e=2e-9 #effective diffusivity of reactants in the pores of the particles\n", + "\n", + "#Calculation\n", + "import math\n", + "lamda=(k/D_e)**0.5 \n", + "# (i) For the platelet of thickness 8 mm,\n", + "L=0.5*(8e-3) \n", + "phi=lamda*L #thiele modulus\n", + "#From equation 10.202, the effectiveness factor 'eta' is given by:\n", + "eta=(1/phi)*math.tanh(phi) \n", + "#(ii) For the sphere of diameter 10 mm, r_o = 0.005 m**-1.\n", + "r_o=5e-3 \n", + "phi_o=lamda*r_o #Thiele modulus\n", + "#From equation 10.212, the effectiveness factor 'eta' is given by:\n", + "eta_o=(3/phi_o)*((1.0/math.tanh(phi_o))-(1/phi_o)) \n", + "\n", + "#result\n", + "print\"\\n (i) Thiele modulus =\",phi \n", + "print\"\\n The effectiveness factor =\",round(eta,3)\n", + "print\"\\n (ii) Thiele modulus =\",phi_o\n", + "print\"\\n The effectiveness factor =\",round(eta_o,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " (i) Thiele modulus = 2.0\n", + "\n", + " The effectiveness factor = 0.482\n", + "\n", + " (ii) Thiele modulus = 2.5\n", + "\n", + " The effectiveness factor = 0.736\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.13,Page no:644" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "D_e=1e-5 #Effective diffusivity for the reactants in the catalyst particle\n", + "k=14.4 #first order rate constant\n", + "L=2.5e-3 \n", + "\n", + "#Calculation\n", + "import math\n", + "lamda=(k/D_e)**0.5 \n", + "phi=(k/D_e)**0.5*(L) #Thiele modulus\n", + "#From equation 10.202, the effectiveness factor,\n", + "eta=(1/phi)*math.tanh(phi) \n", + "#The concentration profile is given by equation 10.198\n", + "y=1.25e-3 \n", + "C_Ai=0.15 \n", + "C_A=C_Ai*(math.cosh(lamda*y)/math.cosh(lamda*L)) \n", + "\n", + "#Result\n", + "print\"\\n (i) The effectiveness factor =\",round(eta,3)\n", + "print\"\\n (ii) The concentration of reactant at a position half-way between the centre and the outside of the\\n\\t pellet =\",round(C_A,3),\"kmol/m**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " (i) The effectiveness factor = 0.332\n", + "\n", + " (ii) The concentration of reactant at a position half-way between the centre and the outside of the\n", + "\t pellet = 0.035 kmol/m**3\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:10.14,Page no:645" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R_r=8.2e-2 #reaction rate when concentration =0.011 kmol/m**3\n", + "D_e=7.5e-8 #Effective diffusivity\n", + "\n", + "#Calculation\n", + "#catalyst = eta*k*C_Ai (equation 10.217),\n", + "#eta=phi_L**-1\n", + "#Substituting numerical values in prev eqn:\n", + "k=(1.217*R_r/0.011)**2 \n", + "phi_L=1.217*(k)**0.5 \n", + "eta=phi_L**-1 \n", + "\n", + "#Result\n", + "print\"Effectiveness factor =\",round(eta,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effectiveness factor = 0.0906\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_11.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_11.ipynb new file mode 100755 index 00000000..65d448d9 --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_11.ipynb @@ -0,0 +1,161 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11:The Boundary Layer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:11.1,Page no:680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "u_s=1 #Velocity of water\n", + "w=0.6 #Width of plane surface\n", + "l=1 #Length of plane surface\n", + "A=0.6*1 #Area of the surface\n", + "Re_xc=10**5 #Reynods group\n", + "\n", + "#Calculation\n", + "#Taking\n", + "Meu=1e-3 #Viscosity of water\n", + "rho=1000 #Density of water\n", + "Re=rho*u_s*l/Meu\n", + "#Mean value of S/pw2 from equation 11.41\n", + "#X=R/(rho*u**2)\n", + "X=0.037*(Re)**-0.2+(Re**-1)*(0.646*(10**5)**0.5-0.037*(10**5)**0.8)\n", + "F=X*rho*u_s**2*A \n", + "\n", + "#Result\n", + "print\"\\n Total drag force =\",round(F,2),\"N (approx)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Total drag force = 1.3 N (approx)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:11.2,Page no:680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "x=150e-3 #Distance from leading edge where thicness is to be found\n", + "Meu_o=0.05 #viscosity of oil\n", + "rho_o=1000 #Density of oil\n", + "u=0.3 #Velocity of flow\n", + "\n", + "#Calculation\n", + "Re_x=x*u*rho_o/Meu_o \n", + "#For streamline flow:\n", + "#from equation 11.17\n", + "dell=4.64*x/Re_x**0.5 #thickness of the boundary layer\n", + "#from equation 11.20\n", + "del_star=0.375*dell \n", + "\n", + "#Result\n", + "print\"\\n The thickness of the boundary layer =\",dell*1e3,\"mm\"\n", + "print\"\\n The displacement thickness =\",del_star*1e3,\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The thickness of the boundary layer = 23.2 mm\n", + "\n", + " The displacement thickness = 8.7 mm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:11.3,Page no:684" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "D=50e-3 #Diameter of the pipe\n", + "Q=2e-3 #Flow rate of benzene through pipe\n", + "rho_b=870 #Density of benzene\n", + "Meu_b=0.7e-3 #Viscosity of benzene\n", + "\n", + "#Calculation\n", + "import math\n", + "G=Q*rho_b #Mass flow rate of benzene\n", + "Re=4*G/(Meu_b*math.pi*D) #Reynolds number\n", + "#From equation 11.49:\n", + "del_b=62*D*Re**(-7.0/8.0) \n", + "area=math.pi/4*D**2 #Cross sectional are of pipe\n", + "u=G/(rho_b*area) #mean velocity\n", + "#From equation 11.47:\n", + "u_b=2.49*u*Re**(-1.0/8.0) \n", + "print\"\\n The thickness of the laminar sub-layer =\",round(del_b*1e3,3),\"mm\"\n", + "print\"\\n The velocity of the benzene at the edge of the laminar sub-layer =\",round(u_b,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The thickness of the laminar sub-layer = 0.195 mm\n", + "\n", + " The velocity of the benzene at the edge of the laminar sub-layer = 0.637 m/s\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_12.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_12.ipynb new file mode 100755 index 00000000..fe313489 --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_12.ipynb @@ -0,0 +1,328 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12:Momentum,Heat and MAss Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:12.1,Page no:714" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=250e-3 #internal diameter of pipe\n", + "u=15 #Velocity of air through the pipe\n", + "y1=50e-3 #First point where velocity is to be found out\n", + "y2=5e-3 #Second point where velocity is to be found out\n", + "rho_air=1.10 #Density of air\n", + "Meu_air=20e-6 #Viscosity of air\n", + "\n", + "#Calculation\n", + "import math\n", + "Re=d*u*rho_air/Meu_air \n", + "#Hence, from Figure 3.7: X=R/(rho*u**2)=0.0018\n", + "X=0.0018 \n", + "u_s=u/0.817 \n", + "u_star=u*X**0.5 \n", + "#At 50 mm from the wall:\n", + "y1_r=2*y1/d # y/r\n", + "#Hence, from equation 12.34:\n", + "u_x1=u_s+2.5*u_star*math.log(y1_r) \n", + "#At 5 mm from the wall:\n", + "y2_r=2*y2/d # y/r\n", + "#Hence, from equation 12.34:\n", + "u_x2=u_s+2.5*u_star*math.log(y2_r) \n", + "#The thickness of the laminar sub-layer is given by equation 12.54:\n", + "del_b=5*d/(Re*X**0.5) \n", + "\n", + "#Result\n", + "print\"\\n The fluid velocity at 50 mm from the wall =\",round(u_x1,1),\"m/s\" \n", + "print\"\\n The fluid velocity at 5 mm from the wall =\",round(u_x2,1),\"m/s\" \n", + "print\"\\n The thickness of the laminar sub-layer =\",round(del_b*1e3,3),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The fluid velocity at 50 mm from the wall = 16.9 m/s\n", + "\n", + " The fluid velocity at 5 mm from the wall = 13.2 m/s\n", + "\n", + " The thickness of the laminar sub-layer = 0.143 mm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:12.2,Page no:722" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "u=10 #Velocity of air\n", + "T=330 #Temperature of air\n", + "d=25e-3 #Inner diameter of pipe\n", + "T_p=415 #Temperature at which the pipe is maintained\n", + "DP_l=80 #Drop of static pressure along the pipe per unit length\n", + "\n", + "import math\n", + "#From equations 12.98 and 3.18:\n", + "#we get h=0.05*Cp\n", + "#The heat taken up per unit time by the air dQ=0.0052*Cp*dT......(i)\n", + "#The heat transferred through the pipe wall is also given by: = 0.039*Cp*(415-T)......(ii)\n", + "#Equating (i) & (ii)\n", + "#On integrating we get\n", + "T_0=415-(85/math.exp(0.45))\n", + "print\"\\n The required air Temperature =%d\"%T_0,\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The required air Temperature =360 K\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:12.2,Page no:732" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "u=0.5 #m/s\n", + "l=20.0/1000.0 #m lemngth of tube\n", + "mu=10**-3\n", + "rho=1000.0 #kg/m**3\n", + "Sc=2330.0\n", + "#Calculation\n", + "Re=l*u*rho/mu\n", + "Hd=u*0.032*Re**(-1/4.0)*(1+2.0*(Sc-1)*Re**(-1/8.0))**-1\n", + "\n", + "#result\n", + "print\"Mass Transfer coefficient is: %.3e\"%Hd,\"kmol/m**2 s= %.3e\"%Hd,\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass Transfer coefficient is: 1.085e-06 kmol/m**2 s= 1.085e-06 m/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:12.3,Page no:733" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "u=3.5 #Velocity of water\n", + "d=25e-3 #Diameter of the pipe\n", + "l=6 #Length of the pipe\n", + "T1=300 #Temperature at enterance\n", + "T2=330 #Temperature at exit\n", + "rho=1000 #density of water at 310 K\n", + "Meu=0.7e-3 #Viscosity of water at 310 K\n", + "#Taking the fluid properties at 310 K and assuming that fully developed flow exists\n", + "Cp=4.18e3 #heat capapcity\n", + "k=0.65 #Thermal conductivity\n", + "\n", + "\n", + "#Calculation\n", + "Re=d*u*rho/Meu \n", + "Pr=Cp*Meu/k \n", + "import math\n", + "h1=0.032*(Re**-0.25)*Cp*rho*u #....Equation 12.139\n", + "# on solving we get final equation as\n", + "theta_dash1=330-10**(math.log10(30)-(0.0654*h1*1e-3/2.303)) \n", + "h2=0.032*(Re**-0.25)*(1+2*Re**(-1.0/8.0)*(Pr-1))**-1*Cp*rho*u \n", + "# on solving we get final equation as\n", + "theta_dash2=330-10**(math.log10(30)-(0.0654*h2*1e-3/2.303)) #....Equation 12.140\n", + "h3=0.032*(Re**-0.25)*(1+0.82*Re**(-1.0/8.0)*((Pr-1)+math.log(0.83*Pr+0.17)))**-1*Cp*rho*u #...equation 12.141\n", + "# on solving we get final equation as\n", + "theta_dash3=330-10**(math.log10(30)-(0.0654*h3*1e-3/2.303)) \n", + "h4=k/d*0.023*Re**0.8*Pr**0.33 \n", + "# on solving we get final equation as\n", + "theta_dash4=330-10**(math.log10(30)-(0.0654*h4*1e-3/2.303)) \n", + "\n", + "#Result\n", + "print\"\\n (a) Reynolds analogy\"\n", + "print\"\\n The outlet temperature =\",round(theta_dash1,1),\"K\"\n", + "print\"\\n\\n (b) Taylor Prandtl Equation\"\n", + "print\"\\n The outlet temperature =\",round(theta_dash2,1),\"K\"\n", + "print\"\\n\\n (c) Universal velocity profile equation\"\n", + "print\"\\n The outlet temperature =\",round(theta_dash3,1),\"K\"\n", + "print\"\\n\\n (d) Nu=0.023*Re**0.8*Pr**0.33\"\n", + "print\"\\n The outlet temperature = %d\"%theta_dash4,\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " (a) Reynolds analogy\n", + "\n", + " The outlet temperature = 324.1 K\n", + "\n", + "\n", + " (b) Taylor Prandtl Equation\n", + "\n", + " The outlet temperature = 313.9 K\n", + "\n", + "\n", + " (c) Universal velocity profile equation\n", + "\n", + " The outlet temperature = 317.2 K\n", + "\n", + "\n", + " (d) Nu=0.023*Re**0.8*Pr**0.33\n", + "\n", + " The outlet temperature = 316 K\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:12.4,Page no:734" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "u=3.5 #Velocity of air\n", + "d=25e-3 #Diameter of the pipe\n", + "l=6 #Length of the pipe\n", + "T1=290 #Temperature at enterance\n", + "T2=350 #Temperature at exit\n", + "rho=29/22.4*273/310 #density of air at 310 K\n", + "Meu=0.018e-3 #Viscosity of air at 310 K\n", + "#Taking the physical properties at 310 K and assuming that fully developed flow exists\n", + "Cp=1.003e3 #heat capapcity\n", + "k=0.024 #Thermal conductivity\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "Re=d*u*rho/Meu \n", + "Pr=Cp*Meu/k \n", + "h1=0.032*(Re**-0.25)*Cp*rho*u #....Equation 12.139\n", + "# on solving we get final equation as\n", + "theta_dash1=350-10**(math.log10(60)-(239.88*h1*1e-3/2.303)) \n", + "h2=0.032*(Re**-0.25)*(1+2*Re**(-1.0/8.0)*(Pr-1))**-1*Cp*rho*u \n", + "# on solving we get final equation as\n", + "theta_dash2=350-10**(math.log10(60)-(239.88*h2*1e-3/2.303)) #....Equation 12.140\n", + "h3=0.032*(Re**-0.25)*(1+0.82*Re**(-1.0/8.0)*((Pr-1)+math.log(0.83*Pr+0.17)))**-1*Cp*rho*u #...equation 12.141\n", + "# on solving we get final equation as\n", + "theta_dash3=350-10**(math.log10(60.0)-(239.88*h3*1e-3/2.303)) \n", + "h4=k/d*0.023*Re**0.8*Pr**0.33 \n", + "# on solving we get final equation as\n", + "theta_dash4=350-10**(math.log10(60)-(239.88*h4*1e-3/2.303)) \n", + "print\"\\n (a) Reynolds analogy\"\n", + "print\"\\n The outlet temperature =\",round(theta_dash1,1),\"K\"\n", + "print\"\\n\\n (b) Taylor Prandtl Equation\"\n", + "print\"\\n The outlet temperature =\",round(theta_dash2),\"K\"\n", + "print\"\\n\\n (c) Universal velocity profile equation\"\n", + "print\"\\n The outlet temperature = \",round(theta_dash3,1),\"K\"\n", + "print\"\\n\\n (d) Nu=0.023*Re**0.8*Pr**0.33\"\n", + "print\"\\n The outlet temperature =\",round(theta_dash4,1),\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " (a) Reynolds analogy\n", + "\n", + " The outlet temperature = 348.3 K\n", + "\n", + "\n", + " (b) Taylor Prandtl Equation\n", + "\n", + " The outlet temperature = 349.0 K\n", + "\n", + "\n", + " (c) Universal velocity profile equation\n", + "\n", + " The outlet temperature = 349.0 K\n", + "\n", + "\n", + " (d) Nu=0.023*Re**0.8*Pr**0.33\n", + "\n", + " The outlet temperature = 349.5 K\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_13.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_13.ipynb new file mode 100755 index 00000000..12141327 --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_13.ipynb @@ -0,0 +1,720 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13:Humidification and water cooling" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.1,Page no:740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "P=101.3e3 \n", + "T=297 \n", + "R=8314 #gas constant\n", + "RH=60 #Relative humidity\n", + "p_b1=12.2e3 #Vapor pressure at 297 K\n", + "p_b2=6e3 #Vapor pressure at 283 K\n", + "M_w=78 #molecular weight of benzene\n", + "M_a=28 #Mass of nitrogen \n", + "\n", + "#Calculation\n", + "#From the definition of percentage relative humidity (RH)\n", + "P_w=(p_b1)*(RH/100.0) \n", + "#In the benzene -nitrogen mixture:\n", + "m_b=P_w*M_w/(R*T) #mass of benzene\n", + "m_n=(P-P_w)*M_a/(R*T) #mass of nitrogen\n", + "H=m_b/m_n #Humidity at 297 K\n", + "#In order to recover 80 per cent of the benzene, the humidity must be reduced to 20 per cent of the initial value\n", + "H_o=H*.20 \n", + "#Thus in equation 13.2\n", + "P_r=p_b2+(p_b2/M_a*M_w)/H_o \n", + "\n", + "#Result\n", + "print\"\\n The required pressure is =\",round(P_r*1e-3,1),\"kN/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The required pressure is = 391.2 kN/m**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.2,Page no:741" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "P=101.3e3 #Given pressure\n", + "T=300 #Given Temperature\n", + "RH=25 #Percentage relative humidity of water \n", + "P_wo=3.6e3 #partial pressure of water vapour when air is saturated with vapour\n", + "M_w=18 #Molecular weight of water\n", + "M_a=29 #Molecular weight of air\n", + "R=8314 #gas constant\n", + "\n", + "\n", + "#Calculation\n", + "P_w=P_wo*(RH/100.0) \n", + "m_w=P_w*M_w/(R*T) #mass of water vapour\n", + "m_a=(P-P_w)*M_a/(R*T) #mass of water air\n", + "Vs_w=1/m_w #specific volume of water vapour at 0.9 kN/m**2\n", + "Vs_a=1/m_a #specific volume of air at 100.4 kN/m**2\n", + "H=m_w/m_a #Humidity\n", + "H_v=Vs_a #Humid volume\n", + "H_p=(P-P_wo)/(P-P_w)*RH #Percentage humidity\n", + "\n", + "#Result\n", + "print\"(a) The partial pressure of the water vapour in the vessel = \",P_w*1e-3,\"kN/m**2\"\n", + "print\" b) Specific volume of water vapour =\",round(Vs_w),\"m**3/kg\"\n", + "print\" Specific volume of air =\",round(Vs_a,3),\"m**3/kg\" \n", + "print\"(c) Humidity of air =\",round(H,4),\"kg water/kg air\"\n", + "print\" Humid volume =\",round(H_v,3),\"m**3/kg\"\n", + "print\"(d) Percentage humidity =\",round(H_p,1),\"per cent\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The partial pressure of the water vapour in the vessel = 0.9 kN/m**2\n", + " b) Specific volume of water vapour = 154.0 m**3/kg\n", + " Specific volume of air = 0.857 m**3/kg\n", + "(c) Humidity of air = 0.0056 kg water/kg air\n", + " Humid volume = 0.857 m**3/kg\n", + "(d) Percentage humidity = 24.3 per cent\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.3,Page no:743" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T=310.0 #Temperature of moist air\n", + "T_w=300.0 #Wet bulb tempeature\n", + "L=2440e3 #Latent heat of vapourisation of water at 300 K\n", + "P=105e3 #Given total pressure\n", + "P_wo1=3.6e3 #Vapour pressure of water vapour at 300 K\n", + "P_wo2=6.33e3 #Vapour pressure of water vapour at 310 K\n", + "M_w=18.0 #Molecular weight of water\n", + "M_a=29.0 #Molecular weight of air\n", + "\n", + "#Calculation\n", + "import sympy\n", + "H_w=(P_wo1/(P-P_wo1))*(M_w/M_a) #The humidity of air saturated at the wet-bulb temperature\n", + "#Therefore, taking (h/hD*rho*A) as 1.0 kJ/kg K, in equation 13.8:\n", + "H=H_w-(1e3/L)*(T-T_w) \n", + "#In equation 13.2:\n", + "x=sympy.Symbol('x') \n", + "P_w=sympy.solve(H*(P-x)*M_a-M_w*x) \n", + "RH=P_w[0]/P_wo2*100.0 \n", + "\n", + "#Result\n", + "print\"\\n The humidity of the air =\",round(H,3),\"kg/kg\"\n", + "print\"\\n The percentage relative humidity (RH)=\",round(RH,1),\"per cent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The humidity of the air = 0.018 kg/kg\n", + "\n", + " The percentage relative humidity (RH)= 46.6 per cent\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.4,Page no:749" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#Refer HUMIDITY ENTHALPY PLOT Figure 13.5 Page 748 as Humidity Chart\n", + "#According the given passes and situatuion\n", + "T = [325,301,308,312,315] #[K]\n", + "H = [.005,.015,.022,.027,.032] #[kg/kg]\n", + "#From Humidity Chart on humidifying to 60 percent humidity\n", + "Tw = [296,301,305,307] #[K]\n", + "\n", + "#Calculation\n", + "Hin = H[4]-H[0] #[kg/kg] Increase in Humidity\n", + "#From Humitidy Chart at the obtained leaving conditions\n", + "v = .893 #[m**3/kg] Specific Volume of dry air\n", + "vs = .968 #[m**3/kg] Specific Volume of Saturated air\n", + "vh = .937 #[m**3/kg] Humid Volume of air of 60 per cent humidity by Interpolation of Curve in Humidity Chart\n", + "x = 5 #[m**3/s] Amount of moist air leaves the dryer in (b)\n", + "m = x/vh #[kg/s] Mass of air passing through the dryer\n", + "mw = m*Hin # [kg/s] Mass of water evaporated\n", + "Tb = 370.0 #[K] dry Bulb temperature corresponding to humidity of .005 kg/kg and wet-bulb temperature 307 K\n", + "\n", + "#Result\n", + "print'\\n\\n (a) The temperature of the material on each tray (in Kelvin)'\n", + "print \"\\t\",Tw,\"K\"\n", + "print' Thus the air leaving the system is at',T[4],' K and 60 per cent humidity.'\n", + "print'\\n\\n (b) If 5 m**3/s moist air leaves the dryer, The amount of water removed is',round(mw,3),' kg/s.'\n", + "print'\\n\\n (c) The Temperature to which the inlet air would have to be raised\\n to carry out the drying in single stage is',Tb,'K.'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + " (a) The temperature of the material on each tray (in Kelvin)\n", + "\t[296, 301, 305, 307] K\n", + " Thus the air leaving the system is at 315 K and 60 per cent humidity.\n", + "\n", + "\n", + " (b) If 5 m**3/s moist air leaves the dryer, The amount of water removed is 0.144 kg/s.\n", + "\n", + "\n", + " (c) The Temperature to which the inlet air would have to be raised\n", + " to carry out the drying in single stage is 370.0 K.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.5,Page no: 753" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "G1=1 #flow rate of air at 350 K\n", + "PH1=10 #Percentage Humidity at 350 K\n", + "G2=5 #flow rate of air at 300 K\n", + "PH2=30 #Percentage Humidity at 300 K\n", + "#from fig 13.4\n", + "H1=0.043 #Humidity at 350 K and 10 percent humidity\n", + "H2=0.0065 #Humidity at 300 K and 30 percent humidity\n", + "\n", + "#Calculation\n", + "import sympy\n", + "#Thus, in equation 13.23:\n", + "H=((G1*H1)+(G2*H2))/(G1+G2) \n", + "#from fig 13.5\n", + "H_1=192e3 #Entahlpy at 350 K and 10 percent humidity\n", + "H_2=42e3 #Enthalpy at 300 K and 30 percent humidity\n", + "x=sympy.Symbol('x') \n", + "H_=sympy.solve((G1*(x-H_1))-(G2*(H_2-x))) \n", + "#From Figure 13.5:\n", + "#at H_ (Enthalpy)= 67 kJ/kg and H(humidity) = 0.0125 kg/kg\n", + "T=309 \n", + "\n", + "#Result\n", + "print\"\\n Humidity of final stream =\",round(H,4),\"kg/kg\" \n", + "print\"\\n Entahlpy of the resultant stream =\",round(H_[0]*1e-3),\"kJ/kg\"\n", + "print\"\\n Temperature of the resultant stream =\",T,\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Humidity of final stream = 0.0126 kg/kg\n", + "\n", + " Entahlpy of the resultant stream = 67.0 kJ/kg\n", + "\n", + " Temperature of the resultant stream = 309 K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.6,Page no:755" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "G_s=0.15 #Mass flow rate of steam\n", + "T=400 #Temperature to which steam is superheated\n", + "T_a=320 #Tremperature of air \n", + "RH_a=20 #Percentage relative humidity of air\n", + "G_a=5 #Mass flow rate of air\n", + "L=2258e3 #latent heat of steam\n", + "Cp=2e3 #Specific heat of superheated steam\n", + "\n", + "#Calculation\n", + "#Enthalpy of steam\n", + "H_3=4.18*(373-273)+L+Cp*(T-373) \n", + "#From Figure .13.5:\n", + "#at T=320 K and 20 percent Relative Humidity\n", + "H1=0.013 #Humidity\n", + "H_1=83e3 #Enthalpy\n", + "#By making required constructions we get\n", + "H=0.043 \n", + "H_=165e3 \n", + "T_s=324 \n", + "#from chart and equation 13.28\n", + "G_case2=0.41 \n", + "\n", + "#Result\n", + "print\"\\n Relative humidity of stream=\",round(H,3),\"kg/kg\"\n", + "print\" Entahlpy of stream =\",H_*1e-3,\" kJ/kg\"\n", + "print\" Temperature of stream =\",T_s,\"K\"\n", + "print\"\\n\\n When exit temperature = 330 K\"\n", + "print\" The required flow of steam = \",round(G_case2,2),\" kg/s\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Relative humidity of stream= 0.043 kg/kg\n", + " Entahlpy of stream = 165.0 kJ/kg\n", + " Temperature of stream = 324 K\n", + "\n", + "\n", + " When exit temperature = 330 K\n", + " The required flow of steam = 0.41 kg/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7,Page no:761" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declartaion\n", + "theta1=300 #K\n", + "theta2=320 #K\n", + "H=0.2 #Percent humidity\n", + "\n", + "#Calculation\n", + "#From standard charts(Fig 13.4):\n", + "H1=0.0045 #Humidity in kg/kg\n", + "H2=0.0140 #Humidity in kg/kg\n", + "\n", + "#Heat the air from 300 to 318 K\n", + "theta=294.5 #K\n", + "#H=0.0140 kg/kg\n", + "\n", + "#Result\n", + "print\"Heat the saturated air at H=\",H2,\"kg/kg from\",theta,\"to\",theta2,\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat the saturated air at H= 0.014 kg/kg from 294.5 to 320 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no 13.8,Page no:766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T_water_enter=301.0 #Water entering the tower in [K]\n", + "T_water_leave=294.0 #Water entering the tower in [K]\n", + "air_drybulb=287.0 #[K]\n", + "air_wetbulb=284.0 #[K]\n", + "m=4810.0 #[kg/s] Water flow rate\n", + "\n", + "\n", + "#Calculation\n", + "delta_T=T_water_enter-T_water_leave #Temperatue range of water\n", + "T_mean=0.5*(T_water_enter+T_water_leave) #MEan wate temperature in [K]\n", + "H_mean=92.6 #kJ/kg\n", + "H_drybulb=49.5 #kJ/kg\n", + "delTdash=T_mean-air_drybulb\n", + "delHdash=H_mean-H_drybulb\n", + "import math\n", + "Dt=m/(0.00369*(delHdash/delta_T)*math.sqrt(delTdash+(0.0752*delHdash)))\n", + "from scipy.optimize import fsolve\n", + "Ct=5.0\n", + "h=100.0 #height assumed in [m]\n", + "Ab=Dt/(19.50*math.sqrt(h)/(Ct**1.5))\n", + "Id=math.sqrt(round(Ab)*4/math.pi)\n", + "\n", + "#Result\n", + "print \"Thus the internal diameter of the column at sill level,\",round(Id,1),\"m\"\n", + "print\"Since this gives a height-dia ratio=3:2 the design is aceptable\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the internal diameter of the column at sill level, 64.6 m\n", + "Since this gives a height-dia ratio=3:2 the design is aceptable\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.9,Page no:775" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ti=293 #Inlet temperature in [K]\n", + "L=2495 #Latent heat of water in kJ/kg\n", + "flow=0.68 #[m**3/m**2 s] flow of air \n", + "water_thru=0.26 #Water througput in [kg/m**2 s]\n", + "Cp_air=1.003 #Specific heat of air in kJ/kg K\n", + "Cp_wv=2.006 #Sp heat of water vapour\n", + "wv_in=0.003 #Water vapour in inlet air[kg/kg dry air]\n", + "wv_in_m=0.005 #kmol/kmol dry air\n", + "H=0.003\n", + "hd_a=0.2 #Resistance whole\n", + "\n", + "#Calculation\n", + "Hg1=Cp_air*(Ti-273.0)+H*(L+Cp_wv*(Ti-273.0)) #;kJ/kg]\n", + "flow=(1.0-wv_in_m)*flow\n", + "rho=(29.0/22.4)*(273.0/Ti) #Density of air at 293 K[kg/m**3]\n", + "G_dash=rho*flow #[kg/m**s]\n", + "slope=water_thru*4.18/G_dash\n", + "theta_l1=293 \n", + "Hg1=27.67 #kJ/kg\n", + "import numpy as np\n", + "Hg=np.array([27.7,30,40,50,60,70,76.5])\n", + "theta=np.array([293,294.5,302,309,316,323,328])\n", + "Hf=np.array([57.7,65,98,137,190,265,355])\n", + "Hf_Hg=Hf-Hg\n", + "one_Hf_Hg=1.0/(Hf_Hg)\n", + "%pylab inline\n", + "plot(Hg,one_Hf_Hg)\n", + "ylabel(\"1/(Hf-Hg)\")\n", + "xlabel(\"Hg(kJ/kg)\")\n", + "title(\"Evaluation of the integral of dHg/(Hf-Hg)\")\n", + "from scipy.integrate import simps, trapz\n", + "area = simps(Hg,one_Hf_Hg,dx=10)\n", + "area=0.65\n", + "#At bottom of the column:\n", + "delta_H1=Hf[0]-Hg[0]\n", + "#At the top of the column:\n", + "delta_H2=Hf[6]-Hg[6]\n", + "m_water_temp=0.5*(theta[0]+theta[6])\n", + "Hgm=52\n", + "Hfm=145\n", + "del_Hm=93\n", + "f=0.79\n", + "intg=(Hg[6]-Hg[0])/(f*del_Hm)\n", + "z=intg*G_dash/(hd_a*rho)\n", + "show()\n", + "\n", + "#Result\n", + "print \"Height of packing,z=\",round(z,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['f']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVdX6wPHvUdBESHDgoEBiDIKKB5LE7FYY4YBCmmlo\nAyqZmUN19Wc2inUfh8rK4VbqNcMycrg5FINZSXorJAX1djXFgQQEZxQURXH9/th5ApmR44HD+3ke\nns6w9trvQjrvWWuvtbZOKaUQQgghaqGJuQMQQgjRcEkSEUIIUWuSRIQQQtSaJBEhhBC1JklECCFE\nrUkSEUIIUWuSRBqRoKAgli1bZpK6Z8+ezdixY01Sd2XWrVuHq6srdnZ27N69u8rySUlJuLq61sm5\nV65cSb9+/eqkLlPLyMigSZMmXLt2rcbHFhYWEhYWhr29PY899liV5evyd1yRy5cv07VrV44fP17t\nY2rajtrE5OPjw6lTp+q87vpMkkg95Obmho2NDXZ2dsafyZMn33S9Op0OnU530/WU9yHx8ssvs3Tp\n0puuu6amTp3Khx9+SH5+PgaDocz7TZo04fDhwyY59+OPP86mTZuqVfbTTz/lvvvuM0kcprZ27VpO\nnDjBmTNnWLVqVY2Pd3Nz4/vvvy/1Wm1+H7Nnz+bVV18FYMmSJTzwwAPo9XoARo0axeuvv16q/I2J\ns6p2VKeOyjRv3pwxY8YwZ86cGrWroZMkUg/pdDq++eYb8vPzjT8LFiwwd1j1jlKKo0eP0qVLlyrL\nWbra9DCq648//sDLy4smTWr3cVFXX17i4+MZOHAgAIsXL+bJJ5+s0TmqakddxDlixAhiYmK4cuXK\nTdXTkEgSaUAuX76Mvb09//vf/4yvnTx5EhsbG06dOsXZs2cZNGgQjo6OtG7dmrCwMLKzs8utKzo6\nutT/hDd+41q+fDldunTh9ttvx93dnSVLlgBw4cIFBgwYwLFjx7Czs+P2228nJyenTH0bN26ka9eu\nODg40KdPH37//Xfje25ubsybNw+DwYC9vT0RERFcv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1PPfUUe/fuLVPXnj17MBgMlZav6Hyg3fOhY8eOddtAIapJkogQFShv\ndtb11z744APee+89/Pz8OHToEK1atQK0e2xcvXqVixcvljqmc+fOrFy5kmHDhnH48GGuXr1Ks2bN\n2LFjB/7+/mXOUbL8kSNHKjwfQEpKCvfff7+pfx1ClEu2gheiFgoLC2nRogWg9QxWrVrFunXrAG0N\niI+PD4899liFxz/yyCOMHTuW1NRUPD09GT58eK3P9/jjjzN16tRSyUiIW0UurAtRCzt37mTixIko\npXBwcOCTTz4xvjdhwgQiIyMrTCK+vr54e3vTr1+/aq8Nqeh8J06cIC8vTxKIMBvpiQghhKg1uSYi\nhBCi1iSJCCGEqDVJIkIIIWpNkogQQohakyQihBCi1iSJCCGEqLX/BzaWkCCYwsRQAAAAAElFTkSu\nQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of packing,z= 2.2 m\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:13.10,Page no:782" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "L_dash=0.25 #n-butanol flow rate\n", + "Mw=74.0 #Molecular wt of butanol\n", + "Ma=29.0 #Molecular wt of air\n", + "hDa=0.1 #Mass transfer coefficient per unit volume\n", + "b=2.34 #Psychometric ratio\n", + "lamda=590 #kJ/kg\n", + "Cl=2.5 #kJ/kg K\n", + "s=1.05 #Humid heat of gas in [kJ/kg K]\n", + "Cp_dry=1.001 #Sp heat of dry air\n", + "G=0.7 #Vaour rate \n", + "T=[295,300,305,310,315,320,325,330,335,340,345,350]\n", + "Pwo=[0.59,0.86,1.27,1.75,2.48,3.32,4.49,5.99,7.89,10.36,14.97,17.5] #kN/m**2\n", + "Ho=[0]*12\n", + "Hf=[0]*12\n", + "Hf_dash=[0]*12\n", + "\n", + "#Calculation\n", + "lamda_dash=lamda/b\n", + "print\"______________________________\"\n", + "print\"T\\tHo\\tHf\\tHf`\"\n", + "print\"_______________________________\"\n", + "for i in range(0,12):\n", + " Ho[i]=Pwo[i]/(101.3-Pwo[i])*(74/29.0)\n", + " Hf[i]=(1/(1+Ho[i]))*Cp_dry*(T[i]-273.0)+Ho[i]*(Cl*(T[i]-273.0)+lamda)\n", + " Hf_dash[i]=Cp_dry*(T[i]-273.27)/(1+Ho[i])+Ho[i]*(Cl*(T[i]-273.0)+lamda_dash)\n", + " print T[i],\"\\t\",round(Ho[i],4),\"\\t\",round(Hf[i],2),\"\\t\",round(Hf_dash[i],2)\n", + "%pylab inline\n", + "plot(T,Hf)\n", + "plot(T,Hf_dash)\n", + "xlim(285,340)\n", + "ylim(0,200)\n", + "theta_l1=T[0]\n", + "Hg1=s*(290.0-273.0)\n", + "Hg1=round(Hg1,1)\n", + "rho_air=(Ma/22.4)*(273/310.0)\n", + "G_dash=G*rho_air\n", + "slope=L_dash*Cl/G_dash\n", + "theta_l2=T[7]\n", + "Hg2=46 #kJ/kg\n", + "#y=mx+c\n", + "c=Hg2-slope*theta_l2\n", + "plot([theta_l1,theta_l2],[Hg1,Hg2])\n", + "xlabel(\"Temperature(K)\")\n", + "ylabel(\"Enthalpy(kJ/kg)\")\n", + "title(\"Graphical construction\")\n", + "Hg1_dash=(Hg1+(b-1)*s*(290.0-273.0))/b #[kJ/kg]\n", + "slp=-3*s\n", + "theta_f1=293.0\n", + "import numpy as np\n", + "Hf_dash1=np.array([23.9,29.0,35.3,42.1,50.0,57.9,66.7,75.8])\n", + "Hg_dash=np.array([17.9,22.0,26.0,30.0,34.0,38.1,42.0,46.0])\n", + "Hfd_Hg=Hf_dash1-Hg_dash\n", + "HfHG=1/(Hfd_Hg)\n", + "mean=[0]*7\n", + "interval=[0]*7\n", + "value=[0]*7\n", + "summ=0\n", + "show()\n", + "print\"____________________________________________________________________\"\n", + "print\"Mean value in interval\\t\\tInterval\\tValue of integral\"\n", + "print\"____________________________________________________________________\"\n", + "for i in range(0,7):\n", + " mean[i]=(HfHG[i]+HfHG[i+1])/2.0\n", + " interval[i]=Hg_dash[i+1]-Hg_dash[i]\n", + " value[i]=mean[i]*interval[i]\n", + " summ=summ+value[i]\n", + " print round(mean[i],3),\"\\t\\t\\t\\t\",interval[i],\"\\t\\t\\t\",round(value[i],3),\"\\t\"\n", + "z=G_dash*summ/(b*hDa)\n", + "print\"Value of integral=\",round(summ,3)\n", + "#Result\n", + "print \"\\n\\n\\nHeight=\",round(z,1),\"m\"\n", + "print\"The final point is given by theta=\",308,\"K\"\n", + "print\"NOTE:For 2nd part,calculation can't be done on python,it is drawn geometrically\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "______________________________\n", + "T\tHo\tHf\tHf`\n", + "_______________________________\n", + "295 \t0.0149 \t31.34 \t26.02\n", + "300 \t0.0218 \t40.81 \t33.17\n", + "305 \t0.0324 \t52.73 \t41.53\n", + "310 \t0.0449 \t66.06 \t50.65\n", + "315 \t0.064 \t84.02 \t62.13\n", + "320 \t0.0865 \t104.48 \t75.01\n", + "325 \t0.1183 \t131.75 \t91.53\n", + "330 \t0.1604 \t166.64 \t112.23\n", + "335 \t0.2155 \t211.63 \t138.59\n", + "340 \t0.2907 \t272.16 \t173.74\n", + "345 \t0.4425 \t390.67 \t240.99\n", + "350 \t0.5329 \t467.26 \t287.04\n", + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['mean']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEZCAYAAACJjGL9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8jtf/x/FXJDETm5AEQUJEkGhQbVU0tgo1QoxSoz90\nqVaVb1X4ao1WlaJV1KiiRu1R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jwYFJSUqhQoQLJyck8ePDgqWvy8vJi\n/vz5+Pr6EhISQlJSEjdu3MDV1TULv10hZJlxIQgNDaV9+/acPn1a71KeSUBAALVq1Uo1RpKWrVu3\nsnHjRqZNm5ZLlQlzJS0KITCtPZLfe+89Fi5cmOnr5s6dy8cff5wLFQlzJy0KIYQQGZIWhRBCiAxJ\nUAghhMiQBIUQQogMSVAIIYTIkASFEEKIDElQCCGEyND/Ay/+5bvPWiSpAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "____________________________________________________________________\n", + "Mean value in interval\t\tInterval\tValue of integral\n", + "____________________________________________________________________\n", + "0.155 \t\t\t\t4.1 \t\t\t0.635 \t\n", + "0.125 \t\t\t\t4.0 \t\t\t0.501 \t\n", + "0.095 \t\t\t\t4.0 \t\t\t0.38 \t\n", + "0.073 \t\t\t\t4.0 \t\t\t0.29 \t\n", + "0.057 \t\t\t\t4.1 \t\t\t0.232 \t\n", + "0.045 \t\t\t\t3.9 \t\t\t0.177 \t\n", + "0.037 \t\t\t\t4.0 \t\t\t0.148 \t\n", + "Value of integral= 2.363\n", + "\n", + "\n", + "\n", + "Height= 8.1 m\n", + "The final point is given by theta= 308 K\n", + "NOTE:For 2nd part,calculation can't be done on python,it is drawn geometrically\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_2.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_2.ipynb new file mode 100755 index 00000000..a6f061ca --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_2.ipynb @@ -0,0 +1,244 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2:Flow of Fluids \u2014Energy and Momentum Relationships" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:2.1,Page no:36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#(a) PV = 1 * RT, where \n", + "R=8314.0 \n", + "P=60.0*10**6 \n", + "T=320.0 \n", + "Tc=191.0 \n", + "Pc=4.64*10**6 \n", + "\n", + "#Calculation\n", + "V1=8314.0*T/P \n", + "#(b) In van der Waals equation (2.32), the constants may be taken as:\n", + "a=27*R**2*Tc**2.0/(64.0*Pc) \n", + "b=R*Tc/(8.0*Pc) \n", + "#Thus using equation 2.32:\n", + "import sympy\n", + "x=Symbol('x') \n", + "p=sympy.solve((60*10**6*x**2+a)*(x-0.0427)-(8314*320*x**2)) \n", + "#(c) Tr=T/Tc ,Pr=P/Pc\n", + "Tr=T/Tc \n", + "Pr=P/Pc \n", + "#Thus from Figure 2.1, \n", + "Z=1.33 \n", + "#V = ZnRT/P (from equation 2.31)\n", + "V3=Z*R*T/P \n", + "\n", + "#Result\n", + "print\"(a) Volume of vessel (ideal gas law) =\",round(V1,4),\"m**3\"\n", + "print\"(b) Volume of vessel(van der waals eq.) =\",round(p[0],3),\"m**3\"\n", + "print\"(c) Volume of vessel(generalised compressibility-factor chart) =\",round(V3,4),\"m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Volume of vessel (ideal gas law) = 0.0443 m**3\n", + "(b) Volume of vessel(van der waals eq.) = 0.066 m**3\n", + "(c) Volume of vessel(generalised compressibility-factor chart) = 0.059 m**3\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:2.3,Page no:43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#Mass rate of discharge of water, G = rho*u*A\n", + "rho=1000.0 #Density of Water\n", + "d=25.0*10**-3 #Diameter of nozzle\n", + "u=25.0 #Velocity of water at nozzle\n", + "\n", + "#Calculation\n", + "import math\n", + "G=rho*u*math.pi/4*d**2 \n", + "#Momentum of fluid per second = Gu\n", + "F=G*25 \n", + "\n", + "#Result\n", + "print\"\\n Reaction force = Rate of change of momentum =\",round(F),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Reaction force = Rate of change of momentum = 307.0 N\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:2.4,Page no:43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#Momentum per second of approaching liquid in Y-direction = rho*u**2*A\n", + "rho=1000.0 #Density of water\n", + "d=50.0*10**-3 #Diameter of pipe\n", + "u=5.0 #Velocity of water in pipe\n", + "\n", + "#Calculation\n", + "import math\n", + "M=rho*u**2*math.pi/4*d**2 \n", + "Rf=M*(math.cos(math.pi/4)+math.sin(math.pi/4)) \n", + "\n", + "#Result\n", + "print\"\\n The resultant force in direction of arm of bracket =\",round(Rf,1),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The resultant force in direction of arm of bracket = 69.4 N\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:2.5,Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From equation 2.68:\n", + "# 0.5*((u2)**2-(u1)**2)=g*(z1-z2)+((P1-P2)/rho)\n", + "#Suffix 1 to denote conditions in the pipe and suffix 2 to denote conditions in the jet\n", + "#Symbols have their usual meaning\n", + "u1=0.0 \n", + "z1=0.0 \n", + "z2=0.0 \n", + "P1=250.0*10**3 \n", + "P2=0.0 \n", + "rho=1000.0 #Density of water\n", + "g=9.81 \n", + "\n", + "#Calculation\n", + "import sympy\n", + "x=Symbol('x') \n", + "u2=solve((0.5*(x)**2)-((P1-P2)/rho)) \n", + "print\"Velocity of the jet, u2 =\",round(u2[1],1),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of the jet, u2 = 22.4 m/s\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:2.6,Page no:54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "id=0.5 #internal diameter of pipe\n", + "rs=50 #revolution speed\n", + "ir=0.15 #internal radius of water\n", + "rho=1000 #density of water\n", + "\n", + "#Calculation\n", + "omega=2*math.pi*rs \n", + "#The wall pressure is given by equation 2.82 as:\n", + "wall_pressure=rho*(omega)**2/2*((id/2)**2-ir**2) \n", + "\n", + "#Result\n", + "print\"\\n The wall pressure is %.2e\"%wall_pressure,\"N/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The wall pressure is 1.97e+06 N/m**2\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_3.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_3.ipynb new file mode 100755 index 00000000..ddcbac8f --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_3.ipynb @@ -0,0 +1,578 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3:FLOW OF LIQUIDS IN PIPES AND OPEN CHANNELS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.1,Page no:70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "sap=1.25 #Sulphuric acid pumped\n", + "d=25e-3 #Diameter of pipe\n", + "l=30 #length of pipe\n", + "meu=25e-3 #Viscosity of acid\n", + "rho_a=1840 #Density of acid\n", + "\n", + "#Calculation\n", + "import math\n", + "Re=4*sap/(math.pi*meu*d) \n", + "u=sap/(rho_a*math.pi/4*d**2) \n", + "#calculating pressure drop from the energy balance equation and equation 3.19\n", + "Dp=rho_a*((0.5+4*0.006*30/0.025)*u**2+9.81*12) \n", + "\n", + "#Result\n", + "print\"\\n Pressure drop =\",round((Dp/10**3)),\"kN/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Pressure drop = 320.0 kN/m**2\n" + ] + } + ], + "prompt_number": 110 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.2,Page no:70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=50e-3 #Diameter of pipe\n", + "l=100.0 #length of pipe\n", + "e=0.013 #Roughness of pipe\n", + "DPf=50e3 #Maximum pressure drop\n", + "rho=1000.0 #density of water\n", + "meu=1e-3 #viscosity of water\n", + "\n", + "#Calculatiom\n", + "phi_re2=(DPf)*d**3*rho/(4*l*meu**2) \n", + "e_d=e/(d*1e3) \n", + "Re=7.9e4 \n", + "u=Re*meu/(rho*d) \n", + "\n", + "#Result\n", + "print\"The maximum allowable velocity is =\",round(u,1),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum allowable velocity is = 1.6 m/s\n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.3,Page no:71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Dia_tank=5 #Diameter of the tank\n", + "len_pipe=100.0 #Length of pipe\n", + "dia_pipe=225e-3 #Diameter of pipe\n", + "\n", + "#Calculation\n", + "X=.0020 \n", + "def f(D):\n", + " return(111.5*(1+(3552*X))**0.5*D**-0.5)\n", + "from scipy.integrate import quad\n", + "t=quad(f,0.3,3) \n", + "\n", + "print\"The time taken for the level to fall is therefore about %d\"%t[0],\"s or %.1f\"%(t[0]/60.0),\"min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken for the level to fall is therefore about 751 s or 12.5 min\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.4,Page no:72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d1=0.3 #diameter of pipe from junction A to D or B to D\n", + "l1=1.5e3 #length of pipe from junction A to D or B to D\n", + "d2=0.5 # diameter of pipe from junction D to C\n", + "l2=0.75e3 # length of pipe from junction D to C\n", + "h_A=10 # height of tank A above C\n", + "h_B=h_A+6 # height of tank A above C\n", + "rho=870 # density of liquid\n", + "Meu_l=0.7e-3 # viscosity of liquid\n", + "\n", + "#Calculation\n", + "import math\n", + "import sympy\n", + "import numpy as np\n", + "x=Symbol('x') \n", + "u2=sympy.solve(x**4-(7.38*x**2)+13.57) \n", + "u1=(np.square(u2)-1.47)**0.5 \n", + "u3=(u1+u2)/2.78 \n", + "#taking the positive values and which satisfy equation 7\n", + "U1=u1[2] \n", + "U2=u2[2]\n", + "U3=u3[2]\n", + "Q=math.pi/4*d2**2*U3 \n", + "\n", + "#Result\n", + "print\"\\n The volumetric flow rate =%.2f\"%Q,\"m**3/s\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The volumetric flow rate =0.23 m**3/s\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.5,Page no:86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "r=50.0 \n", + "\n", + "#Calculation\n", + "from scipy.optimize import fsolve\n", + "a=Symbol('a') \n", + "def f(a):\n", + " return(105*a**(8.0/7.0)-56*a**(15.0/7.0)-24.5)\n", + "p=fsolve(f,0.5)\n", + "y=p[0]*r \n", + "\n", + "#Result\n", + "print\"a =\",round(p[0],2)\n", + "print\"y =\",round(y,1),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 0.33\n", + "y = 16.6 mm\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.6,Page no:88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q=7.2 #Water flow rate\n", + "d1=40e-3 #initial pipe diameter\n", + "d2=50e-3 #diameter of pipe after enlargement\n", + "g=9.81 \n", + "\n", + "#Calculation\n", + "import math\n", + "u1=(Q/3600.0)/(math.pi/4*d1**2) #Velocity in 40 mm pipe\n", + "u2=(Q/3600.0)/(math.pi/4*d2**2) #Velocity in 50 mm pipe\n", + "# The head lost is given by equation 3.77 as:\n", + "hf=(u1-u2)**2.0/(2.0*g) \n", + "\n", + "#Result\n", + "print\"Head lost =\",round(hf*1e3,1),\"mm of water\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head lost = 16.7 mm of water\n" + ] + } + ], + "prompt_number": 115 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.7,Page no:92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q_h=2.27 # flow rate of water in m**3/h\n", + "T=320 #Temperature of water to be pumped\n", + "id=40e-3 #internal diameter of pipe\n", + "l_h=150.0 #length of pipe horizontally\n", + "l_v=10.0 #length of pipe vertically\n", + "e=0.2e-3 \n", + "g=9.81 \n", + "rho=1000.0 \n", + "\n", + "#Calculation\n", + "rel_rough=e/id #Relative roughness\n", + "meu=0.65e-3 #Viscosity at 320 K\n", + "Q_s=Q_h/3600.0 #flow rate of water in m**3/s\n", + "area=math.pi/4*id**2 # Area for flow\n", + "u=Q_s/area #Velocity\n", + "Re=(id*u*rho)/meu \n", + "#X=R/(rho*u**2)=0.004 (from Figure 3.7)\n", + "X=.004 \n", + "equi_len=l_h+l_v+(260*id) # Equivalent length of pipe\n", + "hf=4*X*equi_len*u**2/(id*g) \n", + "tot_head=hf+1.5+10 # Total head to be developed\n", + "mass_thr=Q_s*rho #Mass throughput\n", + "power_reqd=(mass_thr*tot_head*g)/0.60 \n", + "\n", + "#Result\n", + "print\"Power required =%.1f\"%power_reqd,\"W =%.3f\"%(power_reqd*1e-3),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required =136.6 W =0.137 kW\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.8,Page no:92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=0.15 # diameter of pipe\n", + "g=9.81 \n", + "phi=.0045 \n", + "\n", + "#Calculation\n", + "import sympy\n", + "import math\n", + "x=Symbol('x') \n", + "u=sympy.solve((7.6+4*phi*(105/.15))*x**2/(2*g)-10) \n", + "rate_dis=u[1]*math.pi*d**2/4 \n", + "\n", + "#Result\n", + "print\"\\n Rate of discharge =%.d\"%(rate_dis*1e3),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Rate of discharge =55 kg/s\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.9,Page no:103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "u1=1.5 # velocity\n", + "D1=75e-3 #depth\n", + "g=9.81 \n", + "\n", + "#Calculation\n", + "#The depth of fluid in the channel after the jump is given by:\n", + "D2=0.5*(-D1+(D1**2+(8*u1**2*D1/g)**0.5)) #equation 3.113\n", + "#If the channel is of uniform cross-sectional area, then:\n", + "u2=u1*D1/D2 \n", + "\n", + "#Result\n", + "print\"\\n The velocity of fluid in the channel after the jump is =\",round(u2,2),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The velocity of fluid in the channel after the jump is = 0.75 m/s\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.10,Page no:127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "k=10 \n", + "n=0.2 \n", + "Ucl=1 # centre line velocity\n", + "l=200 # length of pipe\n", + "r=.02 # radius of pipe\n", + "dux_dy_1=10 \n", + "dux_dy_2=50 \n", + "Ry_1=k*dux_dy_1**0.2 \n", + "Ry_2=k*dux_dy_2**0.2 \n", + "\n", + "\n", + "#Calculation\n", + "#Using the Bingham-plastic model (equation 3.125):\n", + "import numpy as np\n", + "A=np.array([[1,10],[1,50]])\n", + "B=np.array([15.85,21.87])\n", + "C=np.linalg.inv(A)*B \n", + "Ry=C[0] \n", + "Meu_p=C[1] \n", + "# Using Equation 3.131\n", + "DP=2*k*l*Ucl**n*((n+1)/n)**n*r**(-n-1) \n", + "# For a Bingham-plastic fluid:\n", + "# The centre line velocity is given by equation 3.145:\n", + "X=(l*2*Ry)/(r*DP) \n", + "Up=(DP*r**2*(2-4*X+2*X**2))/(8*Meu_p*l) \n", + "\n", + "#Result\n", + "print\"Plastic viscosity (Meu_p) =\",C[1][0]+C[1][1],\"N s/m**2\" \n", + "print\"\\nYeild stress (Ry) =\",C[0][0]+C[0][1],\"N s/m**2\"\n", + "print\"\\nPressure drop (Bingham plastic model)=%.2e\"%DP,\"N/m**2\"\n", + "print\"\\ncentre line velocity (Bingham plastic model) = \",round(Up[0]+Up[1],2),\"m/s (APPROX taken in book)\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Plastic viscosity (Meu_p) = 0.1505 N s/m**2\n", + "\n", + "Yeild stress (Ry) = 14.345 N s/m**2\n", + "\n", + "Pressure drop (Bingham plastic model)=6.26e+05 N/m**2\n", + "\n", + "centre line velocity (Bingham plastic model) = 0.68 m/s (APPROX taken in book)\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:3.11,Page no:129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Meu=0.1 # Viscosity of liquid\n", + "d=25e-3 # Diameter of pipe\n", + "l=20.0 # length of pipe\n", + "DP=1e5 # Pressure drop\n", + "n=1/3.0 # flow index of polymer solution\n", + "dux_dy=1000.0 \n", + "k=Meu \n", + "\n", + "#Calculation\n", + "Meu_a=Meu \n", + "k_poly_sol=Meu_a/(dux_dy)**(n-1) \n", + "Ry=10.0*(dux_dy)**n \n", + "#From equation 3.136:\n", + "#For a power-law fluid:\n", + "u2=((DP/(4*k_poly_sol*l))**3)*(n*(d**((n+1)/n)))/(2*(3*n+1)) \n", + "u1=(DP/(4*k*l))*(d**2)/8.0\n", + "ratio=u2/u1 \n", + "\n", + "#Result\n", + "print\"Ratio of the volumetric flow rates of the two liquids =\",round(ratio,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of the volumetric flow rates of the two liquids = 0.065\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examople no:3.12,Page no:129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n=0.5\n", + "du_dy=0.01\n", + "import sympy\n", + "mu=sympy.Symbol('mu')\n", + "\n", + "#Calculation\n", + "k=mu/(du_dy)**(n-1)\n", + "Ry=k*du_dy**(n-1)\n", + "#ux=(rho*g/k)**(1/n)*((s-y)**(n+1)/n)*(-n/(n+1)]+constant\n", + "#At the surface\n", + "y=0\n", + "ux=0\n", + "#At free surface:\n", + "#y=s\n", + "#us=(rho*g/k)**(1/n)*(n/(n+1))**(s*(n+1)/n)\n", + "s=sympy.Symbol('s')\n", + "sn=sympy.Symbol('sn')\n", + "#For non-newtonian:\n", + "us1=0.00592*sn**6/s**5\n", + "#For newtonian:\n", + "us2=0.0067*sn**5/s**4\n", + "sn_s=1/(us1/us2)\n", + "\n", + "#Result\n", + "print\" sN/s=\",round(sn_s*sn/s,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " sN/s= 1.132\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_4.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_4.ipynb new file mode 100755 index 00000000..98b6e823 --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_4.ipynb @@ -0,0 +1,331 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4:Flow of compressible Fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:4.1,Page no:150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=0.006 #Diameter of the cylinder\n", + "Gamma=1.47 \n", + "#The critical pressures ratio for discharge through the valve\n", + "C_r=(2/(Gamma+1))**(Gamma/(Gamma-1)) \n", + "#(i) Sonic velocity will occur until the\n", + "P_c=101.3/C_r #pressure at which sonic velocity will occur\n", + "M=29 #molecular mass of air\n", + "\n", + "\n", + "#Calculatiom\n", + "\n", + "%pylab inline\n", + "import numpy as np\n", + "import math\n", + "G=[0]*13\n", + "G2=[0]*11\n", + "P1a=[0.1,0.125,0.15,0.17,0.19,0.2,0.5,1.0,2.0,3.0,4.0,5.0,6.0]\n", + "for i in range(4,13):\n", + " G[i]=4.23e-2*P1a[i] \n", + "for j in range(0,4):\n", + " \n", + " G[j]=0.0314*(P1a[j])**0.286*math.sqrt((1.0-round(0.519*(P1a[j])**(-0.286),2)))\n", + "P2a=[0,1,2,2.65,3,3.5,4,4.5,4.9,4.95,5] \n", + "for j in range(4,11):\n", + " G2[j]=0.2548*P2a[j]**0.714*math.sqrt(1-0.631*P2a[j]**0.286) \n", + "\n", + "for i in range(0,4):\n", + " G2[i]=0.210 \n", + " \n", + "\n", + "#Result\n", + "print\"\\n\\n(i)...The discharge rate are plotted as:\"\n", + "print\"G vs P1a data:\"\n", + "print\"Above P1a=0.19 MN/m**2\"\n", + "print\"P1a(MN/m^2)\\tG(kg/s)\"\n", + "for z in range(4,13):\n", + " \n", + " print P1a[z],\"\\t\\t\",round(G[z],4)\n", + "print\"\\nBelow P1a=0.19 MN/m**2\"\n", + "print\"P1a(MN/m^2)\\tG(kg/s)\"\n", + "for w in range(0,5):\n", + " print P1a[w],\"\\t\\t\",round(G[w],4)\n", + "a=plt.plot(P1a,G) \n", + "plt.title('Rate of discharge of air vs Cylider Pressure\\n')\n", + "plt.xlabel('$Cylinder Pressure,P1a(MN/m**2$')\n", + "plt.ylabel('$Mass flow G (kg/s)$')\n", + "show(a)\n", + "print\"\\n\\n(ii)...The Values of G as a functio of P2a:\"\n", + "print\"P2a(MN/m^2)\\tG(kg/s)\"\n", + "print \"<0.265\",\"\\t\\t\",round(G2[3],4)\n", + "for w in range(4,10):\n", + " print P2a[w],\"\\t\\t\",round(G2[w],4)\n", + "print P2a[10],\"\\t\\t\",round(G2[10])\n", + "b=plt.plot(P2a,G2) \n", + "plt.annotate('G max', xy=(1,0.22), xytext=(1,0.22))\n", + "plt.title('Rate of discharge of air vs Downstream Pressure\\n')\n", + "plt.xlabel('$Downstream Pressure,P2a(MN/m**2)$')\n", + "plt.ylabel('$Mass flow rate G (kg/s)$')\n", + "\n", + "show(b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "\n", + "\n", + "(i)...The discharge rate are plotted as:\n", + "G vs P1a data:\n", + "Above P1a=0.19 MN/m**2\n", + "P1a(MN/m^2)\tG(kg/s)\n", + "0.19 \t\t0.008\n", + "0.2 \t\t0.0085\n", + "0.5 \t\t0.0211\n", + "1.0 \t\t0.0423\n", + "2.0 \t\t0.0846\n", + "3.0 \t\t0.1269\n", + "4.0 \t\t0.1692\n", + "5.0 \t\t0.2115\n", + "6.0 \t\t0.2538\n", + "\n", + "Below P1a=0.19 MN/m**2\n", + "P1a(MN/m^2)\tG(kg/s)\n", + "0.1 \t\t0.0\n", + "0.125 \t\t0.0042\n", + "0.15 \t\t0.0061\n", + "0.17 \t\t0.0071\n", + "0.19 \t\t0.008\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEuCAYAAAByL06RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVGX7wPHvILgjIiAooCSQg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Ojh49yp49ewxVJ9u3bze892+j\n8r8JMzw8nHbt2hEZGWnU/gHOnDlz21hLcu01yczMZP/+/QBUq1atWLn9+/fTvn17HBwcOH36NNbW\n1kDxqqZ/y/2beKytrWnZsiUXLlwwfB4bG0vz5s0Nr6/9vzpw4IDhS8DGjRvp3LkzR48eBbT2lLS0\nNNq2bUtycjIpKSnF4ivpc6UUK1euZOrUqRQWFvLrr78adU2E6UjSEHfFw8ODV155hUmTJvHNN9/w\n3Xff0atXL8MNrEmTJqxdu5Y///wTJycn3N3d2bNnD76+vhQWFtKwYUPy8vI4fvy4oT3D2tqa8+fP\n4+LiwvDhw9m+fTuhoaE0a9aM1NRUBg0axNGjR9m8eTNr1qzBxsaGhISEYnXwf/zxB4sWLeLChQsl\nVotcW7ak/TVs2JDq1avzww8/GHoQOTo63vCeq6sr69atw9LSkl9//ZUWLVoYtf/k5GRDT6Rdu3bd\nNPsauF0AAAFQSURBVNbs7GzmzJnDiRMnmDt3LtnZ2cWuibu7u6Gb7LVPJnv27GHq1Kls2rQJ0J4O\n2rRpw4IFCzh8+DB79uwB4LfffmP69Ols2bLFsO3QoUOLLUUbFhZWrAry2v+rY8eO0aVLF0BbQzsy\nMtKwDKqPjw9Tp04F4J133qFp06bFzq2kz7/66ivefvttHB0dcXR0LLHtR5iXrNwnys0333yDu7s7\nzs7O/PTTT1LdcJ3rb8Z369NPP2XUqFGGNqOy8vnnn1fILsrCPORJQ5QbV1dXsrKy+OOPP5g0aZK5\nw6lwynrk9ujRo1m7dm2Z7vOff/6RxmhRjDxpCFGF7N69m6ZNmxoGT96tNWvW0Ldv3wo7tkWYniQN\nIYQQRpPqKSGEEEaTpCGEEMJokjSEEEIYTZKGEEIIo0nSEEIIYTRJGkIIIYwmSUMIIYTRJGkIIYQw\n2v8BjZ9Dogvx6bMAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "(ii)...The Values of G as a functio of P2a:\n", + "P2a(MN/m^2)\tG(kg/s)\n", + "<0.265 \t\t0.21\n", + "3 \t\t0.2059\n", + "3.5 \t\t0.1942\n", + "4 \t\t0.1707\n", + "4.5 \t\t0.1288\n", + "4.9 \t\t0.0609\n", + "4.95 \t\t0.0439\n", + "5 \t\t0.0\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEuCAYAAAByL06RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8jNf+wPHPZBEJEUEW2UQWWWxBEoQQaqeKFlHrpaj+\nUN1u69620vZerd72dqOlauvVWlq1VAml0muPPbWvkYUQKpIg2+T8/phrGAkmkclE8n2/Xn01z8w5\nz/k+z4x8c855zvNolFIKIYQQwggW5g5ACCHE40OShhBCCKNJ0hBCCGE0SRpCCCGMJklDCCGE0SRp\nCCGEMJokjUpi5cqVeHp6Ym9vz6FDhx5aPioqinnz5gHw3Xff0b1791K3nZiYiIWFBYWFhaXeh7mU\n9Lzd7f3332fs2LEmikyICkoJozVo0EDZ2tqqmjVrKhcXFzVs2DB1/fp1o+ouWLBAtW/f3mSx+fj4\nqDVr1hhdPioqSs2bN69M2j537pzSaDRKq9WWyf7KU0nPW0Vw+3tob2+vateurSIiItTs2bNVYWGh\nuUNTSik1bdo0NWzYMHOHcV/Tpk1TVlZWqmbNmvrzt3PnTnOH9diQnkYJaDQa1q5dS1ZWFocOHeKP\nP/7gH//4h7nDQilFUlISwcHB5g7lkRUUFJRbW6Y8b6Y8jtvfw8zMTJKSknjjjTeYMWMGY8aMMVmb\nZUkphTLjmmKNRsOQIUPIysoiPT2d9u3bM2DAgGLLmrv3XJ7/HowlSaOUXFxc6NatG0eOHNG/9sEH\nH+Dn50etWrVo3Lgxq1atAuDYsWNMmDCBnTt3Ym9vT506dQDIzc3l1VdfpUGDBri6ujJhwgRycnKK\nbU8pxT/+8Q+8vb1xcXFh5MiRZG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ahB7t27d1LVr11ROTo5av369cnV1VUePHlU3\nb95UQ4cONTi+8jpvSim1ePFi9eeffyqtVqs+/vhj5erqqnJzc5VSSsXExOiHYW6fg5EjR6qbN2+q\nnJycIvt699131dChQ/Xba9euVcHBwUoppWbPnq2efPJJdevWLVVYWKj279+vMjMzi43J29tbbd68\nucjrXl5eavbs2UoppYYPH6769eunsrOzVWJiomrUqJH+8x4xYoT6+OOPlVJKjR07Vvn5+amvvvpK\nX+/2ZzNt2jRVvXp1tX79elVYWKimTp2q2rRpo5TSfS88PT31343z58/rz2NMTIzBOVZKqY4dO6oG\nDRqoo0ePKq1WqzIyMpSHh4dauHCh0mq16sCBA6pevXrq6NGjSiml4uLi1OHDh5VSSiUkJCgXFxe1\natUqg3M9YcIElZubqzZu3KiqVaum+vXrp9LT01VqaqpydnZWv//+e7Hn7+7hs5ycHPXqq6+qBg0a\nKKWUGjlypHJwcFA7duxQSil18+ZN1bJlS/Xee++p/Px8dfbsWeXj46M2bNiglFKqTZs2avHixUop\npW7cuKF279790M/z3s/vQd+jW7duqVWrVik/Pz91/PhxpdVq1T/+8Q8VERFR7LGVB0kaJdCgQQNV\ns2ZNZW9vrzQajerXr98Dx/FDQkLU6tWrlVJF5zQKCwtVjRo1DH5h7dixQzVs2LDYfXXu3Fn/D1sp\npU6cOKGsra317T/ol9+iRYtU27ZtDV7z8PAoNmls3rxZNWrUSO3atcvg2LRarbK1tVUJCQlF9n/7\ni56amqp/LTw8XC1durTYeD755BPVv39//bZGo1FbtmzRb//lL39Rf/vb3/Tbp0+f1h9feZ634jg6\nOurPwd2/fG6fg3Pnzt237unTp5W9vb26deuWUkqpZ599Vr333ntKKaXmz5+vIiIiij2/97pf0mjT\npo2aPn26KigoUNWqVVPHjh3TvzdnzhwVFRWllNIl0r59+yqllAoKClLz5s1T0dHRSindd/zAgQP6\n4+vatat+H0eOHFG2trZKKaVOnTqlnJ2d1aZNm1ReXp5BHMXNaURFRalp06bpt5cuXaoiIyMNyowb\nN87g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IYQw2v8DMw/BuCR3ro4AAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:4.2,Page no:167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l=30 #Length of the tube\n", + "d=150e-3 #Diameter of the tube\n", + "P1=0.4e3 #Initial Pressure\n", + "P2=0.13e3 #final Pressure\n", + "X=0.003 \n", + "Y=0.005 \n", + "v1=21.15e1 \n", + "\n", + "#Calculation\n", + "import math\n", + "import sympy\n", + "G_A=sympy.Symbol('G_A') \n", + "f=(G_A**2*math.log(P1/P2))+((P2**2-P1**2)/(2*P1*v1))+(4*(Y*l/d)*G_A**2) \n", + "A=sympy.solve(f) \n", + "\n", + "#Result\n", + "print\"The approximate flow rate =\",round(A[1],2),\"kg/m**2 s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The approximate flow rate = 0.41 kg/m**2 s\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:4.3,Page no:168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q=50.0 #volumetric flow rate of methane\n", + "P=101.3e3 #Given Pressure\n", + "T1=288.0 #Given Temperature\n", + "d=0.6 #Diameter of pipeline\n", + "l=3e3 #length of the pipe line\n", + "R_R=0.0001 #Relative roughness\n", + "P2=1.7*10**5 #Pressure at which methane is to be discharged\n", + "T2=297.0 #Temperature at which methane leaves the compressor\n", + "M=16.0 #molecular mass of methane\n", + "R=8314.0 #Gas constant\n", + "Meu=1e-5 #Viscosity of methane at 293 K\n", + "\n", + "#Calculation\n", + "import math\n", + "from scipy.optimize import fsolve\n", + "T=(T1+T2)/2.0 #Mean temperature\n", + "P1_v1=R*T/(M) \n", + "#At 288 K and 101.3 kN/m**2\n", + "v=P1_v1/P*T1/T \n", + "G=Q/v #Mass flow rate of methane\n", + "A=math.pi/4*d**2 #cross sectional area of pipeline\n", + "G_A=G/A\n", + "Re=G_A*d/Meu \n", + "#Y=R/(rho*u**2) = 0.0015\n", + "Y=0.0015 #(from fig 3.7)\n", + "#The upstream pressure is calculated using equation 4.55:\n", + "def pressure(P1):\n", + " return((G_A**2)*math.log(P1/P2)+(P2**2-P1**2)/(2*P1_v1)+4*Y*(l/d)*G_A**2)\n", + "#P1 = 1e5 \n", + "z = fsolve(pressure,100000) \n", + "\n", + "#Result\n", + "print\"Pressure to developed at the compressor in order to achieve this flowrate =%.3e\"%z,\"N/m**2\" \n", + "print\"NOTE:Approx answer is given in book\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure to developed at the compressor in order to achieve this flowrate =4.042e+05 N/m**2\n", + "NOTE:Approx answer is given in book\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:4.4,Page no:176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A1=0.007 #cross sectional area of stack pipe\n", + "A2=4000e-6 #flow area of ruptured disc\n", + "P1=10e6 #Pressure of the gas in the vessel\n", + "Gamma=1.4 \n", + "M=40 #mean molecular weight of gas\n", + "\n", + "#Calculation\n", + "import math\n", + "w_c=(2/(Gamma+1))**(Gamma/(Gamma-1)) \n", + "w_c=round(w_c,2)\n", + "\n", + "V1=(22.4/M)*(500.0/273.0)*(101.3e3/P1) #Specific volume of the gas in the reactor\n", + "V=V1*(1/w_c)**(1/Gamma) #Specific volume of gas at the throat\n", + "u=math.sqrt(Gamma*5.3e6*V) #velocity at the throat\n", + "G=u*A2/V #initial rate of discharge\n", + "#obtaining the equations as given in book and solving for 'w' we get\n", + "w=0.0057 #Pressure ratio\n", + "P_u=P1*w \n", + "Mach_no=2.23*(w**(-0.29)-1)**0.5 \n", + "P_s=56.3*w*(w**(-0.29)-1)*1e6 \n", + "\n", + "\n", + "#Result\n", + "print\"(a)Initial rate of discharge of gas =\",round(G,1),\"kg/s\"\n", + "print\"(b)The pressure upstream from the shockwave =\",P_u/1000.0,\"kN/m**2\"\n", + "print\"The mach number is =\",round(Mach_no,2)\n", + "print\"(c)The pressure downstream from the shockwave =\",P_s/1000,\"kN/m**2\"\n", + "print\"NOTE:Mismatched answer due to very approximate value of v1 taken in book\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Initial rate of discharge of gas = 85.2 kg/s\n", + "(b)The pressure upstream from the shockwave = 57.0 kN/m**2\n", + "The mach number is = 4.16\n", + "(c)The pressure downstream from the shockwave = 1115.17300403 kN/m**2\n", + "NOTE:Mismatched answer due to very approximate value of v1 taken in book\n" + ] + } + ], + "prompt_number": 133 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_5.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_5.ipynb new file mode 100755 index 00000000..a3e9b8cf --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_5.ipynb @@ -0,0 +1,195 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5:Flow of Multiphase Mixtures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:5.1,Page no:190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "id=75e-3 # internal diameter of pipe\n", + "f_r_s=0.05 # Flow rate of steam in (kg/s)\n", + "f_r_w=1.5 # Flow rate of water in (kg/s)\n", + "T=330 # Mean Temperature\n", + "P=120 # Mean Pressure drop\n", + "\n", + "#Calculation\n", + "import math\n", + "area=math.pi*id**2/4.0 # Cross-sectional area for flow\n", + "f_r_w_m3s=f_r_w/1000.0 # Flow of water\n", + "wtr_vel=f_r_w_m3s/area #Water velocity\n", + "rho_steam=18*273*120.0/(22.4*330.0*101.3) # density of steam at 330 K and 120 kN/m**2\n", + "f_r_s_m3s=f_r_s/rho_steam #Flow of Steam\n", + "steam_vel=f_r_s_m3s/area #Steam velocity\n", + "meu_steam=0.0113e-3 \n", + "meu_water=0.52e-3 \n", + "Rel=id*wtr_vel*1000/meu_water \n", + "Reg=id*steam_vel*rho_steam/meu_steam \n", + "DPl=4*0.0025*(1000*wtr_vel**2)/id \n", + "DPg=4*0.0022*(rho_steam*steam_vel**2)/id \n", + "X=(DPl/DPg)**0.5 \n", + "phi_l=4.35 \n", + "phi_g=3.95 \n", + "DP_tpf=phi_g**2*DPg/1000 \n", + "\n", + "#Result\n", + "print\"Pressure drop per unit length of pipe =\",round(DP_tpf,3),\"kN/m**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure drop per unit length of pipe = 0.298 kN/m**2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:5.2,Page no:212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_p_d=0.2e-3 # Mean particle diameter\n", + "f_r_w=0.5 #Flow rate of water\n", + "id=25e-3 #Diameter of pipe\n", + "l=100 #length of pipe\n", + "t_vel=0.0239 #Terminal velocity of falling sand particles\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "import sympy\n", + "Um=f_r_w/(1000*math.pi*id**2/4) \n", + "Re=id*Um*1000/0.001 \n", + "#Assuming e/d = 0.008, then, from Figure 3.7:\n", + "phi=0.0046 \n", + "f=0.0092 \n", + "#From, equation 3.20, the head loss is:\n", + "hf=4*phi*l*Um**2/(9.81*id) \n", + "iw=hf/l \n", + "i=300*1000/(1000*9.81*100) \n", + "# Substituting in equation 5.20:\n", + "C=(iw/(i-iw)*(1100*9.81*id*(2.6-1)*t_vel)/(Um**2*Um))**-1 \n", + "#If G kg/s is the mass flow of sand, then:\n", + "G=sympy.Symbol('G') \n", + "p=sympy.solve(2600**-1*G-0.30*(2600**-1*G+.0005))\n", + "\n", + "#Result\n", + "print\"\\n Mass flow of sand =\",round(p[0],2),\"kg/s=\",round(p[0]*3600.0/1000.0),\"tonne/h\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Mass flow of sand = 0.56 kg/s= 2.0 tonne/h\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:5.3,Page no:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "p_s=1.25e-3 # Particle size of sand\n", + "rho_sand=2600.0 #Density of sand\n", + "flow_sand=1.0 #flow rate of sand in air\n", + "l=200.0 #length of pipe\n", + "d=100e-3 # taking nearest standard size of pipe\n", + "Uo=4.7 \n", + "Ug=30.0\n", + "Meu_air=1.7e-5 # viscosity of air\n", + "rho_air=1 # Density of air\n", + "\n", + "#Calculation\n", + "import math\n", + "flow_air=flow_sand/5.0 \n", + "vol_flow_air=1*flow_air \n", + "area=flow_air/Ug\n", + "pipe_dia=math.sqrt(4*area/math.pi)\n", + "Ug=flow_air/(math.pi*(0.1**2)/4.0)\n", + "Ug=round(Ug,1)\n", + "Us=Ug-(Uo/(0.468+(7.25*(Uo/rho_sand)**0.5))) \n", + "\n", + "Re=(d*Ug*rho_air/Meu_air) \n", + "phi=0.004 \n", + "DP_air=(4*phi*l/d)*rho_air*Ug**2/2.0 \n", + "DP_x=2805.0*DP_air/(Uo*Us**2) \n", + "DP=DP_air+DP_x \n", + "\n", + "#Result\n", + "print\"Volumetric flow rate of air =\",vol_flow_air,\"m**3/s\" \n", + "print\"The cross-sectional area of a 100 mm ID. pipe =\",round(pipe_dia*1000),\"mm\\nThe nearest stand size is 100 mm\"\n", + "print\"Pressure drop due to air =\",round(DP_air/1000,1),\"kN/m**2\"\n", + "print\"Pressure drop due to sand particles =\",round(DP_x/1000,1),\"kN/m**2\"\n", + "print\"The total pressure drop =\",round(DP/1000,1),\"kN/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric flow rate of air = 0.2 m**3/s\n", + "The cross-sectional area of a 100 mm ID. pipe = 92.0 mm\n", + "The nearest stand size is 100 mm\n", + "Pressure drop due to air = 10.4 kN/m**2\n", + "Pressure drop due to sand particles = 16.4 kN/m**2\n", + "The total pressure drop = 26.8 kN/m**2\n" + ] + } + ], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_6.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_6.ipynb new file mode 100755 index 00000000..cefa9c67 --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_6.ipynb @@ -0,0 +1,275 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6:Flow and Pressure Measurement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:6.1,Page no:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d_o=25e-3 #Diameter of orifice\n", + "d_p=75e-3 #Diameter of pipe\n", + "flow_o=300e-6 #Flow rate through pipe\n", + "Meu_watr=1e-3 #Viscosity of water\n", + "\n", + "#Calculation\n", + "import math\n", + "import sympy\n", + "area_o=math.pi/4*d_o**2 #Area of orifice\n", + "vel_o=flow_o/area_o #Velocity of water through the orifice\n", + "Re_o=d_o*vel_o*1000/Meu_watr #Re at the orifice\n", + "Cd=0.61 \n", + "G=flow_o*1e3 #mass flow rate water\n", + "ho=sympy.Symbol('ho') \n", + "p=sympy.solve(G**2-((Cd*area_o*1000)**2*2*9.81*ho))\n", + "\n", + "#Result\n", + "print\"Difference in level on a water manometer =\",round(p[0]*1000),\"mm of water\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in level on a water manometer = 51.0 mm of water\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:6.2,Page no:253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "rho_sul=1300.0 #Density of sulphuric acid\n", + "id=50e-3 #Internal diameter of pipe\n", + "d_o=10e-3 #Diameter of orifice\n", + "h=.1 #Differential pressure shown on a mercury manometer\n", + "Cd=0.61 #Coeffecient of discharge\n", + "rho_merc=13550.0 #Density of mercury\n", + "rho_watr=1000.0 #Density of water\n", + "\n", + "#Calculation\n", + "area_o=math.pi/4*d_o**2 #area of orifice\n", + "h_sul=h*(rho_merc-rho_sul)/rho_sul \n", + "G_sul=Cd*area_o*rho_sul*(2*9.81*h_sul)**0.5 \n", + "DP=rho_sul*9.81*h_sul \n", + "\n", + "#Result\n", + "print\"(a).The mass flow rate of acid =\",round(G_sul,3),\"kg/s\"\n", + "print\"(b).The drop in pressure =\",round(DP/1000),\"kN/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a).The mass flow rate of acid = 0.268 kg/s\n", + "(b).The drop in pressure = 12.0 kN/m**2\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:6.3,Page no:256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=150e-3 #Diameter of pipe\n", + "d_t=50e-3 #Throat diameter\n", + "hv=121e-3 #Pressure drop over the converging section\n", + "G=2.91 #Mass Flow rate of water\n", + "\n", + "#Calculation\n", + "import math\n", + "A1=math.pi*d**2/4.0 \n", + "A2=math.pi*d_t**2/4.0 \n", + "Cd=G*math.sqrt(A1**2-A2**2)/(1000*A1*A2*math.sqrt(2*9.8*hv)) \n", + "\n", + "#Result\n", + "print\"Coefficient for the converging cone of the meter at given flowrate =\",round(Cd,2),\"(Approx)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient for the converging cone of the meter at given flowrate = 0.96 (Approx)\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:6.4,Page no:261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l=0.3 #length of tube\n", + "id_t=25e-3 #Top internal diameter of tube\n", + "id_b=20e-3 #Bottom internal diameter of tube\n", + "d_f=20e-3 #Diameter of float\n", + "v_f=6e-6 #Volume of float\n", + "Cd=0.7 #Coefficient of discharge\n", + "rho=1000 #Density of water\n", + "rho_f=4800 #Density of float\n", + "\n", + "#Calculation\n", + "import math\n", + "area_t=math.pi/4.0*id_t**2 #Cross-sectional area at top of tube\n", + "area_b=math.pi/4.0*id_b**2 #Cross-sectional area at bottom of tube\n", + "A_f=math.pi/4.0*d_f**2 #Area of float\n", + "A1=math.pi/4.0*((id_t+id_b)/2)**2 \n", + "A2=A1-A_f \n", + "G=Cd*A2*math.sqrt((2*9.81*v_f*(rho_f-rho)*rho)/(A_f*(1-(A2/A1)**2)))\n", + "\n", + "#Result\n", + "print\"The flow rate of water =\",round(G,3),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The flow rate of water = 0.071 kg/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:6.5,Page no:262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "L=0.5 # Length of the weir\n", + "D=100e-3 #Height of water over the weir\n", + "n=0 \n", + "\n", + "#Calculation\n", + "#Using Francis formula:\n", + "Q=1.84*(L-(0.1*n*D))*D**1.5 \n", + "\n", + "#Result\n", + "print\"Volumetric flowrate of water =\",round(Q,2),\"m**3/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric flowrate of water = 0.03 m**3/s\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:6.6,Page no:263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "G=15.0 #Mass flow rate of organic liquid\n", + "L_ow=2.0 #Length of the weir\n", + "rho_l=650.0 \n", + "\n", + "#Calculation\n", + "Q=G/rho_l\n", + "Q=round(Q,3)\n", + "#Use is made of the Francis formula (equation 6.43),\n", + "h_ow=(2.0/3.0)*(Q/L_ow)**(2.0/3.0) \n", + "\n", + "#Result\n", + "print\"Height of liquid flowing over the weir =%d\"%(h_ow*1000),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of liquid flowing over the weir =33 mm\n" + ] + } + ], + "prompt_number": 42 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_7.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_7.ipynb new file mode 100755 index 00000000..9ef97b4d --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_7.ipynb @@ -0,0 +1,130 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7:Liquid Mixing" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:7.2,Page no:286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "rho_sol=1650 #Density of the solution\n", + "Meu_sol=50e-3 #Viscosity of the solution\n", + "Dt=2.28 #Density of the tank\n", + "D=0.5 #Diameter of the propeller mixer\n", + "H=2.28 #Liquid depth\n", + "Za=0.5 #Height of the propeller\n", + "N=2 #Rotational speed\n", + "\n", + "#Calculation\n", + "Re=D**2*N*rho_sol/(Meu_sol) \n", + "Fr=N**2*D/9.81 \n", + "#From figure 7.6\n", + "Np=0.5 \n", + "P=Np*rho_sol*N**3*D**5 \n", + "\n", + "#Result\n", + "print\"Power provided by propeller to the liquid =\",round(P),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power provided by propeller to the liquid = 206.0 W\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:7.3,Page no:286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=0.6 #tank diameter\n", + "N1=4.0 #Rotor dpeed in Hertz\n", + "P1=0.15 #Power consumption\n", + "Re1=160000 #Reynold's number\n", + "D1=d/3.0 \n", + "\n", + "#Calculation\n", + "import math\n", + "D2=6*D1 \n", + "N2=math.pi*N1*D1/(math.pi*D2) \n", + "P2=7.32*N2**3*D2**5 \n", + "#For thermal similarity, that is the same temperature in both systems:\n", + "Re2=Re1*(N2*D2**2/(N1*D1**2)) \n", + "V2=(math.pi/4.0)*(6*d)**3 \n", + "P=V2*0.884 \n", + "N=(P/(7.32*(6*0.6/3.0)**5))**(1.0/3.0) \n", + "Re=Re1*(N*D2**2/(N1*D1**2)) \n", + "\n", + "#Result\n", + "print\"The new rotor speed =\",round(N2,2),\"Hz\"\n", + "print\"The new power required =\",round(P2,2),\"kW\" \n", + "print\"The new reynolds number =\",Re2\n", + "print\"\\n\\n For Constant power input per unit volume:\"\n", + "print\"The new power required =\",round(P,1),\"kW\" \n", + "print\"The new rotor speed =\",round(N,2),\"Hz\" \n", + "print\"The new reynolds number =%d\"%Re\n", + "\n", + "print\"NOTE:Wrong values of Reynolds numbers in book\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new rotor speed = 0.67 Hz\n", + "The new power required = 5.4 kW\n", + "The new reynolds number = 960000.0\n", + "\n", + "\n", + " For Constant power input per unit volume:\n", + "The new power required = 32.4 kW\n", + "The new rotor speed = 1.21 Hz\n", + "The new reynolds number =1744643\n", + "NOTE:Wrong values of Reynolds numbers in book\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_8.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_8.ipynb new file mode 100755 index 00000000..674da5bb --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_8.ipynb @@ -0,0 +1,514 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8:Pumping of Fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.1,Page no:320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "dia_cy=110e-3 #Cylinder diameter\n", + "stro=230e-3 #stroke\n", + "l_su=6 #Suction line length\n", + "d_su=50e-3 #Suction line diameter\n", + "lvl_wtr=3 #level of the water in the suction tank\n", + "atm_P=10.36 \n", + "head=1.2 #m water\n", + "\n", + "#Calculation\n", + "import sympy\n", + "import math\n", + "N=sympy.Symbol('N') #Maximum speed \n", + "ang_vel=2*math.pi*N #Angular velocity in rad/s\n", + "#at\n", + "t=0 #Initially\n", + "max_acc=0.5*stro*(2*math.pi*N)**2*math.cos(2*math.pi*N*t) #Maximum acceleration\n", + "max_2=(dia_cy/d_su)**2*max_acc #Maximum acceleration of liquid in suction pipe\n", + "acc_F=max_2*(math.pi/4.0)*d_su**2*l_su*1000 #Accelerating force on the liquid[ N]\n", + "P=max_2*l_su*1000 #Pressure drop in suction line N/m**2\n", + "P=P/(1000*9.81) #in m water\n", + "n=sympy.solve(head-atm_P+lvl_wtr+P) #speed\n", + "\n", + "#Result\n", + "print\"Maximum speed at which the pump can run =\",round(n[1],3),\"Hz\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum speed at which the pump can run = 0.677 Hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.2,Page no:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "rho_l=800 #Density of liquid\n", + "Meu_l=0.5e-3 #Viscosity of liquid\n", + "Q=0.0004 #Volumetric flow rate\n", + "liq_depth=0.07 \n", + "d=25e-3 #Diameter of pipe used\n", + "p_v_r=1e3 #Pressure of vapor in reboiler\n", + "Z=2 #Net Positive Suction Head\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi/4*d**2 #Cross sectional area of pipe\n", + "u=Q/A #Velocity in pipe\n", + "Re=d*u*rho_l/Meu_l #Reynolds no.\n", + "phi=0.0028 \n", + "hf_l=(4*phi*u**2)/(d*9.81) \n", + "l=10 \n", + "hf=hf_l*l \n", + "ho=Z+hf \n", + "\n", + "#Result\n", + "print\"The minimum height required =\",round(ho,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum height required = 2.3 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.3,Page no:356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q=0.1 #Flow rate of air suppplied by compressor\n", + "T=273 #Temperature\n", + "P=101.3e3 #Pressure\n", + "P2=380e3 #Air compressed to a pressure\n", + "T2=289 #Suction Temperature\n", + "l=0.25 #Length of the stroke\n", + "u=4 #Speed\n", + "c=4/100.0 #Cylinder clearance\n", + "Gamma=1.4 \n", + "\n", + "#Calculation\n", + "import math\n", + "V=Q*T2/(u*T) #Volume per stroke\n", + "R=P2/P #Compression ratio\n", + "Vs=V/(1+c-(c*(R)**(1/Gamma))) \n", + "A=Vs/l #Cross sectional Area of cylinder\n", + "d=(A/math.pi*4)**0.5 #Diameter of cylinder\n", + "W=P*V*(Gamma/(Gamma-1))*((R)**((Gamma-1)/Gamma)-1) \n", + "\n", + "#Result\n", + "print\"\\n Diameter of cylinder =\",round(d,2),\"m\"\n", + "print\"\\n Theoretical power requirements =\",round(W*4/1e3,1),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Diameter of cylinder = 0.38 m\n", + "\n", + " Theoretical power requirements = 17.2 kW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.4,Page no:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T=290 #Temperature at which compression takes place\n", + "P1=101.3e3 #Initial pressure\n", + "P2=2065e3 #Final pressure\n", + "eta=0.85 #Mechanical efficiecy\n", + "c1=4/100.0 #Clearance in cylinder 1\n", + "c2=5/100.0 #Clearance in cylinder 1\n", + "\n", + "#calculation\n", + "import math\n", + "R=P2/P1 #Overall compression ratio\n", + "V_spe=22.4/28.8*T/273.0 #Specific volume of air at 290 K\n", + "W=P1*V_spe*2*(1.25/(1.25-1))*(R**.1-1) \n", + "W_act=W/0.85 \n", + "W_it=P1*V_spe*math.log(R) \n", + "eta_it=100*W_it/W_act \n", + "Gamma=1.4 \n", + "W_ie=P1*V_spe*(Gamma/(Gamma-1))*((R)**((Gamma-1)/Gamma)-1) \n", + "eta_ie=100*W_ie/W_act \n", + "Vs1=V_spe/(1+c1-(c1*(R)**(1/(2*2.5)))) \n", + "Vs2=V_spe*(1/R)**0.5/(1+c2-(c2*(R)**(1/(2*2.5)))) \n", + "ratio=Vs1/Vs2 \n", + "\n", + "#Result\n", + "print\"(a).Energy supplied to the compressor, that is the work of compression =\",round(W_act*1e-3,1),\"kJ/kg\"\n", + "print\"(b).Isothermal efficiency =\",round(eta_it),\"%\"\n", + "print\"(c).Isentropic efficiency =\",round(eta_ie),\"%\"\n", + "print\"(d).The ratio of the swept volumes in the two cylinders =\",round(ratio,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a).Energy supplied to the compressor, that is the work of compression = 346.5 kJ/kg\n", + "(b).Isothermal efficiency = 73.0 %\n", + "(c).Isentropic efficiency = 116.0 %\n", + "(d).The ratio of the swept volumes in the two cylinders = 4.48\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.5,Page no:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q_l=7.5e-4 \n", + "rho_l=1200.0 \n", + "h=20.0 \n", + "P=450e3 \n", + "eta=30.0/100.0 \n", + "P_atm=101.3e3 \n", + "Gamma=1.4 \n", + "G=Q_l*rho_l #Mass flow of liquid\n", + "W=G*9.81*h \n", + "W_act=W/eta \n", + "M=28.9 \n", + "va=22.4/M \n", + "\n", + "#Calculation\n", + "import sympy\n", + "import math\n", + "x=sympy.Symbol('x') \n", + "Ga=sympy.solve(P_atm*va*x*math.log(P/P_atm)-W_act) \n", + "Q=Ga[0]*va \n", + "Power=(P_atm*Q)*(Gamma/(Gamma-1))*((P/P_atm)**((Gamma-1)/Gamma)-1) \n", + "Power_reqd=Power/1000 \n", + "\n", + "#Result\n", + "print\"Power requirement of the pump =\",round(Power_reqd,3),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power requirement of the pump = 0.734 kW\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.6,Page no:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "P1=101.3e3 \n", + "Q_watr=0.01 \n", + "depth=100 \n", + "d=100e-3 \n", + "depth_watr=40 \n", + "Q_air=0.1 \n", + "P2=800e3 \n", + "Gamma=1.4 \n", + "#V1=Q_air \n", + "\n", + "#Calculation\n", + "G_watr=Q_watr*1000 #Mass flow of water\n", + "W=G_watr*depth_watr*9.81 \n", + "E=P1*Q_air*(1.4/0.4)*((P2/P1)**(0.4/1.4)-1) # equation 8.37\n", + "effi=W/E*100 \n", + "P=345e3 \n", + "v1=8314*273/(29*P) \n", + "v2=8314*273/(29*P1) \n", + "G_air=Q_air/v2 #mass flowrate of the air is:\n", + "Q_mean=G_air*v1 #Mean volumetric flowrate of air\n", + "Q_tot=Q_watr+Q_mean #Total volumetric flowrate\n", + "A=math.pi/4*d**2 #Area of pipe\n", + "v_mean=Q_tot/A \n", + "\n", + "#Result\n", + "print\"Efficiency =\",round(effi,1),\"%\"\n", + "print\"Mean velocity of the mixture =\",round(v_mean,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency = 13.8 %\n", + "Mean velocity of the mixture = 5.01 m/s\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.7,Page no:369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=40e-3 #Internal Diameter of the pipe\n", + "l_p=150.0 #Lendth of pipe\n", + "Q_watr=600e-6 #Flow of water\n", + "h1=10.0 #Vertical Height\n", + "h2=2.0 #head lost across heat exchanger\n", + "eta=60.0/100.0 #Efficiency of pump\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "A=math.pi/4*d**2 #Area for flow\n", + "u=Q_watr/A #Velocity\n", + "#At 320 K,\n", + "Meu=0.65e-3 \n", + "rho=1000 \n", + "Re=d*u*rho/Meu \n", + "phi=0.004 #for a relative roughness of 0.005\n", + "l=l_p+h1+(260*d) \n", + "hf=4*phi*l*u**2/(d*9.81) \n", + "h_tot=hf+h1+h2 #Total head to be developed\n", + "G=Q_watr*rho # Mass flow of water\n", + "P_r=G*h_tot*9.81 #Power Required\n", + "P_s=P_r/eta #Power Supplied\n", + "\n", + "#Result\n", + "print\"Power Required =\",round(P_s,2),\"W\"\n", + "print\"NOTE:Very Approximate answer in book\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power Required = 133.26 W\n", + "NOTE:Very Approximate answer in book\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.8,Page no:370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "%pylab inline\n", + "eta=0.50 \n", + "Q=[0.0028,0.0039,0.0050,0.0056,0.0059]\n", + "h=[23.2,21.3,18.9,15.2,11.0]\n", + "Q1=linspace(0.0015,0.0060,42)\n", + "h1=10+2.205e5*Q1**2 \n", + "plot(Q,h,label=\"Pump Characteristics\") \n", + "plot(Q1,h1,label=\"h=10+2.205e5*Q**2\") \n", + "plt.ylim(0,30)\n", + "plt.xlim(0.0005,0.006)\n", + "title(\"Data for Example 8.8\")\n", + "plt.xlabel(\"$Discharge (Q m**3/s)$\")\n", + "plt.ylabel(\"$Head (m water)$\") \n", + "legend() \n", + "#showing the intersection point\n", + "x1=[0,0.0054] \n", + "y1=[16.43,16.43] \n", + "x2=[0.0054,0.0054] \n", + "y2=[0,16.43] \n", + "#plot(x1,y1,x2,y2) \n", + "Q_r=0.0054 \n", + "h_r=10+2.205e5*Q_r**2 \n", + "P=Q_r*1000*h_r*9.81/eta \n", + "\n", + "#Result\n", + "show()\n", + "print\"\\n The discharge at the point of intersection between\\n the purnp characteristic equation =\",Q_r,\"m**3/s\"\n", + "print\"\\n Power required=\",round(P*1e-3,2),\"kW\"" + ], + "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": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEfCAYAAAC5/EqkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYk+f6B/Bv2MreIAGZCsh0oKBg0OIWt1YLiNqhp/1Z\na08dtSp2qLXanlbb6nFirdbRKhatVSlYHAxFREFRkT0FGUFGGM/vjxxSoyBEyQDvz3XlguRd9xNj\nvjzv8w4OY4yBEEIIkYCSvAsghBDS9VB4EEIIkRiFByGEEIlReBBCCJEYhQchhBCJUXgQQgiRGIUH\n6XYuXboEBwcHaGtr4+TJk/IuRyaysrKgpKSE5uZmeZdCXhEUHqRTWVtbo2fPntDR0YG+vj6GDh2K\nHTt2oKOnE3XGl+C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uN1uyuUyo6OjzM7OcnZ2xvz8\nPJZlUSqV6HQ6RCIRDMPoXz8cDpPP54nFYu+6i8/mpqam6HQ63NzcUK/X2dvbwzAMjo+PWVlZ6YdD\nq9X6sH9vZzCLi4vDeuTyy+lPgiID1Go1TNOk2Wyys7NDKpUauC6ZTLKxsYHH43k33uv1WF9fZ21t\njYmJCUKh0DDKHujg4ICtra0v15TLZSqVCqurq0OqSn479akiA+zu7pLNZkmlUnzVnG9ubpLJZD6M\nu1wubm9vOTw8/NHgqFarWJb17brz83Oi0egQKpL/hToPkb90eXmJz+frn7n8S46OjlheXmZsbOzT\nNXd3d7y8vDAzMzPEyuS3U3iIiIhj+mwlIiKOKTxERMQxhYeIiDim8BAREccUHiIi4pjCQ0REHFN4\niIiIYwoPERFx7BUCFALyNJcm+AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The discharge at the point of intersection between\n", + " the purnp characteristic equation = 0.0054 m**3/s\n", + "\n", + " Power required= 1.74 kW\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:8.10,Page no:375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Meu_H2=0.009e-3 #Viscosity of hydrogen\n", + "P2=2e6 #Downstream Pressure\n", + "P1=2.5e6 #Upstream pressure\n", + "P_m=(P1+P2)/2 #Mean Pressure\n", + "T=295.0 #Temperature of the gas\n", + "l=500.0 #Length of the pipe used\n", + "d=50e-3 #diameter of pipe used\n", + "\n", + "#Calculation\n", + "rho_H2=2*P_m*273.0/(22.4*101.3e3*T) #Density of hydrogen at the mean pressure\n", + "A=math.pi*d**2/4.0 #Area of the pipe\n", + "eta=0.60 #Efficiency of the pump\n", + "v_m=1/rho_H2 \n", + "phi=0.0024 \n", + "x=sympy.Symbol('x') \n", + "G=sympy.solve((x/A)**2*math.log(P1/P2)+(P2-P1)*rho_H2+4*phi*l/d*(x/A)**2) \n", + "P=round(G[1],1)*P_m*v_m*math.log(P1/P2)/eta \n", + "\n", + "#Result\n", + "print\"Mass flow rate =\",round(G[1],1),\"kg/s\"\n", + "print\"Power required =\",round(P*1e-3,2),\"kW(approx)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate = 0.2 kg/s\n", + "Power required = 91.19 kW(approx)\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_9.ipynb b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_9.ipynb new file mode 100755 index 00000000..622118d5 --- /dev/null +++ b/Chemical_Engineering-Fluid_Flow,Heat_Transfer_And_Mass_Transfer_Vol-1_/Chapter_9.ipynb @@ -0,0 +1,1874 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9:Heat Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.1,Page no:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_dot1=20 #rate of mass to be cooled\n", + "M_dot2=25 #rate of cooling water\n", + "Cp=4.18e3 #Heat capacity\n", + "T1=360 #Initial temp.\n", + "T2=340 #Final temp.\n", + "theta_1=300 #Temperature of cooing water entering\n", + "U=2e3 #Overall heat transfer coefficient\n", + "\n", + "#Calculation\n", + "import sympy\n", + "import math\n", + "Q=M_dot1*Cp*(T1-T2) #Heat load\n", + "x=sympy.Symbol('x') \n", + "theta_2=sympy.solve(Q-(M_dot2*Cp*(x-300)))\n", + "theta_m1=((T1-theta_2[0])-(T2-theta_1))/(math.log((T1-theta_2[0])/(T2-theta_1))) \n", + "A1=Q/(U*theta_m1)\n", + "theta_m2=((T1-theta_1)-(T2-theta_2[0]))/(math.log((T1-theta_1)/(T2-theta_2[0]))) \n", + "A2=Q/(U*theta_m2)\n", + "\n", + "#Result\n", + "print\"(a).In counter flow,The surface area required\",round(A1,2),\"m**2\"\n", + "print\"(b).In cocurrent flow,The surface area required\",round(A2,2),\"m**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a).In counter flow,The surface area required 19.92 m**2\n", + "(b).In cocurrent flow,The surface area required 21.28 m**2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.2,Page no:390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "dx=0.5 #Thickness of wall\n", + "T1=400 #Temperartue of inner surface\n", + "T2=300 #Temperature of outer surface\n", + "K=0.7 #Thermal conductivity\n", + "A=1 #Area of heat transfer\n", + "\n", + "#Calculation\n", + "#From equation 9.12:\n", + "Q=K*A*(T1-T2)/dx \n", + "\n", + "#Result\n", + "print\"The heat loss per square metre of surface =\",Q,\"W/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss per square metre of surface = 140.0 W/m**2\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.3,Page no:391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "dx1=0.20 #thickness of firebrick\n", + "dx2=0.10 #thickness of insulating brick\n", + "dx3=0.20 #thickness of building brick\n", + "k1=1.4 #Thermal conductivity of firebrick\n", + "k2=0.21 #Thermal conductivity of insulating brick\n", + "k3=0.7 #Thermal conductivity of building brick\n", + "T1=1200 #Temperature at junction 1\n", + "T4=330 #Temperature at junction 4\n", + "\n", + "#Calculation\n", + "Q=(T1-T4)/((dx1/k1)+(dx2/k2)+(dx3/k3)) \n", + "#The ratio (Temperature drop over firebrick)/(Total temperature drop)\n", + "R=(dx1/k1)/((dx1/k1)+(dx2/k2)+(dx3/k3)) \n", + "#Temperature drop over firebrick \n", + "dT=(T1-T4)*R \n", + "T2=(T1-dT) \n", + "\n", + "#Result\n", + "print\"\\n Heat loss per unit area =%d\"%Q,\"W/m**2\"\n", + "print\"\\n Temperature drop over firebrick =%d\"%dT,\"K\"\n", + "print\"\\n The temperature at the firebrick-insulating brick interface =\",round(T2),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Heat loss per unit area =961 W/m**2\n", + "\n", + " Temperature drop over firebrick =137 K\n", + "\n", + " The temperature at the firebrick-insulating brick interface = 1063.0 K\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.4,Page no:398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T=295 #initial temperature of surfaces\n", + "T2f=375 #Final temperature of far surface\n", + "dT1=900 #Temperature of near face raised\n", + "\n", + "#Calculation\n", + "import sympy\n", + "R=(T2f-T)/(2*(dT1-T)) #ratio of theta to twice of theta dash\n", + "x=sympy.Symbol('x') \n", + "t=sympy.solve((1.30**2*x)-346**2) \n", + "\n", + "#Result\n", + "print\"Time taken to rise from 295 to 375 K =\",round(t[0]/3600,1),\"h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to rise from 295 to 375 K = 19.7 h\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.5,Page no:400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T=295 #initial temperature of surfaces\n", + "T2f=375 #Final temperature of far surface\n", + "dT1=900 #Temperature of near face raised\n", + "DH=4.2e-7 #Thermal diffusivity\n", + "#The development of the temperature profile is shown in Figure 9.12\n", + "#The problem will be solved by taking relatively large intervals for dx.\n", + "#Choosing dx = 50 mm, the construction shown in Figure 9.12\n", + "dx=50e-3 \n", + "#Because the second face is perfectly insulated, the temperature gradient must\n", + "# be zero at this point.\n", + "#It is seen that the temperature is\n", + "#less than 375 K after time 23dt and greater than 375 K after time 25dt\n", + "#Thus:\n", + "#t=24*dt\n", + "#from equation 9.43\n", + "dt=dx**2/(2*DH) \n", + "t=24*dt \n", + "\n", + "#Result\n", + "print\"\\n The time taken to rise from 295 to 375 K =\",round(t/3600.0,1),\"h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The time taken to rise from 295 to 375 K = 19.8 h\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.6,Page no:403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=25e-3 #Diameter of copper sphere\n", + "l=25e-3 #Side length of a copper cube\n", + "h=75 #External heat transfer coefficient\n", + "rho_cu=8950 #Density of copper at mean temperature\n", + "Cp=0.38e3 #Heat capacity of copper at mean temperature\n", + "k=385 # Thermal conductivity of copper at mean temperature\n", + "Tf=923 #Temperature of the furnace\n", + "Ta=368 #Temperature at which they are annealed\n", + "t=5*60 # time taken\n", + "\n", + "#Calculation\n", + "import math\n", + "import sympy\n", + "V_Ae_S=(d/6.0) #V/Ae tor the sphere\n", + "V_Ae_C=(l/6.0) #V/Ae tor the cube\n", + "Bi=h*(V_Ae_S)/k \n", + "#The use of a lumped capacity method is therefore justified\n", + "tao=rho_cu*Cp*V_Ae_S/h \n", + "x=sympy.Symbol('x') \n", + "T=sympy.solve(((x-Ta)/(Tf-Ta))-math.exp(-t/tao)) \n", + "\n", + "#Result\n", + "print\"Temperature of the sphere and of the cube at the end of 5 minutes =%d\"%(T[0]-273),\"C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the sphere and of the cube at the end of 5 minutes =208 C\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.7,Page no:409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "k=2.5 #Thermal conductivity\n", + "DH=2e-7 #Thermal diffusivity of the surrounding fluid\n", + "h=100 #External heat transfer coefficient\n", + "To=293 #Initial Temperature\n", + "T_dash=373 #Oven Temperture\n", + "Tc=353 #temperature throughout the whole of the sheet reaches a minimum\n", + "l=10e-3 #thickness of sheet\n", + "L=l/2 \n", + "\n", + "\n", + "#Calculation\n", + "#For the given process, the Biot number\n", + "Bi=h*L/k \n", + "Bi_1=1/Bi \n", + "lim_val=(T_dash-Tc)/(T_dash-To) \n", + "#From Figure 9.17, the Fourier number\n", + "Fo=7.7 \n", + "t=Fo*L**2/DH\n", + "\n", + "#Result\n", + "print\"The minimum time for which the sheet must be heated =%d\"%(t/60.0),\"min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum time for which the sheet must be heated =16 min\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.8,Page no:413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l=5 #Length of the channel of uranium reactor\n", + "Q=.25e6 #Heat release from uranium reactor\n", + "k=33 #Thermal conductivity of the uranium\n", + "\n", + "#Calculation\n", + "import math\n", + "Q_m=Q/l #Heat release rate\n", + "#Thus, from equation 9.52:\n", + "dT=Q_m/(4*math.pi*k) \n", + "\n", + "#Result\n", + "print\"The temperature difference between the surface and the centre of the uranium element =\",round(dT),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature difference between the surface and the centre of the uranium element = 121.0 K\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.9,Page no:429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Cp=2380 #specific heat capacity of nitrobenzene\n", + "k=0.15 \n", + "Meu=0.70e-3 #Viscosity of nitrobenzene\n", + "d_i=15e-3 #internal diameter of tube\n", + "d_o=19e-3 #external diameter of the tube\n", + "d_s=0.44 #shell diameter\n", + "b_s=0.150 #baffle spacing\n", + "p=0.025 #pitch\n", + "c=0.006 #clearance\n", + "#(i)Tube side coefficient\n", + "h_i=1000 #based on inside area\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "h_io=1000*d_i/d_o #based on outside area\n", + "#(ii) Shell side coefficient.\n", + "A=d_s*b_s*c/p #Area for flow\n", + "G_s_=4/A \n", + "#Taking Meu/Meu_s=1 in equation 9.91\n", + "d_e=4*((25e-3**2-(math.pi*d_o**2/4))/(math.pi/d_o)) \n", + "h_o=0.36*k/d_e*(d_e*G_s_/Meu)**0.55*(Cp*Meu/k)**0.33 \n", + "#(iii) Overall coefficient\n", + "#The math.logarithmic mean temperature difference is given by:\n", + "Tm=(((400.0-345.0)-(315.0-305.0))/math.log((400.0-345.0)/(315.0-305.0))) \n", + "#The corrected mean temperature difference is\n", + "Tm_c=Tm*0.8 \n", + "Q=4*Cp*(400.0-315.0) \n", + "#The surface area of each tube\n", + "A_t=0.0598 \n", + "U_o=Q/(2*166*5*A_t*Tm_c) \n", + "#(iv) Scale resistance.\n", + "R_d=(1/U_o)-(1.0/750.0)-(1.0/1000.0) \n", + "\n", + "#Result\n", + "print\"\\n Value of scale resistance that could be allowed =\",round(R_d,5),\"m**2 K/W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Value of scale resistance that could be allowed = 0.00026 m**2 K/W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.10,Page no:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "G=15.0 #Mass flow rate of benzene\n", + "d_s=1.0 #Internal diameter of Heat Exchanger\n", + "l=5.0 #Length of tubes\n", + "od=19e-3 #Outer diameter of tubes\n", + "C=6e-3 #Clearance\n", + "l_b=0.25 #Baffle spacing\n", + "Meu=.5e-3 \n", + "Y=25e-3 #dimension of square pitch\n", + "N=19.0 #no. of Baffles\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "As=d_s*l_b*C/Y #Cross-flow area\n", + "G_dash_s=G/As #Mass flow\n", + "d_e=4*(Y**2-(math.pi*od**2.0/4.0))/(math.pi*od) #Equivalent Diameter\n", + "Re=G_dash_s*d_e/Meu \n", + "#From Figure 9.29:\n", + "f_dash=0.280\n", + "rho_b=881 #density of benzene\n", + "DPf=f_dash*G_dash_s**2*(N+1)*d_s/(2*rho_b*d_e) \n", + "\n", + "#Result\n", + "print\"The pressure drop over the tube bundle =%d\"%DPf,\"N/m**2=\",round(DPf/(rho_b*9.81)),\"m of Benzene\"\n", + "print\"NOTE:Approx value of pressure drop is given in book\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure drop over the tube bundle =8680 N/m**2= 1.0 m of Benzene\n", + "NOTE:Approx value of pressure drop is given in book\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.11,Page no:437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=0.15 #Diameter of pipe\n", + "Ts=400 #Surface temperature\n", + "Ta=294 #Air temperture\n", + "k=0.0310 #Thermal conductivity ---Table 6, Appendix A1\n", + "\n", + "\n", + "#Calculation\n", + "X=36/k**4 \n", + "#From Equation 9.102:\n", + "GrPr=X*(Ts-Ta)*d**3 \n", + "#From Table 9.5:\n", + "n=0.25 \n", + "C_dd=1.32 \n", + "#Thus, in Equation 9.104:\n", + "h=C_dd*(Ts-Ta)**n*d**(3*n-1) \n", + "\n", + "#result\n", + "print\"\\n The heat transfer coefficient =\",round(h,2),\"W/m**2 K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The heat transfer coefficient = 6.81 W/m**2 K\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.12,Page no:439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda=1e-6 #Wavelength\n", + "E_l_b=1e9 #Emissive power at given lambda\n", + "C2=1.439e-2 \n", + "C1=3.742e-16 \n", + "\n", + "#Calculation\n", + "import math\n", + "T=C2/lamda/math.log(C1/(E_l_b*lamda**5)) \n", + "#With an error of +2 per cent, the correct value is given by:\n", + "E_l_b_n=(100-2)*E_l_b/100 \n", + "#In equation 9.108:1\n", + "T_n=C2/lamda/math.log(C1/(E_l_b_n*lamda**5)) \n", + "\n", + "#Result\n", + "print\"\\n The temperature of surface =%d\"%T,\"K\"\n", + "print\"\\n The temperature of surface with +2 per cent error=\",round(T_n),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The temperature of surface =1121 K\n", + "\n", + " The temperature of surface with +2 per cent error= 1120.0 K\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.13,Page no:441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=10e-3 #Diameter of carbide elements\n", + "l=0.5 #Length of carbide elements\n", + "Ts=1750 #Maximun surface temperature of carbide\n", + "P=500e3 #Thermal power output required\n", + "sigma=5.67e-8 \n", + "\n", + "#Calculation\n", + "Eb=sigma*Ts**4 \n", + "A=math.pi*d*l \n", + "P1=Eb*A #Power dissipated by one element\n", + "n=P/P1 #Number of elements required\n", + "\n", + "#Result\n", + "print\"Number of elements required =%d\"%round(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of elements required =60\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.14,Page no:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=10.0 #Area of the surface\n", + "P_r=1000e3 #Power radiated\n", + "T1=1500.0 #First Temperature\n", + "T2=1600.0 #Second Temperatue\n", + "sigma=5.67e-8 \n", + "\n", + "#Calculation\n", + "E=P_r/A #The emissive Power\n", + "#From equation 9,118:\n", + "e=E/(sigma*T1**4) \n", + "E2=e*sigma*T2**4 \n", + "\n", + "#Result\n", + "print\"\\n Emissivity when T=1500 K =\",round(e,3)\n", + "print\"\\n The Emissive power when T=1600 K =\",round(E2*1e-2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Emissivity when T=1500 K = 0.348\n", + "\n", + " The Emissive power when T=1600 K = 1295.0 kW\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.15,Page no:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "A1=2.0 #Area of rectangle(Surface 1)\n", + "A2=math.pi*1**2.0/4.0 #Area of disc (Surface 2)\n", + "T1=1500.0 #Temperature of Surface 1\n", + "T2=750.0 #Temperature of Surface 2\n", + "F12=0.25 #View factor\n", + "sigma=5.67e-8 \n", + "\n", + "#Calculation\n", + "#From equation 9. 1 26:\n", + "F21=A1*F12/A2 \n", + "Q12=sigma*A1*F12*(T1**4-T2**4) \n", + "\n", + "#Result\n", + "print\"View factor, F12 =\",round(F21,3)\n", + "print\"The net radiation transfer =\",round(Q12*1e-3,1),\"kW\"\n", + "print\"NOTE:Calculation mistake in book\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "View factor, F12 = 0.637\n", + "The net radiation transfer = 134.6 kW\n", + "NOTE:Calculation mistake in book\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.16,Page no:449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "X=4.0 #width of horizontal plate and length vertical plate\n", + "Y=6.0 #length of horizontal plate\n", + "Z=3.0 #height of verical plate\n", + "\n", + "#Calculation\n", + "W=Y/X \n", + "H=Z/X \n", + "A1=Z*X #Area of plate 1\n", + "A2=X*Y #Area of plate 2\n", + "F12=0.12 \n", + "#From equation 9.126:\n", + "F21=A1*F12/A2 \n", + "#For the two spheres\n", + "r1=1.0 #Diameter of sphere 1\n", + "r2=2.0 #Diameter of sphere 2\n", + "F12b=1.0 \n", + "F21b=(r1/r2)**2 \n", + "F22b=1.0-F21b \n", + "\n", + "#Result\n", + "print\"For vertical plate\"\n", + "print\"View Factor, F12=\",F12\n", + "print\"View Factor, F21=\",F21\n", + "print\"\\nFor sphere:\"\n", + "print\"View Factor, F21=\",F21b\n", + "print\"View Factor, F22=\",F22b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For vertical plate\n", + "View Factor, F12= 0.12\n", + "View Factor, F21= 0.06\n", + "\n", + "For sphere:\n", + "View Factor, F21= 0.25\n", + "View Factor, F22= 0.75\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.17,Page no:454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ri_u=0.2 # Inner radius of the upper ring\n", + "ro_u=0.3 # Outer radius of the upper ring\n", + "ri_l=0.3 # Inner radius of the lower ring\n", + "ro_l=0.4 # Outer radius of the lower ring\n", + "F12_34=0.4 \n", + "F12_4=0.22 \n", + "F1_34=0.55 \n", + "F14=0.30 \n", + "\n", + "#Calculation\n", + "A12_A2=ro_l**2/(ro_l**2-ri_l**2) \n", + "A1_A2=ro_u**2/(ro_l**2-ri_l**2) \n", + "F23=((A12_A2)*(F12_34-F12_4))+((A1_A2)*(F1_34-F14)) \n", + "\n", + "#Result\n", + "print\"\\n F23 =\",round(F23,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " F23 = 0.73\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.18,Page no:455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=1 #Diameter of plate\n", + "r1=0.5 \n", + "r4=r1 #Radius of the imaginary disc sealing the hemisphere\n", + "L=r1 #The distance between the plate and the bottom of the dome\n", + "\n", + "#Calculation\n", + "import math\n", + "A1=math.pi*d**2/4.0 #Area of the plate\n", + "A2=2*math.pi*d**2/4.0 #Area of the underside of the Hemisphere\n", + "A4=math.pi*r4**2/4.0 #Area of an imaginary disc sealing the hemisphere and parallel \n", + " #to the plate\n", + "T1=750 #Temperature of the plate\n", + "T2=1200 #Temperature of hemispherical cone\n", + "T3=290 #Temperature of the surroundings\n", + "sigma=5.67e-8 \n", + "R1=r1/L \n", + "R4=r4/L \n", + "S=1+(1+R4**2)/(R1**2) \n", + "F14=0.5*(S-(S**2-4*(r4/r1)**2)**0.5) \n", + "F12=F14 \n", + "F13=1-F12 \n", + "Q1=sigma*A1*F12*(T2**4-T1**4)+sigma*A1*F13*(T3**4-T1**4) \n", + "\n", + "#Result\n", + "print\"The net rate of heat transfer by radiation to the plate =\",round(Q1*1e-3,1),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The net rate of heat transfer by radiation to the plate = 21.4 kW\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.19,Page no:457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=2 #Diameter of the cylinder\n", + "h=1 #Depth of insulated cylinder\n", + "T1=1500 \n", + "T2=373 \n", + "#From Figure 9.40ii, with i = 1, j = 2\n", + "r1=1 \n", + "r2=1 \n", + "L=1 \n", + "\n", + "\n", + "#Calculation\n", + "A1=math.pi*d**2.0/4.0 #Radiant heater surface\n", + "A2=A1 #Under-Surface of the vessel\n", + "A_R=math.pi*d*h \n", + "#The view factor may also be obtained from Figure 9.39ii as follows:\n", + "R1=r1/L \n", + "R2=r2/L \n", + "S=1+(1+R2**2)/(R1**2) \n", + "F12=0.5*(S-(S**2-4*(r2/r1)**2)**0.5) \n", + "sigma=5.67e-8 \n", + "#Using the summation rule\n", + "#F11=0\n", + "F1R=1-F12 \n", + "F2R=F1R \n", + "Q2=(A1*F12+((1/(A1*F1R)+(1/(A2*F2R))))**-1)*sigma*(T1**4-T2**4) \n", + "#If the surroundings without insulation are surface 3 at\n", + "T3=290 \n", + "F23=F2R \n", + "#from equation 9.135\n", + "Q2_d=sigma*A1*F12*(T1**4-T2**4)+sigma*A2*F23*(T3**4-T2**4) \n", + "red=(Q2-Q2_d)/Q2*100 #Percentage Reduction\n", + "\n", + "#Result\n", + "print\"The rate of radiant heat transfer to the vessel =%d\"%(Q2*1e-3),\"kW\"\n", + "print\"If the insulation were removed ,The rate of radiant heat transfer to the vessel=\",round(Q2_d*1e-3),\"kW\"\n", + "print\"Reduction percentage =\",round(red),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of radiant heat transfer to the vessel =620 kW\n", + "If the insulation were removed ,The rate of radiant heat transfer to the vessel= 342.0 kW\n", + "Reduction percentage = 45.0 %\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.20,Page no:459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e=0.75 #Emissivity of grey surface\n", + "r=1-e #reflectivity of surface\n", + "Ts=400 #Temperature of surface\n", + "T_amb=295 \n", + "sigma=5.67e-8 \n", + "q1=3e3 #Rate of radiation arriving at grey surface\n", + "\n", + "#Calculation\n", + "#From equation 9.118\n", + "Eb=sigma*Ts**4 \n", + "#From equation 9.138\n", + "qo=e*Eb+r*q1 \n", + "#From equation 9.140\n", + "Q_A=e/r*(Eb-qo) \n", + "q=Q_A \n", + "#For convective heat transfer from the surface\n", + "qc=-1*q \n", + "hc=qc/(Ts-T_amb) \n", + "\n", + "#Result\n", + "print\"\\n Radiosity =%d\"%round(qo),\"W/m**2\"\n", + "print\"\\n The net rate of radiation trasfer = %d\"%q,\"W/m**2\"\n", + "print\"\\n Coefficient of heat transfer =\",round(hc,1),\"W/m**2 K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Radiosity =1839 W/m**2\n", + "\n", + " The net rate of radiation trasfer = -1161 W/m**2\n", + "\n", + " Coefficient of heat transfer = 11.1 W/m**2 K\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.21,Page no:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "sigma=5.67e-8 \n", + "T=[1000,500,300] #tempertaure of surfaces\n", + "A=[1.07,1.07,0.628] #Array of area of surfaces\n", + "e=[0.75,0.50,1.0] #Array of emissivity of the surfaces\n", + "r=[0.250,0.50] # Array of radius of two surfaces\n", + "L=0.2 #distance between two discs\n", + "\n", + "X=[0]*3\n", + "Y=[0]*3\n", + "R=[0]*2\n", + "\n", + "\n", + "#Calculation\n", + "from scipy.optimize import fsolve\n", + "for i in range(0,2):\n", + " X[i]=A[i]/r[i] \n", + " Y[i]=A[i]*e[i]/r[i] \n", + " R[i]=r[i]/L \n", + "F11=0 \n", + "F22=0 \n", + "S=1+(1+R[1]**2)/(R[1]**2) \n", + "F12=0.5*(S-(S**2-4*(r[1]/(2*r[0]))**2)**0.5) \n", + "A1_F11=0 \n", + "A2_F22=0 \n", + "A1_F12=A[0]*F12 \n", + "A1_F13=A[0]-(A[0]*F11+A[1]*F12) \n", + "#for surface 2:\n", + "A2_F21=A1_F12 \n", + "A2_F23=A1_F13 \n", + "#for surface 3:\n", + "#By reciprocity rule\n", + "A3_F31=A1_F13 \n", + "A3_F32=A2_F23 \n", + "A3_F33=A[2]-(A3_F31+A3_F32) \n", + "\n", + "#From equation 9.112:\n", + "E_b=[0]*3\n", + "for i in range(0,3):\n", + " E_b[i]=sigma*T[i]**4/1000.0 \n", + "\n", + "#since surface 3 is a black body\n", + "q_o3=E_b[2] \n", + "#From equations 9.157 and 9.158:\n", + "#we get\n", + "f=[0,0]\n", + "def F(p):\n", + " \n", + " x,y=p\n", + " f[0]=(A1_F11-A[0]/r[0])*x+A2_F21*y+A3_F31*q_o3+E_b[0]*A[0]*e[0]/r[0] \n", + " f[1]=(A1_F12*x)+((A2_F22-A[1]/r[1])*y)+E_b[1]*A[1]*e[1]/r[1] \n", + " return(f[0],f[1])\n", + "q_o=fsolve(F,(0,0)) \n", + "#From equation 9.140:\n", + "Q1=(A[0]*e[0]/r[0])*(E_b[0]-q_o[0]) \n", + "Q2=(A[1]*e[1]/r[1])*(E_b[1]-q_o[1]) \n", + "\n", + "#Result\n", + "print\"\\n Power input to the heater ,Q1 =\",round(Q1,2),\"kW\"\n", + "print\"\\n The rate of heat transfer to the plate ,Q2 =\",round(Q2,2),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Power input to the heater ,Q1 = 36.19 kW\n", + "\n", + " The rate of heat transfer to the plate ,Q2 = -14.44 kW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.22,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d=0.5 #diameter of chamber\n", + "l=2.0 #Length of chamber\n", + "e=0.5 #Emissivity\n", + "T_s=750.0 #Temperature at which the chamber is maintained\n", + "P=150e3 \n", + "T_g=1250.0 \n", + "sigma=5.67e-8 \n", + "P_c=0.1*P \n", + "P_w=P_c \n", + "\n", + "#Calculation\n", + "import math\n", + "V=math.pi/4.0*d**2*l #Volume of the chamber\n", + "A_s=(2*math.pi/4.0*d**2)+(math.pi*d*l) #total surface are of chamber\n", + "L_e=3.6*(V/A_s) \n", + "C_w=1.4 \n", + "e_w1=C_w*0.075 \n", + "C_c1=1.2 \n", + "e_c1=(C_c1*0.037) \n", + "A=(P_w+P_c)*L_e \n", + "B=P_c/(P_c+P_w)\n", + "De=0.001 \n", + "e_g=e_w1+0.044-De \n", + "e_w2=(0.12*C_w) \n", + "a_w=e_w2*(T_g/T_s)**0.65 \n", + "C_c2=1.02 \n", + "e_c2=(0.08*C_c2) \n", + "a_c=e_c2*(T_g/T_s)**0.65 \n", + "a_g=a_w+a_c \n", + "#If the surrounding surface is black, then:\n", + "Q=sigma*A_s*(e_g*T_g**4-a_g*T_s**4) \n", + "#For grey walls, the correction factor allowing for multiple reflection of\n", + "#incident radiation is:\n", + "C_g=0.5/(1.0-(1.0-0.326)*(1.0-0.5)) \n", + "Q_w=(Q*C_g) \n", + "\n", + "#Result\n", + "print\"\\n Radiation to the walls if the surface is black =%.1f\"%(Q*1e-3),\"kW\" \n", + "print\"\\n Net radiation to the walls =%.2f\"%(Q_w*1e-3),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Radiation to the walls if the surface is black =50.3 kW\n", + "\n", + " Net radiation to the walls =37.97 kW\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.23,Page no:479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration:\n", + "def mole(w,m):\n", + " n = w/m \n", + " return(n) \n", + "def partial(n1):\n", + " p = 308*(n1/total) \n", + " return(p)\n", + "w_steam = 0.57 #mass flow rate of steam entering in [kg/sec]\n", + "w_CO2 = 0.20 #mass flow rate of CO2 entering in [kg/sec]\n", + "m_water = 18 #molecular mass of water in kg\n", + "m_CO2 = 44 #molecular mass of CO2 in kg\n", + "n_steam = mole(w_steam,m_water) #number of moles in kmol\n", + "n_CO2 = mole(w_CO2,m_CO2) #number of moles in kmol\n", + "\n", + "#Calculation\n", + "import math\n", + "total = n_steam + n_CO2 \n", + "p_steam = partial(n_steam) \n", + "p_CO2 = partial(n_CO2) \n", + "mean_mol = (0.57 + 0.20)/total #mean molecular weight of the mixture in kg/kmol\n", + "outlet_steam = 11.7 #partial pressure of water in kN/m**2\n", + "outlet_CO2 = 308 - outlet_steam #partial pressure of water in kN/m**2\n", + "n_s = n_CO2*outlet_steam/outlet_CO2 \n", + "steam_condensed = n_steam - n_s \n", + "p_steam_401K = 252.2 #[kN/m**2]\n", + "p_CO2_401K = 308 - 252.2 #[kN/m**2]\n", + "steam_remaining = 0.0045*p_steam_401K/p_CO2_401K \n", + "s_c = n_steam - steam_remaining #[kmol]\n", + "Heat_cond = s_c*18*(2180 + 1.93*(404-401)) #[kW]\n", + "Heat_uncondensed_steam = 0.0203*18*1.93*(404-401) #[kW]\n", + "Heat_CO2 = 0.020*0.92*(404-401) \n", + "total_heat = Heat_cond + Heat_uncondensed_steam + Heat_CO2 \n", + "flow_water = 1407.3/(4.187*(319-300)) #[kg/sec]\n", + "hi = 6.36 #[kW/m**2 K]Based on flow velocity of 1425 kg/m**2 sec\n", + "ho = 5.25 #[kW/m**2 K]Based on outside area\n", + "Cp = (0.20*0.92 + 0.57*1.93)/0.77 #[kJ/kg K]\n", + "k_mean = 0.025 #[kW/m K]\n", + "a = 0.0411 #[m**2]\n", + "mass_velocity = (0.20+0.57)/0.0411 #[kg/m**2 sec]\n", + "hg = 107 #[W/m**2 K] at Re = 29,800 at equivalent diameter = 0.024m\n", + "u_pD = 0.62 #(u/pD)**0.67 = 0.62\n", + "Cpu_k = 1.01 #(Cp*u/k)**0.67\n", + "Psf = (122.6 - 38)/math.log(122.6/38) \n", + "kG = hg*(Cpu_k)/(1000*Cp*Psf*u_pD) \n", + "\n", + "#Result\n", + "print\"\\n Assuming no scale resistance, the overall coefficient =\",round(1407.3/(34.8*74.2),3) ,\"W/m** K\"\n", + "print\"\\n Actual coeficient =\",round(1407.3/(53.9*74.2),3) ,\"kW/m**2 K\"\n", + "print\"\\n Dirt factor =\",round((0.545-0.352)/(0.545*0.352),2),\"K/kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Assuming no scale resistance, the overall coefficient = 0.545 W/m** K\n", + "\n", + " Actual coeficient = 0.352 kW/m**2 K\n", + "\n", + " Dirt factor = 1.01 K/kW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.24,Page no:498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d_v=1.0 #diameter of the vessel\n", + "L=0.3 #diameter of propeller agitator\n", + "N=2.5 #rotating speed of propeller agitator\n", + "T=310.0 #Temperature\n", + "G=0.5 #circulation speed of cooling water\n", + "d_o=25e-3 #outer diameter of stainless steel coil\n", + "d=22e-3 #inner diameter of stainless steel coil\n", + "d_w=(d_o+d)/2 \n", + "d_c=0.8 #diameter of helix\n", + "T_m=290.0 #mean temperature\n", + "k1=0.59 \n", + "Meu1=1.08e-3 \n", + "C_p1=4.18e3 \n", + "x_w=1.5e-3 \n", + "\n", + "\n", + "#Calculation\n", + "h_i=(k1/d)*(1+3.5*(d/d_c))*0.023*(d*1315.0/Meu1)**0.8*(C_p1*Meu1/k1)**0.4 \n", + "#The external film coefficient is given by equation 9.204:\n", + "C_p2=1.88e3 #Specefic heat capacity\n", + "Meu2=6.5e-3 #viscosity\n", + "k2=0.40 \n", + "rho=1666 \n", + "Meu_s=8.6e-3 \n", + "h_o=0.87*(C_p2*Meu2/k2)**(1.0/3.0)*(L**2*N*rho/Meu2)**0.62*(Meu2/Meu_s)**0.14*k2/d_v \n", + "\n", + "k_w=15.9 \n", + "R_o=0.0004 \n", + "R_i=0.0002 \n", + "U_o=((1/h_o)+(x_w*d_o/(k_w*d_w))+(d_o/(h_i*d))+(R_o)+(R_i*d_o/d))**-1 \n", + "\n", + "#Result\n", + "print\"The overall coeffecient of heat transfer =\",round(U_o),\"W/m**2.K\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall coeffecient of heat transfer = 498.0 W/m**2.K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.25,Page no:501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "C_p=4e3 \n", + "\n", + "#Calculation\n", + "import sympy\n", + "from scipy.integrate import quad\n", + "x=sympy.Symbol('x') \n", + "T_max=sympy.solve((600*0.5)*(393-x)-(10*6)*(x-293)) \n", + "#solving the equation finally we get \n", + "def f(T):\n", + " return(11111*(1/(376.3-T)))\n", + "t1=quad(f,293.0,353.0)\n", + "#The steam is turned off for 7200 s and during this time a heat balance gives:\n", + "#on solving as given in book we get\n", + "T=346.9 \n", + "#The time taken to reheat the liquid to 353 K is then given by:\n", + "t2=quad(f,T,353)\n", + "\n", + "#Result\n", + "print\"\\n\\n Maximum temperature to which it can be heated =\",round(T_max[0],1),\"K\"\n", + "print\"\\n Time taken to heat the liquid from 293 K to 353 K =%d\"%t1[0],\"s\"\n", + "print\"\\n Time taken to reheat the liquid to 353 K =%d\"%round(t2[0]),\"s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + " Maximum temperature to which it can be heated = 376.3 K\n", + "\n", + " Time taken to heat the liquid from 293 K to 353 K =14155 s\n", + "\n", + " Time taken to reheat the liquid to 353 K =2584 s\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.26,Page no:516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#As in Example 9.1, the heat load = 1672 kW\n", + "Q=1672 \n", + "#With reference to Figure 9.71:\n", + "T1=360 \n", + "T2=340 \n", + "theta1=300 #Temperature of cooling water entering\n", + "theta2=316 \n", + "\n", + "#Calculation\n", + "X=(theta2-theta1)/(T1-theta1) \n", + "Y=(T1-T2)/(theta2-theta1) \n", + "#from Figure 9.58\n", + "F=0.97 \n", + "theta_m=41.9 \n", + "#and hence:\n", + "A=Q/(2*F*theta_m) #the heat transfer area\n", + "\n", + "#Result\n", + "print\"\\n The heat transfer area is =\",round(A,1),\"m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The heat transfer area is = 20.6 m**2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.27,Page no:521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#As in Example 9.1, the heat load = 1672 kW\n", + "Q=1672.0 \n", + "#With reference to Figure 9.71:\n", + "T1=360.0 \n", + "T2=340.0 \n", + "theta1=300.0 #Temperature of cooling water entering\n", + "theta2=316.0 \n", + "F_theta_m=40.6 #corrected mean temperature difference\n", + "\n", + "#Calculation\n", + "T=(T1+T2)/2.0 \n", + "d=1.9e-3 #Tube diameter\n", + "u=1 #Water velocity\n", + "#then, in equation 9,221:\n", + "h_i=4.28*(0.00488*T-1)*u**0.8/d**0.2 \n", + "#From Table 9.18, an estimate of the shell-side film coefficient is:\n", + "h_o=(1700.0+11000.0)/2000.0 \n", + "#For steel tubes of a wall thickness of 1.6 mm, the thermal resistance of the wall, from Table 9.15 is:\n", + "xw_kw=0.025 \n", + "#the thermal resistance for treated water, from Table 9.16, is 0.26 m2K/kW\n", + "Ri=0.26 \n", + "Ro=Ri \n", + "U=((1.0/h_o)+xw_kw+Ri+Ro+(1.0/h_i))**-1 \n", + "A=Q/(F_theta_m*U) \n", + "\n", + "#Result\n", + "print\"\\n The heat transfer area =\",round(A,1),\"m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " The heat transfer area = 32.8 m**2\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.28,Page no:531" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "mh = 30.0 #[kg/s] Hot fluid flow rate\n", + "Thi = 370.0 #[K] Hot Fluid Inlet Temperature\n", + "Tho = 315.0 #[K] Hot Fluid outlet Temperature\n", + "Tci = 300.0 #[K] Cold Fluid Inlet Temperature\n", + "Tco = 315.0 #[K] Cold Fluid Outlet Temperature\n", + "cpc = 4.18*10**3 #[J/kg.K] Thermal Conductivity of Cold Fluid\n", + "#From table A1.3 at mean temperature 343 K\n", + "cph = 2.9*10**3 #[J/kg.K] Thermal Capacity of Hot fluid\n", + "\n", + "\n", + "#Calculation\n", + "import math\n", + "q = mh*cph*(Thi-Tho) #[kW] Heat load\n", + "mc = q/(cpc*(Tco-Tci)) #[kg/s] Flow of cooling water\n", + "Tln = ((Thi-Tho)-(Tco-Tci))/(math.log((Thi-Tho)/(Tco-Tci))) #[K] logarithm mean temperature difference\n", + "X = (Thi - Tho)/(Tco-Tci) \n", + "Y = (Tco-Tci)/(Thi - Tci) \n", + "F = .85 \n", + "U = 500.0 #[W/m**2.K]\n", + "A = q/(F*Tln * U) \n", + "od = .02 #[m] outer dia\n", + "id = .016 #[m] inner dia\n", + "l = 4.83 #[m] effective tube length\n", + "s = math.pi*od*l \n", + "N = A/s \n", + "db = (1210/.249)**(2.207)**-1*20/1000.0 #[m]\n", + "dc = .068 #[m] diametric clearance between shell and tubes\n", + "ds = db+dc #[m] Shell dia\n", + "Ac = math.pi/4*id**2 #[m**2] Cross sectional area\n", + "Ntp = N/2.0\n", + "Af = N/2.0*Ac #[m**2] Tube side flow area\n", + "mw = 76.3/Af #[kg/m**2.s] Mass velocity of water\n", + "rho = 995 #[kg/m**3] mas density of water\n", + "u = mw/rho #[m/s] water velocity\n", + "vu = .8*10**-3 #[N.s/m**2] viscosity\n", + "k = .59 #[W/m.K]\n", + "Re = id*u*rho/vu \n", + "Pr = cpc*vu/k \n", + "ld = l/id \n", + "jh = 3.7*10**-3\n", + "hi = jh*Re*Pr**.3334*.59/id #[W/m**2.K]\n", + "dbf = .20*ds #[m] Baffle Dia\n", + "tb = 1.25*20*10**-3 #[mm] Tube Pitch\n", + "As = (25.0-20.0)/25.0*10**3*(ds*Ac) #[m**2]\n", + "Gs = 30.0/As #[kg/m**2.s]\n", + "de = 1.1*(.025**2-.917*od**2)/od #[m]\n", + "rho2 = 780.0 #[kg/m**3] density\n", + "vu2 = .8*10**-3 #[N.s/m**2] viscosity\n", + "Cp2 = 3.1*10**3 #[J/kg.K] Heat capacity\n", + "k2 = .16 #[W/m.K]\n", + "Re2 = Gs*de/vu2 \n", + "Pr2 = Cp2*vu2/k2 \n", + "jh2 = 5*10**-3 \n", + "hs = jh2*Re2*Pr2**.334*k2/de \n", + "k3 = 50.0 #[W/m.K] Thermal Conductivity\n", + "Rw = .00020 #[m**2.K/W] Scale Resistances \n", + "Ro = .00015 #[m**2.K/W] Resistance for organic\n", + "U = (1.0/hs + Rw + 0.5*(od-id)/k3 + Ro*od/id+od/(id*hi))**-1\n", + "#From figure 9.78\n", + "jf = 4.5*10**-3 \n", + "n = 2.0 \n", + "delP = n*(4*jf*(4.830/id) + 1.25)*(rho*u**2) \n", + "u2 = Gs/rho2 \n", + "jf2 = 4.6*10**-2 \n", + "N2 = 1.0 \n", + "delP2 = N2*(4*jf2*(4.830/od)*(1005/14.2))*(rho2*u2**2) \n", + "\n", + "#Increasing the baffle spacing pressure drop is reduced one-fourth\n", + "delPs = delP2/4.0 \n", + "ho = hs*(.5)**.8 #[W/m**2.K]\n", + "U2 = (1.0/ho + Rw + .5*(od-id)/k3 + Ro*od/id+od/(id*hi))**-1\n", + "\n", + "#REsult\n", + "print\"Overall Coefficient of %d\"%U2,\" W/m**2.K \\n Number of tubes/pass =\",round(Ntp),\"\\n Number of tubes required = %d\"%N\n", + "print\"NOTE:Very approximate values are used in textbook for Calculation\\nThat's why answer is different\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Overall Coefficient of 563 W/m**2.K \n", + " Number of tubes/pass = 603.0 \n", + " Number of tubes required = 1205\n", + "NOTE:Very approximate values are used in textbook for Calculation\n", + "That's why answer is different\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.29,Page no:535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "G=1.0 #Flow rate of organic liquid\n", + "Cp=2e3#Heat capacity of organic liquid\n", + "T1=350.0 \n", + "T2=330.0 \n", + "theta1=290.0\n", + "theta2=320.0 \n", + "\n", + "\n", + "#Calculation\n", + "Q=G*Cp*(T2-T1) #heat load\n", + "G_cool=Q/(4187*(theta1-theta2)) #flow of water\n", + "GCp_hot=(G*Cp) #for organic\n", + "GCp_cold=(G_cool*4187) \n", + "#From equation 9.235:\n", + "eta=GCp_hot*(T1-T2)/(GCp_cold*(T1-theta1)) \n", + "\n", + "#Result\n", + "print\" Effectiveness of the given double pipe heat exchanger =\",round(eta,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Effectiveness of the given double pipe heat exchanger = 0.5\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example no:9.30,Page no:538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Tci = 320.0 #[K] Cold Fluid Initial Temperature\n", + "Tce = 340.0 #[K] Cold Fluid Final Temperature\n", + "mc = 4.0 #[kg/s] Flow rate of cold fluid\n", + "mh = 8.0 #[kg/s] Flow rate of hot fluid\n", + "import numpy as np\n", + "Thi = np.array([380,370,360,350]) #[K] Hot fluid initial temperature\n", + "Cp = 4.18 #[kJ/kg.K] mean heat capacity\n", + "U = 1.5 #[W/m**2.K] Overall heat transfer coefficient\n", + "\n", + "\n", + "#Calculation\n", + "GCpu= mh*Cp #[kW/K]\n", + "GCpp= mc*Cp #[kW/K]\n", + "if(GCpu decrease in carrier's amplitude\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) percent(m) = 25.0 percent\n", + "(b) percent(m) = 56.25 percent\n", + "(c) percent(m) = 100 percent\n", + "(d) this is a case of overmodulation\n", + "(e) this is a distorted AM wave as the increase > decrease in carrier's amplitude\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page no 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c=1*10**3 #carrier output\n", + "\n", + "#calculation\n", + "esb= 1/4.0*(c)\n", + "tsp=(esb*2)\n", + "tp=(tsp+c)\n", + "\n", + "#result\n", + "print\"Total transmitted power =\",tp,\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total transmitted power = 1500.0 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page no 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "m=0.9 #modulation index\n", + "Pc=500 #carrier Power \n", + "\n", + "#calculation\n", + "x=(m**2)/2.0\n", + "y=(1+x)*Pc\n", + "\n", + "#result\n", + "print\"total transmitted power= \",y,\"W\" #total transmitted powwer\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total transmitted power= 702.5 W\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page no 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "m=0.95 #modulation index\n", + "Pt= 50*10**3 #total transmitted power\n", + "\n", + "#calculation\n", + "x=(m**2)/2.0\n", + "y=1+x\n", + "z=(Pt/y)\n", + "Pi=Pt-z\n", + "\n", + "#result\n", + "print\"Pc = \",round(z,2),\"W\" #carrier power\n", + "print\"total intelligence power = \",round(Pi,2),\"W\" #intelligence signal\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pc = 34453.06 W\n", + "total intelligence power = 15546.94 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page no 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "Ic=12 #antenna current of AM transmitter when unmodulated\n", + "It=13 #current when modulated\n", + "\n", + "#calculation\n", + "import math\n", + "x=2*((13/12.0)**2-1)\n", + "m=math.sqrt(x)\n", + "a=m*100\n", + "\n", + "#result\n", + "print\"percent(m) = \",round(a,0),\"percent\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percent(m) = 59.0 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page no 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "n=0.7 #efficiency\n", + "c=10*10**3 #carrier wave\n", + "\n", + "#calculation\n", + "Is=0.5*c #intelligence signal\n", + "p=(Is/n)\n", + "\n", + "#result\n", + "print\"dc input power = \",round(p,2),\"W\" #dc input power" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc input power = 7142.86 W\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page no 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Pc=10.0*10**3 #carrier power\n", + "Pt=11.2*10**3 #transmitted power\n", + "m2=0.5 #modulation index of another sine wave\n", + "\n", + "#calculation\n", + "import math\n", + "x=2*((Pt/Pc)-1)\n", + "m=math.sqrt(x)\n", + "meff=math.sqrt((m**2)+(m2**2))\n", + "a=Pc*(1+((meff**2)/2.0))\n", + "\n", + "#result\n", + "print\"Pt = \",a,\"W\" #total transmitted power" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pt = 12450.0 W\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page no 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "v1=1.0\n", + "v2=0.03\n", + "v3=0.05\n", + "v4=0.02\n", + "v5=0.04\n", + "\n", + "#calculation\n", + "import math\n", + "x=math.sqrt((v2**2+v3**2+v4**2+v5**2)/v1**2)\n", + "y=x*100\n", + "\n", + "#result\n", + "print\"THD = \",round(y,2),\"percent\" #Total harmonic distortion " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "THD = 7.35 percent\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/Chapter3.ipynb b/Modern_Electronics_Communication/Chapter3.ipynb new file mode 100755 index 00000000..23d71dd2 --- /dev/null +++ b/Modern_Electronics_Communication/Chapter3.ipynb @@ -0,0 +1,166 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Amplitude modulation-Reception " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page no 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "fr=550*10**3 #frequency, Hz\n", + "L=10.0*10**-6 #inductor, H\n", + "fr1=1550*10**3\n", + "\n", + "#calculation \n", + "import math\n", + "a=fr*2*math.pi\n", + "x=fr1*2*math.pi\n", + "b=1/a\n", + "y=1/x\n", + "C1=((b)**2/L)\n", + "C2=((y)**2/L)\n", + "fr2=1100*10**3\n", + "BW=10.0*10**3\n", + "Q=(fr2/BW)\n", + "BW1=(fr1/Q)\n", + "BW2=(fr/Q)\n", + "\n", + "#result\n", + "print\"(a) required range of capacitance is from \",round(C2,12),\"F\",\"to\",round(C1,12),\"F\"\n", + "print\"(b) Q= \",Q\n", + "print\"(c) Bandwidth of receiver at 1550 KHz = \",round(BW1,2),\"Hz\"\n", + "print\"Babdwidth of receiver at 550 KHz = \",BW2,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) required range of capacitance is from 1.054e-09 F to 8.374e-09 F\n", + "(b) Q= 110.0\n", + "(c) Bandwidth of receiver at 1550 KHz = 14090.91 Hz\n", + "Babdwidth of receiver at 550 KHz = 5000.0 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page no 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given\n", + "f=620*10**3 #frequency, Hz\n", + "IF=455*10**3\n", + "\n", + "#calculation\n", + "LO=f+IF\n", + "X=IF+LO\n", + "# image frequency of local oscillator\n", + "#station frequency = 620 kHz\n", + "\n", + "#Result\n", + "print\"LO = Hz\",LO\n", + "print\"X-1075kHz=\",X,\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LO = Hz 1075000\n", + "X-1075kHz= 1530000 Hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page no 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=8*10**-6 #microvolts\n", + "R=50 #input resistance, ohm\n", + "\n", + "#Calculation\n", + "import math\n", + "P=(V**2)/R\n", + "dBm=10*math.log10(P/0.001)\n", + "dBW=10*math.log10(P/1)\n", + "a=(-89+8+3+24+26+26-2+34)\n", + "x=(a/10)\n", + "y=10**x\n", + "z=y*0.001\n", + "\n", + "#Result\n", + "print\"input power is= \",P,\"W\" \n", + "print\"dBm = \",round(dBm,0),\"dBm\"\n", + "print\"dBW = \",round(dBW,0),\"dBw\"\n", + "print\"Pout(dBm) =\",a,\" dBm into speaker\"\n", + "print\"Pout(dBW) =\",z,\"W\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "input power is= 1.28e-12 W\n", + "dBm = -89.0 dBm\n", + "dBW = -119.0 dBw\n", + "Pout(dBm) = 30 dBm into speaker\n", + "Pout(dBW) = 1.0 W\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/Chapter4.ipynb b/Modern_Electronics_Communication/Chapter4.ipynb new file mode 100755 index 00000000..5c291ef8 --- /dev/null +++ b/Modern_Electronics_Communication/Chapter4.ipynb @@ -0,0 +1,149 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 single-sideband communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page no 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "x=1*10**6 #DSB range\n", + "y=10**(80/20.0)\n", + "\n", + "#calculation\n", + "import math\n", + "z=math.sqrt(y)\n", + "df=200.0\n", + "Q=(x*z)/(4.0*df)\n", + "a=100*10**3\n", + "Q1=(a*z)/(4.0*df)\n", + "\n", + "\n", + "#result\n", + "print\"(a) Q for 1MHz = \",Q\n", + "print\"(b) Q for 100KHz = \",Q1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Q for 1MHz = 125000.0\n", + "(b) Q for 100KHz = 12500.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page no 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "a=3*10**6\n", + "b=3.1*10**6 #new DSB signal range\n", + "c=2.9*10**6 #new DSB signal range\n", + "\n", + "#calculation\n", + "Q=(a/(b-c))\n", + "\n", + "#result\n", + "print\"the required filter Q is = \",Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required filter Q is = 15.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page no 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "a=455\n", + "x=2000+1 #frequency\n", + "y=2000+3 #frequency\n", + "\n", + "#calculation\n", + "c=2000+a #local oscillator value\n", + "d=c-x\n", + "e=c-y\n", + "f=a-454\n", + "g=a-452\n", + "\n", + "#result\n", + "print\"RF =\",x,\"KHz\", \"at which first mixer input=\" ,y,\"kHz\"\n", + "print\"local oscillator value is \",c,\"KHz\"\n", + "print\"First mixer output is\",d,\"to\",e,\"KHz\" #IF amp and second mixer input\n", + "print\"BFO = \",a,\"KHz\"\n", + "print\"Second mixer output is\",f,\"KHz\", \"and audio amplifier value is =\",g, \"kHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RF = 2001 KHz at which first mixer input= 2003 kHz\n", + "local oscillator value is 2455 KHz\n", + "First mixer output is 454 to 452 KHz\n", + "BFO = 455 KHz\n", + "Second mixer output is 1 KHz and audio amplifier value is = 3 kHz\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/Chapter5.ipynb b/Modern_Electronics_Communication/Chapter5.ipynb new file mode 100755 index 00000000..5e894199 --- /dev/null +++ b/Modern_Electronics_Communication/Chapter5.ipynb @@ -0,0 +1,360 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 Frequency Modulation : Transmission" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page no 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "v=25*10**-3\n", + "f=750 #deviation constant\n", + "vg=10.0*10**-3 #deviation constant\n", + "\n", + "#calculation\n", + "pfd=v*(f/vg) #positive frequency deviation\n", + "nfd=-v*(f/vg) #negative frequency deviation\n", + "\n", + "#result\n", + "print\"(a) positive frequency deviation = \",pfd,\"Hz\"\n", + "print\"negative frequency deviation = \",nfd,\"Hz\"\n", + "print\"The total deviation is written as +-2.25kHz for the given input signal level\"\n", + "print\"(b) The carrier wil deviate \",pfd,\"Hz\",\"&\",nfd,\"Hz\",\"at 400 Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) positive frequency deviation = 1875.0 Hz\n", + "negative frequency deviation = -1875.0 Hz\n", + "The total deviation is written as +-2.25kHz for the given input signal level\n", + "(b) The carrier wil deviate 1875.0 Hz & -1875.0 Hz at 400 Hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page no 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "d=20*10**3 #maximum deviation\n", + "fi=10.0*10**3 #input frequency\n", + "\n", + "#calculation\n", + "mf=d/fi\n", + "a=mf*40\n", + "\n", + "#result\n", + "print\"total required bandwidth is \",a,\"KHz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total required bandwidth is 80.0 KHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page no 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "d=20*10**3 #maximum deviation\n", + "fi=5.0*10**3 #input frequency\n", + "\n", + "#calculation\n", + "mf=d/fi\n", + "a=2*35\n", + "\n", + "#print\n", + "print\"the required bandwidth is \",mf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required bandwidth is 4.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page no 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Vm=2000\n", + "R=50.0 #resistance, ohm\n", + "\n", + "#calcultion\n", + "import math\n", + "fc=(2*math.pi*(10**8))/2.0*math.pi\n", + "P=(2000/math.sqrt(2))**2/R\n", + "mf=2 #by inspection of FM equation\n", + "fi=(math.pi*10**4)/(2.0*math.pi)\n", + "d=(mf*fi)\n", + "BW=mf*40\n", + "bw=2*(d+fi)\n", + "P1=((0.58*2000/math.sqrt(2))**2)/R\n", + "P2=((0.03*2000/math.sqrt(2))**2)/R\n", + "\n", + "#result\n", + "print\"(a) carrier frequency = \",round(fc,-9),\"Hz\" #by inspection of FM equation\n", + "print\"(b) the peak voltage is 2000V P thus= \",P,\"W\"\n", + "print\"(c) mf = 2\" #by inspection of FM equation\n", + "print\"(d) the intelligence frequency fi = \",fi,\"Hz\"\n", + "print\"(e) BW = \",bw ,\"Hz\" #using carson's rule \n", + "print\"(f) The smallest sideband J4 is 0.03 times the carrier = \",P2,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) carrier frequency = 1000000000.0 Hz\n", + "(b) the peak voltage is 2000V P thus= 40000.0 W\n", + "(c) mf = 2\n", + "(d) the intelligence frequency fi = 5000.0 Hz\n", + "(e) BW = 30000.0 Hz\n", + "(f) The smallest sideband J4 is 0.03 times the carrier = 36.0 W\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page no 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "d=75*10**3 #maximum deviation\n", + "fi=30.0 #modulating frequency, Hz\n", + "fi1=15.0*10**3 \n", + "d1=1*10**3\n", + "fi2=100 #Hz\n", + "fi3=2.0*10**3\n", + "\n", + "#calculation\n", + "mf1=d/fi\n", + "mf2=d/fi1\n", + "mf3=d1/fi2\n", + "mf4=d1/fi3\n", + "DR=d1/fi3\n", + "\n", + "#result\n", + "print\"(a)maximum deviation at 30 Hz = \",mf1 \n", + "print\"maximum deviation at 15kHz= \",mf2\n", + "print\"(b) maximum deviation at 100Hz = \",mf3\n", + "print\"maximum deviation at 2KHz= \",mf4\n", + "print \"(c)Deviation Ratio \",DR #deviation ratio" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)maximum deviation at 30 Hz = 2500.0\n", + "maximum deviation at 15kHz= 5.0\n", + "(b) maximum deviation at 100Hz = 10\n", + "maximum deviation at 2KHz= 0.5\n", + "(c)Deviation Ratio 0.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page no 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "mf=0.25\n", + "a=0.98\n", + "b=0.12\n", + "x=10*10**3 #power, watt\n", + "\n", + "#calculation\n", + "P=(a**2)*x\n", + "P1=(b**2)*x\n", + "t=P+2*P1\n", + "\n", + "#result\n", + "print\"power of each sideband = \",P1,\"W\"\n", + "print\"total power = \",round(t,-4),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power of each sideband = 144.0 W\n", + "total power = 10000.0 W\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page no 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "phi=0.5 #maximum intelligence frequency\n", + "fi=5.0*10**3\n", + "x=75*10**3\n", + "\n", + "#calculation\n", + "d=phi*fi\n", + "y=x/d\n", + "\n", + "#result\n", + "print\"o/p S/N = \",y\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "o/p S/N = 30.0\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page no 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "dm=10*10**3\n", + "x=(1/3.0) #N/S input ratio\n", + "\n", + "#calculation\n", + "import math\n", + "phi=math.asin(x)\n", + "phi1=math.asin(x)\n", + "fi=3*10**3\n", + "d=phi1*fi\n", + "a=dm/d\n", + "\n", + "#result\n", + "print\"The S/N output will be \",round(a,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The S/N output will be 10.0\n" + ] + } + ], + "prompt_number": 36 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/README.txt b/Modern_Electronics_Communication/README.txt new file mode 100755 index 00000000..799a1197 --- /dev/null +++ b/Modern_Electronics_Communication/README.txt @@ -0,0 +1,10 @@ +Contributed By: nishu mittal +Course: others +College/Institute/Organization: university of delhi +Department/Designation: electronics +Book Title: Modern Electronics Communication +Author: J S Beasley and Miller +Publisher: Phi Publication +Year of publication: 9th +Isbn: 9788120340046 +Edition: 2008 \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter10.ipynb b/Modern_Electronics_Communication/chapter10.ipynb new file mode 100755 index 00000000..878fe5de --- /dev/null +++ b/Modern_Electronics_Communication/chapter10.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 Wireless digital communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page no 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "n=3 #shift registers\n", + "n1=7\n", + "\n", + "#calculation\n", + "x=(2**n)-1\n", + "y=(2**7)-1\n", + "\n", + "#result\n", + "print\"(a) n =\",n,\"PN sequence length = \",x\n", + "print\"(b) n =\",n1,\"PN sequence length = \",y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) n = 3 PN sequence length = 7\n", + "(b) n = 7 PN sequence length = 127\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page no 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "x=56.0 #modulation bit rate\n", + "y=560 #chip rate\n", + "a=256.0 #modulation bit rate\n", + "b=1792 #chip rate\n", + "\n", + "#calculation\n", + "z=y/x\n", + "c=b/a\n", + "\n", + "#result\n", + "#part(a)\n", + "print\"Spreading of a DSSS signal = \",z\n", + "print\"Spreading of a DSSS signal = \",c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Spreading of a DSSS signal = 10.0\n", + "Spreading of a DSSS signal = 7.0\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter12.ipynb b/Modern_Electronics_Communication/chapter12.ipynb new file mode 100755 index 00000000..79f6b2af --- /dev/null +++ b/Modern_Electronics_Communication/chapter12.ipynb @@ -0,0 +1,401 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 Transmission Lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page no 573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "L=73.75*10**-9 #inductance, H\n", + "C=29.5*10**-12 #capacitance\n", + "x=5280\n", + "\n", + "#calculation\n", + "import math\n", + "Z=math.sqrt(L/C)\n", + "z1=math.sqrt((x*L)/(x*C))\n", + "\n", + "#result\n", + "print\"characterstics impedence for 1-ft =\",Z,\"ohm\"\n", + "print\"characterstics impedence for 1-mi = \",z1,\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "characterstics impedence for 1-ft = 50.0 ohm\n", + "characterstics impedence for 1-mi = 50.0 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page no 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "a=2 #parallel wire line\n", + "b=2.35 #coaxial line\n", + "D=0.285\n", + "d=0.08\n", + "e=1.0 #dielectric constant of insulating material relative to air\n", + "\n", + "#calculation\n", + "import math\n", + "z=(276/e)*math.log10(2*2)\n", + "z1=(138/e)*math.log10(b)\n", + "z2=(138/math.sqrt(2.3)*math.log10(D/d))\n", + "\n", + "#result\n", + "print\"(a) characterstics impedence for a parallel wire = \",round(z,0),\"ohm\"\n", + "print\"(b) characterstics impedence for a air dielectric coaxial line= \",round(z1,1),\"ohm\"\n", + "print\"(c) characterstics impedence = \",round(z2,0),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) characterstics impedence for a parallel wire = 166.0 ohm\n", + "(b) characterstics impedence for a air dielectric coaxial line= 51.2 ohm\n", + "(c) characterstics impedence = 50.0 ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page no 579" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "L=73.75*10**-9 #inductance, H\n", + "C=29.5*10**-12 #capacitance\n", + "d=1 #distance\n", + "\n", + "#calculation\n", + "import math\n", + "t=math.sqrt(L*C)\n", + "Vp=d/t\n", + "\n", + "#result\n", + "print\"the delay introduced is t =\",round(t,10),\"s\"\n", + "print\"The velocity of propagation is \",round(Vp*10**-8,3),\"*10**8 ft/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the delay introduced is t = 1.5e-09 s\n", + "The velocity of propagation is 6.78 *10**8 ft/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page no 580" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "v=2.07*10**8 #velocity\n", + "c=3.0*10**8 #velocity of light\n", + "Er=2.3 #relative dielectric constant\n", + "\n", + "#calculation\n", + "import math\n", + "vf=(v/c) #velocity factor\n", + "vf1=1/math.sqrt(Er)\n", + "\n", + "#result\n", + "print\"The velocity = \",vf,\"m/s\"\n", + "print\"vf = \",round(vf1,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity = 0.69 m/s\n", + "vf = 0.659\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page no 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c=3*10**8 #speed of light\n", + "f=100.0*10**6 #frequency of signal\n", + "x=2.07*10**8 #velocity of wave propagation\n", + "\n", + "#Calcultion\n", + "w=c/f #wavelength in free-space\n", + "w1=x/f #wavelength while traveling through an RG-8A/U coaxial cable\n", + "\n", + "#Result\n", + "print\"In free space, lambda =\",w,\"m\"\n", + "print\"While traveling through RG-8A/U cable, lamda= \",w1,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In free space, lambda = 3.0 m\n", + "While traveling through RG-8A/U cable, lamda= 2.07 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page no 592" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Zl=300.0 #load impedance\n", + "Zo=50.0 #characteristic impedance\n", + "v=2.07*10**8 #velocity in RG-8A/U cable\n", + "f=27.0*10**6 #operating frequency of citizen's band transmitter\n", + "Po=4 #output power of transmitter\n", + "l=10 #length of RG-8A/U cable\n", + "Rl=300 #input resistance of antenna\n", + "\n", + "#calculation\n", + "T=((Zl-Zo)/(Zl+Zo)) #reflection coefficient\n", + "h=v/f #length of cable in wavelength\n", + "le=l/h #electrical length\n", + "x=Rl/Zo #VSWR\n", + "y=((1+T)/(1-T)) #VSWR\n", + "rp=(T)**2*Po #reflected power\n", + "Pl=Po-rp #load power\n", + "#part(a): The reflection coefficient\n", + "\n", + "#result\n", + "print\"(a) reflection cofficient = \",round(T,2)\n", + "print\"(b) electrical length =\",round(le,2),\"lambda\"\n", + "print\"(c) VSWR = \",y\n", + "print\"(d) the reflected voltage = \",round(Pl,2),\"W\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) reflection cofficient = 0.71\n", + "(b) electrical length = 1.3 lambda\n", + "(c) VSWR = 6.0\n", + "(d) the reflected voltage = 1.96 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page no 597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Zo=100.0 #characteristic impedance\n", + "j=1j\n", + "Zl = 200-j*150 #load impedance\n", + "l=4.3 #length of transmission line\n", + "\n", + "#calculation\n", + "x=200/Zo\n", + "y=150/Zo\n", + "a=0.4*Zo\n", + "b=0.57*Zo\n", + "\n", + "#result\n", + "print\"Zin = \",a,\"Ohm\",\"+j*\",b,\"Ohm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Zin = 40.0 Ohm +j* 57.0 Ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page no 599" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "import cmath\n", + "j=1j\n", + "RL=120 #load resistance from smith chart\n", + "ZL=complex(75,50) #load impedance\n", + "Z0=50.0 #characteristic impedance\n", + "\n", + "#calculation\n", + "import math\n", + "z1=ZL/Z0\n", + "z=2.4 #normalized z at a point that is purely resistive\n", + "ar=z*Z0 #actual resistance\n", + "x=math.sqrt(Z0*RL)\n", + "\n", + "#Result\n", + "print\"zl= \",z1\n", + "#VSWR,zin,R can be found out from smith chart manually\n", + "print\"characteristic impedance is =\",round(x,2),\"ohm\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "zl= (1.5+1j)\n", + "characteristic impedance is = 77.46 ohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page no 601" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "import cmath\n", + "Z0=75.0 #characteristic impedance\n", + "j=1j\n", + "ZL=complex(50,-100) #load impedance\n", + "\n", + "#Calculation\n", + "zL=ZL/Z0\n", + "#Result\n", + "print\"zL =\",zL\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "zL = (0.666666666667-1.33333333333j)\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter13.ipynb b/Modern_Electronics_Communication/chapter13.ipynb new file mode 100755 index 00000000..f28a3b72 --- /dev/null +++ b/Modern_Electronics_Communication/chapter13.ipynb @@ -0,0 +1,238 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:358c1b86e82f27b9eee799b4793457200c3f930f370a7e7347103331d9245d4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 Wave Propagation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page no 628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "x=(2*(1/2.0))\n", + "a=15\n", + "d=53.5*10**-6 #duration for each horizontal line on the reciever\n", + "t=1/186000.0 #time delay between direct and reflected signal\n", + "\n", + "#calculation\n", + "g=(t/d)*a #ghost width\n", + "\n", + "#result\n", + "print\"ghost width = \",round(g,2),\"in.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ghost width = 1.51 in.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page no 641" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "S=83 #satellite longitude in degrees\n", + "N=90 #site longitude in degrees\n", + "L=35 #site longitude in degrees\n", + "\n", + "#calculation\n", + "import math\n", + "b=0.1512 #constant in equation\n", + "A=180+math.atan(math.tan(-7*3.14/180)/math.sin(35*3.14/180))*180/3.14 \n", + "E=math.atan((math.cos((S-N)*3.14/180)*math.cos(L*3.14/180)-b)/math.sqrt(1-((math.cos(L*3.14/180))**2*(math.cos((S-N)*3.14/180))**2)))*180/3.14\n", + "\n", + "#Result\n", + "print\"The azimuth is equal to A = \",round(A,0),\"degree\"\n", + "print\"the elevation angle = \",round(E,1),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The azimuth is equal to A = 168.0 degree\n", + "the elevation angle = 48.7 degree\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page no 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "import math\n", + "x=(32+(44/60.0)+(36/3600.0)) # N latitude\n", + "y=(106+(16/60.0)+(37/3600.0)) #W longitude\n", + "D=42.1642*10**6 #distance from the satellite to the center of the earth\n", + "R=6.378*10**6 #earth's radius\n", + "a=32.74333*3.14/180.0 #in degree\n", + "B=-7.27694*3.14/180.0 #in degree\n", + "\n", + "#calculation\n", + "q=math.cos(a)*math.cos(B)\n", + "\n", + "d=math.sqrt(D**2+R**2-(2*D*R*q))\n", + "c=2.997925*10**5 #velocity of light\n", + "de=d/c\n", + "rd=(2*d)/c\n", + "\n", + "#result\n", + "print\"N longitude converted into degrees = \",round(x,2)\n", + "print\"W longitude coverted into degrees =\",round(y,2)\n", + "print\"distance = \",round(d/1000,1),\"*10**6 meters\"\n", + "print\"delay =\",round(de/1000,3),\"seconds\"\n", + "print\"roundtrip delay = \",round(rd/1000,3),\"seconds\" \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N longitude converted into degrees = 32.74\n", + "W longitude coverted into degrees = 106.28\n", + "distance = 37009.1 *10**6 meters\n", + "delay = 0.123 seconds\n", + "roundtrip delay = 0.247 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page no 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "G=45 #antenna gain\n", + "nt=25 #antenna noise temperature\n", + "nt1=70 #LNB noise temperature\n", + "nt2=2 #noise temperature(reciever and passive components)\n", + "\n", + "#calculation\n", + "import math\n", + "T=nt+nt1+nt2 #total noise temperature\n", + "x=G-10*math.log10(T) #figure of merit\n", + "\n", + "#result\n", + "print\"Sum of all of the noise temperature contributions Ts = \",T,\"k\"\n", + "print\"The figure of merit = \",round(x,2),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of all of the noise temperature contributions Ts = 97 k\n", + "The figure of merit = 25.13 dB\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page no 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "d=41.130383*10**6 #dismath.tance\n", + "c=2.997925*10**8 #velocity of light\n", + "f=14.25*10**9 #uplink frequency\n", + "\n", + "#calculation\n", + "import math\n", + "h=c/f #wavelength\n", + "x=(4*math.pi*d)/h\n", + "Lp=20*math.log10(x) #free-space path loss\n", + "\n", + "#result\n", + "print\"The wavelength is= \",round(h,2)\n", + "print\"Lp(dB)= \",round(Lp,2),\"dB\"\n", + "#INcorrect answer of h in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is= 0.02\n", + "Lp(dB)= 207.81 dB\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter14.ipynb b/Modern_Electronics_Communication/chapter14.ipynb new file mode 100755 index 00000000..39f00cfe --- /dev/null +++ b/Modern_Electronics_Communication/chapter14.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 Antennas" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page no 669" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c=3*10**8 #m/s , speed of light \n", + "f=150*10**6 #frequency\n", + "\n", + "#calculation\n", + "h=c/f\n", + "x=1/2.0 #antennas dimension(D)\n", + "D=0.5*2\n", + "Rff=5*D\n", + "h=c/f \n", + "D = h/2\n", + "\n", + "#result\n", + "print\" distance =\",Rff,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " distance = 5.0 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page no 669" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c=3*10**8 #velocity of light\n", + "f=12.0*10**9 #frequency\n", + "D=4.5 #diameter of parabolic reflector\n", + "\n", + "#calculation\n", + "h=c/f #wavelength\n", + "x=D/h\n", + "R=(2*D**2)/h\n", + "\n", + "#result\n", + "print\"distance from parabolic reflector= \",R,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance from parabolic reflector= 1620.0 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page no 671" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Pt=10 #transmitted power\n", + "#dipoles have gain 2.15dB \n", + "Gr=1.64\n", + "c=3*10**8 #velocity of light\n", + "f=144.0*10**6 #frequency\n", + "d=50*10**3 #distance between antennas\n", + "Gt=1.64 #recieving antenna gain(ratio) compared to isotropic radiator\n", + "\n", + "#calculation\n", + "import math\n", + "Pr=Pt*Gt*Gr*(c/f)**2/((16*(math.pi)**2)*(d**2)) #power recieved\n", + "\n", + "#result\n", + "print\"Power received = \",round(Pr,12),\"w\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power received = 2.96e-10 w\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4 Page no 674" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=3*10**8 #velocity of light\n", + "f=100*10**6 #frequency\n", + "\n", + "#Calculation\n", + "h=c/f #wavelength\n", + "x=h/2.0 #dipole i.e h/2\n", + "l=0.95*x #applying 95% correction,the actual optimum physical length\n", + "L=486/100.0 #alternative method to find length\n", + "\n", + "#Result\n", + "print\"length of antenna = \",l,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length of antenna = 1.425 m\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter16.ipynb b/Modern_Electronics_Communication/chapter16.ipynb new file mode 100755 index 00000000..ab90f6a3 --- /dev/null +++ b/Modern_Electronics_Communication/chapter16.ipynb @@ -0,0 +1,134 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 Microwaves and Lasers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 Page no 753" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "h=0.3 #curve depth of parabolic reflector\n", + "D=3 #diameter of parabolic reflector\n", + "\n", + "#calculation\n", + "f=D/(16*h) #focal \n", + "\n", + "#result\n", + "print\"The focal length is \",f,\" m out from the center of the parabolic reflector\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The focal length is 0.625 m out from the center of the parabolic reflector\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page no 755" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "D=3.0 #diameter of microwave dish\n", + "k=0.6 #efficiency of reflector\n", + "c=2.997925*10**8 #velocity of light\n", + "f=10.0*10**9 #frequency\n", + "\n", + "#calculation\n", + "import math\n", + "Ap=10*math.log10((c/f)*k*((math.pi*D)**2/(c/f)**2)) #powergain\n", + "B=(70*(c/f))/D #beamwidth\n", + "\n", + "#result\n", + "print\"beamwidth = \",round(B,3),\"micrometer\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "beamwidth = 0.7 micrometer\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 Page no 756" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "D=4.5 #diameter of parabolic reflector\n", + "k=0.62 #efficiency factor\n", + "\n", + "#calculation\n", + "import math\n", + "Ae=(k*math.pi)*(D/2.0)**2 #aperture efficiency\n", + "i=(math.pi*(D/2.0)**2) #ideal capture area\n", + "\n", + "#result\n", + "print\"The ideal capture area for\",D,\"m\",\"1f m parabolic antenna is\",round(i,3),\"sq.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ideal capture area for 4.5 m 1f m parabolic antenna is 15.904 sq.m\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter17.ipynb b/Modern_Electronics_Communication/chapter17.ipynb new file mode 100755 index 00000000..44c3e3d8 --- /dev/null +++ b/Modern_Electronics_Communication/chapter17.ipynb @@ -0,0 +1,96 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 Television" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 Page no 882" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw=5*10**6 #bandwidth\n", + "t=53.5*10**-6 #time allocated for each visible trace\n", + "\n", + "#calculation\n", + "T=2*bw*t #increase in horizontal resolution\n", + "\n", + "#result\n", + "print\"Thus, the total number of vertical lines resolvable is \",T,\"lines\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus, the total number of vertical lines resolvable is 535.0 lines\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 Page no 822" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw=5.0*10**6 #bandwidth\n", + "l=428 #horizontal resolution\n", + "\n", + "#calculation\n", + "t=l/(bw*2) #trace time\n", + "x=1/30.0 #time available for a full picture\n", + "y=t+10.0*10**-6 #assuming that 10us is used for horizontal blanking\n", + "n=x/y #no. of horizontal traces\n", + "c=600*0.7 #allowing 32 lines for vertical retrace\n", + "\n", + "#result\n", + "print\"vertical resolution = \",c,\"lines\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vertical resolution = 420.0 lines\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter18.ipynb b/Modern_Electronics_Communication/chapter18.ipynb new file mode 100755 index 00000000..fee42ea4 --- /dev/null +++ b/Modern_Electronics_Communication/chapter18.ipynb @@ -0,0 +1,216 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 Fibre Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1 Page no 859" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "c=3*10**8 #velocity of light\n", + "f=4.4*10**14 #frequency of red light\n", + "f1=7.0*10**14 #frequency of violet light\n", + "\n", + "#calculation\n", + "h1=c/f #wavelength of red light\n", + "h2=c/f1 #wavelength of violet light\n", + "\n", + "#result\n", + "print\"wavelenght for red= \",round(h1,9),\"m\"\n", + "print\"wavelngth for violet= \",round(h2,8),\"micron\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelenght for red= 6.82e-07 m\n", + "wavelngth for violet= 4.3e-07 micron\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2 Page no 862" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "n1=1.535 #refractive index of fibre optics\n", + "n2=1.490 #refractive index of cladding\n", + "\n", + "#calculation\n", + "import math\n", + "x=(n1**2)-(n2**2)\n", + "y=math.sqrt(x) #numerical aperture\n", + "z=math.asin(y)*180/3.14 #theta\n", + "\n", + "#result\n", + "print\"NA = \",round(y,3)\n", + "print\"(theta)in(max) = \",round(z,1),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NA = 0.369\n", + "(theta)in(max) = 21.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3 Page no 868" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "w=22 #spectral width of LED\n", + "l=2 #length of fibre\n", + "d=95 #dispersion value\n", + "p=d*w #pulse dispersion\n", + "pt=p*l #total pulse dispersion\n", + "\n", + "#result\n", + "print\"pulse dispersion = \",p,\"ps/km\"\n", + "print\"total pulse dispersion = \",pt,\"ps/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pulse dispersion = 2090 ps/km\n", + "total pulse dispersion = 4180 ps/km\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.4 Page no 885" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "d=30 #length of fibre cable\n", + "l=0.4 #loss\n", + "\n", + "#calculation\n", + "T=d*l #total cable loss\n", + "\n", + "#result\n", + "print\"total cable loss = \",T,\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total cable loss = 12.0 dB\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.5 Page no 887" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "b=565 #Line bit rate of fibre 1\n", + "c=3.5 #Cable dispersion of fibre 1\n", + "t=4 #Transmitter spectral width of fibre 1\n", + "b1=1130 #Line bit rate of fibre 2\n", + "c1=3.5 #Cable dispersion of fibre 2\n", + "t1=2 #Transmitter spectral width of fibre 2\n", + "x=440000 #assumed gaussian constant \n", + "\n", + "#calculation\n", + "L1=x/(b*c*t) #span length in km of fibre 1\n", + "L2=x/(b1*c1*t1) #span length in km of fibre 2\n", + "\n", + "#result \n", + "print\"span lenght of fibre 1= \",round(L1,2),\"Km\"\n", + "print\"span lenght of fibre 2= \",round(L2,2),\"Km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "span lenght of fibre 1= 55.63 Km\n", + "span lenght of fibre 2= 55.63 Km\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter6.ipynb b/Modern_Electronics_Communication/chapter6.ipynb new file mode 100755 index 00000000..2342c49f --- /dev/null +++ b/Modern_Electronics_Communication/chapter6.ipynb @@ -0,0 +1,98 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Frequency Modulation:Reception" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page no 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "G=200000 #voltage gain\n", + "v=200*10**-3 #quieting voltage\n", + "\n", + "#calculation\n", + "In=v/G\n", + "\n", + "#Result\n", + "print\"To reach quieting, the input must be \",In*10**6,\"microV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To reach quieting, the input must be 1.0 microV\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page no 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=10*10**6 #frequency\n", + "f1=50*10**3 #input frequency\n", + "f2=200*10**3 #output frequency\n", + "\n", + "#Calculatiion\n", + "x=f1*2\n", + "y=f2*2\n", + "\n", + "#Result\n", + "print\"The capture occurred at from the free-running VCO frequency.\",f1,\"Hz\"\n", + "print\"Assume symmetrical operation,which implies a capture range of \",x,\"Hz\"\n", + "print\"Once captured the VCO follows the input to a \",f2,\"Hz deviation,implying a lock range of \",y,\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capture occurred at from the free-running VCO frequency. 50000 Hz\n", + "Assume symmetrical operation,which implies a capture range of 100000 Hz\n", + "Once captured the VCO follows the input to a 200000 Hz deviation,implying a lock range of 400000 Hz\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter7.ipynb b/Modern_Electronics_Communication/chapter7.ipynb new file mode 100755 index 00000000..39f04dbf --- /dev/null +++ b/Modern_Electronics_Communication/chapter7.ipynb @@ -0,0 +1,243 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Communication Techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page no 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Q=60\n", + "IF=455*10**3\n", + "x=680.0*10**3\n", + "\n", + "#calculation\n", + "import math\n", + "imf=x+2*(IF) #image frequency\n", + "a=(imf/x)\n", + "b=(x/imf)\n", + "c=(Q*(a-b))\n", + "d=20*math.log10(c)\n", + "\n", + "#result\n", + "print\"The image frequency is \",imf,\"Hz\"\n", + "print\"image rejection = \",round(d,3),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The image frequency is 1590000.0 Hz\n", + "image rejection = 41.186 dB\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page no 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "NF=20.0\n", + "df=10**6\n", + "\n", + "#calculation\n", + "x=10*math.log10(df)\n", + "S=-174+NF+x\n", + "a=5 #input intercept\n", + "dr=2/3.0*(a-S)\n", + "\n", + "#result\n", + "print\"S= \",S,\"dB\"\n", + "print\"dynamic range= \",dr,\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S= -94.0 dB\n", + "dynamic range= 66.0 dB\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page no 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "nf=5.0\n", + "x=24.0\n", + "y=20.0\n", + "\n", + "#calculation\n", + "import math\n", + "NR0=10**(nf/10.0)\n", + "NR1=10**(y/10.0)\n", + "PG1=10**(x/10.0)\n", + "NR=NR0+((NR1-1)/PG1)\n", + "NF=10*math.log10(NR)\n", + "S=-174+NF+60\n", + "a=nf-x #the system's third-order intercept point \n", + "dr=2/3.0*(a-S)\n", + "\n", + "#result\n", + "print\"NR1 = \",round(NR0,3)\n", + "print\"NR2 = \",NR1\n", + "print\"PG1= = \",round(PG1,3)\n", + "print\"NR = \",round(NR,3),\"dB\"\n", + "print\"NF = \",round(NF,3),\"dB\" #total system noise figure\n", + "print\"S = \",round(S,3),\"dBm\" #sensitivity\n", + "print\"the systems third-order intercept point is\",a,\"dB\"\n", + "print\"dynamic range = \",round(dr,1),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NR1 = 3.162\n", + "NR2 = 100.0\n", + "PG1= = 251.189\n", + "NR = 3.556 dB\n", + "NF = 5.51 dB\n", + "S = -108.49 dBm\n", + "the systems third-order intercept point is -19.0 dB\n", + "dynamic range = 59.7 dB\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page no 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "x=24\n", + "nf=-5\n", + "NR = 3.16+(99/10.0)\n", + "\n", + "#calculation\n", + "import math\n", + "NF = 10*math.log10(NR)\n", + "S=-174+NF+60\n", + "dr = 2/3.0*(nf-S)\n", + "\n", + "#result\n", + "print\"NR = \",NR #noise ratio\n", + "print\"NF = \",round(NF,3),\"dB\" #noise figure\n", + "print\"S = \",round(S,3),\"dBm\" #sensitivity\n", + "print\"dynamic range = \",round(dr,3),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NR = 13.06\n", + "NF = 11.159 dB\n", + "S = -102.841 dBm\n", + "dynamic range = 65.227 dB\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page no 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "x=0.40*100*10**6\n", + "y=(100*10**6/(2.0**32))\n", + "#fCLK is reference oscillator\n", + "\n", + "#result\n", + "print\"The maximum output frequency is approximately 40 percent of fCLK MAX\",x,\"Hz\"\n", + "print\"The frequency resolution is given by \",round(y,3),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum output frequency is approximately 40 percent of fCLK MAX 40000000.0 Hz\n", + "The frequency resolution is given by 0.023 Hz\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter8.ipynb b/Modern_Electronics_Communication/chapter8.ipynb new file mode 100755 index 00000000..b7931b29 --- /dev/null +++ b/Modern_Electronics_Communication/chapter8.ipynb @@ -0,0 +1,190 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 8 Digital Communication-Coding Techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page no 357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "fa=20*10**3\n", + "\n", + "#calculation\n", + "fs=2*fa #minimum sample rate\n", + "\n", + "#result\n", + "print\"maximum sample rate\",\"is greater than equal to\",fs,\"Hz\" #frequency\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum sample rate is greater than equal to 40000 Hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page no 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "dr=55\n", + "\n", + "#calculation\n", + "import math\n", + "n=(dr/6.02)\n", + "l=2**10\n", + "y=10*math.log10(3*(l**2)) #signal-to-quantization-noise level\n", + "x=(1.76+(6.02*10)) #signal-to-noise ratio for digitizing system\n", + "\n", + "#result\n", + "print\"(S/N)q =\",round(y,2),\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(S/N)q = 64.98 dB\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page no 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "R=100.0*10**3 #resistance, ohm\n", + "Rf=10*10**3\n", + "Vref=-10 #reference voltage\n", + "\n", + "#calculation\n", + "Vo=-(Vref)*(Rf/R) # resolution\n", + "a=(10/100.0)\n", + "b=(10/50.0)\n", + "c=(10/25.0)\n", + "d=(10/12.5)\n", + "V=-(Vref)*(a+b+c+d) #output voltage\n", + "\n", + "#result\n", + "print\"The step-size is \",Vo\n", + "print\"output voltage = \",V,\"volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The step-size is 1.0\n", + "output voltage = 15.0 volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page no 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "d=2 #Dmin\n", + "d1=3\n", + "d2=4\n", + "\n", + "#calculation\n", + "x=d-1 \n", + "a=(d/2.0)-1\n", + "y=d1-1\n", + "b=1/2.0*(d1-1)\n", + "z=d2-1\n", + "c=(d2/2.0)-1 \n", + "#part (a)\n", + "\n", + "#result\n", + "print\"(a) the no. of error detected for the distance 2 is \",x\n", + "print\" the no. of errors corrected = \",a\n", + "print\"(b) the no. of error detected for the distance 3 is \",y\n", + "print\" the no. of errors corrected = \",b\n", + "print\"(c) the no. of error detected for the distance 4 is \",z\n", + "print\" the no. of errors corrected = \",c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) the no. of error detected for the distance 2 is 1\n", + " the no. of errors corrected = 0.0\n", + "(b) the no. of error detected for the distance 3 is 2\n", + " the no. of errors corrected = 1.0\n", + "(c) the no. of error detected for the distance 4 is 3\n", + " the no. of errors corrected = 1.0\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/chapter9.ipynb b/Modern_Electronics_Communication/chapter9.ipynb new file mode 100755 index 00000000..812fc2f5 --- /dev/null +++ b/Modern_Electronics_Communication/chapter9.ipynb @@ -0,0 +1,203 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 Wired Digital Communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page no 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "M=110\n", + "x=7.0\n", + "\n", + "#calculation\n", + "import math\n", + "a=math.log10(110)/(math.log10(2))\n", + "n=math.log(M)\n", + "b=2**a\n", + "u=(a/x)*100\n", + "y=math.log10(b)\n", + "u1=(y/3.0)*100\n", + "\n", + "#result\n", + "print\"the number of bits required = \",round(a,2) #number of bits\n", + "print\"The efficiency is \",round(u1,0),\"percent\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the number of bits required = 6.78\n", + "The efficiency is 68.0 percent\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page no 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "m=10**7\n", + "Pe=10**-6 #error probability\n", + "\n", + "#calculation\n", + "a=m*Pe #average number of errors\n", + "\n", + "#result\n", + "print\"expected number of errors =\",a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "expected number of errors = 10.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page no 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Tb=1/9600.0 #bit frequency\n", + "Pt=0.8 #transmit power\n", + "\n", + "#calculation\n", + "Eb=Pt*Tb #energy per bit\n", + "\n", + "#result\n", + "print\"Energy per bit = \",round(Eb,7),\"J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy per bit = 8.33e-05 J\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page no 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "bw=3*10**3 #bandwidth\n", + "x=1023 #signal-to-noise ratio\n", + "\n", + "#calculation\n", + "import math\n", + "C=bw*math.log(1+x)/math.log(2) #capacity of telephone channel\n", + "\n", + "#result\n", + "print\"the capacity of a telephone channel =\",C,\"bit per second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the capacity of a telephone channel = 30000.0 bit per second\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page no 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "Tb=1/(8.0*10**3) #bit frequency\n", + "BWmin=1/(2.0*Tb) #minimum bandwidth\n", + "\n", + "#result\n", + "print\"minimum bandwidth = \",BWmin,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum bandwidth = 4000.0 Hz\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Modern_Electronics_Communication/screenshots/2_3.png b/Modern_Electronics_Communication/screenshots/2_3.png new file mode 100755 index 00000000..f92e9c53 Binary files /dev/null and b/Modern_Electronics_Communication/screenshots/2_3.png differ diff --git a/Modern_Electronics_Communication/screenshots/3_2.png b/Modern_Electronics_Communication/screenshots/3_2.png new file mode 100755 index 00000000..e55d1484 Binary files /dev/null and b/Modern_Electronics_Communication/screenshots/3_2.png differ diff --git a/Modern_Electronics_Communication/screenshots/4_2.png b/Modern_Electronics_Communication/screenshots/4_2.png new file mode 100755 index 00000000..526dd950 Binary files /dev/null and b/Modern_Electronics_Communication/screenshots/4_2.png differ diff --git a/Principles_of_Power_System/README.txt b/Principles_of_Power_System/README.txt old mode 100644 new mode 100755 diff --git a/Principles_of_Power_System/chapter10_1.ipynb b/Principles_of_Power_System/chapter10_1.ipynb deleted file mode 100644 index 50a55400..00000000 --- a/Principles_of_Power_System/chapter10_1.ipynb +++ /dev/null @@ -1,1146 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a3dcc0814e961bf1cd3db74adc66300f1f3d1872ea1c97bd01480f29b5cfe9db" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10: Performance of Transmission\n", - "Lines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.1, Page Number: 233" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "pf = 0.8 #power factor\n", - "Z = 10+15j #load impedance(ohm)\n", - "magVr = 33000 #receiving end voltage(V)\n", - "P = 1100 #poweer delivered(kW)\n", - "\n", - "#Calculation:\n", - "magI = P*1000/(magVr*pf) #line current(A)\n", - "phy = math.acos(pf)\n", - "Vr = magVr+0j #V\n", - "I = magI*(math.cos(phy)-math.sin(phy)*1j) #A\n", - "Vs = Vr + I*Z\n", - "\n", - "#Angle between Vs and Vr is\n", - "alpha = math.atan(Vs.imag/Vs.real)\n", - "phys = phy+alpha\n", - "pfs = math.cos(phys)\n", - "Pl = magI**2*Z.real/1000\n", - "Pi = P+Pl\n", - "n = P/Pi*100\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Sending end voltage is\",round(abs(Vs)),\"V\"\n", - "print \"(ii) sending end power factor is\",round(pfs,4),\"lagging\"\n", - "print \"(iii)Transmission efficiency is\",round(n,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Sending end voltage is 33709.0 V\n", - "(ii) sending end power factor is 0.7955 lagging\n", - "(iii)Transmission efficiency is 98.45 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.2, Page Number: 235" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "a = 0.775 #cross-section of conductor(cm**2)\n", - "n = 0.9 #transmission efficiency\n", - "Pr = 200000 #receiving end power(W)\n", - "pf = 1 #power factor\n", - "V = 3300 #line voltage(V)\n", - "ro = 1.725 #specific resistance(micro_ohm-cm)\n", - "\n", - "\n", - "#Calculation:\n", - "Ps = Pr/n #sending end power(W)\n", - "Pl = Ps-Pr #line loss(W)\n", - "I = Pr/(V*pf) #line current(A)\n", - "R = Pl/(2*I**2) #resistance of 1 conductor(ohm)\n", - "l = R*a/(ro*10**-6) #length of conductor(cm)\n", - "\n", - "\n", - "#Result:\n", - "print \"The conductor length is\",round(l*10**-5,1),\"km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The conductor length is 13.6 km\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.3, Page Number: 235" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "pf = 0.8 #power factor\n", - "Pr = 5000 #receiving end power(kW)\n", - "Vr = 22 #receiving end voltage(kV)\n", - "Z = 4+6j #impedance of each conductor(ohm)\n", - "\n", - "#Calculation:\n", - "phy = math.acos(pf)\n", - "magVrp = Vr*1000/3**0.5 #sending end voltage/phase(kV)\n", - "magI = Pr*1000/(3*magVrp*0.8) #Line current(A)\n", - "Vr = magVrp+1j \n", - "I = magI*(math.cos(phy)-math.sin(phy)*1j)\n", - "\n", - "#(i)Sending end voltage per phase:\n", - "Vs = magVrp+I*Z\n", - "Vsl = abs(Vs)*3**0.5 #V\n", - "\n", - "#(ii)\n", - "reg = (abs(Vs)-magVrp)/magVrp*100 #voltage regulation(%)\n", - "#(iii)\n", - "Pl = 3*abs(I)**2*Z.real/1000 #line loss(kW)\n", - "n = Pr/(Pr+Pl)*100 #transmission efficiency(%)\n", - "\n", - "#Result:\n", - "print \"(i) Sending end voltage is\",round(abs(Vsl)/1000,3),\"kV\"\n", - "print \"(ii)Percentage regulation is\",round(reg,3),\"%\"\n", - "print \"(iii)Transmission efficiency\",round(n,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Sending end voltage is 23.942 kV\n", - "(ii)Percentage regulation is 8.825 %\n", - "(iii)Transmission efficiency 93.93 %\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.4, Page Number: 236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "Pr = 15000 #power delivered(kW)\n", - "Vl = 132 #line voltage(kV)\n", - "Ro = 1 #line resistance(ohm/km)\n", - "pf = 0.8 #power factor\n", - "\n", - "#Calculation:\n", - "I = Pr/(3**0.5*Vl*pf) #line current(A)\n", - "#the loss in the transmission is to be 5%.\n", - "Pl = 5*Pr/100 #kW\n", - "R = Pl*1000/(3*I**2) #line resistance(ohm)\n", - "d = R/Ro #line length(km)\n", - "\n", - "#Result:\n", - "print \"Length of line is\",round(d,2),\"km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Length of line is 37.17 km\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.5, Page Number: 236" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "pf = 0.8 #power factor\n", - "Pr = 3600 #sending end power(kW)\n", - "magVs = 33 #receiving end voltage(kV)\n", - "Z = 5.31+5.54j #impedance of each conductor(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "R = Z.real #ohm\n", - "X = Z.imag #ohm\n", - "phy = math.acos(0.8)\n", - "magVsp = magVs*1000/(3**0.5) #V/phase\n", - "magVr = symbols('magVr') #Receiving end voltage(V/phase)\n", - "magI = Pr*1000/(3*magVr*pf) #line current(A)\n", - "\n", - "#(i)Using approximate expression for magVsp,\n", - "magVr1 = solve((magVr+magI*R*pf+magI*X*math.sin(phy))-magVsp,magVr)[1]\n", - "\n", - "#(ii)line current:\n", - "magI1 = Pr*1000/(3*magVr1*pf) \n", - "\n", - "#(iii)Efficiency\n", - "Pl = 3*magI1**2*R/1000 #kW\n", - "n = Pr/(Pr+Pl)*100\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The receiving end voltage \",round(magVr1*3**0.5/1000,2),\"V\"\n", - "print \"(ii) Line current is\",round(magI1,2),\"A\"\n", - "print \"(iii)Transmission efficiency is\",round(n,2),\"%\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The receiving end voltage 31.93 V\n", - "(ii) Line current is 81.36 A\n", - "(iii)Transmission efficiency is 97.15 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.6, Page Number: 237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Z = 6+8j #line impedance(ohm)\n", - "magVs = 120 #sending end voltages(kV)\n", - "magVr = 110 #receiving end voltaes(kV)\n", - "pf = 0.9 #power factor\n", - "\n", - "\n", - "#Calculation:\n", - "R = Z.real #ohm\n", - "X = Z.imag #ohm\n", - "magVsp = round(120*1000/3**0.5) #V/phase\n", - "magVrp = round(110*1000/3**0.5) #V/phase\n", - "phy = math.acos(pf)\n", - "magI = symbols('magI') #line current(A)\n", - "magI1 = solve(magVrp+magI*R*math.cos(phy)+magI*X*math.sin(phy)-magVsp,magI)[0]\n", - "\n", - "#(i):\n", - "Po = 3*magVrp*round(magI1)*math.cos(phy)/1000 #kW\n", - "\n", - "#(ii):\n", - "pfs = (magVrp*math.cos(phy)+magI1*R)/magVsp\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Power output is\",round(Po),\"kW\"\n", - "print \"(ii)Sending end power factor\",round(pfs,2),\"lagging\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Power output is 111458.0 kW\n", - "(ii)Sending end power factor 0.88 lagging\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.7, Page Number: 237" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "Z = 1.5+4j #impedance of the line(ohm)\n", - "magVr = 11000 #receivig end voltage(V)\n", - "pf = 0.8 #power factor\n", - "Pr = 5000 #power delivered()\n", - "\n", - "\n", - "#Calculation:\n", - "R = Z.real #ohm\n", - "X = Z.imag #ohm\n", - "magVrp = magVr/3**0.5 #V/phase\n", - "phy = math.acos(pf)\n", - "magI = Pr*1000/(3*magVrp) #line current(A)\n", - "magVsp = magVrp+magI*R*pf+magI*X*math.sin(phy) #Volt\n", - "reg = (magVsp - magVrp)/magVrp*100 #voltage regulation(%)\n", - "Pl = 3*magI**2*R/1000 #line losses(kW)\n", - "Po = Pr*pf #output power(W)\n", - "Pi = Po + Pl #Input Power(kW)\n", - "n = Po/Pi*100 #efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"The % regulation is\",round(reg,2),\"%\"\n", - "print \"The efficiency is\",round(n,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The % regulation is 14.88 %\n", - "The efficiency is 92.8 %\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.8, Page Number: 238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Pr = 1000 #power delivered(kW)\n", - "pf = 0.8 #power factor\n", - "r = 0.03 #line resistance per phase(ohm/km)\n", - "L = 0.7 #line inductance per phase(mH)\n", - "l = 16 #line length(km)\n", - "magVr = 11000 #receiving line voltage(V)\n", - "f = 50 #power frequency(Hz)\n", - "\n", - "#Calculation:\n", - "R = r*l #line resistance(ohm)\n", - "X = 2*3.14*f*L/1000*l #line reactance(ohm)\n", - "magVrp = round(magVr/3**0.5) #receiving end (v/phase)\n", - "phy = math.acos(pf)\n", - "magI = round(Pr*1000/(3*magVrp*math.cos(phy)),1) #line current(A)\n", - "magVsp = magVrp+magI*R*math.cos(phy)+magI*X*math.sin(phy)\n", - "reg = (magVsp-magVrp)/magVrp*100 #Volt\n", - "Pl = round(3*magI**2*R/1000,1) #line losses(kW)\n", - "Pi = Pr + Pl #Input Power(kW)\n", - "n = Pr/Pi*100 #efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"The % regulation is\",round(reg,2),\"%\"\n", - "print \"The efficiency is\",round(n,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The % regulation is 2.58 %\n", - "The efficiency is 99.38 %\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.9, Page Number: 238" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable Declaration:\n", - "Pr = 2000 #load power(kVA)\n", - "pf = 0.8 #power factor\n", - "l = 20 #line length(km)\n", - "r1 = 7.5; x1 = 13.2 #resistance & reactance of transformer primary(ohm)\n", - "r2 = 0.35; x2 = 0.65 #resistance & reactance of transformer secondary(ohm)\n", - "r = 0.4; x = 0.5 ##resistance & reactance of line(ohm/km)\n", - "Vp = 33*1000 #voltage at primary side(kV)\n", - "Vs = 6.6*1000 #voltage at secondary side(kV)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "R = l*r #resistance of each conuctor(ohm)\n", - "X = l*x #reactance of each conductor(ohm)\n", - "phy = math.acos(pf)\n", - "#Let us transfer the impedance of transformer secondary\n", - "#to high tension side i.e., 33 kV side.\n", - "#Equivalent resistance of transformer referred to 33 kV side:\n", - "R1 = r1 + r2*(Vp/Vs)**2 #ohm\n", - "\n", - "#Equivalent resistance of transformer referred to 33 kV side:\n", - "X1 = x1+ x2*(Vp/Vs)**2 #ohm\n", - "\n", - "\n", - "Rt = R+R1 #Total resistance of line and transformer(ohm)\n", - "Xt = X+X1 #Total reactance of line and transformer(omh)\n", - "Vr = Vp/3**0.5 #receiving end voltage(V/phase)\n", - "I = round(Pr*1000/(3**0.5*Vp)) #line current(A)\n", - "Vs = Vr+I*Rt*math.cos(phy)+I*Xt*math.sin(phy) #sending end voltage(V)\n", - "Vsl = 3**0.5*Vs #sending end line voltage(V)\n", - "pfs = (Vr*pf+I*Rt)/Vs #sending end power factor\n", - "Pl = 3*I**2*Rt/1000 #line loss(kW)\n", - "Po = Pr*pf #output power(kW)\n", - "n = Po/(Po+Pl)*100 #transmission efficiency(%)\n", - "\n", - "#Result:\n", - "print \"Sending end line voltage is\",round(Vsl/1000,1),\"V\"\n", - "print \"Sending end power factor is\",round(pfs,4)\n", - "print \"Transmission efficiency is\",round(n,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sending end line voltage is 35.6 V\n", - "Sending end power factor is 0.7826\n", - "Transmission efficiency is 94.72 %\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.10, Page Number: 241" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 0.25 #resistance of line(ohm/km)\n", - "l = 100 #line length(km)\n", - "x = 0.8 #Reactance(ohm/km)\n", - "y = 14*10**-6 #susceptance(siemen/km)\n", - "magVr = 66000 #Receiving end line voltage(V)\n", - "Pr = 15000 #power delivered(kW)\n", - "pf = 0.8 #power factor(lagging)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "R = r*l #ohm\n", - "X = x*l #ohm\n", - "Y = y*l #siemen\n", - "magI = Pr*1000/(pf*magVr) #line current(A)\n", - "phy = math.acos(pf) #phasor angle\n", - "Vr = magVr+0j #Volt\n", - "Ir = round(magI*pf)-round(magI*math.sin(phy))*1j #load current(A)\n", - "Ic = 1j*round(Y*magVr)\n", - "\n", - "#(i):\n", - "Is = Ir+Ic #Sending end current(A)\n", - "\n", - "#(ii):\n", - "delV = Is*(R+X*1j) #voltage rop(V)\n", - "Vs = Vr+delV #sending end voltage(V)\n", - "reg = (abs(Vs)-magVr)/magVr*100 #voltage regulation(%)\n", - "\n", - "#phase angle between Vr & Ir:\n", - "theta1 = math.atan(Is.imag/Is.real)\n", - "\n", - "#phase angle between Vr & Is:\n", - "theta2 = math.atan(Vs.imag/Vs.real)\n", - "\n", - "phys = abs(theta1)+theta2\n", - "pfs = math.cos(phys) #supply power factor\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The sending end current is\",round(abs(Is)),\"A\"\n", - "print \"(ii) The sending end voltage is\",round(abs(Vs)),\"V\"\n", - "print \"(iii)Regulation is\",round(reg,2),\"%\"\n", - "print \"(iv) Supply power factor is\",round(pfs,2),\"lagging\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The sending end current is 240.0 A\n", - "(ii) The sending end voltage is 79583.0 V\n", - "(iii)Regulation is 20.58 %\n", - "(iv) Supply power factor is 0.86 lagging\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.11, Page Number: 244" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "l = 100 #line length(km)\n", - "r = 0.1 #resistance/km/phase(ohm)\n", - "xl = 0.2 #reactance/km/phase(ohm)\n", - "b = 0.04*10**-4 #Capacitive susceptance/km/phase(siemen)\n", - "Pr = 10000 #power delivered(kW)\n", - "Vrl = 66000 #sending end line volt(V)\n", - "pf = 0.8 #power factor(lagging)\n", - "\n", - "\n", - "#Calculation:\n", - "R = r*l #Total resistance/phase(ohm)\n", - "Xl = xl*l #Total reactance/phase(ohm)\n", - "Y = b*l #Capacitive susceptance(siemen)\n", - "magVr = round(Vrl/3**0.5) #Receiving end voltage/phase(V)\n", - "magIr = round(Pr*1000/(3**0.5*Vrl*pf)) #Load current(A)\n", - "phy = math.acos(pf)\n", - "Z = R+Xl*1j #Impedance per phase(ohm)\n", - "#(i) Taking receiving end voltage as the reference phasor,\n", - "Vr = magVr+0j\n", - "Ir = magIr*(pf-math.sin(phy)*1j) #A\n", - "V1 = Vr+Ir*Z/2 #Voltage across C(V)\n", - "Ic = 1j*Y*V1 #Charging current(A)\n", - "Is = Ir+Ic #sending end current(A)\n", - "\n", - "\n", - "#(ii) Sending end voltage,\n", - "Vs = V1+Is*Z/2 #V\n", - "magVsl = 3**0.5*abs(Vs) #Line value of sending end voltage(V)\n", - "\n", - "#(iii) Referring to phasor diagram (iii),\n", - "theta1 = math.atan(Vs.imag/Vs.real) #angle between Vr & Vs\n", - "theta2 = math.atan(abs(Is.imag/Is.real)) #angle between Vr & Is\n", - "phys = theta1+theta2 #angle b/w Vs & Is\n", - "\n", - "pfs = math.cos(phys) #Sending end power factor\n", - "\n", - "#(iii):\n", - "Ps = 3*abs(Vs)*abs(Is)*pfs/1000 #Sending end power(kW)\n", - "n = Pr/Ps*100 #Efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The sending end current is\",round(abs(Is)),\"A\"\n", - "print \"(ii) Sending end voltage is\",round(magVsl/1000,3),\"kV\"\n", - "print \"(iii)Sending end power factor is\",round(pfs,3),\"lagging\"\n", - "print \"(iv) Transmission efficiency is\",round(n,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The sending end current is 100.0 A\n", - "(ii) Sending end voltage is 69.532 kV\n", - "(iii)Sending end power factor is 0.853 lagging\n", - "(iv) Transmission efficiency is 97.12 %\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.12, Page Number: 245" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "l = 100 #line length(km)\n", - "r = 0.2 #resistance/km/phase(ohm)\n", - "xl = 0.4 #reactance/km/phase(ohm)\n", - "b = 2.5*10**-6 #Capacitive susceptance/km/phase(siemen)\n", - "Pr = 20000 #power delivered(kW)\n", - "Vrl = 110000 #sending end line volt(V)\n", - "pf = 0.9 #power factor\n", - "\n", - "\n", - "#Calculation:\n", - "R = r*l #Total resistance/phase(ohm)\n", - "Xl = xl*l #Total reactance/phase(ohm)\n", - "Y = b*l #Capacitive susceptance(siemen)\n", - "magVr = round(Vrl/3**0.5) #Receiving end voltage/phase(V)\n", - "magIr = round(Pr*1000/(3**0.5*Vrl*pf)) #Load current(A)\n", - "phy = math.acos(pf)\n", - "Z = R+Xl*1j #Impedance per phase(ohm)\n", - "\n", - "#(i) Taking receiving end voltage as the reference phasor,\n", - "Vr = magVr+0j\n", - "Ir = magIr*(pf-(math.sin(phy))*1j) #A\n", - "V1 = Vr+Ir*Z/2 #Voltage across C(V)\n", - "Ic = 1j*Y*V1 #Charging current(A)\n", - "Is = Ir+Ic #sending end current(A)\n", - "Vs = V1+Is*Z/2 #V\n", - "magVsl = 3**0.5*abs(Vs) #Line value of sending end voltage(V)\n", - "\n", - "#(ii):\n", - "Pl = 3*abs(Is)**2*R/2+3*magIr**2*R/2 #line loss(W)\n", - "n = Pr/(Pr+Pl/1000)*100 #efficiency\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The current and voltage at the sending end is\",round(magVsl/1000,2),\"kV\"\n", - "print \"(ii)Efficiency of transmission is\",round(n,2),\"%\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The current and voltage at the sending end is 116.75 kV\n", - "(ii)Efficiency of transmission is 96.26 %\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.13, Page Number: 247" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "l = 150 #line length(km)\n", - "r = 0.1 #resistance/km/phase(ohm)\n", - "xl = 0.5 #reactance/km/phase(ohm)\n", - "b = 3*10**-6 #Capacitive susceptance/km/phase(siemen)\n", - "Pr = 50000 #power delivered(kW)\n", - "Vrl = 110000 #sending end line volt(V)\n", - "pf = 0.8 #power factor\n", - "\n", - "\n", - "#Calculation:\n", - "R = r*l #Total resistance/phase(ohm)\n", - "Xl = xl*l #Total reactance/phase(ohm)\n", - "Y = b*l #Capacitive susceptance(siemen)\n", - "magVr = round(Vrl/3**0.5) #Receiving end voltage/phase(V)\n", - "magIr = round(Pr*1000/(3**0.5*Vrl*pf)) #Load current(A)\n", - "phy = math.acos(pf)\n", - "Z = R+Xl*1j #Impedance per phase(ohm)\n", - "\n", - "Vr = magVr+0j\n", - "Ir = magIr*(pf-(math.sin(phy))*1j) #A\n", - "Ic1 = Vr*1j*Y/2 #Charging current at the load end(A)\n", - "Il = Ir+Ic1 #line current(A)\n", - "Vs = Vr+Il*Z #Sending end voltage(V)\n", - "magVsl = abs(Vs)*3**0.5 #Line to line sending end voltage(V)\n", - "Ic2 = 1j*Vs*Y/2 #Charging current at the sending end(A)\n", - "Is = Il+Ic2 #Sending end current(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The sending end voltage is\",round(magVsl/1000,2),\"V\"\n", - "print \"The sending end current is\",round(abs(Is),1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sending end voltage is 143.56 V\n", - "The sending end current is 306.3 A\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.14, Page Number: 248" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable Declaration:\n", - "l = 100 #line length(km)\n", - "r = 0.1 #resistance/km/phase(ohm)\n", - "xl = 0.5 #reactance/km/phase(ohm)\n", - "b = 10*10**-6 #Capacitive susceptance/km/phase(siemen)\n", - "Pr = 20000 #power delivered(kW)\n", - "Vrl = 66000 #sending end line volt(V)\n", - "pf = 0.9 #power factor\n", - "\n", - "\n", - "#Calculation:\n", - "R = r*l #Total resistance/phase(ohm)\n", - "Xl = xl*l #Total reactance/phase(ohm)\n", - "Y = b*l #Capacitive susceptance(siemen)\n", - "magVr = round(Vrl/3**0.5) #Receiving end voltage/phase(V)\n", - "magIr = round(Pr*1000/(3**0.5*Vrl*pf)) #Load current(A)\n", - "phy = math.acos(pf)\n", - "Z = R+Xl*1j #Impedance per phase(ohm)\n", - "\n", - "Vr = magVr+0j\n", - "Ir = magIr*(pf-(math.sin(phy))*1j) #A\n", - "Ic1 = round(magVr*Y/2)*1j #Charging current at the load end(A)\n", - "Il = Ir+Ic1 #line current(A)\n", - "Vs = Vr+Il*Z #Sending end voltage(V)\n", - "magVsl = abs(Vs)*3**0.5 #Line to line sending end voltage(V)\n", - "Ic2 = 1j*Vs*Y/2 #Charging current at the sending end(A)\n", - "Is = Il+Ic2 #Sending end current(A)\n", - "\n", - "#(i):\n", - "theta1 = math.atan(Vs.imag/Vs.real) #angle between Vr & Vs\n", - "theta2 = math.atan(abs(Is.imag/Is.real)) #angle between Vr & Is\n", - "phys = theta1+theta2 #angle b/w Vs & Is\n", - "pfs = math.cos(phys) #Sending end power factor\n", - "\n", - "#(ii):\n", - "reg = (abs(Vs)-magVr)/magVr*100 #voltage regulation(%)\n", - "\n", - "#(iii):\n", - "Ps = 3*abs(Vs)*abs(Is)*pfs/1000 #sending end power(W)\n", - "n = Pr/Ps*100 #transmission efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Sending end power factor is\",round(pfs,3),\"lagging\"\n", - "print \"(ii) Regulation is\",round(reg,2),\"%\"\n", - "print \"(iii)Transmission efficiency is\",round(n),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Sending end power factor is 0.906 lagging\n", - "(ii) Regulation is 15.15 %\n", - "(iii)Transmission efficiency is 95.0 %\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - " Example 10.15, Page Number: 254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import cmath\n", - "\n", - "#Variable Declaration:\n", - "l = 200 #line length(km)\n", - "r = 0.16 #resistance/km/phase(ohm)\n", - "xl = 0.25 #reactance/km/phase(ohm)\n", - "b = 1.5*10**-6*1j #Capacitive susceptance/km/phase(siemen)\n", - "Pr = 20000 #power delivered(kW)\n", - "Vrl = 110000 #sending end line volt(V)\n", - "pf = 0.8 #power factor\n", - "\n", - "#Calculation:\n", - "R = r*l #Total resistance/phase(ohm)\n", - "Xl = xl*l #Total reactance/phase(ohm)\n", - "Y = b*l #Capacitive susceptance(siemen)\n", - "Z = R+Xl*1j #Series Impedance/phase(ohm)\n", - "magVr = Vrl/3**0.5 #Receiving end voltage per phase(V)\n", - "magIr = round(Pr*1000/(3**0.5*Vrl*pf)) #Receiving end current(A)\n", - "Vs = magVr*cmath.cosh((Y*Z)**0.5)+magIr*(Z/Y)**0.5*cmath.sinh((Z*Y)**0.5) #sending end voltage(V/phase)\n", - "Is = magVr*(Y/Z)**0.5*cmath.sinh((Y*Z)**0.5)+magIr*cmath.cosh((Y*Z)**0.5)\n", - "\n", - "\n", - "#Result:\n", - "print \"Sending end line-to-line voltage is\",round(3**0.5*abs(Vs)/1000,1),\"V\"\n", - "print \"Sending end current is\",round(abs(Is),1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sending end line-to-line voltage is 117.0 V\n", - "Sending end current is 131.5 A\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.16, Page Number: 258" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "Z = 20+52j #Series line impedance/phase(ohm)\n", - "Y = 315*10**-6*1j #Shunt admittance/phase(siemen)\n", - "pf = 0.85 #power factor\n", - "Pr = 30000 #receiving end power(kW)\n", - "magVrl = 132000 #receiving end voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) Generalised constants of line,\n", - "A = 1+Z*Y/2\n", - "D = A\n", - "B = Z*(1+Z*Y/4)\n", - "C = Y\n", - "\n", - "#(ii) Sending end voltage,\n", - "magVr = magVrl/3**0.5 #V/phase\n", - "magIr = Pr*1000/(3**0.5*magVrl*pf) #line current(A)\n", - "phy = math.acos(pf)\n", - "Vr = magVr+0j\n", - "Ir = magIr*(math.cos(phy)-1j*math.sin(phy))\n", - "Vs = A*Vr+B*Ir\n", - "magVs = abs(Vs) #sending end voltage(V/phase)\n", - "magVsl = 3**0.5*magVs #Sending end line-to-line voltage(V)\n", - "\n", - "\n", - "#(iii) Regulation:\n", - "#At no load, Ir = 0,\n", - "magVro = abs(Vs/A)\n", - "reg = (magVro-magVr)/magVr*100 #regulation(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i)The A, B, C and D constants of the line are\"\n", - "print \" A =\",complex(round(A.real,3),round(A.imag,5))\n", - "print \" B =\",complex(round(B.real,2),round(B.imag,2))\n", - "print \" C =\",complex(round(C.real,6),round(C.imag,6))\n", - "print \" D =\",complex(round(D.real,3),round(D.imag,5))\n", - "\n", - "print \"(ii) Sending end voltage is\",round(magVs*3**0.5/1000),\"kV\"\n", - "print \"(iii)Regulation of the line is\",round(reg,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)The A, B, C and D constants of the line are\n", - " A = (0.992+0.00315j)\n", - " B = (19.84+51.82j)\n", - " C = 0.000315j\n", - " D = (0.992+0.00315j)\n", - "(ii) Sending end voltage is 143.0 kV\n", - "(iii)Regulation of the line is 9.25 %\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.17, Page Number: 259" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "A = cmath.rect(0.95,math.radians(1.4))\n", - "B = cmath.rect(96,math.radians(78))\n", - "C = cmath.rect(0.0015,math.radians(90))\n", - "D = cmath.rect(0.95,math.radians(1.4))\n", - "Pr = 50000 #receiving end power(kW)\n", - "pf = 0.8 #power factor\n", - "magVrl = 132000 #receiving end voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "magVr = magVrl/3**0.5 #Receiving end voltage/phase(V)\n", - "magIr = Pr*1000/(3**0.5*magVrl*pf) #line current(A)\n", - "phy = math.acos(pf)\n", - "Vr = magVr+0j\n", - "Ir = magIr*(math.cos(phy)-1j*math.sin(phy))\n", - "Vs = A*Vr+B*Ir #Sending end voltage per phase\n", - "Is = C*Vr+D*Ir #Sending end current\n", - "Ic = Is-Ir #Charging current\n", - "#At no load, Ir = 0,\n", - "magVro = abs(Vs/A)\n", - "reg = (magVro-magVr)/magVr*100 #regulation(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"Charging current is (\",round(abs(Ic)),round(math.degrees(angle(Ic)),1),\") A\"\n", - "print \"Regulation is\",round(reg),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Charging current is ( 128.0 93.2 ) A\n", - "Regulation is 30.0 %\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 10.18, Page Number: 260" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "A = cmath.rect(0.98,math.radians(3))\n", - "B = cmath.rect(110,math.radians(75))\n", - "C = cmath.rect(0.0005,math.radians(80))\n", - "D = cmath.rect(0.98,math.radians(3))\n", - "MVA = 50 #receiving end power\n", - "pf = 0.8 #power factor\n", - "magVrl = 110 #receiving end voltage(kV)\n", - "\n", - "\n", - "#Calculation:\n", - "Pr = MVA*pf*10**6\n", - "magVr = round(magVrl/3**0.5,1) #Receiving end voltage/phase(V)\n", - "magIr = round(MVA*10**6/(3**0.5*magVrl*1000),1) #line current(A)\n", - "phy = math.acos(pf)\n", - "Vr = magVr*1000+0j\n", - "Ir = magIr*(math.cos(phy)-1j*math.sin(phy))\n", - "#(round(Ir.real)+1j*round(Ir.imag))\n", - "V1 = round((A*Vr).real)+math.ceil((A*Vr).imag)*1j\n", - "V2 = round((B*Ir).real)+math.ceil((B*Ir).imag)*1j\n", - "Vs = V1+V2 #Sending end voltage per phase\n", - "theta1 = math.atan(Vs.imag/Vs.real)\n", - "Is = C*Vr+D*Ir #Sending end current\n", - "theta2 = math.atan(Is.imag/Is.real)\n", - "phys = theta2-theta1\n", - "Ps = 3*abs(Vs)*abs(Is)*math.cos(phys) #Sending-end power(W)\n", - "n = Pr/Ps*100 #efficiency(%)\n", - "\n", - "#Result:\n", - "print \"(i) Sending end voltage is\",round(abs(Vs)),\"V\"\n", - "print \"(ii) Sending end current is\",round(abs(Is)),\"A\"\n", - "print \"(iii)Sending-end power is\",round(Ps/10**6,1),\"MW\"\n", - "print \"(iv) Transmission efficiency is\",round(n,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Sending end voltage is 87429.0 V\n", - "(ii) Sending end current is 246.0 A\n", - "(iii)Sending-end power is 48.7 MW\n", - "(iv) Transmission efficiency is 82.2 %\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter11_1.ipynb b/Principles_of_Power_System/chapter11_1.ipynb deleted file mode 100644 index 2283037e..00000000 --- a/Principles_of_Power_System/chapter11_1.ipynb +++ /dev/null @@ -1,1185 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1fe403fe815d4353da157ba9f671fac5bd27f5ac7842de08db777bc86330d8e5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11: Underground Cables" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.1, Page Number: 273" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r1 = 0.5 #conductor radius(cm)\n", - "l = 2000 #conductor length(m)\n", - "rho = 5*10**12 #Resistivity of insulation(ohm-m)\n", - "t = 0.4 #insulation thickness(cm)\n", - "\n", - "\n", - "#Calculation:\n", - "r2 = r1+t #Internal sheath radius(cm)\n", - "R = rho*math.log(r2/r1)/(2*math.pi*l) #Insulation resistance of cable(ohm)\n", - "\n", - "\n", - "#Result:\n", - "print \"Insulation resistance of cable is\",round(R/10**6),\"Mohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Insulation resistance of cable is 234.0 Mohm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.2, Page Number: 274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "r1 = 1.25 #conductor radius(cm)\n", - "l = 1000 #conductor length(m)\n", - "rho = 4.5*10**12 #Resistivity of insulation(ohm-m)\n", - "R = 495*10**6 #Cable insulation resistance(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let r2 cm be the internal sheath radius,\n", - "\n", - "r2 = r1*math.exp(R*2*math.pi*l/rho)\n", - "\n", - "#Result:\n", - "print \"Insulation thickness is\",round(r2-r1,2),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Insulation thickness is 1.25 cm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.3, Page Number: 274" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "r1 = .10 #conductor radius(cm)\n", - "l = 5000 #conductor length(m)\n", - "r2 = 0.25 #Internal sheath radius(cm)\n", - "R = 0.4*10**6 #Cable insulation resistance(ohm)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "rho = R*2*3.14*l/(math.log(r2/r1)*10**9) #resistivity(ohm-m)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Resistivity of the insulating material is\",round(rho,2),\"* 10**9 ohm-m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistivity of the insulating material is 13.71 * 10**9 ohm-m\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.4, Page Number: 275" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Calculation:\n", - "er = 4 #relative permittivity\n", - "D = 1.8 #internal sheath diameter(cm)\n", - "l = 1000 #cable length(m)\n", - "d = 1 #conductor diameter(cm)\n", - "\n", - "\n", - "#Calculation:\n", - "C = er*l/(41.4*math.log10(D/d))*10**-9 #Capacitance(F)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The capacitance of the cable is\",round(C*10**6,3),\"uF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The capacitance of the cable is 0.378 uF\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.5, Page Number: 276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "er = 4 #relative permittivity\n", - "d = 10 #core diameter(cm)\n", - "l = 1000 #cable length(m)\n", - "t = 7 #insulation thickness(cm)\n", - "Vl = 66000 #line voltage(V)\n", - "f = 50 #frequency(Hz)\n", - "\n", - "\n", - "#Calculation:\n", - "D = d+2*t #conductor diameter(cm)\n", - "C = 4*1000/(41.4*math.log10(D/d))*10**-3 #Capacitance(uF)\n", - "\n", - "Vp = Vl/3**0.5\n", - "I = 2*3.14*f*C*Vp*10**-6 #Carging current(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The capacitance is\",round(C,3),\"uF\"\n", - "print \"Charging current of a single core cable is\",round(I,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The capacitance is 0.254 uF\n", - "Charging current of a single core cable is 3.04 A\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.6, Page Number: 276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Calculation:\n", - "er = 3 #relative permittivity\n", - "d = 2.5 #core diameter(cm)\n", - "l = 4000 #cable length(m)\n", - "t = 0.5 #insulation thickness(cm)\n", - "Vl = 33000 #line voltage(V)\n", - "f = 50 #frequency(Hz)\n", - "\n", - "\n", - "#Calculation:\n", - "D = d+2*t #conductor diameter(cm)\n", - "C = er*l/(41.4*math.log10(D/d))*10**-3 #Capacitance(uF)\n", - "Vp = Vl/3**0.5\n", - "I = 2*3.14*f*C*Vp*10**-6 #Carging current(A)\n", - "kVAR = 3*Vp*I #Total charging kVAR\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The capacitance is\",round(C*10**3),\"* 10**-9 F\"\n", - "print \"(ii) Charging current of a single core cable is\",round(I,2),\"A\"\n", - "print \"(iii)Total charging kVAR is\",round(kVAR/1000,1),\"* 10**3 kVAR\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The capacitance is 1984.0 * 10**-9 F\n", - "(ii) Charging current of a single core cable is 11.87 A\n", - "(iii)Total charging kVAR is 678.3 * 10**3 kVAR\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.7, Page Number: 278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable Declaration:\n", - "V = 33 #voltage of cable(V)\n", - "d = 1 #conductor diameter(cm)\n", - "D = 4 #sheath diameter(cm)\n", - "\n", - "\n", - "#Calculation:\n", - "gmax = 2*V/(d*math.log(D/d)) #maximum stress,rms(kV/cm)\n", - "gmin = gmax*d/D #minimum stress,rms(kV/cm)\n", - "\n", - "#Result:\n", - "print \"The maximum and minimum stress in the insulation are\"\n", - "print \"gmax =\",round(gmax,2),\"kV/cm rms & gmin =\",round(gmin,2),\"kV/cm rms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum and minimum stress in the insulation are\n", - "gmax = 47.61 kV/cm rms & gmin = 11.9 kV/cm rms\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.8, Page Number: 278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "gmax = 40 #kV/cm\n", - "gmin = 10 #kV/cm\n", - "d = 2 #conductor diameter(cm)\n", - "\n", - "\n", - "#Calculation:\n", - "D = gmax/gmin*d #cm\n", - "t = (D-d)/2 #thickness of insulation(cm)\n", - "V = gmax*d*math.log(D/d)/2\n", - "\n", - "#Result:\n", - "print \"(i) Thickness of insulation is\",t,\"cm\"\n", - "print \"(ii)Operating voltage is\",round(V,2),\"kV rms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Thickness of insulation is 3.0 cm\n", - "(ii)Operating voltage is 55.45 kV rms\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.9, Page Number: 279" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "V = 11 #voltage of cable(V)\n", - "a = 0.645 #conductor area(cm**2)\n", - "D = 2.18 #internal diameter of sheath(cm)\n", - "er = 3.5 #relative permitivity\n", - "l = 1000 #conductor length(m)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "d = (4*a/3.14)**0.5 #Diameter of the conductor(cm)\n", - "gmax = 2*V/(d*math.log(D/d)) #Maximum electrostatic stress(kV/cm rms)\n", - "gmin = 2*V/(D*math.log(D/d)) #Minimum electrostatic stress(kV/cm rms)\n", - "C = er*l/(41.4*math.log10(D/d))*10**-9 #Capacitance of cable(F)\n", - "I = 2*3.14*f*C*V*1000 #Carging current(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Maximum electrostatic stress in the cable is\",round(gmax,2),\"kV/cm rms\"\n", - "print \"(ii) Minimum electrostatic stress in the cable is\",round(gmin,2),\"kV/cm rms\"\n", - "print \"(iii)Capacitance of the cable per km length is\",round(C*10**6,2),\"* 10**-6 F\"\n", - "print \"(iv) Charging current is\",round(I,3),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Maximum electrostatic stress in the cable is 27.66 kV/cm rms\n", - "(ii) Minimum electrostatic stress in the cable is 11.5 kV/cm rms\n", - "(iii)Capacitance of the cable per km length is 0.22 * 10**-6 F\n", - "(iv) Charging current is 0.766 A\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.10, Page Number: 280" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "V = 50 #Cable voltage(kV)\n", - "gmax = 40 #Maximum permissible stress(kV/cm)\n", - "\n", - "\n", - "#Calculation:\n", - "Vp = V*2**0.5 #Peak value of cable voltage(kV)\n", - "d = 2*Vp/gmax #Most economical conductor diameter(cm)\n", - "\n", - "\n", - "#Result:\n", - "print \"The most economical value of diameter is\",round(d,2),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The most economical value of diameter is 3.54 cm\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.11, Page Number: 280" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "Vl = 132 #Cable voltage(kV)\n", - "gmax = 60 #Maximum permissible stress(kV/cm)\n", - "\n", - "\n", - "#Calculation:\n", - "Vph = Vl/3**0.5 #phase voltage(kV)\n", - "Vp = Vph*2**0.5 #Peak value of cable voltage(kV)\n", - "d = 2*Vp/gmax #Most economical conductor diameter(cm)\n", - "D = 2.718*d #Internal diameter of sheath(cm)\n", - "\n", - "#Result:\n", - "print \"Most economical conductor diameter is\",round(d,1),\"cm\"\n", - "print \"Internal diameter of sheath, D is\",round(D,2),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Most economical conductor diameter is 3.6 cm\n", - "Internal diameter of sheath, D is 9.76 cm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.12, Page Number: 282" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "d = 2 #conductor diameter(cm)\n", - "e3 = 3 #relative permittivity\n", - "e2 = 4\n", - "e1 = 5\n", - "D = 8 #overall diameter(cm)\n", - "gmax = 40 #kV/cm\n", - "\n", - "#Calculation:\n", - "#Graded cable: As the maximum stress in the three dielectrics is the same,\n", - "d1 = e1*d/e2 #diameter of 1st layer(cm)\n", - "d2 = e1*d/e3 #diameter of 2nd layer(cm)\n", - "#Permissible peak voltage for the cable:\n", - "Vp1 = gmax/2*(d*math.log(d1/d)+d1*math.log(d2/d1)+d2*math.log(D/d2)) #kV\n", - "Vs1 = Vp1/2**0.5 #Safe working voltage (r.m.s.) for cable(kV)\n", - "\n", - "#Ungraded cable:\n", - "Vp2 = gmax/2*d*log(D/d) #kV\n", - "Vs2 = Vp2/(2**0.5) #kV\n", - "\n", - "\n", - "#Result:\n", - "print \"For Graded cable, safe working voltage is\",round(Vs1,2),\"kV\"\n", - "print \"For Ungraded cable, safe working voltage is\",round(Vs2,1),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For Graded cable, safe working voltage is 57.75 kV\n", - "For Ungraded cable, safe working voltage is 39.2 kV\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.13, Page Number: 283" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "d = 3 #conductor diameter(cm)\n", - "e2 = 4 #relative permittivity\n", - "e1 = 5\n", - "D = 9 #overall diameter(cm)\n", - "g1max = 30 #kV/cm\n", - "g2max = 20 #kV/cm\n", - "\n", - "\n", - "#Calculation:\n", - "d1 = g1max/g2max*e1*d/e2 #cm\n", - "t1 = (d1-d)/2 #Radial thickness of inner dielectric(cm)\n", - "t2 = (D-d1)/2 #Radial thickness of outer dielectric(cm)\n", - "Vp = g1max/2*d*math.log(d1/d)+g2max/2*d1*math.log(D/d1)\n", - "Vsf = Vp/2**0.5 #Safe working voltage(r.m.s.)for the cable(kV)\n", - "\n", - "\n", - "#Result:\n", - "print \"Radial thickness of inner dielectric is\",round(t1,3),\"cm\"\n", - "print \"Radial thickness of outer dielectric is\",round(t2,2),\"cm\"\n", - "print \"Safe working voltage (r.m.s.) for the cable is\",round(Vsf,2),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radial thickness of inner dielectric is 1.313 cm\n", - "Radial thickness of outer dielectric is 1.69 cm\n", - "Safe working voltage (r.m.s.) for the cable is 38.7 kV\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.14, Page Number: 284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "e1 = 5 #relative permittivity\n", - "e2 = 3\n", - "t = 1 #thickness(cm)\n", - "d = 2 #core diameter(cm)\n", - "V = 66 #cable voltage(kV)\n", - "\n", - "#Calculation:\n", - "d1 = d+2*t\n", - "D = d+4*t #total diameter of cable(cm)\n", - "Vpk = V/3**0.5*2**0.5 #Peak voltage per phase(kV)\n", - "g1max = 2*Vpk/(d*(math.log(d1/d)+e1/e2*math.log(D/d1))) #kV/cm\n", - "g2max = 2*Vpk/(d1*(e2/e1*math.log(d1/d)+math.log(D/d1))) #kV/cm\n", - "\n", - "#Result:\n", - "print \"Maximum stresses in two dielectrics are:\"\n", - "print \"g1max =\",round(g1max,2),\"kV/cm g2max =\",round(g2max,2),\"kV/cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum stresses in two dielectrics are:\n", - "g1max = 39.37 kV/cm g2max = 32.8 kV/cm\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.15, Page Number: 285" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "d = 2 #cm\n", - "d1 = 3.1 #cm\n", - "d2 = 4.2 #cm\n", - "D = 5.3 #cm\n", - "V = 66 #cable voltage(kV)\n", - "\n", - "\n", - "#Calculation:\n", - "Vpk = V/3**0.5*2**0.5 #peak voltage/phase(kV)\n", - "#let V1,V2 & V3 are the voltages at different grades.\n", - "V1,V2,V3 = symbols('V1 V2 V3')\n", - "g1max = V1/(d/2*math.log(d1,d))\n", - "g2max = V2/(d1/2*math.log(d2,d1))\n", - "g3max = V3/(d2/2*math.log(D,d2))\n", - "\n", - "#As the maximum stress in the layers is the same,\n", - "#\u2234 g1max = g2max = g3max\n", - "#or 2\u00b728 V1 = 2\u00b712 V2 = 2\u00b704 V3\n", - "#\u2234 V2 = (2\u00b728/2\u00b712) V1 = 1\u00b7075 V1\n", - "#and V3 = (2\u00b728/2\u00b704) V1 = 1\u00b7117 V1\n", - "#Now V1 + V2 + V3 = Vpk\n", - "#or V1 + 1\u00b7075 V1 + 1\u00b7117 V1 = 53\u00b79\n", - "V1 = 53.9/3.192\n", - "V2 = 1.075*V1\n", - "V1s = Vpk-V1 #Voltage on first intersheath(near to core)(kV)\n", - "V2s = Vpk-V1-V2 #Voltage on second intersheath(kV)\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage on first intersheath is\",round(V1s,2),\"kV\"\n", - "print \"Voltage on second intersheath is\",round(V2s,2),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage on first intersheath is 37.0 kV\n", - "Voltage on second intersheath is 18.85 kV\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.16, Page Number: 286" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "d = 2 #core diameter(cm)\n", - "D = 5.3 #cm\n", - "V = 66 #cable voltage(kV)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "Vpk = V/3**0.5*2**0.5 #peak voltage/phase(kV)\n", - "#(i) Positions of intersheaths.\n", - "\n", - "#Let the diameters of intersheaths are d1 and d2 cm respectively.\n", - "#Let V1 = voltage b/w conductor & intersheath 1\n", - "# V2 = voltage b/w intersheaths 1 and 2\n", - "# V3 = voltage b/w intersheath 2 & outer lead sheath\n", - "\n", - "\n", - "#Given the maximum stress in the three layers is the same,\n", - "#we get the relation as given below:\n", - "# d1**2 = d * d2 = 2*d2 [\u2235 d = 2 cm]\n", - "#or d2 = d1**2/2\n", - "#and d1*d2 = D * d = 5\u00b73 \u00d7 2 = 10.6 cm\n", - "#or d1 * d1**2/2 = 10\u00b76\n", - "d1 = 21.2**(1/3) #cm\n", - "d2 = d1**2/2 #cm\n", - "\n", - "\n", - "#(ii) Voltage on intersheaths,\n", - "# V = V1 + V2 + V3\n", - "#or 53\u00b79 = V1+d1/d*V1+d2/d*V1\n", - "# = 4.28*V1\n", - "V1 = 53.9/4.28 #kV\n", - "V2 = d1/d*V1 #kV\n", - "\n", - "#(iii) Stresses in dielectrics,\n", - "gmax = V1/(d/2*math.log(d1/d)) #max stress(kV/cm)\n", - "gmin = V1/(d1/2*math.log(d1/d)) #min stress(kV/cm\n", - "\n", - "#Result:\n", - "print \"(i) Positions of intersheaths are:\"\n", - "print \"\\td1 =\",round(d1,2),\"cm d2 =\",round(d2,1),\"cm\"\n", - "print \"(ii) Voltage on the intersheaths are:\"\n", - "print \"\\tVoltage on first intersheath is\",round(Vpk-V1,2),\"kV\"\n", - "print \"\\tVoltage on second intersheath is\",round(Vpk-V1-V2,1),\"kV\"\n", - "print \"(iii) Maximum and minimum stress are:\"\n", - "print \"\\tgmax =\",round(gmax),\"kV/cm\\tgmin =\",round(gmin,2),\"kV/cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Positions of intersheaths are:\n", - "\td1 = 2.77 cm d2 = 3.8 cm\n", - "(ii) Voltage on the intersheaths are:\n", - "\tVoltage on first intersheath is 41.3 kV\n", - "\tVoltage on second intersheath is 23.9 kV\n", - "(iii) Maximum and minimum stress are:\n", - "\tgmax = 39.0 kV/cm\tgmin = 28.01 kV/cm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.17, Page Number: 289" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "c = 0.3 #capacitance per kilometre(uF/km)\n", - "V = 11 #line voltage(kV)\n", - "l = 5 #length of the cable(km)\n", - "f = 50 #Hz\n", - "\n", - "#Calculation:\n", - "C3 = c*l #capacitance between a pair of cores with third core\n", - " #earthed for a length of 5 km (uF)\n", - "Vph = V*1000/3**0.5 #phase voltage(V)\n", - "#core to neutral capacitance Cn of this cable is given by :\n", - "Cn = 2*C3 #uF\n", - "Ic = 2*math.pi*f*Vph*Cn*10**-6\n", - "\n", - "\n", - "#Result:\n", - "print \" The charging current is\",round(Ic,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The charging current is 5.99 A\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.18, Page Number: 290" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "V = 66 #line voltage(kV)\n", - "C1 = 12.6 #uF\n", - "C2 = 7.4 #uF\n", - "f = 50 #Hz\n", - "\n", - "#Calculation:\n", - "Vph = V*1000/3**0.5 #phase voltage(V)\n", - "Ce = C1/3 #core-earth capacitances(uF)\n", - "Cc = (C2-Ce)/2 #core-core capacitances(uF)\n", - "Cn = Ce+3*Cc #Core to neutral capacitance(uF)\n", - "Ic = 2*math.pi*f*Vph*Cn*10**-6\n", - "\n", - "\n", - "#Result:\n", - "print \"The charging current is\",round(Ic,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The charging current is 107.74 A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.19, Page Number: 290" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "c = 0.18 #capacitance per kilometre(uF/km)\n", - "V = 3300 #line voltage(V)\n", - "l = 20 #length of the cable(km)\n", - "f = 50 #Hz\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "C3 = c*l #capacitance between a pair of cores with third core\n", - " #earthed for a length of 20 km (uF)\n", - "Vph = V/3**0.5 #phase voltage(V)\n", - "Cn = 2*C3 #Core to neutral capacitance(uF)\n", - "Ic = 2*math.pi*f*Cn*Vph*10**-6 #charging current(A)\n", - "kVA = 3*Vph*Ic/1000 #kVA taken by the cable\n", - "\n", - "\n", - "#Result:\n", - "print \"The kVA taken by 20 km long cable is\",round(kVA,2),\"kVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The kVA taken by 20 km long cable is 24.63 kVA\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.20, Page Number: 292" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "k = 5 #thermal resistivity of the dielectric(ohm-m)\n", - "S2 = 0.45 #thermal resistance b/w the sheath and the ground surface\n", - "R = 110 #electrical resistance of the cable(u-ohm)\n", - "r = 15 #core radius(mm)\n", - "t = 40 #dielectric thickness(mm)\n", - "T = 55 #temperature(deg. C)\n", - "n = 1 #no. of conductors\n", - "\n", - "#Calculation:\n", - "r1 = r+t #mm\n", - "S1 = k/(2*math.pi)*math.log(r1/r) #ohm/m\n", - "S = S1+S2 #ohm/m\n", - "I = (T/(n*R*10**-6*S))**0.5 #current loading(A)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Maximum permissible current loading is\",round(I,1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum permissible current loading is 580.5 A\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.21, Page Number: 296" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Q = 15 #ohm\n", - "P = 45 #ohm\n", - "l = 300 #length of faulty cable(m)\n", - "\n", - "\n", - "#Calculation:\n", - "L = 2*l #loop length(m)\n", - "d = Q/(P+Q)*L #Distance of the fault point from test end(m)\n", - "\n", - "#Result:\n", - "print \" The distance of the fault point from the test end is\",d,\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The distance of the fault point from the test end is 150.0 m\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - " Example 11.22, Page Number: 297" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "l = 500 #length of faulty cable(m)\n", - "#P:Q = 3\n", - "\n", - "#Calculation:\n", - "#Let:\n", - "P = 3; Q = 1 #ohm\n", - "#then,\n", - "d = Q/(P+Q)*2*l #Distance of the fault point from test end(m)\n", - "\n", - "#Result:\n", - "print \"The distance of the fault from the testing end of cables\",d,\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The distance of the fault from the testing end of cables 250.0 m\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.23, Page Number: 297" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "l = 500 #length of faulty cable(m)\n", - "rp = 0.001 #resistance of cable(ohm/m)\n", - "rq = 0.00225 #resistance of sound cable(ohm/m)\n", - "#P:Q = 2.75:1\n", - "\n", - "#Calculation:\n", - "#Let:\n", - "P = 2.75; Q = 1 #ohm\n", - "#then,\n", - "R = rp*l+rq*l #Resistance of loop(ohm)\n", - "X = Q/(P+Q)*R #Resistance of faulty cable from test end upto fault point(ohm)\n", - "d = X/rp #Distance of the fault point from test end(m)\n", - "\n", - "#Result:\n", - "print \"The distance of the fault from the testing end of cables\",round(d),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The distance of the fault from the testing end of cables 433.0 m\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 11.24, Page Number: 297" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "S = 200 #ohm\n", - "r = 20 #resistance per km(ohm)\n", - "l = 20 #length of cable(km)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "# R+X = 20*(20+20) #ohm\n", - "# P = Q\n", - "X = (800-200)/2 #ohm\n", - "d = X/r #m\n", - "\n", - "\n", - "#Result:\n", - "print \"The distance of the fault from the test end is\",d,\"km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The distance of the fault from the test end is 15.0 km\n" - ] - } - ], - "prompt_number": 33 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter13_1.ipynb b/Principles_of_Power_System/chapter13_1.ipynb deleted file mode 100644 index 9f2fa9af..00000000 --- a/Principles_of_Power_System/chapter13_1.ipynb +++ /dev/null @@ -1,1972 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:9a20e0c71265585c31a8df4c18dfac853044b054341d1794943bfacb3c219678" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13: D.C. Distribution" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.1, Page number: 313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable Declaration:\n", - "#given a 2-wire d.c. distributor cable AB\n", - "\n", - "r = 0.01*2 #Resistance per 1000m of distributor\n", - "Va = 300 #p.d at point A(V)\n", - "AC = 500 #m\n", - "CD = 500 #m\n", - "DE = 600 #m\n", - "EB = 400 #m\n", - "\n", - "\n", - "#Calculation:\n", - "Rac = r*AC/1000 #Resistance of section AC\n", - "Rcd = r*CD/1000 #Resistance of section CD\n", - "Rde = r*DE/1000 #Resistance of section DE\n", - "Reb = r*EB/1000 #Resistance of section EB\n", - "Ieb = 50 #current in branch EB(A)\n", - "Ide = Ieb+200 #current in branch DE(A)\n", - "Icd = Ide+150 #current in branch CD(A)\n", - "Iac = Icd+100 #current in branch AC(A)\n", - "Vc = Va - Iac*Rac #P.D. at load point C(V)\n", - "Vd = Vc - Icd*Rcd #P.D. at load point D(V)\n", - "Ve = Vd - Ide*Rde #P.D. at load point E(V)\n", - "Vb = Ve - Ieb*Reb #P.D. at load point B(V)\n", - "\n", - "#Result:\n", - "print \"P.D. at load point C is\",Vc,\"V\"\n", - "print \"P.D. at load point D is\",Vd,\"V\"\n", - "print \"P.D. at load point E is\",Ve,\"V\"\n", - "print \"P.D. at load point B is\",Vb,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "P.D. at load point C is 295.0 V\n", - "P.D. at load point D is 291.0 V\n", - "P.D. at load point E is 288.0 V\n", - "P.D. at load point B is 287.6 V\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.2, Page number: 314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "AB = 300 #m\n", - "AC = 40 #m\n", - "CD = 60 #m\n", - "DE = 50 #m\n", - "EF = 100 #m\n", - "FB = 50 #m\n", - "Vm = 10 #max. permissible volatge(V)\n", - "rho = 1.78*10**-8 #resistivity of cable(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "Iac = 220 #A\n", - "Icd = 190 #A\n", - "Ide = 150 #A\n", - "Ief = 50 #A\n", - "#Suppose that resistance of 100m length of the distributor is r ohms.\n", - "l = 100 #m\n", - "r = symbols('r')\n", - "Rac = AC*r/100 #ohm\n", - "Rcd = CD*r/100 #ohm\n", - "Rde = DE*r/100 #ohm\n", - "Ref = EF*r/100 #ohm\n", - "\n", - "Vt = Iac*Rac+Icd*Rcd+Ide*Rde+Ief*Ref\n", - "r1 = solve(Vt-Vm,r)[0]\n", - "a = float(rho*l/(r1/2)) #cm**2\n", - "\n", - "\n", - "#Result:\n", - "print \"X-sectional area of conductor is\",round(a*10**4,3),\"cm**2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "X-sectional area of conductor is 1.164 cm**2\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.3, Page number: 315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable Declaration:\n", - "r1 = 0.25 #resistance of trolley wire(ohm/km)\n", - "r2 = 0.03 #resistance of of track(ohm/km)\n", - "V = 600 #sub-station voltage(V)\n", - "SA = 2 #km\n", - "AB = 4 #km\n", - "\n", - "#Calculation:\n", - "R = r1+r2 #ohm/km\n", - "Isa = 40+20 #A\n", - "Iab = 20 #A\n", - "Vsa = Isa*R*SA #V\n", - "Vab = Iab*R*AB #V\n", - "Va = V-Vsa #Voltage across tram A\n", - "Vb = Va-Vab #Voltage across tram A\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage across tram A is\",Va,\"V\"\n", - "print \"Voltage across tram B is\",Vb,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across tram A is 566.4 V\n", - "Voltage across tram B is 544.0 V\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.4, Page number: 315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable Declaration:\n", - "a = 0.27 #cross-sectional area of each conductor(cm**2)\n", - "V = 250 #supply voltage at point A(V)\n", - "rho = 1.78*10**-6 #Resistivity of the wire(ohm-cm)\n", - "AB = 75 #m\n", - "BC = 100 #m\n", - "CD = 50 #m\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "Icd = 20 #curent in CD(A)\n", - "Ibc = 20+15 #current in BC(A)\n", - "Iab = 20+15+12 #current in AB(A)\n", - "R = round(rho*BC*100/a,3) #Single-core resistance of the section of 100 m length(ohm)\n", - "Rab = R*AB/100*2 #ohm\n", - "Rbc = R*BC/100*2 #ohm\n", - "Rcd = R*CD/100*2 #ohm\n", - "Vb = V-Iab*Rab #Voltage at tapping point B(V)\n", - "Vc = Vb-Ibc*Rbc #Voltage at tapping point C(V)\n", - "Vd = Vc-Icd*Rcd #Voltage at tapping point D(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i)The current in various sections of the conductor are:\"\n", - "print \"\\tIcd =\",Icd,\"A \\tIbc =\",Ibc,\"A\\tIab =\",Iab,\"A\"\n", - "print \"\\n(ii)The resistances of the various sections are :\"\n", - "print \"\\tRab =\",Rab,\"ohm\\tRbc =\",Rbc,\"ohm\\t\",Rcd,\"ohm\"\n", - "print \"\\n(iii)Voltage at tapping point B is\",round(Vb,2),\"V\"\n", - "print \" Voltage at tapping point C is\",round(Vc,2),\"V\"\n", - "print \" Voltage at tapping point D is\",round(Vd,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)The current in various sections of the conductor are:\n", - "\tIcd = 20 A \tIbc = 35 A\tIab = 47 A\n", - "\n", - "(ii)The resistances of the various sections are :\n", - "\tRab = 0.099 ohm\tRbc = 0.132 ohm\t0.066 ohm\n", - "\n", - "(iii)Voltage at tapping point B is 245.35 V\n", - " Voltage at tapping point C is 240.73 V\n", - " Voltage at tapping point D is 239.41 V\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.5, Page number: 317" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "i = 2 #A/m\n", - "l = 200 #length of distributor(m)\n", - "r1 = 0.3 #Resistance of single wire is 0\u00b73 ohm/km.\n", - "x = 150 #m\n", - "\n", - "#Calculation:\n", - "r = 2*r1/1000 #Resistance of distributor per metre run(ohm)\n", - "V = i*r*(l*x-x**2/2) #volt\n", - "I = i*l #Total current entering the distributor(A)\n", - "R = r*l #Total resistance of the distributor(ohm)\n", - "V1 = 1/2*I*R #Total drop over the distributor(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i)The voltage drop upto a distance of 150m from \"\n", - "print \"\\tthe feeding point is\",V,\"V\"\n", - "print \"(ii)The maximum voltage drop is\",V1,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)The voltage drop upto a distance of 150m from \n", - "\tthe feeding point is 22.5 V\n", - "(ii)The maximum voltage drop is 24.0 V\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.6, Page number: 317" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "i = 0.4 #A/m\n", - "l = 500 #length of distributor(m)\n", - "Vm = 10 #maximum permissible voltage drop(V)\n", - "rho = 1.7*10**-6 #ohm-cm\n", - "\n", - "\n", - "#Calculation:\n", - "I = i*l #Current entering the distributor(A)\n", - "#Let r ohm be the resistance per metre length of the distributor (both wires).\n", - "r = 2*Vm/(I*l) #resistance per metre length(ohm)\n", - "a = rho*100/(r/2) #Area of cross-section of the distributor conductor(ohm)\n", - "\n", - "\n", - "#Result:\n", - "print \"The cross-sectional area of the distributor conductor is\",a,\"cm**2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The cross-sectional area of the distributor conductor is 1.7 cm**2\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.7, Page number: 318" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "i = 1.6 #A/m\n", - "l = 250 #length of distributor(m)\n", - "r1 = 0.0002 #Resistance of single wire is 0\u00b73 ohm/m.\n", - "x = 150 #m\n", - "\n", - "\n", - "#Calculation:\n", - "I = i*l #Current entering the distributor(A)\n", - "r = 2*r1 #Resistance of the distributor per metre run\n", - "R = r*l #Total resistance of distributor(ohm)\n", - "V1 = 1/2*I*R #Voltage drop over the entire distributor(ohm)\n", - "#the voltage necessary at feed point to maintain 250 V at the far end\n", - "V2 = V1+250 #Voltage at feeding point(V)\n", - "#Voltage drop upto a distance of 150 metres from feeding point\n", - "V3 = i*r*(l*125-125**2/2) #Volt\n", - "##Voltage necessary to maintain 250V at the mid-point of the distributor.\n", - "V4 = 250+V3\n", - "\n", - "#Result:\n", - "print \"(i) Voltage drop over the entire distributor is\",V2,\"V\"\n", - "print \"(ii)The necessary voltage is\",V4,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Voltage drop over the entire distributor is 270.0 V\n", - "(ii)The necessary voltage is 265.0 V\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.9, Page number: 319" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "i = 0.75 #current loading(A/m)\n", - "l = 300 #distributor length(m)\n", - "x = 200 #m\n", - "r = 0.00018 #resistance of distributor(go and return)(ohm/m)\n", - "V = 250 #voltage fed at 1 end(V)\n", - "\n", - "#Calculation:\n", - "V1 = i*r*(l*x-x**2/2) #Voltage drop(V)\n", - "#Voltage at a distance of 200 m from supply end\n", - "V2 = V-V1 #V\n", - "P = i**2*r*l**3/3 #Power loss in the distributor(W)\n", - "\n", - "\n", - "#Result:\n", - "print \"Volatage at a distance of 200m is\",V2,\"V\"\n", - "print \"Power loss in the distributor is\",P,\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Volatage at a distance of 200m is 244.6 V\n", - "Power loss in the distributor is 911.25 W\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.10, Page number: 321" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "AB = 600 #m\n", - "Va = 220 #end voltage(V)\n", - "a = 1 #cross-section of conductor(cm**2)\n", - "rho = 1.7*10**-6 #resistvity of conductor(ohm-cm)\n", - "\n", - "#Calculation:\n", - "\n", - "#Let Ia amperes be the current supplied from the feeding\n", - "#end A.\n", - "r = 2*rho*100/a #ohm\n", - "Rac = r*100 #ohm\n", - "Rcd = r*150 #ohm\n", - "Rde = r*150 #ohm\n", - "Ref = r*100 #ohm\n", - "Rfb = r*100 #ohm\n", - "#Voltage at B = Voltage at A \u2212 Drop over length AB\n", - "Ia = symbols('Ia')\n", - "Ia1 = solve(Va-(Ia*Rac+(Ia-20)*Rcd+(Ia-60)*Rde+(Ia-110)*Ref+(Ia-140)*Rfb)-Va,Ia)[0]\n", - "#We can see that currents are coming to load point E from \n", - "#both sides i.e. from point D and point F. \n", - "#So, E will be the point of minimum potential.\n", - "\n", - "Ve = Va-(61.7*Rac+41.7*Rcd+1.7*Rde) #Minimum consumer voltage(V)\n", - "\n", - "#Result:\n", - "print \"Minimum consumer voltage is\",round(Ve,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum consumer voltage is 215.69 V\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.11, Page number: 322" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "AB = 200 #m\n", - "Va = 230 #1 end voltage(V)\n", - "Vb = 235 #2 end voltage(V)\n", - "r1 = 0.3 #The resistance per km of one conductor(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let Ia amperes be the current supplied from the feeding\n", - "#end A.\n", - "r = 2*r1 #Resistance of 1000m length of distributor(both wires)\n", - "Rac = r*50/1000 #ohm\n", - "Rcd = r*25/1000 #ohm\n", - "Rde = r*25/1000 #ohm\n", - "Ref = r*50/1000 #ohm\n", - "Rfb = r*50/1000 #ohm\n", - "Ia = symbols('Ia')\n", - "Ia1 = round(solve(Va-(Ia*Rac+(Ia-25)*Rcd+(Ia-75)*Rde+(Ia-105)*Ref+(Ia-145)*Rfb)-Vb,Ia)[0],2)\n", - "Iac = Ia1 #Current in section AC(A)\n", - "Icd = Ia1-25 #Current in section CD(A)\n", - "Ide = Ia1-75 #Current in section DE(A)\n", - "Ief = Ia1-105 #Current in section EF(A)\n", - "Ifb = Ia1 -145 #Current in section FB(A)\n", - "#The currents are coming to load point D from both sides of \n", - "#the distributor. Therefore, load point D is the point of minimum potential.\n", - "Vd = Va-(Iac*Rac+Icd*Rcd) #volt\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Currents in various sections of the distributor are:\"\n", - "print \"\\tCurrent in section AC is\",Iac,\"A\"\n", - "print \"\\tCurrent in section AC is\",Icd,\"A\"\n", - "print \"\\tCurrent in section AC is\",Ide,\"A\"\n", - "print \"\\tCurrent in section AC is\",Ief,\"A\"\n", - "print \"\\tCurrent in section AC is\",Ifb,\"A\"\n", - "print \"\\n(ii)Voltage at D is\",round(Vd,3),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Currents in various sections of the distributor are:\n", - "\tCurrent in section AC is 33.33 A\n", - "\tCurrent in section AC is 8.33 A\n", - "\tCurrent in section AC is -41.67 A\n", - "\tCurrent in section AC is -71.67 A\n", - "\tCurrent in section AC is -111.67 A\n", - "\n", - "(ii)Voltage at D is 228.875 V\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.12, Page number: 323" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "AB = 600 #m\n", - "Va = 440 #1 end voltage(V)\n", - "Vb = 430 #2 end voltage(V)\n", - "r1 = 0.01 #The resistance per 100m of one conductor(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let Ia amperes be the current supplied from the feeding\n", - "#end A.\n", - "r = 2*r1 #Resistance of 1000m length of distributor(both wires)\n", - "Rac = r*150/100 #ohm\n", - "Rcd = r*150/100 #ohm\n", - "Rde = r*50/100 #ohm\n", - "Ref = r*100/100 #ohm\n", - "Rfb = r*150/100 #ohm\n", - "Ia = symbols('Ia')\n", - "Ia1 = round(solve(Va-(Ia*Rac+(Ia-100)*Rcd+(Ia-300)*Rde+(Ia-550)*Ref+(Ia-850)*Rfb)-Vb,Ia)[0],2)\n", - "Iac = Ia1 #Current in section AC(A)\n", - "Icd = Ia1-100 #Current in section CD(A)\n", - "Ide = Ia1-300 #Current in section DE(A)\n", - "Ief = Ia1-550 #Current in section EF(A)\n", - "Ifb = Ia1-850 #Current in section FB(A)\n", - "Pl = Iac**2*Rac+Icd**2*Rcd+Ide**2*Rde+Ief**2*Ref+Ifb**2*Rfb #power loss(W)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The currents supplied from A to B are:\\n\\tIa =\",Ia1,\"A\\tIb =\",abs(Ifb),\"A\" \n", - "print \"(ii) The power dissipated in the distributor is\",round(Pl/1000,3),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The currents supplied from A to B are:\n", - "\tIa = 437.5 A\tIb = 412.5 A\n", - "(ii) The power dissipated in the distributor is 14.706 kW\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.13, Page number: 325" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Va = 600 #V\n", - "Vb = 590 #V\n", - "r = 0.04 #track resistance of go and return path(ohm/km)\n", - "AB = 6 #distance b/w the sub-stations(km)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let min. potential occurs at point M at a distance x km from the substation A.\n", - "\n", - "\n", - "Ia,x = symbols('Ia x') #Ia is current supplied by the sub-station A\n", - "Ram = r*x #Track resistance for section AM(ohm)\n", - "Rmb = r*(AB-x) #Track resistance for section MB(ohm)\n", - "Vm = Va-Ia*Ram #Potential at M(V) ...(i)\n", - "Vm1 = Vb-(300-Ia)*Rmb #also,Potential at M(V) ...(ii)\n", - "\n", - "#from (i) & (ii):\n", - "Ia = 341.7-50*x\n", - "Vm = Va-(341.7 - 50*x)*0.04*x\n", - "Vm2 = diff(Vm,x)\n", - "x1 = round(solve(Vm2,x)[0],2)\n", - "Ia1 = 341.7-50*x1 #A\n", - "Ib = 300-Ia1 #A\n", - "\n", - "#Result:\n", - "print \"(i) The point along the track where minimum potential occurs is\",x1,\"km\"\n", - "print \"(ii)Current supplied by sub-ation A is\",Ia1,\"A\"\n", - "print \" Current supplied by sub-station B is\",Ib,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The point along the track where minimum potential occurs is 3.42 km\n", - "(ii)Current supplied by sub-ation A is 170.7 A\n", - " Current supplied by sub-station B is 129.3 A\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.14, Page number: 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "i = 0.5 #current loading(A/m)\n", - "l = 1000 #cable length(m)\n", - "V = 220 #end voltages(V)\n", - "r1 = 0.05 #Resistance of each of 2 conductors(ohm/km)\n", - "\n", - "#Calculation:\n", - "r = 2*r1/1000 #ohm/m\n", - "I = i*l #A\n", - "R = r*l #ohm\n", - "Vm = I*R/8 #Max. voltage drop(V)\n", - "#Minimum voltage will occur at the mid-point of the distributor & its value is\n", - "Vmin = V-Vm #V\n", - "\n", - "\n", - "#Result:\n", - "print \"The maximum voltage drop is\",Vm,\"V\"\n", - "print \"The minimum voltage is\",Vmin,\"V at the midpoint of the distributor.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum voltage drop is 6.25 V\n", - "The minimum voltage is 213.75 V at the midpoint of the distributor.\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.15, Page number: 327" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Va = 255 #Voltage at feeding point A(V)\n", - "Vb = 250 #Voltage at feeding point B(V)\n", - "l = 500 #Length of distributor(m)\n", - "i = 1 #Current loading(A/m)\n", - "r1 = 0.1 #resistance of each conductor(ohm/km)\n", - "\n", - "#Calculation:\n", - "r = 2*r1/1000\n", - "#(i) Let the minimum potential occur at a point C distant x \n", - "# metres from the feeding point A.\n", - "\n", - "x = (Va-Vb)/(i*r*l)+l/2 #m\n", - "Vc = Va-i*r*x**2/2 #minimum voltage(V)\n", - "\n", - "\n", - "#(ii)\n", - "ia = i*x #Current supplied from A(A)\n", - "ib = i*(l-x) #Current supplied from B(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The minimum voltage is\",Vc,\"V at\",x,\"m from point A\"\n", - "print \"(ii)Current supplied from A is\",ia,\"A\"\n", - "print \" Current supplied from B is\",ib,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The minimum voltage is 246.0 V at 300.0 m from point A\n", - "(ii)Current supplied from A is 300.0 A\n", - " Current supplied from B is 200.0 A\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.16, Page number: 328" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "l = 800 #Length of distributor(m)\n", - "i = 1.25 #Current loading(A/m)\n", - "r1 = 0.05 #resistance of each conductor(ohm/km)\n", - "Vc = 220 #minimum voltage(V)\n", - "x = 450 #Distance of point C from A(m)\n", - "\n", - "#Calculation:\n", - "r = 2*r1/1000\n", - "Vac = i*r*x**2/2 #Voltage drop in section AC(V)\n", - "Va = Vac+Vc #Voltage at feeding point A(V)\n", - "Vbc = i*r*(l-x)**2/2 #Voltage drop in section BC(V)\n", - "Vb = Vc+Vbc #Voltage at feeding point B(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage at feeding point A is\",round(Va,2),\"V\"\n", - "print \"Voltage at feeding point B is\",round(Vb,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage at feeding point A is 232.66 V\n", - "Voltage at feeding point B is 227.66 V\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.17, Page number: 329" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "i = 1.25 #current loading (A/m)\n", - "l = 1000 #length of distributor(m)\n", - "r1 = 0.05 #resistance of each conductor(ohm/km)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "I = i*l #Total current fed to the distributor(A)\n", - "R = r*l #Total resistance of the distributor(ohm)\n", - "V = I*R/8 #Max. voltage drop(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"Maximum voltage drop in the distributor is\",round(V,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum voltage drop in the distributor is 15.63 V\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.19, Page number: 330" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "l = 900 #distributor length(m)\n", - "Va = 400 #voltage fed at a A(V)\n", - "i = 0.5 #current loading(A/m)\n", - "r = 0.0001 #resistance of distributor per m (go and return)(ohm)\n", - "x = 500 #length AD(m)\n", - "\n", - "#Calculation:\n", - "#Drops due to concentrated loads.\n", - "Iac = 300 #A\n", - "Icd = 250 #A\n", - "Ide = 150 #A\n", - "Vac = Iac*200*r #Drop in section AC(V)\n", - "Vcd = Icd*300*r #Drop in section CD(V)\n", - "Vde = Ide*300*r #Drop in section DE(V)\n", - "Vab1 = Vac+Vcd+Vde #Total drop over AB(V)\n", - "\n", - "\n", - "#Drops due to uniform loading:\n", - "Vab2 = i*r*l**2/2 #V\n", - "Vad = i*r*(l*x-x**2/2) #V\n", - "Vb = Va-(Vab1+Vab2) #V\n", - "Vd = Va-(Vac+Vcd+Vad) #V\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Voltage at point B is\",Vb,\"V\"\n", - "print \"(ii)Voltage at point D is\",Vd,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Voltage at point B is 361.75 V\n", - "(ii)Voltage at point D is 370.25 V\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.20, Page number: 331" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "r = 0.1*10**-3 #Distributor resistance per metre length\n", - "i = 0.5 #uniform current loading(A/m)\n", - "Va = 240 #end voltage at A(V)\n", - "Vb = 240 #end voltage at B(V)\n", - "l = 1000 #length of distributor(m)\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) Point of minimum potential:\n", - "#We know that, the point of minimum potential is not affected\n", - "#by the uniform loading of the distributor. \n", - "#Considering the concentrated loads first as shown below:\n", - "\n", - "I = symbols('I')\n", - "Iac = I\n", - "Icd = I-120\n", - "Ide = I-180\n", - "Ief = I-280\n", - "Ifb = I-320\n", - "I1 = solve((Iac*200+Icd*200+Ide*300+Ief*200+Ifb*100)*10**-4-Va+Vb,I)[0]\n", - "\n", - "#Showing the current distributions, we can see that D is \n", - "#the point of minimum potential.\n", - "\n", - "#(ii) The feeding point A will supply I1 A due to concentrated\n", - "# loading plus 0\u00b75 \u00d7 400 = 200 A due to uniform loading.\n", - "\n", - "Ia = I1+200 #Current supplied by A(A)\n", - "\n", - "#The feeding point B will supply a current of 154 A due to \n", - "#concentrated loading plus 0\u00b75 \u00d7 600 = 300 A due to uniform loading.\n", - "\n", - "Ib = 320-I1+300 #Current supplied byB(A)\n", - "\n", - "\n", - "\n", - "#(iii) We got that D is the point of minimum potential.\n", - "Iac = I1; Icd = I1-120 #ampere\n", - "Vad1 = Iac*200*10**-4+Icd*200*10**-4 #Drop in AD due to conc. loading(V)\n", - "AD = 400 #for uniform loading(V)\n", - "Vad2 = i*r*AD**2/2 #Drop in AD due to uniform. loading(V)\n", - "Vd = 240-Vad1-Vad2 #Minimum potential(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The point of minimum potential is D\"\n", - "print \"(ii) Current supplied by A is\",round(Ia),\"A\"\n", - "print \" Current supplied by B is\",round(Ib),\"A\"\n", - "print \"(iii)The value of minimum potential is\",round(Vd,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The point of minimum potential is D\n", - "(ii) Current supplied by A is 366.0 A\n", - " Current supplied by B is 454.0 A\n", - "(iii)The value of minimum potential is 231.76 V\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.21, Page number: 332" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "l = 500 #distributor length(m)\n", - "Va = 240 #voltage at end A(V)\n", - "Vb = 240 #voltage at end B(V)\n", - "R = 0.001 #resistance of the distributor(ohm/m)\n", - "i = 1 #current loading(A/m)\n", - "\n", - "#Calculation:\n", - "#Let D be the point of minimum potential\n", - "x = symbols('x') #x is current flowing in section CD(A)\n", - "\n", - "#(i) If r is the resistance of the distributor (go and return)\n", - "#per metre,\n", - "r = symbols('r')\n", - "Vad = (100+x)*100*r+x*150*r #Voltage drop in length AD\n", - "Vbd = 1*r*200**2/2+(60-x)*250*r #Voltage drop in length BD\n", - "x1 = solve(Vad-Vbd,x)[0] #A\n", - "\n", - "#(ii)\n", - "I = 60+1*200 #Total current(A)\n", - "Ia = 100+x1 #Current supplied by A(A)\n", - "Ib = 360-150 #Current supplied by B(V)\n", - "Vd = Va - Ia*100*0.001-50*150*0.001 #Minimum potential(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The point of minimum voltage is D.\"\n", - "print \"(ii)The value of minimum voltage is\",round(Vd,1),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The point of minimum voltage is D.\n", - "(ii)The value of minimum voltage is 217.5 V\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.22, Page number: 334" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "l = 300 #distributor length(m)\n", - "r1 = 0.03/100 #resistance of single conductor(ohm/m)\n", - "Va = 240 #volt\n", - "\n", - "#Calculation:\n", - "r = 2*r1 #resistance of both wires(ohm/m)\n", - "Rab = r*150 #ohm\n", - "Rbc = r*50 #ohm\n", - "Rca = r*100 #ohm\n", - "#suppose a current IA flows in section AB of the distributor.\n", - "#currents in sections BC and CA will be (Ia \u2212 120) & (Ia \u2212 200)\n", - "Ia = symbols('Ia')\n", - "Ia1 = solve(0.09*Ia+0.03*(Ia-120)+0.06*(Ia-200),Ia)[0]\n", - "\n", - "#The actual distribution of currents ca be drawn easily\n", - "#from where it is seen that B is the point of min. potential.\n", - "Iab = Ia1 #Current in section AB(A)\n", - "Ibc = Ia1-120 #Current in section BC(A)\n", - "Ica = Ia1-200 #current in section CA(A)\n", - "Vb = Va-Iab*Rab #Voltage at point B(V)\n", - "Vc = Vb-Ibc*Rbc #Voltage at point C(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Current in section AB is\",round(Iab,2),\"A from A to B\"\n", - "print \" Current in section BC is\",round(abs(Ibc),2),\"A from C to B\"\n", - "print \" Current in section ca is\",round(abs(Ica),2),\"A from A to C\"\n", - "print \"(ii)Voltage at point B is\",round(Vb,1),\"V\"\n", - "print \" Voltage at point C is\",round(Vc,1),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Current in section AB is 86.67 A from A to B\n", - " Current in section BC is 33.33 A from C to B\n", - " Current in section ca is 113.33 A from A to C\n", - "(ii)Voltage at point B is 232.2 V\n", - " Voltage at point C is 233.2 V\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.23, Page number: 335" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Va = 220 #voltage at point A(V)\n", - "Rab = 0.1 #ohm\n", - "Rbc = 0.05 #ohm\n", - "Rcd = 0.01 #ohm\n", - "Rde = 0.025 #ohm\n", - "Rea = 0.075 #ohm\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#(i)\n", - "I1 = solve(0.1*I+0.05*(I-10)+0.01*(I-30)+0.025*(I-60)+0.075*(I-70),I)[0]\n", - "\n", - "#(ii)\n", - "Iab = I1 #A\n", - "Ibc = I1-10 #A\n", - "Icd = I1-30 #A\n", - "Ide = I1-60 #A\n", - "Iea = I1-70 #A\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) C is the point of minimum potential.\"\n", - "print \"(ii)Current in section AB is\",round(Iab,2),\"A from A to B\"\n", - "print \" Current in section BC is\",round(Ibc,2),\"A from B to C\"\n", - "print \" Current in section CD is\",round(abs(Icd),2),\"A from D to C\"\n", - "print \" Current in section DE is\",round(abs(Ide),2),\"A from E to D\"\n", - "print \" Current in section EA is\",round(abs(Iea),2),\"A from A to E\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) C is the point of minimum potential.\n", - "(ii)Current in section AB is 29.04 A from A to B\n", - " Current in section BC is 19.04 A from B to C\n", - " Current in section CD is 0.96 A from D to C\n", - " Current in section DE is 30.96 A from E to D\n", - " Current in section EA is 40.96 A from A to E\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.24, Page number: 336" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Rab = 0.02 #ohm\n", - "Rbc = 0.018 #ohm\n", - "Rcd = 0.025 #ohm\n", - "Rda = 0.02 #ohm\n", - "Va = 250 #voltage ate point A(V)\n", - "\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "I = symbols('I')\n", - "I1 = solve(0.02*I+0.018*(I-150)+0.025*(I-450)+0.02*(I-700),I)[0]\n", - "Vab = 336.75*0.02 #V\n", - "Vbc = 186.75*0.018 #V\n", - "Vcd = 113.25*0.025 #V\n", - "Vda = 363.25*0.02 #V\n", - "Vb = Va-Vab #V\n", - "Vc = Vb-Vbc #V\n", - "Vd = Vc+Vcd #V\n", - "\n", - "#With interconnector\n", - "Eo = Va-Vc #Voltage between points A and C(V)\n", - "Ro = (Rab+Rbc)*(Rcd+Rda)/((Rab+Rbc)+(Rcd+Rda)) #Resistance viewed from points A & C(ohm)\n", - "Rac = 0.02 #Resistance of interconnector(ohm)\n", - "Iac = Eo/(Ro+Rac) #Current in interconnector AC(A)\n", - "\n", - "#Let ABCD be the ring distribution system.\n", - "#Let the current in section AB is I1. Then,\n", - "#current in section BC will be I1 \u2212 150. \n", - "#As the voltage drop round the closed mesh ABCA is zero.\n", - "I11 = symbols('I11')\n", - "I2 = solve(0.02*I11+0.018*(I11-150)-0.02*252.4,I11)[0]\n", - "\n", - "Vab1 = I2*0.02 #V\n", - "Vbc1 = 53.15*0.018 #V\n", - "Vad1 = 244.45*0.02 #V\n", - "Vb1 = Va-Vab1 #V\n", - "Vc1 = Vb1-Vbc1 #V\n", - "Vd1 = Va-Vad1 #V\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Before adding interconnector,\"\n", - "print \"\\tVoltage at point B is\",Vb,\"V\"\n", - "print \"\\tVoltage at point C is\",round(Vc,3),\"V\"\n", - "print \"\\tVoltage at point D is\",round(Vd,3),\"V\"\n", - "print \"After adding interconnector,\"\n", - "print \"\\tPotential of B is\",round(Vb1,2),\"V\"\n", - "print \"\\tPotential of C is\",round(Vc1,2),\"V\"\n", - "print \"\\tPotential of D is\",round(Vd1,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Before adding interconnector,\n", - "\tVoltage at point B is 243.265 V\n", - "\tVoltage at point C is 239.903 V\n", - "\tVoltage at point D is 242.735 V\n", - "After adding interconnector,\n", - "\tPotential of B is 245.92 V\n", - "\tPotential of C is 244.97 V\n", - "\tPotential of D is 245.11 V\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.25, Page number: 338" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable Declaration:\n", - "Rbd = 0.05 #resistance of interconnector(ohm)\n", - "Rab = 0.075 #resistance of branch AB(ohm)\n", - "Rbc = 0.025 #resistance of branch BC(ohm)\n", - "Rcd = 0.01 #resistance of branch CD(ohm)\n", - "Rde = 0.05 #resistance of branch DE(ohm)\n", - "Rea = 0.1 #resistance of branch EA(ohm)\n", - "\n", - "#Calculation:\n", - "#Let ABCDE be the ring distribution system.\n", - "#When interconnector BD is removed, let the current in branch \n", - "#AB be I.\n", - "# Current in BC = I-10;\n", - "# Current in CD = I-40;\n", - "# Current in DE = I-60;\n", - "# Current in EA = I-70;\n", - "\n", - "\n", - "#As the total drop round the ring ABCDEA is zero.\n", - "I = symbols('I')\n", - "\n", - "I1 = solve(Rab*I+Rbc*(I-10)+Rcd*(I-40)+Rde*(I-60)+Rea*(I-70),I)[0]\n", - "\n", - "#The actual distribution of currents will be as shown in Fig.(ii) above.\n", - "Vbcd = 30.96*0.025+0.96*0.01 #V\n", - "Eo = 0.7836 #V\n", - "Ro = (0.075+0.1+0.05)*(0.025+0.01)/((0.075+0.1+0.05)+(0.025+0.01))\n", - "\n", - "#(i)\n", - "Ibd = Eo/(Ro+Rbd) #A\n", - "Vbd = Ibd*0.05 #V\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Current in interconnector BD is\",round(Ibd,1),\"A\"\n", - "print \"(ii)Voltage drop along interconnector BD is\",round(Vbd,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Current in interconnector BD is 9.8 A\n", - "(ii)Voltage drop along interconnector BD is 0.49 A\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.26, Page number: 341" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "I1 = 50 #current on +ve side(A)\n", - "I2 = 40 #current on -ve side(A)\n", - "Rae = 0.1 #resistance of outer wire(ohm)\n", - "Rbg = 0.1 \n", - "Vab = 500 #V\n", - "Van = 250 #V\n", - "Vbn = 250 #V\n", - "\n", - "\n", - "#Calculation:\n", - "I3 = I1-I2 #current in the neutral wire(A)\n", - "Rnl = 2*Rae #resistance of neutral wire(ohm)\n", - "Vel = Van-I1*Rae-(I1-I2)*Rnl #V\n", - "Vlg = Vbn+(I1-I2)*Rnl-I2*Rbg #V\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage at the load end on the positive side is\",Vel,\"V\"\n", - "print \"Voltage at the load end on the negative side is\",Vlg,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage at the load end on the positive side is 243.0 V\n", - "Voltage at the load end on the negative side is 248.0 V\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.27, Page number: 342" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Vairable declaration:\n", - "r = 0.1 #resistance of each conductor(ohm)\n", - "Rel = 5 #ohm\n", - "Rcl = 6 #ohm\n", - "Vel = 240 #line to neutral voltage(V)\n", - "Vlc = 240 #line to neutral voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "I1 = Vel/5 #Current on +ve outer(A)\n", - "I2 = Vlc/6 #Current on \u2212ve outer(A)\n", - "In = I1-I2 #current in neutral(A)\n", - "V1 = Vel+I1*r+(I1-I2)*r #V\n", - "V2 = Vlc-(I1-I2)*r+I2*r #V\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage between +ve outer and neutral at feeding end is\",V1,\"V\"\n", - "print \"Voltage between -ve outer and neutral at feeding end is\",V2,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage between +ve outer and neutral at feeding end is 245.6 V\n", - "Voltage between -ve outer and neutral at feeding end is 243.2 V\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.28, Page number: 343" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V = 250 #voltage on the two sides of the middle wire(V)\n", - "P1 = 35 #power of load 1(kW)\n", - "P2 = 20 #power of load 2(kW)\n", - "\n", - "\n", - "#Calculation:\n", - "R1 = V**2/(P1*1000) #resistance of load 1(ohm)\n", - "R2 = V**2/(P2*1000) #resistance of load 2(ohm)\n", - "#After breaking of neutral wire,\n", - "I = 2*V/(R1+R2) #Circuit current(A)\n", - "V1 = I*R1 #V\n", - "V2 = I*R2 #V\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage across +ve outer and middle wire is\",round(V1,1),\"V\"\n", - "print \"Voltage across -ve outer and middle wire is\",round(V2,1),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across +ve outer and middle wire is 181.8 V\n", - "Voltage across -ve outer and middle wire is 318.2 V\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.29, Page number: 343" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Calculation:\n", - "Vck = 250-0.75-0.28+0.2 #V\n", - "Vdm = Vck-0.3-0.18+0.084 #V\n", - "Vjg = 250-0.2-1.2 #V\n", - "Vlh = Vjg+0.28-0.084-0.864 #V\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage across load CK is\",Vck,\"V\"\n", - "print \"Voltage across load DM is\",Vdm,\"V\"\n", - "print \"Voltage across load JG is\",Vjg,\"V\"\n", - "print \"Voltage across load LH is\",Vlh,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across load CK is 249.17 V\n", - "Voltage across load DM is 248.774 V\n", - "Voltage across load JG is 248.6 V\n", - "Voltage across load LH is 247.932 V\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.30, Page number: 344" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "Vab = 500 #volts\n", - "Van = 250 #volts\n", - "Vnb = 250 #volts\n", - "\n", - "\n", - "#Calculation:\n", - "#Voltage across CK = 250 \u2212 Drop in AC \u2212 Drop in KJ \u2212 Drop in JN\n", - "Vck = Van-4-0.5-0.1 #volts\n", - "\n", - "#Voltage across DM = 245\u00b74 \u2212 Drop in CD \u2212 Drop in ML + Drop in KL\n", - "Vdm = Vck-1.28-0.5+0.42 #volts\n", - "\n", - "#Voltage across JG = 250 + Drop in JN \u2212 Drop in GB\n", - "Vjg = Van+0.1-1.9 #volts\n", - "\n", - "#Voltage across LH = 248\u00b72 + Drop in KJ \u2212 Drop in KL \u2212 Drop in HG\n", - "Vlh = Vjg+0.5-0.42-2.4 #volts\n", - "\n", - "#Voltage across PF = 245\u00b788 + Drop in ML \u2212 Drop in MP \u2212 Drop in FH\n", - "Vpf = Vlh+0.5-0.72-1.02 #volts\n", - "\n", - "#Result:\n", - "print \"Voltage across CK is\",Vck,\"V\"\n", - "print \"Voltage across DM is\",Vdm,\"V\"\n", - "print \"Voltage across JG is\",Vjg,\"V\"\n", - "print \"Voltage across LH is\",Vlh,\"V\"\n", - "print \"Voltage across PF is\",Vpf,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across CK is 245.4 V\n", - "Voltage across DM is 244.04 V\n", - "Voltage across JG is 248.2 V\n", - "Voltage across LH is 245.88 V\n", - "Voltage across PF is 244.64 V\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.31, Page number: 346" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Vel = 240 #volt\n", - "Vlc = 240 #volt\n", - "Rel = 4 #ohm\n", - "Rlc = 6 #ohm\n", - "r = 0.15 #resistance of each conductor(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "I1 = Vel/Rel #Current in the positive outer(A)\n", - "I2 = Vlc/Rlc #current in the negative outer(A)\n", - "In = I1-I2 #current in the neutral wire(ohm)\n", - "V1 = Vel+I1*r+In*r #Voltage between +ve outer and neutral at feeding point(V)\n", - "V2 = Vlc-In*r+I2*r #Voltage between -ve outer and neutral at feeding point(V)\n", - "\n", - "\n", - "#(i)When neutral breaks,\n", - "#When there is a break in the neutral, the system\n", - "#is equivalent to 2- wire d.c. system.Now,\n", - "R1 = Rel+Rlc+2*r #ohm\n", - "Vt1 = V1+V2 #voltage at the feeding end(V)\n", - "I11 = Vt1/R1 #Load current(A)\n", - "Vl1 = I11*Rel #Voltage across 4 ohm resistance(V)\n", - "Vl2 = I11*Rlc #voltage across 6 ohm resistance(V)\n", - "\n", - "\n", - "#(ii) When +ve outer breaks,\n", - "#When there is a break in the +ve outer, there will be\n", - "#no current in 4 ohm load.\n", - "R2 = Rlc+2*r #Total circuit resistance(ohm)\n", - "Vt2 = V2 #volt\n", - "I22 = Vt2/R2 #load current(A)\n", - "VR2 = I22*Rlc #volt\n", - "\n", - "\n", - "#(iii)When \u2212ve outer breaks,\n", - "#When there is a break in the negative outer, there will be no\n", - "#current in 6 \u03a9 load.\n", - "R3 = 4+2*r #Total circuit resistance(ohm)\n", - "Vt3 = V1 #volt\n", - "I33 = Vt3/R3 #load current(A)\n", - "VR3 = I33*Rel #volt\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"When there is a break in the:\"\n", - "print \"(i) neutral wire, current is\",round(I11,2),\"A\" \n", - "print \" & voltage is\",round(Vl1,2),\"V and\",round(Vl2,2),\"V\"\n", - "print \" across 6 ohm & 4 ohm loads respectively.\"\n", - "print \"(ii) positive outer, current is\",round(I22,2),\"A\"\n", - "print \" and voltage is\",round(VR2,2),\"V\"\n", - "print \"(iii)negative outer, current is\",round(I33,2),\"A\"\n", - "print \" and voltage is\",round(VR3,2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "When there is a break in the:\n", - "(i) neutral wire, current is 48.06 A\n", - " & voltage is 192.23 V and 288.35 V\n", - " across 6 ohm & 4 ohm loads respectively.\n", - "(ii) positive outer, current is 38.57 A\n", - " and voltage is 231.43 V\n", - "(iii)negative outer, current is 58.6 A\n", - " and voltage is 234.42 V\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.32, Page number: 348" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable Declaration:\n", - "V = 500 #voltage b/w the outer supplies(V)\n", - "P1 = 1500 #load(kW)\n", - "P2 = 2000 #load(kW)\n", - "Vn = 250 #outer to neutral voltage(V)\n", - "\n", - "#Calculation:\n", - "I1 = P1*1000/Vn #Load current on +ve outer(A)\n", - "I2 = P2*1000/Vn #Load current on -ve outer(A)\n", - "In = I2-I1 #A\n", - "Pl = P1+P2 #kW\n", - "Ig = Pl*1000/V #Current supplied by main generator(A)\n", - "Ia = Ig-I1 #A\n", - "Ib = I2-Ig #A\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Current in the neutral is\",In,\"A\"\n", - "print \"(ii) total current supplied by main generator is\",Ig,\"A\"\n", - "print \"(iii)Current in machine A is\",Ia,\"A\"\n", - "print \" Current in machine B\",Ib,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Current in the neutral is 2000.0 A\n", - "(ii) total current supplied by main generator is 7000.0 A\n", - "(iii)Current in machine A is 1000.0 A\n", - " Current in machine B 1000.0 A\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.33, Page number: 349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V = 500 #volt\n", - "Vn = 250 #volt\n", - "P1 = 150 #load(kW)\n", - "P2 = 100 #load(kW)\n", - "Pl = 3 #loss in each balancer machine(kW)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "Pt = P1+P2+2*Pl #Total load on the main generator(kW)\n", - "Ig = Pt*1000/V #Current supplied by the main generator(A)\n", - "I1 = P1*1000/Vn #Load current on +ve side(A)\n", - "I2 = P2*1000/Vn #Load current on -ve side(A)\n", - "In = I1-I2 #Current in neutral wire(A)\n", - "Ia = I1-Ig #Current through machine A(A)\n", - "Ib = Ig-I2 #Current through machine B(A)\n", - "Pa = Ia*Vn/1000 #Load on machine A(kW)\n", - "Pb = Ib*Vn/1000 #Load on machine B(kW)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Total load on the main generator is\",Pt,\"kW\"\n", - "print \"(ii)Load on machine A is\",Pa,\"kW\"\n", - "print \" Load on machine B is\",Pb,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Total load on the main generator is 256 kW\n", - "(ii)Load on machine A is 22.0 kW\n", - " Load on machine B is 28.0 kW\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.34, Page number: 350" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "I1 = 1200 #current on +ve side(A)\n", - "I2 = 1000 #current on -ve side(A)\n", - "Pm = 200 #motor load acoss outer(kW)\n", - "Pl = 5 #loss in balancer machine(kW)\n", - "V = 500 #voltage across the outers(V)\n", - "Vn = 250 #voltage across the outer and the neutral(V)\n", - "\n", - "#Calculation:\n", - "#Since the positive side is more heavily loaded, \n", - "#so, machine A acts as a generator and machine B as a motor.\n", - "P1 = Vn*I1/1000 #Load on +ve side(kW)\n", - "P2 = Vn*I2/1000 #Load on -ve side(kW)\n", - "P3 = 200 #load on outers(kW)\n", - "Pt = P1+P2+P3+2*Pl #total load(kW)\n", - "Ig = Pt*1000/500 #Current of main generator(A)\n", - "In = I1-I2 #Current in neutral(A)\n", - "Ia = 1600-Ig #Current through machine A(A)\n", - "Ib = Ig-1400 #Current through machine B(A)\n", - "Pa = Vn*Ia/1000 #Load on machine A(kW)\n", - "Pb = Vn*Ib/1000 #Load on machine B(kW)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Current of the main generator is\",Ig,\"A\"\n", - "print \"(ii)Load on balancer machines: Pa =\",Pa,\"kW & Pb =\",Pb,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Current of the main generator is 1520.0 A\n", - "(ii)Load on balancer machines: Pa = 20.0 kW & Pb = 30.0 kW\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.35, Page number: 350" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Ipos = 800 #current on on the positive side(A)\n", - "Ineg = 550 #current on the negative side(A)\n", - "I = 1500 #curent across the outers(A)\n", - "Ra = 0.2 #resistance of each arotary balancer's armature(ohm)\n", - "Io = 5 #no load current(A)\n", - "Vn = 500 #supply voltage\n", - "\n", - "\n", - "#Calculation:\n", - "I1 = Ipos+I #Total current on +ve side(A)\n", - "I2 = Ineg+I #Total current on \u2212ve side(A)\n", - "In = Ipos-Ineg #Current in neutral wire(A)\n", - "\n", - "#Let the current through machines A and B be Ia and Ib \n", - "Ib = symbols('Ib')\n", - "Ia = In-Ib\n", - "#Each machine has same value of back e.m.f. E as their field\n", - "#currents & speeds are the same.\n", - "E = Vn/2-Ra*Io #Back e.m.f(V)\n", - "Va = E-Ia*Ra #Terminal p.d. across A(V)\n", - "Vb = E+Ib*Ra #Terminal p.d. across B(V)\n", - "Ib1 = round(solve(Va*Ia+Vn*Io+Ia**2*Ra+Ib**2*Ra-Vb*Ib,Ib)[0])\n", - "Ia1 = In-Ib1\n", - "Va1 = E-Ia1*Ra\n", - "Vb1 = E+Ib1*Ra\n", - "Ig = 2300-Ia1 #Load on main generator(A)\n", - "\n", - "#Result:\n", - "print \"(i)Current loading of each balancer machine: Ia =\",Ia1,\"A & Ib =\",Ib1,\"A\"\n", - "print \"(ii)Voltage across machine A is\",Va1,\"V\"\n", - "print \" Voltage across machine B is\",Vb1,\"V\"\n", - "print \"(iii)Load on main generator is\",Ig,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)Current loading of each balancer machine: Ia = 120.0 A & Ib = 130.0 A\n", - "(ii)Voltage across machine A is 225.0 V\n", - " Voltage across machine B is 275.0 V\n", - "(iii)Load on main generator is 2180.0 A\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 13.36, Page number: 352" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V = 500 #voltage at supply end(v)\n", - "l = 3 #line length(km)\n", - "Ifl = 120 #full loag current(A)\n", - "r = 0.5 #resistance of cable(ohm/km)\n", - "\n", - "#Calculation:\n", - "R = r*l #total resistance of the line(ohm)\n", - "Vl = R*Ifl #F.L. voltage drop in the line(V)\n", - "Vb = Vl #Terminal voltage of booster(V)\n", - "Po = Vb*Ifl/1000 #Output of booster(kW)\n", - "\n", - "\n", - "#Result:\n", - "print \"Booster Voltage is\",Vl,\"V\"\n", - "print \"Output of booster is\",Po,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Booster Voltage is 180.0 V\n", - "Output of booster is 21.6 kW\n" - ] - } - ], - "prompt_number": 41 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter14_1.ipynb b/Principles_of_Power_System/chapter14_1.ipynb deleted file mode 100644 index 9abb2d75..00000000 --- a/Principles_of_Power_System/chapter14_1.ipynb +++ /dev/null @@ -1,746 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0910cfded5ae40d0ea2b9576604d8007ec8328215058593fcec218762063deff" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14: A.C. Distribution" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.1, Page Number: 359" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "l = 300 #line length(m)\n", - "magI1 = 100 #current at load 1(A)\n", - "pf1 = 0.707 #power factor at load 1\n", - "l1 = 200 #line length till load 1(m)\n", - "magI2 = 200 #current drawn at load 2(A)\n", - "pf2 = 0.8 #power factor at laod 2\n", - "l2 = 300 #line length till load 2(m)\n", - "R = 0.2 #total resistance of line(ohm/km)\n", - "X = 0.1 #total reactance of the line(ohm/km)\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "Zac = (R+X*1j)*200/1000 #Impedance of section AC(ohm)\n", - "Zcb = (R+X*1j)*100/1000 #Impedance of section CB(ohm)\n", - "#Taking voltage at the far end B as the reference vector, we have\n", - "I2 = magI2*(pf2-1j*math.sin(phy2)) #Load current at point B(A)\n", - "I1 = magI1*(pf1-1j*math.sin(phy1)) #Load current at point C(A)\n", - "Icb = I2 #A\n", - "Iac = I1+I2 #A\n", - "Vcb = Icb*Zcb #V\n", - "Vac = Iac*Zac #V\n", - "V = Vac+Vcb #Voltage drop in the distributor(V)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage drop in the distributor is\",round(abs(V),2),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage drop in the distributor is 17.85 V\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.2, Page Number: 359" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "l = 2000 #line length(m)\n", - "magI1 = 80 #current at load 1(A)\n", - "pf1 = 0.9 #power factor at load 1\n", - "l1 = 1000 #line length till load 1(m)\n", - "magI2 = 120 #current drawn at load 2(A)\n", - "pf2 = 0.8 #power factor at laod 2\n", - "l2 = 2000 #line length till load 2(m)\n", - "R = 0.05 #total resistance of line(ohm/km)\n", - "X = 0.1 #total reactance of the line(ohm/km)\n", - "magVb = 230 #voltage maintained at point B(V)\n", - "\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "Zac = (R+X*1j)*1000/1000 #Impedance of section AC(ohm)\n", - "Zcb = (R+X*1j)*1000/1000 #Impedance of section CB(ohm)\n", - "#Taking voltage at the far end B as the reference vector, we have\n", - "I2 = magI2*(pf2-1j*math.sin(phy2)) #Load current at point B(A)\n", - "I1 = magI1*(pf1-1j*math.sin(phy1)) #Load current at point C(A)\n", - "Icb = I2 #A\n", - "Iac = I1+I2 #A\n", - "Vcb = Icb*Zcb #V\n", - "Vac = Iac*Zac #V\n", - "V = Vac+Vcb+magVb*(1+0j) #Voltage drop in the distributor(V)\n", - "theta = math.atan(V.imag/V.real)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Voltage drop in the distributor is\",round(abs(V),2),\"V\"\n", - "print \"(ii)The phase difference between Va and Vb is \",round(math.degrees(theta),2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Voltage drop in the distributor is 261.67 V\n", - "(ii)The phase difference between Va and Vb is 3.83 degrees\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.3, Page Number: 360" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "magI1 = 100 #current at load 1(A)\n", - "pf1 = 0.6 #power factor at load 1\n", - "magI2 = 100 #current drawn at load 2(A)\n", - "pf2 = 0.8 #power factor at laod 2\n", - "R = 0.1 #total resistance of line(ohm/km)\n", - "X = 0.15 #total reactance of the line(ohm/km)\n", - "magVb = 200 #voltage maintained at point B(V)\n", - "\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "Zam = (R+X*1j) #Impedance of section AM(ohm)\n", - "Zmb = (R+X*1j) #Impedance of section MB(ohm)\n", - "#Taking voltage at the far end B as the reference vector, we have\n", - "I2 = magI2*(pf2-1j*math.sin(phy2)) #Load current at point B(A)\n", - "Imb = I2 \n", - "Vb = magVb*(1+0j) #V\n", - "Vmb = Imb*Zmb #V\n", - "Vm = Vb+Vmb #V\n", - "alpha = math.atan(Vm.imag/Vm.real) #V\n", - "#The load current I1 has a lagging p.f. of 0\u00b76 w.r.t. VM. It lags \n", - "#behind Vm by an angle phy1.\n", - "#Phase angle between I1 and Vb\n", - "phy11 = phy1-alpha\n", - "I1 = magI1*(math.cos(phy11)-math.sin(phy11)*1j) #A\n", - "Iam = I1+I2 #A\n", - "Vam = Iam*Zam #V\n", - "Va = Vm+Vam #V\n", - "theta = math.atan(Va.imag/Va.real)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i)Voltage at mid-point is\",round(abs(Vm),1),\"V\"\n", - "print \"(ii) Sending end voltage Va is\",round(abs(Va),2),\"V\"\n", - "print \"(iii)The phase difference between Va and Vb is \",round(math.degrees(theta),2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)Voltage at mid-point is 217.1 V\n", - "(ii) Sending end voltage Va is 252.33 V\n", - "(iii)The phase difference between Va and Vb is 3.07 degrees\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.4, Page Number: 362" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Zab = 1+1j #ohm\n", - "Zbc = 1+2j #ohm\n", - "Zac = 1+3j #ohm\n", - "Ib = 20 #load current at B(A)\n", - "pfb = 0.8 #power factor at A\n", - "Ic = 15 #load current at C(A)\n", - "pfc = 0.6 #power factor at B\n", - "\n", - "\n", - "#Calculation:\n", - "Iab = Ib*(pfb-1j*math.sin(math.acos(pfb))) #Current in section AB(A)\n", - "Iac = Ic*(pfc-1j*math.sin(math.acos(pfc))) #Current in section AB(A)\n", - "Vab = Iab*Zab #Voltage drop in section AB(V)\n", - "Vac = Iac*Zac #Voltage drop in section AC(V)\n", - "#point B is at higher potential than point C. The p.d. between B and C\n", - "#is Thevenin\u2019s equivalent circuit e.m.f. Eo i.e.\n", - "Eo = Vac-Vab #volt\n", - "Zo = Zab+Zac #Thevenin\u2019s equivalent impedance(ohm)\n", - "Ibc = Eo/(Zo+Zbc) #A\n", - "Iab1 = Iab+Ibc #A\n", - "Iac1 = Iac-Ibc #A\n", - "Ia = Iab+Iac #Current fed at A(A)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The total current fed at A is\",Ia,\"A\"\n", - "print \"\\nCurrent in AB is\",Iab1.real+round(Iab1.imag,2)*1j,\"A\"\n", - "print \"\\nCurrent in BC is\",Ibc.real+round(Ibc.imag,2)*1j,\"A\"\n", - "print \"\\nCurrent in AC is\",Iac1.real+round(Iac1.imag,2)*1j,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total current fed at A is (25-24j) A\n", - "\n", - "Current in AB is (18.6-13.53j) A\n", - "\n", - "Current in BC is (2.6-1.53j) A\n", - "\n", - "Current in AC is (6.4-10.47j) A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.5, Page Number: 363" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "l = 1000 #line length(m)\n", - "magI1 = 5 #current at load 1(A)\n", - "pf1 = 0.8 #power factor at load 1\n", - "l1 = 600 #line length till load 1(m)\n", - "pf2 = 0.85 #power factor at motor load B\n", - "Po = 10 #power output at B(H.P)\n", - "n = 0.9 #efficiency\n", - "l2 = 400 #line length till load 2(m)\n", - "R = 1 #total resistance of line(ohm/km)\n", - "X = 0.5 #total reactance of the line(ohm/km)\n", - "magVb = 400 #voltage maintained at point B(V)\n", - "\n", - "\n", - "#Calculation:\n", - "Zac = (R+X*1j)*l1/l #ohm\n", - "Zcb = (R+X*1j)*l2/l #ohm\n", - "magVbp = magVb/3**0.5 #volt per phase\n", - "Vbp = magVbp*(1+0j) #V\n", - "magIb = Po*746/(3**0.5*magVb*pf2*n) #Line current at B(A)\n", - "magI2p = magIb\n", - "I2p = magI2p*(pf2-1j*math.sin(math.atan(pf2))) #A\n", - "I1p = magI1*(pf1-1j*math.sin(math.atan(pf1))) #A\n", - "Iac = I1p+I2p #Current in section AC(A)\n", - "Icb = I2p #Current in section CB(A)\n", - "Vcb = Icb*Zcb #V\n", - "Vac = Iac*Zac #V\n", - "Va = Vbp+Vcb+Vac #V\n", - "\n", - "\n", - "#Result:\n", - "print \"Line voltage at A is\",round(abs(Va)*3**0.5),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Line voltage at A is 434.0 V\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.6, Page Number: 364" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "magVa = 11000 #volt\n", - "magIb = 50 #load current at B(A)\n", - "pf2 = 0.8 #power factor(lagging)\n", - "magIc = 120 #load current at C(A)\n", - "pf3 = 1.0 #power factor(lagging)\n", - "magId = 70 #load current at D(A)\n", - "pf4 = 0.866 #power factor(lagging)\n", - "Zab = 1+0.6j #ohm\n", - "Zbc = 1.2+0.9j #ohm\n", - "Zcd = 0.8+0.5j #ohm\n", - "Zda = 3+2j #ohm\n", - "\n", - "\n", - "#Calculation:\n", - "#Let current in section AB be (x + j*y).\n", - "x,y = symbols('x,y')\n", - "Iab = x+1j*y\n", - "x,y = symbols('x,y')\n", - "Ibc = Iab-magIb*(pf2-math.sin(math.atan(pf2))) #A\n", - "Icd = (x-40+1j*(y+30))-(120+0j) #A\n", - "Ida = ((x-160)+1j*(y+30))-(70*(0.866-0.5j)) #A\n", - "Vab = Iab*Zab #Drop in section AB(V)\n", - "Vbc = Ibc*Zbc #Drop in section BC(V)\n", - "Vcd = Icd*Zcd #Drop in section CD(V)\n", - "Vda = Ida*Zda #Drop in section DA(V)\n", - "# Vab+Vbc+Vcd+Vda = 0\n", - "# As the real and imaginary parts have to be separately zero,\n", - "# 6*x-4*y-1009.8 = 0\n", - "# 4*x+6*y-302.2 = 0\n", - "x1 = solve(6*x-4*y-1009.8,x)[0]\n", - "y1 = round(solve(4*x1+6*y-302.2,y)[0],1)\n", - "x11 = round(solve(6*x-4*y1-1009.8,x)[0],1)\n", - "#now putting the values of x11 and y1 in above equationa,\n", - "Iab1 = x11+1j*y1 #A\n", - "Ibc1 = (x11-40)+1j*(y1+30) #A\n", - "Icd1 = (x11-40+1j*(y1+30))-(120+0j) #A\n", - "Ida1 = ((x11-160)+1j*(y1+30))-(70*(0.866-0.5j)) #A\n", - "magVap = round(magVa/3**0.5) #Voltage at supply end A(V)\n", - "Vb = magVap*(1+0j)-Iab1*Zab #Voltage at station B(V/phase)\n", - "Vc = Vb-Ibc1*Zbc #Voltage at station C(V/phase)\n", - "Vd = Vc-Icd1*Zcd #Voltage at station D(V/phase)\n", - "\n", - "\n", - "#Result:\n", - "print \"Current in section AB is\",Iab1,\"A\"\n", - "print \"Current in section BC is\",Ibc1,\"A\"\n", - "print \"Current in section CD is\",Icd1,\"A\"\n", - "print \"Current in section DA is\",Ida1,\"A\"\n", - "print \"Voltage at A is\",magVap*(1+0j),\"V/phase\"\n", - "print \"Voltage at B is\",Vb,\"V/phase\"\n", - "print \"Voltage at C is\",Vc,\"V/phase\"\n", - "print \"Voltage at D is\",Vd,\"V/phase\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current in section AB is (139.8-42.8j) A\n", - "Current in section BC is (99.8-12.8j) A\n", - "Current in section CD is (-20.2-12.8j) A\n", - "Current in section DA is (-80.82+22.2j) A\n", - "Voltage at A is (6351+0j) V/phase\n", - "Voltage at B is (6185.52-41.08j) V/phase\n", - "Voltage at C is (6054.24-115.54j) V/phase\n", - "Voltage at D is (6064-95.2j) V/phase\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.7, Page Number: 368" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "Pr = 10 #load connected to line R(kW)\n", - "Py = 8 #load connected to line Y(kW)\n", - "Pb = 5 #load connected to line B(kW)\n", - "Vl = 400 #line voltage(V)\n", - "#the loads are non-reactive.\n", - "\n", - "#Calculation:\n", - "Vp = round(Vl/3**0.5) #phase voltage(V)\n", - "Ir = Pr*1000/Vp #A\n", - "Iy = Py*1000/Vp #A\n", - "Ib = Pb*1000/Vp #A\n", - "\n", - "#Resolving the three currents along x-axis and y-axis, we have,\n", - "Ih = Iy*math.cos(math.pi/6)-Ib*math.cos(math.pi/6) #Resultant horizontal component(A)\n", - "Iv = Ir-Iy*math.cos(math.pi/3)-Ib*math.cos(math.pi/3) #Resultant vertical component(A)\n", - "In = (Ih**2+Iv**2)**0.5 #current in neutral wire(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Ir =\",round(Ir,1),\"A\"\n", - "print \" Iy =\",round(Iy,1),\"A\"\n", - "print \" Ib =\",round(Ib,2),\"A\"\n", - "print \"(ii) Current in neutral wire is\",round(In,1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Ir = 43.3 A\n", - " Iy = 34.6 A\n", - " Ib = 21.65 A\n", - "(ii) Current in neutral wire is 18.9 A\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.8, Page Number: 369" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Vl = 400 #line voltage(V)\n", - "Vp = 230 #voltage across lamp(V)\n", - "I1 = 70 #current in load RN(A)\n", - "I2 = 84 #current in load YN(A)\n", - "I3 = 33 #current in load BN(A)\n", - "Im = 200 #current taken by the motor(A)\n", - "pf = 0.2 #power factor(lagging)\n", - "\n", - "#Calculation:\n", - "#Lamp load alone:\n", - "Ih = I2*math.cos(math.pi/6)-I3*math.cos(math.pi/6) #Resultant H-component(A)\n", - "Iv = I1-I3*math.cos(math.pi/3)-84*math.cos(math.pi/3) #Resultant V-component(A)\n", - "In = math.sqrt(Ih**2+Iv**2) #Neutral current(A)\n", - "\n", - "\n", - "#Both lamp load and motor load:\n", - "Ir = Im*pf #Active component of motor current(A)\n", - "Ix = Im*math.sin(math.acos(pf)) #Reactive component of motor current(A)\n", - "IR = ((Ir+I1)**2+Ix**2)**0.5 #A\n", - "IY = ((Ir+I2)**2+Ix**2)**0.5 #A\n", - "IB = ((Ir+I3)**2+Ix**2)**0.5 #A\n", - "P = Vp*(I1+I2+I3)*1 #Watt #( cos phy_L = 1)\n", - "Pm = 3**0.5*Vl*Im*pf #Power supplied to motor(W)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Lamp load alone: neutral curent is\",round(In,2),\"A\"\n", - "print \"\\nWhen Both lamp load and motor load is present:\"\n", - "print \"The current components are:\"\n", - "print \"Neutral current is\",round(In,2),\"A\"\n", - "print \"IR =\",round(IR,1),\"A;\\tIY =\",round(IY,0),\"A;\\tIB =\",round(IB,2),\"A\"\n", - "print \"Power supplied to the lamp is\",P,\"W\"\n", - "print \"Power supplied to the motor is\",round(Pm),\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lamp load alone: neutral curent is 45.64 A\n", - "\n", - "When Both lamp load and motor load is present:\n", - "The current components are:\n", - "Neutral current is 45.64 A\n", - "IR = 224.7 A;\tIY = 232.0 A;\tIB = 209.11 A\n", - "Power supplied to the lamp is 43010 W\n", - "Power supplied to the motor is 27713.0 W\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.9, Page Number: 370" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Prn = 20 #kW\n", - "pf1 = 1 #power factor of loaf RN\n", - "kVAyn = 28.75 #kVA of load YN\n", - "kVAbn = 28.75 #kVA of load BN\n", - "pf2 = 0.866 #power factor of laod YN & BN each.(lagging)\n", - "Vl = 400 #line voltage(V)\n", - "Vp = 230 #phase voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "phy3 = phy2\n", - "Ir = Prn*1000/Vp #A\n", - "Iy = kVAyn*1000/Vp #A\n", - "Ib = kVAbn*1000/Vp #A\n", - "Ih = Ir-Iy*math.cos(phy2)-Ib*math.cos(phy2) #A\n", - "Iv = 0+Iy*math.sin(phy2)-Iy*math.sin(phy3) #A\n", - "In = math.sqrt(Ih**2+Iv**2) #A\n", - "#When load from B to N removed.:\n", - "#When the load from B to N is removed, the various line currents are:\n", - "#Ir in phase with Vrn; Iy lagging by 30 deg.; Ib = 0.\n", - "Ir1 = Ir\n", - "Iy1 = Iy; Ib1 = 0 #A\n", - "Ih1 = Ir1-Iy1*math.cos(math.pi/6) #A\n", - "Iv1 = 0-Iy1*math.sin(math.pi/6) #A\n", - "In1 = math.sqrt(Ih1**2+Iv1**2) #A\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"When no changes were made, the various currents are:\"\n", - "print \"Ir =\",round(Ir,2),\"A;\\tIy =\",Iy,\"A;\\tIb =\",Ib,\"A;\\tIn =\",round(In,2),\"A\"\n", - "print \"\\nWhen load from B to N removed, the various currents are:\"\n", - "print \"Ir =\",round(Ir1,2),\"A;\\tIy =\",Iy1,\"A;\\tIb =\",Ib1,\"A;\\tIn =\",round(In1,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "When no changes were made, the various currents are:\n", - "Ir = 86.96 A;\tIy = 125.0 A;\tIb = 125.0 A;\tIn = 129.54 A\n", - "\n", - "When load from B to N removed, the various currents are:\n", - "Ir = 86.96 A;\tIy = 125.0 A;\tIb = 0 A;\tIn = 66.03 A\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.10, Page Number: 371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Vl = 400 #line voltage(V)\n", - "Vp = 230 #phase voltage(V)\n", - "Ir = 30 #load current at R-phase(A)\n", - "pf1 = 0.866 #power factor for R-phase(lagging)\n", - "Iy = 30 ##load current at Y-phase(A)\n", - "pf2 = 0.866 #power factor for R-phase(lagging)\n", - "Ib = 30 ##load current at R-phase(A)\n", - "pf3 = 1.0 #power factor for R-phase(lagging)\n", - "R = 0.2 #resistance of each line conductor(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "phy3 = math.acos(pf3)\n", - "\n", - "VR = Vp*(1+0j) #V\n", - "VY = Vp*(math.cos(-2*math.pi/3)+math.sin(-2*math.pi/3)) #V\n", - "VB = Vp*(math.cos(2*math.pi/3)+math.sin(-2*math.pi/3)) #V\n", - "\n", - "#the line currents can be expressed as :\n", - "IR = cmath.rect(30,-math.pi/6) #A\n", - "IY = cmath.rect(30,-math.pi/2) #A\n", - "IB = cmath.rect(30,2*math.pi/3) #A\n", - "IN = IR+IY+IB #A\n", - "\n", - "#Since, the area of X-section of neutral is half of any line conductor.\n", - "Rn = 2*R #resistance of neutral(ohm)\n", - "#ER = VR + Drop in R phase + Drop in neutral\n", - "ER = VR+R*IR+IN*2*R #V\n", - "\n", - "\n", - "#Result:\n", - "print \"The supply end voltage for R phase is\",round(ER.real,3)+1j*round(ER.imag,3),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The supply end voltage for R phase is (239.588-10.608j) V\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 14.11, Page Number: 371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Vl = 400 #line voltage(V)\n", - "Vp = 230 #phase voltage(A)\n", - "Pln = 100 #load connected b/n LN(W)\n", - "Pyn = 150 #load connected b/n YN(W)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#before disconnecting the neutral wire,\n", - "R1 = Vp**2/Pln #Resistance of lamp L1(ohm)\n", - "R2 = Vp**2/Pyn #Resistance of lamp L2(ohm)\n", - "\n", - "#When the neutral wire is disconnected,\n", - "EL = 400 #V\n", - "I = EL/(R1+R2) #A\n", - "V1 = I*R1 #Voltage across lamp L1(V)\n", - "V2 = I*R2 #Voltage across lamp L2(V)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The voltage across the lamps are:\"\n", - "print \"Lamp 1, Voltage =\",V1,\"V ;\\tLamp 2, voltage =\",V2,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The voltage across the lamps are:\n", - "Lamp 1, Voltage = 240.0 V ;\tLamp 2, voltage = 160.0 V\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter15_1.ipynb b/Principles_of_Power_System/chapter15_1.ipynb deleted file mode 100644 index 35b4fcc7..00000000 --- a/Principles_of_Power_System/chapter15_1.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:99f2463b3650514f9c88ec63c2c7f7ef832ae42348e5f3fe2b1b870ab9434349" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 15: Voltage Control" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 15.1, Page Number: 384" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Pl = 10000 #load(kW)\n", - "pf = 0.8 #power factor(lag)\n", - "Vl = 33000 #receiving end line voltage(V)\n", - "R = 5 #line resistance(ohm)\n", - "X = 10 #line reactance(ohm)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "I2 = math.floor(Pl*1000/(3**0.5*Vl*0.8)) #load current(A)\n", - "Ip = I2*pf #A\n", - "Iq = I2*math.sin(math.acos(pf)) #A\n", - "V1 = round(Vl/3**0.5) #sending end voltage(V)\n", - "#Let Im be the current taken by the synchronous condenser.\n", - "Im = symbols('Im') #A\n", - "Im1 = solve((V1+Ip*R-X*(Im-Iq))**2+(Ip*X+(Im-Iq)*R)**2-V1**2,Im)[0]\n", - "C = 3*V1*round(Im1)/1000 #kVAR\n", - "\n", - "\n", - "#Result:\n", - "print \"Capacity of synchronous condenser is\",math.floor(C),\"kVAR\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacity of synchronous condenser is 13203.0 kVAR\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 15.2 Page Number: 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Pl = 25000 #load(kW)\n", - "pf = 0.8 #power factor(lag)\n", - "Vl = 33000 #receiving end line voltage(V)\n", - "R = 5 #line resistance(ohm)\n", - "X = 20 #line reactance(ohm)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "I2 = round(Pl*1000/(3**0.5*Vl*pf),1) #load current(A)\n", - "Ip = I2*pf #A\n", - "Iq = I2*math.sin(math.acos(pf)) #A\n", - "V1 = Vl/3**0.5 #sending end voltage(V)\n", - "#Let Im be the current taken by the synchronous condenser.\n", - "Im = symbols('Im') #A\n", - "Im1 = solve((V1+Ip*R-X*(Im-Iq))**2+(Ip*X+(Im-Iq)*R)**2-V1**2,Im)[0]\n", - "C = 3*V1*Im1/1000 #kVAR\n", - "\n", - "\n", - "#Result:\n", - "print \"Capacity of synchronous condenser is\",round(C/1000,2),\"MVAR\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacity of synchronous condenser is 33.11 MVAR\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter17_1.ipynb b/Principles_of_Power_System/chapter17_1.ipynb deleted file mode 100644 index f0b77b2e..00000000 --- a/Principles_of_Power_System/chapter17_1.ipynb +++ /dev/null @@ -1,842 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:85e6b6fc08cf389e51cb8c88e6ef45df0ab76627422a51dd5811f81a969b3ed6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 17: Symmetrical Fault Calculations" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.1, Page Number: 402" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "kVAa = 15000\n", - "kVAb = 20000\n", - "V = 12000\n", - "kVA_base = 35000\n", - "Xa = 30 #%reactance of alternator A(%)\n", - "Xb = 50 #%reactance of alternator B(%)\n", - "\n", - "\n", - "#Calculation:\n", - "Xa1 = kVA_base/kVAa*Xa #% Reactance of alternator A at the base kVA\n", - "Xb1 = kVA_base/kVAb*Xb #% Reactance of alternator B at the base kVA\n", - "I = kVA_base*1000/(3**0.5*V) #Line current corresponding to 35000 kVA at 12 kV\n", - "\n", - "X = Xa1*Xb1/(Xa1+Xb1) #Total % reactance from generator neutral up to fault point\n", - "Isc = I*100/X #Short-circuit current(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The short-circuit current is\",round(Isc),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The short-circuit current is 4330.0 A\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.2, Page Number: 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "kVA = 20000 #kVA rating of alternator\n", - "V = 10000 #voltage rating of alternator\n", - "Xa = 5 # % reactance of alternator(ohm)\n", - "\n", - "#Calculation:\n", - "I = kVA*1000/(3**0.5*V) #full load current(A)\n", - "Vp = V/3**0.5 #phase voltage(A)\n", - "#As the short-circuit current is to be 8 times the full-load current,\n", - "Xr = 1/8*100\n", - "Xe = Xr-Xa #External % reactance required\n", - "X = Xe*Vp/(I*100) #per phase external reactance required(ohm)\n", - "\n", - "#Result:\n", - "print \"Per phase external reactance required is\",X,\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Per phase external reactance required is 0.375 ohm\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.3, Page Number: 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Vl = 10 #transmission line voltage(kV)\n", - "Rl = 1 #line resistance(ohm)\n", - "Xl = 4 #line reactance(ohm)\n", - "MVAtf = 5 #transformer rating(MVA)\n", - "Xtf = 5 #reactance of transformer(%)\n", - "MVAal = 10 #rating of alternator(MVA)\n", - "Xal = 10 #reactance of alternator(%)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#Let 10,000 kVA be the base kVA\n", - "kVAb = 10000 #base kVA\n", - "Xalb = kVAb/(MVAal*1000)*Xal #% reactance of alternator on base kVA\n", - "Xtfb = kVAb/(MVAtf*1000)*Xtf #% reactance of transformer on base kVA\n", - "Xl1 = kVAb*Xl/(10*Vl**2) #% reactance of transmission line\n", - "Rl1 = kVAb*Rl/(10*Vl**2) #% resistance of transmission line\n", - "\n", - "\n", - "#(i)For a fault at the end of a transmission line (point F2),\n", - "Xt = Xalb+Xtfb+Xl1 #Total % reactance\n", - "Z = (Xt**2+Rl1**2)**0.5 #% impedance from generator neutral upto fault point F2\n", - "SCkVA1 = kVAb*100/Z #Short-circuit kVA\n", - "\n", - "\n", - "#(ii)For a fault at the high voltage terminals of the transformer (point F1),\n", - "#Total % reactance from generator neutral upto fault point F1:\n", - "Xt1 = Xalb+Xtfb\n", - "SCkVA2 = kVAb*100/Xt1 #Short-circuit kVA\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) SC kVA for 1st case = \",round(SCkVA1),\"kVA\"\n", - "print \"(ii)SC kVA for 2nd case = \",round(SCkVA2),\"kVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) SC kVA for 1st case = 16440.0 kVA\n", - "(ii)SC kVA for 2nd case = 50000.0 kVA\n" - ] - } - ], - "prompt_number": 50 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.4, Page Number: 405" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "kVAb = 10000 #kVA base\n", - "Xt = 5 #reactance of each transformer(%)\n", - "kVAt = 5000 #kVA rating of each transformer\n", - "kVA1 = 10000 #kVA of generator A & B each\n", - "kVA3 = 5000 #kVA of generator C\n", - "Xa = 12 #reactance of generator A & B each(%)\n", - "Xc = 18 #reactance of generator c(%)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#The % reactance of generators A, B and C and that of\n", - "#each transformer on the selected base kVA will be:\n", - "XA = Xa*kVAb/kVA1\n", - "XB = Xa*kVAb/kVA1\n", - "XC = Xc*kVAb/kVA3\n", - "XT = Xt*kVAb/kVAt\n", - "\n", - "#(i) When the fault occurs on the low voltage side of the\n", - "#transformer,\n", - "#Total % reactance from generator neutral upto fault point F1\n", - "XT1 = XA/2*XC/(XA/2+XC) #%\n", - "MVAf1 = kVAb*100/XT1/1000 #Fault MVA\n", - "\n", - "#(i) When the fault occurs on the high voltage side of the\n", - "#transformer\n", - "#Total % reactance from generator neutral upto fault point F2\n", - "XT2 = XT1+XT #%\n", - "MVAf2 = kVAb*100/XT2/1000 #Fault MVA\n", - "\n", - "\n", - "#Result:\n", - "print \"Maximum fault MVA which the circuit breakers on:\"\n", - "print \"(i) low voltage side is\",round(MVAf1,1),\"MVA\"\n", - "print \"(ii)high voltage side is\",round(MVAf2),\"MVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum fault MVA which the circuit breakers on:\n", - "(i) low voltage side is 194.4 MVA\n", - "(ii)high voltage side is 66.0 MVA\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.5, Page Number: 407" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "#Variable declaration:\n", - "X1 = 10 #reactance of generator 1 & 2 each(%)\n", - "X3 = 12 #reactance of generator 3 & 4 each(%)\n", - "kVA1 = 10000 #kVA rating of generator 1 & 2 each\n", - "kVA3 = 8000 #kVA rating of generator 3 & 4 each\n", - "Xr = 10 #reactance of reactor(%)\n", - "kVAr = 5000 #kVA of reactor\n", - "\n", - "\n", - "#Calculation:\n", - "#Fig. above shows the single line diagram of the network.\n", - "kVAb = 10000 #base kVA\n", - "X1b = X1*kVAb/kVA1 #% Reactance of generator 1 or 2 on the base kVA\n", - "X3b = X3*kVAb/kVA3 #% Reactance of generator 3 or 4 on the base kVA\n", - "Xrb = Xr*kVAb/kVAr #% Reactance of bus-bar reactor on the base kVA\n", - "\n", - "#After the fault occurs,\n", - "Xt = ((X1b/2+Xrb)*X3b/2)/(X1b/2+Xrb+X3b/2)\n", - "kVAf = kVAb*100/Xt\n", - "\n", - "\n", - "#Result:\n", - "print \"Required fault MVA is\",round(kVAf/1000,2),\"MVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required fault MVA is 173.33 MVA\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.6, Page Number: 408" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "kVAa = 3000 #kVA rating of generator A\n", - "kVAb = 4500 #kVA rating of generator B\n", - "Xa = 7 #% reactance of gen A\n", - "Xb = 8 #% reactance of gen A\n", - "kVAt = 7500 #kVA rating of transformer\n", - "Xt = 7.5 #% reactance of transformer\n", - "Vb = 3.3 #bus voltage(kV)\n", - "\n", - "#Calculation:\n", - "kVAbs = 7500 #base kVA(say)\n", - "XA = Xa*kVAbs/kVAa #% Reactance of generator A on the base kVA\n", - "XB = Xb*kVAbs/kVAb #% Reactance of generator B on the base kVA\n", - "XT = Xt*kVAbs/kVAt #% Reactance of transformer on the base kVA\n", - "X = symbols('X') #percentage reactance of the bus-bar reactor\n", - "Xt1 = (XA*XB/(XA+XB))*(X+XT)/((XA*XB/(XA+XB))+(X+XT))\n", - "SCkVA = kVAt*100*Xt1 #Short-circuit kVA\n", - "#But the short-circuit kVA should not exceed 150 * 10**3 kVA,\n", - "#the rupturing capacity of the breaker.\n", - "\n", - "X1 = abs(solve(SCkVA-150*1000,X)[0])\n", - "x = X1*10*Vb**2/kVAt #reactance of the reactor(ohm)\n", - "\n", - "#Result:\n", - "print \"Reactance of the reactor per phase is\",round(x,3),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reactance of the reactor per phase is 0.106 ohm\n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.7, Page Number: 409" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaratioon:\n", - "MVAbase = 100 #base MVA\n", - "MVAa = 1500 #estimated short-circuit MVA at busbar A\n", - "MVAb = 1200 #estimated short-circuit MVA at busbar B\n", - "kV = 33 #generated voltage at each station(kV)\n", - "x = 1 #transmission line reactance(ohm)\n", - "\n", - "#Calculation:\n", - "Xa = MVAbase/MVAa*100 #% Reactance of station A on the base MVA\n", - "Xb = MVAbase/MVAb*100 #% Reactance of station B on the base MVA\n", - "Xt = MVAbase*1000*x/(10*kV**2)\n", - "\n", - "#Fault on station A.\n", - "Xt1 = (Xb+Xt)*Xa/(Xa+Xb+Xt) #Total % reactance upto fault point F1\n", - "SCMVA1 = MVAbase*100/Xt1 #Short-circuit MVA\n", - "\n", - "#Fault on station B.\n", - "Xt2 = (Xa+Xt)*Xb/(Xb+Xa+Xt) #Total % reactance upto fault point F2\n", - "SCMVA2 = MVAbase*100/Xt2 #Short-circuit MVA\n", - "\n", - "\n", - "#Result:\n", - "print \"Fault on station A, the short circuit MVA is\",round(SCMVA1),\"MVA\"\n", - "print \"Fault on station B, the short circuit MVA is\",round(SCMVA2),\"MVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fault on station A, the short circuit MVA is 2071.0 MVA\n", - "Fault on station B, the short circuit MVA is 1831.0 MVA\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.8, Page Number: 410" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "kVAbase = 5000 #base kVA\n", - "Xr = 6 #% reactance of reactor\n", - "Xg = 12 #% reactance of each generator\n", - "kVAg = 5000 #given generator rating(kVA)\n", - "kVAr = 5000 #given reactor rating(kVA)\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) With reactors:\n", - "#Suppose a 3-phase short-circuit fault occurs on section 3 of the bus-bar.\n", - "\n", - "Xt1 = round(((Xr+Xg)/2+Xr)*Xg/(((Xr+Xg)/2+Xr)+Xg),2) #% reactance from gen. neutral upto fault point F \n", - "SCkVA1 = kVAbase*100/Xt1 #Short-circuit input\n", - "\n", - "#(ii) Without reactors:\n", - "Xt2 = Xg/3 #Total % reactance upto fault point F\n", - "SCkVA2 = kVAbase*100/Xt2\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) With reactors, short circuit MVA\",round(SCkVA1/1000,3),\"MVA\"\n", - "print \"(ii) With reactors, short circuit MVA\",SCkVA2/1000,\"MVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) With reactors, short circuit MVA 74.963 MVA\n", - "(ii) With reactors, short circuit MVA 125.0 MVA\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.9, Page Number: 411" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "MVAbase = 5 #base MVA\n", - "MVAg = 10 #MVA of generator\n", - "MVAr = 10 #MVA of reactor\n", - "MVAtr = 5 #MVA of transformer\n", - "xr = 10 #% reactance of each reactor\n", - "xg = 30 #% reactance of each generator\n", - "xtr = 5 #% reactance of each transformer\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "Xg = xg*MVAbase/MVAg #%age reactance of each generator on the base MVA\n", - "Xr = xr*MVAbase/MVAr #%age reactance of each reactor on the base MVA\n", - "Xtr = xtr*MVAbase/MVAtr #%age reactance of each transformer on the base MVA\n", - "\n", - "#Total %age reactance from generator neutral upto fault point F\n", - "Xt = ((Xg+Xr)/2+Xtr)*Xg/(((Xg+Xr)/2+Xtr)+Xg)+Xr\n", - "SCMVA = MVAbase*100/Xt #short circuit MVA\n", - "\n", - "\n", - "#Result:\n", - "print \"Short circuit MVA is\",SCMVA,\"MVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Short circuit MVA is 40.0 MVA\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.10, Page Number: 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "#Let N = no. of section in bus bar\n", - "#Q = kVA rating of generator\n", - "#x = reactance of reactance\n", - "#b = bus reactances.\n", - "N,Q,x,b = symbols('N Q x b')\n", - "\n", - "#Calculation:\n", - "X1 = (b+(x+b)/(N-1))*x/(b+(x+b)/(N-1)+x) # %\n", - "SCkVA = Q*100/X1 #short circuit kVA\n", - "\n", - "\n", - "#Now putting values:\n", - "Q = 50000 #kVA\n", - "x = 20 # %\n", - "b = 10 # %\n", - "\n", - "#(i) With 3 sections\n", - "N1 = 3\n", - "X1 = (b+(x+b)/(N1-1))*x/(b+(x+b)/(N1-1)+x)\n", - "SCkVA1 = Q*100/X1\n", - "\n", - "#(ii) With 9 sections\n", - "N2 = 9\n", - "X2 = (b+(x+b)/(N2-1))*x/(b+(x+b)/(N2-1)+x)\n", - "SCkVA2 = Q*100/X2\n", - "\n", - "#(ii) When N is very large\n", - "N3 = 9999999999999 #say\n", - "X3 = (b+(x+b)/(N3-1))*x/(b+(x+b)/(N3-1)+x)\n", - "SCkVA3 = Q*100/X3\n", - "\n", - "#Result:\n", - "print \"Short circuit kVA\"\n", - "print \"(i) For 3 sections is\",SCkVA1,\"kVA\"\n", - "print \"(ii) For 9 sections is\",round(SCkVA2),\"kVA\"\n", - "print \"(iii)For large N is\",round(SCkVA3),\"kVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Short circuit kVA\n", - "(i) For 3 sections is 450000.0 kVA\n", - "(ii) For 9 sections is 613636.0 kVA\n", - "(iii)For large N is 750000.0 kVA\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.11, Page Number: 414" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "MVAbs = 50 #base MVA\n", - "MVAg = 10 #MVA of each generators\n", - "xg = 20 #% reactance\n", - "xt = 10 #reactance of transformer(%)\n", - "MVAt = 50 #MVA of transformer\n", - "kV = 33 #bus voltage\n", - "\n", - "\n", - "#Calculation:\n", - "Xg = MVAbs/MVAg*xg #% reactance of each of the generator on base MVA\n", - "Xt = MVAbs/MVAt*xt #% reactance of the transformer on base MVA\n", - "\n", - "#Suppose the required reactance of the reactor is X % on 50 MVA base.\n", - "X = symbols('X')\n", - "#The reactances of the four generators are in parallel\n", - "#& their equivalent reactance = 100/4 = 25%.\n", - "\n", - "Xtt = (Xg/4*(X+10))/(Xg/4+(X+10))\n", - "\n", - "#Now fault MVA at F is not to exceed 500 MVA.\n", - "Xreq = MVAbs*100/500 #required reactance(%)\n", - "X1 = solve(Xtt-Xreq,X)[0]\n", - "Xrt = 10*kV**2*X1/(MVAbs*10**3) #Reactance of the reactor(ohm)\n", - "\n", - "\n", - "#Result:\n", - "print \"Reactance of the reactor is\",round(Xrt,3),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reactance of the reactor is 1.452 ohm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.12, Page Number: 415" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "kVAg = 5000 #kVA rating of generator\n", - "V = 6600 #voltage rating(V)\n", - "x = 6 #reactance of generator(%)\n", - "\n", - "\n", - "#Calculation:\n", - "X = symbols('X') #% reactance of the reactor\n", - "kVAbs = 5000 #base kVA\n", - "#The short-circuit kVA is not to exceed 5 \u00d7 5000 kVA.\n", - "X1 = solve(kVAbs*100/(X+x)-5*kVAg)[0]\n", - "\n", - "X11 = X1*10*(V/1000)**2/kVAg #reactance in ohm\n", - "\n", - "\n", - "#Result:\n", - "print \"The required reactance is\",round(X11,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required reactance is 1.22 ohm\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.13, Page Number: 416" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "MVAg1 = 15 #MVA rating of A & B generators\n", - "x1 = 12 #reactance of A & B(%)\n", - "MVAg3 = 8 #MVA rating of generator C\n", - "x3 = 10 #reactance of C(%)\n", - "MVAt = 5 #MVA rating of each transformer\n", - "xt = 4 #reactance of each transformer(%)\n", - "MVAr = 10 #MVA of reactor\n", - "xr = 15 #reactance of reactor(%)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let 10 MVA be the base MVA.\n", - "MVAbs = 10\n", - "#The percentage reactance of various elements on the selected\n", - "#base MVA will be :\n", - "Xa = MVAbs/MVAg1*x1\n", - "Xb = MVAbs/MVAg1*x1\n", - "Xc = MVAbs/MVAg3*x3\n", - "Xt = MVAbs/MVAt*xt\n", - "\n", - "\n", - "\n", - "#After the fault occurs,\n", - "#The reactances of generators A and B are in parallel & their\n", - "#equivalent reactance is 8%/2 = 4%.\n", - "\n", - "#Total reactance upto fault point F:\n", - "XT = ((Xa*Xb)/(Xa+Xb)+Xt)*(Xc+xr)/(((Xa*Xb)/(Xa+Xb)+Xt)+(Xc+xr))\n", - "MVA = MVAbs*100/XT #Fault MVA\n", - "\n", - "#Result:\n", - "print \"Total reactance upto fault point F is\",round(MVA,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total reactance upto fault point F is 119.7 %\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.14, Page Number: 417" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "MVAa = 10 #MVA ratng of alterator\n", - "xa = 20 #reactance of alterator(%)\n", - "MVAt = 5 #MVA of tranformer\n", - "xt = 10 #reactance of transformer(%)\n", - "V1 = 6.6 #voltage on alterator side(kV)\n", - "V2 = 33 #voltage on transmission line side(kV)\n", - "xl = 50 #line reactance(ohm)\n", - "rl = 10 #line resistance(ohm)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "MVAbs = 10 #base MVA\n", - "Xa = MVAbs/MVAa*xa #% reactance of the alternator on base MVA\n", - "Xt = MVAbs/MVAt*xt #% reactance of the transformer on base MVA\n", - "Xl = MVAbs*1000*xl/(10*V2**2) #% reactance of the transmission line\n", - "Rl = MVAbs*1000*rl/(10*V2**2) #% resistance of the transmission line\n", - "#When the symmetrical fault occurs at point F on the transmission line (50 km away), then\n", - "XT = Xa+Xt+Xl #Total % reactance upto the point of fault F\n", - "Z = math.sqrt(XT**2+Rl**2) #% impedance from generator neutral upto fault point F\n", - "SCMVA = MVAbs*100/Z #Short-circuit MVA\n", - "Isc = SCMVA*10**6/(3**0.5*V1*1000) #Short-circuit current fed to the fault by the alternator\n", - "\n", - "\n", - "#Result:\n", - "print \"Short-circuit current fed to the fault by the alternator is\",round(Isc),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Short-circuit current fed to the fault by the alternator is 1012.0 A\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 17.15, Page Number: 418" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "#the ratings of the machines and equipments are shown in fig above.\n", - "\n", - "MVAbs = 10\n", - "\n", - "\n", - "#Calculation:\n", - "X1 = MVAbs/10*12 #% reactance of each generator (A, B, C and D) on the base MVA\n", - "X2 = MVAbs/10*24 #% reactance of the reactor on the base MVA\n", - "X3 = MVAbs/6*3 #% reactance of the transformer on the base MVA\n", - "\n", - "#When fault occurs at point F,\n", - "XT = (30*6/(30+6))+5 #% reactance from generator neutral upto fault point F\n", - "MVAf = MVAbs*100/XT #Fault MVA\n", - "Isc = 100*10**6/(3**0.5*66000) #Short-circuit current\n", - "\n", - "\n", - "#Result:\n", - "print \"The fault current is\",round(Isc),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fault current is 875.0 A\n" - ] - } - ], - "prompt_number": 62 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter18_1.ipynb b/Principles_of_Power_System/chapter18_1.ipynb deleted file mode 100644 index d291f15a..00000000 --- a/Principles_of_Power_System/chapter18_1.ipynb +++ /dev/null @@ -1,1223 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c30652f9881ee18245a1635c17c8cb6587983fc4f38ea35cc91611c084543096" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 18: Unsymmetrical Fault Calculations" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.2, Page Number: 429" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Ir = cmath.rect(100,30*math.pi/180) #current in phase R(A)\n", - "Iy = cmath.rect(50,300*math.pi/180) #current in phase Y(A)\n", - "Ib = cmath.rect(30,180*math.pi/180) #current in phase B(A)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "I0 = 1/3*(Ir+Iy+Ib) #A\n", - "I1 = 1/3*(Ir+a*Iy+a**2*Ib) #A\n", - "I2 = 1/3*(Ir+a**2*Iy+a*Ib) #A\n", - "In = Ir+Iy+Ib #A\n", - "\n", - "\n", - "#Result:\n", - "print \"The positive, negative and zero sequence currents in the R-line are\"\n", - "print \"I0 = (\",round(abs(I0),2),round(rad2deg(angle(I0)),2),\") A\"\n", - "print \"I1 = (\",round(abs(I1),2),round(rad2deg(angle(I1)),1),\") A\"\n", - "print \"I2 = (\",round(abs(I2),2),round(rad2deg(angle(I2)),2),\") A\"\n", - "print \"Return current in the neutral wire is\"\n", - "print \"In =(\",round(abs(In),2),round(rad2deg(angle(In)),1),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The positive, negative and zero sequence currents in the R-line are\n", - "I0 = ( 27.29 4.69 ) A\n", - "I1 = ( 57.98 43.3 ) A\n", - "I2 = ( 18.97 24.96 ) A\n", - "Return current in the neutral wire is\n", - "In =( 81.88 4.7 ) A\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.3, Page Number: 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Ir = 12+6j #current in phase A(A)\n", - "Iy = 12-12j #current in phase Y(A)\n", - "Ib = -15+10j #current in phase B(A)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "#Red phase\n", - "Ir0 = 1/3*(Ir+Iy+Ib) #A\n", - "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #A\n", - "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #A\n", - "\n", - "#Yellow phase:\n", - "Iy0 = Ir0 #A\n", - "Iy1 = a**2*Ir1 #A\n", - "Iy2 = a*Ir2 #A\n", - "\n", - "\n", - "#Blue phase:\n", - "Ib0 = Ir0 #A\n", - "Ib1 = a*Ir1 #A\n", - "Ib2 = a**2*Ir2 #A\n", - "\n", - "\n", - "#Result:\n", - "print \"The sequence currents of red phase are:\"\n", - "print \"Ir0 =\",Ir0.real+round(Ir0.imag,2)*1j,\"A\"\n", - "print \"Ir1 =\",round(Ir1.real,2)+round(Ir1.imag,2)*1j,\"A\"\n", - "print \"Ir2 =\",round(Ir2.real,2)+round(Ir2.imag,2)*1j,\"A\"\n", - "print \"\\nThe sequence currents of red phase are:\"\n", - "print \"Iy0 =\",Iy0.real+round(Iy0.imag,2)*1j,\"A\"\n", - "print \"Iy1 =\",round(Iy1.real,2)+round(Iy1.imag,1)*1j,\"A\"\n", - "print \"Iy2 =\",round(Iy2.real,1)+round(Iy2.imag,2)*1j,\"A\"\n", - "print \"\\nThe sequence currents of red phase are:\"\n", - "print \"Ib0 =\",Ib0.real+round(Ib0.imag,2)*1j,\"A\"\n", - "print \"Ib1 =\",round(Ib1.real,2)+round(Ib1.imag,2)*1j,\"A\"\n", - "print \"Ib2 =\",round(Ib2.real,2)+round(Ib2.imag,2)*1j,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sequence currents of red phase are:\n", - "Ir0 = (3+1.33j) A\n", - "Ir1 = (10.85+10.13j) A\n", - "Ir2 = (-1.85-5.46j) A\n", - "\n", - "The sequence currents of red phase are:\n", - "Iy0 = (3+1.33j) A\n", - "Iy1 = (3.35-14.5j) A\n", - "Iy2 = (5.7+1.13j) A\n", - "\n", - "The sequence currents of red phase are:\n", - "Ib0 = (3+1.33j) A\n", - "Ib1 = (-14.2+4.33j) A\n", - "Ib2 = (-3.8+4.33j) A\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.4, Page Number: 430" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Er0 = 100 #zero sequence voltage of phase R(V)\n", - "Er1 = 200-100j #positive sequence voltage of phase R(V)\n", - "Er2 = -100 #negative sequence voltage of phase R(V)\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "Er = Er0+Er1+Er2 #V\n", - "Ey = Er0+a**2*Er1+a*Er2 #V\n", - "Eb = Er0+a*Er1+a**2*Er2 #V\n", - "\n", - "\n", - "#Result:\n", - "print \"The phase voltages are:\"\n", - "print \"Er =\",(round(abs(Er),2),round(rad2deg(angle(Er)),2)),\"V\"\n", - "print \"Ey =\",(round(abs(Ey)),round(rad2deg(angle(Ey)),2)),\"V\"\n", - "print \"Eb =\",(round(abs(Eb),2),round(rad2deg(angle(Eb)),1)),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The phase voltages are:\n", - "Er = (223.61, -26.57) V\n", - "Ey = (213.0, -99.9) V\n", - "Eb = (338.59, 66.2) V\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.5, Page Number: 431" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Er0 = 0.5-0.866j #zero sequence components of red phase(V)\n", - "Er1 = 2+0j #positive sequence components of red phase(V)\n", - "Er = 3+0j #phase R voltage(V)\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "Er2 = Er-(Er0+Er1) #negative sequence voltage of red phase(V)\n", - "Ey = Er0+a**2*Er1+a*Er2 #phase Y voltage(V)\n", - "Eb = Er0+a*Er1+a**2*Er2 #phase B voltage(V)\n", - "\n", - "#Result:\n", - "print \"The negative sequence component of red phase is\"\n", - "print \"Ir2 = (\",round(abs(Er2)),round(rad2deg(angle(Er2))),\") V\"\n", - "print \"\\nThe phase voltages are:\"\n", - "print \"Iy = (\",round(abs(Ey)),round(rad2deg(angle(Ey))),\") V\"\n", - "print \"Ib = (\",round(abs(Eb)),round(rad2deg(angle(Eb))),\") V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The negative sequence component of red phase is\n", - "Ir2 = ( 1.0 60.0 ) V\n", - "\n", - "The phase voltages are:\n", - "Iy = ( 3.0 -120.0 ) V\n", - "Ib = ( 0.0 120.0 ) V\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.6, Page Number: 431" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "In = 12 #current from neutral to ground(A)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "I0 = In/3 #A\n", - "\n", - "\n", - "#Result:\n", - "print \"The zero phase sequence components in phases are\",I0,\"A each\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The zero phase sequence components in phases are 4.0 A each\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.7, Page Number: 432" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#(i) Before removal of fuses.\n", - "Iri = cmath.rect(90,0) #phase R current(A)\n", - "Iyi = cmath.rect(90,math.pi/180*240) #phase Y current(A)\n", - "Ibi = cmath.rect(90,math.pi/180*120) #phase B current(A)\n", - "\n", - "#(ii) After removal of fuses.\n", - "Irii = 90+0j #A\n", - "Iyii = 0 #A\n", - "Ibii = 0 #A\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "#(i) Before removal of fuses.\n", - "#Since the system is balanced, it will have only positive sequence currents.\n", - "Ir1i = Iri #A\n", - "Iy1i = Iyi #A\n", - "Ib1i = Ibi #A\n", - "\n", - "\n", - "\n", - "#(ii) After removal of fuses.\n", - "#The sequence currents in the three lines will be:\n", - "Ir0ii = 1/3*(Irii+Iyii+Ibii) #A\n", - "Iy0ii = Ir0ii #A\n", - "Ib0ii = Ir0ii #A\n", - "\n", - "Ir1ii = 1/3*(Irii+Iyii+Ibii) #A\n", - "Iy1ii = a**2*Ir1ii #A\n", - "Ib1ii = a*Ir1ii #A\n", - "\n", - "Ir2ii = 1/3*(Irii+a**2*Iyii+a*Ibii) #A\n", - "Iy2ii = a*Ir2ii #A\n", - "Ib2ii = a**2*Ir2ii #A\n", - "\n", - "#Result:\n", - "print \"(i) Before removal of fuses, the symmetrical components are:\"\n", - "print \"\\tIr1 = (\",round(abs(Ir1i)),round(rad2deg(angle(Ir1i))),\") A\"\n", - "print \"\\tIy1 = (\",round(abs(Iy1i)),360+round(rad2deg(angle(Iy1i))),\") A\"\n", - "print \"\\tIb1 = (\",round(abs(Ib1i)),round(rad2deg(angle(Ib1i))),\") A\"\n", - "print \"\\n(ii) After the removal of fuses, the symmetrical components are:\"\n", - "print \"\\tIr0 = (\",round(abs(Ir0ii)),round(rad2deg(angle(Ir0ii))),\") A\"\n", - "print \"\\tIr1 = (\",round(abs(Ir1ii)),round(rad2deg(angle(Ir1ii))),\") A\"\n", - "print \"\\tIr2 = (\",round(abs(Ir2ii)),round(rad2deg(angle(Ir2ii))),\") A\"\n", - "print \"\\n\\tIy0 = (\",round(abs(Iy0ii)),round(rad2deg(angle(Iy0ii))),\") A\"\n", - "print \"\\tIy1 = (\",round(abs(Iy1ii)),360+round(rad2deg(angle(Iy1ii))),\") A\"\n", - "print \"\\tIy2 = (\",round(abs(Iy2ii)),round(rad2deg(angle(Iy2ii))),\") A\"\n", - "print \"\\n\\tIb0 = (\",round(abs(Ib0ii)),round(rad2deg(angle(Ib0ii))),\") A\"\n", - "print \"\\tIb1 = (\",round(abs(Ib1ii)),round(rad2deg(angle(Ib1ii))),\") A\"\n", - "print \"\\tIb2 = (\",round(abs(Ib2ii)),360+round(rad2deg(angle(Ib2ii))),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Before removal of fuses, the symmetrical components are:\n", - "\tIr1 = ( 90.0 0.0 ) A\n", - "\tIy1 = ( 90.0 240.0 ) A\n", - "\tIb1 = ( 90.0 120.0 ) A\n", - "\n", - "(ii) After the removal of fuses, the symmetrical components are:\n", - "\tIr0 = ( 30.0 0.0 ) A\n", - "\tIr1 = ( 30.0 0.0 ) A\n", - "\tIr2 = ( 30.0 0.0 ) A\n", - "\n", - "\tIy0 = ( 30.0 0.0 ) A\n", - "\tIy1 = ( 30.0 240.0 ) A\n", - "\tIy2 = ( 30.0 120.0 ) A\n", - "\n", - "\tIb0 = ( 30.0 0.0 ) A\n", - "\tIb1 = ( 30.0 120.0 ) A\n", - "\tIb2 = ( 30.0 240.0 ) A\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.8, Page Number: 433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Ir1 = cmath.rect(200,0) #positive phase sequence component of current(A)\n", - "Ir2 = cmath.rect(100,60*math.pi/180) #negative phase sequence component of current(A)\n", - "In = cmath.rect(300,300*math.pi/180) #current in the neutral conductor(A)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "Ir0 = 1/3*In #Zero phase sequence current in R-line(A)\n", - "Ir = Ir0+Ir1+Ir2 #Current in the R-line(A)\n", - "Iy = Ir0+a**2*Ir1+a*Ir2 #Current in the Y-line(A)\n", - "Ib = Ir0+a*Ir1+a**2*Ir2 #Current in the B-line(A)\n", - "\n", - "#Result:\n", - "print \"Current in the R-line is\"\n", - "print \"\\tIr = (\",round(abs(Ir)),round(rad2deg(angle(Ir))),\") A\"\n", - "print \"Current in the Y-line is\"\n", - "print \"\\tIy = (\",round(abs(Iy)),round(rad2deg(angle(Iy))),\") A\"\n", - "print \"Current in the B-line is\"\n", - "print \"\\tIb = (\",round(abs(Ib)),round(rad2deg(angle(Ib))),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current in the R-line is\n", - "\tIr = ( 300.0 0.0 ) A\n", - "Current in the Y-line is\n", - "\tIy = ( 300.0 -120.0 ) A\n", - "Current in the B-line is\n", - "\tIb = ( 0.0 180.0 ) A\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.9, Page Number: 434" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Ir = cmath.rect(10,0) #current in line R(A)\n", - "Iy = cmath.rect(10,180*math.pi/180) #current in line Y(A)\n", - "Ib = cmath.rect(0,0) #current in line B(A)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "#For R-line:\n", - "Ir0 = 1/3*(Ir+Iy+Ib) #zero sequence component of Ir(A)\n", - "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #positive sequence component of Ir(A)\n", - "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #negative sequence component of Iy(A)\n", - "\n", - "#For Y-line:\n", - "Iy0 = Ir0 #zero sequence component of Ir(A)\n", - "Iy1 = a**2*Ir1 #positive sequence component of Ir(A)\n", - "Iy2 = a*Ir2 #negative sequence component of Iy(A)\n", - "\n", - "#For B-line:\n", - "Ib0 = Ir0 #zero sequence component of Ir(A)\n", - "Ib1 = a*Ir1 #positive sequence component of Ir(A)\n", - "Ib2 = a**2*Ir2 #negative sequence component of Iy(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The sequence components of R-line are:\"\n", - "print \"\\tIr0 = (\",round(abs(Ir0),2),round(rad2deg(angle(Ir0))),\") A\"\n", - "print \"\\tIr0 = (\",round(abs(Ir1),2),round(rad2deg(angle(Ir1))),\") A\"\n", - "print \"\\tIr0 = (\",round(abs(Ir2),2),round(rad2deg(angle(Ir2))),\") A\"\n", - "print \"The sequence components of Y-line are:\"\n", - "print \"\\tIy0 = (\",round(abs(Iy0),2),round(rad2deg(angle(Iy0))),\") A\"\n", - "print \"\\tIy1 = (\",round(abs(Iy1),2),round(rad2deg(angle(Iy1))),\") A\"\n", - "print \"\\tIy2 = (\",round(abs(Iy2),2),round(rad2deg(angle(Iy2))),\") A\"\n", - "print \"The sequence components of B-line are:\"\n", - "print \"\\tIb0 = (\",round(abs(Ib0),2),round(rad2deg(angle(Ib0))),\") A\"\n", - "print \"\\tIb1 = (\",round(abs(Ib1),2),round(rad2deg(angle(Ib1))),\") A\"\n", - "print \"\\tIb2 = (\",round(abs(Ib2),2),round(rad2deg(angle(Ib2))),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sequence components of R-line are:\n", - "\tIr0 = ( 0.0 90.0 ) A\n", - "\tIr0 = ( 5.77 -30.0 ) A\n", - "\tIr0 = ( 5.77 30.0 ) A\n", - "The sequence components of Y-line are:\n", - "\tIy0 = ( 0.0 90.0 ) A\n", - "\tIy1 = ( 5.77 -150.0 ) A\n", - "\tIy2 = ( 5.77 150.0 ) A\n", - "The sequence components of B-line are:\n", - "\tIb0 = ( 0.0 90.0 ) A\n", - "\tIb1 = ( 5.77 90.0 ) A\n", - "\tIb2 = ( 5.77 -90.0 ) A\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.10, Page Number: 435" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "Rrb = 10 #resistance of branch RB(ohm)\n", - "Rry = 20 #resistance of branch RY(ohm)\n", - "Rby = 5 #resistance of branch BY(ohm)\n", - "Er = cmath.rect(-100,0) #voltage across BY(V)\n", - "Ey = cmath.rect(100,60*math.pi/180) #voltage across BR(V)\n", - "Eb = cmath.rect(100,-60*math.pi/180) #voltage across RY(V)\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "IR = Er/Rby #Current in in branch BY(A)\n", - "IY = Ey/Rrb #Current in in branch RB(A)\n", - "IB = Eb/Rry #Current in in branch RY(A)\n", - "\n", - "#Sequence currents in resistors:\n", - "IR0 = 1/3*(IR+IY+IB) #Zero sequence component of IR(A)\n", - "IR1 = 1/3*(IR+a*IY+a**2*IB) #Positive sequence component of IR(A)\n", - "IR2 = 1/3*(IR+a**2*IY+a*IB) #Negative sequence component of IR(A)\n", - "\n", - "IY0 = IR0 #Zero sequence component of IY(A)\n", - "IY1 = a**2*IR1 #Positive sequence component of IY(A)\n", - "IY2 = a*IR2 #Negative sequence component of IY(A)\n", - "\n", - "IB0 = IR0 #Zero sequence component of IB(A)\n", - "IB1 = a*IR1 #Positive sequence component of IB(A)\n", - "IB2 = a**2*IR2 #Negative sequence component of IB(A)\n", - "\n", - "#Sequence currents in supply lines:\n", - "Ir = IB-IY #Line current in R-line(A)\n", - "Iy = IR-IB #Line current in Y-line(A)\n", - "Ib = IY-IR #Line current in R-line(A)\n", - "\n", - "Ir0 = 1/3*(Ir+Iy+Ib) #Zero sequence component of Ir(A)\n", - "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #Positive sequence component of Ir(A)\n", - "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #Negative sequence component of Ir(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The sequence components of R-line are:\"\n", - "print \"\\tIR0 = (\",round(abs(IR0),2),round(rad2deg(angle(IR0)),1),\") A\"\n", - "print \"\\tIR1 = (\",round(abs(IR1),2),round(rad2deg(angle(IR1))),\") A\"\n", - "print \"\\tIR2 = (\",round(abs(IR2),2),round(rad2deg(angle(IR2)),1),\") A\"\n", - "print \"\\nThe sequence components of Y-line are:\"\n", - "print \"\\tIY0 = (\",round(abs(IY0),2),round(rad2deg(angle(IY0)),1),\") A\"\n", - "print \"\\tIY1 = (\",round(abs(IY1),2),round(rad2deg(angle(IY1))),\") A\"\n", - "print \"\\tIY2 = (\",round(abs(IY2),1),round(rad2deg(angle(IY2)),1),\") A\"\n", - "print \"\\nThe sequence components of B-line are:\"\n", - "print \"\\tIB0 = (\",round(abs(IB0),2),round(rad2deg(angle(IB0)),1),\") A\"\n", - "print \"\\tIB1 = (\",round(abs(IB1),2),360+round(rad2deg(angle(IB1))),\") A\"\n", - "print \"\\tIB2 = (\",round(abs(IB2),1),round(rad2deg(angle(IB2)),1),\") A\"\n", - "print \"\\nThe Sequence currents in supply lines are:\"\n", - "print \"\\tIr0 = (\",round(abs(Ir0),2),round(rad2deg(angle(Ir0))),\") A\"\n", - "print \"\\tIr1 = (\",round(abs(Ir1),1),round(rad2deg(angle(Ir1))),\") A\"\n", - "print \"\\tIr2 = (\",round(abs(Ir2),2),round(rad2deg(angle(Ir2)),1),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sequence components of R-line are:\n", - "\tIR0 = ( 4.41 160.9 ) A\n", - "\tIR1 = ( 11.67 180.0 ) A\n", - "\tIR2 = ( 4.41 -160.9 ) A\n", - "\n", - "The sequence components of Y-line are:\n", - "\tIY0 = ( 4.41 160.9 ) A\n", - "\tIY1 = ( 11.67 60.0 ) A\n", - "\tIY2 = ( 4.4 -40.9 ) A\n", - "\n", - "The sequence components of B-line are:\n", - "\tIB0 = ( 4.41 160.9 ) A\n", - "\tIB1 = ( 11.67 300.0 ) A\n", - "\tIB2 = ( 4.4 79.1 ) A\n", - "\n", - "The Sequence currents in supply lines are:\n", - "\tIr0 = ( 0.0 0.0 ) A\n", - "\tIr1 = ( 20.2 -90.0 ) A\n", - "\tIr2 = ( 7.64 109.1 ) A\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.11, Page Number: 437" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "I = 20 #current in each line(A)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "#Let R, Y and B be the supply lines. When fuse in the \n", - "#line B is removed, the various line currents are :\n", - "Ir = cmath.rect(I,0) #A\n", - "Iy = cmath.rect(I,math.pi) #A\n", - "Ib = cmath.rect(0,0) #A\n", - "\n", - "#For R-line:\n", - "Ir0 = 1/3*(Ir+Iy+Ib) #zero sequence component of Ir(A)\n", - "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #positive sequence component of Ir(A)\n", - "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #negative sequence component of Iy(A)\n", - "\n", - "#For Y-line:\n", - "Iy0 = Ir0 #zero sequence component of Ir(A)\n", - "Iy1 = a**2*Ir1 #positive sequence component of Ir(A)\n", - "Iy2 = a*Ir2 #negative sequence component of Iy(A)\n", - "\n", - "#For B-line:\n", - "Ib0 = Ir0 #zero sequence component of Ir(A)\n", - "Ib1 = a*Ir1 #positive sequence component of Ir(A)\n", - "Ib2 = a**2*Ir2 #negative sequence component of Iy(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The sequence components of R-line are:\"\n", - "print \"\\tIr0 = (\",round(abs(Ir0),2),round(rad2deg(angle(Ir0))),\") A\"\n", - "print \"\\tIr0 = (\",round(abs(Ir1),2),round(rad2deg(angle(Ir1))),\") A\"\n", - "print \"\\tIr0 = (\",round(abs(Ir2),2),round(rad2deg(angle(Ir2))),\") A\"\n", - "print \"\\nThe sequence components of Y-line are:\"\n", - "print \"\\tIy0 = (\",round(abs(Iy0),2),round(rad2deg(angle(Iy0))),\") A\"\n", - "print \"\\tIy1 = (\",round(abs(Iy1),2),360+round(rad2deg(angle(Iy1))),\") A\"\n", - "print \"\\tIy2 = (\",round(abs(Iy2),2),round(rad2deg(angle(Iy2))),\") A\"\n", - "print \"\\nThe sequence components of B-line are:\"\n", - "print \"\\tIb0 = (\",round(abs(Ib0),2),round(rad2deg(angle(Ib0))),\") A\"\n", - "print \"\\tIb1 = (\",round(abs(Ib1),2),round(rad2deg(angle(Ib1))),\") A\"\n", - "print \"\\tIb2 = (\",round(abs(Ib2),2),360+round(rad2deg(angle(Ib2))),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sequence components of R-line are:\n", - "\tIr0 = ( 0.0 90.0 ) A\n", - "\tIr0 = ( 11.55 -30.0 ) A\n", - "\tIr0 = ( 11.55 30.0 ) A\n", - "\n", - "The sequence components of Y-line are:\n", - "\tIy0 = ( 0.0 90.0 ) A\n", - "\tIy1 = ( 11.55 210.0 ) A\n", - "\tIy2 = ( 11.55 150.0 ) A\n", - "\n", - "The sequence components of B-line are:\n", - "\tIb0 = ( 0.0 90.0 ) A\n", - "\tIb1 = ( 11.55 90.0 ) A\n", - "\tIb2 = ( 11.55 270.0 ) A\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.12, Page Number: 438" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import cmath\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "Zr = 5-10j #impedance connected to line R(ohm)\n", - "Zy = 6+5j #impedance connected to line Y(ohm)\n", - "Zb = 3+15j #impedance connected to line B(ohm)\n", - "VRY = cmath.rect(3300,0) #line RY voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "VYB = a**2*VRY #line YB voltage(V)\n", - "\n", - "#Let VR, VY, and VB be the voltages across impedances in R, Y and B\n", - "#phases respectively and IR, IY, and IB the resulting line currents.\n", - "IR, IY,IB,IR0,IR1,IR2, = symbols('IR IY IB IR0 IR1 IR2')\n", - "\n", - "#IR+IY+IB = 0\n", - "IR0 = 0; IY0 = 0; IB0 = 0;\n", - "VR = Zr*(IR0+IR1+IR2) #V\n", - "VY = Zy*(a**2*IR1+a*IR2) #V\n", - "VB = Zb*(a*IR1+a**2*IR2) #V\n", - "#solving the equations:\n", - "IR11 = solve(VR-VY-VRY,IR1)[0]\n", - "VY = Zy*(a**2*IR11+a*IR2)\n", - "VB = Zb*(a*IR11+a**2*IR2)\n", - "IR22 = solve(VY-VB-VYB,IR2)[0]\n", - "\n", - "VR = Zr*(IR0+IR1+IR22)\n", - "VY = Zy*(a**2*IR1+a*IR22)\n", - "IR11 = solve(VR-VY-VRY,IR1)[0]\n", - "IR = IR11+IR22 #A\n", - "\n", - "\n", - "#Result:\n", - "print \"The line current IR is (\",round(abs(IR)),round(-rad2deg(cmath.phase(IR)),1),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The line current IR is ( 241.0 -18.5 ) A\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.13, Page Number: 440" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "R = 1 #resistance of each load(ohm)\n", - "magVRY = 200 #line RY voltage(V)\n", - "magVBR = 400 #line BR voltage(V)\n", - "magVYB = 346 #line YB voltage(V)\n", - "\n", - "\n", - "#Calculation:\n", - "a = cmath.rect(1,120*math.pi/180)\n", - "#This is a case of a balanced star-connected load supplied\n", - "#from an unbalanced 3-phase supply.\n", - "\n", - "#Now,\n", - "\n", - "# (2)**22 = (1 + 1\u00b775 cos(theta))**2 + (1\u00b775 sin(theta))**2\n", - "# theta = math.acos(4-1+3*1)/3.5\n", - "theta = math.pi/2\n", - "# alpha = math.acos(1+1.75*math.cos(theta))\n", - "alpha = 60*math.pi/180\n", - "\n", - "#As the phase sequence is RYB, therefore, various line voltages are :\n", - "VRY = cmath.rect(200,math.pi) #V\n", - "VYB = cmath.rect(346,theta) #V\n", - "VBR = cmath.rect(400,-alpha) #V\n", - "\n", - "#The current in any phase (or line) is equal to phase voltage \n", - "#divided by resistance in that phase.\n", - "IR = VRY/(1*3**0.5) #A\n", - "IY = VYB/(1*3**0.5) #A\n", - "IB = VBR/(1*3**0.5) #A\n", - "\n", - "#Sequence components in red phase are :\n", - "IR0 = 1/3*(IR+IY+IB) #A\n", - "IR1 = 1/3*(IR+a*IY+a**2*IB) #A\n", - "IR2 = 1/3*(IR+a**2*IY+a*IB) #A\n", - "\n", - "\n", - "#Result:\n", - "print \"The magnitude of current in any phase is:\"\n", - "print \"\\tIR0 = (\",round(abs(IR0)),round(rad2deg(angle(IR0))),\") A\"\n", - "print \"\\tIR1 = (\",round(abs(IR1),1),round(rad2deg(angle(IR1))),\") A\"\n", - "print \"\\tIR2 = (\",round(abs(IR2),2),round(rad2deg(angle(IR2))),\") A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The magnitude of current in any phase is:\n", - "\tIR0 = ( 0.0 -90.0 ) A\n", - "\tIR1 = ( 176.3 -169.0 ) A\n", - "\tIR2 = ( 66.63 30.0 ) A\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.14, Page Number: 449" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "MVAg = 10 #MVA rating of generator\n", - "Vg = 11 #voltage rating of generator(kV)\n", - "Zg1 = 1.2j #Positive sequence impedance of generator(ohm)\n", - "Zg2 = 0.9j #Negative sequence impedance of generator(ohm)\n", - "Zg0 = 0.4j #Zero sequence impedance of generator(ohm)\n", - "Zf1 = 1.0j #Positive sequence impedance of feeder(ohm)\n", - "Zf2 = 1.0j #Negative sequence impedance of feeder(ohm)\n", - "Zf0 = 3.0j #Zero sequence impedance of feeder(ohm)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#Suppose the fault is occured on the red phase. \n", - "#Taking red phase as the reference,\n", - "ER = Vg*1000/3**0.5 #Phase e.m.f. of R-phase(V)\n", - "\n", - "#(i)The total impedance to any sequence current is given by\n", - "#the sum of generator and feeder impedances to that sequence current.\n", - "Z1 = Zg1+Zf1 #ohm\n", - "Z2 = Zg2+Zf2 #ohm\n", - "Z0 = Zg0+Zf0 #ohm\n", - "\n", - "#For a line-to-ground fault,\n", - "#I1 = I2 = I0\n", - "I0 = ER/(Z1+Z2+Z0) #A\n", - "IR = 3*I0 #fault current(A)\n", - "\n", - "#(ii)Line-to-neutral voltage of R-phase,\n", - "VR = ER-I0*(Zg1+Zg2+Zg0) #V\n", - "\n", - "#Result:\n", - "print \"(i) The magnitude of fault current is\",round(IR.imag)*1j,\"A\"\n", - "print \"(ii) Line to neutral voltage at the generator terminal is\",round(abs(VR)),\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The magnitude of fault current is (-0-2540j) A\n", - "(ii) Line to neutral voltage at the generator terminal is 4234.0 V\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.15, Page Number: 450" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "Vg = 11000 #voltage rating of the alternator(V)\n", - "MVAg = 10 #MVA rating of generator\n", - "X0 = 0.05 #zero sequence reactance(p.u)\n", - "X1 = 0.15 #positive sequence reactance(p.u)\n", - "X2 = 0.15 #negative sequence reactance(p.u)\n", - "\n", - "#Calculation:\n", - "#Taking red phase as the reference, let its phase e.m.f. be\n", - "ER = 1 #p.u\n", - "\n", - "#Line-to-ground fault: \n", - "#Suppose the fault occurs on the red phase.\n", - "#I1 = I2 = I0\n", - "I0 = ER/(1j*(X0+X1+X2))\n", - "IR = 3*I0 #fault current(A)\n", - "\n", - "#Three phase fault: \n", - "#the fault current (say Ish) is limited by the positive sequence reactance only.\n", - "Ish = ER/(1j*X1) #fault current(A)\n", - "r = IR/Ish #ratio of the two fault currents\n", - "\n", - "\n", - "#Result:\n", - "print \"The ratio of two fault currents is\",round(abs(r),3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The ratio of two fault currents is 1.286\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.16, Page Number: 450" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Vg = 11 #voltage rating of the alternator(kV)\n", - "MVAg = 25 #MVA rating of generator\n", - "X0 = 0.05 #zero sequence reactance(p.u)\n", - "X1 = 0.2 #positive sequence reactance(p.u)\n", - "X2 = 0.2 #negative sequence reactance(p.u)\n", - "Xn = 0.3 #neutral to ground reactance(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "#Assume that the fault occurs on the red phase.\n", - "#Taking red phase as the reference, let its phase e.m.f. be \n", - "ER = 1 #p.u.\n", - "#First of all, convert the reactance Xn into p.u.\n", - "Xnp = Xn*MVAg*1000/(Vg**2*1000) #p.u\n", - "#For a line-to-ground fault,\n", - "#I1 = I2 = I0\n", - "I0 = ER/(X1+X2+X0+3*Xnp) #p.u\n", - "IR = 3*I0 #fault current(p.u)\n", - "IRa = MVAg*10**6/(3**0.5*Vg*1000) * IR #fault current in amperes\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \" The fault current for a single line to ground fault is\",round(IRa),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The fault current for a single line to ground fault is 6190.0 A\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.17, Page Number: 451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V = 10.4 #voltage between the lines(kV)\n", - "X0 = 0.2j #zero sequence reactance(p.u)\n", - "X1 = 0.6j #positive sequence reactance(p.u)\n", - "X2 = 0.5j #negative sequence reactance(p.u)\n", - "\n", - "\n", - "#Calculation:\n", - "#Taking red phase as the reference, its phase e.m.f. is :\n", - "ER = round(V*1000/3**0.5) #Phase e.m.f. of R-phase(V)\n", - "IF = 3**0.5*ER/(X1+X2) #fault current(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The fault current is\",round(abs(IF),1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fault current is 9453.8 A\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.18, Page Number: 451" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "X0 = 0.05j #zero sequence reactance(p.u)\n", - "X1 = 0.08j #positive sequence reactance(p.u)\n", - "X2 = 0.07j #negative sequence reactance(p.u)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#Taking red phase as the reference, let its phase e.m.f. be \n", - "ER = 1 #p.u\n", - "#For a double line-to-ground fault,\n", - "#IF = IY+IB\n", - "IF = -3*X2*ER/(X1*X2+X2*X0+X2*X0) #fault current(A)\n", - "\n", - "\n", - "#Result:\n", - "print \"The fault current is\",round(IF.imag,1)*1j,\"p.u\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fault current is 16.7j p.u\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.19, Page Number: 452" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "MVAg = 20 #MVA rating of generator\n", - "V = 11 #voltage rating of generator(V)\n", - "X1 = 20 #positive sequence reactance of generator(%)\n", - "X2 = 10 #negative sequence reactance of generator(%)\n", - "X0 = 15 #zero sequence reactance of generator(%)\n", - "Xn = 5 #generator 1 neutral reactance(%)\n", - "\n", - "#Calculation:\n", - "ER = V*1000/3**0.5 #V\n", - "#The % reactances in Fig. 18.19b can be converted into ohmic values as under:\n", - "x1 = X1*V**2*10/(MVAg*1000) #ohm\n", - "x2 = X2*V**2*10/(MVAg*1000) #ohm\n", - "x0 = X0*V**2*10/(MVAg*1000) #ohm\n", - "IR = 3*ER/(x1+x2+x0)*(-1j) #ohm\n", - "\n", - "\n", - "#Result:\n", - "print \"Fault current is\",round(IR.imag)*1j,\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fault current is (-0-6998j) A\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 18.20, Page Number: 453" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "IF1 = 2000 #3 phase fault current(A)\n", - "IF2 = 2600 #line-to-line fault(A)\n", - "IF0 = 4200 #line-toground fault(A)\n", - "MVAg = 50 #MVA rating of the generator\n", - "V = 11 #voltage rating of the generator(V)\n", - "\n", - "#Calculation:\n", - "#Let X1 = positive sequence reactance,\n", - "# X2 = negative sequence reactance,and\n", - "# X0 = zero sequence reactance of the alternator.\n", - "X1,X2,X0 = symbols('X1 X2 X0')\n", - "Eph = V*1000/3**0.5 #phase voltage(V)\n", - "X11 = solve(Eph/X1-IF1)[0] #positive sequence reactance(ohm)\n", - "X22 = solve(3**0.5*Eph/(X11+X2)-IF2,X2)[0] #negative sequence reactance(ohm)\n", - "X00 = solve(3*Eph/(X11+X22+X0)-IF0)[0] #zero sequence reactance(ohm)\n", - "\n", - "\n", - "#Result:\n", - "print \"The positive sequence reactance is\",round(X11,3),\"ohm\"\n", - "print \"The negative sequence reactance is\",round(X22,3),\"ohm\"\n", - "print \"The zero sequence reactance is\",round(X00,3),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The positive sequence reactance is 3.175 ohm\n", - "The negative sequence reactance is 1.055 ohm\n", - "The zero sequence reactance is 0.306 ohm\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter19_1.ipynb b/Principles_of_Power_System/chapter19_1.ipynb deleted file mode 100644 index e6813a0f..00000000 --- a/Principles_of_Power_System/chapter19_1.ipynb +++ /dev/null @@ -1,212 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:34f21e34d56021d11e412854716405b885521e02b7e263afa0b62d127f14da0d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 19: Circuit Breakers" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 19.1, Page Number: 483" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "I = 1500 #rated current of circuit breaker(A)\n", - "MVA = 1000 #MVA rating of CB\n", - "V = 33 #voltage rating of circuit breaker(kV)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "Is = MVA*10**6/(3**0.5*33*1000) #Rated symmetrical breaking current(A,rms)\n", - "Im = 2.55*Is #Rated making current(A,peak)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Rated normal current is\",I,\"A\"\n", - "print \"(ii) Breaking capacity is\",MVA,\"MVA\"\n", - "print \"(iii) Rated symmetrical breaking current is\",round(Is),\"A (peak)\"\n", - "print \"(iv) Rated making current is\",round(Im),\"A (peak)\"\n", - "print \"(v) Short-time rating is\",round(Is),\"for 3 seconds\"\n", - "print \"(vi) Rated service voltage is\",V,\"kV (r.m.s)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Rated normal current is 1500 A\n", - "(ii) Breaking capacity is 1000 MVA\n", - "(iii) Rated symmetrical breaking current is 17495.0 A (peak)\n", - "(iv) Rated making current is 44613.0 A (peak)\n", - "(v) Short-time rating is 17495.0 for 3 seconds\n", - "(vi) Rated service voltage is 33 kV (r.m.s)\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 19.2, Page Number: 484" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "f = 50 #supply frequency(Hz)\n", - "V = 11 #voltage rating of generator(V)\n", - "C = 0.01 #distributed capacitance upto ckt breaker b/w phase and neutral(uF)\n", - "XL = 5 #reactance of neatral to earth(ohm)\n", - "\n", - "\n", - "#Calculation:\n", - "L = round(XL/(2*math.pi*f),4) #Inductance per phase(H)\n", - "Emax = round(2**0.5*V/3**0.5,2) #Maximum value of recovery voltage (phase to neutral)(V\n", - "E = 2*Emax #Peak re-striking voltage(kV)\n", - "fn = 1/(2*3.14*(L*C*10**-6)**0.5) #frequency of oscillations(Hz)\n", - "\n", - "#Since peak re-striking voltage occurs at a time t given by\n", - "t = 1/(2*fn) #s\n", - "r = E/t #kV/sec\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Peak re-striking voltage is\",round(E,2),\"kV\"\n", - "print \"(ii) Frequency of oscillations is\",round(fn),\"Hz\"\n", - "print \"(iii)The average rate of rise of re-striking voltage\"\n", - "print \" upto the first peak is\",math.floor(r/1000),\"*10**3 kV/sec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Peak re-striking voltage is 17.96 kV\n", - "(ii) Frequency of oscillations is 12628.0 Hz\n", - "(iii)The average rate of rise of re-striking voltage\n", - " upto the first peak is 453.0 *10**3 kV/sec\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 19.3, Page Number: 484" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable delaration:\n", - "t = 50*10**-6 #time to reach the peak re-striking voltage(s)\n", - "Vp = 100 #the peak re-striking voltage(kV)\n", - "\n", - "\n", - "#Calculation:\n", - "R = Vp/t #Average RRRV(kV/sec)\n", - "fn = 1/(2*t) #Natural frequency of oscillations(Hz)\n", - "\n", - "\n", - "#Result:\n", - "print \"Average RRRV is\",R/10**6,\"* 10**6 kV/sec\"\n", - "print \"Natural frequency of oscillations is\",fn,\"Hz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average RRRV is 2.0 * 10**6 kV/sec\n", - "Natural frequency of oscillations is 10000.0 Hz\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 19.4, Page Number: 485" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Im = 11 #magnetising current of transformer(A)\n", - "Ic = 7 #chopped instantaneous value of current(A)\n", - "L = 35.2 #inductance (H)\n", - "C = 0.0023 #capacitance(uF)\n", - "\n", - "\n", - "#Result:\n", - "e = Ic*(L/(C*10**-6))**0.5 #Voltage across breaker contacts at chopping(V)\n", - "\n", - "\n", - "#Result:\n", - "print \"Voltage across breaker contacts at chopping is\",round(e/1000),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across breaker contacts at chopping is 866.0 kV\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter1_1.ipynb b/Principles_of_Power_System/chapter1_1.ipynb deleted file mode 100644 index 95ebdafe..00000000 --- a/Principles_of_Power_System/chapter1_1.ipynb +++ /dev/null @@ -1,68 +0,0 @@ -{ - "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: 6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "Pi = 4200 #input power(W)\n", - "E = 120 #voltage supply of generator(V)\n", - "I = 32.2 #supply current(A)\n", - "\n", - "\n", - "#Calculation:\n", - "Po = E*I #output power(W)\n", - "n = Po/Pi*100 #efficiency(%)\n", - "Pl = Pi-Po #power lost(W)\n", - "El = Pl*60 #energy lost per minute(J)\n", - "\n", - "\n", - "#Result:\n", - "print \"The percentage efficiency of the generator is\",n,\"%\"\n", - "print \"Energy lost per minute of operation is\",El,\"J\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The percentage efficiency of the generator is 92.0 %\n", - "Energy lost per minute of operation is 20160.0 J\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter20_1.ipynb b/Principles_of_Power_System/chapter20_1.ipynb deleted file mode 100644 index 768f8fa6..00000000 --- a/Principles_of_Power_System/chapter20_1.ipynb +++ /dev/null @@ -1,64 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:37bb87f048a2d4a670b09cf05bff6f5c622ef838c4da8caa7225a316e1b26b5e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 20: Fuses" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 20.1, Page Number: 495" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "r1 = 0.8 #radius of fuse wire(mm)\n", - "I1 = 8 #blow current at r1 radius(A)\n", - "I2 = 1 #blow current(A)\n", - "\n", - "\n", - "#Calculation:\n", - "r2 = r1*(I2/I1)**(2/3) #radius for bearing 1 A of blow current(mm)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The radius of the wire that will blow off at a current of 1A is\",r2,\"mm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The radius of the wire that will blow off at a current of 1A is 0.2 mm\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter21_1.ipynb b/Principles_of_Power_System/chapter21_1.ipynb deleted file mode 100644 index dbd05a4b..00000000 --- a/Principles_of_Power_System/chapter21_1.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:74ef32d0e67f3d77b60188556b39e6627674afc8f6e4feb1b0bbc3ae8dbaee2a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 21: Protective Relays" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 21.1, Page Number: 507" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "Is = 5 #rated secondary current of C.T\n", - "CS = 1.25 #current setting\n", - "TSM = 0.6 #time setting multiplier\n", - "IF = 4000 #fault current(A)\n", - "CR = 400/5 #current ratio of CT\n", - "\n", - "#Calculation:\n", - "Ipc = Is*CS #pick-up current(A)\n", - "If = IF*CR #Fault current in relay coil(A)\n", - "PSM = If/Ipc #plug setting multiplier\n", - "#Corresponding to the plug-setting multiplier of 8 given in fig.21.16,\n", - "#the time of operation is 3.5 seconds.\n", - "top = 3.5*TSM #Actual relay operating time(s)\n", - "\n", - "\n", - "#Result:\n", - "print \"The relay operating time is\",top,\"seconds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The relay operating time is 2.1 seconds\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter22_1.ipynb b/Principles_of_Power_System/chapter22_1.ipynb deleted file mode 100644 index 38d23b90..00000000 --- a/Principles_of_Power_System/chapter22_1.ipynb +++ /dev/null @@ -1,338 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a5275b4f1bdd430cf4ed3e203b7e975d86c74b17fe608ee8e07ebac2f3a39a9f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 22: Protection of Alternators and Transformers" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 22.1, Page Number: 529" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "MVA = 10 #MVA rating of alternator\n", - "V = 6.6 #voltage rating of alternator(V)\n", - "X = 10 #per phase reactance of lternator(%)\n", - "Iop = 175 #operating current(A)\n", - "\n", - "\n", - "#Calculation:\n", - "Vph = V*1000/3**0.5 #phase voltage(kV)\n", - "I = round(MVA*10**6/(3**0.5*V*1000)) #full load current(A)\n", - "\n", - "#Let the reactance per phase be x ohms.\n", - "r,x = symbols('r x') #r = earthing resistance required to leave 10% of\n", - " #the winding unprotected\n", - "x1 = solve(3**0.5*x*I/(6.6*1000)*100-10,x)[0]\n", - "X1 = x1*0.1 #Reactance of 10% winding\n", - "E = Vph*0.1 #E.M.F. induced in 10% winding\n", - "Zf = (X1**2+r**2)**0.5\n", - "Ief = E/Zf #Earth-fault current due to 10% winding\n", - "\n", - "#When this fault current becomes 175 A, the relay will trip\n", - "r1 = solve(Ief-175,r)[1] #A\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Required value of earth resistance is\",round(r1,3),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required value of earth resistance is 2.177 ohm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 22.2, Page Number: 530" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "MVA = 10 #MVA rating of alternator\n", - "V = 6.6 #voltage rating of alternator(V)\n", - "CR = 1000/5 #current ratio of CT\n", - "Rn = 7.5 #resistance of star-point to earth(ohm)\n", - "Iop = 0.5 #operating current of the relay(A)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#Let x % of the winding be unprotected.\n", - "x = symbols('x')\n", - "Vph = V*1000/3**0.5 #phase voltage(kV)\n", - "If = 1000/5*Iop #minimum fault current which will operate the relay(A)\n", - "E = Vph*x/100 #E.M.F. induced in x% winding(V)\n", - "Ief = E/Rn #Earth fault current which x% winding will cause(A)\n", - "#This current must be equal to 100 A.\n", - "x1 = solve(Ief-If,x)[0]\n", - "\n", - "\n", - "#Result:\n", - "print \"Percentage of unprotected winding is\",round(x1,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage of unprotected winding is 19.68 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 22.3, Page Number: 530" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "MVA = 10 #MVA rating of alternator\n", - "V = 6.6 #voltage rating of alternator(V)\n", - "CR = 1000/5 #current ratio of CT\n", - "Rn = 6 #resistance of star-point to earth(ohm)\n", - "Iop = 0.75 #operating current of the relay(A)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let x % of the winding be unprotected.\n", - "x = symbols('x')\n", - "Vph = V*1000/3**0.5 #phase voltage(kV)\n", - "If = 1000/5*Iop #minimum fault current which will operate the relay(A)\n", - "E = Vph*x/100 #E.M.F. induced in x% winding(V)\n", - "Ief = E/Rn #Earth fault current which x% winding will cause(A)\n", - "#This current must be equal to 100 A.\n", - "x1 = solve(Ief-If,x)[0]\n", - "\n", - "\n", - "#(ii) Let r2 = the minimum earthing resistance required to \n", - "#provide protection for 90% of stator winding. \n", - "#Then, 10% winding would be unprotected\n", - "x2 = 10 #%\n", - "r2 = Vph*x2/If*0.01 #ohm\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The percentage of each of the stator windings is\",round(x1,1),\"%\"\n", - "print \"(ii)The minimum resistance to provide protection for 90% of\"\n", - "print \" the stator winding is\",round(r2,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The percentage of each of the stator windings is 23.6 %\n", - "(ii)The minimum resistance to provide protection for 90% of\n", - " the stator winding is 2.54 ohm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 22.4, Page Number: 531" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "MVA = 10 #MVA rating of alternator\n", - "V = 6.6 #voltage rating of alternator(V)\n", - "CR = 1000/5 #current ratio of CT\n", - "s = 20 #earth-fault setting(%)\n", - "Iop = 0.75 #operating current of the relay(A)\n", - "\n", - "\n", - "#Calculation:\n", - "#Since 85% winding is to be protected, 15% would be unprotected\n", - "r = symbols('r') #earthing resistance reqd. to leave 15% of winding unprotected(ohm)\n", - "x = 15 #%\n", - "Ifl = MVA*10**6/(3**0.5*V*1000) #Full load current(A)\n", - "IF = s*Ifl/100 #Minimum fault current which will operate the relay\n", - "Vu = x/100*V*1000/3**0.5 #Voltage induced in 15% of winding(kV)\n", - "Ief = Vu/r #Earth fault current which 15% winding will cause(A)\n", - "#This current must be equal to IF.\n", - "r1 = solve(Ief-IF,r)[0] #ohm\n", - "\n", - "\n", - "#Result:\n", - "print \"The value of earthing resistor is\",round(r1,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The value of earthing resistor is 3.27 ohm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 22.5, Page Number: 538" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "r1 = 220/11000 #voltage ratio of transformer\n", - "r2 = 600/5 #current ratio of protective transformer on 220V side\n", - "\n", - "\n", - "#Calculation:\n", - "#Suppose that line current on 220 V side is 600 A\n", - "\n", - "Ipd = 5 #Phase current of delta connected CTs on 220V side(A)\n", - "Ild = 3**0.5*Ipd #Line current of delta connected CTs on 220 V side(A)\n", - "\n", - "#This Ild will flow through the pilot wires.\n", - "Ips = 5*3**0.5 #Phase current of star connected CTs on 11,000 V side(A)\n", - "\n", - "#Now, using this relation: Primary apparent power = Secondary apparent power\n", - "I = 3**0.5*220*600/(3**0.5*11000) #A\n", - "r3 = I/Ips #Turn-ratio of CTs on 11000 V side\n", - "\n", - "\n", - "#Result:\n", - "print \"Turn-ratio of CTs on 11000 V side is (\",round(r3,3),\": 1 )\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Turn-ratio of CTs on 11000 V side is ( 1.386 : 1 )\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 22.6, Page Number: 538" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "r1 = 0.4/11 #line voltage(in kV) ratio of transformer\n", - "r2 = 500/5 #current ratio of protective transformer\n", - "\n", - "\n", - "#Calculation:\n", - "#Suppose the line current on 400 V side is 500 A.\n", - "Ipd = 5 #Phase current of delta connected CTs on 400 V side(A)\n", - "Ild = Ipd*3**0.5 #Line current of delta connected CTs on 400 V side(A)\n", - "#This Ild will flow through the pilot wires.\n", - "Ips = 5*3**0.5 #Phase current of star-connected CTs on 11000 V side(A)\n", - "\n", - "#Primary apparent power = Secondary apparent power\n", - "I = 3**0.5*400*500/(3**0.5*11000) #A\n", - "r3 = I/Ips\n", - "\n", - "\n", - "#Result:\n", - "print \" The ratio of the protective transformers on 11kV side is\",round(r3,3),\"i.e, 10.5:5\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The ratio of the protective transformers on 11kV side is 2.099 i.e, 10.5:5\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter26_1.ipynb b/Principles_of_Power_System/chapter26_1.ipynb deleted file mode 100644 index d4334600..00000000 --- a/Principles_of_Power_System/chapter26_1.ipynb +++ /dev/null @@ -1,224 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:260bb8beffe2e4d2155fdaec0c7462f8cf5127d60c79f0bddb469ea9aad62673" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 26: Neutral Grounding" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 26.1, Page Number: 599" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "f = 50 #Supply frequency(Hz)\n", - "C = 4.5*10**-6 #Line to earth capacitance(F)\n", - "\n", - "\n", - "#Calculation:\n", - "XL = 1/(3*2*math.pi*f*C) #ohm\n", - "\n", - "\n", - "#Result:\n", - "print \"The reactance of Peterson coil is\",round(XL,1),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The reactance of Peterson coil is 235.8 ohm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 26.2, Page Number: 599" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "l = 200 #length of transmission line(km)\n", - "f = 50 #Supply frequency(Hz)\n", - "c = 0.02*10**-6 #Line to earth capacitance(F/km)\n", - "V = 230 #voltage rating of line(kV)\n", - "\n", - "\n", - "#Calculation:\n", - "C = c*l #capacitance of coil(F)\n", - "L = round(1/(3*(2*3.14*f)**2*C),2) #Required inductance of Peterson coil(H)\n", - "Vph = round(V*1000/1.732) #Voltage across Peterson coil(kV)\n", - "IF = math.ceil(Vph/(2*3.13*f*L)) #Current through Peterson coil(A)\n", - "kVA = Vph*IF/1000 #Rating of Peterson coil\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "print \"Inductance of Peterson coil is\",L,\"H\"\n", - "print \"Rating of Peterson coil is\",round(kVA),\"kVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Inductance of Peterson coil is 0.85 H\n", - "Rating of Peterson coil is 66397.0 kVA\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 26.3, Page Number: 600" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "f = 50 #fequency of supply(Hz)\n", - "C = 1.2*10**-6 #line-to-earth capacitance(F)\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) To neutralize capacitance of 100% of the length of the line,\n", - "#Inductive reactance of the coilis given by\n", - "XL1 = 1/(3*2*math.pi*f*C) #ohm\n", - "\n", - "#(ii) To neutralize capacitance of 90% of the length of the line,\n", - "#Inductive reactance of the coilis given by\n", - "XL2 = 1/(3*2*math.pi*f*0.9*C) #ohm\n", - "\n", - "\n", - "#(iii) To neutralize capacitance of 80% of the length of the line,\n", - "#Inductive reactance of the coilis given by\n", - "XL3 = 1/(3*2*math.pi*f*0.8*C) #ohm\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Inductive reactance of the coil to neutralize capacitance\"\n", - "print \" of 100% of the length of the line is\",round(XL1,2),\"ohm\"\n", - "print \"\\n(ii) Inductive reactance of the coil to neutralize capacitance\"\n", - "print \" of 100% of the length of 90% of the line is\",round(XL2,2),\"ohm\"\n", - "print \"\\n(iii)Inductive reactance of the coil to neutralize capacitance\"\n", - "print \" of 100% of the length of 80% of the line is\",round(XL3,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Inductive reactance of the coil to neutralize capacitance\n", - " of 100% of the length of the line is 884.19 ohm\n", - "\n", - "(ii) Inductive reactance of the coil to neutralize capacitance\n", - " of 100% of the length of 90% of the line is 982.44 ohm\n", - "\n", - "(iii)Inductive reactance of the coil to neutralize capacitance\n", - " of 100% of the length of 80% of the line is 1105.24 ohm\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 26.4, Page Number: 600" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 0.01 #radius of conductor(m)\n", - "d = 4 #conductor spacing(m)\n", - "V = 132 #voltage of the line(kV)\n", - "f = 50 #supply frequency(Hz)\n", - "l = 200 #line length(km)\n", - "\n", - "\n", - "#Calculation:\n", - "c = round(2*math.pi*8.885/math.log(d/r),1)*10**-12 #capacitance per unit length(F/m)\n", - "C = c*l*1000 #Capacitance between phase and earth for 200 km line(F)\n", - "L = round(1/(3*(2*math.pi*f)**2*C),2) #required inductance L of the arc suppression coil(H)\n", - "IF = V*1000/(10*math.ceil(3**0.5*2*math.pi*f*L/10)) #Current through the coil(A)\n", - "kVA = V/3**0.5*IF #kVA\n", - "\n", - "\n", - "#Result:\n", - "print \"The inductance of the coil is\",L,\"H\"\n", - "print \"Rating of the coil is\",round(kVA),\"kVA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance of the coil is 1.82 H\n", - "Rating of the coil is 10060.0 kVA\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter2_1.ipynb b/Principles_of_Power_System/chapter2_1.ipynb deleted file mode 100644 index daf8974b..00000000 --- a/Principles_of_Power_System/chapter2_1.ipynb +++ /dev/null @@ -1,857 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a62a0cfa22010723ae84accbfbc8f3f3c553c1279f7bb65e42ceaaad44de0807" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2:Generating Stations" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.1, Page Number: 16" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "n=20 #overall efficiency of plant\n", - "h=860 #kcal\n", - "m=0.6 #Mass of fuel burnt(kg) per KW of electrical energy generated\n", - "\n", - "#Calculations:\n", - "x=h*100/(m*n) #Calorific value of fuel(kcal/kg)\n", - "\n", - "#Results:\n", - "print \"Calorific value of fuel =\",round(x,2),\"kcal/kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Calorific value of fuel = 7166.67 kcal/kg\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.2, Page Number: 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "M = 20000 #maximum demand(kW)\n", - "n_b= 85 #boiler efficiency(%)\n", - "m=0.9 #coal consumption(kg/kWh)\n", - "LF=40 #load factor(%)\n", - "n_t=90 #turbine efficiency(%)\n", - "c=300 #cost of 1 tonne of coal(Rs)\n", - "\n", - "#Calculations:\n", - "n_th = n_b * n_t/100 #in %\n", - "cb = LF*M*m*c*24*365/(1000*100)\n", - "\n", - "#Results:\n", - "print \"Thermal efficiency = \",n_th,\"%\"\n", - "print \"Coal bill per annum = Rs\",cb" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thermal efficiency = 76.5 %\n", - "Coal bill per annum = Rs 18921600.0\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.3, Page Number: 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "ct=3000000 #annul cost of coal(Rs)\n", - "cv=5000 #Calorific value of coal(kcal/kg)\n", - "c=300 #cost of coal per tonne(Rs)\n", - "n_th=33 #thermal efficiency(%)\n", - "n_elec=90 #electrical efficiency(%)\n", - "\n", - "#Calculations:\n", - "n_t=n_th*n_elec/100 #overall efficiency(%)\n", - "h=ct*cv*1000/c #heat of combustion(kcal)\n", - "ho=n_t*h/(100*860) #heat output(kWh)\n", - "L=ho/8760 #kW\n", - "\n", - "\n", - "#Results:\n", - "print \"Avg load on the station=\",round(L),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Avg load on the station= 1971.0 kW\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.4, Page Number: 17" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "kWh= symbols('kWh')\n", - "W = 13500 + 7.5 * kWh #Water evaporated in kg\n", - "C = 5000 + 2.9 * kWh #coal cumsumption in kg\n", - "\n", - "\n", - "#Calculations:\n", - "#part (i):\n", - "#As the station output (i.e., kWh) increases towards infinity,\n", - "#the limiting value of W/C approaches\n", - "L1= 7.5/2.9 #in kg\n", - "\n", - "#part (ii):\n", - "#at no load\n", - "kWh=0\n", - "c=(5000+2.9*kWh)/8 #coal per hour in kg\n", - "#Results:\n", - "print \"Limiting value of water/kg of coal=\",round(L1,1),\"kg\"\n", - "print \"Required Coal per hour\",c,\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting value of water/kg of coal= 2.6 kg\n", - "Required Coal per hour 625.0 kg\n" - ] - } - ], - "prompt_number": 34 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.5, Page Number: 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "C=100 #Capacity of station in MW\n", - "cv=6400 #kcal/kg\n", - "n_th=0.3 #thermal efficiency\n", - "n_elec=0.92 #electrical efficiency\n", - "\n", - "\n", - "#Calculations:\n", - "n_t=n_th*n_elec #overall efficiency\n", - "U=C*1*10**3 #units generated/hr in kWh\n", - "H=U*860/n_t #total heat of combustion(kcal)\n", - "w=H/cv #Coal consumption in kg\n", - "\n", - "#Results:\n", - "print \"The coal consumption per hour =\",round(w),\"kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The coal consumption per hour = 48687.0 kg\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.6, Page Number: 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "C=5*10**6 #reservoir capacity in m^3\n", - "H=200 #water head in m\n", - "n_t=0.75 #overall efficiency\n", - "d=1000 #density of water in kg/m^3\n", - "\n", - "#Calculations:\n", - "W=C*d*9.81 #weight of water in Newton\n", - "E=W*H*n_t/(3600*1000) #electrical energy available(kWh)\n", - "\n", - "\n", - "#Results:\n", - "print \"The total energy available=\",round(E/10**6,3),\"* 10^6 kWh\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total energy available= 2.044 * 10^6 kWh\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.7, Page Number: 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V=94 #volume of water in m^3/sec\n", - "d=1000 #density of water in kg/m^3\n", - "H=39 #head of water in m\n", - "nt=0.80 #overall efficiency\n", - "\n", - "\n", - "#Calculations:\n", - "W=V*d #weight of water in kg/sec\n", - "w=W*H*9.81/1000 #work done per sec in kW\n", - "FC=nt*w #firm capacity in kW\n", - "YGO=FC*8760 #yearly gross capacity in kWh\n", - "\n", - "\n", - "#Results:\n", - "print \"Firm capacity=\",FC,\"kW\"\n", - "print \"Yearly gross output\",round(YGO/10**6),\"* 10^6 kWh\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Firm capacity= 28770.768 kW\n", - "Yearly gross output 252.0 * 10^6 kWh\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.8, Page Number: 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable Declaration:\n", - "H=100 #Water head in m\n", - "Q=1 #discharge, m^3/sec\n", - "nh=0.86 #hydraulc efficiency\n", - "nelec=0.92 #electrical efficiency\n", - "d=1000 #density of water, kg/m^3\n", - "\n", - "#Calculations:\n", - "W=Q*d*9.81 #weight of water in N\n", - "Po=W*H*nh*nelec/1000 #power produced, kW\n", - "E=Po*1 #in kWh\n", - "\n", - "#Results:\n", - "print \"Electrical energy generated per hr=\",round(E),\"kWh\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Electrical energy generated per hr= 776.0 kWh\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.9, Page Number: 23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "CA=5*10**9 #Catchment area in m^2\n", - "H=30 #head in m\n", - "F=1.25 #Annual rainfall in m\n", - "K=0.80 #yeild factor\n", - "n=0.70 #overall efficiency\n", - "LF=0.40 #Load factor\n", - "d=1000 #density of water(kg/m^3)\n", - "\n", - "#Calculations:\n", - "V=CA*F*K #volume of water utilised per annum(m^3)\n", - "W=V*d*9.81 #Weight of water available per annum (N)\n", - "E=round(W*H*n/(10**11*3600),2)*10**8 #Electrical energy available per annum(kWh)\n", - "Pav=E/8760 #average power(kW)\n", - "Dmax=Pav/LF #Maximum demand\n", - "\n", - "#Results:\n", - "print \"Average power generated is \",round(Pav),\"kW\"\n", - "print \"Rating of generators is\",round(Dmax),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average power generated is 32648.0 kW\n", - "Rating of generators is 81621.0 kW\n" - ] - } - ], - "prompt_number": 39 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.10, Page Number: 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable Declaration:\n", - "A=2.4 #Area of reservoir(km^2)\n", - "V=5*10**6 #Capacity of reservoir(m^3)\n", - "H=100 #in m\n", - "np=0.95 #penstock efficiency\n", - "nt=0.90 #turbine efficiency\n", - "ng=0.85 #generation efficiency\n", - "L=15000 #load supplied in kW\n", - "\n", - "#Calculations:\n", - "W=V*1000*9.81 #in Newton\n", - "n=int(np*nt*ng*1000)/1000 #overall efficiency\n", - "E=W*H*n/(1000*3600) #Elecctrical energy generated(kWh)\n", - "x=L*3*3600/(A*10**6*9.81*H*n)\n", - "\n", - "#Results:\n", - "print \"Total electrical energy generated is \",round(E),\"kWh\"\n", - "print \"Fall in reservoir level is\",round(x*100,3),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total electrical energy generated is 989175.0 kWh\n", - "Fall in reservoir level is 9.478 cm\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.11, Page Number: 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "H=25 #head of reservoir in m\n", - "Pr=400 #power required by factory(kW)\n", - "n=0.80 #overall efficiency of plant\n", - "\n", - "#Calculations:\n", - "#part (i):\n", - "#(a):\n", - "d1 = 10 #discharge in m^3/sec\n", - "w1 = d1*1000*9.81 #weight of water in N\n", - "P1 = w1*H*n/1000 #power developed(kW)\n", - "\n", - "#(b)\n", - "d2 = 6 #in m^3/sec\n", - "P2 = P1*d2/d1 #kW\n", - "\n", - "#(c)\n", - "d3 = 1.5 #in m^3/sec\n", - "P3 = P1*d3/d1 #kW\n", - "\n", - "Ps = Pr-P3 #standby power(kW)\n", - "\n", - "#part(ii):\n", - "Dav = (d1*4+d2*2+d3*6)/12 #avg discharge(m^3/sec)\n", - "P = P1*Dav/d1 #power developed(kW)\n", - "Pex = P-Pr #Excess power available(kW)\n", - "\n", - "\n", - "#Results:\n", - "print \"(i) Standby power is \",round(Ps),\"kW\"\n", - "print \"(ii) Excess power available is \",round(Pex,1),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Standby power is 106.0 kW\n", - "(ii) Excess power available is 597.4 kW\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": { - "slideshow": { - "slide_type": "-" - } - }, - "source": [ - "Example 2.12, Page Number: 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "#for part (i):\n", - "C = 10 #Installed capacity(MW)\n", - "H = 20 #head of reservoir(m)\n", - "n = 0.80 #overall efficiency\n", - "LF = 0.40 #load factor\n", - "#for part (ii):\n", - "Q2 = 20 #discharge\n", - "\n", - "\n", - "#Calculations:\n", - "#for part(i):\n", - "U = C*LF*24*7*10**3 #units generated per week(kWh)\n", - "Q = U/(H*n*9.81*24*7) #Discharge in m^3/sec\n", - "\n", - "#for part(ii):\n", - "U2 = Q2*9.81*1000*n*H*24/1000 #units generated per day(kWh)\n", - "LF2 = U2/(C*10**3*24)\n", - "\n", - "#Results:\n", - "print \"(i) The river discharge is \",round(Q,2),\"m^3/sec\"\n", - "print \"(ii) The load factor is \", round(LF2*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The river discharge is 25.48 m^3/sec\n", - "(ii) The load factor is 31.4 %\n" - ] - } - ], - "prompt_number": 42 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.13, Page Number: 26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "H = 15 #head of reservoir(m)\n", - "n = 0.85 #efficiency\n", - "L = 0.40 #load factor\n", - "\n", - "\n", - "#Calculations:\n", - "Qavg = (500+520+850+800+875+900+546)/7 #in m^3/sec\n", - "\n", - "#It is clear from graph that on three dyas \n", - "#(viz., Sun, Mon. and Sat.), the discharge is less than\n", - "#the average discharge.\n", - "\n", - "V1 = (500+520+546)*24*3600 #Actual volume available in these 3 days(m^3/s)\n", - "V2 = 3*Qavg*24*3600 #Vol. of water required in these 3 days(m^3/s)\n", - "Pr = V2-V1 #Pondage required(m^3/sec)\n", - "Po = Qavg*9.81*1000*H*n #Avg output produced(W)\n", - "C = Po/L #Capacity of plant(W)\n", - "\n", - "#Results:\n", - "print \"(i) The average daily discharge is \",Qavg,\"m^3/sec\"\n", - "print \"(ii) Pondage required is (\",round(Pr/10**5),\"* 10^5) m^3\"\n", - "print \"(iii)Installed capacity of plant is \",round(C/10**6),\"MW\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The average daily discharge is 713.0 m^3/sec\n", - "(ii) Pondage required is ( 495.0 * 10^5) m^3\n", - "(iii)Installed capacity of plant is 223.0 MW\n" - ] - } - ], - "prompt_number": 43 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.14, Page Number: 29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "w = 0.28 #fuel consumption in kg/kWh\n", - "C = 10000 #calorific value of fuel(kcal/kWh)\n", - "na = 0.95 #efficiency of alternator\n", - "\n", - "\n", - "#Calculations:\n", - "H = w*C/860 #heat produced by 0.28 kg/kWh of fuel\n", - "\n", - "no = 1/H #Overall efficiency\n", - "ne = no/na #Efficiency of engine\n", - "\n", - "#Results:\n", - "print \"(i) The overall efficiency is \",round(no*100,1),\"%\"\n", - "print \"(ii)The efficiency of the engine\",round(ne*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The overall efficiency is 30.7 %\n", - "(ii)The efficiency of the engine 32.3 %\n" - ] - } - ], - "prompt_number": 44 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.15, Page Number: 30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "w = 1000 #fuel consumption in kg/day\n", - "E = 4000 #Units generated in kWh/day\n", - "C = 10000 #calorific value in kcal/kg\n", - "na = 0.96 #Alternator efficiency\n", - "nem = 0.95 #engine mechanical efficiency\n", - "\n", - "\n", - "#Calculations:\n", - "s = w/E #specific fuel consumption(kg/kWh)\n", - "E2 = w*C #energy input per day(kcal/day)\n", - "no = E*860/E2 #overall efficiency\n", - "ne = no/na #engine efficiency\n", - "net = ne/nem #engine thermal efficiency\n", - "\n", - "#Results:\n", - "print \"Specific fuel consumption is \",s,\"kg/kWh\"\n", - "print \"Overall efficiency is \",round(no*100,1),\"%\"\n", - "print \"Thermal efficiency of the engine is \",round(net*100,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Specific fuel consumption is 0.25 kg/kWh\n", - "Overall efficiency is 34.4 %\n", - "Thermal efficiency of the engine is 37.72 %\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.16, Page Number: 30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "C1 = 700 #capacity of plant 1(kW)\n", - "C2 = 2*500 #capacity of plant 2(kW)\n", - "pcf = 0.40 #plant capacity factor\n", - "w = 0.28 #fuel cunsumption in kg/kWh\n", - "H = 10200 #specific heat of fuel in kcal/kg\n", - "\n", - "#Calculatios:\n", - "M = (C1+C2)*30*24 #max energy can be produced in 30 days(kWh)\n", - "E = pcf*M #Actual energy produced in 30 days(kWh)\n", - "W = E*w #actual fuel consumption in kg\n", - "\n", - "Po = E*860 #output energy in kWh\n", - "Pin = W*H #Input energy in kWh\n", - "n = Po/Pin #Overall efficiency\n", - "\n", - "#Results:\n", - "print \"The fuel oil required is \",W,\"kg\"\n", - "print \"Ovreall efficiency is\",round(n*100),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The fuel oil required is 137088.0 kg\n", - "Ovreall efficiency is 30.0 %\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.17, Page Number: 34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "M = 300 #Energy received from reactor(MW)\n", - "E1 = 200 #Energy released fron each atom(MeV)\n", - "\n", - "\n", - "#Calculations:\n", - "E2 = M*10**6*3600 #Energy released per hour(J)\n", - "E3 = E1*1.6*10**-19*10**6 #Energy released per fission(J)\n", - "N = E2/E3 #No of atoms fissioned\n", - "m = N*235/(6.022*10**23) #mass of uranium fissioned per hr(g)\n", - "\n", - "#Results:\n", - "print \"Mass of Uranium fissioned per hour is\",round(m,2),\"g\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass of Uranium fissioned per hour is 13.17 g\n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 2.18, Page Number: 35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "t = 30 #days\n", - "w = 2 #weight of uranium(kg)\n", - "Eo = 200 #energy released per fission(MeV)\n", - "\n", - "\n", - "#Calculations:\n", - "N = 2*1000*6.022*10**23/235 #No of atoms fissioned in 2kg of fuel\n", - "Po = N*Eo*(1.6*10**-19)*10**6/(24*60*60*30) #Watt\n", - "\n", - "\n", - "#Results:\n", - "print \"Power output is\",round(Po*10**-6,1),\"MW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power output is 63.3 MW\n" - ] - } - ], - "prompt_number": 48 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter3_1.ipynb b/Principles_of_Power_System/chapter3_1.ipynb deleted file mode 100644 index 42073d28..00000000 --- a/Principles_of_Power_System/chapter3_1.ipynb +++ /dev/null @@ -1,1355 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c36425eab1371d7c77f7bd1775095f254e3df888559e80a11117b968dfc1b5b4" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Principles of Power System" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.1, Page Number: 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 100 #Maximum demand on power station(MW)\n", - "L = 0.40 #annual load factor\n", - "\n", - "#Calculation:\n", - "E = M*L*8760*10**6 #Energy generated in a year(kWh)\n", - "\n", - "#Results:\n", - "print \"Energy generated in a year is (\",E/10**8,\"* 10^5) kWh\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Energy generated in a year is ( 3504.0 * 10^5) kWh\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.2, Page Number: 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "L = 43 #connected load(MW)\n", - "M = 20 #Maximum demand(MW)\n", - "E = 61.5*10**6 #Units genearted per annum(kWh)\n", - "\n", - "#calculation:\n", - "DF = M/L #demand factor\n", - "LF = E/(M*8760*1000) #load factor\n", - "\n", - "#Results:\n", - "print \"The demand factor is\",round(DF,3)\n", - "print \"Load factor is \",round(LF*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The demand factor is 0.465\n", - "Load factor is 35.1 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.3, Page Number: 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#variable declaration:\n", - "\n", - "#power station delivers 100 MW for 2 hours, \n", - "#50 MW for 6 hours and is shut down for the rest\n", - "#of each day.\n", - "M = 100 #Maximum capacity of station(MW)\n", - "\n", - "\n", - "#Calculation:\n", - "E1 = 100*2+50*6 #Energy supplied per day(MWh)\n", - "n = 365-45 #No.of working days\n", - "LF = E1*320/(M*n*24) #load factor\n", - "\n", - "print \"Annual load factor is\",round(LF*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual load factor is 20.8 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.4, Page Number: 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "M = 25 #Maximum demand(MW)\n", - "LF = 0.60 #Load factor\n", - "PCF = 0.50 #plant capacity factor\n", - "PUF = 0.72 #plant use factor\n", - "\n", - "\n", - "#Calculations:\n", - "L = LF*M #Average load(MW)\n", - "PC = L/PCF #Plant gapacity(MW)\n", - "R = PC-M #Reserve capacity(MW)\n", - "E = L*24 #daily energy produced(MWh)\n", - "ME = E/PUF #Maximum energy produced(MWh/day)\n", - "\n", - "#Results:\n", - "print \"Reserve capacity is \",R,\"MW\"\n", - "print \"Daily energy produced is\",E,\"MWh\"\n", - "print \"Maximum energy that could be produced dauly is \",ME,\"MWh/day\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reserve capacity is 5.0 MW\n", - "Daily energy produced is 360.0 MWh\n", - "Maximum energy that could be produced dauly is 500.0 MWh/day\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.5, Page Number: 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "M = 2500 #Maximum demand(kW)\n", - "E = 45*10**5 #kWh/year\n", - "\n", - "#Calculation:\n", - "D = (1500+750+100+450)/M #diversity factor\n", - "LF = E/(M*8760) #Annual load factor\n", - "\n", - "#Results:\n", - "print \"Diversity factor is\",D\n", - "print \"Annual load factor is\",round(LF*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diversity factor is 1.12\n", - "Annual load factor is 20.5 %\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.6, Page Number: 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "M = 15000 #Max demand(kW)\n", - "LF = 0.50 #Annual load factor\n", - "PCF = 0.4 #Plant capacity factor\n", - "\n", - "\n", - "#Calculations:\n", - "L = LF*M #load factor(kW)\n", - "PC = L/PCF #plant capacity(kW)\n", - "R = PC-M #Reserve capacity(kW)\n", - "\n", - "#Results:\n", - "print \"The reserve capacity is \",R,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The reserve capacity is 3750.0 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.7, Page Number: 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "DFo = 1.35 #Overall diversity factor of system\n", - "\n", - "\n", - "\n", - "#Calculations:\n", - "M = (1500+2000+10000)/DFo #max demand(kW)\n", - "#for domestic load:\n", - "CL1 = (1500*1.2)/0.8 #kW\n", - "\n", - "#for Commercial load:\n", - "CL2 = 2000*1.1/0.9 #kW\n", - "\n", - "#for Industrial load:\n", - "CL3 = 10000*1.25/1 #kW\n", - "\n", - "\n", - "#Results:\n", - "print \"Maximum demand is \",M,\"kW\"\n", - "print \"Connected loads for each type are:\"\n", - "print CL1,\"kW \",round(CL2),\"kW \",CL3,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum demand is 10000.0 kW\n", - "Connected loads for each type are:\n", - "2250.0 kW 2444.0 kW 12500.0 kW\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.8, Page Number: 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "Dt = 1.3 #Diversity among transformers\n", - "\n", - "\n", - "#Calculation:\n", - "#for transformer 1:\n", - "M1 = (10*0.65)/1.5 #Max demand (kW)\n", - "\n", - "#for transformer 2:\n", - "M2 = (12*0.6)/3.5 #max demand(kW)\n", - "\n", - "#for transformer:\n", - "M3 = (15*0.7)/1.5 #max demand(kW)\n", - "\n", - "Mf = (M1+M2+M3)/Dt #Maximum demand on feeder(kW)\n", - "\n", - "#Results:\n", - "print \"Maximum load on the feeder is \",round(Mf,1),\"kW\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum load on the feeder is 10.3 kW\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.9, Page Number: 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "n1 = 1000 #No of houses\n", - "CL1 = 1.5 #Avg connected load in each house(kW)\n", - "DF1 = 0.4 #Demand factor\n", - "DvF = 2.5 #Diversity factor\n", - "\n", - "n2 = 10 #no. of factories\n", - "M2 = 90 #factory overall max demand(kW)\n", - "\n", - "n3 = 7 #no of tubewells\n", - "C3 = 7 #capacity of tubewells(kW)\n", - "\n", - "DF = 1.2 #Diversity factor among above types of consumers\n", - "\n", - "#Calculations:\n", - "Ms = ((DF1*n1*CL1)/DvF)+M2+n3*C3 #Sum of maximum demand on the station(kW)\n", - "M = Ms/DF #maximum demand on the station(kW)\n", - "\n", - "#Results:\n", - "print \"Minimum capacity on the power station is\",round(M),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum capacity on the power station is 316.0 kW\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.10, Page Number: 53" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%pylab inline\n", - "\n", - "\n", - "#Calculations:\n", - "M = 70.0 #Max demand, from load curve(MW)\n", - "E = 40*6+50*4+60*2+50*4+70*4+40*4 #Units generated per day(MWh)\n", - "L = E/24 #Avg load(MW)\n", - "LF = L/M #Load factor\n", - "\n", - "n1 = linspace(0,6,10);\n", - "M1 = linspace(40,40,10);\n", - "plot(n1,M1);\n", - "hold(True);\n", - "\n", - "n2 = linspace(6,10,10);\n", - "M2 = linspace(50,50,10);\n", - "plot(n2,M2,'b');\n", - "\n", - "n3 = linspace(10,12,10);\n", - "M3 = linspace(60,60,10);\n", - "plot(n3,M3,'b');\n", - "\n", - "n4 = linspace(12,16,10);\n", - "M4 = linspace(50,50,10);\n", - "plot(n4,M4,'b');\n", - "\n", - "n5 = linspace(16,20,10);\n", - "M5 = linspace(70,70,10);\n", - "plot(n5,M5,'b');\n", - "\n", - "n6 = linspace(20,24,10);\n", - "M6 = linspace(40,40,10);\n", - "plot(n6,M6,'b');\n", - "\n", - "ylim(0,100);\n", - "xlim(0,24);\n", - "grid(1,linewidth=0.5);\n", - "ylabel(\"Load in MW ------>\");\n", - "xlabel(\"Time in hours ----->\");\n", - "title(\"Daily Load Curve\")\n", - "\n", - "#Results:\n", - "print \"Maximum demand is \",M,\"MW\"\n", - "print \"Units generated per day is (\",E/100,\"* 10^5) kWh\"\n", - "print \"Average load is\",L*1000,\"kW\"\n", - "print \"Load factor is \",round(LF*100,1),\"%\"\n", - "print \"The Daily load curve is shown below:\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Maximum demand is " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 70.0 MW\n", - "Units generated per day is ( 12.0 * 10^5) kWh\n", - "Average load is 50000.0 kW\n", - "Load factor is 71.4 %\n", - "The Daily load curve is shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEZCAYAAABxbJkKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX6B/DPQbFUlkGSRVDHzA0X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qYWsw/oLk0RVaNCgAQDAwcEBjo6OussdHBxQ\nVlYGWZbRsWNHpKenm3S/d56Q69Wrp1tWMnSdu69371/7sizrLqtfvz5u374NALh+/Xql6zVq1Ej3\n/dixY9GzZ08kJydj0KBBWLZsmW7pyJicnBzdGXQnT56M8vJyLF++HJIkISUlBZGRkbhw4QJ69OiB\nSZMm6eYgc+fOxb59+5CSkgJJkvDLL7/o7nP//v1YtWoVtm3bhjFjxiA6OrrKOsh+sAmQTavO0kS7\ndu1w8eJF7N27Fz179sStW7dw4sQJ+Pn51ej+jJEkCe3atYNWq8WpU6fQunVrrF69Gv369QNQMRM4\ncOAAnnrqKXz11VcG95udnY1WrVrh5ZdfxtmzZ3H48OFqNYHmzZvrhul3vPjii7rvt27dWulnd193\nyJAh+OCDD3Tb3377Ld588014e3tj0qRJWLJkiU0MrMmy+F+cbMbd6/VK3999nbu3HR0dsWHDBrzy\nyiu4fPkyysrK8Nprryk2AUNr9kqXG/p0qQceeACrVq3CqFGjUFZWhsDAQEyePBkA8N5772HixIlw\ncXFBUFCQwd8jMTERq1evhqOjI7y9vRVnGOb20EMPITk5udJHt5J4eCppIiKBcTBMRCQwNgEiIoGx\nCRARCYxNgIhIYGwCREQCYxMgIhIYmwARkcDYBIiIBPb/pozSJIWf61MAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.11, Page Number: 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%pylab inline\n", - "\n", - "#Calculation:\n", - "M = 350.0 #Maximum demand(kW)\n", - "DF = (200+100+50+100)/M #Diversity factor\n", - "E = 100*6+(100+50)*2+(200+100+50)*2+(200+100)*8+100*6 #kWh/day\n", - "LF = E/(24*M) #load factor\n", - "\n", - "n1 = linspace(0,6,10);\n", - "M1 = linspace(100,100,10);\n", - "plot(n1,M1);\n", - "\n", - "\n", - "hold(True);\n", - "\n", - "n2 = linspace(6,8,10);\n", - "M2 = linspace(150,150,10);\n", - "plot(n2,M2,'b');\n", - "\n", - "n3 = linspace(8,10,10);\n", - "M3 = linspace(350,350,10);\n", - "plot(n3,M3,'b');\n", - "\n", - "n4 = linspace(10,18,10);\n", - "M4 = linspace(300,300,10);\n", - "plot(n4,M4,'b');\n", - "\n", - "n5 = linspace(18,24,10);\n", - "M5 = linspace(100,100,10);\n", - "plot(n5,M5,'b');\n", - "\n", - "ylim(0,400);\n", - "xlim(0,24);\n", - "grid(linewidth=0.5);\n", - "ylabel(\"Load in kW ------>\");\n", - "xlabel(\"Time in hours ----->\");\n", - "title(\"Daily Load Curve\")\n", - "\n", - "#Results:\n", - "print \"Diversity factor is \",round(DF,3)\n", - "print \"Unis generated per day is \",E,\"kWh\"\n", - "print \"Load factor is \",round(LF*100,1),\"%\"\n", - "print \"The daily load curve is shown below:\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Diversity factor is " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 1.286\n", - "Unis generated per day is 4600 kWh\n", - "Load factor is 54.8 %\n", - "The daily load curve is shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEZCAYAAACaWyIJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVQW6x/HvJqk0UCgTyW3R5AW3IZs0ccwKRzCpIKuJ\nCVOxsJM2NXlpjDhdpDoDnWZyzJNzmsYLaWo+TYmjaWaJmVZoQXUiRQ0SEclCNMcUwXX+MHfSvsBW\nt3vL+n2ex0fW2pf18or7Zb3vulgMwzAQERHTCvJ3ACIi4l8qBCIiJqdCICJicioEIiImp0IgImJy\nKgQiIianQiCtwo4dOwgNDeX40dAJCQnMmjXLz1G5FxQUxNdff+3vMEQAFQIJEFFRUbRr14727dsT\nHh7ONddcw0svvURLT3O59NJL+eGHH7BYLABYLBbH196YO3cu1157rdevO93efvttrrvuOtq3b0+n\nTp1ISEjgX//6l7/DklZKhUACgsViYdmyZezfv58dO3aQlZXFs88+S2Zmpr9DO+Nef/110tLSGDNm\nDFVVVXz77bc89dRTJ1UIDMNocTEV81IhkIATGhpKSkoKr732Gvn5+Xz55ZcALF++nLi4ODp06MCl\nl15KTk6O4zUVFRUEBQVx9OjRJu9VX1/PhRdeyP/93/851n377bdccMEFfP/9917FtWHDBq6++mrC\nwsLo378/H374oeOxOXPmYLPZaN++PVdccQV///vfm7z2ueee45JLLsFqtTJ79my32zAMg0mTJvHE\nE09wzz33EBoaCsB1113neM+pU6cyatQot997QkICjz32GNdccw0XXHABzz33HFdffXWT7UybNo1b\nbrkFgMOHD/Pwww9z2WWX0blzZ8aPH8+hQ4e8yo2c3VQIJGBdffXVWK1WPvjgAwBCQkKYP38++/bt\nY/ny5fztb3+joKDA43uce+65pKenM3/+fMe6hQsXkpiYyEUXXdTiWGpra7npppuYMGECtbW1TJo0\niZtuuona2loAIiIiWL58Ofv372fOnDlMnDiR4uJiAFauXMlf/vIXVq9eTVlZGatXr3a7nS1btrBz\n505++9vfun1OS1pe8+fP5x//+AcHDhxg3LhxbNmyhW3btjkeX7BgAXfddRcAWVlZbNu2jc8++4xt\n27ZRVVXFU0891aK8SOugQiAB7ZJLLnF82F5//fX07t0bgJiYGO68807Wrl3b7HuMHj2ahQsXOpbn\nzZvX5Dfqlli+fDk9e/bkrrvuIigoiDvvvJPo6GhHu+bGG2/k8ssvB4799j506FDWrVsHwOLFi7nn\nnnuw2Wy0a9euyZ7MLx3fS4mMjHT7nOZaPRaLhTFjxtCrVy+CgoJo3749t9xyiyMHW7duZcuWLaSm\npmIYBi+//DLPP/88YWFhhISE8Oijj7Jo0aKWJ0fOeioEEtCqqqq48MILAfj4448ZPHgwnTp1Iiws\njJdeeqlF7Z34+Hjatm1LYWEhmzdvZvv27aSmpnoVx65du7j00kubrLvsssvYtWsXACtWrGDAgAFc\ndNFFhIeH89Zbbzliq66upmvXro7X/fJ9TnR8L6W6utqr+H7pxO0BjBgxwlEIFixYwK233sr555/P\nnj17OHjwIH379iU8PJzw8HCSk5P57rvvTmn7cnZRIZCAtXHjRqqqqhg0aBBw7MNs+PDh7Ny5k7q6\nOsaNG+c0E3AnIyOD+fPnM2/ePO644w7OPfdcr2Lp0qUL33zzTZN133zzDV26dOHw4cPcfvvtTJky\nhW+//Za9e/dy4403On5zj4yMZMeOHY7Xnfj1L/Xs2ZOuXbvy+uuvu31OSEgIBw8edCzv3r3b6Tm/\nbB8lJiayZ88ePvvsMxYtWsSIESMA6NixI23btqW0tJS9e/eyd+9e6urq2L9/v4dsSGujQiAB4/gH\n5/79+1m2bBnp6emMGjXK0Q46cOAA4eHhnHvuuRQVFbFgwQKP/fITWygjR47kjTfe4NVXX2X06NHN\nxnH48GEOHTrk+HPjjTdSVlbGwoULaWho4LXXXmPz5s3cfPPN1NfXU19fT8eOHQkKCmLFihWsWrXK\n8X5paWnMnTuXr776ioMHD3psDVksFp5//nmefvpp5s6dy/79+zl69CgffPAB9913HwCxsbG8//77\nVFZWsm/fPnJzcz1+7wDBwcHccccdPPzww+zdu5ekpCTg2PkM9957LxMmTGDPnj3Asb2wE+MXEzBE\nAkBUVJTRtm1bIzQ01OjQoYMxcOBAY+bMmcbRo0cdz3n99deNyy67zAgNDTVuvvlm48EHHzRGjRpl\nGIZhlJeXG0FBQUZjY6NhGIaRkJBgzJo1q8k2hgwZYlx++eUe45g7d65hsVia/Dn+vh988IHRt29f\no0OHDka/fv2M9evXO1734osvGhEREUZYWJgxatQoIz093Xj88ccdj+fl5RmdO3c2unTpYsyePdsI\nCgoytm/f7jaOlStXGtdee60REhJiXHzxxcbgwYONt956y/H473//eyMsLMzo3r278fLLLzf7vRuG\nYaxbt86wWCzGAw880GT9oUOHjOzsbONXv/qV0b59e6NXr17GjBkzPOZJW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OCHbs2EFubi4Ahw8f\n5rbbbqNHjx4tevP169czf/581qxZQ1xcHHFxcaxcuZKsrCzeeecdevTowXvvvefYA7DZbKSlpWGz\n2UhOTmbmzJleHa5qZsd3CaUp5cWZcuKamfPS7FFDR48e5a677qJPnz6899573HjjjUycOPFMxedE\nrSHXCgsLHX1C+Zny4kw5ca215+WkDh/95JNPHL+NHzlyhPvuu4+BAwcyduxYAK666iofheuZCoGI\niPdOqhAkJCQ0acsYhtFkec2aNac5zJZRIRAR8Z5uXm8CrX239mQpL86UE9dae150hzIREXFLewQi\nIiagPQIREXGrRYVg/fr1vPrqq+Tn55Ofn39SF5wT3zLzMdCeKC/OlBPXzJwXt9caOm7kyJF8/fXX\nTpeaGD16tE8DExGRM6PZGUGvXr0oLS0NmDN8NSMQEfHeKc0IrrzySqqrq097UCIiEhiaLQR79uzB\nZrMxdOhQUlJSSElJITU19UzEJl4wc3/TE+XFmXLimpnz0uyMYOrUqWcgDBER8RedRyAiYgInNSO4\n5pprAAgJCSE0NLTJn/bt2/smUhEROePcFoL169cDx24z+cMPPzT5s3///jMWoLSMmfubnigvzpQT\n18ycF51ZLCJicpoRiIiYgK41JCIibqkQtBJm7m96orw4U05cM3Ne3BYCV0cLeXvU0D333ENERAQx\nMTGOdVOnTsVqtTpuZr9ixQrHY7m5uXTv3p3o6GhWrVp1Ct+WiIi0VLMzgscee4xLLrmEkSNHAvDq\nq6+ya9cunn766WbffN26dYSEhDB69Gi++OILAHJycggNDWXSpElNnltaWsqIESPYuHEjVVVVJCYm\nUlZWRlBQ01qlGYGIiPdOaUawdOlS7r//ftq3b0/79u0ZP348BQUFLdrwtddeS3h4uNN6V8EUFBSQ\nnp5OcHAwUVFRdOvWjaKiohZtR0RETl6zheCCCy5g/vz5NDY20tjYyKuvvkpISMgpbXTGjBnExsaS\nmZlJXV0dALt27cJqtTqeY7VaqaqqOqXtmImZ+5ueKC/OlBPXzJyXZq81tGDBAh566CEmTJgAHDvj\neMGCBSe9wfHjx/PE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y18ASEhIICsri/j4eHr27MkHH3zg9HyLxcKBAwe4\n44476NWrFyNHjnQ89u6773LVVVfRp08fMjMzqa+vB47dKKi2thaATZs2MXjwYMe2R40axaBBg8jI\nyODLL7+kf//+xMXFERsby7Zt205XGlts0aJFxMTE8Pzzz/Pdd9+d8e1LYFAhkLNCeXk5a9asYenS\npYwcOZKkpCQ+//xz2rZty/Llyzly5AgPPvgg//znP9m0aRN33303//mf/+n0PideUdJisdDY2MjH\nH3/MX//6V3JycpyebxgGxcXFTJ8+ndLSUr7++ms2bNjAoUOHuPvuu1m8eDGff/45DQ0N/O1vf3O8\nrzubN2/m3Xff5dVXX+Wll15iwoQJFBcX88knn/jlIorjxo1jxYoVHDx4kOuuu4477riDt99+2/T3\nKzAbFQIJeBaLheTkZM455xyuvPJKjh49yg033ABATEwMFRUVlJWV8eWXX5KYmEhcXBz/9V//1aL7\nVdx2220AXHXVVVRUVLh8Tv/+/bnkkkuwWCzY7XbKy8vZsmULl19+Od26dQOO3cTk/fffb/b7SE1N\n5bzzzgPg17/+NX/605/47//+byoqKjj//PNbmpLTymq18thjj1FaWsrdd9/N3Xffza233uqXWMQ/\n/N+kFGmBc889F4CgoCCCg4Md64OCgmhoaMAwDHr37s2GDRu8et/jH8rnnHOOo8Xk7jknPu+Xv/Ub\nhuFY16ZNG44ePQrAoUOHmjyvXbt2jq/T09MZMGAAy5Yt48Ybb+Sll15ytJE8qaysdFx5d9y4cTQ2\nNvLyyy9jsVhYvnw5Y8aM4dtvv+Xqq69m7NixjrnIU089xccff8zy5cuxWCx8+umnjvcsKipizpw5\nrF69mjvvvJN777232Tik9VAhkIDXkjZFz5492bNnDx999BEDBgzgyJEjbN26FZvNdlLv54nFYqFn\nz55UVFSwfft2rrjiCubNm8f1118PHJsRbNq0iWHDhvHPf/7T7XbLy8u5/PLLefDBB9mxYwdffPFF\niwpB165dHQP24+6//37H12+//XaTx058bkpKCs8884xjedWqVfzxj38kMjKSsWPHMmPGjIAYYsuZ\npX9xCSgn9u9dfX3ic05cDg4O5vXXX+cPf/gD+/bto6GhgYkTJ7osBO56+K7Wu7tL1XnnncecOXO4\n4447aGhooH///owbNw6AJ598kszMTNq3b09CQoLb72Px4sXMmzeP4OBgIiMjXc40fK1jx44sW7as\nyW1gxXx0GWoREZPTsFhExORUCERETE6FQETE5FQIRERMToVARMTkVAhERExOhUBExORUCERETO7/\nAV3udrfsY+WJAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.12, Page Number: 54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%pylab inline\n", - "\n", - "\n", - "#Calculation:\n", - "M1 = 800 #max demand of consumer 1(Watts)\n", - "M2 = 1000 #max demand of consumer 2(Watts)\n", - "M3 = 1200 #max demand of consumer 3(Watts)\n", - "\n", - "n1 = linspace(0,8,10);\n", - "m1 = linspace(200,200,10);\n", - "plot(n1,m1);\n", - "\n", - "hold(True);\n", - "n2 = linspace(8,14,10);\n", - "m2 = linspace(800,800,10);\n", - "plot(n2,m2,'b');\n", - "\n", - "n3 = linspace(14,16,10);\n", - "m3 = linspace(2400,2400,10);\n", - "plot(n3,m3,'b');\n", - "\n", - "n4 = linspace(16,22,10);\n", - "m4 = linspace(800,800,10);\n", - "plot(n4,m4,'b');\n", - "\n", - "n5 = linspace(22,24,10);\n", - "m5 = linspace(400,400,10);\n", - "plot(n5,m5,'b');\n", - "\n", - "ylim(0,2500);\n", - "xlim(0,24);\n", - "grid(linewidth=0.5);\n", - "ylabel(\"Load in Watts ------>\");\n", - "xlabel(\"Time in hours ----->\");\n", - "title(\"Daily Load Curve\");\n", - "annotate(\"(Midnight)\",xy=(0,0));\n", - "annotate(\"(Midnight)\",xy=(24,0));\n", - "annotate(\"(Noon)\",xy=(12,0));\n", - "\n", - "#load factors of each consumers:\n", - "LF1 = (600*6+200*2+800*6)/(24*M1)\n", - "LF2 = (200*8+1000*2+200*2)/(24*M2)\n", - "LF3 = (200*6+1200*2+200*2)/(24*M3)\n", - "#The simultaneous maximum demand on the station is 200 + 1000 + 1200 = 2400 W\n", - "#and occurs from 2 P.M. to 4 P.M.\n", - "DF = (M1+M2+M3)/2400.0 #Diversity factor\n", - "LF = (200*8+800*6+2400*2+800*6+400*2)/(24*2400.0) #load factor\n", - "\n", - "#Results:\n", - "print \"(i) The maximum demand of individual consumers are:\"\n", - "print \"\\tConsumer 1 =\",M1,\"W, Consumer 2 =\",M2,\"W, Consumer 3 =\",M3,\"W\"\n", - "print \"\\n(ii)Load Factors of individual consumers are:\"\n", - "print \"\\tConsumer 1 =\",round(LF1*100,1),\"%, Consumer 2 =\",round(LF2*100,1),\"\"\"%,\n", - "\\tConsumer 3 =\"\"\",round(LF3*100,1),\"%\"\n", - "print \"\\n(iii)Diversity factor is \",DF\n", - "print \"\\n(iv) Load factor of the station is\",round(LF*100,1),\"%\"\n", - "print \"\\n The load curve is shown below:\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "(i) The maximum demand of individual consumers are:" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "\tConsumer 1 = 800 W, Consumer 2 = 1000 W, Consumer 3 = 1200 W\n", - "\n", - "(ii)Load Factors of individual consumers are:\n", - "\tConsumer 1 = 45.8 %, Consumer 2 = 16.7 %,\n", - "\tConsumer 3 = 13.9 %\n", - "\n", - "(iii)Diversity factor is 1.25\n", - "\n", - "(iv) Load factor of the station is 29.2 %\n", - "\n", - " The load curve is shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAboAAAEZCAYAAADhf+DFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8DPf+P/DXREKRRIJKIquSusWSm8tG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J6ensjJycGFCxdw5swZDBkyBL6+vvjrX/9aq+8r\nfPPNNwEAPXr0QE5Ojuw2Op0Obdu2hSAI8PHxQXZ2Ns6fPw93d3d07NgRwKMv6dy/f3+Nv0dwcDCa\nNGkCAHjllVewcOFC/O1vf0NOTg5eeOGF2qbEqDQaDf70pz8hMzMTkZGRiIyMlO6fSmRJzN8MIHoO\njRs3BgBYWVnBxsZGWm9lZYWysjKIoohu3brh0KFDddpvZdFp1KiRdAq0um0e3+7JWZsoitI6a2tr\nVFRUAAB+++23Kts1a9ZM+jk0NBR9+vTBzp07ERQUhJUrV0qnOZ8mNzdX+uaOqVOnory8HKtWrYIg\nCNi1axciIiJw/fp19O7dG1OmTJH6kvPnz0daWhp27doFQRBw4sQJaZ9HjhzBmjVrsGfPHowbNw5v\nv/12jXEQNTQsdGSxanMarUuXLrhx4wYOHz6MPn36oLS0FFlZWdBqtc+0v6cRBAFdunRBTk4OLl26\nhA4dOmD9+vUYOHAggEc9umPHjmH48OH47rvvqn3f7OxsuLu7Y8aMGbhy5QpOnz5dq0LXrl076QM8\nlaZPny79/OOPP1Z57vFtR4wYgb/85S/S8u7du/Hhhx/CxcUFU6ZMwRdffNEgPiRD9Cx45JJFeLx/\nJvfz49s8vmxjY4Nvv/0WM2fOxO3bt1FWVob3339fttBV10OTW1/dt0w3adIEa9aswZgxY1BWVgad\nToepU6cCAObNm4eoqCjY29vD39+/2t8jKSkJ69evh42NDVxcXGR7iqbWunVr7Ny5E+3atav39yYy\nNn5NDxERKRo/jEJERIrGQkdERIrGQkdERIrGQkdERIrGQkdERIrGQkdERIrGQkdERIrGQkdERIr2\n/wAb/9x823/nZQAAAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.13, Page Number: 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "A = 12 #Area of load curve(cm**2)\n", - "Lo = 1000 #load under 1cm length(kW)\n", - "To = 2 #time under 1cm length(hr)\n", - "M = 3000 #maximum demand(kW)\n", - "\n", - "#Calculation:\n", - "L = Lo*To*A/24 #Average load(kW)\n", - "LF = L/M #load factor\n", - "\n", - "\n", - "#Results:\n", - "print \"Load factor is\",round(LF*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load factor is 33.3 %\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.14, Page Number: 56" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "C = 75 #Capacity of each generator(MW)\n", - "n = 4 #No. of generators\n", - "CV = 10000 #Calorific value of oil used(kcal/kg)\n", - "H = 2860 #Avg heat rate(kcal/kWh)\n", - "\n", - "\n", - "#Calculation:\n", - "E = (260*6+200*8+160*4+100*6) #Units generated per day(MWh)\n", - "L = E/24 #Avg load(MW)\n", - "LF =L/260 #Load factor\n", - "PCF = L/(n*C) #Plant capacity\n", - "TH = H*E*10**3 #heat generated per day(kcal)\n", - "w = TH/CV #daily fuel requirement(kg)\n", - "\n", - "print \"Daily load factor is\",round(LF*100,1),\"%\"\n", - "print \"Plant capacity factor is\",round(PCF*100,1),\"%\"\n", - "print \"Daily fuel requirement is (\",w/1000,\"* 10^3) kg\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Daily load factor is 70.5 %\n", - "Plant capacity factor is 61.1 %\n", - "Daily fuel requirement is ( 1258.4 * 10^3) kg\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.15, Page Number: 56" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%pylab inline\n", - "\n", - "#Calculations:\n", - "E = 20*2+40*4+60*4+20*4+50*4+20*6 #Units generated per day(MWh)\n", - "\n", - "#1st plot\n", - "subplot(1,3,1)\n", - "n1 = linspace(0,8,10);\n", - "m1 = linspace(20,20,10);\n", - "plot(n1,m1);\n", - "\n", - "hold(True);\n", - "n2 = linspace(8,12,10);\n", - "m2 = linspace(40,40,10);\n", - "plot(n2,m2,'b');\n", - "\n", - "n3 = linspace(12,16,10);\n", - "m3 = linspace(60,60,10);\n", - "plot(n3,m3,'b');\n", - "\n", - "n4 = linspace(16,20,10);\n", - "m4 = linspace(20,20,10);\n", - "plot(n4,m4,'b');\n", - "\n", - "n5 = linspace(20,24,10);\n", - "m5 = linspace(40,40,10);\n", - "plot(n5,m5,'b');\n", - "\n", - "ylim(0,100);\n", - "xlim(0,24);\n", - "grid(linewidth=0.5);\n", - "ylabel(\"Load in MW ------>\");\n", - "xlabel(\"Time in hours ----->\");\n", - "title(\"$(i)$ Daily Load Curve\");\n", - "\n", - "#next plot\n", - "subplot(1,3,3)\n", - "n1 = linspace(0,4,10);\n", - "m1 = linspace(60,60,10);\n", - "plot(n1,m1);\n", - "\n", - "hold(True);\n", - "n2 = linspace(4,8,10);\n", - "m2 = linspace(50,50,10);\n", - "plot(n2,m2,'b');\n", - "\n", - "n3 = linspace(8,12,10);\n", - "m3 = linspace(40,40,10);\n", - "plot(n3,m3,'b');\n", - "\n", - "n4 = linspace(12,24,10);\n", - "m4 = linspace(20,20,10);\n", - "plot(n4,m4,'b');\n", - "\n", - "ylim(0,100);\n", - "xlim(0,24);\n", - "grid(linewidth=0.5);\n", - "ylabel(\"Load in MW ------>\");\n", - "xlabel(\"Hours duration ----->\");\n", - "title(\"$(ii)$ Load Duration Curve\");\n", - "\n", - "\n", - "#Results:\n", - "print \"Energy generated per day is (\",E,\"* 10^3) kWh\"\n", - "print \"\\nThe daily load curve and load duration curves are shown below:\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Energy generated per day is (" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 840 * 10^3) kWh\n", - "\n", - "The daily load curve and load duration curves are shown below:\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEcCAYAAAAV2MmlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYFFe6BvC3EWJcQNCwqKhtXIjIPgY1bjCKySRuiYor\nAhoyZuKWZBy9ibnGxBnQGY3LJDM+EyPGnWyKJGoSlSzuG3HBJTeCorYmirihYTv3D0MPjd3Q3XRV\nV3W9v+fh0SqqT33Nqa+/rnOqq3VCCAEiIiIJuDk7ACIicl0sMkREJBkWGSIikgyLDBERSYZFhoiI\nJMMiQ0REkmGRISIiybDIEBGRZBRXZPLy8h5YZzAYUFxc7IRoiLTFXP5Vx3wkWyiqyJw9exZ79+59\nYL2vry/mz58v+f5DQkLw7bffGpf1ej22b98u+X7tkZSUhDfeeMPZYZALsZR/1cmVj9ZQSx5Uf23R\nEkUVmWXLlmHUqFEPrHd3d8czzzyDDz/8sMbH6/V6NGzYEF5eXvDx8UGPHj2wbNkyWHvnnOPHj6N3\n797GZZ1OB51OZ9uTgDzFyZrY1q5diy5dusDT0xMtWrTA008/jV27dkkaF6mXpfyrzpZ8dHYe1PU1\nwR56vR47duwwWVf9tcWRlJ7niikyP/zwAwIDA03WzZw5E19++SUA4PHHH8fXX39dYxs6nQ5ZWVm4\nefMmzp8/j5kzZ2LevHmYMGGCZHFbisOe4mSrmhJl4cKFePnllzFr1iz8/PPPKCgowEsvvYTMzEyb\n91NWVlaXMEkFasu/6svW5qOz88DRrwnW5IJOp5O0iFWlijwXCjF37lxx/PjxGrd55ZVXxI8//mjx\n93q9Xmzfvt1k3f79+4Wbm5s4ceKEEEKI1NRU0a5dO+Hp6SmCg4PFZ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GrVynixRKU/\n/elPxv9v27bN5HdVtx04cCDmzp1rXP7yyy8xffp0NG/eHM8//zyWLl2qiAsSSH2eeOIJrF+/HmPH\njsWaNWvQu3dvAPfz4dChQxg+fDgyMzNRWlpq9vEGgwE+Pj4YM2YMmjRpguXLl5v83tvbG97e3ti1\naxd69OiBNWvWGH+n1+vxr3/9C0IIXLhwweL3vFQWlGbNmuH27dv46KOPEB8fDwDw9PTEzZs3TbbX\n6XSIjo7GlClTcO3aNXh7e2P9+vXGoUBbffDBBybL1Yf9rM3jmzdvYty4cTh9+jTGjRuHLVu2GC9Y\nkJMqXymqzpeY+3/Vbaoue3h44OOPP8aUKVNw48YNlJWV4eWXXzZbZCzNmVh6F2Nuff369bFixQoM\nHz4cZWVliI6OxsSJEwEAs2fPxoQJE+Dl5YWYmBiLzyMjIwOrVq2Ch4cHmjdvbnYOSWqPPPIIsrKy\nTL5Sl8gSc7lXuW7p0qVITk7G3//+d/j5+WHFihUA7l8KPHjwYEREROCpp54yuQy6anvHjh3D9OnT\n4ebmhoceesg4x1nVihUrMH78eOh0OvTv39/4+J49e6Jt27YIDg5Gp06d8Lvf/c7sPry9vZGSkoKQ\nkBAEBASga9euxt8lJSVh4sSJaNiwIXbv3m1cHxAQgLS0NMTGxkIIgQEDBhgvSqr+uiTnt1pOmzYN\nMTExsu3PHN7qn4iIJONSczJERKQsLDJERCQZFhkiIpIMiwwREUmGRYaIiCTDIkNERJJhkSEiIsmw\nyBARkWT+H5YlVY/jFClJAAAAAElFTkSuQmCC\n", - "text": [ - "" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.16, Page Number: 57" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "c1 = 10 #Capacity of each of 2 generators(MW)\n", - "c2 = 5 #Capacity of 3rd generator(MW)\n", - "\n", - "#Calculation:\n", - "C = 2*c1+c2 #Installed capacity(MW)\n", - "A = (1/2)*(20+4) #Avg load, seen from the curve(MW)\n", - "PF = A/C #plant factor\n", - "E = 8760*A #Units generated per annum(MWh)\n", - "LF = A/20 #Load factor\n", - "PUF = 20/C #Plant capacity factor\n", - "\n", - "#Results:\n", - "print \"(i) Installed capacity is \",C,\"MW\"\n", - "print \"(ii) Plant factor is \",round(PF*100,1),\"%\"\n", - "print \"(iii) Units generated per annum is \",(E/1000),\"* 10^3 kWh\"\n", - "print \"(iv) Load factor is \",round(LF*100,1),\"%\"\n", - "print \"(V) Utilisation factor is \",round(PUF*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Installed capacity is 25 MW\n", - "(ii) Plant factor is 48.0 %\n", - "(iii) Units generated per annum is 105.12 * 10^3 kWh\n", - "(iv) Load factor is 60.0 %\n", - "(V) Utilisation factor is 80.0 %\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.17, Page Number: 57 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "n = 0.72 #efficiency of the load\n", - "\n", - "#Calculation:\n", - "Ma = (10*0.746/0.72)* 0.65 + 5 * 0.60 #kW\n", - "Mb = (7.5*0.746/0.72)*0.75+4*0.60 #kW\n", - "Mc = (15*0.746/0.72)*0.65 #kW\n", - "Md = (5*0.746/0.72)*0.75+2*0.60 #kW\n", - "\n", - "SM = Ma+Mb+Mc+Md #Sum of maximum demands(kW)\n", - "\n", - "#The diversity factor between consumers of this type of service is 1\u00b75 from above table.\n", - "M1 = SM/1.5 #Maximum demand on transformer 1(kW)\n", - "\n", - "#In a similar manner, the other transformer loads are determined to be\n", - "# Total Simultaneous\n", - "#Transformer 2 26 kW 7\u00b743 kW\n", - "#Transformer 3 29\u00b713 kW 19\u00b740 kW\n", - "\n", - "#The diversity factor between transformers is 1\u00b73\n", - "M2 = 7.43; M3 = 19.40\n", - "MF = (M1+M2+M3)/1.3 #Maximum load on feeder(kW)\n", - "\n", - "\n", - "#Results:\n", - "print \"The maximum load on the feeder is \",round(MF,2),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum load on the feeder is 37.64 kW\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.18, Page Number: 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%pylab inline\n", - "\n", - "\n", - "#Calculation:\n", - "E = 10**3*(20*2+40*3+50*5+35*3+70*3+40*2+20*6) #Units generated per day(kWh)\n", - "A = E/24 #Average load(kW)\n", - "LF = A/(70*10**3) #Load factor\n", - "\n", - "n1 = linspace(0,8,10);\n", - "m1 = linspace(20,20,10);\n", - "plot(n1,m1);\n", - "\n", - "hold(True);\n", - "n2 = linspace(8,11,10);\n", - "m2 = linspace(40,40,10);\n", - "plot(n2,m2,'b');\n", - "\n", - "n3 = linspace(11,16,10);\n", - "m3 = linspace(50,50,10);\n", - "plot(n3,m3,'b');\n", - "\n", - "n4 = linspace(16,19,10);\n", - "m4 = linspace(35,35,10);\n", - "plot(n4,m4,'b');\n", - "\n", - "n5 = linspace(19,22,10);\n", - "m5 = linspace(70,70,10);\n", - "plot(n5,m5,'b');\n", - "\n", - "n6 = linspace(22,24,10);\n", - "m6 = linspace(40,40,10);\n", - "plot(n6,m6,'b');\n", - "\n", - "\n", - "ylim(0,100);\n", - "xlim(0,24);\n", - "grid(linewidth=0.5);\n", - "ylabel(\"Load in MW ------>\");\n", - "xlabel(\"Time in hours ----->\");\n", - "title(\"Daily Load Curve\");\n", - "\n", - "#Results:\n", - "print \"Load factor is \",round(LF*100,2),\"%\"\n", - "print \"\"\"\\nOperational schedule: Referring to the load curve shown\n", - "below, the operational schedule will be as under :\n", - " (i) Set No. 1 will run for 24 hours.\n", - " (ii) Set No. 2 will run from 8.00 hours to midnight.\n", - " (iii)Set No. 3 will run from 11.00 hours to 16 hours and \n", - " again from 19 hours to 22 hours.\"\"\"\n", - "print \"\\nThe Load curve is shown below:\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Populating the interactive namespace from numpy and matplotlib\n", - "Load factor is " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " 55.06 %\n", - "\n", - "Operational schedule: Referring to the load curve shown\n", - "below, the operational schedule will be as under :\n", - " (i) Set No. 1 will run for 24 hours.\n", - " (ii) Set No. 2 will run from 8.00 hours to midnight.\n", - " (iii)Set No. 3 will run from 11.00 hours to 16 hours and \n", - " again from 19 hours to 22 hours.\n", - "\n", - "The Load curve is shown below:\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['tri', 'axes', 'legend', 'stackplot', 'figure', 'rc_context', 'quiver', 'streamplot', 'rc', 'text', 'colors', 'contour', 'axis', 'colorbar', 'test', 'rcdefaults', 'table']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEZCAYAAABxbJkKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHX6B/DPQbFULoMkF0EdM294AU3J8gaLWJqapqKW\nCKhsWlZkZebPNrU2p1pvmbWuorBiKmutEiiWFabiJQvTRMULo4iAJiAqeQHP7w9jVpwzAwPMhfl+\n3q/XvOQMw5yHT9M8zPeZc0aSZVkGEREJycHaBRARkfWwCRARCYxNgIhIYGwCREQCYxMgIhIYmwAR\nkcDYBKjeO3fuHJydnVHxbuegoCDExsZauSrDHBwccObMGWuXQQSATYBsgFqtRpMmTeDi4gI3Nzf0\n6dMHK1asQHUPYWnVqhWuXr0KSZIAAJIk6b42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aNdixYwfGjRuH6Ojo\nKusg+8EmQDatOksTHTp0wKVLl7Bv3z707t0bt2/fxsmTJ+Hn51ej+zNGkiR06NABWq0Wp0+fRtu2\nbbF27VoMGDAAwN2ZwMGDB/HUU0/hyy+/NLjf7OxstGnTBi+//DLOnTuHI0eOVKsJtGzZUjdMr/Di\niy/qvt6+fXul791722HDhuH999/XbX/zzTd488034e3tjSlTpmDZsmU2MbAmy+J/cbIZ967XK319\n723u3XZ0dMSmTZvwyiuv4MqVKygrK8Nrr72m2AQMrdkrXW/o06UeeOABrFmzBmPGjEFZWRkCAwMx\ndepUAMC7776LyZMnw8XFBUFBQQZ/j8TERKxduxaOjo7w9vZWnGGY20MPPYTk5ORKH91K4uGppImI\nBMbBMBGRwNgEiIgExiZARCQwNgEiIoGxCRARCYxNgIhIYGwCREQCYxMgIhLY/wPvzB87kxUFaQAA\nAABJRU5ErkJggg==\n", - "text": [ - "" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - " Example 3.19, Page Number: 61" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "#peak loads(MW) are:\n", - "P1 = 10\n", - "P2 = 5\n", - "P3 = 8\n", - "P4 = 7\n", - "\n", - "DF = 1.5 #Diversity factor\n", - "LF = 0.60 #Avg annual load factor\n", - "\n", - "#Calculation:\n", - "M = (P1+P2+P3+P4)/DF #Max demand on the station(MW)\n", - "E = (LF*M)*8760 #Annual energy supplied(MWh)\n", - "#the installed capacity should be 15% to 20% more than the\n", - "#maximum demand to meet the future needs.\n", - "#Taking Installed capacity to be 20% more than the maximum demand,\n", - "IC = 1.2*M #MW\n", - "\n", - "\n", - "#Results:\n", - "print \"(i) The maximum demand on the station is\",M,\"MW\"\n", - "print \"(ii) Annual energy supplied by the station is (\",E/1000,\"* 10^6) kWh\"\n", - "print \"(iii)Installed capacity is\",IC,\"MW\"\n", - "print \" Suitable unit sizes are 4, each of 6 MW capacity.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The maximum demand on the station is 20.0 MW\n", - "(ii) Annual energy supplied by the station is ( 105.12 * 10^6) kWh\n", - "(iii)Installed capacity is 24.0 MW\n", - " Suitable unit sizes are 4, each of 6 MW capacity.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.20, Page Number: 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "c1 = 20 #capacity of standby station(MW)\n", - "c2 = 18 #Capacity of base load station(MW)\n", - "E1 = 7.35*10**6 #Annual standby output(kWh)\n", - "E2 = 101.35*10**6 #Annual base load station output(kWh)\n", - "P3 = 12 #peak load on standby station(MW)\n", - "t = 2190 #hours of use by standby station/year\n", - "\n", - "\n", - "#Calculation:\n", - "LF1 = E1/(t*P3*10**3) #Annual load factor of standby station\n", - "PCF1 = E1/(8760*c1*10**3) #Plant capacity factor of standby station\n", - "LF2 = E2/(8760*c2*10**3) #Annual load factor of base load station\n", - "#for base load station,\n", - "PCF2 = LF2 #Plant capacity factor of base load station\n", - "\n", - "#Results:\n", - "print \"Annual load factor of standby station is\",round(LF1*100,1),\"%\"\n", - "print \"Plant capacity factor of standby station is\",round(PCF1*100,1),\"%\"\n", - "print \"Annual load factor of base load station is\",round(LF2*100,1),\"%\"\n", - "print \"Plant capacity factor of base load station is\",round(PCF2*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual load factor of standby station is 28.0 %\n", - "Plant capacity factor of standby station is 4.2 %\n", - "Annual load factor of base load station is 64.3 %\n", - "Plant capacity factor of base load station is 64.3 %\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.21, Page Number: 64" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "M = 60000 #maximum load of hydro plant(kW)\n", - "m = 20000 #minimum load of hydro pland(kW)\n", - "P = 50000 #peak load of plant per day(kW)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let OE = Capacity of steam plant\n", - "#EC = Capacity of hydro plant\n", - "x,y = symbols('x,y') #two variables as indicated in given curve\n", - "# As steam electric conversion is 60%,\n", - "#\u2234 Area HEFI = 0\u00b76 \u00d7 Area FGB ... (i)\n", - "#But Area HEFI = Area CFE \u2212 Area CHI\n", - "# = 1/2*(x*y-50000)\n", - "# Now Area FGB = 1/2*(FG*GB) = 1/2*(24-x)*(40000-y)\n", - "# or 0.2*x*y + 12000*x + 7.2*y \u2212 338000 = 0\n", - "#Also from similar triangles CEF and CDB, we get,\n", - "# y/40000 = x/24\n", - "y = x/24*40000\n", - "x1 = round(solve(0.2*x*y + 12000*x + 7.2*y-338000,x)[1])\n", - "y1 = x1/24*40000\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Capacity of the hydro plant is\",y1,\"kW\"\n", - "print \"Capacity of the steam plant is\",60000-y1,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacity of the hydro plant is 20000.0 kW\n", - "Capacity of the steam plant is 40000.0 kW\n" - ] - } - ], - "prompt_number": 32 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 3.22, Page Number: 65" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "#Suppose the maximum demand of reservoir plant is y MW and it \n", - "#operates for x hours\n", - "x,y = symbols('x y')\n", - "\n", - "\n", - "#Calculation:\n", - "E = 10**3*(1/2*(320+160)*8760) #Units generated/annum\n", - "#As the steam plant, run-of-river plant and hydro plant generate \n", - "#units in the ratio of 7 : 4 : 1, so, units generated by \n", - "#each plant are:\n", - "\n", - "E1 = E*7/12 #by steam plant\n", - "E2 = E*4/12 #by run-of-river plant\n", - "E3 = E/1/12 #by reservoir plant\n", - "\n", - "#(i) Maximum demand on run-of-river plant = Area OEBA/OA\n", - "M2 = 700.8*10**6/8760 #kW\n", - "\n", - "#Now,\n", - "x = 8760*y/160\n", - "E33 = 10**3*1/2*(x*y)\n", - "#But the units generated by reservoir plant are E3 kWh\n", - "y1 = solve(E33-E3,y)[1]\n", - "M3 = y1 #maximum demand on reservoir station(MW)\n", - "M1 = 320-80-M2/1000 #Maximum demand on steam station(MW)\n", - "LF2 = 100 #load factor of river plant(%), because it acts \n", - " #as a base station.\n", - "\n", - "LF1 = E1*100/(M1*1000*8760) #load factor of of run-of-river plant(%)\n", - "LF3 = E3*100/(M3*1000*8760) #load factor of reservoir plant(%)\n", - "\n", - " \n", - "\n", - "#Result:\n", - "print \"(i)Maximum demand on run-of-river plant is\",round(M1),\"MW\"\n", - "print \" Maximum demand on steam station is\",round(M2),\"MW\"\n", - "print \" Maximum demand on reservoir station is\",round(y1),\"MW\"\n", - "print \"\\n(ii)Load factor of steam plant plant is\",LF1,\"%\"\n", - "print \" Load factor of of run-of-river plant is\",LF2,\"%\"\n", - "print \" Load factor of of reservoir plant is\",round(LF3),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)Maximum demand on run-of-river plant is 160.0 MW\n", - " Maximum demand on steam station is 80000.0 MW\n", - " Maximum demand on reservoir station is 80.0 MW\n", - "\n", - "(ii)Load factor of steam plant plant is 87.5 %\n", - " Load factor of of run-of-river plant is 100 %\n", - " Load factor of of reservoir plant is 25.0 %\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter4_1.ipynb b/Principles_of_Power_System/chapter4_1.ipynb deleted file mode 100644 index c67cf3f8..00000000 --- a/Principles_of_Power_System/chapter4_1.ipynb +++ /dev/null @@ -1,873 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:674aadd4593cd639b4637a0cb17a9ace907a7cf82297146653a75d9ee7f7f19b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4: Economics of Power Generation" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.1, Page Number: 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable Declaration:\n", - "P = 90000 #initial cost of transformer(Rs)\n", - "n = 20 #20 years\n", - "S = 10000 #Salvage value(Rs)\n", - "\n", - "#Calculation:\n", - "D = (P-S)/n #Annual depreciation charge(Rs)\n", - "\n", - "print \"The annual depreciation charge is Rs\",D" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual depreciation charge is Rs 4000.0\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.2, Page Number: 74" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration\n", - "P = 200000 #Initial cost of transformer(Rs)\n", - "S = 10000 #Salvage value of transformer(Rs)\n", - "n = 20 #Useful life(years)\n", - "r = 0.08 #annual interest rate(%)\n", - "\n", - "#Calculation:\n", - "q = (P-S)*r/(((1+r)**n)-1) #Annual payment(Rs)\n", - "\n", - "#Results:\n", - "print \"The annual amount to be saved is Rs\",round(q)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual amount to be saved is Rs 4152.0\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.3, Page Number: 75" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "P = 1560000 #Initial cost of equipment(Rs)\n", - "S = 60000 #salvage value of equipment(Rs)\n", - "n = 25 #useful life(years)\n", - "t = 20 #years\n", - "#Calculation:\n", - "\n", - "#(i) Straight line method:\n", - "D1 = (P-S)/n #Annual depreciation(Rs)\n", - "V1 = P-D1*t #Value of equipment after 't' years\n", - "\n", - "#(ii)Diminishing value method:\n", - "D2 = 1-(S/P)**(1/n) #Annual unit depreciation(Rs)\n", - "V2 = P*(1-round(D2,3))**t #Value of equipment after 't' years\n", - "\n", - "#(iii)Sinking fund method:\n", - "r = 0.05 #rate of interest\n", - "q = (P-S)*(r/((1+r)**n-1)) #Annual deposit in the sinking fund(Rs)\n", - "q1 = 31433*(((1+r)**20-1)/r) #Sinking fund at the end of 20 years(Rs)\n", - "V = P-q1 #Value of plant after 20 years(Rs)\n", - "\n", - "#Results:\n", - "print \"The depreciated values using:\"\n", - "print \"(i) Straight line method: Rs\",V1\n", - "print \"(ii)Diminishing value method Rs:\",round(V2)\n", - "print \"(iii)Sinking fund method: Rs\",round(V)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The depreciated values using:\n", - "(i) Straight line method: Rs 360000.0\n", - "(ii)Diminishing value method Rs: 115615.0\n", - "(iii)Sinking fund method: Rs 520638.0\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.4, Page Number: 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 50000 #Max demand(kW)\n", - "CC = 95*10**6 #Capital cost(Rs)\n", - "LF = 0.4 #annual load factor\n", - "C1 = 9*10**6 #Annual cost of fuel and oil(Rs)\n", - "C2 = 7.5*10**6 #taxes wages salaries etc(Rs)\n", - "i = 12 #interest & depreciation(%)\n", - "\n", - "\n", - "#Calculation:\n", - "E = M*LF*8760 #units generated(kWh/year)\n", - "AFC = i*CC/100 #Annual fixed charges(Rs)\n", - "T = C1+C2 #Total annual running charges(Rs)\n", - "TAC = AFC+T #Total annual charges(Rs)\n", - "c = TAC/E #cost per unit(Rs)\n", - "\n", - "#Results:\n", - "print \"Cost per unit generated = \",round(c,2)*100,\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cost per unit generated = 16.0 paise\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.5, Page Number: 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "C = 50000 #Installed capacity(kW)\n", - "E = 220*10**6 #units generated(kWh/year)\n", - "AFC1 = 160 #annual fixed charges per kW of C(Rs/kW)\n", - "RC = 0.04 #running charges(Rs)\n", - "\n", - "\n", - "#Calculation:\n", - "AFC = AFC1*C #annual fixed charges(Rs)\n", - "ARC = RC*E #annual running charges(Rs)\n", - "c = (AFC+ARC)/E #cost per unit(Rs)\n", - "\n", - "#Results:\n", - "print \"Cost per unit generated is \",round(c,4)*100,\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cost per unit generated is 7.64 paise\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.6, Page Number: 76" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "C = 160000 #cost of plant(Rs)\n", - "r = 12 #annual fixed charges(%)\n", - "r1 = 5 #interest(%)\n", - "r2 = 5 #depreciation(%)\n", - "r3 = 2 #taxes(%)\n", - "M = 100 #max demand(kW)\n", - "\n", - "\n", - "#Calculation:\n", - "AFC = C*r/100 #annual fixed charges(Rs)\n", - "\n", - "#(i)when load factor is 100%\n", - "E1 = M*1*8760 #kWh/year\n", - "c1 = AFC/E1 #Rs\n", - "\n", - "#(i)when load factor is 50%\n", - "E2 = M*0.5*8760 #kWh/year\n", - "c2 = AFC/E2 #Rs\n", - "\n", - "\n", - "#Results:\n", - "print \"Fixed charges when:\"\n", - "print \"(i) load factor is 100% :\",round(c1*100,2),\"paise\"\n", - "print \"(ii)load factor is 50% :\",round(c2*100,2),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Fixed charges when:\n", - "(i) load factor is 100% : 2.19 paise\n", - "(ii)load factor is 50% : 4.38 paise\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.7, Page Number: 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "PC = 50 #plant capacity(MW)\n", - "LF = 0.4 #annual load factor\n", - "C1 = 1.2*10**7 #capital cost(Rs)\n", - "C2 = 4*10**5 #annual cost of wages, taxation etc.(Rs)\n", - "C3 = 1.0 #cost of fuel,lubrication, maintenance etc.(paise/kWh)\n", - "r1 = 5 #interest rate(%)\n", - "r2 = 6 #depreciation(%)\n", - "\n", - "\n", - "#Calculation:\n", - "T1 = (C1*(r1+r2)/100)+C2 #Total annual fixed charges(Rs)\n", - "E = PC*10**3*LF*8760 #units generated(kWh/year)\n", - "C4 = E*C3/100 #Cost of fuel, lubrication etc.(Rs)\n", - "T = T1+C4 #total annual charges(Rs)\n", - "c = T/E #generating cost(Rs/kWh)\n", - "\n", - "\n", - "#Results:\n", - "print \"Cost per kWh is \",round(c*100),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cost per kWh is 2.0 paise\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.8, Page Number: 77" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "PC = 300 #plant capacity(MW)\n", - "CF = 0.5 #capacity factor\n", - "LF = 0.6 #annual load factor\n", - "C1 = 9*10**7 #Annual cost of fuel, oil etc(Rs)\n", - "C2 = 10**9 #capital cost(Rs)\n", - "r1 = 10 #annual interest and depreciation(%)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "L = CF*PC #avg load(MW)\n", - "M = L/LF #max demand(MW)\n", - "RC = PC-M #Reserve capacity(MW)\n", - "TC = C1+C2*r1/100 #total cost(Rs)\n", - "E = L*10**3*8760 #units generated(kWh/year)\n", - "c = TC/E #cost per kWh\n", - "\n", - "#Results:\n", - "print \"The minimum reserve capacity of the station is\",RC,\"MW\"\n", - "print \"Cost per kWh generated is \",round(c*100),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The minimum reserve capacity of the station is 50.0 MW\n", - "Cost per kWh generated is 14.0 paise\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.9, Page Number: 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "#Variable declaration:\n", - "PC = 50 #plant capacity(MW)\n", - "CC = 1000 #capital cost(Rs/kW)\n", - "r1 = 10 #annual depreciation charges(%)\n", - "r2 = 20 #part of salaries, maitenance to fixed charges(%)\n", - "M = 40 #max demand(MW)\n", - "LF = 0.60 #load factor\n", - "C1 = 700000 #Annual cost of salaries, maintenance charges etc.(Rs)\n", - "R1 = 1 #royalty(Re/(kW*year))\n", - "R2 = 0.01 #royalty paid for using the river water for generation(Re/kWh)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#for annual fixed cost\n", - "E = M*10**3*LF*8760 #kWh/year\n", - "C = CC*PC*10**3 #capital cost(Rs)\n", - "T1 = r1*C/100+r2*C1/100 #total annual fixed charges(Rs)\n", - "\n", - "C2 = T1/(M*10**3)+R1 #Cost per kW(Rs)\n", - "\n", - "#for running cost:\n", - "C3 = ((1-r2/100)*C1)/E+R2 #Cost per kW(Rs)\n", - "\n", - "\n", - "#Results:\n", - "print \"Total generation cost in two part form is given by:\"\n", - "print \"Rs (\",C2,\"* kW +\",round(C3,4),\"* kWh)\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total generation cost in two part form is given by:\n", - "Rs ( 129.5 * kW + 0.0127 * kWh)\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.10, Page Number: 78" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 60 #plant capacity(MW)\n", - "LF = 0.5 #load factor\n", - "C1 = 5*10**6 #capital cost of building and equipment(Rs)\n", - "C2 = 900000 #annual cost of fuel,oil,taxation and wages(Rs)\n", - "r1 = 10 #interest and depreciation(%)\n", - "C3 = 5000000 #annual cost of organisation and \n", - " #interest on cost of site etc.\n", - "\n", - "#Calculation:\n", - "E = M*10**3*LF*8760 #kWh/year\n", - "a = C3 #Rs\n", - "T2 = r1*C3/100 #Annual semi-fixed cost(Rs)\n", - "b = T2/(M*10**3) #cost per kW\n", - "c = C2/E #cost per kWh\n", - "\n", - "#Results:\n", - "print \"The required values are:\"\n", - "print \"a = Rs\",a,\", b = \",round(b,2),\", c = Re\",round(c,4)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The required values are:\n", - "a = Rs 5000000 , b = 8.33 , c = Re 0.0034\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.11, Page Number: 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "PC = 100 #installed capacity(kW)\n", - "CC = 3000 #plant cost(Rs/kW of PC)\n", - "r1 = 5 #interest(%)\n", - "r2 = 2 #depreciation(2%)\n", - "r3 = 2 #operation & maintenance(%)\n", - "r4 = 1.5 #insurance, rent(%)\n", - "r = 12.5 #losses in transmission and distribution(%)\n", - "DF = 1.25 #diversity factor\n", - "LF = 0.4 #load factor\n", - "M = 0.8*PC #max demand(kW)\n", - "\n", - "\n", - "#Calculation:\n", - "L = M*LF #avg demand(kW)\n", - "C1 = CC*PC #Capital cost(Rs)\n", - "T1 = (r1+r2)*C1/100 #annual fixed charges(Rs)\n", - "T11 = T1/(DF*M) #annual fixed charges(Rs/kW)\n", - "RC = C1*(r3+r4)/100 #annual running charges(Rs)\n", - "E = L*8760 #kWh/year\n", - "E1 = E*(1-r/100) #units reaching the consumer(kWh)\n", - "RC1 = RC/E1 #annual running charges(Rs/kWh)\n", - "T = T1+RC #total charges(Rs)\n", - "C2 = T/E1 #cost per kWh(Rs)\n", - "\n", - "#Results:\n", - "print \"Total generation cost in two part form is given by:\"\n", - "print \"Rs (\",T11,\"* kW +\",round(RC1,3),\"* kWh)\"\n", - "print \"Overall cost of generation per kWh is \",round(C2*100,1),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total generation cost in two part form is given by:\n", - "Rs ( 210.0 * kW + 0.043 * kWh)\n", - "Overall cost of generation per kWh is 12.8 paise\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.12, Page Number: 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#variable declaration:\n", - "M = 1000 #max demand(kW)\n", - "LF = 0.5 #load factor\n", - "#for (i)a private oil engine generating plant:\n", - "\n", - "CC1 = 12*10**5 #capital cost(Rs)\n", - "c1 = 0.005 #Cost of repair and maintenance(Rs/kWh)\n", - "c2 = 1600 #Cost of fuel(Rs/1000kg)\n", - "r1 = 10 #Interest and depreciation (%)\n", - "w = 0.3 #fuel consumption(kg/kWh)\n", - "c3 = 50000 #wages(Rs)\n", - "\n", - "#for (i)Public supply company:\n", - "#Rs 150 per kW of maximum demand plus 15 paise per kWh\n", - "\n", - "\n", - "#Calculation:\n", - "E = M*LF*8760 #kWh/year\n", - "\n", - "#for(i) Private oil engine generating plant:\n", - "W = w*E #annual fuel consumption(kg)\n", - "C1= W*c2/1000 #cost of fuel(Rs)\n", - "T1 = C1+c1*E+r1*CC1/100+c3 #total annual cost(Rs)\n", - "\n", - "#for(ii)Public supply company:\n", - "T2 = 150*M+.15*E #total annual cost(Rs)\n", - "\n", - "\n", - "#Results:\n", - "print \"(i)For Private oil engine generating plant,\" \n", - "print \" total annual charges is Rs\",T1\n", - "print \"(ii)Public supply company, total annual charges is Rs\",T2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)For Private oil engine generating plant,\n", - " total annual charges is Rs 2294300.0\n", - "(ii)Public supply company, total annual charges is Rs 807000.0\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - " Example 4.13, Page Number: 80" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "LF = 0.3 #load factor\n", - "M = 100 #max demand(MW)\n", - "\n", - "#steam: \n", - "cc1 = 1250 # Capital cost/kW installed(Rs)\n", - "r11 = 12 # Interest and depreciation(%)\n", - "c11 = 5 # Operating cost/kWh, paise\n", - "tc11 = 0 # Transmission cost/kWh\n", - "\n", - "#hydro:\n", - "cc2 = 2500 # Capital cost/kW installed(Rs)\n", - "r21 = 10 # Interest and depreciation(%)\n", - "c21 = 1.5 # Operating cost/kWh,paise\n", - "tc21 = 0.2 # Transmission cost/kWh,paise\n", - "\n", - "\n", - "#Calculation:\n", - "E = M*LF*8760*10**3 #kWh/year\n", - "\n", - "#(i)steam station in conjunction with a hydro station:\n", - "Eh = 100*10**6 #units supplied by hydro station(kWh)\n", - "Es = E-Eh #units supplied by steam station(kWh)\n", - "Pmh = 40 #max o/p of hydro stn.(MW)\n", - "Pms = 60 #max o/p of steam stn(MW)\n", - "\n", - "#(i)(a)for steam station:\n", - "Cs1 = cc1*Pms*10**3 #capital cost(Rs)\n", - "Ts1 = r11*Cs1/100+c11*Es/100+0 #total cost(Rs)\n", - "\n", - "# (b)for hydro station:\n", - "Ch1 = cc2*Pmh*10**3 #capital cost(Rs)\n", - "Th1 = r21*Ch1/100+c21*Eh/100+tc21*Eh/100 #total cost(Rs)\n", - "\n", - "Ta = Ts1+Th1 #total annual cost(Rs)\n", - "OC1 = Ta/E #kWh\n", - "\n", - "\n", - "\n", - "#(ii)Steam station:\n", - "Pm2 = 100*10**3 #max o/p of steam plant(kW)\n", - "Cs2 = cc1*Pm2 #capital cost(Rs)\n", - "Ts2 = (Cs2*r11/100)+c11*E/100 #Rs\n", - "OC2 = Ts2/E #overall cost(Rs)\n", - "\n", - "#(iii)Hydro station:\n", - "Ch3 = cc2*Pm2 #capital cost(Rs)\n", - "Th3 = Ch3*r21/100+c21*E/100 #Rs\n", - "OC3 = Th3/E+tc21/100 ##overall cost(Rs)\n", - "\n", - "#Results:\n", - "print \"(i)steam station in conjunction with a hydro station:\"\n", - "print \" for steam stn., overall cost is \",round(OC1*100,2),\"paise\"\n", - "print \"(ii) Steam station, overall cost is \",round(OC2*100,2),\"paise\"\n", - "print \"(ii) Hydro station, overall cost is \",round(OC3*100,2),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)steam station in conjunction with a hydro station:\n", - " for steam stn., overall cost is 10.97 paise\n", - "(ii) Steam station, overall cost is 10.71 paise\n", - "(ii) Hydro station, overall cost is 11.21 paise\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.14, Page Number: 81" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "M = 150*10**3 #maximum demand(kW)\n", - "\n", - "#Steam plant:\n", - "cc1 = 1600 #Rs/kW\n", - "oc1 = 0.06 #operating cost(Rs/kWh)\n", - "r1 = 7 #interest(%)\n", - "\n", - "#Hydro plant:\n", - "cc2 = 3000 #Rs/kW\n", - "oc2 = 0.03 #operating cost(Rs/kWh)\n", - "r2 = 7 #interest(%)\n", - "\n", - "\n", - "#Calculation:\n", - "x = symbols('x') #total no. of units generated\n", - "#for steam plant:\n", - "cs = cc1*M #capital cost(Rs)\n", - "Ts = r1*cs/(x*100)+oc1 #total cost(Rs)\n", - "Ts1 = Ts #Rs/kWh\n", - "\n", - "#for hydro plant:\n", - "ch = cc2*M #capital cost(Rs)\n", - "Th = r2*ch/(100*x)+oc2 #total cost(Rs)\n", - "Th1 = Th #Rs/kWh\n", - "L = solve(Ts1-Th1,x)\n", - "LF = (L[0])/(M*8760)\n", - "\n", - "print \"Load factor is \",round(LF*100,1),\"%\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load factor is 37.3 %\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.15, Page Number: 82" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Eo = 40*10**6 #units needed to generate\n", - "\n", - "#Hydro Steam\n", - "cc1 = 2100; cc2 = 1200 #Capital cost(Rs/kW) \n", - "rc1 = 3.2; rc2 = 5 #Running cost(paise/kWh) \n", - "r1 = 7.5; r2 = 9 #Interest & depreciation(%)\n", - "RC1 = 33; RC2 = 25 #Reserve capacity(%)\n", - "\n", - "\n", - "#Calculation:\n", - "#Let x kW be the maximum demand. \n", - "#Let y be the annual load factor at which cost/unit\n", - "#of steam and hydro stations is the same.\n", - "\n", - "x,y = symbols('x y')\n", - "E = x*y*8760 #units generated per annum(kWh)\n", - "C2 = x+RC2*x/100 #installed capacity of steam station(kW)\n", - "C1 = x+RC1*x/100 #installed capacity of hydro station(kW)\n", - "\n", - "#steam station:\n", - "CC2 = cc2*C2 #capital cost(Rs)\n", - "OC2 = (r2*CC2/100+rc2*E/100)/E #Overall cost/kWh\n", - "\n", - "#hydro station:\n", - "CC1 = cc1*C1 #capital cost(Rs)\n", - "OC1 = (r1*CC1/100+rc1*E/100)/E #Overall cost/kWh\n", - "\n", - "LF = solve(OC1-OC2,y)[0] #load factor\n", - "E2 = 8760*x*LF #kWh\n", - "M = solve(E2-Eo,x)[0] #max. demand(kW)\n", - "C = (135*M + 438*M*LF) #cost of generation(Rs)\n", - "\n", - "#Results\n", - "print \"Load factor is \",round(LF*100,2),\"%\"\n", - "print \"Required cost of generation is Rs (\",round(C/10**6,1),\"* 10**6 )\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Load factor is 47.23 %\n", - "Required cost of generation is Rs ( 3.3 * 10**6 )\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 4.16, Page Number: 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "\n", - "#Let x = Installed capacity of station B in kW\n", - "#y = Hours of operation of station B\n", - "\n", - "x,y = symbols('x y')\n", - "M = 50000 #max demand(kW)\n", - "\n", - "\n", - "#Calculation:\n", - "PCa = M-x #installed capacity of stationA(kW)\n", - "Eb = (1/2)*x*(8760*x/M) #Units generated/annum by station B\n", - "Ea = (1/2)*8760*M-Eb #Units generated/annum by station A\n", - "Cb = 50000+50*x+0.03*Eb #Rs\n", - "Ca = 75000+80*(50000-x)+0.02*Ea #Rs\n", - "C = Ca+Cb #total operating cost(Rs)\n", - "#After differentiating C w.r.t x, we get C1 as\n", - "C1 = -30+0.00174*x\n", - "x1 = solve(C1,x)[0]\n", - "\n", - "PCb = x1 #kW\n", - "PCa = M-PCb #kW\n", - "t = 8760*PCb/M #hours of operation of station B\n", - "\n", - "#Results:\n", - "print \"Installed capacity of station A is \",round(PCa),\"MW\"\n", - "print \"Installed capacity of station B is \",round(PCb),\"MW\"\n", - "print \"No. of hours of operation of plant B is\",round(t/10)*10,\"hrs\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Installed capacity of station A is 32759.0 MW\n", - "Installed capacity of station B is 17241.0 MW\n", - "No. of hours of operation of plant B is 3020.0 hrs\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter5_1.ipynb b/Principles_of_Power_System/chapter5_1.ipynb deleted file mode 100644 index 195b1538..00000000 --- a/Principles_of_Power_System/chapter5_1.ipynb +++ /dev/null @@ -1,762 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:95fdfaa4e5e5dbdce2d60b65f4e1e462efff574f2746529cb62b6b5d733a0dc4" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5: Tariff" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.1, Page Number: 91" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 200 #max demand(kW)\n", - "LF = 0.4 #load factor\n", - "c1 = 100 #tarif(Rs/kW)\n", - "c2 = 10 #tariff(pais/kWh)\n", - "\n", - "#Calculation:\n", - "E = M*LF*8760 #units consumed/year\n", - "T = c1*M+E*c2/100 #annual charges(Rs)\n", - "OC = T/E #overall cost(Rs/kWh)\n", - "\n", - "#Results:\n", - "print \"Overall cost per kWh is \",round(OC*100,2),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Overall cost per kWh is 12.85 paise\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.2, Page Number: 91" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V = 220 #voltage(V)\n", - "I = 20 #current(A)\n", - "E = 8760 #kWh\n", - "c1 = 20 #tariff part1(paise/unit for 500hrs)\n", - "c2 = 10 #tariff part2 for additional unit(paise/unit)\n", - "\n", - "\n", - "#Calculation:\n", - "#assuming power factor to be unity.\n", - "M = V*I/1000 #max demand(kW)\n", - "\n", - "#part (i):\n", - "E1 = M*500 #kWh\n", - "C1 = c1*E1/100 #Rs\n", - "E2 = E-E1 #kWh\n", - "C2 = 10*E2/100 #kWh\n", - "T = C1+C2 #total annual bill(Rs)\n", - "T2 = T/E #equivalent flat rate(Rs/kWh)\n", - "\n", - "#Results:\n", - "print \"(i) Annual bill is Rs\",T\n", - "print \"(ii)Eqv flat rate is \",round(T2*100,1),\"paise\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Annual bill is Rs 1096.0\n", - "(ii)Eqv flat rate is 12.5 paise\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.3, Page Number: 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "\n", - "#for tariff (a):\n", - "c1 = 100 #tariff part1(Rs)\n", - "c11 = 15 #tariff part2(paise/kWh)\n", - "\n", - "#for tariff (b):\n", - "c2 = 30 #paise/kWh\n", - "\n", - "#Calculation:\n", - "#Let x be the number of units at which charges \n", - "#due to both tariffs become equal.\n", - "\n", - "x = symbols('x')\n", - "x1 = solve(c1+c11*x/100 - c2*x/100 , x)[0]\n", - "\n", - "#Results:\n", - "print \"Tariff(a) is economical if consumption is more than\",round(float(x1),2),\"units.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Tariff(a) is economical if consumption is more than 666.67 units.\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.4, Page Number: 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "#for 1t tariff:\n", - "c11 = 30 #Rs/annum\n", - "c12 = 3 #paise/unit\n", - "\n", - "#for 2nd tariff:\n", - "c21 = 6 #paise/unit for 1st 400 units\n", - "c22 = 5 #paise/unit for extra units\n", - "\n", - "#Calculation:\n", - "#Let x (> 400) be the number of units taken per annum \n", - "#for which the annual charges due to both tariffs become equal.\n", - "\n", - "x=symbols('x')\n", - "T1 = c11+c12*x/100 #charges due to 1st tariff(Rs)\n", - "T2 = c21*400/100+c22*(x-400)/100 #charges due to 2nd tariff(Rs)\n", - "x1 = solve(T1-T2,x)[0]\n", - "\n", - "#Results:\n", - "print \"Required no. of units are \",round(x1),\"kWh\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required no. of units are 1300.0 kWh\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.5, Page Number: 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 50 #max load on the station(MW)\n", - "AD = 75 #aggregate demand by consumers(MW)\n", - "E = 18*10**7 #units/annum\n", - "\n", - "#for annual fixed charges:\n", - "c11 = 28*10**5 #for generation(Rs)\n", - "c12 = 32*10**5 #for transmission & distribution(Rs)\n", - "c13 = 90*10**5 #for fuel(Rs)\n", - "\n", - "#for running charges:\n", - "c21 = 0.9*90*10**5 #fuel cost(Rs)\n", - "r = 85 #% of power transmitted\n", - "\n", - "\n", - "#Calculation:\n", - "T1 = c11+c12+c13*0.1 #10% of fuel used for fixed charges(Rs)\n", - "C1 = T1/(AD*10**3) #Rs/kW\n", - "\n", - "\n", - "E1 = r*E/100 #units delivered to consumers\n", - "C2 = c21/E1 #cost per kWh\n", - "\n", - "#Results:\n", - "print \"Tariff is\",C1 ,\"Rs/kW of maximum demand plus\",round(C2*100,1),\"paise per kWh.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Tariff is 92.0 Rs/kW of maximum demand plus 5.3 paise per kWh.\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.6, Page Number: 93" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "M = 75*10**3 #Max emand(kW)\n", - "LF = 0.4 #load factor\n", - "\n", - "c1 = 60 #1st part of generating cost(Rs/kW)\n", - "c2 = 4 #2nd part of generating cost(paise/kW)\n", - "\n", - "CT = 2000000 #annual capital charges for transmission system(Rs)\n", - "CD = 1500000 #annual capital charges for distribution system(Rs)\n", - "\n", - "dt = 1.2 #diversity factor of tr. system\n", - "dd = 1.25 #diversity factor of tr. system\n", - "\n", - "nt = 0.9 #efficiency of tr system\n", - "nd = 0.85 ##efficiency of distribution system\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) Cost at substation:\n", - "#(a)Annual fixed charges:\n", - "\n", - "Tafc1 = c1*M+CT #total annual fixed cost(Rs)\n", - "S1 = M*dt #sum of all the max demands(kW)\n", - "AC1 = Tafc1/S1 #Annual cost per kW of max. demand(Rs)\n", - "\n", - "#(b) Running Charges:\n", - "Cs1 = c2/nt #Cost/kWh at substation(paise)\n", - "\n", - "#(ii) Cost at consumer\u2019s premises:\n", - "Tafc2 = Tafc1+CD #Total annual fixed charges at consumer\u2019s premises(Rs)\n", - "S2 = S1*dd #sum of of maximum demands of all consumers(kW)\n", - "AC2 = Tafc2/S2 #Annual cost per kW of maximum demand(Rs)\n", - "#As the distribution efficiency is 85%, therefore, for each kWh delivered from\n", - "#substation, only 0\u00b785 kWh reaches the consumer\u2019s premises\n", - "Cs2 = Cs1/nd #Cost/kWh at consumer premises(paise)\n", - "\n", - "#Result:\n", - "print \"(i)At sub-station, the cost is Rs\",round(AC1,2),\"per annum per kW maximum demand \"\n", - "print \" plus\",round(Cs1,2),\"paise per kWh\"\n", - "print \"\\n(ii)At consumer\u2019s premises, the cost is\",round(AC2,2),\"per annum per kW maximum demand\"\n", - "print \" plus\",round(Cs2,2),\"paise per kWh.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)At sub-station, the cost is Rs 72.22 per annum per kW maximum demand \n", - " plus 4.44 paise per kWh\n", - "\n", - "(ii)At consumer\u2019s premises, the cost is 71.11 per annum per kW maximum demand\n", - " plus 5.23 paise per kWh.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.7, Page Number: 94" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "# Fixed charges Running charges #Station \n", - "# (per kW) (paise/kWh)\n", - "Cf1 = 300; Cr1 = 25 #Diesel \n", - "Cf2 = 1200; Cr2 = 6.25 #Steam \n", - "\n", - "\n", - "#Calculation:\n", - "#Suppose energy supplied in one year is 100 units i.e., 100 kWh.\n", - "\n", - "#Diesel Station:\n", - "L = symbols('L') #load factor\n", - "E = 100 #kWh(say)\n", - "P = E/8760 #avg power, kW\n", - "M = P/L #max deamnd(kW)\n", - "C1 = Cf1*M+E*Cr1/100 #Fixed and running charges for 100 kWh\n", - "\n", - "#Steam station\n", - "C2 = Cf2*M+E*Cr2/100 #Fixed and running charges for 100 kWh\n", - "\n", - "L1 = solve(C1-C2,L)[0]\n", - "\n", - "#Result:\n", - "print \"The load fctor is \",round(L1*100,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The load fctor is 54.79 %\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.8, Page Number: 95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 100 #max demand(kW)\n", - "LF = 0.6 #load factor\n", - "pf = 0.8 #power factor\n", - "c1 = 75 #1st part tariff(Rs/kVA)\n", - "c2 = 15 #2nd part tariff(paise/kWh)\n", - "\n", - "#Calculation:\n", - "E = M*LF*8760 #units consumed/year\n", - "M1 = M/pf #max demand in kVA\n", - "AB = M1*c1+E*c2/100 #annual bill(Rs)\n", - "\n", - "#Result:\n", - "print \"Annual bill is Rs\",AB" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual bill is Rs 88215.0\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.9, Page Number: 95" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "M = 240 #max load(kW)\n", - "pf = 0.8 #power factor\n", - "E = 50000 #annual units consumption(kW)\n", - "c1 = 50 #1st part tariff(Rs/KVA)\n", - "c2 = 10 #2nd part tariff(paise/unit)\n", - "\n", - "#Calculation:\n", - "M1 = M/pf #KVA\n", - "AB = M1*c1+E*c2/100 #annual bill(Rs)\n", - "FR = AB/E #Rs\n", - "\n", - "#now\n", - "pf1 = 1\n", - "M2 = M\n", - "AB1 = M2*c1+E*c2/100 #Rs\n", - "S = AB-AB1 #annual saving(Rs)\n", - "\n", - "#Result:\n", - "print \"Flat rate of energy consumption is \",FR*100,\"paise\"\n", - "print \"Annual saving is Rs\",S" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Flat rate of energy consumption is 40.0 paise\n", - "Annual saving is Rs 3000.0\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.10, Page Number: 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "M = 50 #max demand(kW)\n", - "E = 36000 #energy consume(kWh)\n", - "R = 23400 #reactive power(KVAR)\n", - "c1 = 80 #1st part tariff(Rs/kW)\n", - "c2 = 8 #2nd part tariff(paise/unit)\n", - "c3 = 0.5 #3rd part tariff(p/kWh)for each 1% of pf below 86%\n", - "\n", - "#Calculation:\n", - "L = E/(24*30) #avg load(kW)\n", - "RP = R/(24*30) #avg reactive power(kVAR)\n", - "\n", - "theta = math.atan(RP/L) #power factor angle\n", - "pf = math.cos(theta) \n", - "PFS = E*c3*(0.86-pf) #power factor surcharge(Rs)\n", - "MB = c1*L+c2*E/100+PFS #monthly bill(Rs)\n", - "\n", - "\n", - "#Result:\n", - "print \"The monthly bill is Rs\",round(MB,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The monthly bill is Rs 7268.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.11, Page Number: 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "c1 = 150 #1st part tariff(Rs/KVA)\n", - "c2 = 8 #2nd part tariff(paise/unit)\n", - "LF = 0.3 #load factor\n", - "\n", - "\n", - "#Calculation:\n", - "#suppose max demand is 1kVA\n", - "\n", - "#(i)When p.f. is unity:\n", - "pf = 1\n", - "OC1 = c1*100/(8760*LF)+c2 #operating cost(Rs)\n", - "\n", - "#(ii) When p.f. is 0\u00b77\n", - "pf1 = 0.7\n", - "OC2 = c1*100/(8760*LF*pf1)+c2 #operating cost(Rs)\n", - "\n", - "#Result:\n", - "print \"At unity p. f., overall cost is Rs\",round(OC1,2)\n", - "print \"At 0.7 p. f., overall cost is Rs\",round(OC2,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "At unity p. f., overall cost is Rs 13.71\n", - "At 0.7 p. f., overall cost is Rs 16.15\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.12, Page Number: 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#variable declaration\n", - "L = 200 #avg load(kW)\n", - "pf = 0.8 #power factor\n", - "M = 250 #max demand(kW)\n", - "l = 4 #losses(%)\n", - "r = 12 #interest & depreciation(%)\n", - "C = 50 #high voltage equipment cost(Rs)\n", - "t = 8 #working hours\n", - "n = 300 #no. of working working\n", - "\n", - "#for system(i)high voltage supply:\n", - "c11 = 5 #1st part tariff(paise/unit)\n", - "c12 = 4.50 #2nd part tariff(per month per kVA)\n", - "\n", - "#for system(ii)low voltage supply:\n", - "c21 = 5.5 #1st part tariff(paise/unit)\n", - "c22 = 5 #2nd part tariff(Rs per month per kVA)\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) High voltage supply:\n", - "\n", - "M1 = M/pf #Max. demand in kVA\n", - "#As the losses in h.v. equipment are 4%, therefore, \n", - "#capacity of h.v. equipment:\n", - "Cap = round(M1/(1-l/100),1) #capacity of h.v. equipment(kVA)\n", - "C1 = C*Cap #Capital investment on h.v. equipment(Rs)\n", - "E1 = L*t*n/(1-l/100) #units consumed(kWh)\n", - "T1 = C1*r/100+Cap*c12*12+c11*E1/100 #Total annual cost(Rs)\n", - "\n", - "#(i) low voltage supply:\n", - "M2 = M/pf #Max. demand in kVA\n", - "E2 = L*t*n #units consumed(kWh)\n", - "T2 = M2*c22*12+E2*c21/100 #kWh\n", - "\n", - "T = T2 - T1\n", - "\n", - "#Results:\n", - "print \"Difference in the annual costs of two systems is Rs\",T\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Difference in the annual costs of two systems is Rs 620.0\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.13, Page Number: 97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "#(i) Purchasing diesel set:\n", - "M1 = 1000 #kW\n", - "C1 = 400 #Rs/kW\n", - "r1 = 10 #annual interest depreciation(%)\n", - "c11 = 75 #Rs/kW\n", - "c12 = 5 #paise/unit\n", - "\n", - "#(ii) Purchasing from grid supply:\n", - "r1 = 10 #annual interest depreciation(%)\n", - "c21 =120 #Rs/kW\n", - "c22 = 3 #paise/unit\n", - "#after 2 years:\n", - "M2 = 2500 #kW\n", - "E = 5.5*10**6 #units reached\n", - "\n", - "#Calculation:\n", - "#(i) Purchasing diesel set:\n", - "CC = M1*C1 #Rs\n", - "#The present capacity of the station is 2000 kW and the expected\n", - "#maximum demand after two years is 2500 kW.\n", - "P = 2500-2000 #extra power to be generated(kW)\n", - "T1 = CC*r1/100+P*c11+E*c12/100 #total annual cost(Rs)\n", - "\n", - "#(ii) Purchasing from grid supply:\n", - "T2 = P*c21+E*c22/100 #total annual cost(Rs)\n", - "\n", - "\n", - "#Result:\n", - "print \"Alternative (ii) is cheaper by Rs\",T1-T2,\"per annum\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Alternative (ii) is cheaper by Rs 127500.0 per annum\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 5.14, Page Number: 98" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#H.V supply:\n", - "c11 = 70 #1st part tariff(Rs/kVA)\n", - "c12 = 3 #2nd part tariff(paise/kWh)\n", - "\n", - "#L.V supply:\n", - "c21 = 65 #1st part tariff(Rs/kVA)\n", - "c22 = 4 #2nd part tariff(paise/kWh)\n", - "\n", - "c = 50 #cost of transformer & switchgear for HV side(Rs/kVA)\n", - "r1= 2 #transformer losses(%)\n", - "r2 = 15 #annual fixed charges(%) of transformer & switchgear\n", - "n = 6 #no of working hours\n", - "\n", - "#Calculation:\n", - "(x,y) = symbols('x y') #say x = Factory load in kW\n", - " #y = No. of working days above which H.V.\n", - " #supply is cheaper\n", - "#for HV side: \n", - "r = x*round(1/(1-r1/100),4) #rating of transformer & switchgear(kVA)\n", - "E1 = x*y*round(n*1/(1-r1/100),2) #units consumed per annnum\n", - "T11 = x*math.floor(1/(1-r1/100)*c11*100)/100+x*round(1/(1-r1/100)*r2*c/100,2) #total fixed charges(Rs)\n", - "T12 = E1*c12/100 #total running charges(Rs)\n", - "T1 = T11+T12 #total annual charges(Rs)\n", - "\n", - "#for LV side:\n", - "E2 = x*y*n #units consumed per annnum\n", - "T21 = c21*x #total fixed charges(Rs)\n", - "T22 = c22*E2/100 #total running charges(Rs)\n", - "T2 = T21+T22 #total annual charges(Rs)\n", - "y11 = solve(T1-T2,y)[0]\n", - "\n", - "#Result:\n", - "print \"If the factory is run for more than\",math.floor(y11),'days' #the ans. is different from that in book\n", - "print \"then H. V. supply will be cheaper.\" #due to calculation using improper rounding." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "If the factory is run for more than 249.0 days\n", - "then H. V. supply will be cheaper.\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter6_1.ipynb b/Principles_of_Power_System/chapter6_1.ipynb deleted file mode 100644 index a1cd7a3c..00000000 --- a/Principles_of_Power_System/chapter6_1.ipynb +++ /dev/null @@ -1,1112 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:357707f074867e12cc217076fc35399c9b1e6483f5b92a23e0c3be75457e81b5" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 6: Power Factor Improvement" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.1, Page Number: 108" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Variable declaration:\n", - "kW1 = 300\n", - "pf1 = 0.6 #power factor\n", - "pf2 = 1\n", - "\n", - "#Calculation:\n", - "kVA = kW1/pf1\n", - "kW2 = kVA*pf2\n", - "kW = kW2-kW1\n", - "\n", - "#Result:\n", - "print \"Increased power supplied by the alternator is\",kW,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Increased power supplied by the alternator is 200.0 kW\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.2, Page Number: 109" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration:\n", - "V = 400 #rated voltage(V)\n", - "Im = 31.7 #motor curtrent(A)\n", - "pf1 = 0.7 #initial power factor\n", - "pf2 = 0.9 #raised power factor\n", - "f = 50 #Hz\n", - "\n", - "\n", - "#Calculation:\n", - "#Referring to the phasor diagram,\n", - "Ima = Im*pf1 #Active component of Im(A)\n", - "I = Ima/pf2 #total current(A)\n", - "Imr = Im*math.sqrt(1-pf1**2) #Reactive component of Im(A)\n", - "Ir = I*math.sqrt(1-pf2**2) #Reactive component of I(A)\n", - "Ic = Imr-Ir #A\n", - "\n", - "C = Ic/(V*2*math.pi*f)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Required value of capacitor is\",round(C,7),\"uF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required value of capacitor is 9.46e-05 uF\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.3, Page Number: 110" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#(i):\n", - "kW1 = 20\n", - "pf1 = 1\n", - "\n", - "#(ii):\n", - "kW2 = 100\n", - "pf2 = 0.707\n", - "\n", - "#(iii):\n", - "kW3 = 50\n", - "pf3 = 0.9\n", - "\n", - "#Calculation:\n", - "kVA1 = kW1/pf1\n", - "kVA2 = kW2/pf2\n", - "kVA3 = kW3/pf3\n", - "\n", - "kVAR1 = kVA1*0\n", - "kVAR2 = -kVA2*math.sin(math.acos(0.707))\n", - "kVAR3 = kVA3*math.sin(math.acos(0.9))\n", - "\n", - "kW = kW1+kW2+kW3\n", - "kVAR = kVAR1+kVAR2+kVAR3\n", - "kVA = math.sqrt(kW**2+kVAR**2)\n", - "pf = kW/kVA\n", - "\n", - "#Result:\n", - "print \"Total kW is\",kW\n", - "print \"Total kVA is\",round(kVA)\n", - "print \"Power factor is\",round(pf,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total kW is 170\n", - "Total kVA is 186.0\n", - "Power factor is 0.913\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.4, Page Number: 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "pf1 = 0.75 #Original p.f lag\n", - "P = 5 #motor input(kW)\n", - "pf2 = 0.9 #final p.f lag\n", - "\n", - "#Calculation:\n", - "kVAR = P*(math.tan(math.acos(pf1))-math.tan(math.acos(pf2)))\n", - "R = kVAR/3\n", - "\n", - "#Result:\n", - "print \"Rating of capacitors is\",round(R,3),\"kVAR\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rating of capacitors is 0.663 kVAR\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.5, Page Number: 111" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Vph = 400 #rated voltage(V)\n", - "n = .93 #efficiency\n", - "P = 74.6 #power output(kW)\n", - "pf1 = 0.75 #power faactor\n", - "pf2 = 0.95 #raised power factor\n", - "n1 = 4 #no. of capacitors in each branch\n", - "V1 = 100 #rating of capacitors(V)\n", - "f = 50 #frequency(Hz)\n", - "\n", - "#Calculation:\n", - "Pi = round(P/n) #motor input(kW)\n", - "phy1 = math.acos(pf1) \n", - "phy2 = math.acos(pf2)\n", - "#Leading kVAR taken by the condenser bank\n", - "kVAR = round(Pi*(math.tan(phy1)-math.tan(phy2)),2) \n", - "kVAR1 = round(kVAR/3,2) #Leading kVAR taken by each of three sets\n", - "\n", - "#Fig. above shows the delta* connected condenser bank.\n", - "C = symbols('C')\n", - "Icp = 2*math.pi*f*C*Vph #Phase current of capacitor(A)\n", - "\n", - "c = solve(Vph*Icp/1000-kVAR1,C)[0] #capacitance(F)\n", - "\n", - "#Result:\n", - "print \"Capacitance of each capacitor is\",round(c*4*10**6,1),\"uF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance of each capacitor is 1173.8 uF\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.6, Page Number: 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "P = 800 #load(kW)\n", - "pf1 = 0.8 #initial power factor\n", - "pf2 = 0.9 #improved power factor\n", - "t = 3000 #working hours\n", - "c1 = 100 #1st part tariff(Rs/kVA)\n", - "c2 = 20 #2nd part tariff(paise/kWh)\n", - "c3 = 60 #cost of capacitors(Rs/kVAR)\n", - "n = 10 #interest & depreciation on capacitors(%)\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "#Leading kVAR taken by the capacitors:\n", - "kVAR = P*(math.tan(phy1)-math.tan(phy2))\n", - "\n", - "#Annual cost before p.f. correction:\n", - "kVAm1 = P/pf1 #max demand\n", - "T1 = kVAm1*c1+P*t*c2/100 #total annual cost(Rs)\n", - "\n", - "#Annual cost after p.f. correction:\n", - "kVAm2 = P/pf2 #max demand\n", - "T2 = c1*kVAm2+P*t*c2/100+n*c3*kVAR/100\n", - "\n", - "T = T1-T2 #annual saving(Rs)\n", - "\n", - "#Result:\n", - "print \"Annual saving is Rs\",round(T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual saving is Rs 9836.0\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.7, Page Number: 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "P1 = 200 #factory load(kW)\n", - "pf1 = 0.85 #initial power factor\n", - "pf2 = 0.9 #improved power factor\n", - "t = 2500 #working hours\n", - "c1 = 150 #1st part tariff(Rs/kVA)\n", - "c2 = 5 #2nd part tariff(paise/kWh)\n", - "c3 = 420 #cost of capacitors(Rs/kVAR)\n", - "Pcl = 100 #capacitor loss(W/kVAR)\n", - "n = 10 #interest & depreciation on capacitors(%)\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "#suppose the leading kVAR taken by the capacitors is x:\n", - "x = symbols('x')\n", - "Pcl1 = Pcl*x/1000 #capacitor loss(kW)\n", - "P2 = P1+Pcl1 #total power(kW)\n", - "x1 = solve((P1*math.tan(phy1)-P2*math.tan(phy2))-x,x)[0]\n", - "\n", - "\n", - "#Annual cost before p.f. correction:\n", - "kVAm1 = P1/pf1 #max demand\n", - "T1 = kVAm1*c1+P1*t*c2/100 #total annual cost(Rs)\n", - "\n", - "\n", - "#Annual cost after p.f. correction:\n", - "kVAm2 = P1/pf2 #max demand\n", - "T2 = c1*kVAm2+P1*t*c2/100+n*c3*x1/100+round(Pcl*x1*t*c2/100000)\n", - "\n", - "T = T1-T2 #annual saving(Rs)\n", - "\n", - "#Result:\n", - "print \"Annual saving is Rs\",round(T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Annual saving is Rs 553.0\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.8, Page Number: 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "pf = 0.8 #power factor\n", - "kVA = 750 # monthly demand\n", - "c1 = 8.50 #monthly power rate(Rs/kVA per month)\n", - "R = 250 #rating of capacitors(kVA)\n", - "C2 = 20000 #installed cost of equipment(Rs)\n", - "r = 10 #fixed charge rate(%)\n", - "\n", - "\n", - "#Calculation:\n", - "phy = math.acos(pf)\n", - "kW = kVA*math.cos(phy) #kW component of demand\n", - "kVAR = kVA*math.sin(phy) #kVAR component of demand\n", - "kVAR1 = kVAR-R #Leading kVAR taken by the capacitors\n", - "kVA1 = math.sqrt(kVAR1**2+kW**2) #kVA after p.f. improvement\n", - "kVA11 = round(kVA-kVA1,1) #Reduction in kVA\n", - "T1 = c1*kVA11*12 #Yearly saving on kVA charges\n", - "T2 = r*C2/100 #Fixed charges/year(Rs)\n", - "T = T1-T2 #net saaving(Rs)\n", - "\n", - "#Result:\n", - "print \"The annual saving is Rs\",T" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual saving is Rs 9985.0\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.9, Page Number: 113" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "pf1 = 0.8 #initial power factor\n", - "pf2 = 0.9 #improved power factor\n", - "L1 = 200 #load(kW)\n", - "L2 = 80 #motor load(kW)\n", - "\n", - "#Calculation:\n", - "phy1 = math.acos(pf1)\n", - "phy2 = math.acos(pf2)\n", - "L = L1+L2 #combined load(kW)\n", - "#In Fig. above, \u0394 OAB is the power triangle for load,\n", - "#\u0394 ODC for combined load and \u0394 BEC for the motor.\n", - "#(i):\n", - "kVAR = L1*math.tan(phy1)-L*math.tan(phy2) #Leading kVAR taken by the motor\n", - "#(ii):\n", - "kVArat = math.sqrt(L2**2+kVAR**2) #kVA rating of motor\n", - "#(iii):\n", - "pf = L2/kVArat #p.f. of motor\n", - "\n", - "#Result:\n", - "print \"The leading kVAR taken by the motor is\",round(kVAR,2)\n", - "print \"kVA rating of the motor is\",round(kVArat,2)\n", - "print \"Power factor at which the motor operates is\",round(pf,3),\"leading\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The leading kVAR taken by the motor is 14.39\n", - "kVA rating of the motor is 81.28\n", - "Power factor at which the motor operates is 0.984 leading\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.10, Page Number: 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#for induction motor:\n", - "kW1 = 37.3 \n", - "pf1 = 0.8 #lagging\n", - "n1 = 0.85\n", - "\n", - "#for synchronous motor:\n", - "kW2 = 18.65\n", - "pf = 0.9 #leading\n", - "n2 = 0.9\n", - "\n", - "#for lighting load:\n", - "kW3 = 10\n", - "pf3 = 1\n", - "c1 = 60 #Rs/kVA of max demand\n", - "c2 = 5 #paie per kWh\n", - "t = 2000 #working hours\n", - "\n", - "\n", - "#Calculation:\n", - "P1 = kW1/n1 #power input to induction motor(kW)\n", - "Q1 = P1*math.tan(math.acos(pf1)) #Lagging kVAR taken by induction motor\n", - "\n", - "P2 = kW2/n2 #Input power to synchronous motor(kW)\n", - "Q2 = P2**math.tan(math.acos(pf1)) #Leading kVAR taken by synchronous motor\n", - "\n", - "#Since lighting load works at unity p.f., its lagging kVAR = 0.\n", - "Q3 = 0 \n", - "\n", - "kVAR = Q1-Q2 #net kVAR\n", - "kW = round(P1+P2+kW3,1) #total active power\n", - "kVA = round(math.sqrt(kW**2+kVAR**2))\n", - "\n", - "T = c1*kVA+c2*kW*t/100\n", - "\n", - "#Result:\n", - "print \"The annual electical charges is Rs\",round(T)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual electical charges is Rs 12140.0\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.11, Page Number: 114" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#(i)for a lighting load:\n", - "P1 = 500 #kW\n", - "\n", - "\n", - "#(ii) for a load:\n", - "P2 = 400 #kW\n", - "pf2 = 0.707 #power factor lagging\n", - "\n", - "\n", - "#(iii)for a load:\n", - "P3 = 800 #kW\n", - "pf3 = 0.8 #power factor leading\n", - "\n", - "#(iv)for a load:\n", - "P4 = 500 #kW\n", - "pf4 = 0.6 #power factor lagging\n", - "\n", - "\n", - "#(v)a synchronous motor driving a d.c. generator:\n", - "P5 = 540 #power rated at generator(kW)\n", - "n = 0.9 #overall efficiency\n", - "\n", - "\n", - "#Calculation:\n", - "#Total lagging kVAR taken by loads (ii) and (iv)\n", - "kVAR24 = P2*math.tan(math.acos(pf2))+P4*math.tan(math.acos(pf4))\n", - "\n", - "#Leading kVAR taken by the load (iii)\n", - "kVAR3 = P3*math.tan(math.acos(pf3))\n", - "\n", - "#Leading kVAR to be taken by synchronous motor\n", - "kVAR5 = kVAR24-kVAR3\n", - "Pi = P5/n #motor input(kW)\n", - "phy = math.atan(kVAR5/Pi) #phase angle of synchronous motor\n", - "pf = math.cos(phy)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The power factor of synchronous motor is\",round(pf,2,),\"leading\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The power factor of synchronous motor is 0.79 leading\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.12, Page Number: 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "P1 = 100 #power of synchronous motor(hp)\n", - "P2 = 200 #power aggregated by induction motor(hp)\n", - "pf2 = 0.707 #lagging power factor for induction motor\n", - "n2 = 0.82 #efficiency of induction motor\n", - "P3 = 30 #lighting load(kW)\n", - "c1 = 100 #1st part tariff(Rs per kVA per annum)\n", - "c2 = 0.06 #2nd part tariff Rs per kWh\n", - "pfa = 0.8 #power factor factor initially(lagging)\n", - "na = 0.93 #efficiency of synchronous motor initially\n", - "pfb = 0.8 #power factor factor changed later(leading)\n", - "nb = 0.93 #efficiency of synchronous motor changed later\n", - "\n", - "\n", - "#Calculation:\n", - "#(a) When synchronous motor runs at p.f. 0\u00b78 lagging.\n", - "kW1 = round(P1*735.5/(na*1000)) #input to synchronous motor(kW)\n", - "kVAR1 = round(kW1*math.tan(math.acos(pfa)),2) #Lagging kVAR taken by the synchronous motor(kVAR)\n", - "kW2 = round(P2*735.5/(n2*1000),1) #input to induction motor(kW)\n", - "kVAR2 = kW2*math.tan(math.acos(pf2)) #Lagging kVAR taken by the induction motor(kVAR) \n", - "#Since lighting load works at unity p.f., its lagging kVAR is zero.\n", - "kVARt = kVAR1+kVAR2 #Total lagging kVAR\n", - "kWt = kW1+kW2+P3 #Total active power(kW)\n", - "kVAt = round(math.sqrt(kWt**2+kVARt**2),1) #total kVA\n", - "C1 = kVAt*c1 #annual kVA demand charges\n", - "E1 = kWt*8760 #Energy consumed/year(kWh)\n", - "C2 = round(0.06*E1) #annual energy charges(Rs)\n", - "T1 = C1+C2 #total Annual bill(Rs)\n", - "\n", - "\n", - "#(b) When synchronous motor runs at p.f. 0\u00b78 leading.\n", - "kVARn = kVAR2-kVAR1 #Net lagging kVAR\n", - "kWtt = kWt #total active power(kW)\n", - "kVAtt = math.sqrt(kVARn**2+kWtt**2) #total kVA\n", - "C11 = c1*kVAtt #annual kVA charges(Rs)\n", - "C22 = C2 #Annual energy charges(Rs)\n", - "T2 = C11+C22 #total annual bill(Rs)\n", - "Ts = T1-T2 #annual saving(Rs)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The annual saving is Rs\",round(Ts/100)*100" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual saving is Rs 6200.0\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.13, Page Number: 118" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "pf1 = 0.75 #Power factor of the factory(lagging)\n", - "x = 72 #Max. demand charges(Rs per kVA per annum)\n", - "d = 10 #interest & depreciation of capital investment(%)\n", - "M = 175 #max. demand(kW)\n", - "c2 = 120 #cost of phase advancing equipment(Rs/kVAR)\n", - "\n", - "\n", - "#Calculation:\n", - "y = c2*d/100 #Expenditure on phase advancing equipment(Rs/kVAR/annum)\n", - "pf2 = math.sqrt(1-(y/x)**2) #power factor\n", - "\n", - "\n", - "#Result:\n", - "print \"Most economical p.f. at which factory should operate is\",round(pf2,3),\"lagging\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Most economical p.f. at which factory should operate is 0.986 lagging\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.14, Page Number: 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "L = 400 #avg. demand(kW)\n", - "pf1 = 0.8 #original power factor(lagging)\n", - "LF = 0.5 #annual load factor\n", - "c1 = 50 #first part tariff(Rs/kVA per annum)\n", - "c2 = 0.05 #second part tariff(Rs/kWh)\n", - "pf2 = 0.95 #improved power factor\n", - "c3 = 100 #phase advancement equipment cost(Rs/kVAR)\n", - "d = 10 #annual interest and depreciation(%)\n", - "\n", - "\n", - "#Calculation:\n", - "M = L/LF #maximum demand(kW)\n", - "#Leading kVAR taken by phase advancement equipment:\n", - "kVAR1 = M*(math.tan(math.acos(pf1))-math.tan(math.acos(pf2)))\n", - "y = d*c3/100 #Expenditure on phase advancing equipment(Rs/kVAR/annum)\n", - "kVA1 = M/pf1 #Max. kVA demand at pf1 power fctor\n", - "kVA2 = round(M/pf2) #Max. kVA demand at pf2 power fctor\n", - "Cs = c1*(kVA1-kVA2) #Annual saving in maximum demand charges\n", - "Ce = y*kVAR1 #Annual expenditure on phase advancing equipment\n", - "NS = Cs-Ce #net annual saving\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The capacity of the phase advancing equipment is\",round(kVAR1),\"kVAR\"\n", - "print \"(ii)The annual saving is Rs\",round(NS)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The capacity of the phase advancing equipment is 337.0 kVAR\n", - "(ii)The annual saving is Rs 4529.0\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.15, Page Number: 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "L = 50 #avg. demand(kW)\n", - "pf1 = 0.75 #original power factor(lagging)\n", - "LF = 0.5 #annual load factor\n", - "c1 = 100 #first part tariff(Rs/kVA of max demand per annum)\n", - "c2 = 0.05 #second part tariff(Rs/kWh)\n", - "c3 = 600 #cost of loss free capacitors(Rs/kVAR)\n", - "d = 10 #depreciation & interest(%)\n", - "\n", - "\n", - "#Calculation:\n", - "y = c3*d/100 #Expenditure on capacitors(Rs/kVAR/annum)\n", - "pfe = math.sqrt(1-(y/c1)**2) #Most economical power factor\n", - "M = L/LF #Max kW demand\n", - "kVAm1 = M/pf1 #The maximum kVA demand at pf1 power factor\n", - "kVAm2 = M/pfe #The maximum kVA demand at pfe power factor\n", - "Cs = c1*(kVAm1-kVAm2) #annual saving(Rs)\n", - "\n", - "\n", - "#Result:\n", - "print \"Most economical power factor is\",round(pfe,3),\"lagging\"\n", - "print \"Annual saving is Rs\",round(Cs)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Most economical power factor is 0.8 lagging\n", - "Annual saving is Rs 833.0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.16, Page Number: 120" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "L = 200 #avg. demand(kW)\n", - "pf1 = 0.8 #original power factor(lagging)\n", - "LF = 0.5 #annual load factor\n", - "c1 = 100 #first part tariff(Rs/kVA of max demand per annum)\n", - "c2 = 0.05 #second part tariff(Rs/kWh)\n", - "c3 = 500 #cost of phase advancing plant(Rs/kVAR)\n", - "d = 10 #depreciation & interest(%)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "y = c3*d/100 #Expenditure on capacitors(Rs/kVAR/annum)\n", - "pfe = math.sqrt(1-(y/c1)**2) #Most economical power factor\n", - "Pc = L*(math.tan(math.acos(pf1))-math.tan(math.acos(pfe))) #Capacity of phase advancing plant\n", - "E = L*5000 #units consumed per year(kWh)\n", - "C2 = c2*E #annual energy charges(Rs)\n", - "C1 = y*Pc #Annual cost of phase advancing plant(Rs)\n", - "Cm = c1*L/pfe #Max. demand charge(Rs)\n", - "C = C2+C1+Cm #annual charge(Rs)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) The value to which the power factor be improved is\",round(pfe,3),\"lagging\"\n", - "print \"(ii) The capacity of the phase advancing plant is\",round(Pc,2),\"kVAR\"\n", - "print \"(iii)The new bill for energy is Rs\",round(C,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The value to which the power factor be improved is 0.866 lagging\n", - "(ii) The capacity of the phase advancing plant is 34.53 kVAR\n", - "(iii)The new bill for energy is Rs 74820.5\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.17, Page Number: 120" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "E = 80000 #units consumed per year\n", - "kVAm1 = 500 #maximum kVA demand\n", - "pf1 = 0.707 #initial power factor(lagging)\n", - "c1 = 120 #first part tariff(Rs/kVA of max demand per annum)\n", - "c2 = 0.025 #second part tariff(Rs/kWh)\n", - "c3 = 50 #cost of phase advancing plant(Rs/kVAR)\n", - "pf2 = 0.9 #increased powe factor(Rs)\n", - "d = 10 #depreciation on advancing plant(%)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "C1 = c1*kVAm1+c2*E #annual cost of supply(Rs)\n", - "P = kVAm1*pf1 #max. kW demand\n", - "#Leading kVAR taken by phase advancing equipment:\n", - "kVARe = P*(math.tan(math.acos(pf1))-math.tan(math.acos(pf2)))\n", - "C2 = round(kVARe*c3*d/100) #Annual cost of phase advancing equipment(Rs)\n", - "#When p.f. is raised from 0\u00b7707 lag to 0\u00b79 lag\n", - "kVAm2 = P/pf2 #new maximum kVA demand\n", - "kVAr = kVAm1-kVAm2 #Reduction in kVA demand\n", - "Cs = round(c1*kVAr) #annual saving(Rs)\n", - "#As the units consumed remain the same, therefore, saving will\n", - "#be equal to saving in M.D. charges minus annual cost of \n", - "#phase advancing plant.\n", - "Cs2 = Cs-C2 #annual charges(Rs)\n", - "\n", - "\n", - "#Result:\n", - "print \"The annual cost of supply is Rs\",C1\n", - "print \"Annual saving is Rs\",Cs2" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The annual cost of supply is Rs 62000.0\n", - "Annual saving is Rs 11955.0\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.18, Page Number: 123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "pf = 0.7 #power factor when plant working at its max. capacity(lagging)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "#For calculating the cost of increasing plant capacity. \n", - "#We have, referring to Fig. 6.15, the increase in kVA capacity is BD.\n", - "\n", - "#Now OE*cos phy2 = OD*cos phy1\n", - "#or OB*cos phy2 = OD*cos phy1 (Since OE = OB)\n", - "#or OD = OB * cos phy2/cos phy1 \n", - "# = OB * 0\u00b785/0\u00b77\n", - "# = 1\u00b72143 OB\n", - "\n", - "#Increase in the kVA capacity of the plant is\n", - "#BD = OD \u2212 OB = 1\u00b72143 \u00d7 OB \u2212 OB = 0\u00b72143 OB\n", - "#Total cost of increasing the plant capacity\n", - "# = Rs 800 \u00d7 0\u00b72143 \u00d7 OB\n", - "# = Rs 171\u00b744 \u00d7 OB ...(i)\n", - "\n", - "cos_phy1 = 0.7; sin_phy1 = 0.714\n", - "cos_phy1 = 0.85; sin_phy1 = 0.527\n", - "\n", - "#Leading kVAR taken by p.f. correction equipment is\n", - "# ED = CD \u2212 CE = OD*sin phy1 \u2212 OE*sin phy2\n", - "# = 1\u00b72143 * OB*sin phy1 \u2212 OB*sin phy2\n", - "# = OB*(1\u00b72143 * 0\u00b7714 \u2212 0\u00b7527) = 0\u00b734 * OB\n", - "#Suppose the cost per kVAR of the equipment be Rs y.\n", - "#So, total cost of p.f. correction equipment\n", - "# = Rs 0\u00b734 \u00d7 OB \u00d7 y ...(ii)\n", - "#The cost per kVAR of the equipment that would justify its \n", - "#installation is when exp. (i) = exp. (ii)\n", - "#i.e.,\n", - "# 171\u00b744 \u00d7 OB = 0\u00b734 \u00d7 OB \u00d7 y\n", - "y = 171.44/0.34 #Rs/kVAR\n", - "\n", - "#If the losses in p.f. correction equipment are neglected, \n", - "#then its kVAR = kVA.\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The maximum cost per kVA of p.f. correction equipment\"\n", - "print \"that can be paid is Rs\",round(y,1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum cost per kVA of p.f. correction equipment\n", - "that can be paid is Rs 504.2\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 6.19, Page Number: 124" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "pf = 0.7 #power factor when plant working at its max. capacity(lagging)\n", - "\n", - "#Calculation:\n", - "#Cost of increasing plant capacity\n", - "# BD = OD \u2212 OB\n", - "# = OB * 0.866/0.70-OB\n", - "# = OB*(1\u00b7237 \u2212 1)\n", - "# = 0\u00b7237 * OB\n", - "#\u2234 Annual cost of increasing the plant capacity\n", - "# = Rs 10 * 0\u00b7237 * OB\n", - "# = Rs. 2.37 * OB ...(i)\n", - "\n", - "#Cost of phase advancing equipment. Leading kVAR taken by\n", - "#phase advancing equipment,\n", - "# ED = CD \u2212 CE\n", - "# = OD*sin phy1 \u2212 OE*sin phy2\n", - "# = 1.237 * OB * sin phy1 \u2212 OB*sin phy2\n", - "# = OB*(1\u00b7237 * 0\u00b7174 \u2212 0\u00b75) = 0\u00b7383 \u00d7 OB\n", - "#Let the cost per kVAR of the equipment be Rs y.\n", - "#Annual cost of phase advancing equipment\n", - "# = Rs 0.1 * y * 0\u00b7383 * OB ...(ii)\n", - "#For economical use, the two costs should be equal i.e.,\n", - "# exp. (i) = exp. (ii).\n", - "#or 0\u00b71 * y * 0\u00b7383 * OB = 2\u00b737 * OB\n", - "y = 2.37/(0.1*0.383) #Rs\n", - "\n", - "\n", - "#If the losses in the phase advancing equipment are neglected,\n", - "#then its kVAR = kVA.\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The maximum cost per kVA of phase advancing equipment\"\n", - "print \"that can be paid is Rs\",round(y,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum cost per kVA of phase advancing equipment\n", - "that can be paid is Rs 61.88\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter7_1.ipynb b/Principles_of_Power_System/chapter7_1.ipynb deleted file mode 100644 index bcb1dc3f..00000000 --- a/Principles_of_Power_System/chapter7_1.ipynb +++ /dev/null @@ -1,559 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:855ede77f42d7d38570b25f9dfe540c158b87984c52d22c6171f4226086950d9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7: Supply Systems" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.1, Page Number: 145" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "V1 = 200 #initial volt of system(V)\n", - "V2 = 400 #final volt of the system(V)\n", - "\n", - "\n", - "#Calculation:\n", - "I1,I2,R1,R2 = symbols('I1 I2 R1 R2')\n", - "I2 = V1*I1/V2\n", - "W1 = 2*I1**2*2*R1 #Power loss in 200 V system\n", - "W2 = 2*I2**2*2*R2 #Power loss in 400 V system\n", - "# As power loss in the two cases is the same,\n", - "R22 = solve(W1/W2-1,R2)[0]\n", - "a = R22/R1 #ratio of cables' cross-section\n", - "v = 1/a #ratio of cables' volumes\n", - "s = (1-v)*100\n", - "\n", - "#Result:\n", - "print \"% Saving in feeder copper is \",s,\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "% Saving in feeder copper is 75 %\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.2, Page Number: 146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "#P = power upplied, W = power loss, \n", - "#I = current, V = voltage, R = resistance\n", - "\n", - "R,V = symbols('R V')\n", - "P1,I1,W1 = symbols('P1,I1,W1') #for 2-wire system\n", - "P2,I2,W2 = symbols('P2,I2,W2') #for 3-wire system\n", - "\n", - "#Calculation:\n", - "#Two-wire d.c. system:\n", - "P1 = V*I1\n", - "W1 = 2*I1**2*R\n", - "L1 = W1/P1*100 #% power loss\n", - "\n", - "#3-phase, 3-wire a.c. system:\n", - "P2 = math.sqrt(3)*V*I2\n", - "W2 = 3*I2**2*R\n", - "L2 = W2/P2*100 #% power loss\n", - "\n", - "I2 = solve(L1-L2,I2)[0]\n", - "#r2 = P2/P1\n", - "r2 = math.sqrt(3)*I2*V/(I1*V)\n", - "P1 = 2*P2\n", - "\n", - "#Result:\n", - "print '''Additional power which can be supplied at \n", - "unity p.f. by 3-phase, 3-wire a.c. system = 100%.'''" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Additional power which can be supplied at \n", - "unity p.f. by 3-phase, 3-wire a.c. system = 100%.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.3, Page Number: 146" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "#Let R be the resistance per conductor in each case\n", - "\n", - "R,V = symbols('R V')\n", - "P1,I1,W1 = symbols('P1,I1,W1') #for 3-wire dc system\n", - "P2,I2,W2 = symbols('P2,I2,W2') #for 4-wire ac system\n", - "\n", - "#Calculation:\n", - "\n", - "#3-wire d.c. system.:\n", - "#At balanced loads, implying no power loss in the neutral wire\n", - "P1 = 2*V*I1\n", - "W1 = 2*I1**2*R\n", - "L1 = W1/P1*100 #% power loss\n", - "\n", - "\n", - "#3-phase, 4-wire a.c. system.:\n", - "#At balanced loads, implying no power loss in the neutral wire\n", - "P2 = 3*V*I2\n", - "W2 = 3*I2**2*R\n", - "L2 = W2/P2*100 #% power loss\n", - "\n", - "I2 = solve(L1-L2,I2)[0]\n", - "r = P2/P1\n", - "#solving r, we get\n", - "P2 = 1.5*P1\n", - "\n", - "#Result:\n", - "print '''Extra power that can be supplied at unity power \n", - "factor by 3-phase, 4-wire a.c. system = 50%.'''" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Extra power that can be supplied at unity power \n", - "factor by 3-phase, 4-wire a.c. system = 50%.\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.4, Page Number: 148" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "R,V,phy = symbols('R V phy') #phy is power factor angle\n", - " #V is voltage between the conductors\n", - " #R is resistance per conductor \n", - "P1,I1,W1 = symbols('P1,I1,W1') #for Single phase 2-wire system\n", - "P2,I2,W2 = symbols('P2,I2,W2') #for 3-phase, 3-wire a.c. system\n", - "\n", - "\n", - "#Calculation:\n", - "#Single phase 2-wire system\n", - "P1 = 2*V*I1*math.cos(phy)\n", - "W1 = 2*I1**2*R\n", - "L1 = W1/P1*100 #% power loss\n", - "\n", - "#3-phase, 3-wire a.c. system. \n", - "P2 = math.sqrt(3)*V*I2*math.cos(phy)\n", - "W2 = 3*I2**2*R\n", - "L2 = W2/P2*100 #% power loss\n", - "\n", - "I22 = solve(L1-L2,I2)[0]\n", - "r = P1/(math.sqrt(3)*V*I22*math.cos(phy))\n", - "#As the power supplied by single phase, 2-wire is 200 kW,\n", - "P1 = 200\n", - "\n", - "#Result:\n", - "print \"Power supplied by 3-phase, 3-wire a.c. system is\",P1*r,\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power supplied by 3-phase, 3-wire a.c. system is 400 kW\n" - ] - } - ], - "prompt_number": 38 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.5, Page Number: 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "MVA = 5 #power transmitted to load\n", - "n = 0.9 #efficiency\n", - "pf = 0.8 #power factor\n", - "V = 33 #receiving end voltage(V)\n", - "l = 50*10**3 #length of line(m)\n", - "s = 2.85*10**-8 #specific resistance of aluminium(ohm-m)\n", - "\n", - "#Calculation:\n", - "P = MVA*pf*10**6 #power transmitted(W)\n", - "W = 10*P/100 #line loss(W)\n", - "\n", - "\n", - "#(i) Single phase, 2-wire system:\n", - "I1 = MVA*10**3/V #Apparent power(A)\n", - "a1 = 2*I1**2*s*l/W #area of cross-section(m**2)\n", - "v1= 2*a1*l #volume of conductor required(m**3)\n", - "\n", - "#(ii) 3-phase, 3-wire system:\n", - "I2 = MVA*10**3/(math.sqrt(3)*V) #Apparent power(A)\n", - "a2 = 3*I2**2*s*l/W #area of cross-section(m**2)\n", - "v2 = 3*a2*l #volume of conductor required(m**3)\n", - "\n", - "#Result:\n", - "print \"(i) Single phase, 2-wire system, Vol. of conductor required is\",round(v1,2),\"m^3\"\n", - "print \"(ii)3-phase, 3-wire system, Vol. of conductor required\",round(v2,2),\"m^3\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Single phase, 2-wire system, Vol. of conductor required is 16.36 m^3\n", - "(ii)3-phase, 3-wire system, Vol. of conductor required 12.27 m^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.6, Page Number: 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "V1 = 11*10**3 #Supply voltage(V)\n", - "pf = 0.8\n", - "R1 = 0.15 #Total resistance in ac system(ohm)\n", - "R2 = 0.05 #Total resistance in dc system(ohm)\n", - "r1 = 0.15 #voltage drop in ac system(%)\n", - "r2 = 0.25 #voltage drop in dc system(%)\n", - "\n", - "#Calculation:\n", - "#Single phase system:\n", - "I1 = r1*V1/R1 #line current(A)\n", - "P1 = V1*I1*pf/1000 #power received by consumer(kW)\n", - "\n", - "#D.C. two-wire system:\n", - "P2 = P1\n", - "V2 = (P2*10**3*R2/r2)**0.5 #supply voltage(V)\n", - "\n", - "#Result:\n", - "print \"The supply voltage is\",V2,\"V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The supply voltage is 4400.0 V\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.7, Page Number: 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "I = 200 #current(A)\n", - "l = 1 #length of cable(km)\n", - "c1 = 5 #cost per unit(paise/kWh)\n", - "r1 = 10 #interrest & depreciation(%)\n", - "ro = 1.73*10**-6 #resistivity(ohm-m)\n", - "\n", - "#Calculation:\n", - "#If 'a' is the area os cross-section of the cnductor,\n", - "#cost of cable including installation = (20*a + 20) Rs./m.\n", - "\n", - "a = symbols('a')\n", - "R = ro*l*10**5/a\n", - "E = 2*I**2*R*8760/1000 #energy lost per annum\n", - "C = c1/100*E #cost of energy lost(Rs)\n", - "\n", - "#capital cost for 1 km length of the cable is = Rs. 20,000*a.\n", - "\n", - "V = r1/100*20000*a #Variable annual charge(Rs)\n", - "a1 = solve(C-V,a)[1]\n", - "\n", - "#Result:\n", - "print \"The most economical conductor size is\",round(a1,2),\"cm**2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The most economical conductor size is 1.74 cm**2\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.8, Page Number: 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "P = 5 #line load(MW)]\n", - "V = 33 #kV\n", - "pf = 0.8 #power factor\n", - "c1 = 4 #paise/kWh\n", - "r1 = 10 #interest and depreciation(%)\n", - "ro = 10**-6 #ohm-cm\n", - "\n", - "\n", - "#Calculation:\n", - "a = symbols('a') #size of conductor(cm**2)\n", - "R = ro*l*10**5/a #ohm\n", - "I = P*10**3/(math.sqrt(3)*V*pf) #current (A)\n", - "E = 3*I**2*R*8760/1000 #kWh\n", - "C = c1/100*E #Annual cost of energy lost(R)\n", - "#The capital cost (variable) of the cable = 25000*a Rs/km\n", - "V = r1/100*25000*a #Rs\n", - "a1 = solve(C-V,a)[1]\n", - "\n", - "#Result:\n", - "print \"The most economical size of conductor is\",round(a1,2),\"cm**2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The most economical size of conductor is 0.71 cm**2\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.9, Page Number: 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "I = 250 #current through the feeder(A)\n", - "c1 = 5 #Rs/kg\n", - "r1 = 10 #interest and depreciation(%)\n", - "c2 = 5 #paise/kWh\n", - "d = 8.93 #density of wire(gm/cm**3)\n", - "ro = 1.73*10**-8 #speciafic resistance(ohm-m)\n", - "\n", - "\n", - "#Calculation:\n", - "l = 1 #length of wire(1 m say)\n", - "a = symbols('a') #conductor size(m**2)\n", - "R = ro*l/a #ohm\n", - "E = 2*I**2*R*8760/1000 #kWh\n", - "C = c2/100*E #annual cost os energy lost(Rs)\n", - "m = 2*a*1*d*10**3 #Mass of 1 metre feeder\n", - "CC = c1*m #capital cost(Rs)\n", - "V = r1*CC/100 #Variable Annual charge(Rs)\n", - "a1 = solve(C-V)[1]\n", - "\n", - "#Result:\n", - "print \"The most economic size of conductor is\",round(a1*10000,2),\"cm**2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The most economic size of conductor is 3.26 cm**2\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 7.10, Page Number: 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "l = 1 #line length(km)\n", - "V = 110 #supply voltage(kV)\n", - "\n", - "#Working hours(hrs) Load(MW) Power factor\n", - "t1 = 6; P1 = 20 ; pf1 = 0.8\n", - "t2 = 12; P2 = 5 ; pf2 = 0.8\n", - "t3 = 6; P3 = 6 ; pf3 = 0.8\n", - "\n", - "c1 = 6 #\n", - "n = 365 #no.of days used\n", - "r1 = 10 #interest and dep-reciation(%)\n", - "\n", - "#Calculation:\n", - "a = symbols(\"a\") #cross-section of conductor(cm**2)\n", - "R = 0.176/a #Resistance per km of each conductor(ohm)\n", - "#The load currents at various loads are :\n", - "#At 20 MW,\n", - "I1 = P1*1000/(math.sqrt(3)*V*pf1) #A\n", - "I2 = P2*1000/(math.sqrt(3)*V*pf2) #A\n", - "I3 = P3*1000/(math.sqrt(3)*V*pf3) #A\n", - "\n", - "E1= 3*R*1/1000*(I1**2*t1+I2**2*t2+I3**2*t3) #Energy loss per day in 3-phase line(kWh)\n", - "E = E1*n #energy lost per annum(kWh)\n", - "C = c1*E/100 #Annual cost of energy(Rs)\n", - "v = r1*6000*a/100 #variable annual charge(Rs/kWh)\n", - "a1 = solve(C-v,a)[1]\n", - "\n", - "\n", - "#Result:\n", - "print \"THe most economical size of the conductor is\",round(a1,2),\"cm**2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "THe most economical size of the conductor is 1.56 cm**2\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter8_1.ipynb b/Principles_of_Power_System/chapter8_1.ipynb deleted file mode 100644 index 6b383670..00000000 --- a/Principles_of_Power_System/chapter8_1.ipynb +++ /dev/null @@ -1,1455 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:9774a5727e94c3e9d7f6de1d46ee1710f0f45bee5b4624a7cce654515da8e820" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8: Mechanical Design of Overhead Lines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.1, Page Number: 171" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "\n", - "#Variable declaration:\n", - "k = 0.11 #ratio of shunt-capatance to self capacitance\n", - "V = 33/math.sqrt(3) #Voltage across string(kV)\n", - "n = 3 #no. of insulators\n", - "\n", - "#Calculation:\n", - "\n", - "# At Junction A\n", - "# I2 = I1 + i1\n", - "# or V2*w*C = V1*w*C + V1*K*\u03c9*C\n", - "# or V2 = V1*(1 + K) = V1*(1 + 0\u00b711)\n", - "# or V2 = 1\u00b711*V1 ...(i)\n", - "\n", - "# At Junction B\n", - "# I3 = I2 + i2\n", - "# or V3*w*C = V2*w*C + (V1 + V2) K*w*C\n", - "# or V3 = V2 + (V1 + V2)*K\n", - "# = 1\u00b711*V1 + (V1 + 1\u00b711*V1)*0\u00b711\n", - "# V3 = 1\u00b7342 V1\n", - "# Voltage across whole unit,\n", - "# V = V1+V2+V3\n", - "# or V = V1+1.11*V1+1.342*V1\n", - "\n", - "V1 = V/3.452 #Voltage across top unit(V)\n", - "V2 = 1.11*V1 #Voltage across top unit(V)\n", - "V3 = 1.342*V1 #Voltage across top unit(V)\n", - "\n", - "e = V/(n*V3)*100 #string efficiency\n", - "\n", - "#Result:\n", - "print \"(i)\\tVoltage across top unit,V1 is\",round(V1,2),\"kV\"\n", - "print \" \\tVoltage across middle unit, V2 is\",round(V2,2),\"kV\"\n", - "print \" \\tVoltage across bottom unit, V3 is\",round(V3,1),\"kV\"\n", - "print \"(ii)\\tThe string efficiency is \",round(e,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)\tVoltage across top unit,V1 is 5.52 kV\n", - " \tVoltage across middle unit, V2 is 6.13 kV\n", - " \tVoltage across bottom unit, V3 is 7.4 kV\n", - "(ii)\tThe string efficiency is 85.7 %\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.2, Page Number: 172" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "V1 = 8 #voltage across top unit(kV)\n", - "V2 = 11 #voltage across middle unit(kV)\n", - "n = 3 #no. of insulators\n", - "#Calculation:\n", - "\n", - "#(i)\n", - "# Let K be the ratio of capacitance between pin and the earth\n", - "# to self capacitance. \n", - "# Let C farad be the self capacitance of each unit, \n", - "# then, capacitance between pin and earth = K*C.\n", - "# Applying Kirchoff\u2019s current law to Junction A,\n", - "# I2 = I1 + i1\n", - "# or V2*w*C = V1*w*C + V1*K*w*C\n", - "# or V2 = V1 (1 + K)\n", - "\n", - "k = (V2-V1)/V1\n", - "\n", - "#(ii)\n", - "# Applying Kirchoff\u2019s current law to Junction B,\n", - "# I3 = I2 + i2\n", - "# or V3*w*C = V2*w*C + (V1 + V2)*K*w*C\n", - "# or V3 = V2 + (V1 + V2)*K = 11 + (8 + 11) * 0\u00b7375\n", - "V3 = 18.12 #kV\n", - "V = V1 + V2+ V3 #kV\n", - "Vl = math.sqrt(3)*V #line voltage(kV)\n", - "\n", - "#(iii)\n", - "e = V/(n*V3)*100 #stirng efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i) Ratio of capacitance b/w pin & earth is\",k\n", - "print \"(ii) The line voltage is\",round(Vl,2),\"kV\"\n", - "print \"(iii)String efficiency is\",round(e,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Ratio of capacitance b/w pin & earth is 0.375\n", - "(ii) The line voltage is 64.29 kV\n", - "(iii)String efficiency is 68.29 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.3, Page Number: 172" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "n = 3 #no. of insulators\n", - "V3 = 17.5 #voltage across the line unit(V)\n", - "\n", - "# At Junction A\n", - "# I2 = I1 + i1\n", - "# V2 \u03c9 C = V1 \u03c9 C + V1 K \u03c9 C\n", - "# or V2 = V1 (1 + K) = V1 (1 + 0.125)\n", - "# \u2234 V2 = 1\u00b7125 V1\n", - "\n", - "# At Junction B\n", - "# I3 = I2 + i2\n", - "# or V3 \u03c9 C = V2 \u03c9 C + (V1 + V2) K \u03c9 C\n", - "# or V3 = V2 + (V1 + V2) K\n", - "# = 1\u00b7125 V1 + (V1 + 1\u00b7125 V1) \u00d7 0.125\n", - "# \u2234 V3 = 1\u00b739 V1\n", - "\n", - "V1 = V3/1.39 #Voltage across top unit(kV)\n", - "V2 = 1.125*V1 #Voltage across middle unit(kV)\n", - "\n", - "V = V1+V2+V3 #voltage across line unit(kV)\n", - "e = V/(n*V3)*100 #string efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"Line to neutral voltage is\",round(V,2),\"kV\"\n", - "print \"String efficiency is\",round(e,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Line to neutral voltage is 44.25 kV\n", - "String efficiency is 84.29 %\n" - ] - } - ], - "prompt_number": 36 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.4, Page Number: 173" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "V3 = 13.1 #voltage across the lowest insulator(kV)\n", - "V2 = 11 #voltage across the middle insulator(kV)\n", - "K = symbols('K')\n", - "# Applying Kirchhoff\u2019s current law to Junctions A and B, we can easily\n", - "# derive the following equations:\n", - "\n", - "# V2 = V1 (1 + K)\n", - "# or V1 = V2/(1 + K) ...(i)\n", - "# and V3 = V2 + (V1 + V2)*K ...(ii)\n", - "# Putting the value of V1 = V2/(1 + K) in eq. (ii), we get,\n", - "\n", - "#V3 = V2 + (V2/(1+k)+ V2)*K\n", - "K1 = solve(V3-(V2 + (V2/(1+K)+ V2)*K),K)[1]\n", - "\n", - "V1 = V2/(1+K1)\n", - "V = V1+V2+V3 #kV\n", - "\n", - "#Result:\n", - "print \"The voltage b/w the bus bars is\",round(float(math.sqrt(3)*V)),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The voltage b/w the bus bars is 59.0 kV\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.5, Page Number: 173" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "n = 3 #no.of insulators\n", - "k = 1/8 #ratio of self-capacitance to shunt capacitance\n", - "V3 = 15 #safe working voltage of each insulator(kV)\n", - "\n", - "# Applying Kirchhoff\u2019s current law to junction A, we get,\n", - "# V2 = V1*(1 + K)\n", - "# or V1 = V2/(1 + K) = V2/(1 + 0\u00b7125) = 0\u00b789*V2\n", - "\n", - "# Applying Kirchhoff\u2019s current law to Junction B, we get,\n", - "# V3 = V2 + (V1 + V2)*K = V2 + (0.89*V2 + V2) * 0.125\n", - "# V3 = 1.236*V2 \n", - "V2 = V3/1.236 #kV\n", - "V1 = 0.89*V2 #kV\n", - "V = V1+V2+V3 #voltage across the string(kV)\n", - "e = V/(n*V3) *100 #string efficiency(%)\n", - "\n", - "#Result:\n", - "print \"Voltage across the string is\",round(V,3),\"kV\"\n", - "print \"The string efficiency is\",round(e,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across the string is 37.937 kV\n", - "The string efficiency is 84.3 %\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.6, Page Number: 174" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "n = 4 #no. of unit\n", - "\n", - "\n", - "#Calculation:\n", - "# Suppose Xc = 1 \u03a9. Given, the ratio of self-capacitance to shunt\n", - "# capacitance is 10, so, Xc1 = 10 \u03a9 .\n", - "# Suppose that potential V across the string is such that 1 A current \n", - "# flows in the top insulator.\n", - "#Thus,\n", - "V1 = 1*1 #Voltage across top unit(V)\n", - "V2 = 1*1.1 #Voltage across 2nd unit(V)\n", - "V3 = 1*1.31 #Voltage across 3rd unit(V)\n", - "V4 = 1*1.65 #Voltage across 4th unit(V)\n", - "V = V1+V2+V3+V4 #Voltage obtained across the string(V)\n", - "\n", - "#The voltage across each unit expressed as a % of V becomes:\n", - "f1 = V1/V*100\n", - "f2 = V2/V*100\n", - "f3 = V3/V*100\n", - "f4 = V4/V*100\n", - "\n", - "e = V/(n*V4)*100 #string efficiency(%)\n", - "\n", - "#Result:\n", - "print \"(i) The voltage distributation from top unit is \"\n", - "print \"\\t\",round(f1,2),\"%\\t\",round(f2,2),\"%\\t\",round(f3,1),\"%\\t\",round(f4,1),\"%\"\n", - "print \"\\n(ii)String efficiency is\",round(e,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The voltage distributation from top unit is \n", - "\t19.76 %\t21.74 %\t25.9 %\t32.6 %\n", - "\n", - "(ii)String efficiency is 76.7 %\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.7, Page Number: 175" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "n = 5 #no.os insulators\n", - "Vl = 100 #line voltage(kV)\n", - "\n", - "#Suppose Xc = 1 \u03a9.\n", - "#Ratio of self capacitance to shunt capacitance is 10, so, Xc1 = 10 \u03a9. \n", - "#Let V be the voltage s.t 1A current flows in top insulator.\n", - "\n", - "#Calculation:\n", - "#calculation for fraction of voltage drop:\n", - "v1 = 1*1 #Voltage across top unit(V)\n", - "v2 = 1*1.1 #Voltage across 2nd unit(V)\n", - "v3 = 1*1.31 #Voltage across 3rd unit(V)\n", - "v4 = 1*1.65 #Voltage across 4th unit(V)\n", - "v5 = 1*2.16 #voltage across 5th unit(V)\n", - "v = v1+v2+v3+v4+v5 #total voltage(V)\n", - "V = 100/math.sqrt(3) #string voltage(V)\n", - "V1 = round(v1/v*V,3) #kV\n", - "V2 = v2/v*V #kV\n", - "V3 = v3/v*V #kV\n", - "V4 = v4/v*V #kV\n", - "V5 = v5/v*V #kV\n", - "e = V/(n*V5)*100 #string efficiency(%)\n", - "\n", - "\n", - "#Result:\n", - "print \"(i)The distribution of voltage on the insulator discs are\"\n", - "print \"V1 = \",round(V1,3),\"kV \",\"\\tV2 =\",round(V2,2),\"kV \\n\",\n", - "print \"V3 =\",round(V3,1),\"kV\",\"\\t\\tV4 =\",round(V4,2),\"kV\",\n", - "print \"\\nV5 =\",round(V5,1),\"kV\"\n", - "print \"\\n(ii)The string efficiency\",round(e,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i)The distribution of voltage on the insulator discs are\n", - "V1 = 7.997 kV \tV2 = 8.8 kV \n", - "V3 = 10.5 kV \t\tV4 = 13.19 kV \n", - "V5 = 17.3 kV\n", - "\n", - "(ii)The string efficiency 66.9 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.8, Page Number: 176" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "n = 4 #no.os insulators\n", - "V2 = 13.2 #Voltage across 2th unit\n", - "V3 = 18 #Voltage across 3th unit\n", - "#Suppose K is the ratio of shunt-capacitance to self-capacitance\n", - "k = symbols('k')\n", - "\n", - "# Referring to Fig.(ii), we have,\n", - "# V2/V1 = ( 1 + K)/1\n", - "# V2 = V1 (1 + K)\n", - "# V3/V1 = (1 + 3K + K2)/1\n", - "# V3 = V1 (1 + 3K + K2)\n", - "# putting values of V2 & V3\n", - "\n", - "k1 = solve(13.2*k**2+21.6*k-4.8,k)[1]\n", - "V1 = V2/(1+k1)\n", - "V4 = V1*(1 + k1**33 + 5*k1**2 + 6*k1)\n", - "V = V1+V2+V3+V4 #Voltage between line and earth(kV)\n", - "Vl = math.sqrt(3)*V #Voltage between conductors(kV)\n", - "\n", - "#Result:\n", - "print \"Voltage between conductors is\",round(float(Vl)),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage between conductors is 119.0 kV\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.9, Page Number: 177" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "\n", - "#Variable declaration:\n", - "k = 5 #ratio of self-capacitance(C) to pin-earth capacitance(C1)\n", - "V = 1+1.2+1.64+2.408 #voltage obtained across the string(V)\n", - "\n", - "\n", - "#Calculation:\n", - "#(i) The voltage across each unit expressed as a % of V\n", - "v1 = 1/V*100\n", - "v2 = 1.2/V*100\n", - "v3 = 1.6/V*100\n", - "v4 = 2.408/V*100\n", - "\n", - "#(ii)String efficiency\n", - "e = V/(4*2.408)*100\n", - "\n", - "#Result:\n", - "print \"(i) The voltage across each unit expressed as a % of V are:\"\n", - "print \"\\tTop Unit: \",round(v1),\"%\"\n", - "print \"\\tSecond from top: \",round(v2,1),\"%\"\n", - "print \"\\tThird from top: \",round(v3),\"%\"\n", - "print \"\\tFourth from top: \",round(v4,1),\"%\"\n", - "print \"(ii)String efficiency is\",round(e,2),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) The voltage across each unit expressed as a % of V are:\n", - "\tTop Unit: 16.0 %\n", - "\tSecond from top: 19.2 %\n", - "\tThird from top: 26.0 %\n", - "\tFourth from top: 38.5 %\n", - "(ii)String efficiency is 64.87 %\n" - ] - } - ], - "prompt_number": 54 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.10, Page Number: 177" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "V1,V2,V3,V= symbols('V1 V2 V3 V') #volts (shown in fig(ii))\n", - "\n", - "\n", - "#Calculation:\n", - "\n", - "#We know that in an actual string of insulators, 3 capacitances\n", - "#exist i.e, self-capacitance of each insulator, shunt capacitance \n", - "#and capacitance of each unit to line.\n", - "#But, capacitance of each unit to line is very small and\n", - "#can be neglected.\n", - "\n", - "#At Junction A\n", - "# I2 + i1 = I1 + i1\n", - "#or V2*w*C + (V2 + V3)*0\u00b71*w*C = V1*\u03c9*C + 0\u00b715*C*V1*w\n", - "#or 0\u00b71*V3 = 1\u00b715*V1 \u2212 1\u00b71*V2\n", - "# V3 = 11\u00b75*V1 \u2212 11*V2 ...(i)\n", - "\n", - "#At Junction B\n", - "# I3 + i\u20322 = I2 + i2\n", - "#or V3*w*C + V3*0\u00b71*C*w = V2*w*C + (V1 + V2)*w*0\u00b715 C\n", - "#or 1\u00b71*V3 = 1\u00b715*V2 + 0\u00b715*V1 ...(ii)\n", - "#Putting the value of V3 from exp (i). into exp. (ii), we get,\n", - "# 1\u00b71*(11\u00b75*V1 \u2212 11*V2) = 1\u00b715*V2 + 0\u00b715*V1\n", - "#or 13\u00b725*V2 = 12\u00b75*V1\n", - "# V2 = 12.5/13.25*V1\n", - "# V3 = 11.5*V1-11*V2\n", - "# V = V1+V2+V3\n", - "# V = 40.55/13.25*V1\n", - "V1 = 13.25/40.55*V\n", - "V2 = 12.5/13.25*V1\n", - "V3 = 14.8/13.25*V1\n", - "\n", - "#The voltage across each unit expressed as a % of V becomes:\n", - "p1 = V1/V*100\n", - "p2 = V2/V*100\n", - "p3 = V3/V*100\n", - "\n", - "\n", - "#Results:\n", - "print \"The voltage across each unit expressed as a % of V becomes:\"\n", - "print \"for top unit, v1 =\",round(p1,1),\"%\",\n", - "print \"\\nfor middle unit, v2 =\",round(p2,1),\"%\"\n", - "print \"for 3rd unit, v3 =\",round(p3,1),\"%\"\n", - "\n", - "print \"String efficiency is\",round(V/(3*V3)*100,1),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The voltage across each unit expressed as a % of V becomes:\n", - "for top unit, v1 = 32.7 % \n", - "for middle unit, v2 = 30.8 %\n", - "for 3rd unit, v3 = 36.5 %\n", - "String efficiency is 91.3 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.11, Page Number: 179" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable Declaration:\n", - "V1,V2,V3,V= symbols('V1 V2 V3 V') #volts (shown in fig(i))\n", - "\n", - "#Calculation:\n", - "\n", - "#At Junction A\n", - "# I2 + i\u20321 = I1 + i1\n", - "#or V2*w*C + (V2+V3)*w*0\u00b71*C = V1*w*C+V1*0\u00b72*C*\u03c9 \n", - "# V3 = 12 V1 \u2212 11 V2 # ...(i)\n", - "\n", - "#At Junction B\n", - "# I3 + i\u20322 = I2 + i2\n", - "#or V3 \u03c9 C + V3 \u00d7 0\u00b73 C \u00d7 \u03c9 =V2 \u03c9 C + (V1 + V2) \u03c9 \u00d7 0\u00b72 C\n", - "#or 1\u00b73 V3 = 1\u00b72 V2 + 0\u00b72 V1 ...(ii)\n", - "#Substituting the value of V3 from exp. (i) into exp. (ii), we get,\n", - "# 1\u00b73*(12*V1 \u2212 11*V2) = 1\u00b72*V2 + 0\u00b72*V1\n", - "#or 15\u00b75*V2 = 15\u00b74*V1\n", - "V2 = 15.4*V1/15.5 #...(iii)\n", - "V2 = 0.993*V1\n", - "\n", - "#Substituting the value of V2 from exp. (iii) into exp. (i), we get,\n", - "V3 = 12*V1 - 11*0.993*V1\n", - "V3 = 1.077*V1\n", - "\n", - "#Voltage between conductor and earth (i.e. phase voltage)\n", - "V = V1+V2+V3\n", - "n = V/(3*V3)*100\n", - "\n", - "#Result:\n", - "print \"String efficiency is\",round(n),\"%\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "String efficiency is 95.0 %\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.13, Page Number: 184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 1 #conductor radius(cm)\n", - "d = 100 #conductor spacing(cm)\n", - "go = 30/math.sqrt(2) #Dielectric strength of air,(rms)(kV/cm)\n", - "dl = 0.952 #air density factor\n", - "mo = 0.9 #irregularity factor\n", - "\n", - "#Calculation:\n", - "Vc = mo*go*dl*r*math.log(d/r) #kV/phase\n", - "Vl = Vc*3**0.5 #kV/line\n", - "\n", - "#Result:\n", - "print \"The disruptive critical voltage for the line is\",round(float(Vl),2),\"kV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The disruptive critical voltage for the line is 144.97 kV\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.14, Page Number: 184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "r = 0.978 #conductor radius(cm)\n", - "go = round(30/2**0.5,1) #Dielectric strength of air,rms(kV/cm)\n", - "Vc = 210/3**0.5 #Disruptive voltage/phase(kV)\n", - "mo = 1 #irregularity factor(for smooth conductor)\n", - "dl = 1 #air density factor(at std pressure and temperature)\n", - "\n", - "#Calculation:\n", - "d = r*10**(Vc/(2.3*mo*go*dl*r))\n", - "\n", - "#Result:\n", - "print \"The spacing between the conductors is\",round(d),\"cm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The spacing between the conductors is 341.0 cm\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.15, Page Number: 185" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 1.5 #conductor radius(cm)\n", - "t = 40 #temperature(deg C)\n", - "b = 76 #atmospheric pressure(cm)\n", - "mo = 0.85 #irregularity factor\n", - "f = 50 #Hz\n", - "d = 200 #conductor spacing(cm)\n", - "go = 30/2**0.5 #Dielectric strength of air,rms(kV/cm)\n", - "Vl = 220 #line voltage(kV)\n", - "\n", - "#Calculation:\n", - "dl = round(3.92*b/(273+t),3)\n", - "\n", - "Vc = round(mo*go*dl*r*round(math.log(d/r),2),1) #Critical disruptive voltage per phase(kV)\n", - "V = round(Vl/3**0.5) #kV/phase\n", - "P = 242.2/dl*(f+25)*(r/d)**0.5*(V-Vc)**2*10**-5 #kW/km/phase\n", - "Pl = 3*P #corona loss(kW)\n", - "\n", - "#Result:\n", - "print \"Total corona loss per km for three phases is\",round(Pl,5),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total corona loss per km for three phases is 0.05998 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.16, Page Number: 185" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "P1 = 53 #corona loss(kW)\n", - "V1 = 106 #operating voltage(kV)\n", - "P2 = 98 #corona loss(kW)\n", - "V2 = 110.9 #operating voltage(kV)\n", - "V3 = 113 #opeating voltage(kV)\n", - "\n", - "\n", - "#Calculation:\n", - "#As f, \u03b4, r and d are the same for the two cases,\n", - "#therfore, P \u221d (V \u2212 Vc)**2\n", - "k,Vc = symbols('k Vc') #k = proportionality constant\n", - " #Vc = critical disuptive voltage(kV)\n", - "#for 1st case,\n", - "# V1/3**0.5 = k*(64 - Vc)**2\n", - "# V2/3**0.5 = k*(61\u00b72 - Vc)**2\n", - "# Dividing above equations & solving,\n", - "Vc1 = round(solve(((64-Vc)/(61.2-Vc))-math.sqrt(98/53),Vc)[0],2)\n", - "Vc1 = 54\n", - "#Let W kilowatt be the power loss at 113 kV.\n", - "#W = k*(113/3**0.5-Vc1)**2\n", - "W = P1*((65.2-Vc1)/(61.2-Vc1))**2\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"The disruptive critical voltage at 113 kV is\",Vc1,\"kV\"\n", - "print \"The corona loss at 113 kV is\",round(W),\"kW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The disruptive critical voltage at 113 kV is 54 kV\n", - "The corona loss at 113 kV is 128.0 kW\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.17, Page Number: 190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "w = 680 #weigth of conductor(kg/km)\n", - "l = 260 #length ofspan(m)\n", - "u = 3100 #ultimate strength(kg)\n", - "sf = 2 #safety factor\n", - "h = 10 #ground clearance(m)\n", - "\n", - "\n", - "#Calculation:\n", - "T = u/sf #working tension(kg)\n", - "s = w*l**2/(8*T*1000) #span(m)\n", - "H = h+s\n", - "\n", - "\n", - "#Result:\n", - "print \"Conductor should be supported at a height of \",round(H,1),\"m\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Conductor should be supported at a height of 13.7 m\n" - ] - } - ], - "prompt_number": 56 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.18, Page Number: 190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "l = 150 #length ofspan(m)\n", - "a = 2 #conductor cross-section(cm**2)\n", - "go = 9.9 #specific gravity of conductor(gm/cm**3)\n", - "ww = 1.5 #Wind force/m length of conductor(kg)\n", - "T = 2000 #working tension(kg)\n", - "\n", - "#Calculation:\n", - "w = go*a*1/10 #Wt. of conductor/m length(kg)\n", - "wt = round((w**2+ww**2)**0.5,2) #Total wt of 1m length of conductor(kg)\n", - "s = wt*l**2/(8*T) #sag(m)\n", - "#This is the value of slant sag in a direction making \n", - "#an angle theta with the vertical\n", - "\n", - "theta = math.atan(ww/w)\n", - "Vs = s*math.cos(theta)\n", - "\n", - "#Result:\n", - "print \"The sag is\",round(s,2),\"m\"\n", - "print \"The vertical sag is\",round(Vs,2),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sag is 3.49 m\n", - "The vertical sag is 2.78 m\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.19, Page Number: 191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "l = 200 #span length(m)\n", - "w = 1170/1000 #weigth of conductor(kg)\n", - "u = 4218 #Ultimate Strength(kg/cm**2)\n", - "sf = 5 #safety factor\n", - "a = 1.29 #cross-section of conductor(cm**2)\n", - "P = 122 #wind pressure(kg/m**2)\n", - "\n", - "#Calculation:\n", - "T = u/sf*a #working tension(kg)\n", - "d = round((4*a/math.pi)**0.5,2) #diameter of conductor(cm)\n", - "ww = P*d*10**-2 #Wind force/m length,\n", - "wt = (ww**2+w**2)**0.5 #total wt of conductor per metre length\n", - "S = wt*l**2/(8*T)\n", - "theta = math.atan(ww/w)\n", - "VS = S*math.cos(theta)\n", - "\n", - "#Result:\n", - "print \"The sag is\",round(S,2),\"m\"\n", - "print \"The vertical sag is\",round(VS,2),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sag is 8.97 m\n", - "The vertical sag is 5.38 m\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.20, Page Number: 191" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "l = 275 #span length(m)\n", - "w = 0.865 #weigth of conductor/m(kg)\n", - "d = 1.96 #conductor diameter(cm)\n", - "t = 1.27 #ice coating thickness(cm)\n", - "u = 8060 #Ultimate Strength(kg)\n", - "sf = 2 #safety factor\n", - "a = 1.29 #cross-section of conductor(cm**2)\n", - "wo = 0.91 #Weight of 1 c.c. of ice(gm)\n", - "P = 3.9 #wind pressure(gm/cm**2)\n", - "\n", - "#Calculation:\n", - "T = u/sf #working tension(kg)\n", - "v = 3.14*t*(d+t)*100 #Volume of ice per metre(cm**3)\n", - "wi = v*wo/1000 #kg\n", - "ww = P*(d+2*t)*100/1000 #kg\n", - "wt = ((w+wi)**2+ww**2)**0.5 #total weight(kg)\n", - "S = wt*l**2/(8*T) #sag(m)\n", - "\n", - "\n", - "#Result:\n", - "print \"Sag is\",round(S,1),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Sag is 6.3 m\n" - ] - } - ], - "prompt_number": 60 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.21, Page Number: 192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "Sv = 2.35 #vertical sag(m)\n", - "P = 1.5 #wind pressure(kg/m)\n", - "B = 2540 #breaking stress(kg/cm**2)\n", - "w = 1.125 #wt of conductor(kg/m)\n", - "l = 214 #length of conductor(m)\n", - "a = 3.225 #conductor cross-section\n", - "\n", - "\n", - "#Calculation:\n", - "f = symbols('f') #safety factor\n", - "wt = (w**2+P**2)**0.5 #Total wt. of one m length of conductor\n", - "T = B*a/f #working stress(kg)\n", - "cos_theta = w/wt\n", - "S = Sv/cos_theta #slant sag\n", - "T1 = wt*l**2/(8*S) \n", - "f1 = solve(T-T1,f)[0] #safety factor\n", - "\n", - "\n", - "#Result:\n", - "print \"Safety factor is\",round(f1)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Safety factor is 3.0\n" - ] - } - ], - "prompt_number": 61 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.22, Page Number: 192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "\n", - "#Variable declaration:\n", - "l = 150 #span length(m)\n", - "u = 5000 #ultimate strength(kg/cm**2)\n", - "go = 8.9 #specific gravity of material(gm/cc)\n", - "P = 1.5 #wind pressure(kg/m)\n", - "sf = 5 #safety factor\n", - "a = 2 #cross-section of conductor(cm**2)\n", - "h = 7 #ground clearance(m)\n", - "\n", - "#Calculation:\n", - "w = a*go*100/1000 #weight of conductor per m(kg)\n", - "T = u*a/sf #working stress per m(kg)\n", - "wt = (w**2+P**2)**0.5 #Total wt of 1 m length of conductor(kg)\n", - "S = wt*l**2/(8*T) #slant sag(m)\n", - "Sv = S*w/wt #conductor vertical sag(m)\n", - "H = h+Sv #m\n", - "\n", - "#Result:\n", - "print \"Conductor should be supported at a height of\",round(H,1),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Conductor should be supported at a height of 9.5 m\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.23, Page Number: 193" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "l = 500 #distance b/w the two towers(m)\n", - "T = 1600 #tension in the conductor(kg)\n", - "w = 1.5 #weight of the conductor(kg/m)\n", - "h1 = 30 #height of 1st tower(m)\n", - "h2 = 90 #height of 2nd tower(m)\n", - "\n", - "\n", - "\n", - "#Calculation:\n", - "h = h2-h1 #difference in levels(m)\n", - "x1,x2 = symbols('x1 x2')\n", - "x2 = l-x1\n", - "S1 = w*x1**2/(2*T) #m\n", - "S2 = w*x2**2/(2*T) #m\n", - "x11 = solve(S2-S1-h,x1)[0]\n", - "S1 = w*x11**2/(2*T) #m\n", - "#Let the mid-point P be at a distance x from the lowest point O\n", - "x = l/2-x11\n", - "Smid = w*x**2/(2*T) #m\n", - "\n", - "\n", - "#Result:\n", - "print \"The min. clearance of the conductor and water is \",round(h1-S1),\"m\"\n", - "print \"The clearance mid-way b/w the supports is\",round(Smid+h1-S1,2),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The min. clearance of the conductor and water is 23.0 m\n", - "The clearance mid-way b/w the supports is 30.7 m\n" - ] - } - ], - "prompt_number": 62 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.24, Page Number: 194" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "l = 600 #distance b/w the two towers(m)\n", - "f = 5 #safety factor\n", - "U = 8000 #kg/cm**2\n", - "a = 2.2 #area of cross-section(cm**2)\n", - "w = 1.925 #weight of the conductor(kg/m)\n", - "h = 15 #difference in towers levels(m)\n", - "wi = 1 #ice weight(kg)\n", - "\n", - "#Calculation:\n", - "T = U*a/f #tension in the conductor(kg)\n", - "wt = wi+w #total weight of conductor(kg)\n", - "x1,x2 = symbols('x1 x2')\n", - "x2 = l-x1\n", - "S1 = wt*x1**2/(2*T) #m\n", - "S2 = wt*x2**2/(2*T) #m\n", - "x11 = solve(S2-S1-h,x1)[0]\n", - "x22 = l-x11\n", - "S22 = wt*x22**2/(2*T) #m\n", - "\n", - "\n", - "#Result:\n", - "print \"The sag from the taller of the two supports is\",round(S22,2),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The sag from the taller of the two supports is 45.27 m\n" - ] - } - ], - "prompt_number": 63 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.25, Page Number: 195" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "#Variable declaration:\n", - "l = 400 #distance b/w the two towers(m)\n", - "T = 2000 #tension in the conductor(kg)\n", - "w = 1 #weight of the conductor(kg/m)\n", - "h1 = 40 #height of 1st tower(m)\n", - "h2 = 90 #height of 2nd tower(m)\n", - "\n", - "#Calculation:\n", - "h = h2-h1 #difference in levels(m)\n", - "x1,x2 = symbols('x1 x2')\n", - "x2 = l-x1\n", - "S1 = w*x1**2/(2*T) #m\n", - "S2 = w*x2**2/(2*T) #m\n", - "x11 = solve(S2-S1-h,x1)[0]\n", - "S1 = w*x11**2/(2*T) #m\n", - "x_mid = 50+400/2 #Horizontal distance of mid-point P from lowest point O\n", - "Sp = w*x_mid**2/(2*T) #SAg at P(m)\n", - "S2 = w*(l-x11)**2/(2*T) #m\n", - "hc = h2-S2+Sp #Clearance of mid-point P above water level(m)\n", - "\n", - "\n", - "\n", - "#Result:\n", - "print \"Clearance of mid-point P above water level is\",round(hc),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Clearance of mid-point P above water level is 55.0 m\n" - ] - } - ], - "prompt_number": 127 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.26, Page Number: 195" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from pylab import *\n", - "from sympy import *\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "T = 1500 #tension in the conductor(kg)\n", - "w = 1 #weight of the conductor(kg/m)\n", - "DE = 300 #distance b/w tower's top(m)\n", - "H = 22 #height of each tower(m)\n", - "\n", - "#Calculation:\n", - "# Suppose, the conductors are supported between towers AD and BE over\n", - "# a hillside having gradient of 1 : 20.\n", - "# Let the lowest point on the conductor is O and\n", - "# sin(theta) = 1/20.\n", - "# since, the lowest conductor is fixed 2m below the top of each tower.\n", - "theta = math.asin(1/20)\n", - "BE = H-2 #Effective height of each tower(m)\n", - "EC = DE*1/20\n", - "x1,x2 = symbols('x1 x2')\n", - "DC = (DE**2-EC**2)**0.5 #Horizontal distance b/w two towers(m)\n", - "x2 = DC-x1\n", - "S1 = w*x1**2/(2*T) #m\n", - "S2 = w*x2**2/(2*T) #m\n", - "x11 = solve(S2-S1-EC,x1)[0]\n", - "S2 = w*(DC-x11)**2/(2*T) #m\n", - "BC = BE+EC\n", - "OG = BC-S2-x11*math.tan(theta)\n", - "\n", - "#Result:\n", - "print \"Clearance of the lowest point O from the ground is\",round(OG,2),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Clearance of the lowest point O from the ground is 14.4 m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.27, Page Number: 196" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "from sympy import *\n", - "\n", - "\n", - "#Variable declaration:\n", - "l = 300 #distance b/w tower(m)\n", - "S = 10 #span(m)\n", - "h = 8 #clearance(m)\n", - "\n", - "\n", - "#Calculation:\n", - "#On level ground:\n", - "r = 8*S/l**2 #ratio w/T\n", - "\n", - "\n", - "#On sloping ground:\n", - "#The conductors are supported between towers AD and BE \n", - "#over a sloping ground having a gradient 1 in 15 as shown above.\n", - "\n", - "DE = 300\n", - "sin_theta = 1/15\n", - "\n", - "h = DE*sin_theta #Vertical distance b/w the two towers(m)\n", - "BE = S+h #height of tower(m)\n", - "x1,x2,x = symbols('x1 x2 x')\n", - "x2 = l-x1\n", - "S1 = r*x1**2/2 #m\n", - "S2 = r*x2**2/2 #m\n", - "x11 = solve(S2-S1-h,x1)[0]\n", - "S11 = r*x11**2/(2) #m\n", - "x22 = l-x11\n", - "S22 = r*x22**2/(2) #m\n", - "tan_theta = 1/15\n", - "GF = x11*tan_theta\n", - "BC = h-S22-GF\n", - "#Since O is the origin, the equation of slope of ground is given by :\n", - "y = x/15-10.5\n", - "#C = Equation of conductor curve \u2212 y\n", - "C = r*x**2/2-y\n", - "C1 = diff(C,x)\n", - "xm = solve(C1,x)[0]\n", - "#putting values of xm in above equations,\n", - "ym = xm/15-10.5\n", - "Cm = C = r*xm**2/2-ym\n", - "\n", - "\n", - "#Result:\n", - "print \"Required minimum clearance is\",round(Cm),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Required minimum clearance is 8.0 m\n" - ] - } - ], - "prompt_number": 129 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/chapter9_1.ipynb b/Principles_of_Power_System/chapter9_1.ipynb deleted file mode 100644 index 925aa356..00000000 --- a/Principles_of_Power_System/chapter9_1.ipynb +++ /dev/null @@ -1,740 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1c5f89ed0470787a153a235132b85821455bc93d217ca226b9eba94372c90683" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9: Electrical Design of Overhead\n", - "Lines" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.1, Page Number: 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "d = 200 #Spacing of conductors(cm)\n", - "r = 1.2/2 #Radius of conductor(cm)\n", - "\n", - "\n", - "#Calculation:\n", - "L = 10**-7*(1+4*math.log(d/r))*10**3 #Loop inductance per m length of the line(H)\n", - "\n", - "\n", - "#Result:\n", - "print \" The loop inductance per km of the line is\",round(L*1000,3),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The loop inductance per km of the line is 2.424 mH\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.2, Page Number: 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "d = 300 #Spacing of conductors(cm)\n", - "r = 1 #Radius of conductor(cm)\n", - "u1 = 1 #relative permeability of copper\n", - "u2 = 100 #relative permeability of steel\n", - "\n", - "#Calculation:\n", - "#(i) With copper conductors,\n", - "Lc = 10**-7*(u1+4*math.log(d/r))*10**3 #Loop inductance/km\n", - "\n", - "#(ii) With steel conductors,\n", - "Ls = 10**-7*(u2+4*math.log(d/r))*10**3 ##Loop inductance/km\n", - "\n", - "\n", - "#Result:\n", - "print \"The loop inductance per km length of the line are:\"\n", - "print \"(i) for copper, Lc\",round(Lc*1000,2),\"mH and\"\n", - "print \"(ii) for steel line, Ls =\",round(Ls*1000,2),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The loop inductance per km length of the line are:\n", - "(i) for copper, Lc 2.38 mH and\n", - "(ii) for steel line, Ls = 12.28 mH\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.3, Page Number: 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "d = 200 #cm\n", - "r = 0.62 #conductor radius(cm)\n", - "\n", - "\n", - "#Calculation:\n", - "L = 10**-7*(0.5+2*math.log(d/r))*10**3 #Inductance/phase/km\n", - "\n", - "#Result:\n", - "print \"The inductance per km of a 3-ph transmission line is\",round(L*10**3,1),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per km of a 3-ph transmission line is 1.2 mH\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.4, Page Number: 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "D12 = 2 #m\n", - "D23 = 2.5 #m\n", - "D13 = 4.5 #m\n", - "r = 0.62 #m\n", - "\n", - "#Calculation:\n", - "Deq = (D12*D23*D13)**(1/3)*100 #Equivalent equilateral spacing(cm)\n", - "L = 10**-7*(0.5+2*math.log(Deq/r))*10**3\n", - "\n", - "\n", - "#Result:\n", - "print \"The inductance per km of the line is\",round(L*1000,3),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per km of the line is 1.274 mH\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.5, Page Number: 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 1.25 #cm\n", - "D12 = 2 #m\n", - "D23 = 2 #m\n", - "D13 = 4 #m\n", - "\n", - "\n", - "#Calculation:\n", - "Deq = (D12*D23*D13)**(1/3)*100 #Equivalent equilateral spacing(m)\n", - "L = 10**-7*(0.5+2*math.log(Deq/r))*10**3\n", - "\n", - "\n", - "#Result:\n", - "print \"The inductance per km of the line is\",round(L*1000,2),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per km of the line is 1.11 mH\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.6, Page Number: 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 0.5 #radius of conductor(m)\n", - "Dab = 25 #cm\n", - "Daa1 = 100 #cm\n", - "Dbb1 = 100 #cm\n", - "Dab1 = 103 #cm\n", - "Da1b = 103 #cm\n", - "Da1b1 = 25 #cm\n", - "\n", - "#Calculation:\n", - "GMR = 0.7788*r #G.M.R. of conductor(cm)\n", - "Ds = (GMR*Daa1)**(1/2) #Self G.M.D. of aa1 combination(cm)\n", - "Dm = (Dab*Dab1*Da1b*Da1b1)**(1/4) #Mutual G.M.D. between a and b(cm)\n", - "L1 = 2*10**-7*math.log(Dm/Ds) #Loop inductance per conductor per m(H)\n", - "L = 2*L1*1000\n", - "\n", - "#Result:\n", - "print \"The inductance per km of the line is\",round(L*1000,2),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per km of the line is 0.84 mH\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.7, Page Number: 216" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "\n", - "#Variable declaration:\n", - "r = 1.3 #conuctor radius(cm)\n", - "Dab = 3 #m\n", - "Dab1 = 6.7 #m\n", - "Da1b = 6.7 #m\n", - "Da1b1 = 3 #m\n", - "Daa1 = 8.48 #m\n", - "Da1a = 8.48 #m\n", - "Dbb1 = 6 #m\n", - "Db1b = 6 #m\n", - "Dca = 6 #m\n", - "Dc1a = 6 #m\n", - "Dca1 = 6 #m\n", - "Dc1a1 = 6 #m\n", - "\n", - "#Calculation:\n", - "GMR = 1.3*0.7788/100 #m\n", - "Daa = GMR\n", - "Da1a1 = GMR\n", - "Dbb = GMR\n", - "Db1b1 = GMR\n", - "Ds1 = (Daa*Daa1*Da1a1*Da1a)**(1/4) #m\n", - "Ds2 = (Dbb*Dbb1*Db1b1*Db1b)**(1/4) #m\n", - "Ds = (Ds1*Ds2*Ds1)**(1/3) #m\n", - "DAB = (Dab*Dab1*Da1b*Da1b1)**(1/4) #m\n", - "DBC = DAB\n", - "DCA = (Dca*Dc1a*Dca1*Dc1a1)**(1/4) #m\n", - "Dm = (DAB*DBC*DCA)**(1/3) #Equivalent mutual G.M.D(m)\n", - "\n", - "L1 = 2*10**-7*math.log(Dm/Ds) #Loop inductance per conductor per m(H)\n", - "L = L1*1000\n", - "\n", - "#Result:\n", - "print \"The inductance per km of the line is\",round(L*1000,2),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per km of the line is 0.58 mH\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.8, Page Number: 217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "r = 0.75 #conductor radius(cm)\n", - "Db1b = 5.5 #m\n", - "Dca = 6 #m\n", - "Dca1 = 4 #m\n", - "Dc1a = 4 #m\n", - "Dc1a1 = 6 #m\n", - "\n", - "\n", - "#Calculation:\n", - "GMR = 0.7788*r #m\n", - "Dab = (3**2+0.75**2)**0.5 #m\n", - "Dab1 = (3**2+4.75**2)**0.5 #m\n", - "Daa1 = (6**2+4**2)**0.5 #m\n", - "Daa = GMR/100 #m\n", - "Da1a1 = Daa #m\n", - "Da1a = Daa1 #m\n", - "Dbb = GMR/100 #m\n", - "Dbb1 = 5.5 #m\n", - "Db1b1 = Dbb #m\n", - "\n", - "Ds1 = (Daa*Daa1*Da1a1*Da1a)**(1/4) #m\n", - "Ds2 = (Dbb*Dbb1*Db1b1*Db1b)**(1/4) #m\n", - "Ds3 = Ds1\n", - "Ds = (Ds1*Ds2*Ds3)**(1/3) #Equivalent self G.M.D. of one phase(m)\n", - "DAB = (Dab*Dab1*Da1b*Da1b1)**(1/4) #m\n", - "DCA = (Dca*Dca1*Dc1a*Dc1a1)**(1/4) #m\n", - "DBC = DAB #m\n", - "Dm = (DAB*DBC*DCA)**(1/3) #Equivalent mutual G.M.D.(m)\n", - "\n", - "\n", - "L1 = 2*10**-7*math.log(Dm/Ds) #Loop inductance per conductor per m(H)\n", - "L = L1*1000\n", - "\n", - "#Result:\n", - "print \"The inductance per km of the line is\",round(L*1000,3),\"mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per km of the line is 0.627 mH\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.9, Page Number: 218" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "r = 5.3/100 #conductor radius(m)\n", - "\n", - "#Calculation:\n", - "GMR = 0.7788*r #m\n", - "DAA = GMR #m\n", - "DAA1 = 24 #m\n", - "DA1A1 = DAA #m\n", - "DA1A = 24 #m\n", - "\n", - "DBB = GMR #m\n", - "DBB1 = 24 #m\n", - "DB1B1 = DBB #m\n", - "DB1B = 24 #m\n", - "Ds1 = (DAA*DAA1*DA1A1*DA1A)**(1/4) #m\n", - "Ds2 = (DBB*DBB1*DB1B1*DB1B)**(1/4) #m\n", - "#Similarly:\n", - "Ds3 = 0.995 #m\n", - "Ds = (Ds1*Ds2*Ds3)**(1/3) #Equivalent self-G.M.D. of one phase(m)\n", - "#DAB = (DAB \u00d7 DAB\u2032 \u00d7 DA\u2032\u0392 \u00d7 DA\u2032B\u2032)**1/4\n", - "DAB = (8*32*16*8)**(1/4) #m\n", - "DBC = DAB #m\n", - "#DCA = (DCA \u00d7 DCA\u2032 \u00d7 DC\u2032A \u00d7DC\u2032A\u2032)1/4 #m\n", - "DCA = (16*8*40*16)**(1/4) #m\n", - "\n", - "Dm = (DAB*DBC*DCA)**(1/3) #m\n", - "\n", - "L = 2*10**-7*math.log(Dm/Ds) #Loop inductance per conductor per m(H)\n", - "\n", - "\n", - "#Result:\n", - "print \"The inductance per m of the line is\",round(L*10**7,2),\"* 10**-7 H/m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The inductance per m of the line is 5.36 * 10**-7 H/m\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.10, Page Number: 219" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "r = 1 #consuctor radius(cm)\n", - "\n", - "#Calculation:\n", - "#Mutual G.M.D., Dm = (Dab*Dab'*Da'b*Da'b')**(1/4)\n", - "Dm = (120*140*100*120)**(1/4) #m\n", - "\n", - "#Self G.M.D., Ds = (Daa*Daa'*Da'a'*Da'a)**(1/4)\n", - "#Daa = Da'a' = 0.7788 cm; Daa' = Da'a = 20 cm\n", - "Ds = (0.7788*20*0.7788*20)**(1/4) #cm\n", - "L = 4*10**-4*math.log(Dm/Ds) #H/km\n", - "\n", - "#Result:\n", - "print \"The total inductance of the line per km is\",round(L*1000,2),\"mH/km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The total inductance of the line per km is 1.36 mH/km\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.11, Page Number: 224" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 1 #conductor radius(cm)\n", - "d = 300 #conductor spacing(cm)\n", - "e = 8.854*10**-12 #permitivity of free space(F/m)\n", - "\n", - "\n", - "#Calculation:\n", - "C = math.pi*e/math.log(d/r) #F/m\n", - "\n", - "#Result:\n", - "print \"Capacitance of the line per km is\",round(C*10**11,4),\"* 10**-2 uF/km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance of the line per km is 0.4877 * 10**-2 uF/km\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.12, Page Number: 225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 0.625 #conductor radius(cm)\n", - "d = 200 #conductor spacing(cm)\n", - "e = 8.854*10**-12 #permitivity of free space(F/m)\n", - "\n", - "\n", - "#Calculation:\n", - "C = 2*math.pi*e/math.log(d/r) #F/m\n", - "\n", - "#Result:\n", - "print \"Capacitance of the line per km is\",round(C*10**9,4),\" uF/km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance of the line per km is 0.0096 uF/km\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.13, Page Number: 225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "d1 = 2 #m\n", - "d2 = 2.5 #m\n", - "d3 = 4.5 #m\n", - "r = 0.625 #conductor raius(cm)\n", - "l = 100 #line length(km)\n", - "Vl = 66000 #line voltage(V)\n", - "f = 50 #frequency of current(Hz)\n", - "e = 8.854*10**-12 #permitivity of free space(F/m)\n", - "\n", - "#Calculation:\n", - "d = (d1*d2*d3)**(1/3)*100 #cm\n", - "\n", - "#(i)Line to neutral capacitance,\n", - "C1 = 2*math.pi*e/math.log(d/r)*10**9 #uF/km\n", - "C11 = C1*100 #uF\n", - "\n", - "#(ii)Charging current per phase,\n", - "Ic = Vl*2*math.pi*f*C11*10**-6/(3**0.5) #A\n", - "\n", - "\n", - "#Result:\n", - "print \"Capacitance per phase is\",round(C11,2),\"uF\"\n", - "print \"Charging current per phase is\",round(Ic,1),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance per phase is 0.91 uF\n", - "Charging current per phase is 10.9 A\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.14, Page Number: 225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable declaration:\n", - "r = 1 #conductor radius(cm)\n", - "d = 250 #equilateral conductor spacing(cm)\n", - "e = 8.854*10**-12 #permitivity of free space(F/m)\n", - "\n", - "\n", - "#Calculation:\n", - "C = 2*math.pi*e/math.log(d/r)*10**9 #uF/km\n", - "C1 = C*100 #F\n", - "\n", - "#Result:\n", - "print \"Capacitance of the line per km is\",round(C1,4),\"uF/phase\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance of the line per km is 1.0075 uF/phase\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 9.15, Page Number: 226" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "import math\n", - "\n", - "#Variable Declaration:\n", - "d1 = 4 #m\n", - "d2 = 4 #m\n", - "d3 = 8 #m\n", - "r = 1 #conductor raius(cm)\n", - "l = 100 #line length(km)\n", - "Vl = 132000 #line voltage(V)\n", - "f = 50 #frequency of current(Hz)\n", - "e = 8.854*10**-12 #permitivity of free space(F/m)\n", - "\n", - "#Calculation:\n", - "Deq = (d1*d2*d3)**(1/3)*100 #cm\n", - "C = 2*math.pi*e/math.log(Deq/r)*10**9 #uF/km\n", - "C1 = C*100 #uF\n", - "Ic = Vl*2*math.pi*f*C1*10**-6/(3**0.5) #A\n", - "\n", - "\n", - "#Result:\n", - "print \"Charging current per phase is\",round(Ic,2),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Charging current per phase is 21.41 A\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Principles_of_Power_System/screenshots/daily_1.png b/Principles_of_Power_System/screenshots/daily_1.png old mode 100644 new mode 100755 diff --git a/Principles_of_Power_System/screenshots/dcdistribution_1.png b/Principles_of_Power_System/screenshots/dcdistribution_1.png old mode 100644 new mode 100755 diff --git a/Principles_of_Power_System/screenshots/unsymmetrical_1.png b/Principles_of_Power_System/screenshots/unsymmetrical_1.png old mode 100644 new mode 100755 diff --git a/Problems_In_Hydraulics/README.txt b/Problems_In_Hydraulics/README.txt new file mode 100755 index 00000000..058b166c --- /dev/null +++ b/Problems_In_Hydraulics/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ankit Barot +Course: btech +College/Institute/Organization: Anupam-Mistubishi Heavy Industries Ltd., India +Department/Designation: Graduate Engineer Trainee +Book Title: Problems In Hydraulics +Author: R. S. Paradise +Publisher: Blcakie & Son Ltd, London +Year of publication: 1953 +Isbn: 978-1577664550 +Edition: 3 \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch1.ipynb b/Problems_In_Hydraulics/ch1.ipynb new file mode 100755 index 00000000..8ed87e00 --- /dev/null +++ b/Problems_In_Hydraulics/ch1.ipynb @@ -0,0 +1,466 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:82344ff688f3e86a09716345a8eb43cec4a8aadc2157f526516e21d9f1e84d30" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Hydrostatics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "w= 62.4 #lb/ft**3\n", + "A= 18. #ft**2\n", + "x= 6. # height ft\n", + "kg= 6.\n", + "y= 2. #ft hinges\n", + "y1= 5. #ft\n", + "\n", + "#CALCULATIONS\n", + "F= w*A*x\n", + "F1= F/2\n", + "Ft= (F*y-F1*(y1/2))/y1\n", + "Fb= F1-Ft\n", + "\n", + "#RESULTS\n", + "print 'Force exerted on the bolt = %.f lb'%(F1)\n", + "print ' Force exerted on the hinge = %.f lb'%(Ft)\n", + "print ' Force exerted on the bolt = %.f lb'%(Fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force exerted on the bolt = 3370 lb\n", + " Force exerted on the hinge = 1011 lb\n", + " Force exerted on the bolt = 2359 lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "h1= 11.54 \t#ft\n", + "h2= 16.33 \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "x1= 7.69 \t#ft\n", + "x2= 14.09 \t#ft\n", + "x3= 18.23 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Ft= round(w*h1**2/2)\n", + "\n", + "#RESULTS\n", + "print 'h1 = %.2f ft'%(h1)\n", + "print ' h2 = %.2f ft'%(h2)\n", + "print ' h1+ = %.2f ft'%(x1)\n", + "print ' h2+ = %.2f ft'%(x2)\n", + "print ' h3+ = %.2f ft'%(x3)\n", + "print ' Thrust force = %.f lb/ft run'%(round(Ft,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h1 = 11.54 ft\n", + " h2 = 16.33 ft\n", + " h1+ = 7.69 ft\n", + " h2+ = 14.09 ft\n", + " h3+ = 18.23 ft\n", + " Thrust force = 4160 lb/ft run\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "spo= 0.9 # gravity\n", + "h= 3. \t#ft depth\n", + "d= 2. \t #ft depth of water\n", + "w= 62.4 \t#lb/ft**3\n", + "H= 0.71 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "do= spo*w\n", + "de= w*d\n", + "bc= do*h\n", + "Pt= (bc*(h/2)+bc*d+de*(d/2))*(h+d)\n", + "y= (bc*(h/2)+bc*d+de*(d/2)*(d/3))*(h+d)/Pt+H\n", + "\n", + "#RESULTS\n", + "print \"Total pressure = %d lb\"%(Pt)\n", + "print ' position of centre of pressure above the base = %.2f ft position of centre of pressure above the axis '%(y)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure = 3572 lb\n", + " position of centre of pressure above the base = 1.65 ft position of centre of pressure above the axis \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "a= 30. \t#degrees\n", + "b= 30. \t#degrees\n", + "h= 20. \t#ft width of lock\n", + "h1= 10. \t#ft water level\n", + "h2= 15. \t#ft water level\n", + "h3= 16. \t#ft high\n", + "w= 62.4 \t#lb/ft**3\n", + "h4= 10./3 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Rt= (1./h3)*((w*(h*h2**2*(h2/3)/(2*math.sqrt(3))))-(w*(h*h1**2*h4/(2*math.sqrt(3)))))\n", + "R= ((w*(h*h2**2/(2*math.sqrt(3))))-(w*(h*h1**2/(2*math.sqrt(3)))))\n", + "Rb= R-Rt\n", + "\n", + "#RESULTS\n", + "print 'Force at the hinge = %.f lb '%(Rt)\n", + "print ' Force at the hinge = %.f lb '%(Rb)\n", + "\n", + "# Note : Round off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force at the hinge = 17826 lb \n", + " Force at the hinge = 27208 lb \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "#initialisation of variables\n", + "x= 32. \t #ft\n", + "h= 60. \t#ft depth\n", + "w= 62.4 \t#lb/ft**3\n", + "AE= 20. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Vabc= 2*x*h/3\n", + "vc= Vabc*w\n", + "Tab= w*h**2/2\n", + "Rt= math.sqrt(vc**2+Tab**2)/2240\n", + "A= math.degrees(math.atan(vc/Tab))\n", + "AD= x-AE+AE*(1/(math.tan(math.radians(A))))\n", + "\n", + "\n", + "#RESULTS\n", + "print \"resulmath.tant thrust = %.1f tons\"%(Rt)\n", + "print \" Angle = %.2f degrees\"%(A)\n", + "print ' AD = %.1f ft '%(AD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resulmath.tant thrust = 61.5 tons\n", + " Angle = 35.42 degrees\n", + " AD = 40.1 ft \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "wdc= 3*math.sqrt(3) \t#ft\n", + "wdo= math.sqrt(3)\n", + "ac= 30. \t#degrees\n", + "ao= 60. \t#degrees\n", + "hob= 3. \t#ft\n", + "haf= 2.6 \t#ft\n", + "hfc= 3. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "V= 5.63 \t#ft**3\n", + "h= 4.3 \t#ft\n", + "y= 3.6 \t #ft\n", + "\n", + "#CALCULATIONS\n", + "W1= int(wdc*hfc*w/2)\n", + "Hbc= round(w*hob*(hob/2))\n", + "W2= int(V*w)\n", + "W3= int(w*haf*h)\n", + "Vt= W1+W2\n", + "Vht= Hbc+W3\n", + "Rt= int(math.sqrt(Vt**2+Vht**2))\n", + "A= math.degrees(math.atan(Vht/Vt))\n", + "x= (W1*(wdo-(hob/2))+Hbc*y)/Rt\n", + "OP= x/math.sin(math.radians(A))\n", + "AP= hob+OP\n", + "\n", + "#RESULTS\n", + "print \"Resultant thrust = %d lb\"%(Rt)\n", + "print \" Angle = %.2f degrees \"%(A)\n", + "print ' Distance from A till horizontal thrust = %.3f ft '%(AP)\n", + "\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant thrust = 1287 lb\n", + " Angle = 49.44 degrees \n", + " Distance from A till horizontal thrust = 4.150 ft \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 96. # T air\n", + "T= 10.5 \t#C\n", + "K1= 288. \t#C temperature gound level\n", + "K2= 0.0015 \t#C**-1 temperature gradient\n", + "h= 3000. \t#ft height\n", + "P1= 14.69\n", + "\n", + "#CALCULATIONS\n", + "P2= P1*10**(((1/(r*K2))*math.log10((K1-K2*h)/K1)))\n", + "w= P2*144/(r*(273+T))\n", + "\n", + "#RESULTS\n", + "print 'Density = %.4f lb/ft**3 '%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density = 0.0697 lb/ft**3 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Hb= 20. \t#in ratio\n", + "Ha= 1. \t#in ratio\n", + "a= 20. \t #degrees\n", + "\n", + "#CALCULATIONS\n", + "hb= Hb*math.sin(math.radians(a))\n", + "dh= hb+Ha\n", + "dP= dh/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Pressure difference between tapping points = %.3f lb/in**2 '%(dP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between tapping points = 0.283 lb/in**2 \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 180. \t#ln/in**2 pressure\n", + "r= 53. #T air\n", + "T= 60. \t#F temperature of air\n", + "w= 62.4 \t#lb/ft**3\n", + "h= 12. \t #in water level\n", + "\n", + "#CALCULATIONS\n", + "R= P*144/(r*(460+T))\n", + "dP= 12*(1-(R/w))\n", + "Pab= dP/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Difference in water level = %.2f in of water '%(dP)\n", + "print \" Pressure difference = %.3f lb/in**2\"%(Pab)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in water level = 11.82 in of water \n", + " Pressure difference = 0.427 lb/in**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch10.ipynb b/Problems_In_Hydraulics/ch10.ipynb new file mode 100755 index 00000000..9cf18748 --- /dev/null +++ b/Problems_In_Hydraulics/ch10.ipynb @@ -0,0 +1,589 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:54b93ceee4137049e1ed8024ecd6ba8e7f6645f46f71063561c8d2f8b4589ff2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Hydraulic Prime Movers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 231. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "vc= 0.97\n", + "r= 0.47\n", + "p= 85. \t#per cent\n", + "A= 170. \t#degrees\n", + "p1= 88. \t#per cent\n", + "l= 950. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "H= v**2/(vc**2*2*g)\n", + "u= r*v\n", + "vr= v-u\n", + "vr1= p*vr/100\n", + "w1= u-vr1*math.cos(math.radians(180-A))\n", + "W= u*(v-w1)/g\n", + "he= W*100/H\n", + "W1= p1*W/100\n", + "oe= W1*100/l\n", + "\n", + "#RESULTS\n", + "print 'hydraulic efficiency = %.f percent'%(he)\n", + "print ' overall efficiency = %.1f percent'%(oe)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hydraulic efficiency = 86 percent\n", + " overall efficiency = 70.2 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 1. \t#in\n", + "v= 95. \t#ft/sec\n", + "F= 173.2 \t#lb\n", + "A= 163. \t#degrees\n", + "H= 500. \t#ft\n", + "Cv= 0.97\n", + "d1= 1.33 \t#ft\n", + "r= 0.47\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= w*math.pi*v/(144*4)\n", + "k= (F-v)/(v*math.cos(math.radians(180-A)))\n", + "v1= Cv*math.sqrt(2*g*H)\n", + "W= v1*w*d**2*math.pi/(4*144)\n", + "N= 60*r*v1/(math.pi*d1)\n", + "whp= (v1-v)*(1+k*math.cos(math.radians(180-A)))*v1*2/550\n", + "Ns= N*whp**0.5/H**1.25\n", + "\n", + "#RESULTS\n", + "print 'specific speed = %.2f r.p.m'%(Ns)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "specific speed = 4.75 r.p.m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "D= 2. \t#ft\n", + "f= 0.005\n", + "l= 10000. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "H= 1000. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "d= (2*D**5/(f*l))**0.25\n", + "v= math.sqrt(8*g*H*D**5/(f*l*d**4+4*D**5))\n", + "HP= w*math.pi*d**2*v**3/(2*g*550*4)\n", + "Q= math.pi*d**2*(HP/67)/4\n", + "\n", + "#RESULTS\n", + "print 'Quantity flowing = %.f cusecs'%(Q)\n", + "\n", + "# rounding off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity flowing = 185 cusecs\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "pl= 122.5 \t# ft\n", + "Hw= 1225 \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "Cd= 0.98\n", + "Cd1= 0.45\n", + "N= 500. \t#r.p.m\n", + "P= 6800. \t#h.p\n", + "n= 0.86\n", + "w= 62.4 \t#lb/ft**2\n", + "l= 5450. \t#ft\n", + "f= 0.005\n", + "A= 18. \t#ft**2\n", + "\n", + "#CALCULATIONS\n", + "Ah= Hw-pl\n", + "js= Cd*math.sqrt(2*g*Ah)\n", + "bs= Cd1*js\n", + "D= bs*60*2/(N*2*math.pi)\n", + "a= P*2*g*550*144/(n*w*js**3*2)\n", + "vp= math.sqrt(pl*2*g/(4*f*l))\n", + "dp= (js*2*4*A/(math.pi*144*vp))**(2./3)\n", + "dp=2.495 \t#ft\n", + "\n", + "#RESULTS\n", + "print 'diameter of bucket circle D = %.1f ft'%(D)\n", + "print ' area of jet = %.f in**2'%(a)\n", + "print ' diameter of pipe = %.1f ft'%(dp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of bucket circle D = 4.5 ft\n", + " area of jet = 18 in**2\n", + " diameter of pipe = 2.5 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "u= 10.*math.pi \t#ft/sec\n", + "u1= 5.*math.pi \t#ft/sec\n", + "a= 20. \t#degrees\n", + "A= 300. \t#r.p.m\n", + "v= 10. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "wi= 2. \t#ft\n", + "d= 6. \t#in\n", + "w1= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "w= v/math.tan(math.radians(a))\n", + "a1= math.degrees(math.atan((v/(u-w))))\n", + "b= math.degrees(math.atan((v/u1)))\n", + "W= u*w/g\n", + "A1= math.pi*wi*d/12\n", + "Q= A1*v\n", + "WHP= W*Q*w1/550\n", + "\n", + "#RESULTS\n", + "print 'Blade angle at inlet is given by = %.2f degrees'%(a1)\n", + "print ' Blade angle at inlet is given by = %.2f degrees'%(b)\n", + "print ' Water horse power = %.1f h.p'%(WHP)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Blade angle at inlet is given by = 68.49 degrees\n", + " Blade angle at inlet is given by = 32.48 degrees\n", + " Water horse power = 95.5 h.p\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "H= 100. \t#ft\n", + "a= 25. \t#degrees\n", + "a1= 20. \t#degrees\n", + "r1= 9./8\n", + "r2= 0.2\n", + "u= 6.63 \t#ft/sec\n", + "w= 62.4 \t#lb/ft**3\n", + "h1= 34. \t#ft\n", + "h2= 100. \t#ft\n", + "r= 0.1\n", + "\n", + "#CALCULATIONS\n", + "f= math.sqrt(H*g/((r1*1/math.tan(math.radians(a))*1/math.tan(math.radians(a1)))+r1*0.5+(r1*0.5**2*0.2/(math.sin(math.radians(a)))**2)+0.1/(math.sin(math.radians(a1+10)))**2))\n", + "W= u*f**2/g\n", + "q= a*H*550/(10*W*w)\n", + "q1= q/w\n", + "A= q/f\n", + "dh= h1+h2-((1+r)*f**2/((math.sin(math.radians(a1)))**2*2*g))\n", + "\n", + "#RESULTS\n", + "print 'f = %.1f ft/sec'%(f)\n", + "print ' Work Done = %.1f ft-lb/lb'%(W)\n", + "print ' Quantity flow = %.1f cusecs'%(q)\n", + "print ' Area form guides = %.3f ft**2'%(A)\n", + "print ' Pressure at entry of level = %.1f ft of water'%(dh)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f = 20.2 ft/sec\n", + " Work Done = 83.9 ft-lb/lb\n", + " Quantity flow = 26.3 cusecs\n", + " Area form guides = 1.302 ft**2\n", + " Pressure at entry of level = 74.5 ft of water\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#initialisation of variables\n", + "d= 8. \t#in\n", + "w= 2. \t#in\n", + "di= 12. \t#in\n", + "wi= 3. \t#in\n", + "a= 24. \t#degrees\n", + "p= 88. \t#per cent\n", + "a1= 85. \t#degrees\n", + "a2= 30. \t#degrees\n", + "p1= 94. \t#per cent\n", + "h= 180. \t#ft\n", + "d1= 18. \t#in\n", + "Cd= 0.92\n", + "g=32.2\n", + "n1= 111. \t#rpm\n", + "\n", + "#calculations\n", + "r1= 1./math.tan(math.radians(a))\n", + "r2= (1./math.tan(math.radians(a1)))+r1\n", + "r3= 2*r2/3\n", + "r4= (1/math.tan(math.radians(a2)))-r3\n", + "a3= math.tan(math.radians(1/r4))\n", + "r5= math.sin(math.radians(a3))\n", + "f= math.sqrt(g*h*(p/100.)/(r1*r2+r3*r4+(r5**2/2)))\n", + "A= r2*f/(d/12)\n", + "N= (A*60/(2*math.pi))-n1\n", + "W= (r1*r2+r3*r4)*f**2/g\n", + "Q= math.pi*(d1/12)*(w/12)*Cd*f*62.08\n", + "whp= W*Q/550\n", + "bhp= p1*whp/100\n", + "\n", + "#RESULTS\n", + "print 'Speed = %.f rpm'%(N)\n", + "print ' output horsepower = %.f hp'%(bhp)\n", + "\n", + "# slightly change in r1,r2,r3 and that leads to some error in answer. Please check manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed = 905 rpm\n", + " output horsepower = 369 hp\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "N= 428.6 \t#r.p.m\n", + "D= 5. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "hp= 16800. \t#hp\n", + "Qw= 435. \t#cuses\n", + "g= 32.2 \t#ft/sec**2\n", + "v= 32. \t#ft/sec\n", + "v1= 24. \t#f/sec\n", + "H= 200. \t#ft\n", + "lh1= 0.32 \t#ft lb/lb\n", + "\n", + "#CALCULATIONS\n", + "u= math.pi*D*N/60\n", + "W= hp*550/(Qw*w)\n", + "w= W*g/u\n", + "a= math.radians(math.tan(v/w))\n", + "va= math.sqrt(w**2+v**2)\n", + "b= math.radians(math.tan(v/(u-w)))\n", + "B= 180-b\n", + "vew= va**2/(2*g)\n", + "ve1w= v1**2/(2*g)\n", + "LH= H+vew-ve1w-W+lh1\n", + "\n", + "#RESULTS\n", + "print ' Absolute velocity at entry to runner = %.1f ft/sec'%(va)\n", + "print ' Loss of head in runner = %.2f ft lb/lb'%(LH)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Absolute velocity at entry to runner = 102.8 ft/sec\n", + " Loss of head in runner = 15.05 ft lb/lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "#initialisation of variables\n", + "A1= 25. \t#degrees\n", + "A2= 80. \t#degrees\n", + "H1= 100. \t#ft\n", + "H2= 13. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "v= 8. \t#ft/sec\n", + "d= 3.5 \t#in\n", + "de= 15.4 \t#in\n", + "b= 1.5 \t#in\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "W= H1-H2-(v**2/(2*g))\n", + "f= math.sqrt(W*g/(1/math.tan(math.radians(A1))*(1/math.tan(math.radians(A1))-1/math.tan(math.radians(A2)))))\n", + "u= f*(1/math.tan(math.radians(A1))-1/math.tan(math.radians(A2)))\n", + "V= d*u/7.7\n", + "r= math.degrees(math.atan(f/V))\n", + "N= 60*u*12/(math.pi*de)\n", + "Q= math.pi*de*f*b/144\n", + "HP= Q*w*W/550\n", + "Ns= N*math.sqrt(HP)/H1**1.25\n", + "di= math.sqrt(Q*4*144/(math.pi*f))\n", + "\n", + "#RESULTS\n", + "print 'angle = %.f degrees'%(r)\n", + "print \" Angular speed = %.1f rpm\"%(Ns)\n", + "print ' inlet diameter to draft tube = %.2f in'%(di)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angle = 48 degrees\n", + " Angular speed = 26.6 rpm\n", + " inlet diameter to draft tube = 9.61 in\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12 Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "H= 82.1 \t#ft\n", + "h= 90. \t#ft\n", + "k= 0.00646\n", + "k1= 0.00454\n", + "vd= 11. \t#ft/sec\n", + "P= 0.53 \t#hp\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt((1/k))*math.sqrt(h-H)\n", + "Qu= Q/math.sqrt(H)\n", + "Q1= math.sqrt(vd/k1)\n", + "hf= Q1**2*k\n", + "Qu1= Q1/math.sqrt(h-hf)\n", + "Pu= P*(h-hf)**1.5\n", + "\n", + "#RESULTS\n", + "print 'Qu = %.2f cuses'%(Qu)\n", + "print ' Q = %.1f cuses'%(Q1)\n", + "print ' power Developed = %.f hp'%(Pu)\n", + "\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Qu = 3.86 cuses\n", + " Q = 49.2 cuses\n", + " power Developed = 340 hp\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch11.ipynb b/Problems_In_Hydraulics/ch11.ipynb new file mode 100755 index 00000000..3b3ec8a7 --- /dev/null +++ b/Problems_In_Hydraulics/ch11.ipynb @@ -0,0 +1,745 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f1e32f78d016d65eaf62d619ce157e62f2d402e55bfc70a9a046c3e8d919d007" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Pumping Machinery" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "\n", + "import math \n", + "h= 75. \t#ft\n", + "e= 0.75\n", + "k= 0.01\n", + "Q= 3000. \t#gal/min\n", + "k1= 1.2\n", + "N= 1500.\n", + "g= 32.2 \t#ft/sec**2\n", + "D= 0.836 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "W= h/e\n", + "v1= math.sqrt((W-h)/k)\n", + "Q1= Q/374.06\n", + "f1= Q1/(k1*D**2)\n", + "u1= math.pi*D*N/60\n", + "w1= W*g/u1\n", + "B= math.degrees(math.atan((f1/(u1-w1))))\n", + "\n", + "#RESULTS\n", + "print 'Diameter of impeller = %.3f ft '%(D)\n", + "print ' Blade angle at outlet edge of impeller = %.f degrees '%(B)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of impeller = 0.836 ft \n", + " Blade angle at outlet edge of impeller = 30 degrees \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 150. \t#ft**3/sec\n", + "A1= 750. \t#r.p.m\n", + "di= 21. \t#in\n", + "do= 30. \t#in\n", + "v= 50. \t#ft/sec\n", + "A= 70. \t#degrees\n", + "w= 4.\t#in\n", + "p= 30. \t#per cent\n", + "p1= 25. \t#per cent\n", + "sv= 12.8 \t#ft**3/lb\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "u= A1*2*math.pi*di/(24*60)\n", + "u1= A1*2*math.pi*do/(24*60)\n", + "f1= V/(math.pi*(do/12)*(1./3))\n", + "w1= u1-f1*1/math.tan(math.radians((A)))\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "P= (u1**2+v**2-(f1**2/(math.sin(math.radians(A)))**2))/(2*g)\n", + "h= 30*v1**2/(100*2*g)\n", + "Nh= v1**2/(20*2*g)\n", + "Prt= P+Nh\n", + "W= u1*w1/g\n", + "e= Prt*100/W\n", + "Power= Prt*V/(sv*550)\n", + "\n", + "#RESULTS\n", + "print 'Total pressure rise = %.1f ft of air'%(Prt)\n", + "print ' manometric efficiency = %.1f percent'%(e)\n", + "print ' Power = %.2f hp '%(Power)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure rise = 137.9 ft of air\n", + " manometric efficiency = 58.5 percent\n", + " Power = 2.94 hp \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "u1= 90. \t#ft/sec\n", + "w1= 70. \t#ft\n", + "e= 0.8\n", + "h1= 10. \t#ft\n", + "h2= 16. \t#ft\n", + "h3= 5. \t#ft\n", + "k= 2./5\n", + "f1= 20. \t#ft/sec\n", + "f= 18. \t#ft/sec\n", + "a= 45. \t #degrees\n", + "x1= 164.4 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Hm= u1*w1/g\n", + "Hm1= e*Hm\n", + "lh= Hm-Hm1-h1-h2-h3\n", + "vg= k*math.sqrt(f1**2+w1**2)\n", + "pr= ((f**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g))-h2\n", + "pr1= x1-pr\n", + "ge= pr1*g*2*100/(vg/k)**2\n", + "\n", + "#RESULTS\n", + "print 'manometer Head = %.1f ft '%(Hm1)\n", + "print ' outlet velocity from guides = %.1f ft/sec '%(vg)\n", + "print ' Pressure rise through impeller only = %.1f ft '%(pr)\n", + "print ' Guide balde efficiency = %.f per cent '%(ge)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "manometer Head = 156.5 ft \n", + " outlet velocity from guides = 29.1 ft/sec \n", + " Pressure rise through impeller only = 102.4 ft \n", + " Guide balde efficiency = 75 per cent \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "D1= 7.5 \t#in\n", + "Q1= 850. \t#gal/min\n", + "p1= 62.4 \t#lb/ft**3\n", + "N1= 1800.\n", + "D2= 15. \t#in\n", + "Q2= 12000. \t#gal/min\n", + "p2= 64. \t#lb/ft**3\n", + "N1= 1800. \t#r.p.m \n", + "H1= 14. \t#lb/ft**2\n", + "\n", + "#CALCULATIONS\n", + "N2= Q2*N1*(D1)**3/(Q1*D2**3)\n", + "P1= p1*H1/144\n", + "P2= P1*N2**2*D2**2*p2/(N1**2*p1*D1**2)\n", + "\n", + "#RESULTS\n", + "print 'N2 = %.f r.p.m '%(N2+4)\n", + "print ' P2 = %.f lb/in**2 '%(P2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N2 = 3180 r.p.m \n", + " P2 = 78 lb/in**2 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "r= 5.\n", + "\n", + "#CALCULATIONS\n", + "sr= r**2\n", + "sr1= r**2/r\n", + "\n", + "#RESULTS\n", + "print 'Corresponding ratio = %.f '%(sr)\n", + "print ' Corresponding ratio = %.f '%(sr1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Corresponding ratio = 25 \n", + " Corresponding ratio = 5 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "e= 0.88\n", + "w= 1.25 \t#in\n", + "d= 10. \t#in\n", + "q= 630. \t#gal/min\n", + "a= 40. \t#degrees\n", + "g= 32.2 \t#ft/sec**2\n", + "e1= 0.83\n", + "\n", + "#CALCULATIONS\n", + "Q= q/(6.24*60)\n", + "f1= Q/(e*math.pi*(d/12)*(w/12))\n", + "u1= 1000*(w*4/12)*2*math.pi/60\n", + "w1= u1-f1*1/math.tan(math.radians(a))\n", + "W= u1*w1/g\n", + "lr= (f1**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g)\n", + "mh= e1*W\n", + "p= mh-lr\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "ke= v1**2/(2*g)\n", + "pke= p*100/ke\n", + "me= 100*lr/W\n", + "\n", + "#RESULTS\n", + "print 'Velocity of flow = %.f ft/sec'%(f1)\n", + "print ' Work done = %.1f ft-lb/lb'%(W)\n", + "print ' manometric efficiency = %.1f ft'%(mh)\n", + "print ' Pressure recovered = %.1f ft head'%(p)\n", + "print ' Kinetic energy discharge = %.f ft-lb/lb'%(ke)\n", + "print ' Percentage of kinetic energy recovered = %.1f per cent'%(pke)\n", + "print ' manometric efficiency = %d percent'%(me)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow = 7 ft/sec\n", + " Work done = 47.8 ft-lb/lb\n", + " manometric efficiency = 39.7 ft\n", + " Pressure recovered = 11.2 ft head\n", + " Kinetic energy discharge = 20 ft-lb/lb\n", + " Percentage of kinetic energy recovered = 55.7 per cent\n", + " manometric efficiency = 59 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "W1= 7640. \t#gal/min\n", + "W2= 11400. \t#gal/min\n", + "Hm= 63. \t#ft\n", + "Hm1= 80. \t#ft\n", + "ep1= 72. \t#per cent\n", + "ep2= 76. \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "whp1= W1*Hm/(60*550)\n", + "whp2= W2*Hm1/(60*550)\n", + "bhp1= whp1*100/ep1\n", + "bhp2= whp2*100/ep2\n", + "w1= W2/10\n", + "\n", + "#RESULTS\n", + "print 'For both pumps discharge = %.f gal/min against an 80-ft head'%(W2)\n", + "print ' delivery from one pump = %.1f h.p '%(bhp1)\n", + "print ' delivery from two pumps = %.1f h.p '%(bhp2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For both pumps discharge = 11400 gal/min against an 80-ft head\n", + " delivery from one pump = 20.3 h.p \n", + " delivery from two pumps = 36.4 h.p \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 94. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "e= 0.58\n", + "p= 73.5 \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "WHP= h*e*w/550\n", + "BHP= WHP/(p/100)\n", + "\n", + "#RESULTS\n", + "print 'W.H.P= %.2f h.p'%(WHP)\n", + "print ' Brake horse power= %.1f'%(BHP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W.H.P= 6.19 h.p\n", + " Brake horse power= 8.4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "sl= 12. \t#ft\n", + "l= 20. \t#ft\n", + "d= 4. \t#in\n", + "dp= 6. \t#in\n", + "lst= 18. \t#in\n", + "k= 0.025\n", + "H= 32. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "pf= 6. \t#ft\n", + "a= 33.83 \n", + "a1= 9.53\n", + "\n", + "#CALCULATIONS\n", + "A= math.sqrt((H-sl-d)*g/a)*a1\n", + "Q= 2*math.pi*(dp/12)**2*lst/(12*4*60)\n", + "v= Q/(math.pi*(d/12)**2/4)\n", + "kh= v**2/(2*g)\n", + "fh= k*l*v**2*12/(2*g*d)\n", + "N= math.sqrt((H-sl-pf)/(kh+fh))\n", + "\n", + "#RESULTS\n", + "print 'premissible speed = %.1f r.p.m'%(A)\n", + "print ' maximum premissible speed = %.1f r.p.m'%(N)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "premissible speed = 37.2 r.p.m\n", + " maximum premissible speed = 168.8 r.p.m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.13 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 6. \t#in\n", + "s= 12. \t #in\n", + "d= 4. \t #in\n", + "a1= 30. \t#degrees\n", + "a2= 90. \t#degrees\n", + "a3= 120. \t#degrees\n", + "N= 120. \t#r.p.m\n", + "n= 4.\n", + "#calculations\n", + "A= 2*math.pi*N/60\n", + "V= math.pi*(b/12)**2*n/4\n", + "v= (b/12)**2*A*(b/12)/(d/12)**2\n", + "Q1= v*math.pi*(d/12)**2*math.sin(math.radians(a1))/4\n", + "Q2= v*math.pi*(d/12)**2*math.sin(math.radians(a2))/4\n", + "Q3= v*math.pi*(d/12)**2*math.sin(math.radians(a3))/4\n", + "Q4= V-Q1\n", + "Q5= Q2-V\n", + "Q6= Q3-V\n", + "a4= math.degrees(math.asin(V/(v*math.pi*(d/12)**2)))+a1\n", + "A= 180-a4\n", + "\n", + "#RESULTS\n", + "print 'rate of flow at a1 = %.3f cuses'%(Q4)\n", + "print ' rate of flow at a2 = %.3f cuses'%(Q5)\n", + "print ' rate of flow at a3 = %.3f cuses'%(Q6)\n", + "print ' crak angle = %.1f degrees'%(a4)\n", + "print ' crak angle = %.1f degrees'%(A)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate of flow at a1 = 0.169 cuses\n", + " rate of flow at a2 = 0.448 cuses\n", + " rate of flow at a3 = 0.283 cuses\n", + " crak angle = 39.2 degrees\n", + " crak angle = 140.8 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 2. \t#strokes/sec\n", + "dp= 6. \t#in\n", + "ds= 18. \t#in\n", + "ds1=4. \t#in\n", + "l= 20. \t#ft\n", + "l1= 20. \t#ft\n", + "f= 0.008\n", + "la= 5. \t#ft\n", + "A= 60. \t#r.p.m\n", + "f= 0.008\n", + "w= 62.4 \t#lb/ft**3\n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "V= math.pi*(ds/12)*n*(dp/12)**2/4\n", + "vmp= 2*math.pi*A*(ds/24)/60\n", + "vmp1= vmp*(dp**2/ds1**2)\n", + "hfmax= 4*f*(l-la)*vmp1**2/(2*g*ds1/12)\n", + "H1= round(2*hfmax/3,1)\n", + "H2= H1*13\n", + "Wls= (H1+H2)*w*math.pi/16*1.5*2\n", + "mv= V/(math.pi*(ds1/12)**2/4)\n", + "lh= round(4*f*(l-la)*mv**2/(2*g*(ds1/12)),2)\n", + "lhf= 12*lh\n", + "Wls1= (lh+13.21)*w*math.pi*1.5/16 *2 \n", + "WS= Wls-Wls1\n", + "\n", + "#RESULTS\n", + "print 'Work lost per second= %.f ft lb/sec'%(Wls)\n", + "print ' Work saved per second = %.f ft-lb/sec'%(WS)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work lost per second= 875 ft lb/sec\n", + " Work saved per second = 352 ft-lb/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 7.5 \t#in\n", + "s= 15. \t#in\n", + "l= 36. \t#ft\n", + "h1= 34. \t#ft\n", + "h2= 12. \t#ft\n", + "L= 10. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.008\n", + "l1= 20. \t#ft\n", + "d1= 4. \t#in\n", + "h3= 110. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "l2= 180. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Q= (math.pi/4)*(d)**2*(s/12)*2*(l/60)/144\n", + "v= Q/((math.pi/4)*(d1/12)**2)\n", + "a= (d/4)**2*(d/12)*(l*2*math.pi/60)**2\n", + "H= h1-h2-(L*a/g)-(v**2*0.5/g)-(4*f*l1*v**2/(2*g*(d1/12)))\n", + "H1= h1+h3+(L*a/g)+(v**2*0.5/g)+(4*f*l2*v**2/(2*g*(d1/12)))\n", + "dh= (H1-H)*w/144\n", + "NP= dh*(math.pi/4)*d**2\n", + "\n", + "#RESULTS\n", + "print 'Head at piston = %.2f ft of water absolute'%(H)\n", + "print ' Head at piston = %.2f ft of water absolute'%(H1)\n", + "print ' Difference on head of piston = %.f lb/in**2'%(dh)\n", + "print ' Net load on piston = %.f lb'%(NP)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head at piston = 11.04 ft of water absolute\n", + " Head at piston = 161.59 ft of water absolute\n", + " Difference on head of piston = 65 lb/in**2\n", + " Net load on piston = 2882 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "f= 0.009\n", + "dc= 3.5 \t#in\n", + "ds= 6. \t#in\n", + "r= 0.25\n", + "sl= 8. \t#ft\n", + "d= 2.5 \t#in\n", + "l= 14. \t#ft\n", + "el= 8. \t#ft\n", + "ed= 22.5 \t#in\n", + "ph= 4. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.009\n", + "\n", + "#CALCULATIONS\n", + "BC= el+l\n", + "v= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*9.55\n", + "vec=roots([2,1/r,-1])\n", + "H1= 77\n", + "MV= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*r*(math.sin(math.radians(H1))+(math.sin(math.radians(2*H1))/8))\n", + "mvp= MV*dc**2/d**2\n", + "hf= 4*f*(sl+l)*mvp**2/(2*g*(d/12))\n", + "\n", + "#RESULTS\n", + "print 'pump speed = %.1f r.p.m'%(v)\n", + "print ' Friction head = %.3f ft'%(hf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pump speed = 86.8 r.p.m\n", + " Friction head = 1.240 ft\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch12.ipynb b/Problems_In_Hydraulics/ch12.ipynb new file mode 100755 index 00000000..6c180ea8 --- /dev/null +++ b/Problems_In_Hydraulics/ch12.ipynb @@ -0,0 +1,294 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5f1e1e7eb1f2538f17f15df30e5829cbbc6f3ee52bddff3d767ce84c4a9e05f8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Dimensional and Model Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 0.0625 \t#in\n", + "sg= 0.91\n", + "vs= 1.62\n", + "ss= 7.85\n", + "g= 981. \t#cm/sec**2\n", + "\n", + "#CALCULATIONS\n", + "v= 4*(d*2.54/2)**2*(ss-sg)*g/(3*6*30.45*vs)\n", + "\n", + "#RESULTS\n", + "print 'steady speed attained = %.4f ft/sec '%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "steady speed attained = 0.1932 ft/sec \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "vs= 16. \t#ft/sec\n", + "lm= 1. \t#ft\n", + "l= 16. \t#ft\n", + "R= 9.6 \t#lb\n", + "ds= 64. \t#lb/ft**3\n", + "dm= 62.4 \t#/lb/ft**3\n", + "A= 40. \t#ft**2\n", + "\n", + "#CALCULATIONS\n", + "vm= vs*math.sqrt(lm/l)\n", + "rs= 0.0095*vm**1.9*A\n", + "rw= R-rs\n", + "Rw= rw*ds*(l/lm)**3/dm\n", + "Rs= 0.009*vs**1.85*A*l**2\n", + "R1= Rw+Rs\n", + "\n", + "#RESULTS\n", + "print 'speed = %.f b ft/sec'%(vm)\n", + "print ' Total resistance = %.f lb '%(round(R1,-2))\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed = 4 b ft/sec\n", + " Total resistance = 33700 lb \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "H2= 0.75 \t#ft\n", + "v1= 1. \t#ft/sec\n", + "v2= 6. \t#ft/sec\n", + "k= 1.433\n", + "\n", + "#CALCULATIONS\n", + "H1= H2*(v1/v2)**(2./3)\n", + "Q1= k*H1**2.47\n", + "Q2= Q1*(H2/H1)**2.5\n", + "\n", + "#RESULTS\n", + "print 'Flow = %.3f cuses '%(Q2 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow = 0.730 cuses \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "nm= 360.\n", + "d= 1.5 \t#in\n", + "n= 100. \n", + "dp= 12. \t#in\n", + "vm= 4.8 \t#ft/sec\n", + "Tm= 52. \t#sec\n", + "T= 16. \t#lb-ft\n", + "t= 133. \t#lb ft\n", + "\n", + "#CALCULATIONS\n", + "vp= n*dp*vm/(nm*d)\n", + "Tp= round(Tm*dp**2*vp**2/(d**2*vm**2),-2)\n", + "N= Tm*vm*6080*100/(T*2*math.pi*nm*60)\n", + "W= Tp*65000\n", + "T1= W/(.7*2*math.pi*n*60)\n", + "\n", + "\n", + "#RESULTS\n", + "print 'Speed of advance = %.2f knots '%(vp)\n", + "print ' Thrust = %.f lb '%(Tp)\n", + "print ' Efficiency = %.f per cent '%(N)\n", + "print ' Torque = %.f lb ft '%(round(T1,-2))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of advance = 10.67 knots \n", + " Thrust = 16400 lb \n", + " Efficiency = 70 per cent \n", + " Torque = 40400 lb ft \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "w= 62.4 \t#lb/ft**3\n", + "d= 4 \t#in\n", + "D= 0.0765 \t#lb/ft**3\n", + "Da= 8 \t#in\n", + "vw= 1./13\n", + "nw= 20\n", + "va= 13 \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "na= nw*va*d**2/Da**2\n", + "\n", + "#RESULTS\n", + "print 'power = %.f r.p.m '%(na)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power = 65 r.p.m \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page No : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "dtp= 120. \t#in\n", + "dpd= 48. \t#in\n", + "vim= 1.25 \t#ft/sec\n", + "vip= 5. \t#ft/sec\n", + "lp = 600. \t#ft\n", + "lm= 40. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Rm= (dtp/dpd)**2/((lp/lm)*(vim/vip)**2)\n", + "d= math.sqrt(4*Rm)\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.2f in '%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 5.16 in \n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch13.ipynb b/Problems_In_Hydraulics/ch13.ipynb new file mode 100755 index 00000000..30017a36 --- /dev/null +++ b/Problems_In_Hydraulics/ch13.ipynb @@ -0,0 +1,624 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da0a57e05023d78d40f48e24ac486e01915e80a89fcf828d645acb89b5297ac2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Miscellaneous Problems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "W= 5000 \t#lb\n", + "vr= 6\n", + "e= 0.95\n", + "ep = 0.75\n", + "d= 9 \t#in\n", + "D= 45 \t#ft\n", + "t= 2 \t#min\n", + "v= 4.5 \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "L= W*vr/(e*ep)\n", + "Pr= L/(math.pi*d**2/4)\n", + "s= D/vr\n", + "V= s*math.pi*ep**2/(4*t*60)\n", + "T= D/v\n", + "V1= s*math.pi*ep**2/4\n", + "V2= V*T\n", + "V3= V1-V2\n", + "\n", + "#RESULTS\n", + "print 'Pressure on ram = %.f ln/in**2 '%(Pr)\n", + "print ' Pump duty = %.4f cusec'%(V)\n", + "print ' Minimum capacity if accumulator = %.3f ft**3 '%(round(V3))\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure on ram = 662 ln/in**2 \n", + " Pump duty = 0.0258 cusec\n", + " Minimum capacity if accumulator = 3.000 ft**3 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P1= 1100. \t#lb/in**2\n", + "P2= 85. \t#lb/in**2\n", + "f= 0.01\n", + "g= 32.2 \t#ft/sec**2\n", + "l= 1600. \t#ft\n", + "r= 1./8\n", + "W= 2500. \t#lb\n", + "d= 6. \t#in\n", + "\n", + "#CALCULATIONS\n", + "L= W*d\n", + "P= L*2.31/(math.pi*(d/2)**2)\n", + "s1= P1*2540/1100\n", + "s2= P2*196/85\n", + "vp= math.sqrt((s1-s2-P)/(4*f*l/(2*g*r)))\n", + "V= vp/16\n", + "Vl= V*d\n", + "Vp= math.sqrt((s1/3)/(4*f*l/(2*g*r)))\n", + "vl= Vp*d/16\n", + "Hr= s1-(s1/3)-s2\n", + "Lr= Hr*math.pi*(d/2)**2/(2.31*d)\n", + "\n", + "#RESULTS\n", + "print \"In case 1 velocity of load = %.2f ft/sec\"%(Vl)\n", + "print \" In case 2 velocity of load = %.2f ft/sec\"%(vl)\n", + "print ' Load to be lifted = %d lb '%(Lr)\n", + "\n", + "# note : roundin off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1 velocity of load = 4.45 ft/sec\n", + " In case 2 velocity of load = 3.87 ft/sec\n", + " Load to be lifted = 3054 lb \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "bhp= 1500 \t#h.p\n", + "e= 0.86\n", + "h1= 300 \t#ft\n", + "h2= 15 \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "t= 30 \t#days\n", + "t1= 10 \t#hr\n", + "t2= 3 \t#months\n", + "f= 0.005\n", + "l= 1000 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "WHP= bhp/e\n", + "Ha= h1-h2\n", + "W= WHP*550\n", + "Q= W/(Ha*w)\n", + "Qt= Q*36009*t1*t*t2\n", + "Qp= Qt/(3600*t*45)\n", + "d= (f*l*(Q/2)**2/(t1*h2))**(1./5)\n", + "\n", + "#RESULTS\n", + "print \"Minimum size of basin required = %.1e cusecs\"%Qt\n", + "print \"Pump Discharge : %.f cusecs\"%(Qp/10)\n", + "print 'Diameter = %.2f ft '%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum size of basin required = 1.7e+09 cusecs\n", + "Pump Discharge : 36 cusecs\n", + "Diameter = 1.89 ft \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page No : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 140 \t#ft\n", + "P= 70 \t#percent\n", + "V= 3*10**8 \t#ft**3\n", + "w= 62.4 \t#lb/ft**3\n", + "SBD= 4.9*10**8 \t#ft**3\n", + "Q= 162 \t#cuses\n", + "s= 12.2*10**6 \t#ft**3/day\n", + "\n", + "#CALCULATIONS\n", + "O= Q*w*l*(P/1000.)/550.\n", + "\n", + "#RESULTS\n", + "print 'Size of reservoir= %.2e ft**3'%(SBD)\n", + "print ' output = %.f h.p '%(O)\n", + "print ' output = %d h.p '%(Q)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Size of reservoir= 4.90e+08 ft**3\n", + " output = 180 h.p \n", + " output = 162 h.p \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Q= 140 \t#cuses\n", + "w= 62.4 \t#lb/ft**3\n", + "l= 140 \t#ft\n", + "P= 70 \t#percent\n", + "k= 1.6\n", + "v= 3*10**8\n", + "\n", + "#CALCULATIONS\n", + "rv= k*v\n", + "HP= Q*l*w*(P/1000.)/550.\n", + "\n", + "#RESULTS\n", + "print 'Required size of reservoir = %.1e ft**3 '%(rv)\n", + "print ' horsepower = %.f h.p '%(HP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required size of reservoir = 4.8e+08 ft**3 \n", + " horsepower = 156 h.p \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 10. \t#lb/in**2\n", + "r1= 0.5 \t#ft\n", + "r= 0.25 \t#ft\n", + "f= 42.3 \t#ft/sec\n", + "b= 1./40\n", + "Tt= 1400. \t#lb\n", + "\n", + "#CALCULATIONS\n", + "Q= 2*math.pi*r*b*f\n", + "p1= 34+P\n", + "Fu= p1*math.pi*(r-(r/4))*144/2.3\n", + "Fr= Fu-Tt\n", + "\n", + "#RESULTS\n", + "print 'Quantity = %.2f cusecs '%(Q)\n", + "print ' Resultant force on the plate = %.f lb '%(round(Fr,-1))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity = 1.66 cusecs \n", + " Resultant force on the plate = 220 lb \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page No : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 0.5 \t#ft\n", + "N= 300\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "A= N*2*math.pi/60\n", + "Ft= math.pi*A**2*r**4*w/(4*g)\n", + "\n", + "#RESULTS\n", + "print 'total force = %.1f lb '%(Ft)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total force = 93.9 lb \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page No : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 4. \t#in\n", + "h= 12. \t#in\n", + "h1= 9. \t#in\n", + "g= 32. \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "H= 2*(1-(h1/h))\n", + "A= math.sqrt((H*2*g/((d/24)**2)))\n", + "A1= math.sqrt((H*2*g*2/((d/24)**2)))\n", + "\n", + "#RESULTS\n", + "print 'speed when the axial is zero = %.f radn/sec '%(A)\n", + "print ' speed when the axial is zero = %.f radn/sec '%(A1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed when the axial is zero = 34 radn/sec \n", + " speed when the axial is zero = 48 radn/sec \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.10 Page No : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 14.7 \t#lb/in**2\n", + "T= 15. \t#C\n", + "v= 350. \t#ft/sec\n", + "R= 0.714\n", + "\n", + "#CALCULATIONS\n", + "P1= P*144\n", + "r= 3091*(273+T)\n", + "d1= P1/r\n", + "r1= r+(v**2/7)\n", + "P2= (r1*d1/(P1**R))**(1/(1-R))/144\n", + "dP= P2-P\n", + "T2= r1/3091\n", + "dT= T2-(273+T)\n", + "\n", + "#RESULTS\n", + "print 'rise in pressure = %.f lb/in**2 '%(dP)\n", + "print ' rise in temperature = %.1f C '%(dT)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rise in pressure = 1 lb/in**2 \n", + " rise in temperature = 5.7 C \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "T= 27. \t#C\n", + "P = 33. \t#lb/in**2\n", + "p1= 14.7 \t#lb/in**2\n", + "w= 250. \t#lb\n", + "g= 32.2 \t#ft/sec**2\n", + "Cd= 0.99\n", + "r= 1.4\n", + "\n", + "#CALCULATIONS\n", + "w1= P*144/(96*(273+T))\n", + "d= p1*144/(96*(273+T))\n", + "W= d*w/60\n", + "d= math.sqrt(W*4/(Cd*math.pi*math.sqrt(2*g*P*144*(r/(r-1))*w1*(0.528**(2/1.4)-0.528**(2.4/1.4)))))*12\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.3f in '%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 0.722 in \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "sp= 13.6\n", + "hm= 800. \t#mm\n", + "d= 3. \t#in\n", + "r= 1.4\n", + "R= 1385. \t#ft-lb/lb/C\n", + "w= 62.4 \t#lb/ft**3\n", + "T= 15. \t#C\n", + "hm1= 765. \t#mm\n", + "r1= 9.\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "p1= hm*sp*w/304.8\n", + "r2= (273+T)*R\n", + "w1= p1/r2\n", + "k= hm/hm1\n", + "v1= math.sqrt((2*g*r*r2*(1-k**0.286))/((1-r)*(r1**2*k**1.43-1)))\n", + "W= v1*w1*3600*(math.pi/64)\n", + "\n", + "#RESULTS\n", + "print 'Weight flowing = %.f lb/hr '%(W)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight flowing = 115 lb/hr \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13 Page No : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "p= 160. \t#lb/in**2\n", + "d= 1./3 \t#ft\n", + "T= 15. \t#C\n", + "R= 96. \n", + "V= 120. \t#ft**3\n", + "f= 0.004\n", + "a= 60*math.pi\n", + "l= 10560. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "p1= p*144\n", + "w1= p*144/(R*(273+T))\n", + "v1= V*36/a\n", + "p2= math.sqrt(p1**2-((2*4*f*p1*w1*v1**2*l)/(2*g*d)))/144\n", + "v2= p*v1/p2\n", + "\n", + "#RESULTS\n", + "print ' pressure = %.1f lb/in**2 '%(p2)\n", + "print ' velocity = %.1f ft/sec '%(v2)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " pressure = 134.0 lb/in**2 \n", + " velocity = 27.4 ft/sec \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch2.ipynb b/Problems_In_Hydraulics/ch2.ipynb new file mode 100755 index 00000000..d68673ef --- /dev/null +++ b/Problems_In_Hydraulics/ch2.ipynb @@ -0,0 +1,222 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2c442a1cbc28b933d555165b6cb09fa7f45de31e28c837593e3048f115cafdbb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Equilibrium of Floating Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "d= 40. \t#lb/ft**2 density of wood\n", + "w= 4 \t#ft wide\n", + "h= 6 \t#ft deep\n", + "l= 12 \t#ft long \n", + "\n", + "#CALCULATIONS\n", + "W= w*h*d*l\n", + "V= W/64\n", + "D= V/(w*l)\n", + "\n", + "#RESULTS\n", + "print 'Volume of water print laced = %.f ft**3'%(V)\n", + "print ' Depth of immersion = %.2f ft'%(D)\n", + "print ' Centre of buoyancy = %.2f ft from base'%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume of water print laced = 180 ft**3\n", + " Depth of immersion = 3.75 ft\n", + " Centre of buoyancy = 3.75 ft from base\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol,solve\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 4. \t#ft diameter\n", + "h= 7. \t#ft high\n", + "W= 2500. \t#lb weighing \n", + "OG= 3.5\n", + "OB= 1.55 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "V= W/d**3\n", + "D= V/(math.pi*(d/2)**2)\n", + "I= math.pi*d**4/64\n", + "BM= I/V\n", + "BG= OG-OB\n", + "T = Symbol(\"T\")\n", + "ans = solve( (2500 + T)**2 -(512*math.pi *(8750 - 804)) - 1)\n", + "T = ans[1]\n", + "\n", + "#RESULTS\n", + "print 'Minimum tension in chain = %d lb'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum tension in chain = 1075 lb\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "W1= 1000. \t#lb weighing\n", + "W2= 100. \t#lb load\n", + "h= 4. \t#ft height\n", + "d= 5. \t#ft diameter\n", + "\n", + "#CALCULATIONS\n", + "V= (W1+W2)/h**3\n", + "D= V*h/(d**2*math.pi)\n", + "I= d**4*math.pi/h**3\n", + "BM= I/V\n", + "x= (BM+(D/2)-(W1*(h/2)/(W1+W2)))/(W2/(W1+W2))-0.02\n", + "C= x-h\n", + "\n", + "#RESULTS\n", + "print 'centre of gravity = %.2f ft'%(x)\n", + "print ' Hence the gravity of the weight must not be more than above the top of buoy = %.2f ft'%(C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "centre of gravity = 4.43 ft\n", + " Hence the gravity of the weight must not be more than above the top of buoy = 0.43 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 12. \t#ft breadth\n", + "h1= 3. \t#ft draught\n", + "h2= 1.5 \t#ft\n", + "h3= 5+(2./3) \t#ft\n", + "\n", + "#CALCULATIONS\n", + "I= b**3/12\n", + "V= b*h1\n", + "bm= I/V\n", + "BG= bm+(h1*2/(3*b))\n", + "O= math.degrees(math.tan(math.sqrt((h3*2-h1-bm*2)/(bm*2+bm))))\n", + "\n", + "\n", + "#RESULTS\n", + "print ' Volume of body immersed = %.f ft**3'%(V)\n", + "print ' BM = %.f ft'%(bm)\n", + "print ' BG = %.2f ft'%(BG)\n", + "print ' angle of heel = %.2f degrees'%(O)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Volume of body immersed = 36 ft**3\n", + " BM = 4 ft\n", + " BG = 4.17 ft\n", + " angle of heel = 9.64 degrees\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch3.ipynb b/Problems_In_Hydraulics/ch3.ipynb new file mode 100755 index 00000000..a3c142e2 --- /dev/null +++ b/Problems_In_Hydraulics/ch3.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b5106ea5cae253fe059288e745550627fa4df81e4cd0d1b81237c843ab3f804d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Hydrodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "# points\n", + "hob= 34. \t#ft\n", + "hoc= 5. \t#ft\n", + "hoa= 50. \t#ft\n", + "\n", + "hod= 80. \t#ft height\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "# sectional areas\n", + "A= 2.1 \t#in**2\n", + "A1= 4.8 \t#in**2\n", + "A2= 9.6 \t#in**2\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*(hod-hoc))\n", + "Q= v*A/144\n", + "va= v*A/A1\n", + "vb= v*A/A2\n", + "Va= va**2/(2*g)\n", + "Vb= vb**2/(2*g)\n", + "r= hob+hod-hoa-(va**2/(2*g))\n", + "r1=hob+hod-hob-(vb**2/(2*g))\n", + "\n", + "#RESULTS\n", + "print 'Discharge = %.2f cuses'%(Q) \n", + "print ' Velocity head at A = %.2f ft-lb/lb'%(Va)\n", + "print ' Velocity head at B = %.2f ft-lb/lb'%(Vb)\n", + "print ' Pressure head at A = %.2f ft-lb/lb'%(r) \n", + "print ' Pressure head at B = %.2f ft-lb/lb'%(r1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 1.01 cuses\n", + " Velocity head at A = 14.36 ft-lb/lb\n", + " Velocity head at B = 3.59 ft-lb/lb\n", + " Pressure head at A = 49.64 ft-lb/lb\n", + " Pressure head at B = 76.41 ft-lb/lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "w= 62.4 \t#lb/ft**3\n", + "P= 1.7 \t#lb/in**2 pressure\n", + "d1= 6. \t #in diameters\n", + "d2= 3. \t #in diameters\n", + "hab= 8. \t#ft\n", + "Q= 0.75 \t#cuses\n", + "sm= 13.6 # gravity\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "dP= P*144/w\n", + "va= Q*(d1/d2)**4/math.pi\n", + "k= -(((d1/d2)**4-1)-((-dP+hab)*2*g/va**2))\n", + "h= (-dP+hab)*12/(sm-1)\n", + "\n", + "#RESULTS\n", + "print 'k = %.f '%(k)\n", + "print 'height difference = %.2f in'%(h) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 3 \n", + "height difference = 3.88 in\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 20. \t #ft pressure head\n", + "Q= 4.81 \t#cuses \n", + "C= 1.\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 10. \t#indiameter\n", + "\n", + "#CALCULATIONS\n", + "d= ((Q*4*144/(d**2*math.pi))**2*100**2/((Q*4*144/(d**2*math.pi))**2+2*g*h))**0.25\n", + "\n", + "#RESULTS\n", + "print 'Smallest Diameter = %.1f in'%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest Diameter = 4.9 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 1./3 \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 4. \t #in\n", + "d2= 1.6 \t#in diameter\n", + "\n", + "# guage readings\n", + "h1= 5.7 \t#ft\n", + "h2= -1.9 \t#ft\n", + "\n", + "Q= 0.3 \t#cuses\n", + "H1= 34. \t#ft height of water\n", + "H2= 19. \t#ft\n", + "H3= 7. \t #ft\n", + "H4= 9.2 \t#ft\n", + "h3= 2.9 \t#ft\n", + "h4= 3.9 \t#ft\n", + "Et= 54. \t#ft-lb/lb\n", + "\n", + "#CALCULATIONS\n", + "v1= math.sqrt(2*g*(h1-h2)/((d1/d2)**4-1))\n", + "Q1= math.pi*v1*d**2/4\n", + "k= Q/Q1\n", + "P= (H1+H2)*H3/H4\n", + "P1= P-h3\n", + "r= P+h1-h2-h4\n", + "V= v1**2/(2*g)\n", + "E= r+V\n", + "dE= Et-E\n", + "\n", + "#RESULTS\n", + "print 'Coefficienct of venturi meter = %.4f '%(k)\n", + "print ' Pressure of venturi throat = %.2f ft of water'%(P1)\n", + "print ' Loss in energy = %.1f ft-lb/lb'%(dE)\n", + "\n", + "# Note : The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficienct of venturi meter = 0.9587 \n", + " Pressure of venturi throat = 37.43 ft of water\n", + " Loss in energy = 9.8 ft-lb/lb\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch4.ipynb b/Problems_In_Hydraulics/ch4.ipynb new file mode 100755 index 00000000..aefd97a7 --- /dev/null +++ b/Problems_In_Hydraulics/ch4.ipynb @@ -0,0 +1,291 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f02a7c0105dc5d8192eae252809dedbf748fa59e0b9b78e4af3b1079610b7a69" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Orifices and Notches" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Cd= 0.98 # velocity\n", + "g= 32.2 \t#ft/sec**2\n", + "H= 2. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*H)\n", + "t= H/v\n", + "h= 0.5*g*t**2\n", + "\n", + "#RESULTS\n", + "print 'Vertical distance fallen in this ttime = %.3f ft'%(h) \n", + "\n", + "#Note : The answer given in textbook is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vertical distance fallen in this ttime = 0.500 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 53.4\n", + "T= 60. \t #F pressure of air\n", + "h= 29.7 \t#in of mercury\n", + "sm= 13.6\n", + "w= 62.4 \t#lb/ft**3\n", + "d= 1.5 \t#in diameter\n", + "Qin= 2. \t#cuses air\n", + "g=32.2 \t #ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "W= h*sm*w/(r*(460+T)*12)\n", + "dP= 0.75*w/(12*W)\n", + "Q= math.sqrt(2*g*dP)*math.pi*d**2/(4*144)\n", + "W= Q*W*60\n", + "Cd= Qin/W\n", + "\n", + "#RESULTS\n", + "print 'coefficient of discharge = %.2f '%(Cd) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of discharge = 0.62 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "H1= 34. \t#ft height\n", + "H2= 8. \t #ft head\n", + "H3= 7. \t#ft pressure head\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 1.5 \t #in\n", + "\n", + "#CALCULATIONS\n", + "v2= math.sqrt(2*g*(H1+H2-H3))\n", + "Q= v2*math.pi*d**2/(4*144)\n", + "v3= (2*v2+math.sqrt(4*v2**2-4*6*(v2**2-H2*2*5*g)))/12\n", + "dr= math.sqrt(v2/v3)\n", + "\n", + "#RESULTS\n", + "print 'ratio of diameteres = %.1f '%(dr) \n", + "print \" Maximum discharge = %.3f cusec\"%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of diameteres = 1.6 \n", + " Maximum discharge = 0.583 cusec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Q1= 8./15 \t#cuses\n", + "Q2= 2./15 \t#cuses\n", + "\n", + "#CALCULATIONS\n", + "A= math.degrees(math.atan(Q2/Q1))\n", + "\n", + "#RESULTS\n", + "print 'Angle of inclination = %.2f degrees'%(A) \n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of inclination = 14.04 degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "r= g**2/((math.sqrt(2))**2*g**2)\n", + "\n", + "#RESULTS\n", + "print 'coefficient of contraction = %.1f '%(r) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of contraction = 0.5 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "B= 3. \t #ft long\n", + "H= 2. \t#ft depth of water\n", + "H1= 3.75 \t#ft \n", + "w= 4. \t#ft wide\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= 3.33*(B-(H1/5))*H**1.5\n", + "v= Q/(H*w)\n", + "kh= v**2/(2*g)\n", + "Q1= 3.33*(B-(H1/5)-kh)*(((H1/5)+kh)**1.5-kh**1.5)\n", + "\n", + "#RESULTS\n", + "print 'Discharge = %.2f cuses'%(Q1) \n", + "\n", + "\n", + "# NOte : ANSWER IN THE TEXTBOOK IS WRONG\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 5.42 cuses\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch5.ipynb b/Problems_In_Hydraulics/ch5.ipynb new file mode 100755 index 00000000..696c90f4 --- /dev/null +++ b/Problems_In_Hydraulics/ch5.ipynb @@ -0,0 +1,422 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:99b4244f7dba40fbe6b1f9647ffae37a043c932f7cb3e888c2ad7aac3ff9563e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Flow in Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 2.5 \t#ft depth of water\n", + "a= 45. \t#degrees side slope\n", + "x= 5. \t#ft\n", + "Q= 45. \t#cuses\n", + "v= 2.6 \t#ft/sec velocity\n", + "w= 6.92 \t#ft \n", + "C= 120.\n", + "\n", + "#CALCULATIONS\n", + "b= (Q/(v*h))-h\n", + "p= b+2*(h+math.sqrt(2))\n", + "A= h*w\n", + "m= A/p\n", + "i= (v/(C*math.sqrt(m)))**2\n", + "\n", + "#RESULTS\n", + "print 'Width = %.2f ft'%(b) \n", + "print ' Slope = %.6f '%(i) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width = 4.42 ft\n", + " Slope = 0.000332 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "a= 60. \t#degrees sides inclined\n", + "i= 1./1600\n", + "Q= 8.*10**6 \t#gal/hr discharge\n", + "M= 110.\n", + "w= 6.24 \t#lb/ft**3\n", + "\n", + "#CALCULATIOS\n", + "d= ((Q*2**(2./3)*math.sqrt(1./i))/(w*3600*math.sqrt(3)*M))**(3./8)\n", + "b=6.93 \t#ft\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.f ft'%(d) \n", + "print ' breadth = %.2f ft'%(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 6 ft\n", + " breadth = 6.93 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/swc**2\n", + "Q= 40. \t#cuses rate\n", + "w= 5.5 \t#ft\n", + "h= 9. \t#in depth\n", + "d= 0.75 \t#ft\n", + "V= 3. \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "D= ((Q*2)**2/(g*(w*2)**2))**(1./3)\n", + "v= Q*d/w\n", + "D1= math.sqrt((2*v**2*d/g)+h/64)-(d/2)\n", + "dD= D1-d\n", + "El= -dD+((v**2*(1-(V/v)**2))/(2*g))\n", + "Els= Q*El*62.4/550\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(D)\n", + "print ' Rise in level = %.f ft'%(D1)\n", + "print ' Horse-power lost = %.3f hp'%(Els) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 1.18 ft\n", + " Rise in level = 1 ft\n", + " Horse-power lost = 0.961 hp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 3.5 \t#ft\n", + "H= 2.5 \t#ft\n", + "w= 3. \t#ft depth\n", + "h= 6. \t#ft wide\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= 3.09*b*H**1.5\n", + "v= Q/(w*h)\n", + "H1= H+(v**2/(2*g))\n", + "Q1= 3.09*b*H1**1.5\n", + "hc= (Q1**2/(b**2*g))**(1./3)\n", + "h2= 0.5*(math.sqrt(hc**2+8*hc**2)-hc)\n", + "dh= h2+b-w\n", + "\n", + "#RESULTS\n", + "print \"Flow rate = %.1f cusecs\"%(Q)\n", + "print \" Flow rate = %d cusecs\"%(Q1)\n", + "print ' maximum depth of water downstream = %.3f ft'%(dh) \n", + "print ' Shooting flow depth at hump = %.3f ft'%(h2) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 42.8 cusecs\n", + " Flow rate = 45 cusecs\n", + " maximum depth of water downstream = 2.226 ft\n", + " Shooting flow depth at hump = 1.726 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "m= 60./26\n", + "i= 1./2000\n", + "h1= 3. \t#ft depth\n", + "h2= 5. \t#ft depth\n", + "m1= 10./3\n", + "C= 90. # constant\n", + "l= 500. \t#ft depth\n", + "H= 20. \t#ft broad\n", + "H1= 29.62 \t#ft\n", + "g= 32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "v= 90*math.sqrt(m*i)\n", + "v1= v*h1/h2\n", + "dh= (i-(v1**2/(C**2*m1)))*l/(1-v1**2/(g*h2))\n", + "h3= h2-dh\n", + "V= h1*v/h3\n", + "\n", + "#RESULTS\n", + "print 'Height of water 1000 ft upstream = %.3f ft'%(h3) \n", + "print ' Height of water upstream = %.3f ft'%(h3) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of water 1000 ft upstream = 4.808 ft\n", + " Height of water upstream = 4.808 ft\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 5. \t #ft/sec\n", + "m= 60./26\n", + "i= 1./2000\n", + "h= 5.5 \t#ft\n", + "m1= 110./31\n", + "d= 3. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "C= v/(math.sqrt(m*i))\n", + "v1= v*d/h\n", + "r= (i-(v1**2/(C**2*m1)))/(1-(v1**2/(g*h)))\n", + "x= 1/r\n", + "\n", + "#RESULTS\n", + "print 'Distance upstream = %.f ft'%(round(x,-1)) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance upstream = 2380 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "Q= 12 \t#cuses\n", + "\n", + "#CALCULATIONS\n", + "hc= (Q/(3*math.sqrt(g)))**(2./3)\n", + "vec=roots([1,6,12,8,0,-8.95,-8.95])\n", + "H=vec[2]\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(hc) \n", + "print ' Critical depth = %.2f ft'%(H) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 0.79 ft\n", + " Critical depth = 0.89 ft\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:17: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Cd= 0.64 # coefficient\n", + "g= 32.2 \t#ft/sec**2\n", + "A= 12.5 \t#ft**2\n", + "H= 24.8 \t#ft\n", + "Q= 3200. \t#cuses\n", + "b= 150. \t#ft wide\n", + "A1= 5.*10**6 # avg surface area\n", + "h= 9. \t#ft\n", + "h1= 6. \t #in\n", + "\n", + "#CALCULATIONS\n", + "N= Q/(Cd*A*math.sqrt(2*g*H))\n", + "H1= (Q/(3.2*b))**(2./3)\n", + "ES= (H1-(h1/12))*A1*h\n", + "\n", + "#RESULTS\n", + "print 'number of siphons = %.f '%(N) \n", + "print ' Extra Storage = %.2e ft**3'%(ES) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of siphons = 10 \n", + " Extra Storage = 1.37e+08 ft**3\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch6.ipynb b/Problems_In_Hydraulics/ch6.ipynb new file mode 100755 index 00000000..5608cc77 --- /dev/null +++ b/Problems_In_Hydraulics/ch6.ipynb @@ -0,0 +1,757 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cfc2d9c55b511981c268535b9b836c28d1aec92123c8d6e11efaae493bc2b6d5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Flow in Pipes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 5000. #ft long\n", + "l1= 2000. #ft\n", + "d= 12. #in diameter\n", + "f= 0.005 # coefficient\n", + "d1= 24 #in diameter\n", + "f1= 0.0045 \n", + "l2= 3000. #ft\n", + "Q= 1800. #gal/min flow\n", + "w= 6.24 #lb/ft**3\n", + "g=32.2 #ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "F= Q/(60*w)\n", + "v1= F*4/(math.pi*(d/12)**2)\n", + "v2= v1/(d1/d)**2\n", + "H= (f*l1*F**2/(10*(d/12)**5))+(f1*l2*F**2/(10*(d1/12)**5))+(v1**2/(4*g))+((v1-v2)**2/(2*g))+(v2**2/(2*g))\n", + "\n", + "#RESULTS\n", + "print 'Available Head = %.2f ft'%(H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Available Head = 24.74 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.01\n", + "h= 42. \t#ft\n", + "l= 3200. \t#ft length\n", + "d= 14. \t#in diameter\n", + "h1= 8. \t#ft\n", + "l1= 1800. \t#ft point\n", + "w= 6.24 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*h/(1+0.5+(4*f*l/(d/12.))))\n", + "h2= h-h1-(v**2/(2*g))-h1-(0.5*v**2/(2*g))-(4*f*l1*v**2/(2*g*(d/12)))\n", + "Q= math.pi*(d/12)**2*v*w*60/4\n", + "\n", + "#RESULTS\n", + "print 'Height of siphon above A = %.2f ft'%(h2)\n", + "print ' Total Discharge = %.f gal/min'%(Q)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of siphon above A = 2.13 ft\n", + " Total Discharge = 1974 gal/min\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "H= 950. \t#lb/in**2\n", + "l= 5. \t#miles distance\n", + "d= 4. \t#in\n", + "f= 0.0075 # friction\n", + "p= 92. \t#per cent\n", + "hp= 200. \t#h.p power\n", + "g= 32.2 \t#ft/sec62\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "H1= H*2.3\n", + "H2= H1*100/p\n", + "Hf= H2-H1\n", + "v= math.sqrt(2*g*(d/12)*Hf/(4*f*l*5280))\n", + "n= hp/(w*v*(H1/550)*math.pi*(d/12)**2/4)\n", + "\n", + "#RESULTS\n", + "print 'number of pipes required = %.2f'%(n)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of pipes required = 4.07\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 1.5 \t #miles length\n", + "d= 18. \t #in diameter\n", + "Q= 12.4 \t#/cusecs\n", + "h= 130. \t#ft\n", + "r= 169.\n", + "r1= 338.\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "f= h*10*l**5/(l*5280*Q**2)\n", + "R= math.sqrt(1.5*r1-r)\n", + "d= math.sqrt(l**2/R*144)\n", + "v= math.sqrt(h*g*2/(r/R**2+1))\n", + "HP= w*0.25*math.pi*(d/12)**2*v**3/(550*2*g)\n", + "\n", + "#RESULTS\n", + "print 'f = %.3f '%(f)\n", + "print ' Diameter of jet d = %.2f in'%(d)\n", + "print ' Water h.p = %.1f h.p'%(HP)\n", + "\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f = 0.008 \n", + " Diameter of jet d = 4.20 in\n", + " Water h.p = 70.6 h.p\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 5000. \t#ft long\n", + "d= 24. \t #in diameter\n", + "Q= 18. \t#cuses\n", + "t= 10. \t #sec \n", + "P= 275000. \t#lb/in**2\n", + "g= 32.2 \t#ft/sec**2\n", + "w=62.4\n", + "\n", + "#CALCULATIONS\n", + "v= Q/(math.pi*(d/24)**2)\n", + "C= v/(t**2/2)\n", + "Pr= ((l*C*t/g)+(v**2/(2*g)))/2.3\n", + "Pr1= v*12*math.sqrt(w*P/(386.4*1728))\n", + "\n", + "#RESULTS\n", + "print 'Pressure Rise = %.1f lb/in**2'%(Pr)\n", + "print ' Pressure Rise = %d lb/in**2'%(Pr1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Rise = 77.6 lb/in**2\n", + " Pressure Rise = 348 lb/in**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "v= 4. \t#ft/sec velocity\n", + "K= 300000. \t#lb/in**2 water\n", + "d= 6. \t#in\n", + "t= 0.25 \t#in\n", + "E= 30*10**6 \t#lb/in**2\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "P= math.sqrt((w*v**2/g)/((d/(E*144*t))+(1/(K*144))))/144\n", + "Sm= P*d/(2*t)\n", + "\n", + "#RESULTS\n", + "print 'Hoop stress = %.f lb/in**2'%(Sm)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hoop stress = 2739 lb/in**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "l1= 19. \t#ft\n", + "l2= 1. \t#ft\n", + "r1= 0.298\n", + "r2= 0.238\n", + "r3= 0.359\n", + "r4= 0.242\n", + "r5= 0.121\n", + "d= 6 \t #in diameter\n", + "\n", + "#CALCULATIONS\n", + "m= -(-r4-math.sqrt(r4**2-4*(3*r1-r5)*(-(d/2)*r2-r3)))/(2*(3*r1-r5))\n", + "v2= math.sqrt((l1+l2)/(r1*m**2-r2))\n", + "v3= m*v2\n", + "Q2= math.pi*v2/d**2\n", + "Q3= math.pi*v3/d**2\n", + "Q= Q2+Q3\n", + "\n", + "#RESULTS\n", + "print 'Q2 = %.3f cusec'%(Q2)\n", + "print ' Q3 = %.2f cusec'%(Q3)\n", + "print ' Total Quantity = %.3f cusecs'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q2 = 0.711 cusec\n", + " Q3 = 0.96 cusec\n", + " Total Quantity = 1.668 cusecs\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 80. \t#ft levels\n", + "f= 0.008 # friction coefficient\n", + "l= 3000. \t#ft long\n", + "r1= 6.07\n", + "r2= 377.5\n", + "r3= 4733. \n", + "r4= 0.0466\n", + "r5= 3220.\n", + "r6= 51.5\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt(h*10/(f*l))\n", + "Q1= math.sqrt(r2+math.sqrt(r2**2-4*r1*r3)/(2*r1))/3\n", + "Q2= Q1-r4*math.sqrt(r5-r6*Q1**2)\n", + "\n", + "#RESULTS\n", + "print 'rate discharge when valve B is closed= %.2f cusecs'%(Q)\n", + "print ' Flow in reservoir= %.2f cusecs'%(Q2)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate discharge when valve B is closed= 5.77 cusecs\n", + " Flow in reservoir= 5.13 cusecs\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Q= 450. \t#gal/min\n", + "w= 6.24 \t#lb/ft**3\n", + "f= 0.005\n", + "l1= 1000. \t#ft from reservoir A\n", + "l2= 2000. \t#ft from reservoir D\n", + "r1= 1.6\n", + "r2= 4.4\n", + "r3= 0.8\n", + "r4 = 12.85\n", + "h1= 59.1 \t#ft\n", + "h2= 40.19 \t#ft\n", + "v= 1.2 \t #ft/sec\n", + "f= 0.0056\n", + "l= 10 \t #ft below reservoir A\n", + "\n", + "#CALCULATIONS\n", + "Q1= Q/(w*60)\n", + "Q2= (r1+math.sqrt(r1**2+4*r2))/2\n", + "Q3= Q2-Q1\n", + "Q4= (-r3+math.sqrt(r3**2+4*r4))/2\n", + "Q5= Q4+Q1\n", + "d= (f*5500*v**2/(l*(h1-h2)))**0.2*12\n", + "\n", + "#RESULTS\n", + "print 'flow in to reservoir B= %.2f cusecs'%(Q3)\n", + "print ' flow in to reservoir D= %.1f cusecs'%(Q5)\n", + "print ' diameter of MN= %.f in'%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flow in to reservoir B= 1.84 cusecs\n", + " flow in to reservoir D= 4.4 cusecs\n", + " diameter of MN= 9 in\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 2.5 \t#ft\n", + "a= 45. \t#degrees\n", + "Q= 69. \t#cuses\n", + "l= 30. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Ps= 0.25*math.pi*d**2*w*l/2240\n", + "Rs= Ps*math.sqrt((1-math.cos(math.radians(a)))*2)\n", + "W= Q*w/2240\n", + "v= Q*4/(math.pi*d**2)\n", + "Rd= W*v*math.sqrt(2*(1-math.cos(math.radians(a))))/g\n", + "Rt= Rs+Rd\n", + "\n", + "#RESULTS\n", + "print 'total resultant thrust = %.3f tons'%(Rt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total resulmath.tant thrust = 3.782 tons\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "r1= 1./3\n", + "r2= 7./12\n", + "l= 5000. \t#ft\n", + "l1= 10000. \t#ft\n", + "d= 27. \t#in\n", + "d1= 18. \t#in\n", + "Q= 10. \t#cuses\n", + "f= 0.006\n", + "\n", + "#CALCULATIONS\n", + "Q2= Q/(math.sqrt(r2/r1)+1)\n", + "Q1= Q-Q2\n", + "H= (f*l*Q**2/(10*(d/12)**5))+(f*l1*Q1**2/(3*10**(d1/12)**5))\n", + "\n", + "#RESULTS\n", + "print 'total difference in head = %.2f ft'%(H)\n", + "\n", + "\n", + "#ANSWER GIVEN IN THE TEXTBOOK IS WRONG\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total difference in head = 5.20 ft\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 4. \t #ft/sec\n", + "L= 1225. \t#ft\n", + "l= 1200. \t#ft\n", + "H= 50. \t#ft\n", + "d= 1./3 \t#ft\n", + "f= 0.008\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "a= 2*g*H\n", + "b= (4*f*L/d)+1.5\n", + "c= math.sqrt(a/b)\n", + "d= math.sqrt(a*b)\n", + "T= math.log(math.sqrt((c+V)/(c-V)))*l*2/d\n", + "\n", + "#RESULTS\n", + "print 'time interval for elapse = %.2f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time interval for elapse = 3.95 sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "L= 8000. \t#ft\n", + "d= 5. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 5. \t #ft\n", + "l= 250. \t#ft\n", + "b= 100.\n", + "\n", + "#CALCULATIONS\n", + "A= math.pi*0.25*d**2*l-0.5*d**2*b\n", + "V= A*g/L\n", + "\n", + "#RESULTS\n", + "print 'Velocity = %.2f ft/sec'%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 14.73 ft/sec\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "B= 3. \t#ft\n", + "Cd= 0.6\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 6. \t #in\n", + "d2= 4. \t#in\n", + "\n", + "#CALCULATIONS\n", + "Q2= 0.428 \t#cuses\n", + "r= math.sqrt((((d1/12)**5)/((d2/12)**5)))\n", + "Q1= r*Q2\n", + "Q= Q1+Q2\n", + "\n", + "#RESULTS\n", + "print 'Total inflow = %.3f cuses'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total inflow = 1.607 cuses\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "f= 0.007\n", + "l= 30. \t#miles\n", + "Q1= 5.*10**6 \t#gal/day\n", + "w= 6.24 \t #lb/ft**3\n", + "H= 500. \t #ft\n", + "Q2= 7*10**6 \t#gal/day\n", + "\n", + "#CALCULATIONS\n", + "Qi= Q1/(w*24*3600)\n", + "d= (f*l*5280*Qi**2/(10*H))**0.2\n", + "Qe = Q2*Qi/Q1\n", + "x= (30-(H*10*d**5/(f*Qe**2*5280)))*(4./3)\n", + "\n", + "#RESULTS\n", + "print 'diameter of pipes = %.1f ft'%d\n", + "print 'length of new pipe required = %.1f miles'%(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of pipes = 1.8 ft\n", + "length of new pipe required = 19.6 miles\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch7.ipynb b/Problems_In_Hydraulics/ch7.ipynb new file mode 100755 index 00000000..b5eb3280 --- /dev/null +++ b/Problems_In_Hydraulics/ch7.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8fbfdaa034f011c9304b20c16adbf915d0a8f58f4b89051b6e8db7227dd1440f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Flow Under Varying Head" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 6. \t#ft\n", + "di= 2. \t #in\n", + "h= 9. \t #ft\n", + "Cd= 0.6\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5*(d/2)**2*math.pi/(Cd*math.pi*math.sqrt(2*g)/144)\n", + "\n", + "\n", + "vec2=quad(fun,0,h)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'Time to emptify = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time to emptify = 1615 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "d1= 4. \t#ft\n", + "d2= 2. \t #in\n", + "l= 300. \t#ft\n", + "P= 5. \t #lb/in**2\n", + "h1= 3. \t #ft\n", + "h2= 6. \t #ft\n", + "f= 0.01\n", + "\n", + "#CALCULATIONS\n", + "X= P*2.31*10*(d2/12)**5/(f*l)\n", + "A= math.pi*d1**2/4\n", + "\n", + "def fun(h):\n", + " return A*math.sqrt((P*2.31*10*(d2/12)**5/(f*l))-(10*(d2/12)**5*h/(f*l)))/(10*(d2/12)**5/(f*l))/7\n", + "\n", + "vec2=quad(fun,h1,h2)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.2f sec'%(T)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 689.35 sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 10. \t#in\n", + "l= 15. \t#ft\n", + "di= 3. \t#in\n", + "Cd= 0.62 \n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return -l*2*math.sqrt((d/2)**2-((d/2)-H)**2)/(Cd*(math.pi*(di/12)**2/4)*H**0.5*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,0,d/2)\n", + "T= vec2[0]\n", + "secs = -T%60\n", + "mins = -T/60\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d mins and %d seconds'%(mins,secs)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 27 mins and 54 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "h= 4. \t#ft\n", + "w= 6. \t#ft\n", + "l= 100. \t#yd\n", + "a= 60. \t#degrees\n", + "h1= 3. \t#ft\n", + "h2= 2. \t#ft\n", + "Cd= 0.6\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "A= l*3*w\n", + "def fun(H):\n", + " return -A*H**-2.5/(Cd*(8./15)*(math.tan(math.radians(a/2)))*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,h1,(h1-h2))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 654 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "A= 1./16 \t#mile**2\n", + "d= 2. \t#ft\n", + "h= 18. \t#ft\n", + "h1= 5. \t#ft\n", + "f= 0.006\n", + "l= 200. \t#ft\n", + "h2= 10. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "X= math.sqrt(1./((1.5+(4*f*l/d))/(2*g)))\n", + "def fun(H):\n", + " return A*5280**2*H**-0.5/(math.pi*d**2*X/4)\n", + "\n", + "vec2=quad(fun,h-h1,h)\n", + "T= vec2[0]\n", + "hours = T/3600\n", + "mins = T%3600/60\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d hours and %d mins sec'%(hours,round(mins,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 48 hours and 20 mins sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 8. \t#ft\n", + "b= 6. \t#ft\n", + "h= 10. \t#ft\n", + "r= 3.\n", + "Cd= 0.6\n", + "A1= 36. \t#ft**2\n", + "A2= 12. \t#ft**2\n", + "l1= 6. \t#ft\n", + "h1= 1. \t#ft\n", + "d= 2. \t#in\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5/(Cd*(math.pi*(d/12)**2/4)*math.sqrt(2*g)*((1/A1)+(1/A2)))\n", + "\n", + "vec2=quad(fun,0,(b-h1))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the levels to become equal = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the levels to become equal = 383 sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h1= 3. \t#ft\n", + "h2= 4. \t#ft diameter\n", + "r= 0.95 \t#m**-1\n", + "k= 27.65 \t#sec\n", + "Cd= 0.95\n", + "\n", + "#CALCULATIONS\n", + "T= k*(math.log(r*math.sqrt(h2)-1)+(r*math.sqrt(h2)-1))-k*(math.log(r*math.sqrt(h1)-1)+(r*math.sqrt(h1)-1))\n", + "h= ((h2-h1)/Cd)**2\n", + "\n", + "#RESULTS\n", + "print 'Time = %.2f sec'%(T)\n", + "print ' Increase in water level = %.2f ft'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time = 16.23 sec\n", + " Increase in water level = 1.11 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "t= 75. \t#sec\n", + "h= 10.5 \t#in constant\n", + "h1= 13.5 \t#in\n", + "\n", + "#CALCULATIONS\n", + "r= t*math.pi*math.sqrt(2*h**2)/math.log((math.sqrt(2*h1**2)+h1)/(math.sqrt(2*h**2)-h))\n", + "t= -r*((1/h1)-(1/h))\n", + "\n", + "#RESULTS\n", + "print 'A/K = %.f '%(r)\n", + "print ' Time taken = %.1f sec'%(t)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A/K = 1737 \n", + " Time taken = 36.8 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 9.8 \t#m/sec**2\n", + "h1= 10. \t#in\n", + "h2= 12. \t#in\n", + "r1= 1.32\n", + "r2= 1.56\n", + "r3= 1.97\n", + "r4= 4.10\n", + "r5= 2.64\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt(32.2)*(h2/18)**1.5\n", + "T= 10**5*(r1+2*r3+r4+4*(r3+r5))/(6*h2*60*60)\n", + "\n", + "#RESULTS\n", + "print 'Actual discharge = %.2f CBH**1.5 cuses'%(Q)\n", + "print ' Time = %.1f hr'%(T)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual discharge = 3.09 BH**1.5 cuses\n", + " Time = 10.7 hr\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch8.ipynb b/Problems_In_Hydraulics/ch8.ipynb new file mode 100755 index 00000000..9a5c856c --- /dev/null +++ b/Problems_In_Hydraulics/ch8.ipynb @@ -0,0 +1,296 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:35125badba4aaa9b528697efd91fa6b7acc4c2f1f63bb28106c08928483bd0b9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 :Viscosity and Viscous Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 10.01 \t#poise velocity\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 30.48 \t#cm\n", + "w= 453.6 \t#gm\n", + "\n", + "#CALCULATIONS\n", + "M= round(v*d/w,3)\n", + "F= M/g\n", + "\n", + "#RESULTS\n", + "print 'Pound in unit of mass = %.3f lb/ft sec absolute units'%(M)\n", + "print ' Pound in unit of force = %.4f slugs/ft sec'%(F)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pound in unit of mass = 0.673 lb/ft sec absolute units\n", + " Pound in unit of force = 0.0209 slugs/ft sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "W= 20. \t#tons/hr oil\n", + "l= 1000. \t#ft long\n", + "w= 57. \t#lb/ft**3 weighs\n", + "kv= 0.0205 \t#ft**2/sec kinematic viscisity\n", + "d= 6. \t#in diameter\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= W*2240/(3600*w)\n", + "A= math.pi*(d/12)**2/4\n", + "v= Q/A\n", + "R= v*(d/12)/kv\n", + "n= w*kv/g\n", + "P= 32*v*n*l/((d/12)**2*w)\n", + "HP= P*2240*W/(3600*500)\n", + "\n", + "#RESULTS\n", + "print 'Reynolds number = %.1f '%(R)\n", + "print ' H.P required = %.2f hp'%(HP)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reynolds number = 27.1 \n", + " H.P required = 2.26 hp\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 0.0067 \t#poise\n", + "l= 10. \t#ft length\n", + "w= 62. \t#lb/ft**3 density\n", + "d= 1. \t#in\n", + "Q= 2. \t#ft**2/sec\n", + "sm= 13.57\n", + "k1= 0.003\n", + "k2= 0.0725\n", + "r= 0.3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "n1= n*30.48/453.6\n", + "v= Q*4/(60*math.pi*(d/12)**2)\n", + "RN= v*(d/12)*w/n1\n", + "f= k1+(k2/RN**r)\n", + "hf= 4*f*l*v**2/(2*g*(d/12))\n", + "hl= hf*12/sm\n", + "\n", + "#RESULTS\n", + "print 'Head lost in inches of mercury = %.2f in'%(hl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head lost in inches of mercury = 1.37 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 0.91 \t#poise\n", + "g= 32.2 \t#ft/sec\n", + "N= 300. \t#r.p.m\n", + "t= 0.01 \t#in\n", + "r1= 0.25 \t#ft\n", + "r2= 1./6 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "n1= n*30.48/(454*g)\n", + "A= N*2*math.pi/60\n", + "t1= t/12\n", + "hp= math.pi*A**2*n1*(r1**4-r2**4)/(t1*1100)\n", + "\n", + "#RESULTS\n", + "print 'Horse Power lost = %.4f '%(hp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horse Power lost = 0.0201 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "vw= 0.3 \t#ft/sec\n", + "dw= 1. \t#in\n", + "da= 12. \t#in\n", + "ww= 62.3 \t#lb/ft**3\n", + "wa= 0.075 \t#lb/ft**3\n", + "nw= 0.01 \t#poise\n", + "na= 0.00018 \t#poise\n", + "\n", + "#CALCULATIONS\n", + "va= vw*dw*ww*na/(nw*da*wa)\n", + "\n", + "#RESULTS\n", + "print 'critical velocity of air = %.3f ft/sec'%(va)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical velocity of air = 0.374 ft/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "dm= 0.75 \t#in\n", + "dt= 0.25 \t#in\n", + "dP= 10.4 \t#lb/in**2\n", + "rd= 0.84\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "v1= math.sqrt(dP*144*g/(rd*w*((dm/dt)**4-1)))\n", + "Q= math.pi*dm**2*v1*60*w/(4*144*10)\n", + "\n", + "#RESULTS\n", + "print 'Discharge rate = %.1f gal.min'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge rate = 3.9 gal.min\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/ch9.ipynb b/Problems_In_Hydraulics/ch9.ipynb new file mode 100755 index 00000000..8afae5a1 --- /dev/null +++ b/Problems_In_Hydraulics/ch9.ipynb @@ -0,0 +1,323 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:62ceb66cf48441d19499a6332c57808da0a2f8834a586c75e2d7d1a835c045df" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Impact of Jets" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 2. \t #in\n", + "V= 210. \t#ft/sec\n", + "V1= 50. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "M= math.pi*V*w/(4*36*g)\n", + "F= M*V\n", + "dV= V-V1\n", + "M1= math.pi*dV*w/(4*36*g)\n", + "F1= M1*dV\n", + "W= F1*V1\n", + "F2= M*dV\n", + "W1= F2*V1\n", + "\n", + "#RESULTS\n", + "print 'Force on plate = %.f lb'%(F+1)\n", + "print ' Force on plate = %.f lb'%(F1)\n", + "print ' Work done/sec = %.f ft-lb/sec'%(W)\n", + "print ' Force on plate = %.f lb'%(F2)\n", + "print ' Work done/sec = %.f ft-lb/sec'%(round(W1,-3))\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on plate = 1865 lb\n", + " Force on plate = 1082 lb\n", + " Work done/sec = 54116 ft-lb/sec\n", + " Force on plate = 1421 lb\n", + " Work done/sec = 71000 ft-lb/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "v1= 15. \t#ft/sec\n", + "v2= 40. \t#ft/sec\n", + "a= 30. \t#degrees\n", + "b= 150. \t#degrees\n", + "v= 15.27 \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "a1= a-math.degrees(math.sin(v1*math.sin(math.radians(b))/v2))\n", + "w= math.cos(math.radians(a1))*v2\n", + "vr= v2*math.sin(math.radians(a1))/math.sin(math.radians(a))\n", + "v1= math.sqrt(v1**2+vr**2-2*v1*vr*math.cos(math.radians(a)))\n", + "r= 180-math.sin(math.radians(a))*vr/v\n", + "w1= v*math.cos(math.radians(r))\n", + "W= v1*(w-w1)/g\n", + "\n", + "#RESULTS\n", + "print 'a = %.2f degrees'%(a1)\n", + "print ' w = %.2f ft/sec'%(w)\n", + "print ' vr = %.2f ft/sec'%(vr)\n", + "print ' v1 = %.2f ft/sec'%(v1)\n", + "print ' w = %.2f ft/sec'%(w)\n", + "print ' Work done per pound = %.2f ft-lb/lb'%(W)\n", + "\n", + "# Note : Answers are different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 19.32 degrees\n", + " w = 37.75 ft/sec\n", + " vr = 26.47 ft/sec\n", + " v1 = 15.42 ft/sec\n", + " w = 37.75 ft/sec\n", + " Work done per pound = 25.39 ft-lb/lb\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 0.5 \t#in\n", + "a= 165. \t#degrees\n", + "W= 7.35 \t#lb\n", + "W1= 500. \t#lb\n", + "t= 148. \t#sec\n", + "g= 32.2 \t#ft/sec**2\n", + "w= 62.3 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "Q= W1/(t*w)\n", + "v= Q*16*144/math.pi\n", + "dv= v*(1-math.cos(math.radians(a)))\n", + "F= dv*W1/(t*g)\n", + "r= W/F\n", + "k= (1-(W*t*g/(W1*v)))/math.cos(math.radians(a))\n", + "\n", + "#RESULTS\n", + "print 'k = %.3f '%(k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 0.788 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "t= 0.25 \t#in\n", + "a= 30. \t#degrees\n", + "w= 480. \t#lb/ft**3\n", + "h= 2. \t#in\n", + "d= 0.5 \t#in\n", + "l= 6. \t#in\n", + "w1= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "W= t*l**2*w/1728\n", + "M= w1*math.pi*d**2*math.cos(math.radians(a))/(g*4*144)\n", + "v= math.sqrt(W*(l/2)*math.sin(math.radians(a))/(M*2*(1./math.cos(math.radians(a)))))\n", + "\n", + "#RESULTS\n", + "print 'Velocity of jet = %.1f ft/sec'%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of jet = 26.6 ft/sec\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 90. \t#ft/sec\n", + "a= 30. \t#degrees\n", + "u= 45. \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "w= V*math.cos(math.radians(a))\n", + "f= math.sqrt(V**2-w**2)\n", + "tanb= (math.atan(math.radians(f/(w-u))))\n", + "b = math.degrees(math.tan(tanb))\n", + "b = math.degrees(math.atan(b))\n", + "V1= math.sqrt(f**2+(u-f*1./math.tan(math.radians(b)))**2)\n", + "\n", + "#RESULTS\n", + "print \"B = %.2f degrees\"%b\n", + "print 'absolute velocity of water at the exit = %.1f ft/sec'%(V1)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B = 53.79 degrees\n", + "absolute velocity of water at the exit = 46.6 ft/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "u= 734. \t#ft/sec\n", + "v= 2000. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "da= 0.019 \t#kg/m**3\n", + "\n", + "#CALCULATIONS\n", + "W= g*v/(v-u)\n", + "A= W/(u*da)\n", + "\n", + "#RESULTS\n", + "print 'Weight of the air = %.1f lb/sec'%(W)\n", + "print ' Area of inlet = %.2f ft**2'%(A)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight of the air = 50.9 lb/sec\n", + " Area of inlet = 3.65 ft**2\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Problems_In_Hydraulics/screenshots/1Hydrostatics.png b/Problems_In_Hydraulics/screenshots/1Hydrostatics.png new file mode 100755 index 00000000..816d8250 Binary files /dev/null and b/Problems_In_Hydraulics/screenshots/1Hydrostatics.png differ diff --git a/Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png b/Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png new file mode 100755 index 00000000..4c71e1c3 Binary files /dev/null and b/Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png differ diff --git a/Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png b/Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png new file mode 100755 index 00000000..23e7a483 Binary files /dev/null and b/Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png differ diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb new file mode 100755 index 00000000..68503d70 --- /dev/null +++ b/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb @@ -0,0 +1,2940 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter 10: Functions

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

Example 10.1, Page number: 320

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

Example 10.2, Page number: 321

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

Example 10.3, Page number: 323

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

Example 10.4, Page number: 323

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

Example 10.5, Page number: 325

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

Example 10.6, Page number: 327

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

Example 10.7, Page number: 328

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

Example 10.8, Page number: 329

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

Example 10.9, Page number: 330

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

Example 10.10, Page number: 330

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

Example 10.11, Page number: 331

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

Example 10.12, Page number: 332

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

Example 10.13, Page number: 333

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

Example 10.14, Page number: 333

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

Example 10.15, Page number: 334

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

Example 10.16, Page number: 335

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

Example 10.17, Page number: 336

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

Example 10.18, Page number: 337

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

Example 10.19, Page number: 338

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

Example 10.20, Page number: 338

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

Example 10.21, Page number: 339

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

Example 10.22, Page number: 340

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

Example 10.23, Page number: 341

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

Example 10.24, Page number: 342

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

Example 10.25, Page number: 343

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

Example 10.26, Page number: 344

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

Example 10.27, Page number: 345

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

Example 10.28, Page number: 346

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

Example 10.29, Page number: 346

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

Example 10.30, Page number: 347

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

Example 10.31, Page number: 348

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

Example 10.32, Page number: 350

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

Example 10.33, Page number: 351

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

Example 10.34, Page number: 353

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

Example 10.35, Page number: 354

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

Example 10.36, Page number: 355

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

Example 10.37, Page number: 356

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

Example 10.38, Page number: 357

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

Example 10.39, Page number: 358

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

Example 10.40, Page number: 359

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

Example 10.41, Page number: 360

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

Example 10.42, Page number: 361

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

Example 10.43, Page number: 361

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

Example 10.44, Page number: 363

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

Example 10.45, Page number: 364

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

Example 10.46, Page number: 365

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

Example 10.47, Page number: 366

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

Example 10.48, Page number: 367

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

Example 10.49, Page number: 368

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

Example 10.50, Page number: 369

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

Example 10.51, Page number: 369

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

Example 10.52, Page number: 370

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

Example 10.53, Page number: 371

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

Chapter 11: Storage Class

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

Example 11.1, Page number: 376

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

Example 11.2, Page number: 376

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

Example 11.3, Page number: 377

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

Example 11.4, Page number: 378

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

Example 11.5, Page number: 379

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

Example 11.6, Page number: 380

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

Example 11.7, Page number: 380

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

Example 11.8, Page number: 381

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

Example 11.9, Page number: 382

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

Example 11.10, Page number: 382

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

Chapter 12: Preprocessor Directives

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

Example 12.1, Page number: 386

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

Example 12.2, Page number: 387

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

Example 12.3, Page number: 387

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

Example 12.4, Page number: 388

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

Example 12.5, Page number: 389

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

Example 12.6, Page number: 389

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

Example 12.7, Page number: 390

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

Example 12.8, Page number: 390

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

Example 12.9, Page number: 391

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

Example 12.10, Page number: 392

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

Example 12.11, Page number: 393

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

Example 12.12, Page number: 394

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

Example 12.13, Page number: 394

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

Example 12.14, Page number: 397

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

Example 12.15, Page number: 398

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

Example 12.16, Page number: 399

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

Example 12.17, Page number: 400

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

Example 12.18, Page number: 401

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

Chapter 13: Structure and Union

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

Example 13.1, Page number: 409

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

Example 13.2, Page number: 410

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

Example 13.3, Page number: 411

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

Example 13.4, Page number: 412

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

Example 13.5, Page number: 414

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

Example 13.6, Page number: 415

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

Example 13.7, Page number: 416

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

Example 13.8, Page number: 417

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

Example 13.9, Page number: 419

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

Example 13.10, Page number: 420

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

Example 13.11, Page number: 421

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

Example 13.12, Page number: 422

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

Example 13.13, Page number: 423

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

Example 13.14, Page number: 424

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

Example 13.15, Page number: 425

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

Example 13.16, Page number: 426

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

Example 13.17, Page number: 426

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

Example 13.18, Page number: 427

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

Example 13.19, Page number: 427

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

Example 13.20, Page number: 429

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

Example 13.21, Page number: 431

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

Example 13.22, Page number: 432

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

Example 13.23, Page number: 433

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

Example 13.24, Page number: 434

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

Example 13.25, Page number: 434

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

Example 13.26, Page number: 436

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

Example 13.27, Page number: 437

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

Example 13.28, Page number: 438

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

Example 13.29, Page number: 440

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

Example 13.30, Page number: 440

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

Example 13.31, Page number: 441

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

Example 13.32, Page number: 441

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

Example 13.33, Page number: 442

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

Example 13.34, Page number: 442

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

Example 13.35, Page number: 444

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

Example 13.36, Page number: 445

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

Chapter 14: Files

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

Example 14.1, Page number: 454

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

Example 14.2, Page number: 455

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

Example 14.3, Page number: 457

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

Example 14.4, Page number: 458

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

Example 14.5, Page number: 459

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

Example 14.6, Page number: 460

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

Example 14.7, Page number: 462

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

Example 14.8, Page number: 463

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

Example 14.9, Page number: 463

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

Example 14.10, Page number: 464

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

Example 14.11, Page number: 465

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

Example 14.12, Page number: 466

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

Example 14.13, Page number: 467

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

Example 14.14, Page number: 468

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

Example 14.15, Page number: 469

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

Example 14.16, Page number: 470

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

Example 14.17, Page number: 471

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

Example 14.18, Page number: 472

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

Example 14.19, Page number: 473

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

Example 14.20, Page number: 474

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

Example 14.21, Page number: 476

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

Example 14.22, Page number: 477

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

Example 14.23, Page number: 477

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

Example 14.24, Page number: 479

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

Example 14.25, Page number: 480

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

Example 14.26, Page number: 481

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

Example 14.27, Page number: 482

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

Example 14.28, Page number: 482

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

Example 14.29, Page number: 483

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

Example 14.30, Page number: 484

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

Example 14.31, Page number: 485

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

Example 14.32, Page number: 486

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

Example 14.33, Page number: 487

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

Example 14.34, Page number: 488

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

Example 14.35, Page number: 491

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

Example 14.36, Page number: 492

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

Example 14.37, Page number: 493

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

Example 14.38, Page number: 494

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

Example 14.39, Page number: 495

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

Example 14.40, Page number: 495

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

Example 14.41, Page number: 496

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

Example 14.42, Page number: 497

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

Example 14.43, Page number: 498

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

Example 14.44, Page number: 499

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

Chapter 15: Additional in 'C'

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

Example 15.1, Page number: 505

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

Example 15.2, Page number: 506

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

Example 15.3, Page number: 507

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

Example 15.4, Page number: 508

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

Example 15.5, Page number: 510

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

Example 15.6, Page number: 518

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Draw circle, line and arc using graphics function\n", + "\n", + "%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\nHQAsRLgDgIUIdwCwEOEOABYaNNzvvvtu5efn67rr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tTe3j4qepM+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": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG+xJREFUeJzt3X1QU2e+B/DvyQtJgCDvCskqCLSIIqR2lbvjbGOVTmd2\naFnb8Y6dup1R94/6z3Zpbx1nR4t3inbtujtdp7rM1umt/af27lwLu1s7Mlsz1O5aFHGtUgUEWt5i\nhcBKgBCSPPcPylkp6EgSCTx+P8MZT56QnN/jo9/zkpNzFCGEABERSUsT6QKIiOj+YtATEUmOQU9E\nJDkGPRGR5Bj0RESSY9ATEUku6KDfvXs3CgoKUFhYiPXr16OjowMA0N7eDpPJBJvNBpvNhh07doSt\nWCIimjkl2PPoBwcHYTabAQCHDh3CP//5T7zz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Hss8/irbfeQmxsLF588UW0tbXh4sWLSEtLw8svvxzpEoOi0Whw8eJFdHZ2\nora2FqdPn570/Hwfu+/3z+FwSDN2f/nLX5CamgqbzXbHLdz5PH536p8s4wcAn3/+ORoaGnDy5Em8\n/fbb+OyzzyY9fy/jN2tBPzY2hmeeeQZbtmxBaWkpgPE10cQ3b3t6epCamjpb5YTdRP+ef/55tX+p\nqanqIGzfvh11dXURrjI0CxYswE9+8hPU19dLNXYTJvp3/vx5acbu73//O6qrq5GZmYnNmzfj008/\nxZYtW6QZv+n697Of/Uya8QOAtLQ0AOPXE/vpT3+Kurq6GY/frAS9EALbtm1DXl4eXnrpJbX9qaee\nwnvvvQcAeO+999SAnG/u1L+enh51/sSJE8jPz49EeSHp7e1Vd3tHRkZQU1MDm80mzdjdqX+3X/pj\nvo4dAOzbtw8dHR1oa2vDBx98gMcffxzvv/++NOM3Xf+OHTsmxf89YPxEgcHBQQDA0NAQTp06hfz8\n/JmP34y/SxuEzz77TCiKIgoKCkRhYaEoLCwUJ0+eFH19fWL9+vUiJydHFBcXi/7+/tkoJ+ym69/H\nH38stmzZIvLz88XKlSvF008/LZxOZ6RLnbFLly4Jm80mCgoKRH5+vjhw4IAQQkgzdnfqnwxj930O\nh0OUlJQIIeQZv9udPn1a7d/zzz8vxfi1traKgoICUVBQIJYvXy727dsnhJj5+PELU0REkuOtBImI\nJMegJyKSHIOeiEhyDHoiIskx6ImIJMegJyKSHIOeiEhyDHoiIsn9P/ox1+CwlWHmAAAAAElFTkSu\nQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Example 15.7, Page number: 519

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Draw boxes and fill with different designs.\n", + "\n", + "%pylab\n", + "#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\nt4Xpzv5ovN8yfqT33At8fe/5SE5y77ncez6ffPTZc4/3Usf3fV8AALNCiz0AAMD8IvQAYByhBwDj\nCD0AGEfoAcA4Qg8AxgUO/cGDB1VWVqby8nLt3LlTiURCkjQyMqKlS5fKdV25rqt9+/ZlbbAAgPQ5\nQT9Hf/PmTeXm5kqSWltb9fHHH+vXv/61RkZGVFVVpYsXL2Z1oACAYAKf0d+LvCTdunVLDz30UFYG\nBADIrpxMnvzjH/9Yb731lpYtW6azZ8+m9g8PD8t1XS1fvlyvvvqqtm/fnvFAAQDBzHnpJhqNKplM\nTtt/+PBhVVVVpe4fOXJEn3zyid544w1NTk7q9u3bys/P17lz51RdXa3Lly9PeQcAAFhAfhZ89tln\n/saNG2d8zPM8v7e3d9r+oqIiXxIbGxsbWxpbUVFR2o0OfI1+cHAwdbu9vV2u60qSJiYmdPfuXUnS\n0NCQBgcHtXbt2mnP//TTT+X7vtnt0KFDiz4G5sf8/hfnZ3luvu/r008/TbvXga/RHzhwQJ988omW\nLFmioqIiHT9+XJLU3d2t+vp6hcNhhUIhtbW1KS8vL+hhAAAZChz63/72tzPur6mpUU1NTeABAQCy\ni2/GzhPP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KR0PDwsN5++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": [ + "" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Example 15.8, Page number: 520

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Display text in different size, font, vertically and horizontally \n", + "\n", + "%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/vGnezIwMMOQBASGLIIoAgKSg+ASX0AQV5II\nKuqCArqGV4FFF8EAiLrKLkFAMawSDSgZBFxAlrQknSGpIBJkkORwf3/w63q7Ot6BIa3fzzl9znTV\nrVu3blWHZ6r6lscYYwQAAAAAQBTey90AAAAAAMDVgQAJAAAAALBCgAQAAAAAWCFAAgAAAACsECAB\nAAAAAFYIkAAAAAAAKwRIAMAF83q9rseUKVNc8ydPnhxU5mLbsmWLYmNjnfUNHTr0oq/zcunVq5er\nb5s0aXK5m/RfY/HixUHH7u7duy93sxDGxdhfl/r1lZ2drTfeeEMNGzZUWlqaYmJiLul755WM12Pu\nmjhxoqsvv/jiC6vlYi9yuwAAuahx48ZaunSpa9rZs2dDls3MzFTZsmVd03r27KlJkyZdtPb5eDye\nC5qfG4YMGeL0TXJysgYOHBhUJvDLWKNGjbRo0aKQ9U2ePFn33HOPa9qkSZPUs2fPXGpx7rkU/Xu5\njBkzRkeOHHGeN2nSRI0aNbpk689p35YpU+aCvuCWLl1aGRkZ5718bpg8ebIyMzOd5zfddJPat29/\n+RqUA6H2165du1zvgx6PRwMHDlSBAgXOu87c1KVLF3388ceXZd3na+bMmVq/fr3zPD09/ZK8N16p\n/RHNtm3btHTpUi1dulSbNm3Srl27dOzYMcXHx6tIkSK68cYb1blzZ3Xt2lWxsaHjWqjPpEjmzJmj\n1q1bu6b16NFDw4cPd96jhgwZom+++SZqvxIgAeAqltMPz6v1wzanFi5cqE8//dR5/sADDyglJSXq\ncldrf/racaW052IaM2aMK5B5PJ5LGiAvtSthn06ePNn1j6uePXte8QHS4/HIGBNyXkZGhoYPH+6a\n1rt3b+sAeTEtX748ZHiMtD1XgpkzZ+rtt992njdq1OiiBsgrvT8i+eijj9S5c+eQ806cOKFdu3Zp\n165dmjVrlkaOHKnZs2crPT39gtcb6r0kNjZWjz32mB566CFJ0oYNGzR58mT17t07Yl0ESADAf52R\nI0c6f3s8HvXt2/cytubie/HFFzVs2DDneWJi4mVszaV1JQSsSDweT8g2hvryG1juSv2CfCX3ed26\ndV1nSyWpRIkSrueB7b+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\n6tixo6ZOner6wpabSpQooVKlSrkepUuXDjqbFBsbG1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q8Xj0xBNPRFzufLcp0npzu55p06YFXdEQSlxcnEaO\nHBl1my+kTa1atVKNGjXCLuPfn7Z9Gxsbq3HjxoUdYTZcW3IisC2X4/PQRmA7Y2JilCdPHqtlCxYs\nqBkzZriuOAgUeIVKqNs1+SNAAsBVxBNwX0KbD+LAZULNHz58uHbs2KEnn3xS9erVU5EiRRQfH6+k\npCRde+21at68uZ566iktWbLEdZmL7XoC2xuuLR07dtR3332nF154QU2aNFHRokUVHx+vfPnyqXz5\n8rr77rv16aef6osvvgg7hHmFChVcXy5Xr14d9nciNv0TahsilU9JSdGsWbO0cOFC9e7dW5UqVVL+\n/PkVFxenwoULq2HDhvrLX/6ijIwM3X333RfcrlBti1ZftEegkiVLavny5Zo5c6buvPNOpaenK2/e\nvIqPj1exYsXUokULvfLKK/r2228jXrpqcyxGK1O6dGmtWrVKd911l0qUKKH4+Piwy9SsWVPr1q1T\nz549Vbx4cae9HTt21LJly9SnT5+o7bI9dnPKpt+lcwH+448/1ooVK3TfffepWrVqSk1NVWxsrJKT\nk1WhQgW1b99eo0eP1ubNm12/qerfv78yMjKc+kuUKKHXX3/dVX/r1q2dyxp95e655x7XPeDy58+v\nr776Sv369VN6eroSEhJyfM/ZUHyvU/+6ypYt6xroJSEhQbVr1w7qq3AB0nZ/DRw4UNOmTVODBg2U\nkpIir9cbdptsX182643G9n1GOtc3b731ltauXav+/furWrVqSklJUVxcnNLS0lS7dm39+c9/1o4d\nO8IOBmNzDNq0KSYmRgsWLNCgQYNUqVIlJSYmhi0/btw4TZ8+Xf3791edOnVUtmxZJScnKy4uTgUL\nFlTNmjX16KOPauPGjUH3mI3Wz6HampP3utz6PIwkp20M1c7k5GTt379f7733nu6//37Vrl3baWdi\nYqKKFy+uli1b6uWXX9bOnTvVqVOnsO355ZdfXP80qlSpUtTb43jMxfpXGgAAl8nChQtdg8M89thj\nIQcUAADg92z8+PH605/+5DyfOHFi0CBEgQiQAID/Sq1bt3ZGHU1OTlZmZqZSU1Mvc6sAAL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k\nWlqa2rRpo8WLF6tbt27W/RZpvn/bAh+SdNddd2nx4sVq06aNChUq5NyPsWvXrvr6669d97zMSf9K\n537neuedd6pIkSJB6502bZq6du2qggULKiUlRd27d9d7773narPt9ocTbr/ceeedWr58uTp16qRi\nxYopLi5ORYoUUa1atfTnP/9ZgwYNctr/9ddfy+PxaNSoUSpXrpyKFy+u1157TZK0detWPfroo069\nU6dOVcOGDVWgQIGoAyn5812a6vF4XL+78x+cqHHjxkHbFqpPbr75Zo0bN07lypVTfHx8yDZEOo5s\n2htpf/ztb3/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\nAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoE\nJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACA\nEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQA\nAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIg\nAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACU\nCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAA\nACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJ\nAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAICSoZ0eAHhpTz/9dO69\n99488sgjabfbmTBhQqZOnZrRo0d3ejQAAAYhAQkNs2nTpixYsCBf+MIXcvfdd2fTpk1pt9tJklar\nlaFDh+aoo47KOeeckzPOOCPDhg3r8MQAAAwWrfaWn0yBjps/f34uv/zyrFq1qnT+pEmTctVVV+X0\n00/fyZMBAICAhEbp6nr+tuTf+73fyzHHHJPDDz88e+yxR5Jk/fr1Wb58ef7jP/4j//Vf/5XkuV3J\n3t7ejswLAMDgIiChQcaNG5fzzz8/H/jABzJp0qRtnrtq1apcd911+exnP5sNGzYM0IQAAAxmAhIa\nZMOGDdl11113+t8BAIBfh4CEhlqzZk1arVb233//To8CAABJCu8D+aEPfSjjx49PV1dXTjrppJc8\nb+HChTnwwAMzatSovOUtb8nPfvaz3+ScMOhMmjTpJS9jnTRpUiZPnjzAEwEAMNhtNyBbrVbe8573\n9H38Yh5++OG8+93vzq677pprrrkm3/ve9zJjxozf7KRAkqTdbmfNmjVZs2ZNp0cBAGCQ2e77QP7d\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\nvvGNb2TffffN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mIKFBFi5cmNmzZ/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\nzj777KxevfpFf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jIyMqKamRp2dnbpy5YrpOAAAAEbRQAIAAAAA\n1uSPvokOAAAAAOD3oYEEAAAAAKwJDSQAAAAAYE1oIAEAAAAAa0IDCQAAAABYExpIAAAAAMCa0EAC\nAAAAANbkf1M+pbyPupgkAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Example 15.9, Page number: 521

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