-
Notifications
You must be signed in to change notification settings - Fork 23
3. Getting Results from a Model
Use the GetReaction function built into the FEModel class as follows:
Reaction1 = myFrame.GetReaction("N2", FX)
Sheet1.Range("B3").Value = myFrame.GetReaction("N1", FY)
Reaction3 = myFrame.GetReaction("N1", MZ)
The first line assigns the X reaction at node "N2" to the variable Reaction1. The second line puts the Y reaction at node "N1" in cell B3 of Sheet1. The third line places the reaction moment at node "N1" in the variable Reaction3.
Use the GetDisp function built into the FEModel class as follows:
DispY = myFrame.GetDisp("N1", DY)
DispX = myFrame.GetDisp("N2", DX)
RotZ = myFrame.GetDisp("N1", RZ)
You can get member shears, axial forces, and moments using the GetShear
, GetMoment
, and GetAxial
functions.
Syntax:
FEModel.GetShear(MemberName As String, x As Double) As Double
FEModel.GetMoment(MemberName As String, x As Double) As Double
FEModel.GetAxial(MemberName As String, x As Double) As Double
Examples:
'The line below sets a variable, V3, to the shear on member "M1" at 4 units from its start:
V3 = myModel.GetShear("M1", 4)
'The line below sets cell B3 on Sheet1 to the minimum axial force on member "M2" at 5 units from its start:
Sheet1.Range("B3") = myModel.GetAxial("M2", 5)
You can get max/min member shears, axial forces, and moments using the GetMaxShear
, GetMinShear
, GetMaxMoment
, GetMinMoment
GetMaxAxial
, and GetMinAxial
functions.
Syntax:
FEModel.GetMaxShear(MemberName as String) as Double
FEModel.GetMinShear(MemberName as String) as Double
FEModel.GetMaxMoment(MemberName as String) as Double
FEModel.GetMinMoment(MemberName as String) as Double
FEModel.GetMaxAxial(MemberName as String) as Double
FEModel.GetMinAxial(MemberName as String) as Double
Examples:
'The line below sets a variable, Mmax, to the maximum moment on member "M1":
Mmax = myModel.GetMaxMoment("M1")
'The line below sets cell B3 on Sheet1 to the minimum axial force on member "M2":
Sheet1.Range("B3") = myModel.GetMinAxial("M2")
Diagrams are reported as an EZArray
with 20 points.
An EZArray
is a class included with xlFrame that makes dynamic array manipulation easier. The EZArray
class has a subroutine built into it called PrintArray
that allows you print the array directly to any given range in the workbook. When the array prints, it will overwrite any data already in the cells it prints to.
If you set the ClearExisting
parameter to True
the EZArray will clear all existing data until it finds the next blank row and column. This is used when the size of an EZArray is variable and you need to clear out old data of an unknown size. Since xlFrame's EZArrays are always 20 x 2 you won't need to use this parameter.
Syntax:
FEModel.GetShearDiagram(MemberName As String) As EZArray
FEModel.GetMomentDiagram(MemberName As String) As EZArray
FEModel.GetAxialDiagram(MemberName As String) As EZArray
FEModel.GetDispDiagram(MemberName As String) As EZArray
EZArray.PrintEZArray(PrintRange As Range, Optional ClearExisting As Boolean = False)
Example:
'The following code prints the moment diagram for member M3 to Sheet1, starting in cell
'A2. 20 equal spaced points along the member are printed in one column, and the moment
'at each point is printed in the next column (starting in cell B2).
myModel.GetMomentDiagram("M3").PrintEZArray(Sheet1.Range("A2"))