matlab.Problem 4
matlab.Problem 4
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)
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:
% ==========================
% ==========================
% Given parameters
L = 600; % [cm]
E = 50000; % [kN/cm^2]
I = 30000; % [cm^4]
w0 = 2.5; % [kN/cm]
M_vals = E*I*d2y_dx2_vals;
V_vals = E*I*d3y_dx3_vals;
d4y_dx4_vals = (w0/(120*E*I*L))*(-120*x_vals);
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]');
grid on;
subplot(3,2,4);
plot(x_vals, V_vals,'LineWidth',1.5);
xlabel('x [cm]');
ylabel('V(x) [kN]');
grid on;
subplot(3,2,5);
plot(x_vals, w_dist_vals,'LineWidth',1.5);
xlabel('x [cm]');
ylabel('w(x) [kN/cm]');
grid on;