The requirements.txt does not specify any specific versions for any packages.
There are two sample codes:
- isentropic_vortex.py (2D case)
- taylor_green_vortex.py (3D case)
They will use the exporter class in order to create vtk-files.
There are no boundary conditions in this piece of code. Al boundaries are periodic, since the numpy roll is used for streaming. Collision is done locally in each cell.
Is a class storing the particle distribution function (PDF) and macoscropc variables. It contains methods for updating the data. The PDF stores its data in a [Nx, Ny, q] or [Nx, Ny, Nz, q] (2D & 3D) array. There is no mesh since the Nx*Ny(Nz) number of cells are represented only by an index in the array. For GPU purposes in Python, and array will probably have to be unrolled into a NxNy(*Nz)*q array. Either as an array of structures (AoS) or structure of arrays (SoA). There will probably have to be two variables containing the PDF (PDF_A and PDF_B) if using the AB-pattern.
The Stencil class store information for specific stencils used, i.e. d2q9 and d3q19 and so on.
The exporter exporta data to a vtk-file format which can be opened in paraview. The exporter will create actual cells hexa elements in 2D and hexahedrons in 3D for visualization.
Recommended reading for basic theory is:
- The Lattice Boltzmann Method - Principles and Practice, Timm Kruger.
Chapter 3 give sufficient details regarding the implemented equations and chapter 5 describe boundary conditions.
Functions dealing with an external force is of little interest at the moment.
For a stencil dDqQ (dimension D)
Macroscopic quantities are computed the following way:
Equlibrium function
Discretized lattice Boltzmann equation
Collision operator (BGK)
Collision step
Streaming step