Post-processing an entire structure with Excel using the FeResPost COM
component
Purpose
of the Excel workbook
- The
reading
of finite element models,
- The
calculation of margins of safety in several parts of the structure, and
for several kinds of failure criteria (metallic parts, sandwich panels,
composite,
connections...),
- The archiving of results in an Excel result file for later reporting,
- The
saving
of GMSH files for visualization of
results.
The example presented here corresponds to the "COMEX/EX10/Postproject.xls" workbook distributed in
the FeResPost examples.
Worksheets
FeResPost
examples are provided with the Nastran
finite element model of a small satellite and analysis decks that allow
the
user to produce all the result files needed to run the
"PostProject.xls" macros. In order to run a post-processing, you
first need to ensure that the paths to the model files and result files are properly set up.
The workbook can be modified and adapted to the post-processing of other structures, and to other selections of load cases. We present and explain below the purpose and structure of each type of worksheet needed in the
definition of post-processing data.
"DefDbLc" worksheet
The
"DefDbLc" worksheet contains the data needed to properly define the
model databases and the results access (load case definitions). Each
line in
the worksheet corresponds to the definition of a model or load case:
- If the first column of a line contains the keyword "NASTRANDB", this means that the line defines a model database read from a Nastran model. Then:
o The cell
that follows defines the
name of the database.
o Keyword "GMSH" is followed by the name of GMSH mesh file in which the model will be
exported
after its creation for later visualization.
o Keyword
"BDF" is followed
by the path to a BDF file from which the Nastran BDF model is read.
o Keyword
"SESSION" is
followed by the path(s) to one (several) Patran groups session file(s)
from
which groups are read.
o Keyword
"CLADB" is followed by
the path(s) to one (several) NDF files from which a composite database
is
built. One can also put the name of the current model database. Then,
all the
materials and laminates found in the corresponding model are also used in
the
construction of the composite database.
- The "LC_ELEM" keyword in the first column is used for the definition of an elementary load case directly read from a Nastran XDB file:
o The cell
that follows is the name of
the load case in the post-processing project.
o The third
cell in the line contains
the name of the post-processing database that shall be used for the
post-processing of the load case.
o Then
keyword XDB is followed by
three cells that contain the path to the XDB file, the load case name
in
Nastran result file, and the sub-case name (usually "Statics"). Note
that the elementary load case name in the post-processing project is usually the same as the Nastran load case name, but this is not mandatory.
- The "LC_COMBILI" keyword in the first cell of the line indicates that one defines a new load case which is a linear combination of elementary load cases previously defined:
o The cell
that follows is the name of the combined load case. Note that two load cases (elementary or combined) cannot share the same name.
o The third
cell contains the number
of elementary load cases used in the linear combination.
o Then pairs of factors and elementary load case names define the linear combinations.
Note that several load case definition worksheets can co-exist in the post-processing project.

"Selection" worksheets
The load
cases defined in the active load case
definitions worksheet are not necessarily all post-processed. The
selection
worksheets allow you to select a sub-set of these load cases for
post-processing.
The selection worksheet also allows you to associate each load case to one
or
several parameters, as shown below:

"post***" worksheets
The post-processing worksheets define the extraction of results and associated operations that are done for different parts of the structure for each post-processed load case.
The post-processing is done by calling VBA
functions
defined in one or several modules of the workbook. In the example
below, the
function calculates a Von Mises failure criterion. The data of the
function
are:
- The name
of
the current load case. Having this name in the function parameters
ensures that
the function is re-calculated each time the post-processing changes the
current
load case. This load case must be directly or indirectly linked to the
value of
cell E6 in LcSelector worksheet.
(See
below.)
- The target, which specifies where stresses are read ("ElemCenters",
"Elements" or "ElemCorners" in this case).
- The part
of
the structure on which Von Mises criterion is calculated. This is the name of the group of elements for which the stresses are read.
- A safety
factor.
- A material allowable.
The function returns an array of one line and several columns
containing the identification of the critical FEM entity, maximum Von Mises stress and
minimum RF.
The
right part of the image shows that the results are reformatted. Then
the call
to a "saveArchive" specifies what must be saved in the Excel result
file.
Note that the parameters associated with the current load case are obtained by calling the "getParameter" function that has two arguments: the name of the current load case that ensures the function is recalculated each time the load case is changed, and the name of the parameter.

"LcSelector" worksheet
The
"LcSelector" worksheet
is used to control the automated calculation of a selection of load
cases. The
first steps of the operations are:
- The
specification of the worksheet defining the databases and load cases in
cell B6. (The string corresponds to the name of the definition
worksheet.)
- The
specification of the worksheet defining the selection of load cases one
wishes to post-process.
- Then,
clicking on the "ReadDbAndLoadCases" button scans the two selected
worksheets and fills the "LcSelector" worksheet starting at line 10.
The list of cells referenced in the Combo box is also updated. (This
Combo box is linked to cell E6 which corresponds to the current load
case.)
The value of the Combo box is then automatically set to the first load
case in
the selection, and the corresponding calculations are done. (We assume
here
that the "automatic calculation" option has been selected.) This
means that the corresponding finite element model database is built,
the
current load case is set, and all the formulas in the "post_***"
worksheets that refer directly or indirectly to the value of cell E6
are recalculated.
Then, the
user can do several things:
- The Combo
box can be used to select manually another load case, which is then
automatically recalculated.
- The "Loop
On Selection" button loops on all the selected load cases and calculates them.
- The
"Archive Results" button is used to archive the results in an Excel
result file. (See below.)
The "Reinit Archive Results" button creates a new Excel result file for
archiving Excel results.
- The
""Write Gmsh files" button can be used at any moment to export the
envelopes of strength ratios in GMSH files for visualizations. The
"Reinit GMSH files list button" reinitializes all the envelopes of
strength ratios stored for the project.
- The
"Reinit FeResPost Object" button re-initializes all the FeResPost objects saved in the VBA code.
- The "Debug Current Load Case" button outputs a lot of information about the current load case in the LOG file. This button has been added for debugging purposes.

Results
We present below several examples of results that are produced by the
automated
post-processing with Excel:
- An example
of Excel result file
is
presented.
- GMSH connection results.
- GMSH results on 2D elements.
- GMSH results on 3D elements.
Note
that GMSH is a program that allows several manipulations of results, such as:
- The
adaptation
of ranges displayed on the structure.
- The
printing
of values instead of colors.
- Cuts in
the
structure.
- Operations
on the results.
- ...

Example of results archived in an Excel workbook

Example of connection strength ratios in a GMSH file. Results presented here correspond to insert failure criterion.

Example of strength ratios in a GMSH file. Results presented here correspond to Tsai-Hill failure criterion.

Example of strength ratios in a GMSH file. Results presented here correspond to core failure criterion.
Possible improvements
The reader should keep in mind that the "PostProject.xls" workbook is only an example of what can be done with the FeResPost COM component and
Excel. This
project can be improved and we list below some examples of what can be
done
(has been done) with the project:
- The
post-processing failure criteria programmed in the project are not exhaustive
and can be completed with other criteria. These improvements can
correspond to
new failure criteria, the output of test predictions (strain gauge or
displacements)...
- The
post-project has been adapted to the post-processing of dynamic results
corresponding to sine analyses with Nastran SOL 108 or SOL 111 results.
- A saving
of
strength ratios, load case per load case, in an SQLite
database has also been implemented. This allows you to build envelopes of
strength
ratios a posteriori. Also the combination of several environments
can be
assessed by adding corresponding strength ratio envelopes.
- The Excel
result files can be further post-processed with appropriate tools to
identify
the critical parts, and critical load cases. The filtering of Excel
results
leads to more readable outputs.
- Also it is
possible to automatically create Word reports from the Excel results.
- ...
References
More information on this example, and on the functions it uses, is given in the FeResPost User Manual.
Download the output files
The files produced by this post-processing project can be downloaded, to examine them with the corresponding programs: Excel or LibreOffice, Word, GMSH, or an SQLite browser such as DB Browser for SQLite.
- All files (one archive)
- Excel workbooks (margins of safety)
- Word report tables
- GMSH result files
- SQLite databases
The sizes of the archives are given on the Downloads page (“Example output files”).