summaryrefslogtreecommitdiff
path: root/3137/CH8
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /3137/CH8
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '3137/CH8')
-rwxr-xr-x3137/CH8/EX8.2/Ex8_2.sce34
-rwxr-xr-x3137/CH8/EX8.3/Ex8_3.sce92
-rwxr-xr-x3137/CH8/EX8.5/Ex8_5.sce61
3 files changed, 101 insertions, 86 deletions
diff --git a/3137/CH8/EX8.2/Ex8_2.sce b/3137/CH8/EX8.2/Ex8_2.sce
index 0b9566048..2a80d8895 100755
--- a/3137/CH8/EX8.2/Ex8_2.sce
+++ b/3137/CH8/EX8.2/Ex8_2.sce
@@ -1,16 +1,18 @@
-//Initilization of variables
-//length matrix
-L1=[0,4,6] //m
-//Bending moment matrix
-B=[0,400,0] //N.m
-//Shear force plotting
-//Here the left side and right side lengths are considered as close as 4 to keep up with right and left distinctions
-L=[0,3.999,4,5.99998,6]
-S=[100,100,-200,-200,0]
-//Calculations cum Result
-subplot(221)
-plot(L1,B)
-xtitle("Bending Moment Diagram","Span","Bending Moment")
-subplot(222)
-plot(L,S,L,0)
-xtitle("Shear Force Diagram","Span","Shear Force")
+//Initilization of variables
+//length matrix
+L1=[0,4,6] //m
+//Bending moment matrix
+B=[0,400,0] //N.m
+//Shear force plotting
+//Here the left side and right side lengths are considered as close as 4 to keep up with right and left distinctions
+L=[0,3.999,4,5.99998,6]
+S=[100,100,-200,-200,0]
+//Calculations cum Result
+subplot(221)
+plot(L1,B)
+xtitle("Bending Moment Diagram","Span","Bending Moment")
+subplot(222)
+plot(L,S)
+mtlb_hold on
+plot(L, zeros(length(L),1))
+xtitle("Shear Force Diagram","Span","Shear Force") \ No newline at end of file
diff --git a/3137/CH8/EX8.3/Ex8_3.sce b/3137/CH8/EX8.3/Ex8_3.sce
index 35a729c18..3c19ed4c0 100755
--- a/3137/CH8/EX8.3/Ex8_3.sce
+++ b/3137/CH8/EX8.3/Ex8_3.sce
@@ -1,41 +1,51 @@
-//Initilization of variables
-w=196 //N/m
-M_app=4000 //N.m
-L=6 //m
-//Calculations
-//Taking Moment about Point L and equating it to 0
-R_r=(M_app+w*L*L*0.5)/(3*L) //N
-//Taking Moment about Point R and equating it to 0
-R_l= ((((2*L)+(L/2))*(w*L))-(M_app))/(3*L) //N
-//finding point of zero shear
-a=R_l/w
-//defining x
-x0=[0,18]
-x=[0,0.5,1,1.5,2,2.5,3,3.5,a,4,4.5,5,5.5,6] //for 0<x<6
-x1=[6,12] //for6<x<12
-x2=[12,18] //for 12<x<18
-xv=[6,12,18] //specially for shear force
-xo=[12.001,12.002] //Straight line plot
-//Shear Force Calculations
-//Summing forces in vertical direction and equating to 0
-V1=R_l-w*x //N for 0<x<6
-V2=R_l-w*L //N for 6<x<18
-//Bending Moment Calculations
-M1=R_l*x-(w*x^2*0.5) //N.m for 0<x<6
-M2=R_l*x1-((w*L)*(x1-3)) //N.m for 6<x<12
-M3=R_l*x2-((w*L)*(x2-3))+M_app //N.m for 12<x<18
-Mo=[-1464.8652,2509.3333]
-//Maximum bending moment
-M_max=R_l*a*0.5 //N.m
-//Plotting
-subplot(221)
-plot(x,V1,xv,V2,x0,0)
-xtitle('Shear Force Diagram',"Span","Shear Force")
-subplot(222)
-plot(x,M1,x1,M2,x2,M3,x0,0,xo,Mo)
-xtitle('Bending Moment Diagram',"Span","Bending Moment")
-//Result
-clc
-printf('The value of reactions are R_l=%fN and R_r=%fN\n',R_l,R_r)
-printf('The point of maximum bending moment is %f meters from left support nad maximum bending moment is %fN-m\n',a,M_max)
-printf('The bending moment and shear force diagrams have been plotted')
+//Initilization of variables
+w=196 //N/m
+M_app=4000 //N.m
+L=6 //m
+//Calculations
+//Taking Moment about Point L and equating it to 0
+R_r=(M_app+w*L*L*0.5)/(3*L) //N
+//Taking Moment about Point R and equating it to 0
+R_l= ((((2*L)+(L/2))*(w*L))-(M_app))/(3*L) //N
+//finding point of zero shear
+a=R_l/w
+//defining x
+x0=[0,18]
+x=[0,0.5,1,1.5,2,2.5,3,3.5,a,4,4.5,5,5.5,6] //for 0<x<6
+x1=[6,12] //for6<x<12
+x2=[12,18] //for 12<x<18
+xv=[6,12,18] //specially for shear force
+xo=[12.001,12.002] //Straight line plot
+//Shear Force Calculations
+//Summing forces in vertical direction and equating to 0
+V1=R_l-w*x //N for 0<x<6
+V2=R_l-w*L //N for 6<x<18
+//Bending Moment Calculations
+M1=R_l*x-(w*x^2*0.5) //N.m for 0<x<6
+M2=R_l*x1-((w*L)*(x1-3)) //N.m for 6<x<12
+M3=R_l*x2-((w*L)*(x2-3))+M_app //N.m for 12<x<18
+Mo=[-1464.8652,2509.3333]
+//Maximum bending moment
+M_max=R_l*a*0.5 //N.m
+//Plotting
+subplot(221)
+plot(x,V1)
+mtlb_hold on
+plot(xv,V2*ones(length(xv),1))
+plot(x0,zeros(length(x0),1))
+mtlb_hold off
+xtitle('Shear Force Diagram',"Span","Shear Force")
+subplot(222)
+plot(x,M1)
+mtlb_hold on
+plot(x1,M2)
+plot(x2,M3)
+plot(x0,zeros(length(x0),1))
+plot(xo,Mo)
+mtlb_hold off
+xtitle('Bending Moment Diagram',"Span","Bending Moment")
+//Result
+
+printf('The value of reactions are R_l=%fN and R_r=%fN\n',R_l,R_r)
+printf('The point of maximum bending moment is %f meters from left support nad maximum bending moment is %fN-m\n',a,M_max)
+printf('The bending moment and shear force diagrams have been plotted') \ No newline at end of file
diff --git a/3137/CH8/EX8.5/Ex8_5.sce b/3137/CH8/EX8.5/Ex8_5.sce
index 426ae14a9..19fa8e967 100755
--- a/3137/CH8/EX8.5/Ex8_5.sce
+++ b/3137/CH8/EX8.5/Ex8_5.sce
@@ -1,29 +1,32 @@
-//Initlization of variables
-F1=2000 //lb
-w=100 //lb/ft
-//Calculations
-R_r=(-F1*5+w*14*13)/20 //lb
-R_l=(F1*25+w*14*7)/20 //lb
-//Shear Force matrix
-V=[-2000,-2000,990,990,-410,0] //lb
-//Bending Moment matrix
-B=[0,-10000,-4060,840,0]
-//Length matrix for shear force
-X_v=[0,5,5.0001,11,20.89999,20.9]
-//Length matrix for bendimg moment
-X_b=[0,5,11,19.9,20.9]
-//Plotting
-subplot(221)
-plot(X_v,V,X_v,0)
-xlabel("Shear Force Diagram","Span","Shear Force")
-subplot(222)
-plot(X_b,B,X_b,0)
-xlabel("Bending Moment Diagram","Span","Bending Moment")
-//Result
-clc
-printf('The bending Moment and Shear Force diagrams have been plotted\n')
-//Note
-//The textbook does not specify the span and hence there seems to be a disagreement between the textbook and scilab solution.here the values have just been plotted
-
-
-
+//Initlization of variables
+F1=2000 //lb
+w=100 //lb/ft
+//Calculations
+R_r=(-F1*5+w*14*13)/20 //lb
+R_l=(F1*25+w*14*7)/20 //lb
+//Shear Force matrix
+V=[-2000,-2000,990,990,-410,0] //lb
+//Bending Moment matrix
+B=[0,-10000,-4060,840,0]
+//Length matrix for shear force
+X_v=[0,5,5.0001,11,20.89999,20.9]
+//Length matrix for bending moment
+X_b=[0,5,11,19.9,20.9]
+//Plotting
+subplot(221)
+plot(X_v,V)
+mtlb_hold on
+plot(X_v,zeros(1,length(X_v)))
+mtlb_hold off
+xlabel("Shear Force Diagram","Span","Shear Force")
+subplot(222)
+plot(X_b,B)
+mtlb_hold on
+plot(X_b,zeros(1,length(X_b)))
+mtlb_hold off
+xlabel("Bending Moment Diagram","Span","Bending Moment")
+//Result
+clc
+printf('The bending Moment and Shear Force diagrams have been plotted\n')
+//Note
+//The textbook does not specify the span and hence there seems to be a disagreement between the textbook and scilab solution.here the values have just been plotted \ No newline at end of file