Summary of the THINC procedure

In order to facilitate implementation, here we summarize the computational steps to update the function from $(\phi^n, \bar^n)$ to $(\phi^{n+1}, \bar^{n+1})$.
Step 1: Calculate the surface polynomial $P_$ in
$$P_ (x,y,z)=\sum_{s,t,r=0}^a_X^sY^tZ^r$$
or
$$P_ (x,y,z)=\sum_{s+t+r\leq p}^a_X^sY^tZ^r$$
for interface cells $(\epsilon \leq \bar ^n\leq 1-\epsilon)$ with the coefficients computed from
$$P (x_,y_,z_)=\phi_^n ,~~l=0,1,...,p.$$
or the least square method using the value of LS function $\phi^n$ in the supporting cells;
Step 2: Compute the correction to LS function, $\phi_^\Delta$, for tinterface cells to satisfy the mass conservation constraint
$$\frac{1}{|\Omega_ |}\int_{\Omega_}\frac{1}{2}(1+tanh(\beta(P_+(x,y,z)+\phi_^\Delta)))=\bar^n$$
from the volume fraction $\bar ^n$;
Step 3: Find the LS values, $\phi_^=\phi_^n+\phi_^\Delta$, for interface cells, and reinitialize the LS values
$$|\nabla \phi|=1$$
for other cells to synchronize the global LS function from $\phi_ ^n$ to $\phi_^$ that fulfill the mass/volume conservation;
Step 4: Update the LS function from $\phi^$ to $\phi^{n+1}$ by the fifth-order Hamilton-Jacobo WENO scheme and the 3rd-order TVD Runge-Kutta scheme;
Step 5: Update the volume fraction by
$$\frac{d\bar (t)}=-(\frac{1}{\Delta x}(F{i+\frac{1}{2}jk}^{}-F_{i-\frac{1}{2}jk}^{})+\frac{1}{\Delta y}(F_{ij+\frac{1}{2}k}^{}-F_{ij-\frac{1}{2}k}^{})+\frac{1}{\Delta z}(F_{ijk+\frac{1}{2}}^{}-F_{ijk-\frac{1}{2}}^{}))$$
where the numerical fluxes of interface cells are computed from the THINC function
$$H(x,y,z,t)=\frac{1}{2}(1+tanh(\beta(P_ (x,y,z)+\phi_^\Delta)))=\bar^n$$
$$F {i+\frac{1}{2}jk}^{}=\sum_^w_g(u(x_{i+\frac{1}{2}},y_g,z_g)H_i^jk(x_{i+\frac{1}{2}},y_g,z_g))$$
The 3rd-order Runge-Kutta scheme is used to predict the volume fraction $\bar ^{n+1}$ at new time level;