Jump to content

Recommended Posts

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

primitive.PNG

bcc.PNG

Share this post


Link to post
Share on other sites

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

Capture.PNG

Share this post


Link to post
Share on other sites

Hello @LFM1995

 

You can use *createbestcirclecenternode API.

 

Example:

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

Thanks,

Imoto

Share this post


Link to post
Share on other sites
On 4/15/2019 at 8:06 AM, Imoto 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

inputfile.hm

Share this post


Link to post
Share on other sites

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 --->>> CreateBeamForCentroidHexElements.tcl

Pandurang and LFM1995 like this

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...