Skip to content

Thermal LBM convection instability

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6772
    kest
    Participant

    Hi, I am trying to understand how thermal LBM works, for that purpose I wrote simple code in Python from formulas I found in nice review paper by Sharma et al. My code use double distribution for momentum and temperature calculation.

    It looks like that it is working fine for momentum only or temperature only, but not for both, e. g. I quickly got instability when try to simulate natural convection in 2D.

    Just a guess, but it looks like that energy(temperature) is not in sync with mass (momentum), e. g. as seen in picture above, temperature is transferred slower than mass, high temperature zone mostly remains in center, but mass is transferred upwards.

    In line 89, Boussinesq force term is calculated:
    Fi[:, :, i] = cxs9[i]*g[0]*beta*(T-Tref) + cys9[i]*g[1]*beta*(T-Tref) # Boussinesq

    In collision step: new density is calculated by F += -(1.0/tau_f) * (F – Feq) + Fi but new energy G += -(1.0/tau_g) * (G – Geq), so should there be no Boussinesq term in this equation? in Sharma et al. paper above such term is only at mass but not energy calculation in collision step

    Maybe somebody got any insights? where could problem be?

    Code and original post here: https://www.reddit.com/r/CFD/comments/wtd1te/thermal_lbm_convection_instability

    #6775
    stephan
    Moderator

    Dear kest,

    you might be interested in implementing the same testcase with OpenLB as a reference.
    There is also a double-distribution thermal model included in OpenLB.
    Similar code snippets should appear within the dynamics which are for example showcased in some of the examples/thermal/ folders.

    BR
    stephan

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