# An AMR-Based Liquid Film Simulation with Surfactant Transport Using PLIC-HF Method
## 6 Discussion  
In this paper, a two-phase flow solver was proposed to simulate the motion of thin liquid film. The Weakly Compressible Scheme (WCS) was introduced as a fluid solver.  
In the WCS, the evolution of pressure is fully explicit, so the semi-implicit iterative calculation of the pressure Poisson equation, which sometimes brings numerical instability to the simulation, can be avoided. A evolving pressure projection method was used in the current simulation to suppress the oscillation of velocity by acoustic waves that are easily reflected by Neumann boundaries and are hard to dampen.  
The Piece-wise Linear Interface Calculation (PLIC) based on the Volume of Fluid (VOF) method was used as the interface-capturing method in the present study's simulation. The curvature of the interface was calculated in a straightforward manner using the Height Function (HF) method. The PLIC-HF has the advantage of suppressing spurious currents in two-phase flow simulations. For the solver described in the current study, the PLIC and HF method were implemented on an AMR mesh with GPU parallel computing based on CUDA programming language and NVIDIA GPU. The time efficiency was obvious compared with traditional CPU programs.  
An extended stencil computation on an AMR grid including neighbor leaves in diagonal directions was proposed and implemented to provide the stencil points required by the PLIC-HF method. A 'Neighbor of Neighbor' method to access diagonal neighbor leaves was proposed and implemented.  
Figure 18: Interface concentration profile focused on the liquid film area during the liquid film rupture process in surfactant solution with a Langmuir number of \(La=15\), from \(t=11.13\) to \(t=11.27\), with an interval of \(\Delta t=0.02\). The color legend ranges from \(f=0\) to a saturation concentration of \(f=2.9\times 10^{-6}\).  
The Langmuir model was implemented in the present study's solver to calculate the transport of the soluble surfactant. The surface tension coefficient was not a constant in the present study's simulations. A variable \(\sigma(f)\) was adopted. The variable changed according to the interface concentration of the surfactant.
* The results shown in Section 5.1 verify the accuracy and efficiency of the presented PLIC-VOF method on AMR mesh. The conservation in the results is satisfactory, which indicates that the implementation of the AMR mesh is valid. The number of cells and the required memory are reduced with the AMR method, which decreases the execution time and the computer cost;
* The results shown in Section 5.2 verify the accuracy and ability of the two-phase solver. The accuracy of the weakly compressible solver is shown by its good agreement with references for the center of mass and the rising velocity of the bubble;
* Section 5.3 describes a simulation of the generation of liquid film by a single bubble rising to a horizontal interface and the rupture process of that liquid film with surfactant transport and the Marangoni effect. The motion of the liquid rim after the rupture of the liquid film observed in the present study's simulation showed good agreement with the results of previous experiments, which indicates the accuracy of this method and its potential for use in further simulations of multi-scale problems.  
The present study's method can be extended to three dimensions in a straightforward manner. With the Message Passing Interface (MPI), multiple GPUs can be connected and used for a large-scale three-dimensional simulation. The Immersed Boundary Method (IBM) can be implemented for simulations with more complex geometries.