# Numerical and Experimental Analysis of the Oil Flow in a Planetary Gearbox
## 2 Materials and Methods
### CFD Modeling of the Oil Flow
#### 2.4.3 Mesh-Handling Approach  
The simulation of the considered gearbox requires the introduction of a dynamic mesh approach. Indeed, the boundary motion causes the deformation of the mesh, which needs to be replaced with a new valid one after every few simulated angular positions. The Local Remeshing Approach (LRA), available in some commercial software, can handle the boundary motion with deformable elements that stretch every timestep. The distorted elements that arise from the boundary node motion are automatically reconstructed by the code based on the imposed quality parameters. Despite its effectiveness, this method requires a sufficiently low timestep to ensure a stable remeshing process. This is mainly because each local remeshing iteration can lead to elements having a smaller size with respect to the original ones. Thus, the lower computational efficiency is related to an increase in the number of elements and the consequent decrease in the allowable timestep to keep the simulation stable. In the current work, an innovative remeshing approach was implemented, namely, an adapted version of the Global Remeshing Approach with Mesh Clustering (GRAMC), which was already used by the authors to study spur, helical, and level gear pairs [33]. The main idea behind the GRAMC is that it is possible to compute a mesh set that covers one engagement and reuse it recursively during the simulation. In this way, the computational effort associated with the remeshing process is drastically reduced since the grids in the predefined wheel positions are immediately available for the mesh-to-mesh interpolation of the results. Moreover, this approach allows the user to have a direct control over the mesh size. This allows to keep the cell number almost constant throughout the simulation, thus avoiding the creation of extremely small elements that would impact on the allowable timestep needed to keep the maximum Courant number below 1.  
As the system under investigation is a planetary gearbox, the kinematics involves not only the pure rotation of the planet carrier, but also the roto-translation of the planets. This means that the GRAMC cannot be applied directly. However, after the first engagement between the planets and the ring gear has occurred, it is possible to reuse the first mesh by applying to it a rigid rotation of an angle \(\theta\) given by:  
\[\theta=\frac{2\pi}{z_{ring}} \tag{7}\]  
By exploiting this artifice, the enormous advantages of the GRAMC on the computational time can still be exploited, and the set of mesh that covers one complete planet-ring gear engagement can be used for the entire simulation. From the mesh deformation tests, it emerged that a set of 10 grids is sufficient to complete one engagement. Therefore, every 10 meshes a rigid rotation of multiples of \(\theta\) was applied to the initial mesh set, thus providing the necessary meshes for the whole simulation. The rigid rotation of the mesh is a simple operation that requires less than one second on a modern hardware, while the remeshing of the computational domain for every position would be much more computationally expensive. In Figure 4 the workflow of the adopted mesh-handling strategy is illustrated.  
As it can be noticed, the procedure foresees the mesh-to-mesh interpolation of the results. With each successive domain being conformal, the mapping is perfectly consistent. Furthermore, the mesh set is composed of very similar grids in terms of element size and count, hence the interpolation errors are minimized. The whole simulation process is automated in a Bash [34] script. The base case can be adapted to investigate the desired operating conditions by changing the velocity and the time libraries consistently.