CVEN2303Wk10

m

School

University of New South Wales *

*We aren’t endorsed by this school

Course

2303

Subject

Mechanical Engineering

Date

Nov 24, 2024

Type

m

Pages

2

Uploaded by zjjjj12345

Report
% Week 10 %% Question 1 clc clear w = input('w(kN/m) = '); L = input('L(m) = '); FEM_A = w*(2*L).^2/12 FEM_LB = -w*(2*L).^2/12 FEM_RB = 0 K_AB = 4*2/(2*L); K_BC = 3/L; DF_BA = K_AB/(K_AB+K_BC) DF_BC = 1-DF_BA DF = [0 DF_BA DF_BC 1]; FEM = [FEM_A FEM_LB FEM_RB 0]; MomentMatrix = FEM; prev = [zeros(size(FEM));FEM]; check = 1; while check > 0 Release = [0 -(prev(2,2)+prev(2,3))*DF(2) -(prev(2,2)+prev(2,3))*DF(3) 0]; COM = [Release(2)/2 0 0 Release(3)/2]; prev = [Release;COM]; MomentMatrix = [MomentMatrix;prev]; check = 0; [nrow ncol] = size(MomentMatrix); for i = 1:ncol if abs(MomentMatrix(nrow,i)) > 0.01 check = check + 1; end end end moments = sum(MomentMatrix); M_B = moments(2) C_y = -(moments(1)+moments(2))/(2*L) %% Question 2 clc clear w = input('w(kN/m) = '); q = input('q(KN/m) = '); FEM_LB = -w*4.^2/8 FEM_RB = 0 FEM_LC = 0 FEM_RC = -q*3.^2/8 K_AB = 3*2/4;
K_BC = 4/4; K_CD = 3/3; DF_BA = K_AB/(K_AB+K_BC) DF_BC = 1 - DF_BA DF_CB = K_BC/(K_BC+K_CD) DF_CD = 1 - DF_CB DF = [0 DF_BA DF_BC DF_CB DF_CD 1]; FEM = [0 FEM_LB FEM_RB FEM_LC FEM_RC 0]; MomentMatrix = FEM; prev = [zeros(size(FEM));FEM]; check = 1; while check > 0 Release = [0 -(prev(2,2)+prev(2,3))*DF(2) -(prev(2,2)+prev(2,3))*DF(3) - (prev(2,4)+prev(2,5))*DF(4) -(prev(2,4)+prev(2,5))*DF(5) 0]; COM = [Release(2)/2 0 Release(4)/2 Release(3)/2 0 Release(5)/2]; prev = [Release;COM]; MomentMatrix = [MomentMatrix;prev]; check = 0; [nrow ncol] = size(MomentMatrix); for i = 1:ncol if abs(MomentMatrix(nrow,i)) > 0.01 check = check + 1; end end end moments = sum(MomentMatrix); M = MomentMatrix(3,4) M_B = moments(2) disp('Upper face')
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help