Home > Resources > MBDyn Tutorial > 10. Free-Rotating Block (3) - Outputting motion of arbitrary point using dummy node
MBDyn Tutorial

10. Free-Rotating Block (3) - Outputting motion of arbitrary point using dummy node

This chapter introduces a method to output the motion of an arbitrary point in a rigid body.

Outputting motion of arbitrary point

It is only the motions of nodes that are written into the mov file. For example, in our current example problem, since we defined the dynamic structural node for the block at the center of mass, the data written into the mov file are the position, the velocity, the orientation, and the angular velocity of the node fixed at the center of mass of the block. Then, what if we want to know, for example, the motion of a corner of the block?

Theoretically, if we know the motion (both translational and rotational) of a point of a rigid body, we can reconstruct the motion of any point in the rigid body by an algebraic transformation. Thus, if we have the motion data of a dynamic structural node for a rigid body, we can reconstruct the motion of any point belonging to the same rigid body by post-processing (in fact, animations are made in this way). But MBDyn is equipped with a convenient entity called "dummy node" and if we use a dummy node, we can obtain the motion of any point in a rigid body as a direct output of MBDyn.

Dummy node

Dummy node is a type of structural node (see Chapter 5). The structural nodes we have used so far had the type "dynamic" to assume the degrees of freedom for rigid bodies. On the other hand, a dummy node is a structural node with the type "dummy". A dummy node cannot assume a degree of freedom and have to be attached to another node. There are two types of dummy node.

• offset
• relative frame

The offset type outputs the motion with respect to the global reference frame. On the other hand, the relative frame type outputs the motion with respect to a specified node. The basic syntax for the statement that defines a dummy node of the offset type is as follows.

``` structural: <node label>, dummy, <base node label>,
offset,
<relative offset>,
<relative orientation matrix> ;
```

where <base node label> is the label of a base node to which the dummy node is attached, and <relative offset> and <relative orientation matrix> are the position and orientation of the dummy node with respect to the base node.

Input file

Let's output the motion of a corner of the block using a dummy node of the offset type. To this end, we modify the input file as follows.

```# free_rotating_block_dummynode.mbd

begin: data;
problem: initial value;
end: data;

begin: initial value;
initial time:   0.;
final time:     5.;
time step:      1.e-2;
max iterations: 10;
tolerance:      1.e-6;
end: initial value;

begin: control data;
structural nodes: 2;
rigid bodies:     1;
end: control data;

# Design Variables
set: real M   = 1.;   # [kg] Mass
set: real Lx  = 0.15; # [m] Width
set: real Ly  = 0.05; # [m] Thickness
set: real Lz  = 0.3;  # [m] Height
set: real Wx0 = 5.;   # [rad/s] Initial angular velocity along x axis
set: real Wy0 = 0.;   # [rad/s] Initial angular velocity along y axis
set: real Wz0 = 0.;   # [rad/s] Initial angular velocity along z axis

set: real Ixx = 1./12.*M*(Ly^2+Lz^2); # [kgm^2] Moment of inertia about x axis
set: real Iyy = 1./12.*M*(Lz^2+Lx^2); # [kgm^2] Moment of inertia about y axis
set: real Izz = 1./12.*M*(Lx^2+Ly^2); # [kgm^2] Moment of inertia about z axis

# Node Labels
set: integer Node_Block              = 1;
set: integer Node_Dummy_Block_Corner = 2;

# Body Labels
set: integer Body_Block = 1;

begin: nodes;
structural: Node_Block, dynamic,
0., 0., 0.,    # absolute position
eye,           # absolute orientation
null,          # absolute velocity
Wx0, Wy0, Wz0; # absolute angular velocity

structural: Node_Dummy_Block_Corner, dummy, Node_Block,
offset,
Lx/2., Ly/2., Lz/2., # relative offset
eye;                 # relative orientation

end: nodes;

begin: elements;
body: Body_Block, Node_Block,
M,                   # mass
null,                # relative center of mass
diag, Ixx, Iyy, Izz; # inertia matrix

end: elements;
```
Code 1: Modified input file for Problem 2 (Free-rotating block) - A dummy node is added

Interpretation of the Input file

First, note that there is a change in the control data block. Because a dummy node is added to the model, the total number of structural nodes is now two and the control data block is modified accordingly. The dummy node is labeled as "2" and the label is substituted in the variable "Node_Dummy_Block_Corner" before the definition of the dummy node.

Next, take a look at the definition of the dummy node in the nodes block. It is written as follows.

```   structural: Node_Dummy_Block_Corner, dummy, Node_Block,
offset,
Lx/2., Ly/2., Lz/2., # relative offset
eye;                 # relative orientation
```

This statement can be readily interpreted by comparing it to the basic syntax above. This dummy node is attached to the node "Node_Block" and is placed at a corner of the block.

Processing of output data

If we run MBDyn with the modified input file shown in Code 1, we obtain the motion of the corner of the block as the motion of the dummy node. The mov file now contains the data of two nodes, "Node_Block" and "Node_Dummy_Block_Corner."

In this case, as was briefly mentioned in Chapter 7, each column of the mov file contains the data of the two nodes and we cannot make graphs and so on using the column data as is as before. An additional process to separate data for each node is necessary. Processing of multiple-nodes data is treated in the next chapter.