pylbm.stencil.Velocity

class pylbm.stencil.Velocity(dim=None, num=None, vx=None, vy=None, vz=None)

Create a velocity.

Parameters:
dimint, optional

The dimension of the velocity.

numint, optional

The number of the velocity in the numbering convention of Lattice-Boltzmann scheme.

vxint, optional

The x component of the velocity vector.

vyint, optional

The y component of the velocity vector.

vzint, optional

The z component of the velocity vector.

Notes

(Source code)

Examples

Create a velocity with the dimension and the number

>>> v = Velocity(dim=1, num=2)
>>> v
(2: -1)

Create a velocity with a direction

>>> v = Velocity(vx=1, vy=1)
>>> v
(5: 1, 1)
Attributes:
dimint

The dimension of the velocity.

num

The number of the velocity in the numbering convention of Lattice-Boltzmann scheme.

vxint

The x component of the velocity vector.

vyint

The y component of the velocity vector.

vzint

The z component of the velocity vector.

vlist

velocity

Methods

get_symmetric([axis])

return the symmetric velocity.

Attributes

v

velocity

v_full

velocity filled with 0 in 1d and 2d