readmac

Given a reference mode in one result file, readmac searches for the best matched mode shape in a target file using model assurance criteria (MAC).

This is used to track modes between different result files of the same model by a scaled inner product comparison between the mode shapes. The modes with the highest MAC are considered the best match to the reference file; a MAC of 1 indicates a perfect match. The function supports alternative forms of the arguments in order to balance flexibility and conciseness.

Syntax

readmac(r_file, r_subcase, r_type, r_mode, t_file)

readmac(r_file, r_subcase, r_type, r_mode, t_file, [t_modes])

readmac(r_file, r_subcase, r_type, r_mode, t_file, [t_min], [t_max])

readmac(r_file, r_subcase, r_type, r_mode, t_file, [t_subcase], [t_type])

readmac(r_file, r_subcase, r_type, r_mode, t_file, [t_subcase], [t_type], [ t_modes])

readmac(r_file, r_subcase, r_type, r_mode, t_file, [t_subcase], [t_type], [t_min], [t_max])

Input

r_file
Reference result file.
r_subcase
Subcase ID in the reference file.
r_type
Type name (string) in the reference file.
r_mode
ID of reference mode shape.
t_file
Target result file to search.
t_modes
Optional argument. Integer to search the first N modes of the target file for a match.
t_min
Optional argument. Integer for the lower bound mode to begin the search in the target file.
t_max
Optional argument. Integer for the upper bound mode to terminate the search in the target file.
t_subcase
Optional argument. Subcase ID in the target file.
t_type
Optional argument. Type name (string) in the target file.

Example

Example 1
Template:
readmac("C:/tmp/test_1.h3d", 1,
"Eigen Mode (Grids)", 5, "C:/tmp/test_2.h3d")
Output:
{6415.48, 0.854522, 5}
Example 2
Template:
readmac("C:/tmp/test_1.h3d", 1,
Eigen Mode (Grids)", 5, "C:/tmp/test_2.h3d", 20)
Output:
{6415.48, 0.854522, 5}
Example 3
Template:
readmac("C:/tmp/test_1.h3d", 1,
"Eigen Mode (Grids)", 5, "C:/tmp/test_2.h3d", 1, 10)
Output:
{6415.48, 0.854522, 5}
Example 4
Template:
readmac("C:/tmp/test_1.h3d", 1,
"Eigen Mode (Grids)", 5, "C:/tmp/test_2.h3d", 1, "Eigen Mode (Grids)")
Output:
{6415.48, 0.854522, 5}
Example 5
Template:
readmac("C:/tmp/test_1.h3d", 1,
"Eigen Mode (Grids)", 5, "C:/tmp/test_2.h3d", 1, "Eigen Mode (Grids)", 20)
Output:
{6415.48, 0.854522, 5}
Example 6
Template:
readmac("C:/tmp/test_1.h3d", 1,
"Eigen Mode (Grids)", 5, "C:/tmp/test_2.h3d", 1, "Eigen Mode (Grids)", 1, 10)
Output:
{6415.48, 0.854522, 5}

Comments

The return value is a vector of three numbers. The first entry is the frequency/eigenvalue of the best matched mode within the target file; this value may be useful in mode tracking problems. The second entry in the return vector is the MAC of the matched mode; this value may be useful when calibrating models to test data. The third value is the ID of the best matched mode within the target file; this is provided for completeness.

This function requires the two files to have matching meshes. Each node (request) and dof (component) from the result file are used in the calculation.

The performance of this function is mostly driven by the number of nodes (requests) and the number of nodes searched in the target file. For better performance, try one or both of following:
  1. Reduce the number of modes searched in the target file.
  2. Reduce the number of nodes (requests) in the files by using a reduced set of outputs (plot elements).