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

m get the moment i in the interior domain.
F get the distribution function i in the interior domain.
m_halo get the moment i on the whole domain with halo points.
F_halo get the distribution function i on the whole domain with halo points.
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

Methods

boundary_condition() perform the boundary conditions
equilibrium() set the moments to the equilibrium values
f2m() compute the moments from the distribution functions
initialization(dico) initialize all the numy array with the initial conditions
m2f() compute the distribution functions from the moments
one_time_step() compute one time step
relaxation() compute the relaxation phase on moments
source_term([fraction_of_time_step]) compute the source term phase on moments
time_info()
transport() compute the transport phase on distribution functions