General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Inhouse post-processor can’t read .rst file from 2021R2 version

    • igor.tsypkaykin
      Subscriber

      Dear all,

      We are using in-house post-processor which was working well with Ansys .rst files up the to version 2019R3. Recently we were pushed to start with version 2021R2. The post-processor fails already at .rst file header reading. As I understood there is some new features implemented in newer Ansys version .rst format.

      Is there any way to convert to the old .rst format?

      Regards

      Igor

    • mjmiddle
      Ansys Employee

      It was changed so that the result file is compressed by default using the /FCOMP command. See the /FCOMP documentation:

      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v241/en/ans_cmd/Hlp_C_FCOMP_sl.html

      Especially the link about third party tools:

      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v241/en/ans_prog/Hlp_P_INT2_1.html

      If you use workbench Mechanical, there is a setting in the Analysis Settings to turn off result compression:

       

    • igor.tsypkaykin
      Subscriber

      Many thanks for the reply!

      I have already faced the issue with the compression in version 2019R3, I am using  /FCOMP,rst,0 now.

      I guess the reason is in the "new format", see below:

      c                                  mapFlag - flag to indicate format of mapping
      c                                            index vectors for element types,
      c                                            real constants, coordinate systems,
      c                                            and sections.
      c                                            = 0, old format with 1 vector of
      c                                                 maxDef len
      c                                            = 1, new format with 2 vectors
      c                                                 each having numDef len

       

      The inhouse post-processor fails exactly on reading the element types description, see out put below:

       

      "
      ============= RESULT header ==================
      unit number : 12
      analysis type : 0
      maximum element number : 2279364
      maximum node number : 2044441
      number of sectors for cyclic sym : 1
      number of finite elements : 1375542
      NLGEOM key : 1
      actual number of nodes : 2044441
      number of data sets on the file : 1
      number of DOFs per node : 3
      maximum number of data sets allowed : 10000
       
      ============= GEOMETRY header ==================
      maximum number of nodes that a defined element may have : 20
      number of items describing an element type : 200
      maximum element type : 24
      maximum section : 0
      number of defined elements : 1375542
      number of defined nodes : 2044441
      number of materials : 11
      maximum size that any section record may have : 0
       
      ============= ELEMENT TYPES ==================
      code corner total nodes
      2 3 0 0
      3 4 0 0
      4 5 0 0
      5 6 0 0
      6 7 0 0
      7 8 0 0
      8 9 1 0
      9 10 0 0
      10 11 0 0
      11 12 9 0
      12 13 0 0
      13 14 6 0
      14 15 0 0
      15 16 0 3
      16 17 0 5
      17 18 2 0
      18 19 0 0
      19 20 0 2
      20 21 0 0
      21 22 0 0
      22 23 10 4
      23 24 4 0
      24 24 3 0

      "

      How Ansys decides which format (old or new) to use? Is there any way to force Ansys to use old format, or any way to convert .rst file to the old format?

      Unfortunately the developer of the post-processor left the company and re-programming will take time.

      Regards

      Igor

    • igor.tsypkaykin
      Subscriber

      Sorry, I forgot to add the output of the post-processor for the same FE model in v2019R3 (successful run):

      ============= RESULT header ==================
      unit number : 12
      analysis type : 0
      maximum element number : 2279364
      maximum node number : 2044441
      number of sectors for cyclic sym : 1
      number of finite elements : 1375542
      NLGEOM key : 1
      actual number of nodes : 2044441
      number of data sets on the file : 1
      number of DOFs per node : 3
      maximum number of data sets allowed : 10000
       
      ============= GEOMETRY header ==================
      maximum number of nodes that a defined element may have : 20
      number of items describing an element type : 200
      maximum element type : 24
      maximum section : 0
      number of defined elements : 1375542
      number of defined nodes : 2044441
      number of materials : 11
      maximum size that any section record may have : 0
       
      ============= ELEMENT TYPES ==================
      code corner total nodes
      1 187 4 10
      2 187 4 10
      3 187 4 10
      4 187 4 10
      5 186 8 20
      6 186 8 20
      7 174 4 8
      8 170 4 8
      9 174 4 8
      10 170 4 8
      11 174 4 8
      12 170 4 8
      13 174 4 8
      14 170 4 8
      15 174 4 8
      16 170 4 8
      17 174 4 8
      18 170 4 8
      19 174 4 8
      20 170 4 8
      21 174 4 8
      22 170 4 8
      23 174 4 8
      24 170 4 8
       
      Regards
      Igor
    • mjmiddle
      Ansys Employee

      This really gets into the User Programmable Features (UPF) with the APDL solver. I'm sorry, but I do not handle this. But I can explore the result file using the APDL command *XPL. Through testing, I found that the newer result file version with mapFlag=1 for GEO header was first done in Ansys 2021 R1. I don't see any APDL command for writing a result file in the older format, so I would guess the only way you could set the older format in a 2021 R1 or later version would be to set it in a UPF (source code) and compile/link into the Ansys executable. Therefore, I see no way to make your scripts run, as-is, with the nerwer versions, as-is.

      Take a note to the following documentation page as to the accuracy of the Programmer's Guide:

      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/ans_prog/Hlp_pma_pref.html 
      Note:  The Programmer's Reference is offered solely as an aid, and does not undergo the same rigorous verification as the Mechanical APDL product documentation set. Therefore, the Programmer's Reference is not considered to be part of the formal program specification as stated in your license agreement.

      To explore the new format, using *XPL command to explore an rst file with 5 element types, with the newer format of rst file, mapFlag=1 in GEO header, and then ETY has a header. 

      *XPL,OPEN,file.rst
      *XPL,READ,GEO,MyVec2 
      /com,%MyVec2(65)%    !mapFlag
      /com,%MyVec2(21)%    !ptrETYl

      *XPL,STEP,GEO
      *XPL,READ,ETY,MyVec3    !This is ETY header. External element type numbers 
      *print,MyVec3

       MYVEC3 :
       Size : 5
              1         2         3         4         5        <       5

      *XPL,STEP,ETY
      *XPL,List

       ::ETY::HEADER          Size =         32  B     Total  Size =      1.785 KB
       ::ETY::ETYPTR               Size =         32  B
       ::ETY::IETY1                Size =        404  B
       ::ETY::IETY2                Size =        404  B
       ::ETY::IETY3                Size =        368  B
       ::ETY::IETY4                Size =        264  B
       ::ETY::IETY5                Size =        324  B

      *XPL,READ,ETYPTR,MyVec4    ! Pointers for the external element type numbers listed in header. Relative to ptrETY
      *print,MyVec4

       MYVEC4 :
       Size : 5
             16       117       218       310       376        <       5

      *XPL,READ,IETY1,MyVec5    !"Element type description"
      *print,MyVec5
      !prints 200 values (length of record is etysiz in GEO header, MyVec2(19). May not always be 200) such as ET number, ENAME number (routine number), key opts, DOF per node, number nodes for element type, number of nodes having forces per element, number of nodes having stresses per element.

    • igor.tsypkaykin
      Subscriber

      Dear Mjmiddle,

      Thank you very much for the clarification!

      Best regards

      Igor

Viewing 5 reply threads
  • The topic ‘Inhouse post-processor can’t read .rst file from 2021R2 version’ is closed to new replies.