summaryrefslogtreecommitdiff
path: root/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti
diff options
context:
space:
mode:
authorTrupti Kini2016-11-23 23:30:49 +0600
committerTrupti Kini2016-11-23 23:30:49 +0600
commite2984baaac8ec023123503a40110435e68d62756 (patch)
treeee8dcf2e7aa51dcd64eb4e0483d2345f2233a1c1 /MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti
parenta553f29c9084f7aa93961b9fb5ed0aec18686cb1 (diff)
downloadPython-Textbook-Companions-e2984baaac8ec023123503a40110435e68d62756.tar.gz
Python-Textbook-Companions-e2984baaac8ec023123503a40110435e68d62756.tar.bz2
Python-Textbook-Companions-e2984baaac8ec023123503a40110435e68d62756.zip
Added(A)/Deleted(D) following books
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_VppI6PU.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_eDxglQh.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_s0rxYmx.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_u0ZzXNL.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_vTLvAsl.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_2hw19L7.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_d4LZwNS.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_orxiKvI.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_rVPjDNV.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_shlSF2D.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_4NAW2Fm.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_FfNxDUK.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_ZDZIhlt.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_gTfdUW2.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_qUFA2gJ.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_DtcvRnP.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_Rka6634.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_cZJsXcd.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_kdoUcUP.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_meY4gNm.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_3CrecVA.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_3GOPcRl.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_3oe48aD.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_elIpiT6.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_svJ0ZRH.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_5zdARLq.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_ByttvTe.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_fzQxngT.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_maz8Mpx.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_yrs8aD8.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_Cj6lfrp.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_dkmYc9u.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_pVrZ16h.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_rlB25DY.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_v0NmXc1.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_9e9mp4v.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_P4XexVb.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_ZzjWlQd.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_aODGM7T.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_hefoBhO.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_1gnNs9u.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_3jQe33P.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_82dKcIb.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_B9Rqa7w.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_sbBGzp3.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_48wEqkn.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_4Sf4X8V.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_K4XC4i4.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_Lujuudw.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_q7uuGrG.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_5IoMeUe.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_IAy71Ch.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_SxldOqQ.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_nKNv9Wk.ipynb A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_vmNsUjP.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_AzBO5oY.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_r6Y8ULo.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_SOLVgXg.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_dWG3d2Y.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_D0ImquH.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_EeN8oH7.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Z95iVp3.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_fdbb8ly.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_xobe83Y.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_yzunizs.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_42vnHw9.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_F9Bz15n.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_KLSq0oK.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_MoXnaf4.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_mHtlO6a.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xHYwxJ4.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_EZKiqPL.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_VkfH2oR.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_dbMwF5t.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_lB9BZeV.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_phPgJb2.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_vhNgss4.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_JAwYggT.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_N9DqFsm.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_P9rwEqr.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_R0XPX4L.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_S0t8OJu.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_uFVYXqM.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_24XsJCT.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_8mD0UuG.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_LKhM1Au.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_ZKnRxp7.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_nV0EOp8.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_woQKdAT.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_0a0tZuT.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_5vrvPsl.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_RVkqLSe.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_gyVuqN8.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_jOUBDFo.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_otmOyr2.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_CCZqXKR.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_JTyCJsL.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_f3CqV2f.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_lYxlTcT.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_1aLh7y0.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_2XXGNQt.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_3V8tDtA.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_43oToOV.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_4fqVxcE.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_5XodvPd.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_5alZU29.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_61hsExw.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_6qwmhHU.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_7lzRnr0.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_7pdEUt8.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_96rcQDS.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_986l79d.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_9ErC6RA.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_9Rw4WUL.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_9cwcC1v.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_9dxIAgL.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_9saU825.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_BUWDqRo.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_GefqDaC.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_HyPiW9H.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_Jzzhgw5.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_Lz458Y6.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_MG81yt8.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_MG8z9eQ.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_Oxr9B3A.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_Pwqzb8a.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_Q7PpTqw.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_SwvijzF.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_UM4ptLd.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_UUIzKI9.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_VJUnpiC.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_VRyICL4.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_VtilP9P.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_XvRiQzf.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_ZgH5gHk.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_Zo9zby0.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_aMuyjoe.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_aOrqAnb.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_aXglZdg.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_b69VCaT.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_bg51CID.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_dsYxoMq.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_eobmuMh.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_fq4RONl.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_gAk3z0j.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_hCfFR8F.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_hK5EJWu.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_iL7yFH3.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_iMZmAfZ.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_ighXyFk.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_jacaAtE.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_ktswPb3.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_l0DVFDN.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_lhKq0fF.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_m7Qc24V.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_nCBI46r.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_oSlKePW.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_pG48gQ4.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_rk3KbDl.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_sns7nwl.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_t48qDiD.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_u1j27Ap.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_vTg4lNU.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_wF4TlOQ.ipynb A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/Cha_xPlbJ6n.ipynb
Diffstat (limited to 'MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti')
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_AzBO5oY.ipynb571
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_r6Y8ULo.ipynb571
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_SOLVgXg.ipynb654
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_dWG3d2Y.ipynb654
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_D0ImquH.ipynb373
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_EeN8oH7.ipynb373
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Z95iVp3.ipynb373
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_fdbb8ly.ipynb373
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_xobe83Y.ipynb373
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_yzunizs.ipynb373
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_42vnHw9.ipynb1857
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_F9Bz15n.ipynb1857
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_KLSq0oK.ipynb1857
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_MoXnaf4.ipynb1857
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_mHtlO6a.ipynb1857
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xHYwxJ4.ipynb1857
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_EZKiqPL.ipynb1030
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_VkfH2oR.ipynb1030
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_dbMwF5t.ipynb1030
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_lB9BZeV.ipynb1030
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_phPgJb2.ipynb1030
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_vhNgss4.ipynb1030
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_JAwYggT.ipynb1403
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_N9DqFsm.ipynb1403
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_P9rwEqr.ipynb1403
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_R0XPX4L.ipynb1403
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_S0t8OJu.ipynb1403
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_uFVYXqM.ipynb1403
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_24XsJCT.ipynb774
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_8mD0UuG.ipynb774
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_LKhM1Au.ipynb774
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_ZKnRxp7.ipynb774
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_nV0EOp8.ipynb774
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_woQKdAT.ipynb774
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_0a0tZuT.ipynb1593
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_5vrvPsl.ipynb1593
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_RVkqLSe.ipynb1593
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_gyVuqN8.ipynb1593
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_jOUBDFo.ipynb1593
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_otmOyr2.ipynb1593
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_CCZqXKR.ipynb1325
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_JTyCJsL.ipynb1325
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_f3CqV2f.ipynb466
-rw-r--r--MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_lYxlTcT.ipynb466
44 files changed, 48212 insertions, 0 deletions
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_AzBO5oY.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_AzBO5oY.ipynb
new file mode 100644
index 00000000..e89d127d
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_AzBO5oY.ipynb
@@ -0,0 +1,571 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter10-STRESSES IN BEAMS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.1 page number 319\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) w= 5.76 KN/m\n",
+ "(ii) P= 9.72 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n",
+ "\n",
+ "b=float(120) \n",
+ "d=float(180) \n",
+ "\n",
+ "#I=(b*d^3)/12,Ymax=d/2\n",
+ "\n",
+ "Z=(b*pow(d,2))/6 \n",
+ "fper=float(10)\n",
+ "\n",
+ "L=3\n",
+ "Mmax=fper*Z\n",
+ "\n",
+ "#Let maximum udl beam can carry be w/metre length \n",
+ "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n",
+ "\n",
+ "w=(Mmax*8)/(pow(L,2)*1000000)\n",
+ "\n",
+ "print \"(i) w=\",round(w,2),\"KN/m\"\n",
+ "\n",
+ "# Concentrated load at distance 1 m from the support be P kN.\n",
+ "\n",
+ "a=float(1) #distance of point at which load is applied from left,m\n",
+ "b=float(2) #distance of point at which load is applied from right,m\n",
+ "\n",
+ "P=(L*Mmax)/(a*b*1000000)\n",
+ "\n",
+ "print \"(ii) P=\",round(P,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.2 page number 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " P= 4.52 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n",
+ "\n",
+ "D=float(60) #external diameter,mm\n",
+ "d=float(44) #Thickness,mm\n",
+ "\n",
+ "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n",
+ "Ymax=float(30) #extreme fibre distance,mm\n",
+ "\n",
+ "Z=I/Ymax \n",
+ "fper=float(150)\n",
+ "\n",
+ "Mmax=fper*Z\n",
+ "\n",
+ "#Let maximum load it can carry be P kN.\n",
+ "L=float(2)\n",
+ "P=(4*Mmax)/(L*1000000)\n",
+ "\n",
+ "print \" P=\",round(P,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.3 page number 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "w= 68.49 KN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "A=float(180) #width of I-beam,mm\n",
+ "H=float(400) #height of I-beam,mm\n",
+ "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n",
+ "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n",
+ "\n",
+ "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n",
+ "ymax=float(200) #extreme fibre,mm\n",
+ "\n",
+ "Z=I/ymax\n",
+ "fper=float(150) \n",
+ "\n",
+ "Mmax=fper*Z\n",
+ "\n",
+ "#If udl is w kN/m, maximum moment in cantilever\n",
+ "\n",
+ "L=2 #m\n",
+ "\n",
+ "w=Mmax/(L*1000000)\n",
+ "print \"w=\",round(w,2),\"KN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.4 page number 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n",
+ "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n",
+ "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A=180.0*10.0+380.0*10.0+180.0*10.0\n",
+ "\n",
+ "#If ‘a’ is the size of the equivalent square section, \n",
+ "\n",
+ "a=float(sqrt(A)) #mm\n",
+ "\n",
+ "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n",
+ "\n",
+ "ymax=a/2\n",
+ "\n",
+ "Z=I/ymax\n",
+ "\n",
+ "f=150.0 \n",
+ "\n",
+ "Mcc=f*Z #Moment carrying capacity\n",
+ "\n",
+ "MccI=136985000.0\n",
+ "\n",
+ "Ratio=MccI/Mcc\n",
+ "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n",
+ "\n",
+ "\n",
+ "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n",
+ "b=sqrt(7400/2)\n",
+ "\n",
+ "ymax=b\n",
+ "\n",
+ "I=b*(pow((2*b),3))/12\n",
+ " \n",
+ "M=f*I/ymax\n",
+ "\n",
+ "\n",
+ "MccI=136985000\n",
+ "\n",
+ "Ratio=MccI/M\n",
+ "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n",
+ "\n",
+ "#Equivalent circular section. Let diameter be d.\n",
+ "\n",
+ "d=sqrt(7400*4/pi)\n",
+ "\n",
+ "I=(pi*pow(d,4))/64\n",
+ "ymax=d/2\n",
+ "Z=I/ymax\n",
+ "fper=float(150)\n",
+ "M=fper*Z\n",
+ "\n",
+ "MccI=136985000\n",
+ "\n",
+ "Ratio=MccI/M\n",
+ "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.5 page number 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 127.632 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n",
+ "\n",
+ "b1=float(240)\n",
+ "b=float(180)\n",
+ "t=float(10)\n",
+ "h=float(400)\n",
+ "w=float(8)\n",
+ " \n",
+ "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n",
+ "\n",
+ "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n",
+ "\n",
+ "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n",
+ "\n",
+ "ytop=(h+t/2)-Y\n",
+ "ybottom=Y\n",
+ "ymax=Y\n",
+ "\n",
+ "Z=I/ymax\n",
+ "fper=150\n",
+ "M=fper*Z/1000000 #Momnent carrying capacity of the section\n",
+ "\n",
+ "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n",
+ "\n",
+ "P=M*4/(w/2)\n",
+ "\n",
+ "print \"P=\",round(P,3),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.6 page number 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "w= 2.734 KN/m\n",
+ "calculation mistake in book\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n",
+ "#variable declaration\n",
+ "from math import sqrt\n",
+ "b1=float(75)\n",
+ "h1=50\n",
+ "h2=50\n",
+ "b2=float(150)\n",
+ "t=float(25)\n",
+ "h=float(200)\n",
+ "\n",
+ " \n",
+ "A=float(75*50+25*100+150*50) #Area of section,A\n",
+ "\n",
+ "Y=(75*50*175+25*100*100+150*50*25)/A\n",
+ "\n",
+ "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n",
+ "\n",
+ "\n",
+ "\n",
+ "ytop=(h-Y)\n",
+ "ybottom=Y\n",
+ "\n",
+ "\n",
+ "Z1=I/ytop\n",
+ "fperc=90\n",
+ "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n",
+ "\n",
+ "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n",
+ "\n",
+ "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n",
+ "\n",
+ "Z2=I/ybottom\n",
+ "\n",
+ "fpert=30 \n",
+ "\n",
+ "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n",
+ "\n",
+ "\n",
+ "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n",
+ "Mmax=min(M1,M2)\n",
+ "\n",
+ "L=float(5)\n",
+ "w=sqrt(Mmax*8/pow(L,2))\n",
+ "\n",
+ "print\"w=\",round(w,3),\"KN/m\"\n",
+ "print\"calculation mistake in book\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.7 page number 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y= 5.0 m\n",
+ "f= 5.24 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n",
+ "#Consider a section y metres from top. Diameter at this section is d.\n",
+ "#d=120+12*y\n",
+ "#I=pi*pow(d,4)/64\n",
+ "#Z=I*2/d=pi*pow(d,3)/32\n",
+ "#variable declaration \n",
+ "#M=600*1000*y #moment,N-mm\n",
+ "#f*Z=M,f is extreme fibre stress.\n",
+ "y=float(5) \n",
+ "print \"y=\",round(y,2),\"m\"\n",
+ "\n",
+ "#Stress at this section f is given by\n",
+ "P=600\n",
+ "M=P*y*1000\n",
+ "d=120+12*y\n",
+ "I=pi*pow(d,4)/64\n",
+ "Z=I*2/d\n",
+ "\n",
+ "f=M/Z\n",
+ "\n",
+ "print \"f=\",round(f,3),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.9 page number 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b= 150.0 mm\n",
+ "d= 300.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n",
+ "\n",
+ "#variable declaration\n",
+ "w=float(5) #KN/m\n",
+ "L=float(6) #m \n",
+ "\n",
+ "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n",
+ "\n",
+ "#Let b be the width and d the depth. Then in this problem d = 2b.\n",
+ "#Z=b*pow(d,2)/6=2*(b**3)/3\n",
+ "f=10 #N/mm^2\n",
+ "#f*Z=M\n",
+ "b=float(((M*3)/(2*f))**(0.3333))\n",
+ "print \"b=\",round(b),\"mm\"\n",
+ "\n",
+ "d=2*b\n",
+ "print \"d=\",round(d),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.10 page number 329\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d= 164.3 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n",
+ "\n",
+ "L=float(3) #Span of cantilever,m\n",
+ "w=float(3) #uniformly distributed load,KN/m\n",
+ "\n",
+ "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n",
+ "#let b be the width and d the depth\n",
+ "#Z=b*pow(d,2)/6\n",
+ "\n",
+ "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n",
+ "fper=30 #N/mm^2\n",
+ "b=100 #mm\n",
+ "f=30 \n",
+ "\n",
+ "#f*Z=M\n",
+ "\n",
+ "d=sqrt((M*6)/(b*f))\n",
+ "\n",
+ "print \"d=\",round(d,1),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.11 page number 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d= 23.11 mm\n",
+ "select 25mm bar \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n",
+ "L=1000\n",
+ "W=800\n",
+ "M=W*L/4 #Maximum moment,N-mm\n",
+ "f=150 #permissible stress,N/mm^2\n",
+ "\n",
+ "d=float((((M*32)/(pi*f)))**(0.33))\n",
+ "\n",
+ "print \"d=\",round(d,2),\"mm\"\n",
+ "print \"select 25mm bar \"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_r6Y8ULo.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_r6Y8ULo.ipynb
new file mode 100644
index 00000000..e89d127d
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_r6Y8ULo.ipynb
@@ -0,0 +1,571 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter10-STRESSES IN BEAMS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.1 page number 319\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) w= 5.76 KN/m\n",
+ "(ii) P= 9.72 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n",
+ "\n",
+ "b=float(120) \n",
+ "d=float(180) \n",
+ "\n",
+ "#I=(b*d^3)/12,Ymax=d/2\n",
+ "\n",
+ "Z=(b*pow(d,2))/6 \n",
+ "fper=float(10)\n",
+ "\n",
+ "L=3\n",
+ "Mmax=fper*Z\n",
+ "\n",
+ "#Let maximum udl beam can carry be w/metre length \n",
+ "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n",
+ "\n",
+ "w=(Mmax*8)/(pow(L,2)*1000000)\n",
+ "\n",
+ "print \"(i) w=\",round(w,2),\"KN/m\"\n",
+ "\n",
+ "# Concentrated load at distance 1 m from the support be P kN.\n",
+ "\n",
+ "a=float(1) #distance of point at which load is applied from left,m\n",
+ "b=float(2) #distance of point at which load is applied from right,m\n",
+ "\n",
+ "P=(L*Mmax)/(a*b*1000000)\n",
+ "\n",
+ "print \"(ii) P=\",round(P,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.2 page number 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " P= 4.52 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n",
+ "\n",
+ "D=float(60) #external diameter,mm\n",
+ "d=float(44) #Thickness,mm\n",
+ "\n",
+ "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n",
+ "Ymax=float(30) #extreme fibre distance,mm\n",
+ "\n",
+ "Z=I/Ymax \n",
+ "fper=float(150)\n",
+ "\n",
+ "Mmax=fper*Z\n",
+ "\n",
+ "#Let maximum load it can carry be P kN.\n",
+ "L=float(2)\n",
+ "P=(4*Mmax)/(L*1000000)\n",
+ "\n",
+ "print \" P=\",round(P,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.3 page number 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "w= 68.49 KN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "A=float(180) #width of I-beam,mm\n",
+ "H=float(400) #height of I-beam,mm\n",
+ "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n",
+ "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n",
+ "\n",
+ "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n",
+ "ymax=float(200) #extreme fibre,mm\n",
+ "\n",
+ "Z=I/ymax\n",
+ "fper=float(150) \n",
+ "\n",
+ "Mmax=fper*Z\n",
+ "\n",
+ "#If udl is w kN/m, maximum moment in cantilever\n",
+ "\n",
+ "L=2 #m\n",
+ "\n",
+ "w=Mmax/(L*1000000)\n",
+ "print \"w=\",round(w,2),\"KN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.4 page number 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n",
+ "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n",
+ "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A=180.0*10.0+380.0*10.0+180.0*10.0\n",
+ "\n",
+ "#If ‘a’ is the size of the equivalent square section, \n",
+ "\n",
+ "a=float(sqrt(A)) #mm\n",
+ "\n",
+ "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n",
+ "\n",
+ "ymax=a/2\n",
+ "\n",
+ "Z=I/ymax\n",
+ "\n",
+ "f=150.0 \n",
+ "\n",
+ "Mcc=f*Z #Moment carrying capacity\n",
+ "\n",
+ "MccI=136985000.0\n",
+ "\n",
+ "Ratio=MccI/Mcc\n",
+ "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n",
+ "\n",
+ "\n",
+ "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n",
+ "b=sqrt(7400/2)\n",
+ "\n",
+ "ymax=b\n",
+ "\n",
+ "I=b*(pow((2*b),3))/12\n",
+ " \n",
+ "M=f*I/ymax\n",
+ "\n",
+ "\n",
+ "MccI=136985000\n",
+ "\n",
+ "Ratio=MccI/M\n",
+ "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n",
+ "\n",
+ "#Equivalent circular section. Let diameter be d.\n",
+ "\n",
+ "d=sqrt(7400*4/pi)\n",
+ "\n",
+ "I=(pi*pow(d,4))/64\n",
+ "ymax=d/2\n",
+ "Z=I/ymax\n",
+ "fper=float(150)\n",
+ "M=fper*Z\n",
+ "\n",
+ "MccI=136985000\n",
+ "\n",
+ "Ratio=MccI/M\n",
+ "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.5 page number 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 127.632 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n",
+ "\n",
+ "b1=float(240)\n",
+ "b=float(180)\n",
+ "t=float(10)\n",
+ "h=float(400)\n",
+ "w=float(8)\n",
+ " \n",
+ "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n",
+ "\n",
+ "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n",
+ "\n",
+ "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n",
+ "\n",
+ "ytop=(h+t/2)-Y\n",
+ "ybottom=Y\n",
+ "ymax=Y\n",
+ "\n",
+ "Z=I/ymax\n",
+ "fper=150\n",
+ "M=fper*Z/1000000 #Momnent carrying capacity of the section\n",
+ "\n",
+ "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n",
+ "\n",
+ "P=M*4/(w/2)\n",
+ "\n",
+ "print \"P=\",round(P,3),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.6 page number 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "w= 2.734 KN/m\n",
+ "calculation mistake in book\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n",
+ "#variable declaration\n",
+ "from math import sqrt\n",
+ "b1=float(75)\n",
+ "h1=50\n",
+ "h2=50\n",
+ "b2=float(150)\n",
+ "t=float(25)\n",
+ "h=float(200)\n",
+ "\n",
+ " \n",
+ "A=float(75*50+25*100+150*50) #Area of section,A\n",
+ "\n",
+ "Y=(75*50*175+25*100*100+150*50*25)/A\n",
+ "\n",
+ "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n",
+ "\n",
+ "\n",
+ "\n",
+ "ytop=(h-Y)\n",
+ "ybottom=Y\n",
+ "\n",
+ "\n",
+ "Z1=I/ytop\n",
+ "fperc=90\n",
+ "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n",
+ "\n",
+ "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n",
+ "\n",
+ "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n",
+ "\n",
+ "Z2=I/ybottom\n",
+ "\n",
+ "fpert=30 \n",
+ "\n",
+ "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n",
+ "\n",
+ "\n",
+ "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n",
+ "Mmax=min(M1,M2)\n",
+ "\n",
+ "L=float(5)\n",
+ "w=sqrt(Mmax*8/pow(L,2))\n",
+ "\n",
+ "print\"w=\",round(w,3),\"KN/m\"\n",
+ "print\"calculation mistake in book\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example10.7 page number 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "y= 5.0 m\n",
+ "f= 5.24 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n",
+ "#Consider a section y metres from top. Diameter at this section is d.\n",
+ "#d=120+12*y\n",
+ "#I=pi*pow(d,4)/64\n",
+ "#Z=I*2/d=pi*pow(d,3)/32\n",
+ "#variable declaration \n",
+ "#M=600*1000*y #moment,N-mm\n",
+ "#f*Z=M,f is extreme fibre stress.\n",
+ "y=float(5) \n",
+ "print \"y=\",round(y,2),\"m\"\n",
+ "\n",
+ "#Stress at this section f is given by\n",
+ "P=600\n",
+ "M=P*y*1000\n",
+ "d=120+12*y\n",
+ "I=pi*pow(d,4)/64\n",
+ "Z=I*2/d\n",
+ "\n",
+ "f=M/Z\n",
+ "\n",
+ "print \"f=\",round(f,3),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.9 page number 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b= 150.0 mm\n",
+ "d= 300.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n",
+ "\n",
+ "#variable declaration\n",
+ "w=float(5) #KN/m\n",
+ "L=float(6) #m \n",
+ "\n",
+ "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n",
+ "\n",
+ "#Let b be the width and d the depth. Then in this problem d = 2b.\n",
+ "#Z=b*pow(d,2)/6=2*(b**3)/3\n",
+ "f=10 #N/mm^2\n",
+ "#f*Z=M\n",
+ "b=float(((M*3)/(2*f))**(0.3333))\n",
+ "print \"b=\",round(b),\"mm\"\n",
+ "\n",
+ "d=2*b\n",
+ "print \"d=\",round(d),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.10 page number 329\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d= 164.3 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n",
+ "\n",
+ "L=float(3) #Span of cantilever,m\n",
+ "w=float(3) #uniformly distributed load,KN/m\n",
+ "\n",
+ "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n",
+ "#let b be the width and d the depth\n",
+ "#Z=b*pow(d,2)/6\n",
+ "\n",
+ "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n",
+ "fper=30 #N/mm^2\n",
+ "b=100 #mm\n",
+ "f=30 \n",
+ "\n",
+ "#f*Z=M\n",
+ "\n",
+ "d=sqrt((M*6)/(b*f))\n",
+ "\n",
+ "print \"d=\",round(d,1),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 10.11 page number 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "d= 23.11 mm\n",
+ "select 25mm bar \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n",
+ "L=1000\n",
+ "W=800\n",
+ "M=W*L/4 #Maximum moment,N-mm\n",
+ "f=150 #permissible stress,N/mm^2\n",
+ "\n",
+ "d=float((((M*32)/(pi*f)))**(0.33))\n",
+ "\n",
+ "print \"d=\",round(d,2),\"mm\"\n",
+ "print \"select 25mm bar \"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_SOLVgXg.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_SOLVgXg.ipynb
new file mode 100644
index 00000000..06fa6f21
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_SOLVgXg.ipynb
@@ -0,0 +1,654 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter11-PRINCIPAL STRESSES AND STRAINS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.2 page number 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) P= 14726.22 N\n",
+ "(b) P= -44178.65 N compressive\n",
+ "Material fails because of maximum shear and not by axial compression.\n",
+ "P= 24544.0 N\n",
+ "The plane of qmax is at 45° to the plane of px. \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n",
+ "\n",
+ "pt=float(30)\n",
+ "pc=float(90)\n",
+ "ps=float(25)\n",
+ "\n",
+ "d=float(25)\n",
+ "px=float(30) #N/mm^2\n",
+ "py=0\n",
+ "q=0\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "qmax=(px-py)/2\n",
+ "\n",
+ "#Hence failure criteria is normal stress p1\n",
+ "\n",
+ "A=pi*pow(d,2)/4\n",
+ "\n",
+ "#Corresponding load P is obtained by\n",
+ "p=p1\n",
+ "P=p1*A\n",
+ "\n",
+ "print \"(a) P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#In case of compression test,\n",
+ "\n",
+ "px=-pc\n",
+ "py=q=0\n",
+ "\n",
+ "P=-px*A\n",
+ "\n",
+ "print \"(b) P=\",round((-P),2),\"N compressive\"\n",
+ "\n",
+ "#at this stage\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print \"Material fails because of maximum shear and not by axial compression.\"\n",
+ "qmax=25\n",
+ "px=2*qmax\n",
+ "\n",
+ "P=px*A\n",
+ "print\"P=\",round(P),\"N\"\n",
+ "print \"The plane of qmax is at 45° to the plane of px. \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.3 page number 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "pn= 30.0 N/mm^2\n",
+ "pt= 86.6 N/mm^2\n",
+ "p= 91.65 N/mm^2\n",
+ "alpha= 19.1 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n",
+ "\n",
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n",
+ "\n",
+ "px=float(80)\n",
+ "py=float(-120)\n",
+ "q=float(0)\n",
+ "theta=30\n",
+ "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n",
+ "\n",
+ "print\"pn=\",round(pn),\"N/mm^2\"\n",
+ "\n",
+ "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n",
+ "\n",
+ "print\"pt=\",round(pt,1),\"N/mm^2\"\n",
+ "p=sqrt(pow(pn,2)+pow(pt,2))\n",
+ "\n",
+ "print\"p=\",round(p,2),\"N/mm^2\"\n",
+ "\n",
+ "alpha=atan(pn/pt)*180/pi\n",
+ "\n",
+ "print \"alpha=\", round(alpha,1),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.4 page number 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 37.98 ° and 127.98 °\n",
+ "p1= 278.08 N/mm^2\n",
+ "p2= 71.92 N/mm^2\n",
+ "qmax= 103.08 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(200) #N/mm^2\n",
+ "py=float(150) #N/mm^2\n",
+ "q=float(100) #N/mm^2\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "theta2=90+theta1\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.5 page number 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p1= 82.8 N/mm^2\n",
+ "p2= -62.8 N/mm^2\n",
+ "qmax= 72.8 N/mm^2\n",
+ "theta= 7.97 ° and 97.97 °\n",
+ "theta'= 37.03 ° and= 52.97 °\n",
+ "answer in book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(80) #N/mm^2\n",
+ "py=float(-60) #N/mm^2\n",
+ "q=float(20) #N/mm^2\n",
+ "\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n",
+ "\n",
+ "#let theta be the inclination of principal stress to the plane of px.\n",
+ "\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "theta2=90+theta1\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n",
+ "\n",
+ "#Planes of maximum shear make 45° to the above planes.\n",
+ "theta11=45-theta1\n",
+ "theta22=theta2-45\n",
+ "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n",
+ "\n",
+ "print\"answer in book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.6 page number 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p1= -35.96 N/mm^2\n",
+ "p2= -139.04 N/mm^2\n",
+ "qmax= 51.54 N/mm^2\n",
+ "theta= 37.98 ° and 127.98 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(-100) #N/mm^2\n",
+ "py=float(-75) #N/mm^2\n",
+ "q=float(-50) #N/mm^2\n",
+ "\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n",
+ "\n",
+ "#let theta be the inclination of principal stress to the plane of px.\n",
+ "\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "theta2=90+theta1\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.7 page number 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) p1= 131.07 N/mm^2\n",
+ "p2= -81.07 N/mm^2\n",
+ "(ii) qmax= 106.07 N/mm^2\n",
+ "theta= -22.5 ° clockwise\n",
+ "theta2= 22.5 °\n",
+ "p= 108.97 N/mm^2\n",
+ "phi= 13.3 °\n",
+ "mitake in book answer is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(-50) #N/mm^2\n",
+ "py=float(100) #N/mm^2\n",
+ "q=float(75) #N/mm^2\n",
+ "\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n",
+ "\n",
+ "#let theta be the inclination of principal stress to the plane of px.\n",
+ "\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n",
+ "\n",
+ "#Plane of maximum shear makes 45° to it \n",
+ "\n",
+ "theta2=theta1+45\n",
+ "print\"theta2=\",round(theta2,2),\"°\" \n",
+ "\n",
+ "#Normal stress on this plane is given by\n",
+ "\n",
+ "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n",
+ "\n",
+ "pt=qmax\n",
+ "\n",
+ "#Resultant stress\n",
+ "p=sqrt(pow(pn,2)+pow(pt,2))\n",
+ "\n",
+ "print \"p=\",round(p,2),\"N/mm^2\"\n",
+ "\n",
+ "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n",
+ "\n",
+ "phi=atan(pn/pt)*180/pi\n",
+ "\n",
+ "print \"phi=\",round(phi,1),\"°\"\n",
+ "\n",
+ "#there is mistake in book\n",
+ "print\"mitake in book answer is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.9 page number 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " p1= 0.17 N/mm^2\n",
+ " p2= -84.17 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "w=float(100) #wide of rectangular beam,mm\n",
+ "h=float(200) #height or rectangular beam dude,mm\n",
+ "\n",
+ "I=w*pow(h,3)/12\n",
+ "\n",
+ "#At point A, which is at 30 mm below top fibre \n",
+ "y=100-30\n",
+ "M=float(80*1000000) #sagging moment,KN-m\n",
+ "\n",
+ "fx=M*y/I\n",
+ "\n",
+ "px=-fx\n",
+ "F=float(100*1000 ) #shear force,N\n",
+ "b=float(100)\n",
+ "A=b*30\n",
+ "y1=100-15\n",
+ "\n",
+ "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n",
+ "\n",
+ "py=0\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "print \" p1=\",round(p1,2),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.10 page number 362\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) p1= 0.8333 N/mm^2\n",
+ " p2= -0.8333 N/mm^2\n",
+ "theta= 45.0 ° and 135.0 °\n",
+ "(ii) p1= 0.0122 N/mm^2\n",
+ " p2= -32.4196 N/mm^2\n",
+ "theta= -1.0 ° and 89.0 °\n",
+ "mistake in book\n",
+ "(iii) p1= 0.0 N/mm^2\n",
+ " p2= -64.8148 N/mm^2\n",
+ "theta= -0.0 ° and 90.0 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan\n",
+ "\n",
+ "P1=float(20) #vertical loading from A at distance of 1m,KN.\n",
+ "P2=float(20) #vertical loading from A at distance of 2m,KN.\n",
+ "P3=float(20) #vertical loading from A at distance of 3m,KN.\n",
+ "Ra=(P1+P2+P3)/2 #Due to symmetry\n",
+ "\n",
+ "Rb=Ra \n",
+ "#At section 1.5 m from A\n",
+ "F=(Ra-P1)*1000\n",
+ "M=float((Ra*1.5-P1*0.5)*1000000)\n",
+ "b=float(100)\n",
+ "h=float(180)\n",
+ "\n",
+ "I=float((b*pow(h,3))/12)\n",
+ "\n",
+ "# Bending stress \n",
+ "#f=M*y/I\n",
+ "y11=0\n",
+ "f1=(-1)*M*y11/I\n",
+ "y22=45\n",
+ "f2=(-1)*M*y22/I\n",
+ "y33=90\n",
+ "f3=(-1)*M*y33/I\n",
+ "#Shearing stress at a fibre ‘y’ above N–A is\n",
+ "#q=(F/(b*I))*(A*y1)\n",
+ "#at y=0,\n",
+ "y1=45\n",
+ "A1=b*90\n",
+ "q1=(F/(b*I))*(A1*y1)\n",
+ "#at y=45\n",
+ "y2=float(90-45/2)\n",
+ "A2=b*45\n",
+ "q2=(F/(b*I))*(A2*y2)\n",
+ "#at y=90\n",
+ "q3=0\n",
+ "\n",
+ "#(a) At neutral axis (y = 0) : The element is under pure shear \n",
+ "\n",
+ "py=0\n",
+ "\n",
+ "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n",
+ "\n",
+ "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n",
+ "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,4),\"N/mm^2\"\n",
+ "\n",
+ "theta1=45\n",
+ "theta2=theta1+90\n",
+ "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n",
+ "\n",
+ "#(b) At (y = 45)\n",
+ "py=0 \n",
+ "\n",
+ "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n",
+ "\n",
+ "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n",
+ "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,4),\"N/mm^2\"\n",
+ "\n",
+ "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n",
+ "thetab2=thetab1+90\n",
+ "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n",
+ "#mistake in book\n",
+ "print\"mistake in book\"\n",
+ "\n",
+ "#(c) At Y=90\n",
+ "\n",
+ "py=0\n",
+ "\n",
+ "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n",
+ "\n",
+ "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n",
+ "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,4),\"N/mm^2\"\n",
+ "\n",
+ "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n",
+ "thetac2=thetac1+90\n",
+ "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.11 page number 364\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " p1= 5.21 N/mm^2\n",
+ " p2= -107.56 N/mm^2\n",
+ "qmax= 56.38 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "L=float(6) #m\n",
+ "w=float(60) #uniformly distributed load,KN/m\n",
+ "Rs=L*w/2 #Reaction at support,KN\n",
+ "\n",
+ "#Moment at 1.5 m from support\n",
+ "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n",
+ "#Shear force at 1.5 m from support \n",
+ "F=Rs-1.5*w\n",
+ "\n",
+ "B=float(200) #width of I-beam,mm\n",
+ "H=float(400) #height or I-beam,mm\n",
+ "b=float(190)\n",
+ "h=float(380)\n",
+ "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n",
+ "\n",
+ "#Bending stress at 100 mm above N–A\n",
+ "y=100\n",
+ "\n",
+ "f=M*1000000*y/I\n",
+ "\n",
+ "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n",
+ "px=-f\n",
+ "py=0\n",
+ "A=200*10*195+10*90*145\n",
+ "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "print \" p1=\",round(p1,2),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_dWG3d2Y.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_dWG3d2Y.ipynb
new file mode 100644
index 00000000..06fa6f21
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_dWG3d2Y.ipynb
@@ -0,0 +1,654 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter11-PRINCIPAL STRESSES AND STRAINS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.2 page number 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) P= 14726.22 N\n",
+ "(b) P= -44178.65 N compressive\n",
+ "Material fails because of maximum shear and not by axial compression.\n",
+ "P= 24544.0 N\n",
+ "The plane of qmax is at 45° to the plane of px. \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n",
+ "\n",
+ "pt=float(30)\n",
+ "pc=float(90)\n",
+ "ps=float(25)\n",
+ "\n",
+ "d=float(25)\n",
+ "px=float(30) #N/mm^2\n",
+ "py=0\n",
+ "q=0\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "qmax=(px-py)/2\n",
+ "\n",
+ "#Hence failure criteria is normal stress p1\n",
+ "\n",
+ "A=pi*pow(d,2)/4\n",
+ "\n",
+ "#Corresponding load P is obtained by\n",
+ "p=p1\n",
+ "P=p1*A\n",
+ "\n",
+ "print \"(a) P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#In case of compression test,\n",
+ "\n",
+ "px=-pc\n",
+ "py=q=0\n",
+ "\n",
+ "P=-px*A\n",
+ "\n",
+ "print \"(b) P=\",round((-P),2),\"N compressive\"\n",
+ "\n",
+ "#at this stage\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print \"Material fails because of maximum shear and not by axial compression.\"\n",
+ "qmax=25\n",
+ "px=2*qmax\n",
+ "\n",
+ "P=px*A\n",
+ "print\"P=\",round(P),\"N\"\n",
+ "print \"The plane of qmax is at 45° to the plane of px. \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.3 page number 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "pn= 30.0 N/mm^2\n",
+ "pt= 86.6 N/mm^2\n",
+ "p= 91.65 N/mm^2\n",
+ "alpha= 19.1 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n",
+ "\n",
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n",
+ "\n",
+ "px=float(80)\n",
+ "py=float(-120)\n",
+ "q=float(0)\n",
+ "theta=30\n",
+ "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n",
+ "\n",
+ "print\"pn=\",round(pn),\"N/mm^2\"\n",
+ "\n",
+ "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n",
+ "\n",
+ "print\"pt=\",round(pt,1),\"N/mm^2\"\n",
+ "p=sqrt(pow(pn,2)+pow(pt,2))\n",
+ "\n",
+ "print\"p=\",round(p,2),\"N/mm^2\"\n",
+ "\n",
+ "alpha=atan(pn/pt)*180/pi\n",
+ "\n",
+ "print \"alpha=\", round(alpha,1),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.4 page number 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 37.98 ° and 127.98 °\n",
+ "p1= 278.08 N/mm^2\n",
+ "p2= 71.92 N/mm^2\n",
+ "qmax= 103.08 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(200) #N/mm^2\n",
+ "py=float(150) #N/mm^2\n",
+ "q=float(100) #N/mm^2\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "theta2=90+theta1\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.5 page number 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p1= 82.8 N/mm^2\n",
+ "p2= -62.8 N/mm^2\n",
+ "qmax= 72.8 N/mm^2\n",
+ "theta= 7.97 ° and 97.97 °\n",
+ "theta'= 37.03 ° and= 52.97 °\n",
+ "answer in book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(80) #N/mm^2\n",
+ "py=float(-60) #N/mm^2\n",
+ "q=float(20) #N/mm^2\n",
+ "\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n",
+ "\n",
+ "#let theta be the inclination of principal stress to the plane of px.\n",
+ "\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "theta2=90+theta1\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n",
+ "\n",
+ "#Planes of maximum shear make 45° to the above planes.\n",
+ "theta11=45-theta1\n",
+ "theta22=theta2-45\n",
+ "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n",
+ "\n",
+ "print\"answer in book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.6 page number 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p1= -35.96 N/mm^2\n",
+ "p2= -139.04 N/mm^2\n",
+ "qmax= 51.54 N/mm^2\n",
+ "theta= 37.98 ° and 127.98 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(-100) #N/mm^2\n",
+ "py=float(-75) #N/mm^2\n",
+ "q=float(-50) #N/mm^2\n",
+ "\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n",
+ "\n",
+ "#let theta be the inclination of principal stress to the plane of px.\n",
+ "\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "theta2=90+theta1\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.7 page number 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) p1= 131.07 N/mm^2\n",
+ "p2= -81.07 N/mm^2\n",
+ "(ii) qmax= 106.07 N/mm^2\n",
+ "theta= -22.5 ° clockwise\n",
+ "theta2= 22.5 °\n",
+ "p= 108.97 N/mm^2\n",
+ "phi= 13.3 °\n",
+ "mitake in book answer is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,cos,sin,atan,pi\n",
+ "#variable declaration\n",
+ "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n",
+ "\n",
+ "px=float(-50) #N/mm^2\n",
+ "py=float(100) #N/mm^2\n",
+ "q=float(75) #N/mm^2\n",
+ "\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n",
+ "\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "\n",
+ "print \"p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n",
+ "\n",
+ "#let theta be the inclination of principal stress to the plane of px.\n",
+ "\n",
+ "\n",
+ "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n",
+ "\n",
+ "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n",
+ "\n",
+ "#Plane of maximum shear makes 45° to it \n",
+ "\n",
+ "theta2=theta1+45\n",
+ "print\"theta2=\",round(theta2,2),\"°\" \n",
+ "\n",
+ "#Normal stress on this plane is given by\n",
+ "\n",
+ "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n",
+ "\n",
+ "pt=qmax\n",
+ "\n",
+ "#Resultant stress\n",
+ "p=sqrt(pow(pn,2)+pow(pt,2))\n",
+ "\n",
+ "print \"p=\",round(p,2),\"N/mm^2\"\n",
+ "\n",
+ "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n",
+ "\n",
+ "phi=atan(pn/pt)*180/pi\n",
+ "\n",
+ "print \"phi=\",round(phi,1),\"°\"\n",
+ "\n",
+ "#there is mistake in book\n",
+ "print\"mitake in book answer is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.9 page number 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " p1= 0.17 N/mm^2\n",
+ " p2= -84.17 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "w=float(100) #wide of rectangular beam,mm\n",
+ "h=float(200) #height or rectangular beam dude,mm\n",
+ "\n",
+ "I=w*pow(h,3)/12\n",
+ "\n",
+ "#At point A, which is at 30 mm below top fibre \n",
+ "y=100-30\n",
+ "M=float(80*1000000) #sagging moment,KN-m\n",
+ "\n",
+ "fx=M*y/I\n",
+ "\n",
+ "px=-fx\n",
+ "F=float(100*1000 ) #shear force,N\n",
+ "b=float(100)\n",
+ "A=b*30\n",
+ "y1=100-15\n",
+ "\n",
+ "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n",
+ "\n",
+ "py=0\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "print \" p1=\",round(p1,2),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.10 page number 362\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) p1= 0.8333 N/mm^2\n",
+ " p2= -0.8333 N/mm^2\n",
+ "theta= 45.0 ° and 135.0 °\n",
+ "(ii) p1= 0.0122 N/mm^2\n",
+ " p2= -32.4196 N/mm^2\n",
+ "theta= -1.0 ° and 89.0 °\n",
+ "mistake in book\n",
+ "(iii) p1= 0.0 N/mm^2\n",
+ " p2= -64.8148 N/mm^2\n",
+ "theta= -0.0 ° and 90.0 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan\n",
+ "\n",
+ "P1=float(20) #vertical loading from A at distance of 1m,KN.\n",
+ "P2=float(20) #vertical loading from A at distance of 2m,KN.\n",
+ "P3=float(20) #vertical loading from A at distance of 3m,KN.\n",
+ "Ra=(P1+P2+P3)/2 #Due to symmetry\n",
+ "\n",
+ "Rb=Ra \n",
+ "#At section 1.5 m from A\n",
+ "F=(Ra-P1)*1000\n",
+ "M=float((Ra*1.5-P1*0.5)*1000000)\n",
+ "b=float(100)\n",
+ "h=float(180)\n",
+ "\n",
+ "I=float((b*pow(h,3))/12)\n",
+ "\n",
+ "# Bending stress \n",
+ "#f=M*y/I\n",
+ "y11=0\n",
+ "f1=(-1)*M*y11/I\n",
+ "y22=45\n",
+ "f2=(-1)*M*y22/I\n",
+ "y33=90\n",
+ "f3=(-1)*M*y33/I\n",
+ "#Shearing stress at a fibre ‘y’ above N–A is\n",
+ "#q=(F/(b*I))*(A*y1)\n",
+ "#at y=0,\n",
+ "y1=45\n",
+ "A1=b*90\n",
+ "q1=(F/(b*I))*(A1*y1)\n",
+ "#at y=45\n",
+ "y2=float(90-45/2)\n",
+ "A2=b*45\n",
+ "q2=(F/(b*I))*(A2*y2)\n",
+ "#at y=90\n",
+ "q3=0\n",
+ "\n",
+ "#(a) At neutral axis (y = 0) : The element is under pure shear \n",
+ "\n",
+ "py=0\n",
+ "\n",
+ "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n",
+ "\n",
+ "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n",
+ "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,4),\"N/mm^2\"\n",
+ "\n",
+ "theta1=45\n",
+ "theta2=theta1+90\n",
+ "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n",
+ "\n",
+ "#(b) At (y = 45)\n",
+ "py=0 \n",
+ "\n",
+ "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n",
+ "\n",
+ "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n",
+ "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,4),\"N/mm^2\"\n",
+ "\n",
+ "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n",
+ "thetab2=thetab1+90\n",
+ "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n",
+ "#mistake in book\n",
+ "print\"mistake in book\"\n",
+ "\n",
+ "#(c) At Y=90\n",
+ "\n",
+ "py=0\n",
+ "\n",
+ "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n",
+ "\n",
+ "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n",
+ "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,4),\"N/mm^2\"\n",
+ "\n",
+ "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n",
+ "thetac2=thetac1+90\n",
+ "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 11.11 page number 364\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " p1= 5.21 N/mm^2\n",
+ " p2= -107.56 N/mm^2\n",
+ "qmax= 56.38 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "L=float(6) #m\n",
+ "w=float(60) #uniformly distributed load,KN/m\n",
+ "Rs=L*w/2 #Reaction at support,KN\n",
+ "\n",
+ "#Moment at 1.5 m from support\n",
+ "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n",
+ "#Shear force at 1.5 m from support \n",
+ "F=Rs-1.5*w\n",
+ "\n",
+ "B=float(200) #width of I-beam,mm\n",
+ "H=float(400) #height or I-beam,mm\n",
+ "b=float(190)\n",
+ "h=float(380)\n",
+ "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n",
+ "\n",
+ "#Bending stress at 100 mm above N–A\n",
+ "y=100\n",
+ "\n",
+ "f=M*1000000*y/I\n",
+ "\n",
+ "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n",
+ "px=-f\n",
+ "py=0\n",
+ "A=200*10*195+10*90*145\n",
+ "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n",
+ "\n",
+ "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n",
+ "print \" p1=\",round(p1,2),\"N/mm^2\"\n",
+ "print \" p2=\",round(p2,2),\"N/mm^2\"\n",
+ "\n",
+ "\n",
+ "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n",
+ "\n",
+ "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_D0ImquH.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_D0ImquH.ipynb
new file mode 100644
index 00000000..080cbafb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_D0ImquH.ipynb
@@ -0,0 +1,373 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example1.1 Page number 10\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The resultant velocity : 21.54 km/hour\n",
+ "68.2 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#downstream direction as x\n",
+ "#direction across river as y\n",
+ "\n",
+ "from math import sqrt,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Vx= 8 #velocity of stream, km/hour\n",
+ "Vy=float(20) #velocity of boat,km/hour\n",
+ "\n",
+ "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n",
+ "theta=Vy/Vx\n",
+ "\n",
+ "alpha= atan(theta)*180/pi #angle, degrees \n",
+ "\n",
+ "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n",
+ "print round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.2 Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10.0 KN (to the left)\n",
+ "17.32 KN (downward)\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "\n",
+ "#components of force in horizontal and vertical components. \n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "F= 20 #force in wire, KN\n",
+ "\n",
+ "#calculations\n",
+ "Fx= F*cos(60*pi/180) \n",
+ "Fy= F*sin(60*pi/180)\n",
+ "\n",
+ "print round(Fx,2),\"KN\" ,\"(to the left)\"\n",
+ "print round(Fy,2), \"KN\" ,\"(downward)\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.3 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Component normal to the plane : 9.4 KN\n",
+ "Component parallel to the plane : 3.42 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "W= 10 # black weighing, KN\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Nor= W*cos(20*pi/180) #Component normal to the plane\n",
+ "para= W*sin(20*pi/180) #Component parallel to the plane\n",
+ "\n",
+ "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n",
+ "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.4 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 100.0 N\n",
+ "F2= 200.0 N\n",
+ "theta= 63.9 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n",
+ "\n",
+ "from math import pi,sqrt, acos\n",
+ "#variable declaration\n",
+ "R1=260 #resultant of two forces,N\n",
+ "R2=float(180) #resultant of two forces if larger force is reversed,N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n",
+ "F1=F\n",
+ "F2=2*F\n",
+ "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n",
+ "\n",
+ "print \"F1=\",F1,\"N\"\n",
+ "print \"F2=\",F2,\"N\"\n",
+ "print \"theta=\",round(theta,1),\"°\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.5 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 326.35 N\n",
+ "F2= 223.24 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ?ABC be the triangle of forces drawn to some scale\n",
+ "#Two forces F1 and F2 are acting at point A\n",
+ "#angle in degrees '°'\n",
+ "\n",
+ "from math import sin,pi\n",
+ " \n",
+ "#variabble declaration\n",
+ "cnv=pi/180\n",
+ "\n",
+ "BAC = 20*cnv #Resultant R makes angle with F1 \n",
+ " \n",
+ "ABC = 130*cnv \n",
+ "\n",
+ "ACB = 30*cnv \n",
+ "\n",
+ "R = 500 #resultant force,N\n",
+ "\n",
+ "#calculations\n",
+ "#sinerule\n",
+ "\n",
+ "F1=R*sin(ACB)/sin(ABC)\n",
+ "F2=R*sin(BAC)/sin(ABC)\n",
+ "\n",
+ "print \"F1=\",round(F1,2),\"N\"\n",
+ "print \"F2=\",round(F2,2),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.6 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 78.13 °\n",
+ "alpha= 29.29 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n",
+ "\n",
+ "from math import sin,acos,asin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "cnv= 180/pi\n",
+ "F1=float(400) #all forces are in newtons,'N'\n",
+ "F2=float(260)\n",
+ "R=float(520)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n",
+ "\n",
+ "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.7 Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "horizontal component= 2814.2 N\n",
+ "Vertical component = 1039.2 N\n",
+ "Component along crank = 507.1 N\n",
+ "Component normal to crank= 2956.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n",
+ "\n",
+ "from math import cos,sin,pi,asin,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "F=3000 #force in newtons,'N'\n",
+ "BC=80 #length of crank BC, 'mm'\n",
+ "AB=200 #length of connecting rod AB ,'mm'\n",
+ "theta=60*pi/180 #angle b/w BC & AC\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "alpha=asin(BC*sin(theta)/200)*180/pi\n",
+ "\n",
+ "HC=F*cos(alpha*pi/180) #Horizontal component \n",
+ "VC= F*sin(alpha*pi/180) #Vertical component \n",
+ "\n",
+ "#Components along and normal to crank\n",
+ "#The force makes angle alpha + 60 with crank.\n",
+ "alpha2=alpha+60\n",
+ "CAC=F*cos(alpha2*pi/180) # Component along crank \n",
+ "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n",
+ "\n",
+ "\n",
+ "print \"horizontal component=\",round(HC,1),\"N\"\n",
+ "print \"Vertical component = \",round(VC,1),\"N\"\n",
+ "print \"Component along crank =\",round(CAC,1),\"N\"\n",
+ "print \"Component normal to crank=\",round(CNC,1),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_EeN8oH7.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_EeN8oH7.ipynb
new file mode 100644
index 00000000..080cbafb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_EeN8oH7.ipynb
@@ -0,0 +1,373 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example1.1 Page number 10\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The resultant velocity : 21.54 km/hour\n",
+ "68.2 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#downstream direction as x\n",
+ "#direction across river as y\n",
+ "\n",
+ "from math import sqrt,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Vx= 8 #velocity of stream, km/hour\n",
+ "Vy=float(20) #velocity of boat,km/hour\n",
+ "\n",
+ "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n",
+ "theta=Vy/Vx\n",
+ "\n",
+ "alpha= atan(theta)*180/pi #angle, degrees \n",
+ "\n",
+ "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n",
+ "print round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.2 Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10.0 KN (to the left)\n",
+ "17.32 KN (downward)\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "\n",
+ "#components of force in horizontal and vertical components. \n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "F= 20 #force in wire, KN\n",
+ "\n",
+ "#calculations\n",
+ "Fx= F*cos(60*pi/180) \n",
+ "Fy= F*sin(60*pi/180)\n",
+ "\n",
+ "print round(Fx,2),\"KN\" ,\"(to the left)\"\n",
+ "print round(Fy,2), \"KN\" ,\"(downward)\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.3 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Component normal to the plane : 9.4 KN\n",
+ "Component parallel to the plane : 3.42 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "W= 10 # black weighing, KN\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Nor= W*cos(20*pi/180) #Component normal to the plane\n",
+ "para= W*sin(20*pi/180) #Component parallel to the plane\n",
+ "\n",
+ "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n",
+ "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.4 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 100.0 N\n",
+ "F2= 200.0 N\n",
+ "theta= 63.9 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n",
+ "\n",
+ "from math import pi,sqrt, acos\n",
+ "#variable declaration\n",
+ "R1=260 #resultant of two forces,N\n",
+ "R2=float(180) #resultant of two forces if larger force is reversed,N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n",
+ "F1=F\n",
+ "F2=2*F\n",
+ "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n",
+ "\n",
+ "print \"F1=\",F1,\"N\"\n",
+ "print \"F2=\",F2,\"N\"\n",
+ "print \"theta=\",round(theta,1),\"°\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.5 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 326.35 N\n",
+ "F2= 223.24 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ?ABC be the triangle of forces drawn to some scale\n",
+ "#Two forces F1 and F2 are acting at point A\n",
+ "#angle in degrees '°'\n",
+ "\n",
+ "from math import sin,pi\n",
+ " \n",
+ "#variabble declaration\n",
+ "cnv=pi/180\n",
+ "\n",
+ "BAC = 20*cnv #Resultant R makes angle with F1 \n",
+ " \n",
+ "ABC = 130*cnv \n",
+ "\n",
+ "ACB = 30*cnv \n",
+ "\n",
+ "R = 500 #resultant force,N\n",
+ "\n",
+ "#calculations\n",
+ "#sinerule\n",
+ "\n",
+ "F1=R*sin(ACB)/sin(ABC)\n",
+ "F2=R*sin(BAC)/sin(ABC)\n",
+ "\n",
+ "print \"F1=\",round(F1,2),\"N\"\n",
+ "print \"F2=\",round(F2,2),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.6 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 78.13 °\n",
+ "alpha= 29.29 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n",
+ "\n",
+ "from math import sin,acos,asin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "cnv= 180/pi\n",
+ "F1=float(400) #all forces are in newtons,'N'\n",
+ "F2=float(260)\n",
+ "R=float(520)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n",
+ "\n",
+ "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.7 Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "horizontal component= 2814.2 N\n",
+ "Vertical component = 1039.2 N\n",
+ "Component along crank = 507.1 N\n",
+ "Component normal to crank= 2956.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n",
+ "\n",
+ "from math import cos,sin,pi,asin,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "F=3000 #force in newtons,'N'\n",
+ "BC=80 #length of crank BC, 'mm'\n",
+ "AB=200 #length of connecting rod AB ,'mm'\n",
+ "theta=60*pi/180 #angle b/w BC & AC\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "alpha=asin(BC*sin(theta)/200)*180/pi\n",
+ "\n",
+ "HC=F*cos(alpha*pi/180) #Horizontal component \n",
+ "VC= F*sin(alpha*pi/180) #Vertical component \n",
+ "\n",
+ "#Components along and normal to crank\n",
+ "#The force makes angle alpha + 60 with crank.\n",
+ "alpha2=alpha+60\n",
+ "CAC=F*cos(alpha2*pi/180) # Component along crank \n",
+ "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n",
+ "\n",
+ "\n",
+ "print \"horizontal component=\",round(HC,1),\"N\"\n",
+ "print \"Vertical component = \",round(VC,1),\"N\"\n",
+ "print \"Component along crank =\",round(CAC,1),\"N\"\n",
+ "print \"Component normal to crank=\",round(CNC,1),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Z95iVp3.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Z95iVp3.ipynb
new file mode 100644
index 00000000..080cbafb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Z95iVp3.ipynb
@@ -0,0 +1,373 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example1.1 Page number 10\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The resultant velocity : 21.54 km/hour\n",
+ "68.2 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#downstream direction as x\n",
+ "#direction across river as y\n",
+ "\n",
+ "from math import sqrt,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Vx= 8 #velocity of stream, km/hour\n",
+ "Vy=float(20) #velocity of boat,km/hour\n",
+ "\n",
+ "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n",
+ "theta=Vy/Vx\n",
+ "\n",
+ "alpha= atan(theta)*180/pi #angle, degrees \n",
+ "\n",
+ "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n",
+ "print round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.2 Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10.0 KN (to the left)\n",
+ "17.32 KN (downward)\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "\n",
+ "#components of force in horizontal and vertical components. \n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "F= 20 #force in wire, KN\n",
+ "\n",
+ "#calculations\n",
+ "Fx= F*cos(60*pi/180) \n",
+ "Fy= F*sin(60*pi/180)\n",
+ "\n",
+ "print round(Fx,2),\"KN\" ,\"(to the left)\"\n",
+ "print round(Fy,2), \"KN\" ,\"(downward)\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.3 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Component normal to the plane : 9.4 KN\n",
+ "Component parallel to the plane : 3.42 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "W= 10 # black weighing, KN\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Nor= W*cos(20*pi/180) #Component normal to the plane\n",
+ "para= W*sin(20*pi/180) #Component parallel to the plane\n",
+ "\n",
+ "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n",
+ "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.4 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 100.0 N\n",
+ "F2= 200.0 N\n",
+ "theta= 63.9 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n",
+ "\n",
+ "from math import pi,sqrt, acos\n",
+ "#variable declaration\n",
+ "R1=260 #resultant of two forces,N\n",
+ "R2=float(180) #resultant of two forces if larger force is reversed,N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n",
+ "F1=F\n",
+ "F2=2*F\n",
+ "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n",
+ "\n",
+ "print \"F1=\",F1,\"N\"\n",
+ "print \"F2=\",F2,\"N\"\n",
+ "print \"theta=\",round(theta,1),\"°\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.5 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 326.35 N\n",
+ "F2= 223.24 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ?ABC be the triangle of forces drawn to some scale\n",
+ "#Two forces F1 and F2 are acting at point A\n",
+ "#angle in degrees '°'\n",
+ "\n",
+ "from math import sin,pi\n",
+ " \n",
+ "#variabble declaration\n",
+ "cnv=pi/180\n",
+ "\n",
+ "BAC = 20*cnv #Resultant R makes angle with F1 \n",
+ " \n",
+ "ABC = 130*cnv \n",
+ "\n",
+ "ACB = 30*cnv \n",
+ "\n",
+ "R = 500 #resultant force,N\n",
+ "\n",
+ "#calculations\n",
+ "#sinerule\n",
+ "\n",
+ "F1=R*sin(ACB)/sin(ABC)\n",
+ "F2=R*sin(BAC)/sin(ABC)\n",
+ "\n",
+ "print \"F1=\",round(F1,2),\"N\"\n",
+ "print \"F2=\",round(F2,2),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.6 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 78.13 °\n",
+ "alpha= 29.29 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n",
+ "\n",
+ "from math import sin,acos,asin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "cnv= 180/pi\n",
+ "F1=float(400) #all forces are in newtons,'N'\n",
+ "F2=float(260)\n",
+ "R=float(520)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n",
+ "\n",
+ "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.7 Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "horizontal component= 2814.2 N\n",
+ "Vertical component = 1039.2 N\n",
+ "Component along crank = 507.1 N\n",
+ "Component normal to crank= 2956.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n",
+ "\n",
+ "from math import cos,sin,pi,asin,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "F=3000 #force in newtons,'N'\n",
+ "BC=80 #length of crank BC, 'mm'\n",
+ "AB=200 #length of connecting rod AB ,'mm'\n",
+ "theta=60*pi/180 #angle b/w BC & AC\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "alpha=asin(BC*sin(theta)/200)*180/pi\n",
+ "\n",
+ "HC=F*cos(alpha*pi/180) #Horizontal component \n",
+ "VC= F*sin(alpha*pi/180) #Vertical component \n",
+ "\n",
+ "#Components along and normal to crank\n",
+ "#The force makes angle alpha + 60 with crank.\n",
+ "alpha2=alpha+60\n",
+ "CAC=F*cos(alpha2*pi/180) # Component along crank \n",
+ "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n",
+ "\n",
+ "\n",
+ "print \"horizontal component=\",round(HC,1),\"N\"\n",
+ "print \"Vertical component = \",round(VC,1),\"N\"\n",
+ "print \"Component along crank =\",round(CAC,1),\"N\"\n",
+ "print \"Component normal to crank=\",round(CNC,1),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_fdbb8ly.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_fdbb8ly.ipynb
new file mode 100644
index 00000000..080cbafb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_fdbb8ly.ipynb
@@ -0,0 +1,373 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example1.1 Page number 10\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The resultant velocity : 21.54 km/hour\n",
+ "68.2 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#downstream direction as x\n",
+ "#direction across river as y\n",
+ "\n",
+ "from math import sqrt,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Vx= 8 #velocity of stream, km/hour\n",
+ "Vy=float(20) #velocity of boat,km/hour\n",
+ "\n",
+ "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n",
+ "theta=Vy/Vx\n",
+ "\n",
+ "alpha= atan(theta)*180/pi #angle, degrees \n",
+ "\n",
+ "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n",
+ "print round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.2 Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10.0 KN (to the left)\n",
+ "17.32 KN (downward)\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "\n",
+ "#components of force in horizontal and vertical components. \n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "F= 20 #force in wire, KN\n",
+ "\n",
+ "#calculations\n",
+ "Fx= F*cos(60*pi/180) \n",
+ "Fy= F*sin(60*pi/180)\n",
+ "\n",
+ "print round(Fx,2),\"KN\" ,\"(to the left)\"\n",
+ "print round(Fy,2), \"KN\" ,\"(downward)\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.3 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Component normal to the plane : 9.4 KN\n",
+ "Component parallel to the plane : 3.42 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "W= 10 # black weighing, KN\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Nor= W*cos(20*pi/180) #Component normal to the plane\n",
+ "para= W*sin(20*pi/180) #Component parallel to the plane\n",
+ "\n",
+ "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n",
+ "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.4 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 100.0 N\n",
+ "F2= 200.0 N\n",
+ "theta= 63.9 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n",
+ "\n",
+ "from math import pi,sqrt, acos\n",
+ "#variable declaration\n",
+ "R1=260 #resultant of two forces,N\n",
+ "R2=float(180) #resultant of two forces if larger force is reversed,N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n",
+ "F1=F\n",
+ "F2=2*F\n",
+ "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n",
+ "\n",
+ "print \"F1=\",F1,\"N\"\n",
+ "print \"F2=\",F2,\"N\"\n",
+ "print \"theta=\",round(theta,1),\"°\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.5 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 326.35 N\n",
+ "F2= 223.24 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ?ABC be the triangle of forces drawn to some scale\n",
+ "#Two forces F1 and F2 are acting at point A\n",
+ "#angle in degrees '°'\n",
+ "\n",
+ "from math import sin,pi\n",
+ " \n",
+ "#variabble declaration\n",
+ "cnv=pi/180\n",
+ "\n",
+ "BAC = 20*cnv #Resultant R makes angle with F1 \n",
+ " \n",
+ "ABC = 130*cnv \n",
+ "\n",
+ "ACB = 30*cnv \n",
+ "\n",
+ "R = 500 #resultant force,N\n",
+ "\n",
+ "#calculations\n",
+ "#sinerule\n",
+ "\n",
+ "F1=R*sin(ACB)/sin(ABC)\n",
+ "F2=R*sin(BAC)/sin(ABC)\n",
+ "\n",
+ "print \"F1=\",round(F1,2),\"N\"\n",
+ "print \"F2=\",round(F2,2),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.6 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 78.13 °\n",
+ "alpha= 29.29 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n",
+ "\n",
+ "from math import sin,acos,asin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "cnv= 180/pi\n",
+ "F1=float(400) #all forces are in newtons,'N'\n",
+ "F2=float(260)\n",
+ "R=float(520)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n",
+ "\n",
+ "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.7 Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "horizontal component= 2814.2 N\n",
+ "Vertical component = 1039.2 N\n",
+ "Component along crank = 507.1 N\n",
+ "Component normal to crank= 2956.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n",
+ "\n",
+ "from math import cos,sin,pi,asin,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "F=3000 #force in newtons,'N'\n",
+ "BC=80 #length of crank BC, 'mm'\n",
+ "AB=200 #length of connecting rod AB ,'mm'\n",
+ "theta=60*pi/180 #angle b/w BC & AC\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "alpha=asin(BC*sin(theta)/200)*180/pi\n",
+ "\n",
+ "HC=F*cos(alpha*pi/180) #Horizontal component \n",
+ "VC= F*sin(alpha*pi/180) #Vertical component \n",
+ "\n",
+ "#Components along and normal to crank\n",
+ "#The force makes angle alpha + 60 with crank.\n",
+ "alpha2=alpha+60\n",
+ "CAC=F*cos(alpha2*pi/180) # Component along crank \n",
+ "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n",
+ "\n",
+ "\n",
+ "print \"horizontal component=\",round(HC,1),\"N\"\n",
+ "print \"Vertical component = \",round(VC,1),\"N\"\n",
+ "print \"Component along crank =\",round(CAC,1),\"N\"\n",
+ "print \"Component normal to crank=\",round(CNC,1),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_xobe83Y.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_xobe83Y.ipynb
new file mode 100644
index 00000000..080cbafb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_xobe83Y.ipynb
@@ -0,0 +1,373 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example1.1 Page number 10\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The resultant velocity : 21.54 km/hour\n",
+ "68.2 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#downstream direction as x\n",
+ "#direction across river as y\n",
+ "\n",
+ "from math import sqrt,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Vx= 8 #velocity of stream, km/hour\n",
+ "Vy=float(20) #velocity of boat,km/hour\n",
+ "\n",
+ "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n",
+ "theta=Vy/Vx\n",
+ "\n",
+ "alpha= atan(theta)*180/pi #angle, degrees \n",
+ "\n",
+ "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n",
+ "print round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.2 Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10.0 KN (to the left)\n",
+ "17.32 KN (downward)\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "\n",
+ "#components of force in horizontal and vertical components. \n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "F= 20 #force in wire, KN\n",
+ "\n",
+ "#calculations\n",
+ "Fx= F*cos(60*pi/180) \n",
+ "Fy= F*sin(60*pi/180)\n",
+ "\n",
+ "print round(Fx,2),\"KN\" ,\"(to the left)\"\n",
+ "print round(Fy,2), \"KN\" ,\"(downward)\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.3 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Component normal to the plane : 9.4 KN\n",
+ "Component parallel to the plane : 3.42 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "W= 10 # black weighing, KN\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Nor= W*cos(20*pi/180) #Component normal to the plane\n",
+ "para= W*sin(20*pi/180) #Component parallel to the plane\n",
+ "\n",
+ "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n",
+ "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.4 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 100.0 N\n",
+ "F2= 200.0 N\n",
+ "theta= 63.9 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n",
+ "\n",
+ "from math import pi,sqrt, acos\n",
+ "#variable declaration\n",
+ "R1=260 #resultant of two forces,N\n",
+ "R2=float(180) #resultant of two forces if larger force is reversed,N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n",
+ "F1=F\n",
+ "F2=2*F\n",
+ "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n",
+ "\n",
+ "print \"F1=\",F1,\"N\"\n",
+ "print \"F2=\",F2,\"N\"\n",
+ "print \"theta=\",round(theta,1),\"°\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.5 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 326.35 N\n",
+ "F2= 223.24 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ?ABC be the triangle of forces drawn to some scale\n",
+ "#Two forces F1 and F2 are acting at point A\n",
+ "#angle in degrees '°'\n",
+ "\n",
+ "from math import sin,pi\n",
+ " \n",
+ "#variabble declaration\n",
+ "cnv=pi/180\n",
+ "\n",
+ "BAC = 20*cnv #Resultant R makes angle with F1 \n",
+ " \n",
+ "ABC = 130*cnv \n",
+ "\n",
+ "ACB = 30*cnv \n",
+ "\n",
+ "R = 500 #resultant force,N\n",
+ "\n",
+ "#calculations\n",
+ "#sinerule\n",
+ "\n",
+ "F1=R*sin(ACB)/sin(ABC)\n",
+ "F2=R*sin(BAC)/sin(ABC)\n",
+ "\n",
+ "print \"F1=\",round(F1,2),\"N\"\n",
+ "print \"F2=\",round(F2,2),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.6 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 78.13 °\n",
+ "alpha= 29.29 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n",
+ "\n",
+ "from math import sin,acos,asin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "cnv= 180/pi\n",
+ "F1=float(400) #all forces are in newtons,'N'\n",
+ "F2=float(260)\n",
+ "R=float(520)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n",
+ "\n",
+ "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.7 Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "horizontal component= 2814.2 N\n",
+ "Vertical component = 1039.2 N\n",
+ "Component along crank = 507.1 N\n",
+ "Component normal to crank= 2956.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n",
+ "\n",
+ "from math import cos,sin,pi,asin,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "F=3000 #force in newtons,'N'\n",
+ "BC=80 #length of crank BC, 'mm'\n",
+ "AB=200 #length of connecting rod AB ,'mm'\n",
+ "theta=60*pi/180 #angle b/w BC & AC\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "alpha=asin(BC*sin(theta)/200)*180/pi\n",
+ "\n",
+ "HC=F*cos(alpha*pi/180) #Horizontal component \n",
+ "VC= F*sin(alpha*pi/180) #Vertical component \n",
+ "\n",
+ "#Components along and normal to crank\n",
+ "#The force makes angle alpha + 60 with crank.\n",
+ "alpha2=alpha+60\n",
+ "CAC=F*cos(alpha2*pi/180) # Component along crank \n",
+ "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n",
+ "\n",
+ "\n",
+ "print \"horizontal component=\",round(HC,1),\"N\"\n",
+ "print \"Vertical component = \",round(VC,1),\"N\"\n",
+ "print \"Component along crank =\",round(CAC,1),\"N\"\n",
+ "print \"Component normal to crank=\",round(CNC,1),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_yzunizs.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_yzunizs.ipynb
new file mode 100644
index 00000000..080cbafb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_yzunizs.ipynb
@@ -0,0 +1,373 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example1.1 Page number 10\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The resultant velocity : 21.54 km/hour\n",
+ "68.2 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "#downstream direction as x\n",
+ "#direction across river as y\n",
+ "\n",
+ "from math import sqrt,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Vx= 8 #velocity of stream, km/hour\n",
+ "Vy=float(20) #velocity of boat,km/hour\n",
+ "\n",
+ "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n",
+ "theta=Vy/Vx\n",
+ "\n",
+ "alpha= atan(theta)*180/pi #angle, degrees \n",
+ "\n",
+ "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n",
+ "print round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.2 Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10.0 KN (to the left)\n",
+ "17.32 KN (downward)\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "\n",
+ "#components of force in horizontal and vertical components. \n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "\n",
+ "F= 20 #force in wire, KN\n",
+ "\n",
+ "#calculations\n",
+ "Fx= F*cos(60*pi/180) \n",
+ "Fy= F*sin(60*pi/180)\n",
+ "\n",
+ "print round(Fx,2),\"KN\" ,\"(to the left)\"\n",
+ "print round(Fy,2), \"KN\" ,\"(downward)\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.3 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Component normal to the plane : 9.4 KN\n",
+ "Component parallel to the plane : 3.42 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n",
+ "from math import cos,sin,pi\n",
+ "#variable declaration\n",
+ "W= 10 # black weighing, KN\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Nor= W*cos(20*pi/180) #Component normal to the plane\n",
+ "para= W*sin(20*pi/180) #Component parallel to the plane\n",
+ "\n",
+ "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n",
+ "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.4 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 100.0 N\n",
+ "F2= 200.0 N\n",
+ "theta= 63.9 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n",
+ "\n",
+ "from math import pi,sqrt, acos\n",
+ "#variable declaration\n",
+ "R1=260 #resultant of two forces,N\n",
+ "R2=float(180) #resultant of two forces if larger force is reversed,N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n",
+ "F1=F\n",
+ "F2=2*F\n",
+ "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n",
+ "\n",
+ "print \"F1=\",F1,\"N\"\n",
+ "print \"F2=\",F2,\"N\"\n",
+ "print \"theta=\",round(theta,1),\"°\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.5 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "F1= 326.35 N\n",
+ "F2= 223.24 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ?ABC be the triangle of forces drawn to some scale\n",
+ "#Two forces F1 and F2 are acting at point A\n",
+ "#angle in degrees '°'\n",
+ "\n",
+ "from math import sin,pi\n",
+ " \n",
+ "#variabble declaration\n",
+ "cnv=pi/180\n",
+ "\n",
+ "BAC = 20*cnv #Resultant R makes angle with F1 \n",
+ " \n",
+ "ABC = 130*cnv \n",
+ "\n",
+ "ACB = 30*cnv \n",
+ "\n",
+ "R = 500 #resultant force,N\n",
+ "\n",
+ "#calculations\n",
+ "#sinerule\n",
+ "\n",
+ "F1=R*sin(ACB)/sin(ABC)\n",
+ "F2=R*sin(BAC)/sin(ABC)\n",
+ "\n",
+ "print \"F1=\",round(F1,2),\"N\"\n",
+ "print \"F2=\",round(F2,2),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.6 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 78.13 °\n",
+ "alpha= 29.29 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n",
+ "\n",
+ "from math import sin,acos,asin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "cnv= 180/pi\n",
+ "F1=float(400) #all forces are in newtons,'N'\n",
+ "F2=float(260)\n",
+ "R=float(520)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n",
+ "\n",
+ "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 1.7 Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "horizontal component= 2814.2 N\n",
+ "Vertical component = 1039.2 N\n",
+ "Component along crank = 507.1 N\n",
+ "Component normal to crank= 2956.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n",
+ "\n",
+ "from math import cos,sin,pi,asin,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "F=3000 #force in newtons,'N'\n",
+ "BC=80 #length of crank BC, 'mm'\n",
+ "AB=200 #length of connecting rod AB ,'mm'\n",
+ "theta=60*pi/180 #angle b/w BC & AC\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "alpha=asin(BC*sin(theta)/200)*180/pi\n",
+ "\n",
+ "HC=F*cos(alpha*pi/180) #Horizontal component \n",
+ "VC= F*sin(alpha*pi/180) #Vertical component \n",
+ "\n",
+ "#Components along and normal to crank\n",
+ "#The force makes angle alpha + 60 with crank.\n",
+ "alpha2=alpha+60\n",
+ "CAC=F*cos(alpha2*pi/180) # Component along crank \n",
+ "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n",
+ "\n",
+ "\n",
+ "print \"horizontal component=\",round(HC,1),\"N\"\n",
+ "print \"Vertical component = \",round(VC,1),\"N\"\n",
+ "print \"Component along crank =\",round(CAC,1),\"N\"\n",
+ "print \"Component normal to crank=\",round(CNC,1),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_42vnHw9.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_42vnHw9.ipynb
new file mode 100644
index 00000000..a94760d2
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_42vnHw9.ipynb
@@ -0,0 +1,1857 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter2-FUNDAMENTALS OF STATICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.1 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Moment is = -9607.41 Nmm clockwise\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=100.0\n",
+ "hd=400.0\n",
+ "vd=500.0\n",
+ "o=60.0\n",
+ "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.2 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.3 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.4 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force = 161.52 N\n",
+ "\n",
+ " \n",
+ " Resultant angle = 0.33 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#R resultant force\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "#f1 force\n",
+ "#f2 force\n",
+ "#f3 force\n",
+ "#o1 angle with the line \n",
+ "#o2 angle with the line \n",
+ "#o3 angle with the line \n",
+ "#O angle of resultant force with line\n",
+ "f1=70.0\n",
+ "f2=80.0\n",
+ "f3=50.0 \n",
+ "o1=50.0\n",
+ "o2=25.0\n",
+ "o3=-45.0\n",
+ "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n",
+ "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n",
+ "R=math.sqrt(Rx**2+Ry**2)\n",
+ "O=math.atan(Ry/Rx)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.5 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force along the incline plane = 234.24 N\n",
+ "\n",
+ " \n",
+ " Resultant Force vertical to the incline plane = -0.46 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#O angle of inclined plane\n",
+ "#N normal reaction\n",
+ "#W weight\n",
+ "#F,T forces\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "o = 60.0 \n",
+ "W = 1000.0\n",
+ "N = 500.0\n",
+ "F = 100.0\n",
+ "T = 1200.0\n",
+ "Rx = T-F-(W*math.sin(o/180*3.14))\n",
+ "Ry = N-(W*math.cos(o/180*3.14))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.6 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force 467.201871561 N\n",
+ "At an angle 61.0805191269\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=1000.0 #Resultant force\n",
+ "F1=500.0 #Force \n",
+ "F2=1000.0 #force\n",
+ "o=45.0*3.14/180.0 #angle resultant makes with x axis \n",
+ "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n",
+ "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n",
+ "#F3coso3=Rcoso-F1coso1-F2sino2\n",
+ "#F3sino=Rsino-F1sino1-F2coso2\n",
+ "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n",
+ "print \"Force\",F3,\"N\"\n",
+ "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n",
+ "print \"At an angle\",o3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.7 Page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 6.32 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,pi,asin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=300.0\n",
+ "P2=500.0\n",
+ "thetaI=30.0*pi/180.0\n",
+ "thetaP2=30.0*pi/180\n",
+ "thetaP1=40.0*pi/180\n",
+ "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "F=(P2*sin(thetaP2))/(P1)\n",
+ "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.8 page number 30\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 68.0592 KN\n",
+ "alpha= 81.55 °\n",
+ "x= 3.326 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=20.0\n",
+ "P2=30.0\n",
+ "P3=20.0\n",
+ "theta3=60.0*pi/180.0\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=20.0*cos(theta3)\n",
+ "Fy=P1+P2+P3*sin(theta3)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,4),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n",
+ "\n",
+ "#The distance of the resultant from point O is given by:\n",
+ "\n",
+ "d=MA/R\n",
+ "x=d/sin(alpha*pi/180)\n",
+ "print\"x=\",round(x,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.9 page number 31\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 91.19 KN\n",
+ "alpha= 35.84 °\n",
+ "x= 317.023 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=100.0 #inclined up loading at 60° at A, N\n",
+ "PB1=80.0 #Vertical down loading at B,N\n",
+ "PB2=80.0 #Horizontal right loading at at B,N \n",
+ "PC=120.0 #inclined down loading at 30° at C,N\n",
+ "\n",
+ "thetaA=60.0*pi/180.0\n",
+ "thetaB=30.0*pi/180.0\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n",
+ "Rx=-Fx\n",
+ "\n",
+ "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n",
+ "Ry=Fy\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n",
+ "\n",
+ "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.10 page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 565.69 N\n",
+ "theta= 45.0 °\n",
+ "x= 2.5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=800.0 #Vertical down loading at A,N\n",
+ "PC=400.0 #vertical up loading at B,N\n",
+ "HD=600.0 #Horizontal left loading at A,N\n",
+ "HB=200.0 #Horizontal right loading at B,N\n",
+ "a=1.0 #length of side,m\n",
+ " \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=HB-HD\n",
+ "Fy=PC-PA\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=PC*a+HD*a\n",
+ "\n",
+ "#Let x be the distance from A along x axis, where resultant cuts AB.\n",
+ "\n",
+ "x=MA/Fy\n",
+ "\n",
+ "print\"x=\",round((-x),1),\"m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.11 page number 32\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 10.0 KN\n",
+ "theta= 0.0 ° i.e. , the resultant is in the direction x.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=2.0 #loading at B,KN\n",
+ "PC=sqrt(3.0) #loading at C,KN\n",
+ "PD=5.0 #loading at D,KN\n",
+ "PE=PC #loading at E,KN\n",
+ "PF=PB #loading at F,KN\n",
+ "\n",
+ "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n",
+ "\n",
+ "angleoab=60.0*pi/180\n",
+ "anglecab=angleoab/2.0\n",
+ "theta1=anglecab\n",
+ "theta2=(angleoab-theta1)\n",
+ "theta3=theta1\n",
+ "theta4=theta1\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n",
+ "\n",
+ "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.12 page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 4.66 N\n",
+ "alpha= 28.99 °\n",
+ "d= 42.73 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=2.0 #loading at 1,KN\n",
+ "P2=1.5 #loading at 2,KN\n",
+ "P3=5.0 #loading at 3,KN\n",
+ "a=10.0 #side length,mm\n",
+ "\n",
+ "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n",
+ "\n",
+ "\n",
+ "theta1=atan(a/a)\n",
+ "theta2=atan((3*a)/(4*a))\n",
+ "theta3=atan((a)/(2*a))\n",
+ "\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n",
+ "\n",
+ "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Distance d of the resultant from O is given by\n",
+ "#Rd=sum of moment at A\n",
+ "\n",
+ "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n",
+ "print\"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.13 page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 150.0 KN\n",
+ "MA= 270.0 KN-m\n",
+ "x= 1.8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #loading at B,KN\n",
+ "PC=30.0 #loading at C,KN\n",
+ "PD=40.0 #loading at D,KN\n",
+ "PA=60.0 #loading at E,KN\n",
+ "AB=1.0\n",
+ "BC=2.0\n",
+ "CD=1.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA+PB+PC+PD\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x,1),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.14 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 100.0 KN in y-direction\n",
+ "MA= 300.0 KN-m\n",
+ "x= 3.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #up loading at B,KN\n",
+ "PC=40.0 #down loading at C,KN\n",
+ "PD=50.0 #up loading at D,KN\n",
+ "PA=80.0 #down loading at A,KN\n",
+ "PE=60.0 #down loading at E,KN\n",
+ "AB=2.0\n",
+ "BC=2.0\n",
+ "CD=4.0\n",
+ "DE=2.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA-PB+PC-PD+PE\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n",
+ "\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.15 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 2671.19 KN in y-direction\n",
+ "alpha 80.3 °\n",
+ "x= 141.195 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=500.0 #Loading at inclined to 60.0°,N\n",
+ "P2=1000.0 #vertical loading at 150 distance from O,N\n",
+ "P3=1200.0 #vertical loading at 150 distance from O,N\n",
+ "H=700.0 #Horizontal loading at 300 ditance from O,N\n",
+ "a=150.0\n",
+ "theta=60.0*pi/180\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=P1*cos(theta)-H\n",
+ "Ry=-P3-P2-P1*sin(theta)\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "alpha=atan(Ry/Rx)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\"\n",
+ " \n",
+ "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n",
+ "\n",
+ "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.16 page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ry= 1420.0 KN downward\n",
+ "x= 4.127 m\n",
+ "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n",
+ "P2=120.0 #vertical up loading at 4m distance from O,KN\n",
+ "P3=420.0 #vertical downloading at 5m distance from O,KN\n",
+ "H=500.0 #Horizontal loading at 4m ditance from O,KN\n",
+ "ah=4.0\n",
+ "a1=2.0\n",
+ "a2=4.0\n",
+ "a3=5.0\n",
+ "a=7.0\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=H\n",
+ "Ry=P1-P2+P3\n",
+ "\n",
+ "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n",
+ " \n",
+ "#Let x be the distance from O where the resultant cuts the base.\n",
+ "#moment at O\n",
+ "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n",
+ "\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.17 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 42.426 KN\n",
+ "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n",
+ "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n",
+ "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n",
+ "P4=5.0 #Inclined at 45° down Loading A,KN\n",
+ "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n",
+ "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n",
+ "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n",
+ "P5=5.0 #Inclined at 45° UP Loading A,KN\n",
+ "a=1.0\n",
+ "\n",
+ "theta=45.0*pi/180.0\n",
+ "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n",
+ "\n",
+ "#assume Resulat R at distance d from A,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n",
+ "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n",
+ "\n",
+ "print \"R=\",round(Rx,3),\"KN\"\n",
+ "#and its direction is horizontal \n",
+ "#Let R be at a distance d from the ridge A\n",
+ "#moment at A\n",
+ "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n",
+ "\n",
+ "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.18 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 116.52 KN\n",
+ "alpha= 76.82 °\n",
+ "x= 1.48 m\n",
+ "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n",
+ "\n",
+ "PA=20.0 #inclined at 45° loading at A,KN\n",
+ "PB=30.0 #inclined at 60° loading at B,KN\n",
+ "\n",
+ "PC1=40.0 #inclined at 30° loading at C,KN\n",
+ "PC2=40.0 #inclined at 20° loading at C,KN\n",
+ "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n",
+ "PE=20.0 #inclined at alpha at distance xm form A,KN\n",
+ "P=20.0 #vertical loading at distance 4m,KN\n",
+ "\n",
+ "\n",
+ "\n",
+ "thetaA=45.0*pi/180.0\n",
+ "thetaB=60.0*pi/180.0\n",
+ "thetaC1=30.0*pi/180.0\n",
+ "thetaC2=20.0*pi/180.0\n",
+ "thetaD=30.0*pi/180.0\n",
+ "AD=2.0\n",
+ "AC=3.0\n",
+ "AB=6.0\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n",
+ "\n",
+ "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#Let the resultant intersect AB at a distance x from A. Then, \n",
+ "\n",
+ "\n",
+ "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n",
+ "\n",
+ "print\"x=\",round(X,2),\"m\"\n",
+ "\n",
+ "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.19 page number 42\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 103.53 N\n",
+ "R= 26.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n",
+ "\n",
+ "#variable declaration\n",
+ "W=100.0 #weight of sphere,N\n",
+ "theta=15.0*pi/180 #angle of inclination of string with wall\n",
+ "\n",
+ "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n",
+ "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n",
+ "print\"T=\",round(T,2),\"N\"\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n",
+ "\n",
+ "#Notes: \n",
+ "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n",
+ "#2. The wall reaction is a push, but cannot be a pull on the body. \n",
+ "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.20 page number 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 1732.05 N\n",
+ "P= 866.03 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n",
+ "\n",
+ "#variable declaration\n",
+ "W=1500.0 #weight of block,N\n",
+ "theta=30.0*pi/180 #angle of inclination \n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(theta)\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "P=R*sin(theta)\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.21 page number 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "S= -0.058 N\n",
+ "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n",
+ "R= 14.979 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=10.0 #weight of Roller,KN\n",
+ "IL=7.0 #inclined loading at angle of 45°,KN\n",
+ "H=5.0 #Horizontal loading ,KN\n",
+ "\n",
+ "theta=45.0*pi/180 #angle of loading of IL\n",
+ "thetaS=30.0*pi/180.0 \n",
+ "\n",
+ "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "S=(-H+IL*cos(theta))/cos(thetaS)\n",
+ "print\"S=\",round(S,3),\"N\"\n",
+ "\n",
+ "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n",
+ " \n",
+ "R=W+IL*sin(theta)-S*sin(thetaS)\n",
+ "print\"R=\",round(R,3),\"kN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.22 page number 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 1.125 m\n",
+ "T= 125.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi,asin\n",
+ "\n",
+ "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "#variable declaration\n",
+ "L=200.0 #suspended load at C,N\n",
+ "AB=3.0\n",
+ "BI=1.0\n",
+ "ACB=5.0 #Length of cord,m\n",
+ "DE=3.0\n",
+ "BE=4.0\n",
+ "theta=asin(4.0/5.0)\n",
+ "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n",
+ "\n",
+ "HI=BI*DE/BE\n",
+ "AH=DE-HI\n",
+ "x=AH/2\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "T=L/(2*sin(theta))\n",
+ "print\"T=\",round(T),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.23 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1154.7 N\n",
+ "P= 1732.05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin ,acos, pi\n",
+ "\n",
+ "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=2000.0 #weight of roller,N\n",
+ "r=300.0 #radius of roller,mm\n",
+ "h=150.0 # height of curb,mm\n",
+ "OC=r-h\n",
+ "AO=r\n",
+ "\n",
+ "alpha=acos(OC/AO)\n",
+ "\n",
+ "#angleOAB=angleOBA,Since OA=OB,\n",
+ "angleOBA=(alpha)/2\n",
+ "\n",
+ "#the reaction makes 30° with the vertical\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(angleOBA)\n",
+ "P=R*sin(angleOBA)\n",
+ "\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n",
+ "#From triangle of forces ABC, we get \n",
+ "P=W*sin(alpha)\n",
+ "print \"P=\",round(P,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.24 page number 47 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 224.14 N\n",
+ "T2= 183.01 N\n",
+ "T3= 336.6 N\n",
+ "T4= 326.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "PB=200.0 #Vertical loading at B,N\n",
+ "PD=250.0 #Vertical loading at D,N\n",
+ "thetabc=30.0*pi/180.0\n",
+ "thetabd=60.0*pi/180.0\n",
+ "thetaed=45.0*pi/180.0\n",
+ "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n",
+ "\n",
+ "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n",
+ "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"N\"\n",
+ "print \"T2=\",round(T2,2),\"N\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n",
+ "print \"T3=\",round(T3,2),\"N\"\n",
+ "\n",
+ "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n",
+ "print \"T4=\",round(T4,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.25 page number 47\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 2863.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PC=1500.0 #Vertical loading at C,N\n",
+ "CD=2.0 \n",
+ "AC=1.5\n",
+ "BD=1.0\n",
+ "AB=4.0\n",
+ "\n",
+ "x=((pow(AC,2)-pow(BD,2))/4)+1\n",
+ "y=sqrt(pow(AC,2)-pow(x,2))\n",
+ "\n",
+ "alpha=acos(x/AC)\n",
+ "beta=acos((CD-x)/BD)\n",
+ "\n",
+ "#Applying Lami’s theorem to the system of forces acting at point C \n",
+ "\n",
+ "T1=PC*sin(pi/2)/sin(pi-alpha)\n",
+ "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n",
+ "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n",
+ "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n",
+ "\n",
+ "\n",
+ "print \"W=\",round(W,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.26 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 44.8 KN\n",
+ "T2= 29.24 KN\n",
+ "theta= 63.42 °\n",
+ "T3= 25.04 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ "PC=30.0 #vertical loadng at point C,KN \n",
+ " \n",
+ "thetaab=30.0 *pi/180.0\n",
+ "thetabc=50.0*pi/180.0\n",
+ "\n",
+ "#applying lami's thereom\n",
+ "\n",
+ "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n",
+ "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n",
+ "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n",
+ "\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at C \n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "#mistake in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.27 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T3= 22.5 KN\n",
+ "T1= 38.97 KN\n",
+ "theta= 54.79 °\n",
+ "T2= 23.85 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ " \n",
+ "PC=25.0 #vertical loadng at point C,KN \n",
+ "\n",
+ "thetaab=30.0*pi/180.0\n",
+ "thetadc=60.0*pi/180.0\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at joints B and C \n",
+ "#T1*sin(thetaab)=T3*sin(thetadc)\n",
+ "\n",
+ "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "\n",
+ "T1=T3*sin(thetadc)/sin(thetaab)\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.28 page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 600.0 N\n",
+ "alpha= 1.249 °\n",
+ "RD= 632.456 N\n",
+ "RC= 200.0 N\n",
+ "RA= 200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "W=600.0 #weight of cyclinder,N\n",
+ "r=150.0 #radius of cylinder,mm\n",
+ "a=600.0 #mm\n",
+ "b=300.0 #mm\n",
+ "\n",
+ "#Free body diagram of sphere and frame\n",
+ "\n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "RB=600.0 \n",
+ "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "alpha=atan((a-r)/r)\n",
+ "print\"alpha=\",round(alpha,4),\"°\"\n",
+ "\n",
+ "RD=W/sin(alpha)\n",
+ "print\"RD=\",round(RD,3),\"N\"\n",
+ "\n",
+ "RC=RD*cos(alpha)\n",
+ "RA=RC\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "print\"RA=\",round(RA),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.29 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 166.67 N\n",
+ "RA= 133.33 N\n",
+ "RC= 200.0 N\n",
+ "RD= 133.33 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,asin\n",
+ "\n",
+ "\n",
+ "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "W=100.0 #weight of spheres,N\n",
+ "\n",
+ "r=100.0 #radius of spheres,mm\n",
+ "\n",
+ "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n",
+ "\n",
+ "O1A=100.0\n",
+ "O2D=100.0\n",
+ "O1B=100.0\n",
+ "BO2=100.0\n",
+ "\n",
+ "O2P=360.0-O1A-O2D\n",
+ "O1O2=O1B+BO2\n",
+ "\n",
+ "alpha=acos(O2P/O1O2)\n",
+ "\n",
+ "###sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "RB=W/sin(alpha)\n",
+ "RA=RB*cos(alpha)\n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "print\"RA=\",round(RA,2),\"N\"\n",
+ "\n",
+ "RC=100+RB*sin(alpha)\n",
+ "\n",
+ "RD=RB*cos(alpha)\n",
+ "\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "\n",
+ "print\"RD=\",round(RD,2),\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.30 page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1071.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "WA=4000.0 #weight of cylinder A,N\n",
+ "WB=2000.0 #weight of cylinder B,N\n",
+ "\n",
+ "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n",
+ "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n",
+ "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n",
+ "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n",
+ "\n",
+ "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n",
+ "\n",
+ "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n",
+ "\n",
+ "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n",
+ "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n",
+ "print\"P=\",round(P,1),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.31 page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 10.0382 KN\n",
+ "RA= 188.56 KN\n",
+ "alpha 32.17 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n",
+ "\n",
+ "#variable declaration\n",
+ "PB=2.5 #vertical Loading at B,KN\n",
+ "WAB=1.0 #vertical loading at G,KN\n",
+ "\n",
+ "theta=15.0*pi/180\n",
+ "AG=6.0 #Length of boom AB is 12m\n",
+ "GB=6.0\n",
+ "thetaAB=30.0*pi/180.0\n",
+ "thetaABC=15.0*pi/180.0\n",
+ "#sum of moment at A\n",
+ "\n",
+ "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "HA=T*cos(thetaABC)\n",
+ "VA=WAB+PB+T*sin(thetaABC)\n",
+ "\n",
+ "RA=sqrt(pow(RA,2)+pow(RA,2))\n",
+ "print \"RA=\",round(RA,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(VA/HA)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.32 page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 51.9615 KN\n",
+ "R1= 23.6603 KN\n",
+ "R2= 6.3397 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n",
+ "\n",
+ "W=60.0 #gross weight of car,KN\n",
+ "theta=60.0*pi/180.0\n",
+ " \n",
+ " \n",
+ "T=W*sin(theta)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#Taking moment equilibrium condition about upper axle point on track, we get\n",
+ "\n",
+ "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n",
+ "print\"R1=\",round(R1,4),\"KN\"\n",
+ "\n",
+ "#Sum of forces normal to the plane = 0, gives \n",
+ "R2=W*cos(theta)-R1\n",
+ "print\"R2=\",round(R2,4),\"KN\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.33 page numnber 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 0.75 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,acos,pi\n",
+ "\n",
+ "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n",
+ "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n",
+ "\n",
+ "#variable declaration\n",
+ "R=800.0\n",
+ "W1=1.0\n",
+ "r1=400.0\n",
+ "W2=3.0\n",
+ "r2=600.0\n",
+ "O1O2=1000 #mm\n",
+ "O2D=600 #mm\n",
+ "\n",
+ "#If alpha is the inclination of O2O1 to horizontal\n",
+ "alpha=acos(O2D/O1O2)\n",
+ "\n",
+ "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n",
+ "#Sum of Moment at O2\n",
+ "\n",
+ "R1=W1*O2D/(O1O2*sin(alpha))\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R2=R1\n",
+ "R3=W1+W2\n",
+ "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n",
+ "\n",
+ "#Sum of Moment at A\n",
+ "\n",
+ "W=R1*O1O2*sin(alpha)/R\n",
+ "\n",
+ "print\"W=\",round(W,2),\"KN\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_F9Bz15n.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_F9Bz15n.ipynb
new file mode 100644
index 00000000..a94760d2
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_F9Bz15n.ipynb
@@ -0,0 +1,1857 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter2-FUNDAMENTALS OF STATICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.1 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Moment is = -9607.41 Nmm clockwise\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=100.0\n",
+ "hd=400.0\n",
+ "vd=500.0\n",
+ "o=60.0\n",
+ "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.2 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.3 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.4 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force = 161.52 N\n",
+ "\n",
+ " \n",
+ " Resultant angle = 0.33 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#R resultant force\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "#f1 force\n",
+ "#f2 force\n",
+ "#f3 force\n",
+ "#o1 angle with the line \n",
+ "#o2 angle with the line \n",
+ "#o3 angle with the line \n",
+ "#O angle of resultant force with line\n",
+ "f1=70.0\n",
+ "f2=80.0\n",
+ "f3=50.0 \n",
+ "o1=50.0\n",
+ "o2=25.0\n",
+ "o3=-45.0\n",
+ "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n",
+ "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n",
+ "R=math.sqrt(Rx**2+Ry**2)\n",
+ "O=math.atan(Ry/Rx)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.5 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force along the incline plane = 234.24 N\n",
+ "\n",
+ " \n",
+ " Resultant Force vertical to the incline plane = -0.46 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#O angle of inclined plane\n",
+ "#N normal reaction\n",
+ "#W weight\n",
+ "#F,T forces\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "o = 60.0 \n",
+ "W = 1000.0\n",
+ "N = 500.0\n",
+ "F = 100.0\n",
+ "T = 1200.0\n",
+ "Rx = T-F-(W*math.sin(o/180*3.14))\n",
+ "Ry = N-(W*math.cos(o/180*3.14))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.6 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force 467.201871561 N\n",
+ "At an angle 61.0805191269\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=1000.0 #Resultant force\n",
+ "F1=500.0 #Force \n",
+ "F2=1000.0 #force\n",
+ "o=45.0*3.14/180.0 #angle resultant makes with x axis \n",
+ "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n",
+ "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n",
+ "#F3coso3=Rcoso-F1coso1-F2sino2\n",
+ "#F3sino=Rsino-F1sino1-F2coso2\n",
+ "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n",
+ "print \"Force\",F3,\"N\"\n",
+ "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n",
+ "print \"At an angle\",o3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.7 Page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 6.32 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,pi,asin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=300.0\n",
+ "P2=500.0\n",
+ "thetaI=30.0*pi/180.0\n",
+ "thetaP2=30.0*pi/180\n",
+ "thetaP1=40.0*pi/180\n",
+ "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "F=(P2*sin(thetaP2))/(P1)\n",
+ "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.8 page number 30\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 68.0592 KN\n",
+ "alpha= 81.55 °\n",
+ "x= 3.326 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=20.0\n",
+ "P2=30.0\n",
+ "P3=20.0\n",
+ "theta3=60.0*pi/180.0\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=20.0*cos(theta3)\n",
+ "Fy=P1+P2+P3*sin(theta3)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,4),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n",
+ "\n",
+ "#The distance of the resultant from point O is given by:\n",
+ "\n",
+ "d=MA/R\n",
+ "x=d/sin(alpha*pi/180)\n",
+ "print\"x=\",round(x,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.9 page number 31\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 91.19 KN\n",
+ "alpha= 35.84 °\n",
+ "x= 317.023 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=100.0 #inclined up loading at 60° at A, N\n",
+ "PB1=80.0 #Vertical down loading at B,N\n",
+ "PB2=80.0 #Horizontal right loading at at B,N \n",
+ "PC=120.0 #inclined down loading at 30° at C,N\n",
+ "\n",
+ "thetaA=60.0*pi/180.0\n",
+ "thetaB=30.0*pi/180.0\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n",
+ "Rx=-Fx\n",
+ "\n",
+ "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n",
+ "Ry=Fy\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n",
+ "\n",
+ "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.10 page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 565.69 N\n",
+ "theta= 45.0 °\n",
+ "x= 2.5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=800.0 #Vertical down loading at A,N\n",
+ "PC=400.0 #vertical up loading at B,N\n",
+ "HD=600.0 #Horizontal left loading at A,N\n",
+ "HB=200.0 #Horizontal right loading at B,N\n",
+ "a=1.0 #length of side,m\n",
+ " \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=HB-HD\n",
+ "Fy=PC-PA\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=PC*a+HD*a\n",
+ "\n",
+ "#Let x be the distance from A along x axis, where resultant cuts AB.\n",
+ "\n",
+ "x=MA/Fy\n",
+ "\n",
+ "print\"x=\",round((-x),1),\"m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.11 page number 32\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 10.0 KN\n",
+ "theta= 0.0 ° i.e. , the resultant is in the direction x.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=2.0 #loading at B,KN\n",
+ "PC=sqrt(3.0) #loading at C,KN\n",
+ "PD=5.0 #loading at D,KN\n",
+ "PE=PC #loading at E,KN\n",
+ "PF=PB #loading at F,KN\n",
+ "\n",
+ "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n",
+ "\n",
+ "angleoab=60.0*pi/180\n",
+ "anglecab=angleoab/2.0\n",
+ "theta1=anglecab\n",
+ "theta2=(angleoab-theta1)\n",
+ "theta3=theta1\n",
+ "theta4=theta1\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n",
+ "\n",
+ "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.12 page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 4.66 N\n",
+ "alpha= 28.99 °\n",
+ "d= 42.73 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=2.0 #loading at 1,KN\n",
+ "P2=1.5 #loading at 2,KN\n",
+ "P3=5.0 #loading at 3,KN\n",
+ "a=10.0 #side length,mm\n",
+ "\n",
+ "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n",
+ "\n",
+ "\n",
+ "theta1=atan(a/a)\n",
+ "theta2=atan((3*a)/(4*a))\n",
+ "theta3=atan((a)/(2*a))\n",
+ "\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n",
+ "\n",
+ "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Distance d of the resultant from O is given by\n",
+ "#Rd=sum of moment at A\n",
+ "\n",
+ "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n",
+ "print\"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.13 page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 150.0 KN\n",
+ "MA= 270.0 KN-m\n",
+ "x= 1.8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #loading at B,KN\n",
+ "PC=30.0 #loading at C,KN\n",
+ "PD=40.0 #loading at D,KN\n",
+ "PA=60.0 #loading at E,KN\n",
+ "AB=1.0\n",
+ "BC=2.0\n",
+ "CD=1.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA+PB+PC+PD\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x,1),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.14 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 100.0 KN in y-direction\n",
+ "MA= 300.0 KN-m\n",
+ "x= 3.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #up loading at B,KN\n",
+ "PC=40.0 #down loading at C,KN\n",
+ "PD=50.0 #up loading at D,KN\n",
+ "PA=80.0 #down loading at A,KN\n",
+ "PE=60.0 #down loading at E,KN\n",
+ "AB=2.0\n",
+ "BC=2.0\n",
+ "CD=4.0\n",
+ "DE=2.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA-PB+PC-PD+PE\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n",
+ "\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.15 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 2671.19 KN in y-direction\n",
+ "alpha 80.3 °\n",
+ "x= 141.195 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=500.0 #Loading at inclined to 60.0°,N\n",
+ "P2=1000.0 #vertical loading at 150 distance from O,N\n",
+ "P3=1200.0 #vertical loading at 150 distance from O,N\n",
+ "H=700.0 #Horizontal loading at 300 ditance from O,N\n",
+ "a=150.0\n",
+ "theta=60.0*pi/180\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=P1*cos(theta)-H\n",
+ "Ry=-P3-P2-P1*sin(theta)\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "alpha=atan(Ry/Rx)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\"\n",
+ " \n",
+ "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n",
+ "\n",
+ "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.16 page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ry= 1420.0 KN downward\n",
+ "x= 4.127 m\n",
+ "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n",
+ "P2=120.0 #vertical up loading at 4m distance from O,KN\n",
+ "P3=420.0 #vertical downloading at 5m distance from O,KN\n",
+ "H=500.0 #Horizontal loading at 4m ditance from O,KN\n",
+ "ah=4.0\n",
+ "a1=2.0\n",
+ "a2=4.0\n",
+ "a3=5.0\n",
+ "a=7.0\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=H\n",
+ "Ry=P1-P2+P3\n",
+ "\n",
+ "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n",
+ " \n",
+ "#Let x be the distance from O where the resultant cuts the base.\n",
+ "#moment at O\n",
+ "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n",
+ "\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.17 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 42.426 KN\n",
+ "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n",
+ "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n",
+ "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n",
+ "P4=5.0 #Inclined at 45° down Loading A,KN\n",
+ "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n",
+ "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n",
+ "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n",
+ "P5=5.0 #Inclined at 45° UP Loading A,KN\n",
+ "a=1.0\n",
+ "\n",
+ "theta=45.0*pi/180.0\n",
+ "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n",
+ "\n",
+ "#assume Resulat R at distance d from A,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n",
+ "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n",
+ "\n",
+ "print \"R=\",round(Rx,3),\"KN\"\n",
+ "#and its direction is horizontal \n",
+ "#Let R be at a distance d from the ridge A\n",
+ "#moment at A\n",
+ "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n",
+ "\n",
+ "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.18 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 116.52 KN\n",
+ "alpha= 76.82 °\n",
+ "x= 1.48 m\n",
+ "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n",
+ "\n",
+ "PA=20.0 #inclined at 45° loading at A,KN\n",
+ "PB=30.0 #inclined at 60° loading at B,KN\n",
+ "\n",
+ "PC1=40.0 #inclined at 30° loading at C,KN\n",
+ "PC2=40.0 #inclined at 20° loading at C,KN\n",
+ "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n",
+ "PE=20.0 #inclined at alpha at distance xm form A,KN\n",
+ "P=20.0 #vertical loading at distance 4m,KN\n",
+ "\n",
+ "\n",
+ "\n",
+ "thetaA=45.0*pi/180.0\n",
+ "thetaB=60.0*pi/180.0\n",
+ "thetaC1=30.0*pi/180.0\n",
+ "thetaC2=20.0*pi/180.0\n",
+ "thetaD=30.0*pi/180.0\n",
+ "AD=2.0\n",
+ "AC=3.0\n",
+ "AB=6.0\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n",
+ "\n",
+ "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#Let the resultant intersect AB at a distance x from A. Then, \n",
+ "\n",
+ "\n",
+ "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n",
+ "\n",
+ "print\"x=\",round(X,2),\"m\"\n",
+ "\n",
+ "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.19 page number 42\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 103.53 N\n",
+ "R= 26.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n",
+ "\n",
+ "#variable declaration\n",
+ "W=100.0 #weight of sphere,N\n",
+ "theta=15.0*pi/180 #angle of inclination of string with wall\n",
+ "\n",
+ "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n",
+ "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n",
+ "print\"T=\",round(T,2),\"N\"\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n",
+ "\n",
+ "#Notes: \n",
+ "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n",
+ "#2. The wall reaction is a push, but cannot be a pull on the body. \n",
+ "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.20 page number 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 1732.05 N\n",
+ "P= 866.03 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n",
+ "\n",
+ "#variable declaration\n",
+ "W=1500.0 #weight of block,N\n",
+ "theta=30.0*pi/180 #angle of inclination \n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(theta)\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "P=R*sin(theta)\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.21 page number 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "S= -0.058 N\n",
+ "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n",
+ "R= 14.979 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=10.0 #weight of Roller,KN\n",
+ "IL=7.0 #inclined loading at angle of 45°,KN\n",
+ "H=5.0 #Horizontal loading ,KN\n",
+ "\n",
+ "theta=45.0*pi/180 #angle of loading of IL\n",
+ "thetaS=30.0*pi/180.0 \n",
+ "\n",
+ "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "S=(-H+IL*cos(theta))/cos(thetaS)\n",
+ "print\"S=\",round(S,3),\"N\"\n",
+ "\n",
+ "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n",
+ " \n",
+ "R=W+IL*sin(theta)-S*sin(thetaS)\n",
+ "print\"R=\",round(R,3),\"kN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.22 page number 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 1.125 m\n",
+ "T= 125.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi,asin\n",
+ "\n",
+ "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "#variable declaration\n",
+ "L=200.0 #suspended load at C,N\n",
+ "AB=3.0\n",
+ "BI=1.0\n",
+ "ACB=5.0 #Length of cord,m\n",
+ "DE=3.0\n",
+ "BE=4.0\n",
+ "theta=asin(4.0/5.0)\n",
+ "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n",
+ "\n",
+ "HI=BI*DE/BE\n",
+ "AH=DE-HI\n",
+ "x=AH/2\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "T=L/(2*sin(theta))\n",
+ "print\"T=\",round(T),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.23 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1154.7 N\n",
+ "P= 1732.05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin ,acos, pi\n",
+ "\n",
+ "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=2000.0 #weight of roller,N\n",
+ "r=300.0 #radius of roller,mm\n",
+ "h=150.0 # height of curb,mm\n",
+ "OC=r-h\n",
+ "AO=r\n",
+ "\n",
+ "alpha=acos(OC/AO)\n",
+ "\n",
+ "#angleOAB=angleOBA,Since OA=OB,\n",
+ "angleOBA=(alpha)/2\n",
+ "\n",
+ "#the reaction makes 30° with the vertical\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(angleOBA)\n",
+ "P=R*sin(angleOBA)\n",
+ "\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n",
+ "#From triangle of forces ABC, we get \n",
+ "P=W*sin(alpha)\n",
+ "print \"P=\",round(P,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.24 page number 47 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 224.14 N\n",
+ "T2= 183.01 N\n",
+ "T3= 336.6 N\n",
+ "T4= 326.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "PB=200.0 #Vertical loading at B,N\n",
+ "PD=250.0 #Vertical loading at D,N\n",
+ "thetabc=30.0*pi/180.0\n",
+ "thetabd=60.0*pi/180.0\n",
+ "thetaed=45.0*pi/180.0\n",
+ "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n",
+ "\n",
+ "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n",
+ "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"N\"\n",
+ "print \"T2=\",round(T2,2),\"N\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n",
+ "print \"T3=\",round(T3,2),\"N\"\n",
+ "\n",
+ "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n",
+ "print \"T4=\",round(T4,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.25 page number 47\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 2863.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PC=1500.0 #Vertical loading at C,N\n",
+ "CD=2.0 \n",
+ "AC=1.5\n",
+ "BD=1.0\n",
+ "AB=4.0\n",
+ "\n",
+ "x=((pow(AC,2)-pow(BD,2))/4)+1\n",
+ "y=sqrt(pow(AC,2)-pow(x,2))\n",
+ "\n",
+ "alpha=acos(x/AC)\n",
+ "beta=acos((CD-x)/BD)\n",
+ "\n",
+ "#Applying Lami’s theorem to the system of forces acting at point C \n",
+ "\n",
+ "T1=PC*sin(pi/2)/sin(pi-alpha)\n",
+ "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n",
+ "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n",
+ "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n",
+ "\n",
+ "\n",
+ "print \"W=\",round(W,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.26 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 44.8 KN\n",
+ "T2= 29.24 KN\n",
+ "theta= 63.42 °\n",
+ "T3= 25.04 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ "PC=30.0 #vertical loadng at point C,KN \n",
+ " \n",
+ "thetaab=30.0 *pi/180.0\n",
+ "thetabc=50.0*pi/180.0\n",
+ "\n",
+ "#applying lami's thereom\n",
+ "\n",
+ "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n",
+ "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n",
+ "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n",
+ "\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at C \n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "#mistake in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.27 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T3= 22.5 KN\n",
+ "T1= 38.97 KN\n",
+ "theta= 54.79 °\n",
+ "T2= 23.85 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ " \n",
+ "PC=25.0 #vertical loadng at point C,KN \n",
+ "\n",
+ "thetaab=30.0*pi/180.0\n",
+ "thetadc=60.0*pi/180.0\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at joints B and C \n",
+ "#T1*sin(thetaab)=T3*sin(thetadc)\n",
+ "\n",
+ "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "\n",
+ "T1=T3*sin(thetadc)/sin(thetaab)\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.28 page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 600.0 N\n",
+ "alpha= 1.249 °\n",
+ "RD= 632.456 N\n",
+ "RC= 200.0 N\n",
+ "RA= 200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "W=600.0 #weight of cyclinder,N\n",
+ "r=150.0 #radius of cylinder,mm\n",
+ "a=600.0 #mm\n",
+ "b=300.0 #mm\n",
+ "\n",
+ "#Free body diagram of sphere and frame\n",
+ "\n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "RB=600.0 \n",
+ "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "alpha=atan((a-r)/r)\n",
+ "print\"alpha=\",round(alpha,4),\"°\"\n",
+ "\n",
+ "RD=W/sin(alpha)\n",
+ "print\"RD=\",round(RD,3),\"N\"\n",
+ "\n",
+ "RC=RD*cos(alpha)\n",
+ "RA=RC\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "print\"RA=\",round(RA),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.29 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 166.67 N\n",
+ "RA= 133.33 N\n",
+ "RC= 200.0 N\n",
+ "RD= 133.33 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,asin\n",
+ "\n",
+ "\n",
+ "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "W=100.0 #weight of spheres,N\n",
+ "\n",
+ "r=100.0 #radius of spheres,mm\n",
+ "\n",
+ "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n",
+ "\n",
+ "O1A=100.0\n",
+ "O2D=100.0\n",
+ "O1B=100.0\n",
+ "BO2=100.0\n",
+ "\n",
+ "O2P=360.0-O1A-O2D\n",
+ "O1O2=O1B+BO2\n",
+ "\n",
+ "alpha=acos(O2P/O1O2)\n",
+ "\n",
+ "###sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "RB=W/sin(alpha)\n",
+ "RA=RB*cos(alpha)\n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "print\"RA=\",round(RA,2),\"N\"\n",
+ "\n",
+ "RC=100+RB*sin(alpha)\n",
+ "\n",
+ "RD=RB*cos(alpha)\n",
+ "\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "\n",
+ "print\"RD=\",round(RD,2),\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.30 page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1071.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "WA=4000.0 #weight of cylinder A,N\n",
+ "WB=2000.0 #weight of cylinder B,N\n",
+ "\n",
+ "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n",
+ "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n",
+ "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n",
+ "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n",
+ "\n",
+ "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n",
+ "\n",
+ "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n",
+ "\n",
+ "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n",
+ "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n",
+ "print\"P=\",round(P,1),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.31 page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 10.0382 KN\n",
+ "RA= 188.56 KN\n",
+ "alpha 32.17 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n",
+ "\n",
+ "#variable declaration\n",
+ "PB=2.5 #vertical Loading at B,KN\n",
+ "WAB=1.0 #vertical loading at G,KN\n",
+ "\n",
+ "theta=15.0*pi/180\n",
+ "AG=6.0 #Length of boom AB is 12m\n",
+ "GB=6.0\n",
+ "thetaAB=30.0*pi/180.0\n",
+ "thetaABC=15.0*pi/180.0\n",
+ "#sum of moment at A\n",
+ "\n",
+ "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "HA=T*cos(thetaABC)\n",
+ "VA=WAB+PB+T*sin(thetaABC)\n",
+ "\n",
+ "RA=sqrt(pow(RA,2)+pow(RA,2))\n",
+ "print \"RA=\",round(RA,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(VA/HA)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.32 page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 51.9615 KN\n",
+ "R1= 23.6603 KN\n",
+ "R2= 6.3397 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n",
+ "\n",
+ "W=60.0 #gross weight of car,KN\n",
+ "theta=60.0*pi/180.0\n",
+ " \n",
+ " \n",
+ "T=W*sin(theta)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#Taking moment equilibrium condition about upper axle point on track, we get\n",
+ "\n",
+ "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n",
+ "print\"R1=\",round(R1,4),\"KN\"\n",
+ "\n",
+ "#Sum of forces normal to the plane = 0, gives \n",
+ "R2=W*cos(theta)-R1\n",
+ "print\"R2=\",round(R2,4),\"KN\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.33 page numnber 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 0.75 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,acos,pi\n",
+ "\n",
+ "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n",
+ "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n",
+ "\n",
+ "#variable declaration\n",
+ "R=800.0\n",
+ "W1=1.0\n",
+ "r1=400.0\n",
+ "W2=3.0\n",
+ "r2=600.0\n",
+ "O1O2=1000 #mm\n",
+ "O2D=600 #mm\n",
+ "\n",
+ "#If alpha is the inclination of O2O1 to horizontal\n",
+ "alpha=acos(O2D/O1O2)\n",
+ "\n",
+ "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n",
+ "#Sum of Moment at O2\n",
+ "\n",
+ "R1=W1*O2D/(O1O2*sin(alpha))\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R2=R1\n",
+ "R3=W1+W2\n",
+ "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n",
+ "\n",
+ "#Sum of Moment at A\n",
+ "\n",
+ "W=R1*O1O2*sin(alpha)/R\n",
+ "\n",
+ "print\"W=\",round(W,2),\"KN\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_KLSq0oK.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_KLSq0oK.ipynb
new file mode 100644
index 00000000..a94760d2
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_KLSq0oK.ipynb
@@ -0,0 +1,1857 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter2-FUNDAMENTALS OF STATICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.1 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Moment is = -9607.41 Nmm clockwise\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=100.0\n",
+ "hd=400.0\n",
+ "vd=500.0\n",
+ "o=60.0\n",
+ "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.2 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.3 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.4 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force = 161.52 N\n",
+ "\n",
+ " \n",
+ " Resultant angle = 0.33 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#R resultant force\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "#f1 force\n",
+ "#f2 force\n",
+ "#f3 force\n",
+ "#o1 angle with the line \n",
+ "#o2 angle with the line \n",
+ "#o3 angle with the line \n",
+ "#O angle of resultant force with line\n",
+ "f1=70.0\n",
+ "f2=80.0\n",
+ "f3=50.0 \n",
+ "o1=50.0\n",
+ "o2=25.0\n",
+ "o3=-45.0\n",
+ "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n",
+ "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n",
+ "R=math.sqrt(Rx**2+Ry**2)\n",
+ "O=math.atan(Ry/Rx)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.5 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force along the incline plane = 234.24 N\n",
+ "\n",
+ " \n",
+ " Resultant Force vertical to the incline plane = -0.46 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#O angle of inclined plane\n",
+ "#N normal reaction\n",
+ "#W weight\n",
+ "#F,T forces\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "o = 60.0 \n",
+ "W = 1000.0\n",
+ "N = 500.0\n",
+ "F = 100.0\n",
+ "T = 1200.0\n",
+ "Rx = T-F-(W*math.sin(o/180*3.14))\n",
+ "Ry = N-(W*math.cos(o/180*3.14))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.6 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force 467.201871561 N\n",
+ "At an angle 61.0805191269\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=1000.0 #Resultant force\n",
+ "F1=500.0 #Force \n",
+ "F2=1000.0 #force\n",
+ "o=45.0*3.14/180.0 #angle resultant makes with x axis \n",
+ "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n",
+ "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n",
+ "#F3coso3=Rcoso-F1coso1-F2sino2\n",
+ "#F3sino=Rsino-F1sino1-F2coso2\n",
+ "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n",
+ "print \"Force\",F3,\"N\"\n",
+ "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n",
+ "print \"At an angle\",o3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.7 Page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 6.32 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,pi,asin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=300.0\n",
+ "P2=500.0\n",
+ "thetaI=30.0*pi/180.0\n",
+ "thetaP2=30.0*pi/180\n",
+ "thetaP1=40.0*pi/180\n",
+ "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "F=(P2*sin(thetaP2))/(P1)\n",
+ "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.8 page number 30\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 68.0592 KN\n",
+ "alpha= 81.55 °\n",
+ "x= 3.326 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=20.0\n",
+ "P2=30.0\n",
+ "P3=20.0\n",
+ "theta3=60.0*pi/180.0\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=20.0*cos(theta3)\n",
+ "Fy=P1+P2+P3*sin(theta3)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,4),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n",
+ "\n",
+ "#The distance of the resultant from point O is given by:\n",
+ "\n",
+ "d=MA/R\n",
+ "x=d/sin(alpha*pi/180)\n",
+ "print\"x=\",round(x,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.9 page number 31\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 91.19 KN\n",
+ "alpha= 35.84 °\n",
+ "x= 317.023 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=100.0 #inclined up loading at 60° at A, N\n",
+ "PB1=80.0 #Vertical down loading at B,N\n",
+ "PB2=80.0 #Horizontal right loading at at B,N \n",
+ "PC=120.0 #inclined down loading at 30° at C,N\n",
+ "\n",
+ "thetaA=60.0*pi/180.0\n",
+ "thetaB=30.0*pi/180.0\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n",
+ "Rx=-Fx\n",
+ "\n",
+ "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n",
+ "Ry=Fy\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n",
+ "\n",
+ "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.10 page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 565.69 N\n",
+ "theta= 45.0 °\n",
+ "x= 2.5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=800.0 #Vertical down loading at A,N\n",
+ "PC=400.0 #vertical up loading at B,N\n",
+ "HD=600.0 #Horizontal left loading at A,N\n",
+ "HB=200.0 #Horizontal right loading at B,N\n",
+ "a=1.0 #length of side,m\n",
+ " \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=HB-HD\n",
+ "Fy=PC-PA\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=PC*a+HD*a\n",
+ "\n",
+ "#Let x be the distance from A along x axis, where resultant cuts AB.\n",
+ "\n",
+ "x=MA/Fy\n",
+ "\n",
+ "print\"x=\",round((-x),1),\"m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.11 page number 32\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 10.0 KN\n",
+ "theta= 0.0 ° i.e. , the resultant is in the direction x.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=2.0 #loading at B,KN\n",
+ "PC=sqrt(3.0) #loading at C,KN\n",
+ "PD=5.0 #loading at D,KN\n",
+ "PE=PC #loading at E,KN\n",
+ "PF=PB #loading at F,KN\n",
+ "\n",
+ "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n",
+ "\n",
+ "angleoab=60.0*pi/180\n",
+ "anglecab=angleoab/2.0\n",
+ "theta1=anglecab\n",
+ "theta2=(angleoab-theta1)\n",
+ "theta3=theta1\n",
+ "theta4=theta1\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n",
+ "\n",
+ "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.12 page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 4.66 N\n",
+ "alpha= 28.99 °\n",
+ "d= 42.73 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=2.0 #loading at 1,KN\n",
+ "P2=1.5 #loading at 2,KN\n",
+ "P3=5.0 #loading at 3,KN\n",
+ "a=10.0 #side length,mm\n",
+ "\n",
+ "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n",
+ "\n",
+ "\n",
+ "theta1=atan(a/a)\n",
+ "theta2=atan((3*a)/(4*a))\n",
+ "theta3=atan((a)/(2*a))\n",
+ "\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n",
+ "\n",
+ "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Distance d of the resultant from O is given by\n",
+ "#Rd=sum of moment at A\n",
+ "\n",
+ "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n",
+ "print\"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.13 page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 150.0 KN\n",
+ "MA= 270.0 KN-m\n",
+ "x= 1.8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #loading at B,KN\n",
+ "PC=30.0 #loading at C,KN\n",
+ "PD=40.0 #loading at D,KN\n",
+ "PA=60.0 #loading at E,KN\n",
+ "AB=1.0\n",
+ "BC=2.0\n",
+ "CD=1.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA+PB+PC+PD\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x,1),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.14 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 100.0 KN in y-direction\n",
+ "MA= 300.0 KN-m\n",
+ "x= 3.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #up loading at B,KN\n",
+ "PC=40.0 #down loading at C,KN\n",
+ "PD=50.0 #up loading at D,KN\n",
+ "PA=80.0 #down loading at A,KN\n",
+ "PE=60.0 #down loading at E,KN\n",
+ "AB=2.0\n",
+ "BC=2.0\n",
+ "CD=4.0\n",
+ "DE=2.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA-PB+PC-PD+PE\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n",
+ "\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.15 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 2671.19 KN in y-direction\n",
+ "alpha 80.3 °\n",
+ "x= 141.195 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=500.0 #Loading at inclined to 60.0°,N\n",
+ "P2=1000.0 #vertical loading at 150 distance from O,N\n",
+ "P3=1200.0 #vertical loading at 150 distance from O,N\n",
+ "H=700.0 #Horizontal loading at 300 ditance from O,N\n",
+ "a=150.0\n",
+ "theta=60.0*pi/180\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=P1*cos(theta)-H\n",
+ "Ry=-P3-P2-P1*sin(theta)\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "alpha=atan(Ry/Rx)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\"\n",
+ " \n",
+ "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n",
+ "\n",
+ "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.16 page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ry= 1420.0 KN downward\n",
+ "x= 4.127 m\n",
+ "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n",
+ "P2=120.0 #vertical up loading at 4m distance from O,KN\n",
+ "P3=420.0 #vertical downloading at 5m distance from O,KN\n",
+ "H=500.0 #Horizontal loading at 4m ditance from O,KN\n",
+ "ah=4.0\n",
+ "a1=2.0\n",
+ "a2=4.0\n",
+ "a3=5.0\n",
+ "a=7.0\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=H\n",
+ "Ry=P1-P2+P3\n",
+ "\n",
+ "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n",
+ " \n",
+ "#Let x be the distance from O where the resultant cuts the base.\n",
+ "#moment at O\n",
+ "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n",
+ "\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.17 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 42.426 KN\n",
+ "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n",
+ "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n",
+ "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n",
+ "P4=5.0 #Inclined at 45° down Loading A,KN\n",
+ "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n",
+ "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n",
+ "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n",
+ "P5=5.0 #Inclined at 45° UP Loading A,KN\n",
+ "a=1.0\n",
+ "\n",
+ "theta=45.0*pi/180.0\n",
+ "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n",
+ "\n",
+ "#assume Resulat R at distance d from A,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n",
+ "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n",
+ "\n",
+ "print \"R=\",round(Rx,3),\"KN\"\n",
+ "#and its direction is horizontal \n",
+ "#Let R be at a distance d from the ridge A\n",
+ "#moment at A\n",
+ "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n",
+ "\n",
+ "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.18 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 116.52 KN\n",
+ "alpha= 76.82 °\n",
+ "x= 1.48 m\n",
+ "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n",
+ "\n",
+ "PA=20.0 #inclined at 45° loading at A,KN\n",
+ "PB=30.0 #inclined at 60° loading at B,KN\n",
+ "\n",
+ "PC1=40.0 #inclined at 30° loading at C,KN\n",
+ "PC2=40.0 #inclined at 20° loading at C,KN\n",
+ "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n",
+ "PE=20.0 #inclined at alpha at distance xm form A,KN\n",
+ "P=20.0 #vertical loading at distance 4m,KN\n",
+ "\n",
+ "\n",
+ "\n",
+ "thetaA=45.0*pi/180.0\n",
+ "thetaB=60.0*pi/180.0\n",
+ "thetaC1=30.0*pi/180.0\n",
+ "thetaC2=20.0*pi/180.0\n",
+ "thetaD=30.0*pi/180.0\n",
+ "AD=2.0\n",
+ "AC=3.0\n",
+ "AB=6.0\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n",
+ "\n",
+ "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#Let the resultant intersect AB at a distance x from A. Then, \n",
+ "\n",
+ "\n",
+ "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n",
+ "\n",
+ "print\"x=\",round(X,2),\"m\"\n",
+ "\n",
+ "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.19 page number 42\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 103.53 N\n",
+ "R= 26.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n",
+ "\n",
+ "#variable declaration\n",
+ "W=100.0 #weight of sphere,N\n",
+ "theta=15.0*pi/180 #angle of inclination of string with wall\n",
+ "\n",
+ "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n",
+ "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n",
+ "print\"T=\",round(T,2),\"N\"\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n",
+ "\n",
+ "#Notes: \n",
+ "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n",
+ "#2. The wall reaction is a push, but cannot be a pull on the body. \n",
+ "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.20 page number 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 1732.05 N\n",
+ "P= 866.03 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n",
+ "\n",
+ "#variable declaration\n",
+ "W=1500.0 #weight of block,N\n",
+ "theta=30.0*pi/180 #angle of inclination \n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(theta)\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "P=R*sin(theta)\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.21 page number 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "S= -0.058 N\n",
+ "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n",
+ "R= 14.979 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=10.0 #weight of Roller,KN\n",
+ "IL=7.0 #inclined loading at angle of 45°,KN\n",
+ "H=5.0 #Horizontal loading ,KN\n",
+ "\n",
+ "theta=45.0*pi/180 #angle of loading of IL\n",
+ "thetaS=30.0*pi/180.0 \n",
+ "\n",
+ "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "S=(-H+IL*cos(theta))/cos(thetaS)\n",
+ "print\"S=\",round(S,3),\"N\"\n",
+ "\n",
+ "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n",
+ " \n",
+ "R=W+IL*sin(theta)-S*sin(thetaS)\n",
+ "print\"R=\",round(R,3),\"kN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.22 page number 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 1.125 m\n",
+ "T= 125.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi,asin\n",
+ "\n",
+ "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "#variable declaration\n",
+ "L=200.0 #suspended load at C,N\n",
+ "AB=3.0\n",
+ "BI=1.0\n",
+ "ACB=5.0 #Length of cord,m\n",
+ "DE=3.0\n",
+ "BE=4.0\n",
+ "theta=asin(4.0/5.0)\n",
+ "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n",
+ "\n",
+ "HI=BI*DE/BE\n",
+ "AH=DE-HI\n",
+ "x=AH/2\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "T=L/(2*sin(theta))\n",
+ "print\"T=\",round(T),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.23 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1154.7 N\n",
+ "P= 1732.05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin ,acos, pi\n",
+ "\n",
+ "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=2000.0 #weight of roller,N\n",
+ "r=300.0 #radius of roller,mm\n",
+ "h=150.0 # height of curb,mm\n",
+ "OC=r-h\n",
+ "AO=r\n",
+ "\n",
+ "alpha=acos(OC/AO)\n",
+ "\n",
+ "#angleOAB=angleOBA,Since OA=OB,\n",
+ "angleOBA=(alpha)/2\n",
+ "\n",
+ "#the reaction makes 30° with the vertical\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(angleOBA)\n",
+ "P=R*sin(angleOBA)\n",
+ "\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n",
+ "#From triangle of forces ABC, we get \n",
+ "P=W*sin(alpha)\n",
+ "print \"P=\",round(P,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.24 page number 47 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 224.14 N\n",
+ "T2= 183.01 N\n",
+ "T3= 336.6 N\n",
+ "T4= 326.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "PB=200.0 #Vertical loading at B,N\n",
+ "PD=250.0 #Vertical loading at D,N\n",
+ "thetabc=30.0*pi/180.0\n",
+ "thetabd=60.0*pi/180.0\n",
+ "thetaed=45.0*pi/180.0\n",
+ "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n",
+ "\n",
+ "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n",
+ "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"N\"\n",
+ "print \"T2=\",round(T2,2),\"N\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n",
+ "print \"T3=\",round(T3,2),\"N\"\n",
+ "\n",
+ "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n",
+ "print \"T4=\",round(T4,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.25 page number 47\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 2863.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PC=1500.0 #Vertical loading at C,N\n",
+ "CD=2.0 \n",
+ "AC=1.5\n",
+ "BD=1.0\n",
+ "AB=4.0\n",
+ "\n",
+ "x=((pow(AC,2)-pow(BD,2))/4)+1\n",
+ "y=sqrt(pow(AC,2)-pow(x,2))\n",
+ "\n",
+ "alpha=acos(x/AC)\n",
+ "beta=acos((CD-x)/BD)\n",
+ "\n",
+ "#Applying Lami’s theorem to the system of forces acting at point C \n",
+ "\n",
+ "T1=PC*sin(pi/2)/sin(pi-alpha)\n",
+ "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n",
+ "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n",
+ "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n",
+ "\n",
+ "\n",
+ "print \"W=\",round(W,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.26 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 44.8 KN\n",
+ "T2= 29.24 KN\n",
+ "theta= 63.42 °\n",
+ "T3= 25.04 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ "PC=30.0 #vertical loadng at point C,KN \n",
+ " \n",
+ "thetaab=30.0 *pi/180.0\n",
+ "thetabc=50.0*pi/180.0\n",
+ "\n",
+ "#applying lami's thereom\n",
+ "\n",
+ "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n",
+ "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n",
+ "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n",
+ "\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at C \n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "#mistake in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.27 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T3= 22.5 KN\n",
+ "T1= 38.97 KN\n",
+ "theta= 54.79 °\n",
+ "T2= 23.85 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ " \n",
+ "PC=25.0 #vertical loadng at point C,KN \n",
+ "\n",
+ "thetaab=30.0*pi/180.0\n",
+ "thetadc=60.0*pi/180.0\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at joints B and C \n",
+ "#T1*sin(thetaab)=T3*sin(thetadc)\n",
+ "\n",
+ "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "\n",
+ "T1=T3*sin(thetadc)/sin(thetaab)\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.28 page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 600.0 N\n",
+ "alpha= 1.249 °\n",
+ "RD= 632.456 N\n",
+ "RC= 200.0 N\n",
+ "RA= 200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "W=600.0 #weight of cyclinder,N\n",
+ "r=150.0 #radius of cylinder,mm\n",
+ "a=600.0 #mm\n",
+ "b=300.0 #mm\n",
+ "\n",
+ "#Free body diagram of sphere and frame\n",
+ "\n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "RB=600.0 \n",
+ "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "alpha=atan((a-r)/r)\n",
+ "print\"alpha=\",round(alpha,4),\"°\"\n",
+ "\n",
+ "RD=W/sin(alpha)\n",
+ "print\"RD=\",round(RD,3),\"N\"\n",
+ "\n",
+ "RC=RD*cos(alpha)\n",
+ "RA=RC\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "print\"RA=\",round(RA),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.29 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 166.67 N\n",
+ "RA= 133.33 N\n",
+ "RC= 200.0 N\n",
+ "RD= 133.33 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,asin\n",
+ "\n",
+ "\n",
+ "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "W=100.0 #weight of spheres,N\n",
+ "\n",
+ "r=100.0 #radius of spheres,mm\n",
+ "\n",
+ "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n",
+ "\n",
+ "O1A=100.0\n",
+ "O2D=100.0\n",
+ "O1B=100.0\n",
+ "BO2=100.0\n",
+ "\n",
+ "O2P=360.0-O1A-O2D\n",
+ "O1O2=O1B+BO2\n",
+ "\n",
+ "alpha=acos(O2P/O1O2)\n",
+ "\n",
+ "###sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "RB=W/sin(alpha)\n",
+ "RA=RB*cos(alpha)\n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "print\"RA=\",round(RA,2),\"N\"\n",
+ "\n",
+ "RC=100+RB*sin(alpha)\n",
+ "\n",
+ "RD=RB*cos(alpha)\n",
+ "\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "\n",
+ "print\"RD=\",round(RD,2),\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.30 page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1071.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "WA=4000.0 #weight of cylinder A,N\n",
+ "WB=2000.0 #weight of cylinder B,N\n",
+ "\n",
+ "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n",
+ "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n",
+ "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n",
+ "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n",
+ "\n",
+ "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n",
+ "\n",
+ "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n",
+ "\n",
+ "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n",
+ "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n",
+ "print\"P=\",round(P,1),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.31 page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 10.0382 KN\n",
+ "RA= 188.56 KN\n",
+ "alpha 32.17 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n",
+ "\n",
+ "#variable declaration\n",
+ "PB=2.5 #vertical Loading at B,KN\n",
+ "WAB=1.0 #vertical loading at G,KN\n",
+ "\n",
+ "theta=15.0*pi/180\n",
+ "AG=6.0 #Length of boom AB is 12m\n",
+ "GB=6.0\n",
+ "thetaAB=30.0*pi/180.0\n",
+ "thetaABC=15.0*pi/180.0\n",
+ "#sum of moment at A\n",
+ "\n",
+ "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "HA=T*cos(thetaABC)\n",
+ "VA=WAB+PB+T*sin(thetaABC)\n",
+ "\n",
+ "RA=sqrt(pow(RA,2)+pow(RA,2))\n",
+ "print \"RA=\",round(RA,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(VA/HA)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.32 page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 51.9615 KN\n",
+ "R1= 23.6603 KN\n",
+ "R2= 6.3397 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n",
+ "\n",
+ "W=60.0 #gross weight of car,KN\n",
+ "theta=60.0*pi/180.0\n",
+ " \n",
+ " \n",
+ "T=W*sin(theta)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#Taking moment equilibrium condition about upper axle point on track, we get\n",
+ "\n",
+ "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n",
+ "print\"R1=\",round(R1,4),\"KN\"\n",
+ "\n",
+ "#Sum of forces normal to the plane = 0, gives \n",
+ "R2=W*cos(theta)-R1\n",
+ "print\"R2=\",round(R2,4),\"KN\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.33 page numnber 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 0.75 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,acos,pi\n",
+ "\n",
+ "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n",
+ "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n",
+ "\n",
+ "#variable declaration\n",
+ "R=800.0\n",
+ "W1=1.0\n",
+ "r1=400.0\n",
+ "W2=3.0\n",
+ "r2=600.0\n",
+ "O1O2=1000 #mm\n",
+ "O2D=600 #mm\n",
+ "\n",
+ "#If alpha is the inclination of O2O1 to horizontal\n",
+ "alpha=acos(O2D/O1O2)\n",
+ "\n",
+ "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n",
+ "#Sum of Moment at O2\n",
+ "\n",
+ "R1=W1*O2D/(O1O2*sin(alpha))\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R2=R1\n",
+ "R3=W1+W2\n",
+ "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n",
+ "\n",
+ "#Sum of Moment at A\n",
+ "\n",
+ "W=R1*O1O2*sin(alpha)/R\n",
+ "\n",
+ "print\"W=\",round(W,2),\"KN\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_MoXnaf4.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_MoXnaf4.ipynb
new file mode 100644
index 00000000..a94760d2
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_MoXnaf4.ipynb
@@ -0,0 +1,1857 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter2-FUNDAMENTALS OF STATICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.1 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Moment is = -9607.41 Nmm clockwise\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=100.0\n",
+ "hd=400.0\n",
+ "vd=500.0\n",
+ "o=60.0\n",
+ "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.2 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.3 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.4 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force = 161.52 N\n",
+ "\n",
+ " \n",
+ " Resultant angle = 0.33 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#R resultant force\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "#f1 force\n",
+ "#f2 force\n",
+ "#f3 force\n",
+ "#o1 angle with the line \n",
+ "#o2 angle with the line \n",
+ "#o3 angle with the line \n",
+ "#O angle of resultant force with line\n",
+ "f1=70.0\n",
+ "f2=80.0\n",
+ "f3=50.0 \n",
+ "o1=50.0\n",
+ "o2=25.0\n",
+ "o3=-45.0\n",
+ "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n",
+ "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n",
+ "R=math.sqrt(Rx**2+Ry**2)\n",
+ "O=math.atan(Ry/Rx)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.5 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force along the incline plane = 234.24 N\n",
+ "\n",
+ " \n",
+ " Resultant Force vertical to the incline plane = -0.46 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#O angle of inclined plane\n",
+ "#N normal reaction\n",
+ "#W weight\n",
+ "#F,T forces\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "o = 60.0 \n",
+ "W = 1000.0\n",
+ "N = 500.0\n",
+ "F = 100.0\n",
+ "T = 1200.0\n",
+ "Rx = T-F-(W*math.sin(o/180*3.14))\n",
+ "Ry = N-(W*math.cos(o/180*3.14))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.6 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force 467.201871561 N\n",
+ "At an angle 61.0805191269\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=1000.0 #Resultant force\n",
+ "F1=500.0 #Force \n",
+ "F2=1000.0 #force\n",
+ "o=45.0*3.14/180.0 #angle resultant makes with x axis \n",
+ "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n",
+ "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n",
+ "#F3coso3=Rcoso-F1coso1-F2sino2\n",
+ "#F3sino=Rsino-F1sino1-F2coso2\n",
+ "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n",
+ "print \"Force\",F3,\"N\"\n",
+ "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n",
+ "print \"At an angle\",o3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.7 Page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 6.32 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,pi,asin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=300.0\n",
+ "P2=500.0\n",
+ "thetaI=30.0*pi/180.0\n",
+ "thetaP2=30.0*pi/180\n",
+ "thetaP1=40.0*pi/180\n",
+ "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "F=(P2*sin(thetaP2))/(P1)\n",
+ "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.8 page number 30\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 68.0592 KN\n",
+ "alpha= 81.55 °\n",
+ "x= 3.326 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=20.0\n",
+ "P2=30.0\n",
+ "P3=20.0\n",
+ "theta3=60.0*pi/180.0\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=20.0*cos(theta3)\n",
+ "Fy=P1+P2+P3*sin(theta3)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,4),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n",
+ "\n",
+ "#The distance of the resultant from point O is given by:\n",
+ "\n",
+ "d=MA/R\n",
+ "x=d/sin(alpha*pi/180)\n",
+ "print\"x=\",round(x,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.9 page number 31\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 91.19 KN\n",
+ "alpha= 35.84 °\n",
+ "x= 317.023 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=100.0 #inclined up loading at 60° at A, N\n",
+ "PB1=80.0 #Vertical down loading at B,N\n",
+ "PB2=80.0 #Horizontal right loading at at B,N \n",
+ "PC=120.0 #inclined down loading at 30° at C,N\n",
+ "\n",
+ "thetaA=60.0*pi/180.0\n",
+ "thetaB=30.0*pi/180.0\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n",
+ "Rx=-Fx\n",
+ "\n",
+ "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n",
+ "Ry=Fy\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n",
+ "\n",
+ "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.10 page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 565.69 N\n",
+ "theta= 45.0 °\n",
+ "x= 2.5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=800.0 #Vertical down loading at A,N\n",
+ "PC=400.0 #vertical up loading at B,N\n",
+ "HD=600.0 #Horizontal left loading at A,N\n",
+ "HB=200.0 #Horizontal right loading at B,N\n",
+ "a=1.0 #length of side,m\n",
+ " \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=HB-HD\n",
+ "Fy=PC-PA\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=PC*a+HD*a\n",
+ "\n",
+ "#Let x be the distance from A along x axis, where resultant cuts AB.\n",
+ "\n",
+ "x=MA/Fy\n",
+ "\n",
+ "print\"x=\",round((-x),1),\"m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.11 page number 32\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 10.0 KN\n",
+ "theta= 0.0 ° i.e. , the resultant is in the direction x.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=2.0 #loading at B,KN\n",
+ "PC=sqrt(3.0) #loading at C,KN\n",
+ "PD=5.0 #loading at D,KN\n",
+ "PE=PC #loading at E,KN\n",
+ "PF=PB #loading at F,KN\n",
+ "\n",
+ "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n",
+ "\n",
+ "angleoab=60.0*pi/180\n",
+ "anglecab=angleoab/2.0\n",
+ "theta1=anglecab\n",
+ "theta2=(angleoab-theta1)\n",
+ "theta3=theta1\n",
+ "theta4=theta1\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n",
+ "\n",
+ "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.12 page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 4.66 N\n",
+ "alpha= 28.99 °\n",
+ "d= 42.73 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=2.0 #loading at 1,KN\n",
+ "P2=1.5 #loading at 2,KN\n",
+ "P3=5.0 #loading at 3,KN\n",
+ "a=10.0 #side length,mm\n",
+ "\n",
+ "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n",
+ "\n",
+ "\n",
+ "theta1=atan(a/a)\n",
+ "theta2=atan((3*a)/(4*a))\n",
+ "theta3=atan((a)/(2*a))\n",
+ "\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n",
+ "\n",
+ "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Distance d of the resultant from O is given by\n",
+ "#Rd=sum of moment at A\n",
+ "\n",
+ "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n",
+ "print\"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.13 page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 150.0 KN\n",
+ "MA= 270.0 KN-m\n",
+ "x= 1.8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #loading at B,KN\n",
+ "PC=30.0 #loading at C,KN\n",
+ "PD=40.0 #loading at D,KN\n",
+ "PA=60.0 #loading at E,KN\n",
+ "AB=1.0\n",
+ "BC=2.0\n",
+ "CD=1.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA+PB+PC+PD\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x,1),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.14 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 100.0 KN in y-direction\n",
+ "MA= 300.0 KN-m\n",
+ "x= 3.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #up loading at B,KN\n",
+ "PC=40.0 #down loading at C,KN\n",
+ "PD=50.0 #up loading at D,KN\n",
+ "PA=80.0 #down loading at A,KN\n",
+ "PE=60.0 #down loading at E,KN\n",
+ "AB=2.0\n",
+ "BC=2.0\n",
+ "CD=4.0\n",
+ "DE=2.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA-PB+PC-PD+PE\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n",
+ "\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.15 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 2671.19 KN in y-direction\n",
+ "alpha 80.3 °\n",
+ "x= 141.195 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=500.0 #Loading at inclined to 60.0°,N\n",
+ "P2=1000.0 #vertical loading at 150 distance from O,N\n",
+ "P3=1200.0 #vertical loading at 150 distance from O,N\n",
+ "H=700.0 #Horizontal loading at 300 ditance from O,N\n",
+ "a=150.0\n",
+ "theta=60.0*pi/180\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=P1*cos(theta)-H\n",
+ "Ry=-P3-P2-P1*sin(theta)\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "alpha=atan(Ry/Rx)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\"\n",
+ " \n",
+ "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n",
+ "\n",
+ "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.16 page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ry= 1420.0 KN downward\n",
+ "x= 4.127 m\n",
+ "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n",
+ "P2=120.0 #vertical up loading at 4m distance from O,KN\n",
+ "P3=420.0 #vertical downloading at 5m distance from O,KN\n",
+ "H=500.0 #Horizontal loading at 4m ditance from O,KN\n",
+ "ah=4.0\n",
+ "a1=2.0\n",
+ "a2=4.0\n",
+ "a3=5.0\n",
+ "a=7.0\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=H\n",
+ "Ry=P1-P2+P3\n",
+ "\n",
+ "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n",
+ " \n",
+ "#Let x be the distance from O where the resultant cuts the base.\n",
+ "#moment at O\n",
+ "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n",
+ "\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.17 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 42.426 KN\n",
+ "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n",
+ "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n",
+ "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n",
+ "P4=5.0 #Inclined at 45° down Loading A,KN\n",
+ "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n",
+ "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n",
+ "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n",
+ "P5=5.0 #Inclined at 45° UP Loading A,KN\n",
+ "a=1.0\n",
+ "\n",
+ "theta=45.0*pi/180.0\n",
+ "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n",
+ "\n",
+ "#assume Resulat R at distance d from A,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n",
+ "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n",
+ "\n",
+ "print \"R=\",round(Rx,3),\"KN\"\n",
+ "#and its direction is horizontal \n",
+ "#Let R be at a distance d from the ridge A\n",
+ "#moment at A\n",
+ "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n",
+ "\n",
+ "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.18 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 116.52 KN\n",
+ "alpha= 76.82 °\n",
+ "x= 1.48 m\n",
+ "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n",
+ "\n",
+ "PA=20.0 #inclined at 45° loading at A,KN\n",
+ "PB=30.0 #inclined at 60° loading at B,KN\n",
+ "\n",
+ "PC1=40.0 #inclined at 30° loading at C,KN\n",
+ "PC2=40.0 #inclined at 20° loading at C,KN\n",
+ "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n",
+ "PE=20.0 #inclined at alpha at distance xm form A,KN\n",
+ "P=20.0 #vertical loading at distance 4m,KN\n",
+ "\n",
+ "\n",
+ "\n",
+ "thetaA=45.0*pi/180.0\n",
+ "thetaB=60.0*pi/180.0\n",
+ "thetaC1=30.0*pi/180.0\n",
+ "thetaC2=20.0*pi/180.0\n",
+ "thetaD=30.0*pi/180.0\n",
+ "AD=2.0\n",
+ "AC=3.0\n",
+ "AB=6.0\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n",
+ "\n",
+ "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#Let the resultant intersect AB at a distance x from A. Then, \n",
+ "\n",
+ "\n",
+ "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n",
+ "\n",
+ "print\"x=\",round(X,2),\"m\"\n",
+ "\n",
+ "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.19 page number 42\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 103.53 N\n",
+ "R= 26.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n",
+ "\n",
+ "#variable declaration\n",
+ "W=100.0 #weight of sphere,N\n",
+ "theta=15.0*pi/180 #angle of inclination of string with wall\n",
+ "\n",
+ "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n",
+ "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n",
+ "print\"T=\",round(T,2),\"N\"\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n",
+ "\n",
+ "#Notes: \n",
+ "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n",
+ "#2. The wall reaction is a push, but cannot be a pull on the body. \n",
+ "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.20 page number 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 1732.05 N\n",
+ "P= 866.03 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n",
+ "\n",
+ "#variable declaration\n",
+ "W=1500.0 #weight of block,N\n",
+ "theta=30.0*pi/180 #angle of inclination \n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(theta)\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "P=R*sin(theta)\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.21 page number 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "S= -0.058 N\n",
+ "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n",
+ "R= 14.979 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=10.0 #weight of Roller,KN\n",
+ "IL=7.0 #inclined loading at angle of 45°,KN\n",
+ "H=5.0 #Horizontal loading ,KN\n",
+ "\n",
+ "theta=45.0*pi/180 #angle of loading of IL\n",
+ "thetaS=30.0*pi/180.0 \n",
+ "\n",
+ "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "S=(-H+IL*cos(theta))/cos(thetaS)\n",
+ "print\"S=\",round(S,3),\"N\"\n",
+ "\n",
+ "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n",
+ " \n",
+ "R=W+IL*sin(theta)-S*sin(thetaS)\n",
+ "print\"R=\",round(R,3),\"kN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.22 page number 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 1.125 m\n",
+ "T= 125.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi,asin\n",
+ "\n",
+ "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "#variable declaration\n",
+ "L=200.0 #suspended load at C,N\n",
+ "AB=3.0\n",
+ "BI=1.0\n",
+ "ACB=5.0 #Length of cord,m\n",
+ "DE=3.0\n",
+ "BE=4.0\n",
+ "theta=asin(4.0/5.0)\n",
+ "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n",
+ "\n",
+ "HI=BI*DE/BE\n",
+ "AH=DE-HI\n",
+ "x=AH/2\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "T=L/(2*sin(theta))\n",
+ "print\"T=\",round(T),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.23 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1154.7 N\n",
+ "P= 1732.05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin ,acos, pi\n",
+ "\n",
+ "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=2000.0 #weight of roller,N\n",
+ "r=300.0 #radius of roller,mm\n",
+ "h=150.0 # height of curb,mm\n",
+ "OC=r-h\n",
+ "AO=r\n",
+ "\n",
+ "alpha=acos(OC/AO)\n",
+ "\n",
+ "#angleOAB=angleOBA,Since OA=OB,\n",
+ "angleOBA=(alpha)/2\n",
+ "\n",
+ "#the reaction makes 30° with the vertical\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(angleOBA)\n",
+ "P=R*sin(angleOBA)\n",
+ "\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n",
+ "#From triangle of forces ABC, we get \n",
+ "P=W*sin(alpha)\n",
+ "print \"P=\",round(P,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.24 page number 47 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 224.14 N\n",
+ "T2= 183.01 N\n",
+ "T3= 336.6 N\n",
+ "T4= 326.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "PB=200.0 #Vertical loading at B,N\n",
+ "PD=250.0 #Vertical loading at D,N\n",
+ "thetabc=30.0*pi/180.0\n",
+ "thetabd=60.0*pi/180.0\n",
+ "thetaed=45.0*pi/180.0\n",
+ "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n",
+ "\n",
+ "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n",
+ "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"N\"\n",
+ "print \"T2=\",round(T2,2),\"N\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n",
+ "print \"T3=\",round(T3,2),\"N\"\n",
+ "\n",
+ "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n",
+ "print \"T4=\",round(T4,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.25 page number 47\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 2863.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PC=1500.0 #Vertical loading at C,N\n",
+ "CD=2.0 \n",
+ "AC=1.5\n",
+ "BD=1.0\n",
+ "AB=4.0\n",
+ "\n",
+ "x=((pow(AC,2)-pow(BD,2))/4)+1\n",
+ "y=sqrt(pow(AC,2)-pow(x,2))\n",
+ "\n",
+ "alpha=acos(x/AC)\n",
+ "beta=acos((CD-x)/BD)\n",
+ "\n",
+ "#Applying Lami’s theorem to the system of forces acting at point C \n",
+ "\n",
+ "T1=PC*sin(pi/2)/sin(pi-alpha)\n",
+ "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n",
+ "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n",
+ "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n",
+ "\n",
+ "\n",
+ "print \"W=\",round(W,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.26 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 44.8 KN\n",
+ "T2= 29.24 KN\n",
+ "theta= 63.42 °\n",
+ "T3= 25.04 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ "PC=30.0 #vertical loadng at point C,KN \n",
+ " \n",
+ "thetaab=30.0 *pi/180.0\n",
+ "thetabc=50.0*pi/180.0\n",
+ "\n",
+ "#applying lami's thereom\n",
+ "\n",
+ "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n",
+ "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n",
+ "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n",
+ "\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at C \n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "#mistake in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.27 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T3= 22.5 KN\n",
+ "T1= 38.97 KN\n",
+ "theta= 54.79 °\n",
+ "T2= 23.85 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ " \n",
+ "PC=25.0 #vertical loadng at point C,KN \n",
+ "\n",
+ "thetaab=30.0*pi/180.0\n",
+ "thetadc=60.0*pi/180.0\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at joints B and C \n",
+ "#T1*sin(thetaab)=T3*sin(thetadc)\n",
+ "\n",
+ "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "\n",
+ "T1=T3*sin(thetadc)/sin(thetaab)\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.28 page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 600.0 N\n",
+ "alpha= 1.249 °\n",
+ "RD= 632.456 N\n",
+ "RC= 200.0 N\n",
+ "RA= 200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "W=600.0 #weight of cyclinder,N\n",
+ "r=150.0 #radius of cylinder,mm\n",
+ "a=600.0 #mm\n",
+ "b=300.0 #mm\n",
+ "\n",
+ "#Free body diagram of sphere and frame\n",
+ "\n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "RB=600.0 \n",
+ "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "alpha=atan((a-r)/r)\n",
+ "print\"alpha=\",round(alpha,4),\"°\"\n",
+ "\n",
+ "RD=W/sin(alpha)\n",
+ "print\"RD=\",round(RD,3),\"N\"\n",
+ "\n",
+ "RC=RD*cos(alpha)\n",
+ "RA=RC\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "print\"RA=\",round(RA),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.29 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 166.67 N\n",
+ "RA= 133.33 N\n",
+ "RC= 200.0 N\n",
+ "RD= 133.33 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,asin\n",
+ "\n",
+ "\n",
+ "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "W=100.0 #weight of spheres,N\n",
+ "\n",
+ "r=100.0 #radius of spheres,mm\n",
+ "\n",
+ "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n",
+ "\n",
+ "O1A=100.0\n",
+ "O2D=100.0\n",
+ "O1B=100.0\n",
+ "BO2=100.0\n",
+ "\n",
+ "O2P=360.0-O1A-O2D\n",
+ "O1O2=O1B+BO2\n",
+ "\n",
+ "alpha=acos(O2P/O1O2)\n",
+ "\n",
+ "###sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "RB=W/sin(alpha)\n",
+ "RA=RB*cos(alpha)\n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "print\"RA=\",round(RA,2),\"N\"\n",
+ "\n",
+ "RC=100+RB*sin(alpha)\n",
+ "\n",
+ "RD=RB*cos(alpha)\n",
+ "\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "\n",
+ "print\"RD=\",round(RD,2),\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.30 page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1071.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "WA=4000.0 #weight of cylinder A,N\n",
+ "WB=2000.0 #weight of cylinder B,N\n",
+ "\n",
+ "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n",
+ "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n",
+ "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n",
+ "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n",
+ "\n",
+ "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n",
+ "\n",
+ "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n",
+ "\n",
+ "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n",
+ "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n",
+ "print\"P=\",round(P,1),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.31 page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 10.0382 KN\n",
+ "RA= 188.56 KN\n",
+ "alpha 32.17 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n",
+ "\n",
+ "#variable declaration\n",
+ "PB=2.5 #vertical Loading at B,KN\n",
+ "WAB=1.0 #vertical loading at G,KN\n",
+ "\n",
+ "theta=15.0*pi/180\n",
+ "AG=6.0 #Length of boom AB is 12m\n",
+ "GB=6.0\n",
+ "thetaAB=30.0*pi/180.0\n",
+ "thetaABC=15.0*pi/180.0\n",
+ "#sum of moment at A\n",
+ "\n",
+ "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "HA=T*cos(thetaABC)\n",
+ "VA=WAB+PB+T*sin(thetaABC)\n",
+ "\n",
+ "RA=sqrt(pow(RA,2)+pow(RA,2))\n",
+ "print \"RA=\",round(RA,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(VA/HA)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.32 page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 51.9615 KN\n",
+ "R1= 23.6603 KN\n",
+ "R2= 6.3397 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n",
+ "\n",
+ "W=60.0 #gross weight of car,KN\n",
+ "theta=60.0*pi/180.0\n",
+ " \n",
+ " \n",
+ "T=W*sin(theta)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#Taking moment equilibrium condition about upper axle point on track, we get\n",
+ "\n",
+ "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n",
+ "print\"R1=\",round(R1,4),\"KN\"\n",
+ "\n",
+ "#Sum of forces normal to the plane = 0, gives \n",
+ "R2=W*cos(theta)-R1\n",
+ "print\"R2=\",round(R2,4),\"KN\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.33 page numnber 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 0.75 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,acos,pi\n",
+ "\n",
+ "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n",
+ "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n",
+ "\n",
+ "#variable declaration\n",
+ "R=800.0\n",
+ "W1=1.0\n",
+ "r1=400.0\n",
+ "W2=3.0\n",
+ "r2=600.0\n",
+ "O1O2=1000 #mm\n",
+ "O2D=600 #mm\n",
+ "\n",
+ "#If alpha is the inclination of O2O1 to horizontal\n",
+ "alpha=acos(O2D/O1O2)\n",
+ "\n",
+ "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n",
+ "#Sum of Moment at O2\n",
+ "\n",
+ "R1=W1*O2D/(O1O2*sin(alpha))\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R2=R1\n",
+ "R3=W1+W2\n",
+ "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n",
+ "\n",
+ "#Sum of Moment at A\n",
+ "\n",
+ "W=R1*O1O2*sin(alpha)/R\n",
+ "\n",
+ "print\"W=\",round(W,2),\"KN\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_mHtlO6a.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_mHtlO6a.ipynb
new file mode 100644
index 00000000..a94760d2
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_mHtlO6a.ipynb
@@ -0,0 +1,1857 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter2-FUNDAMENTALS OF STATICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.1 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Moment is = -9607.41 Nmm clockwise\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=100.0\n",
+ "hd=400.0\n",
+ "vd=500.0\n",
+ "o=60.0\n",
+ "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.2 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.3 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.4 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force = 161.52 N\n",
+ "\n",
+ " \n",
+ " Resultant angle = 0.33 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#R resultant force\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "#f1 force\n",
+ "#f2 force\n",
+ "#f3 force\n",
+ "#o1 angle with the line \n",
+ "#o2 angle with the line \n",
+ "#o3 angle with the line \n",
+ "#O angle of resultant force with line\n",
+ "f1=70.0\n",
+ "f2=80.0\n",
+ "f3=50.0 \n",
+ "o1=50.0\n",
+ "o2=25.0\n",
+ "o3=-45.0\n",
+ "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n",
+ "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n",
+ "R=math.sqrt(Rx**2+Ry**2)\n",
+ "O=math.atan(Ry/Rx)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.5 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force along the incline plane = 234.24 N\n",
+ "\n",
+ " \n",
+ " Resultant Force vertical to the incline plane = -0.46 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#O angle of inclined plane\n",
+ "#N normal reaction\n",
+ "#W weight\n",
+ "#F,T forces\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "o = 60.0 \n",
+ "W = 1000.0\n",
+ "N = 500.0\n",
+ "F = 100.0\n",
+ "T = 1200.0\n",
+ "Rx = T-F-(W*math.sin(o/180*3.14))\n",
+ "Ry = N-(W*math.cos(o/180*3.14))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.6 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force 467.201871561 N\n",
+ "At an angle 61.0805191269\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=1000.0 #Resultant force\n",
+ "F1=500.0 #Force \n",
+ "F2=1000.0 #force\n",
+ "o=45.0*3.14/180.0 #angle resultant makes with x axis \n",
+ "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n",
+ "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n",
+ "#F3coso3=Rcoso-F1coso1-F2sino2\n",
+ "#F3sino=Rsino-F1sino1-F2coso2\n",
+ "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n",
+ "print \"Force\",F3,\"N\"\n",
+ "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n",
+ "print \"At an angle\",o3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.7 Page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 6.32 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,pi,asin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=300.0\n",
+ "P2=500.0\n",
+ "thetaI=30.0*pi/180.0\n",
+ "thetaP2=30.0*pi/180\n",
+ "thetaP1=40.0*pi/180\n",
+ "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "F=(P2*sin(thetaP2))/(P1)\n",
+ "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.8 page number 30\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 68.0592 KN\n",
+ "alpha= 81.55 °\n",
+ "x= 3.326 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=20.0\n",
+ "P2=30.0\n",
+ "P3=20.0\n",
+ "theta3=60.0*pi/180.0\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=20.0*cos(theta3)\n",
+ "Fy=P1+P2+P3*sin(theta3)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,4),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n",
+ "\n",
+ "#The distance of the resultant from point O is given by:\n",
+ "\n",
+ "d=MA/R\n",
+ "x=d/sin(alpha*pi/180)\n",
+ "print\"x=\",round(x,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.9 page number 31\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 91.19 KN\n",
+ "alpha= 35.84 °\n",
+ "x= 317.023 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=100.0 #inclined up loading at 60° at A, N\n",
+ "PB1=80.0 #Vertical down loading at B,N\n",
+ "PB2=80.0 #Horizontal right loading at at B,N \n",
+ "PC=120.0 #inclined down loading at 30° at C,N\n",
+ "\n",
+ "thetaA=60.0*pi/180.0\n",
+ "thetaB=30.0*pi/180.0\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n",
+ "Rx=-Fx\n",
+ "\n",
+ "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n",
+ "Ry=Fy\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n",
+ "\n",
+ "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.10 page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 565.69 N\n",
+ "theta= 45.0 °\n",
+ "x= 2.5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=800.0 #Vertical down loading at A,N\n",
+ "PC=400.0 #vertical up loading at B,N\n",
+ "HD=600.0 #Horizontal left loading at A,N\n",
+ "HB=200.0 #Horizontal right loading at B,N\n",
+ "a=1.0 #length of side,m\n",
+ " \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=HB-HD\n",
+ "Fy=PC-PA\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=PC*a+HD*a\n",
+ "\n",
+ "#Let x be the distance from A along x axis, where resultant cuts AB.\n",
+ "\n",
+ "x=MA/Fy\n",
+ "\n",
+ "print\"x=\",round((-x),1),\"m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.11 page number 32\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 10.0 KN\n",
+ "theta= 0.0 ° i.e. , the resultant is in the direction x.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=2.0 #loading at B,KN\n",
+ "PC=sqrt(3.0) #loading at C,KN\n",
+ "PD=5.0 #loading at D,KN\n",
+ "PE=PC #loading at E,KN\n",
+ "PF=PB #loading at F,KN\n",
+ "\n",
+ "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n",
+ "\n",
+ "angleoab=60.0*pi/180\n",
+ "anglecab=angleoab/2.0\n",
+ "theta1=anglecab\n",
+ "theta2=(angleoab-theta1)\n",
+ "theta3=theta1\n",
+ "theta4=theta1\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n",
+ "\n",
+ "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.12 page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 4.66 N\n",
+ "alpha= 28.99 °\n",
+ "d= 42.73 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=2.0 #loading at 1,KN\n",
+ "P2=1.5 #loading at 2,KN\n",
+ "P3=5.0 #loading at 3,KN\n",
+ "a=10.0 #side length,mm\n",
+ "\n",
+ "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n",
+ "\n",
+ "\n",
+ "theta1=atan(a/a)\n",
+ "theta2=atan((3*a)/(4*a))\n",
+ "theta3=atan((a)/(2*a))\n",
+ "\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n",
+ "\n",
+ "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Distance d of the resultant from O is given by\n",
+ "#Rd=sum of moment at A\n",
+ "\n",
+ "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n",
+ "print\"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.13 page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 150.0 KN\n",
+ "MA= 270.0 KN-m\n",
+ "x= 1.8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #loading at B,KN\n",
+ "PC=30.0 #loading at C,KN\n",
+ "PD=40.0 #loading at D,KN\n",
+ "PA=60.0 #loading at E,KN\n",
+ "AB=1.0\n",
+ "BC=2.0\n",
+ "CD=1.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA+PB+PC+PD\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x,1),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.14 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 100.0 KN in y-direction\n",
+ "MA= 300.0 KN-m\n",
+ "x= 3.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #up loading at B,KN\n",
+ "PC=40.0 #down loading at C,KN\n",
+ "PD=50.0 #up loading at D,KN\n",
+ "PA=80.0 #down loading at A,KN\n",
+ "PE=60.0 #down loading at E,KN\n",
+ "AB=2.0\n",
+ "BC=2.0\n",
+ "CD=4.0\n",
+ "DE=2.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA-PB+PC-PD+PE\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n",
+ "\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.15 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 2671.19 KN in y-direction\n",
+ "alpha 80.3 °\n",
+ "x= 141.195 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=500.0 #Loading at inclined to 60.0°,N\n",
+ "P2=1000.0 #vertical loading at 150 distance from O,N\n",
+ "P3=1200.0 #vertical loading at 150 distance from O,N\n",
+ "H=700.0 #Horizontal loading at 300 ditance from O,N\n",
+ "a=150.0\n",
+ "theta=60.0*pi/180\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=P1*cos(theta)-H\n",
+ "Ry=-P3-P2-P1*sin(theta)\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "alpha=atan(Ry/Rx)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\"\n",
+ " \n",
+ "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n",
+ "\n",
+ "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.16 page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ry= 1420.0 KN downward\n",
+ "x= 4.127 m\n",
+ "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n",
+ "P2=120.0 #vertical up loading at 4m distance from O,KN\n",
+ "P3=420.0 #vertical downloading at 5m distance from O,KN\n",
+ "H=500.0 #Horizontal loading at 4m ditance from O,KN\n",
+ "ah=4.0\n",
+ "a1=2.0\n",
+ "a2=4.0\n",
+ "a3=5.0\n",
+ "a=7.0\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=H\n",
+ "Ry=P1-P2+P3\n",
+ "\n",
+ "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n",
+ " \n",
+ "#Let x be the distance from O where the resultant cuts the base.\n",
+ "#moment at O\n",
+ "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n",
+ "\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.17 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 42.426 KN\n",
+ "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n",
+ "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n",
+ "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n",
+ "P4=5.0 #Inclined at 45° down Loading A,KN\n",
+ "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n",
+ "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n",
+ "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n",
+ "P5=5.0 #Inclined at 45° UP Loading A,KN\n",
+ "a=1.0\n",
+ "\n",
+ "theta=45.0*pi/180.0\n",
+ "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n",
+ "\n",
+ "#assume Resulat R at distance d from A,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n",
+ "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n",
+ "\n",
+ "print \"R=\",round(Rx,3),\"KN\"\n",
+ "#and its direction is horizontal \n",
+ "#Let R be at a distance d from the ridge A\n",
+ "#moment at A\n",
+ "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n",
+ "\n",
+ "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.18 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 116.52 KN\n",
+ "alpha= 76.82 °\n",
+ "x= 1.48 m\n",
+ "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n",
+ "\n",
+ "PA=20.0 #inclined at 45° loading at A,KN\n",
+ "PB=30.0 #inclined at 60° loading at B,KN\n",
+ "\n",
+ "PC1=40.0 #inclined at 30° loading at C,KN\n",
+ "PC2=40.0 #inclined at 20° loading at C,KN\n",
+ "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n",
+ "PE=20.0 #inclined at alpha at distance xm form A,KN\n",
+ "P=20.0 #vertical loading at distance 4m,KN\n",
+ "\n",
+ "\n",
+ "\n",
+ "thetaA=45.0*pi/180.0\n",
+ "thetaB=60.0*pi/180.0\n",
+ "thetaC1=30.0*pi/180.0\n",
+ "thetaC2=20.0*pi/180.0\n",
+ "thetaD=30.0*pi/180.0\n",
+ "AD=2.0\n",
+ "AC=3.0\n",
+ "AB=6.0\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n",
+ "\n",
+ "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#Let the resultant intersect AB at a distance x from A. Then, \n",
+ "\n",
+ "\n",
+ "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n",
+ "\n",
+ "print\"x=\",round(X,2),\"m\"\n",
+ "\n",
+ "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.19 page number 42\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 103.53 N\n",
+ "R= 26.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n",
+ "\n",
+ "#variable declaration\n",
+ "W=100.0 #weight of sphere,N\n",
+ "theta=15.0*pi/180 #angle of inclination of string with wall\n",
+ "\n",
+ "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n",
+ "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n",
+ "print\"T=\",round(T,2),\"N\"\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n",
+ "\n",
+ "#Notes: \n",
+ "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n",
+ "#2. The wall reaction is a push, but cannot be a pull on the body. \n",
+ "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.20 page number 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 1732.05 N\n",
+ "P= 866.03 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n",
+ "\n",
+ "#variable declaration\n",
+ "W=1500.0 #weight of block,N\n",
+ "theta=30.0*pi/180 #angle of inclination \n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(theta)\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "P=R*sin(theta)\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.21 page number 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "S= -0.058 N\n",
+ "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n",
+ "R= 14.979 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=10.0 #weight of Roller,KN\n",
+ "IL=7.0 #inclined loading at angle of 45°,KN\n",
+ "H=5.0 #Horizontal loading ,KN\n",
+ "\n",
+ "theta=45.0*pi/180 #angle of loading of IL\n",
+ "thetaS=30.0*pi/180.0 \n",
+ "\n",
+ "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "S=(-H+IL*cos(theta))/cos(thetaS)\n",
+ "print\"S=\",round(S,3),\"N\"\n",
+ "\n",
+ "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n",
+ " \n",
+ "R=W+IL*sin(theta)-S*sin(thetaS)\n",
+ "print\"R=\",round(R,3),\"kN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.22 page number 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 1.125 m\n",
+ "T= 125.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi,asin\n",
+ "\n",
+ "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "#variable declaration\n",
+ "L=200.0 #suspended load at C,N\n",
+ "AB=3.0\n",
+ "BI=1.0\n",
+ "ACB=5.0 #Length of cord,m\n",
+ "DE=3.0\n",
+ "BE=4.0\n",
+ "theta=asin(4.0/5.0)\n",
+ "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n",
+ "\n",
+ "HI=BI*DE/BE\n",
+ "AH=DE-HI\n",
+ "x=AH/2\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "T=L/(2*sin(theta))\n",
+ "print\"T=\",round(T),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.23 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1154.7 N\n",
+ "P= 1732.05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin ,acos, pi\n",
+ "\n",
+ "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=2000.0 #weight of roller,N\n",
+ "r=300.0 #radius of roller,mm\n",
+ "h=150.0 # height of curb,mm\n",
+ "OC=r-h\n",
+ "AO=r\n",
+ "\n",
+ "alpha=acos(OC/AO)\n",
+ "\n",
+ "#angleOAB=angleOBA,Since OA=OB,\n",
+ "angleOBA=(alpha)/2\n",
+ "\n",
+ "#the reaction makes 30° with the vertical\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(angleOBA)\n",
+ "P=R*sin(angleOBA)\n",
+ "\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n",
+ "#From triangle of forces ABC, we get \n",
+ "P=W*sin(alpha)\n",
+ "print \"P=\",round(P,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.24 page number 47 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 224.14 N\n",
+ "T2= 183.01 N\n",
+ "T3= 336.6 N\n",
+ "T4= 326.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "PB=200.0 #Vertical loading at B,N\n",
+ "PD=250.0 #Vertical loading at D,N\n",
+ "thetabc=30.0*pi/180.0\n",
+ "thetabd=60.0*pi/180.0\n",
+ "thetaed=45.0*pi/180.0\n",
+ "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n",
+ "\n",
+ "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n",
+ "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"N\"\n",
+ "print \"T2=\",round(T2,2),\"N\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n",
+ "print \"T3=\",round(T3,2),\"N\"\n",
+ "\n",
+ "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n",
+ "print \"T4=\",round(T4,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.25 page number 47\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 2863.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PC=1500.0 #Vertical loading at C,N\n",
+ "CD=2.0 \n",
+ "AC=1.5\n",
+ "BD=1.0\n",
+ "AB=4.0\n",
+ "\n",
+ "x=((pow(AC,2)-pow(BD,2))/4)+1\n",
+ "y=sqrt(pow(AC,2)-pow(x,2))\n",
+ "\n",
+ "alpha=acos(x/AC)\n",
+ "beta=acos((CD-x)/BD)\n",
+ "\n",
+ "#Applying Lami’s theorem to the system of forces acting at point C \n",
+ "\n",
+ "T1=PC*sin(pi/2)/sin(pi-alpha)\n",
+ "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n",
+ "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n",
+ "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n",
+ "\n",
+ "\n",
+ "print \"W=\",round(W,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.26 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 44.8 KN\n",
+ "T2= 29.24 KN\n",
+ "theta= 63.42 °\n",
+ "T3= 25.04 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ "PC=30.0 #vertical loadng at point C,KN \n",
+ " \n",
+ "thetaab=30.0 *pi/180.0\n",
+ "thetabc=50.0*pi/180.0\n",
+ "\n",
+ "#applying lami's thereom\n",
+ "\n",
+ "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n",
+ "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n",
+ "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n",
+ "\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at C \n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "#mistake in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.27 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T3= 22.5 KN\n",
+ "T1= 38.97 KN\n",
+ "theta= 54.79 °\n",
+ "T2= 23.85 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ " \n",
+ "PC=25.0 #vertical loadng at point C,KN \n",
+ "\n",
+ "thetaab=30.0*pi/180.0\n",
+ "thetadc=60.0*pi/180.0\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at joints B and C \n",
+ "#T1*sin(thetaab)=T3*sin(thetadc)\n",
+ "\n",
+ "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "\n",
+ "T1=T3*sin(thetadc)/sin(thetaab)\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.28 page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 600.0 N\n",
+ "alpha= 1.249 °\n",
+ "RD= 632.456 N\n",
+ "RC= 200.0 N\n",
+ "RA= 200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "W=600.0 #weight of cyclinder,N\n",
+ "r=150.0 #radius of cylinder,mm\n",
+ "a=600.0 #mm\n",
+ "b=300.0 #mm\n",
+ "\n",
+ "#Free body diagram of sphere and frame\n",
+ "\n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "RB=600.0 \n",
+ "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "alpha=atan((a-r)/r)\n",
+ "print\"alpha=\",round(alpha,4),\"°\"\n",
+ "\n",
+ "RD=W/sin(alpha)\n",
+ "print\"RD=\",round(RD,3),\"N\"\n",
+ "\n",
+ "RC=RD*cos(alpha)\n",
+ "RA=RC\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "print\"RA=\",round(RA),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.29 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 166.67 N\n",
+ "RA= 133.33 N\n",
+ "RC= 200.0 N\n",
+ "RD= 133.33 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,asin\n",
+ "\n",
+ "\n",
+ "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "W=100.0 #weight of spheres,N\n",
+ "\n",
+ "r=100.0 #radius of spheres,mm\n",
+ "\n",
+ "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n",
+ "\n",
+ "O1A=100.0\n",
+ "O2D=100.0\n",
+ "O1B=100.0\n",
+ "BO2=100.0\n",
+ "\n",
+ "O2P=360.0-O1A-O2D\n",
+ "O1O2=O1B+BO2\n",
+ "\n",
+ "alpha=acos(O2P/O1O2)\n",
+ "\n",
+ "###sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "RB=W/sin(alpha)\n",
+ "RA=RB*cos(alpha)\n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "print\"RA=\",round(RA,2),\"N\"\n",
+ "\n",
+ "RC=100+RB*sin(alpha)\n",
+ "\n",
+ "RD=RB*cos(alpha)\n",
+ "\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "\n",
+ "print\"RD=\",round(RD,2),\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.30 page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1071.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "WA=4000.0 #weight of cylinder A,N\n",
+ "WB=2000.0 #weight of cylinder B,N\n",
+ "\n",
+ "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n",
+ "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n",
+ "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n",
+ "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n",
+ "\n",
+ "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n",
+ "\n",
+ "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n",
+ "\n",
+ "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n",
+ "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n",
+ "print\"P=\",round(P,1),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.31 page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 10.0382 KN\n",
+ "RA= 188.56 KN\n",
+ "alpha 32.17 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n",
+ "\n",
+ "#variable declaration\n",
+ "PB=2.5 #vertical Loading at B,KN\n",
+ "WAB=1.0 #vertical loading at G,KN\n",
+ "\n",
+ "theta=15.0*pi/180\n",
+ "AG=6.0 #Length of boom AB is 12m\n",
+ "GB=6.0\n",
+ "thetaAB=30.0*pi/180.0\n",
+ "thetaABC=15.0*pi/180.0\n",
+ "#sum of moment at A\n",
+ "\n",
+ "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "HA=T*cos(thetaABC)\n",
+ "VA=WAB+PB+T*sin(thetaABC)\n",
+ "\n",
+ "RA=sqrt(pow(RA,2)+pow(RA,2))\n",
+ "print \"RA=\",round(RA,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(VA/HA)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.32 page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 51.9615 KN\n",
+ "R1= 23.6603 KN\n",
+ "R2= 6.3397 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n",
+ "\n",
+ "W=60.0 #gross weight of car,KN\n",
+ "theta=60.0*pi/180.0\n",
+ " \n",
+ " \n",
+ "T=W*sin(theta)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#Taking moment equilibrium condition about upper axle point on track, we get\n",
+ "\n",
+ "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n",
+ "print\"R1=\",round(R1,4),\"KN\"\n",
+ "\n",
+ "#Sum of forces normal to the plane = 0, gives \n",
+ "R2=W*cos(theta)-R1\n",
+ "print\"R2=\",round(R2,4),\"KN\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.33 page numnber 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 0.75 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,acos,pi\n",
+ "\n",
+ "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n",
+ "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n",
+ "\n",
+ "#variable declaration\n",
+ "R=800.0\n",
+ "W1=1.0\n",
+ "r1=400.0\n",
+ "W2=3.0\n",
+ "r2=600.0\n",
+ "O1O2=1000 #mm\n",
+ "O2D=600 #mm\n",
+ "\n",
+ "#If alpha is the inclination of O2O1 to horizontal\n",
+ "alpha=acos(O2D/O1O2)\n",
+ "\n",
+ "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n",
+ "#Sum of Moment at O2\n",
+ "\n",
+ "R1=W1*O2D/(O1O2*sin(alpha))\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R2=R1\n",
+ "R3=W1+W2\n",
+ "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n",
+ "\n",
+ "#Sum of Moment at A\n",
+ "\n",
+ "W=R1*O1O2*sin(alpha)/R\n",
+ "\n",
+ "print\"W=\",round(W,2),\"KN\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xHYwxJ4.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xHYwxJ4.ipynb
new file mode 100644
index 00000000..a94760d2
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xHYwxJ4.ipynb
@@ -0,0 +1,1857 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter2-FUNDAMENTALS OF STATICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.1 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Moment is = -9607.41 Nmm clockwise\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=100.0\n",
+ "hd=400.0\n",
+ "vd=500.0\n",
+ "o=60.0\n",
+ "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.2 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.3 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Distance = 2.00 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#F force \n",
+ "#hd horizontal distance \n",
+ "#vd vertical distance\n",
+ "#O angle\n",
+ "#M moment of force\n",
+ "#Taking clockwise moment as positive\n",
+ "#calculations\n",
+ "F=5000.0\n",
+ "o=37\n",
+ "M=8000.0\n",
+ "hd=M/(F*math.cos(o*3.14/180))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 2.4 Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force = 161.52 N\n",
+ "\n",
+ " \n",
+ " Resultant angle = 0.33 radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#R resultant force\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "#f1 force\n",
+ "#f2 force\n",
+ "#f3 force\n",
+ "#o1 angle with the line \n",
+ "#o2 angle with the line \n",
+ "#o3 angle with the line \n",
+ "#O angle of resultant force with line\n",
+ "f1=70.0\n",
+ "f2=80.0\n",
+ "f3=50.0 \n",
+ "o1=50.0\n",
+ "o2=25.0\n",
+ "o3=-45.0\n",
+ "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n",
+ "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n",
+ "R=math.sqrt(Rx**2+Ry**2)\n",
+ "O=math.atan(Ry/Rx)\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.5 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " \n",
+ " Resultant Force along the incline plane = 234.24 N\n",
+ "\n",
+ " \n",
+ " Resultant Force vertical to the incline plane = -0.46 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#O angle of inclined plane\n",
+ "#N normal reaction\n",
+ "#W weight\n",
+ "#F,T forces\n",
+ "#Rx resultant horizontal component\n",
+ "#Ry resultant vertical component\n",
+ "o = 60.0 \n",
+ "W = 1000.0\n",
+ "N = 500.0\n",
+ "F = 100.0\n",
+ "T = 1200.0\n",
+ "Rx = T-F-(W*math.sin(o/180*3.14))\n",
+ "Ry = N-(W*math.cos(o/180*3.14))\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n",
+ "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.6 Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force 467.201871561 N\n",
+ "At an angle 61.0805191269\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=1000.0 #Resultant force\n",
+ "F1=500.0 #Force \n",
+ "F2=1000.0 #force\n",
+ "o=45.0*3.14/180.0 #angle resultant makes with x axis \n",
+ "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n",
+ "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n",
+ "#F3coso3=Rcoso-F1coso1-F2sino2\n",
+ "#F3sino=Rsino-F1sino1-F2coso2\n",
+ "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n",
+ "print \"Force\",F3,\"N\"\n",
+ "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n",
+ "print \"At an angle\",o3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 2.7 Page number 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 6.32 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,pi,asin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=300.0\n",
+ "P2=500.0\n",
+ "thetaI=30.0*pi/180.0\n",
+ "thetaP2=30.0*pi/180\n",
+ "thetaP1=40.0*pi/180\n",
+ "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "F=(P2*sin(thetaP2))/(P1)\n",
+ "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n",
+ "\n",
+ "print\"theta=\",round(theta,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.8 page number 30\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 68.0592 KN\n",
+ "alpha= 81.55 °\n",
+ "x= 3.326 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=20.0\n",
+ "P2=30.0\n",
+ "P3=20.0\n",
+ "theta3=60.0*pi/180.0\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=20.0*cos(theta3)\n",
+ "Fy=P1+P2+P3*sin(theta3)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,4),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n",
+ "\n",
+ "#The distance of the resultant from point O is given by:\n",
+ "\n",
+ "d=MA/R\n",
+ "x=d/sin(alpha*pi/180)\n",
+ "print\"x=\",round(x,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.9 page number 31\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 91.19 KN\n",
+ "alpha= 35.84 °\n",
+ "x= 317.023 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,atan,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=100.0 #inclined up loading at 60° at A, N\n",
+ "PB1=80.0 #Vertical down loading at B,N\n",
+ "PB2=80.0 #Horizontal right loading at at B,N \n",
+ "PC=120.0 #inclined down loading at 30° at C,N\n",
+ "\n",
+ "thetaA=60.0*pi/180.0\n",
+ "thetaB=30.0*pi/180.0\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n",
+ "Rx=-Fx\n",
+ "\n",
+ "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n",
+ "Ry=Fy\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n",
+ "\n",
+ "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.10 page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 565.69 N\n",
+ "theta= 45.0 °\n",
+ "x= 2.5 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=800.0 #Vertical down loading at A,N\n",
+ "PC=400.0 #vertical up loading at B,N\n",
+ "HD=600.0 #Horizontal left loading at A,N\n",
+ "HB=200.0 #Horizontal right loading at B,N\n",
+ "a=1.0 #length of side,m\n",
+ " \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=HB-HD\n",
+ "Fy=PC-PA\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at A\n",
+ "\n",
+ "MA=PC*a+HD*a\n",
+ "\n",
+ "#Let x be the distance from A along x axis, where resultant cuts AB.\n",
+ "\n",
+ "x=MA/Fy\n",
+ "\n",
+ "print\"x=\",round((-x),1),\"m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.11 page number 32\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 10.0 KN\n",
+ "theta= 0.0 ° i.e. , the resultant is in the direction x.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=2.0 #loading at B,KN\n",
+ "PC=sqrt(3.0) #loading at C,KN\n",
+ "PD=5.0 #loading at D,KN\n",
+ "PE=PC #loading at E,KN\n",
+ "PF=PB #loading at F,KN\n",
+ "\n",
+ "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n",
+ "\n",
+ "angleoab=60.0*pi/180\n",
+ "anglecab=angleoab/2.0\n",
+ "theta1=anglecab\n",
+ "theta2=(angleoab-theta1)\n",
+ "theta3=theta1\n",
+ "theta4=theta1\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n",
+ "\n",
+ "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "theta=atan(Fy/Fx)*180/pi\n",
+ "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.12 page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 4.66 N\n",
+ "alpha= 28.99 °\n",
+ "d= 42.73 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P1=2.0 #loading at 1,KN\n",
+ "P2=1.5 #loading at 2,KN\n",
+ "P3=5.0 #loading at 3,KN\n",
+ "a=10.0 #side length,mm\n",
+ "\n",
+ "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n",
+ "\n",
+ "\n",
+ "theta1=atan(a/a)\n",
+ "theta2=atan((3*a)/(4*a))\n",
+ "theta3=atan((a)/(2*a))\n",
+ "\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n",
+ "\n",
+ "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round((-alpha),2),\"°\"\n",
+ "\n",
+ "#Distance d of the resultant from O is given by\n",
+ "#Rd=sum of moment at A\n",
+ "\n",
+ "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n",
+ "print\"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.13 page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 150.0 KN\n",
+ "MA= 270.0 KN-m\n",
+ "x= 1.8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #loading at B,KN\n",
+ "PC=30.0 #loading at C,KN\n",
+ "PD=40.0 #loading at D,KN\n",
+ "PA=60.0 #loading at E,KN\n",
+ "AB=1.0\n",
+ "BC=2.0\n",
+ "CD=1.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA+PB+PC+PD\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x,1),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.14 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 100.0 KN in y-direction\n",
+ "MA= 300.0 KN-m\n",
+ "x= 3.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #up loading at B,KN\n",
+ "PC=40.0 #down loading at C,KN\n",
+ "PD=50.0 #up loading at D,KN\n",
+ "PA=80.0 #down loading at A,KN\n",
+ "PE=60.0 #down loading at E,KN\n",
+ "AB=2.0\n",
+ "BC=2.0\n",
+ "CD=4.0\n",
+ "DE=2.0\n",
+ "#length are in m\n",
+ "\n",
+ "# Let x and y axes be selected\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=0\n",
+ "Ry=PA-PB+PC-PD+PE\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "\n",
+ "#Taking clockwise moment as positive, \n",
+ "#sum of moment at A\n",
+ "\n",
+ "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n",
+ "\n",
+ "print\"MA=\",round(MA,2),\"KN-m\"\n",
+ "\n",
+ "# The distance of resultant from A is,\n",
+ "\n",
+ "x=MA/R\n",
+ "print \"x=\",round(x),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.15 page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 2671.19 KN in y-direction\n",
+ "alpha 80.3 °\n",
+ "x= 141.195 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=500.0 #Loading at inclined to 60.0°,N\n",
+ "P2=1000.0 #vertical loading at 150 distance from O,N\n",
+ "P3=1200.0 #vertical loading at 150 distance from O,N\n",
+ "H=700.0 #Horizontal loading at 300 ditance from O,N\n",
+ "a=150.0\n",
+ "theta=60.0*pi/180\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=P1*cos(theta)-H\n",
+ "Ry=-P3-P2-P1*sin(theta)\n",
+ "\n",
+ "R=sqrt(pow(Rx,2)+pow(Ry,2))\n",
+ "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n",
+ "\n",
+ "alpha=atan(Ry/Rx)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\"\n",
+ " \n",
+ "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n",
+ "\n",
+ "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n",
+ "print\"x=\",round(x,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.16 page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ry= 1420.0 KN downward\n",
+ "x= 4.127 m\n",
+ "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n",
+ "P2=120.0 #vertical up loading at 4m distance from O,KN\n",
+ "P3=420.0 #vertical downloading at 5m distance from O,KN\n",
+ "H=500.0 #Horizontal loading at 4m ditance from O,KN\n",
+ "ah=4.0\n",
+ "a1=2.0\n",
+ "a2=4.0\n",
+ "a3=5.0\n",
+ "a=7.0\n",
+ "#assume Resulat R at distance x from O,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=H\n",
+ "Ry=P1-P2+P3\n",
+ "\n",
+ "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n",
+ " \n",
+ "#Let x be the distance from O where the resultant cuts the base.\n",
+ "#moment at O\n",
+ "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n",
+ "\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.17 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 42.426 KN\n",
+ "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n",
+ "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n",
+ "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n",
+ "P4=5.0 #Inclined at 45° down Loading A,KN\n",
+ "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n",
+ "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n",
+ "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n",
+ "P5=5.0 #Inclined at 45° UP Loading A,KN\n",
+ "a=1.0\n",
+ "\n",
+ "theta=45.0*pi/180.0\n",
+ "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n",
+ "\n",
+ "#assume Resulat R at distance d from A,\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n",
+ "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n",
+ "\n",
+ "print \"R=\",round(Rx,3),\"KN\"\n",
+ "#and its direction is horizontal \n",
+ "#Let R be at a distance d from the ridge A\n",
+ "#moment at A\n",
+ "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n",
+ "\n",
+ "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.18 page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 116.52 KN\n",
+ "alpha= 76.82 °\n",
+ "x= 1.48 m\n",
+ "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n",
+ "\n",
+ "PA=20.0 #inclined at 45° loading at A,KN\n",
+ "PB=30.0 #inclined at 60° loading at B,KN\n",
+ "\n",
+ "PC1=40.0 #inclined at 30° loading at C,KN\n",
+ "PC2=40.0 #inclined at 20° loading at C,KN\n",
+ "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n",
+ "PE=20.0 #inclined at alpha at distance xm form A,KN\n",
+ "P=20.0 #vertical loading at distance 4m,KN\n",
+ "\n",
+ "\n",
+ "\n",
+ "thetaA=45.0*pi/180.0\n",
+ "thetaB=60.0*pi/180.0\n",
+ "thetaC1=30.0*pi/180.0\n",
+ "thetaC2=20.0*pi/180.0\n",
+ "thetaD=30.0*pi/180.0\n",
+ "AD=2.0\n",
+ "AC=3.0\n",
+ "AB=6.0\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n",
+ "\n",
+ "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n",
+ "\n",
+ "\n",
+ "R=sqrt(pow(Fx,2)+pow(Fy,2))\n",
+ "print \"R=\",round(R,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(Fy/Fx)*180/pi\n",
+ "print\"alpha=\",round(alpha,2),\"°\"\n",
+ "\n",
+ "#Let the resultant intersect AB at a distance x from A. Then, \n",
+ "\n",
+ "\n",
+ "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n",
+ "\n",
+ "print\"x=\",round(X,2),\"m\"\n",
+ "\n",
+ "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.19 page number 42\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 103.53 N\n",
+ "R= 26.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n",
+ "\n",
+ "#variable declaration\n",
+ "W=100.0 #weight of sphere,N\n",
+ "theta=15.0*pi/180 #angle of inclination of string with wall\n",
+ "\n",
+ "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n",
+ "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n",
+ "print\"T=\",round(T,2),\"N\"\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n",
+ "\n",
+ "#Notes: \n",
+ "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n",
+ "#2. The wall reaction is a push, but cannot be a pull on the body. \n",
+ "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.20 page number 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R= 1732.05 N\n",
+ "P= 866.03 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n",
+ "\n",
+ "#variable declaration\n",
+ "W=1500.0 #weight of block,N\n",
+ "theta=30.0*pi/180 #angle of inclination \n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(theta)\n",
+ "print\"R=\",round(R,2),\"N\"\n",
+ "\n",
+ "P=R*sin(theta)\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example 2.21 page number 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "S= -0.058 N\n",
+ "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n",
+ "R= 14.979 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=10.0 #weight of Roller,KN\n",
+ "IL=7.0 #inclined loading at angle of 45°,KN\n",
+ "H=5.0 #Horizontal loading ,KN\n",
+ "\n",
+ "theta=45.0*pi/180 #angle of loading of IL\n",
+ "thetaS=30.0*pi/180.0 \n",
+ "\n",
+ "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "S=(-H+IL*cos(theta))/cos(thetaS)\n",
+ "print\"S=\",round(S,3),\"N\"\n",
+ "\n",
+ "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n",
+ " \n",
+ "R=W+IL*sin(theta)-S*sin(thetaS)\n",
+ "print\"R=\",round(R,3),\"kN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.22 page number 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x= 1.125 m\n",
+ "T= 125.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi,asin\n",
+ "\n",
+ "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "#variable declaration\n",
+ "L=200.0 #suspended load at C,N\n",
+ "AB=3.0\n",
+ "BI=1.0\n",
+ "ACB=5.0 #Length of cord,m\n",
+ "DE=3.0\n",
+ "BE=4.0\n",
+ "theta=asin(4.0/5.0)\n",
+ "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n",
+ "\n",
+ "HI=BI*DE/BE\n",
+ "AH=DE-HI\n",
+ "x=AH/2\n",
+ "print\"x=\",round(x,3),\"m\"\n",
+ "\n",
+ "T=L/(2*sin(theta))\n",
+ "print\"T=\",round(T),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.23 page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1154.7 N\n",
+ "P= 1732.05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin ,acos, pi\n",
+ "\n",
+ "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n",
+ "\n",
+ "#variable declaration\n",
+ "W=2000.0 #weight of roller,N\n",
+ "r=300.0 #radius of roller,mm\n",
+ "h=150.0 # height of curb,mm\n",
+ "OC=r-h\n",
+ "AO=r\n",
+ "\n",
+ "alpha=acos(OC/AO)\n",
+ "\n",
+ "#angleOAB=angleOBA,Since OA=OB,\n",
+ "angleOBA=(alpha)/2\n",
+ "\n",
+ "#the reaction makes 30° with the vertical\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R=W/cos(angleOBA)\n",
+ "P=R*sin(angleOBA)\n",
+ "\n",
+ "print\"P=\",round(P,2),\"N\"\n",
+ "\n",
+ "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n",
+ "#From triangle of forces ABC, we get \n",
+ "P=W*sin(alpha)\n",
+ "print \"P=\",round(P,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.24 page number 47 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 224.14 N\n",
+ "T2= 183.01 N\n",
+ "T3= 336.6 N\n",
+ "T4= 326.79 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "PB=200.0 #Vertical loading at B,N\n",
+ "PD=250.0 #Vertical loading at D,N\n",
+ "thetabc=30.0*pi/180.0\n",
+ "thetabd=60.0*pi/180.0\n",
+ "thetaed=45.0*pi/180.0\n",
+ "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n",
+ "\n",
+ "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n",
+ "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"N\"\n",
+ "print \"T2=\",round(T2,2),\"N\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n",
+ "print \"T3=\",round(T3,2),\"N\"\n",
+ "\n",
+ "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n",
+ "print \"T4=\",round(T4,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.25 page number 47\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 2863.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,acos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PC=1500.0 #Vertical loading at C,N\n",
+ "CD=2.0 \n",
+ "AC=1.5\n",
+ "BD=1.0\n",
+ "AB=4.0\n",
+ "\n",
+ "x=((pow(AC,2)-pow(BD,2))/4)+1\n",
+ "y=sqrt(pow(AC,2)-pow(x,2))\n",
+ "\n",
+ "alpha=acos(x/AC)\n",
+ "beta=acos((CD-x)/BD)\n",
+ "\n",
+ "#Applying Lami’s theorem to the system of forces acting at point C \n",
+ "\n",
+ "T1=PC*sin(pi/2)/sin(pi-alpha)\n",
+ "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n",
+ "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n",
+ "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n",
+ "\n",
+ "\n",
+ "print \"W=\",round(W,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.26 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1= 44.8 KN\n",
+ "T2= 29.24 KN\n",
+ "theta= 63.42 °\n",
+ "T3= 25.04 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ "PC=30.0 #vertical loadng at point C,KN \n",
+ " \n",
+ "thetaab=30.0 *pi/180.0\n",
+ "thetabc=50.0*pi/180.0\n",
+ "\n",
+ "#applying lami's thereom\n",
+ "\n",
+ "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n",
+ "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n",
+ "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n",
+ "\n",
+ "\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at C \n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "#mistake in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.27 page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T3= 22.5 KN\n",
+ "T1= 38.97 KN\n",
+ "theta= 54.79 °\n",
+ "T2= 23.85 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,atan\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #vertical loadng at point B,KN \n",
+ " \n",
+ "PC=25.0 #vertical loadng at point C,KN \n",
+ "\n",
+ "thetaab=30.0*pi/180.0\n",
+ "thetadc=60.0*pi/180.0\n",
+ "\n",
+ "#Writing equations of equilibrium for the system of forces at joints B and C \n",
+ "#T1*sin(thetaab)=T3*sin(thetadc)\n",
+ "\n",
+ "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n",
+ "print \"T3=\",round(T3,2),\"KN\"\n",
+ "\n",
+ "T1=T3*sin(thetadc)/sin(thetaab)\n",
+ "print \"T1=\",round(T1,2),\"KN\"\n",
+ "\n",
+ "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n",
+ "print\"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n",
+ "print \"T2=\",round(T2,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.28 page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 600.0 N\n",
+ "alpha= 1.249 °\n",
+ "RD= 632.456 N\n",
+ "RC= 200.0 N\n",
+ "RA= 200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,atan,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "W=600.0 #weight of cyclinder,N\n",
+ "r=150.0 #radius of cylinder,mm\n",
+ "a=600.0 #mm\n",
+ "b=300.0 #mm\n",
+ "\n",
+ "#Free body diagram of sphere and frame\n",
+ "\n",
+ "##sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "RB=600.0 \n",
+ "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "alpha=atan((a-r)/r)\n",
+ "print\"alpha=\",round(alpha,4),\"°\"\n",
+ "\n",
+ "RD=W/sin(alpha)\n",
+ "print\"RD=\",round(RD,3),\"N\"\n",
+ "\n",
+ "RC=RD*cos(alpha)\n",
+ "RA=RC\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "print\"RA=\",round(RA),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.29 page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 166.67 N\n",
+ "RA= 133.33 N\n",
+ "RC= 200.0 N\n",
+ "RD= 133.33 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,acos,asin\n",
+ "\n",
+ "\n",
+ "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "W=100.0 #weight of spheres,N\n",
+ "\n",
+ "r=100.0 #radius of spheres,mm\n",
+ "\n",
+ "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n",
+ "\n",
+ "O1A=100.0\n",
+ "O2D=100.0\n",
+ "O1B=100.0\n",
+ "BO2=100.0\n",
+ "\n",
+ "O2P=360.0-O1A-O2D\n",
+ "O1O2=O1B+BO2\n",
+ "\n",
+ "alpha=acos(O2P/O1O2)\n",
+ "\n",
+ "###sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "RB=W/sin(alpha)\n",
+ "RA=RB*cos(alpha)\n",
+ "print\"RB=\",round(RB,2),\"N\"\n",
+ "print\"RA=\",round(RA,2),\"N\"\n",
+ "\n",
+ "RC=100+RB*sin(alpha)\n",
+ "\n",
+ "RD=RB*cos(alpha)\n",
+ "\n",
+ "print\"RC=\",round(RC),\"N\"\n",
+ "\n",
+ "print\"RD=\",round(RD,2),\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# example2.30 page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1071.8 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "WA=4000.0 #weight of cylinder A,N\n",
+ "WB=2000.0 #weight of cylinder B,N\n",
+ "\n",
+ "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n",
+ "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n",
+ "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n",
+ "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n",
+ "\n",
+ "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n",
+ "\n",
+ "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n",
+ "\n",
+ "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n",
+ "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n",
+ "print\"P=\",round(P,1),\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.31 page number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 10.0382 KN\n",
+ "RA= 188.56 KN\n",
+ "alpha 32.17 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sin ,cos,sqrt\n",
+ "\n",
+ "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n",
+ "\n",
+ "#variable declaration\n",
+ "PB=2.5 #vertical Loading at B,KN\n",
+ "WAB=1.0 #vertical loading at G,KN\n",
+ "\n",
+ "theta=15.0*pi/180\n",
+ "AG=6.0 #Length of boom AB is 12m\n",
+ "GB=6.0\n",
+ "thetaAB=30.0*pi/180.0\n",
+ "thetaABC=15.0*pi/180.0\n",
+ "#sum of moment at A\n",
+ "\n",
+ "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "HA=T*cos(thetaABC)\n",
+ "VA=WAB+PB+T*sin(thetaABC)\n",
+ "\n",
+ "RA=sqrt(pow(RA,2)+pow(RA,2))\n",
+ "print \"RA=\",round(RA,2),\"KN\"\n",
+ "\n",
+ "alpha=atan(VA/HA)*180/pi\n",
+ "print\"alpha\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example2.32 page number 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T= 51.9615 KN\n",
+ "R1= 23.6603 KN\n",
+ "R2= 6.3397 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n",
+ "\n",
+ "W=60.0 #gross weight of car,KN\n",
+ "theta=60.0*pi/180.0\n",
+ " \n",
+ " \n",
+ "T=W*sin(theta)\n",
+ "print\"T=\",round(T,4),\"KN\"\n",
+ "\n",
+ "#Taking moment equilibrium condition about upper axle point on track, we get\n",
+ "\n",
+ "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n",
+ "print\"R1=\",round(R1,4),\"KN\"\n",
+ "\n",
+ "#Sum of forces normal to the plane = 0, gives \n",
+ "R2=W*cos(theta)-R1\n",
+ "print\"R2=\",round(R2,4),\"KN\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 2.33 page numnber 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W= 0.75 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,acos,pi\n",
+ "\n",
+ "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n",
+ "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n",
+ "\n",
+ "#variable declaration\n",
+ "R=800.0\n",
+ "W1=1.0\n",
+ "r1=400.0\n",
+ "W2=3.0\n",
+ "r2=600.0\n",
+ "O1O2=1000 #mm\n",
+ "O2D=600 #mm\n",
+ "\n",
+ "#If alpha is the inclination of O2O1 to horizontal\n",
+ "alpha=acos(O2D/O1O2)\n",
+ "\n",
+ "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n",
+ "#Sum of Moment at O2\n",
+ "\n",
+ "R1=W1*O2D/(O1O2*sin(alpha))\n",
+ "#sum of vertical Fy & sum of horizontal forces Fx is zero\n",
+ "#Assume direction of Fx is right\n",
+ "#Assume direction of Fy is up\n",
+ "\n",
+ "R2=R1\n",
+ "R3=W1+W2\n",
+ "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n",
+ "\n",
+ "#Sum of Moment at A\n",
+ "\n",
+ "W=R1*O1O2*sin(alpha)/R\n",
+ "\n",
+ "print\"W=\",round(W,2),\"KN\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_EZKiqPL.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_EZKiqPL.ipynb
new file mode 100644
index 00000000..09420950
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_EZKiqPL.ipynb
@@ -0,0 +1,1030 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter3-TRUSSES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.1 Page number68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 45.0 °\n",
+ "FCB= 56.57 KN\n",
+ "FCD= 40.0 KN\n",
+ "FDB= 40.0 KN\n",
+ "FDE= 40.0 KN\n",
+ "FBE= 113.14 KN\n",
+ "FBA= 120.0 KN\n",
+ "Member , Magnitude of Force in KN , Nature\n",
+ "AB , 120.0 , Tension\n",
+ "BC , 56.57 , Tension\n",
+ "CD , 40.0 , Compresion\n",
+ "DE , 40.0 , Compresion\n",
+ "BE , 113.14 , Compresion\n",
+ "BD , 40.0 , Tension\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#Determine the inclinations of all inclined members\n",
+ "\n",
+ "theta=atan(1)*180/pi\n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n",
+ "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n",
+ " \n",
+ "P=40.0\n",
+ "FCB=P/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\"\n",
+ "\n",
+ "#Now sum H=0 indicates that FCD should act towards C.\n",
+ "\n",
+ "FCD=FCB*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,2),\"KN\"\n",
+ "\n",
+ "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n",
+ "\n",
+ "FDB=40.0\n",
+ "FDE=40.0\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\"\n",
+ "\n",
+ "print \"FDE=\",round(FDE,2),\"KN\"\n",
+ "\n",
+ "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n",
+ "\n",
+ "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n",
+ "\n",
+ "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FBE=\", round(FBE,2),\"KN\"\n",
+ "print \"FBA=\", round(FBA,2),\"KN\"\n",
+ "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n",
+ "\n",
+ "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n",
+ "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n",
+ "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n",
+ "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n",
+ "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n",
+ "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n",
+ "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.2 Page number70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 83.7158 KN (Comp.)\n",
+ "FAE= 41.8579 KN (Tension)\n",
+ "FDC= 89.4893 KN (Comp.)\n",
+ "FDE= 44.7446 KN (Tension)\n",
+ "FBC= 60.6218 KN (Comp.)\n",
+ "FCE= 31.7543 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=40.0\n",
+ "PC=50.0\n",
+ "PE=60.0\n",
+ "\n",
+ "theta=60.0\n",
+ "\n",
+ "RD=(PC*3+PE*2+PB*1)/(4.0)\n",
+ "\n",
+ "RA=PB+PC+PE-RD\n",
+ "\n",
+ "FAB=RA/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n",
+ "\n",
+ "FAE=FAB*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FDC=RD/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FDE=FDC*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "FBC=(FAB+FBE)*(0.5)\n",
+ "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n",
+ "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.3 Page number72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 23.09 KN [Comp.]\n",
+ "FAC= 11.55 KN [Tensile]\n",
+ "FDB= 20.0 KN [Comp.]\n",
+ "FDC= 17.32 KN [Tensile]\n",
+ "FCB= 11.55 KN FCB= 11.55 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #Load at point B,KN\n",
+ "PC=10.0 #Load at point C,KN \n",
+ "thetaA=60.0 #angleBAC\n",
+ "thetaD=30.0 #angleBDC\n",
+ "\n",
+ "AC=3.0 #length,m\n",
+ "CD=3.0 #length,m\n",
+ "\n",
+ "AB=(AC+CD)*cos(thetaA*pi/180)\n",
+ "BD=(AC+CD)*cos(thetaD*pi/180)\n",
+ "#mistake in book\n",
+ "#angleBCA=angleABC=theta\n",
+ "\n",
+ "theta=(180.0-thetaA)/(2.0) \n",
+ "\n",
+ "#Taking moment about A, we get\n",
+ "\n",
+ "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n",
+ "\n",
+ "RA=PC+PB-RD\n",
+ "#Joint A\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FAB=RA/sin(thetaA*pi/180)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n",
+ "FAC=FAB*cos(thetaA*pi/180)\n",
+ "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint D\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FDB=RD/sin(thetaD*pi/180)\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n",
+ "FDC=FDB*cos(thetaD*pi/180)\n",
+ "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint C\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FCB=PC/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\n",
+ "\n",
+ "#CHECK\n",
+ "\n",
+ "FCB=(FDC-FAC)/cos(theta*pi/180)\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.4 Page number74\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FBF= 42.4264 KN (Tension)\n",
+ "FBC= 30.0 KN (Comp.)\n",
+ "FCF= 50.0 KN (Comp.)\n",
+ "FCD= 30.0 KN (Comp.)\n",
+ "FDF= 70.7107 KN (Tensile)\n",
+ "FDF= 70.7107 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #vertical load at point B,KN\n",
+ "PC=50.0 #vertical load at point C,KN \n",
+ "PDv=40.0 #vertical load at point D,KN\n",
+ "PDh=20.0 #Horizontal load at point D,KN\n",
+ "PF=30.0 #vertical load at point F,KN\n",
+ "HA=PDh\n",
+ "\n",
+ "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n",
+ "\n",
+ "VA=PB+PC+PDv+PF-RE\n",
+ "\n",
+ "#joint A\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FAB=VA\n",
+ "FAF=HA\n",
+ "\n",
+ "#joint E\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FED=RE\n",
+ "FEF=0\n",
+ "\n",
+ "#Joint B: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FBF=(VA-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBC=FBF*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint C: \n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "\n",
+ "FCF=PC\n",
+ "\n",
+ "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FCD=FBC\n",
+ "\n",
+ "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint D: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FDF=(RE-PDv)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n",
+ "\n",
+ "#check\n",
+ "\n",
+ "FDF=(FCD+PDh)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.5 Page number75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FED= 25.0 KN (Tension)\n",
+ "FEF= 15.0 KN (Comp.)\n",
+ "FAB= 20.0 KN (Comp.)\n",
+ "FAF= 15.0 KN (Comp.)\n",
+ "FCB= 25.0 KN (Comp.)\n",
+ "FCD= 20.0 KN (Tension)\n",
+ "FBF= 0.0\n",
+ "FBD= 15.0 KN (Tension)\n",
+ "FFD= 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,asin,pi,sin,cos\n",
+ "\n",
+ "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PE=20.0\n",
+ "AF=3.0\n",
+ "FE=3.0\n",
+ "AB=4.0\n",
+ "FD=4.0\n",
+ "BD=3.0\n",
+ "CD=4.0\n",
+ "\n",
+ "BF=sqrt(pow(AF,2)+pow(AB,2))\n",
+ "DE=BF\n",
+ "BC=DE\n",
+ "\n",
+ "#sin(theta)=AB/BF\n",
+ "#cos(theta)=AF/BF\n",
+ "\n",
+ "theta=asin(AB/BF)\n",
+ "#As soon as a joint is analysed the forces on the joint are marked on members \n",
+ "\n",
+ "#Joint E\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "FED=PE/sin(theta)\n",
+ "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FEF=FED*cos(theta)\n",
+ "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n",
+ "#Taking moment at point A,\n",
+ "\n",
+ "RC=PE*6/8 \n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "VA=PE\n",
+ "HA=RC\n",
+ "\n",
+ "#Joint A\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FAB=VA\n",
+ "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAF=HA\n",
+ "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint C\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FCB=RC/cos(theta)\n",
+ "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FCD=FCB*sin(theta)\n",
+ "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint B\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n",
+ "\n",
+ "print\"FBF=\",round(FBF)\n",
+ "\n",
+ "FBD=FCB*cos(theta)\n",
+ "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#joint F\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FFD=FBF\n",
+ "print\"FFD=\",round(FFD)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.6 page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FHG= 25.0 KN (Comp.)\n",
+ "FHF= 15.0 KN (Tension)\n",
+ "FAC= 18.0278 KN (Comp.)\n",
+ "FAB= 15.0 KN (Tension)\n",
+ "FBC= 0.0\n",
+ "FBD=FBA 15.0 KN (Tension)\n",
+ "FCE=FCA 18.0278 KN (Comp.)\n",
+ "FDE= 0.0\n",
+ "FDF=FDB 15.0 KN (Tension)\n",
+ "FEF= 0\n",
+ "FEG=FCE= 18.0278 KN (Comp.)\n",
+ "FFG= 12.0 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan, cos , sin, pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=2.0 #length of beam AB,m\n",
+ "BD=2.0 #length of beam BD,m\n",
+ "DF=2.0 #length of beam DF,m\n",
+ "FH=3.0 #length of beam FH,m\n",
+ "FG=4.0 #length of beam FG,m\n",
+ "PF=12.0 #Vertical Load at point F,KN\n",
+ "PH=20.0 #Vertical Load at point H,KN\n",
+ "\n",
+ "#mistake in book FG=4.0 , given FG=2.0 \n",
+ "\n",
+ "theta1=atan(FG/(AB+BD+DF))\n",
+ "theta3=atan(FG/FH)\n",
+ "theta2=theta3\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "#joint H\n",
+ "\n",
+ "FHG=PH/sin(theta3)\n",
+ "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FHF=FHG*cos(theta2)\n",
+ "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#taking moment at G\n",
+ "\n",
+ "RA=PH*FH/(AB+BD+DF)\n",
+ "\n",
+ "RG=RA+PF+PH\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAC=RA/sin(theta1)\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FAB=FAC*cos(theta1)\n",
+ "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=0\n",
+ "print \"FBC=\",round(FBC) \n",
+ "FBA=FAB\n",
+ "FBD=FBA\n",
+ "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n",
+ "\n",
+ "FCA=FAC\n",
+ "FCE=FCA\n",
+ "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=0\n",
+ "print \"FDE=\",round(FDE) \n",
+ "\n",
+ "FDB=FBD\n",
+ "FDF=FDB\n",
+ "\n",
+ "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n",
+ "\n",
+ "FEF=0\n",
+ "\n",
+ "print \"FEF=\",FEF\n",
+ "\n",
+ "FEG=FCE\n",
+ "\n",
+ "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint F:\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=PF\n",
+ "\n",
+ "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.7 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FGF= 23.094 KN (Tension)\n",
+ "FGE= 11.547 KN (Comp.)\n",
+ "FFG= 23.094 KN (Comp.)\n",
+ "FFD= 13.094 KN (Tension)\n",
+ "FAB= 36.7543 KN (Comp.)\n",
+ "FAC= 8.3771 KN (Tension)\n",
+ "FBC= 9.4338 KN (Comp.)\n",
+ "FBD= 13.6603 KN (Comp.)\n",
+ "FCD= 9.4338 KN (Tension)\n",
+ "FCE= 1.0566 KN (Comp.)\n",
+ "FDE= 44.0748 KN (Comp.)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=3.0\n",
+ "BC=AB\n",
+ "AC=AB\n",
+ "BD=BC\n",
+ "CD=BD\n",
+ "CE=CD\n",
+ "DE=CE\n",
+ "EF=DE\n",
+ "DF=DE\n",
+ "EG=DE\n",
+ "FG=DF\n",
+ "\n",
+ "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n",
+ "\n",
+ "PB=40.0 #Vertical Loading at point B,KN\n",
+ "PD=30.0 #Vertical Loading at point D,KN\n",
+ "HF=10.0 #Horizontal Loading at point F,KN\n",
+ "PG=20.0 #Vertical Loading at point G,KN\n",
+ "\n",
+ "#joint G\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGF=PG/sin(theta)\n",
+ "\n",
+ "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FGE=FGF*cos(theta)\n",
+ "\n",
+ "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint F\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=FGF\n",
+ "\n",
+ "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFE=FGF\n",
+ "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n",
+ "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n",
+ "#moment about point A\n",
+ "\n",
+ "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n",
+ "\n",
+ "VA=PB+PD+PG-RE\n",
+ "\n",
+ "HA=HF\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAB=VA/sin(theta)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAC=FAB*cos(theta)-HF\n",
+ "\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "\n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=(PB-FAB*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FBA=FAB\n",
+ "FBD=-FBC*cos(theta)+FBA*cos(theta)\n",
+ "\n",
+ "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint C\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FCD=FBC*sin(theta)/sin(theta)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n",
+ "\n",
+ "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=(PD+FCD*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.8 page number82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FFH= 69.282 KN (Comp.)\n",
+ "FGH= 5.7735 KN (Comp.)\n",
+ "FGI= 72.1688 KN (Tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=10.0\n",
+ "PD=PB\n",
+ "PF=PD\n",
+ "AB=4.0\n",
+ "BC=AB\n",
+ "AC=BC\n",
+ "BD=BC\n",
+ "CD=BC\n",
+ "DE=CD\n",
+ "CE=CD\n",
+ "DF=DE\n",
+ "EF=DE\n",
+ "EG=DE\n",
+ "FG=EF\n",
+ "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n",
+ "AG=AC+CE+EG\n",
+ "BG=CE+EG+AC/2\n",
+ "DG=EG+CE/2\n",
+ "FG1=EG/2\n",
+ "RA=PB*7/2\n",
+ "RO=RA\n",
+ "theta=60.0*pi/180\n",
+ "#moment at point G\n",
+ "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n",
+ "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGH=(RA-PB-PD-PF)/(sin(theta))\n",
+ "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FGI=FFH+FGH*cos(theta)\n",
+ "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.9 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FL3L4= 412.5 KN (Tension)\n",
+ "FU4U3= 456.2 KN (Comp.)\n",
+ "FU4L3= 62.5 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin,acos,sin,cos,sqrt\n",
+ "\n",
+ "#To determine reactions, consider equilibrium equations\n",
+ "\n",
+ "#variable declaration\n",
+ " #all Vertical loading are in KN\n",
+ "PL1=200.0 \n",
+ "PL2=200.0\n",
+ "PL3=150.0\n",
+ "PL4=100.0\n",
+ "PL5=100.0\n",
+ "\n",
+ "#length in m\n",
+ "UL1=6.0\n",
+ "UL2=8.0\n",
+ "UL3=9.0\n",
+ "UL4=UL2\n",
+ "UL5=UL1\n",
+ "\n",
+ "L1=6.0\n",
+ "L2=6.0\n",
+ "L3=6.0\n",
+ "L4=6.0\n",
+ "L5=6.0\n",
+ "L6=6.0\n",
+ "\n",
+ "#moment at point LO\n",
+ "\n",
+ "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n",
+ "\n",
+ "R1=PL1+PL2+PL3+PL4+PL5-R2\n",
+ "\n",
+ "#Take the section (1)–(1) and consider the right hand side part.\n",
+ "\n",
+ "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n",
+ "theta1=asin(1/U3U4)\n",
+ "\n",
+ "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n",
+ "theta2=asin(6/L3U4)\n",
+ "\n",
+ "#moment at U4\n",
+ "\n",
+ "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n",
+ "\n",
+ "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#moment at L3\n",
+ "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n",
+ "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of horizontal forces \n",
+ "FL4L3=FL3L4\n",
+ "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n",
+ "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.10 page number84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 60.0 °\n",
+ "F2= 51.9615 KN (Tension)\n",
+ "F1= 110.0 KN (Comp.)\n",
+ "F3= 69.282 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan,tan,sin,cos,pi\n",
+ "\n",
+ "#Each load is 20 kN.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=20.0\n",
+ "AB=18.0\n",
+ "A=3.0\n",
+ "\n",
+ "RA=P*7/2\n",
+ "RB=RA\n",
+ "\n",
+ "theta1=30.0*pi/180\n",
+ "a=(3*A)/(4*cos(theta1))\n",
+ "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n",
+ "#Drop perpendicular CE on AB. \n",
+ "\n",
+ "CE=3*A*tan(theta1)\n",
+ "DE=A\n",
+ "\n",
+ "theta=atan(CE/DE)*180/pi\n",
+ "print \"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at point A\n",
+ "\n",
+ "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n",
+ "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n",
+ "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n",
+ "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.11 page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAE= 30.0 KN (Tension)\n",
+ "FBC= 71.4 KN (Comp.)\n",
+ "FFC= 40.98 KN (Tension)\n",
+ "FAB= 92.62 KN (Comp.)\n",
+ "FAF= 40.98 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=15.0 #vertical loading at point A,KN\n",
+ "PB=30.0 #vertical loading at point B,KN\n",
+ "PC=30.0 #vertical loading at point C,KN\n",
+ "PD=30.0 #vertical loading at point D,KN\n",
+ "PE=15.0 #vertical loading at point E,KN\n",
+ "\n",
+ "#Due to symmetry, the reactions are equal\n",
+ "RA=(PA+PB+PC+PD+PE)/2\n",
+ "RB=RA\n",
+ "#Drop perpendicular CH on AF. \n",
+ "#in traingle ACH\n",
+ "\n",
+ "angleACH=45.0*pi/180 #angleACH,°\n",
+ "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n",
+ "CH=5.0\n",
+ "angleFCH=60.0*pi/180\n",
+ "\n",
+ "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n",
+ "#For left hand side part of the frame\n",
+ "#moment at C\n",
+ "\n",
+ "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n",
+ "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assuming the directions for FFC and FBC \n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "#FFC=FBC*sqrt(2)-RA\n",
+ "\n",
+ "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n",
+ "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFC=FBC*sqrt(2)-RA\n",
+ "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n",
+ "\n",
+ "#Joint B: sum of forces normal to AC = 0, gives \n",
+ "\n",
+ "FBF=PC*cos(angleACH)\n",
+ "\n",
+ "#sum of forces parallel to AC = 0, gives \n",
+ "\n",
+ "FAB=FBC+PC*sin(angleACH)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#JOINT A\n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n",
+ "\n",
+ "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_VkfH2oR.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_VkfH2oR.ipynb
new file mode 100644
index 00000000..09420950
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_VkfH2oR.ipynb
@@ -0,0 +1,1030 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter3-TRUSSES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.1 Page number68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 45.0 °\n",
+ "FCB= 56.57 KN\n",
+ "FCD= 40.0 KN\n",
+ "FDB= 40.0 KN\n",
+ "FDE= 40.0 KN\n",
+ "FBE= 113.14 KN\n",
+ "FBA= 120.0 KN\n",
+ "Member , Magnitude of Force in KN , Nature\n",
+ "AB , 120.0 , Tension\n",
+ "BC , 56.57 , Tension\n",
+ "CD , 40.0 , Compresion\n",
+ "DE , 40.0 , Compresion\n",
+ "BE , 113.14 , Compresion\n",
+ "BD , 40.0 , Tension\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#Determine the inclinations of all inclined members\n",
+ "\n",
+ "theta=atan(1)*180/pi\n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n",
+ "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n",
+ " \n",
+ "P=40.0\n",
+ "FCB=P/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\"\n",
+ "\n",
+ "#Now sum H=0 indicates that FCD should act towards C.\n",
+ "\n",
+ "FCD=FCB*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,2),\"KN\"\n",
+ "\n",
+ "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n",
+ "\n",
+ "FDB=40.0\n",
+ "FDE=40.0\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\"\n",
+ "\n",
+ "print \"FDE=\",round(FDE,2),\"KN\"\n",
+ "\n",
+ "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n",
+ "\n",
+ "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n",
+ "\n",
+ "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FBE=\", round(FBE,2),\"KN\"\n",
+ "print \"FBA=\", round(FBA,2),\"KN\"\n",
+ "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n",
+ "\n",
+ "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n",
+ "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n",
+ "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n",
+ "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n",
+ "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n",
+ "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n",
+ "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.2 Page number70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 83.7158 KN (Comp.)\n",
+ "FAE= 41.8579 KN (Tension)\n",
+ "FDC= 89.4893 KN (Comp.)\n",
+ "FDE= 44.7446 KN (Tension)\n",
+ "FBC= 60.6218 KN (Comp.)\n",
+ "FCE= 31.7543 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=40.0\n",
+ "PC=50.0\n",
+ "PE=60.0\n",
+ "\n",
+ "theta=60.0\n",
+ "\n",
+ "RD=(PC*3+PE*2+PB*1)/(4.0)\n",
+ "\n",
+ "RA=PB+PC+PE-RD\n",
+ "\n",
+ "FAB=RA/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n",
+ "\n",
+ "FAE=FAB*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FDC=RD/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FDE=FDC*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "FBC=(FAB+FBE)*(0.5)\n",
+ "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n",
+ "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.3 Page number72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 23.09 KN [Comp.]\n",
+ "FAC= 11.55 KN [Tensile]\n",
+ "FDB= 20.0 KN [Comp.]\n",
+ "FDC= 17.32 KN [Tensile]\n",
+ "FCB= 11.55 KN FCB= 11.55 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #Load at point B,KN\n",
+ "PC=10.0 #Load at point C,KN \n",
+ "thetaA=60.0 #angleBAC\n",
+ "thetaD=30.0 #angleBDC\n",
+ "\n",
+ "AC=3.0 #length,m\n",
+ "CD=3.0 #length,m\n",
+ "\n",
+ "AB=(AC+CD)*cos(thetaA*pi/180)\n",
+ "BD=(AC+CD)*cos(thetaD*pi/180)\n",
+ "#mistake in book\n",
+ "#angleBCA=angleABC=theta\n",
+ "\n",
+ "theta=(180.0-thetaA)/(2.0) \n",
+ "\n",
+ "#Taking moment about A, we get\n",
+ "\n",
+ "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n",
+ "\n",
+ "RA=PC+PB-RD\n",
+ "#Joint A\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FAB=RA/sin(thetaA*pi/180)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n",
+ "FAC=FAB*cos(thetaA*pi/180)\n",
+ "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint D\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FDB=RD/sin(thetaD*pi/180)\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n",
+ "FDC=FDB*cos(thetaD*pi/180)\n",
+ "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint C\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FCB=PC/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\n",
+ "\n",
+ "#CHECK\n",
+ "\n",
+ "FCB=(FDC-FAC)/cos(theta*pi/180)\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.4 Page number74\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FBF= 42.4264 KN (Tension)\n",
+ "FBC= 30.0 KN (Comp.)\n",
+ "FCF= 50.0 KN (Comp.)\n",
+ "FCD= 30.0 KN (Comp.)\n",
+ "FDF= 70.7107 KN (Tensile)\n",
+ "FDF= 70.7107 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #vertical load at point B,KN\n",
+ "PC=50.0 #vertical load at point C,KN \n",
+ "PDv=40.0 #vertical load at point D,KN\n",
+ "PDh=20.0 #Horizontal load at point D,KN\n",
+ "PF=30.0 #vertical load at point F,KN\n",
+ "HA=PDh\n",
+ "\n",
+ "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n",
+ "\n",
+ "VA=PB+PC+PDv+PF-RE\n",
+ "\n",
+ "#joint A\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FAB=VA\n",
+ "FAF=HA\n",
+ "\n",
+ "#joint E\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FED=RE\n",
+ "FEF=0\n",
+ "\n",
+ "#Joint B: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FBF=(VA-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBC=FBF*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint C: \n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "\n",
+ "FCF=PC\n",
+ "\n",
+ "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FCD=FBC\n",
+ "\n",
+ "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint D: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FDF=(RE-PDv)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n",
+ "\n",
+ "#check\n",
+ "\n",
+ "FDF=(FCD+PDh)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.5 Page number75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FED= 25.0 KN (Tension)\n",
+ "FEF= 15.0 KN (Comp.)\n",
+ "FAB= 20.0 KN (Comp.)\n",
+ "FAF= 15.0 KN (Comp.)\n",
+ "FCB= 25.0 KN (Comp.)\n",
+ "FCD= 20.0 KN (Tension)\n",
+ "FBF= 0.0\n",
+ "FBD= 15.0 KN (Tension)\n",
+ "FFD= 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,asin,pi,sin,cos\n",
+ "\n",
+ "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PE=20.0\n",
+ "AF=3.0\n",
+ "FE=3.0\n",
+ "AB=4.0\n",
+ "FD=4.0\n",
+ "BD=3.0\n",
+ "CD=4.0\n",
+ "\n",
+ "BF=sqrt(pow(AF,2)+pow(AB,2))\n",
+ "DE=BF\n",
+ "BC=DE\n",
+ "\n",
+ "#sin(theta)=AB/BF\n",
+ "#cos(theta)=AF/BF\n",
+ "\n",
+ "theta=asin(AB/BF)\n",
+ "#As soon as a joint is analysed the forces on the joint are marked on members \n",
+ "\n",
+ "#Joint E\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "FED=PE/sin(theta)\n",
+ "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FEF=FED*cos(theta)\n",
+ "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n",
+ "#Taking moment at point A,\n",
+ "\n",
+ "RC=PE*6/8 \n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "VA=PE\n",
+ "HA=RC\n",
+ "\n",
+ "#Joint A\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FAB=VA\n",
+ "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAF=HA\n",
+ "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint C\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FCB=RC/cos(theta)\n",
+ "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FCD=FCB*sin(theta)\n",
+ "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint B\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n",
+ "\n",
+ "print\"FBF=\",round(FBF)\n",
+ "\n",
+ "FBD=FCB*cos(theta)\n",
+ "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#joint F\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FFD=FBF\n",
+ "print\"FFD=\",round(FFD)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.6 page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FHG= 25.0 KN (Comp.)\n",
+ "FHF= 15.0 KN (Tension)\n",
+ "FAC= 18.0278 KN (Comp.)\n",
+ "FAB= 15.0 KN (Tension)\n",
+ "FBC= 0.0\n",
+ "FBD=FBA 15.0 KN (Tension)\n",
+ "FCE=FCA 18.0278 KN (Comp.)\n",
+ "FDE= 0.0\n",
+ "FDF=FDB 15.0 KN (Tension)\n",
+ "FEF= 0\n",
+ "FEG=FCE= 18.0278 KN (Comp.)\n",
+ "FFG= 12.0 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan, cos , sin, pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=2.0 #length of beam AB,m\n",
+ "BD=2.0 #length of beam BD,m\n",
+ "DF=2.0 #length of beam DF,m\n",
+ "FH=3.0 #length of beam FH,m\n",
+ "FG=4.0 #length of beam FG,m\n",
+ "PF=12.0 #Vertical Load at point F,KN\n",
+ "PH=20.0 #Vertical Load at point H,KN\n",
+ "\n",
+ "#mistake in book FG=4.0 , given FG=2.0 \n",
+ "\n",
+ "theta1=atan(FG/(AB+BD+DF))\n",
+ "theta3=atan(FG/FH)\n",
+ "theta2=theta3\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "#joint H\n",
+ "\n",
+ "FHG=PH/sin(theta3)\n",
+ "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FHF=FHG*cos(theta2)\n",
+ "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#taking moment at G\n",
+ "\n",
+ "RA=PH*FH/(AB+BD+DF)\n",
+ "\n",
+ "RG=RA+PF+PH\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAC=RA/sin(theta1)\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FAB=FAC*cos(theta1)\n",
+ "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=0\n",
+ "print \"FBC=\",round(FBC) \n",
+ "FBA=FAB\n",
+ "FBD=FBA\n",
+ "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n",
+ "\n",
+ "FCA=FAC\n",
+ "FCE=FCA\n",
+ "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=0\n",
+ "print \"FDE=\",round(FDE) \n",
+ "\n",
+ "FDB=FBD\n",
+ "FDF=FDB\n",
+ "\n",
+ "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n",
+ "\n",
+ "FEF=0\n",
+ "\n",
+ "print \"FEF=\",FEF\n",
+ "\n",
+ "FEG=FCE\n",
+ "\n",
+ "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint F:\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=PF\n",
+ "\n",
+ "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.7 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FGF= 23.094 KN (Tension)\n",
+ "FGE= 11.547 KN (Comp.)\n",
+ "FFG= 23.094 KN (Comp.)\n",
+ "FFD= 13.094 KN (Tension)\n",
+ "FAB= 36.7543 KN (Comp.)\n",
+ "FAC= 8.3771 KN (Tension)\n",
+ "FBC= 9.4338 KN (Comp.)\n",
+ "FBD= 13.6603 KN (Comp.)\n",
+ "FCD= 9.4338 KN (Tension)\n",
+ "FCE= 1.0566 KN (Comp.)\n",
+ "FDE= 44.0748 KN (Comp.)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=3.0\n",
+ "BC=AB\n",
+ "AC=AB\n",
+ "BD=BC\n",
+ "CD=BD\n",
+ "CE=CD\n",
+ "DE=CE\n",
+ "EF=DE\n",
+ "DF=DE\n",
+ "EG=DE\n",
+ "FG=DF\n",
+ "\n",
+ "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n",
+ "\n",
+ "PB=40.0 #Vertical Loading at point B,KN\n",
+ "PD=30.0 #Vertical Loading at point D,KN\n",
+ "HF=10.0 #Horizontal Loading at point F,KN\n",
+ "PG=20.0 #Vertical Loading at point G,KN\n",
+ "\n",
+ "#joint G\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGF=PG/sin(theta)\n",
+ "\n",
+ "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FGE=FGF*cos(theta)\n",
+ "\n",
+ "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint F\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=FGF\n",
+ "\n",
+ "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFE=FGF\n",
+ "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n",
+ "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n",
+ "#moment about point A\n",
+ "\n",
+ "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n",
+ "\n",
+ "VA=PB+PD+PG-RE\n",
+ "\n",
+ "HA=HF\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAB=VA/sin(theta)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAC=FAB*cos(theta)-HF\n",
+ "\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "\n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=(PB-FAB*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FBA=FAB\n",
+ "FBD=-FBC*cos(theta)+FBA*cos(theta)\n",
+ "\n",
+ "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint C\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FCD=FBC*sin(theta)/sin(theta)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n",
+ "\n",
+ "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=(PD+FCD*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.8 page number82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FFH= 69.282 KN (Comp.)\n",
+ "FGH= 5.7735 KN (Comp.)\n",
+ "FGI= 72.1688 KN (Tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=10.0\n",
+ "PD=PB\n",
+ "PF=PD\n",
+ "AB=4.0\n",
+ "BC=AB\n",
+ "AC=BC\n",
+ "BD=BC\n",
+ "CD=BC\n",
+ "DE=CD\n",
+ "CE=CD\n",
+ "DF=DE\n",
+ "EF=DE\n",
+ "EG=DE\n",
+ "FG=EF\n",
+ "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n",
+ "AG=AC+CE+EG\n",
+ "BG=CE+EG+AC/2\n",
+ "DG=EG+CE/2\n",
+ "FG1=EG/2\n",
+ "RA=PB*7/2\n",
+ "RO=RA\n",
+ "theta=60.0*pi/180\n",
+ "#moment at point G\n",
+ "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n",
+ "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGH=(RA-PB-PD-PF)/(sin(theta))\n",
+ "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FGI=FFH+FGH*cos(theta)\n",
+ "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.9 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FL3L4= 412.5 KN (Tension)\n",
+ "FU4U3= 456.2 KN (Comp.)\n",
+ "FU4L3= 62.5 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin,acos,sin,cos,sqrt\n",
+ "\n",
+ "#To determine reactions, consider equilibrium equations\n",
+ "\n",
+ "#variable declaration\n",
+ " #all Vertical loading are in KN\n",
+ "PL1=200.0 \n",
+ "PL2=200.0\n",
+ "PL3=150.0\n",
+ "PL4=100.0\n",
+ "PL5=100.0\n",
+ "\n",
+ "#length in m\n",
+ "UL1=6.0\n",
+ "UL2=8.0\n",
+ "UL3=9.0\n",
+ "UL4=UL2\n",
+ "UL5=UL1\n",
+ "\n",
+ "L1=6.0\n",
+ "L2=6.0\n",
+ "L3=6.0\n",
+ "L4=6.0\n",
+ "L5=6.0\n",
+ "L6=6.0\n",
+ "\n",
+ "#moment at point LO\n",
+ "\n",
+ "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n",
+ "\n",
+ "R1=PL1+PL2+PL3+PL4+PL5-R2\n",
+ "\n",
+ "#Take the section (1)–(1) and consider the right hand side part.\n",
+ "\n",
+ "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n",
+ "theta1=asin(1/U3U4)\n",
+ "\n",
+ "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n",
+ "theta2=asin(6/L3U4)\n",
+ "\n",
+ "#moment at U4\n",
+ "\n",
+ "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n",
+ "\n",
+ "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#moment at L3\n",
+ "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n",
+ "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of horizontal forces \n",
+ "FL4L3=FL3L4\n",
+ "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n",
+ "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.10 page number84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 60.0 °\n",
+ "F2= 51.9615 KN (Tension)\n",
+ "F1= 110.0 KN (Comp.)\n",
+ "F3= 69.282 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan,tan,sin,cos,pi\n",
+ "\n",
+ "#Each load is 20 kN.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=20.0\n",
+ "AB=18.0\n",
+ "A=3.0\n",
+ "\n",
+ "RA=P*7/2\n",
+ "RB=RA\n",
+ "\n",
+ "theta1=30.0*pi/180\n",
+ "a=(3*A)/(4*cos(theta1))\n",
+ "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n",
+ "#Drop perpendicular CE on AB. \n",
+ "\n",
+ "CE=3*A*tan(theta1)\n",
+ "DE=A\n",
+ "\n",
+ "theta=atan(CE/DE)*180/pi\n",
+ "print \"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at point A\n",
+ "\n",
+ "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n",
+ "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n",
+ "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n",
+ "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.11 page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAE= 30.0 KN (Tension)\n",
+ "FBC= 71.4 KN (Comp.)\n",
+ "FFC= 40.98 KN (Tension)\n",
+ "FAB= 92.62 KN (Comp.)\n",
+ "FAF= 40.98 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=15.0 #vertical loading at point A,KN\n",
+ "PB=30.0 #vertical loading at point B,KN\n",
+ "PC=30.0 #vertical loading at point C,KN\n",
+ "PD=30.0 #vertical loading at point D,KN\n",
+ "PE=15.0 #vertical loading at point E,KN\n",
+ "\n",
+ "#Due to symmetry, the reactions are equal\n",
+ "RA=(PA+PB+PC+PD+PE)/2\n",
+ "RB=RA\n",
+ "#Drop perpendicular CH on AF. \n",
+ "#in traingle ACH\n",
+ "\n",
+ "angleACH=45.0*pi/180 #angleACH,°\n",
+ "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n",
+ "CH=5.0\n",
+ "angleFCH=60.0*pi/180\n",
+ "\n",
+ "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n",
+ "#For left hand side part of the frame\n",
+ "#moment at C\n",
+ "\n",
+ "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n",
+ "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assuming the directions for FFC and FBC \n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "#FFC=FBC*sqrt(2)-RA\n",
+ "\n",
+ "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n",
+ "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFC=FBC*sqrt(2)-RA\n",
+ "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n",
+ "\n",
+ "#Joint B: sum of forces normal to AC = 0, gives \n",
+ "\n",
+ "FBF=PC*cos(angleACH)\n",
+ "\n",
+ "#sum of forces parallel to AC = 0, gives \n",
+ "\n",
+ "FAB=FBC+PC*sin(angleACH)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#JOINT A\n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n",
+ "\n",
+ "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_dbMwF5t.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_dbMwF5t.ipynb
new file mode 100644
index 00000000..09420950
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_dbMwF5t.ipynb
@@ -0,0 +1,1030 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter3-TRUSSES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.1 Page number68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 45.0 °\n",
+ "FCB= 56.57 KN\n",
+ "FCD= 40.0 KN\n",
+ "FDB= 40.0 KN\n",
+ "FDE= 40.0 KN\n",
+ "FBE= 113.14 KN\n",
+ "FBA= 120.0 KN\n",
+ "Member , Magnitude of Force in KN , Nature\n",
+ "AB , 120.0 , Tension\n",
+ "BC , 56.57 , Tension\n",
+ "CD , 40.0 , Compresion\n",
+ "DE , 40.0 , Compresion\n",
+ "BE , 113.14 , Compresion\n",
+ "BD , 40.0 , Tension\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#Determine the inclinations of all inclined members\n",
+ "\n",
+ "theta=atan(1)*180/pi\n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n",
+ "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n",
+ " \n",
+ "P=40.0\n",
+ "FCB=P/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\"\n",
+ "\n",
+ "#Now sum H=0 indicates that FCD should act towards C.\n",
+ "\n",
+ "FCD=FCB*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,2),\"KN\"\n",
+ "\n",
+ "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n",
+ "\n",
+ "FDB=40.0\n",
+ "FDE=40.0\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\"\n",
+ "\n",
+ "print \"FDE=\",round(FDE,2),\"KN\"\n",
+ "\n",
+ "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n",
+ "\n",
+ "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n",
+ "\n",
+ "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FBE=\", round(FBE,2),\"KN\"\n",
+ "print \"FBA=\", round(FBA,2),\"KN\"\n",
+ "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n",
+ "\n",
+ "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n",
+ "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n",
+ "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n",
+ "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n",
+ "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n",
+ "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n",
+ "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.2 Page number70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 83.7158 KN (Comp.)\n",
+ "FAE= 41.8579 KN (Tension)\n",
+ "FDC= 89.4893 KN (Comp.)\n",
+ "FDE= 44.7446 KN (Tension)\n",
+ "FBC= 60.6218 KN (Comp.)\n",
+ "FCE= 31.7543 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=40.0\n",
+ "PC=50.0\n",
+ "PE=60.0\n",
+ "\n",
+ "theta=60.0\n",
+ "\n",
+ "RD=(PC*3+PE*2+PB*1)/(4.0)\n",
+ "\n",
+ "RA=PB+PC+PE-RD\n",
+ "\n",
+ "FAB=RA/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n",
+ "\n",
+ "FAE=FAB*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FDC=RD/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FDE=FDC*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "FBC=(FAB+FBE)*(0.5)\n",
+ "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n",
+ "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.3 Page number72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 23.09 KN [Comp.]\n",
+ "FAC= 11.55 KN [Tensile]\n",
+ "FDB= 20.0 KN [Comp.]\n",
+ "FDC= 17.32 KN [Tensile]\n",
+ "FCB= 11.55 KN FCB= 11.55 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #Load at point B,KN\n",
+ "PC=10.0 #Load at point C,KN \n",
+ "thetaA=60.0 #angleBAC\n",
+ "thetaD=30.0 #angleBDC\n",
+ "\n",
+ "AC=3.0 #length,m\n",
+ "CD=3.0 #length,m\n",
+ "\n",
+ "AB=(AC+CD)*cos(thetaA*pi/180)\n",
+ "BD=(AC+CD)*cos(thetaD*pi/180)\n",
+ "#mistake in book\n",
+ "#angleBCA=angleABC=theta\n",
+ "\n",
+ "theta=(180.0-thetaA)/(2.0) \n",
+ "\n",
+ "#Taking moment about A, we get\n",
+ "\n",
+ "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n",
+ "\n",
+ "RA=PC+PB-RD\n",
+ "#Joint A\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FAB=RA/sin(thetaA*pi/180)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n",
+ "FAC=FAB*cos(thetaA*pi/180)\n",
+ "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint D\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FDB=RD/sin(thetaD*pi/180)\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n",
+ "FDC=FDB*cos(thetaD*pi/180)\n",
+ "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint C\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FCB=PC/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\n",
+ "\n",
+ "#CHECK\n",
+ "\n",
+ "FCB=(FDC-FAC)/cos(theta*pi/180)\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.4 Page number74\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FBF= 42.4264 KN (Tension)\n",
+ "FBC= 30.0 KN (Comp.)\n",
+ "FCF= 50.0 KN (Comp.)\n",
+ "FCD= 30.0 KN (Comp.)\n",
+ "FDF= 70.7107 KN (Tensile)\n",
+ "FDF= 70.7107 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #vertical load at point B,KN\n",
+ "PC=50.0 #vertical load at point C,KN \n",
+ "PDv=40.0 #vertical load at point D,KN\n",
+ "PDh=20.0 #Horizontal load at point D,KN\n",
+ "PF=30.0 #vertical load at point F,KN\n",
+ "HA=PDh\n",
+ "\n",
+ "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n",
+ "\n",
+ "VA=PB+PC+PDv+PF-RE\n",
+ "\n",
+ "#joint A\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FAB=VA\n",
+ "FAF=HA\n",
+ "\n",
+ "#joint E\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FED=RE\n",
+ "FEF=0\n",
+ "\n",
+ "#Joint B: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FBF=(VA-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBC=FBF*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint C: \n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "\n",
+ "FCF=PC\n",
+ "\n",
+ "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FCD=FBC\n",
+ "\n",
+ "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint D: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FDF=(RE-PDv)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n",
+ "\n",
+ "#check\n",
+ "\n",
+ "FDF=(FCD+PDh)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.5 Page number75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FED= 25.0 KN (Tension)\n",
+ "FEF= 15.0 KN (Comp.)\n",
+ "FAB= 20.0 KN (Comp.)\n",
+ "FAF= 15.0 KN (Comp.)\n",
+ "FCB= 25.0 KN (Comp.)\n",
+ "FCD= 20.0 KN (Tension)\n",
+ "FBF= 0.0\n",
+ "FBD= 15.0 KN (Tension)\n",
+ "FFD= 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,asin,pi,sin,cos\n",
+ "\n",
+ "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PE=20.0\n",
+ "AF=3.0\n",
+ "FE=3.0\n",
+ "AB=4.0\n",
+ "FD=4.0\n",
+ "BD=3.0\n",
+ "CD=4.0\n",
+ "\n",
+ "BF=sqrt(pow(AF,2)+pow(AB,2))\n",
+ "DE=BF\n",
+ "BC=DE\n",
+ "\n",
+ "#sin(theta)=AB/BF\n",
+ "#cos(theta)=AF/BF\n",
+ "\n",
+ "theta=asin(AB/BF)\n",
+ "#As soon as a joint is analysed the forces on the joint are marked on members \n",
+ "\n",
+ "#Joint E\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "FED=PE/sin(theta)\n",
+ "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FEF=FED*cos(theta)\n",
+ "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n",
+ "#Taking moment at point A,\n",
+ "\n",
+ "RC=PE*6/8 \n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "VA=PE\n",
+ "HA=RC\n",
+ "\n",
+ "#Joint A\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FAB=VA\n",
+ "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAF=HA\n",
+ "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint C\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FCB=RC/cos(theta)\n",
+ "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FCD=FCB*sin(theta)\n",
+ "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint B\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n",
+ "\n",
+ "print\"FBF=\",round(FBF)\n",
+ "\n",
+ "FBD=FCB*cos(theta)\n",
+ "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#joint F\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FFD=FBF\n",
+ "print\"FFD=\",round(FFD)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.6 page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FHG= 25.0 KN (Comp.)\n",
+ "FHF= 15.0 KN (Tension)\n",
+ "FAC= 18.0278 KN (Comp.)\n",
+ "FAB= 15.0 KN (Tension)\n",
+ "FBC= 0.0\n",
+ "FBD=FBA 15.0 KN (Tension)\n",
+ "FCE=FCA 18.0278 KN (Comp.)\n",
+ "FDE= 0.0\n",
+ "FDF=FDB 15.0 KN (Tension)\n",
+ "FEF= 0\n",
+ "FEG=FCE= 18.0278 KN (Comp.)\n",
+ "FFG= 12.0 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan, cos , sin, pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=2.0 #length of beam AB,m\n",
+ "BD=2.0 #length of beam BD,m\n",
+ "DF=2.0 #length of beam DF,m\n",
+ "FH=3.0 #length of beam FH,m\n",
+ "FG=4.0 #length of beam FG,m\n",
+ "PF=12.0 #Vertical Load at point F,KN\n",
+ "PH=20.0 #Vertical Load at point H,KN\n",
+ "\n",
+ "#mistake in book FG=4.0 , given FG=2.0 \n",
+ "\n",
+ "theta1=atan(FG/(AB+BD+DF))\n",
+ "theta3=atan(FG/FH)\n",
+ "theta2=theta3\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "#joint H\n",
+ "\n",
+ "FHG=PH/sin(theta3)\n",
+ "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FHF=FHG*cos(theta2)\n",
+ "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#taking moment at G\n",
+ "\n",
+ "RA=PH*FH/(AB+BD+DF)\n",
+ "\n",
+ "RG=RA+PF+PH\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAC=RA/sin(theta1)\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FAB=FAC*cos(theta1)\n",
+ "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=0\n",
+ "print \"FBC=\",round(FBC) \n",
+ "FBA=FAB\n",
+ "FBD=FBA\n",
+ "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n",
+ "\n",
+ "FCA=FAC\n",
+ "FCE=FCA\n",
+ "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=0\n",
+ "print \"FDE=\",round(FDE) \n",
+ "\n",
+ "FDB=FBD\n",
+ "FDF=FDB\n",
+ "\n",
+ "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n",
+ "\n",
+ "FEF=0\n",
+ "\n",
+ "print \"FEF=\",FEF\n",
+ "\n",
+ "FEG=FCE\n",
+ "\n",
+ "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint F:\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=PF\n",
+ "\n",
+ "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.7 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FGF= 23.094 KN (Tension)\n",
+ "FGE= 11.547 KN (Comp.)\n",
+ "FFG= 23.094 KN (Comp.)\n",
+ "FFD= 13.094 KN (Tension)\n",
+ "FAB= 36.7543 KN (Comp.)\n",
+ "FAC= 8.3771 KN (Tension)\n",
+ "FBC= 9.4338 KN (Comp.)\n",
+ "FBD= 13.6603 KN (Comp.)\n",
+ "FCD= 9.4338 KN (Tension)\n",
+ "FCE= 1.0566 KN (Comp.)\n",
+ "FDE= 44.0748 KN (Comp.)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=3.0\n",
+ "BC=AB\n",
+ "AC=AB\n",
+ "BD=BC\n",
+ "CD=BD\n",
+ "CE=CD\n",
+ "DE=CE\n",
+ "EF=DE\n",
+ "DF=DE\n",
+ "EG=DE\n",
+ "FG=DF\n",
+ "\n",
+ "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n",
+ "\n",
+ "PB=40.0 #Vertical Loading at point B,KN\n",
+ "PD=30.0 #Vertical Loading at point D,KN\n",
+ "HF=10.0 #Horizontal Loading at point F,KN\n",
+ "PG=20.0 #Vertical Loading at point G,KN\n",
+ "\n",
+ "#joint G\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGF=PG/sin(theta)\n",
+ "\n",
+ "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FGE=FGF*cos(theta)\n",
+ "\n",
+ "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint F\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=FGF\n",
+ "\n",
+ "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFE=FGF\n",
+ "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n",
+ "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n",
+ "#moment about point A\n",
+ "\n",
+ "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n",
+ "\n",
+ "VA=PB+PD+PG-RE\n",
+ "\n",
+ "HA=HF\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAB=VA/sin(theta)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAC=FAB*cos(theta)-HF\n",
+ "\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "\n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=(PB-FAB*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FBA=FAB\n",
+ "FBD=-FBC*cos(theta)+FBA*cos(theta)\n",
+ "\n",
+ "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint C\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FCD=FBC*sin(theta)/sin(theta)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n",
+ "\n",
+ "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=(PD+FCD*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.8 page number82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FFH= 69.282 KN (Comp.)\n",
+ "FGH= 5.7735 KN (Comp.)\n",
+ "FGI= 72.1688 KN (Tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=10.0\n",
+ "PD=PB\n",
+ "PF=PD\n",
+ "AB=4.0\n",
+ "BC=AB\n",
+ "AC=BC\n",
+ "BD=BC\n",
+ "CD=BC\n",
+ "DE=CD\n",
+ "CE=CD\n",
+ "DF=DE\n",
+ "EF=DE\n",
+ "EG=DE\n",
+ "FG=EF\n",
+ "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n",
+ "AG=AC+CE+EG\n",
+ "BG=CE+EG+AC/2\n",
+ "DG=EG+CE/2\n",
+ "FG1=EG/2\n",
+ "RA=PB*7/2\n",
+ "RO=RA\n",
+ "theta=60.0*pi/180\n",
+ "#moment at point G\n",
+ "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n",
+ "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGH=(RA-PB-PD-PF)/(sin(theta))\n",
+ "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FGI=FFH+FGH*cos(theta)\n",
+ "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.9 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FL3L4= 412.5 KN (Tension)\n",
+ "FU4U3= 456.2 KN (Comp.)\n",
+ "FU4L3= 62.5 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin,acos,sin,cos,sqrt\n",
+ "\n",
+ "#To determine reactions, consider equilibrium equations\n",
+ "\n",
+ "#variable declaration\n",
+ " #all Vertical loading are in KN\n",
+ "PL1=200.0 \n",
+ "PL2=200.0\n",
+ "PL3=150.0\n",
+ "PL4=100.0\n",
+ "PL5=100.0\n",
+ "\n",
+ "#length in m\n",
+ "UL1=6.0\n",
+ "UL2=8.0\n",
+ "UL3=9.0\n",
+ "UL4=UL2\n",
+ "UL5=UL1\n",
+ "\n",
+ "L1=6.0\n",
+ "L2=6.0\n",
+ "L3=6.0\n",
+ "L4=6.0\n",
+ "L5=6.0\n",
+ "L6=6.0\n",
+ "\n",
+ "#moment at point LO\n",
+ "\n",
+ "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n",
+ "\n",
+ "R1=PL1+PL2+PL3+PL4+PL5-R2\n",
+ "\n",
+ "#Take the section (1)–(1) and consider the right hand side part.\n",
+ "\n",
+ "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n",
+ "theta1=asin(1/U3U4)\n",
+ "\n",
+ "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n",
+ "theta2=asin(6/L3U4)\n",
+ "\n",
+ "#moment at U4\n",
+ "\n",
+ "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n",
+ "\n",
+ "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#moment at L3\n",
+ "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n",
+ "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of horizontal forces \n",
+ "FL4L3=FL3L4\n",
+ "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n",
+ "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.10 page number84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 60.0 °\n",
+ "F2= 51.9615 KN (Tension)\n",
+ "F1= 110.0 KN (Comp.)\n",
+ "F3= 69.282 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan,tan,sin,cos,pi\n",
+ "\n",
+ "#Each load is 20 kN.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=20.0\n",
+ "AB=18.0\n",
+ "A=3.0\n",
+ "\n",
+ "RA=P*7/2\n",
+ "RB=RA\n",
+ "\n",
+ "theta1=30.0*pi/180\n",
+ "a=(3*A)/(4*cos(theta1))\n",
+ "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n",
+ "#Drop perpendicular CE on AB. \n",
+ "\n",
+ "CE=3*A*tan(theta1)\n",
+ "DE=A\n",
+ "\n",
+ "theta=atan(CE/DE)*180/pi\n",
+ "print \"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at point A\n",
+ "\n",
+ "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n",
+ "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n",
+ "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n",
+ "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.11 page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAE= 30.0 KN (Tension)\n",
+ "FBC= 71.4 KN (Comp.)\n",
+ "FFC= 40.98 KN (Tension)\n",
+ "FAB= 92.62 KN (Comp.)\n",
+ "FAF= 40.98 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=15.0 #vertical loading at point A,KN\n",
+ "PB=30.0 #vertical loading at point B,KN\n",
+ "PC=30.0 #vertical loading at point C,KN\n",
+ "PD=30.0 #vertical loading at point D,KN\n",
+ "PE=15.0 #vertical loading at point E,KN\n",
+ "\n",
+ "#Due to symmetry, the reactions are equal\n",
+ "RA=(PA+PB+PC+PD+PE)/2\n",
+ "RB=RA\n",
+ "#Drop perpendicular CH on AF. \n",
+ "#in traingle ACH\n",
+ "\n",
+ "angleACH=45.0*pi/180 #angleACH,°\n",
+ "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n",
+ "CH=5.0\n",
+ "angleFCH=60.0*pi/180\n",
+ "\n",
+ "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n",
+ "#For left hand side part of the frame\n",
+ "#moment at C\n",
+ "\n",
+ "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n",
+ "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assuming the directions for FFC and FBC \n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "#FFC=FBC*sqrt(2)-RA\n",
+ "\n",
+ "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n",
+ "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFC=FBC*sqrt(2)-RA\n",
+ "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n",
+ "\n",
+ "#Joint B: sum of forces normal to AC = 0, gives \n",
+ "\n",
+ "FBF=PC*cos(angleACH)\n",
+ "\n",
+ "#sum of forces parallel to AC = 0, gives \n",
+ "\n",
+ "FAB=FBC+PC*sin(angleACH)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#JOINT A\n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n",
+ "\n",
+ "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_lB9BZeV.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_lB9BZeV.ipynb
new file mode 100644
index 00000000..09420950
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_lB9BZeV.ipynb
@@ -0,0 +1,1030 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter3-TRUSSES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.1 Page number68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 45.0 °\n",
+ "FCB= 56.57 KN\n",
+ "FCD= 40.0 KN\n",
+ "FDB= 40.0 KN\n",
+ "FDE= 40.0 KN\n",
+ "FBE= 113.14 KN\n",
+ "FBA= 120.0 KN\n",
+ "Member , Magnitude of Force in KN , Nature\n",
+ "AB , 120.0 , Tension\n",
+ "BC , 56.57 , Tension\n",
+ "CD , 40.0 , Compresion\n",
+ "DE , 40.0 , Compresion\n",
+ "BE , 113.14 , Compresion\n",
+ "BD , 40.0 , Tension\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#Determine the inclinations of all inclined members\n",
+ "\n",
+ "theta=atan(1)*180/pi\n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n",
+ "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n",
+ " \n",
+ "P=40.0\n",
+ "FCB=P/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\"\n",
+ "\n",
+ "#Now sum H=0 indicates that FCD should act towards C.\n",
+ "\n",
+ "FCD=FCB*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,2),\"KN\"\n",
+ "\n",
+ "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n",
+ "\n",
+ "FDB=40.0\n",
+ "FDE=40.0\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\"\n",
+ "\n",
+ "print \"FDE=\",round(FDE,2),\"KN\"\n",
+ "\n",
+ "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n",
+ "\n",
+ "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n",
+ "\n",
+ "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FBE=\", round(FBE,2),\"KN\"\n",
+ "print \"FBA=\", round(FBA,2),\"KN\"\n",
+ "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n",
+ "\n",
+ "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n",
+ "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n",
+ "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n",
+ "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n",
+ "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n",
+ "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n",
+ "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.2 Page number70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 83.7158 KN (Comp.)\n",
+ "FAE= 41.8579 KN (Tension)\n",
+ "FDC= 89.4893 KN (Comp.)\n",
+ "FDE= 44.7446 KN (Tension)\n",
+ "FBC= 60.6218 KN (Comp.)\n",
+ "FCE= 31.7543 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=40.0\n",
+ "PC=50.0\n",
+ "PE=60.0\n",
+ "\n",
+ "theta=60.0\n",
+ "\n",
+ "RD=(PC*3+PE*2+PB*1)/(4.0)\n",
+ "\n",
+ "RA=PB+PC+PE-RD\n",
+ "\n",
+ "FAB=RA/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n",
+ "\n",
+ "FAE=FAB*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FDC=RD/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FDE=FDC*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "FBC=(FAB+FBE)*(0.5)\n",
+ "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n",
+ "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.3 Page number72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 23.09 KN [Comp.]\n",
+ "FAC= 11.55 KN [Tensile]\n",
+ "FDB= 20.0 KN [Comp.]\n",
+ "FDC= 17.32 KN [Tensile]\n",
+ "FCB= 11.55 KN FCB= 11.55 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #Load at point B,KN\n",
+ "PC=10.0 #Load at point C,KN \n",
+ "thetaA=60.0 #angleBAC\n",
+ "thetaD=30.0 #angleBDC\n",
+ "\n",
+ "AC=3.0 #length,m\n",
+ "CD=3.0 #length,m\n",
+ "\n",
+ "AB=(AC+CD)*cos(thetaA*pi/180)\n",
+ "BD=(AC+CD)*cos(thetaD*pi/180)\n",
+ "#mistake in book\n",
+ "#angleBCA=angleABC=theta\n",
+ "\n",
+ "theta=(180.0-thetaA)/(2.0) \n",
+ "\n",
+ "#Taking moment about A, we get\n",
+ "\n",
+ "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n",
+ "\n",
+ "RA=PC+PB-RD\n",
+ "#Joint A\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FAB=RA/sin(thetaA*pi/180)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n",
+ "FAC=FAB*cos(thetaA*pi/180)\n",
+ "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint D\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FDB=RD/sin(thetaD*pi/180)\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n",
+ "FDC=FDB*cos(thetaD*pi/180)\n",
+ "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint C\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FCB=PC/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\n",
+ "\n",
+ "#CHECK\n",
+ "\n",
+ "FCB=(FDC-FAC)/cos(theta*pi/180)\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.4 Page number74\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FBF= 42.4264 KN (Tension)\n",
+ "FBC= 30.0 KN (Comp.)\n",
+ "FCF= 50.0 KN (Comp.)\n",
+ "FCD= 30.0 KN (Comp.)\n",
+ "FDF= 70.7107 KN (Tensile)\n",
+ "FDF= 70.7107 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #vertical load at point B,KN\n",
+ "PC=50.0 #vertical load at point C,KN \n",
+ "PDv=40.0 #vertical load at point D,KN\n",
+ "PDh=20.0 #Horizontal load at point D,KN\n",
+ "PF=30.0 #vertical load at point F,KN\n",
+ "HA=PDh\n",
+ "\n",
+ "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n",
+ "\n",
+ "VA=PB+PC+PDv+PF-RE\n",
+ "\n",
+ "#joint A\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FAB=VA\n",
+ "FAF=HA\n",
+ "\n",
+ "#joint E\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FED=RE\n",
+ "FEF=0\n",
+ "\n",
+ "#Joint B: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FBF=(VA-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBC=FBF*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint C: \n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "\n",
+ "FCF=PC\n",
+ "\n",
+ "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FCD=FBC\n",
+ "\n",
+ "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint D: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FDF=(RE-PDv)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n",
+ "\n",
+ "#check\n",
+ "\n",
+ "FDF=(FCD+PDh)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.5 Page number75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FED= 25.0 KN (Tension)\n",
+ "FEF= 15.0 KN (Comp.)\n",
+ "FAB= 20.0 KN (Comp.)\n",
+ "FAF= 15.0 KN (Comp.)\n",
+ "FCB= 25.0 KN (Comp.)\n",
+ "FCD= 20.0 KN (Tension)\n",
+ "FBF= 0.0\n",
+ "FBD= 15.0 KN (Tension)\n",
+ "FFD= 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,asin,pi,sin,cos\n",
+ "\n",
+ "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PE=20.0\n",
+ "AF=3.0\n",
+ "FE=3.0\n",
+ "AB=4.0\n",
+ "FD=4.0\n",
+ "BD=3.0\n",
+ "CD=4.0\n",
+ "\n",
+ "BF=sqrt(pow(AF,2)+pow(AB,2))\n",
+ "DE=BF\n",
+ "BC=DE\n",
+ "\n",
+ "#sin(theta)=AB/BF\n",
+ "#cos(theta)=AF/BF\n",
+ "\n",
+ "theta=asin(AB/BF)\n",
+ "#As soon as a joint is analysed the forces on the joint are marked on members \n",
+ "\n",
+ "#Joint E\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "FED=PE/sin(theta)\n",
+ "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FEF=FED*cos(theta)\n",
+ "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n",
+ "#Taking moment at point A,\n",
+ "\n",
+ "RC=PE*6/8 \n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "VA=PE\n",
+ "HA=RC\n",
+ "\n",
+ "#Joint A\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FAB=VA\n",
+ "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAF=HA\n",
+ "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint C\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FCB=RC/cos(theta)\n",
+ "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FCD=FCB*sin(theta)\n",
+ "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint B\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n",
+ "\n",
+ "print\"FBF=\",round(FBF)\n",
+ "\n",
+ "FBD=FCB*cos(theta)\n",
+ "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#joint F\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FFD=FBF\n",
+ "print\"FFD=\",round(FFD)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.6 page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FHG= 25.0 KN (Comp.)\n",
+ "FHF= 15.0 KN (Tension)\n",
+ "FAC= 18.0278 KN (Comp.)\n",
+ "FAB= 15.0 KN (Tension)\n",
+ "FBC= 0.0\n",
+ "FBD=FBA 15.0 KN (Tension)\n",
+ "FCE=FCA 18.0278 KN (Comp.)\n",
+ "FDE= 0.0\n",
+ "FDF=FDB 15.0 KN (Tension)\n",
+ "FEF= 0\n",
+ "FEG=FCE= 18.0278 KN (Comp.)\n",
+ "FFG= 12.0 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan, cos , sin, pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=2.0 #length of beam AB,m\n",
+ "BD=2.0 #length of beam BD,m\n",
+ "DF=2.0 #length of beam DF,m\n",
+ "FH=3.0 #length of beam FH,m\n",
+ "FG=4.0 #length of beam FG,m\n",
+ "PF=12.0 #Vertical Load at point F,KN\n",
+ "PH=20.0 #Vertical Load at point H,KN\n",
+ "\n",
+ "#mistake in book FG=4.0 , given FG=2.0 \n",
+ "\n",
+ "theta1=atan(FG/(AB+BD+DF))\n",
+ "theta3=atan(FG/FH)\n",
+ "theta2=theta3\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "#joint H\n",
+ "\n",
+ "FHG=PH/sin(theta3)\n",
+ "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FHF=FHG*cos(theta2)\n",
+ "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#taking moment at G\n",
+ "\n",
+ "RA=PH*FH/(AB+BD+DF)\n",
+ "\n",
+ "RG=RA+PF+PH\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAC=RA/sin(theta1)\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FAB=FAC*cos(theta1)\n",
+ "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=0\n",
+ "print \"FBC=\",round(FBC) \n",
+ "FBA=FAB\n",
+ "FBD=FBA\n",
+ "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n",
+ "\n",
+ "FCA=FAC\n",
+ "FCE=FCA\n",
+ "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=0\n",
+ "print \"FDE=\",round(FDE) \n",
+ "\n",
+ "FDB=FBD\n",
+ "FDF=FDB\n",
+ "\n",
+ "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n",
+ "\n",
+ "FEF=0\n",
+ "\n",
+ "print \"FEF=\",FEF\n",
+ "\n",
+ "FEG=FCE\n",
+ "\n",
+ "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint F:\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=PF\n",
+ "\n",
+ "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.7 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FGF= 23.094 KN (Tension)\n",
+ "FGE= 11.547 KN (Comp.)\n",
+ "FFG= 23.094 KN (Comp.)\n",
+ "FFD= 13.094 KN (Tension)\n",
+ "FAB= 36.7543 KN (Comp.)\n",
+ "FAC= 8.3771 KN (Tension)\n",
+ "FBC= 9.4338 KN (Comp.)\n",
+ "FBD= 13.6603 KN (Comp.)\n",
+ "FCD= 9.4338 KN (Tension)\n",
+ "FCE= 1.0566 KN (Comp.)\n",
+ "FDE= 44.0748 KN (Comp.)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=3.0\n",
+ "BC=AB\n",
+ "AC=AB\n",
+ "BD=BC\n",
+ "CD=BD\n",
+ "CE=CD\n",
+ "DE=CE\n",
+ "EF=DE\n",
+ "DF=DE\n",
+ "EG=DE\n",
+ "FG=DF\n",
+ "\n",
+ "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n",
+ "\n",
+ "PB=40.0 #Vertical Loading at point B,KN\n",
+ "PD=30.0 #Vertical Loading at point D,KN\n",
+ "HF=10.0 #Horizontal Loading at point F,KN\n",
+ "PG=20.0 #Vertical Loading at point G,KN\n",
+ "\n",
+ "#joint G\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGF=PG/sin(theta)\n",
+ "\n",
+ "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FGE=FGF*cos(theta)\n",
+ "\n",
+ "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint F\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=FGF\n",
+ "\n",
+ "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFE=FGF\n",
+ "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n",
+ "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n",
+ "#moment about point A\n",
+ "\n",
+ "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n",
+ "\n",
+ "VA=PB+PD+PG-RE\n",
+ "\n",
+ "HA=HF\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAB=VA/sin(theta)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAC=FAB*cos(theta)-HF\n",
+ "\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "\n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=(PB-FAB*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FBA=FAB\n",
+ "FBD=-FBC*cos(theta)+FBA*cos(theta)\n",
+ "\n",
+ "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint C\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FCD=FBC*sin(theta)/sin(theta)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n",
+ "\n",
+ "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=(PD+FCD*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.8 page number82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FFH= 69.282 KN (Comp.)\n",
+ "FGH= 5.7735 KN (Comp.)\n",
+ "FGI= 72.1688 KN (Tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=10.0\n",
+ "PD=PB\n",
+ "PF=PD\n",
+ "AB=4.0\n",
+ "BC=AB\n",
+ "AC=BC\n",
+ "BD=BC\n",
+ "CD=BC\n",
+ "DE=CD\n",
+ "CE=CD\n",
+ "DF=DE\n",
+ "EF=DE\n",
+ "EG=DE\n",
+ "FG=EF\n",
+ "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n",
+ "AG=AC+CE+EG\n",
+ "BG=CE+EG+AC/2\n",
+ "DG=EG+CE/2\n",
+ "FG1=EG/2\n",
+ "RA=PB*7/2\n",
+ "RO=RA\n",
+ "theta=60.0*pi/180\n",
+ "#moment at point G\n",
+ "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n",
+ "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGH=(RA-PB-PD-PF)/(sin(theta))\n",
+ "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FGI=FFH+FGH*cos(theta)\n",
+ "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.9 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FL3L4= 412.5 KN (Tension)\n",
+ "FU4U3= 456.2 KN (Comp.)\n",
+ "FU4L3= 62.5 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin,acos,sin,cos,sqrt\n",
+ "\n",
+ "#To determine reactions, consider equilibrium equations\n",
+ "\n",
+ "#variable declaration\n",
+ " #all Vertical loading are in KN\n",
+ "PL1=200.0 \n",
+ "PL2=200.0\n",
+ "PL3=150.0\n",
+ "PL4=100.0\n",
+ "PL5=100.0\n",
+ "\n",
+ "#length in m\n",
+ "UL1=6.0\n",
+ "UL2=8.0\n",
+ "UL3=9.0\n",
+ "UL4=UL2\n",
+ "UL5=UL1\n",
+ "\n",
+ "L1=6.0\n",
+ "L2=6.0\n",
+ "L3=6.0\n",
+ "L4=6.0\n",
+ "L5=6.0\n",
+ "L6=6.0\n",
+ "\n",
+ "#moment at point LO\n",
+ "\n",
+ "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n",
+ "\n",
+ "R1=PL1+PL2+PL3+PL4+PL5-R2\n",
+ "\n",
+ "#Take the section (1)–(1) and consider the right hand side part.\n",
+ "\n",
+ "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n",
+ "theta1=asin(1/U3U4)\n",
+ "\n",
+ "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n",
+ "theta2=asin(6/L3U4)\n",
+ "\n",
+ "#moment at U4\n",
+ "\n",
+ "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n",
+ "\n",
+ "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#moment at L3\n",
+ "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n",
+ "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of horizontal forces \n",
+ "FL4L3=FL3L4\n",
+ "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n",
+ "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.10 page number84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 60.0 °\n",
+ "F2= 51.9615 KN (Tension)\n",
+ "F1= 110.0 KN (Comp.)\n",
+ "F3= 69.282 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan,tan,sin,cos,pi\n",
+ "\n",
+ "#Each load is 20 kN.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=20.0\n",
+ "AB=18.0\n",
+ "A=3.0\n",
+ "\n",
+ "RA=P*7/2\n",
+ "RB=RA\n",
+ "\n",
+ "theta1=30.0*pi/180\n",
+ "a=(3*A)/(4*cos(theta1))\n",
+ "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n",
+ "#Drop perpendicular CE on AB. \n",
+ "\n",
+ "CE=3*A*tan(theta1)\n",
+ "DE=A\n",
+ "\n",
+ "theta=atan(CE/DE)*180/pi\n",
+ "print \"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at point A\n",
+ "\n",
+ "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n",
+ "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n",
+ "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n",
+ "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.11 page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAE= 30.0 KN (Tension)\n",
+ "FBC= 71.4 KN (Comp.)\n",
+ "FFC= 40.98 KN (Tension)\n",
+ "FAB= 92.62 KN (Comp.)\n",
+ "FAF= 40.98 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=15.0 #vertical loading at point A,KN\n",
+ "PB=30.0 #vertical loading at point B,KN\n",
+ "PC=30.0 #vertical loading at point C,KN\n",
+ "PD=30.0 #vertical loading at point D,KN\n",
+ "PE=15.0 #vertical loading at point E,KN\n",
+ "\n",
+ "#Due to symmetry, the reactions are equal\n",
+ "RA=(PA+PB+PC+PD+PE)/2\n",
+ "RB=RA\n",
+ "#Drop perpendicular CH on AF. \n",
+ "#in traingle ACH\n",
+ "\n",
+ "angleACH=45.0*pi/180 #angleACH,°\n",
+ "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n",
+ "CH=5.0\n",
+ "angleFCH=60.0*pi/180\n",
+ "\n",
+ "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n",
+ "#For left hand side part of the frame\n",
+ "#moment at C\n",
+ "\n",
+ "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n",
+ "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assuming the directions for FFC and FBC \n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "#FFC=FBC*sqrt(2)-RA\n",
+ "\n",
+ "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n",
+ "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFC=FBC*sqrt(2)-RA\n",
+ "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n",
+ "\n",
+ "#Joint B: sum of forces normal to AC = 0, gives \n",
+ "\n",
+ "FBF=PC*cos(angleACH)\n",
+ "\n",
+ "#sum of forces parallel to AC = 0, gives \n",
+ "\n",
+ "FAB=FBC+PC*sin(angleACH)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#JOINT A\n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n",
+ "\n",
+ "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_phPgJb2.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_phPgJb2.ipynb
new file mode 100644
index 00000000..09420950
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_phPgJb2.ipynb
@@ -0,0 +1,1030 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter3-TRUSSES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.1 Page number68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 45.0 °\n",
+ "FCB= 56.57 KN\n",
+ "FCD= 40.0 KN\n",
+ "FDB= 40.0 KN\n",
+ "FDE= 40.0 KN\n",
+ "FBE= 113.14 KN\n",
+ "FBA= 120.0 KN\n",
+ "Member , Magnitude of Force in KN , Nature\n",
+ "AB , 120.0 , Tension\n",
+ "BC , 56.57 , Tension\n",
+ "CD , 40.0 , Compresion\n",
+ "DE , 40.0 , Compresion\n",
+ "BE , 113.14 , Compresion\n",
+ "BD , 40.0 , Tension\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#Determine the inclinations of all inclined members\n",
+ "\n",
+ "theta=atan(1)*180/pi\n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n",
+ "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n",
+ " \n",
+ "P=40.0\n",
+ "FCB=P/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\"\n",
+ "\n",
+ "#Now sum H=0 indicates that FCD should act towards C.\n",
+ "\n",
+ "FCD=FCB*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,2),\"KN\"\n",
+ "\n",
+ "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n",
+ "\n",
+ "FDB=40.0\n",
+ "FDE=40.0\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\"\n",
+ "\n",
+ "print \"FDE=\",round(FDE,2),\"KN\"\n",
+ "\n",
+ "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n",
+ "\n",
+ "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n",
+ "\n",
+ "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FBE=\", round(FBE,2),\"KN\"\n",
+ "print \"FBA=\", round(FBA,2),\"KN\"\n",
+ "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n",
+ "\n",
+ "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n",
+ "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n",
+ "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n",
+ "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n",
+ "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n",
+ "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n",
+ "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.2 Page number70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 83.7158 KN (Comp.)\n",
+ "FAE= 41.8579 KN (Tension)\n",
+ "FDC= 89.4893 KN (Comp.)\n",
+ "FDE= 44.7446 KN (Tension)\n",
+ "FBC= 60.6218 KN (Comp.)\n",
+ "FCE= 31.7543 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=40.0\n",
+ "PC=50.0\n",
+ "PE=60.0\n",
+ "\n",
+ "theta=60.0\n",
+ "\n",
+ "RD=(PC*3+PE*2+PB*1)/(4.0)\n",
+ "\n",
+ "RA=PB+PC+PE-RD\n",
+ "\n",
+ "FAB=RA/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n",
+ "\n",
+ "FAE=FAB*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FDC=RD/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FDE=FDC*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "FBC=(FAB+FBE)*(0.5)\n",
+ "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n",
+ "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.3 Page number72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 23.09 KN [Comp.]\n",
+ "FAC= 11.55 KN [Tensile]\n",
+ "FDB= 20.0 KN [Comp.]\n",
+ "FDC= 17.32 KN [Tensile]\n",
+ "FCB= 11.55 KN FCB= 11.55 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #Load at point B,KN\n",
+ "PC=10.0 #Load at point C,KN \n",
+ "thetaA=60.0 #angleBAC\n",
+ "thetaD=30.0 #angleBDC\n",
+ "\n",
+ "AC=3.0 #length,m\n",
+ "CD=3.0 #length,m\n",
+ "\n",
+ "AB=(AC+CD)*cos(thetaA*pi/180)\n",
+ "BD=(AC+CD)*cos(thetaD*pi/180)\n",
+ "#mistake in book\n",
+ "#angleBCA=angleABC=theta\n",
+ "\n",
+ "theta=(180.0-thetaA)/(2.0) \n",
+ "\n",
+ "#Taking moment about A, we get\n",
+ "\n",
+ "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n",
+ "\n",
+ "RA=PC+PB-RD\n",
+ "#Joint A\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FAB=RA/sin(thetaA*pi/180)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n",
+ "FAC=FAB*cos(thetaA*pi/180)\n",
+ "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint D\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FDB=RD/sin(thetaD*pi/180)\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n",
+ "FDC=FDB*cos(thetaD*pi/180)\n",
+ "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint C\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FCB=PC/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\n",
+ "\n",
+ "#CHECK\n",
+ "\n",
+ "FCB=(FDC-FAC)/cos(theta*pi/180)\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.4 Page number74\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FBF= 42.4264 KN (Tension)\n",
+ "FBC= 30.0 KN (Comp.)\n",
+ "FCF= 50.0 KN (Comp.)\n",
+ "FCD= 30.0 KN (Comp.)\n",
+ "FDF= 70.7107 KN (Tensile)\n",
+ "FDF= 70.7107 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #vertical load at point B,KN\n",
+ "PC=50.0 #vertical load at point C,KN \n",
+ "PDv=40.0 #vertical load at point D,KN\n",
+ "PDh=20.0 #Horizontal load at point D,KN\n",
+ "PF=30.0 #vertical load at point F,KN\n",
+ "HA=PDh\n",
+ "\n",
+ "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n",
+ "\n",
+ "VA=PB+PC+PDv+PF-RE\n",
+ "\n",
+ "#joint A\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FAB=VA\n",
+ "FAF=HA\n",
+ "\n",
+ "#joint E\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FED=RE\n",
+ "FEF=0\n",
+ "\n",
+ "#Joint B: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FBF=(VA-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBC=FBF*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint C: \n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "\n",
+ "FCF=PC\n",
+ "\n",
+ "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FCD=FBC\n",
+ "\n",
+ "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint D: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FDF=(RE-PDv)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n",
+ "\n",
+ "#check\n",
+ "\n",
+ "FDF=(FCD+PDh)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.5 Page number75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FED= 25.0 KN (Tension)\n",
+ "FEF= 15.0 KN (Comp.)\n",
+ "FAB= 20.0 KN (Comp.)\n",
+ "FAF= 15.0 KN (Comp.)\n",
+ "FCB= 25.0 KN (Comp.)\n",
+ "FCD= 20.0 KN (Tension)\n",
+ "FBF= 0.0\n",
+ "FBD= 15.0 KN (Tension)\n",
+ "FFD= 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,asin,pi,sin,cos\n",
+ "\n",
+ "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PE=20.0\n",
+ "AF=3.0\n",
+ "FE=3.0\n",
+ "AB=4.0\n",
+ "FD=4.0\n",
+ "BD=3.0\n",
+ "CD=4.0\n",
+ "\n",
+ "BF=sqrt(pow(AF,2)+pow(AB,2))\n",
+ "DE=BF\n",
+ "BC=DE\n",
+ "\n",
+ "#sin(theta)=AB/BF\n",
+ "#cos(theta)=AF/BF\n",
+ "\n",
+ "theta=asin(AB/BF)\n",
+ "#As soon as a joint is analysed the forces on the joint are marked on members \n",
+ "\n",
+ "#Joint E\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "FED=PE/sin(theta)\n",
+ "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FEF=FED*cos(theta)\n",
+ "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n",
+ "#Taking moment at point A,\n",
+ "\n",
+ "RC=PE*6/8 \n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "VA=PE\n",
+ "HA=RC\n",
+ "\n",
+ "#Joint A\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FAB=VA\n",
+ "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAF=HA\n",
+ "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint C\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FCB=RC/cos(theta)\n",
+ "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FCD=FCB*sin(theta)\n",
+ "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint B\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n",
+ "\n",
+ "print\"FBF=\",round(FBF)\n",
+ "\n",
+ "FBD=FCB*cos(theta)\n",
+ "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#joint F\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FFD=FBF\n",
+ "print\"FFD=\",round(FFD)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.6 page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FHG= 25.0 KN (Comp.)\n",
+ "FHF= 15.0 KN (Tension)\n",
+ "FAC= 18.0278 KN (Comp.)\n",
+ "FAB= 15.0 KN (Tension)\n",
+ "FBC= 0.0\n",
+ "FBD=FBA 15.0 KN (Tension)\n",
+ "FCE=FCA 18.0278 KN (Comp.)\n",
+ "FDE= 0.0\n",
+ "FDF=FDB 15.0 KN (Tension)\n",
+ "FEF= 0\n",
+ "FEG=FCE= 18.0278 KN (Comp.)\n",
+ "FFG= 12.0 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan, cos , sin, pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=2.0 #length of beam AB,m\n",
+ "BD=2.0 #length of beam BD,m\n",
+ "DF=2.0 #length of beam DF,m\n",
+ "FH=3.0 #length of beam FH,m\n",
+ "FG=4.0 #length of beam FG,m\n",
+ "PF=12.0 #Vertical Load at point F,KN\n",
+ "PH=20.0 #Vertical Load at point H,KN\n",
+ "\n",
+ "#mistake in book FG=4.0 , given FG=2.0 \n",
+ "\n",
+ "theta1=atan(FG/(AB+BD+DF))\n",
+ "theta3=atan(FG/FH)\n",
+ "theta2=theta3\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "#joint H\n",
+ "\n",
+ "FHG=PH/sin(theta3)\n",
+ "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FHF=FHG*cos(theta2)\n",
+ "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#taking moment at G\n",
+ "\n",
+ "RA=PH*FH/(AB+BD+DF)\n",
+ "\n",
+ "RG=RA+PF+PH\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAC=RA/sin(theta1)\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FAB=FAC*cos(theta1)\n",
+ "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=0\n",
+ "print \"FBC=\",round(FBC) \n",
+ "FBA=FAB\n",
+ "FBD=FBA\n",
+ "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n",
+ "\n",
+ "FCA=FAC\n",
+ "FCE=FCA\n",
+ "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=0\n",
+ "print \"FDE=\",round(FDE) \n",
+ "\n",
+ "FDB=FBD\n",
+ "FDF=FDB\n",
+ "\n",
+ "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n",
+ "\n",
+ "FEF=0\n",
+ "\n",
+ "print \"FEF=\",FEF\n",
+ "\n",
+ "FEG=FCE\n",
+ "\n",
+ "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint F:\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=PF\n",
+ "\n",
+ "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.7 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FGF= 23.094 KN (Tension)\n",
+ "FGE= 11.547 KN (Comp.)\n",
+ "FFG= 23.094 KN (Comp.)\n",
+ "FFD= 13.094 KN (Tension)\n",
+ "FAB= 36.7543 KN (Comp.)\n",
+ "FAC= 8.3771 KN (Tension)\n",
+ "FBC= 9.4338 KN (Comp.)\n",
+ "FBD= 13.6603 KN (Comp.)\n",
+ "FCD= 9.4338 KN (Tension)\n",
+ "FCE= 1.0566 KN (Comp.)\n",
+ "FDE= 44.0748 KN (Comp.)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=3.0\n",
+ "BC=AB\n",
+ "AC=AB\n",
+ "BD=BC\n",
+ "CD=BD\n",
+ "CE=CD\n",
+ "DE=CE\n",
+ "EF=DE\n",
+ "DF=DE\n",
+ "EG=DE\n",
+ "FG=DF\n",
+ "\n",
+ "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n",
+ "\n",
+ "PB=40.0 #Vertical Loading at point B,KN\n",
+ "PD=30.0 #Vertical Loading at point D,KN\n",
+ "HF=10.0 #Horizontal Loading at point F,KN\n",
+ "PG=20.0 #Vertical Loading at point G,KN\n",
+ "\n",
+ "#joint G\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGF=PG/sin(theta)\n",
+ "\n",
+ "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FGE=FGF*cos(theta)\n",
+ "\n",
+ "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint F\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=FGF\n",
+ "\n",
+ "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFE=FGF\n",
+ "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n",
+ "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n",
+ "#moment about point A\n",
+ "\n",
+ "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n",
+ "\n",
+ "VA=PB+PD+PG-RE\n",
+ "\n",
+ "HA=HF\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAB=VA/sin(theta)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAC=FAB*cos(theta)-HF\n",
+ "\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "\n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=(PB-FAB*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FBA=FAB\n",
+ "FBD=-FBC*cos(theta)+FBA*cos(theta)\n",
+ "\n",
+ "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint C\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FCD=FBC*sin(theta)/sin(theta)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n",
+ "\n",
+ "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=(PD+FCD*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.8 page number82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FFH= 69.282 KN (Comp.)\n",
+ "FGH= 5.7735 KN (Comp.)\n",
+ "FGI= 72.1688 KN (Tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=10.0\n",
+ "PD=PB\n",
+ "PF=PD\n",
+ "AB=4.0\n",
+ "BC=AB\n",
+ "AC=BC\n",
+ "BD=BC\n",
+ "CD=BC\n",
+ "DE=CD\n",
+ "CE=CD\n",
+ "DF=DE\n",
+ "EF=DE\n",
+ "EG=DE\n",
+ "FG=EF\n",
+ "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n",
+ "AG=AC+CE+EG\n",
+ "BG=CE+EG+AC/2\n",
+ "DG=EG+CE/2\n",
+ "FG1=EG/2\n",
+ "RA=PB*7/2\n",
+ "RO=RA\n",
+ "theta=60.0*pi/180\n",
+ "#moment at point G\n",
+ "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n",
+ "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGH=(RA-PB-PD-PF)/(sin(theta))\n",
+ "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FGI=FFH+FGH*cos(theta)\n",
+ "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.9 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FL3L4= 412.5 KN (Tension)\n",
+ "FU4U3= 456.2 KN (Comp.)\n",
+ "FU4L3= 62.5 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin,acos,sin,cos,sqrt\n",
+ "\n",
+ "#To determine reactions, consider equilibrium equations\n",
+ "\n",
+ "#variable declaration\n",
+ " #all Vertical loading are in KN\n",
+ "PL1=200.0 \n",
+ "PL2=200.0\n",
+ "PL3=150.0\n",
+ "PL4=100.0\n",
+ "PL5=100.0\n",
+ "\n",
+ "#length in m\n",
+ "UL1=6.0\n",
+ "UL2=8.0\n",
+ "UL3=9.0\n",
+ "UL4=UL2\n",
+ "UL5=UL1\n",
+ "\n",
+ "L1=6.0\n",
+ "L2=6.0\n",
+ "L3=6.0\n",
+ "L4=6.0\n",
+ "L5=6.0\n",
+ "L6=6.0\n",
+ "\n",
+ "#moment at point LO\n",
+ "\n",
+ "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n",
+ "\n",
+ "R1=PL1+PL2+PL3+PL4+PL5-R2\n",
+ "\n",
+ "#Take the section (1)–(1) and consider the right hand side part.\n",
+ "\n",
+ "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n",
+ "theta1=asin(1/U3U4)\n",
+ "\n",
+ "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n",
+ "theta2=asin(6/L3U4)\n",
+ "\n",
+ "#moment at U4\n",
+ "\n",
+ "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n",
+ "\n",
+ "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#moment at L3\n",
+ "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n",
+ "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of horizontal forces \n",
+ "FL4L3=FL3L4\n",
+ "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n",
+ "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.10 page number84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 60.0 °\n",
+ "F2= 51.9615 KN (Tension)\n",
+ "F1= 110.0 KN (Comp.)\n",
+ "F3= 69.282 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan,tan,sin,cos,pi\n",
+ "\n",
+ "#Each load is 20 kN.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=20.0\n",
+ "AB=18.0\n",
+ "A=3.0\n",
+ "\n",
+ "RA=P*7/2\n",
+ "RB=RA\n",
+ "\n",
+ "theta1=30.0*pi/180\n",
+ "a=(3*A)/(4*cos(theta1))\n",
+ "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n",
+ "#Drop perpendicular CE on AB. \n",
+ "\n",
+ "CE=3*A*tan(theta1)\n",
+ "DE=A\n",
+ "\n",
+ "theta=atan(CE/DE)*180/pi\n",
+ "print \"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at point A\n",
+ "\n",
+ "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n",
+ "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n",
+ "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n",
+ "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.11 page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAE= 30.0 KN (Tension)\n",
+ "FBC= 71.4 KN (Comp.)\n",
+ "FFC= 40.98 KN (Tension)\n",
+ "FAB= 92.62 KN (Comp.)\n",
+ "FAF= 40.98 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=15.0 #vertical loading at point A,KN\n",
+ "PB=30.0 #vertical loading at point B,KN\n",
+ "PC=30.0 #vertical loading at point C,KN\n",
+ "PD=30.0 #vertical loading at point D,KN\n",
+ "PE=15.0 #vertical loading at point E,KN\n",
+ "\n",
+ "#Due to symmetry, the reactions are equal\n",
+ "RA=(PA+PB+PC+PD+PE)/2\n",
+ "RB=RA\n",
+ "#Drop perpendicular CH on AF. \n",
+ "#in traingle ACH\n",
+ "\n",
+ "angleACH=45.0*pi/180 #angleACH,°\n",
+ "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n",
+ "CH=5.0\n",
+ "angleFCH=60.0*pi/180\n",
+ "\n",
+ "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n",
+ "#For left hand side part of the frame\n",
+ "#moment at C\n",
+ "\n",
+ "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n",
+ "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assuming the directions for FFC and FBC \n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "#FFC=FBC*sqrt(2)-RA\n",
+ "\n",
+ "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n",
+ "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFC=FBC*sqrt(2)-RA\n",
+ "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n",
+ "\n",
+ "#Joint B: sum of forces normal to AC = 0, gives \n",
+ "\n",
+ "FBF=PC*cos(angleACH)\n",
+ "\n",
+ "#sum of forces parallel to AC = 0, gives \n",
+ "\n",
+ "FAB=FBC+PC*sin(angleACH)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#JOINT A\n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n",
+ "\n",
+ "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_vhNgss4.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_vhNgss4.ipynb
new file mode 100644
index 00000000..09420950
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_vhNgss4.ipynb
@@ -0,0 +1,1030 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter3-TRUSSES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.1 Page number68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 45.0 °\n",
+ "FCB= 56.57 KN\n",
+ "FCD= 40.0 KN\n",
+ "FDB= 40.0 KN\n",
+ "FDE= 40.0 KN\n",
+ "FBE= 113.14 KN\n",
+ "FBA= 120.0 KN\n",
+ "Member , Magnitude of Force in KN , Nature\n",
+ "AB , 120.0 , Tension\n",
+ "BC , 56.57 , Tension\n",
+ "CD , 40.0 , Compresion\n",
+ "DE , 40.0 , Compresion\n",
+ "BE , 113.14 , Compresion\n",
+ "BD , 40.0 , Tension\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#Determine the inclinations of all inclined members\n",
+ "\n",
+ "theta=atan(1)*180/pi\n",
+ "\n",
+ "print \"theta=\",round(theta,2),\"°\"\n",
+ "\n",
+ "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n",
+ "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n",
+ " \n",
+ "P=40.0\n",
+ "FCB=P/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\"\n",
+ "\n",
+ "#Now sum H=0 indicates that FCD should act towards C.\n",
+ "\n",
+ "FCD=FCB*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,2),\"KN\"\n",
+ "\n",
+ "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n",
+ "\n",
+ "FDB=40.0\n",
+ "FDE=40.0\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\"\n",
+ "\n",
+ "print \"FDE=\",round(FDE,2),\"KN\"\n",
+ "\n",
+ "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n",
+ "\n",
+ "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n",
+ "\n",
+ "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n",
+ "\n",
+ "print \"FBE=\", round(FBE,2),\"KN\"\n",
+ "print \"FBA=\", round(FBA,2),\"KN\"\n",
+ "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n",
+ "\n",
+ "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n",
+ "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n",
+ "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n",
+ "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n",
+ "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n",
+ "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n",
+ "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.2 Page number70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 83.7158 KN (Comp.)\n",
+ "FAE= 41.8579 KN (Tension)\n",
+ "FDC= 89.4893 KN (Comp.)\n",
+ "FDE= 44.7446 KN (Tension)\n",
+ "FBC= 60.6218 KN (Comp.)\n",
+ "FCE= 31.7543 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=40.0\n",
+ "PC=50.0\n",
+ "PE=60.0\n",
+ "\n",
+ "theta=60.0\n",
+ "\n",
+ "RD=(PC*3+PE*2+PB*1)/(4.0)\n",
+ "\n",
+ "RA=PB+PC+PE-RD\n",
+ "\n",
+ "FAB=RA/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n",
+ "\n",
+ "FAE=FAB*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FDC=RD/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FDE=FDC*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "FBC=(FAB+FBE)*(0.5)\n",
+ "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n",
+ "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.3 Page number72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAB= 23.09 KN [Comp.]\n",
+ "FAC= 11.55 KN [Tensile]\n",
+ "FDB= 20.0 KN [Comp.]\n",
+ "FDC= 17.32 KN [Tensile]\n",
+ "FCB= 11.55 KN FCB= 11.55 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=20.0 #Load at point B,KN\n",
+ "PC=10.0 #Load at point C,KN \n",
+ "thetaA=60.0 #angleBAC\n",
+ "thetaD=30.0 #angleBDC\n",
+ "\n",
+ "AC=3.0 #length,m\n",
+ "CD=3.0 #length,m\n",
+ "\n",
+ "AB=(AC+CD)*cos(thetaA*pi/180)\n",
+ "BD=(AC+CD)*cos(thetaD*pi/180)\n",
+ "#mistake in book\n",
+ "#angleBCA=angleABC=theta\n",
+ "\n",
+ "theta=(180.0-thetaA)/(2.0) \n",
+ "\n",
+ "#Taking moment about A, we get\n",
+ "\n",
+ "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n",
+ "\n",
+ "RA=PC+PB-RD\n",
+ "#Joint A\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FAB=RA/sin(thetaA*pi/180)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n",
+ "FAC=FAB*cos(thetaA*pi/180)\n",
+ "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint D\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FDB=RD/sin(thetaD*pi/180)\n",
+ "\n",
+ "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n",
+ "FDC=FDB*cos(thetaD*pi/180)\n",
+ "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n",
+ "\n",
+ "#Joint C\n",
+ "#vertical & horizontal forces sum to zero\n",
+ "\n",
+ "FCB=PC/sin(theta*pi/180)\n",
+ "\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\n",
+ "\n",
+ "#CHECK\n",
+ "\n",
+ "FCB=(FDC-FAC)/cos(theta*pi/180)\n",
+ "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.4 Page number74\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FBF= 42.4264 KN (Tension)\n",
+ "FBC= 30.0 KN (Comp.)\n",
+ "FCF= 50.0 KN (Comp.)\n",
+ "FCD= 30.0 KN (Comp.)\n",
+ "FDF= 70.7107 KN (Tensile)\n",
+ "FDF= 70.7107 KN Checked\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,atan,pi,sin,cos\n",
+ "\n",
+ "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=30.0 #vertical load at point B,KN\n",
+ "PC=50.0 #vertical load at point C,KN \n",
+ "PDv=40.0 #vertical load at point D,KN\n",
+ "PDh=20.0 #Horizontal load at point D,KN\n",
+ "PF=30.0 #vertical load at point F,KN\n",
+ "HA=PDh\n",
+ "\n",
+ "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n",
+ "\n",
+ "VA=PB+PC+PDv+PF-RE\n",
+ "\n",
+ "#joint A\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FAB=VA\n",
+ "FAF=HA\n",
+ "\n",
+ "#joint E\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "FED=RE\n",
+ "FEF=0\n",
+ "\n",
+ "#Joint B: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FBF=(VA-PB)/sin(theta*pi/180)\n",
+ "\n",
+ "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n",
+ "\n",
+ "FBC=FBF*cos(theta*pi/180)\n",
+ "\n",
+ "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint C: \n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "\n",
+ "FCF=PC\n",
+ "\n",
+ "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "FCD=FBC\n",
+ "\n",
+ "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n",
+ "\n",
+ "#Joint D: Noting that inclined member is at 45°\n",
+ "#sum of vertical & sum of horizontal forces is zero.\n",
+ "\n",
+ "theta=45.0\n",
+ "FDF=(RE-PDv)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n",
+ "\n",
+ "#check\n",
+ "\n",
+ "FDF=(FCD+PDh)/cos(theta*pi/180)\n",
+ "\n",
+ "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example3.5 Page number75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FED= 25.0 KN (Tension)\n",
+ "FEF= 15.0 KN (Comp.)\n",
+ "FAB= 20.0 KN (Comp.)\n",
+ "FAF= 15.0 KN (Comp.)\n",
+ "FCB= 25.0 KN (Comp.)\n",
+ "FCD= 20.0 KN (Tension)\n",
+ "FBF= 0.0\n",
+ "FBD= 15.0 KN (Tension)\n",
+ "FFD= 0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,asin,pi,sin,cos\n",
+ "\n",
+ "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PE=20.0\n",
+ "AF=3.0\n",
+ "FE=3.0\n",
+ "AB=4.0\n",
+ "FD=4.0\n",
+ "BD=3.0\n",
+ "CD=4.0\n",
+ "\n",
+ "BF=sqrt(pow(AF,2)+pow(AB,2))\n",
+ "DE=BF\n",
+ "BC=DE\n",
+ "\n",
+ "#sin(theta)=AB/BF\n",
+ "#cos(theta)=AF/BF\n",
+ "\n",
+ "theta=asin(AB/BF)\n",
+ "#As soon as a joint is analysed the forces on the joint are marked on members \n",
+ "\n",
+ "#Joint E\n",
+ "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n",
+ "\n",
+ "FED=PE/sin(theta)\n",
+ "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FEF=FED*cos(theta)\n",
+ "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n",
+ "#Taking moment at point A,\n",
+ "\n",
+ "RC=PE*6/8 \n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "VA=PE\n",
+ "HA=RC\n",
+ "\n",
+ "#Joint A\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FAB=VA\n",
+ "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAF=HA\n",
+ "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint C\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "FCB=RC/cos(theta)\n",
+ "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FCD=FCB*sin(theta)\n",
+ "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint B\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n",
+ "\n",
+ "print\"FBF=\",round(FBF)\n",
+ "\n",
+ "FBD=FCB*cos(theta)\n",
+ "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#joint F\n",
+ "#sum of vertical & sun of horizontal forces is zero.\n",
+ "\n",
+ "FFD=FBF\n",
+ "print\"FFD=\",round(FFD)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.6 page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FHG= 25.0 KN (Comp.)\n",
+ "FHF= 15.0 KN (Tension)\n",
+ "FAC= 18.0278 KN (Comp.)\n",
+ "FAB= 15.0 KN (Tension)\n",
+ "FBC= 0.0\n",
+ "FBD=FBA 15.0 KN (Tension)\n",
+ "FCE=FCA 18.0278 KN (Comp.)\n",
+ "FDE= 0.0\n",
+ "FDF=FDB 15.0 KN (Tension)\n",
+ "FEF= 0\n",
+ "FEG=FCE= 18.0278 KN (Comp.)\n",
+ "FFG= 12.0 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan, cos , sin, pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=2.0 #length of beam AB,m\n",
+ "BD=2.0 #length of beam BD,m\n",
+ "DF=2.0 #length of beam DF,m\n",
+ "FH=3.0 #length of beam FH,m\n",
+ "FG=4.0 #length of beam FG,m\n",
+ "PF=12.0 #Vertical Load at point F,KN\n",
+ "PH=20.0 #Vertical Load at point H,KN\n",
+ "\n",
+ "#mistake in book FG=4.0 , given FG=2.0 \n",
+ "\n",
+ "theta1=atan(FG/(AB+BD+DF))\n",
+ "theta3=atan(FG/FH)\n",
+ "theta2=theta3\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "#joint H\n",
+ "\n",
+ "FHG=PH/sin(theta3)\n",
+ "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FHF=FHG*cos(theta2)\n",
+ "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#taking moment at G\n",
+ "\n",
+ "RA=PH*FH/(AB+BD+DF)\n",
+ "\n",
+ "RG=RA+PF+PH\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAC=RA/sin(theta1)\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n",
+ "\n",
+ "FAB=FAC*cos(theta1)\n",
+ "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=0\n",
+ "print \"FBC=\",round(FBC) \n",
+ "FBA=FAB\n",
+ "FBD=FBA\n",
+ "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n",
+ " \n",
+ "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n",
+ "\n",
+ "FCA=FAC\n",
+ "FCE=FCA\n",
+ "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=0\n",
+ "print \"FDE=\",round(FDE) \n",
+ "\n",
+ "FDB=FBD\n",
+ "FDF=FDB\n",
+ "\n",
+ "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n",
+ "\n",
+ "FEF=0\n",
+ "\n",
+ "print \"FEF=\",FEF\n",
+ "\n",
+ "FEG=FCE\n",
+ "\n",
+ "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#Joint F:\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=PF\n",
+ "\n",
+ "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.7 page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FGF= 23.094 KN (Tension)\n",
+ "FGE= 11.547 KN (Comp.)\n",
+ "FFG= 23.094 KN (Comp.)\n",
+ "FFD= 13.094 KN (Tension)\n",
+ "FAB= 36.7543 KN (Comp.)\n",
+ "FAC= 8.3771 KN (Tension)\n",
+ "FBC= 9.4338 KN (Comp.)\n",
+ "FBD= 13.6603 KN (Comp.)\n",
+ "FCD= 9.4338 KN (Tension)\n",
+ "FCE= 1.0566 KN (Comp.)\n",
+ "FDE= 44.0748 KN (Comp.)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "AB=3.0\n",
+ "BC=AB\n",
+ "AC=AB\n",
+ "BD=BC\n",
+ "CD=BD\n",
+ "CE=CD\n",
+ "DE=CE\n",
+ "EF=DE\n",
+ "DF=DE\n",
+ "EG=DE\n",
+ "FG=DF\n",
+ "\n",
+ "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n",
+ "\n",
+ "PB=40.0 #Vertical Loading at point B,KN\n",
+ "PD=30.0 #Vertical Loading at point D,KN\n",
+ "HF=10.0 #Horizontal Loading at point F,KN\n",
+ "PG=20.0 #Vertical Loading at point G,KN\n",
+ "\n",
+ "#joint G\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGF=PG/sin(theta)\n",
+ "\n",
+ "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FGE=FGF*cos(theta)\n",
+ "\n",
+ "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint F\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FFG=FGF\n",
+ "\n",
+ "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFE=FGF\n",
+ "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n",
+ "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n",
+ "#moment about point A\n",
+ "\n",
+ "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n",
+ "\n",
+ "VA=PB+PD+PG-RE\n",
+ "\n",
+ "HA=HF\n",
+ "\n",
+ "#joint A\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FAB=VA/sin(theta)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FAC=FAB*cos(theta)-HF\n",
+ "\n",
+ "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "\n",
+ "#joint B\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FBC=(PB-FAB*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FBA=FAB\n",
+ "FBD=-FBC*cos(theta)+FBA*cos(theta)\n",
+ "\n",
+ "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint C\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FCD=FBC*sin(theta)/sin(theta)\n",
+ "\n",
+ "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n",
+ "\n",
+ "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#joint D\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FDE=(PD+FCD*sin(theta))/sin(theta)\n",
+ "\n",
+ "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.8 page number82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FFH= 69.282 KN (Comp.)\n",
+ "FGH= 5.7735 KN (Comp.)\n",
+ "FGI= 72.1688 KN (Tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi\n",
+ "\n",
+ "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PB=10.0\n",
+ "PD=PB\n",
+ "PF=PD\n",
+ "AB=4.0\n",
+ "BC=AB\n",
+ "AC=BC\n",
+ "BD=BC\n",
+ "CD=BC\n",
+ "DE=CD\n",
+ "CE=CD\n",
+ "DF=DE\n",
+ "EF=DE\n",
+ "EG=DE\n",
+ "FG=EF\n",
+ "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n",
+ "AG=AC+CE+EG\n",
+ "BG=CE+EG+AC/2\n",
+ "DG=EG+CE/2\n",
+ "FG1=EG/2\n",
+ "RA=PB*7/2\n",
+ "RO=RA\n",
+ "theta=60.0*pi/180\n",
+ "#moment at point G\n",
+ "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n",
+ "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "\n",
+ "FGH=(RA-PB-PD-PF)/(sin(theta))\n",
+ "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FGI=FFH+FGH*cos(theta)\n",
+ "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.9 page number 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FL3L4= 412.5 KN (Tension)\n",
+ "FU4U3= 456.2 KN (Comp.)\n",
+ "FU4L3= 62.5 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin,acos,sin,cos,sqrt\n",
+ "\n",
+ "#To determine reactions, consider equilibrium equations\n",
+ "\n",
+ "#variable declaration\n",
+ " #all Vertical loading are in KN\n",
+ "PL1=200.0 \n",
+ "PL2=200.0\n",
+ "PL3=150.0\n",
+ "PL4=100.0\n",
+ "PL5=100.0\n",
+ "\n",
+ "#length in m\n",
+ "UL1=6.0\n",
+ "UL2=8.0\n",
+ "UL3=9.0\n",
+ "UL4=UL2\n",
+ "UL5=UL1\n",
+ "\n",
+ "L1=6.0\n",
+ "L2=6.0\n",
+ "L3=6.0\n",
+ "L4=6.0\n",
+ "L5=6.0\n",
+ "L6=6.0\n",
+ "\n",
+ "#moment at point LO\n",
+ "\n",
+ "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n",
+ "\n",
+ "R1=PL1+PL2+PL3+PL4+PL5-R2\n",
+ "\n",
+ "#Take the section (1)–(1) and consider the right hand side part.\n",
+ "\n",
+ "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n",
+ "theta1=asin(1/U3U4)\n",
+ "\n",
+ "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n",
+ "theta2=asin(6/L3U4)\n",
+ "\n",
+ "#moment at U4\n",
+ "\n",
+ "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n",
+ "\n",
+ "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#moment at L3\n",
+ "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n",
+ "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "#sum of horizontal forces \n",
+ "FL4L3=FL3L4\n",
+ "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n",
+ "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.10 page number84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "theta= 60.0 °\n",
+ "F2= 51.9615 KN (Tension)\n",
+ "F1= 110.0 KN (Comp.)\n",
+ "F3= 69.282 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import atan,tan,sin,cos,pi\n",
+ "\n",
+ "#Each load is 20 kN.\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=20.0\n",
+ "AB=18.0\n",
+ "A=3.0\n",
+ "\n",
+ "RA=P*7/2\n",
+ "RB=RA\n",
+ "\n",
+ "theta1=30.0*pi/180\n",
+ "a=(3*A)/(4*cos(theta1))\n",
+ "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n",
+ "#Drop perpendicular CE on AB. \n",
+ "\n",
+ "CE=3*A*tan(theta1)\n",
+ "DE=A\n",
+ "\n",
+ "theta=atan(CE/DE)*180/pi\n",
+ "print \"theta=\",round(theta),\"°\"\n",
+ "\n",
+ "#moment at point A\n",
+ "\n",
+ "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n",
+ "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#sum of all vertical forces & sum of all horizotal forces is zero\n",
+ "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n",
+ "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n",
+ "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 3.11 page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "FAE= 30.0 KN (Tension)\n",
+ "FBC= 71.4 KN (Comp.)\n",
+ "FFC= 40.98 KN (Tension)\n",
+ "FAB= 92.62 KN (Comp.)\n",
+ "FAF= 40.98 KN (Tension)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,cos,pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "PA=15.0 #vertical loading at point A,KN\n",
+ "PB=30.0 #vertical loading at point B,KN\n",
+ "PC=30.0 #vertical loading at point C,KN\n",
+ "PD=30.0 #vertical loading at point D,KN\n",
+ "PE=15.0 #vertical loading at point E,KN\n",
+ "\n",
+ "#Due to symmetry, the reactions are equal\n",
+ "RA=(PA+PB+PC+PD+PE)/2\n",
+ "RB=RA\n",
+ "#Drop perpendicular CH on AF. \n",
+ "#in traingle ACH\n",
+ "\n",
+ "angleACH=45.0*pi/180 #angleACH,°\n",
+ "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n",
+ "CH=5.0\n",
+ "angleFCH=60.0*pi/180\n",
+ "\n",
+ "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n",
+ "#For left hand side part of the frame\n",
+ "#moment at C\n",
+ "\n",
+ "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n",
+ "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assuming the directions for FFC and FBC \n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "#FFC=FBC*sqrt(2)-RA\n",
+ "\n",
+ "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n",
+ "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "FFC=FBC*sqrt(2)-RA\n",
+ "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n",
+ "\n",
+ "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n",
+ "\n",
+ "#Joint B: sum of forces normal to AC = 0, gives \n",
+ "\n",
+ "FBF=PC*cos(angleACH)\n",
+ "\n",
+ "#sum of forces parallel to AC = 0, gives \n",
+ "\n",
+ "FAB=FBC+PC*sin(angleACH)\n",
+ "\n",
+ "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#JOINT A\n",
+ "#sum of vertical & sum of horizontal forces is zero\n",
+ "\n",
+ "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n",
+ "\n",
+ "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_JAwYggT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_JAwYggT.ipynb
new file mode 100644
index 00000000..d78e1aa8
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_JAwYggT.ipynb
@@ -0,0 +1,1403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.1 page number 102\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 407.44 mm\n",
+ "yc= 101.65 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=600.0 #length of wire AB,mm\n",
+ "L2=200.0 #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "\n",
+ "X1=300.0\n",
+ "X2=600.0\n",
+ "X3=600.0-150*cos(theta)\n",
+ "Y1=0\n",
+ "Y2=100\n",
+ "Y3=200+150*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.2 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 451.2 mm\n",
+ "yc= 54.07 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=400.0 #length of wire AB,mm\n",
+ "L2=150.0*pi #length of wire BC,mm\n",
+ "L3=250.0 #length of wire CD,mm\n",
+ "theta=30*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=200.0\n",
+ "X2=475.0\n",
+ "X3=400+300.0+250*cos(theta)/2\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=2*150/pi\n",
+ "Y3=125*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.3 page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.19 mm\n",
+ "yc= 198.5 mm\n",
+ "zc= 56.17 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "# The length and the centroid of portions AB, BC and CD \n",
+ "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=100.0*pi #length of wire AB,mm\n",
+ "L2=140.0*pi #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=100.0\n",
+ "X2=0\n",
+ "X3=300*sin(theta)\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=140\n",
+ "Y3=280+300*cos(theta)\n",
+ "Z1=2*100/pi\n",
+ "Z2=2*140/pi\n",
+ "Z3=0\n",
+ "\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n",
+ "\n",
+ "print \"zc=\",round(zc,2),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.4 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 0.0\n",
+ "yc= 40.0 mm\n",
+ "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20.0 #Area of 1 ,mm^2\n",
+ "A2=20.0*100.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=10\n",
+ "Y2=70\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.5 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 36.62\n",
+ "yc= 61.62 mm\n",
+ "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=150.0*12.0 #Area of 1 ,mm^2\n",
+ "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=75\n",
+ "X2=6\n",
+ "\n",
+ "Y1=6\n",
+ "Y2=12+(200-12)/2\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.6 page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yc= 59.71 mm\n",
+ "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20 #Area of 1 ,mm^2\n",
+ "A2=100.0*20.0 #Area of 2,mm^2\n",
+ "A3=150.0*30.0 #Area of 3,mm^2\n",
+ "\n",
+ "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=30+100+20/2\n",
+ "Y2=30+100/2\n",
+ "Y3=30/2\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.7 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 3.523 m\n",
+ "yc= 2.777 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n",
+ "A2=2.0*7.5 #Area of 2,m^2\n",
+ "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n",
+ "A4=1.0*4.0 #Area of 4,m^2\n",
+ "\n",
+ "#The composite figure can be conveniently divided into two triangles and two rectangle\n",
+ "\n",
+ "X1=2.0*2.0/3.0\n",
+ "X2=2.0+1.0\n",
+ "X3=2.0+2.0+(1.0*3.0/3.0)\n",
+ "X4=4.0+4.0/2.0\n",
+ "\n",
+ "Y1=6.0/3.0\n",
+ "Y2=7.5/2.0\n",
+ "Y3=1.0+5.0/3.0\n",
+ "Y4=1/2.0\n",
+ "\n",
+ "A=A1+A2+A3+A4\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,3),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.8 page number 114\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 2.995 m\n",
+ "yc= 1.89 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n",
+ "\n",
+ "from math import pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n",
+ "A2=6.0*4.0 #Area of 2,m^2\n",
+ "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n",
+ "\n",
+ "#The coordinates of centroids of these three simple figures are:\n",
+ "\n",
+ "X1=6.0+3.0/3.0\n",
+ "X2=3.0\n",
+ "X3=-(4*2)/(3.0*pi)\n",
+ "\n",
+ "Y1=4.0/3.0\n",
+ "Y2=2.0\n",
+ "Y3=2.0\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,4),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.9 page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 145.42 m\n",
+ "yc= 90.39 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ar=160.0*280.0 #Area of rectangle,mm^2\n",
+ "At=280.0*40.0/2.0 #Area of triangle,mm^2\n",
+ "d=21.5 #diameter of hole,mm \n",
+ "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n",
+ "\n",
+ "A=Ar+At+Ah*6\n",
+ "\n",
+ "\n",
+ "Xr=140.0\n",
+ "Xt=560/3.0\n",
+ "Xh1=70.0\n",
+ "Xh2=140.0\n",
+ "Xh3=210.0\n",
+ "Xh4=70.0\n",
+ "Xh5=140.0\n",
+ "Xh6=210.0\n",
+ "\n",
+ "Yr=80.0\n",
+ "Yt=160.0+40.0/3.0\n",
+ "Yh1=50.0\n",
+ "Yh2=50.0\n",
+ "Yh3=50.0\n",
+ "Yh4=120.0\n",
+ "Yh5=130.0\n",
+ "Yh6=140.0\n",
+ "\n",
+ "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.10 page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.48 mm\n",
+ "yc= 67.86 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n",
+ "\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ap=200.0*150.0 #Area of plate,mm^2\n",
+ "At=100.0*75.0/2.0 #Area of triangle,mm^2\n",
+ "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=200.0-100.0/3.0\n",
+ "#X3=Xc\n",
+ "\n",
+ "Y1=75.0\n",
+ "Y2=150.0-25.0\n",
+ "#Y3=Yc\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "xc=(Ap*X1-At*X2)/(Ah+A)\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "yc=(Ap*Y1-At*Y2)/(Ah+A)\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.11 page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 326.4 m\n",
+ "yc= 219.12 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "X=40.0\n",
+ "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n",
+ "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n",
+ "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n",
+ "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n",
+ "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n",
+ "\n",
+ "X1=7.0*X\n",
+ "X2=14*X+2*X\n",
+ "X3=2*X\n",
+ "X4=6.0*X\n",
+ "X5=14.0*X-(16*X/(3*pi))\n",
+ "\n",
+ "Y1=6.0*X\n",
+ "Y2=4.0*X/3.0\n",
+ "Y3=8.0*X+2.0*X\n",
+ "Y4=(16.0*X)/(3*pi)\n",
+ "Y5=12*X-4*(4*X/(3*pi))\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.12 page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 6372441.9 mm^4\n",
+ "Iyy= 2824166.0 mm^4\n",
+ "kxx= 46.88 mm\n",
+ "kyy= 31.21 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=150.0*10.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=10.0+70.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n",
+ "\n",
+ "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n",
+ "\n",
+ "\n",
+ "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n",
+ "#The radius of gyration is given by\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print\"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print\"kyy=\",round(kyy,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.13 page number 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 3411298.7 mm^4\n",
+ "Iyy= 1208657.7 mm^4\n",
+ "Izz= 4619956.4 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=125.0*10.0 #Area of 1,mm^2\n",
+ "A2=75.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "\n",
+ "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n",
+ "\n",
+ "#The distance of centroid from the axis (1)–(1)\n",
+ "\n",
+ "X1=5.0\n",
+ "X2=10.0+75.0/2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "#Similarly, the distance of the centroid from the axis (2)–(2)\n",
+ "\n",
+ "Y1=125.0/2\n",
+ "Y2=5.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n",
+ "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# eample 4.14 page number 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 59269202.1 mm^4\n",
+ "Iyy= 12005814.8 mm^4\n",
+ "Izz= 71275016.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=200.0*9.0 #Area of 1,mm^2\n",
+ "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n",
+ "A3=200.0*9.0 #Area of 3,mm^2 \n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The section is symmetrical about both x-x and y-y axis. \n",
+ "X1=0\n",
+ "X2=0\n",
+ "X3=0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "\n",
+ "Y1=245.5\n",
+ "Y2=125.0\n",
+ "Y3=4.5\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n",
+ "\n",
+ "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "#misprint in book\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.15 page number 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 135903229.0 mm^4\n",
+ "Iyy= 5276363.1 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*13.5 #Area of 1,mm^2\n",
+ "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n",
+ "A3=100.0*13.5 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n",
+ "\n",
+ "X1=50.0\n",
+ "X2=8.1/2.0\n",
+ "X3=50.0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "Y1=386.5+13.5/2.0\n",
+ "Y2=200.0\n",
+ "Y3=13.5/2\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y\n",
+ "\n",
+ "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.16 page number 134\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Polar moment of Inertia= 32109472.0 mm^4\n",
+ "kxx= 90.3 mm\n",
+ "kyy= 23.09 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The section is divided into three rectangles A1, A2 and A3\n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=80.0*12.0 #Area of 1,mm^2\n",
+ "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n",
+ "A3=120.0*10.0 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n",
+ "\n",
+ "Y1=150-6\n",
+ "Y2=(128/2) +10\n",
+ "Y3=5\n",
+ "\n",
+ "yc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "X1=60.0\n",
+ "X2=60.0\n",
+ "X3=60.0\n",
+ "\n",
+ "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n",
+ "\n",
+ "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n",
+ "\n",
+ "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n",
+ "\n",
+ "\n",
+ "\n",
+ "PolarmomentofInertia=Ixx+Iyy\n",
+ "\n",
+ "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print \"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print \"kyy=\",round(kyy,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.17 page number 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 31543827.2 mm^4\n",
+ "Iyy= 19745121.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#The given composite section may be divided into simple rectangles and triangle\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*30.0 #Area of 1,mm^2\n",
+ "A2=100.0*25.0 #Area of 2,mm^2\n",
+ "A3=200.0*20.0 #Area of 3,mm^2 \n",
+ "A4=87.5*20.0/2.0 #Area of 4,mm^2\n",
+ "A5=87.5*20.0/2.0 #Area of 5,mm^2\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=100.0\n",
+ "X3=100.0\n",
+ "X4=2.0*87.5/3.0\n",
+ "X5=200-X4\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "Y1=135.0\n",
+ "Y2=70.0\n",
+ "Y3=10.0\n",
+ "Y4=(20.0/3.0)+20.0\n",
+ "Y5=Y4\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n",
+ "\n",
+ "\n",
+ "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.18 page number137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 806093331.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n",
+ "#The given section is split up into simple rectangles\n",
+ "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=400*20.0\n",
+ "A2=100*10\n",
+ "A3=10*380.0\n",
+ "A4=100*10.0\n",
+ "\n",
+ "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.19 page number 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 50399393.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The built-up section is divided into six simple rectangles\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=250.0*10.0 #Area of 1,mm^2\n",
+ "A2=40.0*10.0 #Area of 2,mm^2\n",
+ "\n",
+ "A=A1*2+A2*4 #Total area,mm^2 \n",
+ "\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=30.0\n",
+ "Y3=15.0\n",
+ "Y4=255.0\n",
+ "Y5=135.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n",
+ "\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.20 page number 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "145.394736842\n",
+ "Ixx= 752680131.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Each angle is divided into two rectangles \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=600.0*15.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A3=150.0*10.0\n",
+ "A4=400.0*20.0\n",
+ "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n",
+ "\n",
+ "#The distance of the centroidal axis from the bottom fibres of section \n",
+ "\n",
+ "Y1=320.0\n",
+ "Y2=100.0\n",
+ "Y3=25.0\n",
+ "Y4=10.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n",
+ "print yc\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n",
+ "\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.21 page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 36000000.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import asin,sin,cos,pi\n",
+ "\n",
+ "#The rectangle is divided into four triangles\n",
+ "#The lines AE and FC are parallel to x-axis\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "theta=asin(4.0/5.0)\n",
+ "\n",
+ "AB=100.0\n",
+ "BK=AB*sin((90*pi/180)-theta)\n",
+ "ND=BK\n",
+ "FD=60.0/sin(theta)\n",
+ "AF=150.0-FD\n",
+ "FL=ME=75.0*sin(theta)\n",
+ "AE=AB/cos((90*pi/180)-theta)\n",
+ "FC=AE\n",
+ "A=125.0*60.0/2.0\n",
+ "\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.22, page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 4292979.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n",
+ "\n",
+ "#variable declaration\n",
+ "#Now,Moment of inertia of the section about axis AB\n",
+ "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.23 page number141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "106.435694487 28.4724404943\n",
+ "Ixx= 686943.0 mm^4\n",
+ "Iyy= 17146488.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "r=20.0 #radius of semicircle\n",
+ "A1=80.0*20.0/2 #Area of triangle ABC \n",
+ "A3=40.0*80.0 #Area of rectangle ACDE \n",
+ "A4=pi*pow(r,2)/2 #Area of semicircle\n",
+ "At1=30.0*20.0/2.0\n",
+ "At2=50.0*20.0/2.0\n",
+ "A=A1+A3-A4 #Total area\n",
+ "\n",
+ "X1=2.0*30.0/3.0\n",
+ "X2=50.0*30.0/3.0\n",
+ "X3=40.0\n",
+ "X4=40.0\n",
+ "\n",
+ "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n",
+ "#mistake in book\n",
+ "\n",
+ "Y1=(20.0/3.0)+40.0\n",
+ "Y3=20.0\n",
+ "Y4=(4.0*20.0)/(3.0*pi)\n",
+ "\n",
+ "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n",
+ "print xc,yc\n",
+ "#\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n",
+ "\n",
+ "print\"Ixx=\",round(Ixx),\"mm^4\"\n",
+ "\n",
+ "\n",
+ "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n",
+ "\n",
+ "print\"Iyy=\",round(Iyy),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.27 page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "25000.0 5625.0 235.619449019 7889.38055098\n",
+ "xc= 0.411 m\n",
+ "yc= 0.329 m\n",
+ "zc= 0.221 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n",
+ "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "W=25000.0 # weight of concrete=25000, N/m^3\n",
+ "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n",
+ "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n",
+ "W3=2500\n",
+ "\n",
+ "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n",
+ "\n",
+ "X1=0.375\n",
+ "X2=0.5\n",
+ "X3=0.5\n",
+ "\n",
+ "Y1=0.3\n",
+ "Y2=0.4\n",
+ "Y3=0.4\n",
+ "\n",
+ "Z1=0.25\n",
+ "Z2=0.15\n",
+ "Z3=0.15\n",
+ "\n",
+ "Wt=W3+W1-W2\n",
+ "print W,W1,W2,Wt\n",
+ "xc=(W1*X1-W2*X2+W3*X3)/Wt\n",
+ "\n",
+ "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n",
+ "\n",
+ "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n",
+ "\n",
+ "print\"xc=\",round(xc,3),\"m\"\n",
+ "print\"yc=\",round(yc,3),\"m\"\n",
+ "print\"zc=\",round(zc,3),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_N9DqFsm.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_N9DqFsm.ipynb
new file mode 100644
index 00000000..d78e1aa8
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_N9DqFsm.ipynb
@@ -0,0 +1,1403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.1 page number 102\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 407.44 mm\n",
+ "yc= 101.65 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=600.0 #length of wire AB,mm\n",
+ "L2=200.0 #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "\n",
+ "X1=300.0\n",
+ "X2=600.0\n",
+ "X3=600.0-150*cos(theta)\n",
+ "Y1=0\n",
+ "Y2=100\n",
+ "Y3=200+150*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.2 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 451.2 mm\n",
+ "yc= 54.07 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=400.0 #length of wire AB,mm\n",
+ "L2=150.0*pi #length of wire BC,mm\n",
+ "L3=250.0 #length of wire CD,mm\n",
+ "theta=30*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=200.0\n",
+ "X2=475.0\n",
+ "X3=400+300.0+250*cos(theta)/2\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=2*150/pi\n",
+ "Y3=125*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.3 page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.19 mm\n",
+ "yc= 198.5 mm\n",
+ "zc= 56.17 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "# The length and the centroid of portions AB, BC and CD \n",
+ "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=100.0*pi #length of wire AB,mm\n",
+ "L2=140.0*pi #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=100.0\n",
+ "X2=0\n",
+ "X3=300*sin(theta)\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=140\n",
+ "Y3=280+300*cos(theta)\n",
+ "Z1=2*100/pi\n",
+ "Z2=2*140/pi\n",
+ "Z3=0\n",
+ "\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n",
+ "\n",
+ "print \"zc=\",round(zc,2),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.4 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 0.0\n",
+ "yc= 40.0 mm\n",
+ "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20.0 #Area of 1 ,mm^2\n",
+ "A2=20.0*100.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=10\n",
+ "Y2=70\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.5 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 36.62\n",
+ "yc= 61.62 mm\n",
+ "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=150.0*12.0 #Area of 1 ,mm^2\n",
+ "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=75\n",
+ "X2=6\n",
+ "\n",
+ "Y1=6\n",
+ "Y2=12+(200-12)/2\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.6 page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yc= 59.71 mm\n",
+ "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20 #Area of 1 ,mm^2\n",
+ "A2=100.0*20.0 #Area of 2,mm^2\n",
+ "A3=150.0*30.0 #Area of 3,mm^2\n",
+ "\n",
+ "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=30+100+20/2\n",
+ "Y2=30+100/2\n",
+ "Y3=30/2\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.7 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 3.523 m\n",
+ "yc= 2.777 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n",
+ "A2=2.0*7.5 #Area of 2,m^2\n",
+ "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n",
+ "A4=1.0*4.0 #Area of 4,m^2\n",
+ "\n",
+ "#The composite figure can be conveniently divided into two triangles and two rectangle\n",
+ "\n",
+ "X1=2.0*2.0/3.0\n",
+ "X2=2.0+1.0\n",
+ "X3=2.0+2.0+(1.0*3.0/3.0)\n",
+ "X4=4.0+4.0/2.0\n",
+ "\n",
+ "Y1=6.0/3.0\n",
+ "Y2=7.5/2.0\n",
+ "Y3=1.0+5.0/3.0\n",
+ "Y4=1/2.0\n",
+ "\n",
+ "A=A1+A2+A3+A4\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,3),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.8 page number 114\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 2.995 m\n",
+ "yc= 1.89 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n",
+ "\n",
+ "from math import pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n",
+ "A2=6.0*4.0 #Area of 2,m^2\n",
+ "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n",
+ "\n",
+ "#The coordinates of centroids of these three simple figures are:\n",
+ "\n",
+ "X1=6.0+3.0/3.0\n",
+ "X2=3.0\n",
+ "X3=-(4*2)/(3.0*pi)\n",
+ "\n",
+ "Y1=4.0/3.0\n",
+ "Y2=2.0\n",
+ "Y3=2.0\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,4),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.9 page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 145.42 m\n",
+ "yc= 90.39 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ar=160.0*280.0 #Area of rectangle,mm^2\n",
+ "At=280.0*40.0/2.0 #Area of triangle,mm^2\n",
+ "d=21.5 #diameter of hole,mm \n",
+ "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n",
+ "\n",
+ "A=Ar+At+Ah*6\n",
+ "\n",
+ "\n",
+ "Xr=140.0\n",
+ "Xt=560/3.0\n",
+ "Xh1=70.0\n",
+ "Xh2=140.0\n",
+ "Xh3=210.0\n",
+ "Xh4=70.0\n",
+ "Xh5=140.0\n",
+ "Xh6=210.0\n",
+ "\n",
+ "Yr=80.0\n",
+ "Yt=160.0+40.0/3.0\n",
+ "Yh1=50.0\n",
+ "Yh2=50.0\n",
+ "Yh3=50.0\n",
+ "Yh4=120.0\n",
+ "Yh5=130.0\n",
+ "Yh6=140.0\n",
+ "\n",
+ "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.10 page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.48 mm\n",
+ "yc= 67.86 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n",
+ "\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ap=200.0*150.0 #Area of plate,mm^2\n",
+ "At=100.0*75.0/2.0 #Area of triangle,mm^2\n",
+ "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=200.0-100.0/3.0\n",
+ "#X3=Xc\n",
+ "\n",
+ "Y1=75.0\n",
+ "Y2=150.0-25.0\n",
+ "#Y3=Yc\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "xc=(Ap*X1-At*X2)/(Ah+A)\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "yc=(Ap*Y1-At*Y2)/(Ah+A)\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.11 page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 326.4 m\n",
+ "yc= 219.12 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "X=40.0\n",
+ "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n",
+ "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n",
+ "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n",
+ "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n",
+ "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n",
+ "\n",
+ "X1=7.0*X\n",
+ "X2=14*X+2*X\n",
+ "X3=2*X\n",
+ "X4=6.0*X\n",
+ "X5=14.0*X-(16*X/(3*pi))\n",
+ "\n",
+ "Y1=6.0*X\n",
+ "Y2=4.0*X/3.0\n",
+ "Y3=8.0*X+2.0*X\n",
+ "Y4=(16.0*X)/(3*pi)\n",
+ "Y5=12*X-4*(4*X/(3*pi))\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.12 page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 6372441.9 mm^4\n",
+ "Iyy= 2824166.0 mm^4\n",
+ "kxx= 46.88 mm\n",
+ "kyy= 31.21 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=150.0*10.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=10.0+70.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n",
+ "\n",
+ "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n",
+ "\n",
+ "\n",
+ "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n",
+ "#The radius of gyration is given by\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print\"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print\"kyy=\",round(kyy,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.13 page number 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 3411298.7 mm^4\n",
+ "Iyy= 1208657.7 mm^4\n",
+ "Izz= 4619956.4 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=125.0*10.0 #Area of 1,mm^2\n",
+ "A2=75.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "\n",
+ "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n",
+ "\n",
+ "#The distance of centroid from the axis (1)–(1)\n",
+ "\n",
+ "X1=5.0\n",
+ "X2=10.0+75.0/2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "#Similarly, the distance of the centroid from the axis (2)–(2)\n",
+ "\n",
+ "Y1=125.0/2\n",
+ "Y2=5.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n",
+ "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# eample 4.14 page number 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 59269202.1 mm^4\n",
+ "Iyy= 12005814.8 mm^4\n",
+ "Izz= 71275016.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=200.0*9.0 #Area of 1,mm^2\n",
+ "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n",
+ "A3=200.0*9.0 #Area of 3,mm^2 \n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The section is symmetrical about both x-x and y-y axis. \n",
+ "X1=0\n",
+ "X2=0\n",
+ "X3=0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "\n",
+ "Y1=245.5\n",
+ "Y2=125.0\n",
+ "Y3=4.5\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n",
+ "\n",
+ "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "#misprint in book\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.15 page number 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 135903229.0 mm^4\n",
+ "Iyy= 5276363.1 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*13.5 #Area of 1,mm^2\n",
+ "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n",
+ "A3=100.0*13.5 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n",
+ "\n",
+ "X1=50.0\n",
+ "X2=8.1/2.0\n",
+ "X3=50.0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "Y1=386.5+13.5/2.0\n",
+ "Y2=200.0\n",
+ "Y3=13.5/2\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y\n",
+ "\n",
+ "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.16 page number 134\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Polar moment of Inertia= 32109472.0 mm^4\n",
+ "kxx= 90.3 mm\n",
+ "kyy= 23.09 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The section is divided into three rectangles A1, A2 and A3\n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=80.0*12.0 #Area of 1,mm^2\n",
+ "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n",
+ "A3=120.0*10.0 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n",
+ "\n",
+ "Y1=150-6\n",
+ "Y2=(128/2) +10\n",
+ "Y3=5\n",
+ "\n",
+ "yc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "X1=60.0\n",
+ "X2=60.0\n",
+ "X3=60.0\n",
+ "\n",
+ "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n",
+ "\n",
+ "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n",
+ "\n",
+ "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n",
+ "\n",
+ "\n",
+ "\n",
+ "PolarmomentofInertia=Ixx+Iyy\n",
+ "\n",
+ "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print \"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print \"kyy=\",round(kyy,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.17 page number 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 31543827.2 mm^4\n",
+ "Iyy= 19745121.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#The given composite section may be divided into simple rectangles and triangle\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*30.0 #Area of 1,mm^2\n",
+ "A2=100.0*25.0 #Area of 2,mm^2\n",
+ "A3=200.0*20.0 #Area of 3,mm^2 \n",
+ "A4=87.5*20.0/2.0 #Area of 4,mm^2\n",
+ "A5=87.5*20.0/2.0 #Area of 5,mm^2\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=100.0\n",
+ "X3=100.0\n",
+ "X4=2.0*87.5/3.0\n",
+ "X5=200-X4\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "Y1=135.0\n",
+ "Y2=70.0\n",
+ "Y3=10.0\n",
+ "Y4=(20.0/3.0)+20.0\n",
+ "Y5=Y4\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n",
+ "\n",
+ "\n",
+ "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.18 page number137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 806093331.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n",
+ "#The given section is split up into simple rectangles\n",
+ "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=400*20.0\n",
+ "A2=100*10\n",
+ "A3=10*380.0\n",
+ "A4=100*10.0\n",
+ "\n",
+ "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.19 page number 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 50399393.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The built-up section is divided into six simple rectangles\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=250.0*10.0 #Area of 1,mm^2\n",
+ "A2=40.0*10.0 #Area of 2,mm^2\n",
+ "\n",
+ "A=A1*2+A2*4 #Total area,mm^2 \n",
+ "\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=30.0\n",
+ "Y3=15.0\n",
+ "Y4=255.0\n",
+ "Y5=135.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n",
+ "\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.20 page number 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "145.394736842\n",
+ "Ixx= 752680131.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Each angle is divided into two rectangles \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=600.0*15.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A3=150.0*10.0\n",
+ "A4=400.0*20.0\n",
+ "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n",
+ "\n",
+ "#The distance of the centroidal axis from the bottom fibres of section \n",
+ "\n",
+ "Y1=320.0\n",
+ "Y2=100.0\n",
+ "Y3=25.0\n",
+ "Y4=10.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n",
+ "print yc\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n",
+ "\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.21 page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 36000000.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import asin,sin,cos,pi\n",
+ "\n",
+ "#The rectangle is divided into four triangles\n",
+ "#The lines AE and FC are parallel to x-axis\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "theta=asin(4.0/5.0)\n",
+ "\n",
+ "AB=100.0\n",
+ "BK=AB*sin((90*pi/180)-theta)\n",
+ "ND=BK\n",
+ "FD=60.0/sin(theta)\n",
+ "AF=150.0-FD\n",
+ "FL=ME=75.0*sin(theta)\n",
+ "AE=AB/cos((90*pi/180)-theta)\n",
+ "FC=AE\n",
+ "A=125.0*60.0/2.0\n",
+ "\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.22, page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 4292979.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n",
+ "\n",
+ "#variable declaration\n",
+ "#Now,Moment of inertia of the section about axis AB\n",
+ "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.23 page number141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "106.435694487 28.4724404943\n",
+ "Ixx= 686943.0 mm^4\n",
+ "Iyy= 17146488.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "r=20.0 #radius of semicircle\n",
+ "A1=80.0*20.0/2 #Area of triangle ABC \n",
+ "A3=40.0*80.0 #Area of rectangle ACDE \n",
+ "A4=pi*pow(r,2)/2 #Area of semicircle\n",
+ "At1=30.0*20.0/2.0\n",
+ "At2=50.0*20.0/2.0\n",
+ "A=A1+A3-A4 #Total area\n",
+ "\n",
+ "X1=2.0*30.0/3.0\n",
+ "X2=50.0*30.0/3.0\n",
+ "X3=40.0\n",
+ "X4=40.0\n",
+ "\n",
+ "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n",
+ "#mistake in book\n",
+ "\n",
+ "Y1=(20.0/3.0)+40.0\n",
+ "Y3=20.0\n",
+ "Y4=(4.0*20.0)/(3.0*pi)\n",
+ "\n",
+ "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n",
+ "print xc,yc\n",
+ "#\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n",
+ "\n",
+ "print\"Ixx=\",round(Ixx),\"mm^4\"\n",
+ "\n",
+ "\n",
+ "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n",
+ "\n",
+ "print\"Iyy=\",round(Iyy),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.27 page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "25000.0 5625.0 235.619449019 7889.38055098\n",
+ "xc= 0.411 m\n",
+ "yc= 0.329 m\n",
+ "zc= 0.221 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n",
+ "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "W=25000.0 # weight of concrete=25000, N/m^3\n",
+ "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n",
+ "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n",
+ "W3=2500\n",
+ "\n",
+ "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n",
+ "\n",
+ "X1=0.375\n",
+ "X2=0.5\n",
+ "X3=0.5\n",
+ "\n",
+ "Y1=0.3\n",
+ "Y2=0.4\n",
+ "Y3=0.4\n",
+ "\n",
+ "Z1=0.25\n",
+ "Z2=0.15\n",
+ "Z3=0.15\n",
+ "\n",
+ "Wt=W3+W1-W2\n",
+ "print W,W1,W2,Wt\n",
+ "xc=(W1*X1-W2*X2+W3*X3)/Wt\n",
+ "\n",
+ "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n",
+ "\n",
+ "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n",
+ "\n",
+ "print\"xc=\",round(xc,3),\"m\"\n",
+ "print\"yc=\",round(yc,3),\"m\"\n",
+ "print\"zc=\",round(zc,3),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_P9rwEqr.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_P9rwEqr.ipynb
new file mode 100644
index 00000000..d78e1aa8
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_P9rwEqr.ipynb
@@ -0,0 +1,1403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.1 page number 102\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 407.44 mm\n",
+ "yc= 101.65 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=600.0 #length of wire AB,mm\n",
+ "L2=200.0 #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "\n",
+ "X1=300.0\n",
+ "X2=600.0\n",
+ "X3=600.0-150*cos(theta)\n",
+ "Y1=0\n",
+ "Y2=100\n",
+ "Y3=200+150*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.2 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 451.2 mm\n",
+ "yc= 54.07 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=400.0 #length of wire AB,mm\n",
+ "L2=150.0*pi #length of wire BC,mm\n",
+ "L3=250.0 #length of wire CD,mm\n",
+ "theta=30*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=200.0\n",
+ "X2=475.0\n",
+ "X3=400+300.0+250*cos(theta)/2\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=2*150/pi\n",
+ "Y3=125*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.3 page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.19 mm\n",
+ "yc= 198.5 mm\n",
+ "zc= 56.17 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "# The length and the centroid of portions AB, BC and CD \n",
+ "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=100.0*pi #length of wire AB,mm\n",
+ "L2=140.0*pi #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=100.0\n",
+ "X2=0\n",
+ "X3=300*sin(theta)\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=140\n",
+ "Y3=280+300*cos(theta)\n",
+ "Z1=2*100/pi\n",
+ "Z2=2*140/pi\n",
+ "Z3=0\n",
+ "\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n",
+ "\n",
+ "print \"zc=\",round(zc,2),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.4 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 0.0\n",
+ "yc= 40.0 mm\n",
+ "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20.0 #Area of 1 ,mm^2\n",
+ "A2=20.0*100.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=10\n",
+ "Y2=70\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.5 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 36.62\n",
+ "yc= 61.62 mm\n",
+ "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=150.0*12.0 #Area of 1 ,mm^2\n",
+ "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=75\n",
+ "X2=6\n",
+ "\n",
+ "Y1=6\n",
+ "Y2=12+(200-12)/2\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.6 page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yc= 59.71 mm\n",
+ "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20 #Area of 1 ,mm^2\n",
+ "A2=100.0*20.0 #Area of 2,mm^2\n",
+ "A3=150.0*30.0 #Area of 3,mm^2\n",
+ "\n",
+ "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=30+100+20/2\n",
+ "Y2=30+100/2\n",
+ "Y3=30/2\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.7 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 3.523 m\n",
+ "yc= 2.777 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n",
+ "A2=2.0*7.5 #Area of 2,m^2\n",
+ "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n",
+ "A4=1.0*4.0 #Area of 4,m^2\n",
+ "\n",
+ "#The composite figure can be conveniently divided into two triangles and two rectangle\n",
+ "\n",
+ "X1=2.0*2.0/3.0\n",
+ "X2=2.0+1.0\n",
+ "X3=2.0+2.0+(1.0*3.0/3.0)\n",
+ "X4=4.0+4.0/2.0\n",
+ "\n",
+ "Y1=6.0/3.0\n",
+ "Y2=7.5/2.0\n",
+ "Y3=1.0+5.0/3.0\n",
+ "Y4=1/2.0\n",
+ "\n",
+ "A=A1+A2+A3+A4\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,3),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.8 page number 114\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 2.995 m\n",
+ "yc= 1.89 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n",
+ "\n",
+ "from math import pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n",
+ "A2=6.0*4.0 #Area of 2,m^2\n",
+ "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n",
+ "\n",
+ "#The coordinates of centroids of these three simple figures are:\n",
+ "\n",
+ "X1=6.0+3.0/3.0\n",
+ "X2=3.0\n",
+ "X3=-(4*2)/(3.0*pi)\n",
+ "\n",
+ "Y1=4.0/3.0\n",
+ "Y2=2.0\n",
+ "Y3=2.0\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,4),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.9 page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 145.42 m\n",
+ "yc= 90.39 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ar=160.0*280.0 #Area of rectangle,mm^2\n",
+ "At=280.0*40.0/2.0 #Area of triangle,mm^2\n",
+ "d=21.5 #diameter of hole,mm \n",
+ "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n",
+ "\n",
+ "A=Ar+At+Ah*6\n",
+ "\n",
+ "\n",
+ "Xr=140.0\n",
+ "Xt=560/3.0\n",
+ "Xh1=70.0\n",
+ "Xh2=140.0\n",
+ "Xh3=210.0\n",
+ "Xh4=70.0\n",
+ "Xh5=140.0\n",
+ "Xh6=210.0\n",
+ "\n",
+ "Yr=80.0\n",
+ "Yt=160.0+40.0/3.0\n",
+ "Yh1=50.0\n",
+ "Yh2=50.0\n",
+ "Yh3=50.0\n",
+ "Yh4=120.0\n",
+ "Yh5=130.0\n",
+ "Yh6=140.0\n",
+ "\n",
+ "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.10 page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.48 mm\n",
+ "yc= 67.86 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n",
+ "\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ap=200.0*150.0 #Area of plate,mm^2\n",
+ "At=100.0*75.0/2.0 #Area of triangle,mm^2\n",
+ "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=200.0-100.0/3.0\n",
+ "#X3=Xc\n",
+ "\n",
+ "Y1=75.0\n",
+ "Y2=150.0-25.0\n",
+ "#Y3=Yc\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "xc=(Ap*X1-At*X2)/(Ah+A)\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "yc=(Ap*Y1-At*Y2)/(Ah+A)\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.11 page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 326.4 m\n",
+ "yc= 219.12 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "X=40.0\n",
+ "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n",
+ "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n",
+ "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n",
+ "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n",
+ "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n",
+ "\n",
+ "X1=7.0*X\n",
+ "X2=14*X+2*X\n",
+ "X3=2*X\n",
+ "X4=6.0*X\n",
+ "X5=14.0*X-(16*X/(3*pi))\n",
+ "\n",
+ "Y1=6.0*X\n",
+ "Y2=4.0*X/3.0\n",
+ "Y3=8.0*X+2.0*X\n",
+ "Y4=(16.0*X)/(3*pi)\n",
+ "Y5=12*X-4*(4*X/(3*pi))\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.12 page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 6372441.9 mm^4\n",
+ "Iyy= 2824166.0 mm^4\n",
+ "kxx= 46.88 mm\n",
+ "kyy= 31.21 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=150.0*10.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=10.0+70.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n",
+ "\n",
+ "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n",
+ "\n",
+ "\n",
+ "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n",
+ "#The radius of gyration is given by\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print\"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print\"kyy=\",round(kyy,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.13 page number 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 3411298.7 mm^4\n",
+ "Iyy= 1208657.7 mm^4\n",
+ "Izz= 4619956.4 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=125.0*10.0 #Area of 1,mm^2\n",
+ "A2=75.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "\n",
+ "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n",
+ "\n",
+ "#The distance of centroid from the axis (1)–(1)\n",
+ "\n",
+ "X1=5.0\n",
+ "X2=10.0+75.0/2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "#Similarly, the distance of the centroid from the axis (2)–(2)\n",
+ "\n",
+ "Y1=125.0/2\n",
+ "Y2=5.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n",
+ "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# eample 4.14 page number 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 59269202.1 mm^4\n",
+ "Iyy= 12005814.8 mm^4\n",
+ "Izz= 71275016.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=200.0*9.0 #Area of 1,mm^2\n",
+ "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n",
+ "A3=200.0*9.0 #Area of 3,mm^2 \n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The section is symmetrical about both x-x and y-y axis. \n",
+ "X1=0\n",
+ "X2=0\n",
+ "X3=0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "\n",
+ "Y1=245.5\n",
+ "Y2=125.0\n",
+ "Y3=4.5\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n",
+ "\n",
+ "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "#misprint in book\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.15 page number 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 135903229.0 mm^4\n",
+ "Iyy= 5276363.1 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*13.5 #Area of 1,mm^2\n",
+ "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n",
+ "A3=100.0*13.5 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n",
+ "\n",
+ "X1=50.0\n",
+ "X2=8.1/2.0\n",
+ "X3=50.0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "Y1=386.5+13.5/2.0\n",
+ "Y2=200.0\n",
+ "Y3=13.5/2\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y\n",
+ "\n",
+ "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.16 page number 134\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Polar moment of Inertia= 32109472.0 mm^4\n",
+ "kxx= 90.3 mm\n",
+ "kyy= 23.09 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The section is divided into three rectangles A1, A2 and A3\n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=80.0*12.0 #Area of 1,mm^2\n",
+ "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n",
+ "A3=120.0*10.0 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n",
+ "\n",
+ "Y1=150-6\n",
+ "Y2=(128/2) +10\n",
+ "Y3=5\n",
+ "\n",
+ "yc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "X1=60.0\n",
+ "X2=60.0\n",
+ "X3=60.0\n",
+ "\n",
+ "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n",
+ "\n",
+ "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n",
+ "\n",
+ "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n",
+ "\n",
+ "\n",
+ "\n",
+ "PolarmomentofInertia=Ixx+Iyy\n",
+ "\n",
+ "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print \"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print \"kyy=\",round(kyy,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.17 page number 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 31543827.2 mm^4\n",
+ "Iyy= 19745121.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#The given composite section may be divided into simple rectangles and triangle\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*30.0 #Area of 1,mm^2\n",
+ "A2=100.0*25.0 #Area of 2,mm^2\n",
+ "A3=200.0*20.0 #Area of 3,mm^2 \n",
+ "A4=87.5*20.0/2.0 #Area of 4,mm^2\n",
+ "A5=87.5*20.0/2.0 #Area of 5,mm^2\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=100.0\n",
+ "X3=100.0\n",
+ "X4=2.0*87.5/3.0\n",
+ "X5=200-X4\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "Y1=135.0\n",
+ "Y2=70.0\n",
+ "Y3=10.0\n",
+ "Y4=(20.0/3.0)+20.0\n",
+ "Y5=Y4\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n",
+ "\n",
+ "\n",
+ "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.18 page number137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 806093331.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n",
+ "#The given section is split up into simple rectangles\n",
+ "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=400*20.0\n",
+ "A2=100*10\n",
+ "A3=10*380.0\n",
+ "A4=100*10.0\n",
+ "\n",
+ "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.19 page number 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 50399393.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The built-up section is divided into six simple rectangles\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=250.0*10.0 #Area of 1,mm^2\n",
+ "A2=40.0*10.0 #Area of 2,mm^2\n",
+ "\n",
+ "A=A1*2+A2*4 #Total area,mm^2 \n",
+ "\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=30.0\n",
+ "Y3=15.0\n",
+ "Y4=255.0\n",
+ "Y5=135.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n",
+ "\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.20 page number 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "145.394736842\n",
+ "Ixx= 752680131.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Each angle is divided into two rectangles \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=600.0*15.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A3=150.0*10.0\n",
+ "A4=400.0*20.0\n",
+ "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n",
+ "\n",
+ "#The distance of the centroidal axis from the bottom fibres of section \n",
+ "\n",
+ "Y1=320.0\n",
+ "Y2=100.0\n",
+ "Y3=25.0\n",
+ "Y4=10.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n",
+ "print yc\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n",
+ "\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.21 page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 36000000.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import asin,sin,cos,pi\n",
+ "\n",
+ "#The rectangle is divided into four triangles\n",
+ "#The lines AE and FC are parallel to x-axis\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "theta=asin(4.0/5.0)\n",
+ "\n",
+ "AB=100.0\n",
+ "BK=AB*sin((90*pi/180)-theta)\n",
+ "ND=BK\n",
+ "FD=60.0/sin(theta)\n",
+ "AF=150.0-FD\n",
+ "FL=ME=75.0*sin(theta)\n",
+ "AE=AB/cos((90*pi/180)-theta)\n",
+ "FC=AE\n",
+ "A=125.0*60.0/2.0\n",
+ "\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.22, page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 4292979.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n",
+ "\n",
+ "#variable declaration\n",
+ "#Now,Moment of inertia of the section about axis AB\n",
+ "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.23 page number141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "106.435694487 28.4724404943\n",
+ "Ixx= 686943.0 mm^4\n",
+ "Iyy= 17146488.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "r=20.0 #radius of semicircle\n",
+ "A1=80.0*20.0/2 #Area of triangle ABC \n",
+ "A3=40.0*80.0 #Area of rectangle ACDE \n",
+ "A4=pi*pow(r,2)/2 #Area of semicircle\n",
+ "At1=30.0*20.0/2.0\n",
+ "At2=50.0*20.0/2.0\n",
+ "A=A1+A3-A4 #Total area\n",
+ "\n",
+ "X1=2.0*30.0/3.0\n",
+ "X2=50.0*30.0/3.0\n",
+ "X3=40.0\n",
+ "X4=40.0\n",
+ "\n",
+ "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n",
+ "#mistake in book\n",
+ "\n",
+ "Y1=(20.0/3.0)+40.0\n",
+ "Y3=20.0\n",
+ "Y4=(4.0*20.0)/(3.0*pi)\n",
+ "\n",
+ "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n",
+ "print xc,yc\n",
+ "#\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n",
+ "\n",
+ "print\"Ixx=\",round(Ixx),\"mm^4\"\n",
+ "\n",
+ "\n",
+ "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n",
+ "\n",
+ "print\"Iyy=\",round(Iyy),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.27 page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "25000.0 5625.0 235.619449019 7889.38055098\n",
+ "xc= 0.411 m\n",
+ "yc= 0.329 m\n",
+ "zc= 0.221 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n",
+ "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "W=25000.0 # weight of concrete=25000, N/m^3\n",
+ "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n",
+ "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n",
+ "W3=2500\n",
+ "\n",
+ "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n",
+ "\n",
+ "X1=0.375\n",
+ "X2=0.5\n",
+ "X3=0.5\n",
+ "\n",
+ "Y1=0.3\n",
+ "Y2=0.4\n",
+ "Y3=0.4\n",
+ "\n",
+ "Z1=0.25\n",
+ "Z2=0.15\n",
+ "Z3=0.15\n",
+ "\n",
+ "Wt=W3+W1-W2\n",
+ "print W,W1,W2,Wt\n",
+ "xc=(W1*X1-W2*X2+W3*X3)/Wt\n",
+ "\n",
+ "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n",
+ "\n",
+ "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n",
+ "\n",
+ "print\"xc=\",round(xc,3),\"m\"\n",
+ "print\"yc=\",round(yc,3),\"m\"\n",
+ "print\"zc=\",round(zc,3),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_R0XPX4L.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_R0XPX4L.ipynb
new file mode 100644
index 00000000..d78e1aa8
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_R0XPX4L.ipynb
@@ -0,0 +1,1403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.1 page number 102\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 407.44 mm\n",
+ "yc= 101.65 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=600.0 #length of wire AB,mm\n",
+ "L2=200.0 #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "\n",
+ "X1=300.0\n",
+ "X2=600.0\n",
+ "X3=600.0-150*cos(theta)\n",
+ "Y1=0\n",
+ "Y2=100\n",
+ "Y3=200+150*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.2 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 451.2 mm\n",
+ "yc= 54.07 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=400.0 #length of wire AB,mm\n",
+ "L2=150.0*pi #length of wire BC,mm\n",
+ "L3=250.0 #length of wire CD,mm\n",
+ "theta=30*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=200.0\n",
+ "X2=475.0\n",
+ "X3=400+300.0+250*cos(theta)/2\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=2*150/pi\n",
+ "Y3=125*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.3 page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.19 mm\n",
+ "yc= 198.5 mm\n",
+ "zc= 56.17 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "# The length and the centroid of portions AB, BC and CD \n",
+ "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=100.0*pi #length of wire AB,mm\n",
+ "L2=140.0*pi #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=100.0\n",
+ "X2=0\n",
+ "X3=300*sin(theta)\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=140\n",
+ "Y3=280+300*cos(theta)\n",
+ "Z1=2*100/pi\n",
+ "Z2=2*140/pi\n",
+ "Z3=0\n",
+ "\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n",
+ "\n",
+ "print \"zc=\",round(zc,2),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.4 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 0.0\n",
+ "yc= 40.0 mm\n",
+ "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20.0 #Area of 1 ,mm^2\n",
+ "A2=20.0*100.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=10\n",
+ "Y2=70\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.5 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 36.62\n",
+ "yc= 61.62 mm\n",
+ "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=150.0*12.0 #Area of 1 ,mm^2\n",
+ "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=75\n",
+ "X2=6\n",
+ "\n",
+ "Y1=6\n",
+ "Y2=12+(200-12)/2\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.6 page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yc= 59.71 mm\n",
+ "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20 #Area of 1 ,mm^2\n",
+ "A2=100.0*20.0 #Area of 2,mm^2\n",
+ "A3=150.0*30.0 #Area of 3,mm^2\n",
+ "\n",
+ "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=30+100+20/2\n",
+ "Y2=30+100/2\n",
+ "Y3=30/2\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.7 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 3.523 m\n",
+ "yc= 2.777 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n",
+ "A2=2.0*7.5 #Area of 2,m^2\n",
+ "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n",
+ "A4=1.0*4.0 #Area of 4,m^2\n",
+ "\n",
+ "#The composite figure can be conveniently divided into two triangles and two rectangle\n",
+ "\n",
+ "X1=2.0*2.0/3.0\n",
+ "X2=2.0+1.0\n",
+ "X3=2.0+2.0+(1.0*3.0/3.0)\n",
+ "X4=4.0+4.0/2.0\n",
+ "\n",
+ "Y1=6.0/3.0\n",
+ "Y2=7.5/2.0\n",
+ "Y3=1.0+5.0/3.0\n",
+ "Y4=1/2.0\n",
+ "\n",
+ "A=A1+A2+A3+A4\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,3),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.8 page number 114\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 2.995 m\n",
+ "yc= 1.89 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n",
+ "\n",
+ "from math import pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n",
+ "A2=6.0*4.0 #Area of 2,m^2\n",
+ "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n",
+ "\n",
+ "#The coordinates of centroids of these three simple figures are:\n",
+ "\n",
+ "X1=6.0+3.0/3.0\n",
+ "X2=3.0\n",
+ "X3=-(4*2)/(3.0*pi)\n",
+ "\n",
+ "Y1=4.0/3.0\n",
+ "Y2=2.0\n",
+ "Y3=2.0\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,4),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.9 page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 145.42 m\n",
+ "yc= 90.39 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ar=160.0*280.0 #Area of rectangle,mm^2\n",
+ "At=280.0*40.0/2.0 #Area of triangle,mm^2\n",
+ "d=21.5 #diameter of hole,mm \n",
+ "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n",
+ "\n",
+ "A=Ar+At+Ah*6\n",
+ "\n",
+ "\n",
+ "Xr=140.0\n",
+ "Xt=560/3.0\n",
+ "Xh1=70.0\n",
+ "Xh2=140.0\n",
+ "Xh3=210.0\n",
+ "Xh4=70.0\n",
+ "Xh5=140.0\n",
+ "Xh6=210.0\n",
+ "\n",
+ "Yr=80.0\n",
+ "Yt=160.0+40.0/3.0\n",
+ "Yh1=50.0\n",
+ "Yh2=50.0\n",
+ "Yh3=50.0\n",
+ "Yh4=120.0\n",
+ "Yh5=130.0\n",
+ "Yh6=140.0\n",
+ "\n",
+ "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.10 page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.48 mm\n",
+ "yc= 67.86 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n",
+ "\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ap=200.0*150.0 #Area of plate,mm^2\n",
+ "At=100.0*75.0/2.0 #Area of triangle,mm^2\n",
+ "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=200.0-100.0/3.0\n",
+ "#X3=Xc\n",
+ "\n",
+ "Y1=75.0\n",
+ "Y2=150.0-25.0\n",
+ "#Y3=Yc\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "xc=(Ap*X1-At*X2)/(Ah+A)\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "yc=(Ap*Y1-At*Y2)/(Ah+A)\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.11 page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 326.4 m\n",
+ "yc= 219.12 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "X=40.0\n",
+ "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n",
+ "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n",
+ "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n",
+ "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n",
+ "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n",
+ "\n",
+ "X1=7.0*X\n",
+ "X2=14*X+2*X\n",
+ "X3=2*X\n",
+ "X4=6.0*X\n",
+ "X5=14.0*X-(16*X/(3*pi))\n",
+ "\n",
+ "Y1=6.0*X\n",
+ "Y2=4.0*X/3.0\n",
+ "Y3=8.0*X+2.0*X\n",
+ "Y4=(16.0*X)/(3*pi)\n",
+ "Y5=12*X-4*(4*X/(3*pi))\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.12 page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 6372441.9 mm^4\n",
+ "Iyy= 2824166.0 mm^4\n",
+ "kxx= 46.88 mm\n",
+ "kyy= 31.21 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=150.0*10.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=10.0+70.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n",
+ "\n",
+ "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n",
+ "\n",
+ "\n",
+ "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n",
+ "#The radius of gyration is given by\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print\"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print\"kyy=\",round(kyy,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.13 page number 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 3411298.7 mm^4\n",
+ "Iyy= 1208657.7 mm^4\n",
+ "Izz= 4619956.4 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=125.0*10.0 #Area of 1,mm^2\n",
+ "A2=75.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "\n",
+ "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n",
+ "\n",
+ "#The distance of centroid from the axis (1)–(1)\n",
+ "\n",
+ "X1=5.0\n",
+ "X2=10.0+75.0/2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "#Similarly, the distance of the centroid from the axis (2)–(2)\n",
+ "\n",
+ "Y1=125.0/2\n",
+ "Y2=5.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n",
+ "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# eample 4.14 page number 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 59269202.1 mm^4\n",
+ "Iyy= 12005814.8 mm^4\n",
+ "Izz= 71275016.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=200.0*9.0 #Area of 1,mm^2\n",
+ "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n",
+ "A3=200.0*9.0 #Area of 3,mm^2 \n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The section is symmetrical about both x-x and y-y axis. \n",
+ "X1=0\n",
+ "X2=0\n",
+ "X3=0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "\n",
+ "Y1=245.5\n",
+ "Y2=125.0\n",
+ "Y3=4.5\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n",
+ "\n",
+ "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "#misprint in book\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.15 page number 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 135903229.0 mm^4\n",
+ "Iyy= 5276363.1 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*13.5 #Area of 1,mm^2\n",
+ "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n",
+ "A3=100.0*13.5 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n",
+ "\n",
+ "X1=50.0\n",
+ "X2=8.1/2.0\n",
+ "X3=50.0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "Y1=386.5+13.5/2.0\n",
+ "Y2=200.0\n",
+ "Y3=13.5/2\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y\n",
+ "\n",
+ "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.16 page number 134\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Polar moment of Inertia= 32109472.0 mm^4\n",
+ "kxx= 90.3 mm\n",
+ "kyy= 23.09 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The section is divided into three rectangles A1, A2 and A3\n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=80.0*12.0 #Area of 1,mm^2\n",
+ "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n",
+ "A3=120.0*10.0 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n",
+ "\n",
+ "Y1=150-6\n",
+ "Y2=(128/2) +10\n",
+ "Y3=5\n",
+ "\n",
+ "yc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "X1=60.0\n",
+ "X2=60.0\n",
+ "X3=60.0\n",
+ "\n",
+ "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n",
+ "\n",
+ "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n",
+ "\n",
+ "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n",
+ "\n",
+ "\n",
+ "\n",
+ "PolarmomentofInertia=Ixx+Iyy\n",
+ "\n",
+ "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print \"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print \"kyy=\",round(kyy,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.17 page number 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 31543827.2 mm^4\n",
+ "Iyy= 19745121.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#The given composite section may be divided into simple rectangles and triangle\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*30.0 #Area of 1,mm^2\n",
+ "A2=100.0*25.0 #Area of 2,mm^2\n",
+ "A3=200.0*20.0 #Area of 3,mm^2 \n",
+ "A4=87.5*20.0/2.0 #Area of 4,mm^2\n",
+ "A5=87.5*20.0/2.0 #Area of 5,mm^2\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=100.0\n",
+ "X3=100.0\n",
+ "X4=2.0*87.5/3.0\n",
+ "X5=200-X4\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "Y1=135.0\n",
+ "Y2=70.0\n",
+ "Y3=10.0\n",
+ "Y4=(20.0/3.0)+20.0\n",
+ "Y5=Y4\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n",
+ "\n",
+ "\n",
+ "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.18 page number137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 806093331.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n",
+ "#The given section is split up into simple rectangles\n",
+ "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=400*20.0\n",
+ "A2=100*10\n",
+ "A3=10*380.0\n",
+ "A4=100*10.0\n",
+ "\n",
+ "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.19 page number 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 50399393.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The built-up section is divided into six simple rectangles\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=250.0*10.0 #Area of 1,mm^2\n",
+ "A2=40.0*10.0 #Area of 2,mm^2\n",
+ "\n",
+ "A=A1*2+A2*4 #Total area,mm^2 \n",
+ "\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=30.0\n",
+ "Y3=15.0\n",
+ "Y4=255.0\n",
+ "Y5=135.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n",
+ "\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.20 page number 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "145.394736842\n",
+ "Ixx= 752680131.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Each angle is divided into two rectangles \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=600.0*15.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A3=150.0*10.0\n",
+ "A4=400.0*20.0\n",
+ "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n",
+ "\n",
+ "#The distance of the centroidal axis from the bottom fibres of section \n",
+ "\n",
+ "Y1=320.0\n",
+ "Y2=100.0\n",
+ "Y3=25.0\n",
+ "Y4=10.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n",
+ "print yc\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n",
+ "\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.21 page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 36000000.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import asin,sin,cos,pi\n",
+ "\n",
+ "#The rectangle is divided into four triangles\n",
+ "#The lines AE and FC are parallel to x-axis\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "theta=asin(4.0/5.0)\n",
+ "\n",
+ "AB=100.0\n",
+ "BK=AB*sin((90*pi/180)-theta)\n",
+ "ND=BK\n",
+ "FD=60.0/sin(theta)\n",
+ "AF=150.0-FD\n",
+ "FL=ME=75.0*sin(theta)\n",
+ "AE=AB/cos((90*pi/180)-theta)\n",
+ "FC=AE\n",
+ "A=125.0*60.0/2.0\n",
+ "\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.22, page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 4292979.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n",
+ "\n",
+ "#variable declaration\n",
+ "#Now,Moment of inertia of the section about axis AB\n",
+ "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.23 page number141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "106.435694487 28.4724404943\n",
+ "Ixx= 686943.0 mm^4\n",
+ "Iyy= 17146488.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "r=20.0 #radius of semicircle\n",
+ "A1=80.0*20.0/2 #Area of triangle ABC \n",
+ "A3=40.0*80.0 #Area of rectangle ACDE \n",
+ "A4=pi*pow(r,2)/2 #Area of semicircle\n",
+ "At1=30.0*20.0/2.0\n",
+ "At2=50.0*20.0/2.0\n",
+ "A=A1+A3-A4 #Total area\n",
+ "\n",
+ "X1=2.0*30.0/3.0\n",
+ "X2=50.0*30.0/3.0\n",
+ "X3=40.0\n",
+ "X4=40.0\n",
+ "\n",
+ "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n",
+ "#mistake in book\n",
+ "\n",
+ "Y1=(20.0/3.0)+40.0\n",
+ "Y3=20.0\n",
+ "Y4=(4.0*20.0)/(3.0*pi)\n",
+ "\n",
+ "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n",
+ "print xc,yc\n",
+ "#\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n",
+ "\n",
+ "print\"Ixx=\",round(Ixx),\"mm^4\"\n",
+ "\n",
+ "\n",
+ "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n",
+ "\n",
+ "print\"Iyy=\",round(Iyy),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.27 page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "25000.0 5625.0 235.619449019 7889.38055098\n",
+ "xc= 0.411 m\n",
+ "yc= 0.329 m\n",
+ "zc= 0.221 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n",
+ "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "W=25000.0 # weight of concrete=25000, N/m^3\n",
+ "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n",
+ "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n",
+ "W3=2500\n",
+ "\n",
+ "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n",
+ "\n",
+ "X1=0.375\n",
+ "X2=0.5\n",
+ "X3=0.5\n",
+ "\n",
+ "Y1=0.3\n",
+ "Y2=0.4\n",
+ "Y3=0.4\n",
+ "\n",
+ "Z1=0.25\n",
+ "Z2=0.15\n",
+ "Z3=0.15\n",
+ "\n",
+ "Wt=W3+W1-W2\n",
+ "print W,W1,W2,Wt\n",
+ "xc=(W1*X1-W2*X2+W3*X3)/Wt\n",
+ "\n",
+ "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n",
+ "\n",
+ "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n",
+ "\n",
+ "print\"xc=\",round(xc,3),\"m\"\n",
+ "print\"yc=\",round(yc,3),\"m\"\n",
+ "print\"zc=\",round(zc,3),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_S0t8OJu.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_S0t8OJu.ipynb
new file mode 100644
index 00000000..d78e1aa8
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_S0t8OJu.ipynb
@@ -0,0 +1,1403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.1 page number 102\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 407.44 mm\n",
+ "yc= 101.65 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=600.0 #length of wire AB,mm\n",
+ "L2=200.0 #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "\n",
+ "X1=300.0\n",
+ "X2=600.0\n",
+ "X3=600.0-150*cos(theta)\n",
+ "Y1=0\n",
+ "Y2=100\n",
+ "Y3=200+150*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.2 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 451.2 mm\n",
+ "yc= 54.07 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=400.0 #length of wire AB,mm\n",
+ "L2=150.0*pi #length of wire BC,mm\n",
+ "L3=250.0 #length of wire CD,mm\n",
+ "theta=30*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=200.0\n",
+ "X2=475.0\n",
+ "X3=400+300.0+250*cos(theta)/2\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=2*150/pi\n",
+ "Y3=125*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.3 page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.19 mm\n",
+ "yc= 198.5 mm\n",
+ "zc= 56.17 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "# The length and the centroid of portions AB, BC and CD \n",
+ "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=100.0*pi #length of wire AB,mm\n",
+ "L2=140.0*pi #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=100.0\n",
+ "X2=0\n",
+ "X3=300*sin(theta)\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=140\n",
+ "Y3=280+300*cos(theta)\n",
+ "Z1=2*100/pi\n",
+ "Z2=2*140/pi\n",
+ "Z3=0\n",
+ "\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n",
+ "\n",
+ "print \"zc=\",round(zc,2),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.4 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 0.0\n",
+ "yc= 40.0 mm\n",
+ "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20.0 #Area of 1 ,mm^2\n",
+ "A2=20.0*100.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=10\n",
+ "Y2=70\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.5 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 36.62\n",
+ "yc= 61.62 mm\n",
+ "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=150.0*12.0 #Area of 1 ,mm^2\n",
+ "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=75\n",
+ "X2=6\n",
+ "\n",
+ "Y1=6\n",
+ "Y2=12+(200-12)/2\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.6 page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yc= 59.71 mm\n",
+ "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20 #Area of 1 ,mm^2\n",
+ "A2=100.0*20.0 #Area of 2,mm^2\n",
+ "A3=150.0*30.0 #Area of 3,mm^2\n",
+ "\n",
+ "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=30+100+20/2\n",
+ "Y2=30+100/2\n",
+ "Y3=30/2\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.7 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 3.523 m\n",
+ "yc= 2.777 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n",
+ "A2=2.0*7.5 #Area of 2,m^2\n",
+ "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n",
+ "A4=1.0*4.0 #Area of 4,m^2\n",
+ "\n",
+ "#The composite figure can be conveniently divided into two triangles and two rectangle\n",
+ "\n",
+ "X1=2.0*2.0/3.0\n",
+ "X2=2.0+1.0\n",
+ "X3=2.0+2.0+(1.0*3.0/3.0)\n",
+ "X4=4.0+4.0/2.0\n",
+ "\n",
+ "Y1=6.0/3.0\n",
+ "Y2=7.5/2.0\n",
+ "Y3=1.0+5.0/3.0\n",
+ "Y4=1/2.0\n",
+ "\n",
+ "A=A1+A2+A3+A4\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,3),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.8 page number 114\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 2.995 m\n",
+ "yc= 1.89 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n",
+ "\n",
+ "from math import pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n",
+ "A2=6.0*4.0 #Area of 2,m^2\n",
+ "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n",
+ "\n",
+ "#The coordinates of centroids of these three simple figures are:\n",
+ "\n",
+ "X1=6.0+3.0/3.0\n",
+ "X2=3.0\n",
+ "X3=-(4*2)/(3.0*pi)\n",
+ "\n",
+ "Y1=4.0/3.0\n",
+ "Y2=2.0\n",
+ "Y3=2.0\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,4),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.9 page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 145.42 m\n",
+ "yc= 90.39 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ar=160.0*280.0 #Area of rectangle,mm^2\n",
+ "At=280.0*40.0/2.0 #Area of triangle,mm^2\n",
+ "d=21.5 #diameter of hole,mm \n",
+ "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n",
+ "\n",
+ "A=Ar+At+Ah*6\n",
+ "\n",
+ "\n",
+ "Xr=140.0\n",
+ "Xt=560/3.0\n",
+ "Xh1=70.0\n",
+ "Xh2=140.0\n",
+ "Xh3=210.0\n",
+ "Xh4=70.0\n",
+ "Xh5=140.0\n",
+ "Xh6=210.0\n",
+ "\n",
+ "Yr=80.0\n",
+ "Yt=160.0+40.0/3.0\n",
+ "Yh1=50.0\n",
+ "Yh2=50.0\n",
+ "Yh3=50.0\n",
+ "Yh4=120.0\n",
+ "Yh5=130.0\n",
+ "Yh6=140.0\n",
+ "\n",
+ "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.10 page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.48 mm\n",
+ "yc= 67.86 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n",
+ "\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ap=200.0*150.0 #Area of plate,mm^2\n",
+ "At=100.0*75.0/2.0 #Area of triangle,mm^2\n",
+ "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=200.0-100.0/3.0\n",
+ "#X3=Xc\n",
+ "\n",
+ "Y1=75.0\n",
+ "Y2=150.0-25.0\n",
+ "#Y3=Yc\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "xc=(Ap*X1-At*X2)/(Ah+A)\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "yc=(Ap*Y1-At*Y2)/(Ah+A)\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.11 page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 326.4 m\n",
+ "yc= 219.12 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "X=40.0\n",
+ "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n",
+ "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n",
+ "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n",
+ "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n",
+ "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n",
+ "\n",
+ "X1=7.0*X\n",
+ "X2=14*X+2*X\n",
+ "X3=2*X\n",
+ "X4=6.0*X\n",
+ "X5=14.0*X-(16*X/(3*pi))\n",
+ "\n",
+ "Y1=6.0*X\n",
+ "Y2=4.0*X/3.0\n",
+ "Y3=8.0*X+2.0*X\n",
+ "Y4=(16.0*X)/(3*pi)\n",
+ "Y5=12*X-4*(4*X/(3*pi))\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.12 page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 6372441.9 mm^4\n",
+ "Iyy= 2824166.0 mm^4\n",
+ "kxx= 46.88 mm\n",
+ "kyy= 31.21 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=150.0*10.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=10.0+70.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n",
+ "\n",
+ "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n",
+ "\n",
+ "\n",
+ "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n",
+ "#The radius of gyration is given by\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print\"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print\"kyy=\",round(kyy,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.13 page number 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 3411298.7 mm^4\n",
+ "Iyy= 1208657.7 mm^4\n",
+ "Izz= 4619956.4 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=125.0*10.0 #Area of 1,mm^2\n",
+ "A2=75.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "\n",
+ "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n",
+ "\n",
+ "#The distance of centroid from the axis (1)–(1)\n",
+ "\n",
+ "X1=5.0\n",
+ "X2=10.0+75.0/2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "#Similarly, the distance of the centroid from the axis (2)–(2)\n",
+ "\n",
+ "Y1=125.0/2\n",
+ "Y2=5.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n",
+ "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# eample 4.14 page number 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 59269202.1 mm^4\n",
+ "Iyy= 12005814.8 mm^4\n",
+ "Izz= 71275016.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=200.0*9.0 #Area of 1,mm^2\n",
+ "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n",
+ "A3=200.0*9.0 #Area of 3,mm^2 \n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The section is symmetrical about both x-x and y-y axis. \n",
+ "X1=0\n",
+ "X2=0\n",
+ "X3=0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "\n",
+ "Y1=245.5\n",
+ "Y2=125.0\n",
+ "Y3=4.5\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n",
+ "\n",
+ "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "#misprint in book\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.15 page number 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 135903229.0 mm^4\n",
+ "Iyy= 5276363.1 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*13.5 #Area of 1,mm^2\n",
+ "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n",
+ "A3=100.0*13.5 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n",
+ "\n",
+ "X1=50.0\n",
+ "X2=8.1/2.0\n",
+ "X3=50.0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "Y1=386.5+13.5/2.0\n",
+ "Y2=200.0\n",
+ "Y3=13.5/2\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y\n",
+ "\n",
+ "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.16 page number 134\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Polar moment of Inertia= 32109472.0 mm^4\n",
+ "kxx= 90.3 mm\n",
+ "kyy= 23.09 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The section is divided into three rectangles A1, A2 and A3\n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=80.0*12.0 #Area of 1,mm^2\n",
+ "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n",
+ "A3=120.0*10.0 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n",
+ "\n",
+ "Y1=150-6\n",
+ "Y2=(128/2) +10\n",
+ "Y3=5\n",
+ "\n",
+ "yc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "X1=60.0\n",
+ "X2=60.0\n",
+ "X3=60.0\n",
+ "\n",
+ "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n",
+ "\n",
+ "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n",
+ "\n",
+ "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n",
+ "\n",
+ "\n",
+ "\n",
+ "PolarmomentofInertia=Ixx+Iyy\n",
+ "\n",
+ "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print \"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print \"kyy=\",round(kyy,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.17 page number 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 31543827.2 mm^4\n",
+ "Iyy= 19745121.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#The given composite section may be divided into simple rectangles and triangle\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*30.0 #Area of 1,mm^2\n",
+ "A2=100.0*25.0 #Area of 2,mm^2\n",
+ "A3=200.0*20.0 #Area of 3,mm^2 \n",
+ "A4=87.5*20.0/2.0 #Area of 4,mm^2\n",
+ "A5=87.5*20.0/2.0 #Area of 5,mm^2\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=100.0\n",
+ "X3=100.0\n",
+ "X4=2.0*87.5/3.0\n",
+ "X5=200-X4\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "Y1=135.0\n",
+ "Y2=70.0\n",
+ "Y3=10.0\n",
+ "Y4=(20.0/3.0)+20.0\n",
+ "Y5=Y4\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n",
+ "\n",
+ "\n",
+ "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.18 page number137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 806093331.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n",
+ "#The given section is split up into simple rectangles\n",
+ "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=400*20.0\n",
+ "A2=100*10\n",
+ "A3=10*380.0\n",
+ "A4=100*10.0\n",
+ "\n",
+ "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.19 page number 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 50399393.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The built-up section is divided into six simple rectangles\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=250.0*10.0 #Area of 1,mm^2\n",
+ "A2=40.0*10.0 #Area of 2,mm^2\n",
+ "\n",
+ "A=A1*2+A2*4 #Total area,mm^2 \n",
+ "\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=30.0\n",
+ "Y3=15.0\n",
+ "Y4=255.0\n",
+ "Y5=135.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n",
+ "\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.20 page number 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "145.394736842\n",
+ "Ixx= 752680131.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Each angle is divided into two rectangles \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=600.0*15.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A3=150.0*10.0\n",
+ "A4=400.0*20.0\n",
+ "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n",
+ "\n",
+ "#The distance of the centroidal axis from the bottom fibres of section \n",
+ "\n",
+ "Y1=320.0\n",
+ "Y2=100.0\n",
+ "Y3=25.0\n",
+ "Y4=10.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n",
+ "print yc\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n",
+ "\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.21 page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 36000000.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import asin,sin,cos,pi\n",
+ "\n",
+ "#The rectangle is divided into four triangles\n",
+ "#The lines AE and FC are parallel to x-axis\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "theta=asin(4.0/5.0)\n",
+ "\n",
+ "AB=100.0\n",
+ "BK=AB*sin((90*pi/180)-theta)\n",
+ "ND=BK\n",
+ "FD=60.0/sin(theta)\n",
+ "AF=150.0-FD\n",
+ "FL=ME=75.0*sin(theta)\n",
+ "AE=AB/cos((90*pi/180)-theta)\n",
+ "FC=AE\n",
+ "A=125.0*60.0/2.0\n",
+ "\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.22, page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 4292979.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n",
+ "\n",
+ "#variable declaration\n",
+ "#Now,Moment of inertia of the section about axis AB\n",
+ "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.23 page number141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "106.435694487 28.4724404943\n",
+ "Ixx= 686943.0 mm^4\n",
+ "Iyy= 17146488.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "r=20.0 #radius of semicircle\n",
+ "A1=80.0*20.0/2 #Area of triangle ABC \n",
+ "A3=40.0*80.0 #Area of rectangle ACDE \n",
+ "A4=pi*pow(r,2)/2 #Area of semicircle\n",
+ "At1=30.0*20.0/2.0\n",
+ "At2=50.0*20.0/2.0\n",
+ "A=A1+A3-A4 #Total area\n",
+ "\n",
+ "X1=2.0*30.0/3.0\n",
+ "X2=50.0*30.0/3.0\n",
+ "X3=40.0\n",
+ "X4=40.0\n",
+ "\n",
+ "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n",
+ "#mistake in book\n",
+ "\n",
+ "Y1=(20.0/3.0)+40.0\n",
+ "Y3=20.0\n",
+ "Y4=(4.0*20.0)/(3.0*pi)\n",
+ "\n",
+ "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n",
+ "print xc,yc\n",
+ "#\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n",
+ "\n",
+ "print\"Ixx=\",round(Ixx),\"mm^4\"\n",
+ "\n",
+ "\n",
+ "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n",
+ "\n",
+ "print\"Iyy=\",round(Iyy),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.27 page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "25000.0 5625.0 235.619449019 7889.38055098\n",
+ "xc= 0.411 m\n",
+ "yc= 0.329 m\n",
+ "zc= 0.221 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n",
+ "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "W=25000.0 # weight of concrete=25000, N/m^3\n",
+ "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n",
+ "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n",
+ "W3=2500\n",
+ "\n",
+ "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n",
+ "\n",
+ "X1=0.375\n",
+ "X2=0.5\n",
+ "X3=0.5\n",
+ "\n",
+ "Y1=0.3\n",
+ "Y2=0.4\n",
+ "Y3=0.4\n",
+ "\n",
+ "Z1=0.25\n",
+ "Z2=0.15\n",
+ "Z3=0.15\n",
+ "\n",
+ "Wt=W3+W1-W2\n",
+ "print W,W1,W2,Wt\n",
+ "xc=(W1*X1-W2*X2+W3*X3)/Wt\n",
+ "\n",
+ "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n",
+ "\n",
+ "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n",
+ "\n",
+ "print\"xc=\",round(xc,3),\"m\"\n",
+ "print\"yc=\",round(yc,3),\"m\"\n",
+ "print\"zc=\",round(zc,3),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_uFVYXqM.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_uFVYXqM.ipynb
new file mode 100644
index 00000000..d78e1aa8
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_uFVYXqM.ipynb
@@ -0,0 +1,1403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.1 page number 102\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 407.44 mm\n",
+ "yc= 101.65 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=600.0 #length of wire AB,mm\n",
+ "L2=200.0 #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "\n",
+ "X1=300.0\n",
+ "X2=600.0\n",
+ "X3=600.0-150*cos(theta)\n",
+ "Y1=0\n",
+ "Y2=100\n",
+ "Y3=200+150*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.2 page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 451.2 mm\n",
+ "yc= 54.07 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "\n",
+ "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=400.0 #length of wire AB,mm\n",
+ "L2=150.0*pi #length of wire BC,mm\n",
+ "L3=250.0 #length of wire CD,mm\n",
+ "theta=30*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=200.0\n",
+ "X2=475.0\n",
+ "X3=400+300.0+250*cos(theta)/2\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=2*150/pi\n",
+ "Y3=125*sin(theta)\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.3 page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.19 mm\n",
+ "yc= 198.5 mm\n",
+ "zc= 56.17 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos,sin,pi\n",
+ "# The length and the centroid of portions AB, BC and CD \n",
+ "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "L1=100.0*pi #length of wire AB,mm\n",
+ "L2=140.0*pi #length of wire BC,mm\n",
+ "L3=300.0 #length of wire CD,mm\n",
+ "theta=45*pi/180\n",
+ "\n",
+ "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n",
+ "X1=100.0\n",
+ "X2=0\n",
+ "X3=300*sin(theta)\n",
+ "\n",
+ "Y1=0\n",
+ "Y2=140\n",
+ "Y3=280+300*cos(theta)\n",
+ "Z1=2*100/pi\n",
+ "Z2=2*140/pi\n",
+ "Z3=0\n",
+ "\n",
+ "L=L1+L2+L3 #Total length,mm\n",
+ "\n",
+ "xc=(L1*X1+L2*X2+L3*X3)/L\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n",
+ "\n",
+ "print \"zc=\",round(zc,2),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.4 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 0.0\n",
+ "yc= 40.0 mm\n",
+ "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20.0 #Area of 1 ,mm^2\n",
+ "A2=20.0*100.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=10\n",
+ "Y2=70\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.5 page number 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 36.62\n",
+ "yc= 61.62 mm\n",
+ "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=150.0*12.0 #Area of 1 ,mm^2\n",
+ "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n",
+ "\n",
+ "X1=75\n",
+ "X2=6\n",
+ "\n",
+ "Y1=6\n",
+ "Y2=12+(200-12)/2\n",
+ "\n",
+ "A=A1+A2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2)\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.6 page number 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "yc= 59.71 mm\n",
+ "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "A1=100.0*20 #Area of 1 ,mm^2\n",
+ "A2=100.0*20.0 #Area of 2,mm^2\n",
+ "A3=150.0*30.0 #Area of 3,mm^2\n",
+ "\n",
+ "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n",
+ "\n",
+ "X1=0\n",
+ "X2=0\n",
+ "\n",
+ "Y1=30+100+20/2\n",
+ "Y2=30+100/2\n",
+ "Y3=30/2\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n",
+ "\n",
+ "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.7 page number 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 3.523 m\n",
+ "yc= 2.777 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n",
+ "A2=2.0*7.5 #Area of 2,m^2\n",
+ "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n",
+ "A4=1.0*4.0 #Area of 4,m^2\n",
+ "\n",
+ "#The composite figure can be conveniently divided into two triangles and two rectangle\n",
+ "\n",
+ "X1=2.0*2.0/3.0\n",
+ "X2=2.0+1.0\n",
+ "X3=2.0+2.0+(1.0*3.0/3.0)\n",
+ "X4=4.0+4.0/2.0\n",
+ "\n",
+ "Y1=6.0/3.0\n",
+ "Y2=7.5/2.0\n",
+ "Y3=1.0+5.0/3.0\n",
+ "Y4=1/2.0\n",
+ "\n",
+ "A=A1+A2+A3+A4\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,3),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.8 page number 114\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 2.995 m\n",
+ "yc= 1.89 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n",
+ "\n",
+ "from math import pi\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n",
+ "A2=6.0*4.0 #Area of 2,m^2\n",
+ "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n",
+ "\n",
+ "#The coordinates of centroids of these three simple figures are:\n",
+ "\n",
+ "X1=6.0+3.0/3.0\n",
+ "X2=3.0\n",
+ "X3=-(4*2)/(3.0*pi)\n",
+ "\n",
+ "Y1=4.0/3.0\n",
+ "Y2=2.0\n",
+ "Y3=2.0\n",
+ "\n",
+ "A=A1+A2+A3\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,4),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,3),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.9 page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 145.42 m\n",
+ "yc= 90.39 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ar=160.0*280.0 #Area of rectangle,mm^2\n",
+ "At=280.0*40.0/2.0 #Area of triangle,mm^2\n",
+ "d=21.5 #diameter of hole,mm \n",
+ "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n",
+ "\n",
+ "A=Ar+At+Ah*6\n",
+ "\n",
+ "\n",
+ "Xr=140.0\n",
+ "Xt=560/3.0\n",
+ "Xh1=70.0\n",
+ "Xh2=140.0\n",
+ "Xh3=210.0\n",
+ "Xh4=70.0\n",
+ "Xh5=140.0\n",
+ "Xh6=210.0\n",
+ "\n",
+ "Yr=80.0\n",
+ "Yt=160.0+40.0/3.0\n",
+ "Yh1=50.0\n",
+ "Yh2=50.0\n",
+ "Yh3=50.0\n",
+ "Yh4=120.0\n",
+ "Yh5=130.0\n",
+ "Yh6=140.0\n",
+ "\n",
+ "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.10 page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 90.48 mm\n",
+ "yc= 67.86 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n",
+ "\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Ap=200.0*150.0 #Area of plate,mm^2\n",
+ "At=100.0*75.0/2.0 #Area of triangle,mm^2\n",
+ "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=200.0-100.0/3.0\n",
+ "#X3=Xc\n",
+ "\n",
+ "Y1=75.0\n",
+ "Y2=150.0-25.0\n",
+ "#Y3=Yc\n",
+ "\n",
+ "A=Ap-At-Ah\n",
+ "\n",
+ "xc=(Ap*X1-At*X2)/(Ah+A)\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"mm\"\n",
+ "\n",
+ "yc=(Ap*Y1-At*Y2)/(Ah+A)\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.11 page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "xc= 326.4 m\n",
+ "yc= 219.12 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "X=40.0\n",
+ "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n",
+ "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n",
+ "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n",
+ "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n",
+ "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n",
+ "\n",
+ "X1=7.0*X\n",
+ "X2=14*X+2*X\n",
+ "X3=2*X\n",
+ "X4=6.0*X\n",
+ "X5=14.0*X-(16*X/(3*pi))\n",
+ "\n",
+ "Y1=6.0*X\n",
+ "Y2=4.0*X/3.0\n",
+ "Y3=8.0*X+2.0*X\n",
+ "Y4=(16.0*X)/(3*pi)\n",
+ "Y5=12*X-4*(4*X/(3*pi))\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "print \"xc=\",round(xc,2),\"m\"\n",
+ "\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "print \"yc=\",round(yc,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.12 page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 6372441.9 mm^4\n",
+ "Iyy= 2824166.0 mm^4\n",
+ "kxx= 46.88 mm\n",
+ "kyy= 31.21 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=150.0*10.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=10.0+70.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n",
+ "\n",
+ "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n",
+ "\n",
+ "\n",
+ "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n",
+ "#The radius of gyration is given by\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print\"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print\"kyy=\",round(kyy,2),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.13 page number 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 3411298.7 mm^4\n",
+ "Iyy= 1208657.7 mm^4\n",
+ "Izz= 4619956.4 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=125.0*10.0 #Area of 1,mm^2\n",
+ "A2=75.0*10.0 #Area of 2,mm^2\n",
+ "A=A1+A2 #Total area,mm^2 \n",
+ "\n",
+ "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n",
+ "\n",
+ "#The distance of centroid from the axis (1)–(1)\n",
+ "\n",
+ "X1=5.0\n",
+ "X2=10.0+75.0/2\n",
+ "\n",
+ "xc=(A1*X1+A2*X2)/A\n",
+ "\n",
+ "#Similarly, the distance of the centroid from the axis (2)–(2)\n",
+ "\n",
+ "Y1=125.0/2\n",
+ "Y2=5.0\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2)/A\n",
+ "\n",
+ "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n",
+ "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# eample 4.14 page number 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 59269202.1 mm^4\n",
+ "Iyy= 12005814.8 mm^4\n",
+ "Izz= 71275016.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#The given composite section can be divided into two rectangles \n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=200.0*9.0 #Area of 1,mm^2\n",
+ "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n",
+ "A3=200.0*9.0 #Area of 3,mm^2 \n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The section is symmetrical about both x-x and y-y axis. \n",
+ "X1=0\n",
+ "X2=0\n",
+ "X3=0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "\n",
+ "Y1=245.5\n",
+ "Y2=125.0\n",
+ "Y3=4.5\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n",
+ "\n",
+ "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n",
+ "\n",
+ "#Izz=Polar moment of inertia\n",
+ "\n",
+ "Izz=Ixx+Iyy\n",
+ "\n",
+ "#misprint in book\n",
+ "\n",
+ "print \"Izz=\",round(Izz,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.15 page number 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 135903229.0 mm^4\n",
+ "Iyy= 5276363.1 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*13.5 #Area of 1,mm^2\n",
+ "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n",
+ "A3=100.0*13.5 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n",
+ "\n",
+ "X1=50.0\n",
+ "X2=8.1/2.0\n",
+ "X3=50.0\n",
+ "\n",
+ "xc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "Y1=386.5+13.5/2.0\n",
+ "Y2=200.0\n",
+ "Y3=13.5/2\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y\n",
+ "\n",
+ "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.16 page number 134\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Polar moment of Inertia= 32109472.0 mm^4\n",
+ "kxx= 90.3 mm\n",
+ "kyy= 23.09 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The section is divided into three rectangles A1, A2 and A3\n",
+ "\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=80.0*12.0 #Area of 1,mm^2\n",
+ "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n",
+ "A3=120.0*10.0 #Area of 3,mm^2 \n",
+ "\n",
+ "A=A1+A2+A3 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n",
+ "\n",
+ "Y1=150-6\n",
+ "Y2=(128/2) +10\n",
+ "Y3=5\n",
+ "\n",
+ "yc=(A1*X1+A2*X2+A3*X3)/A\n",
+ "\n",
+ "X1=60.0\n",
+ "X2=60.0\n",
+ "X3=60.0\n",
+ "\n",
+ "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n",
+ "\n",
+ "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n",
+ "\n",
+ "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n",
+ "\n",
+ "\n",
+ "\n",
+ "PolarmomentofInertia=Ixx+Iyy\n",
+ "\n",
+ "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n",
+ "\n",
+ "kxx=sqrt(Ixx/A)\n",
+ "print \"kxx=\",round(kxx,2),\"mm\"\n",
+ "\n",
+ "\n",
+ "kyy=sqrt(Iyy/A)\n",
+ "print \"kyy=\",round(kyy,2),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.17 page number 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 31543827.2 mm^4\n",
+ "Iyy= 19745121.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#The given composite section may be divided into simple rectangles and triangle\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=100.0*30.0 #Area of 1,mm^2\n",
+ "A2=100.0*25.0 #Area of 2,mm^2\n",
+ "A3=200.0*20.0 #Area of 3,mm^2 \n",
+ "A4=87.5*20.0/2.0 #Area of 4,mm^2\n",
+ "A5=87.5*20.0/2.0 #Area of 5,mm^2\n",
+ "\n",
+ "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n",
+ "\n",
+ "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n",
+ "\n",
+ "X1=100.0\n",
+ "X2=100.0\n",
+ "X3=100.0\n",
+ "X4=2.0*87.5/3.0\n",
+ "X5=200-X4\n",
+ "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n",
+ "\n",
+ "Y1=135.0\n",
+ "Y2=70.0\n",
+ "Y3=10.0\n",
+ "Y4=(20.0/3.0)+20.0\n",
+ "Y5=Y4\n",
+ "\n",
+ "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n",
+ "\n",
+ "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n",
+ "\n",
+ "\n",
+ "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n",
+ "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n",
+ "\n",
+ "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.18 page number137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 806093331.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n",
+ "#The given section is split up into simple rectangles\n",
+ "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=400*20.0\n",
+ "A2=100*10\n",
+ "A3=10*380.0\n",
+ "A4=100*10.0\n",
+ "\n",
+ "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.19 page number 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 50399393.9 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "# The built-up section is divided into six simple rectangles\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "\n",
+ "A1=250.0*10.0 #Area of 1,mm^2\n",
+ "A2=40.0*10.0 #Area of 2,mm^2\n",
+ "\n",
+ "A=A1*2+A2*4 #Total area,mm^2 \n",
+ "\n",
+ "\n",
+ "Y1=5.0\n",
+ "Y2=30.0\n",
+ "Y3=15.0\n",
+ "Y4=255.0\n",
+ "Y5=135.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n",
+ "\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.20 page number 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "145.394736842\n",
+ "Ixx= 752680131.6 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Each angle is divided into two rectangles \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "A1=600.0*15.0 #Area of 1,mm^2\n",
+ "A2=140.0*10.0 #Area of 2,mm^2\n",
+ "A3=150.0*10.0\n",
+ "A4=400.0*20.0\n",
+ "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n",
+ "\n",
+ "#The distance of the centroidal axis from the bottom fibres of section \n",
+ "\n",
+ "Y1=320.0\n",
+ "Y2=100.0\n",
+ "Y3=25.0\n",
+ "Y4=10.0\n",
+ "\n",
+ "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n",
+ "print yc\n",
+ "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n",
+ "\n",
+ "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n",
+ "\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.21 page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ixx= 36000000.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import asin,sin,cos,pi\n",
+ "\n",
+ "#The rectangle is divided into four triangles\n",
+ "#The lines AE and FC are parallel to x-axis\n",
+ " \n",
+ "#variable declaration\n",
+ "\n",
+ "theta=asin(4.0/5.0)\n",
+ "\n",
+ "AB=100.0\n",
+ "BK=AB*sin((90*pi/180)-theta)\n",
+ "ND=BK\n",
+ "FD=60.0/sin(theta)\n",
+ "AF=150.0-FD\n",
+ "FL=ME=75.0*sin(theta)\n",
+ "AE=AB/cos((90*pi/180)-theta)\n",
+ "FC=AE\n",
+ "A=125.0*60.0/2.0\n",
+ "\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n",
+ "\n",
+ "print \"Ixx=\",round(Ixx),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.22, page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IAB= 4292979.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n",
+ "\n",
+ "#variable declaration\n",
+ "#Now,Moment of inertia of the section about axis AB\n",
+ "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n",
+ "\n",
+ "print \"IAB=\",round(IAB),\"mm^4\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example4.23 page number141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "106.435694487 28.4724404943\n",
+ "Ixx= 686943.0 mm^4\n",
+ "Iyy= 17146488.0 mm^4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "r=20.0 #radius of semicircle\n",
+ "A1=80.0*20.0/2 #Area of triangle ABC \n",
+ "A3=40.0*80.0 #Area of rectangle ACDE \n",
+ "A4=pi*pow(r,2)/2 #Area of semicircle\n",
+ "At1=30.0*20.0/2.0\n",
+ "At2=50.0*20.0/2.0\n",
+ "A=A1+A3-A4 #Total area\n",
+ "\n",
+ "X1=2.0*30.0/3.0\n",
+ "X2=50.0*30.0/3.0\n",
+ "X3=40.0\n",
+ "X4=40.0\n",
+ "\n",
+ "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n",
+ "#mistake in book\n",
+ "\n",
+ "Y1=(20.0/3.0)+40.0\n",
+ "Y3=20.0\n",
+ "Y4=(4.0*20.0)/(3.0*pi)\n",
+ "\n",
+ "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n",
+ "print xc,yc\n",
+ "#\n",
+ "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n",
+ "\n",
+ "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n",
+ "\n",
+ "print\"Ixx=\",round(Ixx),\"mm^4\"\n",
+ "\n",
+ "\n",
+ "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n",
+ "\n",
+ "print\"Iyy=\",round(Iyy),\"mm^4\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 4.27 page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "25000.0 5625.0 235.619449019 7889.38055098\n",
+ "xc= 0.411 m\n",
+ "yc= 0.329 m\n",
+ "zc= 0.221 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n",
+ "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "W=25000.0 # weight of concrete=25000, N/m^3\n",
+ "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n",
+ "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n",
+ "W3=2500\n",
+ "\n",
+ "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n",
+ "\n",
+ "X1=0.375\n",
+ "X2=0.5\n",
+ "X3=0.5\n",
+ "\n",
+ "Y1=0.3\n",
+ "Y2=0.4\n",
+ "Y3=0.4\n",
+ "\n",
+ "Z1=0.25\n",
+ "Z2=0.15\n",
+ "Z3=0.15\n",
+ "\n",
+ "Wt=W3+W1-W2\n",
+ "print W,W1,W2,Wt\n",
+ "xc=(W1*X1-W2*X2+W3*X3)/Wt\n",
+ "\n",
+ "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n",
+ "\n",
+ "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n",
+ "\n",
+ "print\"xc=\",round(xc,3),\"m\"\n",
+ "print\"yc=\",round(yc,3),\"m\"\n",
+ "print\"zc=\",round(zc,3),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_24XsJCT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_24XsJCT.ipynb
new file mode 100644
index 00000000..87ac24ec
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_24XsJCT.ipynb
@@ -0,0 +1,774 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter5-FRICTION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1250.0 N\n",
+ "P= 1210.36288071 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=1000.0 #weight of block a\n",
+ "Wb=2000.0 #weight of block b\n",
+ "uab=1.0/4.0 #coefficient of friction between A and B\n",
+ "ubg=1.0/3.0 #coefficient of friction between ground and B\n",
+ "#When P is horizontal\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "N2=N1+ Wb #Normal Reaction on block B from Ground\n",
+ "F2=ubg*N2 #limiting Friction between A and ground\n",
+ "P=F1+F2\n",
+ "print \"P=\",P,\"N\"\n",
+ "#When P is inclined at angle o\n",
+ "o=30.0*3.14/180.0\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "#from\n",
+ "#N2+Psin30=N1+Wb\n",
+ "#Pcos30=F1+F2\n",
+ "#F1=ubg*N2\n",
+ "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n",
+ "P=(N1+Wb-N2)/math.sin(o)\n",
+ "print \"P=\",P,\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "29.0693410161 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=300.0 #weight of upper block \n",
+ "Wb=900.0 #weight of lower block \n",
+ "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n",
+ "u2=1.0/3.0 #coefficient of friction between ground and lower block\n",
+ "#using \n",
+ "#N1=Wacoso Normal Reaction\n",
+ "#F1=u1*N1 Friction\n",
+ "#N2=Wbcoso+N1\n",
+ "#F2=u2*N2\n",
+ "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n",
+ "print o,\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 30.0152164356\n",
+ "coefficient of friction is 0.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W=500.0 #weight of block\n",
+ "F1=200.0 #force up the inclined plane when block is moving down\n",
+ "F2=300.0 #force up the inclined plane when block is at rest\n",
+ "#When block starts moving down the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Fr+F1=Wsino\n",
+ "#sino-ucoso=F1/w 1\n",
+ "#When block starts moving up the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Wsino+Wucoso=F2\n",
+ "#using these equations\n",
+ "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n",
+ "print \"Angle of inclination is \",(o*180/3.14)\n",
+ "#using 1\n",
+ "u=math.sin(o)-F1/W\n",
+ "print \"coefficient of friction is\",round(u,3)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of Inclination 21.8124674778\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "uag=0.5 #coefficient of friction between block A and the plane\n",
+ "ubg=0.2 #coefficient of friction between block B and the plane\n",
+ "Wb=500.0 #weight of block B\n",
+ "Wa=1000.0 #weight of block A\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N1=Wacoso ,Fr=uagN1\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=uagWacoso-Wasino\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N2=Wbcoso ,Fr=uagN2\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=Wbsino-ubgwbsino\n",
+ "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n",
+ "print \"Angle of Inclination\",o;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "853.305553493 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wl=750.0 #weight of lower block\n",
+ "Wu=500.0 #weight of upper block\n",
+ "o1=60.0*3.14/180.0 #angle of inclined plane\n",
+ "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n",
+ "u=0.2 #coefficient of friction\n",
+ "#for 750 N block\n",
+ "#Σ Forces normal to the plane = 0 \n",
+ "N1=Wl*math.cos(o1)\n",
+ "F1=u*N1\n",
+ "#Σ Forces parallel to the plane = 0\n",
+ "T=F1+Wl*math.sin(o1)\n",
+ "#Σ Forces horizontal to the plane = 0\n",
+ "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n",
+ "print P,\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Least Weight is 266.34090474 N\n",
+ "Greatest Weight is 969.473014916 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n",
+ "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n",
+ "Wbc=1000.0 #weight of block on plane BC\n",
+ "ubc=0.28 #coefficient of friction between the load and the plane BC \n",
+ "uac=0.20 #coefficient of friction between the load and the plane AC\n",
+ "#for least weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)-F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Least Weight is\",W,\"N\"\n",
+ "#for greatest weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)+F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Greatest Weight is\",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight 10498.172578 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.4 #The coefficient of friction on the horizontal plane\n",
+ "oi=30 #angle of inclined plane\n",
+ "o=20.0 #The limiting angle of friction for block B on the inclined plane\n",
+ "wb=5000.0 #weight of block b\n",
+ "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n",
+ "#for block B\n",
+ "#N1 N2 N3 are normal reaction\n",
+ "#F1 F2 are frictional forces\n",
+ "#F1=ub*N1 \n",
+ "#N1 sinoi + F1 cos oi=wb\n",
+ "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n",
+ "F1=ub*N1\n",
+ "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n",
+ "\n",
+ "#force balance on A in horizontal balance\n",
+ "F2=C\n",
+ "N2=F2/u\n",
+ "#force balance on A in vertical balance\n",
+ "W=N2\n",
+ "print \"Weight \",W,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force = 23812.7516422 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "w=20000.0 #weight of upper block\n",
+ "o=15.0 #The angle of friction for all surfaces of contact\n",
+ "u=math.tan(o) #coefficient of friction\n",
+ "#R1 R2 are forces\n",
+ "Or1=15.0 #angle force R1 makes with x axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n",
+ "#applyig lamis theorem on block B\n",
+ "Or1=15.0 #angle force R3 makes with Y axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n",
+ "print \"Force =\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 66.26 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "w=160.0 #weight of block,KN\n",
+ "u=0.25 #coefficient of friction\n",
+ "phi=math.atan(u)\n",
+ "\n",
+ "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n",
+ "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n",
+ "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n",
+ "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n",
+ "print\"P=\",round(P,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force required is 62.0836173323 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.0 #length of ladder\n",
+ "u1=0.2 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.3 #coefficient of friction between floor and the ladder\n",
+ "wm=600.0 #weight of man\n",
+ "lm=3.0 #distance of man\n",
+ "o=3.14*60.0/180.0 #angle made by ladder with floor\n",
+ "#sum of all moment about A =0\n",
+ "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n",
+ "Fb=u1*Nb #friction from wall\n",
+ "#force balance in vertical direction\n",
+ "Na=(w+wm-Fb) # normal reaction from ground\n",
+ "Fa=u2*Na #friction from ground\n",
+ "P=Nb-Fa\n",
+ "print \"Force required is \",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 71.6013500101 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=6.0 #length of ladder\n",
+ "u1=0.4 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.25 #coefficient of friction between floor and the ladder\n",
+ "wl=900.0 #weight of load\n",
+ "ll=5.0 #distance of load\n",
+ "#force balancing\n",
+ "#Na Nb normal reaction at A and B\n",
+ "#Fa Fb friction at A and B\n",
+ "#Fa=u2*Na \n",
+ "#Fb=u1*Nb\n",
+ "#Na+Fb=w+wl\n",
+ "#Fa=Nb\n",
+ "Nb=(wl+w)*u2/(1+u2*u1)\n",
+ "Na=Nb/u2\n",
+ "Fa=u2*Na\n",
+ "Fb=u1*Nb\n",
+ "#sum of all moments about a is =0\n",
+ "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n",
+ "o=math.atan(temp)*180/3.14\n",
+ "print \"Angle of inclination is \",o,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length will 0.5 times\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o=45.0*3.14/180.0 #angle of inclination \n",
+ "u=0.5 #coefficient of friction\n",
+ "r=1.5 #ratio of mans weight to ladders weight\n",
+ "o1=45.0*math.pi/180.0 #angle of inclination\n",
+ "#from law of friction\n",
+ "#Fa = μNa\n",
+ "#Fb = μNb\n",
+ "#Fa – Nb = 0 \n",
+ "#Na + Fb = W + r W\n",
+ "#ΣMA = 0\n",
+ "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n",
+ "print \"length will\",o,\"times\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum weight is 6277.60420331\n",
+ "Minimum weight is 57.3467183245\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "n=1.25 #number of turns\n",
+ "o=2*3.14*n #angle of contact\n",
+ "u=0.3 #coefficient of friction\n",
+ "t=600.0 #force at the other end of the rope\n",
+ "#if the impending motion of the weight be downward.\n",
+ "W=T2=t*2.71**(u*o)\n",
+ "print \"Maximum weight is \",W\n",
+ "#if the impending motion of weight be upwards\n",
+ "W=T1=t*2.71**(-1*u*o)\n",
+ "print \"Minimum weight is \",W"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight is 136.9599857 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n",
+ "uo=0.30 #The coefficient of friction between other surfaces\n",
+ "cosa=4.0/5.0 #cos of angle of inclination\n",
+ "sina=3.0/5.0 #sin of angle of inclination\n",
+ "Ww=1000.0 #weight\n",
+ "o=3.14 #angle of contact of rope with pulley\n",
+ "#for unknown weight\n",
+ "#force balance perpendicular to the plane\n",
+ "#N1 = W cos α\n",
+ "#fr=uoN1\n",
+ "#force balance along the plane\n",
+ "#T1 = F1 + W sin α\n",
+ "#for 1000 N body\n",
+ "#force balance perpendicular to the plane\n",
+ "#N2=N1+Wwcosa\n",
+ "#fr2=uoN2\n",
+ "#force balance along the plane\n",
+ "#T2= Wwsina -F1 -F2\n",
+ "#T2=T1*e^(ur*o)\n",
+ "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n",
+ "print \"Weight is \",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force P applied at the end of the brake lever 274.480678202\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.3 #coefficient of friction\n",
+ "r=250 #radius of brake drum\n",
+ "l=300 #length of lever arm\n",
+ "M=300000.0 #torque\n",
+ "o=r*3.14/180.0\n",
+ "l2=50.0\n",
+ "#using \n",
+ "#T2 = T1e^(μθ) T1 and T2 are tension\n",
+ "#(T2-T1)r=M\n",
+ "T1=M/(r*(2.71**(u*o)-1))\n",
+ "T2=(2.71**(u*o))*T1\n",
+ "#Consider the lever arm. Taking moment about the hinge\n",
+ "p=T2*l2/l #force P applied at the end of the brake lever\n",
+ "print \"force P applied at the end of the brake lever\",p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6972.02507534 mm\n",
+ "Power Transmitted 3252832.96438 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O1))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6955.3382782 mm\n",
+ "Power Transmitted 3035637.41075 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=3.14+2*math.asin((d1-d2)/(2*D))\n",
+ "O2=3.14-2*math.asin((d1-d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O2))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_8mD0UuG.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_8mD0UuG.ipynb
new file mode 100644
index 00000000..87ac24ec
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_8mD0UuG.ipynb
@@ -0,0 +1,774 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter5-FRICTION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1250.0 N\n",
+ "P= 1210.36288071 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=1000.0 #weight of block a\n",
+ "Wb=2000.0 #weight of block b\n",
+ "uab=1.0/4.0 #coefficient of friction between A and B\n",
+ "ubg=1.0/3.0 #coefficient of friction between ground and B\n",
+ "#When P is horizontal\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "N2=N1+ Wb #Normal Reaction on block B from Ground\n",
+ "F2=ubg*N2 #limiting Friction between A and ground\n",
+ "P=F1+F2\n",
+ "print \"P=\",P,\"N\"\n",
+ "#When P is inclined at angle o\n",
+ "o=30.0*3.14/180.0\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "#from\n",
+ "#N2+Psin30=N1+Wb\n",
+ "#Pcos30=F1+F2\n",
+ "#F1=ubg*N2\n",
+ "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n",
+ "P=(N1+Wb-N2)/math.sin(o)\n",
+ "print \"P=\",P,\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "29.0693410161 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=300.0 #weight of upper block \n",
+ "Wb=900.0 #weight of lower block \n",
+ "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n",
+ "u2=1.0/3.0 #coefficient of friction between ground and lower block\n",
+ "#using \n",
+ "#N1=Wacoso Normal Reaction\n",
+ "#F1=u1*N1 Friction\n",
+ "#N2=Wbcoso+N1\n",
+ "#F2=u2*N2\n",
+ "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n",
+ "print o,\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 30.0152164356\n",
+ "coefficient of friction is 0.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W=500.0 #weight of block\n",
+ "F1=200.0 #force up the inclined plane when block is moving down\n",
+ "F2=300.0 #force up the inclined plane when block is at rest\n",
+ "#When block starts moving down the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Fr+F1=Wsino\n",
+ "#sino-ucoso=F1/w 1\n",
+ "#When block starts moving up the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Wsino+Wucoso=F2\n",
+ "#using these equations\n",
+ "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n",
+ "print \"Angle of inclination is \",(o*180/3.14)\n",
+ "#using 1\n",
+ "u=math.sin(o)-F1/W\n",
+ "print \"coefficient of friction is\",round(u,3)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of Inclination 21.8124674778\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "uag=0.5 #coefficient of friction between block A and the plane\n",
+ "ubg=0.2 #coefficient of friction between block B and the plane\n",
+ "Wb=500.0 #weight of block B\n",
+ "Wa=1000.0 #weight of block A\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N1=Wacoso ,Fr=uagN1\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=uagWacoso-Wasino\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N2=Wbcoso ,Fr=uagN2\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=Wbsino-ubgwbsino\n",
+ "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n",
+ "print \"Angle of Inclination\",o;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "853.305553493 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wl=750.0 #weight of lower block\n",
+ "Wu=500.0 #weight of upper block\n",
+ "o1=60.0*3.14/180.0 #angle of inclined plane\n",
+ "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n",
+ "u=0.2 #coefficient of friction\n",
+ "#for 750 N block\n",
+ "#Σ Forces normal to the plane = 0 \n",
+ "N1=Wl*math.cos(o1)\n",
+ "F1=u*N1\n",
+ "#Σ Forces parallel to the plane = 0\n",
+ "T=F1+Wl*math.sin(o1)\n",
+ "#Σ Forces horizontal to the plane = 0\n",
+ "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n",
+ "print P,\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Least Weight is 266.34090474 N\n",
+ "Greatest Weight is 969.473014916 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n",
+ "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n",
+ "Wbc=1000.0 #weight of block on plane BC\n",
+ "ubc=0.28 #coefficient of friction between the load and the plane BC \n",
+ "uac=0.20 #coefficient of friction between the load and the plane AC\n",
+ "#for least weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)-F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Least Weight is\",W,\"N\"\n",
+ "#for greatest weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)+F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Greatest Weight is\",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight 10498.172578 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.4 #The coefficient of friction on the horizontal plane\n",
+ "oi=30 #angle of inclined plane\n",
+ "o=20.0 #The limiting angle of friction for block B on the inclined plane\n",
+ "wb=5000.0 #weight of block b\n",
+ "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n",
+ "#for block B\n",
+ "#N1 N2 N3 are normal reaction\n",
+ "#F1 F2 are frictional forces\n",
+ "#F1=ub*N1 \n",
+ "#N1 sinoi + F1 cos oi=wb\n",
+ "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n",
+ "F1=ub*N1\n",
+ "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n",
+ "\n",
+ "#force balance on A in horizontal balance\n",
+ "F2=C\n",
+ "N2=F2/u\n",
+ "#force balance on A in vertical balance\n",
+ "W=N2\n",
+ "print \"Weight \",W,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force = 23812.7516422 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "w=20000.0 #weight of upper block\n",
+ "o=15.0 #The angle of friction for all surfaces of contact\n",
+ "u=math.tan(o) #coefficient of friction\n",
+ "#R1 R2 are forces\n",
+ "Or1=15.0 #angle force R1 makes with x axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n",
+ "#applyig lamis theorem on block B\n",
+ "Or1=15.0 #angle force R3 makes with Y axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n",
+ "print \"Force =\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 66.26 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "w=160.0 #weight of block,KN\n",
+ "u=0.25 #coefficient of friction\n",
+ "phi=math.atan(u)\n",
+ "\n",
+ "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n",
+ "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n",
+ "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n",
+ "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n",
+ "print\"P=\",round(P,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force required is 62.0836173323 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.0 #length of ladder\n",
+ "u1=0.2 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.3 #coefficient of friction between floor and the ladder\n",
+ "wm=600.0 #weight of man\n",
+ "lm=3.0 #distance of man\n",
+ "o=3.14*60.0/180.0 #angle made by ladder with floor\n",
+ "#sum of all moment about A =0\n",
+ "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n",
+ "Fb=u1*Nb #friction from wall\n",
+ "#force balance in vertical direction\n",
+ "Na=(w+wm-Fb) # normal reaction from ground\n",
+ "Fa=u2*Na #friction from ground\n",
+ "P=Nb-Fa\n",
+ "print \"Force required is \",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 71.6013500101 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=6.0 #length of ladder\n",
+ "u1=0.4 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.25 #coefficient of friction between floor and the ladder\n",
+ "wl=900.0 #weight of load\n",
+ "ll=5.0 #distance of load\n",
+ "#force balancing\n",
+ "#Na Nb normal reaction at A and B\n",
+ "#Fa Fb friction at A and B\n",
+ "#Fa=u2*Na \n",
+ "#Fb=u1*Nb\n",
+ "#Na+Fb=w+wl\n",
+ "#Fa=Nb\n",
+ "Nb=(wl+w)*u2/(1+u2*u1)\n",
+ "Na=Nb/u2\n",
+ "Fa=u2*Na\n",
+ "Fb=u1*Nb\n",
+ "#sum of all moments about a is =0\n",
+ "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n",
+ "o=math.atan(temp)*180/3.14\n",
+ "print \"Angle of inclination is \",o,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length will 0.5 times\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o=45.0*3.14/180.0 #angle of inclination \n",
+ "u=0.5 #coefficient of friction\n",
+ "r=1.5 #ratio of mans weight to ladders weight\n",
+ "o1=45.0*math.pi/180.0 #angle of inclination\n",
+ "#from law of friction\n",
+ "#Fa = μNa\n",
+ "#Fb = μNb\n",
+ "#Fa – Nb = 0 \n",
+ "#Na + Fb = W + r W\n",
+ "#ΣMA = 0\n",
+ "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n",
+ "print \"length will\",o,\"times\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum weight is 6277.60420331\n",
+ "Minimum weight is 57.3467183245\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "n=1.25 #number of turns\n",
+ "o=2*3.14*n #angle of contact\n",
+ "u=0.3 #coefficient of friction\n",
+ "t=600.0 #force at the other end of the rope\n",
+ "#if the impending motion of the weight be downward.\n",
+ "W=T2=t*2.71**(u*o)\n",
+ "print \"Maximum weight is \",W\n",
+ "#if the impending motion of weight be upwards\n",
+ "W=T1=t*2.71**(-1*u*o)\n",
+ "print \"Minimum weight is \",W"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight is 136.9599857 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n",
+ "uo=0.30 #The coefficient of friction between other surfaces\n",
+ "cosa=4.0/5.0 #cos of angle of inclination\n",
+ "sina=3.0/5.0 #sin of angle of inclination\n",
+ "Ww=1000.0 #weight\n",
+ "o=3.14 #angle of contact of rope with pulley\n",
+ "#for unknown weight\n",
+ "#force balance perpendicular to the plane\n",
+ "#N1 = W cos α\n",
+ "#fr=uoN1\n",
+ "#force balance along the plane\n",
+ "#T1 = F1 + W sin α\n",
+ "#for 1000 N body\n",
+ "#force balance perpendicular to the plane\n",
+ "#N2=N1+Wwcosa\n",
+ "#fr2=uoN2\n",
+ "#force balance along the plane\n",
+ "#T2= Wwsina -F1 -F2\n",
+ "#T2=T1*e^(ur*o)\n",
+ "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n",
+ "print \"Weight is \",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force P applied at the end of the brake lever 274.480678202\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.3 #coefficient of friction\n",
+ "r=250 #radius of brake drum\n",
+ "l=300 #length of lever arm\n",
+ "M=300000.0 #torque\n",
+ "o=r*3.14/180.0\n",
+ "l2=50.0\n",
+ "#using \n",
+ "#T2 = T1e^(μθ) T1 and T2 are tension\n",
+ "#(T2-T1)r=M\n",
+ "T1=M/(r*(2.71**(u*o)-1))\n",
+ "T2=(2.71**(u*o))*T1\n",
+ "#Consider the lever arm. Taking moment about the hinge\n",
+ "p=T2*l2/l #force P applied at the end of the brake lever\n",
+ "print \"force P applied at the end of the brake lever\",p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6972.02507534 mm\n",
+ "Power Transmitted 3252832.96438 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O1))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6955.3382782 mm\n",
+ "Power Transmitted 3035637.41075 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=3.14+2*math.asin((d1-d2)/(2*D))\n",
+ "O2=3.14-2*math.asin((d1-d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O2))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_LKhM1Au.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_LKhM1Au.ipynb
new file mode 100644
index 00000000..87ac24ec
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_LKhM1Au.ipynb
@@ -0,0 +1,774 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter5-FRICTION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1250.0 N\n",
+ "P= 1210.36288071 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=1000.0 #weight of block a\n",
+ "Wb=2000.0 #weight of block b\n",
+ "uab=1.0/4.0 #coefficient of friction between A and B\n",
+ "ubg=1.0/3.0 #coefficient of friction between ground and B\n",
+ "#When P is horizontal\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "N2=N1+ Wb #Normal Reaction on block B from Ground\n",
+ "F2=ubg*N2 #limiting Friction between A and ground\n",
+ "P=F1+F2\n",
+ "print \"P=\",P,\"N\"\n",
+ "#When P is inclined at angle o\n",
+ "o=30.0*3.14/180.0\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "#from\n",
+ "#N2+Psin30=N1+Wb\n",
+ "#Pcos30=F1+F2\n",
+ "#F1=ubg*N2\n",
+ "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n",
+ "P=(N1+Wb-N2)/math.sin(o)\n",
+ "print \"P=\",P,\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "29.0693410161 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=300.0 #weight of upper block \n",
+ "Wb=900.0 #weight of lower block \n",
+ "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n",
+ "u2=1.0/3.0 #coefficient of friction between ground and lower block\n",
+ "#using \n",
+ "#N1=Wacoso Normal Reaction\n",
+ "#F1=u1*N1 Friction\n",
+ "#N2=Wbcoso+N1\n",
+ "#F2=u2*N2\n",
+ "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n",
+ "print o,\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 30.0152164356\n",
+ "coefficient of friction is 0.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W=500.0 #weight of block\n",
+ "F1=200.0 #force up the inclined plane when block is moving down\n",
+ "F2=300.0 #force up the inclined plane when block is at rest\n",
+ "#When block starts moving down the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Fr+F1=Wsino\n",
+ "#sino-ucoso=F1/w 1\n",
+ "#When block starts moving up the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Wsino+Wucoso=F2\n",
+ "#using these equations\n",
+ "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n",
+ "print \"Angle of inclination is \",(o*180/3.14)\n",
+ "#using 1\n",
+ "u=math.sin(o)-F1/W\n",
+ "print \"coefficient of friction is\",round(u,3)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of Inclination 21.8124674778\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "uag=0.5 #coefficient of friction between block A and the plane\n",
+ "ubg=0.2 #coefficient of friction between block B and the plane\n",
+ "Wb=500.0 #weight of block B\n",
+ "Wa=1000.0 #weight of block A\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N1=Wacoso ,Fr=uagN1\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=uagWacoso-Wasino\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N2=Wbcoso ,Fr=uagN2\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=Wbsino-ubgwbsino\n",
+ "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n",
+ "print \"Angle of Inclination\",o;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "853.305553493 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wl=750.0 #weight of lower block\n",
+ "Wu=500.0 #weight of upper block\n",
+ "o1=60.0*3.14/180.0 #angle of inclined plane\n",
+ "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n",
+ "u=0.2 #coefficient of friction\n",
+ "#for 750 N block\n",
+ "#Σ Forces normal to the plane = 0 \n",
+ "N1=Wl*math.cos(o1)\n",
+ "F1=u*N1\n",
+ "#Σ Forces parallel to the plane = 0\n",
+ "T=F1+Wl*math.sin(o1)\n",
+ "#Σ Forces horizontal to the plane = 0\n",
+ "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n",
+ "print P,\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Least Weight is 266.34090474 N\n",
+ "Greatest Weight is 969.473014916 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n",
+ "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n",
+ "Wbc=1000.0 #weight of block on plane BC\n",
+ "ubc=0.28 #coefficient of friction between the load and the plane BC \n",
+ "uac=0.20 #coefficient of friction between the load and the plane AC\n",
+ "#for least weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)-F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Least Weight is\",W,\"N\"\n",
+ "#for greatest weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)+F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Greatest Weight is\",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight 10498.172578 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.4 #The coefficient of friction on the horizontal plane\n",
+ "oi=30 #angle of inclined plane\n",
+ "o=20.0 #The limiting angle of friction for block B on the inclined plane\n",
+ "wb=5000.0 #weight of block b\n",
+ "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n",
+ "#for block B\n",
+ "#N1 N2 N3 are normal reaction\n",
+ "#F1 F2 are frictional forces\n",
+ "#F1=ub*N1 \n",
+ "#N1 sinoi + F1 cos oi=wb\n",
+ "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n",
+ "F1=ub*N1\n",
+ "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n",
+ "\n",
+ "#force balance on A in horizontal balance\n",
+ "F2=C\n",
+ "N2=F2/u\n",
+ "#force balance on A in vertical balance\n",
+ "W=N2\n",
+ "print \"Weight \",W,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force = 23812.7516422 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "w=20000.0 #weight of upper block\n",
+ "o=15.0 #The angle of friction for all surfaces of contact\n",
+ "u=math.tan(o) #coefficient of friction\n",
+ "#R1 R2 are forces\n",
+ "Or1=15.0 #angle force R1 makes with x axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n",
+ "#applyig lamis theorem on block B\n",
+ "Or1=15.0 #angle force R3 makes with Y axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n",
+ "print \"Force =\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 66.26 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "w=160.0 #weight of block,KN\n",
+ "u=0.25 #coefficient of friction\n",
+ "phi=math.atan(u)\n",
+ "\n",
+ "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n",
+ "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n",
+ "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n",
+ "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n",
+ "print\"P=\",round(P,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force required is 62.0836173323 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.0 #length of ladder\n",
+ "u1=0.2 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.3 #coefficient of friction between floor and the ladder\n",
+ "wm=600.0 #weight of man\n",
+ "lm=3.0 #distance of man\n",
+ "o=3.14*60.0/180.0 #angle made by ladder with floor\n",
+ "#sum of all moment about A =0\n",
+ "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n",
+ "Fb=u1*Nb #friction from wall\n",
+ "#force balance in vertical direction\n",
+ "Na=(w+wm-Fb) # normal reaction from ground\n",
+ "Fa=u2*Na #friction from ground\n",
+ "P=Nb-Fa\n",
+ "print \"Force required is \",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 71.6013500101 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=6.0 #length of ladder\n",
+ "u1=0.4 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.25 #coefficient of friction between floor and the ladder\n",
+ "wl=900.0 #weight of load\n",
+ "ll=5.0 #distance of load\n",
+ "#force balancing\n",
+ "#Na Nb normal reaction at A and B\n",
+ "#Fa Fb friction at A and B\n",
+ "#Fa=u2*Na \n",
+ "#Fb=u1*Nb\n",
+ "#Na+Fb=w+wl\n",
+ "#Fa=Nb\n",
+ "Nb=(wl+w)*u2/(1+u2*u1)\n",
+ "Na=Nb/u2\n",
+ "Fa=u2*Na\n",
+ "Fb=u1*Nb\n",
+ "#sum of all moments about a is =0\n",
+ "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n",
+ "o=math.atan(temp)*180/3.14\n",
+ "print \"Angle of inclination is \",o,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length will 0.5 times\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o=45.0*3.14/180.0 #angle of inclination \n",
+ "u=0.5 #coefficient of friction\n",
+ "r=1.5 #ratio of mans weight to ladders weight\n",
+ "o1=45.0*math.pi/180.0 #angle of inclination\n",
+ "#from law of friction\n",
+ "#Fa = μNa\n",
+ "#Fb = μNb\n",
+ "#Fa – Nb = 0 \n",
+ "#Na + Fb = W + r W\n",
+ "#ΣMA = 0\n",
+ "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n",
+ "print \"length will\",o,\"times\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum weight is 6277.60420331\n",
+ "Minimum weight is 57.3467183245\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "n=1.25 #number of turns\n",
+ "o=2*3.14*n #angle of contact\n",
+ "u=0.3 #coefficient of friction\n",
+ "t=600.0 #force at the other end of the rope\n",
+ "#if the impending motion of the weight be downward.\n",
+ "W=T2=t*2.71**(u*o)\n",
+ "print \"Maximum weight is \",W\n",
+ "#if the impending motion of weight be upwards\n",
+ "W=T1=t*2.71**(-1*u*o)\n",
+ "print \"Minimum weight is \",W"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight is 136.9599857 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n",
+ "uo=0.30 #The coefficient of friction between other surfaces\n",
+ "cosa=4.0/5.0 #cos of angle of inclination\n",
+ "sina=3.0/5.0 #sin of angle of inclination\n",
+ "Ww=1000.0 #weight\n",
+ "o=3.14 #angle of contact of rope with pulley\n",
+ "#for unknown weight\n",
+ "#force balance perpendicular to the plane\n",
+ "#N1 = W cos α\n",
+ "#fr=uoN1\n",
+ "#force balance along the plane\n",
+ "#T1 = F1 + W sin α\n",
+ "#for 1000 N body\n",
+ "#force balance perpendicular to the plane\n",
+ "#N2=N1+Wwcosa\n",
+ "#fr2=uoN2\n",
+ "#force balance along the plane\n",
+ "#T2= Wwsina -F1 -F2\n",
+ "#T2=T1*e^(ur*o)\n",
+ "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n",
+ "print \"Weight is \",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force P applied at the end of the brake lever 274.480678202\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.3 #coefficient of friction\n",
+ "r=250 #radius of brake drum\n",
+ "l=300 #length of lever arm\n",
+ "M=300000.0 #torque\n",
+ "o=r*3.14/180.0\n",
+ "l2=50.0\n",
+ "#using \n",
+ "#T2 = T1e^(μθ) T1 and T2 are tension\n",
+ "#(T2-T1)r=M\n",
+ "T1=M/(r*(2.71**(u*o)-1))\n",
+ "T2=(2.71**(u*o))*T1\n",
+ "#Consider the lever arm. Taking moment about the hinge\n",
+ "p=T2*l2/l #force P applied at the end of the brake lever\n",
+ "print \"force P applied at the end of the brake lever\",p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6972.02507534 mm\n",
+ "Power Transmitted 3252832.96438 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O1))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6955.3382782 mm\n",
+ "Power Transmitted 3035637.41075 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=3.14+2*math.asin((d1-d2)/(2*D))\n",
+ "O2=3.14-2*math.asin((d1-d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O2))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_ZKnRxp7.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_ZKnRxp7.ipynb
new file mode 100644
index 00000000..87ac24ec
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_ZKnRxp7.ipynb
@@ -0,0 +1,774 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter5-FRICTION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1250.0 N\n",
+ "P= 1210.36288071 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=1000.0 #weight of block a\n",
+ "Wb=2000.0 #weight of block b\n",
+ "uab=1.0/4.0 #coefficient of friction between A and B\n",
+ "ubg=1.0/3.0 #coefficient of friction between ground and B\n",
+ "#When P is horizontal\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "N2=N1+ Wb #Normal Reaction on block B from Ground\n",
+ "F2=ubg*N2 #limiting Friction between A and ground\n",
+ "P=F1+F2\n",
+ "print \"P=\",P,\"N\"\n",
+ "#When P is inclined at angle o\n",
+ "o=30.0*3.14/180.0\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "#from\n",
+ "#N2+Psin30=N1+Wb\n",
+ "#Pcos30=F1+F2\n",
+ "#F1=ubg*N2\n",
+ "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n",
+ "P=(N1+Wb-N2)/math.sin(o)\n",
+ "print \"P=\",P,\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "29.0693410161 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=300.0 #weight of upper block \n",
+ "Wb=900.0 #weight of lower block \n",
+ "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n",
+ "u2=1.0/3.0 #coefficient of friction between ground and lower block\n",
+ "#using \n",
+ "#N1=Wacoso Normal Reaction\n",
+ "#F1=u1*N1 Friction\n",
+ "#N2=Wbcoso+N1\n",
+ "#F2=u2*N2\n",
+ "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n",
+ "print o,\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 30.0152164356\n",
+ "coefficient of friction is 0.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W=500.0 #weight of block\n",
+ "F1=200.0 #force up the inclined plane when block is moving down\n",
+ "F2=300.0 #force up the inclined plane when block is at rest\n",
+ "#When block starts moving down the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Fr+F1=Wsino\n",
+ "#sino-ucoso=F1/w 1\n",
+ "#When block starts moving up the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Wsino+Wucoso=F2\n",
+ "#using these equations\n",
+ "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n",
+ "print \"Angle of inclination is \",(o*180/3.14)\n",
+ "#using 1\n",
+ "u=math.sin(o)-F1/W\n",
+ "print \"coefficient of friction is\",round(u,3)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of Inclination 21.8124674778\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "uag=0.5 #coefficient of friction between block A and the plane\n",
+ "ubg=0.2 #coefficient of friction between block B and the plane\n",
+ "Wb=500.0 #weight of block B\n",
+ "Wa=1000.0 #weight of block A\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N1=Wacoso ,Fr=uagN1\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=uagWacoso-Wasino\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N2=Wbcoso ,Fr=uagN2\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=Wbsino-ubgwbsino\n",
+ "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n",
+ "print \"Angle of Inclination\",o;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "853.305553493 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wl=750.0 #weight of lower block\n",
+ "Wu=500.0 #weight of upper block\n",
+ "o1=60.0*3.14/180.0 #angle of inclined plane\n",
+ "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n",
+ "u=0.2 #coefficient of friction\n",
+ "#for 750 N block\n",
+ "#Σ Forces normal to the plane = 0 \n",
+ "N1=Wl*math.cos(o1)\n",
+ "F1=u*N1\n",
+ "#Σ Forces parallel to the plane = 0\n",
+ "T=F1+Wl*math.sin(o1)\n",
+ "#Σ Forces horizontal to the plane = 0\n",
+ "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n",
+ "print P,\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Least Weight is 266.34090474 N\n",
+ "Greatest Weight is 969.473014916 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n",
+ "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n",
+ "Wbc=1000.0 #weight of block on plane BC\n",
+ "ubc=0.28 #coefficient of friction between the load and the plane BC \n",
+ "uac=0.20 #coefficient of friction between the load and the plane AC\n",
+ "#for least weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)-F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Least Weight is\",W,\"N\"\n",
+ "#for greatest weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)+F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Greatest Weight is\",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight 10498.172578 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.4 #The coefficient of friction on the horizontal plane\n",
+ "oi=30 #angle of inclined plane\n",
+ "o=20.0 #The limiting angle of friction for block B on the inclined plane\n",
+ "wb=5000.0 #weight of block b\n",
+ "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n",
+ "#for block B\n",
+ "#N1 N2 N3 are normal reaction\n",
+ "#F1 F2 are frictional forces\n",
+ "#F1=ub*N1 \n",
+ "#N1 sinoi + F1 cos oi=wb\n",
+ "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n",
+ "F1=ub*N1\n",
+ "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n",
+ "\n",
+ "#force balance on A in horizontal balance\n",
+ "F2=C\n",
+ "N2=F2/u\n",
+ "#force balance on A in vertical balance\n",
+ "W=N2\n",
+ "print \"Weight \",W,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force = 23812.7516422 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "w=20000.0 #weight of upper block\n",
+ "o=15.0 #The angle of friction for all surfaces of contact\n",
+ "u=math.tan(o) #coefficient of friction\n",
+ "#R1 R2 are forces\n",
+ "Or1=15.0 #angle force R1 makes with x axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n",
+ "#applyig lamis theorem on block B\n",
+ "Or1=15.0 #angle force R3 makes with Y axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n",
+ "print \"Force =\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 66.26 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "w=160.0 #weight of block,KN\n",
+ "u=0.25 #coefficient of friction\n",
+ "phi=math.atan(u)\n",
+ "\n",
+ "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n",
+ "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n",
+ "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n",
+ "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n",
+ "print\"P=\",round(P,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force required is 62.0836173323 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.0 #length of ladder\n",
+ "u1=0.2 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.3 #coefficient of friction between floor and the ladder\n",
+ "wm=600.0 #weight of man\n",
+ "lm=3.0 #distance of man\n",
+ "o=3.14*60.0/180.0 #angle made by ladder with floor\n",
+ "#sum of all moment about A =0\n",
+ "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n",
+ "Fb=u1*Nb #friction from wall\n",
+ "#force balance in vertical direction\n",
+ "Na=(w+wm-Fb) # normal reaction from ground\n",
+ "Fa=u2*Na #friction from ground\n",
+ "P=Nb-Fa\n",
+ "print \"Force required is \",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 71.6013500101 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=6.0 #length of ladder\n",
+ "u1=0.4 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.25 #coefficient of friction between floor and the ladder\n",
+ "wl=900.0 #weight of load\n",
+ "ll=5.0 #distance of load\n",
+ "#force balancing\n",
+ "#Na Nb normal reaction at A and B\n",
+ "#Fa Fb friction at A and B\n",
+ "#Fa=u2*Na \n",
+ "#Fb=u1*Nb\n",
+ "#Na+Fb=w+wl\n",
+ "#Fa=Nb\n",
+ "Nb=(wl+w)*u2/(1+u2*u1)\n",
+ "Na=Nb/u2\n",
+ "Fa=u2*Na\n",
+ "Fb=u1*Nb\n",
+ "#sum of all moments about a is =0\n",
+ "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n",
+ "o=math.atan(temp)*180/3.14\n",
+ "print \"Angle of inclination is \",o,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length will 0.5 times\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o=45.0*3.14/180.0 #angle of inclination \n",
+ "u=0.5 #coefficient of friction\n",
+ "r=1.5 #ratio of mans weight to ladders weight\n",
+ "o1=45.0*math.pi/180.0 #angle of inclination\n",
+ "#from law of friction\n",
+ "#Fa = μNa\n",
+ "#Fb = μNb\n",
+ "#Fa – Nb = 0 \n",
+ "#Na + Fb = W + r W\n",
+ "#ΣMA = 0\n",
+ "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n",
+ "print \"length will\",o,\"times\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum weight is 6277.60420331\n",
+ "Minimum weight is 57.3467183245\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "n=1.25 #number of turns\n",
+ "o=2*3.14*n #angle of contact\n",
+ "u=0.3 #coefficient of friction\n",
+ "t=600.0 #force at the other end of the rope\n",
+ "#if the impending motion of the weight be downward.\n",
+ "W=T2=t*2.71**(u*o)\n",
+ "print \"Maximum weight is \",W\n",
+ "#if the impending motion of weight be upwards\n",
+ "W=T1=t*2.71**(-1*u*o)\n",
+ "print \"Minimum weight is \",W"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight is 136.9599857 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n",
+ "uo=0.30 #The coefficient of friction between other surfaces\n",
+ "cosa=4.0/5.0 #cos of angle of inclination\n",
+ "sina=3.0/5.0 #sin of angle of inclination\n",
+ "Ww=1000.0 #weight\n",
+ "o=3.14 #angle of contact of rope with pulley\n",
+ "#for unknown weight\n",
+ "#force balance perpendicular to the plane\n",
+ "#N1 = W cos α\n",
+ "#fr=uoN1\n",
+ "#force balance along the plane\n",
+ "#T1 = F1 + W sin α\n",
+ "#for 1000 N body\n",
+ "#force balance perpendicular to the plane\n",
+ "#N2=N1+Wwcosa\n",
+ "#fr2=uoN2\n",
+ "#force balance along the plane\n",
+ "#T2= Wwsina -F1 -F2\n",
+ "#T2=T1*e^(ur*o)\n",
+ "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n",
+ "print \"Weight is \",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force P applied at the end of the brake lever 274.480678202\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.3 #coefficient of friction\n",
+ "r=250 #radius of brake drum\n",
+ "l=300 #length of lever arm\n",
+ "M=300000.0 #torque\n",
+ "o=r*3.14/180.0\n",
+ "l2=50.0\n",
+ "#using \n",
+ "#T2 = T1e^(μθ) T1 and T2 are tension\n",
+ "#(T2-T1)r=M\n",
+ "T1=M/(r*(2.71**(u*o)-1))\n",
+ "T2=(2.71**(u*o))*T1\n",
+ "#Consider the lever arm. Taking moment about the hinge\n",
+ "p=T2*l2/l #force P applied at the end of the brake lever\n",
+ "print \"force P applied at the end of the brake lever\",p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6972.02507534 mm\n",
+ "Power Transmitted 3252832.96438 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O1))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6955.3382782 mm\n",
+ "Power Transmitted 3035637.41075 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=3.14+2*math.asin((d1-d2)/(2*D))\n",
+ "O2=3.14-2*math.asin((d1-d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O2))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_nV0EOp8.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_nV0EOp8.ipynb
new file mode 100644
index 00000000..87ac24ec
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_nV0EOp8.ipynb
@@ -0,0 +1,774 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter5-FRICTION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1250.0 N\n",
+ "P= 1210.36288071 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=1000.0 #weight of block a\n",
+ "Wb=2000.0 #weight of block b\n",
+ "uab=1.0/4.0 #coefficient of friction between A and B\n",
+ "ubg=1.0/3.0 #coefficient of friction between ground and B\n",
+ "#When P is horizontal\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "N2=N1+ Wb #Normal Reaction on block B from Ground\n",
+ "F2=ubg*N2 #limiting Friction between A and ground\n",
+ "P=F1+F2\n",
+ "print \"P=\",P,\"N\"\n",
+ "#When P is inclined at angle o\n",
+ "o=30.0*3.14/180.0\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "#from\n",
+ "#N2+Psin30=N1+Wb\n",
+ "#Pcos30=F1+F2\n",
+ "#F1=ubg*N2\n",
+ "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n",
+ "P=(N1+Wb-N2)/math.sin(o)\n",
+ "print \"P=\",P,\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "29.0693410161 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=300.0 #weight of upper block \n",
+ "Wb=900.0 #weight of lower block \n",
+ "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n",
+ "u2=1.0/3.0 #coefficient of friction between ground and lower block\n",
+ "#using \n",
+ "#N1=Wacoso Normal Reaction\n",
+ "#F1=u1*N1 Friction\n",
+ "#N2=Wbcoso+N1\n",
+ "#F2=u2*N2\n",
+ "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n",
+ "print o,\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 30.0152164356\n",
+ "coefficient of friction is 0.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W=500.0 #weight of block\n",
+ "F1=200.0 #force up the inclined plane when block is moving down\n",
+ "F2=300.0 #force up the inclined plane when block is at rest\n",
+ "#When block starts moving down the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Fr+F1=Wsino\n",
+ "#sino-ucoso=F1/w 1\n",
+ "#When block starts moving up the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Wsino+Wucoso=F2\n",
+ "#using these equations\n",
+ "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n",
+ "print \"Angle of inclination is \",(o*180/3.14)\n",
+ "#using 1\n",
+ "u=math.sin(o)-F1/W\n",
+ "print \"coefficient of friction is\",round(u,3)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of Inclination 21.8124674778\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "uag=0.5 #coefficient of friction between block A and the plane\n",
+ "ubg=0.2 #coefficient of friction between block B and the plane\n",
+ "Wb=500.0 #weight of block B\n",
+ "Wa=1000.0 #weight of block A\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N1=Wacoso ,Fr=uagN1\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=uagWacoso-Wasino\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N2=Wbcoso ,Fr=uagN2\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=Wbsino-ubgwbsino\n",
+ "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n",
+ "print \"Angle of Inclination\",o;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "853.305553493 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wl=750.0 #weight of lower block\n",
+ "Wu=500.0 #weight of upper block\n",
+ "o1=60.0*3.14/180.0 #angle of inclined plane\n",
+ "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n",
+ "u=0.2 #coefficient of friction\n",
+ "#for 750 N block\n",
+ "#Σ Forces normal to the plane = 0 \n",
+ "N1=Wl*math.cos(o1)\n",
+ "F1=u*N1\n",
+ "#Σ Forces parallel to the plane = 0\n",
+ "T=F1+Wl*math.sin(o1)\n",
+ "#Σ Forces horizontal to the plane = 0\n",
+ "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n",
+ "print P,\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Least Weight is 266.34090474 N\n",
+ "Greatest Weight is 969.473014916 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n",
+ "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n",
+ "Wbc=1000.0 #weight of block on plane BC\n",
+ "ubc=0.28 #coefficient of friction between the load and the plane BC \n",
+ "uac=0.20 #coefficient of friction between the load and the plane AC\n",
+ "#for least weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)-F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Least Weight is\",W,\"N\"\n",
+ "#for greatest weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)+F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Greatest Weight is\",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight 10498.172578 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.4 #The coefficient of friction on the horizontal plane\n",
+ "oi=30 #angle of inclined plane\n",
+ "o=20.0 #The limiting angle of friction for block B on the inclined plane\n",
+ "wb=5000.0 #weight of block b\n",
+ "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n",
+ "#for block B\n",
+ "#N1 N2 N3 are normal reaction\n",
+ "#F1 F2 are frictional forces\n",
+ "#F1=ub*N1 \n",
+ "#N1 sinoi + F1 cos oi=wb\n",
+ "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n",
+ "F1=ub*N1\n",
+ "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n",
+ "\n",
+ "#force balance on A in horizontal balance\n",
+ "F2=C\n",
+ "N2=F2/u\n",
+ "#force balance on A in vertical balance\n",
+ "W=N2\n",
+ "print \"Weight \",W,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force = 23812.7516422 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "w=20000.0 #weight of upper block\n",
+ "o=15.0 #The angle of friction for all surfaces of contact\n",
+ "u=math.tan(o) #coefficient of friction\n",
+ "#R1 R2 are forces\n",
+ "Or1=15.0 #angle force R1 makes with x axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n",
+ "#applyig lamis theorem on block B\n",
+ "Or1=15.0 #angle force R3 makes with Y axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n",
+ "print \"Force =\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 66.26 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "w=160.0 #weight of block,KN\n",
+ "u=0.25 #coefficient of friction\n",
+ "phi=math.atan(u)\n",
+ "\n",
+ "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n",
+ "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n",
+ "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n",
+ "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n",
+ "print\"P=\",round(P,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force required is 62.0836173323 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.0 #length of ladder\n",
+ "u1=0.2 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.3 #coefficient of friction between floor and the ladder\n",
+ "wm=600.0 #weight of man\n",
+ "lm=3.0 #distance of man\n",
+ "o=3.14*60.0/180.0 #angle made by ladder with floor\n",
+ "#sum of all moment about A =0\n",
+ "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n",
+ "Fb=u1*Nb #friction from wall\n",
+ "#force balance in vertical direction\n",
+ "Na=(w+wm-Fb) # normal reaction from ground\n",
+ "Fa=u2*Na #friction from ground\n",
+ "P=Nb-Fa\n",
+ "print \"Force required is \",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 71.6013500101 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=6.0 #length of ladder\n",
+ "u1=0.4 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.25 #coefficient of friction between floor and the ladder\n",
+ "wl=900.0 #weight of load\n",
+ "ll=5.0 #distance of load\n",
+ "#force balancing\n",
+ "#Na Nb normal reaction at A and B\n",
+ "#Fa Fb friction at A and B\n",
+ "#Fa=u2*Na \n",
+ "#Fb=u1*Nb\n",
+ "#Na+Fb=w+wl\n",
+ "#Fa=Nb\n",
+ "Nb=(wl+w)*u2/(1+u2*u1)\n",
+ "Na=Nb/u2\n",
+ "Fa=u2*Na\n",
+ "Fb=u1*Nb\n",
+ "#sum of all moments about a is =0\n",
+ "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n",
+ "o=math.atan(temp)*180/3.14\n",
+ "print \"Angle of inclination is \",o,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length will 0.5 times\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o=45.0*3.14/180.0 #angle of inclination \n",
+ "u=0.5 #coefficient of friction\n",
+ "r=1.5 #ratio of mans weight to ladders weight\n",
+ "o1=45.0*math.pi/180.0 #angle of inclination\n",
+ "#from law of friction\n",
+ "#Fa = μNa\n",
+ "#Fb = μNb\n",
+ "#Fa – Nb = 0 \n",
+ "#Na + Fb = W + r W\n",
+ "#ΣMA = 0\n",
+ "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n",
+ "print \"length will\",o,\"times\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum weight is 6277.60420331\n",
+ "Minimum weight is 57.3467183245\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "n=1.25 #number of turns\n",
+ "o=2*3.14*n #angle of contact\n",
+ "u=0.3 #coefficient of friction\n",
+ "t=600.0 #force at the other end of the rope\n",
+ "#if the impending motion of the weight be downward.\n",
+ "W=T2=t*2.71**(u*o)\n",
+ "print \"Maximum weight is \",W\n",
+ "#if the impending motion of weight be upwards\n",
+ "W=T1=t*2.71**(-1*u*o)\n",
+ "print \"Minimum weight is \",W"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight is 136.9599857 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n",
+ "uo=0.30 #The coefficient of friction between other surfaces\n",
+ "cosa=4.0/5.0 #cos of angle of inclination\n",
+ "sina=3.0/5.0 #sin of angle of inclination\n",
+ "Ww=1000.0 #weight\n",
+ "o=3.14 #angle of contact of rope with pulley\n",
+ "#for unknown weight\n",
+ "#force balance perpendicular to the plane\n",
+ "#N1 = W cos α\n",
+ "#fr=uoN1\n",
+ "#force balance along the plane\n",
+ "#T1 = F1 + W sin α\n",
+ "#for 1000 N body\n",
+ "#force balance perpendicular to the plane\n",
+ "#N2=N1+Wwcosa\n",
+ "#fr2=uoN2\n",
+ "#force balance along the plane\n",
+ "#T2= Wwsina -F1 -F2\n",
+ "#T2=T1*e^(ur*o)\n",
+ "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n",
+ "print \"Weight is \",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force P applied at the end of the brake lever 274.480678202\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.3 #coefficient of friction\n",
+ "r=250 #radius of brake drum\n",
+ "l=300 #length of lever arm\n",
+ "M=300000.0 #torque\n",
+ "o=r*3.14/180.0\n",
+ "l2=50.0\n",
+ "#using \n",
+ "#T2 = T1e^(μθ) T1 and T2 are tension\n",
+ "#(T2-T1)r=M\n",
+ "T1=M/(r*(2.71**(u*o)-1))\n",
+ "T2=(2.71**(u*o))*T1\n",
+ "#Consider the lever arm. Taking moment about the hinge\n",
+ "p=T2*l2/l #force P applied at the end of the brake lever\n",
+ "print \"force P applied at the end of the brake lever\",p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6972.02507534 mm\n",
+ "Power Transmitted 3252832.96438 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O1))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6955.3382782 mm\n",
+ "Power Transmitted 3035637.41075 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=3.14+2*math.asin((d1-d2)/(2*D))\n",
+ "O2=3.14-2*math.asin((d1-d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O2))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_woQKdAT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_woQKdAT.ipynb
new file mode 100644
index 00000000..87ac24ec
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_woQKdAT.ipynb
@@ -0,0 +1,774 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter5-FRICTION"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 1250.0 N\n",
+ "P= 1210.36288071 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=1000.0 #weight of block a\n",
+ "Wb=2000.0 #weight of block b\n",
+ "uab=1.0/4.0 #coefficient of friction between A and B\n",
+ "ubg=1.0/3.0 #coefficient of friction between ground and B\n",
+ "#When P is horizontal\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "N2=N1+ Wb #Normal Reaction on block B from Ground\n",
+ "F2=ubg*N2 #limiting Friction between A and ground\n",
+ "P=F1+F2\n",
+ "print \"P=\",P,\"N\"\n",
+ "#When P is inclined at angle o\n",
+ "o=30.0*3.14/180.0\n",
+ "#considering equilibrium of block A\n",
+ "N1=Wa #Normal Reaction on block A from block B\n",
+ "F1=uab*N1 #limiting Friction between A and B\n",
+ "T=F1 #tension\n",
+ "#considering equilibrium of block B\n",
+ "#from\n",
+ "#N2+Psin30=N1+Wb\n",
+ "#Pcos30=F1+F2\n",
+ "#F1=ubg*N2\n",
+ "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n",
+ "P=(N1+Wb-N2)/math.sin(o)\n",
+ "print \"P=\",P,\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "29.0693410161 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wa=300.0 #weight of upper block \n",
+ "Wb=900.0 #weight of lower block \n",
+ "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n",
+ "u2=1.0/3.0 #coefficient of friction between ground and lower block\n",
+ "#using \n",
+ "#N1=Wacoso Normal Reaction\n",
+ "#F1=u1*N1 Friction\n",
+ "#N2=Wbcoso+N1\n",
+ "#F2=u2*N2\n",
+ "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n",
+ "print o,\"°\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 30.0152164356\n",
+ "coefficient of friction is 0.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W=500.0 #weight of block\n",
+ "F1=200.0 #force up the inclined plane when block is moving down\n",
+ "F2=300.0 #force up the inclined plane when block is at rest\n",
+ "#When block starts moving down the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Fr+F1=Wsino\n",
+ "#sino-ucoso=F1/w 1\n",
+ "#When block starts moving up the plane\n",
+ "#sum of all forces perpendicular to the plane = 0\n",
+ "#N =Wcoso\n",
+ "#sum of all forces parallel to the plane = 0\n",
+ "#Wsino+Wucoso=F2\n",
+ "#using these equations\n",
+ "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n",
+ "print \"Angle of inclination is \",(o*180/3.14)\n",
+ "#using 1\n",
+ "u=math.sin(o)-F1/W\n",
+ "print \"coefficient of friction is\",round(u,3)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of Inclination 21.8124674778\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "uag=0.5 #coefficient of friction between block A and the plane\n",
+ "ubg=0.2 #coefficient of friction between block B and the plane\n",
+ "Wb=500.0 #weight of block B\n",
+ "Wa=1000.0 #weight of block A\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N1=Wacoso ,Fr=uagN1\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=uagWacoso-Wasino\n",
+ "#Considering equilibrium of block A,\n",
+ "#sum of all forces along the plane is 0\n",
+ "#N2=Wbcoso ,Fr=uagN2\n",
+ "#sum of all forces perpendicaular to the plane is 0\n",
+ "#T=Wbsino-ubgwbsino\n",
+ "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n",
+ "print \"Angle of Inclination\",o;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "853.305553493 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Wl=750.0 #weight of lower block\n",
+ "Wu=500.0 #weight of upper block\n",
+ "o1=60.0*3.14/180.0 #angle of inclined plane\n",
+ "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n",
+ "u=0.2 #coefficient of friction\n",
+ "#for 750 N block\n",
+ "#Σ Forces normal to the plane = 0 \n",
+ "N1=Wl*math.cos(o1)\n",
+ "F1=u*N1\n",
+ "#Σ Forces parallel to the plane = 0\n",
+ "T=F1+Wl*math.sin(o1)\n",
+ "#Σ Forces horizontal to the plane = 0\n",
+ "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n",
+ "print P,\"N\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Least Weight is 266.34090474 N\n",
+ "Greatest Weight is 969.473014916 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n",
+ "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n",
+ "Wbc=1000.0 #weight of block on plane BC\n",
+ "ubc=0.28 #coefficient of friction between the load and the plane BC \n",
+ "uac=0.20 #coefficient of friction between the load and the plane AC\n",
+ "#for least weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)-F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Least Weight is\",W,\"N\"\n",
+ "#for greatest weight \n",
+ "N1=Wbc*math.cos(o2) #Normal Reaction\n",
+ "F1=ubc*N1 #frictional Force\n",
+ "T=Wbc*math.sin(o2)+F1 #Tension\n",
+ "#for block on plane AC\n",
+ "#N2=Wcoso1\n",
+ "#F2=uac*N2\n",
+ "#T=F2+W sino2\n",
+ "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n",
+ "print \"Greatest Weight is\",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight 10498.172578 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.4 #The coefficient of friction on the horizontal plane\n",
+ "oi=30 #angle of inclined plane\n",
+ "o=20.0 #The limiting angle of friction for block B on the inclined plane\n",
+ "wb=5000.0 #weight of block b\n",
+ "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n",
+ "#for block B\n",
+ "#N1 N2 N3 are normal reaction\n",
+ "#F1 F2 are frictional forces\n",
+ "#F1=ub*N1 \n",
+ "#N1 sinoi + F1 cos oi=wb\n",
+ "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n",
+ "F1=ub*N1\n",
+ "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n",
+ "\n",
+ "#force balance on A in horizontal balance\n",
+ "F2=C\n",
+ "N2=F2/u\n",
+ "#force balance on A in vertical balance\n",
+ "W=N2\n",
+ "print \"Weight \",W,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force = 23812.7516422 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "w=20000.0 #weight of upper block\n",
+ "o=15.0 #The angle of friction for all surfaces of contact\n",
+ "u=math.tan(o) #coefficient of friction\n",
+ "#R1 R2 are forces\n",
+ "Or1=15.0 #angle force R1 makes with x axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n",
+ "#applyig lamis theorem on block B\n",
+ "Or1=15.0 #angle force R3 makes with Y axis\n",
+ "Or2=35.0 #angle force R2 makes with Y axis\n",
+ "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n",
+ "print \"Force =\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 66.26 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "w=160.0 #weight of block,KN\n",
+ "u=0.25 #coefficient of friction\n",
+ "phi=math.atan(u)\n",
+ "\n",
+ "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n",
+ "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n",
+ "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n",
+ "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n",
+ "print\"P=\",round(P,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force required is 62.0836173323 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.0 #length of ladder\n",
+ "u1=0.2 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.3 #coefficient of friction between floor and the ladder\n",
+ "wm=600.0 #weight of man\n",
+ "lm=3.0 #distance of man\n",
+ "o=3.14*60.0/180.0 #angle made by ladder with floor\n",
+ "#sum of all moment about A =0\n",
+ "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n",
+ "Fb=u1*Nb #friction from wall\n",
+ "#force balance in vertical direction\n",
+ "Na=(w+wm-Fb) # normal reaction from ground\n",
+ "Fa=u2*Na #friction from ground\n",
+ "P=Nb-Fa\n",
+ "print \"Force required is \",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Angle of inclination is 71.6013500101 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=6.0 #length of ladder\n",
+ "u1=0.4 #coefficient of friction between the wall and the ladder\n",
+ "w=200.0 #weight of ladder\n",
+ "u2=0.25 #coefficient of friction between floor and the ladder\n",
+ "wl=900.0 #weight of load\n",
+ "ll=5.0 #distance of load\n",
+ "#force balancing\n",
+ "#Na Nb normal reaction at A and B\n",
+ "#Fa Fb friction at A and B\n",
+ "#Fa=u2*Na \n",
+ "#Fb=u1*Nb\n",
+ "#Na+Fb=w+wl\n",
+ "#Fa=Nb\n",
+ "Nb=(wl+w)*u2/(1+u2*u1)\n",
+ "Na=Nb/u2\n",
+ "Fa=u2*Na\n",
+ "Fb=u1*Nb\n",
+ "#sum of all moments about a is =0\n",
+ "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n",
+ "o=math.atan(temp)*180/3.14\n",
+ "print \"Angle of inclination is \",o,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "length will 0.5 times\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "o=45.0*3.14/180.0 #angle of inclination \n",
+ "u=0.5 #coefficient of friction\n",
+ "r=1.5 #ratio of mans weight to ladders weight\n",
+ "o1=45.0*math.pi/180.0 #angle of inclination\n",
+ "#from law of friction\n",
+ "#Fa = μNa\n",
+ "#Fb = μNb\n",
+ "#Fa – Nb = 0 \n",
+ "#Na + Fb = W + r W\n",
+ "#ΣMA = 0\n",
+ "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n",
+ "print \"length will\",o,\"times\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum weight is 6277.60420331\n",
+ "Minimum weight is 57.3467183245\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "n=1.25 #number of turns\n",
+ "o=2*3.14*n #angle of contact\n",
+ "u=0.3 #coefficient of friction\n",
+ "t=600.0 #force at the other end of the rope\n",
+ "#if the impending motion of the weight be downward.\n",
+ "W=T2=t*2.71**(u*o)\n",
+ "print \"Maximum weight is \",W\n",
+ "#if the impending motion of weight be upwards\n",
+ "W=T1=t*2.71**(-1*u*o)\n",
+ "print \"Minimum weight is \",W"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight is 136.9599857 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n",
+ "uo=0.30 #The coefficient of friction between other surfaces\n",
+ "cosa=4.0/5.0 #cos of angle of inclination\n",
+ "sina=3.0/5.0 #sin of angle of inclination\n",
+ "Ww=1000.0 #weight\n",
+ "o=3.14 #angle of contact of rope with pulley\n",
+ "#for unknown weight\n",
+ "#force balance perpendicular to the plane\n",
+ "#N1 = W cos α\n",
+ "#fr=uoN1\n",
+ "#force balance along the plane\n",
+ "#T1 = F1 + W sin α\n",
+ "#for 1000 N body\n",
+ "#force balance perpendicular to the plane\n",
+ "#N2=N1+Wwcosa\n",
+ "#fr2=uoN2\n",
+ "#force balance along the plane\n",
+ "#T2= Wwsina -F1 -F2\n",
+ "#T2=T1*e^(ur*o)\n",
+ "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n",
+ "print \"Weight is \",W,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force P applied at the end of the brake lever 274.480678202\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u=0.3 #coefficient of friction\n",
+ "r=250 #radius of brake drum\n",
+ "l=300 #length of lever arm\n",
+ "M=300000.0 #torque\n",
+ "o=r*3.14/180.0\n",
+ "l2=50.0\n",
+ "#using \n",
+ "#T2 = T1e^(μθ) T1 and T2 are tension\n",
+ "#(T2-T1)r=M\n",
+ "T1=M/(r*(2.71**(u*o)-1))\n",
+ "T2=(2.71**(u*o))*T1\n",
+ "#Consider the lever arm. Taking moment about the hinge\n",
+ "p=T2*l2/l #force P applied at the end of the brake lever\n",
+ "print \"force P applied at the end of the brake lever\",p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6972.02507534 mm\n",
+ "Power Transmitted 3252832.96438 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O1))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of belt is 6955.3382782 mm\n",
+ "Power Transmitted 3035637.41075 Watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1=500.0 #diameter of a shaft\n",
+ "d2=100.0 #diameter of a shaft\n",
+ "D=3000.0 #distance between shafts in mm\n",
+ "T=1000.0 #Maximum permissible tension in the belt\n",
+ "U=0.25 #coefficient of friction between the belt and the pulley\n",
+ "R=220.0 #revlution per minute of larger shaft\n",
+ "O1=3.14+2*math.asin((d1-d2)/(2*D))\n",
+ "O2=3.14-2*math.asin((d1-d2)/(2*D))\n",
+ "#Length of belt = Arc length DC + Arc length FE + 2BG\n",
+ "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n",
+ "print \"Length of belt is \",L,\"mm\"\n",
+ "T1=T/(2.71**(U*O2))\n",
+ "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n",
+ "Power_transmitted=(T-T1)*Velocity_of_the_belt\n",
+ "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_0a0tZuT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_0a0tZuT.ipynb
new file mode 100644
index 00000000..55339520
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_0a0tZuT.ipynb
@@ -0,0 +1,1593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6-SIMPLE MACHINES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 20.0\n",
+ "Velocity Ratio 25.0\n",
+ "Efficiency 0.8\n",
+ "Ideal Load 12500.0\n",
+ "Ideal Effort 400.0\n",
+ "Effort lost in friction 100.0\n",
+ "frictional resistance 2500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 10000.0 #Load\n",
+ "P = 500.0 #Effort\n",
+ "D = 20.0 #Distance moved by the effort \n",
+ "d = 0.8 #Distance moved by the load \n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=D/d #Velocity Ratio\n",
+ "Efficiency=MA/VR\n",
+ "Pi =W/VR #Ideal effort\n",
+ "Wi = P*VR #ideal load\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print \"Ideal Load\",Wi\n",
+ "print \"Ideal Effort\",Pi\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.05 W + 30.0\n",
+ "Load is 3400.0 N\n",
+ "Mechanical advantage-- 17.0\n",
+ "Ideal effort is 113.333333333 N\n",
+ "Effort lost in friction 86.6666666667\n",
+ "Efficiency 56.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 2400.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "\n",
+ "W2 = 3000.0 #Load 2\n",
+ "P2= 180.0 #Effort2\n",
+ "P3= 200.0 #Effort3\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "W3=(P3-C)/m #Load 2\n",
+ "print \"Load is \",W3,\"N\"\n",
+ "MA=W3/P3 #Mechanical advantage\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100\n",
+ "Pi =W3/VR #Ideal effort\n",
+ "print \"Ideal effort is\",Pi,\"N\"\n",
+ "\n",
+ "efl=P3-Pi #Effort lost in friction\n",
+ "\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"Efficiency\",Efficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 51.3333333333\n",
+ "Velocity Ratio 85.5555555556\n",
+ "Efficiency 61.7142857143\n",
+ "Maximum Mechanical advantage-- 55.0\n",
+ "Maximum Efficiency 64.2857142857\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 7700.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=0.6\n",
+ "VR=MA/Efficiency #Velocity Ratio\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "W2 = 13200.0 #Load 2\n",
+ "P2= 250.0 #Effort2\n",
+ "MA=W2/P2\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "\n",
+ "\n",
+ "MMA=1/m #Maximum Mechanical advantage\n",
+ "print \"Maximum Mechanical advantage--\",MMA\n",
+ "\n",
+ "MaxEfficiency=MMA/VR*100\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.06 W + 10.5\n"
+ ]
+ },
+ {
+ "data": {
+ "application/javascript": [
+ "/* Put everything inside the global mpl namespace */\n",
+ "window.mpl = {};\n",
+ "\n",
+ "mpl.get_websocket_type = function() {\n",
+ " if (typeof(WebSocket) !== 'undefined') {\n",
+ " return WebSocket;\n",
+ " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
+ " return MozWebSocket;\n",
+ " } else {\n",
+ " alert('Your browser does not have WebSocket support.' +\n",
+ " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
+ " 'Firefox 4 and 5 are also supported but you ' +\n",
+ " 'have to enable WebSockets in about:config.');\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
+ " this.id = figure_id;\n",
+ "\n",
+ " this.ws = websocket;\n",
+ "\n",
+ " this.supports_binary = (this.ws.binaryType != undefined);\n",
+ "\n",
+ " if (!this.supports_binary) {\n",
+ " var warnings = document.getElementById(\"mpl-warnings\");\n",
+ " if (warnings) {\n",
+ " warnings.style.display = 'block';\n",
+ " warnings.textContent = (\n",
+ " \"This browser does not support binary websocket messages. \" +\n",
+ " \"Performance may be slow.\");\n",
+ " }\n",
+ " }\n",
+ "\n",
+ " this.imageObj = new Image();\n",
+ "\n",
+ " this.context = undefined;\n",
+ " this.message = undefined;\n",
+ " this.canvas = undefined;\n",
+ " this.rubberband_canvas = undefined;\n",
+ " this.rubberband_context = undefined;\n",
+ " this.format_dropdown = undefined;\n",
+ "\n",
+ " this.image_mode = 'full';\n",
+ "\n",
+ " this.root = $('<div/>');\n",
+ " this._root_extra_style(this.root)\n",
+ " this.root.attr('style', 'display: inline-block');\n",
+ "\n",
+ " $(parent_element).append(this.root);\n",
+ "\n",
+ " this._init_header(this);\n",
+ " this._init_canvas(this);\n",
+ " this._init_toolbar(this);\n",
+ "\n",
+ " var fig = this;\n",
+ "\n",
+ " this.waiting = false;\n",
+ "\n",
+ " this.ws.onopen = function () {\n",
+ " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
+ " fig.send_message(\"send_image_mode\", {});\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " }\n",
+ "\n",
+ " this.imageObj.onload = function() {\n",
+ " if (fig.image_mode == 'full') {\n",
+ " // Full images could contain transparency (where diff images\n",
+ " // almost always do), so we need to clear the canvas so that\n",
+ " // there is no ghosting.\n",
+ " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
+ " }\n",
+ " fig.context.drawImage(fig.imageObj, 0, 0);\n",
+ " };\n",
+ "\n",
+ " this.imageObj.onunload = function() {\n",
+ " this.ws.close();\n",
+ " }\n",
+ "\n",
+ " this.ws.onmessage = this._make_on_message_function(this);\n",
+ "\n",
+ " this.ondownload = ondownload;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_header = function() {\n",
+ " var titlebar = $(\n",
+ " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
+ " 'ui-helper-clearfix\"/>');\n",
+ " var titletext = $(\n",
+ " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
+ " 'text-align: center; padding: 3px;\"/>');\n",
+ " titlebar.append(titletext)\n",
+ " this.root.append(titlebar);\n",
+ " this.header = titletext[0];\n",
+ "}\n",
+ "\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_canvas = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var canvas_div = $('<div/>');\n",
+ "\n",
+ " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
+ "\n",
+ " function canvas_keyboard_event(event) {\n",
+ " return fig.key_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
+ " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
+ " this.canvas_div = canvas_div\n",
+ " this._canvas_extra_style(canvas_div)\n",
+ " this.root.append(canvas_div);\n",
+ "\n",
+ " var canvas = $('<canvas/>');\n",
+ " canvas.addClass('mpl-canvas');\n",
+ " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
+ "\n",
+ " this.canvas = canvas[0];\n",
+ " this.context = canvas[0].getContext(\"2d\");\n",
+ "\n",
+ " var rubberband = $('<canvas/>');\n",
+ " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
+ "\n",
+ " var pass_mouse_events = true;\n",
+ "\n",
+ " canvas_div.resizable({\n",
+ " start: function(event, ui) {\n",
+ " pass_mouse_events = false;\n",
+ " },\n",
+ " resize: function(event, ui) {\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " stop: function(event, ui) {\n",
+ " pass_mouse_events = true;\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " });\n",
+ "\n",
+ " function mouse_event_fn(event) {\n",
+ " if (pass_mouse_events)\n",
+ " return fig.mouse_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " rubberband.mousedown('button_press', mouse_event_fn);\n",
+ " rubberband.mouseup('button_release', mouse_event_fn);\n",
+ " // Throttle sequential mouse events to 1 every 20ms.\n",
+ " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
+ "\n",
+ " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
+ " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
+ "\n",
+ " canvas_div.on(\"wheel\", function (event) {\n",
+ " event = event.originalEvent;\n",
+ " event['data'] = 'scroll'\n",
+ " if (event.deltaY < 0) {\n",
+ " event.step = 1;\n",
+ " } else {\n",
+ " event.step = -1;\n",
+ " }\n",
+ " mouse_event_fn(event);\n",
+ " });\n",
+ "\n",
+ " canvas_div.append(canvas);\n",
+ " canvas_div.append(rubberband);\n",
+ "\n",
+ " this.rubberband = rubberband;\n",
+ " this.rubberband_canvas = rubberband[0];\n",
+ " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
+ " this.rubberband_context.strokeStyle = \"#000000\";\n",
+ "\n",
+ " this._resize_canvas = function(width, height) {\n",
+ " // Keep the size of the canvas, canvas container, and rubber band\n",
+ " // canvas in synch.\n",
+ " canvas_div.css('width', width)\n",
+ " canvas_div.css('height', height)\n",
+ "\n",
+ " canvas.attr('width', width);\n",
+ " canvas.attr('height', height);\n",
+ "\n",
+ " rubberband.attr('width', width);\n",
+ " rubberband.attr('height', height);\n",
+ " }\n",
+ "\n",
+ " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
+ " // upon first draw.\n",
+ " this._resize_canvas(600, 600);\n",
+ "\n",
+ " // Disable right mouse context menu.\n",
+ " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
+ " return false;\n",
+ " });\n",
+ "\n",
+ " function set_focus () {\n",
+ " canvas.focus();\n",
+ " canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " window.setTimeout(set_focus, 100);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items) {\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) {\n",
+ " // put a spacer in here.\n",
+ " continue;\n",
+ " }\n",
+ " var button = $('<button/>');\n",
+ " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
+ " 'ui-button-icon-only');\n",
+ " button.attr('role', 'button');\n",
+ " button.attr('aria-disabled', 'false');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ "\n",
+ " var icon_img = $('<span/>');\n",
+ " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
+ " icon_img.addClass(image);\n",
+ " icon_img.addClass('ui-corner-all');\n",
+ "\n",
+ " var tooltip_span = $('<span/>');\n",
+ " tooltip_span.addClass('ui-button-text');\n",
+ " tooltip_span.html(tooltip);\n",
+ "\n",
+ " button.append(icon_img);\n",
+ " button.append(tooltip_span);\n",
+ "\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " var fmt_picker_span = $('<span/>');\n",
+ "\n",
+ " var fmt_picker = $('<select/>');\n",
+ " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
+ " fmt_picker_span.append(fmt_picker);\n",
+ " nav_element.append(fmt_picker_span);\n",
+ " this.format_dropdown = fmt_picker[0];\n",
+ "\n",
+ " for (var ind in mpl.extensions) {\n",
+ " var fmt = mpl.extensions[ind];\n",
+ " var option = $(\n",
+ " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
+ " fmt_picker.append(option)\n",
+ " }\n",
+ "\n",
+ " // Add hover states to the ui-buttons\n",
+ " $( \".ui-button\" ).hover(\n",
+ " function() { $(this).addClass(\"ui-state-hover\");},\n",
+ " function() { $(this).removeClass(\"ui-state-hover\");}\n",
+ " );\n",
+ "\n",
+ " var status_bar = $('<span class=\"mpl-message\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
+ " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
+ " // which will in turn request a refresh of the image.\n",
+ " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_message = function(type, properties) {\n",
+ " properties['type'] = type;\n",
+ " properties['figure_id'] = this.id;\n",
+ " this.ws.send(JSON.stringify(properties));\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_draw_message = function() {\n",
+ " if (!this.waiting) {\n",
+ " this.waiting = true;\n",
+ " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " var format_dropdown = fig.format_dropdown;\n",
+ " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
+ " fig.ondownload(fig, format);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
+ " var size = msg['size'];\n",
+ " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
+ " fig._resize_canvas(size[0], size[1]);\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
+ " var x0 = msg['x0'];\n",
+ " var y0 = fig.canvas.height - msg['y0'];\n",
+ " var x1 = msg['x1'];\n",
+ " var y1 = fig.canvas.height - msg['y1'];\n",
+ " x0 = Math.floor(x0) + 0.5;\n",
+ " y0 = Math.floor(y0) + 0.5;\n",
+ " x1 = Math.floor(x1) + 0.5;\n",
+ " y1 = Math.floor(y1) + 0.5;\n",
+ " var min_x = Math.min(x0, x1);\n",
+ " var min_y = Math.min(y0, y1);\n",
+ " var width = Math.abs(x1 - x0);\n",
+ " var height = Math.abs(y1 - y0);\n",
+ "\n",
+ " fig.rubberband_context.clearRect(\n",
+ " 0, 0, fig.canvas.width, fig.canvas.height);\n",
+ "\n",
+ " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
+ " // Updates the figure title.\n",
+ " fig.header.textContent = msg['label'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
+ " var cursor = msg['cursor'];\n",
+ " switch(cursor)\n",
+ " {\n",
+ " case 0:\n",
+ " cursor = 'pointer';\n",
+ " break;\n",
+ " case 1:\n",
+ " cursor = 'default';\n",
+ " break;\n",
+ " case 2:\n",
+ " cursor = 'crosshair';\n",
+ " break;\n",
+ " case 3:\n",
+ " cursor = 'move';\n",
+ " break;\n",
+ " }\n",
+ " fig.rubberband_canvas.style.cursor = cursor;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
+ " fig.message.textContent = msg['message'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
+ " // Request the server to send over a new figure.\n",
+ " fig.send_draw_message();\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
+ " fig.image_mode = msg['mode'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Called whenever the canvas gets updated.\n",
+ " this.send_message(\"ack\", {});\n",
+ "}\n",
+ "\n",
+ "// A function to construct a web socket function for onmessage handling.\n",
+ "// Called in the figure constructor.\n",
+ "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
+ " return function socket_on_message(evt) {\n",
+ " if (evt.data instanceof Blob) {\n",
+ " /* FIXME: We get \"Resource interpreted as Image but\n",
+ " * transferred with MIME type text/plain:\" errors on\n",
+ " * Chrome. But how to set the MIME type? It doesn't seem\n",
+ " * to be part of the websocket stream */\n",
+ " evt.data.type = \"image/png\";\n",
+ "\n",
+ " /* Free the memory for the previous frames */\n",
+ " if (fig.imageObj.src) {\n",
+ " (window.URL || window.webkitURL).revokeObjectURL(\n",
+ " fig.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
+ " evt.data);\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
+ " fig.imageObj.src = evt.data;\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var msg = JSON.parse(evt.data);\n",
+ " var msg_type = msg['type'];\n",
+ "\n",
+ " // Call the \"handle_{type}\" callback, which takes\n",
+ " // the figure and JSON message as its only arguments.\n",
+ " try {\n",
+ " var callback = fig[\"handle_\" + msg_type];\n",
+ " } catch (e) {\n",
+ " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " if (callback) {\n",
+ " try {\n",
+ " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
+ " callback(fig, msg);\n",
+ " } catch (e) {\n",
+ " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
+ " }\n",
+ " }\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "mpl.findpos = function(e) {\n",
+ " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
+ " var targ;\n",
+ " if (!e)\n",
+ " e = window.event;\n",
+ " if (e.target)\n",
+ " targ = e.target;\n",
+ " else if (e.srcElement)\n",
+ " targ = e.srcElement;\n",
+ " if (targ.nodeType == 3) // defeat Safari bug\n",
+ " targ = targ.parentNode;\n",
+ "\n",
+ " // jQuery normalizes the pageX and pageY\n",
+ " // pageX,Y are the mouse positions relative to the document\n",
+ " // offset() returns the position of the element relative to the document\n",
+ " var x = e.pageX - $(targ).offset().left;\n",
+ " var y = e.pageY - $(targ).offset().top;\n",
+ "\n",
+ " return {\"x\": x, \"y\": y};\n",
+ "};\n",
+ "\n",
+ "/*\n",
+ " * return a copy of an object with only non-object keys\n",
+ " * we need this to avoid circular references\n",
+ " * http://stackoverflow.com/a/24161582/3208463\n",
+ " */\n",
+ "function simpleKeys (original) {\n",
+ " return Object.keys(original).reduce(function (obj, key) {\n",
+ " if (typeof original[key] !== 'object')\n",
+ " obj[key] = original[key]\n",
+ " return obj;\n",
+ " }, {});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.mouse_event = function(event, name) {\n",
+ " var canvas_pos = mpl.findpos(event)\n",
+ "\n",
+ " if (name === 'button_press')\n",
+ " {\n",
+ " this.canvas.focus();\n",
+ " this.canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " var x = canvas_pos.x;\n",
+ " var y = canvas_pos.y;\n",
+ "\n",
+ " this.send_message(name, {x: x, y: y, button: event.button,\n",
+ " step: event.step,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ "\n",
+ " /* This prevents the web browser from automatically changing to\n",
+ " * the text insertion cursor when the button is pressed. We want\n",
+ " * to control all of the cursor setting manually through the\n",
+ " * 'cursor' event from matplotlib */\n",
+ " event.preventDefault();\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " // Handle any extra behaviour associated with a key event\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.key_event = function(event, name) {\n",
+ "\n",
+ " // Prevent repeat events\n",
+ " if (name == 'key_press')\n",
+ " {\n",
+ " if (event.which === this._key)\n",
+ " return;\n",
+ " else\n",
+ " this._key = event.which;\n",
+ " }\n",
+ " if (name == 'key_release')\n",
+ " this._key = null;\n",
+ "\n",
+ " var value = '';\n",
+ " if (event.ctrlKey && event.which != 17)\n",
+ " value += \"ctrl+\";\n",
+ " if (event.altKey && event.which != 18)\n",
+ " value += \"alt+\";\n",
+ " if (event.shiftKey && event.which != 16)\n",
+ " value += \"shift+\";\n",
+ "\n",
+ " value += 'k';\n",
+ " value += event.which.toString();\n",
+ "\n",
+ " this._key_event_extra(event, name);\n",
+ "\n",
+ " this.send_message(name, {key: value,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
+ " if (name == 'download') {\n",
+ " this.handle_save(this, null);\n",
+ " } else {\n",
+ " this.send_message(\"toolbar_button\", {name: name});\n",
+ " }\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
+ " this.message.textContent = tooltip;\n",
+ "};\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "\n",
+ "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
+ "\n",
+ "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
+ " // Create a \"websocket\"-like object which calls the given IPython comm\n",
+ " // object with the appropriate methods. Currently this is a non binary\n",
+ " // socket, so there is still some room for performance tuning.\n",
+ " var ws = {};\n",
+ "\n",
+ " ws.close = function() {\n",
+ " comm.close()\n",
+ " };\n",
+ " ws.send = function(m) {\n",
+ " //console.log('sending', m);\n",
+ " comm.send(m);\n",
+ " };\n",
+ " // Register the callback with on_msg.\n",
+ " comm.on_msg(function(msg) {\n",
+ " //console.log('receiving', msg['content']['data'], msg);\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
+ " ws.onmessage(msg['content']['data'])\n",
+ " });\n",
+ " return ws;\n",
+ "}\n",
+ "\n",
+ "mpl.mpl_figure_comm = function(comm, msg) {\n",
+ " // This is the function which gets called when the mpl process\n",
+ " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
+ "\n",
+ " var id = msg.content.data.id;\n",
+ " // Get hold of the div created by the display call when the Comm\n",
+ " // socket was opened in Python.\n",
+ " var element = $(\"#\" + id);\n",
+ " var ws_proxy = comm_websocket_adapter(comm)\n",
+ "\n",
+ " function ondownload(figure, format) {\n",
+ " window.open(figure.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " var fig = new mpl.figure(id, ws_proxy,\n",
+ " ondownload,\n",
+ " element.get(0));\n",
+ "\n",
+ " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
+ " // web socket which is closed, not our websocket->open comm proxy.\n",
+ " ws_proxy.onopen();\n",
+ "\n",
+ " fig.parent_element = element.get(0);\n",
+ " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
+ " if (!fig.cell_info) {\n",
+ " console.error(\"Failed to find cell for figure\", id, fig);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var output_index = fig.cell_info[2]\n",
+ " var cell = fig.cell_info[0];\n",
+ "\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " fig.root.unbind('remove')\n",
+ "\n",
+ " // Update the output cell to use the data from the current canvas.\n",
+ " fig.push_to_output();\n",
+ " var dataURL = fig.canvas.toDataURL();\n",
+ " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
+ " // the notebook keyboard shortcuts fail.\n",
+ " IPython.keyboard_manager.enable()\n",
+ " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n",
+ " fig.close_ws(fig, msg);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.close_ws = function(fig, msg){\n",
+ " fig.send_message('closing', msg);\n",
+ " // fig.ws.close()\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
+ " // Turn the data on the canvas into data in the output cell.\n",
+ " var dataURL = this.canvas.toDataURL();\n",
+ " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Tell IPython that the notebook contents must change.\n",
+ " IPython.notebook.set_dirty(true);\n",
+ " this.send_message(\"ack\", {});\n",
+ " var fig = this;\n",
+ " // Wait a second, then push the new image to the DOM so\n",
+ " // that it is saved nicely (might be nice to debounce this).\n",
+ " setTimeout(function () { fig.push_to_output() }, 1000);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items){\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) { continue; };\n",
+ "\n",
+ " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " // Add the status bar.\n",
+ " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "\n",
+ " // Add the close button to the window.\n",
+ " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
+ " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
+ " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
+ " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
+ " buttongrp.append(button);\n",
+ " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
+ " titlebar.prepend(buttongrp);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(el){\n",
+ " var fig = this\n",
+ " el.on(\"remove\", function(){\n",
+ "\tfig.close_ws(fig, {});\n",
+ " });\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(el){\n",
+ " // this is important to make the div 'focusable\n",
+ " el.attr('tabindex', 0)\n",
+ " // reach out to IPython and tell the keyboard manager to turn it's self\n",
+ " // off when our div gets focus\n",
+ "\n",
+ " // location in version 3\n",
+ " if (IPython.notebook.keyboard_manager) {\n",
+ " IPython.notebook.keyboard_manager.register_events(el);\n",
+ " }\n",
+ " else {\n",
+ " // location in version 2\n",
+ " IPython.keyboard_manager.register_events(el);\n",
+ " }\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " var manager = IPython.notebook.keyboard_manager;\n",
+ " if (!manager)\n",
+ " manager = IPython.keyboard_manager;\n",
+ "\n",
+ " // Check for shift+enter\n",
+ " if (event.shiftKey && event.which == 13) {\n",
+ " this.canvas_div.blur();\n",
+ " event.shiftKey = false;\n",
+ " // Send a \"J\" for go to next cell\n",
+ " event.which = 74;\n",
+ " event.keyCode = 74;\n",
+ " manager.command_mode();\n",
+ " manager.handle_keydown(event);\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " fig.ondownload(fig, null);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.find_output_cell = function(html_output) {\n",
+ " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
+ " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
+ " // IPython event is triggered only after the cells have been serialised, which for\n",
+ " // our purposes (turning an active figure into a static one), is too late.\n",
+ " var cells = IPython.notebook.get_cells();\n",
+ " var ncells = cells.length;\n",
+ " for (var i=0; i<ncells; i++) {\n",
+ " var cell = cells[i];\n",
+ " if (cell.cell_type === 'code'){\n",
+ " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
+ " var data = cell.output_area.outputs[j];\n",
+ " if (data.data) {\n",
+ " // IPython >= 3 moved mimebundle to data attribute of output\n",
+ " data = data.data;\n",
+ " }\n",
+ " if (data['text/html'] == html_output) {\n",
+ " return [cell, data, j];\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Register the function which deals with the matplotlib target/channel.\n",
+ "// The kernel may be null if the page has been refreshed.\n",
+ "if (IPython.notebook.kernel != null) {\n",
+ " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "<IPython.core.display.Javascript object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+fB0ubwAHhyeAgAAFJ9fRY9YVo3oEQAAoOiktQDuYfna8onFl3+bWCoaafnG8pqluw8AAAAUizTOdO1s8XP7ZlgaWa6z7GvZzeLn/vny74uWJZbDLF4QL7UMtVTmX7/GFv/3AQCA5KhvmWkpz7xKGZY6pTqWuZajLM/4QCX9LW0tLTOvlrWl5fPwFAAAJMxWli/C03ShAC4tgEdbxvtAJV4A21kOyLxaVgPL3BkzZqhBA3+KQurTp48GDRoUvUIhcSziheMRHxyLeCgpKdHWW2/tTxv6S3+SN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jwAQWxRAAACAlKEAAkizbpbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Efficiency 66.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib notebook\n",
+ "import matplotlib\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt2\n",
+ "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n",
+ "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n",
+ "VR=25.0 #velocity ratio\n",
+ "E=[0,0,0,0,0,0] #Efficiency\n",
+ "#calculating average slope\n",
+ "m=(P[4]-P[1])/(W[4]-W[1])\n",
+ "C=P[4]-m*W[4]\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "for i in range(0,6):\n",
+ " \n",
+ " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n",
+ " \n",
+ "plt2.plot(W,E)\n",
+ "plt2.ylabel(\"Efficiency\")\n",
+ "plt2.xlabel(\"Load\")\n",
+ "plt2.show() \n",
+ "\n",
+ " \n",
+ "MaxEfficiency=1/VR*100*1/m\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 13.8888888889\n",
+ "Velocity Ratio 30.0\n",
+ "Efficiency 46.2962962963\n",
+ "self-locking machine\n",
+ "Ideal Load 10800.0\n",
+ "frictional resistance 5800.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "W = 5000.0 #Load\n",
+ "P = 360.0 #Effort\n",
+ "\n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100.0\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "Wi = P*VR #ideal load\n",
+ "\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print var\n",
+ "print \"Ideal Load\",Wi\n",
+ "\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 937.5 N\n",
+ "number of pulley is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 6000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.8\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "#second case\n",
+ "P=520.0\n",
+ "n=0,\n",
+ "for i in range(3,20):\n",
+ " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n",
+ " n=i\n",
+ " break\n",
+ " \n",
+ " \n",
+ "print \"number of pulley is \",n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exmple 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 2352.94117647 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N=3.0 #number of movable pulleys\n",
+ "VR=2*N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.85\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1923.07692308 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1\n",
+ "N2=2.0 #number of movable puleys in system 2\n",
+ "VR=2*N1+2*N2 #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.78\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 79.3650793651\n",
+ "Effort lost in friction 37.1428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 1000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N-1 #Velocity Ratio\n",
+ "P = 180.0 #Effort\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "Pi =W/VR #Ideal effort\n",
+ "\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "print \"Effort lost in friction\",efl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 595.238095238 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 2500.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1 in figure B\n",
+ "N2=2.0 #number of movable puleys in system 2 in figure C\n",
+ "VR=2**N1-1+2**N2-1 #Velocity Ratio\n",
+ "Efficiency=0.70\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 2.3\n",
+ "Effort is 745.341614907 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle\n",
+ "tcw=6.0 #thickness of the cord on the wheel\n",
+ "tca=20.0 #thickness of the cord on the axle\n",
+ "W=1200 #effort\n",
+ "ED=D+tcw #Effective diameter of the wheel\n",
+ "Ed=d+tca #Effectivediameter of axle\n",
+ "VR=ED/Ed #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.7\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 32.0\n",
+ "Effort is 1136.36363636 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=800.0 #diameter of the wheel\n",
+ "d1=250.0 #diameter of axle 1\n",
+ "d2=300.0 #diameter of axle 2\n",
+ "\n",
+ "W=20000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(d2-d1) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.55\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 3.33333333333\n",
+ "Effort is 2500.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle \n",
+ "\n",
+ "W=5000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(D-d) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.6\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1741.88034188 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=40.0 #Screw diameter\n",
+ "l=20.0 #Screw lwngth\n",
+ "p=l/3.0 #Lead of the screw\n",
+ "W=40000.0 #effort\n",
+ "R = 400 #Lever length\n",
+ "u = 0.12 #coefficient of friction between screw and nut\n",
+ "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 57.0287539936 N\n",
+ "Efficiency 55.8439936484 %\n",
+ "reversible machine\n",
+ "The torque required to keep the load from descending 2047.61904762 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=50.0 #mean diameter of screw\n",
+ "p=10.0 #pitch of screw\n",
+ "u=0.05 #coefficient of friction at the screw thread\n",
+ "R=300.0 ##Lever length\n",
+ "W=6000.0 #Load\n",
+ "o1=math.atan(p/(3.14*d))\n",
+ "o2=math.atan(0.05)\n",
+ "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "VR=2*3.14*R/p #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "print var\n",
+ "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n",
+ "print \"The torque required to keep the load from descending\",T,\"Nm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 12.9110001721 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1=5.0 #Pitch of smaller screw\n",
+ "p2=10.0 #Pitch of larger screw\n",
+ "R=500.0 #Lever arm length from centre of screw\n",
+ "W=15000.0 #Load\n",
+ "P=185.0 #Effort\n",
+ "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 120.0\n",
+ "Law of machine is P= 0.01 W + 70.0\n",
+ "Efficiency for first case 25.0 %\n",
+ "Efficiency for second case 46.875 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=200.0 #Diameter of the load drum \n",
+ "R = 1200.0 # Length of lever arm \n",
+ "T1 = 10.0 #Number of teeth on pinion, \n",
+ "T2 = 100.0 #Number of teeth on spur wheel\n",
+ "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "W1 = 3000.0 #Load 1\n",
+ "P1= 100.0 #Effort1\n",
+ "\n",
+ "W2 = 9000.0 #Load 2\n",
+ "P2= 160.0 #Effort2\n",
+ "\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for first case\",Efficiency,\"%\"\n",
+ "MA=W2/P2 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for second case\",Efficiency,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 32.0\n",
+ "LOad 3200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=150.0 #Diameter of the load drum \n",
+ "R = 400.0 # Length of lever arm \n",
+ "T1 = 15.0 #Number of teeth on pinion, \n",
+ "T3 = 20.0 #Number of teeth on pinion, \n",
+ "T2 = 45.0 #Number of teeth on spur wheel\n",
+ "T4 = 40.0 #Number of teeth on spur wheel\n",
+ "P= 250.0 #Effort\n",
+ "Efficiency=0.4\n",
+ "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "\n",
+ "W=VR*Efficiency*P #Load \n",
+ "\n",
+ "print \"LOad\",W,\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_5vrvPsl.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_5vrvPsl.ipynb
new file mode 100644
index 00000000..55339520
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_5vrvPsl.ipynb
@@ -0,0 +1,1593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6-SIMPLE MACHINES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 20.0\n",
+ "Velocity Ratio 25.0\n",
+ "Efficiency 0.8\n",
+ "Ideal Load 12500.0\n",
+ "Ideal Effort 400.0\n",
+ "Effort lost in friction 100.0\n",
+ "frictional resistance 2500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 10000.0 #Load\n",
+ "P = 500.0 #Effort\n",
+ "D = 20.0 #Distance moved by the effort \n",
+ "d = 0.8 #Distance moved by the load \n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=D/d #Velocity Ratio\n",
+ "Efficiency=MA/VR\n",
+ "Pi =W/VR #Ideal effort\n",
+ "Wi = P*VR #ideal load\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print \"Ideal Load\",Wi\n",
+ "print \"Ideal Effort\",Pi\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.05 W + 30.0\n",
+ "Load is 3400.0 N\n",
+ "Mechanical advantage-- 17.0\n",
+ "Ideal effort is 113.333333333 N\n",
+ "Effort lost in friction 86.6666666667\n",
+ "Efficiency 56.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 2400.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "\n",
+ "W2 = 3000.0 #Load 2\n",
+ "P2= 180.0 #Effort2\n",
+ "P3= 200.0 #Effort3\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "W3=(P3-C)/m #Load 2\n",
+ "print \"Load is \",W3,\"N\"\n",
+ "MA=W3/P3 #Mechanical advantage\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100\n",
+ "Pi =W3/VR #Ideal effort\n",
+ "print \"Ideal effort is\",Pi,\"N\"\n",
+ "\n",
+ "efl=P3-Pi #Effort lost in friction\n",
+ "\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"Efficiency\",Efficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 51.3333333333\n",
+ "Velocity Ratio 85.5555555556\n",
+ "Efficiency 61.7142857143\n",
+ "Maximum Mechanical advantage-- 55.0\n",
+ "Maximum Efficiency 64.2857142857\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 7700.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=0.6\n",
+ "VR=MA/Efficiency #Velocity Ratio\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "W2 = 13200.0 #Load 2\n",
+ "P2= 250.0 #Effort2\n",
+ "MA=W2/P2\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "\n",
+ "\n",
+ "MMA=1/m #Maximum Mechanical advantage\n",
+ "print \"Maximum Mechanical advantage--\",MMA\n",
+ "\n",
+ "MaxEfficiency=MMA/VR*100\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.06 W + 10.5\n"
+ ]
+ },
+ {
+ "data": {
+ "application/javascript": [
+ "/* Put everything inside the global mpl namespace */\n",
+ "window.mpl = {};\n",
+ "\n",
+ "mpl.get_websocket_type = function() {\n",
+ " if (typeof(WebSocket) !== 'undefined') {\n",
+ " return WebSocket;\n",
+ " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
+ " return MozWebSocket;\n",
+ " } else {\n",
+ " alert('Your browser does not have WebSocket support.' +\n",
+ " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
+ " 'Firefox 4 and 5 are also supported but you ' +\n",
+ " 'have to enable WebSockets in about:config.');\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
+ " this.id = figure_id;\n",
+ "\n",
+ " this.ws = websocket;\n",
+ "\n",
+ " this.supports_binary = (this.ws.binaryType != undefined);\n",
+ "\n",
+ " if (!this.supports_binary) {\n",
+ " var warnings = document.getElementById(\"mpl-warnings\");\n",
+ " if (warnings) {\n",
+ " warnings.style.display = 'block';\n",
+ " warnings.textContent = (\n",
+ " \"This browser does not support binary websocket messages. \" +\n",
+ " \"Performance may be slow.\");\n",
+ " }\n",
+ " }\n",
+ "\n",
+ " this.imageObj = new Image();\n",
+ "\n",
+ " this.context = undefined;\n",
+ " this.message = undefined;\n",
+ " this.canvas = undefined;\n",
+ " this.rubberband_canvas = undefined;\n",
+ " this.rubberband_context = undefined;\n",
+ " this.format_dropdown = undefined;\n",
+ "\n",
+ " this.image_mode = 'full';\n",
+ "\n",
+ " this.root = $('<div/>');\n",
+ " this._root_extra_style(this.root)\n",
+ " this.root.attr('style', 'display: inline-block');\n",
+ "\n",
+ " $(parent_element).append(this.root);\n",
+ "\n",
+ " this._init_header(this);\n",
+ " this._init_canvas(this);\n",
+ " this._init_toolbar(this);\n",
+ "\n",
+ " var fig = this;\n",
+ "\n",
+ " this.waiting = false;\n",
+ "\n",
+ " this.ws.onopen = function () {\n",
+ " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
+ " fig.send_message(\"send_image_mode\", {});\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " }\n",
+ "\n",
+ " this.imageObj.onload = function() {\n",
+ " if (fig.image_mode == 'full') {\n",
+ " // Full images could contain transparency (where diff images\n",
+ " // almost always do), so we need to clear the canvas so that\n",
+ " // there is no ghosting.\n",
+ " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
+ " }\n",
+ " fig.context.drawImage(fig.imageObj, 0, 0);\n",
+ " };\n",
+ "\n",
+ " this.imageObj.onunload = function() {\n",
+ " this.ws.close();\n",
+ " }\n",
+ "\n",
+ " this.ws.onmessage = this._make_on_message_function(this);\n",
+ "\n",
+ " this.ondownload = ondownload;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_header = function() {\n",
+ " var titlebar = $(\n",
+ " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
+ " 'ui-helper-clearfix\"/>');\n",
+ " var titletext = $(\n",
+ " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
+ " 'text-align: center; padding: 3px;\"/>');\n",
+ " titlebar.append(titletext)\n",
+ " this.root.append(titlebar);\n",
+ " this.header = titletext[0];\n",
+ "}\n",
+ "\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_canvas = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var canvas_div = $('<div/>');\n",
+ "\n",
+ " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
+ "\n",
+ " function canvas_keyboard_event(event) {\n",
+ " return fig.key_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
+ " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
+ " this.canvas_div = canvas_div\n",
+ " this._canvas_extra_style(canvas_div)\n",
+ " this.root.append(canvas_div);\n",
+ "\n",
+ " var canvas = $('<canvas/>');\n",
+ " canvas.addClass('mpl-canvas');\n",
+ " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
+ "\n",
+ " this.canvas = canvas[0];\n",
+ " this.context = canvas[0].getContext(\"2d\");\n",
+ "\n",
+ " var rubberband = $('<canvas/>');\n",
+ " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
+ "\n",
+ " var pass_mouse_events = true;\n",
+ "\n",
+ " canvas_div.resizable({\n",
+ " start: function(event, ui) {\n",
+ " pass_mouse_events = false;\n",
+ " },\n",
+ " resize: function(event, ui) {\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " stop: function(event, ui) {\n",
+ " pass_mouse_events = true;\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " });\n",
+ "\n",
+ " function mouse_event_fn(event) {\n",
+ " if (pass_mouse_events)\n",
+ " return fig.mouse_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " rubberband.mousedown('button_press', mouse_event_fn);\n",
+ " rubberband.mouseup('button_release', mouse_event_fn);\n",
+ " // Throttle sequential mouse events to 1 every 20ms.\n",
+ " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
+ "\n",
+ " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
+ " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
+ "\n",
+ " canvas_div.on(\"wheel\", function (event) {\n",
+ " event = event.originalEvent;\n",
+ " event['data'] = 'scroll'\n",
+ " if (event.deltaY < 0) {\n",
+ " event.step = 1;\n",
+ " } else {\n",
+ " event.step = -1;\n",
+ " }\n",
+ " mouse_event_fn(event);\n",
+ " });\n",
+ "\n",
+ " canvas_div.append(canvas);\n",
+ " canvas_div.append(rubberband);\n",
+ "\n",
+ " this.rubberband = rubberband;\n",
+ " this.rubberband_canvas = rubberband[0];\n",
+ " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
+ " this.rubberband_context.strokeStyle = \"#000000\";\n",
+ "\n",
+ " this._resize_canvas = function(width, height) {\n",
+ " // Keep the size of the canvas, canvas container, and rubber band\n",
+ " // canvas in synch.\n",
+ " canvas_div.css('width', width)\n",
+ " canvas_div.css('height', height)\n",
+ "\n",
+ " canvas.attr('width', width);\n",
+ " canvas.attr('height', height);\n",
+ "\n",
+ " rubberband.attr('width', width);\n",
+ " rubberband.attr('height', height);\n",
+ " }\n",
+ "\n",
+ " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
+ " // upon first draw.\n",
+ " this._resize_canvas(600, 600);\n",
+ "\n",
+ " // Disable right mouse context menu.\n",
+ " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
+ " return false;\n",
+ " });\n",
+ "\n",
+ " function set_focus () {\n",
+ " canvas.focus();\n",
+ " canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " window.setTimeout(set_focus, 100);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items) {\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) {\n",
+ " // put a spacer in here.\n",
+ " continue;\n",
+ " }\n",
+ " var button = $('<button/>');\n",
+ " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
+ " 'ui-button-icon-only');\n",
+ " button.attr('role', 'button');\n",
+ " button.attr('aria-disabled', 'false');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ "\n",
+ " var icon_img = $('<span/>');\n",
+ " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
+ " icon_img.addClass(image);\n",
+ " icon_img.addClass('ui-corner-all');\n",
+ "\n",
+ " var tooltip_span = $('<span/>');\n",
+ " tooltip_span.addClass('ui-button-text');\n",
+ " tooltip_span.html(tooltip);\n",
+ "\n",
+ " button.append(icon_img);\n",
+ " button.append(tooltip_span);\n",
+ "\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " var fmt_picker_span = $('<span/>');\n",
+ "\n",
+ " var fmt_picker = $('<select/>');\n",
+ " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
+ " fmt_picker_span.append(fmt_picker);\n",
+ " nav_element.append(fmt_picker_span);\n",
+ " this.format_dropdown = fmt_picker[0];\n",
+ "\n",
+ " for (var ind in mpl.extensions) {\n",
+ " var fmt = mpl.extensions[ind];\n",
+ " var option = $(\n",
+ " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
+ " fmt_picker.append(option)\n",
+ " }\n",
+ "\n",
+ " // Add hover states to the ui-buttons\n",
+ " $( \".ui-button\" ).hover(\n",
+ " function() { $(this).addClass(\"ui-state-hover\");},\n",
+ " function() { $(this).removeClass(\"ui-state-hover\");}\n",
+ " );\n",
+ "\n",
+ " var status_bar = $('<span class=\"mpl-message\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
+ " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
+ " // which will in turn request a refresh of the image.\n",
+ " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_message = function(type, properties) {\n",
+ " properties['type'] = type;\n",
+ " properties['figure_id'] = this.id;\n",
+ " this.ws.send(JSON.stringify(properties));\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_draw_message = function() {\n",
+ " if (!this.waiting) {\n",
+ " this.waiting = true;\n",
+ " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " var format_dropdown = fig.format_dropdown;\n",
+ " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
+ " fig.ondownload(fig, format);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
+ " var size = msg['size'];\n",
+ " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
+ " fig._resize_canvas(size[0], size[1]);\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
+ " var x0 = msg['x0'];\n",
+ " var y0 = fig.canvas.height - msg['y0'];\n",
+ " var x1 = msg['x1'];\n",
+ " var y1 = fig.canvas.height - msg['y1'];\n",
+ " x0 = Math.floor(x0) + 0.5;\n",
+ " y0 = Math.floor(y0) + 0.5;\n",
+ " x1 = Math.floor(x1) + 0.5;\n",
+ " y1 = Math.floor(y1) + 0.5;\n",
+ " var min_x = Math.min(x0, x1);\n",
+ " var min_y = Math.min(y0, y1);\n",
+ " var width = Math.abs(x1 - x0);\n",
+ " var height = Math.abs(y1 - y0);\n",
+ "\n",
+ " fig.rubberband_context.clearRect(\n",
+ " 0, 0, fig.canvas.width, fig.canvas.height);\n",
+ "\n",
+ " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
+ " // Updates the figure title.\n",
+ " fig.header.textContent = msg['label'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
+ " var cursor = msg['cursor'];\n",
+ " switch(cursor)\n",
+ " {\n",
+ " case 0:\n",
+ " cursor = 'pointer';\n",
+ " break;\n",
+ " case 1:\n",
+ " cursor = 'default';\n",
+ " break;\n",
+ " case 2:\n",
+ " cursor = 'crosshair';\n",
+ " break;\n",
+ " case 3:\n",
+ " cursor = 'move';\n",
+ " break;\n",
+ " }\n",
+ " fig.rubberband_canvas.style.cursor = cursor;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
+ " fig.message.textContent = msg['message'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
+ " // Request the server to send over a new figure.\n",
+ " fig.send_draw_message();\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
+ " fig.image_mode = msg['mode'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Called whenever the canvas gets updated.\n",
+ " this.send_message(\"ack\", {});\n",
+ "}\n",
+ "\n",
+ "// A function to construct a web socket function for onmessage handling.\n",
+ "// Called in the figure constructor.\n",
+ "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
+ " return function socket_on_message(evt) {\n",
+ " if (evt.data instanceof Blob) {\n",
+ " /* FIXME: We get \"Resource interpreted as Image but\n",
+ " * transferred with MIME type text/plain:\" errors on\n",
+ " * Chrome. But how to set the MIME type? It doesn't seem\n",
+ " * to be part of the websocket stream */\n",
+ " evt.data.type = \"image/png\";\n",
+ "\n",
+ " /* Free the memory for the previous frames */\n",
+ " if (fig.imageObj.src) {\n",
+ " (window.URL || window.webkitURL).revokeObjectURL(\n",
+ " fig.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
+ " evt.data);\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
+ " fig.imageObj.src = evt.data;\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var msg = JSON.parse(evt.data);\n",
+ " var msg_type = msg['type'];\n",
+ "\n",
+ " // Call the \"handle_{type}\" callback, which takes\n",
+ " // the figure and JSON message as its only arguments.\n",
+ " try {\n",
+ " var callback = fig[\"handle_\" + msg_type];\n",
+ " } catch (e) {\n",
+ " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " if (callback) {\n",
+ " try {\n",
+ " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
+ " callback(fig, msg);\n",
+ " } catch (e) {\n",
+ " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
+ " }\n",
+ " }\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "mpl.findpos = function(e) {\n",
+ " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
+ " var targ;\n",
+ " if (!e)\n",
+ " e = window.event;\n",
+ " if (e.target)\n",
+ " targ = e.target;\n",
+ " else if (e.srcElement)\n",
+ " targ = e.srcElement;\n",
+ " if (targ.nodeType == 3) // defeat Safari bug\n",
+ " targ = targ.parentNode;\n",
+ "\n",
+ " // jQuery normalizes the pageX and pageY\n",
+ " // pageX,Y are the mouse positions relative to the document\n",
+ " // offset() returns the position of the element relative to the document\n",
+ " var x = e.pageX - $(targ).offset().left;\n",
+ " var y = e.pageY - $(targ).offset().top;\n",
+ "\n",
+ " return {\"x\": x, \"y\": y};\n",
+ "};\n",
+ "\n",
+ "/*\n",
+ " * return a copy of an object with only non-object keys\n",
+ " * we need this to avoid circular references\n",
+ " * http://stackoverflow.com/a/24161582/3208463\n",
+ " */\n",
+ "function simpleKeys (original) {\n",
+ " return Object.keys(original).reduce(function (obj, key) {\n",
+ " if (typeof original[key] !== 'object')\n",
+ " obj[key] = original[key]\n",
+ " return obj;\n",
+ " }, {});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.mouse_event = function(event, name) {\n",
+ " var canvas_pos = mpl.findpos(event)\n",
+ "\n",
+ " if (name === 'button_press')\n",
+ " {\n",
+ " this.canvas.focus();\n",
+ " this.canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " var x = canvas_pos.x;\n",
+ " var y = canvas_pos.y;\n",
+ "\n",
+ " this.send_message(name, {x: x, y: y, button: event.button,\n",
+ " step: event.step,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ "\n",
+ " /* This prevents the web browser from automatically changing to\n",
+ " * the text insertion cursor when the button is pressed. We want\n",
+ " * to control all of the cursor setting manually through the\n",
+ " * 'cursor' event from matplotlib */\n",
+ " event.preventDefault();\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " // Handle any extra behaviour associated with a key event\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.key_event = function(event, name) {\n",
+ "\n",
+ " // Prevent repeat events\n",
+ " if (name == 'key_press')\n",
+ " {\n",
+ " if (event.which === this._key)\n",
+ " return;\n",
+ " else\n",
+ " this._key = event.which;\n",
+ " }\n",
+ " if (name == 'key_release')\n",
+ " this._key = null;\n",
+ "\n",
+ " var value = '';\n",
+ " if (event.ctrlKey && event.which != 17)\n",
+ " value += \"ctrl+\";\n",
+ " if (event.altKey && event.which != 18)\n",
+ " value += \"alt+\";\n",
+ " if (event.shiftKey && event.which != 16)\n",
+ " value += \"shift+\";\n",
+ "\n",
+ " value += 'k';\n",
+ " value += event.which.toString();\n",
+ "\n",
+ " this._key_event_extra(event, name);\n",
+ "\n",
+ " this.send_message(name, {key: value,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
+ " if (name == 'download') {\n",
+ " this.handle_save(this, null);\n",
+ " } else {\n",
+ " this.send_message(\"toolbar_button\", {name: name});\n",
+ " }\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
+ " this.message.textContent = tooltip;\n",
+ "};\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "\n",
+ "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
+ "\n",
+ "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
+ " // Create a \"websocket\"-like object which calls the given IPython comm\n",
+ " // object with the appropriate methods. Currently this is a non binary\n",
+ " // socket, so there is still some room for performance tuning.\n",
+ " var ws = {};\n",
+ "\n",
+ " ws.close = function() {\n",
+ " comm.close()\n",
+ " };\n",
+ " ws.send = function(m) {\n",
+ " //console.log('sending', m);\n",
+ " comm.send(m);\n",
+ " };\n",
+ " // Register the callback with on_msg.\n",
+ " comm.on_msg(function(msg) {\n",
+ " //console.log('receiving', msg['content']['data'], msg);\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
+ " ws.onmessage(msg['content']['data'])\n",
+ " });\n",
+ " return ws;\n",
+ "}\n",
+ "\n",
+ "mpl.mpl_figure_comm = function(comm, msg) {\n",
+ " // This is the function which gets called when the mpl process\n",
+ " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
+ "\n",
+ " var id = msg.content.data.id;\n",
+ " // Get hold of the div created by the display call when the Comm\n",
+ " // socket was opened in Python.\n",
+ " var element = $(\"#\" + id);\n",
+ " var ws_proxy = comm_websocket_adapter(comm)\n",
+ "\n",
+ " function ondownload(figure, format) {\n",
+ " window.open(figure.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " var fig = new mpl.figure(id, ws_proxy,\n",
+ " ondownload,\n",
+ " element.get(0));\n",
+ "\n",
+ " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
+ " // web socket which is closed, not our websocket->open comm proxy.\n",
+ " ws_proxy.onopen();\n",
+ "\n",
+ " fig.parent_element = element.get(0);\n",
+ " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
+ " if (!fig.cell_info) {\n",
+ " console.error(\"Failed to find cell for figure\", id, fig);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var output_index = fig.cell_info[2]\n",
+ " var cell = fig.cell_info[0];\n",
+ "\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " fig.root.unbind('remove')\n",
+ "\n",
+ " // Update the output cell to use the data from the current canvas.\n",
+ " fig.push_to_output();\n",
+ " var dataURL = fig.canvas.toDataURL();\n",
+ " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
+ " // the notebook keyboard shortcuts fail.\n",
+ " IPython.keyboard_manager.enable()\n",
+ " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n",
+ " fig.close_ws(fig, msg);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.close_ws = function(fig, msg){\n",
+ " fig.send_message('closing', msg);\n",
+ " // fig.ws.close()\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
+ " // Turn the data on the canvas into data in the output cell.\n",
+ " var dataURL = this.canvas.toDataURL();\n",
+ " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Tell IPython that the notebook contents must change.\n",
+ " IPython.notebook.set_dirty(true);\n",
+ " this.send_message(\"ack\", {});\n",
+ " var fig = this;\n",
+ " // Wait a second, then push the new image to the DOM so\n",
+ " // that it is saved nicely (might be nice to debounce this).\n",
+ " setTimeout(function () { fig.push_to_output() }, 1000);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items){\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) { continue; };\n",
+ "\n",
+ " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " // Add the status bar.\n",
+ " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "\n",
+ " // Add the close button to the window.\n",
+ " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
+ " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
+ " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
+ " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
+ " buttongrp.append(button);\n",
+ " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
+ " titlebar.prepend(buttongrp);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(el){\n",
+ " var fig = this\n",
+ " el.on(\"remove\", function(){\n",
+ "\tfig.close_ws(fig, {});\n",
+ " });\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(el){\n",
+ " // this is important to make the div 'focusable\n",
+ " el.attr('tabindex', 0)\n",
+ " // reach out to IPython and tell the keyboard manager to turn it's self\n",
+ " // off when our div gets focus\n",
+ "\n",
+ " // location in version 3\n",
+ " if (IPython.notebook.keyboard_manager) {\n",
+ " IPython.notebook.keyboard_manager.register_events(el);\n",
+ " }\n",
+ " else {\n",
+ " // location in version 2\n",
+ " IPython.keyboard_manager.register_events(el);\n",
+ " }\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " var manager = IPython.notebook.keyboard_manager;\n",
+ " if (!manager)\n",
+ " manager = IPython.keyboard_manager;\n",
+ "\n",
+ " // Check for shift+enter\n",
+ " if (event.shiftKey && event.which == 13) {\n",
+ " this.canvas_div.blur();\n",
+ " event.shiftKey = false;\n",
+ " // Send a \"J\" for go to next cell\n",
+ " event.which = 74;\n",
+ " event.keyCode = 74;\n",
+ " manager.command_mode();\n",
+ " manager.handle_keydown(event);\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " fig.ondownload(fig, null);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.find_output_cell = function(html_output) {\n",
+ " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
+ " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
+ " // IPython event is triggered only after the cells have been serialised, which for\n",
+ " // our purposes (turning an active figure into a static one), is too late.\n",
+ " var cells = IPython.notebook.get_cells();\n",
+ " var ncells = cells.length;\n",
+ " for (var i=0; i<ncells; i++) {\n",
+ " var cell = cells[i];\n",
+ " if (cell.cell_type === 'code'){\n",
+ " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
+ " var data = cell.output_area.outputs[j];\n",
+ " if (data.data) {\n",
+ " // IPython >= 3 moved mimebundle to data attribute of output\n",
+ " data = data.data;\n",
+ " }\n",
+ " if (data['text/html'] == html_output) {\n",
+ " return [cell, data, j];\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Register the function which deals with the matplotlib target/channel.\n",
+ "// The kernel may be null if the page has been refreshed.\n",
+ "if (IPython.notebook.kernel != null) {\n",
+ " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "<IPython.core.display.Javascript object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz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AAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Efficiency 66.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib notebook\n",
+ "import matplotlib\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt2\n",
+ "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n",
+ "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n",
+ "VR=25.0 #velocity ratio\n",
+ "E=[0,0,0,0,0,0] #Efficiency\n",
+ "#calculating average slope\n",
+ "m=(P[4]-P[1])/(W[4]-W[1])\n",
+ "C=P[4]-m*W[4]\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "for i in range(0,6):\n",
+ " \n",
+ " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n",
+ " \n",
+ "plt2.plot(W,E)\n",
+ "plt2.ylabel(\"Efficiency\")\n",
+ "plt2.xlabel(\"Load\")\n",
+ "plt2.show() \n",
+ "\n",
+ " \n",
+ "MaxEfficiency=1/VR*100*1/m\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 13.8888888889\n",
+ "Velocity Ratio 30.0\n",
+ "Efficiency 46.2962962963\n",
+ "self-locking machine\n",
+ "Ideal Load 10800.0\n",
+ "frictional resistance 5800.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "W = 5000.0 #Load\n",
+ "P = 360.0 #Effort\n",
+ "\n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100.0\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "Wi = P*VR #ideal load\n",
+ "\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print var\n",
+ "print \"Ideal Load\",Wi\n",
+ "\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 937.5 N\n",
+ "number of pulley is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 6000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.8\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "#second case\n",
+ "P=520.0\n",
+ "n=0,\n",
+ "for i in range(3,20):\n",
+ " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n",
+ " n=i\n",
+ " break\n",
+ " \n",
+ " \n",
+ "print \"number of pulley is \",n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exmple 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 2352.94117647 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N=3.0 #number of movable pulleys\n",
+ "VR=2*N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.85\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1923.07692308 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1\n",
+ "N2=2.0 #number of movable puleys in system 2\n",
+ "VR=2*N1+2*N2 #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.78\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 79.3650793651\n",
+ "Effort lost in friction 37.1428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 1000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N-1 #Velocity Ratio\n",
+ "P = 180.0 #Effort\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "Pi =W/VR #Ideal effort\n",
+ "\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "print \"Effort lost in friction\",efl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 595.238095238 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 2500.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1 in figure B\n",
+ "N2=2.0 #number of movable puleys in system 2 in figure C\n",
+ "VR=2**N1-1+2**N2-1 #Velocity Ratio\n",
+ "Efficiency=0.70\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 2.3\n",
+ "Effort is 745.341614907 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle\n",
+ "tcw=6.0 #thickness of the cord on the wheel\n",
+ "tca=20.0 #thickness of the cord on the axle\n",
+ "W=1200 #effort\n",
+ "ED=D+tcw #Effective diameter of the wheel\n",
+ "Ed=d+tca #Effectivediameter of axle\n",
+ "VR=ED/Ed #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.7\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 32.0\n",
+ "Effort is 1136.36363636 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=800.0 #diameter of the wheel\n",
+ "d1=250.0 #diameter of axle 1\n",
+ "d2=300.0 #diameter of axle 2\n",
+ "\n",
+ "W=20000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(d2-d1) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.55\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 3.33333333333\n",
+ "Effort is 2500.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle \n",
+ "\n",
+ "W=5000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(D-d) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.6\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1741.88034188 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=40.0 #Screw diameter\n",
+ "l=20.0 #Screw lwngth\n",
+ "p=l/3.0 #Lead of the screw\n",
+ "W=40000.0 #effort\n",
+ "R = 400 #Lever length\n",
+ "u = 0.12 #coefficient of friction between screw and nut\n",
+ "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 57.0287539936 N\n",
+ "Efficiency 55.8439936484 %\n",
+ "reversible machine\n",
+ "The torque required to keep the load from descending 2047.61904762 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=50.0 #mean diameter of screw\n",
+ "p=10.0 #pitch of screw\n",
+ "u=0.05 #coefficient of friction at the screw thread\n",
+ "R=300.0 ##Lever length\n",
+ "W=6000.0 #Load\n",
+ "o1=math.atan(p/(3.14*d))\n",
+ "o2=math.atan(0.05)\n",
+ "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "VR=2*3.14*R/p #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "print var\n",
+ "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n",
+ "print \"The torque required to keep the load from descending\",T,\"Nm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 12.9110001721 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1=5.0 #Pitch of smaller screw\n",
+ "p2=10.0 #Pitch of larger screw\n",
+ "R=500.0 #Lever arm length from centre of screw\n",
+ "W=15000.0 #Load\n",
+ "P=185.0 #Effort\n",
+ "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 120.0\n",
+ "Law of machine is P= 0.01 W + 70.0\n",
+ "Efficiency for first case 25.0 %\n",
+ "Efficiency for second case 46.875 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=200.0 #Diameter of the load drum \n",
+ "R = 1200.0 # Length of lever arm \n",
+ "T1 = 10.0 #Number of teeth on pinion, \n",
+ "T2 = 100.0 #Number of teeth on spur wheel\n",
+ "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "W1 = 3000.0 #Load 1\n",
+ "P1= 100.0 #Effort1\n",
+ "\n",
+ "W2 = 9000.0 #Load 2\n",
+ "P2= 160.0 #Effort2\n",
+ "\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for first case\",Efficiency,\"%\"\n",
+ "MA=W2/P2 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for second case\",Efficiency,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 32.0\n",
+ "LOad 3200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=150.0 #Diameter of the load drum \n",
+ "R = 400.0 # Length of lever arm \n",
+ "T1 = 15.0 #Number of teeth on pinion, \n",
+ "T3 = 20.0 #Number of teeth on pinion, \n",
+ "T2 = 45.0 #Number of teeth on spur wheel\n",
+ "T4 = 40.0 #Number of teeth on spur wheel\n",
+ "P= 250.0 #Effort\n",
+ "Efficiency=0.4\n",
+ "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "\n",
+ "W=VR*Efficiency*P #Load \n",
+ "\n",
+ "print \"LOad\",W,\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_RVkqLSe.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_RVkqLSe.ipynb
new file mode 100644
index 00000000..55339520
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_RVkqLSe.ipynb
@@ -0,0 +1,1593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6-SIMPLE MACHINES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 20.0\n",
+ "Velocity Ratio 25.0\n",
+ "Efficiency 0.8\n",
+ "Ideal Load 12500.0\n",
+ "Ideal Effort 400.0\n",
+ "Effort lost in friction 100.0\n",
+ "frictional resistance 2500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 10000.0 #Load\n",
+ "P = 500.0 #Effort\n",
+ "D = 20.0 #Distance moved by the effort \n",
+ "d = 0.8 #Distance moved by the load \n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=D/d #Velocity Ratio\n",
+ "Efficiency=MA/VR\n",
+ "Pi =W/VR #Ideal effort\n",
+ "Wi = P*VR #ideal load\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print \"Ideal Load\",Wi\n",
+ "print \"Ideal Effort\",Pi\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.05 W + 30.0\n",
+ "Load is 3400.0 N\n",
+ "Mechanical advantage-- 17.0\n",
+ "Ideal effort is 113.333333333 N\n",
+ "Effort lost in friction 86.6666666667\n",
+ "Efficiency 56.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 2400.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "\n",
+ "W2 = 3000.0 #Load 2\n",
+ "P2= 180.0 #Effort2\n",
+ "P3= 200.0 #Effort3\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "W3=(P3-C)/m #Load 2\n",
+ "print \"Load is \",W3,\"N\"\n",
+ "MA=W3/P3 #Mechanical advantage\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100\n",
+ "Pi =W3/VR #Ideal effort\n",
+ "print \"Ideal effort is\",Pi,\"N\"\n",
+ "\n",
+ "efl=P3-Pi #Effort lost in friction\n",
+ "\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"Efficiency\",Efficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 51.3333333333\n",
+ "Velocity Ratio 85.5555555556\n",
+ "Efficiency 61.7142857143\n",
+ "Maximum Mechanical advantage-- 55.0\n",
+ "Maximum Efficiency 64.2857142857\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 7700.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=0.6\n",
+ "VR=MA/Efficiency #Velocity Ratio\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "W2 = 13200.0 #Load 2\n",
+ "P2= 250.0 #Effort2\n",
+ "MA=W2/P2\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "\n",
+ "\n",
+ "MMA=1/m #Maximum Mechanical advantage\n",
+ "print \"Maximum Mechanical advantage--\",MMA\n",
+ "\n",
+ "MaxEfficiency=MMA/VR*100\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.06 W + 10.5\n"
+ ]
+ },
+ {
+ "data": {
+ "application/javascript": [
+ "/* Put everything inside the global mpl namespace */\n",
+ "window.mpl = {};\n",
+ "\n",
+ "mpl.get_websocket_type = function() {\n",
+ " if (typeof(WebSocket) !== 'undefined') {\n",
+ " return WebSocket;\n",
+ " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
+ " return MozWebSocket;\n",
+ " } else {\n",
+ " alert('Your browser does not have WebSocket support.' +\n",
+ " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
+ " 'Firefox 4 and 5 are also supported but you ' +\n",
+ " 'have to enable WebSockets in about:config.');\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
+ " this.id = figure_id;\n",
+ "\n",
+ " this.ws = websocket;\n",
+ "\n",
+ " this.supports_binary = (this.ws.binaryType != undefined);\n",
+ "\n",
+ " if (!this.supports_binary) {\n",
+ " var warnings = document.getElementById(\"mpl-warnings\");\n",
+ " if (warnings) {\n",
+ " warnings.style.display = 'block';\n",
+ " warnings.textContent = (\n",
+ " \"This browser does not support binary websocket messages. \" +\n",
+ " \"Performance may be slow.\");\n",
+ " }\n",
+ " }\n",
+ "\n",
+ " this.imageObj = new Image();\n",
+ "\n",
+ " this.context = undefined;\n",
+ " this.message = undefined;\n",
+ " this.canvas = undefined;\n",
+ " this.rubberband_canvas = undefined;\n",
+ " this.rubberband_context = undefined;\n",
+ " this.format_dropdown = undefined;\n",
+ "\n",
+ " this.image_mode = 'full';\n",
+ "\n",
+ " this.root = $('<div/>');\n",
+ " this._root_extra_style(this.root)\n",
+ " this.root.attr('style', 'display: inline-block');\n",
+ "\n",
+ " $(parent_element).append(this.root);\n",
+ "\n",
+ " this._init_header(this);\n",
+ " this._init_canvas(this);\n",
+ " this._init_toolbar(this);\n",
+ "\n",
+ " var fig = this;\n",
+ "\n",
+ " this.waiting = false;\n",
+ "\n",
+ " this.ws.onopen = function () {\n",
+ " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
+ " fig.send_message(\"send_image_mode\", {});\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " }\n",
+ "\n",
+ " this.imageObj.onload = function() {\n",
+ " if (fig.image_mode == 'full') {\n",
+ " // Full images could contain transparency (where diff images\n",
+ " // almost always do), so we need to clear the canvas so that\n",
+ " // there is no ghosting.\n",
+ " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
+ " }\n",
+ " fig.context.drawImage(fig.imageObj, 0, 0);\n",
+ " };\n",
+ "\n",
+ " this.imageObj.onunload = function() {\n",
+ " this.ws.close();\n",
+ " }\n",
+ "\n",
+ " this.ws.onmessage = this._make_on_message_function(this);\n",
+ "\n",
+ " this.ondownload = ondownload;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_header = function() {\n",
+ " var titlebar = $(\n",
+ " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
+ " 'ui-helper-clearfix\"/>');\n",
+ " var titletext = $(\n",
+ " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
+ " 'text-align: center; padding: 3px;\"/>');\n",
+ " titlebar.append(titletext)\n",
+ " this.root.append(titlebar);\n",
+ " this.header = titletext[0];\n",
+ "}\n",
+ "\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_canvas = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var canvas_div = $('<div/>');\n",
+ "\n",
+ " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
+ "\n",
+ " function canvas_keyboard_event(event) {\n",
+ " return fig.key_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
+ " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
+ " this.canvas_div = canvas_div\n",
+ " this._canvas_extra_style(canvas_div)\n",
+ " this.root.append(canvas_div);\n",
+ "\n",
+ " var canvas = $('<canvas/>');\n",
+ " canvas.addClass('mpl-canvas');\n",
+ " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
+ "\n",
+ " this.canvas = canvas[0];\n",
+ " this.context = canvas[0].getContext(\"2d\");\n",
+ "\n",
+ " var rubberband = $('<canvas/>');\n",
+ " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
+ "\n",
+ " var pass_mouse_events = true;\n",
+ "\n",
+ " canvas_div.resizable({\n",
+ " start: function(event, ui) {\n",
+ " pass_mouse_events = false;\n",
+ " },\n",
+ " resize: function(event, ui) {\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " stop: function(event, ui) {\n",
+ " pass_mouse_events = true;\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " });\n",
+ "\n",
+ " function mouse_event_fn(event) {\n",
+ " if (pass_mouse_events)\n",
+ " return fig.mouse_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " rubberband.mousedown('button_press', mouse_event_fn);\n",
+ " rubberband.mouseup('button_release', mouse_event_fn);\n",
+ " // Throttle sequential mouse events to 1 every 20ms.\n",
+ " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
+ "\n",
+ " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
+ " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
+ "\n",
+ " canvas_div.on(\"wheel\", function (event) {\n",
+ " event = event.originalEvent;\n",
+ " event['data'] = 'scroll'\n",
+ " if (event.deltaY < 0) {\n",
+ " event.step = 1;\n",
+ " } else {\n",
+ " event.step = -1;\n",
+ " }\n",
+ " mouse_event_fn(event);\n",
+ " });\n",
+ "\n",
+ " canvas_div.append(canvas);\n",
+ " canvas_div.append(rubberband);\n",
+ "\n",
+ " this.rubberband = rubberband;\n",
+ " this.rubberband_canvas = rubberband[0];\n",
+ " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
+ " this.rubberband_context.strokeStyle = \"#000000\";\n",
+ "\n",
+ " this._resize_canvas = function(width, height) {\n",
+ " // Keep the size of the canvas, canvas container, and rubber band\n",
+ " // canvas in synch.\n",
+ " canvas_div.css('width', width)\n",
+ " canvas_div.css('height', height)\n",
+ "\n",
+ " canvas.attr('width', width);\n",
+ " canvas.attr('height', height);\n",
+ "\n",
+ " rubberband.attr('width', width);\n",
+ " rubberband.attr('height', height);\n",
+ " }\n",
+ "\n",
+ " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
+ " // upon first draw.\n",
+ " this._resize_canvas(600, 600);\n",
+ "\n",
+ " // Disable right mouse context menu.\n",
+ " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
+ " return false;\n",
+ " });\n",
+ "\n",
+ " function set_focus () {\n",
+ " canvas.focus();\n",
+ " canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " window.setTimeout(set_focus, 100);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items) {\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) {\n",
+ " // put a spacer in here.\n",
+ " continue;\n",
+ " }\n",
+ " var button = $('<button/>');\n",
+ " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
+ " 'ui-button-icon-only');\n",
+ " button.attr('role', 'button');\n",
+ " button.attr('aria-disabled', 'false');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ "\n",
+ " var icon_img = $('<span/>');\n",
+ " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
+ " icon_img.addClass(image);\n",
+ " icon_img.addClass('ui-corner-all');\n",
+ "\n",
+ " var tooltip_span = $('<span/>');\n",
+ " tooltip_span.addClass('ui-button-text');\n",
+ " tooltip_span.html(tooltip);\n",
+ "\n",
+ " button.append(icon_img);\n",
+ " button.append(tooltip_span);\n",
+ "\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " var fmt_picker_span = $('<span/>');\n",
+ "\n",
+ " var fmt_picker = $('<select/>');\n",
+ " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
+ " fmt_picker_span.append(fmt_picker);\n",
+ " nav_element.append(fmt_picker_span);\n",
+ " this.format_dropdown = fmt_picker[0];\n",
+ "\n",
+ " for (var ind in mpl.extensions) {\n",
+ " var fmt = mpl.extensions[ind];\n",
+ " var option = $(\n",
+ " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
+ " fmt_picker.append(option)\n",
+ " }\n",
+ "\n",
+ " // Add hover states to the ui-buttons\n",
+ " $( \".ui-button\" ).hover(\n",
+ " function() { $(this).addClass(\"ui-state-hover\");},\n",
+ " function() { $(this).removeClass(\"ui-state-hover\");}\n",
+ " );\n",
+ "\n",
+ " var status_bar = $('<span class=\"mpl-message\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
+ " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
+ " // which will in turn request a refresh of the image.\n",
+ " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_message = function(type, properties) {\n",
+ " properties['type'] = type;\n",
+ " properties['figure_id'] = this.id;\n",
+ " this.ws.send(JSON.stringify(properties));\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_draw_message = function() {\n",
+ " if (!this.waiting) {\n",
+ " this.waiting = true;\n",
+ " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " var format_dropdown = fig.format_dropdown;\n",
+ " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
+ " fig.ondownload(fig, format);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
+ " var size = msg['size'];\n",
+ " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
+ " fig._resize_canvas(size[0], size[1]);\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
+ " var x0 = msg['x0'];\n",
+ " var y0 = fig.canvas.height - msg['y0'];\n",
+ " var x1 = msg['x1'];\n",
+ " var y1 = fig.canvas.height - msg['y1'];\n",
+ " x0 = Math.floor(x0) + 0.5;\n",
+ " y0 = Math.floor(y0) + 0.5;\n",
+ " x1 = Math.floor(x1) + 0.5;\n",
+ " y1 = Math.floor(y1) + 0.5;\n",
+ " var min_x = Math.min(x0, x1);\n",
+ " var min_y = Math.min(y0, y1);\n",
+ " var width = Math.abs(x1 - x0);\n",
+ " var height = Math.abs(y1 - y0);\n",
+ "\n",
+ " fig.rubberband_context.clearRect(\n",
+ " 0, 0, fig.canvas.width, fig.canvas.height);\n",
+ "\n",
+ " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
+ " // Updates the figure title.\n",
+ " fig.header.textContent = msg['label'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
+ " var cursor = msg['cursor'];\n",
+ " switch(cursor)\n",
+ " {\n",
+ " case 0:\n",
+ " cursor = 'pointer';\n",
+ " break;\n",
+ " case 1:\n",
+ " cursor = 'default';\n",
+ " break;\n",
+ " case 2:\n",
+ " cursor = 'crosshair';\n",
+ " break;\n",
+ " case 3:\n",
+ " cursor = 'move';\n",
+ " break;\n",
+ " }\n",
+ " fig.rubberband_canvas.style.cursor = cursor;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
+ " fig.message.textContent = msg['message'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
+ " // Request the server to send over a new figure.\n",
+ " fig.send_draw_message();\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
+ " fig.image_mode = msg['mode'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Called whenever the canvas gets updated.\n",
+ " this.send_message(\"ack\", {});\n",
+ "}\n",
+ "\n",
+ "// A function to construct a web socket function for onmessage handling.\n",
+ "// Called in the figure constructor.\n",
+ "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
+ " return function socket_on_message(evt) {\n",
+ " if (evt.data instanceof Blob) {\n",
+ " /* FIXME: We get \"Resource interpreted as Image but\n",
+ " * transferred with MIME type text/plain:\" errors on\n",
+ " * Chrome. But how to set the MIME type? It doesn't seem\n",
+ " * to be part of the websocket stream */\n",
+ " evt.data.type = \"image/png\";\n",
+ "\n",
+ " /* Free the memory for the previous frames */\n",
+ " if (fig.imageObj.src) {\n",
+ " (window.URL || window.webkitURL).revokeObjectURL(\n",
+ " fig.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
+ " evt.data);\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
+ " fig.imageObj.src = evt.data;\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var msg = JSON.parse(evt.data);\n",
+ " var msg_type = msg['type'];\n",
+ "\n",
+ " // Call the \"handle_{type}\" callback, which takes\n",
+ " // the figure and JSON message as its only arguments.\n",
+ " try {\n",
+ " var callback = fig[\"handle_\" + msg_type];\n",
+ " } catch (e) {\n",
+ " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " if (callback) {\n",
+ " try {\n",
+ " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
+ " callback(fig, msg);\n",
+ " } catch (e) {\n",
+ " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
+ " }\n",
+ " }\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "mpl.findpos = function(e) {\n",
+ " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
+ " var targ;\n",
+ " if (!e)\n",
+ " e = window.event;\n",
+ " if (e.target)\n",
+ " targ = e.target;\n",
+ " else if (e.srcElement)\n",
+ " targ = e.srcElement;\n",
+ " if (targ.nodeType == 3) // defeat Safari bug\n",
+ " targ = targ.parentNode;\n",
+ "\n",
+ " // jQuery normalizes the pageX and pageY\n",
+ " // pageX,Y are the mouse positions relative to the document\n",
+ " // offset() returns the position of the element relative to the document\n",
+ " var x = e.pageX - $(targ).offset().left;\n",
+ " var y = e.pageY - $(targ).offset().top;\n",
+ "\n",
+ " return {\"x\": x, \"y\": y};\n",
+ "};\n",
+ "\n",
+ "/*\n",
+ " * return a copy of an object with only non-object keys\n",
+ " * we need this to avoid circular references\n",
+ " * http://stackoverflow.com/a/24161582/3208463\n",
+ " */\n",
+ "function simpleKeys (original) {\n",
+ " return Object.keys(original).reduce(function (obj, key) {\n",
+ " if (typeof original[key] !== 'object')\n",
+ " obj[key] = original[key]\n",
+ " return obj;\n",
+ " }, {});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.mouse_event = function(event, name) {\n",
+ " var canvas_pos = mpl.findpos(event)\n",
+ "\n",
+ " if (name === 'button_press')\n",
+ " {\n",
+ " this.canvas.focus();\n",
+ " this.canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " var x = canvas_pos.x;\n",
+ " var y = canvas_pos.y;\n",
+ "\n",
+ " this.send_message(name, {x: x, y: y, button: event.button,\n",
+ " step: event.step,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ "\n",
+ " /* This prevents the web browser from automatically changing to\n",
+ " * the text insertion cursor when the button is pressed. We want\n",
+ " * to control all of the cursor setting manually through the\n",
+ " * 'cursor' event from matplotlib */\n",
+ " event.preventDefault();\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " // Handle any extra behaviour associated with a key event\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.key_event = function(event, name) {\n",
+ "\n",
+ " // Prevent repeat events\n",
+ " if (name == 'key_press')\n",
+ " {\n",
+ " if (event.which === this._key)\n",
+ " return;\n",
+ " else\n",
+ " this._key = event.which;\n",
+ " }\n",
+ " if (name == 'key_release')\n",
+ " this._key = null;\n",
+ "\n",
+ " var value = '';\n",
+ " if (event.ctrlKey && event.which != 17)\n",
+ " value += \"ctrl+\";\n",
+ " if (event.altKey && event.which != 18)\n",
+ " value += \"alt+\";\n",
+ " if (event.shiftKey && event.which != 16)\n",
+ " value += \"shift+\";\n",
+ "\n",
+ " value += 'k';\n",
+ " value += event.which.toString();\n",
+ "\n",
+ " this._key_event_extra(event, name);\n",
+ "\n",
+ " this.send_message(name, {key: value,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
+ " if (name == 'download') {\n",
+ " this.handle_save(this, null);\n",
+ " } else {\n",
+ " this.send_message(\"toolbar_button\", {name: name});\n",
+ " }\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
+ " this.message.textContent = tooltip;\n",
+ "};\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "\n",
+ "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
+ "\n",
+ "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
+ " // Create a \"websocket\"-like object which calls the given IPython comm\n",
+ " // object with the appropriate methods. Currently this is a non binary\n",
+ " // socket, so there is still some room for performance tuning.\n",
+ " var ws = {};\n",
+ "\n",
+ " ws.close = function() {\n",
+ " comm.close()\n",
+ " };\n",
+ " ws.send = function(m) {\n",
+ " //console.log('sending', m);\n",
+ " comm.send(m);\n",
+ " };\n",
+ " // Register the callback with on_msg.\n",
+ " comm.on_msg(function(msg) {\n",
+ " //console.log('receiving', msg['content']['data'], msg);\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
+ " ws.onmessage(msg['content']['data'])\n",
+ " });\n",
+ " return ws;\n",
+ "}\n",
+ "\n",
+ "mpl.mpl_figure_comm = function(comm, msg) {\n",
+ " // This is the function which gets called when the mpl process\n",
+ " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
+ "\n",
+ " var id = msg.content.data.id;\n",
+ " // Get hold of the div created by the display call when the Comm\n",
+ " // socket was opened in Python.\n",
+ " var element = $(\"#\" + id);\n",
+ " var ws_proxy = comm_websocket_adapter(comm)\n",
+ "\n",
+ " function ondownload(figure, format) {\n",
+ " window.open(figure.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " var fig = new mpl.figure(id, ws_proxy,\n",
+ " ondownload,\n",
+ " element.get(0));\n",
+ "\n",
+ " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
+ " // web socket which is closed, not our websocket->open comm proxy.\n",
+ " ws_proxy.onopen();\n",
+ "\n",
+ " fig.parent_element = element.get(0);\n",
+ " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
+ " if (!fig.cell_info) {\n",
+ " console.error(\"Failed to find cell for figure\", id, fig);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var output_index = fig.cell_info[2]\n",
+ " var cell = fig.cell_info[0];\n",
+ "\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " fig.root.unbind('remove')\n",
+ "\n",
+ " // Update the output cell to use the data from the current canvas.\n",
+ " fig.push_to_output();\n",
+ " var dataURL = fig.canvas.toDataURL();\n",
+ " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
+ " // the notebook keyboard shortcuts fail.\n",
+ " IPython.keyboard_manager.enable()\n",
+ " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n",
+ " fig.close_ws(fig, msg);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.close_ws = function(fig, msg){\n",
+ " fig.send_message('closing', msg);\n",
+ " // fig.ws.close()\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
+ " // Turn the data on the canvas into data in the output cell.\n",
+ " var dataURL = this.canvas.toDataURL();\n",
+ " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Tell IPython that the notebook contents must change.\n",
+ " IPython.notebook.set_dirty(true);\n",
+ " this.send_message(\"ack\", {});\n",
+ " var fig = this;\n",
+ " // Wait a second, then push the new image to the DOM so\n",
+ " // that it is saved nicely (might be nice to debounce this).\n",
+ " setTimeout(function () { fig.push_to_output() }, 1000);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items){\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) { continue; };\n",
+ "\n",
+ " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " // Add the status bar.\n",
+ " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "\n",
+ " // Add the close button to the window.\n",
+ " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
+ " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
+ " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
+ " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
+ " buttongrp.append(button);\n",
+ " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
+ " titlebar.prepend(buttongrp);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(el){\n",
+ " var fig = this\n",
+ " el.on(\"remove\", function(){\n",
+ "\tfig.close_ws(fig, {});\n",
+ " });\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(el){\n",
+ " // this is important to make the div 'focusable\n",
+ " el.attr('tabindex', 0)\n",
+ " // reach out to IPython and tell the keyboard manager to turn it's self\n",
+ " // off when our div gets focus\n",
+ "\n",
+ " // location in version 3\n",
+ " if (IPython.notebook.keyboard_manager) {\n",
+ " IPython.notebook.keyboard_manager.register_events(el);\n",
+ " }\n",
+ " else {\n",
+ " // location in version 2\n",
+ " IPython.keyboard_manager.register_events(el);\n",
+ " }\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " var manager = IPython.notebook.keyboard_manager;\n",
+ " if (!manager)\n",
+ " manager = IPython.keyboard_manager;\n",
+ "\n",
+ " // Check for shift+enter\n",
+ " if (event.shiftKey && event.which == 13) {\n",
+ " this.canvas_div.blur();\n",
+ " event.shiftKey = false;\n",
+ " // Send a \"J\" for go to next cell\n",
+ " event.which = 74;\n",
+ " event.keyCode = 74;\n",
+ " manager.command_mode();\n",
+ " manager.handle_keydown(event);\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " fig.ondownload(fig, null);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.find_output_cell = function(html_output) {\n",
+ " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
+ " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
+ " // IPython event is triggered only after the cells have been serialised, which for\n",
+ " // our purposes (turning an active figure into a static one), is too late.\n",
+ " var cells = IPython.notebook.get_cells();\n",
+ " var ncells = cells.length;\n",
+ " for (var i=0; i<ncells; i++) {\n",
+ " var cell = cells[i];\n",
+ " if (cell.cell_type === 'code'){\n",
+ " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
+ " var data = cell.output_area.outputs[j];\n",
+ " if (data.data) {\n",
+ " // IPython >= 3 moved mimebundle to data attribute of output\n",
+ " data = data.data;\n",
+ " }\n",
+ " if (data['text/html'] == html_output) {\n",
+ " return [cell, data, j];\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Register the function which deals with the matplotlib target/channel.\n",
+ "// The kernel may be null if the page has been refreshed.\n",
+ "if (IPython.notebook.kernel != null) {\n",
+ " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "<IPython.core.display.Javascript object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+fB0ubwAHhyeAgAAFJ9fRY9YVo3oEQAAoOiktQDuYfna8onFl3+bWCoaafnG8pqluw8AAAAUizTOdO1s8XP7ZlgaWa6z7GvZzeLn/vny74uWJZbDLF4QL7UMtVTmX7/GFv/3AQCA5KhvmWkpz7xKGZY6pTqWuZajLM/4QCX9LW0tLTOvlrWl5fPwFAAAJMxWli/C03ShAC4tgEdbxvtAJV4A21kOyLxaVgPL3BkzZqhBA3+KQurTp48GDRo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AAACSYnuL38Hm15lXABBTFW+IDADF6DnLleFpXpRHjwAQWxRAAACAlKEAAkizbpbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Efficiency 66.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib notebook\n",
+ "import matplotlib\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt2\n",
+ "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n",
+ "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n",
+ "VR=25.0 #velocity ratio\n",
+ "E=[0,0,0,0,0,0] #Efficiency\n",
+ "#calculating average slope\n",
+ "m=(P[4]-P[1])/(W[4]-W[1])\n",
+ "C=P[4]-m*W[4]\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "for i in range(0,6):\n",
+ " \n",
+ " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n",
+ " \n",
+ "plt2.plot(W,E)\n",
+ "plt2.ylabel(\"Efficiency\")\n",
+ "plt2.xlabel(\"Load\")\n",
+ "plt2.show() \n",
+ "\n",
+ " \n",
+ "MaxEfficiency=1/VR*100*1/m\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 13.8888888889\n",
+ "Velocity Ratio 30.0\n",
+ "Efficiency 46.2962962963\n",
+ "self-locking machine\n",
+ "Ideal Load 10800.0\n",
+ "frictional resistance 5800.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "W = 5000.0 #Load\n",
+ "P = 360.0 #Effort\n",
+ "\n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100.0\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "Wi = P*VR #ideal load\n",
+ "\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print var\n",
+ "print \"Ideal Load\",Wi\n",
+ "\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 937.5 N\n",
+ "number of pulley is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 6000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.8\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "#second case\n",
+ "P=520.0\n",
+ "n=0,\n",
+ "for i in range(3,20):\n",
+ " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n",
+ " n=i\n",
+ " break\n",
+ " \n",
+ " \n",
+ "print \"number of pulley is \",n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exmple 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 2352.94117647 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N=3.0 #number of movable pulleys\n",
+ "VR=2*N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.85\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1923.07692308 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1\n",
+ "N2=2.0 #number of movable puleys in system 2\n",
+ "VR=2*N1+2*N2 #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.78\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 79.3650793651\n",
+ "Effort lost in friction 37.1428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 1000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N-1 #Velocity Ratio\n",
+ "P = 180.0 #Effort\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "Pi =W/VR #Ideal effort\n",
+ "\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "print \"Effort lost in friction\",efl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 595.238095238 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 2500.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1 in figure B\n",
+ "N2=2.0 #number of movable puleys in system 2 in figure C\n",
+ "VR=2**N1-1+2**N2-1 #Velocity Ratio\n",
+ "Efficiency=0.70\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 2.3\n",
+ "Effort is 745.341614907 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle\n",
+ "tcw=6.0 #thickness of the cord on the wheel\n",
+ "tca=20.0 #thickness of the cord on the axle\n",
+ "W=1200 #effort\n",
+ "ED=D+tcw #Effective diameter of the wheel\n",
+ "Ed=d+tca #Effectivediameter of axle\n",
+ "VR=ED/Ed #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.7\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 32.0\n",
+ "Effort is 1136.36363636 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=800.0 #diameter of the wheel\n",
+ "d1=250.0 #diameter of axle 1\n",
+ "d2=300.0 #diameter of axle 2\n",
+ "\n",
+ "W=20000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(d2-d1) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.55\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 3.33333333333\n",
+ "Effort is 2500.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle \n",
+ "\n",
+ "W=5000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(D-d) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.6\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1741.88034188 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=40.0 #Screw diameter\n",
+ "l=20.0 #Screw lwngth\n",
+ "p=l/3.0 #Lead of the screw\n",
+ "W=40000.0 #effort\n",
+ "R = 400 #Lever length\n",
+ "u = 0.12 #coefficient of friction between screw and nut\n",
+ "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 57.0287539936 N\n",
+ "Efficiency 55.8439936484 %\n",
+ "reversible machine\n",
+ "The torque required to keep the load from descending 2047.61904762 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=50.0 #mean diameter of screw\n",
+ "p=10.0 #pitch of screw\n",
+ "u=0.05 #coefficient of friction at the screw thread\n",
+ "R=300.0 ##Lever length\n",
+ "W=6000.0 #Load\n",
+ "o1=math.atan(p/(3.14*d))\n",
+ "o2=math.atan(0.05)\n",
+ "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "VR=2*3.14*R/p #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "print var\n",
+ "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n",
+ "print \"The torque required to keep the load from descending\",T,\"Nm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 12.9110001721 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1=5.0 #Pitch of smaller screw\n",
+ "p2=10.0 #Pitch of larger screw\n",
+ "R=500.0 #Lever arm length from centre of screw\n",
+ "W=15000.0 #Load\n",
+ "P=185.0 #Effort\n",
+ "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 120.0\n",
+ "Law of machine is P= 0.01 W + 70.0\n",
+ "Efficiency for first case 25.0 %\n",
+ "Efficiency for second case 46.875 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=200.0 #Diameter of the load drum \n",
+ "R = 1200.0 # Length of lever arm \n",
+ "T1 = 10.0 #Number of teeth on pinion, \n",
+ "T2 = 100.0 #Number of teeth on spur wheel\n",
+ "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "W1 = 3000.0 #Load 1\n",
+ "P1= 100.0 #Effort1\n",
+ "\n",
+ "W2 = 9000.0 #Load 2\n",
+ "P2= 160.0 #Effort2\n",
+ "\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for first case\",Efficiency,\"%\"\n",
+ "MA=W2/P2 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for second case\",Efficiency,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 32.0\n",
+ "LOad 3200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=150.0 #Diameter of the load drum \n",
+ "R = 400.0 # Length of lever arm \n",
+ "T1 = 15.0 #Number of teeth on pinion, \n",
+ "T3 = 20.0 #Number of teeth on pinion, \n",
+ "T2 = 45.0 #Number of teeth on spur wheel\n",
+ "T4 = 40.0 #Number of teeth on spur wheel\n",
+ "P= 250.0 #Effort\n",
+ "Efficiency=0.4\n",
+ "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "\n",
+ "W=VR*Efficiency*P #Load \n",
+ "\n",
+ "print \"LOad\",W,\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_gyVuqN8.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_gyVuqN8.ipynb
new file mode 100644
index 00000000..55339520
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_gyVuqN8.ipynb
@@ -0,0 +1,1593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6-SIMPLE MACHINES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 20.0\n",
+ "Velocity Ratio 25.0\n",
+ "Efficiency 0.8\n",
+ "Ideal Load 12500.0\n",
+ "Ideal Effort 400.0\n",
+ "Effort lost in friction 100.0\n",
+ "frictional resistance 2500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 10000.0 #Load\n",
+ "P = 500.0 #Effort\n",
+ "D = 20.0 #Distance moved by the effort \n",
+ "d = 0.8 #Distance moved by the load \n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=D/d #Velocity Ratio\n",
+ "Efficiency=MA/VR\n",
+ "Pi =W/VR #Ideal effort\n",
+ "Wi = P*VR #ideal load\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print \"Ideal Load\",Wi\n",
+ "print \"Ideal Effort\",Pi\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.05 W + 30.0\n",
+ "Load is 3400.0 N\n",
+ "Mechanical advantage-- 17.0\n",
+ "Ideal effort is 113.333333333 N\n",
+ "Effort lost in friction 86.6666666667\n",
+ "Efficiency 56.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 2400.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "\n",
+ "W2 = 3000.0 #Load 2\n",
+ "P2= 180.0 #Effort2\n",
+ "P3= 200.0 #Effort3\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "W3=(P3-C)/m #Load 2\n",
+ "print \"Load is \",W3,\"N\"\n",
+ "MA=W3/P3 #Mechanical advantage\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100\n",
+ "Pi =W3/VR #Ideal effort\n",
+ "print \"Ideal effort is\",Pi,\"N\"\n",
+ "\n",
+ "efl=P3-Pi #Effort lost in friction\n",
+ "\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"Efficiency\",Efficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 51.3333333333\n",
+ "Velocity Ratio 85.5555555556\n",
+ "Efficiency 61.7142857143\n",
+ "Maximum Mechanical advantage-- 55.0\n",
+ "Maximum Efficiency 64.2857142857\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 7700.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=0.6\n",
+ "VR=MA/Efficiency #Velocity Ratio\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "W2 = 13200.0 #Load 2\n",
+ "P2= 250.0 #Effort2\n",
+ "MA=W2/P2\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "\n",
+ "\n",
+ "MMA=1/m #Maximum Mechanical advantage\n",
+ "print \"Maximum Mechanical advantage--\",MMA\n",
+ "\n",
+ "MaxEfficiency=MMA/VR*100\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.06 W + 10.5\n"
+ ]
+ },
+ {
+ "data": {
+ "application/javascript": [
+ "/* Put everything inside the global mpl namespace */\n",
+ "window.mpl = {};\n",
+ "\n",
+ "mpl.get_websocket_type = function() {\n",
+ " if (typeof(WebSocket) !== 'undefined') {\n",
+ " return WebSocket;\n",
+ " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
+ " return MozWebSocket;\n",
+ " } else {\n",
+ " alert('Your browser does not have WebSocket support.' +\n",
+ " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
+ " 'Firefox 4 and 5 are also supported but you ' +\n",
+ " 'have to enable WebSockets in about:config.');\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
+ " this.id = figure_id;\n",
+ "\n",
+ " this.ws = websocket;\n",
+ "\n",
+ " this.supports_binary = (this.ws.binaryType != undefined);\n",
+ "\n",
+ " if (!this.supports_binary) {\n",
+ " var warnings = document.getElementById(\"mpl-warnings\");\n",
+ " if (warnings) {\n",
+ " warnings.style.display = 'block';\n",
+ " warnings.textContent = (\n",
+ " \"This browser does not support binary websocket messages. \" +\n",
+ " \"Performance may be slow.\");\n",
+ " }\n",
+ " }\n",
+ "\n",
+ " this.imageObj = new Image();\n",
+ "\n",
+ " this.context = undefined;\n",
+ " this.message = undefined;\n",
+ " this.canvas = undefined;\n",
+ " this.rubberband_canvas = undefined;\n",
+ " this.rubberband_context = undefined;\n",
+ " this.format_dropdown = undefined;\n",
+ "\n",
+ " this.image_mode = 'full';\n",
+ "\n",
+ " this.root = $('<div/>');\n",
+ " this._root_extra_style(this.root)\n",
+ " this.root.attr('style', 'display: inline-block');\n",
+ "\n",
+ " $(parent_element).append(this.root);\n",
+ "\n",
+ " this._init_header(this);\n",
+ " this._init_canvas(this);\n",
+ " this._init_toolbar(this);\n",
+ "\n",
+ " var fig = this;\n",
+ "\n",
+ " this.waiting = false;\n",
+ "\n",
+ " this.ws.onopen = function () {\n",
+ " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
+ " fig.send_message(\"send_image_mode\", {});\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " }\n",
+ "\n",
+ " this.imageObj.onload = function() {\n",
+ " if (fig.image_mode == 'full') {\n",
+ " // Full images could contain transparency (where diff images\n",
+ " // almost always do), so we need to clear the canvas so that\n",
+ " // there is no ghosting.\n",
+ " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
+ " }\n",
+ " fig.context.drawImage(fig.imageObj, 0, 0);\n",
+ " };\n",
+ "\n",
+ " this.imageObj.onunload = function() {\n",
+ " this.ws.close();\n",
+ " }\n",
+ "\n",
+ " this.ws.onmessage = this._make_on_message_function(this);\n",
+ "\n",
+ " this.ondownload = ondownload;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_header = function() {\n",
+ " var titlebar = $(\n",
+ " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
+ " 'ui-helper-clearfix\"/>');\n",
+ " var titletext = $(\n",
+ " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
+ " 'text-align: center; padding: 3px;\"/>');\n",
+ " titlebar.append(titletext)\n",
+ " this.root.append(titlebar);\n",
+ " this.header = titletext[0];\n",
+ "}\n",
+ "\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_canvas = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var canvas_div = $('<div/>');\n",
+ "\n",
+ " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
+ "\n",
+ " function canvas_keyboard_event(event) {\n",
+ " return fig.key_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
+ " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
+ " this.canvas_div = canvas_div\n",
+ " this._canvas_extra_style(canvas_div)\n",
+ " this.root.append(canvas_div);\n",
+ "\n",
+ " var canvas = $('<canvas/>');\n",
+ " canvas.addClass('mpl-canvas');\n",
+ " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
+ "\n",
+ " this.canvas = canvas[0];\n",
+ " this.context = canvas[0].getContext(\"2d\");\n",
+ "\n",
+ " var rubberband = $('<canvas/>');\n",
+ " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
+ "\n",
+ " var pass_mouse_events = true;\n",
+ "\n",
+ " canvas_div.resizable({\n",
+ " start: function(event, ui) {\n",
+ " pass_mouse_events = false;\n",
+ " },\n",
+ " resize: function(event, ui) {\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " stop: function(event, ui) {\n",
+ " pass_mouse_events = true;\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " });\n",
+ "\n",
+ " function mouse_event_fn(event) {\n",
+ " if (pass_mouse_events)\n",
+ " return fig.mouse_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " rubberband.mousedown('button_press', mouse_event_fn);\n",
+ " rubberband.mouseup('button_release', mouse_event_fn);\n",
+ " // Throttle sequential mouse events to 1 every 20ms.\n",
+ " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
+ "\n",
+ " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
+ " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
+ "\n",
+ " canvas_div.on(\"wheel\", function (event) {\n",
+ " event = event.originalEvent;\n",
+ " event['data'] = 'scroll'\n",
+ " if (event.deltaY < 0) {\n",
+ " event.step = 1;\n",
+ " } else {\n",
+ " event.step = -1;\n",
+ " }\n",
+ " mouse_event_fn(event);\n",
+ " });\n",
+ "\n",
+ " canvas_div.append(canvas);\n",
+ " canvas_div.append(rubberband);\n",
+ "\n",
+ " this.rubberband = rubberband;\n",
+ " this.rubberband_canvas = rubberband[0];\n",
+ " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
+ " this.rubberband_context.strokeStyle = \"#000000\";\n",
+ "\n",
+ " this._resize_canvas = function(width, height) {\n",
+ " // Keep the size of the canvas, canvas container, and rubber band\n",
+ " // canvas in synch.\n",
+ " canvas_div.css('width', width)\n",
+ " canvas_div.css('height', height)\n",
+ "\n",
+ " canvas.attr('width', width);\n",
+ " canvas.attr('height', height);\n",
+ "\n",
+ " rubberband.attr('width', width);\n",
+ " rubberband.attr('height', height);\n",
+ " }\n",
+ "\n",
+ " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
+ " // upon first draw.\n",
+ " this._resize_canvas(600, 600);\n",
+ "\n",
+ " // Disable right mouse context menu.\n",
+ " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
+ " return false;\n",
+ " });\n",
+ "\n",
+ " function set_focus () {\n",
+ " canvas.focus();\n",
+ " canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " window.setTimeout(set_focus, 100);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items) {\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) {\n",
+ " // put a spacer in here.\n",
+ " continue;\n",
+ " }\n",
+ " var button = $('<button/>');\n",
+ " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
+ " 'ui-button-icon-only');\n",
+ " button.attr('role', 'button');\n",
+ " button.attr('aria-disabled', 'false');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ "\n",
+ " var icon_img = $('<span/>');\n",
+ " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
+ " icon_img.addClass(image);\n",
+ " icon_img.addClass('ui-corner-all');\n",
+ "\n",
+ " var tooltip_span = $('<span/>');\n",
+ " tooltip_span.addClass('ui-button-text');\n",
+ " tooltip_span.html(tooltip);\n",
+ "\n",
+ " button.append(icon_img);\n",
+ " button.append(tooltip_span);\n",
+ "\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " var fmt_picker_span = $('<span/>');\n",
+ "\n",
+ " var fmt_picker = $('<select/>');\n",
+ " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
+ " fmt_picker_span.append(fmt_picker);\n",
+ " nav_element.append(fmt_picker_span);\n",
+ " this.format_dropdown = fmt_picker[0];\n",
+ "\n",
+ " for (var ind in mpl.extensions) {\n",
+ " var fmt = mpl.extensions[ind];\n",
+ " var option = $(\n",
+ " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
+ " fmt_picker.append(option)\n",
+ " }\n",
+ "\n",
+ " // Add hover states to the ui-buttons\n",
+ " $( \".ui-button\" ).hover(\n",
+ " function() { $(this).addClass(\"ui-state-hover\");},\n",
+ " function() { $(this).removeClass(\"ui-state-hover\");}\n",
+ " );\n",
+ "\n",
+ " var status_bar = $('<span class=\"mpl-message\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
+ " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
+ " // which will in turn request a refresh of the image.\n",
+ " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_message = function(type, properties) {\n",
+ " properties['type'] = type;\n",
+ " properties['figure_id'] = this.id;\n",
+ " this.ws.send(JSON.stringify(properties));\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_draw_message = function() {\n",
+ " if (!this.waiting) {\n",
+ " this.waiting = true;\n",
+ " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " var format_dropdown = fig.format_dropdown;\n",
+ " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
+ " fig.ondownload(fig, format);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
+ " var size = msg['size'];\n",
+ " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
+ " fig._resize_canvas(size[0], size[1]);\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
+ " var x0 = msg['x0'];\n",
+ " var y0 = fig.canvas.height - msg['y0'];\n",
+ " var x1 = msg['x1'];\n",
+ " var y1 = fig.canvas.height - msg['y1'];\n",
+ " x0 = Math.floor(x0) + 0.5;\n",
+ " y0 = Math.floor(y0) + 0.5;\n",
+ " x1 = Math.floor(x1) + 0.5;\n",
+ " y1 = Math.floor(y1) + 0.5;\n",
+ " var min_x = Math.min(x0, x1);\n",
+ " var min_y = Math.min(y0, y1);\n",
+ " var width = Math.abs(x1 - x0);\n",
+ " var height = Math.abs(y1 - y0);\n",
+ "\n",
+ " fig.rubberband_context.clearRect(\n",
+ " 0, 0, fig.canvas.width, fig.canvas.height);\n",
+ "\n",
+ " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
+ " // Updates the figure title.\n",
+ " fig.header.textContent = msg['label'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
+ " var cursor = msg['cursor'];\n",
+ " switch(cursor)\n",
+ " {\n",
+ " case 0:\n",
+ " cursor = 'pointer';\n",
+ " break;\n",
+ " case 1:\n",
+ " cursor = 'default';\n",
+ " break;\n",
+ " case 2:\n",
+ " cursor = 'crosshair';\n",
+ " break;\n",
+ " case 3:\n",
+ " cursor = 'move';\n",
+ " break;\n",
+ " }\n",
+ " fig.rubberband_canvas.style.cursor = cursor;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
+ " fig.message.textContent = msg['message'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
+ " // Request the server to send over a new figure.\n",
+ " fig.send_draw_message();\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
+ " fig.image_mode = msg['mode'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Called whenever the canvas gets updated.\n",
+ " this.send_message(\"ack\", {});\n",
+ "}\n",
+ "\n",
+ "// A function to construct a web socket function for onmessage handling.\n",
+ "// Called in the figure constructor.\n",
+ "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
+ " return function socket_on_message(evt) {\n",
+ " if (evt.data instanceof Blob) {\n",
+ " /* FIXME: We get \"Resource interpreted as Image but\n",
+ " * transferred with MIME type text/plain:\" errors on\n",
+ " * Chrome. But how to set the MIME type? It doesn't seem\n",
+ " * to be part of the websocket stream */\n",
+ " evt.data.type = \"image/png\";\n",
+ "\n",
+ " /* Free the memory for the previous frames */\n",
+ " if (fig.imageObj.src) {\n",
+ " (window.URL || window.webkitURL).revokeObjectURL(\n",
+ " fig.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
+ " evt.data);\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
+ " fig.imageObj.src = evt.data;\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var msg = JSON.parse(evt.data);\n",
+ " var msg_type = msg['type'];\n",
+ "\n",
+ " // Call the \"handle_{type}\" callback, which takes\n",
+ " // the figure and JSON message as its only arguments.\n",
+ " try {\n",
+ " var callback = fig[\"handle_\" + msg_type];\n",
+ " } catch (e) {\n",
+ " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " if (callback) {\n",
+ " try {\n",
+ " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
+ " callback(fig, msg);\n",
+ " } catch (e) {\n",
+ " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
+ " }\n",
+ " }\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "mpl.findpos = function(e) {\n",
+ " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
+ " var targ;\n",
+ " if (!e)\n",
+ " e = window.event;\n",
+ " if (e.target)\n",
+ " targ = e.target;\n",
+ " else if (e.srcElement)\n",
+ " targ = e.srcElement;\n",
+ " if (targ.nodeType == 3) // defeat Safari bug\n",
+ " targ = targ.parentNode;\n",
+ "\n",
+ " // jQuery normalizes the pageX and pageY\n",
+ " // pageX,Y are the mouse positions relative to the document\n",
+ " // offset() returns the position of the element relative to the document\n",
+ " var x = e.pageX - $(targ).offset().left;\n",
+ " var y = e.pageY - $(targ).offset().top;\n",
+ "\n",
+ " return {\"x\": x, \"y\": y};\n",
+ "};\n",
+ "\n",
+ "/*\n",
+ " * return a copy of an object with only non-object keys\n",
+ " * we need this to avoid circular references\n",
+ " * http://stackoverflow.com/a/24161582/3208463\n",
+ " */\n",
+ "function simpleKeys (original) {\n",
+ " return Object.keys(original).reduce(function (obj, key) {\n",
+ " if (typeof original[key] !== 'object')\n",
+ " obj[key] = original[key]\n",
+ " return obj;\n",
+ " }, {});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.mouse_event = function(event, name) {\n",
+ " var canvas_pos = mpl.findpos(event)\n",
+ "\n",
+ " if (name === 'button_press')\n",
+ " {\n",
+ " this.canvas.focus();\n",
+ " this.canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " var x = canvas_pos.x;\n",
+ " var y = canvas_pos.y;\n",
+ "\n",
+ " this.send_message(name, {x: x, y: y, button: event.button,\n",
+ " step: event.step,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ "\n",
+ " /* This prevents the web browser from automatically changing to\n",
+ " * the text insertion cursor when the button is pressed. We want\n",
+ " * to control all of the cursor setting manually through the\n",
+ " * 'cursor' event from matplotlib */\n",
+ " event.preventDefault();\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " // Handle any extra behaviour associated with a key event\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.key_event = function(event, name) {\n",
+ "\n",
+ " // Prevent repeat events\n",
+ " if (name == 'key_press')\n",
+ " {\n",
+ " if (event.which === this._key)\n",
+ " return;\n",
+ " else\n",
+ " this._key = event.which;\n",
+ " }\n",
+ " if (name == 'key_release')\n",
+ " this._key = null;\n",
+ "\n",
+ " var value = '';\n",
+ " if (event.ctrlKey && event.which != 17)\n",
+ " value += \"ctrl+\";\n",
+ " if (event.altKey && event.which != 18)\n",
+ " value += \"alt+\";\n",
+ " if (event.shiftKey && event.which != 16)\n",
+ " value += \"shift+\";\n",
+ "\n",
+ " value += 'k';\n",
+ " value += event.which.toString();\n",
+ "\n",
+ " this._key_event_extra(event, name);\n",
+ "\n",
+ " this.send_message(name, {key: value,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
+ " if (name == 'download') {\n",
+ " this.handle_save(this, null);\n",
+ " } else {\n",
+ " this.send_message(\"toolbar_button\", {name: name});\n",
+ " }\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
+ " this.message.textContent = tooltip;\n",
+ "};\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "\n",
+ "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
+ "\n",
+ "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
+ " // Create a \"websocket\"-like object which calls the given IPython comm\n",
+ " // object with the appropriate methods. Currently this is a non binary\n",
+ " // socket, so there is still some room for performance tuning.\n",
+ " var ws = {};\n",
+ "\n",
+ " ws.close = function() {\n",
+ " comm.close()\n",
+ " };\n",
+ " ws.send = function(m) {\n",
+ " //console.log('sending', m);\n",
+ " comm.send(m);\n",
+ " };\n",
+ " // Register the callback with on_msg.\n",
+ " comm.on_msg(function(msg) {\n",
+ " //console.log('receiving', msg['content']['data'], msg);\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
+ " ws.onmessage(msg['content']['data'])\n",
+ " });\n",
+ " return ws;\n",
+ "}\n",
+ "\n",
+ "mpl.mpl_figure_comm = function(comm, msg) {\n",
+ " // This is the function which gets called when the mpl process\n",
+ " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
+ "\n",
+ " var id = msg.content.data.id;\n",
+ " // Get hold of the div created by the display call when the Comm\n",
+ " // socket was opened in Python.\n",
+ " var element = $(\"#\" + id);\n",
+ " var ws_proxy = comm_websocket_adapter(comm)\n",
+ "\n",
+ " function ondownload(figure, format) {\n",
+ " window.open(figure.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " var fig = new mpl.figure(id, ws_proxy,\n",
+ " ondownload,\n",
+ " element.get(0));\n",
+ "\n",
+ " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
+ " // web socket which is closed, not our websocket->open comm proxy.\n",
+ " ws_proxy.onopen();\n",
+ "\n",
+ " fig.parent_element = element.get(0);\n",
+ " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
+ " if (!fig.cell_info) {\n",
+ " console.error(\"Failed to find cell for figure\", id, fig);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var output_index = fig.cell_info[2]\n",
+ " var cell = fig.cell_info[0];\n",
+ "\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " fig.root.unbind('remove')\n",
+ "\n",
+ " // Update the output cell to use the data from the current canvas.\n",
+ " fig.push_to_output();\n",
+ " var dataURL = fig.canvas.toDataURL();\n",
+ " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
+ " // the notebook keyboard shortcuts fail.\n",
+ " IPython.keyboard_manager.enable()\n",
+ " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n",
+ " fig.close_ws(fig, msg);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.close_ws = function(fig, msg){\n",
+ " fig.send_message('closing', msg);\n",
+ " // fig.ws.close()\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
+ " // Turn the data on the canvas into data in the output cell.\n",
+ " var dataURL = this.canvas.toDataURL();\n",
+ " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Tell IPython that the notebook contents must change.\n",
+ " IPython.notebook.set_dirty(true);\n",
+ " this.send_message(\"ack\", {});\n",
+ " var fig = this;\n",
+ " // Wait a second, then push the new image to the DOM so\n",
+ " // that it is saved nicely (might be nice to debounce this).\n",
+ " setTimeout(function () { fig.push_to_output() }, 1000);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items){\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) { continue; };\n",
+ "\n",
+ " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " // Add the status bar.\n",
+ " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "\n",
+ " // Add the close button to the window.\n",
+ " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
+ " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
+ " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
+ " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
+ " buttongrp.append(button);\n",
+ " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
+ " titlebar.prepend(buttongrp);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(el){\n",
+ " var fig = this\n",
+ " el.on(\"remove\", function(){\n",
+ "\tfig.close_ws(fig, {});\n",
+ " });\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(el){\n",
+ " // this is important to make the div 'focusable\n",
+ " el.attr('tabindex', 0)\n",
+ " // reach out to IPython and tell the keyboard manager to turn it's self\n",
+ " // off when our div gets focus\n",
+ "\n",
+ " // location in version 3\n",
+ " if (IPython.notebook.keyboard_manager) {\n",
+ " IPython.notebook.keyboard_manager.register_events(el);\n",
+ " }\n",
+ " else {\n",
+ " // location in version 2\n",
+ " IPython.keyboard_manager.register_events(el);\n",
+ " }\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " var manager = IPython.notebook.keyboard_manager;\n",
+ " if (!manager)\n",
+ " manager = IPython.keyboard_manager;\n",
+ "\n",
+ " // Check for shift+enter\n",
+ " if (event.shiftKey && event.which == 13) {\n",
+ " this.canvas_div.blur();\n",
+ " event.shiftKey = false;\n",
+ " // Send a \"J\" for go to next cell\n",
+ " event.which = 74;\n",
+ " event.keyCode = 74;\n",
+ " manager.command_mode();\n",
+ " manager.handle_keydown(event);\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " fig.ondownload(fig, null);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.find_output_cell = function(html_output) {\n",
+ " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
+ " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
+ " // IPython event is triggered only after the cells have been serialised, which for\n",
+ " // our purposes (turning an active figure into a static one), is too late.\n",
+ " var cells = IPython.notebook.get_cells();\n",
+ " var ncells = cells.length;\n",
+ " for (var i=0; i<ncells; i++) {\n",
+ " var cell = cells[i];\n",
+ " if (cell.cell_type === 'code'){\n",
+ " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
+ " var data = cell.output_area.outputs[j];\n",
+ " if (data.data) {\n",
+ " // IPython >= 3 moved mimebundle to data attribute of output\n",
+ " data = data.data;\n",
+ " }\n",
+ " if (data['text/html'] == html_output) {\n",
+ " return [cell, data, j];\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Register the function which deals with the matplotlib target/channel.\n",
+ "// The kernel may be null if the page has been refreshed.\n",
+ "if (IPython.notebook.kernel != null) {\n",
+ " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "<IPython.core.display.Javascript object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkR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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Efficiency 66.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib notebook\n",
+ "import matplotlib\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt2\n",
+ "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n",
+ "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n",
+ "VR=25.0 #velocity ratio\n",
+ "E=[0,0,0,0,0,0] #Efficiency\n",
+ "#calculating average slope\n",
+ "m=(P[4]-P[1])/(W[4]-W[1])\n",
+ "C=P[4]-m*W[4]\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "for i in range(0,6):\n",
+ " \n",
+ " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n",
+ " \n",
+ "plt2.plot(W,E)\n",
+ "plt2.ylabel(\"Efficiency\")\n",
+ "plt2.xlabel(\"Load\")\n",
+ "plt2.show() \n",
+ "\n",
+ " \n",
+ "MaxEfficiency=1/VR*100*1/m\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 13.8888888889\n",
+ "Velocity Ratio 30.0\n",
+ "Efficiency 46.2962962963\n",
+ "self-locking machine\n",
+ "Ideal Load 10800.0\n",
+ "frictional resistance 5800.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "W = 5000.0 #Load\n",
+ "P = 360.0 #Effort\n",
+ "\n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100.0\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "Wi = P*VR #ideal load\n",
+ "\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print var\n",
+ "print \"Ideal Load\",Wi\n",
+ "\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 937.5 N\n",
+ "number of pulley is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 6000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.8\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "#second case\n",
+ "P=520.0\n",
+ "n=0,\n",
+ "for i in range(3,20):\n",
+ " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n",
+ " n=i\n",
+ " break\n",
+ " \n",
+ " \n",
+ "print \"number of pulley is \",n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exmple 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 2352.94117647 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N=3.0 #number of movable pulleys\n",
+ "VR=2*N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.85\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1923.07692308 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1\n",
+ "N2=2.0 #number of movable puleys in system 2\n",
+ "VR=2*N1+2*N2 #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.78\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 79.3650793651\n",
+ "Effort lost in friction 37.1428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 1000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N-1 #Velocity Ratio\n",
+ "P = 180.0 #Effort\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "Pi =W/VR #Ideal effort\n",
+ "\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "print \"Effort lost in friction\",efl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 595.238095238 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 2500.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1 in figure B\n",
+ "N2=2.0 #number of movable puleys in system 2 in figure C\n",
+ "VR=2**N1-1+2**N2-1 #Velocity Ratio\n",
+ "Efficiency=0.70\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 2.3\n",
+ "Effort is 745.341614907 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle\n",
+ "tcw=6.0 #thickness of the cord on the wheel\n",
+ "tca=20.0 #thickness of the cord on the axle\n",
+ "W=1200 #effort\n",
+ "ED=D+tcw #Effective diameter of the wheel\n",
+ "Ed=d+tca #Effectivediameter of axle\n",
+ "VR=ED/Ed #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.7\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 32.0\n",
+ "Effort is 1136.36363636 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=800.0 #diameter of the wheel\n",
+ "d1=250.0 #diameter of axle 1\n",
+ "d2=300.0 #diameter of axle 2\n",
+ "\n",
+ "W=20000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(d2-d1) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.55\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 3.33333333333\n",
+ "Effort is 2500.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle \n",
+ "\n",
+ "W=5000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(D-d) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.6\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1741.88034188 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=40.0 #Screw diameter\n",
+ "l=20.0 #Screw lwngth\n",
+ "p=l/3.0 #Lead of the screw\n",
+ "W=40000.0 #effort\n",
+ "R = 400 #Lever length\n",
+ "u = 0.12 #coefficient of friction between screw and nut\n",
+ "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 57.0287539936 N\n",
+ "Efficiency 55.8439936484 %\n",
+ "reversible machine\n",
+ "The torque required to keep the load from descending 2047.61904762 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=50.0 #mean diameter of screw\n",
+ "p=10.0 #pitch of screw\n",
+ "u=0.05 #coefficient of friction at the screw thread\n",
+ "R=300.0 ##Lever length\n",
+ "W=6000.0 #Load\n",
+ "o1=math.atan(p/(3.14*d))\n",
+ "o2=math.atan(0.05)\n",
+ "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "VR=2*3.14*R/p #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "print var\n",
+ "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n",
+ "print \"The torque required to keep the load from descending\",T,\"Nm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 12.9110001721 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1=5.0 #Pitch of smaller screw\n",
+ "p2=10.0 #Pitch of larger screw\n",
+ "R=500.0 #Lever arm length from centre of screw\n",
+ "W=15000.0 #Load\n",
+ "P=185.0 #Effort\n",
+ "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 120.0\n",
+ "Law of machine is P= 0.01 W + 70.0\n",
+ "Efficiency for first case 25.0 %\n",
+ "Efficiency for second case 46.875 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=200.0 #Diameter of the load drum \n",
+ "R = 1200.0 # Length of lever arm \n",
+ "T1 = 10.0 #Number of teeth on pinion, \n",
+ "T2 = 100.0 #Number of teeth on spur wheel\n",
+ "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "W1 = 3000.0 #Load 1\n",
+ "P1= 100.0 #Effort1\n",
+ "\n",
+ "W2 = 9000.0 #Load 2\n",
+ "P2= 160.0 #Effort2\n",
+ "\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for first case\",Efficiency,\"%\"\n",
+ "MA=W2/P2 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for second case\",Efficiency,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 32.0\n",
+ "LOad 3200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=150.0 #Diameter of the load drum \n",
+ "R = 400.0 # Length of lever arm \n",
+ "T1 = 15.0 #Number of teeth on pinion, \n",
+ "T3 = 20.0 #Number of teeth on pinion, \n",
+ "T2 = 45.0 #Number of teeth on spur wheel\n",
+ "T4 = 40.0 #Number of teeth on spur wheel\n",
+ "P= 250.0 #Effort\n",
+ "Efficiency=0.4\n",
+ "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "\n",
+ "W=VR*Efficiency*P #Load \n",
+ "\n",
+ "print \"LOad\",W,\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_jOUBDFo.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_jOUBDFo.ipynb
new file mode 100644
index 00000000..55339520
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_jOUBDFo.ipynb
@@ -0,0 +1,1593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6-SIMPLE MACHINES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 20.0\n",
+ "Velocity Ratio 25.0\n",
+ "Efficiency 0.8\n",
+ "Ideal Load 12500.0\n",
+ "Ideal Effort 400.0\n",
+ "Effort lost in friction 100.0\n",
+ "frictional resistance 2500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 10000.0 #Load\n",
+ "P = 500.0 #Effort\n",
+ "D = 20.0 #Distance moved by the effort \n",
+ "d = 0.8 #Distance moved by the load \n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=D/d #Velocity Ratio\n",
+ "Efficiency=MA/VR\n",
+ "Pi =W/VR #Ideal effort\n",
+ "Wi = P*VR #ideal load\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print \"Ideal Load\",Wi\n",
+ "print \"Ideal Effort\",Pi\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.05 W + 30.0\n",
+ "Load is 3400.0 N\n",
+ "Mechanical advantage-- 17.0\n",
+ "Ideal effort is 113.333333333 N\n",
+ "Effort lost in friction 86.6666666667\n",
+ "Efficiency 56.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 2400.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "\n",
+ "W2 = 3000.0 #Load 2\n",
+ "P2= 180.0 #Effort2\n",
+ "P3= 200.0 #Effort3\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "W3=(P3-C)/m #Load 2\n",
+ "print \"Load is \",W3,\"N\"\n",
+ "MA=W3/P3 #Mechanical advantage\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100\n",
+ "Pi =W3/VR #Ideal effort\n",
+ "print \"Ideal effort is\",Pi,\"N\"\n",
+ "\n",
+ "efl=P3-Pi #Effort lost in friction\n",
+ "\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"Efficiency\",Efficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 51.3333333333\n",
+ "Velocity Ratio 85.5555555556\n",
+ "Efficiency 61.7142857143\n",
+ "Maximum Mechanical advantage-- 55.0\n",
+ "Maximum Efficiency 64.2857142857\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 7700.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=0.6\n",
+ "VR=MA/Efficiency #Velocity Ratio\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "W2 = 13200.0 #Load 2\n",
+ "P2= 250.0 #Effort2\n",
+ "MA=W2/P2\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "\n",
+ "\n",
+ "MMA=1/m #Maximum Mechanical advantage\n",
+ "print \"Maximum Mechanical advantage--\",MMA\n",
+ "\n",
+ "MaxEfficiency=MMA/VR*100\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.06 W + 10.5\n"
+ ]
+ },
+ {
+ "data": {
+ "application/javascript": [
+ "/* Put everything inside the global mpl namespace */\n",
+ "window.mpl = {};\n",
+ "\n",
+ "mpl.get_websocket_type = function() {\n",
+ " if (typeof(WebSocket) !== 'undefined') {\n",
+ " return WebSocket;\n",
+ " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
+ " return MozWebSocket;\n",
+ " } else {\n",
+ " alert('Your browser does not have WebSocket support.' +\n",
+ " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
+ " 'Firefox 4 and 5 are also supported but you ' +\n",
+ " 'have to enable WebSockets in about:config.');\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
+ " this.id = figure_id;\n",
+ "\n",
+ " this.ws = websocket;\n",
+ "\n",
+ " this.supports_binary = (this.ws.binaryType != undefined);\n",
+ "\n",
+ " if (!this.supports_binary) {\n",
+ " var warnings = document.getElementById(\"mpl-warnings\");\n",
+ " if (warnings) {\n",
+ " warnings.style.display = 'block';\n",
+ " warnings.textContent = (\n",
+ " \"This browser does not support binary websocket messages. \" +\n",
+ " \"Performance may be slow.\");\n",
+ " }\n",
+ " }\n",
+ "\n",
+ " this.imageObj = new Image();\n",
+ "\n",
+ " this.context = undefined;\n",
+ " this.message = undefined;\n",
+ " this.canvas = undefined;\n",
+ " this.rubberband_canvas = undefined;\n",
+ " this.rubberband_context = undefined;\n",
+ " this.format_dropdown = undefined;\n",
+ "\n",
+ " this.image_mode = 'full';\n",
+ "\n",
+ " this.root = $('<div/>');\n",
+ " this._root_extra_style(this.root)\n",
+ " this.root.attr('style', 'display: inline-block');\n",
+ "\n",
+ " $(parent_element).append(this.root);\n",
+ "\n",
+ " this._init_header(this);\n",
+ " this._init_canvas(this);\n",
+ " this._init_toolbar(this);\n",
+ "\n",
+ " var fig = this;\n",
+ "\n",
+ " this.waiting = false;\n",
+ "\n",
+ " this.ws.onopen = function () {\n",
+ " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
+ " fig.send_message(\"send_image_mode\", {});\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " }\n",
+ "\n",
+ " this.imageObj.onload = function() {\n",
+ " if (fig.image_mode == 'full') {\n",
+ " // Full images could contain transparency (where diff images\n",
+ " // almost always do), so we need to clear the canvas so that\n",
+ " // there is no ghosting.\n",
+ " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
+ " }\n",
+ " fig.context.drawImage(fig.imageObj, 0, 0);\n",
+ " };\n",
+ "\n",
+ " this.imageObj.onunload = function() {\n",
+ " this.ws.close();\n",
+ " }\n",
+ "\n",
+ " this.ws.onmessage = this._make_on_message_function(this);\n",
+ "\n",
+ " this.ondownload = ondownload;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_header = function() {\n",
+ " var titlebar = $(\n",
+ " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
+ " 'ui-helper-clearfix\"/>');\n",
+ " var titletext = $(\n",
+ " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
+ " 'text-align: center; padding: 3px;\"/>');\n",
+ " titlebar.append(titletext)\n",
+ " this.root.append(titlebar);\n",
+ " this.header = titletext[0];\n",
+ "}\n",
+ "\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_canvas = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var canvas_div = $('<div/>');\n",
+ "\n",
+ " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
+ "\n",
+ " function canvas_keyboard_event(event) {\n",
+ " return fig.key_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
+ " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
+ " this.canvas_div = canvas_div\n",
+ " this._canvas_extra_style(canvas_div)\n",
+ " this.root.append(canvas_div);\n",
+ "\n",
+ " var canvas = $('<canvas/>');\n",
+ " canvas.addClass('mpl-canvas');\n",
+ " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
+ "\n",
+ " this.canvas = canvas[0];\n",
+ " this.context = canvas[0].getContext(\"2d\");\n",
+ "\n",
+ " var rubberband = $('<canvas/>');\n",
+ " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
+ "\n",
+ " var pass_mouse_events = true;\n",
+ "\n",
+ " canvas_div.resizable({\n",
+ " start: function(event, ui) {\n",
+ " pass_mouse_events = false;\n",
+ " },\n",
+ " resize: function(event, ui) {\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " stop: function(event, ui) {\n",
+ " pass_mouse_events = true;\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " });\n",
+ "\n",
+ " function mouse_event_fn(event) {\n",
+ " if (pass_mouse_events)\n",
+ " return fig.mouse_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " rubberband.mousedown('button_press', mouse_event_fn);\n",
+ " rubberband.mouseup('button_release', mouse_event_fn);\n",
+ " // Throttle sequential mouse events to 1 every 20ms.\n",
+ " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
+ "\n",
+ " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
+ " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
+ "\n",
+ " canvas_div.on(\"wheel\", function (event) {\n",
+ " event = event.originalEvent;\n",
+ " event['data'] = 'scroll'\n",
+ " if (event.deltaY < 0) {\n",
+ " event.step = 1;\n",
+ " } else {\n",
+ " event.step = -1;\n",
+ " }\n",
+ " mouse_event_fn(event);\n",
+ " });\n",
+ "\n",
+ " canvas_div.append(canvas);\n",
+ " canvas_div.append(rubberband);\n",
+ "\n",
+ " this.rubberband = rubberband;\n",
+ " this.rubberband_canvas = rubberband[0];\n",
+ " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
+ " this.rubberband_context.strokeStyle = \"#000000\";\n",
+ "\n",
+ " this._resize_canvas = function(width, height) {\n",
+ " // Keep the size of the canvas, canvas container, and rubber band\n",
+ " // canvas in synch.\n",
+ " canvas_div.css('width', width)\n",
+ " canvas_div.css('height', height)\n",
+ "\n",
+ " canvas.attr('width', width);\n",
+ " canvas.attr('height', height);\n",
+ "\n",
+ " rubberband.attr('width', width);\n",
+ " rubberband.attr('height', height);\n",
+ " }\n",
+ "\n",
+ " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
+ " // upon first draw.\n",
+ " this._resize_canvas(600, 600);\n",
+ "\n",
+ " // Disable right mouse context menu.\n",
+ " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
+ " return false;\n",
+ " });\n",
+ "\n",
+ " function set_focus () {\n",
+ " canvas.focus();\n",
+ " canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " window.setTimeout(set_focus, 100);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items) {\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) {\n",
+ " // put a spacer in here.\n",
+ " continue;\n",
+ " }\n",
+ " var button = $('<button/>');\n",
+ " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
+ " 'ui-button-icon-only');\n",
+ " button.attr('role', 'button');\n",
+ " button.attr('aria-disabled', 'false');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ "\n",
+ " var icon_img = $('<span/>');\n",
+ " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
+ " icon_img.addClass(image);\n",
+ " icon_img.addClass('ui-corner-all');\n",
+ "\n",
+ " var tooltip_span = $('<span/>');\n",
+ " tooltip_span.addClass('ui-button-text');\n",
+ " tooltip_span.html(tooltip);\n",
+ "\n",
+ " button.append(icon_img);\n",
+ " button.append(tooltip_span);\n",
+ "\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " var fmt_picker_span = $('<span/>');\n",
+ "\n",
+ " var fmt_picker = $('<select/>');\n",
+ " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
+ " fmt_picker_span.append(fmt_picker);\n",
+ " nav_element.append(fmt_picker_span);\n",
+ " this.format_dropdown = fmt_picker[0];\n",
+ "\n",
+ " for (var ind in mpl.extensions) {\n",
+ " var fmt = mpl.extensions[ind];\n",
+ " var option = $(\n",
+ " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
+ " fmt_picker.append(option)\n",
+ " }\n",
+ "\n",
+ " // Add hover states to the ui-buttons\n",
+ " $( \".ui-button\" ).hover(\n",
+ " function() { $(this).addClass(\"ui-state-hover\");},\n",
+ " function() { $(this).removeClass(\"ui-state-hover\");}\n",
+ " );\n",
+ "\n",
+ " var status_bar = $('<span class=\"mpl-message\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
+ " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
+ " // which will in turn request a refresh of the image.\n",
+ " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_message = function(type, properties) {\n",
+ " properties['type'] = type;\n",
+ " properties['figure_id'] = this.id;\n",
+ " this.ws.send(JSON.stringify(properties));\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_draw_message = function() {\n",
+ " if (!this.waiting) {\n",
+ " this.waiting = true;\n",
+ " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " var format_dropdown = fig.format_dropdown;\n",
+ " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
+ " fig.ondownload(fig, format);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
+ " var size = msg['size'];\n",
+ " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
+ " fig._resize_canvas(size[0], size[1]);\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
+ " var x0 = msg['x0'];\n",
+ " var y0 = fig.canvas.height - msg['y0'];\n",
+ " var x1 = msg['x1'];\n",
+ " var y1 = fig.canvas.height - msg['y1'];\n",
+ " x0 = Math.floor(x0) + 0.5;\n",
+ " y0 = Math.floor(y0) + 0.5;\n",
+ " x1 = Math.floor(x1) + 0.5;\n",
+ " y1 = Math.floor(y1) + 0.5;\n",
+ " var min_x = Math.min(x0, x1);\n",
+ " var min_y = Math.min(y0, y1);\n",
+ " var width = Math.abs(x1 - x0);\n",
+ " var height = Math.abs(y1 - y0);\n",
+ "\n",
+ " fig.rubberband_context.clearRect(\n",
+ " 0, 0, fig.canvas.width, fig.canvas.height);\n",
+ "\n",
+ " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
+ " // Updates the figure title.\n",
+ " fig.header.textContent = msg['label'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
+ " var cursor = msg['cursor'];\n",
+ " switch(cursor)\n",
+ " {\n",
+ " case 0:\n",
+ " cursor = 'pointer';\n",
+ " break;\n",
+ " case 1:\n",
+ " cursor = 'default';\n",
+ " break;\n",
+ " case 2:\n",
+ " cursor = 'crosshair';\n",
+ " break;\n",
+ " case 3:\n",
+ " cursor = 'move';\n",
+ " break;\n",
+ " }\n",
+ " fig.rubberband_canvas.style.cursor = cursor;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
+ " fig.message.textContent = msg['message'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
+ " // Request the server to send over a new figure.\n",
+ " fig.send_draw_message();\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
+ " fig.image_mode = msg['mode'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Called whenever the canvas gets updated.\n",
+ " this.send_message(\"ack\", {});\n",
+ "}\n",
+ "\n",
+ "// A function to construct a web socket function for onmessage handling.\n",
+ "// Called in the figure constructor.\n",
+ "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
+ " return function socket_on_message(evt) {\n",
+ " if (evt.data instanceof Blob) {\n",
+ " /* FIXME: We get \"Resource interpreted as Image but\n",
+ " * transferred with MIME type text/plain:\" errors on\n",
+ " * Chrome. But how to set the MIME type? It doesn't seem\n",
+ " * to be part of the websocket stream */\n",
+ " evt.data.type = \"image/png\";\n",
+ "\n",
+ " /* Free the memory for the previous frames */\n",
+ " if (fig.imageObj.src) {\n",
+ " (window.URL || window.webkitURL).revokeObjectURL(\n",
+ " fig.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
+ " evt.data);\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
+ " fig.imageObj.src = evt.data;\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var msg = JSON.parse(evt.data);\n",
+ " var msg_type = msg['type'];\n",
+ "\n",
+ " // Call the \"handle_{type}\" callback, which takes\n",
+ " // the figure and JSON message as its only arguments.\n",
+ " try {\n",
+ " var callback = fig[\"handle_\" + msg_type];\n",
+ " } catch (e) {\n",
+ " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " if (callback) {\n",
+ " try {\n",
+ " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
+ " callback(fig, msg);\n",
+ " } catch (e) {\n",
+ " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
+ " }\n",
+ " }\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "mpl.findpos = function(e) {\n",
+ " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
+ " var targ;\n",
+ " if (!e)\n",
+ " e = window.event;\n",
+ " if (e.target)\n",
+ " targ = e.target;\n",
+ " else if (e.srcElement)\n",
+ " targ = e.srcElement;\n",
+ " if (targ.nodeType == 3) // defeat Safari bug\n",
+ " targ = targ.parentNode;\n",
+ "\n",
+ " // jQuery normalizes the pageX and pageY\n",
+ " // pageX,Y are the mouse positions relative to the document\n",
+ " // offset() returns the position of the element relative to the document\n",
+ " var x = e.pageX - $(targ).offset().left;\n",
+ " var y = e.pageY - $(targ).offset().top;\n",
+ "\n",
+ " return {\"x\": x, \"y\": y};\n",
+ "};\n",
+ "\n",
+ "/*\n",
+ " * return a copy of an object with only non-object keys\n",
+ " * we need this to avoid circular references\n",
+ " * http://stackoverflow.com/a/24161582/3208463\n",
+ " */\n",
+ "function simpleKeys (original) {\n",
+ " return Object.keys(original).reduce(function (obj, key) {\n",
+ " if (typeof original[key] !== 'object')\n",
+ " obj[key] = original[key]\n",
+ " return obj;\n",
+ " }, {});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.mouse_event = function(event, name) {\n",
+ " var canvas_pos = mpl.findpos(event)\n",
+ "\n",
+ " if (name === 'button_press')\n",
+ " {\n",
+ " this.canvas.focus();\n",
+ " this.canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " var x = canvas_pos.x;\n",
+ " var y = canvas_pos.y;\n",
+ "\n",
+ " this.send_message(name, {x: x, y: y, button: event.button,\n",
+ " step: event.step,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ "\n",
+ " /* This prevents the web browser from automatically changing to\n",
+ " * the text insertion cursor when the button is pressed. We want\n",
+ " * to control all of the cursor setting manually through the\n",
+ " * 'cursor' event from matplotlib */\n",
+ " event.preventDefault();\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " // Handle any extra behaviour associated with a key event\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.key_event = function(event, name) {\n",
+ "\n",
+ " // Prevent repeat events\n",
+ " if (name == 'key_press')\n",
+ " {\n",
+ " if (event.which === this._key)\n",
+ " return;\n",
+ " else\n",
+ " this._key = event.which;\n",
+ " }\n",
+ " if (name == 'key_release')\n",
+ " this._key = null;\n",
+ "\n",
+ " var value = '';\n",
+ " if (event.ctrlKey && event.which != 17)\n",
+ " value += \"ctrl+\";\n",
+ " if (event.altKey && event.which != 18)\n",
+ " value += \"alt+\";\n",
+ " if (event.shiftKey && event.which != 16)\n",
+ " value += \"shift+\";\n",
+ "\n",
+ " value += 'k';\n",
+ " value += event.which.toString();\n",
+ "\n",
+ " this._key_event_extra(event, name);\n",
+ "\n",
+ " this.send_message(name, {key: value,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
+ " if (name == 'download') {\n",
+ " this.handle_save(this, null);\n",
+ " } else {\n",
+ " this.send_message(\"toolbar_button\", {name: name});\n",
+ " }\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
+ " this.message.textContent = tooltip;\n",
+ "};\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "\n",
+ "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
+ "\n",
+ "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
+ " // Create a \"websocket\"-like object which calls the given IPython comm\n",
+ " // object with the appropriate methods. Currently this is a non binary\n",
+ " // socket, so there is still some room for performance tuning.\n",
+ " var ws = {};\n",
+ "\n",
+ " ws.close = function() {\n",
+ " comm.close()\n",
+ " };\n",
+ " ws.send = function(m) {\n",
+ " //console.log('sending', m);\n",
+ " comm.send(m);\n",
+ " };\n",
+ " // Register the callback with on_msg.\n",
+ " comm.on_msg(function(msg) {\n",
+ " //console.log('receiving', msg['content']['data'], msg);\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
+ " ws.onmessage(msg['content']['data'])\n",
+ " });\n",
+ " return ws;\n",
+ "}\n",
+ "\n",
+ "mpl.mpl_figure_comm = function(comm, msg) {\n",
+ " // This is the function which gets called when the mpl process\n",
+ " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
+ "\n",
+ " var id = msg.content.data.id;\n",
+ " // Get hold of the div created by the display call when the Comm\n",
+ " // socket was opened in Python.\n",
+ " var element = $(\"#\" + id);\n",
+ " var ws_proxy = comm_websocket_adapter(comm)\n",
+ "\n",
+ " function ondownload(figure, format) {\n",
+ " window.open(figure.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " var fig = new mpl.figure(id, ws_proxy,\n",
+ " ondownload,\n",
+ " element.get(0));\n",
+ "\n",
+ " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
+ " // web socket which is closed, not our websocket->open comm proxy.\n",
+ " ws_proxy.onopen();\n",
+ "\n",
+ " fig.parent_element = element.get(0);\n",
+ " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
+ " if (!fig.cell_info) {\n",
+ " console.error(\"Failed to find cell for figure\", id, fig);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var output_index = fig.cell_info[2]\n",
+ " var cell = fig.cell_info[0];\n",
+ "\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " fig.root.unbind('remove')\n",
+ "\n",
+ " // Update the output cell to use the data from the current canvas.\n",
+ " fig.push_to_output();\n",
+ " var dataURL = fig.canvas.toDataURL();\n",
+ " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
+ " // the notebook keyboard shortcuts fail.\n",
+ " IPython.keyboard_manager.enable()\n",
+ " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n",
+ " fig.close_ws(fig, msg);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.close_ws = function(fig, msg){\n",
+ " fig.send_message('closing', msg);\n",
+ " // fig.ws.close()\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
+ " // Turn the data on the canvas into data in the output cell.\n",
+ " var dataURL = this.canvas.toDataURL();\n",
+ " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Tell IPython that the notebook contents must change.\n",
+ " IPython.notebook.set_dirty(true);\n",
+ " this.send_message(\"ack\", {});\n",
+ " var fig = this;\n",
+ " // Wait a second, then push the new image to the DOM so\n",
+ " // that it is saved nicely (might be nice to debounce this).\n",
+ " setTimeout(function () { fig.push_to_output() }, 1000);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items){\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) { continue; };\n",
+ "\n",
+ " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " // Add the status bar.\n",
+ " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "\n",
+ " // Add the close button to the window.\n",
+ " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
+ " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
+ " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
+ " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
+ " buttongrp.append(button);\n",
+ " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
+ " titlebar.prepend(buttongrp);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(el){\n",
+ " var fig = this\n",
+ " el.on(\"remove\", function(){\n",
+ "\tfig.close_ws(fig, {});\n",
+ " });\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(el){\n",
+ " // this is important to make the div 'focusable\n",
+ " el.attr('tabindex', 0)\n",
+ " // reach out to IPython and tell the keyboard manager to turn it's self\n",
+ " // off when our div gets focus\n",
+ "\n",
+ " // location in version 3\n",
+ " if (IPython.notebook.keyboard_manager) {\n",
+ " IPython.notebook.keyboard_manager.register_events(el);\n",
+ " }\n",
+ " else {\n",
+ " // location in version 2\n",
+ " IPython.keyboard_manager.register_events(el);\n",
+ " }\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " var manager = IPython.notebook.keyboard_manager;\n",
+ " if (!manager)\n",
+ " manager = IPython.keyboard_manager;\n",
+ "\n",
+ " // Check for shift+enter\n",
+ " if (event.shiftKey && event.which == 13) {\n",
+ " this.canvas_div.blur();\n",
+ " event.shiftKey = false;\n",
+ " // Send a \"J\" for go to next cell\n",
+ " event.which = 74;\n",
+ " event.keyCode = 74;\n",
+ " manager.command_mode();\n",
+ " manager.handle_keydown(event);\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " fig.ondownload(fig, null);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.find_output_cell = function(html_output) {\n",
+ " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
+ " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
+ " // IPython event is triggered only after the cells have been serialised, which for\n",
+ " // our purposes (turning an active figure into a static one), is too late.\n",
+ " var cells = IPython.notebook.get_cells();\n",
+ " var ncells = cells.length;\n",
+ " for (var i=0; i<ncells; i++) {\n",
+ " var cell = cells[i];\n",
+ " if (cell.cell_type === 'code'){\n",
+ " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
+ " var data = cell.output_area.outputs[j];\n",
+ " if (data.data) {\n",
+ " // IPython >= 3 moved mimebundle to data attribute of output\n",
+ " data = data.data;\n",
+ " }\n",
+ " if (data['text/html'] == html_output) {\n",
+ " return [cell, data, j];\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Register the function which deals with the matplotlib target/channel.\n",
+ "// The kernel may be null if the page has been refreshed.\n",
+ "if (IPython.notebook.kernel != null) {\n",
+ " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "<IPython.core.display.Javascript object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+fB0ubwAHhyeAgAAFJ9fRY9YVo3oEQAAoOiktQDuYfna8onFl3+bWCoaafnG8pqluw8AAAAUizTOdO1s8XP7ZlgaWa6z7GvZzeLn/vny74uWJZbDLF4QL7UMtVTmX7/GFv/3AQCA5KhvmWkpz7xKGZY6pTqWuZajLM/4QCX9LW0tLTOvlrWl5fPwFAAAJMxWli/C03ShAC4tgEdbxvtA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSYnuL38Hm15lXABBTFW+IDADF6DnLleFpXpRHjwAQWxRAAACAlKEAAkizbpbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Efficiency 66.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib notebook\n",
+ "import matplotlib\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt2\n",
+ "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n",
+ "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n",
+ "VR=25.0 #velocity ratio\n",
+ "E=[0,0,0,0,0,0] #Efficiency\n",
+ "#calculating average slope\n",
+ "m=(P[4]-P[1])/(W[4]-W[1])\n",
+ "C=P[4]-m*W[4]\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "for i in range(0,6):\n",
+ " \n",
+ " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n",
+ " \n",
+ "plt2.plot(W,E)\n",
+ "plt2.ylabel(\"Efficiency\")\n",
+ "plt2.xlabel(\"Load\")\n",
+ "plt2.show() \n",
+ "\n",
+ " \n",
+ "MaxEfficiency=1/VR*100*1/m\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 13.8888888889\n",
+ "Velocity Ratio 30.0\n",
+ "Efficiency 46.2962962963\n",
+ "self-locking machine\n",
+ "Ideal Load 10800.0\n",
+ "frictional resistance 5800.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "W = 5000.0 #Load\n",
+ "P = 360.0 #Effort\n",
+ "\n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100.0\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "Wi = P*VR #ideal load\n",
+ "\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print var\n",
+ "print \"Ideal Load\",Wi\n",
+ "\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 937.5 N\n",
+ "number of pulley is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 6000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.8\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "#second case\n",
+ "P=520.0\n",
+ "n=0,\n",
+ "for i in range(3,20):\n",
+ " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n",
+ " n=i\n",
+ " break\n",
+ " \n",
+ " \n",
+ "print \"number of pulley is \",n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exmple 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 2352.94117647 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N=3.0 #number of movable pulleys\n",
+ "VR=2*N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.85\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1923.07692308 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1\n",
+ "N2=2.0 #number of movable puleys in system 2\n",
+ "VR=2*N1+2*N2 #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.78\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 79.3650793651\n",
+ "Effort lost in friction 37.1428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 1000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N-1 #Velocity Ratio\n",
+ "P = 180.0 #Effort\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "Pi =W/VR #Ideal effort\n",
+ "\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "print \"Effort lost in friction\",efl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 595.238095238 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 2500.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1 in figure B\n",
+ "N2=2.0 #number of movable puleys in system 2 in figure C\n",
+ "VR=2**N1-1+2**N2-1 #Velocity Ratio\n",
+ "Efficiency=0.70\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 2.3\n",
+ "Effort is 745.341614907 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle\n",
+ "tcw=6.0 #thickness of the cord on the wheel\n",
+ "tca=20.0 #thickness of the cord on the axle\n",
+ "W=1200 #effort\n",
+ "ED=D+tcw #Effective diameter of the wheel\n",
+ "Ed=d+tca #Effectivediameter of axle\n",
+ "VR=ED/Ed #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.7\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 32.0\n",
+ "Effort is 1136.36363636 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=800.0 #diameter of the wheel\n",
+ "d1=250.0 #diameter of axle 1\n",
+ "d2=300.0 #diameter of axle 2\n",
+ "\n",
+ "W=20000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(d2-d1) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.55\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 3.33333333333\n",
+ "Effort is 2500.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle \n",
+ "\n",
+ "W=5000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(D-d) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.6\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1741.88034188 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=40.0 #Screw diameter\n",
+ "l=20.0 #Screw lwngth\n",
+ "p=l/3.0 #Lead of the screw\n",
+ "W=40000.0 #effort\n",
+ "R = 400 #Lever length\n",
+ "u = 0.12 #coefficient of friction between screw and nut\n",
+ "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 57.0287539936 N\n",
+ "Efficiency 55.8439936484 %\n",
+ "reversible machine\n",
+ "The torque required to keep the load from descending 2047.61904762 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=50.0 #mean diameter of screw\n",
+ "p=10.0 #pitch of screw\n",
+ "u=0.05 #coefficient of friction at the screw thread\n",
+ "R=300.0 ##Lever length\n",
+ "W=6000.0 #Load\n",
+ "o1=math.atan(p/(3.14*d))\n",
+ "o2=math.atan(0.05)\n",
+ "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "VR=2*3.14*R/p #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "print var\n",
+ "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n",
+ "print \"The torque required to keep the load from descending\",T,\"Nm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 12.9110001721 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1=5.0 #Pitch of smaller screw\n",
+ "p2=10.0 #Pitch of larger screw\n",
+ "R=500.0 #Lever arm length from centre of screw\n",
+ "W=15000.0 #Load\n",
+ "P=185.0 #Effort\n",
+ "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 120.0\n",
+ "Law of machine is P= 0.01 W + 70.0\n",
+ "Efficiency for first case 25.0 %\n",
+ "Efficiency for second case 46.875 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=200.0 #Diameter of the load drum \n",
+ "R = 1200.0 # Length of lever arm \n",
+ "T1 = 10.0 #Number of teeth on pinion, \n",
+ "T2 = 100.0 #Number of teeth on spur wheel\n",
+ "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "W1 = 3000.0 #Load 1\n",
+ "P1= 100.0 #Effort1\n",
+ "\n",
+ "W2 = 9000.0 #Load 2\n",
+ "P2= 160.0 #Effort2\n",
+ "\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for first case\",Efficiency,\"%\"\n",
+ "MA=W2/P2 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for second case\",Efficiency,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 32.0\n",
+ "LOad 3200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=150.0 #Diameter of the load drum \n",
+ "R = 400.0 # Length of lever arm \n",
+ "T1 = 15.0 #Number of teeth on pinion, \n",
+ "T3 = 20.0 #Number of teeth on pinion, \n",
+ "T2 = 45.0 #Number of teeth on spur wheel\n",
+ "T4 = 40.0 #Number of teeth on spur wheel\n",
+ "P= 250.0 #Effort\n",
+ "Efficiency=0.4\n",
+ "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "\n",
+ "W=VR*Efficiency*P #Load \n",
+ "\n",
+ "print \"LOad\",W,\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_otmOyr2.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_otmOyr2.ipynb
new file mode 100644
index 00000000..55339520
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_otmOyr2.ipynb
@@ -0,0 +1,1593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6-SIMPLE MACHINES"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 20.0\n",
+ "Velocity Ratio 25.0\n",
+ "Efficiency 0.8\n",
+ "Ideal Load 12500.0\n",
+ "Ideal Effort 400.0\n",
+ "Effort lost in friction 100.0\n",
+ "frictional resistance 2500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 10000.0 #Load\n",
+ "P = 500.0 #Effort\n",
+ "D = 20.0 #Distance moved by the effort \n",
+ "d = 0.8 #Distance moved by the load \n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=D/d #Velocity Ratio\n",
+ "Efficiency=MA/VR\n",
+ "Pi =W/VR #Ideal effort\n",
+ "Wi = P*VR #ideal load\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print \"Ideal Load\",Wi\n",
+ "print \"Ideal Effort\",Pi\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.05 W + 30.0\n",
+ "Load is 3400.0 N\n",
+ "Mechanical advantage-- 17.0\n",
+ "Ideal effort is 113.333333333 N\n",
+ "Effort lost in friction 86.6666666667\n",
+ "Efficiency 56.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 2400.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "\n",
+ "W2 = 3000.0 #Load 2\n",
+ "P2= 180.0 #Effort2\n",
+ "P3= 200.0 #Effort3\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "W3=(P3-C)/m #Load 2\n",
+ "print \"Load is \",W3,\"N\"\n",
+ "MA=W3/P3 #Mechanical advantage\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100\n",
+ "Pi =W3/VR #Ideal effort\n",
+ "print \"Ideal effort is\",Pi,\"N\"\n",
+ "\n",
+ "efl=P3-Pi #Effort lost in friction\n",
+ "\n",
+ "print \"Effort lost in friction\",efl\n",
+ "print \"Efficiency\",Efficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 51.3333333333\n",
+ "Velocity Ratio 85.5555555556\n",
+ "Efficiency 61.7142857143\n",
+ "Maximum Mechanical advantage-- 55.0\n",
+ "Maximum Efficiency 64.2857142857\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 7700.0 #Load 1\n",
+ "P1= 150.0 #Effort1\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=0.6\n",
+ "VR=MA/Efficiency #Velocity Ratio\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "W2 = 13200.0 #Load 2\n",
+ "P2= 250.0 #Effort2\n",
+ "MA=W2/P2\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "\n",
+ "\n",
+ "MMA=1/m #Maximum Mechanical advantage\n",
+ "print \"Maximum Mechanical advantage--\",MMA\n",
+ "\n",
+ "MaxEfficiency=MMA/VR*100\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Law of machine is P= 0.06 W + 10.5\n"
+ ]
+ },
+ {
+ "data": {
+ "application/javascript": [
+ "/* Put everything inside the global mpl namespace */\n",
+ "window.mpl = {};\n",
+ "\n",
+ "mpl.get_websocket_type = function() {\n",
+ " if (typeof(WebSocket) !== 'undefined') {\n",
+ " return WebSocket;\n",
+ " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
+ " return MozWebSocket;\n",
+ " } else {\n",
+ " alert('Your browser does not have WebSocket support.' +\n",
+ " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
+ " 'Firefox 4 and 5 are also supported but you ' +\n",
+ " 'have to enable WebSockets in about:config.');\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
+ " this.id = figure_id;\n",
+ "\n",
+ " this.ws = websocket;\n",
+ "\n",
+ " this.supports_binary = (this.ws.binaryType != undefined);\n",
+ "\n",
+ " if (!this.supports_binary) {\n",
+ " var warnings = document.getElementById(\"mpl-warnings\");\n",
+ " if (warnings) {\n",
+ " warnings.style.display = 'block';\n",
+ " warnings.textContent = (\n",
+ " \"This browser does not support binary websocket messages. \" +\n",
+ " \"Performance may be slow.\");\n",
+ " }\n",
+ " }\n",
+ "\n",
+ " this.imageObj = new Image();\n",
+ "\n",
+ " this.context = undefined;\n",
+ " this.message = undefined;\n",
+ " this.canvas = undefined;\n",
+ " this.rubberband_canvas = undefined;\n",
+ " this.rubberband_context = undefined;\n",
+ " this.format_dropdown = undefined;\n",
+ "\n",
+ " this.image_mode = 'full';\n",
+ "\n",
+ " this.root = $('<div/>');\n",
+ " this._root_extra_style(this.root)\n",
+ " this.root.attr('style', 'display: inline-block');\n",
+ "\n",
+ " $(parent_element).append(this.root);\n",
+ "\n",
+ " this._init_header(this);\n",
+ " this._init_canvas(this);\n",
+ " this._init_toolbar(this);\n",
+ "\n",
+ " var fig = this;\n",
+ "\n",
+ " this.waiting = false;\n",
+ "\n",
+ " this.ws.onopen = function () {\n",
+ " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
+ " fig.send_message(\"send_image_mode\", {});\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " }\n",
+ "\n",
+ " this.imageObj.onload = function() {\n",
+ " if (fig.image_mode == 'full') {\n",
+ " // Full images could contain transparency (where diff images\n",
+ " // almost always do), so we need to clear the canvas so that\n",
+ " // there is no ghosting.\n",
+ " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
+ " }\n",
+ " fig.context.drawImage(fig.imageObj, 0, 0);\n",
+ " };\n",
+ "\n",
+ " this.imageObj.onunload = function() {\n",
+ " this.ws.close();\n",
+ " }\n",
+ "\n",
+ " this.ws.onmessage = this._make_on_message_function(this);\n",
+ "\n",
+ " this.ondownload = ondownload;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_header = function() {\n",
+ " var titlebar = $(\n",
+ " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
+ " 'ui-helper-clearfix\"/>');\n",
+ " var titletext = $(\n",
+ " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
+ " 'text-align: center; padding: 3px;\"/>');\n",
+ " titlebar.append(titletext)\n",
+ " this.root.append(titlebar);\n",
+ " this.header = titletext[0];\n",
+ "}\n",
+ "\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_canvas = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var canvas_div = $('<div/>');\n",
+ "\n",
+ " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
+ "\n",
+ " function canvas_keyboard_event(event) {\n",
+ " return fig.key_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
+ " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
+ " this.canvas_div = canvas_div\n",
+ " this._canvas_extra_style(canvas_div)\n",
+ " this.root.append(canvas_div);\n",
+ "\n",
+ " var canvas = $('<canvas/>');\n",
+ " canvas.addClass('mpl-canvas');\n",
+ " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
+ "\n",
+ " this.canvas = canvas[0];\n",
+ " this.context = canvas[0].getContext(\"2d\");\n",
+ "\n",
+ " var rubberband = $('<canvas/>');\n",
+ " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
+ "\n",
+ " var pass_mouse_events = true;\n",
+ "\n",
+ " canvas_div.resizable({\n",
+ " start: function(event, ui) {\n",
+ " pass_mouse_events = false;\n",
+ " },\n",
+ " resize: function(event, ui) {\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " stop: function(event, ui) {\n",
+ " pass_mouse_events = true;\n",
+ " fig.request_resize(ui.size.width, ui.size.height);\n",
+ " },\n",
+ " });\n",
+ "\n",
+ " function mouse_event_fn(event) {\n",
+ " if (pass_mouse_events)\n",
+ " return fig.mouse_event(event, event['data']);\n",
+ " }\n",
+ "\n",
+ " rubberband.mousedown('button_press', mouse_event_fn);\n",
+ " rubberband.mouseup('button_release', mouse_event_fn);\n",
+ " // Throttle sequential mouse events to 1 every 20ms.\n",
+ " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
+ "\n",
+ " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
+ " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
+ "\n",
+ " canvas_div.on(\"wheel\", function (event) {\n",
+ " event = event.originalEvent;\n",
+ " event['data'] = 'scroll'\n",
+ " if (event.deltaY < 0) {\n",
+ " event.step = 1;\n",
+ " } else {\n",
+ " event.step = -1;\n",
+ " }\n",
+ " mouse_event_fn(event);\n",
+ " });\n",
+ "\n",
+ " canvas_div.append(canvas);\n",
+ " canvas_div.append(rubberband);\n",
+ "\n",
+ " this.rubberband = rubberband;\n",
+ " this.rubberband_canvas = rubberband[0];\n",
+ " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
+ " this.rubberband_context.strokeStyle = \"#000000\";\n",
+ "\n",
+ " this._resize_canvas = function(width, height) {\n",
+ " // Keep the size of the canvas, canvas container, and rubber band\n",
+ " // canvas in synch.\n",
+ " canvas_div.css('width', width)\n",
+ " canvas_div.css('height', height)\n",
+ "\n",
+ " canvas.attr('width', width);\n",
+ " canvas.attr('height', height);\n",
+ "\n",
+ " rubberband.attr('width', width);\n",
+ " rubberband.attr('height', height);\n",
+ " }\n",
+ "\n",
+ " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
+ " // upon first draw.\n",
+ " this._resize_canvas(600, 600);\n",
+ "\n",
+ " // Disable right mouse context menu.\n",
+ " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
+ " return false;\n",
+ " });\n",
+ "\n",
+ " function set_focus () {\n",
+ " canvas.focus();\n",
+ " canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " window.setTimeout(set_focus, 100);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items) {\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) {\n",
+ " // put a spacer in here.\n",
+ " continue;\n",
+ " }\n",
+ " var button = $('<button/>');\n",
+ " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
+ " 'ui-button-icon-only');\n",
+ " button.attr('role', 'button');\n",
+ " button.attr('aria-disabled', 'false');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ "\n",
+ " var icon_img = $('<span/>');\n",
+ " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
+ " icon_img.addClass(image);\n",
+ " icon_img.addClass('ui-corner-all');\n",
+ "\n",
+ " var tooltip_span = $('<span/>');\n",
+ " tooltip_span.addClass('ui-button-text');\n",
+ " tooltip_span.html(tooltip);\n",
+ "\n",
+ " button.append(icon_img);\n",
+ " button.append(tooltip_span);\n",
+ "\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " var fmt_picker_span = $('<span/>');\n",
+ "\n",
+ " var fmt_picker = $('<select/>');\n",
+ " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
+ " fmt_picker_span.append(fmt_picker);\n",
+ " nav_element.append(fmt_picker_span);\n",
+ " this.format_dropdown = fmt_picker[0];\n",
+ "\n",
+ " for (var ind in mpl.extensions) {\n",
+ " var fmt = mpl.extensions[ind];\n",
+ " var option = $(\n",
+ " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
+ " fmt_picker.append(option)\n",
+ " }\n",
+ "\n",
+ " // Add hover states to the ui-buttons\n",
+ " $( \".ui-button\" ).hover(\n",
+ " function() { $(this).addClass(\"ui-state-hover\");},\n",
+ " function() { $(this).removeClass(\"ui-state-hover\");}\n",
+ " );\n",
+ "\n",
+ " var status_bar = $('<span class=\"mpl-message\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
+ " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
+ " // which will in turn request a refresh of the image.\n",
+ " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_message = function(type, properties) {\n",
+ " properties['type'] = type;\n",
+ " properties['figure_id'] = this.id;\n",
+ " this.ws.send(JSON.stringify(properties));\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.send_draw_message = function() {\n",
+ " if (!this.waiting) {\n",
+ " this.waiting = true;\n",
+ " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " var format_dropdown = fig.format_dropdown;\n",
+ " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
+ " fig.ondownload(fig, format);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
+ " var size = msg['size'];\n",
+ " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
+ " fig._resize_canvas(size[0], size[1]);\n",
+ " fig.send_message(\"refresh\", {});\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
+ " var x0 = msg['x0'];\n",
+ " var y0 = fig.canvas.height - msg['y0'];\n",
+ " var x1 = msg['x1'];\n",
+ " var y1 = fig.canvas.height - msg['y1'];\n",
+ " x0 = Math.floor(x0) + 0.5;\n",
+ " y0 = Math.floor(y0) + 0.5;\n",
+ " x1 = Math.floor(x1) + 0.5;\n",
+ " y1 = Math.floor(y1) + 0.5;\n",
+ " var min_x = Math.min(x0, x1);\n",
+ " var min_y = Math.min(y0, y1);\n",
+ " var width = Math.abs(x1 - x0);\n",
+ " var height = Math.abs(y1 - y0);\n",
+ "\n",
+ " fig.rubberband_context.clearRect(\n",
+ " 0, 0, fig.canvas.width, fig.canvas.height);\n",
+ "\n",
+ " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
+ " // Updates the figure title.\n",
+ " fig.header.textContent = msg['label'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
+ " var cursor = msg['cursor'];\n",
+ " switch(cursor)\n",
+ " {\n",
+ " case 0:\n",
+ " cursor = 'pointer';\n",
+ " break;\n",
+ " case 1:\n",
+ " cursor = 'default';\n",
+ " break;\n",
+ " case 2:\n",
+ " cursor = 'crosshair';\n",
+ " break;\n",
+ " case 3:\n",
+ " cursor = 'move';\n",
+ " break;\n",
+ " }\n",
+ " fig.rubberband_canvas.style.cursor = cursor;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
+ " fig.message.textContent = msg['message'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
+ " // Request the server to send over a new figure.\n",
+ " fig.send_draw_message();\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
+ " fig.image_mode = msg['mode'];\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Called whenever the canvas gets updated.\n",
+ " this.send_message(\"ack\", {});\n",
+ "}\n",
+ "\n",
+ "// A function to construct a web socket function for onmessage handling.\n",
+ "// Called in the figure constructor.\n",
+ "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
+ " return function socket_on_message(evt) {\n",
+ " if (evt.data instanceof Blob) {\n",
+ " /* FIXME: We get \"Resource interpreted as Image but\n",
+ " * transferred with MIME type text/plain:\" errors on\n",
+ " * Chrome. But how to set the MIME type? It doesn't seem\n",
+ " * to be part of the websocket stream */\n",
+ " evt.data.type = \"image/png\";\n",
+ "\n",
+ " /* Free the memory for the previous frames */\n",
+ " if (fig.imageObj.src) {\n",
+ " (window.URL || window.webkitURL).revokeObjectURL(\n",
+ " fig.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
+ " evt.data);\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
+ " fig.imageObj.src = evt.data;\n",
+ " fig.updated_canvas_event();\n",
+ " fig.waiting = false;\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var msg = JSON.parse(evt.data);\n",
+ " var msg_type = msg['type'];\n",
+ "\n",
+ " // Call the \"handle_{type}\" callback, which takes\n",
+ " // the figure and JSON message as its only arguments.\n",
+ " try {\n",
+ " var callback = fig[\"handle_\" + msg_type];\n",
+ " } catch (e) {\n",
+ " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " if (callback) {\n",
+ " try {\n",
+ " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
+ " callback(fig, msg);\n",
+ " } catch (e) {\n",
+ " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
+ " }\n",
+ " }\n",
+ " };\n",
+ "}\n",
+ "\n",
+ "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "mpl.findpos = function(e) {\n",
+ " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
+ " var targ;\n",
+ " if (!e)\n",
+ " e = window.event;\n",
+ " if (e.target)\n",
+ " targ = e.target;\n",
+ " else if (e.srcElement)\n",
+ " targ = e.srcElement;\n",
+ " if (targ.nodeType == 3) // defeat Safari bug\n",
+ " targ = targ.parentNode;\n",
+ "\n",
+ " // jQuery normalizes the pageX and pageY\n",
+ " // pageX,Y are the mouse positions relative to the document\n",
+ " // offset() returns the position of the element relative to the document\n",
+ " var x = e.pageX - $(targ).offset().left;\n",
+ " var y = e.pageY - $(targ).offset().top;\n",
+ "\n",
+ " return {\"x\": x, \"y\": y};\n",
+ "};\n",
+ "\n",
+ "/*\n",
+ " * return a copy of an object with only non-object keys\n",
+ " * we need this to avoid circular references\n",
+ " * http://stackoverflow.com/a/24161582/3208463\n",
+ " */\n",
+ "function simpleKeys (original) {\n",
+ " return Object.keys(original).reduce(function (obj, key) {\n",
+ " if (typeof original[key] !== 'object')\n",
+ " obj[key] = original[key]\n",
+ " return obj;\n",
+ " }, {});\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.mouse_event = function(event, name) {\n",
+ " var canvas_pos = mpl.findpos(event)\n",
+ "\n",
+ " if (name === 'button_press')\n",
+ " {\n",
+ " this.canvas.focus();\n",
+ " this.canvas_div.focus();\n",
+ " }\n",
+ "\n",
+ " var x = canvas_pos.x;\n",
+ " var y = canvas_pos.y;\n",
+ "\n",
+ " this.send_message(name, {x: x, y: y, button: event.button,\n",
+ " step: event.step,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ "\n",
+ " /* This prevents the web browser from automatically changing to\n",
+ " * the text insertion cursor when the button is pressed. We want\n",
+ " * to control all of the cursor setting manually through the\n",
+ " * 'cursor' event from matplotlib */\n",
+ " event.preventDefault();\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " // Handle any extra behaviour associated with a key event\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.key_event = function(event, name) {\n",
+ "\n",
+ " // Prevent repeat events\n",
+ " if (name == 'key_press')\n",
+ " {\n",
+ " if (event.which === this._key)\n",
+ " return;\n",
+ " else\n",
+ " this._key = event.which;\n",
+ " }\n",
+ " if (name == 'key_release')\n",
+ " this._key = null;\n",
+ "\n",
+ " var value = '';\n",
+ " if (event.ctrlKey && event.which != 17)\n",
+ " value += \"ctrl+\";\n",
+ " if (event.altKey && event.which != 18)\n",
+ " value += \"alt+\";\n",
+ " if (event.shiftKey && event.which != 16)\n",
+ " value += \"shift+\";\n",
+ "\n",
+ " value += 'k';\n",
+ " value += event.which.toString();\n",
+ "\n",
+ " this._key_event_extra(event, name);\n",
+ "\n",
+ " this.send_message(name, {key: value,\n",
+ " guiEvent: simpleKeys(event)});\n",
+ " return false;\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
+ " if (name == 'download') {\n",
+ " this.handle_save(this, null);\n",
+ " } else {\n",
+ " this.send_message(\"toolbar_button\", {name: name});\n",
+ " }\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
+ " this.message.textContent = tooltip;\n",
+ "};\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "\n",
+ "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
+ "\n",
+ "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
+ " // Create a \"websocket\"-like object which calls the given IPython comm\n",
+ " // object with the appropriate methods. Currently this is a non binary\n",
+ " // socket, so there is still some room for performance tuning.\n",
+ " var ws = {};\n",
+ "\n",
+ " ws.close = function() {\n",
+ " comm.close()\n",
+ " };\n",
+ " ws.send = function(m) {\n",
+ " //console.log('sending', m);\n",
+ " comm.send(m);\n",
+ " };\n",
+ " // Register the callback with on_msg.\n",
+ " comm.on_msg(function(msg) {\n",
+ " //console.log('receiving', msg['content']['data'], msg);\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
+ " ws.onmessage(msg['content']['data'])\n",
+ " });\n",
+ " return ws;\n",
+ "}\n",
+ "\n",
+ "mpl.mpl_figure_comm = function(comm, msg) {\n",
+ " // This is the function which gets called when the mpl process\n",
+ " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
+ "\n",
+ " var id = msg.content.data.id;\n",
+ " // Get hold of the div created by the display call when the Comm\n",
+ " // socket was opened in Python.\n",
+ " var element = $(\"#\" + id);\n",
+ " var ws_proxy = comm_websocket_adapter(comm)\n",
+ "\n",
+ " function ondownload(figure, format) {\n",
+ " window.open(figure.imageObj.src);\n",
+ " }\n",
+ "\n",
+ " var fig = new mpl.figure(id, ws_proxy,\n",
+ " ondownload,\n",
+ " element.get(0));\n",
+ "\n",
+ " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
+ " // web socket which is closed, not our websocket->open comm proxy.\n",
+ " ws_proxy.onopen();\n",
+ "\n",
+ " fig.parent_element = element.get(0);\n",
+ " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
+ " if (!fig.cell_info) {\n",
+ " console.error(\"Failed to find cell for figure\", id, fig);\n",
+ " return;\n",
+ " }\n",
+ "\n",
+ " var output_index = fig.cell_info[2]\n",
+ " var cell = fig.cell_info[0];\n",
+ "\n",
+ "};\n",
+ "\n",
+ "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " fig.root.unbind('remove')\n",
+ "\n",
+ " // Update the output cell to use the data from the current canvas.\n",
+ " fig.push_to_output();\n",
+ " var dataURL = fig.canvas.toDataURL();\n",
+ " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
+ " // the notebook keyboard shortcuts fail.\n",
+ " IPython.keyboard_manager.enable()\n",
+ " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n",
+ " fig.close_ws(fig, msg);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.close_ws = function(fig, msg){\n",
+ " fig.send_message('closing', msg);\n",
+ " // fig.ws.close()\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
+ " // Turn the data on the canvas into data in the output cell.\n",
+ " var dataURL = this.canvas.toDataURL();\n",
+ " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.updated_canvas_event = function() {\n",
+ " // Tell IPython that the notebook contents must change.\n",
+ " IPython.notebook.set_dirty(true);\n",
+ " this.send_message(\"ack\", {});\n",
+ " var fig = this;\n",
+ " // Wait a second, then push the new image to the DOM so\n",
+ " // that it is saved nicely (might be nice to debounce this).\n",
+ " setTimeout(function () { fig.push_to_output() }, 1000);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._init_toolbar = function() {\n",
+ " var fig = this;\n",
+ "\n",
+ " var nav_element = $('<div/>')\n",
+ " nav_element.attr('style', 'width: 100%');\n",
+ " this.root.append(nav_element);\n",
+ "\n",
+ " // Define a callback function for later on.\n",
+ " function toolbar_event(event) {\n",
+ " return fig.toolbar_button_onclick(event['data']);\n",
+ " }\n",
+ " function toolbar_mouse_event(event) {\n",
+ " return fig.toolbar_button_onmouseover(event['data']);\n",
+ " }\n",
+ "\n",
+ " for(var toolbar_ind in mpl.toolbar_items){\n",
+ " var name = mpl.toolbar_items[toolbar_ind][0];\n",
+ " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
+ " var image = mpl.toolbar_items[toolbar_ind][2];\n",
+ " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
+ "\n",
+ " if (!name) { continue; };\n",
+ "\n",
+ " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
+ " button.click(method_name, toolbar_event);\n",
+ " button.mouseover(tooltip, toolbar_mouse_event);\n",
+ " nav_element.append(button);\n",
+ " }\n",
+ "\n",
+ " // Add the status bar.\n",
+ " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
+ " nav_element.append(status_bar);\n",
+ " this.message = status_bar[0];\n",
+ "\n",
+ " // Add the close button to the window.\n",
+ " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
+ " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
+ " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
+ " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
+ " buttongrp.append(button);\n",
+ " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
+ " titlebar.prepend(buttongrp);\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._root_extra_style = function(el){\n",
+ " var fig = this\n",
+ " el.on(\"remove\", function(){\n",
+ "\tfig.close_ws(fig, {});\n",
+ " });\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._canvas_extra_style = function(el){\n",
+ " // this is important to make the div 'focusable\n",
+ " el.attr('tabindex', 0)\n",
+ " // reach out to IPython and tell the keyboard manager to turn it's self\n",
+ " // off when our div gets focus\n",
+ "\n",
+ " // location in version 3\n",
+ " if (IPython.notebook.keyboard_manager) {\n",
+ " IPython.notebook.keyboard_manager.register_events(el);\n",
+ " }\n",
+ " else {\n",
+ " // location in version 2\n",
+ " IPython.keyboard_manager.register_events(el);\n",
+ " }\n",
+ "\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
+ " var manager = IPython.notebook.keyboard_manager;\n",
+ " if (!manager)\n",
+ " manager = IPython.keyboard_manager;\n",
+ "\n",
+ " // Check for shift+enter\n",
+ " if (event.shiftKey && event.which == 13) {\n",
+ " this.canvas_div.blur();\n",
+ " event.shiftKey = false;\n",
+ " // Send a \"J\" for go to next cell\n",
+ " event.which = 74;\n",
+ " event.keyCode = 74;\n",
+ " manager.command_mode();\n",
+ " manager.handle_keydown(event);\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
+ " fig.ondownload(fig, null);\n",
+ "}\n",
+ "\n",
+ "\n",
+ "mpl.find_output_cell = function(html_output) {\n",
+ " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
+ " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
+ " // IPython event is triggered only after the cells have been serialised, which for\n",
+ " // our purposes (turning an active figure into a static one), is too late.\n",
+ " var cells = IPython.notebook.get_cells();\n",
+ " var ncells = cells.length;\n",
+ " for (var i=0; i<ncells; i++) {\n",
+ " var cell = cells[i];\n",
+ " if (cell.cell_type === 'code'){\n",
+ " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
+ " var data = cell.output_area.outputs[j];\n",
+ " if (data.data) {\n",
+ " // IPython >= 3 moved mimebundle to data attribute of output\n",
+ " data = data.data;\n",
+ " }\n",
+ " if (data['text/html'] == html_output) {\n",
+ " return [cell, data, j];\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Register the function which deals with the matplotlib target/channel.\n",
+ "// The kernel may be null if the page has been refreshed.\n",
+ "if (IPython.notebook.kernel != null) {\n",
+ " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "<IPython.core.display.Javascript object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERC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8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Efficiency 66.6666666667\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib notebook\n",
+ "import matplotlib\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt2\n",
+ "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n",
+ "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n",
+ "VR=25.0 #velocity ratio\n",
+ "E=[0,0,0,0,0,0] #Efficiency\n",
+ "#calculating average slope\n",
+ "m=(P[4]-P[1])/(W[4]-W[1])\n",
+ "C=P[4]-m*W[4]\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "for i in range(0,6):\n",
+ " \n",
+ " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n",
+ " \n",
+ "plt2.plot(W,E)\n",
+ "plt2.ylabel(\"Efficiency\")\n",
+ "plt2.xlabel(\"Load\")\n",
+ "plt2.show() \n",
+ "\n",
+ " \n",
+ "MaxEfficiency=1/VR*100*1/m\n",
+ "\n",
+ "print \"Maximum Efficiency\",MaxEfficiency\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical advantage-- 13.8888888889\n",
+ "Velocity Ratio 30.0\n",
+ "Efficiency 46.2962962963\n",
+ "self-locking machine\n",
+ "Ideal Load 10800.0\n",
+ "frictional resistance 5800.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "W = 5000.0 #Load\n",
+ "P = 360.0 #Effort\n",
+ "\n",
+ "MA=W/P #Mechanical advantage\n",
+ "VR=30.0 #Velocity Ratio\n",
+ "Efficiency=MA/VR*100.0\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "Wi = P*VR #ideal load\n",
+ "\n",
+ "Fr=Wi-W #frictional resistance\n",
+ "print \"Mechanical advantage--\",MA\n",
+ "print \"Velocity Ratio\",VR\n",
+ "print \"Efficiency\",Efficiency\n",
+ "print var\n",
+ "print \"Ideal Load\",Wi\n",
+ "\n",
+ "print \"frictional resistance\",Fr\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 937.5 N\n",
+ "number of pulley is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 6000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.8\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "#second case\n",
+ "P=520.0\n",
+ "n=0,\n",
+ "for i in range(3,20):\n",
+ " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n",
+ " n=i\n",
+ " break\n",
+ " \n",
+ " \n",
+ "print \"number of pulley is \",n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exmple 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 2352.94117647 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N=3.0 #number of movable pulleys\n",
+ "VR=2*N #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.85\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1923.07692308 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 12000.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1\n",
+ "N2=2.0 #number of movable puleys in system 2\n",
+ "VR=2*N1+2*N2 #Velocity Ratio\n",
+ "L=0.05 #Efficiency loss in each pulley\n",
+ "Efficiency=0.78\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 79.3650793651\n",
+ "Effort lost in friction 37.1428571429\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 1000.0 #Load\n",
+ "N=3.0 #number of pulleys\n",
+ "VR=2**N-1 #Velocity Ratio\n",
+ "P = 180.0 #Effort\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100\n",
+ "print \"Efficiency\",Efficiency\n",
+ "Pi =W/VR #Ideal effort\n",
+ "\n",
+ "efl=P-Pi #Effort lost in friction\n",
+ "print \"Effort lost in friction\",efl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 595.238095238 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W = 2500.0 #Load\n",
+ "N1=2.0 #number of movable pulleys in system 1 in figure B\n",
+ "N2=2.0 #number of movable puleys in system 2 in figure C\n",
+ "VR=2**N1-1+2**N2-1 #Velocity Ratio\n",
+ "Efficiency=0.70\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 2.3\n",
+ "Effort is 745.341614907 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle\n",
+ "tcw=6.0 #thickness of the cord on the wheel\n",
+ "tca=20.0 #thickness of the cord on the axle\n",
+ "W=1200 #effort\n",
+ "ED=D+tcw #Effective diameter of the wheel\n",
+ "Ed=d+tca #Effectivediameter of axle\n",
+ "VR=ED/Ed #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.7\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 32.0\n",
+ "Effort is 1136.36363636 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=800.0 #diameter of the wheel\n",
+ "d1=250.0 #diameter of axle 1\n",
+ "d2=300.0 #diameter of axle 2\n",
+ "\n",
+ "W=20000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(d2-d1) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.55\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity ratio is 3.33333333333\n",
+ "Effort is 2500.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=500.0 #diameter of the wheel\n",
+ "d=200.0 #diameter of axle \n",
+ "\n",
+ "W=5000.0 #effort\n",
+ "\n",
+ "VR=(2*D)/(D-d) #Velocity Ratio\n",
+ "print \"Velocity ratio is \",VR\n",
+ "Efficiency=0.6\n",
+ "MA=Efficiency*VR #Mechanical advantage\n",
+ "P = W/MA #Effort\n",
+ "print \"Effort is\",P,\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 1741.88034188 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=40.0 #Screw diameter\n",
+ "l=20.0 #Screw lwngth\n",
+ "p=l/3.0 #Lead of the screw\n",
+ "W=40000.0 #effort\n",
+ "R = 400 #Lever length\n",
+ "u = 0.12 #coefficient of friction between screw and nut\n",
+ "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "print \"Effort is\",P,\"N\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effort is 57.0287539936 N\n",
+ "Efficiency 55.8439936484 %\n",
+ "reversible machine\n",
+ "The torque required to keep the load from descending 2047.61904762 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=50.0 #mean diameter of screw\n",
+ "p=10.0 #pitch of screw\n",
+ "u=0.05 #coefficient of friction at the screw thread\n",
+ "R=300.0 ##Lever length\n",
+ "W=6000.0 #Load\n",
+ "o1=math.atan(p/(3.14*d))\n",
+ "o2=math.atan(0.05)\n",
+ "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n",
+ "print \"Effort is\",P,\"N\"\n",
+ "VR=2*3.14*R/p #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n",
+ "var=\"reversible machine\"\n",
+ "if Efficiency < 50.0:\n",
+ " var=\"self-locking machine\"\n",
+ "print var\n",
+ "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n",
+ "print \"The torque required to keep the load from descending\",T,\"Nm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency 12.9110001721 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1=5.0 #Pitch of smaller screw\n",
+ "p2=10.0 #Pitch of larger screw\n",
+ "R=500.0 #Lever arm length from centre of screw\n",
+ "W=15000.0 #Load\n",
+ "P=185.0 #Effort\n",
+ "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n",
+ "MA=W/P #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency\",Efficiency,\"%\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 120.0\n",
+ "Law of machine is P= 0.01 W + 70.0\n",
+ "Efficiency for first case 25.0 %\n",
+ "Efficiency for second case 46.875 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=200.0 #Diameter of the load drum \n",
+ "R = 1200.0 # Length of lever arm \n",
+ "T1 = 10.0 #Number of teeth on pinion, \n",
+ "T2 = 100.0 #Number of teeth on spur wheel\n",
+ "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "W1 = 3000.0 #Load 1\n",
+ "P1= 100.0 #Effort1\n",
+ "\n",
+ "W2 = 9000.0 #Load 2\n",
+ "P2= 160.0 #Effort2\n",
+ "\n",
+ "#law of machine is given by P=mW+C\n",
+ "m=(P2-P1)/(W2-W1)\n",
+ "C=P2-m*W2\n",
+ "print \"Law of machine is P=\",m,\"W\",\"+\",C\n",
+ "MA=W1/P1 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for first case\",Efficiency,\"%\"\n",
+ "MA=W2/P2 #Mechanical advantage\n",
+ "Efficiency=MA/VR*100.0\n",
+ "\n",
+ "print \"Efficiency for second case\",Efficiency,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 6.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity Ratio is 32.0\n",
+ "LOad 3200.0 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "d=150.0 #Diameter of the load drum \n",
+ "R = 400.0 # Length of lever arm \n",
+ "T1 = 15.0 #Number of teeth on pinion, \n",
+ "T3 = 20.0 #Number of teeth on pinion, \n",
+ "T2 = 45.0 #Number of teeth on spur wheel\n",
+ "T4 = 40.0 #Number of teeth on spur wheel\n",
+ "P= 250.0 #Effort\n",
+ "Efficiency=0.4\n",
+ "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n",
+ "print \"Velocity Ratio is \",VR\n",
+ "\n",
+ "W=VR*Efficiency*P #Load \n",
+ "\n",
+ "print \"LOad\",W,\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_CCZqXKR.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_CCZqXKR.ipynb
new file mode 100644
index 00000000..1204506a
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_CCZqXKR.ipynb
@@ -0,0 +1,1325 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter8-SIMPLE STRESSES AND STRAINS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.1 Page number243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sectional area= 201.06 mm^2\n",
+ "stress= 198.94 N/mm^2\n",
+ "strain= 0.000994718394324 N/mm^2\n",
+ "Elongation= 0.497 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(40000) #Load,N\n",
+ "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n",
+ "L=500 #length of circular rod,mm\n",
+ "d=float(16) #diameter of rod,mm\n",
+ " \n",
+ "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n",
+ "p=P/A #stress, N/mm^2\n",
+ "e=p/E #strain\n",
+ "delta=(P*L)/(A*E) #Elongation,mm\n",
+ "\n",
+ "print \"sectional area=\",round(A,2),\"mm^2\"\n",
+ "print \"stress=\",round(p,2),\"N/mm^2\"\n",
+ "print \"strain=\",e,\"N/mm^2\"\n",
+ "print \"Elongation=\",round(delta,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.2 Page number243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "area= 11.25 mm^2\n",
+ "Elongation= 1.6 mm\n",
+ "Hence, if measured length is 30.0 m.\n",
+ "Actual length is 30.0016 m\n",
+ "Actual length of line AB= 150.008 m.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "P=float(120) # force applied during measurement,N\n",
+ "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n",
+ "L=float(30) #length of Surveyor’s steel tape,mm\n",
+ " \n",
+ " \n",
+ "A=15*0.75 #area, mm^2\n",
+ "delta=((P*L*1000)/(A*E)) #Elongation,mm\n",
+ "\n",
+ "print \"area=\",round(A,2),\"mm^2\"\n",
+ "print \"Elongation=\",round(delta,3),\"mm\"\n",
+ "\n",
+ "print \"Hence, if measured length is\", L,\"m.\"\n",
+ "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n",
+ "\n",
+ "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.3 Page number 244\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Therefore, permissible stress\n",
+ "p= 142.857 N/mm^2\n",
+ "Load P= 160000.0 N\n",
+ "A= 1120.0 mm^2\n",
+ "d= 94.32 mm\n",
+ "t= 3.64 mm\n",
+ "Hence, use of light section is recommended.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Y=float(250) #Yield stress, N/mm^2\n",
+ "FOS=float(1.75) #Factor of safety\n",
+ "P=float(160) #Load,KN\n",
+ "\n",
+ "p=Y/FOS\n",
+ "\n",
+ "print \"Therefore, permissible stress\"\n",
+ "print \"p=\",round(p,3), \"N/mm^2\"\n",
+ "print \"Load P=\",P*1000,\"N\"\n",
+ "\n",
+ "#p=P/A\n",
+ "\n",
+ "A=P*1000/p #area,mm^2\n",
+ "\n",
+ "print \"A=\",round(A),\"mm^2\"\n",
+ "\n",
+ "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n",
+ "D=float(101.6) #outer diameter,mm\n",
+ "\n",
+ "d=sqrt(pow(D,2)-(4*A/pi))\n",
+ "\n",
+ "print \"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "t=(D-d)/2\n",
+ "print \"t=\",round(t,2),\"mm\"\n",
+ "\n",
+ "print \"Hence, use of light section is recommended.\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.4 page number 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Area= 314.16 mm^2\n",
+ "Stress at elastic limit= 324.68 N/mm^2\n",
+ "Young's modulus E= 12732.4 N/mm^22\n",
+ "Percentage elongation= 28.0 %\n",
+ "Percentage reduction in area= 43.75 %\n",
+ "Ultimate Tensile Stress= 0.41 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration \n",
+ "\n",
+ "d=float(20) #Diameter ,mm\n",
+ "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n",
+ "P=80 #Load for extension of o.25mm , KN\n",
+ "delta=float(0.25) #extension in specimen of steel,mm\n",
+ "L=200 #gauge length of specimen of steel,mm\n",
+ "Finalextension=float(56) #total extension at fracture,mm\n",
+ "\n",
+ "\n",
+ "A=(pi*pow(d,2))/4 #Area,mm^2\n",
+ "print \"Area=\", round(A,2),\"mm^2\"\n",
+ "\n",
+ "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n",
+ "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n",
+ "\n",
+ "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n",
+ "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n",
+ "\n",
+ "Percentageelongation=Finalextension*100/L #percentage elongation,%\n",
+ "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n",
+ "\n",
+ "Initialarea=(pi*pow(d,2))/4\n",
+ "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n",
+ "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n",
+ "\n",
+ "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n",
+ "\n",
+ "UltimateLoad=130 #Maximum Load=130,kN\n",
+ "UltimateTensileStress=UltimateLoad/A\n",
+ "\n",
+ "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.5 Page number247\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "E= 56277.19 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(40) #Load,KN\n",
+ "L1=150 #length of 1st portion,mm\n",
+ "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n",
+ "L2=250 #length of 2nd portion,mm\n",
+ "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n",
+ "L3=150 #length of 3rd portion,mm\n",
+ "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n",
+ "\n",
+ "#E,Young's modulus ,N/mm^2\n",
+ "\n",
+ "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n",
+ "\n",
+ "#Extension=(P*1000*L)/(A*E)\n",
+ "\n",
+ "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n",
+ "\n",
+ "print \"E=\",round(E,2),\"N/mm^2\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.6 Page number247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total extension of the bar= 0.5125 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(30) #Load,KN\n",
+ "L1=600 #length of 1st portion,mm\n",
+ "A1=40*20 #Area of 1st portion,mm^2\n",
+ "\n",
+ "E1=200000 # material 1 Young’s modulus,N/mm^2\n",
+ " \n",
+ "E2=100000 # material 2 Young’s modulus,N/mm^2\n",
+ " \n",
+ "\n",
+ "L2=800 #length of 2nd portion,mm\n",
+ "A2=30*20 #Area of 2nd portion,mm^2\n",
+ "\n",
+ "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n",
+ "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n",
+ "\n",
+ "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n",
+ "\n",
+ "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.7 Page number248\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "E= 200735.96 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(30) #Load,KN\n",
+ "L1=600 #length of 1st portion,mm\n",
+ "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n",
+ "L2=400 #length of 2nd portion,mm\n",
+ "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n",
+ "\n",
+ "#E,Young's modulus ,N/mm^2\n",
+ "\n",
+ "#Total extension= Extension of portion 1+Extension of portion 2\n",
+ "\n",
+ "#Extension=(P*1000*L)/(A*E)\n",
+ "\n",
+ "T=float(0.222) #Total extension of the bar,mm\n",
+ "\n",
+ "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n",
+ "\n",
+ "print \"E=\",round(E,2),\"N/mm^2\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.10 Page number 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "delta1= 0.2113 mm\n",
+ "there is calculation mistake in book\n",
+ "delta2= 0.48 mm^2\n",
+ "Percentage error= 55.977 %\n",
+ "there is calculation mistake in book\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#variable declaration\n",
+ "\n",
+ "t=10 #steel flat thickness,mm\n",
+ "b1=float(60) #tapering from b1 to b2\n",
+ "b2=40\n",
+ "L=600 #steel flat length\n",
+ "P=float(80) #Load,KN\n",
+ "E=2*100000 #Young's Modulus,N/mm^2\n",
+ "\n",
+ "#Extension of the tapering bar of rectangular section\n",
+ "\n",
+ "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n",
+ "\n",
+ "print \"delta1=\",round(delta1,4),\"mm\"\n",
+ "print \"there is calculation mistake in book\"\n",
+ "\n",
+ "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n",
+ "\n",
+ "Aav=(b1+b2)*t/2 #mm^2\n",
+ "\n",
+ "delta2=(P*1000*L)/(Aav*E) #mm\n",
+ "print\"delta2=\",round(delta2,3),\"mm^2\"\n",
+ "\n",
+ "P= (delta2-delta1)*100/delta2\n",
+ "\n",
+ "print\"Percentage error=\",round(P,3),\"%\"\n",
+ "\n",
+ "print \"there is calculation mistake in book\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.11 page number251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "delta1= 1.194 mm\n",
+ "delta2= 0.265 mm\n",
+ "Total extension 1.459 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(200) #loading,KN\n",
+ "E=200*1000\n",
+ "d1=40 #Young's modulus,N/mm^2\n",
+ "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n",
+ "L1=1500 #length of uniform portion,mm \n",
+ "d2=60 #diameter of tapered section,mm\n",
+ "L2=500 #length of tapered section,mm\n",
+ "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n",
+ "\n",
+ "#Extension of uniform portion\n",
+ "\n",
+ "delta1=(P*1000*L1)/(A*E)\n",
+ "\n",
+ "print \"delta1=\",round(delta1,3),\"mm\"\n",
+ "\n",
+ "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n",
+ "\n",
+ "print \"delta2=\",round(delta2,3),\"mm\"\n",
+ "\n",
+ "T=delta1 + delta2 \n",
+ "print \"Total extension\",round(T,3),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.13 page number259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Poisson's ratio= 0.3\n",
+ "E= 203718.33 N/mm^2\n",
+ "G= 78353.2 N/mm^2\n",
+ "K= 169765.27 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(60) #load,KN\n",
+ "d=float(25) #diameter,mm\n",
+ "A=pi*pow(d,2)/4 #Area,mm^2\n",
+ "L=float(200) #gauge length,mm\n",
+ "\n",
+ "delta=0.12 #extension,mm\n",
+ "deltad=0.0045 #contraction in diameter,mm\n",
+ "Linearstrain=delta/L\n",
+ "Lateralstrain=deltad/d\n",
+ "\n",
+ "Pr=Lateralstrain/Linearstrain\n",
+ "\n",
+ "print \"Poisson's ratio=\",round(Pr,1)\n",
+ "\n",
+ "E=(P*1000*L)/(A*delta)\n",
+ "\n",
+ "print \"E=\",round(E,2),\"N/mm^2\"\n",
+ "\n",
+ "G=E/(2*(1+Pr)) #Rigidity modulus\n",
+ "\n",
+ "print \"G=\",round(G,1),\"N/mm^2\"\n",
+ "\n",
+ "K=E/(3*(1-(2*Pr))) #bulk modulus\n",
+ "\n",
+ "print \"K=\",round(K,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.14 page number 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G= 76923.1 N/mm^2\n",
+ "K= 166666.67 N/mm^2\n",
+ "change in volume 60.0 mm^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "E=float(2*100000) #Young's modulus,N/mm^2\n",
+ "Pr=float(0.3) #poisson's ratio\n",
+ "\n",
+ "G=E/(2*(1+Pr)) #Rigidity modulus\n",
+ "\n",
+ "K=E/(3*(1-2*(Pr))) #Bulk modulus\n",
+ "\n",
+ "print \"G=\", round(G,1),\"N/mm^2\"\n",
+ "\n",
+ "print \"K=\", round(K,2), \"N/mm^2\"\n",
+ "\n",
+ "P=60 #Load,kN\n",
+ "A=pi*pow(25,2)/4 #Area,mm^2\n",
+ "\n",
+ "Stress=P*1000/A #N/mm^2\n",
+ "#Linear strain,ex\n",
+ "\n",
+ "ex=Stress/E\n",
+ " \n",
+ "#Lateralstrain,ey,ez\n",
+ "\n",
+ "ey=-1*Pr*ex\n",
+ "ez=-1*Pr*ex\n",
+ "\n",
+ "#volumetric strain,ev=ex+ey+ez\n",
+ "\n",
+ "ev=ex+ey+ez\n",
+ "\n",
+ "v=pi*pow(25,2)*500/4\n",
+ "Changeinvolume=ev*v\n",
+ "\n",
+ "print\"change in volume\",round(Changeinvolume,2),\"mm^3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.15 page number261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in volume= 10.8 mm^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "# Let the x, y, z be the mutually perpendicular directions\n",
+ "\n",
+ "pr=float(0.3)\n",
+ "PX=float(15) #Loading in x-direction,KN\n",
+ "PY=float(80) #Loading in Y-direction(compressive),KN\n",
+ "PZ=float(180) #Loading in Z-direction,KN\n",
+ "\n",
+ "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n",
+ "\n",
+ "AX=float(10*30)\n",
+ "AY=float(10*400)\n",
+ "AZ=float(30*400)\n",
+ "\n",
+ "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n",
+ "\n",
+ "px=PX*1000/AX\n",
+ "py=PY*1000/AY\n",
+ "pz=PZ*1000/AZ\n",
+ "\n",
+ "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n",
+ "E=2*100000 #young's modulus,N/mm^2\n",
+ "\n",
+ "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n",
+ "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n",
+ "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n",
+ "\n",
+ "ev=ex+ey+ez #Volumetric strain\n",
+ "\n",
+ "volume=10*30*400\n",
+ "\n",
+ "Changeinvolume=ev*volume\n",
+ "\n",
+ "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.17 page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "poisson's Ratio= 0.346\n",
+ "Bulk modulus= 227500.0 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n",
+ "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n",
+ "\n",
+ "pr=(E/(2*G))-1\n",
+ "\n",
+ "print \"poisson's Ratio=\",round(pr,3)\n",
+ "\n",
+ "K=E/(3*(1-2*pr))\n",
+ "\n",
+ "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.18 page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Young's modulus= 102857.143 N\n",
+ "Poisson's Ratio 0.2857\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n",
+ "K=float(0.8*100000) #bulk modulus,N/mm^2\n",
+ "\n",
+ "E=(9*G*K)/(3*K+G)\n",
+ "\n",
+ "\n",
+ "print \"Young's modulus=\",round(E,3),\"N\"\n",
+ "\n",
+ "pr=(E/(2*G))-1\n",
+ "\n",
+ "print \"Poisson's Ratio\",round(pr,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.19 page number 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in aluminium strip= 23.08 N/mm^2\n",
+ "Stress in steel strip= 46.15 N/mm^2\n",
+ "Extension of the compound bar= 0.138 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "L=float(600) #compound bar of length,mm\n",
+ "P=float(60) #compound bar when axial tensile force ,KN\n",
+ "\n",
+ "Aa=float(40*20) #area of aluminium strip,mm^2\n",
+ "As=float(60*15) #area of steel strip,mm^2\n",
+ "\n",
+ "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n",
+ "Es=2*100000 # elastic modulus of steel,N/mm^2\n",
+ "\n",
+ "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n",
+ "#From compatibility condition, deltaAL=deltaS\n",
+ "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n",
+ "Ps=Pa*((As*Es)/(Aa*Ea))\n",
+ "\n",
+ "Sias=Pa/Aa\n",
+ "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n",
+ "Siss=Ps/As\n",
+ "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n",
+ "\n",
+ "L=600\n",
+ "#Extension of the compound bar \n",
+ "deltal=(Pa*L)/(Aa*Ea)\n",
+ "print\"Extension of the compound bar=\",round(deltal,3),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.20 page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in Copper= 75.76 N/mm^2\n",
+ "stress in Steel= 126.27 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n",
+ "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n",
+ "\n",
+ "di=float(25) #internal diameter,mm\n",
+ "de=float(40) #external diameter,mm\n",
+ "\n",
+ "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n",
+ "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n",
+ "P=120 #load, KN\n",
+ "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n",
+ "#From compatibility condition,deltaS=deltaC\n",
+ "\n",
+ "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n",
+ "Ps=Pc*((As*Es)/(Ac*Ec))\n",
+ "\n",
+ "SIC=Pc/Ac #stress in copper, N/mm^2\n",
+ "SIS=Ps/As #stress in steel,N/mm^2\n",
+ "\n",
+ "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n",
+ "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.21 page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in Concrete= 4.51 N/mm^2\n",
+ "stress in Steel= 81.2 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "#Es/Ec=18(given)\n",
+ "Er=float(18) #young modulus ratio Er=Es/Ec\n",
+ "d=float(16) #steel bar diameter,mm\n",
+ "#8 steel bars\n",
+ "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n",
+ "Ac=(300*500)-As #Area of concrete,mm^2\n",
+ "\n",
+ "P=800 #Compressive force, KN\n",
+ "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n",
+ "#From compatibility condition,deltaS=deltaC\n",
+ "\n",
+ "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n",
+ "Ps=Pc*((As*Er)/(Ac))\n",
+ "\n",
+ "SIC=Pc/Ac #stress in Concrete, N/mm^2\n",
+ "SIS=Ps/As #stress in steel,N/mm^2\n",
+ "\n",
+ "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n",
+ "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.22 page number 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in Aluminium= 66.96 N/mm^2\n",
+ "stress in Steel= 89.29 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n",
+ "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n",
+ "Ls=240 #length of steel,mm\n",
+ "La=160 #length of aluminium,mm\n",
+ "Aa=1200 #Area of aluminium,mm^2\n",
+ "As=1000 #Area of steel,mm^2\n",
+ "P=250 #load, KN\n",
+ "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n",
+ "#From compatibility condition,deltaS=deltaC\n",
+ "\n",
+ "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n",
+ "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n",
+ "\n",
+ "SIA=Pa/Aa #stress in aluminium, N/mm^2\n",
+ "SIS=Ps/As #stress in steel,N/mm^2\n",
+ "\n",
+ "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n",
+ "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.23 page number 268\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ps= 91.73 N/mm^2\n",
+ "pc= 44.96 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n",
+ "#Let the magnitude of force be P. Due to quarter turn of the nut\n",
+ "\n",
+ "#[Note. Pitch means advancement of nut in one full turn] \n",
+ "\n",
+ "Ls=float(600) #length of whole assembly,mm\n",
+ "Lc=float(600) #length of whole assembly,mm\n",
+ "delta=float(0.5)\n",
+ "ds=float(20) #diameter,mm\n",
+ "di=float(28) #internal diameter,mm\n",
+ "de=float(40) #external diameter,mm\n",
+ "Es=float(2*100000) #Young's modulus, N/mm^2\n",
+ "Ec=float(1.2*100000)\n",
+ "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n",
+ "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n",
+ "\n",
+ "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n",
+ "\n",
+ "ps=P/As #stress,N/mm^2\n",
+ "pc=P/Ac #copper,N/mm^2\n",
+ "\n",
+ "print \"ps=\",round(ps,2),\"N/mm^2\"\n",
+ "print \"pc=\",round(pc,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.24 page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) p= 52.8 \tN/mm^2\n",
+ "(b) p= 27.8 \tN/mm^2\n",
+ " (iii) delta= 1.968 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "E=float(2*100000) #Young's modulus,N/mm^2\n",
+ "alpha=float(0.000012) #expansion coeffecient,/°c\n",
+ "L=float(12) #length,m\n",
+ "t=float(40-18) #temperature difference,°c\n",
+ "\n",
+ "delta=alpha*t*L*1000 #free expansion of the rails,mm \n",
+ "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n",
+ " \n",
+ "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n",
+ "\n",
+ "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n",
+ "\n",
+ "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n",
+ "\n",
+ "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n",
+ "\n",
+ "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n",
+ "\n",
+ "delta2=1.668 #mm\n",
+ "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n",
+ "\n",
+ "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n",
+ "\n",
+ "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n",
+ "\n",
+ "# If the stress developed is 20 N/mm2, then p = P/ A\n",
+ "p3=20 #stress developed,N/mm^2\n",
+ "delta3=delta-(p3*L*1000/E)\n",
+ "\n",
+ "print \" (iii) delta=\",round(delta3,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.25 page number 272\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress p= 360.0 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n",
+ "D=float(1.2*1000) #mm\n",
+ "\n",
+ "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n",
+ "\n",
+ "Ca=pi*D\n",
+ "Cb=pi*d\n",
+ "alphas=float(0.000012) #coefficient of expansion,/°C\n",
+ "t=150 #temperature change,°C\n",
+ "Es=2*100000 #young's modulus,N/mm^2\n",
+ "d=(Ca-Cb)/(alphas*t*pi)\n",
+ "\n",
+ "#when it cools expansion prevented\n",
+ "#delta=pi*(D-d)\n",
+ "delta=alphas*t*pi*d\n",
+ "\n",
+ "p=(delta*Es)/(pi*d) #stress,N/mm^2\n",
+ "\n",
+ "print \"stress p=\",round(p,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.26 page number 272\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 12907.3 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n",
+ "Es=200*1000 #Young's modulus of steel,N/mm^2\n",
+ "\n",
+ "alphaa=float(0.000011) #expansion coefficient,/°C\n",
+ "alphas=float(0.000012) #expansion coefficient,/°C\n",
+ "\n",
+ "Aa=600 #Area of aluminium portion,mm^2\n",
+ "As=400 #Area of steel, mm^2\n",
+ "La=float(1.5) #length of aluminium portion,m\n",
+ "Ls=float(3.0) #length of steel portion,m\n",
+ "t=18 #temperature,°C\n",
+ "\n",
+ "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n",
+ "\n",
+ "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n",
+ "\n",
+ "print \"P=\" ,round(P,1),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.27 page number 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Corresponding maximum stress = 120.0 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n",
+ "d2=float(50)\n",
+ "L=float(500) #length,mm\n",
+ "alpha=float(0.000012) #expansion coeffecient,/°C\n",
+ "t=25 #rise in temperture,°C\n",
+ "E=2*100000 #Young's modulus,N/mm^2\n",
+ "\n",
+ "delta=alpha*t*L\n",
+ "\n",
+ "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n",
+ "\n",
+ "P=(delta*pi*d1*d2*E)/(4*L)\n",
+ "Am=pi*pow(d1,2)/4\n",
+ "Ms=P/Am\n",
+ "\n",
+ "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.28 page number 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in steel= 12.17 N/mm^2\n",
+ "Stress in brass= 36.51 N/mm^2\n",
+ "Shear stress in pin 18.26 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Db=float(20) #diameter of brass rod,mm\n",
+ "Dse=float(40) #external diameter of steel tube,mm\n",
+ "Dsi=float(20) #internal diameter of steel tube,mm\n",
+ "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n",
+ "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n",
+ "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n",
+ "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n",
+ "t=60 #raise in temperature, °C\n",
+ "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n",
+ "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n",
+ "L=1200 #length,mm\n",
+ "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n",
+ "\n",
+ "#Horizontal equilibrium condition gives Pb = Ps, say P. \n",
+ "\n",
+ "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n",
+ "\n",
+ "ps=P/As\n",
+ "pb=P/Ab\n",
+ "\n",
+ "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n",
+ "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n",
+ "\n",
+ "#the pin resist the force P at the two cross- sections at junction of two bars.\n",
+ "\n",
+ "Shearstress=P/(2*Ab)\n",
+ "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.29 page number 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in length= 1.07 mm\n",
+ "Hoop stress f= 83.33 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "L=float(1000) #length of the bar at normal temperature,mm\n",
+ "As=float(50*10) #Area of steel,mm^2\n",
+ "Ac=float(40*5) #Area of copper,mm^2\n",
+ "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n",
+ "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n",
+ "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n",
+ "t=80 #raise by temperature, °C\n",
+ "Es=2*100000 #Young's modulus of steel,N/mm^2\n",
+ "Ec=1*100000 #Young's modulus of copper,N/mm^2\n",
+ "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n",
+ "Ps=2*Pc\n",
+ "\n",
+ "pc=Pc/Ac #Stress in copper,N/mm^2\n",
+ "ps=Ps/As #Stress in steel, N/mm^2\n",
+ "\n",
+ "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n",
+ "\n",
+ "\n",
+ "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n",
+ "\n",
+ "##example 8.30 page number 278\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "p=float(2) #internal pressure, N/mm^2\n",
+ "t=12 #thickness of thin cylinder,mm\n",
+ "D=float(1000) #internal diameter,mm\n",
+ "\n",
+ "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n",
+ "\n",
+ "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_JTyCJsL.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_JTyCJsL.ipynb
new file mode 100644
index 00000000..1204506a
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_JTyCJsL.ipynb
@@ -0,0 +1,1325 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter8-SIMPLE STRESSES AND STRAINS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.1 Page number243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sectional area= 201.06 mm^2\n",
+ "stress= 198.94 N/mm^2\n",
+ "strain= 0.000994718394324 N/mm^2\n",
+ "Elongation= 0.497 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(40000) #Load,N\n",
+ "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n",
+ "L=500 #length of circular rod,mm\n",
+ "d=float(16) #diameter of rod,mm\n",
+ " \n",
+ "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n",
+ "p=P/A #stress, N/mm^2\n",
+ "e=p/E #strain\n",
+ "delta=(P*L)/(A*E) #Elongation,mm\n",
+ "\n",
+ "print \"sectional area=\",round(A,2),\"mm^2\"\n",
+ "print \"stress=\",round(p,2),\"N/mm^2\"\n",
+ "print \"strain=\",e,\"N/mm^2\"\n",
+ "print \"Elongation=\",round(delta,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.2 Page number243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "area= 11.25 mm^2\n",
+ "Elongation= 1.6 mm\n",
+ "Hence, if measured length is 30.0 m.\n",
+ "Actual length is 30.0016 m\n",
+ "Actual length of line AB= 150.008 m.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "P=float(120) # force applied during measurement,N\n",
+ "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n",
+ "L=float(30) #length of Surveyor’s steel tape,mm\n",
+ " \n",
+ " \n",
+ "A=15*0.75 #area, mm^2\n",
+ "delta=((P*L*1000)/(A*E)) #Elongation,mm\n",
+ "\n",
+ "print \"area=\",round(A,2),\"mm^2\"\n",
+ "print \"Elongation=\",round(delta,3),\"mm\"\n",
+ "\n",
+ "print \"Hence, if measured length is\", L,\"m.\"\n",
+ "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n",
+ "\n",
+ "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.3 Page number 244\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Therefore, permissible stress\n",
+ "p= 142.857 N/mm^2\n",
+ "Load P= 160000.0 N\n",
+ "A= 1120.0 mm^2\n",
+ "d= 94.32 mm\n",
+ "t= 3.64 mm\n",
+ "Hence, use of light section is recommended.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Y=float(250) #Yield stress, N/mm^2\n",
+ "FOS=float(1.75) #Factor of safety\n",
+ "P=float(160) #Load,KN\n",
+ "\n",
+ "p=Y/FOS\n",
+ "\n",
+ "print \"Therefore, permissible stress\"\n",
+ "print \"p=\",round(p,3), \"N/mm^2\"\n",
+ "print \"Load P=\",P*1000,\"N\"\n",
+ "\n",
+ "#p=P/A\n",
+ "\n",
+ "A=P*1000/p #area,mm^2\n",
+ "\n",
+ "print \"A=\",round(A),\"mm^2\"\n",
+ "\n",
+ "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n",
+ "D=float(101.6) #outer diameter,mm\n",
+ "\n",
+ "d=sqrt(pow(D,2)-(4*A/pi))\n",
+ "\n",
+ "print \"d=\",round(d,2),\"mm\"\n",
+ "\n",
+ "t=(D-d)/2\n",
+ "print \"t=\",round(t,2),\"mm\"\n",
+ "\n",
+ "print \"Hence, use of light section is recommended.\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.4 page number 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Area= 314.16 mm^2\n",
+ "Stress at elastic limit= 324.68 N/mm^2\n",
+ "Young's modulus E= 12732.4 N/mm^22\n",
+ "Percentage elongation= 28.0 %\n",
+ "Percentage reduction in area= 43.75 %\n",
+ "Ultimate Tensile Stress= 0.41 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration \n",
+ "\n",
+ "d=float(20) #Diameter ,mm\n",
+ "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n",
+ "P=80 #Load for extension of o.25mm , KN\n",
+ "delta=float(0.25) #extension in specimen of steel,mm\n",
+ "L=200 #gauge length of specimen of steel,mm\n",
+ "Finalextension=float(56) #total extension at fracture,mm\n",
+ "\n",
+ "\n",
+ "A=(pi*pow(d,2))/4 #Area,mm^2\n",
+ "print \"Area=\", round(A,2),\"mm^2\"\n",
+ "\n",
+ "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n",
+ "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n",
+ "\n",
+ "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n",
+ "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n",
+ "\n",
+ "Percentageelongation=Finalextension*100/L #percentage elongation,%\n",
+ "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n",
+ "\n",
+ "Initialarea=(pi*pow(d,2))/4\n",
+ "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n",
+ "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n",
+ "\n",
+ "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n",
+ "\n",
+ "UltimateLoad=130 #Maximum Load=130,kN\n",
+ "UltimateTensileStress=UltimateLoad/A\n",
+ "\n",
+ "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.5 Page number247\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "E= 56277.19 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(40) #Load,KN\n",
+ "L1=150 #length of 1st portion,mm\n",
+ "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n",
+ "L2=250 #length of 2nd portion,mm\n",
+ "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n",
+ "L3=150 #length of 3rd portion,mm\n",
+ "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n",
+ "\n",
+ "#E,Young's modulus ,N/mm^2\n",
+ "\n",
+ "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n",
+ "\n",
+ "#Extension=(P*1000*L)/(A*E)\n",
+ "\n",
+ "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n",
+ "\n",
+ "print \"E=\",round(E,2),\"N/mm^2\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.6 Page number247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total extension of the bar= 0.5125 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(30) #Load,KN\n",
+ "L1=600 #length of 1st portion,mm\n",
+ "A1=40*20 #Area of 1st portion,mm^2\n",
+ "\n",
+ "E1=200000 # material 1 Young’s modulus,N/mm^2\n",
+ " \n",
+ "E2=100000 # material 2 Young’s modulus,N/mm^2\n",
+ " \n",
+ "\n",
+ "L2=800 #length of 2nd portion,mm\n",
+ "A2=30*20 #Area of 2nd portion,mm^2\n",
+ "\n",
+ "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n",
+ "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n",
+ "\n",
+ "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n",
+ "\n",
+ "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.7 Page number248\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "E= 200735.96 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(30) #Load,KN\n",
+ "L1=600 #length of 1st portion,mm\n",
+ "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n",
+ "L2=400 #length of 2nd portion,mm\n",
+ "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n",
+ "\n",
+ "#E,Young's modulus ,N/mm^2\n",
+ "\n",
+ "#Total extension= Extension of portion 1+Extension of portion 2\n",
+ "\n",
+ "#Extension=(P*1000*L)/(A*E)\n",
+ "\n",
+ "T=float(0.222) #Total extension of the bar,mm\n",
+ "\n",
+ "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n",
+ "\n",
+ "print \"E=\",round(E,2),\"N/mm^2\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.10 Page number 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "delta1= 0.2113 mm\n",
+ "there is calculation mistake in book\n",
+ "delta2= 0.48 mm^2\n",
+ "Percentage error= 55.977 %\n",
+ "there is calculation mistake in book\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#variable declaration\n",
+ "\n",
+ "t=10 #steel flat thickness,mm\n",
+ "b1=float(60) #tapering from b1 to b2\n",
+ "b2=40\n",
+ "L=600 #steel flat length\n",
+ "P=float(80) #Load,KN\n",
+ "E=2*100000 #Young's Modulus,N/mm^2\n",
+ "\n",
+ "#Extension of the tapering bar of rectangular section\n",
+ "\n",
+ "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n",
+ "\n",
+ "print \"delta1=\",round(delta1,4),\"mm\"\n",
+ "print \"there is calculation mistake in book\"\n",
+ "\n",
+ "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n",
+ "\n",
+ "Aav=(b1+b2)*t/2 #mm^2\n",
+ "\n",
+ "delta2=(P*1000*L)/(Aav*E) #mm\n",
+ "print\"delta2=\",round(delta2,3),\"mm^2\"\n",
+ "\n",
+ "P= (delta2-delta1)*100/delta2\n",
+ "\n",
+ "print\"Percentage error=\",round(P,3),\"%\"\n",
+ "\n",
+ "print \"there is calculation mistake in book\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.11 page number251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "delta1= 1.194 mm\n",
+ "delta2= 0.265 mm\n",
+ "Total extension 1.459 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(200) #loading,KN\n",
+ "E=200*1000\n",
+ "d1=40 #Young's modulus,N/mm^2\n",
+ "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n",
+ "L1=1500 #length of uniform portion,mm \n",
+ "d2=60 #diameter of tapered section,mm\n",
+ "L2=500 #length of tapered section,mm\n",
+ "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n",
+ "\n",
+ "#Extension of uniform portion\n",
+ "\n",
+ "delta1=(P*1000*L1)/(A*E)\n",
+ "\n",
+ "print \"delta1=\",round(delta1,3),\"mm\"\n",
+ "\n",
+ "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n",
+ "\n",
+ "print \"delta2=\",round(delta2,3),\"mm\"\n",
+ "\n",
+ "T=delta1 + delta2 \n",
+ "print \"Total extension\",round(T,3),\"mm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.13 page number259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Poisson's ratio= 0.3\n",
+ "E= 203718.33 N/mm^2\n",
+ "G= 78353.2 N/mm^2\n",
+ "K= 169765.27 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "P=float(60) #load,KN\n",
+ "d=float(25) #diameter,mm\n",
+ "A=pi*pow(d,2)/4 #Area,mm^2\n",
+ "L=float(200) #gauge length,mm\n",
+ "\n",
+ "delta=0.12 #extension,mm\n",
+ "deltad=0.0045 #contraction in diameter,mm\n",
+ "Linearstrain=delta/L\n",
+ "Lateralstrain=deltad/d\n",
+ "\n",
+ "Pr=Lateralstrain/Linearstrain\n",
+ "\n",
+ "print \"Poisson's ratio=\",round(Pr,1)\n",
+ "\n",
+ "E=(P*1000*L)/(A*delta)\n",
+ "\n",
+ "print \"E=\",round(E,2),\"N/mm^2\"\n",
+ "\n",
+ "G=E/(2*(1+Pr)) #Rigidity modulus\n",
+ "\n",
+ "print \"G=\",round(G,1),\"N/mm^2\"\n",
+ "\n",
+ "K=E/(3*(1-(2*Pr))) #bulk modulus\n",
+ "\n",
+ "print \"K=\",round(K,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.14 page number 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "G= 76923.1 N/mm^2\n",
+ "K= 166666.67 N/mm^2\n",
+ "change in volume 60.0 mm^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "E=float(2*100000) #Young's modulus,N/mm^2\n",
+ "Pr=float(0.3) #poisson's ratio\n",
+ "\n",
+ "G=E/(2*(1+Pr)) #Rigidity modulus\n",
+ "\n",
+ "K=E/(3*(1-2*(Pr))) #Bulk modulus\n",
+ "\n",
+ "print \"G=\", round(G,1),\"N/mm^2\"\n",
+ "\n",
+ "print \"K=\", round(K,2), \"N/mm^2\"\n",
+ "\n",
+ "P=60 #Load,kN\n",
+ "A=pi*pow(25,2)/4 #Area,mm^2\n",
+ "\n",
+ "Stress=P*1000/A #N/mm^2\n",
+ "#Linear strain,ex\n",
+ "\n",
+ "ex=Stress/E\n",
+ " \n",
+ "#Lateralstrain,ey,ez\n",
+ "\n",
+ "ey=-1*Pr*ex\n",
+ "ez=-1*Pr*ex\n",
+ "\n",
+ "#volumetric strain,ev=ex+ey+ez\n",
+ "\n",
+ "ev=ex+ey+ez\n",
+ "\n",
+ "v=pi*pow(25,2)*500/4\n",
+ "Changeinvolume=ev*v\n",
+ "\n",
+ "print\"change in volume\",round(Changeinvolume,2),\"mm^3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.15 page number261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in volume= 10.8 mm^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "# Let the x, y, z be the mutually perpendicular directions\n",
+ "\n",
+ "pr=float(0.3)\n",
+ "PX=float(15) #Loading in x-direction,KN\n",
+ "PY=float(80) #Loading in Y-direction(compressive),KN\n",
+ "PZ=float(180) #Loading in Z-direction,KN\n",
+ "\n",
+ "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n",
+ "\n",
+ "AX=float(10*30)\n",
+ "AY=float(10*400)\n",
+ "AZ=float(30*400)\n",
+ "\n",
+ "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n",
+ "\n",
+ "px=PX*1000/AX\n",
+ "py=PY*1000/AY\n",
+ "pz=PZ*1000/AZ\n",
+ "\n",
+ "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n",
+ "E=2*100000 #young's modulus,N/mm^2\n",
+ "\n",
+ "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n",
+ "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n",
+ "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n",
+ "\n",
+ "ev=ex+ey+ez #Volumetric strain\n",
+ "\n",
+ "volume=10*30*400\n",
+ "\n",
+ "Changeinvolume=ev*volume\n",
+ "\n",
+ "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.17 page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "poisson's Ratio= 0.346\n",
+ "Bulk modulus= 227500.0 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n",
+ "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n",
+ "\n",
+ "pr=(E/(2*G))-1\n",
+ "\n",
+ "print \"poisson's Ratio=\",round(pr,3)\n",
+ "\n",
+ "K=E/(3*(1-2*pr))\n",
+ "\n",
+ "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.18 page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Young's modulus= 102857.143 N\n",
+ "Poisson's Ratio 0.2857\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n",
+ "K=float(0.8*100000) #bulk modulus,N/mm^2\n",
+ "\n",
+ "E=(9*G*K)/(3*K+G)\n",
+ "\n",
+ "\n",
+ "print \"Young's modulus=\",round(E,3),\"N\"\n",
+ "\n",
+ "pr=(E/(2*G))-1\n",
+ "\n",
+ "print \"Poisson's Ratio\",round(pr,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.19 page number 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in aluminium strip= 23.08 N/mm^2\n",
+ "Stress in steel strip= 46.15 N/mm^2\n",
+ "Extension of the compound bar= 0.138 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "L=float(600) #compound bar of length,mm\n",
+ "P=float(60) #compound bar when axial tensile force ,KN\n",
+ "\n",
+ "Aa=float(40*20) #area of aluminium strip,mm^2\n",
+ "As=float(60*15) #area of steel strip,mm^2\n",
+ "\n",
+ "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n",
+ "Es=2*100000 # elastic modulus of steel,N/mm^2\n",
+ "\n",
+ "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n",
+ "#From compatibility condition, deltaAL=deltaS\n",
+ "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n",
+ "Ps=Pa*((As*Es)/(Aa*Ea))\n",
+ "\n",
+ "Sias=Pa/Aa\n",
+ "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n",
+ "Siss=Ps/As\n",
+ "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n",
+ "\n",
+ "L=600\n",
+ "#Extension of the compound bar \n",
+ "deltal=(Pa*L)/(Aa*Ea)\n",
+ "print\"Extension of the compound bar=\",round(deltal,3),\"mm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.20 page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in Copper= 75.76 N/mm^2\n",
+ "stress in Steel= 126.27 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n",
+ "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n",
+ "\n",
+ "di=float(25) #internal diameter,mm\n",
+ "de=float(40) #external diameter,mm\n",
+ "\n",
+ "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n",
+ "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n",
+ "P=120 #load, KN\n",
+ "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n",
+ "#From compatibility condition,deltaS=deltaC\n",
+ "\n",
+ "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n",
+ "Ps=Pc*((As*Es)/(Ac*Ec))\n",
+ "\n",
+ "SIC=Pc/Ac #stress in copper, N/mm^2\n",
+ "SIS=Ps/As #stress in steel,N/mm^2\n",
+ "\n",
+ "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n",
+ "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.21 page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in Concrete= 4.51 N/mm^2\n",
+ "stress in Steel= 81.2 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "#Es/Ec=18(given)\n",
+ "Er=float(18) #young modulus ratio Er=Es/Ec\n",
+ "d=float(16) #steel bar diameter,mm\n",
+ "#8 steel bars\n",
+ "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n",
+ "Ac=(300*500)-As #Area of concrete,mm^2\n",
+ "\n",
+ "P=800 #Compressive force, KN\n",
+ "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n",
+ "#From compatibility condition,deltaS=deltaC\n",
+ "\n",
+ "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n",
+ "Ps=Pc*((As*Er)/(Ac))\n",
+ "\n",
+ "SIC=Pc/Ac #stress in Concrete, N/mm^2\n",
+ "SIS=Ps/As #stress in steel,N/mm^2\n",
+ "\n",
+ "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n",
+ "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.22 page number 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in Aluminium= 66.96 N/mm^2\n",
+ "stress in Steel= 89.29 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n",
+ "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n",
+ "Ls=240 #length of steel,mm\n",
+ "La=160 #length of aluminium,mm\n",
+ "Aa=1200 #Area of aluminium,mm^2\n",
+ "As=1000 #Area of steel,mm^2\n",
+ "P=250 #load, KN\n",
+ "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n",
+ "#From compatibility condition,deltaS=deltaC\n",
+ "\n",
+ "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n",
+ "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n",
+ "\n",
+ "SIA=Pa/Aa #stress in aluminium, N/mm^2\n",
+ "SIS=Ps/As #stress in steel,N/mm^2\n",
+ "\n",
+ "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n",
+ "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.23 page number 268\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ps= 91.73 N/mm^2\n",
+ "pc= 44.96 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n",
+ "#Let the magnitude of force be P. Due to quarter turn of the nut\n",
+ "\n",
+ "#[Note. Pitch means advancement of nut in one full turn] \n",
+ "\n",
+ "Ls=float(600) #length of whole assembly,mm\n",
+ "Lc=float(600) #length of whole assembly,mm\n",
+ "delta=float(0.5)\n",
+ "ds=float(20) #diameter,mm\n",
+ "di=float(28) #internal diameter,mm\n",
+ "de=float(40) #external diameter,mm\n",
+ "Es=float(2*100000) #Young's modulus, N/mm^2\n",
+ "Ec=float(1.2*100000)\n",
+ "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n",
+ "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n",
+ "\n",
+ "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n",
+ "\n",
+ "ps=P/As #stress,N/mm^2\n",
+ "pc=P/Ac #copper,N/mm^2\n",
+ "\n",
+ "print \"ps=\",round(ps,2),\"N/mm^2\"\n",
+ "print \"pc=\",round(pc,2),\"N/mm^2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.24 page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) p= 52.8 \tN/mm^2\n",
+ "(b) p= 27.8 \tN/mm^2\n",
+ " (iii) delta= 1.968 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "E=float(2*100000) #Young's modulus,N/mm^2\n",
+ "alpha=float(0.000012) #expansion coeffecient,/°c\n",
+ "L=float(12) #length,m\n",
+ "t=float(40-18) #temperature difference,°c\n",
+ "\n",
+ "delta=alpha*t*L*1000 #free expansion of the rails,mm \n",
+ "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n",
+ " \n",
+ "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n",
+ "\n",
+ "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n",
+ "\n",
+ "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n",
+ "\n",
+ "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n",
+ "\n",
+ "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n",
+ "\n",
+ "delta2=1.668 #mm\n",
+ "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n",
+ "\n",
+ "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n",
+ "\n",
+ "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n",
+ "\n",
+ "# If the stress developed is 20 N/mm2, then p = P/ A\n",
+ "p3=20 #stress developed,N/mm^2\n",
+ "delta3=delta-(p3*L*1000/E)\n",
+ "\n",
+ "print \" (iii) delta=\",round(delta3,3),\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.25 page number 272\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress p= 360.0 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n",
+ "D=float(1.2*1000) #mm\n",
+ "\n",
+ "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n",
+ "\n",
+ "Ca=pi*D\n",
+ "Cb=pi*d\n",
+ "alphas=float(0.000012) #coefficient of expansion,/°C\n",
+ "t=150 #temperature change,°C\n",
+ "Es=2*100000 #young's modulus,N/mm^2\n",
+ "d=(Ca-Cb)/(alphas*t*pi)\n",
+ "\n",
+ "#when it cools expansion prevented\n",
+ "#delta=pi*(D-d)\n",
+ "delta=alphas*t*pi*d\n",
+ "\n",
+ "p=(delta*Es)/(pi*d) #stress,N/mm^2\n",
+ "\n",
+ "print \"stress p=\",round(p,2),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.26 page number 272\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P= 12907.3 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n",
+ "Es=200*1000 #Young's modulus of steel,N/mm^2\n",
+ "\n",
+ "alphaa=float(0.000011) #expansion coefficient,/°C\n",
+ "alphas=float(0.000012) #expansion coefficient,/°C\n",
+ "\n",
+ "Aa=600 #Area of aluminium portion,mm^2\n",
+ "As=400 #Area of steel, mm^2\n",
+ "La=float(1.5) #length of aluminium portion,m\n",
+ "Ls=float(3.0) #length of steel portion,m\n",
+ "t=18 #temperature,°C\n",
+ "\n",
+ "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n",
+ "\n",
+ "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n",
+ "\n",
+ "print \"P=\" ,round(P,1),\"N\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example8.27 page number 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Corresponding maximum stress = 120.0 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n",
+ "d2=float(50)\n",
+ "L=float(500) #length,mm\n",
+ "alpha=float(0.000012) #expansion coeffecient,/°C\n",
+ "t=25 #rise in temperture,°C\n",
+ "E=2*100000 #Young's modulus,N/mm^2\n",
+ "\n",
+ "delta=alpha*t*L\n",
+ "\n",
+ "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n",
+ "\n",
+ "P=(delta*pi*d1*d2*E)/(4*L)\n",
+ "Am=pi*pow(d1,2)/4\n",
+ "Ms=P/Am\n",
+ "\n",
+ "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.28 page number 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "stress in steel= 12.17 N/mm^2\n",
+ "Stress in brass= 36.51 N/mm^2\n",
+ "Shear stress in pin 18.26 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Db=float(20) #diameter of brass rod,mm\n",
+ "Dse=float(40) #external diameter of steel tube,mm\n",
+ "Dsi=float(20) #internal diameter of steel tube,mm\n",
+ "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n",
+ "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n",
+ "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n",
+ "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n",
+ "t=60 #raise in temperature, °C\n",
+ "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n",
+ "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n",
+ "L=1200 #length,mm\n",
+ "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n",
+ "\n",
+ "#Horizontal equilibrium condition gives Pb = Ps, say P. \n",
+ "\n",
+ "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n",
+ "\n",
+ "ps=P/As\n",
+ "pb=P/Ab\n",
+ "\n",
+ "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n",
+ "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n",
+ "\n",
+ "#the pin resist the force P at the two cross- sections at junction of two bars.\n",
+ "\n",
+ "Shearstress=P/(2*Ab)\n",
+ "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 8.29 page number 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in length= 1.07 mm\n",
+ "Hoop stress f= 83.33 N/mm^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "L=float(1000) #length of the bar at normal temperature,mm\n",
+ "As=float(50*10) #Area of steel,mm^2\n",
+ "Ac=float(40*5) #Area of copper,mm^2\n",
+ "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n",
+ "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n",
+ "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n",
+ "t=80 #raise by temperature, °C\n",
+ "Es=2*100000 #Young's modulus of steel,N/mm^2\n",
+ "Ec=1*100000 #Young's modulus of copper,N/mm^2\n",
+ "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n",
+ "Ps=2*Pc\n",
+ "\n",
+ "pc=Pc/Ac #Stress in copper,N/mm^2\n",
+ "ps=Ps/As #Stress in steel, N/mm^2\n",
+ "\n",
+ "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n",
+ "\n",
+ "\n",
+ "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n",
+ "\n",
+ "##example 8.30 page number 278\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "p=float(2) #internal pressure, N/mm^2\n",
+ "t=12 #thickness of thin cylinder,mm\n",
+ "D=float(1000) #internal diameter,mm\n",
+ "\n",
+ "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n",
+ "\n",
+ "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_f3CqV2f.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_f3CqV2f.ipynb
new file mode 100644
index 00000000..6496faeb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_f3CqV2f.ipynb
@@ -0,0 +1,466 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter9-Beams"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.1 page number 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 18.8684 KN\n",
+ "RA= 29.989 KN\n",
+ "alpha= 25.21 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "P1=float(10) #Vertical down Load at 4m from A,KN\n",
+ "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n",
+ "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n",
+ "theta2=30\n",
+ "theta3=45\n",
+ "#horizontal,vertical component at A is Ha,Va respectively.\n",
+ "\n",
+ "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n",
+ "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n",
+ "\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "#now vertical component\n",
+ "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n",
+ "\n",
+ "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n",
+ "\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Va/Ha))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.2 page number 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 100.4475 KN\n",
+ "RA= 87.0172 KN\n",
+ "alpha= 79.45 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n",
+ "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n",
+ "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n",
+ "theta1=60 \n",
+ "theta2=75\n",
+ "theta3=60\n",
+ "thetaRb=60\n",
+ "#horizontal,vertical component at A is Ha,Va respectively.\n",
+ "\n",
+ "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n",
+ "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "#now vertical component\n",
+ "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n",
+ "\n",
+ "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n",
+ "\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Va/Ha))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.3 page number 288\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RA= 91.6503 KN\n",
+ "HB= 42.4264 KN\n",
+ "VB= 90.7761 KN\n",
+ "RB= 100.2013 KN\n",
+ "alpha= 64.95 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "P1=float(20) #vertical down Load at 2m from A,KN\n",
+ "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n",
+ "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n",
+ "\n",
+ "theta3=45\n",
+ "#horizontal,vertical component at B is Hb,Vb respectively.\n",
+ "\n",
+ "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n",
+ "\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "Hb=P3*cos(theta3*pi/180)\n",
+ "print \"HB=\",round(Hb,4),\"KN\"\n",
+ "#now vertical component\n",
+ "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n",
+ "print \"VB=\",round(Vb,4),\"KN\"\n",
+ "\n",
+ "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n",
+ "\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Vb/Hb))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.4 page number 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no horizontal force HA=0\n",
+ "VA= 74.0 KN\n",
+ "MA= 148.0 KN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "#Let the reactions at A be Ha, Va and Ma\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(20) #vertical down Load at 2m from A,KN\n",
+ "P2=float(12) #vertical down Load at 3m from A,KN \n",
+ "P3=float(10) #vertical down Load at 4m from A,KN\n",
+ "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n",
+ "##horizontal,vertical component at A is Ha,Va respectively.\n",
+ "print\"no horizontal force \",\"HA=0\"\n",
+ "Va=Pu*2+P1+P2+P3\n",
+ "print \"VA=\", round(Va,2),\"KN\"\n",
+ "Ma=Pu*2*1+P1*2+P2*3+P3*4\n",
+ "print \"MA=\", round(Ma,2),\"KN-m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.5 page number 288\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no horizontal force HA=0\n",
+ "VA= 65.0 KN\n",
+ "MA= 165.0 KN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "#Let the reactions at A be Va and Ma\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(15) #vertical down Load at 3m from A,KN\n",
+ "P2=float(10) #vertical down Load at 5m from A,KN \n",
+ "M=float(30) #CW moment at 4m distance from A, KN-m\n",
+ "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n",
+ "##horizontal,vertical component at A is Ha,Va respectively.\n",
+ "print\"no horizontal force \",\"HA=0\"\n",
+ "Va=Pu*2+P1+P2\n",
+ "print \"VA=\", round(Va,2),\"KN\"\n",
+ "Ma=Pu*2*1+P1*3+P2*5+M\n",
+ "print \"MA=\", round(Ma,2),\"KN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.6 page number 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 100.0 KN\n",
+ "RA= 30.0 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(30) #vertical down Load at 1m from A,KN\n",
+ "P2=float(40) #vertical down Load at 6.5m from A,KN \n",
+ "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n",
+ "\n",
+ "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n",
+ "print \"RB=\", round(Rb,2),\"KN\"\n",
+ "Ra=Pu*3+P1+P2-Rb\n",
+ "print \"RA=\", round(Ra,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.7 page number 289\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no horizontal force HA=0\n",
+ "VB= 50.0 KN\n",
+ "VA= 70.0 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "#Let the reactions at A be Va and Ma.\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(60) #vertical down Load at 4m from A to right,KN\n",
+ "P2=float(20) #vertical down Load at 11m from A to right,KN \n",
+ "M=float(30) #CW moment at 7m distance from A to right, KN-m\n",
+ "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n",
+ "##horizontal,vertical component at A is Ha,Va respectively.\n",
+ "print\"no horizontal force \",\"HA=0\"\n",
+ "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n",
+ "print \"VB=\", round(Vb,2),\"KN\"\n",
+ "Va=Pu*2+P1+P2-Vb\n",
+ "print \"VA=\", round(Va,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.8 page number 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 71.011 KN\n",
+ "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n",
+ "RA= 23.3666 KN\n",
+ "alpha= 24.79 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ " \n",
+ "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n",
+ "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n",
+ "theta1=45\n",
+ "M=40 #ACW moment at 3m from A, KN-m\n",
+ "#horizontal,vertical component at A is Ha,Va respectively.\n",
+ "\n",
+ "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n",
+ "\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "Ha=P1*cos(theta1*pi/180)\n",
+ "\n",
+ "#now vertical component\n",
+ "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n",
+ "\n",
+ "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n",
+ "\n",
+ "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n",
+ "\n",
+ "Va1=-1*Va\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Va1/Ha))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.9 page number 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "X= 5.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ " \n",
+ "#Let the left support C be at a distance x metres from A. \n",
+ "\n",
+ "P1=float(30) #vertical down load at A,KN\n",
+ "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n",
+ "P2=float(50) #vertical down load at B, KN\n",
+ "\n",
+ "#Rc=Rd(given) reaction at C & D is equal.\n",
+ "\n",
+ "Rc=(P1+P2+Pu*20)/2\n",
+ "Rd=Rc\n",
+ "\n",
+ "#taking moment at A \n",
+ "x=(((Pu*20*10+P2*20)/100)-12)/2\n",
+ "\n",
+ "print \"X=\", round(x,2),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_lYxlTcT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_lYxlTcT.ipynb
new file mode 100644
index 00000000..6496faeb
--- /dev/null
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_lYxlTcT.ipynb
@@ -0,0 +1,466 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter9-Beams"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.1 page number 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 18.8684 KN\n",
+ "RA= 29.989 KN\n",
+ "alpha= 25.21 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "P1=float(10) #Vertical down Load at 4m from A,KN\n",
+ "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n",
+ "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n",
+ "theta2=30\n",
+ "theta3=45\n",
+ "#horizontal,vertical component at A is Ha,Va respectively.\n",
+ "\n",
+ "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n",
+ "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n",
+ "\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "#now vertical component\n",
+ "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n",
+ "\n",
+ "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n",
+ "\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Va/Ha))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.2 page number 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 100.4475 KN\n",
+ "RA= 87.0172 KN\n",
+ "alpha= 79.45 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n",
+ "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n",
+ "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n",
+ "theta1=60 \n",
+ "theta2=75\n",
+ "theta3=60\n",
+ "thetaRb=60\n",
+ "#horizontal,vertical component at A is Ha,Va respectively.\n",
+ "\n",
+ "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n",
+ "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "#now vertical component\n",
+ "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n",
+ "\n",
+ "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n",
+ "\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Va/Ha))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.3 page number 288\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RA= 91.6503 KN\n",
+ "HB= 42.4264 KN\n",
+ "VB= 90.7761 KN\n",
+ "RB= 100.2013 KN\n",
+ "alpha= 64.95 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "P1=float(20) #vertical down Load at 2m from A,KN\n",
+ "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n",
+ "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n",
+ "\n",
+ "theta3=45\n",
+ "#horizontal,vertical component at B is Hb,Vb respectively.\n",
+ "\n",
+ "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n",
+ "\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "Hb=P3*cos(theta3*pi/180)\n",
+ "print \"HB=\",round(Hb,4),\"KN\"\n",
+ "#now vertical component\n",
+ "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n",
+ "print \"VB=\",round(Vb,4),\"KN\"\n",
+ "\n",
+ "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n",
+ "\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Vb/Hb))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.4 page number 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no horizontal force HA=0\n",
+ "VA= 74.0 KN\n",
+ "MA= 148.0 KN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "#Let the reactions at A be Ha, Va and Ma\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(20) #vertical down Load at 2m from A,KN\n",
+ "P2=float(12) #vertical down Load at 3m from A,KN \n",
+ "P3=float(10) #vertical down Load at 4m from A,KN\n",
+ "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n",
+ "##horizontal,vertical component at A is Ha,Va respectively.\n",
+ "print\"no horizontal force \",\"HA=0\"\n",
+ "Va=Pu*2+P1+P2+P3\n",
+ "print \"VA=\", round(Va,2),\"KN\"\n",
+ "Ma=Pu*2*1+P1*2+P2*3+P3*4\n",
+ "print \"MA=\", round(Ma,2),\"KN-m\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.5 page number 288\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no horizontal force HA=0\n",
+ "VA= 65.0 KN\n",
+ "MA= 165.0 KN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "#Let the reactions at A be Va and Ma\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(15) #vertical down Load at 3m from A,KN\n",
+ "P2=float(10) #vertical down Load at 5m from A,KN \n",
+ "M=float(30) #CW moment at 4m distance from A, KN-m\n",
+ "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n",
+ "##horizontal,vertical component at A is Ha,Va respectively.\n",
+ "print\"no horizontal force \",\"HA=0\"\n",
+ "Va=Pu*2+P1+P2\n",
+ "print \"VA=\", round(Va,2),\"KN\"\n",
+ "Ma=Pu*2*1+P1*3+P2*5+M\n",
+ "print \"MA=\", round(Ma,2),\"KN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.6 page number 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 100.0 KN\n",
+ "RA= 30.0 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(30) #vertical down Load at 1m from A,KN\n",
+ "P2=float(40) #vertical down Load at 6.5m from A,KN \n",
+ "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n",
+ "\n",
+ "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n",
+ "print \"RB=\", round(Rb,2),\"KN\"\n",
+ "Ra=Pu*3+P1+P2-Rb\n",
+ "print \"RA=\", round(Ra,2),\"KN\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.7 page number 289\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "no horizontal force HA=0\n",
+ "VB= 50.0 KN\n",
+ "VA= 70.0 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "#Let the reactions at A be Va and Ma.\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ "\n",
+ "P1=float(60) #vertical down Load at 4m from A to right,KN\n",
+ "P2=float(20) #vertical down Load at 11m from A to right,KN \n",
+ "M=float(30) #CW moment at 7m distance from A to right, KN-m\n",
+ "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n",
+ "##horizontal,vertical component at A is Ha,Va respectively.\n",
+ "print\"no horizontal force \",\"HA=0\"\n",
+ "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n",
+ "print \"VB=\", round(Vb,2),\"KN\"\n",
+ "Va=Pu*2+P1+P2-Vb\n",
+ "print \"VA=\", round(Va,2),\"KN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.8 page number 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RB= 71.011 KN\n",
+ "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n",
+ "RA= 23.3666 KN\n",
+ "alpha= 24.79 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,atan,sqrt,cos,sin\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ " \n",
+ "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n",
+ "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n",
+ "theta1=45\n",
+ "M=40 #ACW moment at 3m from A, KN-m\n",
+ "#horizontal,vertical component at A is Ha,Va respectively.\n",
+ "\n",
+ "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n",
+ "\n",
+ "print \"RB=\",round(Rb,4),\"KN\"\n",
+ "\n",
+ "Ha=P1*cos(theta1*pi/180)\n",
+ "\n",
+ "#now vertical component\n",
+ "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n",
+ "\n",
+ "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n",
+ "\n",
+ "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n",
+ "\n",
+ "Va1=-1*Va\n",
+ "print \"RA=\",round(Ra,4),\"KN\"\n",
+ "\n",
+ "alpha=(atan(Va1/Ha))*180/pi\n",
+ "\n",
+ "print \"alpha=\",round(alpha,2),\"°\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# example 9.9 page number 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "X= 5.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#variable declaration\n",
+ "\n",
+ "#summation of all horizontal forces is zero & vertical forces is zero.\n",
+ " \n",
+ "#Let the left support C be at a distance x metres from A. \n",
+ "\n",
+ "P1=float(30) #vertical down load at A,KN\n",
+ "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n",
+ "P2=float(50) #vertical down load at B, KN\n",
+ "\n",
+ "#Rc=Rd(given) reaction at C & D is equal.\n",
+ "\n",
+ "Rc=(P1+P2+Pu*20)/2\n",
+ "Rd=Rc\n",
+ "\n",
+ "#taking moment at A \n",
+ "x=(((Pu*20*10+P2*20)/100)-12)/2\n",
+ "\n",
+ "print \"X=\", round(x,2),\"m\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}