Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Is it possible to extract data from .dat or .out files with python into a csv file?

    • ryma29
      Subscriber

      I have the results of multiple simulations that I didn't do myself. I have .dat, .cas and .out files. I suppose I need to use to .dat files but I am not sure what is really the difference between them. I need to get some field-variables from the files with a python script. I wasn't able so far to do that. Any help would be appreciated.

    • Rob
      Forum Moderator
      In theory, yes. In practice you'll need to figure out what each part of the dat file means. You'll also need to figure out where each data point is. What data are you after?
    • ryma29
      Subscriber
      Is there a documentation how the variables are stored or how the dat file is constructed in fluent? I need to access the velocity in all directions and the pressure.
    • Rob
      Forum Moderator
      I don't think so, https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v221/en/flu_ug/flu_ug_chp_files.html may be of some help. Not helped that some of the file is in binary. There's a TUI option under /file to set the format of .dat (not .dat.h5) to write in non-binary. How readable that is will depend on the size of the model: try it with something small.
      However, for the above you may find it's quicker to open case & data and export an ASCII format file of just position, velocity components and pressure. Far less data to try and figure out!
      File-Export-Solution Data



Viewing 3 reply threads
  • The topic ‘Is it possible to extract data from .dat or .out files with python into a csv file?’ is closed to new replies.