Postprocessing is a critical step in evaluating a design and in validating the results of an analysis.
After building the model and obtaining the solution, we may wish to answer critical questions such as:
How high are the stresses in the region of interest?
How does the temperature of the part vary with time?
Will the design work when put to use?
Postprocessing allows us to answer such questions.
In MAPDL, two postprocessors are available for reviewing the results.
/POST1, which is a general postprocessor that’s used to review the entire model at one moment in time or frequency.
and /POST26, which is a time-history postprocessor that’s used to review output at specific locations through the time or over a range of frequencies.
In this video, we will discuss
Types of results that we can post-process using APDL
General usage of /POST1, including plot options, element tables, and animations
How /POST26, is typically used
and we’ll demonstrate some of these concepts using structural analysis of a simple Ball Grid Array model subjected to thermal loads.
Let’s get started!
In MAPDL, all results are stored in a single result file that contains multiple result sets such as results for multiple time or frequency points, so we only have to worry about a single results file that is used in /POST1 or /POST26.
Usually, MAPDL looks for a result file with the file name same as the jobname.
It automatically reads the result file appropriate for type of analysis, for instance jobname.rst for structural results or jobname.rth for thermal results.
If we wish to read in a file with different filename the ‘FILE’ command is used within /POST1 or /POST26 to refer to a different filename.
The MAPDL solver calculates two types of result data:
Primary results data
and Derived results data.
In finite element methods, the global matrix is assembled, and degrees of freedom are calculated at each node.
Primary result data consist of these degree-of-freedom solutions, such as:
Displacements in a structural analysis
Temperatures in a thermal analysis
or Pressures in an acoustic analysis
There may also be additional degrees of freedom not listed above, based on the element types or physics being solved, such as electrical or magnetic analyses but all such data are called nodal solution in the post-processor.
The derived results are the additional output that are derived from the D.O.F. solution.
Such derived result data includes quantities such as:
Stresses and strains in a structural analysis
Thermal gradients and fluxes in a thermal analysis
Velocity in an acoustic analysis
They are typically calculated at each element’s integration point rather than at the nodes.
Once the derived results are calculated at the element integration points, they may be extrapolated or copied to the nodes for visualization or reporting purposes, as we don’t visualize the integration points directly in the /POST1.
Derived data are also known as element solution data and are typically discontinuous at element boundaries due to the extrapolation from integration points to nodes.
When the derived output is averaged at the nodes, they are referenced as nodal solution data.
Such averaged values, or nodal solution, are lower in magnitude but continuous across element boundaries due to averaging.
The choice of reporting derived solution quantities as unaveraged-Element Solution or averaged-Nodal Solution may be based on your application or a matter of personal preference.
/POST1 is used to review the results of the entire model at a moment in time, or at a frequency or phase angle.
We use /POST1 when we want to perform a detailed investigation over the entire model, such as determining where high-stress regions are.
If we have a linear static analysis with solution available at only one time, then we rely solely on /POST1 to post-process the results.
/POST1 has many capabilities, ranging from simple graphics displays and tabular listings to more complex data manipulations such as load case combinations.
The first step in /POST1 is to read data from the results file into the database with the SET command.
The database should contain the same model for which the solution was calculated, including the element types, nodes, elements, real constants, material properties, and nodal coordinate systems.
Otherwise, a data mismatch can occur.
Now, let us see some of the result validation possibilities of /POST1:
Contour plots show how a result item varies over the model.
The command ‘PLNSOL’ displays nodal solution results as continuous contours.
It can be used for either primary data such as displacement, temperature, or derived data such as stresses and thermal gradients.
Derived solution data are typically discontinuous from element to element, therefore they are averaged at the nodes so that continuous contour lines can be displayed.
One can plot the von Mises stresses as nodal solution that are continuous across element boundaries using the command ‘PLNSOL, S, EQV’.
Alternatively, one can plot elemental solution results as contours that are discontinuous across element boundaries using ‘PLESOL’ command displays.
The valid item and component labels for both the commands can be found in the MAPDL Command reference document.
In addition, one can create vector plots that use arrows to show the variation of both the magnitude and direction of a vector quantity in the model.
All these contour plots could be animated over deformed or undeformed mesh using ANCNTR command.
One can also animate over time range for problems having multiple load steps using ‘ANTIME’ command.
In addition to contour plots one can also use element tables that serve as a tool for performing arithmetic operations among result data.
It results in a single result value per element unlike contour plots, which showcases the variation of results within an element.
Multiple result data can be combined after reading them into the Element table to obtain their sum, difference, product, or quotient.
Some of the commonly used commands are:
ETABLE, which reads results data from the results file into the database.
PRETAB, PLETAB is used to list and contour plot the element table results quantities.
SADD, SMULT, SEXP commands are used to perform arithmetic operations.
Next, let's talk about /POST26.
/POST26 is used to review analysis results as a function of time or frequency at specific locations in the model.
One can generate XY plots, tabular listings, or perform math operations on data sets.
The general process for using the time-history postprocessor is:
Enter the time-history processor (/POST26).
Define time-history variables based on results at specific locations.
Perform any arithmetical operations, if needed, on the variables.
Prepare output via graph plots or tabular listings.
Data can also be exported to APDL arrays for further manipulation or for exporting to a text file.
Defining variables is a two-part operation consisting of defining and storing. We can define up to ten variables by default.
The maximum number can be increased up to 200 using the ‘NUMVAR’ command. TIME or FREQ is always variable#1 and cannot be changed.
Defining a new variable with the same number as an existing variable overwrites the existing variable.
NSOL and ESOL commands specify nodal and element data to be stored from the results file, respectively.
Specific analysis data in the results file can often be processed to yield additional variable sets that provide valuable information.
Some commands identify the variable and the format for the output, while others identify the variable data to be used to create the new variable.
The actual calculations are performed by specific commands such as these:
While we are usually manipulating the calculated finite element results, data can also be imported from a text file into /POST26.
While we are usually manipulating the calculated finite element results, data can also be exported to a text file into /POST26.
Exporting data from a time-history variable into a file is often used and it is a two-step process:
First, export a time-history variable data to an array parameter using *VGET command.
The size of the array can be determined via the *GET command.
Once the array is filled, the data can be written to a file or manipulated further using the commands ‘*CFOPEN’ and ‘*VWRITE’.
After the variables have been defined, one can review them via graph plots or tabular listings.
One can use the ‘PLVAR’ command to plot up to 10 variables at a time.
By default, the variable used for the X-axis of the graph is ‘TIME’ for static and transient analyses or ‘FREQUENCY’ for harmonic analyses.
A different x-axis variable can be specified using ‘XVAR’ command, such as the case when plotting stress vs. strain.
Once the plots are generatd they can also be saved to a file using these commands.
With this knowledge, now let's move on to a workshop where we post-process the results from structural analysis of a ball grid array.
A ball grid array is a type of surface-mount packaging used in the semiconductor industry.
It has a grid of solder balls that form a permanent connection between the die and the package.
It establishes an electrical connection between the two parts and is therefore subject to thermal stresses and thermal fatigue.
Due to these reasons, structural and thermal analysis of ball grid arrays is of great interest in the semiconductor industry.
In this demo, we’ll write an APDL script to post-process the structural analysis of ball grid arrays using /POST1.
Start with FINISH and CLEAR commands for a clean database.
Next, enter the pre-processor. Read in the 'cdb' file for Ball grid array subjected to thermal loads.
Enter the general post-processor '/POST1'.
Now read the last data set from the results file.
Plot contour result of displacement vector sum using the command ‘PLNSOL’
Similarly, plot contours for von Mises equivalent stress and equivalent strain.
‘PLVECT’ is used to obtain vector plots of deformed results.
Animation of deformed shape is displayed using ‘ANDSCL’.
Here, one can choose to animate the deformed results such as nodal deformations and stresses using ‘ANCNTR’ along with the number of frames and time delay in seconds control fields.
The preceding deformed result quantity will be animated when this command is used.
In addition to this, one can animate over time range for problems having multiple load steps using ‘ANTIME’.
Now, let’s calculate strain energy density using ‘ETABLE’.
The element strain energy and elemental volume are read using the ‘ETABLE’ command.
Exponentiate command ‘SEXP’ is used to calculate the strain energy density, which is the ratio of element strain energy to element volume.
The results are then plotted as contour plots using ‘PLETAB’ and listed using ‘PRETAB’.
This finishes the workflow. So, save the database using the ‘SAVE’ command.
That concludes the demo and the video on general postprocessing using APDL scripting.
We will continue our learning in the next video.