Hi everyone,
I got a problem when trying to make a function to calculate the fluid’s time average velocity.
My idea is to create two same lattices. One named slattice is the normal lattice used for collideAndStream. Another one named for example TSlattice is just used to store the sum of all step’s slattice’s velocity to calculate a time average velocity.
After every steps’s collideAndStream of slattice, the TSlattice’ velocity will plus slattice’s velocity one lattice by one lattice, and the result will be stored in TSlattice again. So that I can use TSlattice to calculate time average.
But when I write the averaged velocity of TSlattice to VTK files, I found that time averaged velocity of the whole field has been divided into many blocks because of the several Cuboids for parallel calculation. On the edge lattice of the cuboids, the value is always 0.
I thought that I should do something to combine all the Cuboids together. What should I do ?