One of the most common questions on XANSYS, and a common tech support question for us is: “Is there any way to make my result file smaller?” In fact, we just got a support call last week on that very topic. So we thought it would be a good topic for The Focus, and besides the standard quick answer, we can go a bit deeper and explain why.
Why so Big?
The first thing you need to understand is why the result file is so big. One of the fundamental strengths of the ANSYS solver, back to the days when John Swanson and his team were writing the early versions, is that the wealth of information available from an FEA solution is not hidden from the user. They took that approach that whatever can be calculated will be calculated so the user can get to it without having to solve again. Most other tools out there do the most common calculations, average them, and then store that in the results file.
If you go back to your FEA fundamentals and take a look at our sample 2D mesh, you will quickly get an Idea of what is going on.
When an FEA mesh is solved, the program calculates the Degree of Freedom results (DOF) at each integration point in each element. For most meshes that is at the corner of each element. This DOF solution is then used to calculate the derived values, usually stress and strain, for each node based upon the solution at the integration points for each element. Then, during post processing, the user decides how they want to average those element
So the stress in the X direction for Node 2 in our example is different for element 1 and element 2. Element 1 uses the results it calculated with the elements shape function to get stresses and strains for node 2, and element 2 does the same thing.
Now most programs, they average these value at solve time and either store an element average, or a nodal average. But ANSYS does not. It stores the values for each node on each element in its results file.
By default, node 5 in our example will be stored four times in the ANSYS RST file, and each instance will contain 12 result items for a linear run (SX, SY, SXY, S1, S2, S3, SINT, SEQV, EPELX, EPELY, EPELXY, EPELEQV) and even more for 3D, non-linear, and special capability elements.
And Now if you want, let’s digress into the nitty gritty: You can actually see what is in the RST file because ANSYS Mechanical APDL has awesome documentation. Modern programs don’t even come close to level of detail you can find in the ANSYS MAPDL help. Go to the Mechanical APDL in the help and them the path: // Programmer’s Manual // I. Guide to Interfacing with ANSYS // 1. Format of Binary Data Files // 1.2. Description of the Results File. Look at the file format in section 1.2.3. Lots of headers and such, but if you take the time to study it you will be able to see how much space each type of thing stored in the result file uses. First is stores model information. Everything that describes the model but the geometry and loads. If you scroll down to the “Solution data header” (use find to jump there) you have the actual results. This is the big part. Scroll down past the constants to the NSL, or the node solution list: C * NSL dp 1 nnod*Sumdof The DOF Solution for each node in the nodal coordinate system. This says that the size of this record is the number of nodes (nnod) times the number of Degrees of Freedom (Sumdof). So for a structural solid model with 10,000 nodes and only UX, UY, and UZ DOF’s, it would be 30,000 double precision numbers long. After the DOF solutions we have velocity, acceleration, reaction forces, masters, and then boundary conditions and some loads. Even some crack tip info. Then comes the big part. The Element solution information. Take a look at it. You have miscellaneous data, element forces. ETABLE type data, etc… Then there is the ENS record, the Element Nodal Component Stresses. The size is marked as “varies” because there are so many variables that define how big this record is. Read the comments. It is long but goes into explaining the huge amount of information stored here. Study this and you will know more than you ever wanted to about what is in the RST file!. |
Storing all of this information is the safest option. Everything a user might need during post processing is stored so that they do not have to rerun if they realize they need some other bit of information. But, as is usual with MAPDL, the user is given the option to change away from those defaults, and only store what they want. OUTRES really is your friend.
You Are in Control: OUTRES
OUTRES is a unique command. It is cumulative. Every time you issue a command it adds or removes what you specify from what is stored in the RST file. The basics of the command are shown in the table below, and more info can be found in the online help. Use OUTRES, STAT to see what the current state is at any point. Always start with OUTRES, ERASE to make sure you have erased any previous settings, including the defaults.
Remember that this command affects the current load step. The settings get written to the load step file when you do an LSWRITE. So if you have multiple load steps and you want the same for each, set it on the first one and it will stay there for all the others. But if you want to change it for a given load step, you can.
If you are a GUI person you can access this from four different branches in the menus:
Main Menu>Preprocessor>Loads>Analysis Type>Sol’n Controls>Basic
Main Menu>Preprocessor>Loads>Load Step Opts>Output Ctrls>DB/Results File
Main Menu>Solution>Analysis Type>Sol’n Controls>Basic
Main Menu>Solution>Load Step Opts>Output Ctrls>DB/Results File
The first thing to play with on the command is the first argument: Item.
The default is to write everything. What we recommend is that for most runs, using OUTRES, BASIC is good enough. It tells the program to store displacements, reaction forces, nodal loads, and element stresses. The big thing it skips are the strains. Unless you are looking at strains, why store them. Same with the MISC values. Most users don’t ever access these.
The next thing you can use to reduce file size is to not store the results on every element. Use the Cname argument to specify a component you want results for. Maybe you have a huge model but you really care about the stress over time at a few key locations. So use a node and element components to specify what results you want for which components. Note, you can’t use ALL, BASIC or RSOL for this option. You need to specify a specific type of result for each component. Remember, the command is cumulative so use a series of OUTRES commands to control this.
OUTRES, Item, Freq, Cname ITEM Freq
Cname
|
Use What Works for You
The help on the OUTRES command has a nice example where the user specifies different solutions for different sub steps. Check it out to get your head around what is happening: // Command Reference // XVI. O Commands // OUTRES
Next time you run a small but typical model for you, play with the options. Most of the time when I have a lot of load steps or a large model, I use the following in my input deck:
OUTRES,ERASE
OUTRES,BASIC
Sometimes I only care about surface stresses so they use (of course last can be replaced with all or any other frequency):
NSEL,s,ext
ESLN,S,0
CM,nxtrnl,node
CM,extrnl,elem
OUTRES,erase
OUTRES,nsol,last,nxtrnl
OUTRES,strs,last,extrnl
OUTRES,nload,last,extrnl
OUTRES,stat