# An AMR-Based Liquid Film Simulation with Surfactant Transport Using PLIC-HF Method
## 5 Numerical Results  
### Two-Dimensional Time-Reversed VOF Advection in a Single Vortex  
A two-dimensional single vortex interface deformation simulation [48] is a computational model that can be used to test the accuracy of an interface-capturing method. In this simulation, a single vortex velocity field is designated in a fluid, and the interface between two phases is tracked as the vortex deforms the interface. The size of the computational domain is \([0,1]\times[0,1]\). A circular interface with a radius of 0.2 is set at the initial position \((0.5,0.75)\), and advection is performed according to the stream function expressed by the following equation:  
\[\Psi(t,x,y)=\frac{1}{\pi}\sin^{2}(\pi x)\sin^{2}(\pi y)\cos(\frac{\pi t}{T}) \tag{57}\]  
The velocity field is derived from the stream function, as follows:  
\[u(x,y,t)=\frac{\partial\Psi}{\partial y}=2\sin^{2}(\pi x)\sin(\pi y)\cos(\pi y )\cos(\frac{\pi t}{T}) \tag{58}\]  
\[v(x,y,t)=-\frac{\partial\Psi}{\partial x}=-2\sin(\pi x)\cos(\pi x)\sin^{2}( \pi y)\cos(\frac{\pi t}{T}) \tag{59}\]  
Here, \(T\) is the period, which was set as 8.0 in the present research. The interface is stretched by the flow field until \(t=\frac{T}{2}\), and from \(t=\frac{T}{2}\), the reverted velocity field is restored to its initial shape at \(t=T\). In this calculation, \(T=8.0\) and the time step is set in accordance with the finest mesh size \(\Delta t=0.1\Delta x\). As described in Section 3.4, the time step \(\Delta t\) in the weakly compressible scheme is mainly dominated by the speed of sound, whereas in the VOF advection calculation, the time step is dominated by the advection velocity field. A value of \(\Delta t=0.1\Delta x\) is sufficiently small with respect to the flow velocity. In the present research, an interface-adapted AMR method was used. The fine mesh was gathered near the interface according to the level set, which is defined as a signed distance function of the interface. As shown in Figure 8, the initial tree node was \(16\times 16\)  
Figure 7: The construction of a \(12\times 12\) stencil with diagonal halo region in the shared memory. The white cells represent \(4\times 4\) leaf cells in a leaf node. The light blue cells represent the halo cells of the stencil taken from the X\(+\) and X\(-\) directions. The light red cells represent the halo cells of the stencil taken from the Y\(+\) and Y\(-\) directions. The light green cells represent the diagonal halo cells of the stencil taken from diagonal directions in a ’neighbor of neighbor’ way. in size, and there were 4 cells in one direction on a leaf node. Thus, the initial resolution was \(64\times 64\). The finest resolution can be set by the maximum AMR refinement level. Two maximum levels were set at 2 and 3 with the finest resolutions being \(256\times 256\) and \(512\times 512\), respectively. The volume fraction \(\phi\) inside the circle was set as 1.0, and the volume fraction outside the circle was set as 0.0 when \(t=0\). The total volume fraction inside the circle can be defined as  
\[V(t)=\int_{\Omega(t)_{inside}}1 dxdy \tag{60}\]  
where \(\Omega_{inside}\) indicates the region for \(\phi>0.5\). \(V_{0}\) is the initial total volume fraction when \(t=0\). An relative error function \(\epsilon(t)\) is proposed to measure the volume conservation quantitatively, as follows:  
\[\epsilon(t)=\frac{V(t)-V_{0}}{V_{0}} \tag{61}\]  
Figure 8: Interface deformation in a 2D single vortex. The reconstructed interface is shown as a black line and the AMR grid is shown as a light gray line. The maximum AMR level and finest resolution of (**a**) and (**b**) are 2 and \(256\times 256\), respectively. The maximum AMR level and finest resolution of (**c**) and (**d**) are 3 and \(512\times 512\), respectively. (**a**) \(t=\frac{T}{2}\), finest resolution \(256\times 256\). (**b**) \(t=T\), finest resolution \(256\times 256\). (**c**) \(t=\frac{T}{2}\), finest resolution \(512\times 512\). (**d**) \(t=T\), finest resolution \(512\times 512\).