Jump to content
LFM1995

Creation of lattice members

Recommended Posts

Hi, 

 

 

I am attempting to create lattice members using a 3D geometry, I have come across a paper (see attached, pages 3 and 4) that uses the mesh to create derivative bars and nodes, I'm wondering if anyone knows how this could be achieved within Hypermesh and would be willing to talk me through the process. 

 

Kind Regards,

 

Laurence

Finite-Element-Mesh_Based_Method_for_Modeling_and__(1).pdf

Share this post


Link to post
Share on other sites

It looks easy, need a loop through each elem and bind its centroid to nodes by 1d beams.

It's very slow if create them directly for big model, we can write it to a deck and let hm input reader creates them.

 

I will check if split panel could help, with full hexas i think ok.

LFM1995 likes this

Share this post


Link to post
Share on other sites

With 2d mesh it is trivial, so I will guide you with 3d mesh:

 

For boundary bars:

- use panel tools>edges, switch "find" to "T-connection", you will get inner bars

- use panel tools>faces to create face elems

- use panel tools>features with angle 0deg to create bars on face elems

 

 

For derived bars: run this proc will output them to a file named temp.fem

Then you can import it as optistruct input deck.

 

proc p_DerivedBars args {

     *createmarkpanel elems 1 "Select 3d elems"

     set buff1 ""

     set buff2 ""

     set i 0; set j 0

     foreach NodeList [hm_getvalue elems mark=1 dataname=nodes] cx [hm_getvalue elems mark=1 dataname=centerx] cy [hm_getvalue elems mark=1 dataname=centery] cz [hm_getvalue elems mark=1 dataname=centerz] {

         append buff1 "GRID,[incr i],,$cx,$cy,$cz\n"

          foreach NodeId $NodeList {

               append buff2 "PLOTEL,[incr j],$i,$NodeId\n"

          }

     }

 

     set fpt [open temp.fem w]

     puts $fpt $buff1

     puts $fpt $buff2

     close $fpt

}

 

 

LFM1995 likes this

Share this post


Link to post
Share on other sites

Hi Tinh,

 

Apologies but I am still relatively new to Hypermesh. How do I run this script? I copied it and saved it as a .tcl and ran it using run tcl script toolbar but nothing happens.

 

Kind Regards,

 

Laurence

Share this post


Link to post
Share on other sites

Hi Tinh,

 

I get an error message saying "Error: extra characters after close-brace"

 

Kind Regards,

 

Laurence

Share this post


Link to post
Share on other sites

Hi Tinh, I wrote the code out and saved it as a .tcl file, when I execute it within Hypermesh, nothing happens. No messages or errors. I am using a solid map mesh with hexas. Any idea why it wouldn't be running?

Share this post


Link to post
Share on other sites

Hi Tinh, the script is now running, but I get an error saying: "hm_getvalue: centerx is not a valid data name" I had a look at the data names for 2017 installation and could not find centerx. Any suggestions?

 

Kind Regards,

 

Laurence

Share this post


Link to post
Share on other sites

Hm17 has centerx y z for elems.

I think you typed something wrong.

I tested and it worked. So please make it run on your hm.

Share this post


Link to post
Share on other sites

Hi Tinh,

 

I apologise, I made a mistake with writing the script. I'm English so I wrote "centre" instead of "center". I now have the script running but I have hit another issue, when I build up a model and run it I get a message saying the following:

 

 "GRID           1        9.91212213.45212-16.6676"

  *** ERROR # 1020 *** in the input data:
  Missing BEGIN BULK or line before BEGIN BULK has trailing comma.
 

I have attached the .out file, my  and fem file for your review. I had a look at the .out file and there are indeed many decimal places in the grid, why would this be happening and how can I repair this issue?

 

Laurence

 

temp.fem

_emp_2.b0c815899d90e64db48e433a685c2251

temp_2.out

Lattice_erorr.hm

Share this post


Link to post
Share on other sites

About decimal dot, when you export, click "export option" and uncheck "remove E from real value"

But I think it is not neccessary.

Share this post


Link to post
Share on other sites

Hi Tinh,

 

When I run the script, I get an output, but it is not what I desire. I require the lines to be connected to a central node in each quad element. This script produces many lines that are randomly connected to nodes all over the geometry, how can I alter the script so that the body centred cubic is created for each quad element?

 

Thanks,

 

Laurence 

 

P.S. I have attached the input and output files for your reference.

inputfile.hm

temp.fem

Share this post


Link to post
Share on other sites

Hi Tinh,

 

I made the change as you suggested but now nodes are not being found in the model (see attached). So the entities are being skipped.

 

Kind Regards,

 

Laurence

error

Share this post


Link to post
Share on other sites

Hi Tinh,

 

I run the script, open the fem file and get the error shown in the image. Nothing is imported when I import the solver deck. There are 1380 errors.

 

I've also attached an image of the script I am currently using.

 

Kind Regards,

 

Laurence

error2.PNG

script.PNG

Share this post


Link to post
Share on other sites

Hi Tinh,

 

I made the change you suggested. I've attached two screenshots. 1 is the output from the script when i is set to [hm_entitymaxid nodes] and 2 when i is set to 0.

 

It seems that the script is successfully creating lines with nodes, but they are not bonded to a central node.

 

Kind Regards,

 

Laurence

2.png

1.png

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