FeResPost Web Site                     FeResPost Online User Manual

VII.4.7 Extraction of dynamic response Results

This example shows how the COM component can be used to investigate the results of Nastran dynamic response analyses.

The main difference between this example and the simple result extraction of section VII.4.4 is that a sub-case is no longer selected for result extraction. Instead, the extraction is performed for all the sub-cases corresponding to the specified load case. When results are printed in the cells, each line corresponds to one sub-case (i.e., one frequency).

The different entities are arranged in the columns of the spreadsheet. This somewhat limits the number of FE entities for which results can be retrieved. This is why, in this case, the group is specified directly by defining the integer IDs of its elements and nodes. The group is also defined by specifying the type of the entities being inserted (“EntityTypeSelector” ComboBox).

It was also decided to extract only one component per value.

When all the parameters have been defined, the “Extract” button performs the following operations in the corresponding VBA subroutine:

1.

The current NastranDb database is retrieved using the “getDb” method of the FemDbIds spreadsheet.

2.

The names of the different sub-cases found in the XDB file are retrieved by the “getXdbScNames” method of the “NastranDb” class and stored in an Array of Strings. This list of sub-cases is used to read results from the XDB file.

3.

The names of the selected load case, sub-case and result type are used to import results into the current database. (Results are imported for one load case, one result type, and all sub-cases.)

4.

The group corresponding to the entity type and the list of integers defined in the left part of the spreadsheet is created. This group is used to extract results from the database.

5.

The “getXdbLcInfos” method of the “NastranDb” class is used to obtain information on the load cases and sub-cases defined in the XDB file. The advantage of this method is that it returns the results in increasing order of frequency and makes it easy to retrieve the sub-case names and their associated frequencies.

6.

A loop is then performed over the different sub-cases. For each sub-case:

(a)

The result is extracted on the selected group.

(b)

The reference coordinate system is modified if necessary.

(c)

The selected component is extracted.

(d)

The magnitude and phase are retrieved for the different entities.

An Array containing the data is built. The rows of the Array correspond to the sub-cases. The columns correspond to the different entities and to the magnitude and phase. This Array is stored in the “ret” variable.

7.

The previous spreadsheet results are erased.

8.

The contents of the “ret” Array are pasted into the spreadsheet starting at line 51.

9.

The results stored in the database are removed by calling the “removeAllResults” method.

10.

The two charts are updated to plot the magnitude and phase for the different entities.

This spreadsheet works with complex results only.