Setting up a zero pressure boundary condition

In Aneurysm case of palabos examples , the outlet boundary condition is :[code=“cpp”]
void setOpenings (
std::vector<BoundaryProfile3D<T,Velocity>*>& inletOutlets,
TriangleBoundary3D& boundary, T uLB, T dx, T dt )
for (pluint i=0; i<openings.size(); ++i) {
Opening& opening = openings[i]; = computeBaryCenter (
boundary.getInletOutlet(openingSortDirection)[i] );
opening.innerRadius = computeInnerRadius (
boundary.getInletOutlet(openingSortDirection)[i] );

    if (opening.inlet) {
        if (poiseuilleInlet) {
            inletOutlets.push_back (
                    new PoiseuilleProfile3D<T>(uLB) );
        else {
            inletOutlets.push_back (
                    new VelocityPlugProfile3D<T>(uLB) );
    else {
      inletOutlets.push_back (
                new DensityNeumannBoundaryProfile3D<T> );


I was wondering if i can change the outlet boundary condition to zero pressure boundary condition, I tried bunch of stuff in tutorial section about boundary conditions and they all failed ,

The usage of these boundary conditions is somewhat tricky, because Palabos needs to know if a given wall is a straight wall or a corner (2D), or a flat wall, an edge or a corner (3D), and it needs to know the wall orientation. To simplify this, all OnLatticeBoundaryConditionXD objects have a method setVelocityConditionOnBlockBoundaries and a method setPressureConditionOnBlockBoundaries, to set up boundaries which are located on a rectangular domain. If all nodes on the boundary of a given 2D box boundaryBox implement a Dirichlet condition, use the following command:

Box2D boundaryBox(x0,x1, y0,y1);
boundaryCondition->setVelocityConditionOnBlockBoundaries (
lattice, boundaryBox, locationOfBoundaryNodes );

setBoundaryDensity(lattice, lattice.getBoundingBox(), 1. );

The second command is a bit further into the user guide. 
aneurysm case as you know uses a stl file , is it possible to set up zero pressure boundary condition for the outlet ?

I tried to set the pressure constant with Rho=1 with FluidPressureOutlet3d mentioned here :


i get this result : 

python …/…/…/scons/ -j 6 -f …/…/…/SConstruct palabosRoot=…/…/… projectFiles=“pipeflow3d.cpp” optimize=true debug=true profile=false MPIparallel=true SMPparallel=false usePOSIX=true serialCXX=g++ parallelCXX=mpicxx compileFlags="-Wall -Wnon-virtual-dtor" linkFlags="" optimFlags="-O3" debugFlags="-g" profileFlags="-pg" libraryPaths="" includePaths="" libraries=""
scons: Reading SConscript files …
scons: done reading SConscript files.
scons: Building targets …
mpicxx -o pipeflow3d.o -c -Wall -Wnon-virtual-dtor -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/home/at8i/workspace/palabos/src -I/home/at8i/workspace/palabos/externalLibraries pipeflow3d.cpp
pipeflow3d.cpp: In function ‘void setOpenings(std::vector<plb::BoundaryProfile3D<double, plb::Array<double, 3ul> >*>&, plb::TriangleBoundary3D&, T, T, T)’:
pipeflow3d.cpp:130:25: error: expected type-specifier before ‘FluidPressureOutlet3d’
new FluidPressureOutlet3d(T,DESCRIPTOR,(T) 1., Array<T,3>((T) 0.,(T) 0.,(T) 0.))
scons: *** [pipeflow3d.o] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2


the DensityNeumannBoundaryProfile3D boundary condition at the outlet, implements a “zero pressure” boundary condition. What it does, among other things, is that it imposes a constant density of 1 (in the lattice Boltzmann sense), which is equivalent to a constant pressure (taking under consideration a pressure offset).


Thanks for your immediate response Dmitris

Hi at8i,

I am interested with your topic.
Can I get the example of coding which can setting up the zero pressure?