Skip to content

Latest commit

 

History

History
164 lines (101 loc) · 5.37 KB

methods.rst

File metadata and controls

164 lines (101 loc) · 5.37 KB

Collision models (lbmpy.methods)

This module defines the classes defining all types of lattice Boltzmann methods available in lbmpy, together with a set of factory functions used to create their instances. The factory functions are organized in three levels of abstraction. Objects of the method classes should be created only through these factory functions, never manually.

Methods in lbmpy can be distinguished into three categories:
  • methods_rawmomentbased, including the classical single relaxation-time (SRT, BGK), two relaxation-time (TRT) and multiple relaxation-time (MRT) methods, as well as entropic variants of the TRT method.
  • methods_centralmomentbased, which are multiple relaxation-time methods using relaxation in central moment space.
  • methods_cumulantbased, multiple relaxation-time methods using relaxation in cumulant space.

Abstract LB Method Base Class

lbmpy.methods.LbmCollisionRule

lbmpy.methods.AbstractLbMethod

Raw Moment-based methods

These methods are represented by instances of lbmpy.methods.momentbased.MomentBasedLbMethod and will derive collision equations either in population space (SRT, TRT, entropic TRT), or in raw moment space (MRT variants).

Creation Functions

The following factory functions create raw moment-based methods using variants of the regular hydrodynamic maxwellian equilibrium.

lbmpy.methods.create_srt

lbmpy.methods.create_trt

lbmpy.methods.create_trt_with_magic_number

lbmpy.methods.create_mrt_orthogonal

lbmpy.methods.create_trt_kbc

Class

lbmpy.methods.momentbased.MomentBasedLbMethod

Central Moment-based methods

These methods are represented by instances of lbmpy.methods.momentbased.CentralMomentBasedLbMethod and will derive collision equations in central moment space.

Creation Functions

The following factory functions create central moment-based methods using variants of the regular hydrodynamic maxwellian equilibrium.

lbmpy.methods.create_central_moment

Class

lbmpy.methods.momentbased.CentralMomentBasedLbMethod

Cumulant-based methods

These methods are represented by instances of lbmpy.methods.cumulantbased.CumulantBasedLbMethod and will derive collision equations in cumulant space.

Creation Functions

The following factory functions create cumulant-based methods using the regular continuous hydrodynamic maxwellian equilibrium.

lbmpy.methods.create_cumulant

lbmpy.methods.create_with_monomial_cumulants

lbmpy.methods.create_with_default_polynomial_cumulants

Class

lbmpy.methods.cumulantbased.CumulantBasedLbMethod

Default Moment sets

The following functions provide default sets of polynomial raw moments, central moments and cumulants to be used in MRT-type methods.

lbmpy.methods.default_moment_sets.cascaded_moment_sets_literature

lbmpy.methods.default_moment_sets.mrt_orthogonal_modes_literature

Low-Level Method Creation Interface

The following classes and factory functions constitute the lower levels of abstraction in method creation. They are called from the higher-level functions described above, or, in special cases, by the user directly.

Custom method variants in population space, raw and central moment space based on the hydrodynamic Maxwellian equilibrium may be created using either lbmpy.methods.creationfunctions.create_with_discrete_maxwellian_equilibrium or create_with_continuous_maxwellian_equilibrium.

Methods may also be created using custom equilibrium distributions using lbmpy.methods.creationfunctions.create_from_equilibrium.

The desired collision space, and the transform classes defining the manner of transforming populations to that space and back, are defined using lbmpy.enums.CollisionSpace and lbmpy.methods.CollisionSpaceInfo.

Collision Space Info

Low-Level Creation Functions

lbmpy.methods.creationfunctions.create_with_discrete_maxwellian_equilibrium

lbmpy.methods.creationfunctions.create_with_continuous_maxwellian_equilibrium

lbmpy.methods.creationfunctions.create_from_equilibrium

Conserved Quantity Computation

The classes of the conserved quantity computation (CQC) submodule define an LB Method's conserved quantities and the equations to compute them. For hydrodynamic methods, lbmpy.methods.DensityVelocityComputation is the typical choice. For custom methods, however, a custom CQC class might have to be created.

lbmpy.methods.AbstractConservedQuantityComputation

lbmpy.methods.DensityVelocityComputation