body centred cubic creation
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
Answers
-
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
0 -
Seem that I wrote a script to do this?
0 -
Altair Forum User said:
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
0 -
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 --->>>
0 -
Hi Imoto,
Thanks for the script! That's exactly what I was looking for.
Kind Regards,
Laurence
0 -
Altair Forum User said:
Seem that I wrote a script to do this?
can you share the script? I can't find it. Thank you
0 -
Altair Forum User said:
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...
0