Skip to content

Voxel Image of Arbitrary Geometries

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Voxel Image of Arbitrary Geometries

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6330
    Rishabh
    Participant

    Dear Developers,
    I have developed a program to create the voxel image of arbitrary geometries (printed out as .vti files). By arbitrary geometries, I mean that they are all in the binary STL format, but they are not general shapes like spheres or cuboids, but complex geometries like for example an owl or an airfoil wing.
    I would like to test OpenLB’s implementation against mine to measure performance.
    Is there a way to create voxel images of such arbitrary geometries within OpenLB?
    If you have any suggestions/directions, please let me know. I am willing to edit some parts of the code if need be.
    Thanks & Regards.

    Sincerely
    Rishabh Shukla
    Indian Institute of Technology, Jodhpur

    #6332
    Adrian
    Keymaster

    You can load STL files using the STLreader indicator and use it to set material numbers. These material numbers may then be exported to VTK files (see the getResults function for timestep 0 in any of our examples for this part).

    #6346
    Rishabh
    Participant

    Dear Adrian,
    Thank you for your quick response. I performed the above actions to time the voxelization process. However, I wanted to do the same for arbitrary geometries, that are created in SOLIDWORKS 2020 and output in binary stl format.
    Is there an example in the package that allows me to do this? Please let me know if you have any suggestions.
    Thanks & Regards.

    Sincerely,
    Rishabh Shukla
    Indian Institute of Technology, Jodhpur.

    #6354
    Adrian
    Keymaster

    The current STLreader implementation only works for text-encoded STLs, not for binary ones. You can compare e.g. the bifurcation3d examples. In some cases it is helpful to convert them via e.g. Paraview as a manual preprocessing step.

    • This reply was modified 5 months, 1 week ago by Adrian.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.