The document outlines a subroutine for assembling a mass matrix in a structural analysis program. It initializes a global mass matrix and iterates through a list of members to calculate and transform local mass matrices into global coordinates. The subroutine also includes a method for obtaining the consistent mass matrix for each member based on its material and section properties.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views1 page
Grasp
The document outlines a subroutine for assembling a mass matrix in a structural analysis program. It initializes a global mass matrix and iterates through a list of members to calculate and transform local mass matrices into global coordinates. The subroutine also includes a method for obtaining the consistent mass matrix for each member based on its material and section properties.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
' Assemble mass matrix
Sub AssembleMassMatrix(ByRef M() As Double)
Dim mem As clsMember Dim me_local(1 To 12, 1 To 12) As Double Dim T(1 To 12, 1 To 12) As Double Dim me_global(1 To 12, 1 To 12) As Double Dim i As Integer, j As Integer
' Initialize to zero
For i = 1 To UBound(M, 1) For j = 1 To UBound(M, 2) M(i, j) = 0 Next j Next i
For Each mem In MemberList
' Get material and section properties Dim mat As clsMaterial Dim sec As clsSection Set mat = MaterialList(mem.MaterialID) Set sec = SectionList(mem.SectionID)
' Calculate consistent mass matrix (local coordinates)
GetMemberMassMatrix mem, me_local
' Get transformation matrix
GetTransformationMatrix mem, T
' Transform to global coordinates
For i = 1 To 12 For j = 1 To 12 me_global(i, j) = 0 For k = 1 To 12 For l = 1 To 12 me_global(i, j) = me_global(i, j) + T(k, i) * me_local(k, l) * T(l, j) Next l Next k Next j Next i
' Assemble into global matrix
AssembleMemberMatrix mem.StartNode, mem.EndNode, me_global, M) Next mem End Sub
' Get member consistent mass matrix
Sub GetMemberMassMatrix(mem As clsMember, ByRef me() As Double) ' Get material and section properties Dim mat As clsMaterial Dim sec As clsSection Set mat = MaterialList(mem.MaterialID) Set sec = SectionList(mem.SectionID)