The “fillCard” method allows retrieval of an Array corresponding to a Nastran BDF card. The method has two arguments:
A String corresponding to the type of entity whose definition is requested. Possible values of the argument are “CoordSys”, “Element”, “Node”, “RBE”, “MPC”, “Property” and “Material”.
An integer corresponding to the ID of the FEM item whose definition is sought.
The method returns the definition in an Array:
The first element of the Array (corresponding to index 0), is a String containing the name of the Nastran card.
Elements 1 to 8 correspond to the first line in the card definition (small field format).
Elements 9 to 16 correspond to the second line in card definition (small field format).
For each line, the fields 1 and 10 are neglected, except for the first line in which field 1 contains the name of the Nastran card.
Note that a Nastran model may contain several material cards sharing a common ID, or several MPC cards with the same ID. When this case occurs, an exception is thrown. Therefore, for MPC or material cards, it is advised to use “fillCards” method instead of “fillCard”. An exception is also thrown when no FEM item matching specified ID is found.
The “fillCards” method allows retrieval of an Array containing BDF cards as those returned by “fillCard” method. (This means that “fillCards” method returns an Array of Arrays.) The method has two or three arguments:
A String corresponding to the type of entity whose definition is requested. Possible values of the argument are “CoordSys”, “Element”, “Node”, “RBE”, “MPC”, “Property” and “Material”.
An integer corresponding to the minimum ID of the FEM items whose definitions are sought.
An integer corresponding to the maximum ID of the FEM items whose definitions are sought.
Third argument is optional. When omitted, one considers that maximum ID = minimum ID. In such cases, the method generally returns at most one BDF card. However, for materials and MPCs, a single ID may correspond to several items. The method returns the definition in an Array of Arrays. Each element of the main Array is a Nastran BDF card as those returned by “fillCard” method.
Method “insertCard” performs the reverse operation: it is used to update the “NastranDb” database by insertion of FEM entity (coordinate system, node, element, RBE, material...). The method “insertCard” has one argument: an Array containing the different fields of the card. The conventions for the components of the Array are exactly the same as for the Array returned by method “fillCard” discussed above. (This means that the first element of the Array, of index 0, is a String corresponding to the name of the Nastran card.)
Method “insertCards” corresponds to “insertCard” but allows insertion of several cards with a single call to the method. The argument of the method is then an Array of Arrays.
Remarks about the insertion methods:
It is strongly recommended to use “insertCards” method instead of “insertCard” to limit the number of calls to the method. Indeed, at the end of each insertion, FeResPost updates a large number of data structures in the “NastranDb” class, in this can take some time. (These data structures correspond, for example, to containers associating elements and properties, elements and materials, nodes and elements...) Therefore, a good way to work would be to collect all the cards to be inserted in the model in a big Array, and perform the insertion operation only once.
If a FEM entity is inserted that already exists in the database, the pre-existing entity is replaced by the new one. If an entity is defined twice in the argument cards, only the last card will remain inserted in the database at the end.