Package Modelica.​Mechanics.​Translational.​UsersGuide
User's Guide of Translational Library

Information

Library Translational is a free Modelica package providing 1-dimensional, translational mechanical components to model in a convenient way translational mechanical systems. More details are given in the following sub-sections:

Extends from Modelica.​Icons.​Information (Icon for general information packages).

Package Contents

NameDescription
ContactContact
FlangeConnectorsFlange Connectors
OverviewOverview
SignConventionsSign Conventions
StateSelectionState Selection
SupportForcesSupport Forces
UserDefinedComponentsUser Defined Components

Class Modelica.​Mechanics.​Translational.​UsersGuide.​Overview
Overview

Information

This package contains components to model 1-dimensional translational mechanical systems, including different types of masses, external forces, spring/damper elements, frictional elements, elastogaps, elements to measure position, velocity, acceleration and the cut-force of a flange. In sublibrary Examples several examples are present to demonstrate the usage of the elements. Just open the corresponding example model and simulate the model according to the provided description.

A unique feature of this library is the component-oriented modeling of Coulomb friction elements, such as support friction. Even (dynamically) coupled friction elements can be handled without introducing stiffness which leads to fast simulations. The underlying theory is new and is based on the solution of mixed continuous/discrete systems of equations, i.e., equations where the unknowns are of type Real, Integer or Boolean. Provided appropriate numerical algorithms for the solution of such types of systems are available in the simulation tool, the simulation of (dynamically) coupled friction elements of this library is efficient and reliable.

drive1

A simple example of the usage of this library is given in the figure above. This drive consists of a shaft with mass m1=1 which is connected via a spring to a second shaft with mass m2=5. The left shaft is driven via an external, sinusoidal force. The filled and non-filled green squares at the left and right side of a component represent mechanical flanges. Drawing a line between such squares means that the corresponding flanges are rigidly attached to each other. By convention in this library, the connector characterized as a filled green square is called flange_a and placed at the left side of the component in the "design view" and the connector characterized as a non-filled green square is called flange_b and placed at the right side of the component in the "design view". The two connectors are completely identical, with the only exception that the graphical layout is a little bit different in order to distinguish them for easier access of the connector variables. For example, m1.flange_a.f is the cut-force in the connector flange_a of component m1.

The components of this library can be connected together in an arbitrary way. E.g., it is possible to connect two springs or two shafts with mass directly together, see figure below.

driveConnections1
driveConnections2

Extends from Modelica.​Icons.​Information (Icon for general information packages).


Class Modelica.​Mechanics.​Translational.​UsersGuide.​FlangeConnectors
Flange Connectors

Information

A flange is described by the connector class Interfaces.Flange_a or Interfaces.Flange_b. As already noted, the two connector classes are completely identical. There is only a difference in the icons, in order to easier identify a flange variable in a diagram. Both connector classes contain the following variables:

   Modelica.SIunits.Position   s "Absolute position of flange";
   flow Modelica.SIunits.Force f "Cut-force in the flange";

If needed, the velocity v and the acceleration a of a flange connector can be determined by differentiation of the flange position s:

     v = der(s);    a = der(v);

Extends from Modelica.​Icons.​Information (Icon for general information packages).


Class Modelica.​Mechanics.​Translational.​UsersGuide.​SupportForces
Support Forces

Information

The following figure shows examples of components equipped with a support flange (framed flange in the lower center), which can be used to fix components on the ground or on other moving elements or to combine them with force elements. Via Boolean parameter useSupport, the support flange is enabled or disabled. If it is enabled, it must be connected. If it is disabled, it need not be connected.

bearing

Depending on the setting of useSupport, the icon of the corresponding component is changing, to either show the support flange or a ground mounting. For example, the two implementations in the following figure give identical results.

bearing2

Extends from Modelica.​Icons.​Information (Icon for general information packages).


Class Modelica.​Mechanics.​Translational.​UsersGuide.​SignConventions
Sign Conventions

Information

The variables of a component of this library can be accessed in the usual way. However, since most of these variables are basically elements of vectors, i.e., have a direction, the question arises how the signs of variables shall be interpreted. The basic idea is explained at hand of the following figure:

drive2

First, one has to define a positive direction of this line, called axis of movement. In the top part of the figure this is characterized by an arrow defined as axis of movement. The simple rule is now: If a variable of a component is positive and can be interpreted as the element of a vector (e.g., force or velocity vector), the corresponding vector is directed into the positive direction of the axis of movement. In the following figure, the right-most mass of the figure above is displayed with the positive vector direction displayed according to this rule:

drive3

The cut-force m2.flange_a.f of the right mass is directed into the direction of movement if the values are positive. Similarly, the velocity m2.v of the right mass is also directed into the direction of movement if the values are positive

Extends from Modelica.​Icons.​Information (Icon for general information packages).


Class Modelica.​Mechanics.​Translational.​UsersGuide.​UserDefinedComponents
User Defined Components

Information

In this section some hints are given to define your own 1-dimensional translational components which are compatible with the elements of this package. It is convenient to define a new component by inheritance from one of the following base classes, which are defined in sublibrary Interfaces:

NameDescription
PartialCompliant Compliant connection of two translational 1-dim. flanges (used for force laws such as a spring or a damper).
PartialCompliantWithRelativeStates Same as "PartialCompliant", but relative position and relative speed are defined as preferred states. Use this partial model if the force law needs anyway the relative speed. The advantage is that it is usually better to use relative positions between drive train components as states, especially, if the position is not limited.
PartialElementaryTwoFlangesAndSupport2 Partial model for a 1-dim. translational component consisting of the flange of an input shaft, the flange of an output shaft and the support.
PartialForce Partial model of a force acting at the flange (accelerates the flange).
PartialTwoFlanges General connection of two translational 1-dim. flanges.
PartialAbsoluteSensor Measure absolute flange variables.
PartialRelativeSensor Measure relative flange variables.

The difference between these base classes are the auxiliary variables defined in the model and the relations between the flange variables already defined in the base class. For example, in model PartialCompliant there is no support flange, whereas in model PartialElementaryTwoFlangesAndSupport2 there is a support flange.

The equations of a mechanical component are vector equations, i.e., they need to be expressed in a common coordinate system. Therefore, for a component a local axis of movement has to be defined. All vector quantities, such as cut-forces or velocities have to be expressed according to this definition. Examples for such a definition are given in the following figure for a mass component:

driveAxis

As can be seen, all vectors are directed into the direction of the movement axis. The positions in the flanges are defined correspondingly.

On first view, one may assume that the selected local coordinate system has an influence on the usage of the component. But this is not the case, as shown in the next figure:

masses

In the figure the local axes of rotation of the components are shown. The connection of two masses in the left and in the right part of the figure are completely equivalent, i.e., the right part is just a different drawing of the left part. This is due to the fact, that by a connection, the two local coordinate systems are made identical and the (automatically) generated connection equations (= positions are identical, cut-forces sum-up to zero) are also expressed in this common coordinate system. Therefore, even if in the left figure it seems to be that the velocity vector of m2 goes from right to left, in reality it goes from left to right as shown in the right part of the figure, where the local coordinate systems are drawn such that they are aligned. Note, that the simple rule stated in section 4 (Sign conventions) also determines that the velocity of m2 in the left part of the figure is directed from left to right.

To summarize, the local coordinate system selected for a component is just necessary, in order that the equations of this component are expressed correctly. The selection of the coordinate system is arbitrary and has no influence on the usage of the component. Especially, the actual direction of, e.g., a cut-force is most easily determined by the rule of section 4. A more strict determination by aligning coordinate systems and then using the vector direction of the local coordinate systems, often requires a re-drawing of the diagram and is therefore less convenient to use.

Extends from Modelica.​Icons.​Information (Icon for general information packages).


Class Modelica.​Mechanics.​Translational.​UsersGuide.​StateSelection
State Selection

Information

Only a few components of the Translational library use the der(..) operator and are therefore candidates to have states. Most important, component Mass defines the absolute position and the absolute velocity of this component as candidate for states. In the "Advanced" menu the built-in StateSelect enumeration can be set to define the priority to use these variables as states. Without further action, in most cases a tool will select these variables as states.

For positioning drive trains where the goal is to position a load, the absolute positions of the components are bounded, and the issue discussed below is not present.

For drive trains where the goal is to control the velocity of a load, the absolute positions of the components are quickly increasing during operation. This is critical, because then the step size control of time integrators might then no longer work appropriately:

Integrators with step size control adjust their time step size automatically to meet user defined error bounds ("tolerances"). Typically the local error estimate EST_i is compared with a mixed bound for absolute and relative errors.

   EST_i ≤ abstol_i + reltol_i*|x_i|

Here, abstol_i and reltol_i denote the bounds for the absolute and relative error of state variable x_i, respectively. This mixed error bound is used since it is more robust than a pure relative error based error bound if the nominal value x_i is (very) close to 0. In a Modelica simulation model, typically the same relative tolerance reltol is used for all states and the absolute tolerances are computed using the relative tolerance and the nominal values of the states:

   reltol_i = reltol
   abstol_i = reltol*x_i(nominal)*0.01

This error control fails if the state variable x_i grows without bounds (such as for a drive train), since then the allowed error also grows without bounds. The effect is that the error control on this variable is practically switched off. The correct way to handle this would be to set reltol_i = 0 on such a state variable and only use an absolute tolerance for the step size control.

Currently, in Modelica there is no possibility to provide this information. In order to reduce this effect, it is advisable to not use absolute angles, but relative angles as states. A user can define relative variables as states explicitly with component RelativeStates. Furthermore, all compliant components, such as SpringDamper are defining the relative position and the relative velocity as preferred states. Therefore, a tool will select in most cases relative positions as states.

The relative positions of compliant components are usually small. Without further action, the error control would not work properly on variables that are so small (so often switching the error control off). The remedy is to define explicitly a nominal value on the relative angle. This definition is provided in the "Advanced" menu of the compliant components with parameter "s_nominal". The default value is 1e-4 m, to be in the order of a compliant deformation of a drive.

Extends from Modelica.​Icons.​Information (Icon for general information packages).


Class Modelica.​Mechanics.​Translational.​UsersGuide.​Contact
Contact

Information

Library officers

Jakub Tobolar and Martin Otter
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
Institut für Systemdynamik und Regelungstechnik (DLR-SR)
Forschungszentrum Oberpfaffenhofen
D-82234 Wessling
Germany
email: Martin.Otter@dlr.de

Contributors to this library

Extends from Modelica.​Icons.​Contact (Icon for contact information).