CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Reading Fluent gzip-compressed files to ParaView (https://www.cfd-online.com/Forums/paraview/135695-reading-fluent-gzip-compressed-files-paraview.html)

larsschwarzer May 16, 2014 10:13

Reading Fluent gzip-compressed files to ParaView
 
Hello everyone,
I've recently started working with ParaView to post-process my Ansys Fluent calculations. As my overall memory space is limited, I want to save my result files in compressed form (i.e., cas.gz and dat.gz). I have tried to read these into ParaView, but ParaView fails to find the corresponding data-file of the pair and ultimately crashes. A short example: There are two files named

my_file_name.cas.gz
my_file_name.dat.gz

I can select 'my_file_name.cas.gz' through the ParaView GUI, and it will recognize the file to be a Fluent file (appropriate reader is selected). ParaView will then go busy for several minutes and finally crash. In serial mode, there is no error message. I have tried parallel mode as well, which at least gives me an obscure message somewhere along the lines that there is no .dat-file.

Is there any way to force ParaView to invoke gunzip when reading the files? It works fine with the uncompressed files ('my_file_name.cas' and 'my_file_name.dat'), which I do not want to save permanently, though (disk space!).

The whole idea is to 'streamline' my workflow and not have to maintain a compressed and uncompressed file side by side, or have to manually unzip the file, e.g. by Fluent, post-process and then delete the file again. (I'm doing case studies and frequently have to re-evaluate older solutions in the light of new results)

I've checked this Forum, the greater Internet and the manual to no success. Any help on solutions (or workarounds) is appreciated.

Thanks and enjoy your weekend,
Lars

(Program versions: ParaView 4.1.0, Fluent 14.5.7)

wyldckat May 16, 2014 16:20

Greetings Lars and welcome to the forum!

Knowing which Operating System you're using would help, as ways to get around these kinds of issues can depend on the OS you're using.

For example, on Linux:
  • You could use a shell script (Bash or even Python) for unpacking the files to a temporary work folder, open them in ParaView and when ParaView closes, the script would delete the temporary folder.
  • You could use a specific FUSE module for opening files on the fly, as if they were uncompressed.
On Windows:
  • You could use a batch file or a Powershell script, to do the same as it was done in Linux with a shell script.
  • There might still be a solution similar to a FUSE module for Windows, where ZIP files are accessed on-the-fly as if they were USB drives.


If you need a more OS-agnostic way of doing this, for example, directly in ParaView, then it might get a bit tricky. This is because ParaView does not support uncompressing on-the-fly, unless the file format itself has an internal compression option. The way to try and do this would be to use a "Programmable Source" (see the "Sources" menu), coded in Python. This would essentially unzip the file, open with the dedicated reader and then erase the temporary file once the data was read into RAM. The complexity increases if you have transient data spread across several files...


Therefore, the remaining question is: which solution do you want to go with?

Best regards,
Bruno

larsschwarzer May 19, 2014 12:28

Hi Bruno,
thanks for answering! I'm using a Windows desktop/work station for post-processing. For now, it's all steady-state data.

The on-the-fly solutions sound neat, although the idea with a batch or script file might also do the trick. All I am trying to do is to avoid having to sit in front of my computer, press a few buttons, wait, press some other buttons, wait again, etc., etc.

If I get around to try some of your ideas this week, I'll post the results here.

Thanks,
Lars

cfdan August 4, 2014 22:55

  1. extract both .gz files
  2. rename them into my_file_name.cas and my_file_name.dat
  3. open my_file_name.cas as fluent case file

larsschwarzer August 8, 2014 04:12

Hi cfdan,
thanks for your suggestion. That's more or less what I was doing before, but I was trying to avoid keeping the compressed and uncompressed files or creating a new uncompressed file every time I want to return to post-processing.

Recently, my supervisor made me drop the issue because other problems were more urgent. I'll try to get back to the topic, though, whenever I can spare a few minutes.


All times are GMT -4. The time now is 11:58.