# An AMR-Based Liquid Film Simulation with Surfactant Transport Using PLIC-HF Method
## 4 AMR Implementation by Using GPU Parallel Computing  
The use of GPU (graphics processing unit) parallel computing in computational fluid dynamics (CFD) can provide several advantages over traditional CPU-based computing. One of the main advantages is that GPUs can perform many calculations in parallel, allowing for faster and more efficient computation during complex fluid dynamics simulations. This can significantly reduce the computational time required for a simulation, making it possible to run larger and more detailed simulations or to perform multiple simulations in a shorter time period. Another advantage of GPU parallel computing in CFD is that it can provide better scalability and flexibility than CPU-based computing. This is because GPUs can be easily added to a computing system to increase its overall performance without the need to redesign the entire system. This can allow for the efficient use of computing resources as well as the ability to quickly adapt to changing computational demands. By using an orthogonal grid with ordered memory access, parallel computing by GPU is performed efficiently, and many large-scale calculations using supercomputers have been reported [46]. However, it is rare that a high-resolution grid is required for the entire computational domain during the simulation of an actual phenomenon. In a real phenomenon, it is rare for the gradient to be constant throughout the computational domain, and it is inefficient to resolve a region with a steep gradient and a region with a gentle gradient with the same grid resolution. To reduce the calculation cost, [PERSON] et al. proposed the AMR (Adaptive Mesh Refinement) method [9]. AMR is a computational method that involves dynamic refinement of the resolution of a mesh or grid used in a numerical simulation. The resolution of the mesh is adjusted based on the complexity of the solution with higher resolutions used in regions where the solution is changing rapidly and lower resolutions used in regions where the solution is relatively constant. This allows the AMR method to achieve a high level of accuracy with less computational effort than that required with a fixed mesh with a uniform resolution. One of the main advantages of the AMR method is that it can reduce the computational cost of a simulation by using a coarser resolution in regions where it is not needed. This can greatly improve the efficiency of the simulation, allowing it to run faster and use fewer computing resources. Additionally, AMR can improve the accuracy of a simulation by using higher resolutions when needed, resulting in more accurate solutions. At present, the AMR method proposed by [PERSON] et al. is classified as a patch-type AMR method, in which arbitrary orthogonal grid regions with different resolutions are assigned to arbitrary locations. Since this method is deployed on an orthogonal grid, it is highly compatible with the GPU. However, refinement is complicated because the size of the patch area changes. The tree-based AMR method [47] is considered to be compatible with two-phase flow simulations with an interface, because the tree structure is easy to manage in the frequently repeated dynamic refinement and coarsening of the grids. Based on the tree structure, the memory access is regular, making it suitable for GPU parallel computing. When grid refinement is performed to halve the grid width of each side for a certain region, as shown in Figure 5, one grid is divided into four equal parts. The refinement leads to the creation of four child nodes in two-dimensional space and eight child nodes in three-dimensional space for the parent node on the tree structure. The present research used an extended AMR method based on the tree-based AMR method with GPU implementation, as proposed by [PERSON] and [PERSON] [20].