Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Structure Design Using Slope-Deflection Equations and Matlab 1

Status
Not open for further replies.

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


 
 https://files.engineering.com/getfile.aspx?folder=c93b376a-7d55-4f18-b24c-46fe445a3efa&file=SDE.pdf
Replies continue below

Recommended for you

Tygra said:
I have found a great function in Matlab called 'equationsToMatrix' that converts the linear equations into matrix form.

If you find it useful, that's fine, but I think it is better to understand what the program is doing. Converting linear equations into matrix form is pretty straightforward. Here is one article which explains it: .

Tygra said:
What do you think about the smaller problem? I am getting the correct rotations of X3 = -6.96e+5 and X4 = 1.08e+4, but my joint equation equals 166.67?

I believe you are forgetting the slope-deflection formula. Following is the formula you posted earlier in the thread:

Capture_uxn5hm.png


Your sign convention indicates that clockwise rotation is negative, counter-clockwise positive, but you must include the FEM in the beam moment. If you do that, the sum of beam moments at each joint is zero.

BA
 
Ah, a simple error. I left out the FEM. Its all good now.

You are right, changing linear equations to matrix form is easy. But for my larger structure it would be quite tedious putting the values into the matrix. So, for an even larger structures the equationsTomatrix function is very, very handy.

Thanks for all your help BAretired.
 
Tygra said:
I have found a great function in Matlab called 'equationsToMatrix' that converts the linear equations into matrix form. Solving the matrix gave me the correct answers!
Congratulation Tygra! For MATLAB and structural analysis you would always want to take advantage of matrices as its basically {F}=[K]{u}. For your bigger structure, you can simplify things by having all FEM in one column vector matrix, slope equations in another matrix, and rotations in another matrix. With that you can easily eliminate joints of rows from matrices whose rotations are fixed.

BAretired said:
Your sign convention indicates that clockwise rotation is negative, counter-clockwise positive,
I think Tygra is from Europe or UK. Remember to keep your signs and units consistent throughout the calculations. Wishing you all the best on your project!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor