hexagon logo

How to export mass and stiffness matrices of a large model?

Hi,
 
up to now, I've applied the command EXTSEOUT (STIFFNESS MASS ASMBULK EXTID = 10 DMIGPCH) to get the matrices as a byproduct of the superelement reduction process.
This is ok for models of moderate size.
 
However, this approach seems not reasonable for rather large models (~1.000.000 nodes) as the intermediate files like *.DBALL are blown up to more than 16 GB and the computations take ages.
 
Since I'm not interested in the external superelement itself I'm wondering if there might be a simpler way to export the system matrices without extensive reduction computations.
 
Best regards,
Johannes
  • Are you incorporating CMS in the superelement reduction? Or are you just trying to get the FULL (GSET) matrices? If the size of the DBALL is a main concern, you can add the keyword SCR=YES to the submittal and the Master/DBALL won't be written to.
     
    Are there any MPC's, constraints, etc that you want incorporated into the reduced matrices?
     
    The following alter will print, punch and op4 the GSET mass and stiffness matrix... you can comment out whichever format you don't need:
     
    MALTER 'MALTER.*KGG.*MGG.*' $
    $
    MATGPR GPLS,USET0,SILS,MGG//'G'
    MATGPR GPLS,USET0,SILS,KGG//'G'
    $
    MATMOD KGG,EQEXIN,USET,,,/,/16/1/1//////////'KGGEXT'/'G' $
    MATMOD MGG,EQEXIN,USET,,,/,/16/1/1//////////'MGGEXT'/'G' $
    $
    output4 KGG,MGG,,,//0/30///15 $
     
    If you use the following MALTER instead of the one above, it will do the same for the ASET matrices... BUT this doesn't account for any CMS if doing a true SE reduction:
     
    MALTER 'MALTER.*KAA.*MAA.*' $
    $
    MATGPR GPLS,USET0,SILS,MAA//'A' $
    MATGPR GPLS,USET0,SILS,KAA//'A' $
    $
    MATMOD KAA,EQEXINS,USET,,,/,/16/1/1/s,n,dum1/////////'KAAEXT'/'A' $
    MATMOD MAA,EQEXINS,USET,,,/,/16/1/1/s,n,dum2/////////'MAAEXT'/'A' $
    $
    output4 KAA,MAA,,,//0/30///15 $
     
     
  • I'm not reducing the model, but I'd like to incorporate MPC and SPC sets.
    So what I'm doing is trying to get the "full" (ASET) matrices....
     
    Edit: Thanks for your quick reponse. I'm gonna try these commands then
    MATGPR GPLS,USET0,SILS,MAA//'A' $
    MATGPR GPLS,USET0,SILS,KAA//'A' $
  • The MATGPR will print them to the f06- that will make for a huge file... the MATMOD results in the matrices being punched to the pch file as DMIG matrices... this is usually what is desired.
     
    Also, if you add an "EXIT" command after the output commands, you can have the job 'stop' rather than continuing with the eigensolution, etc.
     
    Also, those commands aren't going to work by themselves, but require the MALTER line to place them in the correct location of the solution sequence.
  • Works fine so far!
    Unfortunately the *.pch file still exceeds 11GB as it's written in ASCII.
    The *.op4 is binary but unfortunately all of the matrix entries (including also all zero entries) are written to the file leading to large file sizes, too.
    Is it somehow possible to simply write the matrix information to a custom binary file in the following sparse format?
     
    row index, column index, non-zero value
  • Did you try using the SPARSE op4 option? Instead of a positive IUNIT value, use a negative IUNIT and it should write sparse format. Use the DMAP Programmers Guide to see how the OUTPUT4 module operates. The resulting file size can actually be larger if there aren't many imbedded zeros.
     
    For example, the following writes to Fortran unit 35:
     
    output4 KAA,MAA,,,//0/35///15 $ non-sparse
    output4 KAA,MAA,,,//0/-35///15 $ sparse
     
    Also, the DIGITS entry on the OUTPUT4 statement can be changed for less precision… in the example above, it is using 15 but the default is 9... this would reduce the file size.
     
    For example:
    DIGITS = 9, then the format will be 1P,5E16.9
    or if DIGITS = 15, then the format will be 1P,3E22.15
  • Hi Don,
     
    it seems like I've got to bother you once more.
    How can I obtain information on the A-set indices when I follow your op4 approach?
     
    MATGPR GPLS,USET0,SILS,MAA//'A' $
    MATGPR GPLS,USET0,SILS,KAA//'A' $
    output4 KAA,MAA,,,//0/-30///15 $
     
    Unlike pch files, this information seems not to be included in the op4 files....
  • That is correct- I think the best option is to use the USET print to the f06 and read that output with a python script or some other tool. Check out the following two parameters and play around with the options.
     
    PARAM,USETPRT,2
    PARAM,USETSTR1,A
     
    You will see a couple different formats printed to the f06, but here is one that is 'compact' and lists the grid id/DOF in ASET order.
     
                   U S E T  D E F I N I T I O N  T A B L E  ( I N T E R N A L  S E Q U E N C E ,  R O W  S O R T )
                                                          A       DISPLACEMENT SET
    0              -1-       -2-       -3-       -4-       -5-       -6-       -7-       -8-       -9-      -10-
     
         1=       2-1       2-2       2-3       2-4       2-5       2-6       3-1       3-2       3-3       3-4   =   10
        11=       3-5       3-6       4-1       4-2       4-3       4-4       4-5       4-6       5-1       5-2   =   20
        21=       5-3       5-4       5-5       5-6       6-1       6-2       6-3       6-4       6-5       6-6   =   30
        31=       7-1       7-2       7-3       7-4       7-5       7-6       8-1       8-2       8-3       8-4   =   40
        41=       8-5       8-6       9-1       9-2       9-3       9-4       9-5       9-6      10-1      10-2   =   50
        51=      10-3      10-4      10-5      10-6    9001-0    9002-0    9003-0    9004-0    9005-0
     
  • If anyone has a way to op4 this information, please post it!