I am trying to set the constant pressure boundary condition in the outlet. Then the fluid is not reflected back. I have tried to set the boundary condition sentence as below, but the program did not work like what I want it to do.
Once you have defined your boundary to be off type “pressure boundary”, you need to specify the pressure value you’d like to have on the boundary, using a command of the type
lattice.get(iX,iY).defineRho(rho);
The example programe poiseuille2d illustrates this procedure.
Good luck!
Thank u for your reply! But I was confused that why I need to define Rho.
lattice.get(iX,iY).defineRho(rho)
what I want is to set the constant pressure in the outlet boundary condition, which is the same as environment pressure. Could you please give me some reason and details? Thanks again.
A pressure boundary is a boundary on which you impose the value of the pressure. The actual value of pressure to choose depends on your physical setup.
Hint: As it has been discussed many times on this forum, for example in this thread, it is not the absolute value of pressure which is relevant, but the pressure difference between two points (for example, between inlet and outlet).