Rayleigh Taylor and Poiseuille Profile


I’m interested in modifying the multiComponent2D example by adding a Poiseuille velocity/pressure profile as the inlet/outlet boundary condition on the upper layer. I’m new to LB and unfortunately C++ and the best way I saw to go about accomplishing this was to add D2Q9Descriptor to the existing rayleighTaylor.cpp code so I could have access to the addVelocity(Pressure)BoundaryXX(*) functions. I then made, as far as I can see, the necessary modifications to the iniGeometry() function and function calls. When I compile I get the following error:

cannot convert olb::OnLatticeBoundaryCondition2D<T, olb::descriptors::ForcedShanChenD2Q9Descriptor>*' toolb::OnLatticeBoundaryCondition2D<T, olb::descriptors::D2Q9Descriptor>*’ in initialization

Does anyone have any insight as to what might be going on? Also, what needs to be converted?


The descriptor describes the lattice you are using. In the present example, there are two lattices (one for each fluid component), each of which has a D2Q9 neighborhood and an external force term, representing the influence of the other component. Therefore, ForcedD2Q9 is the only appropriate descriptor, and this should not be modified.

Boundary conditions are implemented independently of the lattice descriptor, and you should be able to use them right away. There is no need to change the lattice descriptor. Did you observe any problem using addPressureBC or addVelocityBC with the ForcedD2Q9 lattice?

Feel free to post your code on the community Wiki if you’d like other people in the community to comment on your approach.