Skip to content

Reply To: D3Q7 MRT velocity directions

#5382
stephan
Moderator

Dear Julius,

thank you for your bug report.
You are right with your observations.

First, please note that the MRT Basis compiled in M for D3Q7 is designed for anisotropic diffusion, though used in OpenLB strictly for isotropic cases via setting off diagonal relaxation values in S to 0 [see Ref. Li, Yang, Zhang 2016 International Journal of Heat and Mass Transfer 94].

Second, the matrix M for D3Q7 in the code has incorrectly arranged columns, as you claimed in your post.
This becomes clear when considering its rows nr. 1,2,3 (counted from 0).
The ordering should be fitted to the velocity set for D3Q7 in /src/dynamics/latticeDescriptors.h, i.e. the correct MRT Matrix should read:
{1, 1, 1, 1, 1, 1, 1},
{0, -1, 0, 0, 1, 0, 0},
{0, 0, -1, 0, 0, 1, 0},
{0, 0, 0, -1, 0, 0, 1},
{6, -1, -1, -1, -1, -1, -1},
{0, 2, -1, -1, 2, -1, -1},
{0, 0, 1, -1, 0, 1, -1}

Correspondingly, the corrected inverse of M can be calculated with a basic linear algebra package.
I’ll, leave that up to you.
Anything else belonging to the D3Q7 MRT configuration in the file mrtLatticeDescriptors.h should still uphold correctness.
Please contact me directly via email in case you need further information (stephan.simonis “at” kit.edu).

Thank you again for pointing out the bug.
We will include the correction in the next version of OpenLB.

BR
Stephan

  • This reply was modified 3 years, 7 months ago by stephan.