Example of Density
Definition 
In D2Q9 the density is calculated simply by adding the different factors
| $\rho(\vec{x},t) = m\displaystyle\int f(\vec{x},\vec{v},t)d\vec{v}$ |
\\n\\nso you have\\n\\n
$rho[x,y] = O[x,y]+N[x,y]+E[x,y]+S[x,y]+W[x,y]+NE[x,y]+SE[x,y]+NW[x,y]+SW[x,y]$
ID:(9152, 0)
Example of Speed in x
Image 
In D2Q9 the flow rate is calculated simply by adding the different factors
| $\vec{u}(\vec{x},t) = \displaystyle\frac{m}{\rho}\int \vec{v}f(\vec{x},\vec{v},t)d\vec{v}$ |
so you have
```
u_x[x,y] = E[x,y] + NE[x,y] + SE[x,y] - W[x,y] - NW[x,y] - SW[x,y]
```
ID:(9153, 0)
Example of Speed in y
Note 
In D2Q9 the flow rate is calculated simply by adding the different factors
| $\vec{u}(\vec{x},t) = \displaystyle\frac{m}{\rho}\int \vec{v}f(\vec{x},\vec{v},t)d\vec{v}$ |
so you have
```
u_y[x,y] = N[x,y] + NE[x,y] + NW[x,y] - S[x,y] - SE[x,y] - SW[x,y]
```
ID:(9154, 0)
Ejemplo de elemento de Colisión
Quote 
In case D2Q9 the term collision is calculated by summing the different factors
| $f_i^{eq}=\rho\omega_i\left(1+\displaystyle\frac{3\vec{u}\cdot\vec{e}_i}{c}+\displaystyle\frac{9(\vec{u}\cdot\vec{e}_i)^2}{2c^2}-\displaystyle\frac{3u^2}{2c^2}\right)$ |
so you have for each cell
```
O = O+w(4rho/9)(1-3u2/2) - O)
E = E+w(rho/9)(1 + u_x/3+5u_x^2-3u2/2)-E)
W = W+w(rho/9)(1 - u_x/3+5u_x^2-3u2/2)-W)
N = N+w(rho/9)(1 + u_y/3+5u_y^2-3u2/2)-N)
S = S+w(rho/9)(1 - u_y/3+5u_y^2-3u2/2)-S)
NE = NE+w(rho/36)(1+u_x/3+u_y/3+5(u2+2u_xu_y)/2-3u2/2) - NE)
SE = SE+w(rho/36)(1+u_x/3-u_y/3+5(u2-2u_xu_y)/2-3u2/2) - SE)
NW = NW+w(rho/36)(1-u_x/3+u_y/3+5(u2-2u_xu_y)/2-3u2/2) - NW)
SW = SW+w(rho/36)(1-u_x/3-u_y/3+5(u2+2u_xu_y)/2-3u2/2) - SW)
```
with
```
u2 = u_x^2+u_y^2
```
ID:(9155, 0)
Example Hydrodynamic Simulator
Exercise 
In the case of particles of a liquid, the method LBM allows to develop simulators as shown in the example:
ID:(9156, 0)
Classical LBM solution in the BGK approach
Storyboard 
Variables
Calculations
Calculations
Equations
Examples
One way to solve Boltzmann's general equation is to linearize the equation by assuming that the collision term can be written as the difference between the distribution function and the equilibrium solution represented by the distribution function of Maxwell Boltzmann
The equilibrium distribution can be approximated by a distribution of Maxwell Boltzmann
Where
En la aproximaci n Bhatnagar-Gross-Krook la distribuci n en equilibrio se asume como la de un gas de part culas sin interacci n
con
con
| Modelo | $\omega_i$ | Index |
| 1DQ3 | ? | i=0 |
| - | ? | i=1, 2 |
| 2DQ9 | 4/9 | i=0 |
| - | 1/9 | i=1,...,4 |
| - | 1/36 | i=5,...,8 |
| 3DQ15 | 1/3 | i=0 |
| - | 1/18 | i=1,...,6 |
| - | 1/36 | i=7,...,14 |
| 3DQ19 | ? | i=0 |
| - | ? | i=1,...,6 |
| - | ? | i=7,...,18 |
que se determinan asegurando que la distribuci n equilibrio cumpla las leyes de conservaci n.
In D2Q9 the density is calculated simply by adding the different factors
$rho[x,y] = O[x,y]+N[x,y]+E[x,y]+S[x,y]+W[x,y]+NE[x,y]+SE[x,y]+NW[x,y]+SW[x,y]$
In D2Q9 the flow rate is calculated simply by adding the different factors
so you have
```
u_x[x,y] = E[x,y] + NE[x,y] + SE[x,y] - W[x,y] - NW[x,y] - SW[x,y]
```
In D2Q9 the flow rate is calculated simply by adding the different factors
so you have
```
u_y[x,y] = N[x,y] + NE[x,y] + NW[x,y] - S[x,y] - SE[x,y] - SW[x,y]
```
In case D2Q9 the term collision is calculated by summing the different factors
so you have for each cell
```
O = O+w(4rho/9)(1-3u2/2) - O)
E = E+w(rho/9)(1 + u_x/3+5u_x^2-3u2/2)-E)
W = W+w(rho/9)(1 - u_x/3+5u_x^2-3u2/2)-W)
N = N+w(rho/9)(1 + u_y/3+5u_y^2-3u2/2)-N)
S = S+w(rho/9)(1 - u_y/3+5u_y^2-3u2/2)-S)
NE = NE+w(rho/36)(1+u_x/3+u_y/3+5(u2+2u_xu_y)/2-3u2/2) - NE)
SE = SE+w(rho/36)(1+u_x/3-u_y/3+5(u2-2u_xu_y)/2-3u2/2) - SE)
NW = NW+w(rho/36)(1-u_x/3+u_y/3+5(u2-2u_xu_y)/2-3u2/2) - NW)
SW = SW+w(rho/36)(1-u_x/3-u_y/3+5(u2+2u_xu_y)/2-3u2/2) - SW)
```
with
```
u2 = u_x^2+u_y^2
```
In the case of particles of a liquid, the method LBM allows to develop simulators as shown in the example:
ID:(1153, 0)
