mat2subst


Purpose

Convert matrices to substructure format.

Syntax

sub=mat2subst(mat)
sub=mat2subst(mat,'silent')

Description

MAT2SUBST takes the matrix structure supplied in MAT and returns a substructure matrix in OUT.

MAT is an array of structures containing matrices in the format returned by READNAS and a few other IMAT functions. At minimum these must have the fields 'name', 'matrix', and 'dof'. MAT2SUBST expects the matrices to have one of the following names:

mass MXX, MXXGEXT, MCGG, MRGG, MAA, MAAX, M100, M10, MATK
stiffness KXX, KXXGEXT, KCGG, KRGG, KAA, KAAX, K100, K10, MATM
constraint GO, GOGADGX, UEXP, UEXPT, MUG1, MUG1T
hysteretic K4XX, K4XXGEXT, K4CGG, K4RGG, K4AAX, K4100, K410, MATK4
viscous BXX, BXXGEXT, BCGG, BRGG, BAAX, B100, B10, MATB

 

MAT2SUBST copies the matrices it finds into the output structure. The DOF defined for the mass, stiffness, and columns of the constraint matrix are placed in the 'aset' field, and the row DOF for the constraint matrix is placed in the 'oset' field.

If the mass or stiffness matrix is upper or lower triangular, MAT2SUBST will fill in the missing portion of the matrix.

MAT2SUBST will also make sure the mass and stiffness matrices are the same size and use the union of the two sets of DOF.

The optional input string 'silent' suppresses output.

OUT is a structure containing the matrices found in the input structure. This structure is the format used by WRITESUBST.

Examples

>> f=readnas
Units set to IN
OP2 Name: C:\plate_modes_guyan.op2
Units   : <1> SI
...Opened OP2 file 'C:\plate_modes_guyan.op2'
...Reading OP2 directory block names...18 data blocks from 70 records
...Reading GEOM1 and GEOM2 data from OP2 file...
...Processing GEOM1 data
...Processing GEOM2 data
...Reading matrix 'KXX' from OP2 file...
...Reading matrix 'MXX' from OP2 file...
...Reading matrix 'GO' from OP2 file...
...Finished processing input file
...Done!

f =
    matrix: [1x3 struct]

>> sub=mat2subst(f.matrix)
...Filling in mass matrix
...Filling in stiffness matrix
...Filling in constraint matrix

sub =
          aset: [35x1 imat_ctrace]
          oset: [10x1 imat_ctrace]
          sset: [0x0 imat_ctrace]
          mass: [35x35 double]
     stiffness: [35x35 double]
       viscous: []
    hysteretic: []
    constraint: [10x35 double]

>>

See Also

readnas, writesubst