## 2 Materials and Methods
### Lattice-Boltzmann Method  
The lattice-Boltzmann method (LBM) is a numerical approach to solve the Navier-Stokes equations, which describe the motion of fluids. The detailed LBM description with the theoretical background is available in many books [21; 22; 23]; thus, in this work, we only show a minimal introduction from the implementation point of view. In LBM, the domain is discretised into a uniform, usually Cartesian, mesh containing _nodes_ distant by the _lattice spacing_\(\delta x\) along all axes. During computations, nodes communicate with some neighbours--the choice of neighbours depends on _lattice arrangement_ which defines the dimension of the problem and communication pattern between neighbouring nodes (_lattice linkage_). The lattice arrangement is usually described using D\(d\)Q\(q\) notation, where \(d\) is the dimension, and \(q\) is the linkage. For example, the D2Q5 arrangement defines a 2D lattice where nodes communicate only with neighbours placed along the axes (left, right, top, bottom), whereas D2Q9 takes into account also the nodes placed at diagonal corners (see Figure 1). A single iteration of simulation advances simulation time by the time step \(\delta t\) and includes one-time communication between all nodes and additional computations. To simplify equations, it is usually assumed that \(\delta x=1\) and \(\delta t=1\). In this case, the initial characteristic velocity \(U\)_ and the fluid viscosity \(\
u\) have to be set up to keep the required Reynolds number  
\[\text{Re}=\frac{U\cdot L}{\
u}, \tag{1}\]  
where \(L\) denotes the _characteristic length_ which is dependent on the selected size in simulated geometry. Each node contains a set of _particle distribution functions_ (PDF) \(f_{i}(\mathbf{x},t)\), where \(\mathbf{x}\) denotes node position, \(t\) denotes time, and \(i\) denotes the index of function corresponding to lattice linkage. The PDF numbering can be chosen in different ways; in this work we use one of the most often presented in Figure 1. The macroscopic fluid density \(\rho\) and velocity \(\mathbf{v}\) are related with PDFs according to equations  
\[\rho(\mathbf{x},t)=\sum_{i}f_{i}(\mathbf{x},t)\quad\text{and}\quad\mathbf{v} (x,t)=\frac{1}{\rho(\mathbf{x},t)}\frac{\delta x}{\delta t}\sum_{i}\mathbf{v} _{i}f_{i}(\mathbf{x},t), \tag{2}\]  
where \(\mathbf{v_{i}}\) are called _lattice (microscopic) velocities_ and are equal to vectors from the current to the neighbouring node. For the D2Q9 lattice shown in Figure 1, the selected values of \(\mathbf{v_{i}}\) are the following: \(\mathbf{v_{0}}=[0,0],\mathbf{v_{1}}=[1,0],\mathbf{v_{4}}=[0,-1],\mathbf{v_{6 }}=[-1,1]\), etc. The LBM operations are described by equation  
\[f_{i}(\mathbf{x}+\mathbf{v_{i}}\delta t,t+\delta t)=f_{i}(\mathbf{x},t)+\Omega _{i}, \tag{3}\]  
where \(\Omega_{i}\) is named the _collision operator_. Simple LBM implementations are then often realised as two alternating steps: _collision_ computing new PDF values according to the right-hand side of Equation (3), and _streaming_ responsible for transferring the values computed during the collision step into the places defined by the left-hand side of Equation (3). One of the simple, yet widely used, collision operators is the Bhatnagar, Gross and Krook (BGK) operator [24] defined as  
\[\Omega_{i}^{BGK}=-\omega\Big{(}f_{i}(\mathbf{x},t)-f_{i}^{eq}(\mathbf{x},t) \Big{)}, \tag{4}\]  
where \(\omega\) is called the _collision frequency_ and \(f_{i}^{eq}\) is the _local equilibrium distribution function_.