The actions and displacement of a single element resulting from an analysis are represented in the automation interface by the ElementResult object. The properties of this object, which are all read-only, are listed in the table below. The object also provides methods for accessing the actions at any position along the element and for constructing diagrams of the distribution of actions along the element. These properties and methods are as follows;
|
Method |
Returns |
Description |
|
CopyPlot |
|
Copy picture of action diagram to clipboard. |
|
GetAction |
Double |
Get action at specific point along the element. |
|
GetActions |
Variant |
Get action at a number of points along the element. |
|
GetPlotLocations |
Variant |
Get locations along member from which the action diagram will be created. |
|
MaxAction |
Double |
Get the maximum value of an action within an element. |
|
MaxActions |
Variant |
Get the maximum value of a number of actions. |
|
Property |
Type |
Description |
|
Analysis |
mfAnalysisType |
Read Only. Returns the type of analysis used to generate the results. |
|
dx*, dy*, dz* |
Double |
Read Only. Returns the component of displacement at the specified end of the element acting along the x, y and z-axes respectively. |
|
Element |
Element |
Read Only. Returns a reference to the element to which the results refer. |
|
EndAction |
Double |
Read Only. Returns the end action acting in a specified element degree of freedom. |
|
EndActions |
Variant |
Read Only. Returns a vector containing the reactions acting in each of the elements degrees of freedoms. |
|
EndDisp |
Double |
Read Only. Returns the displacements/rotations of a specified element degree of freedom. |
|
EndDisps |
Variant |
Read Only. Returns a vector containing the displacements/rotations in each of the elements degrees of freedoms. |
|
InCompression |
Boolean |
Read Only. Returns true if the element is acting in axial compression. |
|
InTension |
Boolean |
Read Only. Returns true if the element is acting in axial tension. |
|
My*, Mz* |
Double |
Read Only. Returns the component of the reaction at the specified end of the element acting about the elements y and z-axes respectively. |
|
Px* |
Double |
Read Only. Returns the component of the reaction at the specified end of the element acting along the elements x-axis. |
|
ResultCase |
ResultCase |
Read Only. Returns a reference to the parent Results Case containing these results. |
|
Solved |
Boolean |
Read Only. Returns true if the results for this case have been computed. |
|
Thetax*, Thetay*, Thetaz* |
Double |
Read Only. Returns the rotation of the node about the x, y and z-axes respectively. |
|
Tx* |
Double |
Read Only. Returns the component of the reaction at the specified end of the element acting about the elements x-axis. |
|
Vy*, Vz* |
Double |
Read Only. Returns the component of the reaction at the node acting along the y and z-axes respectively. |
*Denotes a property that takes a parameter specifying an end of the element
The Application and Frame properties are common to many objects and are described in Chapter 2.
As for nodal results, the ElementResult object can be obtained for an element even if the specified analysis has not been performed. As such, the Solved property has been provided to determine if the results are available. This property returns true if the results for the node are available for the associated type of analysis. Trying to access many other properties of this object will return and error if the results have not been solved for. As such, it is good programming practice to determine if the results are available prior to accessing the other properties of the ElementResult object.
The displacements at the end of an element can be referenced using several properties of the ElementResult object. The appropriate method will be determined by how the value is used by the script. The first technique for accessing the displacements is via the individual properties representing the displacement in each degree of freedom at the end of the element. The translation of the element end is obtained via the properties dx, dy and dz while the rotational displacements are specified by the properties thetax, thetay, thetaz. Each of these properties takes a single parameter specifying an end of the element and all return the displacement of the elements end in the elements local coordinate system.
Another means of accessing the displacements at an end of an element is using the EndDisp property of the ElementResult object. This property returns the displacement for a specified degree of freedom. This property has two parameters that specify the end of the element and the degree of freedom. If the first parameter is specified and correctly identifies an end of the element, the second parameter identifies a degree of freedom and must have a value in the range from 1 to 6 which represents each of the degrees of freedoms at the elements end. If the first parameter is omitted or has a value of zero, the second parameter identifies one of the elements local degrees of freedoms and must have a value in the range from 1 to 12.
A third technique for accessing the displacements is using the EndDisps property. This property returns a variant containing an array of real numbers containing either the displacements for each degree of freedom at a specified end of an element or an array of values for the displacements at all of the elements degrees of freedom. This property is the fastest method of accessing all the displacements at the ends of an element, as it only requires a single call to the automation interface to obtain the displacements of each of the elements degrees of freedom.
The displacements returned by any of these properties is specified in terms of either the displacement or rotation units currently in use by the Multiframe application. The following example demonstrates the use of all three techniques of accessing the displacements in determining the total distance moved by a node.
Dim myResult As Multiframe.NodeResult
Dim dist As Double
Dim i As Long
Dim myVar As Variant
’Get results at Node 5 for linear analysis of load case 1
Set myResult = myFrame.Results.Case(1,mfAnalysisStatic).NodeResults(5)
’Test if results are solved
If (myResult.Solved) then
'(1)Compute distance moved by node
dist = myResult.dx ^ 2 + myResult.dy ^
2 + myResult.dz ^ 2
dist = Sqr(dist)
'(2)Compute distance moved by node
dist = 0#
For i = 1 To 3
dist = dist + myResult.Displacement(i)
^ 2
Next
dist = Sqr(dist)
'(3)Compute distance moved by node
myVar = myResult.Displacements
dist = myVar(1) ^ 2 + myVar(2) ^ 2 +
myVar(3) ^ 2
dist = Sqr(dist)
Endif
A similar interface is also provided to access the actions at the ends of the element. The properties, Px, Vy, Vz and Tx, My, Mz return the actions at each end of the member. These may also be returned by referencing a particular degree of freedom using the EndActions property while the EndActions method returns an array of the end action at a specified end of the element or an array of values for all of the elements degrees of freedom. The values returned by each of these properties is specified in terms of either the force or moment units currently in use by the Multiframe application.
Two properties of the ElementResult object allow the user to quickly determine if the element is in tension or compression without worrying about sign conventions. The InTension property will return true if the element is in axial tension while the InCompression property returns a value of true if the element is in axial compression.
The Element property of the ElementResult object returns a reference to an Element object that identifies the elements to which the results apply. The analysis used to generate the results can also be determined using the Analysis property of the ElementResult object, which returns an enumerated value of type mfAnalysisType.
The GetAction and GetActions methods of the ElementResult object provide access to the displacements and actions along an element. The GetAction method returns the value of a specified action or displacement at a specified location along the member. The GetActions method extends this functionality and returns an array of values for the action at a number of specified locations. For example, the following code demonstrates how to determine the moments at quarter points along an element.
Dim myResult As Multiframe.ElementResult
Dim myVar As Variant
Dim M1,M2,M3 as Double
’Get results for element 5 (linear analysis of load case 1)
Set myResult = myFrame.Elements(5).Results(1,mfAnalysisStatic)
’Test if results are solved
If (myResult.Solved) then
'Get actions at quarter points
M1 = myResult.GetAction(mfActionMz,0.25)
M2 = myResult.GetAction(mfActionMz,0.5)
M3 =
myResult.GetAction(mfActionMz,0.75)
'Alternatively get actions at quarter
points using single call
myVar =
myResult.GetActions(mfActionMz,Array(0.25,0.5,0.75))
M1 = myVar[1]
M2 = myVar[2]
M3 = myVar[2]
Endif
The maximum values of an action or displacement along an element can be obtained using the MaxAction and MaxActions properties of the ElementResult object. The MaxAction method returns the maximum value for a single action while the MaxActions method is used to compute the maximum value of a list of actions. The methods each take two parameters; the first specifies the action or actions to be considered. The second parameter in an enumerated value of type mfSign that identifies whether to maximum negative, positive or absolute value of the action is to be computed. The following example demonstrates using these methods to compute the design actions for an element
Dim myResult As Multiframe.ElementResult
Dim Mz,My,Vz,Vy,P as Double
Dim Actions(1 to 5) as long
’Get results for element 5 (linear analysis of load case 1)
Set myResult = myFrame.Elements(5).Results(1,mfAnalysisStatic)
’Test if results are solved
If (myResult.Solved) then
'Get design actions
Mz = myResult.MaxAction(mfActionMz,
mfSignAbsolute)
My = myResult.MaxAction(mfActionMy,
mfSignAbsolute)
Vy = myResult.MaxAction(mfActionVy,
mfSignAbsolute)
Vz = myResult.MaxAction(mfActionVz,
mfSignAbsolute)
P
= myResult.MaxAction(mfActionPx, mfSignAbsolute)
'Alternatively get design actions using
single call
Actions(1) = mfActionMz
Actions(2) = mfActionMy
Actions(3) = mfActionVy
Actions(4) = mfActionVz
Actions(5) = mfActionPx
myVar = myResult.MaxActions(Actions,
mfSignAbsolute)
Mz = myVar[1]
My = myVar[2]
Vy = myVar[3]
Vz = myVar[4]
P
= myVar[5]
Endif
The CopyPlot method provides a simple way of copying a graphic image of a specific actions diagram to the Windows clipboard. This image can then be pasted directly into a 3rd party application. This method takes five parameters which specify inorder, the action to be plotted, the width of the image in pixels, the height of the image in pixels, a boolean value indicating if the maximum, minimum and end actions are to be displayed on the diagram and lastly another boolean value indicating if a heading should be included in the image. This heading includes the name of the load case, the number of the element, the elements section, the name of the action and it’s units. The following sample code shows how a bending moment diagram can be copied to the clipboard.
Dim myResult As Multiframe.ElementResult
’Get results for element 5 (linear analysis of load case 1)
Set myResult = myFrame.Elements(5).Results(1,mfAnalysisStatic)
’Test if results are solved
If (myResult.Solved) then
‘Copy Mz’ diagram to clipboard
myResult.CopyPlot(mfActionMz,400,200,true,true)
‘Build chart
Endif
The locations of actions along the element used to construct a plot of an action such as a bending moment or shear diagram can be obtained using the GetPlotLocations method of the Element object. This function takes single parameter that specifies the action to be plotted and returns an array containing the distances along the member at which the action needs to be computed to construct the diagram of the specified action. This array can be passed directly to the GetActions method to obtain to values of the actions at each location in the plot. This information can then be used to construct a custom plot of the data. The example that follows demonstrates how to construct a chart that plots the bending moments along the major axis of an element.
Dim myResult As Multiframe.ElementResult
Dim Mz,My,Vz,Vy,P as Double
Dim vLocations as Variant
’Get results for element 5 (linear analysis of load case 1)
Set myResult = myFrame.Elements(5).Results(1,mfAnalysisStatic)
’Test if results are solved
If (myResult.Solved) then
'Get plot locations and actions
vLocations=
myResult.GetPlotLocations(mfActionMz)
My = myResult.GetAction(mfActionMy,
vLocations)
‘Build chart
Endif