Format of bi4 binary data files

I would like to create a Python script that postprocesses the simulation data. Seen the big problem sizes, it would be quite handy to read the data directly from the bi4 binary files. To do so, I would want to know the rules the data have been saved on these binary files with.

I have searched around the forum and the guide, but I cannot seem to find positive information on the bi4 format (directions welcome at any time).
I understand this is what programs such as PartVTK4, ToVTK (4.3) and the like do. Another option is then to reverse-engineer the source code.

To this end and with some time savings in mind, would you please indicate the source files where these write/read rules can be retrieved? Then I will move on from this information.

Corrections and directions welcome. Thanks in advance for helping me out.

Kindly, Giordano

Comments

  • Just to add to your comment Giordano - I have been having the same thoughts lately, especially since there is like 6 times difference in csv and bi4 file size. I haven't had any succes either but I've been able to view it a bit more clearly using https://www.fileformat.info/tool/hexdump.htm (upload any random bi4 file).

    If you get deeper into the problem I would love to hear more, I mostly use Matlab, but still would be interested in seeing a Python solution.

    Hope someone can guide you to the right place
  • Other option is also to look into DualSPHysics code to check the functions that write the output bi4 files to undestand their format and information:
    "SaveData" and "SavePartData" in JSph.cpp

    Regards
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!