Algorytmy MES (1)
Transkrypt
Algorytmy MES (1)
RoG@j 2005 11/14/2005 Opis algorytmu Schematy blokowe ! Algorytmy MES (1) Block diagrams read Zapis algorytmu Pseudokod Szerokość półpasma Allokacja calculate ! ! B l Falck rule: Cij – product of ! A ! ! m m n ! ! ! row i in A column j in B External loops ! l 1 repeat … until while … do ! ! ! Smith diagrams Matrix multiplication C=AxB A(m,l), B(l,n), C(m,n) i rows in A (C) j colums in B (C) Initialize variables and matrices From i=1 to m From j=1 to n Sum=0 From k=1 to l sum=sum+aki*bjk cij=sum Initialize variables and matrices For i=1 to m For j=1 to n Sum=0 For k=1 to l Sum=sum+ a(k,i)*b(j,k) i=1..m j=1..n Zagnieżdżona struktura Pseudokod Algorytmy MES (1) for Struktura zagnieżdżona Opis Smith’a Mnożenie macierzy ! o if ! n write C(i,j)=sum Struktura kodu MES Read data and allocate arrays Find problem size and bandwidth Null matrices For all elements Find steering vector - allocation Compute element matrices Assemble global stiffness matrix Factorize the matrix and solve equations For all elements Compute internal forces (tress recovery) 1 RoG@j 2005 11/14/2005 Zadanie praktyczne Szerokość półpasma ! Depends on maximum difference of nodal numbers in all elements For all elements Find smallest and highest node number Compute difference Choose highest difference - bandwidth Bandwidth Sterowanie numeracją ! Local and global numbers ! ! ! Band = 1 For i = 1 To NElem Min = NNode Max = 1 For j = 1 To MaxNode If Elements(i, j) < Then If Elements(i, j) > Then Next j MaxMin = (Max - Min + If MaxMin > Band Then Next i ! ! ! ! ! ! ! Assumption, that number of DOFs in each node is the same Kod allokacji For i = 1 To Nelem {elements loop} ElemDOF = 1 {elem DOFs counter} For j = 1 To MaxNode {elem nodes loop} NodeDOF = 1 {nod DOFs counter} For k = 1 To MaxDOF {nod DOFs loop} Nod = Elements(i, j) Glob(ElemDOF) = (Nod - 1) * MaxDOF + NodeDOF ElemDOF = ElemDOF + 1 NodeDOF = NodeDOF + 1 Next k Next j Next i Algorytmy MES (1) 1) * MaxDof Band = MaxMin MaxDof – 3 Example ! Easy rule: nodes on the list in the element are in such a sequence as local numbers DOFs numbering {loop over elements} {cannot be Min!!!} {cannot be Max!!!} {loop over nodes} Min Min = Elements(i, j) Max Max = Elements(i, j) Numeracja stopni swobody Node numbering ! ! Numbers of nodes Numbers of degrees of freedom Kod Szerokość półpasma Local nodes 1 Global nodes 1 Local DOFs 1 Global DOFs 1 2 3 2 2 3 4 3 3 4 6 (Nod) 4 5 6 7 8 9 10 11 12 7 8 9… Rule: ! Global=(Nod-1)*MaxDof+NodeDOF Macierze elementowe ! Element ! ! ! ! ! Kind of element (plate or plane stress, truss or frame…) Materials (number of set) Nodal coordinates Allocation (in order to aggregate) Two in one ! Material set can say which kind of element and which materials 2