4.5. Creating a User Superelement

One way to add user-defined behavior to a model is via superelements. APDL Math allows you to import, modify, and create superelement matrices that you can then export to a superelement .sub file for use in subsequent analyses.

Importing from existing .sub files or from NASTRAN dmig files is straightforward. These matrices can be modified using existing APDL or APDL Math operations and the modified matrix exported to a new .SUB file. Note that for a dmig file export, you must supply the nodal coordinates.

Creating a .sub file from scratch requires additional information. You must create (*DIM) an m x 2 array, where "m" is the number of master DOFs (rows in the matrix). In the first column, put the node number of the master DOF, and in the second column put the DOF number. This array is then passed to the *EXPORT,,SUB command. For example:

/prep7
! Provide coordinates for SUB file
N,11
N,12,1

! Allocate the matrix and define the values
*DMAT,myk,d,alloc,4,4
myk(1,1)=1.0
myk(2,2)=1.0
myk(3,3)=1.0
myk(4,4)=1.0
myk(1,3)=-0.5
myk(3,1)=-0.5

! Allocate the row information array and define its values
*DMAT,rowinfo,i,alloc,4,2
rowinfo(1,1)=11,11,12,12       ! nodes
rowinfo(1,2)=1,2,1,2           ! dofs
*PRINT,myk
*PRINT,rowinfo

! Export to a SUB file
*EXPORT,myk,sub,mysub.sub,stiff,rowinfo,done

! List its contents
SELIST,mysub,3