pyLBM.
Scheme
(dico, stencil=None)¶Create the class with all the needed informations for each elementary scheme.
Parameters: | dico : a dictionary that contains the following key:value
|
---|
Notes
Each dictionary of the list schemes should contains the following key:value
If the stencil has already been computed, it can be pass in argument.
Examples
see demo/examples/scheme/
Attributes
dim | (int) spatial dimension |
dx | (double) space step |
dt | (double) time step |
la | (double) scheme velocity, ratio dx/dt |
nscheme | (int) number of elementary schemes |
stencil | (object of class Stencil ) a stencil of velocities |
P | (list of sympy matrix) list of polynomials that define the moments |
EQ | (list of sympy matrix) list of the equilibrium functions |
s | (list of list of doubles) relaxation parameters (exemple: s[k][l] is the parameter associated to the lth moment in the kth scheme) |
M | (sympy matrix) the symbolic matrix of the moments |
Mnum | (numpy array) the numeric matrix of the moments (m = Mnum F) |
invM | (sympy matrix) the symbolic inverse matrix |
invMnum | (numpy array) the numeric inverse matrix (F = invMnum m) |
generator | (Generator ) the used generator ( NumpyGenerator , CythonGenerator , ...) |
ode_solver | (ode_solver ,) the used ODE solver ( explicit_euler , heun , ...) |
Methods
compute_amplification_matrix (wave_vector) |
compute the amplification matrix of one time step of the scheme |
compute_amplification_matrix_relaxation () |
compute the amplification matrix of the relaxation. |
compute_consistency (dicocons) |
compute the consistency of the scheme. |
create_moments_matrices () |
Create the moments matrices M and M^{-1} used to transform the repartition functions into the moments |
equilibrium (mm) |
Compute the equilibrium |
f2m (ff, mm) |
Compute the moments m from the distribution functions f |
generate (backend, sorder, valin) |
Generate the code by using the appropriated generator |
is_L2_stable ([Nk]) |
test the L2 stability of the scheme |
is_monotonically_stable () |
test the monotonical stability of the scheme. |
m2f (mm, ff) |
Compute the distribution functions f from the moments m |
onetimestep (mm, ff, ff_new, in_or_out, valin) |
Compute one time step of the Lattice Boltzmann method |
relaxation (m) |
The relaxation phase on the moments m |
set_boundary_conditions (f, m, bc, interface) |
Apply the boundary conditions |
set_initialization (scheme) |
set the initialization functions for the conserved moments. |
set_source_terms (scheme) |
set the source terms functions for the conserved moments. |
source_term (m[, tn, dt, x, y, z]) |
The integration of the source term on the moments m |
transport (f) |
The transport phase on the distribution functions f |
vp_amplification_matrix (wave_vector) |
compute the eigenvalues of the amplification matrix |