Extraction of Nastran XDB file results into Excel

Purpose of the Excel workbook

The Excel workbook discussed here allows you to extract results from a Nastran XDB file in Excel. The example contains several worksheets with controls that are linked to Excel VBA functions. These functions use the FeResPost COM component that performs the interactions with the Nastran model and results. The VBA code is not described here. Those who are interested are referred to the FeResPost User Manual for more explanations.

The workbook presented here is provided with the FeResPost COM examples, in the "COMEX/EX09/PostXdbRandom.xls" Excel file. To run this example, you need to properly register the corresponding version of the FeResPost COM component. (The way to do it is explained in the FeResPost User Manual.)

Note that a similar "COMEX/EX09/PostDesFacRandom.xls" worksheet allows you to perform similar operations with Samcef models, and results extracted from DES & FAC files.

"FemDbIds" worksheet


The first worksheet to work with is the "FemDbIds" worksheet that is used to read the finite element model, and attach an XDB file. Several control buttons allow you to perform this operation:


Two other buttons allow you to show or hide the FeResPost window, and one button allows to close FeResPost. (This last button also destroys all the objects that have been created.)

Finally, an "Export Groups" button allows you to save the database groups in a Patran session file.

"ResExtract" worksheet


The "ResExtract" worksheet allows the extraction of Results from the XDB file attached to the current database. Several controls allow you to perform this operation:


Finally, the "Extract" button extracts the results and fills the spreadsheet starting at line 15. Note that the results are sorted by increasing element ID, node ID, layer ID and sub-layer ID.

"ResExtractCombili" worksheet


"ResExtractCombili" is a variant of "ResExtract" worksheet that allows the extraction of linear combinations of elementary load cases results. It differs from "ResExtract" by:


This worksheet can be useful when the sizing is done using combinations of elementary load case results, such as acceleration load cases.

"WorstResExtract" worksheet


This spreadsheet allows you to extract a limited number of results (the worst ones according to a specified criterion). More precisely:


Results are output in decreasing order for the selected criterion. The calculated criterion is given first, then the associated keys and values (components). Note that it is not possible here to modify the coordinate system with respect to which the components are expressed.

"DynamResExtract" worksheet


The "DynamResExtract" worksheet allows the extraction of XDB complex results for SOL 108 and SOL 111 analyses. The differences with "ResExtract" worksheet can be summarized as follows:

"GroupEdit" worksheet


When performing extractions, it can be very frustrating to discover that the group you need is not defined in the current database because it is not defined in the Patran session file you have read in the "FemDbIds" spreadsheet. The "GroupEdit" spreadsheet has been added to allow the user to define new groups, or modify existing groups during an Excel session.

The spreadsheet has several capabilities:


The data and controls in range "I1:N7" can be used to define new groups by topological operations.

If you want to save created groups for later use, you can export a Patran session file by clicking the corresponding buttons in "FemDbIds" worksheet.



References

More information on this example, and on the functions it uses, is given in the FeResPost User Manual.

← Back to the examples