FAQ 47. What to do when you get elements not defined in template error?

Rahul_P1
Rahul_P1
Altair Employee
edited October 2020 in Community Q&A

FAQ 47. What to do when you get elements not defined in template error?

Tagged:

Answers

  • Rahul_P1
    Rahul_P1
    Altair Employee
    edited August 2014

    First make sure you are in the user profile you have defined your elements for
    Go to 2d > elements
    hve3l-20.1.JPG
    Select all the elements and required configurations and then update
    o2um9-20.2.JPG

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2014

    Hi Rahul,

    I used a customized template based on Nastran for Samcef output. (Yes, there is Samcef template in HW, I see, but we don't use it for historical reasons!).

     

    In original Nastran template, there is no Pyramid elements (see sreenshot HM12_Elems_types_Nastran.png).

    However, with OptiStruct template, I see Pyramid elements already defined (see HM12_Elems_types_Optistruct.png).

     

    For FE output, I can output Pyramid elements with my template, but there is alway error message like 'There are .... element not defined in template...'

     

    My question is: How to add Pyramid elements into my customized template in order to remove this error message?

     

    I do all search within HW help, but I found nothing about that.

     

    Thanks in advance,

     

    <?xml version="1.0" encoding="UTF-8"?>post-889-0-32634300-1409212554_thumb.png

    <?xml version="1.0" encoding="UTF-8"?>post-889-0-56541600-1409212629_thumb.png

  • tinh
    tinh Altair Community Member
    edited August 2014

    Hi 

    I tested adding these template commands into file 3D_elems_c.tpl, and after reload nastran userprofile i saw CPYRA in elem types panel, and it can export pyramid

    Hope this's helpful to you

     

    *elements(205,1,'CPYRA','')

    *format()

    *string('CPYRA ')

    *field(integer,id,8)

    *field(integer,node1.id,8)

    *field(integer,node2.id,8)

    *field(integer,node3.id,8)

    *field(integer,node4.id,8)

    *field(integer,node5.id,8)

    *end()

    *output()

     

    I think you used your customized template not as global template (as shown in global panel) so the error message raised

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2014

    Hi Tinh,

    Yes, I can output Pyramid elements without problem.

    But I would like to remove the message, see screenshot.

    <?xml version="1.0" encoding="UTF-8"?>post-889-0-57481600-1409219420_thumb.png

  • Rahul_P1
    Rahul_P1
    Altair Employee
    edited August 2014

    Q.NGUYEN-DAI

     

    Can you send me the template using the secure dropbox below so we can review ? 

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2014

    Hi Rahul,

    Juste send file to you (HM12_test_template_20140828.zip).

    Thank you,

    Regards,

  • Rahul_P1
    Rahul_P1
    Altair Employee
    edited August 2014

    An expert here suggests the following, can you please try this and let me know?

     

    Please add the type along with config in template element block

     

    <?xml version="1.0" encoding="UTF-8"?>post-4438-0-47922800-1409231416_thumb.jp

     

    To 

    *elements(213,1,'CPYRAMID','')

     

    As the above is processed for all types of pyramid config, it is assumed that its not for exporting

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2014

    Hi Rahul,

    It's fantastic! It works image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>

    Thank you so much!

    Regards,

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2015

    Hello,

     

    I've got the same problems with the export of Pyramid-elements in Nastran.

    After reading this post I tried to do this for pyramid5 (CPYRA) and pyramid13 (CPYRAMID).

     

    The result is that I can see them in hypermesh in the tab elem types.

    When I export the model to a .dat-file I even get no error messages.

     

    But when I import the .dat-file again in hypermesh or when I want to calculate it with Nastran, I see that hypermesh hasn't exported the pyramid-elements.

     

    Is it possible to help me with it ?

     

    Thank you in advance !

     

    Kind regards,

     

    Jos Duelen 

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2015

    Hello,

     

    I've got the same problems with the export of Pyramid-elements in Nastran.

    After reading this post I tried to do this for pyramid5 (CPYRA) and pyramid13 (CPYRAMID).

     

    The result is that I can see them in hypermesh in the tab elem types.

    When I export the model to a .dat-file I even get no error messages.

     

    But when I import the .dat-file again in hypermesh or when I want to calculate it with Nastran, I see that hypermesh hasn't exported the pyramid-elements.

     

    Is it possible to help me with it ?

     

    Thank you in advance !

     

    Kind regards,

     

    Jos Duelen 

     

    Hi Jos,

    Before importing your dat file, please check it by using a text editor to see if you have already the pyramid elements there ?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2015

    Hi Jos,

    It seems that the pyramid element was supported only with Siemens NX Nastran, not MSC Nastran. I used this type of element with SAMCEF solver.

    If you want to export pyramid element into Nastran, you need customized a little feoutput template.

     

    1. Copy 'nastran' & 'common_nas_os' folders from <ALTAIR>\templates\feoutput into your personal folder, say C:\hw for example.

     

    2. Create the following file within 'include' folder (say pyra.tpl):


    *elements(205,1,'CPYRAMID','')
    *nomenu()
    *format()
    *string('CPYRAM ')
    *field(integer,id,8)

    *if([propertyid == 0])
    *field(integer,collector.propertyid,8)
    *else()
    *field(integer,propertyid,8)
    *endif()

    field(integer,collector.id,8)
    *field(integer,node1.id,8)
    *field(integer,node2.id,8)
    *field(integer,node3.id,8)
    *field(integer,node4.id,8)
    *field(integer,node5.id,8)
    *end()
    *output()

    *elements(213,1,'CPYRAMID','')
    *nomenu()
    *format()
    *string('CPYRAM ')
    *field(integer,id,8)

    *if([propertyid == 0])
    *field(integer,collector.propertyid,8)
    *else()
    *field(integer,propertyid,8)
    *endif()

    field(integer,collector.id,8)
    *field(integer,node1.id,8)
    *field(integer,node2.id,8)
    *field(integer,node3.id,8)
    *field(integer,node4.id,8)
    *field(integer,node5.id,8)
    *field(integer,node6.id,8)
    *string(' ') *end()
    *string(' ')
    *field(integer,node7.id,8)
    *field(integer,node8.id,8)
    *field(integer,node9.id,8)
    *field(integer,node10.id,8)
    *field(integer,node11.id,8)
    *field(integer,node12.id,8)
    *field(integer,node13.id,8)
    *end()
    *output()

    3. Add a new line within the file 'general' :


    *include(pyra.tpl)

    Just after the line '*include(2D_elem.tpl)'

     

    4. Try this TCL script to export NASTRAN:


    set tpl 'C:/hw/nastran/general'
    set output 'C:/hw/nastran.dat'
    hm_answernext yes;
    *feoutputwithdata '$tpl' '$output' 0 0 1 1 0

    In my test HM model (see attachment), I have only two pyramid element. Here's the NASTRAN output:


    CEND
    BEGIN BULK
    $$
    $$ GRID Data
    $$
    GRID 1 60.0 -7.11-1520.0
    GRID 2 60.0 -3.55-1510.0
    GRID 3 70.0 -3.77-1520.0
    GRID 4 70.0 -3.55-1510.0
    GRID 5 65.0 6.0 15.0
    GRID 100 30.0 20.0 20.0
    GRID 101 30.0 20.0 10.0
    GRID 102 40.0 20.0 20.0
    GRID 103 40.0 20.0 10.0
    GRID 104 35.0 26.0 15.0
    GRID 105 30.0 20.0 15.0
    GRID 106 35.0 20.0 20.0
    GRID 107 32.5 23.0 17.5
    GRID 108 35.0 20.0 10.0
    GRID 109 32.5 23.0 12.5
    GRID 110 40.0 20.0 15.0
    GRID 111 37.5 23.0 17.5
    GRID 112 37.5 23.0 12.5
    $$------------------------------------------------------------------------------$
    CPYRAM 1 1 2 1 3 4 5
    CPYRAM 100 1 101 100 102 103 104 105
    106 110 108 109 107 111 112
    $$------------------------------------------------------------------------------$
    $
    PSOLID 1 1
    MAT1 1210000.0 0.3 7.8-9
    ENDDATA

    My output is not checked yet with NX NASTRAN. So test it carrefully before using!

     

    HTH,

     

     

    Unable to find an attachment - read this blog

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2015

    Thank you for your quick response !

     

    I did the things you said. And it is true that I can find the pyramid elements in my .dat-file.

    But when I import the Dat-file in hypermesh again or when I calculate my model and review the result in hyperview, the pyramid-elements are gone.

    Do you know what the causeb can be of this?

     

    Thank you in advance!

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2015

    Thank you for your quick response !

     

    I did the things you said. And it is true that I can find the pyramid elements in my .dat-file.

    But when I import the Dat-file in hypermesh again or when I calculate my model and review the result in hyperview, the pyramid-elements are gone.

    Do you know what the causeb can be of this?

     

    Thank you in advance!

    Which solver do you use for this pyramid elements?

    When you loss pyramid at importing into HM, that's maybe the problem of HM's reading. I don't know about this.

     

    I make my mesh with pyramid elements within HM. I got the mesh for SAMCEF solver by using my customized template and I can post-process with Hyperview without any problem with pyramid elements.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2015

    I calculate with the solver NX Nastran Version 9.0

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2015

    Hello Everyone,

    I'm getting the same error while exporting the solve deck to ansys, Nastran. I'm working on friction stir welding, for which I'm using SOLID226 elements(HEX20 and penta15). And while exporting the mesh, I'm getting error as 'Elements not defined in the template' and after which it is asking save invalid elements to user mark. Kindly help me in this regard

     

    Thank you

    Vinay

  • Rahul Rajan_21763
    Rahul Rajan_21763 New Altair Community Member
    edited July 2015

    Hi,

    Before you export file please make sure that you updated the element. Refer attached screenshot of above reply.

    Regards

    Rahul R

    <?xml version="1.0" encoding="UTF-8"?>post-36845-0-97844600-1438258807_thumb.j