pylbm.Simulation

class pylbm.Simulation(dico, sorder=None, dtype='float64', check_inverse=False)

create a class simulation

Parameters
dicodictionary
domainobject of class Domain, optional
schemeobject of class Scheme, optional
typeoptional 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/

Attributes
dimint

spatial dimension

typefloat64

the type of the values

domainDomain

the domain given in argument

schemeScheme

the scheme given in argument

mnumpy array

get the moment i in the interior domain.

Fnumpy array

get the distribution function i in the interior domain.

m_halonumpy array

get the moment i on the whole domain with halo points.

F_halonumpy array

get the distribution function i on the whole domain with halo points.

Methods

boundary_condition(self)

perform the boundary conditions

equilibrium(self[, m_user])

set the moments to the equilibrium values (the array _m is modified)

f2m(self, \*\*kwargs)

compute the moments from the distribution functions (the array _m is modified)

initialization(self, dico)

initialize all the numy array with the initial conditions set the initial values to the numpy arrays _F and _m

m2f(self[, m_user, f_user])

compute the distribution functions from the moments (the array _F is modified)

one_time_step(self, \*\*kwargs)

compute one time step

relaxation(self, \*\*kwargs)

compute the relaxation phase on moments (the array _m is modified)

source_term(self[, fraction_of_time_step])

compute the source term phase on moments (the array _m is modified)

transport(self, \*\*kwargs)

compute the transport phase on distribution functions (the array _F is modified)