I used body force instead of pressure gradient to simulate the fluid flow through a 3D porous medium. The porosity is about 15%. At the solid-fluid surface, the standard bounceback boundary condition was imposed. I found an interesting thing that the average velocity along the flow direction was negative. Are there anyone here can explain this phenomenon? How can I solve this problem? Thanks.
In my implementation, the body force that is equivalent to pressure gradient was added as following,
Yes, I set the value G>0 along the flow direction. Before this, I have validate my implementation with analytical solution of rectangular duct flow. The error is about 0.8% at a resolution of 25 grids. Is the negative average velocity attributed to the bounceback step? In my code, the full-way bounceback is used, as sukop’s example code.
for solid nodes, in the collision step
temp=f (i), f(i)=f(opp(i)), f(opp(i))=temp
fprop(i) = f(i);
This is really strange…
Do you have periodic BC in flow direction?
Is it exactly the same code (up to the boundaries) you have used for Poiseuille flow?