Problem 4: Consider a simply-supported beam with a rectangular cross-section, wi
ID: 2073912 • Letter: P
Question
Problem 4: Consider a simply-supported beam with a rectangular cross-section, with the setup shown below. Write a MATLAB code that will calculate the bending moments M(r), shear forces (x), maximal tension stresses (x), maximal shear stresses (x) and deflection (x). Input parameters are: length 1, load q, cross-section width b and height h. Define the parameter x as a vector of linearly spaced values between 0 and 1 using an increment of//N. Your results for M, l, o. and should be also vectors. Represent your results as diagrams (i.e. plot the distribution of M, l, , and along the beam). For this work, assume that 10 m, q=20 kN/m, E-30 GPa, b-0.2 m, /i-0.4 m and N-60 (30 points). M(x)=24q(12/r-12x') 3 V(r 3(x)= (-x' + 21r"-l's) v(x)=24q(121-240 24EI o(x- r(x) =Explanation / Answer
CODE:
**************************************************************
b=0.2;
h=0.4;
I=b*h^3/12;
Ymax=h/2;
A=b*h;
x=linspace(0,l,60)
def=(q/24*E*I).*(-x.^4+2*l*x.^3-l^3*x)
plot(x,def);
xlabel('x,[m]');
ylabel('deflection,[m]');
hold on
M=(q/24)*(12*l*x-12*x.^3)
xlabel('x,[m]');
ylabel('bending moment,[Nm]');
hold on
V=(q/24)*(12*l-24*x)
xlabel('x,[m]');
ylabel('Shear force,[N]');
hold on
sigma=M*Ymax/I
xlabel('x,[m]');
ylabel('Bending Stress,[N/m^2]');
hold on
tou=(3/2)*(V/A)
xlabel('x,[m]');
ylabel('Shear stress,[N/m^2]');
hold off
**********************************************************************
OUTPUT:
x =
Columns 1 through 5
0 0.1695 0.3390 0.5085 0.6780
Columns 6 through 10
0.8475 1.0169 1.1864 1.3559 1.5254
Columns 11 through 15
1.6949 1.8644 2.0339 2.2034 2.3729
Columns 16 through 20
2.5424 2.7119 2.8814 3.0508 3.2203
Columns 21 through 25
3.3898 3.5593 3.7288 3.8983 4.0678
Columns 26 through 30
4.2373 4.4068 4.5763 4.7458 4.9153
Columns 31 through 35
5.0847 5.2542 5.4237 5.5932 5.7627
Columns 36 through 40
5.9322 6.1017 6.2712 6.4407 6.6102
Columns 41 through 45
6.7797 6.9492 7.1186 7.2881 7.4576
Columns 46 through 50
7.6271 7.7966 7.9661 8.1356 8.3051
Columns 51 through 55
8.4746 8.6441 8.8136 8.9831 9.1525
Columns 56 through 60
9.3220 9.4915 9.6610 9.8305 10.0000
def =
1.0e+13 *
Columns 1 through 5
0 -0.4517 -0.9019 -1.3491 -1.7919
Columns 6 through 10
-2.2288 -2.6586 -3.0801 -3.4919 -3.8929
Columns 11 through 15
-4.2821 -4.6583 -5.0206 -5.3680 -5.6997
Columns 16 through 20
-6.0146 -6.3122 -6.5916 -6.8521 -7.0932
Columns 21 through 25
-7.3142 -7.5146 -7.6939 -7.8518 -7.9877
Columns 26 through 30
-8.1015 -8.1929 -8.2616 -8.3075 -8.3305
Columns 31 through 35
-8.3305 -8.3075 -8.2616 -8.1929 -8.1015
Columns 36 through 40
-7.9877 -7.8518 -7.6939 -7.5146 -7.3142
Columns 41 through 45
-7.0932 -6.8521 -6.5916 -6.3122 -6.0146
Columns 46 through 50
-5.6997 -5.3680 -5.0206 -4.6583 -4.2821
Columns 51 through 55
-3.8929 -3.4919 -3.0801 -2.6586 -2.2288
Columns 56 through 60
-1.7919 -1.3491 -0.9019 -0.4517 0
M =
1.0e+06 *
Columns 1 through 5
0 0.0169 0.0335 0.0495 0.0647
Columns 6 through 10
0.0787 0.0912 0.1019 0.1107 0.1170
Columns 11 through 15
0.1208 0.1216 0.1193 0.1134 0.1037
Columns 16 through 20
0.0899 0.0718 0.0489 0.0211 -0.0119
Columns 21 through 25
-0.0505 -0.0950 -0.1456 -0.2026 -0.2663
Columns 26 through 30
-0.3371 -0.4151 -0.5007 -0.5943 -0.6960
Columns 31 through 35
-0.8062 -0.9251 -1.0531 -1.1905 -1.3375
Columns 36 through 40
-1.4944 -1.6615 -1.8392 -2.0277 -2.2273
Columns 41 through 45
-2.4382 -2.6609 -2.8955 -3.1424 -3.4019
Columns 46 through 50
-3.6742 -3.9597 -4.2586 -4.5712 -4.8979
Columns 51 through 55
-5.2389 -5.5944 -5.9649 -6.3506 -6.7517
Columns 56 through 60
-7.1687 -7.6017 -8.0510 -8.5170 -9.0000
V =
1.0e+05 *
Columns 1 through 5
1.0000 0.9661 0.9322 0.8983 0.8644
Columns 6 through 10
0.8305 0.7966 0.7627 0.7288 0.6949
Columns 11 through 15
0.6610 0.6271 0.5932 0.5593 0.5254
Columns 16 through 20
0.4915 0.4576 0.4237 0.3898 0.3559
Columns 21 through 25
0.3220 0.2881 0.2542 0.2203 0.1864
Columns 26 through 30
0.1525 0.1186 0.0847 0.0508 0.0169
Columns 31 through 35
-0.0169 -0.0508 -0.0847 -0.1186 -0.1525
Columns 36 through 40
-0.1864 -0.2203 -0.2542 -0.2881 -0.3220
Columns 41 through 45
-0.3559 -0.3898 -0.4237 -0.4576 -0.4915
Columns 46 through 50
-0.5254 -0.5593 -0.5932 -0.6271 -0.6610
Columns 51 through 55
-0.6949 -0.7288 -0.7627 -0.7966 -0.8305
Columns 56 through 60
-0.8644 -0.8983 -0.9322 -0.9661 -1.0000
sigma =
1.0e+09 *
Columns 1 through 5
0 0.0032 0.0063 0.0093 0.0121
Columns 6 through 10
0.0147 0.0171 0.0191 0.0207 0.0219
Columns 11 through 15
0.0227 0.0228 0.0224 0.0213 0.0194
Columns 16 through 20
0.0169 0.0135 0.0092 0.0040 -0.0022
Columns 21 through 25
-0.0095 -0.0178 -0.0273 -0.0380 -0.0499
Columns 26 through 30
-0.0632 -0.0778 -0.0939 -0.1114 -0.1305
Columns 31 through 35
-0.1512 -0.1735 -0.1975 -0.2232 -0.2508
Columns 36 through 40
-0.2802 -0.3115 -0.3448 -0.3802 -0.4176
Columns 41 through 45
-0.4572 -0.4989 -0.5429 -0.5892 -0.6379
Columns 46 through 50
-0.6889 -0.7424 -0.7985 -0.8571 -0.9184
Columns 51 through 55
-0.9823 -1.0490 -1.1184 -1.1907 -1.2660
Columns 56 through 60
-1.3441 -1.4253 -1.5096 -1.5969 -1.6875
tou =
1.0e+06 *
Columns 1 through 5
1.8750 1.8114 1.7479 1.6843 1.6208
Columns 6 through 10
1.5572 1.4936 1.4301 1.3665 1.3030
Columns 11 through 15
1.2394 1.1758 1.1123 1.0487 0.9852
Columns 16 through 20
0.9216 0.8581 0.7945 0.7309 0.6674
Columns 21 through 25
0.6038 0.5403 0.4767 0.4131 0.3496
Columns 26 through 30
0.2860 0.2225 0.1589 0.0953 0.0318
Columns 31 through 35
-0.0318 -0.0953 -0.1589 -0.2225 -0.2860
Columns 36 through 40
-0.3496 -0.4131 -0.4767 -0.5403 -0.6038
Columns 41 through 45
-0.6674 -0.7309 -0.7945 -0.8581 -0.9216
Columns 46 through 50
-0.9852 -1.0487 -1.1123 -1.1758 -1.2394
Columns 51 through 55
-1.3030 -1.3665 -1.4301 -1.4936 -1.5572
Columns 56 through 60
-1.6208 -1.6843 -1.7479 -1.8114 -1.8750
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.