Stencils

get_stencil(name, ordering='walberla')

Stencils are tuples of discrete velocities. They are commonly labeled in the ‘DxQy’ notation, where d is the dimension (length of the velocity tuples) and y is number of discrete velocities.

Parameters
  • name – DxQy notation

  • ordering – the LBM literature does not use a common order of the discrete velocities, therefore here different common orderings are available. All orderings lead to the same method, it just has to be used consistently. Here more orderings are available to compare intermediate results with the literature.

class LBStencil(stencil, ordering='walberla')

Class representing a lattice Boltzmann stencil in DxQy notation, where d is the dimension (length of the velocity tuples) and y is number of discrete velocities. For every dimension many different version of a certain stencil is available. The reason for that is to ensure comparability with the literature. Internally the stencil is represented as a tuple of tuples, where the ordering of the tuples plays no role.

Parameters
  • stencil – Can be tuple of tuples which represents a DxQy stencil, a string like ‘D2Q9’ or an enum of lbmpy.enums.Stencil

  • ordering – the LBM literature does not use a common order of the discrete velocities, therefore here different common orderings are available. All orderings lead to the same method, it just has to be used consistently. Here more orderings are available to compare intermediate results with the literature.