How to arrange local stiffness matrix to global stiffness matrix
29 views (last 30 days)
Show older comments
I have 3 local stiffness matrix 4 by 4;
local stiffness matrix-1 (4x4) = row and column address for global stiffness are 1 2 3 4 and 1 2 3 4 resp.;
local stiffness matrix-2 (4x4) = row and column address for global stiffness are 1 2 5 6 and 1 2 5 6 resp.;
local stiffness matrix-3 (4x4) = row and column address for global stiffness are 1 2 7 8 and 1 2 7 8 resp.;
I want these local stiffness matrices to be arranged in global stiffness matrix of (8x8) size according to above local stiffness address with overlapping cells added.
IMAGE HAS BEEN ATTACHED TO UNDERSTAND IT CLEARLY
0 Comments
Answers (1)
Giovanni Mottola
on 5 Oct 2016
I strongly suspect there is something wrong with your scheme in the image attached. The stiffness matrix #2 (marked in red), for instance, has 4x4=16 elements, but you've marked only 8 of them in the global matrix. If I understand correctly the problem you are facing (2D beam stiffness matrices?) then perhaps this should help:
mat_stiff_global=zeros(8, 8);
mat_stiff_global(1:4, 1:4)=mat_stiff_global(1:4, 1:4)+mat_stiff_local1;
mat_stiff_global([1:2, 5:6], [1:2, 5:6])=mat_stiff_global([1:2, 5:6], [1:2, 5:6])+mat_stiff_local2;
mat_stiff_global([1:2, 7:8], [1:2, 7:8])=mat_stiff_global([1:2, 7:8], [1:2, 7:8])+mat_stiff_local3;
1 Comment
Jose Carmona
on 13 Feb 2018
Thank you so much for answering this guys question. I am currently in advanced machine analysis and I didn't want to have to type out each matrix, or variables to actually form the matrix.
See Also
Categories
Find more on Resizing and Reshaping Matrices 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!