Examples
Below are a few small scripts illustrating how FeResPost can be used to automate operations on finite element models, groups, results...
The examples listed below are only a small subset of the examples distributed with FeResPost and described in the User Manual. The complete set of examples:
- Can be downloaded from the FeResPost Downloads page:
- Choose the version you are interested in, then click on the “Show the files” button.
- The links to the example archives are given in the “Sources and examples” section. Two files are provided, for Windows and Linux respectively, but their contents are 99.9% identical.
- Include:
- A small Nastran finite element model, which you should run with Nastran to produce the HDF5, XDB and OP2 result files if you want to test the result manipulation features of FeResPost.
- A large collection of Ruby and Python scripts, C# programs and Excel workbooks illustrating the different capabilities of the FeResPost libraries.
These examples are described and commented in the FeResPost User Manual, which gives more technical information than the pages linked below. As the examples are presented in order of increasing complexity of the post-processing operations, the manual that describes them should be considered as a tutorial. We strongly advise new users to spend some time reviewing, testing and modifying these examples to become familiar with FeResPost.
Examples with Ruby
- Ruby script for reading a Nastran BDF file
- Ruby script for accessing Nastran results read from an HDF5 file
Examples with Python
- Python script for reading a Nastran BDF file
- Python script for the manipulation of groups
- Python script for extracting results from a Nastran XDB file
- Python script for extracting information from a Nastran XDB file
- Python scripts showing how results can be extracted from OP2, XDB or HDF5 files
Examples with the COM component
The examples presented here use the FeResPost COM component:
- This limits their applicability to Windows platforms. As far as we know, the COM component cannot be used on UNIX/Linux platforms.
- On the other hand, the COM component can be used with various languages that support COM, for example Ruby, Python, Perl, VBA, C++, C...
FeResPost is distributed with examples of scripts using the COM component, written in different languages (Ruby, Python, C++, VBA). However, we think that VBA is particularly interesting, as it allows you to access FeResPost from Excel. Below are examples of FeResPost being used from Excel:
- Classical Laminate Analysis in Excel using the FeResPost COM component
- Extraction of Nastran XDB file results into Excel using the FeResPost COM component
- Post-processing a large selection of load cases on an entire structure with Excel using the FeResPost COM component