Separating ANSYS DB Database File Contents from RST Results File Contents
When users deal with large Mechanical APDL models, the DB database files and the RST results files can become very large. Even if the RST results file contains only one solution, a very large database size can result when node-and-element data is included by default.
There are two /CONFIG commands in ANSYS that (1) prevent element (derived) results from being included in the in-memory database, and (2) prevent node-and-element data from being included in the RST results file. They are executed from the BEGIN level in ANSYS, and would typically be used before any SOLVE command:
/CONFIG,NOELDB,1 ! do not write element results into database
/CONFIG,NORSTGM,1 ! do not write geometry on results file
On rare occasions, a user may want to write a single result into a results file for future use. The /POST1 command RESWRITE file can do this. The above /CONFIG command for the results file will keep the written file smaller by eliminating the node-and-element data from the results file.
The following input file generates an example. A /CONFIG command prevents writing derived element data (stress, strain, etc) to the in-memory database. Degree of freedom data is written. Another /CONFIG command prevents the node-and-element model from being written to the results file during SOLVE. The in-memory results database RAM requirement is therefore smaller, as is the RST results file.
The SAVE command below uses the MODEL argument so that the DB database file does not contain a result. This minimizes the file size.
The RESWRITE command will fail if the SET command is not used, because RESWRITE requires the in-memory database to contain a solution.
The /SYS command at the end lists the working directory contents... this command only works on a Windows system, not LINUX.
/config,noeldb,1 ! do not write element results into database
/config,NORSTGM,1 ! do not write geometry on results file
LESIZE,all,.25, , , , , , ,1
VMESH,1 ! Mesh the block with SOLID185 bricks
DA,5,ALL, ! Fix LH End
SFA,4,1,PRES,1234 ! Pressure on top
outres,all,all ! Optional control for RST details
solve ! Solve the model
save,myres2,db,,model ! save database without result
set,last ! load a result from the results file
! delete new results file (if it exists)
reswrite,myres2 ! write result to myres.rst
Occasionally, users have only an RST results file, without the original database. The /POST1 command FILE can be used to refer to the results file, and the SET command can read in a solution plus the node-and-element data, if it exists, as by default. With the commands above, the results file will not contain node-and-element data, and the SET command will fail with the following messages:
When the above example is run, the DB database file will not contain a result, and the RST file written by RESWRITE will not contain the node-and-element model. The two files will be smaller than default files, but must both be kept by a user if the result is to be reviewed in the future.
Once the file created by the RESWRITE command contains its one result, more results can be written to it by the RAPPND command once the new results file has been specified by the /POST1 command FILE, for example:
FILE,MYRES2,RST ! Specify results file
SET,LIST ! List the contents
RAPPND,2,2 ! Write currently loaded result as Load Step 2, Time 2
SET,LIST ! Inspect the modified contents
In this way, a user can control which results of interest are included in an RST results file.