# Computational Fluid Dynamics Applied to
## 2 Background
### Local Remeshing Approach  
In the local remeshing approach (LRA), the deformation of the mesh is allowed only up to a specific value after which the simulation stops and the mesh is updated. The initial deformations can be distributed among all mesh elements with a spring-based smoothing method ensuring a minimum grid quality. In this method, the edges between any two nodes are idealized as a network of springs. The initial spacing of the edges (i.e., the spacing before any boundary motion) constitute the equilibrium state of the system of springs. A displacement at a given boundary node will generate a force proportional to the displacement along all the springs connected to the node. Using Hook's Law, the force on a mesh node can be written as Equation (14):  
\[F_{i}=\sum_{j}^{n_{i}}k_{ij}\Big{(}\Delta x_{j}-\Delta x_{i}\Big{)} \tag{14}\]where \(\Delta x_{j}\) and \(\Delta x_{i}\) are the displacements of node \(i\) and its neighbor \(j\), \(n_{i}\) is the number of the neighboring nodes connected to the node \(i\) and \(k_{ij}\) is the spring constant between node \(i\) and its neighbor \(j\). The spring constant for the edge connecting nodes \(i\) and \(j\) is defined as Equation (15):  
\[k_{ij}=\frac{1}{\sqrt{\left|x_{j}-x_{i}\right|}} \tag{15}\]  
At equilibrium, the net force on a node due to all the springs connected to the node has to be zero. This condition results in the iterative Equation (16):  
\[\Delta x_{i}^{m+1}=\frac{\sum_{j}^{n_{i}}k_{ij}\Delta x_{j}^{m}}{\sum_{j}^{n_{ i}}k_{ij}} \tag{16}\]  
Since displacements are known at the boundaries, Equation (16) is solved using a Jacobi sweep on all interior nodes. At convergence, the positions are updated such that show in Equation (17):  
\[x_{i}^{n+1}=\ x_{i}^{n}+\Delta x_{j}^{m,convergal} \tag{17}\]  
where \(n+1\) and \(n\) re used to denote the positions at the next time step and the current timestep, respectively.  
However, for larger deformation (compared to the local cell sizes) the smoothing is not sufficient to ensure the quality of the mesh. Therefore, the LRA establishes that the low quality elements, and only the low quality elements, have to be erased and substituted. On the one hand, the mesh quality criteria are based on skewness or elements size. On the other hand, the mesh is locally updated with the new cells that satisfy the quality criteria and the solution is interpolated from the old cells. Then, the simulation could be restarted. In this way, the mesh can maintain always a quality within a specific range and, therefore, the results are accurate even for large deformations of the domain. However, sometimes the updated mesh could have extremely small elements that limits significantly the simulation time step (to ensure numerical stability and convergence) bursting the computational effort. Indeed, the maximum timestep for avoiding convergence problems can be calculated as in Equation (18):  
\[\Delta t_{max}=\frac{\sqrt[3]{V_{cell,min}}}{U} \tag{18}\]  
where \(V_{cell,min}\) is the volume of the smallest cell in the computational domain and \(U\) is the velocity scale of the problem.  
The application of LRA can be found in the literature applied for the simulation of the lubricant behavior in engaging spur gears [41; 42; 43; 44; 45; 46], helical gears [47], spiral level gears [48; 49; 50], hypoid gearbox [51], and planetary gearbox [52].