Skip to content

Extract velocity, pressure, and density data on lattices without interpolation

Due to recent bot attacks we have chanced the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.

Forums on OpenLB General Topics Extract velocity, pressure, and density data on lattices without interpolation

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #7114
    jjessberger
    Participant

    Writing point data for each point with CSVwriter, then you have to perform the iteration over the points yourself. It will be slow because of a lack of parallelization. Cf. e.g. examples laminar/poiseuille2d where this is done for a plot-over-line with GnuplotWriter (it works similar + creates a Gnuplot plot).

    Vtm files that contain point coordinates + functor data are written by the SuperVtmWriter – this is originally intended for Paraview visualization but you can as well use the datafiles for your own purpose. It includes a parallelized iteration over the lattice points. This is what I’d recommend to use. It’s simpler to run a postprocessing script over the vtm files than to create the output completely on your own.

    Since it is made for HPC application, the design for storing the data is rather complex. Well, in the end it all breaks down to arrays. Each BlockLattice holds data (at least provides an interface) to the nodes in that cuboid. If you’re eager, you can have a deep look into what this class does…

    #10305
    danial
    Participant

    This might be a bit late to answer but what I found useful when trying to get the data in CSV format in the lattice points and not interpolated points, is to just let OpenLB dump the data into pvd/vtm/vti regularly, then use VTK library in python to read the vti data into numpy arrays. There will be some overlapping points from the MPI tiles and if you need to remove those overlapping points and just end up with unique lattice points that needs another step of processing. The method mentioned in this thread looks interesting though because it doesn’t need python & VTK and can be done within OpenLB c++ codes itself, I should give it a try.

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.