How can any number of element matrices be assembled into a global matrix?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello all,
I'm trying to find a general MATLAB algorithm/code/script which assembles a global stiffness matrix from element stiffness matrices. I'm dealing with trusses, so the global stiffness matrix will have a number of rows and columns equal to the number of degrees of freedom in the respective truss, which is equal to twice the number of nodes. Needless to say, each element of the truss connects two nodes, and as such has a 4 x 4 element stiffness matrix. While I have been able to come up with algorithms for a specified number of degrees of freedom, I was wondering if there was a general algorithm I could use to combine the element stiffness matrices (Ke1, Ke2, etc.) into a single global stiffness matrix (K). I have already been able to create an algorithm which defines each element stiffness matrix using the element's area, modulus, and length, so all that's left is to figure out how to create the global matrix. Any and all help is appreciated.
1 comentario
Stephen23
el 7 de Jul. de 2017
Editada: Stephen23
el 7 de Jul. de 2017
"a general algorithm I could use to combine the element stiffness matrices (Ke1, Ke2, etc.) into a single global stiffness matrix (K)"
Allocate them using indexing. Do not try to do it dynamically: https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval
Respuestas (1)
KSSV
el 7 de Jul. de 2017
You may refer the below FEM examples, here I have assembled the element matrices into global matrices.
1 comentario
Anton Scotte
el 25 de Mayo de 2019
Hi, I have the same issue. I have a bit trouble understanding what the index is in your function. "index - d.o.f. vector associated with an element".
How should this d.o.f. vector be constructed for each element? If each truss is connected with 2 nodes in each end (and is a 2D-problem) then I get a 4x4 stiffnes matrix, where each element has a dof of 4? In this case the d.o.f vector should have the length 4 if I understand your function correct. But what values should I populate this vector with?
Forgive me if this is trivial, I'm new to FEM in general as well.
Thank you
Ver también
Categorías
Más información sobre Structural Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!