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”:
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.
Element | Nastran | MSC. Access | FeResPost |
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 |
“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:
The second argument is optional.
“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:
The second argument is optional.
“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:
The second argument is optional.
“getXdbLcScNames” singleton method returns an Array of two elements containing:
The arguments are:
The second argument is optional.
“getXdbLcScResNames” singleton method returns an Array of three elements containing:
The arguments are:
The second argument is optional.
“getXdbLcInfos” singleton method returns information about the load cases and sub-cases for which Results are stored in a xdb file. The arguments are:
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:
“printXdbDictionnary” singleton method prints the dictionnary of an XDB file. The arguments are:
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.
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:
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.
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.
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:
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:
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.