## 3 Numerical Activity  
The numerical activity was divided into three linked phases. A flowchart of the study has been created to help the reader follow the process. Such a scheme is reported in Figure 4, in which the inputs of the different processes are indicated in red, while in white, the CFD simulation and the simulation of the multibody model with the respective results are reported in the lower part. This activity's primary goal was to evaluate the damping ratio, one of the main characteristic factors that characterize the motion of the fluid. \begin{table}
\begin{tabular}{c c c} \hline \multicolumn{3}{c}{**CFD Simulation Parameters**} \\ \hline Total time duration & 4 [s] \\ \hline Time steps & 0.01 [s] \\ \hline \multicolumn{3}{c}{**Domains’ Characteristics**} \\ \hline Default domain & Multiphase & Homogeneous model \\ \hline Default domain & Fluid & Air–water \\ \hline Open domain & Boundary type & Opening \\ \hline Open domain & Fluid values & Air = 1; water = 0 \\ \hline Wall domain & Boundary type & Wall \\ \hline Wall domain & Mass and momentum & No slip wall \\ \hline Global initialization & Relative pressure & No slip wall \\ \hline \multicolumn{3}{c}{**Solver Control**} \\ \hline Advection scheme & High resolution \\ \hline Transient scheme & Second-order backward Euler \\ \hline Convergence control & Min. coeff. Loops 1; Max. coeff. Loops 40 \\ \hline Convergence criteria & Residual type & RMS \\ \hline Convergence criteria & Residual target & 0.0001 \\ \hline \end{tabular}
\end{table} 
Table 2: CFD simulation parameters. Figure 4: Flow chart. A CFD VOF analysis was performed for extrapolating the value of \(\xi\) through the gradient of the long volume fraction z, the liquid height variation considered the system response. As for the mesh, the model was designed with a CAD modeler. and developed within the program Ansys Meshing--2023 R1 Free Student Software, whose reference system was positioned on the edge of the bottle at the vertical axis of symmetry in y, in the direction of motion in z. Two mesh domains were created: one corresponding to the upper part of the vial and the other corresponding to the container walls. The same boundary conditions were used by considering a harmonic law for the displacement with a frequency of 1 Hz along the z direction, as reported in Figure 5a. Starting from the variation in the height reached by the liquid as a function of time, it was possible to calculate the logarithmic decrement by implementing the Matlab 2023b function findpeaks to find the peaks of the function. This value was estimated at 0.163. \[\delta=ln(\frac{Y_{n}}{Y_{n+1}}) \tag{11}\]  
Equation (11) shows the expression used to evaluate the logarithmic decrement of the discrete signal, while Equation (12) describes the relation that expresses the damping ratio \(\xi_{1}\) in the case of an underdamped vibrating system:  
\[\xi_{1}=\frac{1}{\sqrt{\frac{2\pi}{\xi^{2}}}}=0.03 \tag{12}\]  
The graph of the logarithmic decrement is shown in Figure 5b. By estimating the damping factor, we were able to begin the study's second phase, the optimization of the law of motion to be imposed on the slide. To summarize the first phase,  
Figure 5: Motion law imposed on the trolley (**a**) and vertical position of the oscillating mass with the peak values, reported with a red circle and black dot, used for estimating the damping factor (**b**). all the values used for modeling the simplified system realized in Mathworks' SimScape multidomain environment have been reported in Table 3.  
Figure 6 shows the rigid multibody model developed in the SimScape environment of a slide mounted on guides and actuated by a timing belt. A vial rack was placed on the guide. In the image, it is possible to see the vial in which the pendulum is located placed on the rack, whose properties have been shown previously. Given all the geometric and physical parameters of the model, we focused our attention on the laws of motion and how these interacted with sloshing.