pyLBM.Simulation

class pyLBM.Simulation(dico, domain=None, scheme=None, sorder=None, dtype='float64')

create a class simulation

Parameters:

dico : dictionary

domain : object of class Domain, optional

scheme : object of class Scheme, optional

type : optional argument (default value is ‘float64’)

Notes

The methods transport, relaxation, equilibrium, f2m, m2f, boundary_condition, and one_time_step are just call of the methods of the class Scheme.

Examples

see demo/examples/

Access to the distribution functions and the moments.

In 1D:

>>>F[n][k][i]
>>>m[n][k][i]

get the kth distribution function of the nth elementary scheme and the kth moment of the nth elementary scheme at the point x[0][i].

In 2D:

>>>F[n][k][j, i]
>>>m[n][k][j, i]

get the kth distribution function of the nth elementary scheme and the kth moment of the nth elementary scheme at the point x[0][i], x[1][j].

Attributes

dim (int) spatial dimension
type (float64) the type of the values
domain (Domain) the domain given in argument
scheme (Scheme) the scheme given in argument
m (numpy array) a numpy array that contains the values of the moments in each point
F (numpy array) a numpy array that contains the values of the distribution functions in each point

Methods

initialization : initialize all the arrays
transport : compute the transport phase (modifies the array _F)
relaxation : compute the relaxation phase (modifies the array _m)
equilibrium : compute the equilibrium
f2m : compute the moments _m from the distribution _F
m2f : compute the distribution _F from the moments _m
boundary_condition : compute the boundary conditions (modifies the array _F)
one_time_step : compute a complet time step combining boundary_condition, transport, f2m, relaxation, m2f
time_info : print informations about time