| 1 |
/* |
| 2 |
* Advanced Simulation Library <http://asl.org.il> |
| 3 |
* |
| 4 |
* Copyright 2015 Avtech Scientific <http://avtechscientific.com> |
| 5 |
* |
| 6 |
* |
| 7 |
* This file is part of Advanced Simulation Library (ASL). |
| 8 |
* |
| 9 |
* ASL is free software: you can redistribute it and/or modify it |
| 10 |
* under the terms of the GNU Affero General Public License as |
| 11 |
* published by the Free Software Foundation, version 3 of the License. |
| 12 |
* |
| 13 |
* ASL is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
* GNU Affero General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Affero General Public License |
| 19 |
* along with ASL. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
* |
| 21 |
*/ |
| 22 |
|
| 23 |
|
| 24 |
/** |
| 25 |
\class asl::LBGK |
| 26 |
|
| 27 |
The class realizes the Lattice-Boltzmann algorithm for the compressible and incompressible flows. |
| 28 |
This realization is valid for 2D as well as for 3D cases. The 2D realization |
| 29 |
uses D2Q9 (asl::d2q9) lattice, and 3D one uses D3Q15 (asl::d3q15) and D3Q19 (asl::d3q19) lattice. The kinetic eqaution is: |
| 30 |
\f[ f_i(\vec r+\vec a_i,t+1)=(1-\omega)f_i(\vec r,t)+\omega f^{eq}_i, \f] |
| 31 |
|
| 32 |
In the compressible case the equilibrium distribution functions are difined as follows: |
| 33 |
\f[ f^{eq}=\rho \left( 1+\frac{\vec a_i\cdot \vec v_i}{a_s^2}+ \frac{(\vec a_i \cdot \vec v)^2}{2a_s^4}-\frac{{\vec v}^2}{2a_s^2} \right),\f] |
| 34 |
where |
| 35 |
\f[ \rho=\sum_i w_i f_i,\;\;\; \vec v= \frac{1}{\rho}\left(\sum_i w_i\vec a_i f_i +\frac{1}{\omega}F\delta_t\right),\f] |
| 36 |
\f[ a_s\equiv\sum_i w_i a_{ix}a_{ix}. \f] |
| 37 |
The local pressure is defined by the following expression: |
| 38 |
\f[ p = a_s^2 \rho. \f] |
| 39 |
|
| 40 |
In the case of incompressible flow the equilibrium distribution function is defined as follows: |
| 41 |
\f[ f^{eq}=p + p_0\left(\frac{\vec a_i\cdot \vec v_i}{a_s^2}+ \frac{(\vec a_i \cdot \vec v)^2}{2a_s^4}-\frac{{\vec v}^2}{2a_s^2} \right),\f] |
| 42 |
where |
| 43 |
\f[ p=\sum_i w_i f_i,\;\;\; \vec v= \frac{1}{p_0}\left(\sum_i w_i\vec a_i f_i +\frac{1}{\omega}F\delta_t\right),\f] |
| 44 |
\f[ a_s\equiv\sum_i w_i a_{ix}a_{ix}. \f] |
| 45 |
The local pressure is defined by the following expression: |
| 46 |
\f[ p_0 = a_s^2 \rho_0. \f] |
| 47 |
it is assumed that \f$ p_0 \f$ value is 1. |
| 48 |
|
| 49 |
|
| 50 |
The expression for the relaxation parameter is same for compressible and incompressible cases: |
| 51 |
\f[ w=\frac{2}{6\nu+1}, \f] |
| 52 |
where \f$\nu\f$ is the kinematic viscosity. |
| 53 |
|
| 54 |
see:X. He and L.S. Luo, "Lattice {B}oltzmann Model for the Incompressible Navier-Stokes Equation", J. Stat. Phys., v.88(1997), p.927-944, doi = {10.1023/B:JOSS.0000015179.12689.e4} |
| 55 |
|
| 56 |
The class contains a noninertial force defined by the expression: |
| 57 |
\f[ F = - 2 \left[\vec \Omega, \vec v\right]. \f] |
| 58 |
|
| 59 |
|
| 60 |
*/ |
| 61 |
|
| 62 |
|