Hi LBMFellows,
I am developing my own LBCode based on GPU/CUDA.
Having finished the isothermal part, I started to add in the temperature. I have following questions:

should I use D3Q7 or D3Q19 for temperature? Big difference?

I am thinking about implementing the simple BC first, which goes like this:
temperature populations stream to the boundaries, fixed temp. value on boundaries (Dirichlet), the difference is then the unknown populations, which stream back into bulk. (In this case, D3Q7 would be more convenient.)
I see there is also regularized version for temp. BC, I want to know is there big difference in the results?

for 0gradient temp. boundaries I am copying all the nearest bulk node pops to the next boundary node… I am not sure if this is correct, any ideas?

should collision step be done for temperature boundaries?
Thanks for any responces!
Peter
Hi Michael,
thank you VERY much for your advices! It helps a lot.
Here are some updates of the work.
 I have changed the whole lattice for temperature to D3Q7. Firstly just to see how it performs. The whole code gets speed doubled  I was positively surprised. Haven’t got any meaningful results though, due to bugs!
The test case I am using is closed cavity flow. Experiment data for validation comes from Tian, 2000,
“Low turbulence natural convection in an air filled square cavity”.
The Ra I wish to get for the simulation is 1.58e9. I hope the simple model I use for temperature will be stable enough. (I will know that soon, after fixing all the bugs.)
 I have finished implementing the simple BC scheme for temperature:
f_missing = rho_bc  sum(f_known);
For the edges and corners I used following method:
f_missing = f_eq_missing  ( f_oppositeOfMissing  f_eq_oppositeOfMissing )
Here I get another problem though: Beside streaming the normal populations to the boundaries, I also streamed the “on wall” populations on the boundaries, which I think is causing the following problem:
https://lh3.googleusercontent.com/CpiXMKRGJHukhkP9bvB68eiEaApSzbxljlXC8aYKI0jXhsy9zlx3xBKYdjG5quI4fI_wOuOM7Sh=w1617h841no
On the top surface I added a temperature profile as dirichlet condition. If I stream the on wall pops, then at least on the edges with the temperature profile the temp. value would go crazy. I am trying to fix that.

Thanks for the ideas, very helpful. I will check out later.

OK, I added the collision step also for the temperature boundaries.
At the beginning I did all boundaries with bounce back, then I changed them to wet nodes. Much more complex, less stable, but the results get better (if no bugs exist :).
I still have a few other small things to share and discuss, but I think we can put it another day.
Regards, Peter
https://lh3.googleusercontent.com/MKVzujabWNKglukucKjaUdrR4CSEVZrV1w1OYtp6_ZEmShl8P7l9mQRMDCfBqsgyE99snIYe2_=w654h589no
dear friends, I fixed the bugs I could find and finally the code runs stable with Ra=1.58e9
Then I get the strange result as shown above. This is the temperature field after 10 time steps. T_hot=1, T_cold=0.
The max. values of temperature goes now way over 1 and 0!
I guess the reason is the BC type I implemented.
Anyone else has faced the same problem? Any ideas how can I improve this?
Thanks,
Peter
Hi,
This is intresting. I’m a beginner and i wonder if you can help me with the thermal problem. is the implementation of the boundary conditions (dirichlet and Neumann) the same as the massproblem?