Reuleaux Mechanism Simulator:

Help Manual & Tutorial

 

 

 

Paul J White

Version 1.1

Revised 2/9/2004

 

Outline
Introduction
Summary
Format
Submitting and Testing
Tutorial

 

Introduction:

 

            This document is meant to be a tutorial that will explain how a data file can be created for the kinematics simulator through a series of increasingly more complex examples.  The examples demonstrate a straightforward method that begins with a model or geometrical configuration and ends with a data file for the simulator.  The format of the data files is such that it allows the user to have freedom over many aspects of a mechanism and is laid out in a relatively intuitive and clear manner once the user becomes comfortable with the format.  This tutorial begins with a brief description of what the simulator does with a data file and what each of the aspects of a data means.  In addition, the format of the most general data file is presented followed by a series of examples for clarity.  These examples range from the relatively straightforward four bar mechanism to a somewhat complex multi-gear mechanism.

 

Summary:

 

            The simulator is essentially a platform that gives the user the ability to manipulate a model of a mechanism.  A mechanism can be simply defined as a collection of nodes joined by links and governed by certain constraints.  Therefore, a data file that describes such a mechanism must define such nodes, links and constraints.  The data file also gives the creator the ability to define messages to display a certain points in the simulation so as to guide the user.  The following is the general format for creating a data file for the latest version – version 6:

 

version_number

number_of_nodes

x y label fixed? trace? collinear? [nodeA nodeB] constrained? [x y] gear? [buddies buddy1 direction1 … center]

                                                                                    :

                                                                                    :

number_of_links

nodeA nodeB label

            :

            :

number_of_messages

nodeA x_tolerance y_tolerance x_trigger y_trigger x_message y_message message

                                                                        :

                                                                        :

 

The format of the data file may seem somewhat confusing at first, but with the following clarifications it should seem rather understandable.  A data file is created by simply opening a text editor such as notepad on a Windows system and writing the file according to the above format.  The first line of the file specifies the version number of the data file.  This tutorial explains features that require version 6.  The reason there needs to be a version number is so that the simulator can be continually enhanced while still being completely backward compatible with more primitive versions of the data file format.  After the version number there are three basic sections: the node section, the link section and the message section.  The node section begins by specifying the number of nodes in the mechanism.  This is followed by one line that defines each of the nodes and this repetition of node definitions is represented above by the vertical periods of ellipsis.  Each node line contains all of the information necessary to specify the location, attributes and any constraints of a node.  The simulator utilizes a single space as a deliminator between each piece of information in a node line. 

 

Format:

 

The node line begins with the x and y position of  the node with origin located in the upper left corner of the simulator space with positive x continuing to the right and positive y continuing straight down from that corner.  The simulator space can be set to a wide range of dimensions and the current settings in the x and y directions are 800 and 600 pixels respectively.  Note that the locations and distances are completely unitless; all of the current simulations are simply scale models of the Reuleaux Mechanisms that preserve the correct ratio of node locations.  Therefore, the creator of the creator of the data file is free to choose the scale of the model.  It is important to keep in mind when creating the data file the space that the model can be manipulated in.  That is, certain portions of models can be manipulated out of the simulator’s viewing space if the data file creator does not pay close attention to the location of the model and the space limitations of the simulator.  The node line continues by labeling the node if desired.  The node can be given a single word label (note that it must be limited to one word without spaces) and if no label is desired simply use none as the label and no label will appear.  If a label is given, it will be displayed adjacent to the node in the simulator and will follow the node around as the mechanism is manipulated.

 

            What follows the x and y position and the label are five Boolean statements and potentially other defining information for the node.  For the Boolean node parameters, the creator of the data file types either true or false (case sensitive) and if true is select parameter, depending on the parameter, further information may be needed to complete the parameter.  This will become clear in the following exact descriptions of each of the parameters:

 

  1. Fixed: When set true, this parameter defines the node to remain fixed and the node will appear in the simulator with a triangle below – the traditional symbol signifying that a point is grounded.
  2. Trace: When set true, this parameter defines the node to a trace node.  In the simulator, nodes that are designated as trace nodes print a dot at the node location every cycle of the simulator.  These dots are continuously printed for a predetermined number of cycles and serve to give the effect of tracing the path of the node.
  3. Collinear: When set true, this parameter defines the node to be constrained to be collinear with two other nodes and therefore setting this parameter true also requires two additional parameters: the nodes that define the collinearity.  If true is selected, this parameter must be immediately followed by the first and second node (nodeA and nodeB) keeping in mind that each parameter including possible additional ones such as these must be single space separated.  To refer to a certain node, simply enter the order in which it is or will placed in the data file (ordering is 0 based.)  For example, to make a given node collinear with the first (0th) and second (1st) node, the parameters would be as such: true 0 1.  If the node is not collinear with any pair of nodes, the parameter is set to false and no further parameters are required.
  4. Constrained: When set true, this parameter defines the node to be constrained to move along a certain line and therefore requires setting two additional parameters that define the direction in which it is constrained to move.  When the parameter is set to true it is followed by two values: the x and y values of the unit vector that defines the direction of constraint.  The two values define the direction unit vector and therefore the sum of their squares should equal 1.  Also, it is important to remember the nature of the coordinate system as previously explained.  If the constrained parameter is set, the constraint on the node is signified by a triangle with wheels that rides on a line that continues off of the simulator viewing space in either direction.  Again if false is selected, there is no need to put any parameters after the false value.
  5. Gear: When set true, this parameter defines the node to be a gear node that has one or more “buddy” nodes.  Buddy nodes are those nodes whose movement is affected by the movement of another node whether it represents two gears whose outside faces mesh, a gear that meshes with the inside of a ring gear or two gears that are linked via a belt or some other mechanism.  The format for creating gears is somewhat subtle and it is suggested to examine the examples given in this tutorial to fully understand how they work.  The parameter format states that a true statement must be followed by the number of buddies’ parameter.  This parameter designates what other nodes will be affected by the movement of this node.  The number of buddies’ parameter also determines how many parameters must follow.  In the data file format above there are two parameters that follow the number of buddies’ parameter: buddy and direction followed by periods of ellipsis which indicate that this pair of parameters is to be repeated for the number of times set by the number of buddies’ parameter.  The buddy parameter indicates the node to be affected (0th ordered) and the direction parameter indicates which direction the affected node should travel.  The direction parameter has two settings 1 or -1.  If 1 is chosen the affected node will travel in the same direction as this node (e.g. a gear and ring gear combination) and if -1 is chosen the nodes will travel in opposite directions (e.g. two gears that mesh on their outside faces.)  The final parameter that follows these buddy-direction pairs is the center node parameter which defines the node that this node will revolve around.  Note that the center node does not necessarily have to be fixed (i.e. planet-sun gear pair.)  The example section of this tutorial gives plenty of variations on the way the gear parameters can be used.  And again, if the node is not a gear, the false statement is used and no further parameters are required.

 

            After all of the node lines have been set, it is time to define the connections or links for the nodes which is a significantly easier process.  To begin the link section, the first line following the last node line is the number of links’ parameter that determines how many links there are in the model.  Following that line are a number (corresponding to the number of link lines’ parameter) of link lines that define the links between nodes in three parameters.  The first two parameters define the two nodes that the link joins and the final parameter is a label parameter that gives the data file creator the ability to label links much the same way as nodes can be labeled.  Again, recall that nodes are 0th order and that if no label is desired the value of none should be used for that parameter.  This is basically all that is required to define the links between nodes and the link lines continue on as indicated by the vertical periods of ellipsis for the number of times defined by the number of links’ parameter.

 

            The final section of the data file gives the creator the opportunity to add messages to the model that will appear at given points in the simulator so as to aid the user and give him further information about certain features of the model.  Note that the message section of the data file is the only non-required one.  The first parameter that immediately follows the last link line is the number of messages parameter.  This parameter defines the total number of messages for the model.  This line is followed by a number (corresponding to the number of link lines’ parameter) of message lines that define the parameters of the message.  The general concept of a message is such that it allows the data file creator to define a message that will display when a given node is in a given space on the simulator space.  For example, the message line can state that when node 0 is in a box 4x4 region around the point (30, 30) the simulator should display the message “Pull me” at point (35, 30).  The first parameter defines the node that message is associated with.  The next two parameters define the region tolerance that determines when the message is to be displayed.  The x and y tolerance define how far in either direction along the respective coordinate directions should the simulator look beyond the trigger point to see if the node is near the trigger point.  The next two parameters define the x and y coordinates of the trigger point.  The next two parameters define the x and y coordinates of the message.  The final parameter defines the message.  Note that the message must be enclosed in double quotations.  This is because for all previous labels the label was limited to being one continuous word whereas the message parameter allows for multiple words.

 

            Once the data file is completed, it should be saved as a .dat file to indicate to the simulator that this file contains the information for the model.  Now, several examples will be given to further clarify the process of creating a data file.  The format of the examples will include the picture of the model, the data file and a detailed annotation indicating the significant points of the given data file.

 

Submitting and Testing:

 

            A completed data file can be tested by uploading the data file to the web server in the location specified by the system administrator.  To upload and test a data file, please contact your system administrator for helping with submitting and testing the file.

 

 

Tutorial:

 

 

Model: π 0 double rocker

Data File: pi0doublerocker.dat

 

6

4

161.53 62.14 A false false false false false

208.51 45.05 B false false false false false

234.47 141.60 C true false false false false

174.47 141.07 O true false false false false

4

0 1 h

1 2 b

2 3 g

3 0 a

0

 

Notes:

  1. node x and y positions are doubles and therefore allow for long decimal positions
  2. labels are used for both the nodes and the links
  3. node labels placed up and to right of the node; link labels placed up and to right of the midpoint of the link
  4. constraint parameters all set false except for node 2 and 3 which are fixed
  5. note the 0th ordering of nodes
  6. no messages indicated by 0 for the number of messages parameter

 

 

Model: Peaucellier

Data File: peaucellier.dat

 

6

6

280.0 280.0 none true false false false false

517.53 224.23 none false false false false false

551.91 295.36 none false true false false false

509.74 362.16 none false false false false false

475.36 291.03 none false false false false false

380.0 280.0 none true false false false false

8

0 1 none

1 2 none

2 3 none

3 4 none

4 5 none

5 0 none

4 1 none

3 0 none

0

 

Notes:

  1. node 2 trace parameter set to true; trace dots placed in simulator
  2. blue lines indicate those links in compression; red lines indicate those in tension

 

 

Model: S 6

Data File: s6.dat

 

6

5

198 110 none true false false false false

82 152 none false false false false false

120 128 none false true true 1 3 false false

147 110 none false false false false false

152 189 none true false false false false

4

0 1 none

1 2 none

2 3 none

3 4 none

0

 

Notes:

  1. node 2 is collinear with nodes 1 and 3

 

 

Model: S 4

Data File: s4.dat

 

6

3

335 185 none false false false true 0 1 false

325 155 none false false false false false

347 132 none false false false true .87 .49 false

2

0 1 none

1 2 none

0

 

Notes:

  1. node 0 constrained to move in the (0, 1) direction
  2. node 2 constrained to move in the direction designated by its unit vector

 

 

Model: G 2

Data File: g2.dat

 

6

5

200 200 none true false false false false

200 164 none false false false false true 2 3 -1 4 1 0

280 200 none true false false false false

280 156 none false false false false true 1 1 -1 2

396 200 none false false false false true 1 1 1 2

3

0 1 none

2 3 none

2 4 none

0

 

Notes:

  1. node 1 has two buddies: the ring gear (node 4) and the sun gear (node 3)
  2. the sun gear and the planet gear travel in opposite directions (designated by -1)
  3. the ring gear in the planet gear travel in the same direction (designated by 1)
  4. important: if one gear has a buddy node such as node 1 has a buddy node 3, then that buddy node 3 must also state that it has a buddy node 1 – this indicates if node 1 moves node 3 moves and vice versa
  5. the very last parameter for all the gear nodes indicates the node that is their center

 

 

Model: Simple Planet-Sun Gear

Data File: planetary.dat

 

6

4

150 150 none true false false false false

200 150 none false false false false true 1 2 -1 0

250 150 none false false false false true 1 1 -1 3

225 150 none false false false false false

3

0 3 none

0 1 r=50

3 2 r=25

0

 

Notes:

  1. the center for node 2 is node 3 which is not fixed
  2. the labels given for the radii are one string with no spaces separating any of the characters

 

 

Model: Cartwright

Data File cartwright.dat

 

6

7

55 50 none false true false false true 1 4 -1 5

75 147 none false false false false false

115 147 none false true true 1 3 true 0 1 false

155 147 none false false false false false

175 50 none false true false false true 1 0 -1 6

85 50 none true false false false false

145 50 none true false false false false

6

0 1 none

1 2 none

2 3 none

3 4 none

0 5 none

4 6 none

1

2 20 500 115 147 200 50 "Pull on either of the gears"

 

Notes:

  1. this model has a little of everything
  2. the message tolerances are such that the message will always be displayed