Chapter 18: File Management and Files

Go to the Next Chapter
Go to the Previous Chapter
Go to the Table of Contents for This Manual
Go to the Guides Master Index

Chapter 1 * Chapter 2 * Chapter 3 * Chapter 4 * Chapter 5 * Chapter 6 * Chapter 7 * Chapter 8 * Chapter 9 * Chapter 10 * Chapter 11 * Chapter 12 * Chapter 13 * Chapter 14 * Chapter 15 * Chapter 16 * Chapter 17 * Chapter 18 * Chapter 19


18.1 File Management Overview

The ANSYS program uses files extensively for data storage and retrieval, especially while solving an analysis. The files are named filename.ext, where filename defaults to the jobname, and ext is a unique two- to four-character value that identifies the contents of the file. The jobname is a name you can specify while entering the ANSYS program (using the /FILNAME command (Utility Menu>File>Change Jobname) after entering the program. If you specify no jobname, it defaults to FILE (or file).

Note-File names (both jobname and extension) may be lowercase on some systems. For example, if the jobname is "bolt," you may have files at the end of an ANSYS analysis which could include:

bolt.db

Database file

bolt.emat

Element matrices

bolt.err

Error and warning messages

bolt.log

Command input history

bolt.rst

Results file

Tables 18-1 and 18-2 show a list of files written by the ANSYS program. Files that are generated and then deleted sometime before the end of the ANSYS session are called temporary files (Table 18-1). Files that remain after the ANSYS session are called permanent files (Table 18-2).

18.2 Changing the Default File Name

When you activate the ANSYS program, you can change the default jobname from file or FILE to a name that is more meaningful. To do so, activate the program as follows:

ansys55 -j newjobname
The value -j (or -J) is an option indicating that a new jobname, newjobname, follows. Once this command executes, all ANSYS files produced during this run will have a filename of newjobname.ext.

Note-If an ANSYS job is running in the background, do not execute the ANSYS program interactively in the same directory unless you use a different jobname.

18.3 Sending Output to Screens, Files, or Both

One of the files commonly referred to throughout the ANSYS documentation set is the output file (Jobname.OUT). If you are running on a UNIX system and you want to send ANSYS output only to the screen, select Interactive from the launcher. When the Selected Product dialog box appears, select Screen only. The output "file" will be your ANSYS output window. If you choose Screen and File, then an actual text file called Jobname.OUT will also be written in your current working directory.

Windows systems do not support the Screen and File option. On Windows systems, enter the program using the displayW5X icon, and direct the output to a specified file.

18.4 Text Versus Binary Files

Depending on how files are used, the program writes them in text (ASCII) form or binary form. For example, ERR and LOG files are text, while DB, EMAT, and RST files are binary. In general, files that you may need to read (and edit) are written in text form, and all other files are written in binary form.

Binary files may be of external or internal type. External binary files are transportable between different computer systems. Internal binary files are usable only by the computer hardware system on which they were written and cannot be transported . By default, all ANSYS-saved binary files are of external type. You may change them to internal type using either of the following:

Command(s):

GUI:

Utility Menu>File>ANSYS File Options

You cannot change the database file (Jobname.DB) or the results file (Jobname.Rxx) to internal type.

Below are some tips for using binary files:

Warning: Binary files are not backward compatible to previous releases of the ANSYS program. For example, you cannot use binary files produced by ANSYS 5.5 with release ANSYS 5.4 or earlier. Attempting to use binary files from later releases with an earlier release can cause serious operating problems in ANSYS. For a list of the files that are upwardly compatible, see Table 18-2.

18.4.1 ANSYS Binary Files over NFS

You can access ANSYS binary files (for example, file.TRI, file.DB, file.RST) from NFS-mounted disk partitions. However, this usage is discouraged because heavy network traffic may result. Also, network traffic may cause NFS errors, which in turn can cause the ANSYS program to read or write an ANSYS binary file incorrectly.

18.4.2 Files that ANSYS Writes

The following table lists the permanent files that ANSYS writes.

Table 18-1 Temporary files written by the ANSYS program

Identifier

Type

Contents

ANO

Text

Graphics annotation commands [/ANNOT]

BAT

Text

Input data copied from batch input file [/BATCH]

DOn

Text

Do-loop commands for nesting level n

DSCR

Binary

Scratch file (ANTYPE=2, Modal Analysis)

EROT

Binary

Rotated element matrices

LSCR

Binary

Scratch file (ANTYPE=4, Mode Superposition)

LV

Binary

Scratch file from substructure generation pass with more than one load vector.

MASS

Binary

Compressed mass matrix for modal analysis (subspace method)

MMX

Binary

Work matrix for modal analysis (subspace method)

PAGE

Binary

Page file for ANSYS virtual memory (database space)

PCS

Binary

Scratch file for PCG solver

PCn

Binary

Scratch file for PCG solver (n = 1 to 10)

SCR

Binary

Scratch file for Jacobi Conjugate Gradient solver

SSCR

Binary

Scratch file from substructure generation pass

Many of the permanent ANSYS files are upwardly compatible. Files that generally can be used by future releases of ANSYS have a Y in the Upward column.

Table 18-2 Permanent files written by the ANSYS program

Identifier

Type

Upward

Contents

BDB

Binary

-

Database for best design (optimization) [OPKEEP]

BFIN

Text

-

Interpolated body forces written as BF commands [BFINT]

BRFL

Binary

-

FLOTRAN results file for best design (optimization) [OPKEEP]

BRMG

Binary

-

Magnetic results file for best design (optimization) [OPKEEP]

BRST

Binary

-

Structural results file for best design (optimization) [OPKEEP]

BRTH

Binary

-

Thermal results file for best design (optimization) [OPKEEP]

CBDO

Text

-

Interpolated DOF data written as D Commands [CBDOF]

CDB

Text

Y

Text database file [CDWRITE]

CMAP

Text

-

Color map file

CMD

Text

Y

Commands written by *CFWRITE

DB

Binary

Y

Database file [SAVE, /EXIT]

DBE

Binary

-

Database file from VMESH failure in batch mode

DBG

Text

-

FLOTRAN "debug" file (contains solution information)

DSUB

Binary

Y

Superelement DOF solution from use pass

ELEM

Text

Y

Element definitions [EWRITE]

EMAT

Binary

Y

Element matrices

ERR

Text

-

Error and warning messages

ESAV

Binary

Y

Element saved data
Note-ESAV files created by nonlinear analyses may not be upwardly compatible.

FATG

Text

-

Fatigue data [FTWRITE]

FULL

Binary

-

Assembled global stiffness and mass matrices

GRPH

Text

Y

Neutral graphics file

IGES

Text

Y

IGES file from ANSYS solid model data [IGES]

LGW

Text

Y

Database command log file [LGWRITE]

Lnn

Binary

Y

Load case file (where nn = load case number) [LCWRITE]

LOG

Text

Y

Command input history

LOOP

Text

-

Optimization looping file

MCOM

Text

Y

Mode combination commands from spectrum analysis [MCOMB]

MODE

Binary

Y

Modal matrices (modal or buckling analysis)

MP

Text

Y

Material property definitions [MPWRITE]

NODE

Text

Y

Node definitions [NWRITE]

OPO

Text

-

ANSYS output for last optimization loop

OPT

Text

-

Optimization data

OSAV

Binary

-

Copy of ESAV file from last converged substep

OUT

Text

-

ANSYS output file

PARM

Text

Y

Parameter definitions [PARSAVE]

PFL

Text

-

FLOTRAN printout file

PSD

Binary

-

PSD file (modal covariance matrices, etc.)

RDF

Text

-

FLOTRAN residual file [FLDATA,OUTP]

RDSP

Binary

-

Reduced displacements

REDM

Binary

-

Reduced structure matrix

RFL

Binary

Y

FLOTRAN results file

RFRQ

Binary

-

Reduced complex displacements

RMG

Binary

Y

Results file from magnetic field analysis

RST

Binary

Y

Results file from structural and coupled-field analyses

RSW

Text

-

FLOTRAN "wall" results file

RTH

Binary

Y

Results file from thermal analysis

RUN

Text

-

FLOTRAN run data

SELD

Binary

Y

Superelement load vector data from generation pass

Snn

Text

Y

Load step files (where nn = load step number) [LSWRITE]

SORD

Text

-

Superelement name and number from use pass

STAT

Text

-

Status of an ANSYS batch run

SUB

Binary

Y

Superelement matrix file from generation pass

TB

Text

Y

Hyperelastic material constants [*MOONEY]

TRI

Binary

-

Triangularized stiffness matrix

USUB

Binary

Y

Renamed DSUB File for input to substructure expansion pass

XBC

Text

-

FLOTRAN boundary condition data (ANSYS to FLOTRAN)

XGM

Text

-

FLOTRAN geometry data (ANSYS to FLOTRAN)

XIC

Text

-

FLOTRAN initial condition data (ANSYS to FLOTRAN)

18.5 Reading Your Own Files into the ANSYS Program

In many situations, you will need to read in your own files while using the ANSYS program. The file may be a text file of ANSYS commands or a binary file of ANSYS data.

Use the /INPUT command (Utility Menu>File>Read Input from) to read in a text file containing ANSYS commands. For instance, you can read in the log file (Jobname.LOG) from a previous ANSYS session. For example, the following command causes the ANSYS program to read the file MATERIAL.INP from the current directory.

/INPUT,MATERIAL,INP
Table 18-3 lists other commands that you can use to read in text files.

Table 18-3 Commands for reading in text files

Command

GUI Menu Path

Purpose

*USE

Utility Menu>Macro>Execute Data Block

Reads in macros

PARRES

Utility Menu>Parameters>
Restore Parameters

Reads in parameters
(Jobname.PARM) files

EREAD

Main Menu>Preprocessor> Create>Elements>Read Elem File

Reads in element
(Jobname.ELEM) files

NREAD

Main Menu>Preprocessor> Create>Nodes>Read Node File

Reads in node (Jobname.NODE) files

MPREAD

Main Menu>Preprocessor> Loads>Other>
Change Mat Props>Read from File


Main Menu>Preprocessor >Material Props>
Read from File


Main Menu>Solution>Other> Change Mat Props> Read from File

Reads in material property
(Jobname.MP) files

Table 18-4 lists GUI paths or commands you can use to read in binary data files.

Table 18-4 Commands for reading in binary files

Command

GUI Menu Path

Purpose

RESUME

Utility Menu>File>Resume from Utility Menu>File>Resume Jobname.DB

Reads in database
(Jobname.DB) files

SET (in the POST1 postprocessor)

Utility Menu>List>Results>Load Step Summary

Reads in results files
(Jobname.RST, Jobname.RTH, Jobname.RMG, Jobname.RFL)

OPRESU (in the OPT processor)

Main Menu>Design Opt>
Resume

Reads in the optimization data file (Jobname.OPT)

18.6 Writing Your Own ANSYS Files from the ANSYS Program

Besides the files that the ANSYS program automatically writes during an analysis, you can also force files to be written as necessary. A commonly used file-write command is /OUTPUT, which allows you to redirect text output from the screen to a file. For example, to redirect POST1 stress printout to a file, the commands would be:

/OUTPUT,STRESS,OUT	! Output to file STRESS.OUT
PRNSOL,COMP	! Component stresses
/OUTPUT	! Output back to screen
GUI equivalents for the /OUTPUT command are:

GUI:

Utility Menu>File>Switch Output to>File
Utility Menu>File>Switch Output to>Output Window

Table 18-5 lists other file-write commands used during an analysis are:

Table 18-5 Other commands for writing files

Command

GUI Menu Path

Purpose

SAVE

Utility Menu>File>Save as

Writes the database to
Jobname.DB

PARSAV

Utility Menu>Parameters>Save Parameters

Writes parameters to
Jobname.PARM

EWRITE

Main Menu>Preprocessor>Create>Elements>
Write Elem File

Writes element definitions to Jobname.ELEM

NWRITE

Main Menu>Preprocessor>Create>Nodes>
Write Node File

Writes node definitions to
Jobname.NODE

MPWRITE

Main Menu>Preprocessor>Loads>Other>
Change Mat Props>Write to File


Main Menu>Preprocessor>Material Props>
Write to File


Main Menu>Solution>Other>Change MatProps>
Write to File

Writes material properties to Jobname.MP

You can also redirect graphics output (plots) from the screen to a neutral graphics file.

18.7 Assigning Different File Names

As mentioned earlier, you can use the /FILNAME command at the Begin level to assign a jobname for all subsequently written files. Use the /ASSIGN command (Utility Menu>File>ANSYS File Options) to assign a different name, extension, and directory to a file. For example, the following command reassigns the element matrix file (identifier EMAT) to MYFILE.DAT in the "save_dir" directory:

/ASSIGN,EMAT,MYFILE,DAT,SAVE_DIR/
The "/" is a delimiter that separates the directory name from the file name. It is system-dependent, so you must use the delimiter(s) appropriate for your system. You can assign only a specific set of files. Refer to the /ASSIGN command description (in the ANSYS Commands Reference) for the complete list.

18.8 Reviewing Contents of Binary Files (AUX2)

The auxiliary processor, AUX2, allows you to print ANSYS binary files in readable format. Use it mainly to verify file formats (for debugging purposes). The output from a "dumped" binary file is unlabeled and must be correlated with known formats documented in the Guide to Interfacing with ANSYS. Be aware, though, that a complete file dump may produce many pages of unnecessary printout. The Format argument on the FORM command (Utility Menu>File>List>Binary Files) allows you to control the amount of output.

18.9 Other File Management Commands

Table 18-6 lists other useful file management commands.

Table 18-6 Additional file management commands and GUI equivalents

Command

GUI Path

Purpose

/COPY

Utility Menu>File>File Operations>Copy

Copy existing binary files from within ANSYS

/CLOG

None

Copy the log file during an interactive ANSYS session

/RENAME

Utility Menu>File>File Operations>Rename

Rename files

/DELETE

Utility Menu>File>File Operations>Delete

Delete files

/FDELE

Utility Menu>File>ANSYS File Options

Delete certain files during a solution run (to save disk space)


Go to the beginning of this chapter