Introduction

Introduction

    Introduction

Library

Modelica/Mechanics/MultiBody/UsersGuide/Tutorial/LoopStructures

Description

In principal, no special action is needed, ifloop structures occur (contrary to the ModelicaAdditions.MultiBody library).An example is presented in the figure below. It is available asMultiBody.Examples.Loops.Fourbar1

This mechanism consists of 6 revolute joints and 1 prismatic joint and forms akinematical loop.It has one degree of freedom. In the next figure the default animationis shown. Note, that the axes of the revolute joints are represented by thered cylinders and that the axis of the prismatic joint is represented by thered box on the lower right side.

Whenever loop structures occur, non-linear algebraicequations are present on "position level". It is then usually not possible bystructural analysis to select states during translation (which is possible fornon-loop structures). In the example above, a non-linearalgebraic loop of 54 equations can be detected and reduced to a system of 6 coupledalgebraic equations. Note, that this is performed without using any"cut-joints" as it is usually done in multi-body programs, but by justappropriate symbolic equation manipulation. Via the dynamic dummy derivativemethod the generalized coordinates on position and velocity level from one ofthe 7 joints are dynamically selected as states during simulation. Whenever,these two states are no longer appropriate, states from one of the otherjoints are selected during simulation.

The efficiency of loop structures can usually beenhanced, if states are statically fixed at translation time. For thismechanism, the generalized coordinates of joint j1 (i.e., therotation angle of the revolute joint and its derivative;the joint is visualized as a red cylinder at the x-axis in the animation figure above)can always be used as states.In the abovementioned example, this is already stated by setting parameter"stateSelect = StateSelect.always"in the "Advanced" menu of that joint.When setting this flag for joint j1 in that way inthe four bar mechanism, a non-linear algebraic loop of 40equations can be detected and reduced to a system of 5 coupled non-linear algebraicequations.

In many mechanisms it is possible to solve the non-linear algebraicequations analytically. For a certain class of systems this canbe performed also with the MultiBody library. This techniqueis described in section"Analytic loop handling".