Warning: due to compiler limitations, the reading of large FAC files (size 2 GB) with the FeResPost 32-bit library is likely to end with an exception. If this happens, the user should switch to a 64-bit version of the library.
“readDesFac” method is used to import Samcef Results. The files that are read are the “des” and the “fac” files. The method may have 2, 3, 4, 5, 6 or 7 arguments:
The first argument is a String containing the name of the “des” file. This argument is mandatory.
The second argument is a String containing the name of the “fac” file. This argument is also mandatory. Of course the two “des” and “fac” files must correspond.
The third argument is optional. It is an Array of integers corresponding to the identifiers of the Load Cases for which Results are to be imported. If the argument is omitted, the Results for all load cases are imported.
The fourth argument is optional and may be present only if the third argument is defined. It corresponds to the names that will be attributed to the load case attribute of Results imported. These names are provided in an Array of Strings. If this argument is not used, the default load case names will be attributed to the Results created in the SamcefDb.
For example, without the fourth argument, the importation of Asef Results with several load cases leads to LoadCase attributes named “LoadCase 1”, “LoadCase 2”,... This may be impractical for many problems.
The fifth argument is optional and corresponds to the names of the sub-cases for which values shall be imported. These names are provided in a String or an Array of Strings. If the Array is void or the parameter is omitted, all the sub-cases are read.
The sixth argument is optional and corresponds to the names of the Results for which values shall be imported. These names are provided in a String or an Array of Strings. Possible values are "Stress Tensor", "Strain Tensor",... If the Array is void, all Result types are considered. If the Array is void or the parameter is omitted, all the Results are read.
The seventh argument is an Array of integers corresponding to the Samcef Result Codes to be considered when Results are imported.
Note that when the third and fourth arguments are used, the number of elements of the two Arrays must be the same. For more information about arguments 4, 5 and 6, see the description of “readOp2” method in “NastranDb” class.
Note that the reading of “fac” files also checks the endianness of the file and, if needed, does corrections to the binary data.
At the end of reading the method “readDesFac” prints a list of the Samcef Result Codes that have been skipped.
Presently, the method allows the reading of Results for the following Samcef modules:
Asef. The first integer ID associated to the created Results is the number of the load case. The first Real ID associated to the created Results is the deformation energy. The default case ID of the created Result objects is “Load Case x” where “x” is replaced by the integer ID of the case. The subcase ID associated to the load case is always “Statics”.
Mecano. The first integer ID associated to the created Results is the time step ID. The first Real ID associated to the created Results is the time (continuation parameter would be a more appropriate name). The default case ID of the created Result objects is “Non-Linear Load Case”. The subcase ID associated to the load case is always “Step x” where “x” is replaced by the time step index.
Dynam. The first integer ID associated to the created Results is the mode index. The first Real ID associated to the created Results is the frequency. The default case ID of the created Result objects is “Dynam Load Case”. The subcase ID associated to the load case is always “Mode x” where “x” is replaced by the mode index.
Stabi. The first integer ID associated to the created Results is the mode index. The first Real ID associated to the created Results is the critical load. The default case ID of the created Result objects is “Stabi Load Case”. The subcase ID associated to the load case is always “Mode x” where “x” is replaced by the mode index.
“readDesFac2H” method is used to read Samcef Results from “des” and the “fac” files. The method does not read the Results into the dataBase, but returns them into a Hash. For example:
...
h=db.readDesFac("~/FERESPOST/TEST_SAMCEF/mySatellite_as.des",\
"~/FERESPOST/TEST_SAMCEF/mySatellite_as.fac",\
[1],["accel_XYZ"])
...
Flags influencing the behavior of “readDesFac” method can be defined. The following singleton methods have been defined to manipulate the flags:
“desFacResetFlags” resets all the flags to false (default values). This method has no arguments.
“desFacSetFlag” sets one flag to true. This method has one String argument. An example of use of this method follows:
...
DataBase.desFacSetFlag("ANGULAR_STRAIN_BUG")
db.readDesFac("~/FERESPOST/TEST_SAMCEF/mySatellite_as.des",\
"~/FERESPOST/TEST_SAMCEF/mySatellite_as.fac",\
[1],["accel_XYZ"])
...
“desFacUnsetFlag” sets one flag to false. This method has one String argument.
“desFacGetFlag” returns a Logical value corresponding to the value of the flag. This method has one String argument.
When one of these methods has one String argument, this argument is the name of the considered flag. Among the above methods, only the last one returns a value.
Two such flags have been defined:
The flag “ANGULAR_STRAIN_BUG” is used to correct a Samcef bug when importing “Strain Tensor” Results . (See section III.2.2 for more information on the effect of this flag.)
The flag “DES_FAC_DEBUG” force SamcefDb methods related to the access to samcef Des/Fac files to issue debugging messages that might help to identify problems when trouble strike.
Similarly, two singleton methods allow to enable or disable Samcef Result codes:
“enableSamcefResCodes” is used to enable or re-enable “result codes” when reading Results from a pair of “des” and “fac” files.
“disableSamcefResCodes” is used to disable “result codes” when reading Results from a pair of “des” and “fac” files.
The argument of these two methods are an integer or an Array of integer corresponding to Samcef Result Codes.
Four methods devoted to the enabling or disabling of composite layered Results are defined in the generic “DataBase” class. These methods are presented in section I.1.3.2.