Previous section-----Next section

9.1.1 2D Example Mechanism

This subsection develops a planar model of a classic four-bar mechanism. The driving input to the model is to specify the rotation of bar 2, the drive bar. Because the drive bar is the shortest link in the model, the driven bar and center bar simply oscillate as the drive bar progresses through each full turn. Driven in this manner the model has no singular configurations.

This loads the Modeler2D package.

Here is a graphic of the four-bar model.

Bodies

Four body objects are defined for the four-bar mechanism model. Each body in the model is simply a two-ended bar, so only two local points are defined on each body. Each body is attached to one neighboring body at its local origin and another neighboring body at an offset point on the local x or y axis. Body 4, the center bar, has a third point defined that is used only as a point of reference to measure the motion of the model.
The body objects are defined such that the length of each bar is a symbolic parameter that can be changed at a later time.

Names are defined for each of the body numbers in the model.

Here are the four body objects for the four-bar model.

The body objects are incorporated into the current model with SetBodies.

Constraints

Five constraints, one of which is a driving constraint with explicit dependence on time, are used to model the four-bar mechanism. A RotationLock1 constraint controls the rotation of the drive bar as a function of T. Four Revolute2 constraints model the revolute joints at each end of the four bars.

Here are the five constraint objects for the four-bar model.

The constraint objects are incorporated into the current model with SetConstraints.

Runtime

Before the model can be run, the symbols bar2, bar3, and bar4 that determine the length of the each bar must be defined. The SetParameters function is used to make the symbols formal parameters so that they are recognized by SetCouple.

The symbolic lengths of each bar are defined.

Now the model is run at T = 0.05.

Here is a plot of the four-bar mechanism with the locus of a point on the center bar.