<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7fc04815aa30>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f1b874f5e20>
%% Cell type:markdown id: tags:
If one needs to also specify custom equilibrium moments the following approach can be used
...
...
@@ -255,11 +255,11 @@
method
```
%%%% Output: execute_result
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7fc0075b2e50>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f1b873e9cd0>
%% 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
...
...
@@ -281,11 +281,11 @@
method
```
%%%% Output: execute_result
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7fc007825f70>
<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f1b8766a520>
%% 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`.