How to superimpose certain indices of matrices.

2 views (last 30 days)
In FEA, after we have the Global Stiffness Matrix of a Plane Frame Member, we construct and assemble the Plane Frame Structure Stiffness Matrix. To be able to so, one needs to determine a mapping between the rows and columns of the global stiffness matrix of a member and those of the structure stiffness matrix. Suppose I have 3 memeber Global Stiffness Matrices (shown below) and want to assemble the structural global matrix. How to I superimpose them such that the u2, v2, theta2 of the matrices are added when superimposed?

Accepted Answer

Alan Stevens
Alan Stevens on 3 Nov 2020
Here's one possible way (there are probably slicker ways!):
K111 = K1(1:3,1:3); K112 = K1(1:3,4:6);
K121 = K1(4:6,1:3); K122 = K1(4:6,4:6);
K211 = K2(1:3,1:3); K212 = K2(1:3,4:6);
K221 = K2(4:6,1:3); K222 = K2(4:6,4:6);
K311 = K3(1:3,1:3); K312 = K3(1:3,4:6);
K321 = K3(4:6,1:3); K322 = K3(4:6,4:6);
Z3 = zeros(3);
KG = [K111 K112 Z3 Z3;
K121 K122 K212 Z3;
Z3 K211 Z3 Z3;
Z3 K221 K222 Z3;
Z3 K311 Z3 K312;
Z3 K321 Z3 K322];
  3 Comments
Alan Stevens
Alan Stevens on 3 Nov 2020
Edited: Alan Stevens on 3 Nov 2020
Oops! You are right. I’ll try again!
KG = [K111 K112 Z3 Z3;
K121 K122+K211+K311 K212 Z3;
Z3 K221 K222 Z3;
Z3 K321 Z3 K322];

Sign in to comment.

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!