periodic boundaries and envelope update


I have experienced some problems when using a pressure driven periodic boundary condition. My simulation ceases to work if the pressure step coincides with the periodicity of the lattice.
By now I am fairly sure that the reason is a missing communication step to update the envelopes of the periodic boundary nodes, since everything works fine again if I enforce a envelope update via duplicateOverlaps(). (By the way, how do I use this function in the new version 0.7r0?) The collision step is performed correctly, but it seems to me that the populations entering the lattice on the left side are the pre-collision populations leaving the lattice on the right side.



The function duplicateOverlaps takes a parameter in the latest Palabos version, indicating which kind of content should be duplicated. To get the same behavior as in old versions, you should use the following function call:


For the rest, I don’t understand your question. In particular, I don’t understand what a pressure-driven periodic boundary condition is. Please try to be as specific as possible.


the boundary condition I use is described in Phys. Fluids 19, 108101 (2007) by Kim and Pitsch. They propose an alternative approach to a body force for applying a pressure gradient to a periodic flow by changing the density of the equilibrium part of the populations leaving a unit cell.
At first I have implemented the boundary condition by writing a data processor which works just fine, but has to be called between every collision and streaming step. Therefore, I have now defined two separate dynamics for the inlet, respectively the outlet column, in which the out-going f[sub]i[/sub] are already modified during the collision step. Since I use periodic boundary conditions in x-direction, in principle the simulation should work independently of where I choose to define the new dynamics as long as the two columns are next to each other. Again it works, but if the outlet column is on the right and the inlet column on the left end of the lattice, my program ceases to work. In fact, if I start the simulation with an initial velocity, I get a Poiseuille profile again, but the flow will stop after some time, so there is no pressure gradient.

I have done some tests and I may very well be wrong, yet it seems to me that the populations entering the lattice are not the ones that have left the lattice on the other end, but are in fact the corresponding f[sub]i[/sub] before the collision step has taken place. Is it possible that at the streaming process the envelopes contain still the pre-collision values of their neighbors and a communication step for the periodic boundary nodes is missing? Or is it me who is missing something? If I enforce an update of the envelopes by calling duplicateOverlaps between the collision and streaming step, again everything runs smoothly.

Thank you for your help.

Hi jlatt,

Is there a mistake on the new version 0.7r3 or not?
in the toggle function, you call to:

Not as you mentioned above:


/ MvH