I definitely think that the “set microscopic boundary conditions” step in cylinder.m is before collide, and not after collide…
You can implement a boundary condition before collision (in which case you are working with incoming populations fIn) or after collision (in which case you are working with outgoing populations fOut). Both are possible, but the algorithm may not be the same in both cases, depending on which boundary condition you are using. It is important to read through the documentation of a boundary condition to know whether it acts on the incoming or outgoing populations.
Thanks for the reply. I am using Zou-He Boundary Conditions on all the four sides of a channel. So is it a must that I implement my boundary conditions before collision and not after collision. (I interpret that I am setting the incoming populations to set the boundary conditions and I am working with incoming f’s)
Eg:
Case 1:
1.Collide
2.Stream
3.Boundary Conditions (Micro)
4.Compute Macro Variables (Macro Boundaries are set automatically)
Case 2:
Boundary Conditions (Micro)
Compute Macro Variables (Macro Boundaries are set automatically)
As it was indicated by Jonas you have to go through the documentation. However, particularly for Zou-He both variations are possible - you can do both ways - once I tested.
However, please make sure to comply with documentation first,
Cheers,
Alex