<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f0d39f23760>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f49aeb64fa0>
%% Cell type:markdown id: tags:
One can check if a method is orthogonalized:
...
...
@@ -202,11 +202,11 @@
central_moment_method
```
%%%% Output: execute_result
<lbmpy.methods.momentbased.centralmomentbasedmethod.CentralMomentBasedLbMethod at 0x7f0d39c84d90>
<lbmpy.methods.momentbased.centralmomentbasedmethod.CentralMomentBasedLbMethod at 0x7f49aeadb0a0>
%% Cell type:markdown id: tags:
The shift to the central moment space is done by applying a so-called shift matrix. Usually, this introduces a high numerical overhead. This problem is solved with lbmpy because each transformation stage can be specifically optimised individually. Therefore, it is possible to derive a CLBM with only a little numerical overhead.
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f0d39cceac0>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f49ae9359d0>
%% Cell type:markdown id: tags:
If one needs to also specify custom equilibrium moments the following approach can be used
...
...
@@ -353,11 +353,11 @@
method
```
%%%% Output: execute_result
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f0d39bf1c10>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f49ae8e9c10>
%% Cell type:markdown id: tags:
Instead of manually defining all entries in the method table, *lbmpy* has functions to fill the table according to a specific pattern. For example:
- for a full stencil (D2Q9, D3Q27) there exist exactly 9 or 27 linearly independent moments. These can either be taken as they are, or orthogonalized using Gram-Schmidt, weighted Gram-Schmidt or a Hermite approach
...
...
@@ -379,11 +379,11 @@
method
```
%%%% Output: execute_result
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f0d39bfbc70>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f49ae8ca190>
%% Cell type:markdown id: tags:
Our customized method can be directly passed into one of the scenarios. We can for example set up a channel flow with it. Since we used symbols as relaxation rates, we have to pass them in as `kernel_params`.