Flow through Kelvin foam cell

Hello everyone,

I am a student and currently working on a project thesis, where I have to simulate the flow of an incompressible media through a single ideal Kelvin foam cell. The STL geometry is symetric for each direction and the solid structure parts end at the edges of the STL geometry, which leaves “open” strucutre parts at the systems edges too. For y- and z-direction there schould be periodic boundaries implemented and in x-direction pressure boundary conditions.

For this case I started customising the code (Palabos 0.7) for the example “readSTL” to my needs. So far I have just added the STL geometry and changed the boundary conditions as follows:

void defboundaryconditions (MultiBlockLattice3D<T,Descriptor>& lattice, plint N )

OnLatticeBoundaryCondition3D<T,Descriptor>* boundaryCondition = createLocalBoundaryCondition3D<T,Descriptor>();

const T gradP = 1.0e-3;


Box3D inlet( (plint)(0), (plint)(1), (plint)(1), (plint)(N-1), (plint)(1), (plint)(N-1) );
Box3D outlet( (plint)(N-1), (plint)(N), (plint)(1), (plint)(N-1), (plint)(1), (plint)(N-1) );

boundaryCondition->addPressureBoundary0N(inlet, lattice);

boundaryCondition->addPressureBoundary0N(outlet, lattice);

initializeAtEquilibrium(lattice, lattice.getBoundingBox(), (T)1., Array<T,3>(0.,0.,0.) );


This caused a compiling error that vanished after removing the periodic boundary conditions. After the new code was compiled I received the following error message after starting the programm:

Versuch3: /home/frank1/Programme/palabos-v0.7r3/src/libraryInterfaces/CVMLCPP_treeReader3D.hh:54: void plb::convertToMatrix3D(cvmlcpp::DTree<T, 3u>, plb::ScalarField3D&, plb::plint) [with T = int, U = bool, plb::plint = int]: Assertion `result.getNx() == (1 << height)+2*envelopeWidth’ failed.
[Frank1:02754] *** Process received signal ***
[Frank1:02754] Signal: Aborted (6)
[Frank1:02754] Signal code: (-6)
[Frank1:02754] [ 0] [0xb771740c]
[Frank1:02754] [ 1] /lib/i386-linux-gnu/libc.so.6(abort+0x17e) [0xb732734e]
[Frank1:02754] [ 2] /lib/i386-linux-gnu/libc.so.6(__assert_fail+0xf8) [0xb731c888]
[Frank1:02754] [ 3] ./Versuch3(_ZN3plb18dynamicsFromOctreeIdNS_11descriptors15D3Q19DescriptorEEEvRNS_19MultiBlockLattice3DIT_T0_EERNS_12TreeReader3DIiEEPNS_8DynamicsIS4_S5_EEb+0xaac) [0x8135b8c]
[Frank1:02754] [ 4] ./Versuch3(main+0x179) [0x80fc179]
[Frank1:02754] [ 5] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0xb730fe37]
[Frank1:02754] [ 6] ./Versuch3() [0x80f5171]
[Frank1:02754] *** End of error message ***

Is it possible to implement the case as I would wish to, exspecialy with periodic boundaries? Have „open“ parts of the STL structure to be surrounded by solid parts to be able to define boundary conditions as in the example? Can someone please help me?


Forgot to mention: Used the sparse domein creation.

Dear Frank,

The code for handling STL meshes and generating the geometry was completely rewritten as of Palabos version 1.0. I think you should download the latest version and give it a try. An example on how to read STL files can be found in examples/aneurysm.