Springs

A spring attached to a node within a structure is represented by a Spring object.  This object encapsulates all the properties of the spring such as its direction and stiffness.  All the springs utilised in a structural model are contained within the Springs collection which can be referenced directly from the Frame object using the property of the same name.

 

 

A summary of the properties of the Spring object are listed in the table below.

 

Property

Type

Description

DOF

mfDOF

Get/Set the degree of freedom in which the spring acts.

Global

Boolean

Get/Set whether the spring is directed in the global or local nodal coordinate system.

Kind

String

Get/Set the kind of the spring.

Node

Node/Variant

Get/Set node to which the spring is attached.

Value

mfRestraintType

Get/Set the stiffness of the spring.

 

The Application, Frame, Number, Label and Index properties and the Delete method are common to many objects and are described in Chapter 2.

Adding a Spring

A new spring can be attached to a node by calling the AddSpring method of the Springs collection.  This method has three parameters that specify the node to which the spring is to be attached, the direction in which the spring acts and its stiffness.  The node to which the spring is attached is passed as a variant parameter and so the node can be identified using either its index or by using a Node object.  The second parameter is an enumerated value of type mfDOF that identifies the degree of freedom in which the spring acts.  The final parameter specifies the stiffness of the spring in terms of the current units of spring stiffness that are set within the Multiframe application.  For example, the following code demonstrates how springs may be added to a structure.

Dim mySpring as Multiframe.Spring
 
’Get springs collection
With myFrame.Springs

  ’Add vertical spring at node 2
  Set mySpring = .AddSpring(2,mfDOFy,10.5)

  ’Add torsional spring at node 5
  Set mySpring = .AddSpring(myFrame.Nodes(5), mfDOFthetaz,0.25)

End With

A number of springs can be added in a single call to the automation interface using the AddSprings method of the Springs collection.  This method takes three parameters that have the same meaning as those passed to the AddSpring method.  However, each of the parameters may be an array of values, containing a value corresponding to each new spring, or a single value that will be applied to each of the new springs.  Some examples of how this method may be used are shown in the following script.

Dim mySpringList as New Multiframe.SpringList
Dim myNodeList as New Multiframe.NodeList
Dim stiffness as Variant
const DtoR = 3.14159/180.0             ‘Factor to convert degrees to radians

With myFrame.Springs

  'Add horizontal spring to node 5
  Set mySpringList = .AddSprings(5,mfDOFx,5.75)

  'Add springs to nodes 1 representing spring inclined at 60 degrees
  stiffness= Array(5.0*cos(60*DtoR),5.0*sin(60*DtoR))
  Set mySpringList = .AddSprings(1,Array(mfDOFx,mfDOFy),stiffness)

  'Add springs to nodes 1 to 10 and nodes 15 and 20
  Set mySpringList = .AddSprings(“1-10,15,20”,mfDOFthetaZ,6.5)

End With

Properties

The Spring object encapsulates the data describing a joint spring within a Multiframe structural model.  This data, which includes information describing the node to which the spring is attached, the direction of the spring and its stiffness, can be access via the properties of this object.

The Node property of the Spring object identifies the node to which the spring is attached.  This property, which provides a reference to a Node object, may also be used to change the node to which the spring is applied.  It can be set equal to any variant value that can be used to identify a node.

The direction in which the spring acts is specified by the DOF property of the Spring object.  This property is an enumerated value of type mfDOF.  Linear springs are applied with a DOF of mfDOFx, mfDOFy or mfDOFz while torsional springs are specified with a DOF of mfDOFthetax, mfDOFthetay or mfDOFthetaz.  The axes to which these degrees of freedom refer are specified by the Global property.  This Boolean property is set true then the spring is acting in the direction of the global coordinate axes. If the Global property is false, the spring is directed along the local axes of the node to which the spring is attached.  The direction and axes may also be specified using the Kind property.  This property is a character string describing the direction of spring and the axes to which the load is applied.

The stiffness of a spring is stored in the Value property of the Spring object.  This property describes the spring’s stiffness in terms of the spring or torsional spring units currently set within the Multiframe application.  An example of how these properties may be changed is as follows

Dim mySpring as Multiframe.Spring
 
’Get reference to a spring
set mySpring = myFrame.Springs(1)

’Move spring to node 5
mySpring.Node = myFrame.Nodes(5)

’Set spring to have stiffness of 5 units applied in global y direction
mySpring.DOF = mfDOFy
mySpring.Value = 5.0
mySpring.Global = true

’Change spring such that it acts in the local x direction
mySpring.Kind = ”kx’”