# Calculation of Trusses System in MATLAB--Multibody
## 3 Building a Trusses Structure in MATLAB--Simscape Multibody  
The Simscape Multibody environment [1; 2; 3; 4] enables simulations of mechanical systems in space. It formulates and solves the equations of motion for the entire mechanical system and also provides visualization of the system dynamics. This allows for the examination of various dynamic and static processes on the model. Examining kinematic and dynamic quantities on advanced models can be quite challenging. Dealing with spatial assignments can be tough without an understanding of vector calculus and rotation matrix representations. The probability of error in derivation and computation is considerably high. Utilizing software tools with predefined blocks representing physical solids can assist in resolving such assignments. There are different programs available for calculating trusses systems and various tools for simulating the behavior of structures made from various materials. In such simulation program environments, there are different blocks such as \"Flexible Beams\". These blocks simulate a slender bar with constant cross-section with small and linear deformations, including extension, bending, and torsion. Thus, a flexible body can be represented as a system composed of multiple bodies (multibody) [22]. In Figure 9, the model of the trusses system from Figure 1 is loaded with the external force vector \(\mathbf{F}_{\text{B}}\) at node B with the calculation results. The following values have been defined:  
\(\mathbf{F}_{\text{B}}=[-2,-10]^{\text{T}}\) kN, bar lengths \(l=1\) m, \(l_{\text{AB}}=l\), \(l_{\text{BC}}=l\), \(l_{\text{CD}}=l\), \(l_{\text{AC}}=\sqrt{2}\cdot l\), \(l_{\text{BD}}=\sqrt{2}\cdot l\), bar diameters are the same with \(d=0.01\) m. [PERSON]'s modulus \(E\) is 210 GPa, shear modulus G is 79 GPa, and density is 7800 kg/m\({}^{3}\). [PERSON]'s ratio is 0.28. The values of proportional or Rayleigh damping are left \"default\" with respect to computational practicality \(b_{m}=0.01\) s\({}^{-1}\), \(b_{k}=0.01\) s. The Rayleigh model [23; 24; 25] defines the damping matrix \(\mathbf{C}\) as a linear combination of the mass matrix \(\mathbf{M}\) and the stiffness matrix \(\mathbf{K}\) as follows:  
\[\mathbf{C}=b_{m}\cdot\mathbf{M}+b_{k}\cdot\mathbf{K}, \tag{81}\]  
with \(b_{m}\) being a mass coefficient and \(b_{k}\) being a stiffness coefficient. These are the scalar coefficients. The simulation time is also \"default\" in the model settings and equals \(t=10\) s.  
As already mentioned, for the sake of simplicity, so that we do not have to adjust and adapt the values of \(t\), \(b_{m}\), and \(b_{k}\) to the level of external load in the form of force \(\mathbf{F}_{\text{B}}\) and cross-section \(S_{i}\), the so-called multiplication constant-\(con\), is introduced. Its role is to proportionally shift the simulation to the order of units depending on the value of the external force vector \(\mathbf{F}_{\text{B}}\) as well as the uniform cross-section of the bar \(S_{i}\). Practically, we can also start from the normal stress in the most stressed bar if the cross-sections of the \(S_{i}\) bars of a given structure would be different. This avoids unnecessary changes in the defined coefficients \(b_{m}\) for the mass coefficient \(\mathbf{M}\), and \(b_{k}\) for the stiffness coefficient \(\mathbf{K}\) in Equation (81) in the Rayleigh damping model. For the multiplication constant, the following applies:  
\[con=\frac{\|\mathbf{F}_{\text{B}}\|}{1200\cdot S_{i}} \tag{82}\]  
This simple modification ensured an increase of two to four orders of magnitude in the accuracy of the calculation in accordance with theory within an unlimited range of external \(\mathbf{F}_{\text{B}}\) force loading.