0% found this document useful (0 votes)
11 views

matlab.Problem 4

The document outlines the procedure for plotting various quantities related to beam deflection under a linearly increasing load, including displacement, slope, moment, shear, and loading. It provides the equations for each quantity derived from the deflection equation and details the steps for plotting these quantities against the distance along the beam. Additionally, it includes MATLAB code to compute and visualize these quantities.

Uploaded by

ehabsawwa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

matlab.Problem 4

The document outlines the procedure for plotting various quantities related to beam deflection under a linearly increasing load, including displacement, slope, moment, shear, and loading. It provides the equations for each quantity derived from the deflection equation and details the steps for plotting these quantities against the distance along the beam. Additionally, it includes MATLAB code to compute and visualize these quantities.

Uploaded by

ehabsawwa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Problem 4: plot the following quantities versus distance along the beam:

a) Displacement (y). b) Slope θ(x) = dy/dx.


c) Moment M (x) = Eld2y/dx2. d) Shear V(x) = Eld3y/dx3.
c) Loading w(x) = -Eld4y/dx4.

To plot these quantities the equations for each one of these quantities with
respect to the distance along the beam (x) must be determined by derivation of
the deflection equation y.
Given:
Y= (wo /120EIL)*(-x5+2L2x3-L4x)
Where:
 L: is the beam length,
 E: is the modulus of elasticity,
 I: is the second moment of area,
 wo: is the maximum distributed load at x =L.

a) Displacement y(x)
The displacement along the beam is given directly by the above equation:
y(x) = Y= (wo /120EIL)*(-x5+2L2x3-L4x)

b) Slope θ(x)= dy/dx


The slope is the first derivative of y(x) with respect to x:
θ(x)= dy/dx = (wo/120EIL)*( −5x4+6L2x2−L4)
c) Moment M(x)=EI*(d2y/dx2)
The second derivative of y(x):
(d2y/dx2)= (wo/120EIL)*(−20x3+12L2x)
Multiplying by (EI):
M(x)=EI*(d2y/dx2) )= (wo/120L)*(−20x3+12L2x)

d) Shear V(x)= EI (d3y/dx3)


The third derivative of y(x) is:
d3y/dx3 = (wo/120EIL)*(-60x2+12L2)
Multiplying by EI:
V(x)= EI (d3y/dx3)= (wo/120L)*(-60x2+12L2)

e) Loading w(x)=−EI (d4y/dx4)


The fourth derivative of y(x) is:
(d4y/dx4)= (wo/120EIL)*(−120x)
Multiplying by −EI:
w(x)=−EI*(d4y/dx4)= (wo/120L)*(120x)= wo*(x*L)

 This confirms that the distributed load varies linearly along the beam,
starting from w(0)= 0 at x=0 , to w(L)= wo at x =L.
Procedure for Plotting:
1. Define a range of x values from 0 to L.
2. Compute y(x),θ(x),M(x),V(x), and w(x) at each x-value using the above
equations.
3. Create five separate plots:
o y(x) vs. x
o θ(x)= dy/dx vs. x
o M(x) vs. x
o V(x) vs. x
o w(x) vs. x
Each of these plots will illustrate how the displacement, slope, bending moment,
shear force, and loading vary along the length of the beam under the given
linearly increasing load.
Code:
% ==========================

% Problem 4: Plotting Various Beam Quantities

% ==========================

% Given parameters

L = 600; % [cm]

E = 50000; % [kN/cm^2]

I = 30000; % [cm^4]

w0 = 2.5; % [kN/cm]

% Define a vector of x-values

x_vals = linspace(0, L, 200);

% Compute Displacement y(x):

y_vals = (w0/(120*E*I*L))*(-x_vals.^5 + 2*(L^2)*x_vals.^3 - (L^4)*x_vals);

% Compute Slope dy/dx:

dy_dx_vals = (w0/(120*E*I*L))*(-5*x_vals.^4 + 6*(L^2)*x_vals.^2 - L^4);

% Compute second derivative d2y/dx^2:

d2y_dx2_vals = (w0/(120*E*I*L))*(-20*x_vals.^3 + 12*L^2*x_vals);

% Moment M(x) = E*I*d2y/dx^2:

M_vals = E*I*d2y_dx2_vals;

% Compute third derivative d3y/dx^3:

d3y_dx3_vals = (w0/(120*E*I*L))*(-60*x_vals.^2 + 12*L^2);

% Shear V(x) = E*I*d3y/dx^3:

V_vals = E*I*d3y_dx3_vals;

% Compute fourth derivative d4y/dx^4:

d4y_dx4_vals = (w0/(120*E*I*L))*(-120*x_vals);

% Loading w(x) = -E*I*d4y/dx^4:

w_dist_vals = -E*I*d4y_dx4_vals;

% Plotting

figure;
subplot(3,2,1);

plot(x_vals, y_vals,'LineWidth',1.5);

xlabel('x [cm]');

ylabel('y [cm]');

title('Displacement y(x)');

grid on;

subplot(3,2,2);

plot(x_vals, dy_dx_vals,'LineWidth',1.5);

xlabel('x [cm]');

ylabel('dy/dx');

title('Slope \theta(x)');

grid on;

subplot(3,2,3);

plot(x_vals, M_vals,'LineWidth',1.5);

xlabel('x [cm]');

ylabel('M(x) [kN·cm]');

title('Bending Moment M(x)');

grid on;

subplot(3,2,4);

plot(x_vals, V_vals,'LineWidth',1.5);

xlabel('x [cm]');

ylabel('V(x) [kN]');

title('Shear Force V(x)');

grid on;

subplot(3,2,5);

plot(x_vals, w_dist_vals,'LineWidth',1.5);

xlabel('x [cm]');

ylabel('w(x) [kN/cm]');

title('Distributed Load w(x)');

grid on;

sgtitle('Beam Response Under Linearly Increasing Distributed Load');


Result:

You might also like