Tygra_1983
Student
- Oct 8, 2021
- 116
Hi there, I was wondering if someone could help me.
I am designing a simple structure. I have attached a diagram and I am using the slope-deflection equations and using Matlab. Unfortunately I am getting strange results that I think are wrong. For the rotations at the joints I am getting zero which cannot be correct.
Here is my Matlab code:
clear
clc
% data
E = 2e+08;
I = 0.002;
EI = E.*I;
L1 = 5;
L2 = sqrt(5.^2 + 5.^2);
q = 100;
FEM1 = q.*L1.^2./12;
FEM2 = -FEM1;
% Symbolic mathematics
syms X1 X2 X3 X4 X5 X6 X7 X8 X9 X10
X1 = 0; X3 = 0; X5 = 0; X7 = 0;
X2 = -X8;
X4 = -X6;
X9 = -X10;
M1i = 4.*EI./L1.*X1 + 2.*EI./L1.*X2;
M1j = 2.*EI./L1.*X1 + 4.*EI./L1.*X2;
M2i = 4.*EI./L1.*X3 + 2.*EI./L1.*X4;
M2j = 2.*EI./L1.*X3 + 4.*EI./L1.*X4;
M3i = 4.*EI./L1.*X5 + 2.*EI./L1.*X6;
M3j = 2.*EI./L1.*X5 + 4.*EI./L1.*X6;
M4i = 4.*EI./L1.*X7 + 2.*EI./L1.*X8;
M4j = 2.*EI./L1.*X7 + 4.*EI./L1.*X8;
M5i = 4.*EI./L1.*X2 + 2.*EI./L1.*X4;
M5j = 2.*EI./L1.*X2 + 4.*EI./L1.*X4;
M6i = 4.*EI./L1.*X4 + 2.*EI./L1.*X6;
M6j = 2.*EI./L1.*X4 + 4.*EI./L1.*X6;
M7i = 4.*EI./L1.*X6 + 2.*EI./L1.*X8;
M7j = 2.*EI./L1.*X6 + 4.*EI./L1.*X8;
M8i = 4.*EI./L2.*X2 + 2.*EI./L2.*X9;
M8j = 2.*EI./L2.*X2 + 4.*EI./L2.*X9;
M9i = 4.*EI./L1.*X9 + 2.*EI./L1.*X10 + FEM1;
M9j = 2.*EI./L1.*X9 + 4.*EI./L1.*X10 + FEM2;
M10i = 4.*EI./L2.*X10 + 2.*EI./L2.*X8;
M10j = 2.*EI./L2.*X10 + 4.*EI./L2.*X8;
M11i = 4.*EI./L1.*X4 + 2.*EI./L1.*X9;
M11j = 2.*EI./L1.*X4 + 4.*EI./L1.*X9;
M12i = 4.*EI./L1.*X6 + 2.*EI./L1.*X10;
M12j = 2.*EI./L1.*X6 + 4.*EI./L1.*X10;
% Solving
Joint2 = M1j + M5i + M8i == 0
Joint4 = M2j + M5j + M11i + M6i == 0
Joint6 = M3i + M6j + M12i + M7i == 0
Joint8 = M4j + M7j + M10j == 0
Joint9 = M8j + M11j + M9i == 0
Joint10 = M9j + M10i + M12j == 0
Answer1 = solve(Joint2,X6)
Answer2 = solve(Joint4,X6)
Answer3 = solve(Joint6,X6)
Answer4 = solve(Joint8,X6)
solve(Answer1, Answer2)
I am hoping someone here knows how to use Matlab and is familiar with slope=deflection equations that can help me.
Kind regards
I am designing a simple structure. I have attached a diagram and I am using the slope-deflection equations and using Matlab. Unfortunately I am getting strange results that I think are wrong. For the rotations at the joints I am getting zero which cannot be correct.
Here is my Matlab code:
clear
clc
% data
E = 2e+08;
I = 0.002;
EI = E.*I;
L1 = 5;
L2 = sqrt(5.^2 + 5.^2);
q = 100;
FEM1 = q.*L1.^2./12;
FEM2 = -FEM1;
% Symbolic mathematics
syms X1 X2 X3 X4 X5 X6 X7 X8 X9 X10
X1 = 0; X3 = 0; X5 = 0; X7 = 0;
X2 = -X8;
X4 = -X6;
X9 = -X10;
M1i = 4.*EI./L1.*X1 + 2.*EI./L1.*X2;
M1j = 2.*EI./L1.*X1 + 4.*EI./L1.*X2;
M2i = 4.*EI./L1.*X3 + 2.*EI./L1.*X4;
M2j = 2.*EI./L1.*X3 + 4.*EI./L1.*X4;
M3i = 4.*EI./L1.*X5 + 2.*EI./L1.*X6;
M3j = 2.*EI./L1.*X5 + 4.*EI./L1.*X6;
M4i = 4.*EI./L1.*X7 + 2.*EI./L1.*X8;
M4j = 2.*EI./L1.*X7 + 4.*EI./L1.*X8;
M5i = 4.*EI./L1.*X2 + 2.*EI./L1.*X4;
M5j = 2.*EI./L1.*X2 + 4.*EI./L1.*X4;
M6i = 4.*EI./L1.*X4 + 2.*EI./L1.*X6;
M6j = 2.*EI./L1.*X4 + 4.*EI./L1.*X6;
M7i = 4.*EI./L1.*X6 + 2.*EI./L1.*X8;
M7j = 2.*EI./L1.*X6 + 4.*EI./L1.*X8;
M8i = 4.*EI./L2.*X2 + 2.*EI./L2.*X9;
M8j = 2.*EI./L2.*X2 + 4.*EI./L2.*X9;
M9i = 4.*EI./L1.*X9 + 2.*EI./L1.*X10 + FEM1;
M9j = 2.*EI./L1.*X9 + 4.*EI./L1.*X10 + FEM2;
M10i = 4.*EI./L2.*X10 + 2.*EI./L2.*X8;
M10j = 2.*EI./L2.*X10 + 4.*EI./L2.*X8;
M11i = 4.*EI./L1.*X4 + 2.*EI./L1.*X9;
M11j = 2.*EI./L1.*X4 + 4.*EI./L1.*X9;
M12i = 4.*EI./L1.*X6 + 2.*EI./L1.*X10;
M12j = 2.*EI./L1.*X6 + 4.*EI./L1.*X10;
% Solving
Joint2 = M1j + M5i + M8i == 0
Joint4 = M2j + M5j + M11i + M6i == 0
Joint6 = M3i + M6j + M12i + M7i == 0
Joint8 = M4j + M7j + M10j == 0
Joint9 = M8j + M11j + M9i == 0
Joint10 = M9j + M10i + M12j == 0
Answer1 = solve(Joint2,X6)
Answer2 = solve(Joint4,X6)
Answer3 = solve(Joint6,X6)
Answer4 = solve(Joint8,X6)
solve(Answer1, Answer2)
I am hoping someone here knows how to use Matlab and is familiar with slope=deflection equations that can help me.
Kind regards