There are many places in an MBDyn input file where we have to define general or orientation matrices, such as inertial matrices of bodies and orientation matrices of structural nodes. MBDyn provides us a number of ways to define general or orientation matrices, which are introduced here.
matr, <a11>, <a12>, <a13>, <a21>, <a22>, <a23>, <a31>, <a32>, <a33>
sym, <a11>, <a12>, <a13>, <a22>, <a23>, <a33>
skew, <v1>, <v2>, <v3>
diag, <a11>, <a22>, <a33>
eye
null
The direction of <index1> is (p1, p2, p3) and the direction of <index2> is (q1, q2, q3)
<index1>, <p1>, <p2>, <p3>, <index2>, <q1>, <q2>, <q3>
where <index1> and <index2> are integers 1,2, or 3 corresponding to x, y, or z, respectively. For example, if we want to define an orientation with a reference system whose x-axis points to (0., 1., 0.) and z-axis points to (0., 0., 1.), we write as follows.
1, 0., 1., 0., 3, 0., 0., 1.
If the two vectors are not exactly perpendicular, the first vector points to the desired direction and the second vector defines a plane that is perpendicular to the third vector.
In a special case when only one direction (rather than a full orientation) really matters, we can write, for example, as
1, <p1>, <p2>, <p3>, 2, guess
where guess is the keyword that generates a vector perpendicular to the first vector in some deterministic procedure.
eye
This means "no rotation".
matr, <a11>, <a12>, <a13>, <a21>, <a22>, <a23>, <a31>, <a32>, <a33>
Note that no orthogonality check is performed.
euler, <alpha>, <beta>, <gamma>
See Chapter 7.
vector, <v1>, <v2>, <v3>
The direction of the vector defines the axis of rotation and the length of the vector defines the angle of rotation.
All of the following define the orientation matrix representing a rotation of 90 degrees about the global Z-axis.
1, 0., 1., 0., 3, 0., 0., 1. 1, 0., 1., 0., 2, -1., 0., 0. matr, cos(pi/2.), -sin(pi/2.), 0., sin(pi/2.), cos(pi/2.), 0., 0., 0., 1. euler, 0., 0., pi/2. vector, 0., 0., pi/2.