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
create_moments_matrix : | Create the moments matrices |
create_relaxation_function : | Create the relaxation function |
create_equilibrium_function : | Create the equilibrium function |
create_transport_function : | Create the transport function |
create_f2m_function : | Create the function f2m |
create_m2f_function : | Create the function m2f |
generate : | Generate the code |
equilibrium : | Compute the equilibrium |
transport : | Transport phase |
relaxation : | Relaxation phase |
f2m : | Compute the moments from the distribution functions |
m2f : | Compute the distribution functions from the moments |
onetimestep : | One time step of the Lattice Boltzmann method |
set_initialization : | set the initialization functions for the conserved moments |
set_source_terms : | set the source terms functions |
set_boundary_conditions : | Apply the boundary conditions |
compute_amplification_matrix_relaxation : | compute the amplification matrix of the relaxation |
compute_amplification_matrix(wave_vector) : | compute the amplification matrix of one time step of the scheme for the given wave vector |
vp_amplification_matrix(wave_vector) : | compute the eigenvalues of the amplification matrix for a given wave vector |
is_L2_stable : | test the L2 stability of the scheme |
is_monotonically_stable : | test the monotonical stability of the scheme |