## 2 Methodology
### ALE-LBFS for Fluid Solver
#### 2.2.1 Macroscopic Conservation Laws
Derived from the conservation of moment, the mathematic formulation of D1Q4 comes out as  
\[g_{1}=\frac{\rho\big{(}-d_{1}d_{2}^{2}-d_{2}^{2}u+d_{1}u^{2}+d_{1}c^{2}+u^{3} +3 uc^{2}\big{)}}{2d_{1}\big{(}d_{1}^{2}-d_{2}^{2}\big{)}}, \tag{12}\]\[g_{2}=\frac{\rho\big{(}-d_{1}d_{2}^{2}+d_{2}^{2}u+d_{1}u^{2}+d_{1}c^{2}-u^{3}-3 uc^{ 2}\big{)}}{2d_{1}\big{(}d_{1}^{2}-d_{2}^{2}\big{)}}, \tag{13}\]  
\[g_{3}=\frac{\rho\big{(}d_{1}^{2}d_{2}+d_{1}^{2}u-d_{2}u^{2}-d_{2}c^{2}-u^{3}-3 uc^ {2}\big{)}}{2d_{2}\big{(}d_{1}^{2}-d_{2}^{2}\big{)}}, \tag{14}\]  
\[g_{4}=\frac{\rho\big{(}d_{1}^{2}d_{2}-d_{1}^{2}u-d_{2}u^{2}-d_{2}c^{2}+u^{3}+3 uc ^{2}\big{)}}{2d_{2}\big{(}d_{1}^{2}-d_{2}^{2}\big{)}} \tag{15}\]  
with  
\[d_{1}=\sqrt{u^{2}+3c^{2}-\sqrt{4u^{2}c^{2}+6c^{4}}}, \tag{16}\]  
\[d_{2}=\sqrt{u^{2}+3c^{2}+\sqrt{4u^{2}c^{2}+6c^{4}}} \tag{17}\]  
where \(g_{i}\) and \(d_{a}\) are the equilibrium distribution function and lattice velocity depending on the state of \(\alpha\)-direction. \(c\) represents the peculiar velocity of particles defined as \(c=\sqrt{p/\rho}\). At the angle of the interface, the lattice particle is moving across or far away from it with corresponding lattice velocity and distribution. It is essential to transform the conservative variables to the local frame specified for each interface. \(\mathbf{u}_{\tau}\) is the tangential component of velocity and has the formulations as  
\[\mathbf{u}_{\tau}=\mathbf{u}-u_{n}\mathbf{n} \tag{18}\]  
Substituting Equation (18) into Equations (9) and (10), the variables of interest can be rewritten in the local Cartesian coordinate with \(\mathbf{u}_{\tau}\) and \(u_{n}\) as  
\[\mathbf{W}=\bar{\mathbf{W}}+\hat{\mathbf{W}}= \begin{bmatrix}\rho\\ \rho u_{n}\mathbf{n}\\ \rho\Big{(}\frac{u_{n}^{2}}{2}+e\Big{)}\end{bmatrix} + \begin{bmatrix}\rho\\ \rho\mathbf{u}_{\tau}\\ \rho\frac{\|\mathbf{u}_{\tau}\|^{2}}{2}\end{bmatrix}  \tag{19}\]  
\[\mathbf{F}_{c}=\bar{\mathbf{F}}_{c}+\bar{\mathbf{F}}_{c}= \begin{bmatrix}\rho u _{n}\\ \rho\big{(}\rho u_{n}^{2}+p\big{)}\mathbf{n}\\ \big{(}\rho\big{(}\frac{u_{n}^{2}}{2}+e\Big{)}+p\big{)}u_{n}\end{bmatrix} + \begin{bmatrix}\rho u_{n}\\ \rho\mathbf{u}_{\tau}u_{n}\\ \rho u_{n}\frac{\|\mathbf{u}_{\tau}\|^{2}}{2}\end{bmatrix}  \tag{20}\]  
Figure 3: Distribution of discrete lattice velocities in 1D model. Figure 2: Control volume of a median-dual cell-vertex scheme for (**left**) 2D and (**right**) 3D. Furthermore, LBFS evaluates the normal component of \(\mathbf{W}\) and \(\mathbf{F}_{c}\) using the lattice Boltzmann solution reconstructed locally. Using the distribution functions \(f_{a}(\mathbf{r},t)\), the components contributed by normal velocity have the following formulation  
\[\bar{\mathbf{W}}=\sum_{\alpha=1}^{N}\boldsymbol{\varphi}_{\alpha}f_{a}( \mathbf{r},t) \tag{21}\]  
and  
\[\bar{\mathbf{F}}_{c}=\sum_{\alpha=1}^{N}\xi_{\alpha}\boldsymbol{\varphi}_{ \alpha}f_{a}(\mathbf{r},t) \tag{22}\]  
where \(\xi_{\alpha}\) is the particle velocity in the \(\alpha\)-direction, i.e., \(\xi_{1}=d_{1}\), \(\xi_{2}=-d_{1}\), \(\xi_{3}=d_{2}\), \(\xi_{4}=-d_{2}\). With the potential energy of particles \(e_{p}=[1-(\gamma-1)/2]e\), \(\boldsymbol{\varphi}_{\alpha}\) stands for the moments  
\[\boldsymbol{\varphi}_{\alpha}= \begin{bmatrix}1\\ \xi_{\alpha}\\ \frac{\xi_{\alpha}^{2}}{2}+e_{p}\end{bmatrix}  \tag{23}\]  
Within the D1Q4 compressible LBFS, the evaluation of convective flux depends on \(f_{\alpha}(\mathbf{r},t)\), among which the equilibrium part acts as the inviscid flux while the latter is responsible for numerical dissipation.