Previous section-----Next section

Gears & Chains

Example Mechanism for MechanicalSystems 2D Gear Constraints

by Robert Beretta

Gear and Chain Animation

Discussion

Gear-Pump Function

This sample notebook analyzes the motion of a reciprocating gear-driven pump mechanism using the MechanicalSystems kinematics package. This mechanism is used to demonstrate the use of Mech's 2D gear constraints. Three of these constraints, TwoGears2, RackAndPinion2, and TwoPulleys2, are demonstrated in this single mechanism.

Gear-Pump Model

The gear-pump mechanism consists of six bodies.
1. Ground                (black)
2. Drive sprocket            (red)
3. Driven sprocket (drive gear)    (blue)
4. Driven gear            (green)
5. Drive pinion            (magenta)
6. Driven rack            (cyan)

Here is the gear-pump function in a nutshell.
1. The drive sprocket is driven by a motor.
2. The drive sprocket drives the driven sprocket via a chain.
3. The driven sprocket is solidly attached to the drive gear (hence they are one body).
4. The drive gear drives the driven gear.
5. The driven gear is linked by a connecting rod to the reciprocating drive pinion.
6. The pinion drives the rack.

Kinematic Model

Preparation

The Modeler2D package is loaded into Mathematica with the Needs command.

The following symbols are used to reference each of the bodies in the gear-pump model throughout the analysis.

Body Definitions

Ground

Five points are defined on the ground (body 1).
P1. The rotational axis of the drive sprocket.
P2. The rotational axis of the driven sprocket.
P3. The rotational axis of the driven gear.
P4. The rotational axis of the pinion.
P5. A point that is used to define the translation line of the rack.

Drive sprocket and driven sprocket

No points are defined on the drive and driven sprockets (bodies 2 and 3). Because these bodies are simply sprockets, their only defining features are their axes at local point 0, which need not be defined, and their radii, which are specified in the constraint objects, not the body objects.

Driven gear and pinion

Two points are defined on each of the driven gear and the pinion (bodies 4 and 5).
P1. The rotational axis of each body (at the local origin).
P2. The points of attachment of the connecting rod on each body.

Rack

Two points are defined on the rack (body 6).
P1. One end of the translation line of the rack (at the local origin).
P2. The other end of the horizontal translation line of the rack.

Build bodies

The data contained in each of the body objects is incorporated into the current model with the SetBodies command.

Constraint Definitions

Ten constraints, including one driving constraint, are used to model the gear-pump mechanism.

Drive sprocket constraints

1. A rotational driver for the drive sprocket that causes it to rotate as time T advances.
2. A revolute joint to force the axis of the drive sprocket to be coincident with its specified location on the ground.

Driven sprocket constraints

3. A constraint to enforce the relationship between the drive and driven sprockets.
4. A one degree of freedom constraint that prevents the driven sprocket from orbiting the drive sprocket.

TwoPulleys2 controls two of the three degrees of freedom of the driven sprocket--the distance between the two sprockets is held constant, and the rotational position of one sprocket is controlled relative to the other. The remaining degree of freedom allows the second sprocket to swing in an orbit around the first.

In this case, a valid position for the two sprockets is to place both sprocket's axes on the global X axis, and point both local x axes along the global X axis, also. This leads to an initial condition constant of C = 0.

Driven gear constraints

5. A gear constraint to enforce the relationship between the drive and driven gears.
6. A one degree of freedom constraint that stops the driven gear from orbiting the drive gear.

Like TwoPulleys2, this constraint controls only two of the three degrees of freedom of the driven gear. The remaining orbital degree of freedom is controlled with another constraint.

In this case, a valid position for the two gears is to place the driven gear directly above the drive gear, and align each of their local axes with the global axes. This leads to an initial condition constant of  .

Pinion constraints

7. A revolute joint to locate the axis of the pinion.
8. An absolute distance constraint to model the connecting rod.

Rack constraints

9. A constraint to enforce the rolling gear relationship between the rack and the pinion.
10. A one degree of freedom constraint to support the other end of the rack. PointOnLine1 is used to orient the rack relative to the center of a support roller, following the concept of the actual pump mechanism.

Like the other gear constraints, this constraint controls only two degrees of freedom. The pinion is placed at a constant distance away from the rack and the rotational position of the pinion is related to its position along the rack, but the rack is still free to swing around the pinion.

When the local axes of both the rack and the pinion are aligned with the global X axis, the axis of the pinion is directly adjacent to the second point used to define the rack (Point[6, 1]), thus the initial condition constant C is 0.

Build Constraints

The data contained in each of the constraint objects is incorporated into the current model with the SetConstraints command.

Initial Guesses

Initial guesses must be given for the X, Y, and CapitalTheta coordinates of all bodies. Guesses that are not specified are initially set to zero. Note that permanent initial guesses could have been specified earlier in the body objects and entered with the SetBodies command. Setting the initial guesses with SetGuess affects only the very next solution cycle.

Running the Model

CheckSystem test for several modeling errors. A return value of True is OK.

SolveMech[t] runs the current model at time t and returns a list of rules containing the X, Y, and CapitalTheta coordinates of each body.

Graphics

Gear-Pump Image

Here is a graphic image of the chain-drive system.

Here is a graphic of the pump.

Animation

The following input will generate the series of 24 graphics in the animation cell at the beginning of this notebook.

Removing a Body

It is not necessary to use body numbers that are consecutive integers; body numbers can be skipped. For example, the gear-pump can have the drive and driven sprockets (bodies 2 and 3) removed and a rotational driving constraint and revolute joint can be attached directly to the driven gear (body 5), making it the motion input to the model.

The constraints that are required from the original model are constraints 7 through 12.

This resets the initial guesses to the the values defined earlier. Some of the initial guesses are not needed.

The only bodies included in this model are bodies 1, 4, 5, and 6. None of the constraints passed to SetConstraints involved bodies 2 or 3, so these bodies are not included in the solution.

End