Assembling global matrix from element matrices based on location.

조회 수: 5 (최근 30일)
Thomas
Thomas 2017년 11월 1일
답변: Precise Simulation 2017년 11월 1일
I need to assemble a global matrix by taking the coefficients for each node from all the elements and adding them together.
These are the three element coefficient matrices.
Element 1: [a11 a12 a13; a21 a22 a23; a31 a32 a33]
Element 2: [a33 a32 a34; a23 a22 a24; a43 a42 a44]
Element 3: [a11 a13 a14; a31 a33 a34; a41 a43 a44]
This is what the global matrix needs to become...
Global: [sum(a11) sum(a12) sum(a13) sum(a14); sum(a21) sum(a22) sum(a23) sum(a24); sum(a31) sum(a32) sum(a33) sum(a34); sum(a41) sum(a42) sum(a43) sum(a44)]
As you can see I need to identify values in the element matrix based on their a(i,j) values and then find the sum of those values for the global matrix. FYI the a11 value for one element is different than the a11 value for another. This applies to all values.
Does anybody have any ideas as to how I should approach this?
Thanks!!

답변 (1개)

Precise Simulation
Precise Simulation 2017년 11월 1일
Normally you would have a list of integer pointers between local and global degrees of freedom constructed from the mesh connectivities to help you assign the local element matrix in the global. Only in very simple cases, like perhaps for 1D linear elements, can you avoid this.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by