Free surface - gnomeCreative/HYBIRD GitHub Wiki
The mass-tracking algorithm for the free-surface resolution
HYBIRD excels at simulating free-surface flows, a feature that needs a treatment in the LBM. Strictly speaking, this would require the solution of two fluid phases, the liquid and the gas. However, the motion of the gas is of no practical interest, and its influence on the motion of the liquid is minimal. Because of this, Körner et al. (2005) created a multiphase version of LBM where the dynamics of the gas phase is neglected. Their method, called mass-tracking algorithm, is employed here because of its accuracy and its concise formulation.
The division of the lattice nodes into categories, according to their location in the flow.
The lattice nodes are divided into three categories: liquid, gas, and interface. The state of a node is determined by an additional variable, the liquid fraction $\lambda$:
- $\lambda=1$ if the node is liquid,
- $\lambda<1$ if the node is interface,
- $\lambda=0$ if the node is gas.
The liquid mass contained in a node can be obtained by multiplying the liquid fraction to the fluid density, i.e. $m_\textrm{f}=\lambda\rho_\textrm{f}$, and is updated by tracking the populations streaming in and out of every node using the equation
$m_\textrm{f} (x,t+1) = m_\textrm{f} (x,t) + \sum_i \alpha_i \left[ f_{i'} (x+c_i,t)- f_{i} (x,t)\right]$ ,
where $i'$ is the lattice direction opposite to $i$. The conservation of mass is guaranteed by the parameter $\alpha_i$, which is a function of the liquid fraction of the neighbor nodes (located at $x+c_i$) as
- $\frac{1}{2}\left[\lambda (x,t) + \lambda (x+c_i,t)\right]$ if the neighbor node is interface,
- $ if the neighbor node is liquid,
- $ if the neighbor node is gas.
An interface node will evolve into a gas node if its mass falls below zero, and into a liquid node if it rises above unit. Whenever an event of this sort happens, the neighbor nodes also evolve, so that liquid and gas nodes are always separated by interface nodes. While the theoretical algorithm conserves mass exactly, the discrete integration and the evolution of the nodes result in small losses and gains of mass. The surplus (or shortfall) of mass is then computed at every time step and is corrected by distributing an opposite quantity of mass among all interface nodes.
The LBM equations are solved only for liquid and interface nodes. Gas nodes are supposed to have no mass, and are therefore neglected. This creates a problem since the populations streaming to the interface nodes from beyond the interface, are not defined. The missing distributions are computed by assuming that the gas node has the same velocity of the interface node $u_\textrm{int}$ and a constant atmospheric density $\rho_\textrm{atm}$, obtaining
$f_{i'} (x+c_{i'},t+1) = f^{eq}_{i} (u_\textrm{int},\rho_\textrm{atm}) +f^{eq}_{i'} (u_\textrm{int},\rho_\textrm{atm})- f_{i} (x,t)
$.
This is analogous to applying a fixed-pressure boundary condition at the interface, and local symmetry conditions for the velocity. In the simulations, $\rho_\textrm{atm}=1$ in lattice units, implying that $\rho_\textrm{f}>1$ everywhere in the liquid.