Skip to content

Missing dimension in c_u calcuation D3Q7

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB Bug Reports Missing dimension in c_u calcuation D3Q7

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4786
    Julius
    Participant

    Hello developers,

    I think I have encountered a bug in OpenLB v1.3
    In the dynamics/lbHelpersD3Q7.h file, in the function equilibrium the c_u is calculated as follows:
    T c_u = descriptors::c<L>(iPop,0)*u[0] + descriptors::c<L>(iPop,1)*u[1];

    The third dimension is missing in that calculation. It should be as in the below function equilibriumFirstOrder:
    T c_u = descriptors::c<L>(iPop,0) * u[0] + descriptors::c<L>(iPop,1) * u[1] + descriptors::c<L>(iPop,2) * u[2];

    The D3Q7 is usually used in combination with AD dynamics, which call the equilibriumFirstOrder for calculating the equilibrium. However, the AdvectionDiffusionMRTdynamics class does call the function equilibrium with the bug.

    Regards,
    Julius

    • This topic was modified 2 years, 5 months ago by Julius. Reason: Add code tag to AdvectionDiffusionMRTdynamics
    #4788
    mathias
    Keymaster

    Dear Julius,

    That is indeed a bug! Tanks for reporting. It has been corrected and will be included in the next release. I checkt, BGK and RLB are fine. They are not calling the wrong eq.function and, therefore, the examples are fine, too.

    Best
    Mathias

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.