next up previous contents index
Next: IV. FeResPost Examples with Up: III. Solver Preferences Previous: III.1 Nastran Preferences   Contents   Index

Subsections


III.2 Samcef Preferences

Most methods peculiar to the post-processing of Samcef finite element Results and models are defined in class ``SamcefDb'' that inherits the ``DataBase'' class. This class is described in section III.2.1.

Table III.2.1: The different methods that have been defined in ``SamcefDb'' class. See also the methods defined in generic DataBase class (Table I.1.1). userManual.Samcef.DB.methods.tab
(FeResPost list of classes is given in Table 1 page [*].)
(See also methods in userManual.DataBase.methods.tabgeneric DataBase class.)
Method Name Description Example
     
Creation and initialization methods
SamcefDb.newnew III.2.1 III.2.1
SamcefDb.initializeinitialize III.2.1  
Reading model or Results
SamcefDb.readSamcefDatreadSamcefDat III.2.1.1  
SamcefDb.readDesFacreadDesFac III.2.1.4  
SamcefDb.desFacResetFlagsdesFacResetFlags III.2.1.4  
SamcefDb.desFacSetFlagdesFacSetFlag III.2.1.4  
SamcefDb.desFacUnsetFlagdesFacUnsetFlag III.2.1.4  
SamcefDb.desFacGetFlagdesFacGetFlag III.2.1.4  
SamcefDb.enableSamcefResCodesenableSamcefResCodes III.2.1.4  
SamcefDb.disableSamcefResCodesdisableSamcefResCodes III.2.1.4  
SamcefDb.attachDesFacattachDesFac III.2.1.5  
SamcefDb.detachDesFacdetachDesFac III.2.1.5  
SamcefDb.getNbrAttachmentsgetNbrAttachments III.2.1.5  
SamcefDb.getAttachmentNamesgetAttachmentNames III.2.1.5  
SamcefDb.checkAttachmentExistscheckAttachmentExists III.2.1.5  
SamcefDb.removeAllAttachmentsremoveAllAttachments III.2.1.5  
SamcefDb.getAttachmentLcInfosgetAttachmentLcInfos III.2.1.5  
SamcefDb.getAttachmentNbrLoadCasesgetAttachmentNbrLoadCases III.2.1.5  
SamcefDb.getAttachmentLcNamesgetAttachmentLcNames III.2.1.5  
SamcefDb.getAttachmentLcScNamesgetAttachmentLcScNames III.2.1.5  
SamcefDb.getAttachmentLcScResNamesgetAttachmentLcScResNames III.2.1.5  
SamcefDb.getAttachmentNbrLayersgetAttachmentNbrLayers III.2.1.5  
SamcefDb.getAttachmentLayerIdsgetAttachmentLayerIds III.2.1.5  
SamcefDb.getAttachmentLayerNamesgetAttachmentLayerNames III.2.1.5  
SamcefDb.getAttachmentNbrSubLayersgetAttachmentNbrSubLayers III.2.1.5  
SamcefDb.getAttachmentSubLayerIdsgetAttachmentSubLayerIds III.2.1.5  
SamcefDb.getAttachmentSubLayerNamesgetAttachmentSubLayerNames III.2.1.5  
SamcefDb.getAttachmentNbrSubCasesgetAttachmentNbrSubCases III.2.1.5  
SamcefDb.getAttachmentScNamesgetAttachmentScNames III.2.1.5  
SamcefDb.getAttachmentNbrResultsgetAttachmentNbrResults III.2.1.5  
SamcefDb.getAttachmentResIdsgetAttachmentResIds III.2.1.5  
SamcefDb.getAttachmentResNamesgetAttachmentResNames III.2.1.5  
SamcefDb.getAttachmentResultsgetAttachmentResults III.2.1.5  
SamcefDb.getAttachmentResultsCombiligetAttachmentResultsCombili III.2.1.5  
SamcefDb.setStorageBufferMaxCapacitysetStorageBufferMaxCapacity III.2.1.5  
SamcefDb.getStorageBufferMaxCapacitygetStorageBufferMaxCapacity III.2.1.5  
Coordinate system methods
SamcefDb.getCoordSysCopygetCoordSysCopy III.2.1.2  
SamcefDb.addCoordSysaddCoordSys III.2.1.2  
SamcefDb.makeAllCoordSysWrt0makeAllCoordSysWrt0 III.2.1.2  
Group manipulation methods
SamcefDb.getNodesAssociatedToElementsgetNodesAssociatedToElements III.2.1.3  
SamcefDb.getNodesAssociatedToRbesgetNodesAssociatedToRbes III.2.1.3  
SamcefDb.getElementsAssociatedToNodesgetElementsAssociatedToNodes III.2.1.3  
SamcefDb.getElementsAssociatedToMaterialsgetElementsAssociatedToMaterials III.2.1.3  
SamcefDb.getRbesAssociatedToMaterialsgetRbesAssociatedToMaterials III.2.1.3  
SamcefDb.getElementsAssociatedToPliesgetElementsAssociatedToPlies III.2.1.3  
SamcefDb.getElementsAssociatedToLaminatesgetElementsAssociatedToLaminates III.2.1.3  
SamcefDb.getElementsAssociatedToAttr1sgetElementsAssociatedToAttr1s III.2.1.3  
SamcefDb.getElementsAssociatedToAttr2sgetElementsAssociatedToAttr2s III.2.1.3  
Generation of additional Results
SamcefDb.generateShellOffsetsResultgenerateShellOffsetsResult III.2.1.7  
Iterators
SamcefDb.each_coordSysIdeach_coordSysId III.2.1.8  
SamcefDb.each_elemIdeach_elemId III.2.1.8  
SamcefDb.each_nodeIdeach_nodeId III.2.1.8  
SamcefDb.each_materialIdeach_materialId III.2.1.8  
SamcefDb.each_samcefPlyIdeach_samcefPlyId III.2.1.8  
SamcefDb.each_samcefLaminateIdeach_samcefLaminateId III.2.1.8  
SamcefDb.each_samcefMatIdNameeach_samcefMatIdName III.2.1.8  
SamcefDb.each_samcefMatNameIdeach_samcefMatNameId III.2.1.8  
SamcefDb.each_nodeOfElementeach_nodeOfElement III.2.1.8  
SamcefDb.each_cornerNodeOfElementeach_cornerNodeOfElement III.2.1.8  
Methods added to ``Post'' module
SamcefDb.readGroupsFromSamcefDatreadGroupsFromSamcefDat III.2.3  
Other methods
SamcefDb.getNbrRbesgetNbrRbes III.2.1.9  
SamcefDb.getNodeRcIdgetNodeRcId III.2.1.9  
SamcefDb.getNodeAcIdgetNodeAcId III.2.1.9  
SamcefDb.getNodeCoordsgetNodeCoords III.2.1.9  
     


III.2.1 ``SamcefDb'' class

A ``SamcefDb'' object can be created by a statement using ``SamcefDb.newnew'' method like:

    db=SamcefDb.new()
Method ``SamcefDb.initializeinitialize'' initializes or clears a SamcefDb object. This class is a specialization of the FeResPost ``DataBase'' class.


III.2.1.1 Reading Samcef models

Method ``SamcefDb.readSamcefDatreadSamcefDat'' of the SamcefDb class is used to import the model in a SamcefDb. This function has up to three arguments:

The model can be split into several files loaded in a main file by input statements. However, the user should try to be conservative when splitting its model. For example: Here is a few examples of valid input statements:
    input "../SPLIT_1/grids.dat"
    input "../SPLIT_1/elements.dat"
    input.beginC "../SPLIT_1/props.dat"
    input.beginB "../SPLIT_1/geom.dat"
    input "/home/ferespost/SAM_SPLIT/SPLIT_1/mecano.dat"

Note that for a reason unknown, the ``.sauve banque'' bacon command outputs the list of abbreviations defined in a database at the end of the banque after a ``return'' statement. This ``return'' statement must be removed or commented out if the abbreviations are to be imported in the database by the ``SamcefDb.readSamcefDatreadSamcefDat'' command.


III.2.1.2 ``CoordSys'' methods

The ``CoordSys'' class allows the manipulation of coordinate systems for post-processing purpose. This class is presented in Chapter I.2. One presents below the methods of SamcefDb class devoted to the manipulation of coordinate systems.

III.2.1.2.1 ``getCoordSysCopy''

The ``SamcefDb.getCoordSysCopygetCoordSysCopy'' method returns a CoordSys object which is a copy of a coordinate system stored in the DataBase. The method has one integer argument which is the index of the coordinate system.

Note that the CoordSys returned by the method may be a ``generic'' CoordSys as presented in Chapter I.2, or a Samcef frame.

III.2.1.2.2 ``addCoordSys''

The ``SamcefDb.addCoordSysaddCoordSys'' method is used to add a coordinate system to the DataBase. The argument of the method is the CoordSys object. In the DataBase, the object is referenced by its index.

If a coordinate system with the same index already exists in the SamcefDb, it is replaced by the new coordinate system. In that case, the user is responsible for all the modifications involved in the finite element model by the possible modification of the SamcefDb coordinate system. Therefore, it is considered as a good practice not to modify a coordinate involved in the finite element model definition.

Note that the coordinate system index must be a strictly positive integer. Also, the CoordSys inserted by the method may be a ``generic'' CoordSys as presented in Chapter I.2, or a Samcef frame.

III.2.1.2.3 ``SamcefDb.makeAllCoordSysWrt0makeAllCoordSysWrt0''

This method updates the definition wrt 0 (most basic coordinate system) of all the coordinate systems stored in a NastranDB. This operation is necessary when a coordinate system of the NastranDB has been modified, because the definitions of other coordinate systems wrt 0 may be affected.


III.2.1.3 Construction of Groups by association operations

The list of ``SamcefDb'' methods returning Groups defined by association is given below:


III.2.1.4 Methods related to Results importation

III.2.1.4.1 ``readDesFac'' method

``SamcefDb.readDesFacreadDesFac'' 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:

  1. The first argument is a String containing the name of the ``des'' file. This argument is mandatory.

  2. 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.

  3. 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.

  4. 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 unpractical for many problems.

  5. 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.

  6. 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.

  7. 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 ``NastranDb.readOp2readOp2'' 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 ``SamcefDb.readDesFacreadDesFac'' 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:

III.2.1.4.2 Flags for reading of Results

Flags influencing the behavior of ``SamcefDb.readDesFacreadDesFac'' method can be defined. The following singleton methods have been defined to manipulate the flags:

  1. ``SamcefDb.desFacResetFlagsdesFacResetFlags'' resets all the flags to false (default values). This method has no arguments.

  2. ``SamcefDb.desFacSetFlagdesFacSetFlag'' 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"])
        ...
    

  3. ``SamcefDb.desFacUnsetFlagdesFacUnsetFlag'' sets one flag to false. This method has one String argument.

  4. ``SamcefDb.desFacGetFlagdesFacGetFlag'' 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:

Similarly, two singleton methods allow to enable or disable Samcef Result codes:

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.


III.2.1.5 Attaching ``DES/FAC'' files to a Samcef DataBase

Since version 3.5.0, FeResPost allows a random access to DES/FAC result files. This method is more efficient than the methods that import Results into the DataBase, and extracting copies of these Results. A peculiar case in which the random access methods will be more efficient is when only some small parts of the Result file are of interest to the programmer.

The principle of random access is as follows:

The different methods called to perform these operations are described in the following sub-sections.

Note that the content of DES file is read only when the DES/FAC files are attached to the DataBase. After that, the DES file is closed. This is why when information is extracted from a peculiar attachment, the attachment is identified by the name of the FAC file.

III.2.1.5.1 Managing DES/FAC file attachments

The method ``SamcefDb.attachDesFacattachDesFac'' is used to attach a DES/FAC file to the Samcef DataBase. This method has between two and four arguments:

  1. A String containing the name of the DES file. (Full path name must be provided.)
  2. A String containing the name of the FAC file. (Full path name must be provided.)
  3. An integer or an Array of integers identifying load cases.
  4. A String or an Array of Strings corresponding to the names that are attributed to the load cases and which shall be used to retrieve corresponding Results.
The arguments 3 and 4 are optional. They correspond to arguments 3 and 4 of the ``SamcefDb.readDesFacreadDesFac'' method discussed in section III.2.1.4.

Several other methods are used to manage the DES/FAC attachments to a DataBase:

III.2.1.5.2 Extracting information from DES/FAC attachments

The following methods extract information related to the Results stored in DES/FAC files attached to the DataBase:

All these methods have a single String argument containing the name of the FAC file that must have been previously attached to the DataBase. On the other hand, the following methods have one or two arguments: The first argument is the name of the FAC file that must have been previously attached to the DataBase. The second argument is optional and corresponds to the name of a load case found in the attached FAC file. If the argument is not provided, all the load cases are investigated to build the list of sub-cases or Result names or IDs. If the argument is provided, only the sub-cases or Results of the corresponding load case are considered. If the provided load case does not exist in FAC attachment an error message is issued.

III.2.1.5.3 Extracting Results from attachments

The method ``SamcefDb.getAttachmentResultsgetAttachmentResults'' is used to read Results from the FAC file. The Results are directly returned by the method to the caller. They are not inserted in the DataBase from which the method is called.

The method has minimum four arguments:

  1. A String corresponding to the name of FAC file attachment from which Results are read. (This file must have been previously attached to the DataBase.)
  2. A String corresponding to the name of the load case for which Results are read.
  3. A String or an Array of Strings corresponding to the names of sub-cases for which Results are read.
  4. A String or an Array of Strings corresponding to the names of Results for which Results are read.
The other arguments are optional and correspond to the specification of target entities for which Results are read. Actually, the reading operation from a FAC file combines the reading and some of the extraction operations described in section I.4.2. For example: One can extract Results without specifying the ResKeyList, Result or Group argument. However, it is still possible to specify a list of layers, a list of sub-layers, and a location to filter the values that are inserted in Results. The ``Location'' argument corresponds to the ``Method'' argument when Results are extracted on Groups. Possible values of this parameter are ``Elements'', ``ElemCenters", ``ElemCorners''...

Only lists below the list of valid calls to ``SamcefDb.getAttachmentResultsgetAttachmentResults'':

        h=db.getAttachmentResults(facName,lcName,scNames,resNames,
                method,grpTarget[,layers[,subLayers]])
        h=db.getAttachmentResults(facName,lcName,scNames,resNames,
                resTarget)
        h=db.getAttachmentResults(facName,lcName,scNames,resNames,
                rklTarget)
        h=db.getAttachmentResults(facName,lcName,scNames,resNames
                [,layers[,sub-Layers[,location]]])
As several Result types, and sub-case names can be given as argument to ``SamcefDb.getAttachmentResultsgetAttachmentResults'' method, this method can return several Results. This is why Results are returned in a Hash: For example, the list of extracted Result sizes can be printed with the following statements:
    h=db.getAttachmentResults(facName,lcName,scNames,resNames,"Nodes",grp)
    h.each do |id,res|
        lcName=id[0]
        scName=id[1]
        resName=id[2]
        size=res.Size
        STDOUT.printf("%s - %s - %s : %d\n",lcName,scName,resName,size)
        #~ Util::printRes(STDOUT,"brol",res)
    end

The method ``SamcefDb.getAttachmentResultsCombiligetAttachmentResultsCombili'' is used to extract linear combinations of elementary Results found in one or several attached FAC files. As for method ``SamcefDb.getAttachmentResultsgetAttachmentResults'' the Results are directly returned by the method to the caller. They are not inserted in the DataBase from which the method is called. This method is more or less a combination of the methods ``SamcefDb.getAttachmentResultsgetAttachmentResults'' and ``DataBase.buildLoadCasesCombilibuildLoadCasesCombili'' of the generic DataBase class.

Practically, the main difference between ``SamcefDb.getAttachmentResultsgetAttachmentResults'' and ``SamcefDb.getAttachmentResultsCombiligetAttachmentResultsCombili'' is that the first argument is no longer a FAC file name. This argument is removed. Instead, one provides a ``Combili'' argument that describes the linear combination corresponding to extracted Results. This ``Combili'' argument is the second argument. The first argument is the ``LcName'' argument corresponding to the load case name attributed to the generated Results. This load case name is not supposed to correspond to any load case name found in the attached FAC file(s).

The method has minimum four arguments:

  1. A String corresponding to the name of the load case for which Results are read.
  2. A ``Combili'' Array containing the description of the linear combination of elementary load case Results. The Array is an Array of Arrays. Each secondary Array contains three elements:
  3. A String or an Array of Strings corresponding to the names of sub-cases for which Results are read.
  4. A String or an Array of Strings corresponding to the names of Results for which Results are read.
The other arguments are optional and correspond to the specification of target entities for which Results are read. Actually, the reading operation from a FAC file combines the reading and some of the extraction operations described in section I.4.2. For example: One can extract Results without specifying the ResKeyList, Result or Group argument. However, it is still possible to specify a list of layers, a list of sub-layers, and a location to filter the values that are inserted in Results. The ``Location'' argument corresponds to the ``Method'' argument when Results are extracted on Groups. Possible values of this parameter are ``Elements'', ``ElemCenters", ``ElemCorners''...

Only lists below the list of valid calls to ``SamcefDb.getAttachmentResultsCombiligetAttachmentResultsCombili'':

        h=db.getAttachmentResultsCombili(lcName,combili,scNames,resNames,
                method,grpTarget,layers)
        h=db.getAttachmentResultsCombili(lcName,combili,scNames,resNames,
                method,grpTarget)
        h=db.getAttachmentResultsCombili(lcName,combili,scNames,resNames,
                resTarget)
        h=db.getAttachmentResultsCombili(lcName,combili,scNames,resNames,
                rklTarget)
        h=db.getAttachmentResultsCombili(lcName,combili,scNames,resNames,
                layers)
        h=db.getAttachmentResultsCombili(lcName,combili,scNames,resNames)
The Hash object returned by the method has a structure identical to the one returned by ``SamcefDb.getAttachmentResultsgetAttachmentResults'' and can be manipulated the same way.

III.2.1.5.4 Storage buffers for result files random access

In order to reduce the number of accesses to disk, it may be useful to store some of the blocks read from binary result files into memory. FeResPost provides an algorithm that allows to store the blocks most recently read for later usage. Two singleton methods of the ``SamcefDb'' class allow the to tune the capacity of the buffer area:

Note that all buffers are now common to all the methods that provide random access to XDB and FAC result files. In particular, the method is used in management of the binary file access for XDB and FAC attachment or reading. This means that if one Result file attached to one DataBase is more used, the storage will contain a majority of buffers for this Result file and progressively delete the other buffers.

The default capacity for storage buffer is 0Mb. Note that the two methods described above can be called from any class derived from the generic ``DataBase'' class.


III.2.1.6 GMSH outputs

The method ``DataBase.writeGmshMeshwriteGmshMesh'' defined in DataBase Class exports nodes and elements into the mesh file. The three tags attributed to the elements are the first and second element attributes and the laminate ID.


III.2.1.7 Production of additional Results

The method ``SamcefDb.generateShellOffsetsResultgenerateShellOffsetsResult'' defined in SamcefDb Class generates a Result corresponding to shell offsets for 2D elements. The method has no argument or three arguments. The arguments correspond to the key to which the Result object is associated in the SamcefDb object. (load case name, subcase name, and result name respectively.) If the String arguments are omitted, one assumes ``'', ``'' and ``Coordinates'' for the Result key.


III.2.1.8 Iterators

A first group of iterators iterate on finite element entities of the finite element model stored in the DataBase.

The elements produced by the iterator are single integers. Each of these iterators has 0, 1 or 2 arguments. The two optional arguments are the integer bounds considered for the iteration: ``IdMin'' and ``IdMax''.

Two methods allow the iteration on the elements of associative containers used to record the correspondence between integer and String identifiers of the samcef Groups stored in the DataBase:

Two iterators loop on the nodes defining an element:

These two iterators have one integer argument corresponding to the index of the element. The return the integer indices of nodes.


III.2.1.9 Other methods

Several other methods allow to obtain model information.


III.2.2 Samcef Results characteristics

One makes here the distinction between general Results and composite Results.

III.2.2.1 General Results

General Results (by opposition to Composite Results) are presented in Tables III.2.2 to III.2.4. (One makes the distinction between Scalar, Vectorial and Tensorial Results.) About the Results described, one can make the following comments:

  1. The shear components of strain tensor output by Samcef should be (and generally are) components of a tensor ( $ \epsilon_{ij}=\gamma_{ij}/2$ ). The same convention is used for all the tensors manipulated in FeResPost. So, no manipulation of the shear components is made when importing strain tensors from Samcef Results.

    Note however that because of a bug in Samcef, strain results given at center of elements may be wrong and use the ``angular deformation'' convention. So the use should be careful when manipulating strain tensor Results imported from Samcef.

    A flag influencing the importation of Results with ``SamcefDb.readDesFacreadDesFac'' method allows the modification of shear components of 2D elements strain tensor: the `ANGULAR_STRAIN_BUG'' flag. When set to ``true'', the shear components of Strain tensor are divided by two. This division by two is done for the result codes 3421, 3445 and 3446. It is the responsibility of the user to check whether the setting of the flag is necessary or not.

    See more information about the methods used to manipulate the flags in section III.2.1.4.

  2. The ''Mechanical Strain Tensor'' Result corresponds to the Strain Tensor estimated from Stress Tensor without considering thermo-elastic or hygro-elastic effects into account.

  3. All result codes corresponding to Von Mises stress are skipped. However, Von Mises stress can always be generated by derivation from stress tensor Results.

  4. The Result ``Shell Forces'' contains the contributions of several Samcef Result codes: the shell element normal forces (code x437) and the shell element shear forces (code x251).

  5. Samcef ``beam'' type elements do not output vectorial or tensorial forces or moments. Instead, the different components are expressed in different coordinate systems. When importing these Results, a conversion into tensorial format is done as follows:

       $\displaystyle \mbox{\boldmath$F$}$$\displaystyle =\left(
\begin{array}{ccc}
F_{xx} & F_{xy} & F_{xz} \\
F_{...
...} & T_{2} \\
T_{1} & 0 & 0 \\
T_{2} & 0 & 0
\end{array}
\right)\ ,
$

       $\displaystyle \mbox{\boldmath$M$}$$\displaystyle =\left(
\begin{array}{ccc}
M_{xx} & M_{xy} & M_{xz} \\
M_{...
... & F_{1} \\
-F_{2} & 0 & 0 \\
F_{1} & 0 & 0
\end{array}
\right)\ .
$

    (One uses here the notation of the Samcef manual for the components stored in ``fac'' file: $ N$ corresponds to the axial component of force, $ T$ to the shear forces, $ M$ to the torsion moment and $ F$ to the bending moment.)

    Beam forces and moments are also saved in ``fac'' file for bushing elements. Then, the longitudinal axis may be $ z$ if axisymmetric properties are attributed to the element. Then, the components are inserted in 2D tensors as follows:

       $\displaystyle \mbox{\boldmath$F$}$$\displaystyle =\left(
\begin{array}{ccc}
0 & 0 & F_{xz} \\
0 & 0 & F_{yz...
...} \\
0 & 0 & F_{2} \\
F_{1} & F_{2} & F_{3}
\end{array}
\right)\ ,
$

       $\displaystyle \mbox{\boldmath$M$}$$\displaystyle =\left(
\begin{array}{ccc}
0 & 0 & M_{xz} \\
0 & 0 & M_{yz...
...} \\
0 & 0 & M_{2} \\
M_{1} & M_{2} & M_{3}
\end{array}
\right)\ .
$


Table III.2.2: Correspondence between Samcef Result Codes and Scalar Results generated in FeResPost.
Samcef Result Code Generated Result
1305 ``Contact, Contact Pressure''
1306 ``Contact, Friction Stress''
1307 ``Contact, Normal Distance''
2051 ``Contact, Nodal Distance''
1440, 3440 ``Beam Axial Stress for Total Loads''
1450, 3450 ``Beam Shear Stress for Total Loads''


Table III.2.3: Correspondence between Samcef Result Codes and Vectorial Results generated in FeResPost.
Samcef Result Code Generated Result
153 ``Coordinates''
163 ``Displacements, Translational''
191 ``Displacements, Rotational''
221
``Reaction Forces, Forces'', ``Reaction Forces, Moments''
1439, 3439, 1524, 3524 ``Beam Forces'' (5)
1439, 3439, 1525, 3525 ``Beam Moments'' (5)
1532 ``Grid Point Forces, Reaction Forces''
1533 ``Grid Point Forces, Reaction Moments''
1534 ``Grid Point Forces, Internal Forces''
1535 ``Grid Point Forces, Internal Moments''


Table III.2.4: Correspondence between Samcef Result Codes and Tensorial Results generated in FeResPost. (Stars ``*'' can be replaced by 1, 2 or nothing and are related to the sub-layer IDs.)
Samcef Result Code Generated Result
*1411, *1413, 1431, 1435, 1436, *3411, *3413, 3431, 3435, 3436,
``Stress Tensor''
*1421, 1445, 1446, *3421, 3445, 3446
``Strain Tensor'' (1)
*1423, *3423
``Mechanical Strain Tensor'' (2)
1251, 1437, 3251, 3437 ``Shell Forces'' (4)
1438, 3438 ``Shell Moments''


Table III.2.5: Correspondence between Samcef Result Codes for Mecano Thermal Results.
Samcef Result Code Generated Result
120 ``Temperature''
121 ``Temperature Variation Rate''
1379, 3379 ``Specific Heat Energy''
1511, 3511 ``Conductive Heat Flux''
1801, 3801 ``Applied Heat Flux''

III.2.2.2 Composite Results

One presents below a few comments above the composite Results presented in Tables III.2.6 to III.2.8:

  1. Composite Results have non-linear dependence on the primary unknowns (displacements and rotations). Therefore, composite Results obtained by linear combination of elementary Results are false.
  2. With Samcef, it is also possible to output ply Results in the upper and lower layers of each ply (codes 1xxxx and 2xxxx). FeResPost reads results at mid layer of each ply only. The other Results are skipped. (Note that most composite calculation methods usually use the forces in plies recovered at mid-thickness.)
  3. Even though the maximum stress and strain failure indices are presented in Samcef and FeResPost as tensorial Results, the six components for each location are not the components of a tensor. Therefore, the user must be very careful when using those Results. In particular transformations of coordinate systems for those Results are meaningless.
  4. Composite critical ply failure indices give for each element the maximum failure index in one of the plies. Also, the evaluation is done at the Gauss points of each ply and each elements and the maximum is collected.
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.


Table III.2.6: Correspondence between Samcef Result Codes for Scalar failure indices generated in FeResPost (4). (Stars ``*'' can be replaced by 1, 2 or nothing and are related to the sub-layer IDs.)
Samcef Result Code Generated Result
*1621, *3621 ``Composite Failure Index, Tsai-Hill Version 1''
*1622, *3622 ``Composite Failure Index, Tsai-Hill Version 2''
*1623, *3623 ``Composite Failure Index, Tsai-Hill Version 3''
*1624, *3624 ``Composite Failure Index, Tsai-Wu''
*1625, *3625 ``Composite Failure Index, Hashin Version 1''
*1626, *3626 ``Composite Failure Index, Hashin Version 2''
*1627, *3627 ``Composite Failure Index, Hashin Version 3''
*1630, *3630 ``Composite Failure Index, Stress Ratio''
*1631, *3631 ``Composite Failure Index, Strain Ratio''
*1632, *3632 ``Composite Failure Index, Rice and Tracey''
*7621 ``Composite Critical Ply Failure Index, Tsai-Hill Version 1''
*7622 ``Composite Critical Ply Failure Index, Tsai-Hill Version 2''
*7623 ``Composite Critical Ply Failure Index, Tsai-Hill Version 3''
*7624 ``Composite Critical Ply Failure Index, Tsai-Wu''
*7625 ``Composite Critical Ply Failure Index, Hashin Version 1''
*7626 ``Composite Critical Ply Failure Index, Hashin Version 2''
*7627 ``Composite Critical Ply Failure Index, Hashin Version 3''
*7628 ``Composite Critical Ply Failure Index, Maximum Strain, CompMax''
*7629 ``Composite Critical Ply Failure Index, Maximum Stress, CompMax''
*7630 ``Composite Critical Ply Failure Index, Stress Ratio''
*7631 ``Composite Critical Ply Failure Index, Strain Ratio''
*7632 ``Composite Critical Ply Failure Index, Rice and Tracey''


Table III.2.7: Correspondence between Samcef Result Codes for Scalar critical plies generated in FeResPost (4).
Samcef Result Code Generated Result
8621 ``Composite Critical Ply, Tsai-Hill Version 1''
8622 ``Composite Critical Ply, Tsai-Hill Version 2''
8623 ``Composite Critical Ply, Tsai-Hill Version 3''
8624 ``Composite Critical Ply, Tsai-Wu''
8625 ``Composite Critical Ply, Hashin Version 1''
8626 ``Composite Critical Ply, Hashin Version 2''
8627 ``Composite Critical Ply, Hashin Version 3''
8628 ``Composite Critical Ply, Maximum Strain, CompMax''
8629 ``Composite Critical Ply, Maximum Stress, CompMax''
8630 ``Composite Critical Ply, Stress Ratio''
8631 ``Composite Critical Ply, Strain Ratio''
8632 ``Composite Critical Ply, Rice and Tracey''


Table III.2.8: Correspondence between Samcef Result Codes for Tensorial failure indices generated in FeResPost (3).
Samcef Result Code Generated Result
1628, 3628 ``Composite Failure Index, Maximum Strain''
1629, 3629 ``Composite Failure Index, Maximum Stress''

The correspondence between the failure indices read from Samcef result files and Results produced by CLA classes is as in Table III.2.9. Sometimes a single Samcef Result corresponds to two different CLA failure criteria. Then, the type of element (2D or 3D) allows the identification of the appropriate CLA criterion.


Table III.2.9: Correspondence between the Samcef failure indices imported from ``des/fac'' files and the failure criteria defined in CLA module.
Samcef Result CLA criterion ID section
``Composite Failure Index, Tsai-Hill Version 1'' (2D elements) ``TsaiHill_b'' II.1.10.10
``Composite Failure Index, Tsai-Hill Version 1'' (3D elements) ``TsaiHill3D_b'' II.1.10.13
``Composite Failure Index, Tsai-Hill Version 2'' (2D elements) ``TsaiHill'' II.1.10.9
``Composite Failure Index, Tsai-Hill Version 2'' (3D elements) ``TsaiHill3D'' II.1.10.12
``Composite Failure Index, Tsai-Hill Version 3'' ``TsaiHill'' II.1.10.9
``Composite Failure Index, Tsai-Wu'' ``TsaiWu3D'' II.1.10.15
``Composite Failure Index, Hashin Version 1'' ``Hashin3D'' II.1.10.19
``Composite Failure Index, Hashin Version 2'' ``Hashin3D_b'' II.1.10.19
``Composite Failure Index, Hashin Version 3'' ``Hashin3D_c'' II.1.10.19
``Composite Failure Index, Hoffman'' ``Hoffman'' II.1.10.16
``Composite Failure Index, Maximum Strain, CompMax'' ``MaxStrain3D'' II.1.10.7
``Composite Failure Index, Maximum Stress, CompMax'' ``MaxStress3D'' II.1.10.5
``Composite Failure Index, Interlaminar Shear Stress'' ``Ilss'' II.1.10.25

Important remarks must be done about the coordinate system associated to each value in the Result objects:


III.2.3 Methods defined in ``Post'' module

The method ``SamcefDb.readGroupsFromSamcefDatreadGroupsFromSamcefDat'' reads Groups from a Samcef Bacon data file and returns a Hash containing the list of Groups. (This method is similar to ``NastranDb.readGroupsFromPatranSessionreadGroupsFromPatranSession'' also defined in ``Post'' module.) The keys are Group names, and the values are the Groups. The method has two arguments:

  1. A String corresponding to the name of the session file.
  2. A DataBase. This argument is optional. If it is provided, the reading method removes from the created Groups all the entities undefined in the DataBase argument.
The definition of Groups must be done according to the ``.SEL'' command of the Bacon files. Only the lines in the ``.SEL'' commands are considered. More model definition command may be present in the file but they are ignored. Examples of use of the method follow:
      ...
      h=Post::readGroupsFromSamcefDat("groups.dat")
      ...
      h=Post::readGroupsFromSamcefDat("groups.dat",DB)
      ...


next up previous contents index
Next: IV. FeResPost Examples with Up: III. Solver Preferences Previous: III.1 Nastran Preferences   Contents   Index
FeResPost 2017-05-28