Previous section-----Next section

2.1.1 Body

Mech SysBody objects are created by the Body function, and used to define specific properties of a body in a mechanism model.

A function to define body objects.

Body accepts three options for defining inertia properties of a body: Mass, Inertia, and Centroid. These options will be discussed further in Section 8.1. The options for Body that are relevant in the kinematic phase of analysis are the PointList and InitialGuess options.

2D

2D options for Body.

3D

3D options for Body.

2D/3D

Default option settings for Body.

Executing the Body function does not, in itself, have any affect on the current Mech model. The returned body objects must be added to the model with the SetBodies command, which is discussed in Section 2.1.2.
Initial guesses specified with a body object are referred to as the permanent initial guesses. These initial guesses are used the first time that a solution is sought with SolveMech. Each subsequent solution attempt uses the previous solution as its initial guess. When the initial guesses are set with SetGuess, they may be explicitly set to user-specified values, or reset to the stored values of the permanent initial guesses.

Example

This loads the Modeler2D package.

The 2D example mechanism of Section 1.2 can be modified to use three body objects instead of repeatedly calling out the several local point coordinates on the ground, crankshaft, and piston bodies. These body objects store the local point definitions for future reference, through their integer point numbers, by other Mech functions.

Here are the crankshaft-piston mechanism bodies.

  • The ground body object uses three local point definitions.
    P1 is a point at the global origin that is the rotational axis of the crankshaft.
    P2 and P3 are two points that define the vertical line upon which the piston translates.
  • This defines a body object for the ground body.

  • The crankshaft uses two local point definitions.
    P1 is a point at the local origin that is the rotational axis of the crankshaft.
    P2 is a point on the local x axis that is the attachment point of the connecting rod.
  • This defines a body object for the piston.

  • The piston also uses two local point definitions.
    P1 is a point on the local y axis that is the attachment point of the connecting rod.
    P2 is a point on the local y axis that is the upper end of the translation line of the piston.
  • This defines a body object for the piston.

    InitialGuess

    Alternately, the piston could have been defined with the local origin at the attachment point of the connecting rod. This would suggest that a different initial guess be used than the default of X3 = 0, Y3 = 0, CapitalTheta3 = 0.

    Here is a body object for the piston with relocated origin and corresponding initial guess.

    This body object functions identically to the first one, except the Y coordinate of the piston is always 4 units greater, because the origin of the body has moved 4 units upward.
    Note that each of these body objects must be added to the current model with SetBodies before they will have any effect on the model.