Post-processing an entire structure with Excel using the FeResPost COM component

Purpose of the Excel workbook

The Excel workbook presented here automates a whole set of post-processing operations including:


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:

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.

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.

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:


Information for the saving of results in GMSH files (GMSH file name and GMSH result name).


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:

Note that GMSH is a program that allows several manipulations of results, such as:

Example of results archived in an Excel workbook

insert strength ratios

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

Tsai-hill strength ratios

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

Core strength ratios

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:

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.

The sizes of the archives are given on the Downloads page (“Example output files”).

← Back to the examples