0% found this document useful (0 votes)
2 views1 page

Grasp

The document outlines a procedure for performing structural analysis by initializing matrices and vectors for stiffness, forces, and displacements. It includes steps for assembling the global stiffness matrix, applying loads and boundary conditions, solving the system of equations, and calculating member forces. The process concludes with outputting results and handling potential errors.

Uploaded by

Le Fondateur
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
2 views1 page

Grasp

The document outlines a procedure for performing structural analysis by initializing matrices and vectors for stiffness, forces, and displacements. It includes steps for assembling the global stiffness matrix, applying loads and boundary conditions, solving the system of equations, and calculating member forces. The process concludes with outputting results and handling potential errors.

Uploaded by

Le Fondateur
Copyright
© © All Rights Reserved
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

' Initialize global stiffness matrix

Dim K() As Double


ReDim K(1 To totalDOF, 1 To totalDOF)

' Initialize force vector


Dim F() As Double
ReDim F(1 To totalDOF)

' Initialize displacement vector


Dim U() As Double
ReDim U(1 To totalDOF)

' Assemble global stiffness matrix


AssembleGlobalStiffnessMatrix K

' Apply loads to force vector


ApplyLoads F

' Apply boundary conditions


ApplyBoundaryConditions K, F

' Solve the system of equations


SolveSystem K, F, U

' Calculate member forces


CalculateMemberForces U

' Output results


OutputResults U

MsgBox "Analysis completed successfully", vbInformation, "GRASP"


Exit Sub

ErrorHandler:
MsgBox "Error in analysis: " & Err.Description, vbCritical, "GRASP Error"
End Sub

Private Sub AssembleGlobalStiffnessMatrix(ByRef K() As Double)


Dim mem As clsMember
Dim i As Integer, j As Integer
Dim startNode As Integer, endNode As Integer
Dim ke(1 To 12, 1 To 12) As Double ' Local stiffness matrix
Dim T(1 To 12, 1 To 12) As Double ' Transformation matrix
Dim kg(1 To 12, 1 To 12) As Double ' Global stiffness matrix

For Each mem In MemberList


' Get member properties
startNode = mem.StartNode
endNode = mem.EndNode

' Get local stiffness matrix


GetLocalStiffnessMatrix mem, ke

' Get transformation matrix


GetTransformationMatrix mem, T

' Transform to global coordinates

P a g e 7 | 57

You might also like