FeResPost Web Site                     FeResPost Online User Manual

III.1.1.9 “XDB” methods for extracting XDB information

Several methods allow the reading of Result entities or characteristics stored in an xdb file. Real Results as well as Complex ones can be read from xdb files. This last format of Results can for example be read from a Nastran “xdb” result file corresponding to a SOL107, SOL108 or SOL111.

The reading of 64bits XDB files, as well as 32bits XDB files is possible. Note however that the results that are read are stored in 32bits integer/real values so that there is no advantage in using 64bits XDB files with FeResPost. (It probably slows down the XDB access.)

The use of Nastran "DBCFACT=4" parameter is supported. This parameter generates XDB files with BBBT index (Binary Blocked Balanced Tree Method of entry key storage), instead of Hash storage. The default Nastran seems to be "DBCFACT=0" and corresponds to an Hash Key (HK) of key storage.

Remark: one strongly advises to attribute an integer ID, and a name to each sub-case defined in Nastran BDF file. For example, in the following example, the sub-case integer ID is 201, and its name is “ORBIT_ONE_MS2_X”:

      SUBCASE 201  
         SUBTITLE=ORBIT_ONE_MS2_X  
         SPC=702001  
         LOAD=601001

For all the methods listed in this section, the first argument is a String containing the path to the XDB file. The methods do not require the XDB file to be attached to the Nastran database. However the corresponding methods exist for XDB result files that have been attached to a database. (The corresponding methods with XDB attachments are described in section III.1.1.10.)

The supported elements for extraction of Results is summarized in Table III.1.2. Note that the CPYRAM element does not appear in Table III.1.2. It seems that MSC Nastran outputs no stress/strain results in XDB file, despite the fact that results are saved in OP2 and HDF files.


Table III.1.2: Supported elements for the reading of results from XDB files.




Element Nastran MSC. AccessFeResPost
Name Element ID Element ID Element Id




CBAR 12 34 1
CQUAD4 1 33 2
CTRIA3 4 74 3
CHEXA 2 67 4
CROD 9 1 5
CBEAM 10 2 6
CPENTA 6 68 7
CBUSH 47 102 8
CTETRA 14 39 9
CTRIA6 7 75 10
CQUAD8 3 64 11
CQUAD4(X) 95 171 12
CELASi 16...19 11...14 13
CONM1 30 29 14
CONM2 31 30 15
CFAST ??? ??? 16
CONROD 8 10 17
CSHEAR 11 4 18
CGAP 15 38 19
CQUADR 29 82 20
CTRIAR 34 70 21
CWELD 53 200 22
CBAR(X) 13 100 23





III.1.1.9.1 “getXdbLcNames” method

getXdbLcNames” singleton method returns an Array of String containing the list of load cases to which Results found in an xdb file correspond. The arguments are:

1.
A String specifying the access path to the xdb file.
2.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second argument is optional.

III.1.1.9.2 “getXdbScNames” method

getXdbScNames” singleton method returns an Array of String containing the list of sub-cases to which Results found in an xdb file correspond. The arguments are:

1.
A String specifying the access path to the xdb file.
2.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second argument is optional.

III.1.1.9.3 “getXdbResNames” method

getXdbResNames” singleton method returns an Array of String containing the Result type names to which Results found in an xdb file correspond. The arguments are:

1.
A String specifying the access path to the xdb file.
2.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second argument is optional.

III.1.1.9.4 “getXdbLcScNames” method

getXdbLcScNames” singleton method returns an Array of two elements containing:

1.
An Array of Strings containing the list of load cases to which Results found in the xdb file correspond.
2.
An Array of Strings containing the list of sub-cases to which Results found in the xdb file correspond.

The arguments are:

1.
A String specifying the access path to the xdb file.
2.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second argument is optional.

III.1.1.9.5 “getXdbLcScResNames” method

getXdbLcScResNames” singleton method returns an Array of three elements containing:

1.
An Array of Strings containing the list of load cases to which Results found in the xdb file correspond.
2.
An Array of Strings containing the list of sub-cases to which Results found in the xdb file correspond.
3.
An Array of Strings containing the list of Result types to which Results found in the xdb file correspond.

The arguments are:

1.
A String specifying the access path to the xdb file.
2.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second argument is optional.

III.1.1.9.6 “getXdbLcInfos” method

getXdbLcInfos” singleton method returns information about the load cases and sub-cases for which Results are stored in a xdb file. The arguments are:

1.
A String specifying the access path to the xdb file.
2.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second argument is optional.

The method returns an Array of Arrays. Each element of the Array contains the information for one load case and sub-case identification:

III.1.1.9.7 “printXdbDictionnary” method

printXdbDictionnary” singleton method prints the dictionnary of an XDB file. The arguments are:

1.
A String specifying the access path to the XDB file.
2.
A String specifying the access path to an output file.
3.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

The second and third arguments are optional. If the second argument is omitted or a void String, the dictionnary is printed on standard output.

This method has been added for debugging purpose: it helps to identify the XDB tables that are read, and those which are not.

III.1.1.9.8 “readXdb” method

The “readXdb” method is used to read Results into the DataBase from an “xdb” file generated by Nastran. (Only Results can be read from a Nastran “xdb” file.) The method has up to five arguments:

1.
A String argument that corresponds to the name of the file from which Results are read.
2.
A String or an Array of Strings corresponding to the names of load cases for which Results are imported into the DataBase. If the Array is void or the parameter is omitted, all load cases in xdb result files are considered when results are read.
3.
A String or an Array of Strings corresponding to the names of subcases for which Results are imported into the DataBase. If the Array is void or the parameter is omitted, all sub-cases in xdb result files are considered when results are read.
4.
A String or an Array of Strings corresponding to the identifiers of Results for which Results are imported into the DataBase. If the Array is void or the parameter is omitted, all Results of xdb result files are considered when results are read.
5.
A Boolean value specifying whether one forces the swap of endianness when reading the XDB file.

All parameters, except the first one, can be omitted. Then the method assumes that a void Array has been passed as argument.

Results that can be read are listed below:

Composite failure indices do not seem to be output in the xdb file. Only a few elements are supported. However, the most important ones are read:

The different characteristics of imported Results correspond to the characteristics of corresponding Results read from “op2” files.

Note however, that Complex Results can also be read from xdb files. Generally, the complex Results are the same as the real Results. More information can be found in section X.C.2.

Four methods devoted to the enabling or disabling composite layered Results are defined in the generic “DataBase” class. These methods are presented in section I.1.3.2.

III.1.1.9.9 “readXdb2H” method

The “readXdb2H” method is used to read Results from an “xdb” file generated by Nastran and returns the Results in a Hash object. Arguments are the same as those of “readXdb” method.

III.1.1.9.10 A note on “endianness”

MSC.Nastran is distributed with “TRANS” and “RECEIVE” tools that allow to exchange XDB files on machines with different ENDIAN conventions. This is sometimes necessary, for example, when Patran and Nastran are run on different machines. On the other hand, FeResPost allows the identification of endianness in XDB files (in most cases). In some cases, the user must “force” the choice.

The different methods devoted to XDB files access allow to specify a force on swap endianness. When the corresponding parameter is set to “TRUE”, FeResPost considers that the endianness of binary XDB file does not correspond to the endianness of the machine on which FeResPost executes. Then, a swap of endianness is performed when the binary file is read.

If the “SwapEndianness” parameter is set to false, no modification of endianness is done when the file is read.

If the “SwapEndianness” parameter is not given, FeResPost checks the endiannes of the file and, if needed, does corrections to the binary data that are read. The test is done as follows:

III.1.1.9.11 XDB tables activation

Three singleton methods allow to activate or deactivate the reading of Results from XDB files. More precisely, the XDB results are presented in different tables that correspond to:

Each type of Table can be enabled or disabled separately. This can be useful to filter the importation of Results. Also, if there is a FeResPost bug in the reading of a given Result table, the disabling of this table allows to continue to work with the other results while the development team works to fix the problem.

The three singleton methods devoted to XDB table activation are:

1.
enableXdbTables” is used to re-enable an XDB Result table for XDB Result reading.
2.
disableXdbTables” is used to disable an XDB Result table for XDB Result reading.
3.
getXdbTablesEnableInfos” returns a Hash with String keys and Boolean values that associates the enabled/disabled status of the different XDB tables. (This method also gives you the names of the different XDB tables that can be read from XDB files.)

The two enable/disable methods take one String, or an Array of Strings argument. The Strings correspond to the names of the entities that must be disabled or enabled. The “enable info” method has no argument.