FeResPost library description
is a library
allows you to read Nastran and Samcef finite element models and
results, and to
automate post-processing operations.
Depending on the programming language being
used (Ruby, Python, VBA, C#,
C++...), FeResPost allows to program a wide variety of programs ranging
small scripts to large programs containing user-defined Classes and
and allow to perform complex operations.
(The scripting capability of FeResPost can
be very useful to automate
simple tasks as automating the creation of connections, modifying
properties, creating temperature or force fields...)
structure analysis of complex
structures often leads to repetitive
tasks. This is related to :
- The nature of the structure that is being
Identical or similar components are often present several times, and
many times, in the same structure (beams, panels, interfaces,
These different parts or components are generally justified exactly the
way, and the corresponding calculation is often automated (with a
- A structure is rarely sized for a single event,
checked again a single requirement. Generally, for static analysis,
case are defined to ensure that the structure's strength is sufficient
sustain severel events in its life. This means that for each component,
type of failure mode, the calculations is often done as many times as
number of defined load cases.
- During the development of the structure, the
will be updated several times. Sometimes, several versions of a
be justified simultaneously, or consecutively. (Think, for example, at
different versions of the B737 Boeing or
A320 Airbus planes that are flying nowadays.) This also contribute to
repititiveness of structural analysis calculations.
explains why engineers involved in
structural analysis are often
also programmers. The need for automation leads them to use
third party programs to accelerate the justification, or write its own
post-processing programs. FeResPost can help in the development of
The main purpose of the program is to
download and manipulate Result
entities in order to calculate margins of safety. Possible operations
be performed on ``Result'' objects are, for example :
- Extraction of the Results corresponding to a
of elements or nodes.
- Modification of the reference coordinate system,
- Calculation of total force and moment
to a distribution of loads,
- Derivation of criteria like Von Mises for a
tensor, the norm of a vectors, the eigen-values and corresponding
for tensorial results...
- Operations combining several results (sum,
difference, product, merging of Results...),
- Derivation of new Results (for example,
- Extraction of maximum or minimum values, and
corresponding finite element entities (elements, nodes...),
these results can be read from Nastran
XDB or OP2 files, or from
Samcef DES/FAC files. The corresponding finite element models can also
important from Nastran Bulk BDF files, or Samcef Bacon DAT files.
The groups of elements and nodes can be
read from Samcef DAT or Patran
session files. Manipulation of these Groups, by addition, substraction,
intersection, associations are possible.
FeResPost allows the simultaneous
manipulation of several models by
defining several NastranDb and SamcefDb
objects, and different Nastran and Samcef models can be manipulated
FeResPost also allows the calculation of
composite structure by
providing severeal classes for the Classical Laminate Analysis (CLA).
other things, the CLA classes of FeResPost allow to :
- Evaluate Laminate properties (equivalent moduli,
stiffness and compliance matrices, coefficient of thermal expansion).
- Calculate laminate analysis response
to a specified loading (laminate loads and deformation, ply stresses
- Evaluate laminate strength by calculating
classes can be used separately from the
finite element results,
but also used together with finite
element results. This allows for example to:
- Calculate, at post-processing level,
command, the laminate response using shell forces, moments,
temperatures on a
large set of elements.
- Do this calculation with the finite
laminates, or with different laminates,
- Estimate failure criteria that are
the finite element solver being used...
Classes and Modules
provides an access to 7 classes
and 2 module allowing the
manipulation of FE entities and results. The 7 classes are :
``DataBase'' class that is used to store a
model and other entities (Groups, Results,...). This class is a generic
that can not be instanciated. Two classes inherit the DataBase class:
- The ``NastranDb'' class that is used for the
manipulation of Nastran models and Results.
- The ``SamcefDb'' class that is used for the
manipulation of Samcef models and Results.
- The ``Result'' class that allows the
of Results, thier transformation,...
- The ``ResKeyList'' class, very useful to
- The ``Group'' class that allows the definition
Groups, thier manipulation, the extraction of Results on small parts of
- The ``CoordSys'' class for the manipulation of
``Post'' module gives access to several
Four classes used to perform Classical
Laminate Analysis calculations
are also provided:
- The ``ClaDb'' class that stores composite
- The ``ClaMat'' class used to mainpulate
- The ``ClaLam'' class to store laminates and
- The ``ClaLoad'' class used to manipulate
applied to Laminates.
classes are interfaced with the rest of
FeResPost and allow to
post-process very efficiently composite finite element Results.
FeResPost requirements and other programs
The program is mainly written in C++, and
different wrappings are
proposed around the C++ code (Ruby, Python, COM and .NET). This
ensures that the program is easy to manage and that the program remains
efficient because costly operations are done at C++ level (compiled
and other programs
So far, Results of Nastran and
can be post-processed:
- Finite element models can be read
either from a BDF (bulk data file), or an op2 file. Groups can be build
by reading Patran sessions files obtained with the utilities of Patran.
- Results can be read from OP2 or XDB
files. The most commonly used types of elements are supported. For XDB
files, it is also possible to extract results by random access (XDB
- Finite element models can be read
from a dat file obtained by a ".sauve banque" Bacon command.
- Results can be read or accessed
randomly from DES/FAC files.
systems and programming
is distributed as a ruby extension (LINUX and Windows), as a COM
component (Windows only) and as a .NET assembly (Windows only).
In order to use FeResPost you need to install first one of the
corresponding programming languages :
- Ruby if you wish to use the ruby
extension. (Binaries are distributed for Linux and Windows operating
systems, but a recompilation of the sources allow the installation of
FeResPost on other OSs.)
- Python compiled libraries are also
distributed. For some language versions/OS combinations, you might need
to compile it yourself.
- The COM component can be used with
many languages, but on Windows OS only. Tests have been done with Ruby,
Python, C++, VBA (in excel). Other languages like C, Java should also
be capable of using the COM component.
- All the .NET languages should be able
to use the .NET assembly. This includes VB.NET, IronRuby, Java.NET, C#.
Tests have been done with C# language only. (See the examples.)
programming language in which all those operations are programmed is
object oriented and allows the development of very sophisticated and
large post-processing programs, or very small tools, according to the
wishes of the programmer.
installation of the programming language you wish to use, a few other
programs may help you to develop scripts using FeResPost. The examples
distributed on this web site and discussed in the User Manual sometimes
assume that thos programs have been installed on your computer. For
FeResPost library description
- FeResPost allows to save Nastran and
Samcef DataBases or intermediate results in GMSH files for later
visualisation. You do not needs in GMSH files to run the example. the
program is necessary if you want to visualize what you have saved, so
you better install it on your computer. It is free, very easy to
install, and distributed under the LGPL license.
- The Result class has a member
function for conversion from/to BLOB (Binary Large Objects) for
interaction with SQL databases. Several examples illustrate the use of
these conversion methods. These examples make use of the SQLite
database system. The corresponding library is free, open source, but
needs to be installed if you want to run the corresponding examples.
- Some examples that use the COM
component are written in the VBA code of excel spreadsheets. Of course,
you need excel if you want to run these examples.
An online HTML
manual is available, but
we advise to download the PDF
manual presents the different
classes defined in FeResPost library,
with the associated properties and methods. It also illustrates the use
of different FeResPost objects with examples.
Latest version is
One distributes two
the examples. (The content of these two files are the same.)
contain a small satellite
Nastran finite element model, and numerous post-processing examples :
- Manipulation of Groups and Results with
FeResPost Ruby extension,
- Use of the COM component with several
programming languages (Ruby, Python, VBA, C++),
- Use of the .NET assembly with C# examples.
Some of these
examples are very small
and illustrate simple extraction of results from XDB or OP2 files, with
a very limited number of manipulations. But one also proposes examples
corresponding to entire post-processing projects that could be used
readily in a real project. (These examples are provided as Ruby
programs, or in excel workbooks.)
One suggest however, that the user reads the examples in the order in
which they are defined, starting with the ruby examples, as this is the
only way to really understand the use of FeResPost objects.
As FeResPost is
distributed under the
LGPL license, the sources are also distributed for re-compilation or
modification and re-distribution :
also the "last contributions" below.)
Binaries and older
are distributed for several versions of FeResPost and include ruby
extensions for Linux and Windows, COM component for Windows, and a .NET
assembly. The FeResPost C++ library is also distributed for latest
versions, but one recommends to use static linking for your own
programs and to recompile yourself the FeResPost classes.
are distributed for the different published versions
of the library. These include the C/C++ sources, the examples, and
possibly the PDF manual.
submission of a new official issue of FeResPost is time consuming, one
often publishes "un-official" distributions of the current version
including small bug-fixes. Therefore, we suggest FeResPost users to
regularly check the LAST
CONTRIBUTIONS for latest sources
Third party contributions
One also distributes a third-party
contribution, but without any
or subscribe to FeResPost Google group :
you have a question to ask, a bug to report, we would appreciate that
you do it via FeResPost google group, so that others can benefit of
your remarks as well.
FeResPost library description
propose below a few small scripts illustrating the use of FeResPost to
automate operations on finite element models, groups, results...
The examples listed below are only a small subset of the examples
distributed with FeResPost. FeResPost examples:
- Are distributed in archive files that you can download one
FeResPost web site :
content of these two files is acutally the same so that you need to
download only one of them.)
- Include the Nastran finite element model of a
small finite element model that you should run with Nastran to produce
XDB and OP2 result file if you want to test the result manipulation of
- Are described and commented in FeResPost
Reference Manual that gives more more technical information than
what we provide in the linked pages below.
Examples with Ruby
script for reading
Nastran BDF file
Examples with Python
Examples with COM component
The examples presented here are using
FeResPost COM component:
- This limits the applicability of the examples to Windows
platforms. As far as we know, the COM component cannot be used on
- On the other hand, the COM component can be used with various
languages that support COM. For example: Ruby, Python, Perl, VBA, C++,
FeRespost is distributed with examples of scripts using COM component
and written in different languages (Ruby, Pyhton, C++, VBA). We think
however, that VBA is particularly interesting for it allows you to
access FeResPost from excel. We present below examples of FeResPost
being used from excel:
Examples with C#
is distributed as a LGPL
resource. This means that it is free, and that you can modify and
re-distribute it gratis as long as you comply with ther therms of the
LGPL license. (These are given in an Appendix of the User Manual.)
The LGPL license (Lesser General Public License) is similar
to GPL license (General Public License) but is mess restrivtive
more adapated to software distributed as libraries and allows
prorprietary software to link their code to a library distributed under
LGPL. The text of LGPL license is given in an appendix of FeResPost