3.1.5. Reading and Writing Compressed Files

For more information, see the following sections:

3.1.5.1. Reading Compressed Files

You can use the Select File dialog box to read files compressed using compress or gzip. If you select a compressed file with a .Z extension, ANSYS Fluent automatically opens zcat to import the file. If you select a compressed file with a .gz extension, Fluent opens gunzip to import the file.

For example, if you select a file named flow.msh.gz, Fluent reports the following message indicating that the result of the gunzip is imported into ANSYS Fluent via an operating system pipe.

 Reading "\"| gunzip -c \"Y:\flow.msh.gz\"\""...

You can also type in the file name without any suffix (for example, if you are not sure whether or not the file is compressed). First, Fluent attempts to open a file with the input name. If it cannot find a file with that name, it attempts to locate files with default suffixes and extensions appended to the name.

For example, if you enter the name file-name, Fluent traverses the following list until it finds an existing file:

  • file-name

  • file-name.gz

  • file-name.Z

  • file-name. suffix

  • file-name. suffix .gz

  • file-name. suffix .Z

where suffix is a common extension to the file, such as .cas or .msh. Fluent reports an error if it fails to find an existing file with one of these names.


Note:  In addition to .gz and .Z compression, ANSYS Fluent can also handle .bz2 compressed files.



Important:
  • For Windows systems, only files that were compressed with gzip (that is, files with a .gz extension) can be read. Files that were compressed with compress cannot be read into ANSYS Fluent on a Windows machine.

  • Do not read a compressed ray file; ANSYS Fluent cannot access the ray tracing information properly from a compressed ray file.


3.1.5.2. Writing Compressed Files

You can use the Select File dialog box to write a compressed file by appending a .Z or .gz extension onto the file name.

For example, if you enter flow.gz as the name for a case file, Fluent reports the following message:

 Writing "| gzip -cfv > Y:\flow.cas.gz"...

The status message indicates that the case file information is being piped into the gzip command, and that the output of the compression command is being redirected to the file with the specified name. In this particular example, the .cas extension is added automatically.


Note:  In addition to .gz and .Z compression, ANSYS Fluent can also handle .bz2 compressed files.



Important:
  • For Windows systems, compression can be performed only with gzip. That is, you can write a compressed file by appending .gz to the name, but appending .Z does not compress the file.

  • Do not write a compressed ray file; ANSYS Fluent cannot access the ray tracing information properly from a compressed ray file.

  • To compress parallel data files (that is, files saved with a .pdat extension), you must use asynchronous file compression. (For details, see Reading and Writing Case and Data Files).



Release 18.2 - © ANSYS, Inc. All rights reserved.