FeResPost library
FeResPost is a library that allows you to read Nastran and Samcef finite element models and results, and to automate post-processing operations.
Depending on the programming language used (Ruby, Python, VBA, C#, C++...), FeResPost lets you write a wide variety of programs, ranging from small scripts to large programs containing user-defined classes and modules, and perform complex operations.
(The scripting capabilities of FeResPost can also be very useful to automate simple tasks, such as creating connections, modifying element properties, or creating temperature or force fields...)
Structural analysis
The structural analysis of complex structures often leads to repetitive tasks. This is due to:
- The nature of the structure being analysed. Identical or similar components (beams, panels, interfaces, connections...) are often present several times, sometimes many times, in the same structure. These parts or components are generally justified in exactly the same way, and the corresponding calculation is often automated (with a programming language, Excel...).
- A structure is rarely sized for a single event, or checked against a single requirement. Generally, for static analysis, numerous load cases are defined to ensure that the structure is strong enough to sustain the various events of its life. This means that, for each component or each type of failure mode, the calculations are often done as many times as there are load cases.
- During the development of the structure, the design is updated several times. Sometimes, several versions of a structure are justified simultaneously or consecutively. (Think, for example, of the different versions of the Boeing 737 or Airbus A320 aircraft flying today.) This also contributes to the repetitiveness of structural analysis calculations.
This explains why engineers involved in structural analysis are often also programmers. The need for automation leads them to use spreadsheets, to use third-party programs to speed up the justification, or to write their own post-processing programs. FeResPost can help in the development of these small programs!
How can FeResPost help?
The main purpose of the library is to read and manipulate results in order to calculate margins of safety. Possible operations on Result objects include, for example:
- Extraction of the results corresponding to a group of elements or nodes,
- Modification of the reference coordinate system,
- Calculation of the total force and moment corresponding to a distribution of loads,
- Derivation of criteria such as the Von Mises stress of a stress tensor, the norm of a vector, or the eigenvalues and corresponding eigenvectors of tensorial results,
- Operations combining several results (sum, difference, product, merging of results...),
- Derivation of new results (for example, laminated results),
- Extraction of maximum or minimum values, and of the corresponding finite element entities (elements, nodes...),
- ...
Currently, these results can be read from Nastran HDF5, XDB or OP2 files, or from Samcef DES/FAC files. The corresponding finite element models can be imported from Nastran BDF (bulk data) files, or from Samcef Bacon DAT files.
Groups of elements and nodes can be read from Samcef DAT files or Patran session files. These groups can be manipulated by addition, subtraction, intersection, association...
FeResPost allows the simultaneous manipulation of several models: by defining several NastranDb and SamcefDb objects, different Nastran and Samcef models can be manipulated at the same time.
FeResPost also allows the calculation of composite structures, by providing several classes for Classical Laminate Analysis (CLA). Among other things, the CLA classes of FeResPost allow you to:
- Evaluate laminate properties (equivalent moduli, stiffness and compliance matrices, coefficients of thermal expansion),
- Calculate the laminate response to a specified loading (laminate loads and deformations, ply stresses and strains...),
- Evaluate laminate strength by calculating different failure criteria,
- ...
The CLA classes can be used independently of the finite element results, but also together with them. This allows you, for example, to:
- Calculate at post-processing level, with a single command, the laminate response to shell forces, moments and temperatures on a large set of elements,
- Do this calculation with the laminates of the finite element model, or with different laminates,
- Estimate failure criteria that are not proposed by the finite element solver being used...
Who should use FeResPost?
The purpose of FeResPost is to automate post-processing operations by programming scripts. This means that FeResPost users must be ready to write their own scripts. Fortunately, FeResPost can be used from several programming languages and environments (Ruby, Python, VBA, C#, C++...).
Some of the examples may give the impression that FeResPost provides tools to perform complex operations without programming. This is sometimes true (Excel examples). However, users should keep in mind that these are just examples, and that it pays to understand how they work. In the case of the Excel examples, reading the documentation, analysing the VBA code, and testing modifications of the code and worksheets will allow significant improvements to what is provided.
Those who are not interested in programming should either “sub-contract” the programming work to their methods department, or choose an interactive Nastran pre- and post-processor (Patran, Femap, HyperWorks, NX...).
FeResPost library classes and modules
The library provides access to 7 classes and 2 modules for the manipulation of FE entities and results. The 7 classes are:
- The
DataBaseclass, used to store an FE model and other entities (groups, results...). This class is a generic class that cannot be instantiated. Two classes inherit from the DataBase class:- The
NastranDbclass, used for the manipulation of Nastran models and results, - The
SamcefDbclass, used for the manipulation of Samcef models and results.
- The
- The
Resultclass, which allows the manipulation of results, their transformation... - The
ResKeyListclass, very useful to manipulate Result entities. - The
Groupclass, which allows the definition of groups, their manipulation, and the extraction of results on small parts of the structure. - The
CoordSysclass, for the manipulation of coordinate systems.
The Post module gives access to several additional functions.
Four classes are also provided to perform Classical Laminate Analysis calculations:
- The
ClaDbclass, which stores composite entities, - The
ClaMatclass, used to manipulate materials, - The
ClaLamclass, used to store laminates and perform CLA calculations, - The
ClaLoadclass, used to manipulate loadings applied to laminates.
The CLA classes are interfaced with the rest of FeResPost and allow very efficient post-processing of composite finite element results.
The library is mainly written in C++, and different wrappers are provided around the C++ code (Ruby, Python, COM and .NET). This ensures that the library is easy to maintain, and that it remains efficient, because costly operations are done at C++ level (compiled language efficiency).