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

Grasp

The document outlines a VBA script for a worksheet that records design checks for structural members. It sets up headers and iterates through a list of members and load cases to calculate axial, bending, and combined stresses, as well as the utilization ratio for each member. The results are then recorded in the specified worksheet.

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)
8 views1 page

Grasp

The document outlines a VBA script for a worksheet that records design checks for structural members. It sets up headers and iterates through a list of members and load cases to calculate axial, bending, and combined stresses, as well as the utilization ratio for each member. The results are then recorded in the specified worksheet.

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

' Worksheet for design results

Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Design Checks")
ws.Cells.Clear

' Set up headers


ws.Range("A1:G1").Value = Array("Member ID", "Section", "Material", _
"Axial Stress", "Bending Stress", _
"Combined Stress", "Utilization")

' Check each member in each load case


Dim row As Integer: row = 2
maxUtilization = 0

For Each mem In MemberList


Set mat = MaterialList(mem.MaterialID)
Set sec = SectionList(mem.SectionID)

' Initialize worst case


utilization = 0

' Check all load cases


For Each lc In LoadCaseList
Dim caseResults As clsMemberForces
Set caseResults = lc.GetMemberResults(mem.MemberID)

' Calculate stresses


Dim axialStress As Double
Dim bendingStress As Double
Dim combinedStress As Double

axialStress = Abs(caseResults.AxialForce) / sec.Area


bendingStress = (Abs(caseResults.MomentY) / sec.Iyy) * (sec.Depth
/ 2) + _
(Abs(caseResults.MomentZ) / sec.Izz) * (sec.Width
/ 2)

' Simple combined stress (could use more sophisticated


interaction equation)
combinedStress = axialStress + bendingStress

' Utilization ratio


Dim caseUtilization As Double
caseUtilization = combinedStress / mat.YieldStrength

' Track worst case


If caseUtilization > utilization Then
utilization = caseUtilization
End If
Next lc

' Record results


ws.Cells(row, 1).Value = mem.MemberID
ws.Cells(row, 2).Value = sec.Name
ws.Cells(row, 3).Value = mat.Name
ws.Cells(row, 4).Value = axialStress
ws.Cells(row, 5).Value = bendingStress

P a g e 20 | 57

You might also like