body centred cubic creation

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi, 

 

I have a structure made of 3d solid map hex mesh elements, ie. primitive unit cells (see primitive image attached). I have turned my hex mesh elements into bar2 elements. I would like to create a central node to the primitive unit cell and connect bar elements to this central node (see body centred cubic image). I know this will most likely be a TCL script problem but I'm not sure how the script would be written.

 

I have successfully created the primitive unit cell and used config edit tool to create bar2 elements (CBEAM's) But I would now like to do this with elements connected to a central node.

 

A comparison of what I'm attempting to do can be seen in this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6265793/pdf/materials-11-02073.pdf

 

I look forward to hearing from the community,

 

Kind Regards,

 

Laurence

<?xml version="1.0" encoding="UTF-8"?>primitive.PNG

<?xml version="1.0" encoding="UTF-8"?>bcc.PNG

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited April 2019

    Hi, 

     

    I have a structure made of 3d solid map hex mesh elements, ie. primitive unit cells (see image attached). I have turned my hex mesh elements into bar2 elements. I would like to create a central node to the primitive unit cell and connect bar elements to this central node (see image attached). I know this will most likely be a TCL script problem but I'm not sure how the script would be written.

     

    I have successfully created the primitive unit cell and used config edit tool to create bar2 elements (CBEAM's) But I would now like to do this with elements connected to a central node.

     

    A comparison of what I'm attempting to do can be seen in this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6265793/pdf/materials-11-02073.pdf

     

    I look forward to hearing from the community,

     

    Kind Regards,

     

    Laurence

    <?xml version="1.0" encoding="UTF-8"?>Capture.PNG

  • tinh
    tinh Altair Community Member
    edited April 2019

    Seem that I wrote a script to do this?

  • imoto
    imoto
    Altair Employee
    edited April 2019

    Hello @LFM1995

     

    You can use *createbestcirclecenternode API.

     

    Example:

    *createmarkpanel nodes 1 'Select nodes';
    *createbestcirclecenternode nodes 1 0 1 0;
     

    Thanks,

    Imoto

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited April 2019

    Hello @LFM1995

     

    You can use *createbestcirclecenternode API.

     

    Example:

    *createmarkpanel nodes 1 'Select nodes';
    *createbestcirclecenternode nodes 1 0 1 0;
     

    Thanks,

    Imoto

    Hi Imoto,

     

    Yes, this allows me to create a center node, which is part of the solution. How do I now create a central node for each quad element, as well as creating lines that connect to this central node from all 8 edges?

     

    Thanks,

     

    Laurence

    Unable to find an attachment - read this blog

  • imoto
    imoto
    Altair Employee
    edited April 2019

    Hello @LFM1995

     

    If you still have the hexa elements, please try this.

     

    hm_entityrecorder elems on;
    *createmark elems 1 'by config' 208;
    foreach elemid [hm_getmark elems 1] {
     lassign [hm_entityinfo centroid elems $elemid] X Y Z;
     *createnode $X $Y $Z;
     set center [hm_latestentityid nodes];
     foreach nodeid [hm_getvalue elems id=$elemid dataname=nodes] {
      *createlist nodes 1 $center $nodeid;
      *createelement 2 1 1 1;
     }
    }
    hm_entityrecorder elems off;
    set newplot [hm_entityrecorder elems ids];

    if {[llength $newplot] != '0'} {
     hm_createmark elems 1 $newplot;
     *configedit 1 'bar2';
    }
    hm_markclearall 1;

     

    Download --->>>

    Unable to find an attachment - read this blog

  • imoto
    imoto
    Altair Employee
    edited April 2019

    Hi @LFM1995

     

    You have one more option.
    If you are using OptiStruct, you can change the Lattice type from DTPL card.

     

    LT1.jpg<?xml version="1.0" encoding="UTF-8"?>LT3.jpg

     

    <?xml version="1.0" encoding="UTF-8"?>DTPL.jpg

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited April 2019

    Hi Imoto,

     

    Thanks for the script! That's exactly what I was looking for.

     

    Kind Regards,

     

    Laurence

  • Vlad VB
    Vlad VB Altair Community Member
    edited July 2020

    Seem that I wrote a script to do this?

    can you share the script? I can't find it. Thank you 

  • tinh
    tinh Altair Community Member
    edited August 2020

    can you share the script? I can't find it. Thank you 

    Sorry, i remember that i wrote it in a post but for a long time...