Changing Boundary Condition Values

Hello,

I am fairly new to Palabos and C++ and I am trying to modify the “fullDomainFromSTL” code so that the pressure varies sinusoidally with time. I can update the value on the inlet boundary each iteration with “setBoundaryDensity”, however it doesn’t seem affect the rest of the domain as if I start with a value of zero for the pressure gradient everything remains zero except for the inlet, which the output image shows at a higher density. Does anyone have any idea why this might be?

Thanks in advance for any help.

Alex

Hi,
Two explanations I can think of:

  1. You’ve forgotten to specify that the inlet nodes implement a pressure boundary condition. Before you start the simulation, you need to execute a line of the kind “boundaryCondition->setPressureConditionOnBlockBoundaries(lattice, inlet)”.
  2. The density value which you provide as an argument to “setBoundaryDensity” is not appropriate. It should vary around 1, and the oscillation should not be too fast (depending on the size of the system, an appropriate time period ranges from a few hundred to millions of time steps).