Question QA-001:

How do I save the ADINA global stiffness and mass matrices into a file?

Answer:

To save the global stiffness matrix (and mass matrix in implicit dynamic problems) the command DISK-STORAGE GLOBAL-MATRIX=SAVE should be used. In the user interface, this option can be specified using Control > Miscellaneous File I/O >, then check "Save the Global Matrix" in the dialog box. The "Save Step:" textfield is used to specify the step number you want to save the matrices for a nonlinear analysis. For nonlinear analysis, the matrices are saved at iteration zero.

On UNIX systems, the data is saved into the file <problem_name>.mtx. On PC Windows, the file name is fort.70. This will be corrected to <problem_name>.mtx in the next release.

The Fortran format of the data stored is as follows:

      WRITE (70,*) ' MAXA ARRAY'
      
      WRITE (70,1000) ((I,MAXA(I)),I=1,NEQ+1)
 1000 FORMAT(1X,I8,5X,I8)
      
      WRITE (70,*) ' GLOBAL STIFFNESS MATRIX'
      
      WRITE (70,1001) ((K,A(K)),I=1,NWK)
 1001 FORMAT(1X,I8,5X,E20.13)
      
      WRITE (70,*) ' GLOBAL MASS MATRIX'
  

Then the global consistent or lumped mass matrix is written. For consistent mass matrix, the format is:

      WRITE (70,1002) ((K,AM(K)),I=1,NWK)
 1002 FORMAT(1X,I8,5X,E20.13)
  

For lumped mass matrix the format is:

      WRITE (70,1003) ((K,AM(K)),I=1,NEQ)
 1003 FORMAT(1X,I8,5X,E20.13)
  

The parameters:
 
NEQ - total number of equations, and
NWK - number of matrix elements
 
can be found in the <problem_name>.out file.

Note that the matrices are only meaningful when the DIRECT (Gauss elimination) equation solver is used (command MASTER ... SOLVER=DIRECT).

If substructures are used in the model, the sequence above is repeated for each substructure and then for the main structure.

An example showing how to store the stiffness matrix and consistent mass matrix of one BEAM element structure is given in qa001.zip which you can download.


ADINA logo