Computer simulation of the dynamics of systems of solids

The paper considers an algorithm for modeling the exact differential equations of the motion of systems of solids based on the Appell equations. To implement it, a multiple calculation of the energy of the system's accelerations is required for different values of generalized velocities and accelerations.


Introduction
For a more complete study of construction machines and mechanisms, their exact mathematical models are needed.Differential equations of motion for such systems can be compiled using general theorems of dynamics or equations of analytic mechanics in generalized coordinates [1][2][3].If the bodies entering the system are few, then these equations can be made manually and for the decision to use the representation of these equations on the computer.But for real systems consisting of a large number of bodies, the derivation of equations manually presents enormous difficulties because of their cumbersomeness.Therefore, to study complex systems, automated software systems are created.Effective methods are the methods of direct formation of differential equations of motion in a numerical form.The foundations of these methods are laid down in [4][5][6][7][8].These methods are based on the application of general dynamical theorems for a rigid body, while solid-state systems are described with the help of graphs, and internal connections between bodies and their interaction are taken into account.These methods are also used in the numerical simulation of mechatronic and robotic systems [9][10][11].In paper [12], the general equation of dynamics for modeling is used in the form of possible capacities.
In this paper, we describe a method for the numerical generation of exact differential equations for the motion of systems of solids based on Appell's equations [1][2][3].

Description of the system of solids
To describe systems of solids, we introduce the following vector and matrix notation [13].Coordinate systems (CS) will be rigidly associated with the bodies and denoted as Kxkykzk,, where k is the body number or its letter index, K is the origin of the CS associated with the body.The absolute (fixed) CS will be denoted as Axayaza.With a movable base, the motion of which can be specified, the CS is connected: Bxbybzb.
We will use the subscripts as follows: the first denotes the CS with respect to which the vector or the scalar quantity is determined, the second determines the number or designation of the body, point or object.Then are, respectively, the radius vector of the origin of the jth CS relative to the start of the i-th CS, the speed of the start of the j-th CS relative to the i-th CS, the acceleration of the start of the j-th CS relative to the i-th CS, the angular velocity and the angular acceleration of the j-th CS relative to the i-th CS.The column of projections of any vector on the axis of the k-th CS will be marked by the superscript.For example, k ij wthis is the column of the projections of the vector ij w in the k-th CS.We will call this column the representation of the vector in the k-th CS.The rotation matrix from the i-th CS to the j-th CS is to be denoted while the representations of some vector d in the i-th CS and in the j-th CS is to be related by the formula .
For exponentiation, we will use the ^ symbol from programming.The transpose of a column or matrix will be denoted by the superscript T.
The system of solids will be described by means of a graph on which the relationships between bodies and coordinate systems are reflected.An example of such a graph is shown in Fig. 1.Transitions between coordinate systems are indicated by arrows that reflect rotations around the coordinate axes by an angle or parallel displacement along the axes.In this case, the parameters describing transitions between bodies and CS can be known functions of time or constant values, or generalized coordinates.
Angular values will be denoted by Greek letters, and linear ones by Latin letters.If it is necessary to show the displacement or rotation around the non-coordinate axis, an intermediate CS can be introduced.Mass-inertial characteristics of bodies will be denoted as follows: mjmass of the j-th body, j jC rthe radius vector of the center of mass of the j-th body with respect to the origin of the j-th CS, jj the inertia tensor of the j-th body at the beginning of the j-th SC.For a system of bodies whose graph is shown in Fig. 1, the motion of the base and the associated CS Bxbybzb is known; therefore, the time functions vectors P are also known, and the problem of modeling differential equations of relative motion of wearable bodies can be considered [2].If the motion of the base depends on the motion of the wearable bodies, then it is necessary to introduce generalized coordinates of the base and to consider a more general problem of modeling the motion of the base and associated wearable bodies.For both problems, it is possible to form the exact differential equations of motion according to a uniform technique described below.
Let the system of rigid bodies with holonomic constraints have n degrees of freedom and generalized coordinates of the system n q q q ,..., , 2

1
. The differential equations of motion of this system in the form of Appell's equations [1][2][3] have the form where S is the energy of the system's accelerations, which is found as the sum of the energies of the accelerations of the bodies entering the system (and being relative to the absolute coordinate system Axayaza, and Qk) are the generalized forces.The expression for the energy of accelerations has the form [2]: .
In the expression (2), in contrast to [2], the indices, some notation for the coefficients, are changed, and also terms that do not depend on generalized accelerations are shown.
After differentiation according to (1), the developed Appell equations have the form ) ,..., 1 ( , All the coefficients and the generalized forces Qk depend only on the generalized coordinates n q q q ,..., , 2 1 and the time t.To compose Appell's equations (3), it is required to determine the coefficients Ajk, Kij, k, Dik, Hk and the generalized forces Qk.In order to calculate them, we will repeatedly calculate the energy of the accelerations of the system under consideration at the current time t, at the current position n q q q ,..., , 2 1 and for different values of generalized velocities n q q q    ,..., , 2 1 and generalized accelerations . For the calculated values, equations are constructed that take into account the structure of the energy of the accelerations (2).From these equations, the required coefficients are found.

Calculation of the energy of accelerations
Let us describe the procedure for calculating the energy of accelerations in a general form.If the motion of the base and the Bxbybzb CS is known, as in the example of a system whose graph is depicted in Fig. 1, then vectors and rotation matrix b a P are defined as a function of time, and also representations of these vectors in the CS Bxbybzb.Further, moving successively along the graph of the system, we determine the kinematic characteristics describing the position and motion of the bodies relative to each other, taking into account the values of the generalized coordinates, velocities, and accelerations.In this case, for clarity, the general notation for generalized coordinates q1, q2, ..., qn is translated into more convenient ones in the real description of the system u , , ,    .
To compose Appell's equations (1) in the expression for the energy of accelerations, it is enough to retain the terms containing the generalized accelerations, i.e. the 2 nd derivatives of the generalized coordinates.The vector formula [2] for calculating such an acceleration energy To calculate the terms of the energy of accelerations according to formula (8) or (9), the vectors, as well as the inertia tensors of the bodies, should be represented in one CS, using the rotation matrices for this.It is most convenient to take the CS associated with the body itself.
The energy of the system's accelerations is calculated as the sum of the energies of the bodies' accelerations entering the system.Moving along the graph, the matrix of rotation and representation of the vectors in the required CS are sequentially determined.For example, if the vectors

Determining the coefficients of Appell's equations
We describe the algorithm for calculating the coefficients Ajk, Kij, k, Dik, Hk, which determine the lefthand side of Appell's equations (3).Suppose that the time t and the generalized coordinates q1, q2, ..., qn are given.

Calculating the coefficients Ajk, Hk
The inertial coefficients Ajk form a symmetric n×n matrix.To determine them, the kinetic energy of the system is repeatedly calculated in [14,15].We show that we can use only the calculation of the energy of accelerations. 1) We set the values of all generalized velocities and accelerations to zero.Let's calculate the energy of accelerations: . 0 ) ; 0 ,..., 0 , 0 ; 0 ,..., 0 , 0 ; ,..., , ( We obtain the value of the coefficient S0, which we denote in the form as S0 (such a notation in the form of a set of capital letters and digits without indices will be used for the already defined numerical values).
2) The cycle (the remaining generalized accelerations are zero).Let's calculate the energy of accelerations: Solving jointly equations ( 11) and ( 12), we find ).Let's calculate the energy of accelerations: Thus, all the inertial coefficients Ajk are defined, as well as all the coefficients Hk.

Calculating the coefficients Kij,k, Dik.
The coefficients Kij, k correspond to the values of the direct Christoffel brackets [2] and are n symmetric n×n matrices Kk, (k = 1, ..., n), while the coefficients Dik are the n×n matrix D.
1) Again, let the values of all generalized velocities and accelerations equal zero. 2 (the remaining generalized velocities are zero).Calculate the energy of accelerations ; 1 (the remaining generalized velocities are zero).Calculate the energy of accelerations (the remaining generalized accelerations are zero). ; (the remaining generalized velocities are zero).Calculate the energy of accelerations (the remaining generalized velocities are zero).Calculate the energy of accelerations Solving equations (20), (21) jointly, we find . 2 We find all the coefficients Dik and all the diagonal elements Kii,k (i = 1, ..., n; k = 1, ..., n) of the symmetric matrices Kk.

Computation of generalized forces
All generalized forces of the system can be divided into two parts: .
The generalized forces Qk1 are due to the interaction of bodies with each other.These forces are determined by the forces of elasticity, frictional forces or other specified forces.The calculation of these forces is determined by the design of the system and presents no difficulties.The generalized forces Qk2 correspond to gravitational forces and can be calculated from formula where ) ,..., , ( the potential energy of the gravity forces of the system, which can be determined by the formula [2].
where M is the mass of the whole system, g is the acceleration vector of free fall, aC r is the radius vector of the center of the system's mass, j aC r is the radius vector of the center of mass of the j-th body.Consequently, the generalized force can be found from: ). ( For the calculation according to formula (29), vectors should be represented in one coordinate system.To avoid differentiating the product of variables, they are represented in the Axayaza IC.So, for example, to calculate the generalized force corresponding to the coordinate, the following calculations are performed: ( The remaining generalized forces Qk2 can be calculated similarly.

Assembling equations
Thus, all the necessary coefficients appearing in the differential equations (3) are defined.In the matrix form, the equations are written as Here A is a symmetric n×n matrix of inertial coefficients Ajk; q q   , -columns of generalized velocities and generalized accelerations; Qk.We note that the second term in (34) is a column consisting of quadratic forms of generalized velocities and has the form T n T T T T q K q q K q q K q q K q ) ,..., , ( To integrate a system of n differential equations of the second order (37) with standard programs, we represent it in the form of a system of equations of the first order in the normal form of the generalized coordinates and velocities.For computer integration of the system of differential equations (28), it is necessary to compile a program for calculating its right-hand sides.

Conclusion
The algorithms described above make it possible to compile a complex of programs for modeling the exact differential equations of systems of solids.The complex should consist of the following parts: the module for calculating the energy of accelerations from a given graph of the system of bodies and their mass-inertial characteristics; the module for calculating the coefficients Ajk, Kij, k, Dik, Hk, entering the developed Appell's equations (3); the module for calculating the generalized forces Qk2; the module for calculating the right-hand sides of the system (36).
To model differential equations, it is required to present a graph that reflects the relationships between bodies and generalized coordinates, and also to describe the massinertial characteristics of bodies.In this case, it is possible to model both the differential equations of the relative motion of wearable bodies and the differential equations of the supporting body with allowance for the motion of wearable bodies.

Fig. 1 .
Fig.1.Graph of the system of solids.The arc arrow is a rotation around the coordinate axis indicated below under the arrow, the straight arrow is a parallel transfer along the axes indicated below, the solid arrow is the specified known displacement, the dotted line is the generalized coordinate.

)
If the origin of the CS associated with the j-th body coincides with the center of mass of the body, then the calculation of the acceleration energy becomes simpler, and the expression for the acceleration energy Saj of the j-th body with respect to the absolute CS will take the generalized accelerations are zero).Let's calculate the energy of accelerations:

3 )
We find the remaining elements of the matrix A. The cycle j= 2, …, Dik are found.Thus, the coefficients defining the left-hand side of Appell's equations (3) were found.

Tq
a string of generalized velocities; K is a column consisting of n symmetric n × n matrices Kk of the coefficients Kij, k; D is the n × n matrix of the coefficients Dik; H is the column of coefficients Hk; Q is the column of generalized forces

A - 1
is the inverse matrix, and the columns y1, y2 form a column of variables y, consisting