B.ii. Mechanism File Format
Appendix B.ii: Mechanism File Format
Mechanisms are similar to Dummies in many ways: they share a common Assembly and Point definition syntax, and when a Dummy is "free dragged" in mechanism-style positioning PRIMER automatically builds an internal mechanism to perform the drag.
However there are also some significant differences:
-
Mechanisms do not have the hierarchical parent/child structure of dummies,
as their connectivity can be completely arbitrary. Therefore although their
keyword card formats are similar it would be misleading to refer to them as
a "tree file".
-
Because of the absence of a hierarchy Mechanism assemblies are a little
different different from Dummy ones, in particular they do not define "child"
assemblies.
-
Mechanism assemblies are joined together by "Connections" which
have to be defined explicitly, whereas Dummy connectivity is defined by the
"child" lines on Assembly cards.
- Finally Mechanisms can have child mechanisms or dummies, whereas dummies cannot.
It is not expected that mechanisms will be created outside PRIMER as defining them interactively within the programme is very easy, so the card formats are included mainly for completeness.
*MECHANISM_START
<label> <title>
The following line is optional .
<move_xsec> <mcon_labels>
|
<Label> |
I10 |
Must be unique within a model, as this identifies the Mechanism. |
|
|
<Title> |
A70 |
An arbitrary character string describing the Mechanism. |
|
|
The line below is optional , it was added in release 12. If it is omitted in an input file, data fields will be given the default values specified here. |
|||
| <move_xsec> | I10 | Default = 1 |
Whether to move *DATABASE_CROSS_SECTION_PLANE definitions with parts in an assembly with the assembly as it is positioned. 1 = Yes, 0 = No. |
| <mcon_labels> | I10 | Default = 0 |
Whether mechanism connections are written with labels. This option has been added in PRIMER 15.0 to make it possible to reference line or hinge connections by their label from a coupler connection. When writing a keyword file from PRIMER, this option will be turned on (set to 1) if and only if there will be coupler connections written for this mechanism definition. 1 = Yes, 0 = No. |
This card starts a new Mechanism definition, giving its label and title, and possibly further optional values. All cards between this and the corresponding *MECHANISM_END are "private" to this mechanism definition.
*ASSEMBLY
<label> <Title>
<#SET_PARTs> <#PARTs> <unused> <#SET_NODEs> <locked> <csys> <#contacts>
<SET_PART_1> <SET_PART_2> ... <SET_PART_n>
<PART_1> <PART_2> ... <PART_n>
<SET_NODE_1> <SET_NODE_2> ... <SET_NODE_n>
<Part set><Box><Tk factor> <active>
: : :
| <Label> | I10 | Label number for this assembly. This must be unique within this mechanism, (but assemblies are "local" to a mechanism, so the same label may occur in different mechanisms). | |
| <Title> | A70 | Arbitrary name for this assembly. | |
| <#set_parts> | I10 | The number of *SET_PARTs in this assembly | |
| <#parts> | I10 | The number of *PARTs in this assembly | |
| <unused> | I10 | This field is unused for mechanism definitions (see note 1 below) | |
| <#set_nodes> | I10 | The number of *SET_NODE definitions in this assembly | |
| <locked> | I10 | Locked degrees of freedom during positioning. Any permutation of 123456, or 0 for none. | |
| <csys> | I10 | Optional local coordinate system for assembly restraints during positioning | |
| <#contacts> | I10 | Number of contacts between assemblyand fixed "structure" | |
| <set_part_1... | 8I10 | Define <#set_parts> entries. | 8 entries per line, using as many lines as required |
| <part_1 ... | 8I10 | Define <#parts> entries. | 8 entries per line, using as many lines as required |
| <set_node_1... | 8I10 | Define <#set_nodes> entries | 8 entries per line, using as many lines as required |
| Note 1: |
PRIMER version 9.3RC1 contained Nodal Rigid Bodies in this "slot". These have been withdrawn and replaced with Set Nodes since the latter are more flexible and permit nodes to be defined explicitly in assemblies. Models which contain Nodal Rigid Bodies in assemblies may be converted to the new format by replacing the nodal rigid body labels with the labels of their node sets, which in many cases will be identical. The behaviour of the assembly during mechanism analysis will be identical. |
||
|
An assembly may be made up of any number of SET_PARTs and/or PARTs and/or SET_NODEs, whichever is more convenient. Parts may be defined more than once, ie occur both explicitly and in sets, only a single instance will be used. Assemblies should contain at least one part otherwise visualising and dragging them may prove difficult. |
|||
| <Part set> | I10 | Part set for contact | <#contacts> lines of data, each definition starts a new line. |
| <Box> | I10 | Optional box to delimit contact | |
| <tk factor> | E10.0 | Factor on true shell thickness for contact purposes | |
| <active> | I10 | Flag to denote contact active (1) or inactive (0) | |
*CONNECTION_PIN
<Title>
<label>
<assy_1> <assy_2> <node> <locked> <cx> <cy> <cz> <jstf>
| <title> | A80 | Optional title for connection | |
| <label> | I10 | Label for connection. This data row should be included if and only if the mcon_labels flag is 1 on the *MECHANISM_START card. In particular it did not appear before PRIMER 15.0. | |
| <assy_1> | I10 | Assembly #1 | |
| <assy_2> | I10 | Assembly #2 | |
| <node> | I10 | Node at connection position. | |
| <locked> | I10 | 0 for unlocked joint, 1 for locked. | |
| <cx> | E10.0 | Connection position X coord |
Note : These fields are only present in V10 onwards. From V10.0 onwards a pin location may be defined either by a node or by an explicit position. If a node is defined it is used, regardless of any position <cx,cy,cz>, otherwise the stipulated position is used. |
| <cy> | E10.0 | Connection position Y coord | |
| <cz> | E10.0 | Connection position Z coord | |
| <jstf> | I10 | Joint Stiffness id | From V20 onwards connections may have an optional *CONSTRAINED_JOINT_STIFFNESS, typically used to set "stop angles" in the local coordinate system of the connection. |
*CONNECTION_LINE
<Title>
<label>
<assy_1> <assy_2> <node_1> <node_2>
<pos_slide> <neg_slide> <cur_dist> <locked>/<-1>/<-2>
<pos_rot> <neg_rot> <curr_angle> <locked> <a3_active>
<assy_3> <factor_1> <factor_2>
<c1_x> <c1_y> <c1_z> <c2_x>
<c2_y> <c2_z>
| <title> | A80 | Optional title for connection | |
| <label> | I10 | Label for connection. This data row should be included if and only if the mcon_labels flag is 1 on the *MECHANISM_START card. In particular it did not appear before PRIMER 15.0. | |
| <assy_1> | I10 | Assembly #1 | |
| <assy_2> | I10 | Assembly #2 | |
| <node_1> | I10 | First node on line | |
| <node_2> | I10 | Second node on line | |
| <pos_slide> | E10.0 | Permitted slide distance in +ve direction | |
| <neg_slide> | E10.0 | Permitted slide distance in -ve direction | |
| <cur_dist> | E10.0 | Current slide distance | |
|
<locked>
or <-1> or <-2> or <-3> |
I10 |
0 for unlocked joint, 1 for locked. ( 9.3RC1 format) -1 to signify continuation in 9.3RC2 format -2 to signify continuation in 10.0 format -3 to signify continuation in 17.0 format |
Note
: Format of this card changed between 9.3RC1 and RC2.
And changed again with 10.0 and then with 17.0 |
| <pos_rot> | E10.0 | Permitted +ve rotation (degrees: 0 to +1.0e30) |
Note : This continuation line is 9.3RC2 format & later only. The stop angle limits have changed with PRIMER 17.0. In previous versions the positive stop angle was limited between 0 and +180 degrees, whereas the negative one was between 0 and -180 degrees. Angles of +/-180 degrees denoted unlimited rotation, which from PRIMER 17.0 onwards is stored as +/-1.0e30 to allow rotations to be limited by angles greater than 180 degrees. |
| <neg_rot> | E10.0 | Permitted -ve rotation (degrees 0 to -1.0e30 | |
| <curr_angle> | E10.0 |
Current rotation angle (degrees) |
|
| <locked> | I10 | 0 for unlocked joint, 1 for locked. | |
| <a3_active> | I10 | 1 if Assembly #3 active | Note : these fields are only present from V10.0 onwards |
| <assy_3> | I10 | Assembly #3 | |
| <factor_1> | E10.0 | Factor on <assy_1> motion | |
| <factor_2> | E10.0 | Factor on <assy_2> motion | |
| <c1_x> | E10.0 | Point 1 X coordinate |
Note : This card is only present from V10.0 onwards, signified by <-2> in column 8 of the 1st card. From V10.0 onwards either or both locations may be defined either by a node or by an explicit position. If a node is defined it is used, regardless of any position <cx,cy,cz>, otherwise the stipulated position is used. |
| <c1_y> | E10.0 | Point 1 Y coordinate | |
| <c1_z> | E10.0 | Point 1 Z coordinate | |
| <c2_x> | E10.0 | Point 2 X coordinate | |
| <c2_y> | E10.0 | Point 2 Y coordinate | |
| <c2_z> | E10.0 | Point 2 Z coordinate | |
*CONNECTION_HINGE
<Title>
<label>
<assy_1> <assy_2> <node_1> <node_2>
<locked>/<-1>/<-2>
<pos_rot> <neg_rot> <curr_angle> <locked>
<c1_x> <c1_y> <c1_z> <c2_x>
<c2_y> <c2_z>
| <title> | A80 | Optional title for connection | |
| <label> | I10 | Label for connection. This data row should be included if and only if the mcon_labels flag is 1 on the *MECHANISM_START card. In particular it did not appear before PRIMER 15.0. | |
| <assy_1> | I10 | Assembly #1 | |
| <assy_2> | I10 | Assembly #2 | |
| <node_1> | I10 | First node on line | |
| <node_2> | I10 | Second node on line | |
|
<locked>
or <-1> or <-2> or <-3> |
I10 |
0 for unlocked joint, 1 for locked. ( 9.3RC1 format) -1 to signify continuation in 9.3RC2 format -2 to signify continuation in 10.0 format -3 to signify continuation in 17.0 format |
Note
: Format of this card changed between 9.3RC1 and RC2.
And changed again with 10.0 and then with 17.0 |
| <pos_rot> | E10.0 | Permitted +ve rotation (degrees: 0 to +1.0e30) |
Note : This continuation line is 9.3RC2 format & later only. The stop angle limits have changed with PRIMER 17.0. In previous versions the positive stop angle was limited between 0 and +180 degrees, whereas the negative one was between 0 and -180 degrees. Angles of +/-180 degrees denoted unlimited rotation, which from PRIMER 17.0 onwards is stored as +/-1.0e30 to allow rotations to be limited by angles greater than 180 degrees. |
| <neg_rot> | E10.0 | Permitted -ve rotation (degrees 0 to -1.0e30 | |
| <curr_angle> | E10.0 |
Current rotation angle (degrees) |
|
| <c1_x> | E10.0 | Point 1 X coordinate |
Note : This card is only present from V10.0 onwards, signified by <-2> in column 5 of the 1st card. From V10.0 onwards either or both locations may be defined either by a node or by an explicit position. If a node is defined it is used, regardless of any position <cx,cy,cz>, otherwise the stipulated position is used. |
| <c1_y> | E10.0 | Point 1 Y coordinate | |
| <c1_z> | E10.0 | Point 1 Z coordinate | |
| <c2_x> | E10.0 | Point 2 X coordinate | |
| <c2_y> | E10.0 | Point 2 Y coordinate | |
| <c2_z> | E10.0 | Point 2 Z coordinate | |
*CONNECTION_COUPLER
<Title>
<label>
<mcon_1> <mode_1> <coeff_1>
<mcon_2> <mode_2> <coeff_2>
<mcon_3> <mode_3> <coeff_3>
This card has been added from PRIMER 15.0 onwards.
| <title> | A80 | Optional title for connection | |
| <label> | I10 | Label for connection | |
| <mcon_1> | I10 | Connection #1. This needs to be either a line or a hinge. | |
| <mode_1> | I10 | Coupling mode #1. This should be 0 for translational coupling or 1 for rotational coupling. If connection #1 is a hinge, this needs to be 1. | |
| <coeff_1> | E10.0 | Coefficient c1 in the defining equation for the coupler | |
| <mcon_2> | I10 | Connection #2. This needs to be either a line or a hinge. | |
| <mode_2> | I10 | Coupling mode #2. This should be 0 for translational coupling or 1 for rotational coupling. If connection #2 is a hinge, this needs to be 1. | |
| <coeff_2> | E10.0 | Coefficient c2 in the defining equation for the coupler | |
| <mcon_3> | I10 | Optional connection #3. If defined, this needs to be either a line or a hinge. | |
| <mode_3> | I10 | Coupling mode #3. This should be 0 for translational coupling or 1 for rotational coupling. If connection #3 is a hinge, this needs to be 1. This will be ignored when connection #3 is 0. | |
| <coeff_3> | E10.0 | Coefficient c3 in the defining equation for the coupler. This will be ignored when connection #3 is 0. | |
*POINT_NODE
<title>
<assembly id> <node id> <restrained DoFs> (<csys>)
| <title> | A80 | Title for the point |
| <assembly id> | I10 | Label of assembly to which point is attached |
| <node id> | I10 | Label of node from which point coordinates are taken |
| <restrained DoFs> | I10 | A restraint code made up of any permutation of 123456, or 0 for none |
| <csys> | I10 | Optional: a coordinate system to give restraint in local axes. |
*POINT_LOCATION
<title>
<assembly id> <px> <py> <pz> <restrained DoFs>
(<csys>)
| <title> | A80 | Title for the point |
| <assembly id> | I10 | Label of assembly to which point is attached |
| <px> | E10.0 | X coordinate of point |
| <py> | E10.0 | Y coordinate of point |
| <pz> | E10.0 | Z coordinate of point |
| <restrained DoFs> | I10 | A restraint code made up of any permutation of 123456, or 0 for none |
| <csys> | I10 | Optional: a coordinate system to give restraint in local axes. |
*CHILD_DUMMY
or
*CHILD_MECHANISM
(Card format is the same for both)
<title>
<parent assy> <child label> <nconstrained> <linked DoFs>
<locked>
<child assy #1>
<child assy #2>
: : :
| <title> | A80 | Optional title |
| <parent assy> | I10 | Label of "driving" assembly in parent mechanism |
| <child label> | I10 | Label of "child" mechanism or dummy definition. |
| <nconstrained> | I10 | Number of assemblies in child that are "constrained" to this parent |
| <linked DoFs> | I10 | Any permutation of 123 giving degrees of freedom linking parent to child. |
| <locked> | I10 | 1 if child is fully locked to parent |
| <child assy n > | I10 | Linked child assemblies 1 to <nconstrained>, 1 per line |
*POSITION
Any number of positions may be stored for a mechanism, and position information is identical for dummies and mechanisms. A description of these and their card format is given in Position Card Format.
*MECHANISM_END
Terminates the mechanism definition.