fbpx

Separating DB Database Files from RST File Contents in Ansys Mechanical

How to Separate DB Database Files from RST Files

DB Files & Mechanical APDL Models | Ansys Workbench


When users deal with large Mechanical APDL models, the DB database files and the RST results files can become very large.  However, 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.  Indeed, these 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.

DB-Database-Files-Separation-SimuTech-Group

Input file contents example

Here, 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.

Here, 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.

Finally, the /SYS command at the end lists the working directory contents… this command only works on a Windows system, not LINUX.

fini
/clear,nostart
!
/config,noeldb,1 ! do not write element results into database
/config,NORSTGM,1 ! do not write geometry on results file
/PREP7
ET,1,SOLID185
mp,ex,1,30000000
mp,nuxy,1,.3
BLOCK,,3,,1,,1,
/VIEW,1,1,2,3
LESIZE,all,.25, , , , , , ,1
!*
MSHAPE,0,3D
MSHKEY,1
VMESH,1 ! Mesh the block with SOLID185 bricks
FINISH
!
/SOLU
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
FINISH
!
/POST1
save,myres2,db,,model ! save database without result
set,last ! load a result from the results file
! delete new results file (if it exists)
/sys,del myres2.rst
reswrite,myres2 ! write result to myres.rst
/sys,dir /od

RST Results file Without the Original Database

Occasionally, users have only an RST results file, without the original database.  Additionally, 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:

SimuTech-Separating-DB-Database-Files-from-RST-File-Contents-SimuTech-Group
Separating-DB-Database-Files-from-RST-File-Contents-SimuTech-Group

When the above example is run, the DB database file will not contain a result.  In addition, the RST file written by RESWRITE will not contain the node-and-element model. Now, 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.

Separating DB Database Files | RAPPND Command

Once the file created by the RESWRITE command contains its one result, more results can be written to it by the RAPPND command.  Moreover, 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.  Finally, we hope Separating DB Database Files from RST Files is now easily achievable for Mechanical users.

Most Recent Tips & Tricks