# A Local Adaptive Mesh Refinement for JFO Cavitation Model on Cartesian Meshes
## 2 AMR Algorithm
### Neighbor Fixing
\begin{array}{l}\frac{\partial}{\partial x}\left(h^{3}\frac{\partial p}{ \partial x}\right)=\frac{p_{R}(h_{C}^{3}+h_{L}^{3})}{4_{1}(1+d_{2})}-\frac{p_{C }[d_{2}(h_{C}^{3}+h_{L}^{3})+d_{1}(h_{C}^{3}+h_{W}^{3})]}{4_{1}(2d_{1}(4_{2}+ d_{2})}]+\frac{p_{W}(h_{C}^{3}+h_{W}^{3})}{4_{2}(1+d_{2})}\\ \frac{\partial}{\partial y}\left(h^{3}\frac{\partial p}{\partial y}\right)= \frac{p_{W}(h_{C}^{3}+h_{W}^{3})}{4_{3}(4_{3}+d_{4})}-\frac{p_{C}[d_{4}(h_{C}^ {3}+h_{W}^{3})+d_{3}(h_{C}^{3})]}{d_{3}d_{4}(d_{3}+d_{4})}]+\frac{p_{S}(h_{C}^ {3}+h_{S}^{3})}{4_{4}(d_{3}+d_{4})}\end{array}  \tag{5}\]

The difference scheme of the shear flow term is derived as

\[6\mu U\frac{\partial(h\theta)}{\partial x}=6\mu U\frac{h_{C}\theta_{C}-h_{W} \theta_{W}}{d_{2}}. \tag{6}\]

Then, the explicit iterative schemes of \(p\) and \(\theta\) can be written in the forms:

\[ \begin{array}{l}p_{i,j}^{k+1}=\frac{Ar_{i-1,j}^{k+1}+B^{p}_{i+1,j}+C\bar{p}_ {i,j-1}^{k+1}+Dp_{i,j+1}^{k}-F}{E}\\ \theta_{i,j}^{k+1}=\frac{A^{p}_{i-1,j}+B^{p}_{i+1,j}+C^{p}\bar{\theta}_{i,j-1} ^{k+1}+D^{p}\bar{\theta}_{i,j+1}^{k}-F^{p}}{E^{F}}\end{array}  \tag{7}\]

where \(k\) is the number of iterations. The successive over-relaxation (SOR) method is applied to accelerate convergence. The SOR factors for \(p\) and \(\theta\) are both taken as 1.2. The detailed solution strategy for [PERSON] algorithm can be seen in [18; 19]. ## 4 Error Estimation

Discretization error is defined as the difference between the exact solution of the discrete equation and the exact solution of the PDE. It is the primary source of numerical errors compared with round-off error and iterative error [40]. The Richardson extrapolation method is a recovery method and can be used to estimate discretization error [41]. The Richardson extrapolation method can obtain a more accurate solution than the available solution of the finest mesh. Assuming two numerical solutions have been calculated [42]: a fine grid with grid size \(h_{1}\) and computed solution \(f_{C1}\); and a coarse grid with grid size \(h_{2}\) and computed solution \(f_{C2}\), the extrapolated solution is evaluated as

\[f_{extr}=f_{c1}+\frac{f_{c1}-f_{c2}}{r^{p}-1}, \tag{8}\]

where \(r\) is the grid refinement ratio \(r=h_{2}/h_{1}\) and \(p\) is the order of accuracy. In other words, the more accurate solution is obtained by fine grid solution \(f_{c1}\) and coarse grid solution \(f_{c2}\) with weight coefficients of \(r^{p}/(r^{n}-1)\) and -1/(\(r^{p}-1)\). The discretization error for the fine grid solution\(f_{c1}\) could be estimated as follows

\[err=f_{c1}-f_{extr}=\frac{f_{c2}-f_{c1}}{r^{p}-1}. \tag{9}\]

Figure 8: Parameter definition for the nonuniform difference scheme. In the AMR method, the present existing mesh is treated as the fine mesh. The coarse mesh is generated by coarsening the whole mesh: all leaf cells are replaced by their parent cells. The value of \(r\) is therefore ensured to be constant 2. The order of accuracy \(p\) is also treated as constant. Thus, the denominator of Equation (9) is unchanged. The error estimation is taken as

\[err\propto|f_{c2}-f_{c1}|. \tag{10}\]

Equation (10) indicates that the difference between the solutions obtained on the two meshes at each point is proportional to the local discretization error at that point [27]. When the error estimation operation is finished, the next step is to decide the value of the unacceptably large error. A practical way is to sort these errors from large to small, and to refine the top cells with large errors. The number of the cells need to be refined is determined according to need. The mesh refinement operation can be repeated until the solution is satisfactory. ## 5 Results and Discussion

The implementation steps of the AMR method are to (1) obtain a preliminary solution on initial coarse mesh, (2) obtain a more accurate solution by a refined mesh operation, and (3) repeat step (2) until a sufficiently accurate solution satisfying the need. The refinement strategy has a significant effect on the final mesh.